I don't know what's wrong with my Terraria world transfer?

Question: I recently got a new computer, but when I make a new world, it makes a .wld file, and a .bak file. Yet on my old computer, my files look like (world).wld.bak and run smoothly. When I copied them onto a USB and put them on my new computer, they didn't show up when I loaded up Terraria.
Comment: Are you sure, you put the files into the same folder, where the other worlds are?
Answer: If you never managed to solve your problem,
assuming that you didn't delete your old files and you've got the game through Steam
I recommend that you use the in-game cloud saving system for transferring, this would require rebooting your old PC, at the bottom left of each slot for both characters and worlds there should be 3 icons. Click the last one that appears to be a cloud and you've moved it to the cloud, Steam should automatically download these files, after starting Terraria you'll probably get a notification asking if you want to use your local files or download from the cloud since you've modified the save files, pick the option to get the clouds versions and it should download your saves straight to your PC.
FYI- there are two separate save locations for Terraria one is by default Documents\my games\Terraria (Windows) and one in the Steam\Userdata, the user data information is for storing cloud data and documents is for local data.
If your data loads successfully and you can play them on your new computer click the cloud icon again to take them off the cloud and store them locally or you can keep them in the cloud and locally store their .bak files as a backup in case anything goes wrong.
If you solved this yourself I hope this helped someone.


What is the maximum achievable throughput in this communication using sliding window protocol?

Question: Station A is sending data to station B over a full duplex error free channel. A sliding window protocol is being used for flow control. The send and receive window sizes are 6 frames each.
Each frame is 1200 bytes long and the transmission time for such a frame is 70 μS. Acknowledgment frames sent by B to A are very small and require negligible transmission time. The propagation delay over the link is 300 μS. What is the maximum achievable throughput in this communication?
Comment: This sounds like a homework question.  What did you try and where did your approach fail?
Comment: Here is what I did. Station A can send maximum of 6 frames before waiting for acknowledgement. The shortest time in which station A can get an acknowledgement is 600 μS. Now station A can send 1200 bytes in 70 μS. So I calculated the amount of data it can send in 600 μS without any flow control protocol. But it can only send 6 frames during this time using selective repeat. So I calculated the amount of bytes in 6 frames and took the ratio. Is this the correct approach?
Answer: To compute the throughput we need to check the performance of the system in long term, not just at the starting. Thus we need to find a regular pattern of the transmission that will be repeated for infinitely many times.
Here you didn't mention the details of sliding window protocol, thus I'll assume the worst case scenario. I assume that the receiver don't send the ACK until it gets all of the 6 frames.
The first bit will be reached to the receiver after 300 $\mu$S. After 70 $\mu$S the first packet will be reached. And the other five packets would take 350 $\mu$S more. Then the receiver will send the ACK that will take 300 $\mu$S to reach to the sender. Sender can start transmission only after getting this ACK and a new cycle starts. This pattern is repeated for ever.
Now, you can see only productive time in this 300+420+300 $\mu$S interval is 420 $\mu$S. Hence the throughput is 420/1020 = .41


How do I best visualize this voltage data for a science project

Question: I'm helping my son with his 7th grade science project. We've had a good deal of fun with our experiments with Solar Arrays and charging 12 volt UPS batteries! But, I am not sure how to interpret the data!
Our original hypothoesis was that the lenght of the wire between the solar panel and the battery would effect the voltage charge the most. We do NOT think that was true!
We just need to get some good charts out of the data to show something that we learned!
Comment: any preferred tools? looks like excel !?
Comment: You can checkout Plotly Plots! It's beautiful
Comment: yeah excel does the trick, I just don't know WHAT to compare to WHAT
Answer: As per my observation, you need to visualize different configurations. WEKA can be used to visualize this type of things where it automatically stack multiple Graphs side by side to find trends. There are other features as well.
Yo can further explore here
enter link description here


What makes a "medical" monitor?

Question: Does anyone know the difference between a medical monitor and any other high-end LCD monitor that boasts accurate picture/colour reproduction? Is there something about it which makes it only suitable to be used in the medical field? Could you not use it for photo/video editing?
Comment: I'd imagine a medical-class monitor would be very accurate at reproducing images, but the refresh rate would be unimportant - there are very few real-time 60fps medical imaging techniques, after all.
Comment: Good point...so this would be the main reason why it's not a good idea to use it for editing HD video...along with what Manni said about screen surface?
Answer: They have to pass a more rigid electromagnetic Interference testing then commercial equipment. You don't want computer, or other electrical equipment, causing interference in other equipment, like heart monitors.
Comment: Yep, the same with a lot of equipment, software, etc. used in the medical environment
Answer: Many medical monitors work beyond 8-bit per channel, in 10 or 12 bit mode. Thus they support finer gradients then normal 8bit/channel LCD's. They need a special videocard to drive this too.
Answer: Medical equipment must be able to survive disinfecting. I guess this has a pretty severe impact on the screen surface.
Answer: Points that would matter

higher brightness levels and accurate color reproduction

rugged build
safety standards

A few references

Sony LMD series: LMD-2140MD ,  LMD-3250MD

Dynamic Display: Medical-Grade LCD Displays
Answer: There are also the monitors designed for viewing x-rays and such. The famous IBM T221 falls into this category: http://en.wikipedia.org/wiki/T221
Comment: How does being "designed for viewing x-rays" cause the monitor to differ from one that was designed for general use?

What makes a "medical" monitor?


What are the purpose of the extra diodes in this peak detector circuit (LM1815)?

Question: This is the circuit diagram from the LM1815 datasheet. I understand everything in this circuit except for the two diodes that I have marked with red. They are in a peak-detector circuit, but all of the implementations of peak detectors circuits that I am aware of only use a single diode. I tried adding them to a LT spice simulation but their effect on the output was insignificant.
Answer: The actual (but probably still a bit simplified) circuit has no diodes, but a Darlington-ish pair Q23 and Q24 and the other lone "diode" is Q20, Q21 and dual collector transistor Q22.

The Darlington pair is to reduce the loading on the peak detector capacitor.
Comment: I was going to remark that the two series diodes seem to provide only a positive-going path to the inverting and non-inverting inputs of two op-amps, which would mean that the voltage would never return to zero or any known point, due to capacitance. Although actual diodes and op-amps have finite leakage, eventually the voltage would stabilize, but the value and time would be undefined. But your more complete schematic shows a well defined path through Q23, R6, and R7.
Comment: @PStechPaul Yes, without the schematic it's a mystery, compounded by the *negative* 200nA bias current at the signal input current (current flowing out of the two 'op-amp' inputs). If was symmetrical like ordinary op-amps we'd expect the diodes to be reverse biased and the op-amps railed. I assume they're showing the diodes so if the user measures the voltage at pin 7 they get something they understand relative to the input voltage.
Answer: You're looking at a block diagram: it is a somewhat abstract depiction of what is going on.  The diodes on the block diagram are not literal components. They are blocks, just as the rest of the diagram. They represent a circuit that has two diode drops and conducts in one direction only. The implementation doesn't have to use diodes.
The op-amps on the block diagram
may not be literal op-amps. They can be application-specific gain stages with negative feedback. And so on.
Answer: To understand from the block diagram the purpose of the diodes for the zero crossing and peak detector, consider this:

The peak detector has a decay resistor referenced to 0V (gnd)
the differential inputs will then be 1 diode drop from 0V.
this also means the signal input will be active in the region above 1 diode drop below ground
elsewhere the signal input is clamped above and below ground to limit the range further but the transition of importance is observed as "just" above -0.5V for a low diode current voltage.

Now the "Theory of Operation" in the datasheet ought to make more sense.
How it is done is less important unless you like the nitty-gritty of how to design all these blocks in the diagram with the fewest number of transistors and be reliable.


What makes an electron jump down to lower energy level?

Question: While I can easily grasp the mechanism of energy absorption by the atom system resulting in a jump of the electron to a higher energy level, i.e. receiving energy from the outside in the form of a photon, I cannot really understand why would an electron be interested, or be compelled to go back to lowest energy level available resulting in the emission of a photon ?!?
Which mechanisms are behind the scene for this to happen?
I came across a lot of explanations stating that "that's just the way electron like to be" :/
It's like saying that rain falls back down because water at the like to go back to the oceans.
Many thanks
Comment: Related: https://physics.stackexchange.com/q/64146/123208
Comment: I'm no expert, but I believe the decay of an excited state, as you describe, is probabilistic.
Comment: Entropy! I.e., it is more likely to emit a photon than to absorb one.
Answer: You are asking about electron de-exitation, and there are basically two main types of processes involved, in any case, the electron/atom system moves to a lower energy level if there is such a lower energy level available:

spontaneous emission:

In this case the excited atom/electron system transitions to a lower energy level, while emitting a photon. This form of emission is mainly a QM phenomenon, and you are asking why it happens. In this case, the answer is quantum mechanics itself, a trigger for the process can only be understood with the explanations in QED and vacuum fluctuations.

Spontaneous emission in free space depends upon vacuum fluctuations to get started.[7][8]

https://en.wikipedia.org/wiki/Spontaneous_emission

stimulated emission

In this case, an incoming photon of a specific frequency can interact with the  electron/atom system, and cause it to transfer to a lower energy level.

The liberated energy transfers to the electromagnetic field, creating a new photon with a phase, frequency, polarization, and direction of travel that are all identical to the photons of the incident wave. This is in contrast to spontaneous emission, which occurs at random intervals without regard to the ambient electromagnetic field.

https://en.wikipedia.org/wiki/Stimulated_emission
It is very important to understand that I mentioned everywhere a photon emission but there are mainly two types of such processes, radiative and non-radiative transitions. In the case of the latter no photon is emitted.

Just a note, there are other forms of transitions, like fine and hyperfine transitions too.
Answer: Before going to the quantized atomic levels, consider that in classical physics there is the Minimum total potential energy principle

A rolling ball will end up stationary at the bottom of a hill, the point of minimum potential energy. The reason is that as it rolls downward under the influence of gravity, friction produced by its motion transfers energy in the form of heat of the surroundings with an attendant increase in entropy.

Principles have the strength of axioms in the theories of physics, they are imposed because then the mathematical theories fit the observations and are predictive of new ones..
This principle is carried over in the case where quantization is imposed, so that the electrons around the nucleus instead of following the principle of minimum energy and ending up neutralizing the nucleus, they stay in stable orbits allowing for atoms and solids to form. If a lower orbital is empty, the principle forces the decay to that orbital, within the probabilistic rules of quantum mechanics, as long as there is a way for the extra energy to be dissipated, and that is the emission of a photon.
from the link

A free proton and free electron will tend to combine to form the lowest energy state (the ground state) of a hydrogen atom, the most stable configuration. This is because that state's energy is 13.6 electron volts (eV) lower than when the two particles separated by an infinite distance. The dissipation in this system takes the form of spontaneous emission of electromagnetic radiation, which increases the entropy of the surroundings.
Comment: Really nice answer.
Answer: The falling to the lower level for electrions in an atom. is due to sponaneous emission. One can think of it as being due to the infuence on the excited state of zero-point-energy  vacuum fluctuations in the electromagetic field. The necessary existence of spontaneous emission was deduced in form of A and B coefficients by Einstein   in 1916 --- long before the idea of quantum fields or even zero point energy was about.
Answer: Why does an electron drop to a lower energy level? Why questions are often outside the scope of physics. Physics says how the universe behaves, not why it does so.
But sometimes you can say why. Sometimes a law is derived from a simpler law. Why does the complex law work? Because it is a consequence of the simpler law. It still might leave you wondering why the simpler law is true. Or you might be so used to the simpler law that it feels satisfactory. The simplest laws are justified by agreement with experiments.
In this case, we can start with a classical electron being attracted to a proton. Protons exert an attractive force on electrons. This is the simpler law that I cannot explain further. (Quantum mechanical explanations for the attraction do exist. But you will get to a point where you cannot explain why quantum mechanics works. It just agrees with experiments.)
The proton has an electric field around it. You can define more complex laws: The forces on an electron depend only on its position.
$$PE = F \cdot d$$
$$KE = 1/2 mv^2. $$
From the properties of forces, you find that $PE + KE$ is conserved.
In this case, you can say an electron tends to move to a lower energy position because forces point toward lower energy positions, and electrons are accelerated in the direction of forces.
The same type of argument can be made for quantum mechanical electrons and protons, but it is harder. It is easier and more natural to work directly with energy. This is why physicists tend to work with energy and think that moving to lower energy is the simplest law.
A quantum mechanical electron is not a point particle. It has no single position, so you can't say that a single value of force is acting on it. It has no trajectory. So you can't integrate $F \cdot d$ over the trajectory to get $PE$.
But it does have a wave function. There is a time evolution operator that you can use to calculate the wave function at future times. You can calculate probable position distributions from wave functions. From this you can show that electrons tend to move toward protons.
You can also show that the uncertainty principle keeps them from getting too close. An electron that is very close to a proton has a small uncertainty of position. Therefor it has a high uncertainty of momentum. An electron that may have a high momentum isn't very likely to stay near a proton. Orbitals are stable configurations where there is a balance between these two tendencies to be attracted and move away.
Higher energy orbitals are in general larger than lower energy orbitals. So an electron tends to move toward lower energy orbitals. Classically, it would gain kinetic energy as it does so. Quantum mechanically, it emits the energy in a photon instead.
The behavior of the quantum mechanical electron is governed by quantum mechanical laws. One of the chief laws is the Schrodinger equation. It is a quantum mechanical version of the classical conservation of energy law. So you can say that quantum mechanical electrons move toward lower energy positions for the same reason that a classical electron does.


Amazon RDS SQL Server Express 2012 - Fail to log-in

Question: I recently created a new RDS of SQL Server Express 2012.
I have set the security to be publicly available and to accept all ports and incoming connections.
From some reason, I fail to connect it using my three clients:
- HeidiSQL
- SQL Server Management Studio
- java client
In each of them I configure the end point that I see in the RDS instance.
I specify the username and password that I created.
I keep getting an error that the "SQL Server does not exist"

Appreciate any help!
By the way, I had no problem connecting to the SQL Server yesterday, and I can not see any informative error logs, I also tried to restart the instance.
Update:
I see the following message in the error log, is this error sever?
"2017-05-12 20:45:34.23 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/EC2AMAZ-HVNIAHV ] for the SQL Server service. Windows return code: 0xffffffff, state: 53. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered."
Answer: Apparently the default security group was missing a rule.
Here is the missing rule that solved the issue


What is the difference between Q4/Q4 and Y/Y GDP growth?

Question: Per US media, the US economy grew 3.1% in 2018 Q4/Q4 and 2.9% in 2018 Y/Y. 2.9% seems the reference number in various databases (World Bank, Reuters, Bloomberg, etc) but what exactly does Q4/Q4 mean and which measures changes from Jan 1 2017 to  Dec 31 2017 compared to Jan 1 2018 to Dec 31 2018
Answer: If you could include the source(s) you were talking about that would be great. Without further info, my initial guess is that the Q4/Q4 means you compare GDP in 2018Q4 to GDP in 2017Q4. Y/Y means you compare GDP in the whole year of 2018 to that of 2017.
Upon further inspection, if you take a look at the US's real GDP, you'd get the following:

Growth in 2018Q4 compared to 2017Q4: 2.52%
Growth in 2018Q3 compared to 2017Q3: 3.13% [Link]
Growth in 2018 compared to 2017: 2.93% [Link]

So I think your Y/Y number is right... but the number for "2018Q4/Q4" might have been growth in Q3?

Update
It seems like the number reported was the initial estimate (which gives YoY growth of 2018Q4 to be 3.1% and 2018 to be 2.9%) in February 2019. The third estimate (which is what FRED uses) was released in December 2019 and yields YoY growth as calculated above.
Comment: Source Attached: https://www.whitehouse.gov/articles/2018-banner-year-u-s-economy/
Comment: Please see update above.
Comment: Please see own answer below
Answer: As mentioned, if you can identify the sources used for the reported figures, that should solve the problem.  Art is correct in terms of the the unit of time with Q4/Q4 comparing growth from the same quarter from the prior year, and that the Y/Y based on the according calendar year.
His calculations appear to be correct as well, and my guess is that it was either misreported as Q4 growth annualized rate or misinterpreted as Q3/Q3.  I got the same numbers from the same source, and I also compared the actual volume in chained 2012 dollars as a rough check.  The volume measurement is likely an inflation baseline that I didn't verify to be the case.
Answer: The difference between Q4/Q4 and yearly GDP growth is explained in a blog post by the New York Fed, Data Insight: Which Growth Rate? It's a Weighty Subject; quoting the basic points:

The growth rate in real gross domestic product (GDP) is a conventional indicator of the economy's health. But the two ways of measuring annual GDP growth can give very different answers. In 2013, GDP grew 2.2 percent on a year-over-year basis, but at a faster 3.1 percent rate on a Q4-over-Q4 basis. So, which measure is more meaningful? We show in this post that the Q4/Q4 metric is better since it only considers quarterly growth rates during the current year, while the Year/Year measure depends on quarterly growth rates in both the current and previous year and puts considerable weight on growth around the turn of the year.
A standard method for reporting annual growth in economic variables (as used by the Bureau of Economic Analysis) is to take the average level for the whole year and compare that with the average level in the previous year, which in our example would be 2012. This calculation results in the Year/Year growth rate:
The alternative measure of annual growth is to calculate Q4/Q4 growth:

The Q4/Q4 measure is, for example, used by the Federal Reserve presidents and Board members in their economic projections. These two measures can give very different values for annual growth rates. The chart below shows them both from 1950 through 2013.

The next chart shows that the difference in the two measures has been over 4.0 percentage points at times, with the standard deviation of the difference being a fairly high 1.7 percentage points. The key insight from the illustration is that the difference between the two measures tends to be extreme right before and right after National Bureau of Economic Research-dated recessions, represented by the grey shaded areas.

[...]
The Q4/Q4 measure is approximately just an average of the four quarterly growth rates in a given year. Meanwhile, the Year/Year annual measure is a weighted average of the previous and current year's quarterly growth rates, with the weights shaped like a tent. In fact, the most weight is placed on growth rates around the turn of the year. This feature is an unappealing one as we should care about all growth rates equally. Moreover, the quarterly growth rates from the previous year affect the Year/Year measure, which explains why it is relatively smoother than Q4/Q4 growth. This difference also explains why the gap in the two measures is particularly pronounced around turning points in the business cycle. The Q4/Q4 measure "picks up" any change in GDP growth faster than the Year/Year growth measure.
Despite the appeal of the Q4/Q4 measure, economic forecasters often report GDP growth in Year/Year terms with the notable exception of the Summary of Economic Projections by the Federal Open Market Committee. But, those looking for an alternative can always approximate the Q4/Q4 measure by simply averaging the quarterly growth rates, as we show in this post.

Some forecasters report both  Q4/Q4 and yearly/annual changes; here is for example Northern Trust forecasts (March 2023):

In other expert forecasts, it may be not clear if the reported value refers to Q4/Q4 or to annual change; in such cases, averaging the forecasts for the individual quarters (when available), as explained in the quoted blog post above, gives an indication of the Q4/Q4 growth forecast.


Can I use a GFCI receptacle to feed a hardwired fountain pump?

Question: Question about a fountain pump…
The fountain pump will be hardwired.
Is it okay by code to feed a GFCI receptacle (line side) from the circuit breaker and then wire load side to the pump.
Will this suffice for GFCI protection?
Comment: How many HP is the fountain pump, and what other loads are on the circuit?
Comment: My apologies, I will find out the HP of the pump motor. I do know it will be on a dedicated circuit.
Answer: That's a fine way to do that, provided Code allows a receptacle on the fountain circuit.
(In some cases it does not; for instance a dishwasher circuit is not allowed to have receptacles in a kitchen, and any circuit with hardwired loads > 50% of circuit ampacity is not allowed to have any sockets at all.)
If you are not allowed to have sockets on the circuit, then you can use a GFCI breaker or a standalone GFCI (called a GFCI Deadfront or blankface). They also make GFCI switches, which are a deadfront rated for daily switching duty.
Comment: My last two dishwashers were installed with a receptacle for the dishwasher to plug into.  They were not hard-wired.
Comment: Thank you for this knowledge and information. I did not even think of a blank face GFCI as an option. That may work perfectly.
Thank you for your response.
Comment: @steveSh and dishwashers often require a disconnect switch in the kitchen, which gets really confusing as now there's this switch next to the disposal switch that you never should throw. Well, a switch-rated GFCI deadfront solves that nicely, by presenting a really weird user interface that no one will mistake for a normal switch.
Answer: Most likely yes.
What size pump motor what size circuit? 15 or 20 amp.
Will be needed to properly answer but a sure fire way to get a yes answer is to install a "dead face GFCI".
What is a dead face GFCI? It is a device that has no receptacle just the test and reset buttons.
I use these in locations where I want GFCI protection locally but do not want receptacles like on the surround of a jetted tub or when I want a under/ inside cabinet receptacle to have an easy access reset on the face of the cabinet (higher end homes usually).
There are ways to do it but depending on the answer to the pump size and circuit size a dead face may required.
Comment: Ed, thanks a great deal for your time and response. I have never thought before of the concept/use of the dead face GFCI. I will have to check the size of the pump anyhow. I know it is 120vac. And the electrician ran a 12 gauge so it will most likely be a 20 amp circuit (not a long run from panel). I will confirm the nameplate. I just want to make sure I am up to code. Thank you.
Now I need to confirm the  possible need for a disconnect or more specifically accessibility requirements.
Perhaps that is for another thread.
Thank you very much


what if i remove .config file from the linux source

Question: I was just curious whether i can remove the .config file.
Actually i am learning how to edit the config (from make menuconfig) and recompile the kernel. So if i remove the .config file from the source (/usr/src/linux) how does it affect? I am learning from this link
Answer: If you delete the .config file then you'll have to start the kernel configuration from total scratch (selecting the architecture and so on). There is also the possibility to start with a "default configuration" by using the

make XXXX_defconfig

Where XXXX is the system you are working on (for example i386). This default configurations are found in arch/XXX/configs directories (with XXX being the architecture).
Also some environment/Makefile settings are used from the kernel to assist you in this process (for example the ARCH variable is used to filter out the architectures proposed)


Does more money in account help get a longer Schengen visa?

Question: Do consulates provide a visa valid for a longer duration if they find more money in the bank account? I am applying from UK to France/Italian consulates.
Comment: Yes chances are high, probably. My case bank balance around £1000, 4 months, bank balance £9000, 2 years visa. But I had multiple Schengen visas(multiple countries)  from previous travels(France 3 times and on the 3rd time they issues me a 2 year visa).
Answer: Having money is a great way to help get a tourist visa, but it doesn't necessary mean that more money will result in a longer validity -- or even get a visa at all.  As an example, people are currently paying around EUR 9,000 and up to EUR 25,000 to get unlawfully trafficked into Europe, so if money were the sole factor they could show those funds as evidence for a visa instead (and then abscond once they cleared immigration control).  It helps to demonstrate that even ready cash of up to EUR 25,000 is not always enough while people with much less than that can successfully qualify.
Your cash reserves are a factor in the decision-making process, but they will also examine your income to see if it's stable and has a strong link to your own national economy.
Assuming you are trying to get a Schengen, they are limited to a maximum of 90 days in the first instance.  All other things being equal, they are minded to issue visas for the full 90 days, and they will work back from the maximum if need be so as to align with your itinerary and premise.
Your question did not specify how much time you wanted on a visa but the best starting point is to nail down what you want to accomplish in France/Italy and use that to determine how much time is needed.  Once you know how much time you want to spend in Europe, calculating the amount of cash you need is a fairly mechanical process.
Please also see: Schengen Visa Application: tips for preparing
Answer: I am not aware of any stats that would support that notion nor is there any rule that explicitly ties the amount of money you have to the visa you get.
The consulate basically has two options when issuing a visa:

Issue something that covers the trip you described on the application, with a bit of buffer in case something happens. That's the most likely outcome and what's officially recommended for first-time applicants.
Issue a one or two-year multiple entry visa to avoid having to deal with repeated applications if you go to the Schengen area again. It's more likely for trusted applicants who have used Schengen visas before and provide some guarantees but it can even happen to first-time applicants (e.g. people who reside in the UK apparently get such visas more easily).

So the most important thing is to establish that you do not present any risk and have a credible plan for your stay in the Schengen area. Just think about what you might want to do and be truthful about it.
Of course, the amount of money you have at your disposal should also be commensurate with your plan. If you have only €2000, no income, and claim to want to spend a few weeks each in Paris, Rome, Zürich and Amsterdam, you won't get any visa at all.


Raspberry Pi Debug Probe fails with `Error: Unknown flash device (ID 0x00ffffff)`

Question: I am trying to debug a custom rp2040b2 board with Winbond W25Q128JVSQ with the debug probe and am following the Raspberry Pi Debug Probe tutorial. The board is intended to be similar to a Pico (for easier firmware programming), but with features specific to connecting with a keyboard matrix.
When I try and upload my first program to my custom board I get the following error. It is my suspicion that the W25Q128JVSQ is not being detected properly. After looking through the code, it appears to support the W25Q128JV. I also verified all the schematics and as expected the connection to the flash chip is standard serial SPI NOR FLASH wired to the rp2040. Any help would be appreciated!
sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" -c "program hello_serial.elf verify reset exit"

Result
Open On-Chip Debugger 0.12.0-g4d87f6d (2023-12-10-10:40)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : Hardware thread awareness created
Info : Hardware thread awareness created
adapter speed: 5000 kHz

Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6616407E33E4729
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 5000 kHz
Info : SWD DPIDR 0x0bc12477, DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477, DLPIDR 0x10000001
Info : [rp2040.core0] Cortex-M0+ r0p1 processor detected
Info : [rp2040.core0] target has 4 breakpoints, 2 watchpoints
Info : [rp2040.core1] Cortex-M0+ r0p1 processor detected
Info : [rp2040.core1] target has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 3333
Info : Listening on port 3333 for gdb connections
[rp2040.core0] halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00
[rp2040.core1] halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00
** Programming Started **
Error: Unknown flash device (ID 0x00ffffff)
Error: auto_probe failed
** Programming Failed **
shutdown command invoked

Answer: Please double check your schematics. I had the same problem and found I had swapped QSPI_SD0 and QSPI_SD1. Your picture indicates the same...
Here is the reference to the official minimum schematic:
https://datasheets.raspberrypi.com/rp2040/Minimal-KiCAD.zip
edit: I used JLCPCB and in their block for the W25Q128 the description for DO and D1 can be understood as IO0 and IO1 if that makes sense.
Comment: Nice find, let me check this out in detail.


Principle of superposition for capacitor

Question: In a capacitor the parallel plates of opposite charge create equal electric fields in opposite directions. We know field outside the capacitor is zero but inside the capacitor it is non zero. My question is if we assume zero field because of superposition of the two electric fields, why can't we do the same in between the two plates, because here also the fields are opposite to each other and hence will cancel? Basically, I want to know when we can use superposition principle and when we can't.
Comment: Related https://physics.stackexchange.com/q/65191/
Answer: The principle of superposition is always applicable. The picture below shows to capacitor plates which are oppositely charged and their respective electric fields. The positively charged one (blue) has its electric field pointing outwards which the negatively charged plate (red) has it's field pointing inwards. As you can see, the superposition of both field will lead to zero field outside the capacitor plate (because there, the fields are pointing in opposite directions) while they will support each other in between the plates.
Comment: seems like you draw better than me :))
Comment: There really should be some kind of button on SE you push to indicate that your in the process of writing an answer... Would save a lot of redundant effort.
Comment: @Jonas: I'd agree it would be useful to know if others are working on an answer. However, you wouldn't know what they're writing, so it would be a shame if you didn't post an answer which could have been better or offered a different perspective just because you saw the notification.
Answer: We can always use superposition principle. I will explain it in the case of capacitor.

First you must understand that a positive plate will create an "out" electric field as showed in the picture. In the contrary, a negative plate will create an
"in" electric field (the arrow is reversed).
If you draw the electric field of 2 opposite-charged plates placed near each other, you will have a picture like:

You see, outside the space between plates, the arrows exactly cancel each other, while inside that space, arrows of 2 plates have the same direction.


What is the plant on the RIGHT?

Question: That's pretty much it. I need to care for this unknown plant. What is it?
Comment: The picture is so dark its hard to see detail - the leaves to the left o the plant you;re asking about look as if they have white spots on them, but can you post a better lit one please?
Answer: Looks like a fern. that's a start for ID
Answer: Phlebodium aureum, AKA Blue Star Fern.  Like most ferns they want moist, not wet, soil at all times.  When the top of the soil becomes dry down to the second knuckle of your index finger it is time to water again.   Water until water comes out the bottom of the pot, then stop.  Dump out any excess water out of the catch basin.  It is best to give this plant some additional humidity.  You can do this by putting stones in the catch basin and place the plant on top of the stones.  In this case you can leave the water in the basin as long as the water does not pass the stones.  Keep the plant in a shaded area of your room, but not a dark corner.  Fertilise three times during the growing season, from May until August.
Phlebodium aureum

What is the plant on the RIGHT?


Why didn't Thorin bring to Erebor his own army from Blue Mountains?

Question: Why did Thorin need Dain's help? I thought there were a lot of dwarves from Erebor living in Blue Mountains. Why didn't they help Thorin?
Comment: are you referencing the films or book? I seem to recall a statement made by Thorin in the first film that he was unable to recruit anyone else save the other dwarves who meet at Bilbo's
Answer: Consider the following map of Middle-earth:

Erebor is circled in red. The Iron Hills, where Dáin and his people live, are circled in blue. The Blue Mountains (Ered Luin) are in green. Sure, they could have sent word to the Blue Mountains for help, but why bother asking for reinforcements from the other side of the continent when Thorin's cousin, with his massive army of Dwarven warriors, is right next door?
What's more, Thorin and company needed reinforcements immediately; as Bilbo astutely points out, Smaug wasn't exactly keeping a well-stocked pantry:

"Back now to the Mountain!" cried Thorin. "We have little time to lose."
"And little food to use!" cried Bilbo
The Hobbit Chapter 15: "The Gathering of the Clouds"

They wouldn't survive a prolonged seige for all the time it would have taken the dwarves of the Blue Mountains to trek all the way across Middle-earth to help them out; even Thorin's company, moving about as fast as you'd expect thirteen dwarves and a hobbit to go, took about six months1 (though admittedly with some delays). A full Dwarvish army would take at least that long, likely much longer.
So why didn't they take an army with them?
This is a somewhat more sensible proposition, and was actually Thorin's original intention (emphasis mine):

I [Gandalf] promised to help him if I could. I was as eager as he was to see the end of Smaug, but Thorin was all for plans of battle and war, as if he were really King Thorin the Second, and I could see no hope in that.
Unfinished Tales Part 3: "The Third Age" Chapter III: "The Quest of Erebor"

As hinted in the above quote, Gandalf persuaded Thorin to favour a stealthy approach over open warfare, something which is discussed by Gandalf in the text itself:

"[Storming the front gate] would be no good," said the wizard, "not without a mighty Warrior, even a Hero. I tried to find one; but warriors are busy fighting one another in distant lands, and in this neighbourhood heroes are scarce, or simply lot to be found. Swords in these parts are mostly blunt, and axes are used for trees, and shields as cradles or dish-covers; and dragons are comfortably far-off (and therefore legendary). That is why I settled on burglary.
The Hobbit Chapter 1: "An Unexpected Journey"

Tramping through Eriador with a batallion of Dwarvish soldiers is rather the antihesis of a stealthy approach.

1 The initial party at Bilbo's house took place in April, while the company reached Erebor on "Durin's Day", which is pegged by varying sources as either the end of September or mid-October.
Comment: So you circled the Blue Mountains in green, not blue?
Comment: Smaug wouldn't notice an army tramping through Eriador.  Tramping through Rhovanion, maybe!
Answer: He doesn't have a Blue Mountain army
Armies are expensive to maintain (especially to greedy dwarves) and Thorin's vast wealth was pretty much lost when the Mountain fell, and when Thror went missing (with their Ring) in Moria. Most of the Blue Mountain dwarves are not of the House of Durin- and they lost quite a bit of their own strength helping Durin's folk (Thror, Thrain, and Thorin) fail to retake Moria, and are probably none too willing to follow another Durin's heir on another hopeless quest.
And for that matter, the armies of Erebor and Dale did no good against Smaug the first time, and that was with the benefits of actually holding the defensive fortifications. Marching straight up is basically asking for a disaster. Granted, something could be said for the fact that they were caught unawares.
I don't think it's ever exactly stated (or I am completely unaware) of how Gandalf thought a burglar would help the Dwarves reclaim their treasure (not when it is so vast), nor how a burglar would help kill Smaug (other than the way he actually did- tricking Smaug into showing his weakness). That said, Gandalf was most certainly correct that an army was not the best way to kill Smaug. This answer indicates that he had no plan, it was just a shot in the dark.
The movies patch that plot hole by indicating that Thorin just wants to retrieve the Arkenstone, with which he'll be able to convince his kin (namely Dain) to come to his aid and fight the dragon- clearly he thinks that an army prepared and ready will stand a good chance against Smaug.
Gandalf convincing Thorin not to array an army is because dwarves are stubborn- Thorin probably couldn't have conceived of any other way than to kill Smaug than with an army, which Gandalf knew would not work- thus, he convinced Thorin of another path.
Comment: "I don't think it's ever exactly stated (or I am completely unaware) of how Gandalf thought a burglar would help the Dwarves reclaim their treasure (not when it is so vast)" The point of the burglar is to steal the Kings Jewel.  Thorin then, if Smaug is dead, rules an empty dragon free kingdom while his people or other subjects turn up or he legs it back to the mountains and rallies support for himself as a legitimised King Under The Mountain.  Sure the armies failed to kill the dragon before but with this magic stone we cannot fail... maybe.
Comment: "when Thror went missing (with their Ring) in Moria." Thror gave the ring to Thrain before he left for Moria.  The ring was lost when Thrain was captured, taken to Dol Guldur and lost the ring to Sauron himself.


What type of 1" electric valve can I use in a line with no pressure?

Question: I am looking to attach two 1" valves to a drainage line I have coming from my gutter. I would like the option to select which channel the rainwater flows down, using valves. My hurdle right now is finding the right type of valve, as the ones i have seen require a minimum pressure, whereas i will have little to none (all pressure from gravity) It seems like a gate valve would be the right option for this.
How can I control the water automatically and with a valve that does not require water pressure to activate?
Comment: 1 inch valves seem quite small to drain gutters/down sprouts.
Comment: @Ruskes Yes, I have a low voltage circuit, last step i need figured out is this valve.
Comment: It is an offshoot, used to water some crops. ive recorded 0-50 gph on this line.
Comment: and you want it. remote controlled or at least on a switch, in any case it needs to be on a low voltage circuit
Comment: a stepper motor to drive a flap for an inverted Y.
Comment: @SolarMike Thankyou, good idea. Seems a little complicated to build, for me. Looking for a simple or commercially available solution.
Answer: Do you really need "valves" to control rain water?  Assuming your two destinations are a barrel and the street, all you really need is a flap.
Use tin snips to create a branch in your down spout, create a makeshift hinge using a stainless steel rod, and put a plastic flap on it.  Make the flap out of any piece of plastic.
Look DWV flaps.  PVC fittings in various sizes
with hinged flaps on one end.  Maybe you could adapt one.
Then all you need is an actuator for the flap.   Look up "actuator" on Amazon ... there are all kinds of them under $50.   At first glance, an easy one would be a 12V automotive one meant for diverting to face/foot vents in a car.
This will all look a bit makeshift, but I suppose that's in keeping with what you're doing?    And anything professional, like "flow diverters" for agriculture or commercial HVAC, will cost hundreds or thousands of dollars.
Comment: +1 for hitting all the marks!
Comment: @jay613 - The policy of Stack Exchange is that borrowed images need to be attributed properly. What you are saying is not suitable. If you want to use an image then trace it back to its source and provide a link. You can put the attribution URL inside the parenthesis of something like this just below the picture. *[Picture Source]()*
Comment: Careless free will copying things off the internet without proper attribution can be a huge liability to SE and a posting author if an improperly used image is copied and the actual owner of the image takes issue with it.
Comment: What I'm more likely to do is refrain from including images if they are not a critical part of the answer.  Especially if I'm on a phone.   Maybe if the editor facilitated this ... I enter an image URL and it creates all the markup to include a copy of the image and a link to its source.
Comment: @jay613 Uh… good? Posting from your phone is not an excuse for breaking the very clear rules.
Comment: Well, it was a decent question if not a masterpiece but as predicted was shut down by the Shopping Police, and I thought this was an interesting answer but it seems now we have a growing body of bored citation police too.   I just find it so amusing that people take the time to do this.
Answer: You can use a valve that's intended for use as a heating system's zone valve. These are electrically operated and take less than a minute to open fully. They generally operate at 24V AC. They require no water pressure at all to operate.
You can get a straight-through model or a 3-way model that has one opening for "IN" and two openings for "OUT". The motor selects which opening is "OUT". These are just a little more expensive than straight-through models.
Look at the specifications for the valve, and if you want better flow, buy one that has a higher Cv rating. This is the valve's "flow coefficient". The higher the number, the better the flow. Numerically, the number is gallons per minute at a 1 psi pressure drop.
Example below, photo credit supplyhouse.com (I have no connection with them.)
NOTE: These are not intended for use outdoors without an enclosure, as they are not weather resistant.
Comment: That seems to be a solution; however, these do tend to get pretty expensive. I plan on having a few of these, so this can add up quickly. You gave me a good idea, and i will look into using a mechanical ball valve, and attach a electric valve turner of sorts.
Comment: @drew Hmmm... "Looking for a simple or commercially available solution." = $$$. But if you want to go cheap and wonky and you have more time than money, have a look at using a 12V DC linear actuator mounted 45 degrees off the flow axis of a PVC ball valve. Cheap PVC ball valves are much harder to turn than brass and steel, but I have a 12V linear actuator with a 4" stroke that pulls or pushes with a force of 225 lbs.
Comment: I would not even make it electric - a float from the barrel to a flap valve could do it, with a bit of tinkering.
Comment: Picture attribution should have a direct visible link to the place the picture came from. It is not suitable to cite a vague web location.
Comment: @MichaelKaras Thanks, didn't know that. I've added a link to the actual location of the photo.
Answer: "What type of 1" electric valve can I use in a line with no pressure?" The easiest answer is a ball valve. They come in all sizes and shapes, in your case a 3 way would do the trick. I think 1" is to small for your application but I do not have much information other then it is rain water.
Answer: Think about setting it up as two zones on a sprinkler system with two "on/off" valves hooked up to your drain line. You can get the valves at any home store and they are pretty cheap and require no pressure to operate. See picture below from Home Depot.  https://www.homedepot.com/p/Orbit-1-in-FPT-Auto-Inline-Valve-57281/300642255#overlay

You can use a controller/timer to operate the valves. It supplies the 24 volts required to operate the valves. See photo from Home Depot.  https://www.homedepot.com/p/Orbit-4-Zone-Indoor-Easy-Dial-Timer-57594/300642245
Comment: Please look at other comments here as to what you need to do regarding images that probably are not your own and thus would direct links to image sources.
Answer: You could either use a straight wired Solenoid valve such as this one:
https://www.amazon.com/gp/product/B06XWGF3CX

Or if you want something automated you could use this Valve Controller:
https://www.amazon.com/Compatible-Assistant-Application-program-Android/dp/B09L5PB6B7

This one sits on top of an existing Ball Valve and closes or opens the valve depending on the command given.
Note that NEITHER of these are NO (Normally Open) or NC (Normally Closed).
In other words, once de-energized they will stay where there are.
They use less power since they are only energized when turned on or turned off.
If for example, you want to make sure that the valve is Closed if the power is out or once the requested operation is completed then you will want to look for a NC (Normally Closed) type of valve that will only stay Open as long as it continues to receive a signal.
Answer: This could be called rain capture system with fully controlled rain water capturing and distribution system with remote control.
First you will need is Downspout Rain Water Collection Diverter Connector- they come in all forms and shapes.
Then you need 1 or 2 inch hose to feed the barrels.
Here you can expand (in the future) to electricity controlled valve to stop the barrel fill, or to redirect directly to plants. For that you can use an inline sprinkler system valves that are already build to work in wet environment
Barrels you can get cheap ($10) at the barrel recycling centers (look for one), just pay attention what was in it before).
Connect multiple barrels (depending how much you want to capture and how much you consume) in parallel at lowest point of barrel and set barrel on bricks to get some elevation for the flow.
Comment: Those diverters split the flow in some defined proportion with no control.   Which is probably all OP really needs, but this doesn't address the actual question of how to electrically divert all the water one way or the other.  Good idea to use irrigation valves for *some* control with this solution.  They are so cheap.
Comment: Unless that is your own picture taken at the corner of your house this needs to have proper source attribution in a visible link.


When did GNOME/gnome-calendar ask for my Google account credentials?

Question: At some point I added my Google account credentials to gnome-calendar but I can't recall when. I don't believe that I manually opened the application and explicitly added this account, as I don't ever use it.
I must have been prompted at some point to add my Google account somewhere. When might this prompt have appeared?
This all originated from my receiving Google Calendar reminders from the evolution-alarm-notify ("Reminder" panel icon). It receives this information from the evolution-data-server for which I have to manage my credentials through the gnome-calendar application. It took an unpleasant amount of time and effort to finally track this down.
I am using Fedora 30 with MATE Desktop and I installed all of my packages manually from a minimal install. This was most likely a dependency package inherited from my trying out GNOME Desktop so this wasn't anything related to a bootable Live desktop image or the graphical installer.
When might GNOME/gnome-calendar have asked for my Google account credentials?
Answer: Quite likely it was at the time you were setting up your mail client, as they often come together. Take a look there - if applicable.
Comment: I don't have `evolution` or any other mail client installed and I haven't set any up since installing the OS.


How to notify TabCtrl when its parent window closes?

Question: I'm using BCG Pro's control CBCGPTabWnd, which contains multiple tab windows, when the parent Dialog's OnOK() is called, I don't know how to notify the tab windows for cleanup and save work.
And I cannot add public interfaces for those tab windows to call to do this.
Now I'm using TabWnd->SendMessage(WM_COMMAND, IDOK) in the parent's OnOK handler to stimulate the OnOK Message for those child tab windows, because they are actually dialog-based windows.
Am I doing this right?
PS: Generally it would be better if I can notify them explicitly, WM_DESTROY is an option but it can only be used in Closing and is hard to control the timing
Comment: Why don't you handle WM_DESTROY? The child Windows will at least receive this Messages when the parent is destroyed. Also you have WM_PARENTNOTIFY where the parent is informed about the destruction of a child.
Comment: Add a WM_APP+n message and send it to all descendants.
Comment: Thanks. I have considered this. But it would be better if there is a more explicit way because sometimes I want the tab windows to save work in other situations than closing. So what else I can do is to define my custom message?
Comment: @xMRi OK...If you make it an answer, I can vote up
Answer: Just send a private/cursom message internally with WM_APP+n.
Handle it with ON_MESSAGE.
This makes it possible to react on every case were your parent needs to inform the embedded child windows. And you can implement it in different window types.


Updating a Row in a DataTable crashes IIS app Pool

Question: I have some very simple code that is used to Import data from various files in my database via a .net web application. During my recent updating of this code to make some centralise function calls I ran into a situation where I try to Add a data row to a data table and this crashes or better yet restart the applicaton pool. I noticed that the application wasnt throwing any exception but would just kill my session. I took a look at the event Viewer and saw that my App pool was suffering from a stackoverflow exception.  Here is a snippet of code that is causing the issue.
<code>        'build the template datatable
        Dim XYZDataTable As New DataTable
        BuildDataTable(XYZDataTable, "XYZ", Template_Id)
        'Get data from filedata to populate template table

         For Each dr As DataRow In dt.Rows
            Dim row As DataRow = XYZDataTable.NewRow()

            row("Order Number") = dr("Order Number")
            row("TRACKING NUMBER") = dr("TRACKING NUMBER")
            row("USPS CHARGE") = dr("USPS CHARGE")
            row("Carrier ID") = GetCarrierID(dr("TRACKING NUMBER"))

            'Add the row to the datatable
            XYZDataTable.Rows.Add(row)
        Next

        Return XYZDataTable
</code>
When I remove the Charges column it works fine, Has anyone every had an issue like this and how did you solve it.
I am not get the original data from a database but from an xls file. I want to then insert that Data into the database, but before I want to clean up the data a bit so I need it a datatable to I can manage the columns I want.
Answer: Can you check if you are actually passing that column and row from the database to the c# application ?. It looks like that column is not getting passed and that is what is causing the problem.
Comment: The variable dr("columnname") has the data from the xls file, I created a new datatable that I am trying to insert the records into.


Does "Enter" key action is required for web form submission?

Question: working on web form with 5 fields, once i fill all the fields, i usually clicks the submit button. Is necessary to give similar action to "Enter" key for submission?
Answer: Different people are going to use the form and it's a good practice to serve the need of those different computer users. Power users will rely heavily on the keyboard and will tab through the form and submit it by pressing enter. So for those users: yes it would be nice to implement this.
For novice users who click on most fields and buttons this seems a bit overdone. However, they would benefit from other features. Like disabling the submit button after it is clicked so double-clicking that button would have the same result.


Legends on R Leaflet Maps

Question: While I realize that putting legends on maps using the Rstudio leaflet package is still a work in progress, I've been trying to add a legend post-hoc to the HTML that R generates.
library("leaflet")
set.seed(100)
pdf <- data.frame(Latitude = runif(100, -90,90), Longitude = runif(100, -180,180),
                  col=rep(c("red", "blue"), 50 ))

#just red
leaflet(pdf) %>% addTiles()  %>%
  addCircleMarkers(lat = ~ Latitude, lng = ~ Longitude, color= ~col)

I've been trying to adapt the code from http://leafletjs.com/examples/choropleth.html and figure out where to add it to the output from running the above code in R and turning it into HTML.
So something like putting the following in the body of the html:

Legends on R Leaflet Maps


How to extract Name from id,which a Lookup field catches?

Question: I have Lookup field value of object A and used trigger to display the same field value in object B.If I use a field of type text,then I can see ID.if I use a field of type Lookup,then I can see the same name it hold in object A.
   Is it possible to get Name in the lookup field of object A into a field of type text as Name instead of Id in object B? how to achieve this?
Answer: Use  a formula field to show the name of the lookup field. Set the type of formula field to text
Comment: Thanks for reply,Saket Joshi.I tried it,but it is showing me ID instead of name.Please help me with a better solution.
Comment: It worked for me.The mistake which I have done is: I entered field name as OwnerID instead of Owner.Name.


How can I avoid chocolate truffle mix curdling?

Question: We are trying to make chocolate truffles by heating cream and adding to chopped up chocolate but it keeps curdling. Are there any tips to avoid this happening?
Comment: I followed this recipe, ( http://www.bbc.co.uk/food/recipes/truffles_67741 ) and I think the 'rolling boil' instruction made me curdle the mixture also.

I am going to try the below and see if that works tonight.
Answer: I have made a lot of truffles, and even more ganache for other purposes, and I have never had this happen. My guess is that you are boiling the cream too hard and that is causing the curdling.
How to make ganache:
You will need by weight one part 35% cream to 2 parts chocolate of your choice.
Chop your chocolate (if it's in blocks or chunks), put into a heatproof bowl (stainless steel is best) away fro your heat.
In a saucepan or pot (depending on how much you're making), bring the cream up to a high simmer.
Pour the cream immediately over the chocolate and stir with a silicone spatula if you have one, a wooden spoon otherwise. The chocolate should completely melt within about two minutes; longer for very high percentage dark chocolates. At this point if you are making flavoured truffles, add your flavourings (unless your flavour compounds have been infused into the cream).
Chill until set, make into truffles.
Edited to add:
If you are using alcohol as a flavouring in your truffles, you will need to use either more chocolate or less cream. I have found that approximately for every fluid ounce of alcohol added, remove 3/4-1 fluid ounce of cream from the recipe. I prefer to infuse flavourings in the cream, and have had great success with beets, bacon (with a Guinness reduction added to the chocolate later), black truffle and pureed walnut, and honey. Be sure to strain, of course, before adding the hot cream to the chocolate.
I have also found that white chocolate will often need slightly less cream than a milk or dark.
Comment: Agreed; I've never had this happen either. The only other reason I can think of that might cause the problem is if somehow water (even a tiny bit) is being introduced before the cream. That will cause seizing. Another way to make ganache is to microwave the cream and chocolate together. Very efficient and clean for small batches.
Answer: Try adding the heated cream to the chocolate away from the heat. Curdling often occurs when you add too much heat to the chocolate as it's the fats and cocoa solids in the chocolate separating that causes the issues.
When I make truffles I tend to use a cheese grater to create fine chocolate shavings which melt easily when mixed with warm cream avoiding the need to add more heat which you might need to do if you have bigger chunks.
To save a slightly curdled mixture you can sometimes get away with frantic whisking but the taste will probably be affected.
Answer: I melt the chocolate then allow it to cool slightly and add the cream at room temperature, stirring it in gradually, adding any alcohol for flavouring as I go - I've never had it curdle this way.
Answer: You should melt the chocolate over a double boiler as you heat the cream, and stir the cream vigorously into the melted chocolate to prevent this.
Comment: This is not how to make ganache, will significantly lengthen the preparation process due to having to chill further, is more likely to separate, and is generally an unnecessary step.
Answer: There are many reasons why this can happen. It is actually one of the most common problems with ganache. Here are a few things that can cause the lumpiness:

Overheated cream - The cream should come to a simmer and not much more. If you want to be precise, it should be around 105 F when it is added to the chocolate.
The chocolate should be finely chopped so it melts easily. It should also ideally (although it doesn't absolutely have to be) be tempered. If you are using new chocolate that was not previously melted, it should already be tempered.

What recipe are you using? If you have any liquid flavorings (rum, fruit puree, etc) that can be a factor. Are you adding butter or only using cream?
Comment: From more experimentation it seems like too much heat is probably the problem. Less heat does mean more work chopping up the chocolate finely. Just using chocolate and cream. Does butter help?
Comment: Yes, there is a lot of work involved in chopping up the chocolate. When possible, I often buy chocolate from companies that sell their chocolate pre-formed into small (chocolate-chip-like) pieces. Try using a thermometer to check the temperature of your cream before you pour it onto the chocolate. It should be around 105 F. Let the cream and the chocolate sit without stirring for 30 seconds to a minute and then start stirring and add a small amount of butter if you want. After trying many, many ganache recipes, my go-to ratio for basic ganache is from this site: http://tiny.cc/7ppjm
Comment: I never use butter in my ganache, as it is far too likely to split the emulsion by tilting the balance too far towards the fatty end. You can use butter of course, but there is really no need to.
Answer: If your truffle mixture happens to curdle all you do is add a splash of boiling water and mix it in. This smooths out the sauce and brings it back to a silky smooth mixture. I have found that whisking the mixture when it has curdled tends to make it worse.
Answer: I have had it split and it's generally adding something cold too late, whisking for a few minutes with an electric whisk on high speed will fix it, well it worked for me.
Answer: Boiling water worked for me! Cheers
Comment: how do you use the boiling water?


Furnace rollback orange flame

Question: I recently have noticed that the flames in my Amana HE furnace has went from the sharp blue flame in the burners to a less sharp, blue and orange flame. It is not to the point yet where it has tripped the rollout sensor, but I can see that a good part of the flame is not making it into the heat exchanger and dancing in front of it somewhat. I removed the burners and cleaned them, they weren't really dirty just a slight rust on the holes which brushed off. There is no blockage in any of the 3 gas orifices. The inducer fan runs fine and exhaust is vented as well as the intake. I even did a test where I held a long match into the heat exchanger and ran just the blower fan to see if air was being introduced, the flame did not seem to move. I'm sort of stumped. Anything else I can check before calling a technician to look? It's an Amana Air command 90 furnace, circa 2000 model.
Comment: Orange/yellow flame is usually a sign that the gas/air ratio is off.  This also produces more CO which can be deadly.  Make sure you have a working CO detector in the house.  This is very important, families have been found dead in their beds because of this.
Comment: I've moved my CO monitor to right next to the furnace after I noticed the issue, then for days in front of different registers around the house, its never went off once. I also tried adjusting the gas pressure screw slightly while watching the flame, I never noticed a change, but I also don't have a manometer so I don't want to mess with it much. But I'm wondering why the gas mixture would suddenly be off if I've never touched it before this.
Comment: Dirt or a clog in one(or more) of the tubes.  The ends of the intake/exhaust might be clean, but close to the burners can be different.
Answer: Have you checked the air intake that feeds the burners?  If that is clogged in fluff, it will cause the flame to burn more yellow.
Comment: Yes the exhaust and intake are clean and unobstructed.
Answer: I'm going out on a limb here. They say, "Hear hoofbeats: think horses, not zebras." So here's a zebra for you.
You live in Michigan. There has been snow recently in the lower peninsula. You live within shouting distance of an active highway or an interstate. Road crews have been spreading salt or brine on the highways to melt snow and prevent ice. Cars drive over the wet, salted roads at high speed and create a mist. The prevailing wind is blowing the mist in the direction of your house.
The mist evaporates and leaves tiny crystals of salt suspended in air. Your furnace sucks in the outside air for combustion, and the salt crystals in the air become ionized in the flame and add an orange color.
Before the guffaws begin, I've seen this happen on the gas flame of a kitchen stove when someone uses a "cool mist" ultrasonic humidifier that has been filled with softened tap water containing sodium which has been exchanged in the softener for calcium and magnesium. You get an intense orange flame instead of blue. There has been at least one post on this Stack about this effect.
So consider the possibility that you're seeing orange sodium light in your furnace flame from microscopic salt particles in the outdoor air.
Comment: That's a sensible thought but I actually have my intake inside with a light dust filter on the end.
Comment: @BigLake "The exhaust is vented as well as the intake." Figured that meant outdoors. So are you using a humidifier with softened water? Same effect, different source for the sodium.
Comment: No water softener, and I still don't think that would cause the weaker flame. It's almost like it's restricted somehow but I don't see where. I'm thinking about pulling the inducer motor and seeing if there's something built up, tho I don't expect to see anything since it's draining water from the exhaust as usual.

Furnace rollback orange flame


Cities-In-Motion-2 rule-set usage

Question:
Can i apply a rule-set to campaign mode in Cities-In-Motion-2? I created a new one and want to apply it. Is it possible to do so?
Answer: What you would like to accomplish is not possible. Rule-sets are for sandbox mode only, meaning it can't be applied to campaigns. For source and further infos see: https://forum.paradoxplaza.com/forum/index.php?threads/rulesets-how-to-use.717453/

Cities-In-Motion-2 rule-set usage


How to invoke repository's Jenkinsfile stages from a custom Jenkins pipeline?

Question: I'm trying to create a custom Jenkins pipeline which will bind together artifacts generated by multiple Jenkins jobs. Each of these jobs operates on different repositories (basing on their own Jenkinsfiles). These Jenkinsfiles' stages do such things like creating archives, compiling some code, etc.
One may say that I could use artifacts from single jobs and then bind them together, but the problem is that this high-level pipeline would checkout these repositories on a specific git tag, generate some files signatures, compile release application version, etc.
To give you a brief idea, this is a part of one of my Jenkinsfiles, let's say from a componentA repository:
pipeline {
  agent any
  stages {
    stage('Cleanup library') {
      steps {
        sh 'rm -rf .git .gitignore .gitmodules Jenkinsfile .some_useless_files'
      }
    }
    stage('Pack library') {
      steps {
        sh 'tar -czf my_arch.tar.gz ./*'
      }
    }
    stage('Save artifacts') {
      steps {
        archiveArtifacts 'my_arch.tar.gz'
      }
    }
  }
}

This is the main pipeline:
node {
    dir('compA') {
        git url: 'email@example.com:my_lib/componentA.git'
        sh('git checkout $compA_rv')
        load 'Jenkinsfile'
    }
    // some other stuff
    //...
}

Output:
+ git checkout compA_rv
Note: checking out 'compA_rv'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 5a840d0... Some commit
[Pipeline] load
[Pipeline] { (Jenkinsfile)
[Pipeline] node
Running on Jenkins in /var/jenkins_home/workspace/apk-release@2
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Cleanup library)
[Pipeline] sh
+ rm -rf .git .gitignore .gitmodules Jenkinsfile .some_useless_files
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Pack library)
[Pipeline] sh
+ tar -czf my_arch.tar.gz ./my_arch.tar.gz
tar: ./my_arch.tar.gz: File shrank by 448 bytes; padding with zeros
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Save artifacts)
Stage "Save artifacts" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // load
[Pipeline] }
[Pipeline] // dir
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

It seems that this pipeline loads the Jenkinsfile and executes it in another directory Running on Jenkins in /var/jenkins_home/workspace/apk-release@2, thus it cannot create archive out of nothing.
As I am new to Jenkins pipelines, do you have any suggestions how to solve that issue?
Best regards
Answer: I think you could just switch to pipeline entirely and use a custom workspace
pipeline {
  agent {
    node {
      label 'my-defined-label'
      customWorkspace '/some/other/path'
    }
  }
  stages {
    stage('Example Build') {
      steps {
        sh 'mvn -B clean verify'
      }
    }
  }
}


Android: get system default activity transition animations

Question: Is there any way to get system default (vendor-specific) activity transitions? I need them to replace "open" transition to "close" so when I start a certain activity it would look like user is going back while the activity is actually starting.
I've already tried to do it using reflection but I didn't find these animations in classes com.android.internal.R$anim and android.R$anim even when they are referred from styles.xml in the SDK. Copying animation XML files from the SDK to my project is not an option because they are vendor-specific.
Answer: You can override default animation with your own animation. So you can replace "open" transition to "close"
<code>@Override
public void onBackPressed() {
    super.onBackPressed();
    overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
</code>


How do I use custom-signed shim for secure boot (Fedora)?

Question: I'm not sure whether there's a guide for this but I'd like to know the detailed steps (step-by-step guide perhaps?) involved in achieving the following:

Re-sign shim with a custom CA private key, but still let shim to use Fedora boot CA public key to verify the kernel components for Secure Boot.
Replace Microsoft's key stored in the firmware with the corresponding custom CA public key whose private key was used to sign shim.

The main goal that I want to achieve is to replace the built-in Microsoft's CA certificate stored in the firmware, in order to forbid Microsoft-signed OS bootloaders from being executed, and still use the UEFI's secure boot functionality to boot up F19. The general overview seems to be outlined in this link, but I'm not able to find any detailed guide to do this.
Comment: I think following article may help you http://www.linuxfoundation.org/news-media/blogs/browse/2013/09/booting-self-signed-linux-kernel.
Comment: The URL posted by @MiroslavKoškár has moved here: https://www.linuxfoundation.org/blog/2013/09/booting-a-self-signed-linux-kernel/
Answer: I think you can follow below process :

Generate keys for your system . A known good process to me is this
Now you can sign your shim.efi with this signature. use pesign for signing as mentioned in the given link
Now it should work, if not then you might have to sign other binaries with new signatures as well.

But I am afraid that removing MS certificate from shim.efi might break. You might be interested in reading this link for more details.
I have taken few points below for your reference :
Point#1

A lot of our users want to build their own kernels. Some even want to
  build their own distributions. Signing our bootloader and kernel is an
  impediment to that. We'll be providing all the tools we use for
  signing our binaries, but for obvious reasons we can't hand out our
  keys. There's three approaches here. The first is for a user to
  generate their own key and enrol it in their system firmware. We'll
  trust anything that's signed with a key that's present in the
  firmware. The second is to rebuild the shim loader with their own key
  installed and then pay $99 and sign that with Microsoft. That means
  that they'll be able to give copies to anyone else and let them
  install it without any fiddling. The third is to just disable secure
  boot entirely, at which point the machine should return to granting
  the same set of freedoms as it currently does.

Point#2 :

A system in custom mode should allow you to delete all existing keys
  and replace them with your own. After that it's just a matter of
  re-signing the Fedora bootloader (like I said, we'll be providing
  tools and documentation for that) and you'll have a computer that will
  boot Fedora but which will refuse to boot any Microsoft code. It may
  be a little more awkward for desktops because you may have to handle
  the Microsoft-signed UEFI drivers on your graphics and network cards,
  but this is also solvable. I'm looking at ways to implement a tool to
  allow you to automatically whitelist the installed drivers. Barring
  firmware backdoors, it's possible to configure secure boot such that
  your computer will only run software you trust. Freedom means being
  allowed to run the software you want to run, but it also means being
  able to choose the software you don't want to run.


display tokens sold on a web page and eth raised

Question: I had created an ico smart contract for which is a customer sends 1 ether to the smart contract address customer will automatically receive the tokens. I want to display ether raised, tokens sold,.. details in the front end ico webpage . how can acheive this functionality??
Answer: If you initialize a project with truffle init webpack then it will includes a sample contracts,migrations,tests and user interfaces.
After successfully initializing a truffle project, open app/javascript/app.js, In that you can see "how you can interact with your contract using web3 and truffle-contract js api".
For more references go to https://github.com/trufflesuite/truffle-contract
By accessing contracts function and state variables, can get sold tokens.
i.e
MetaCoin.deployed().then(function(instance) {
  meta = instance;
  return meta.getBalance.call(account, {from: account});
}).then(function(value) {
  var balance_element = document.getElementById("balance");
  balance_element.innerHTML = value.valueOf();
}).catch(function(e) {
  console.log(e);
  self.setStatus("Error getting balance; see log.");
});

In above code MetaCoin is a contract which has a function getBalance(address addr) return (uint){}.
That function is accessed by meta.getBalance.call(account, {from: account});.
You can access your function and attach that value to front as shown in above sample code.
If you are maintaining raised ether with some state variables then ether raised can get by accessing that state variable.If not then by checking balance of contract using web3 api,
web3.fromWei(web3.eth.getBalance('token contract address'),"ether");

can get amount of ether raised.


Latent Dirichlet Allocation vs Hierarchical Dirichlet Process

Question: Latent Dirichlet Allocation (LDA) and Hierarchical Dirichlet Process (HDP) are both topic modeling processes. The major difference is LDA requires the specification of the number of topics, and HDP doesn't. Why is that so? And what are the differences, pros, and cons of both topic modelling methods?
Comment: Is HDP supposed to be data-driven in regards to the number of topics it will select? On practical side, I tried to run Blei's HDP implementation and it just ate all memory until I killed the process. I have 16GB RAM and just over 100K short documents to analyze.
Answer: HDP is an extension of LDA, designed to address the case where the number of mixture components (the number of "topics" in document-modeling terms) is not known a priori.  So that's the reason why there's a difference.
Using LDA for document modeling, one treats each "topic" as a distribution of words in some known vocabulary.  For each document a mixture of topics is drawn from a Dirichlet distribution, and then each word in the document is an independent draw from that mixture (that is, selecting a topic and then using it to generate a word).
For HDP (applied to document modeling), one also uses a Dirichlet process to capture the uncertainty in the number of topics.  So a common base distribution is selected which represents the countably-infinite set of possible topics for the corpus, and then the finite distribution of topics for each document is sampled from this base distribution.
As far as pros and cons, HDP has the advantage that the maximum number of topics can be unbounded and learned from the data rather than specified in advance.  I suppose though it is more complicated to implement, and unnecessary in the case where a bounded number of topics is acceptable.
Answer: Anecdotally, I've never been impressed with the output from hierarchical LDA. It just doesn't seem to find an optimal level of granularity for choosing the number of topics. I've gotten much better results by running a few iterations of regular LDA, manually inspecting the topics it produced, deciding whether to increase or decrease the number of topics, and continue iterating until I get the granularity I'm looking for.
Remember: hierarchical LDA can't read your mind... it doesn't know what you actually intend to use the topic modeling for. Just like with k-means clustering, you should choose the k that makes the most sense for your use case.
Answer: I wanted to point out, since this is one of the top Google hits for this topic, that Latent Dirichlet Allocation (LDA), Hierarchical Dirichlet Processes (HDP), and hierarchical Latent Dirichlet Allocation (hLDA) are all distinct models.
LDA models documents as dirichlet mixtures of a fixed number of topics- chosen as a parameter of the model by the user- which are in turn dirichlet mixtures of words. This generates a flat, soft probabilistic clustering of terms into topics and documents into topics.
HDP models topics as mixtures of words, much like LDA, but rather than documents being mixtures of a fixed number of topics, the number of topics is generated by a dirichlet process, resulting in the number of topics being a random variable as well. The "hierarchical" portion of the name refers to another level being added to the generative model (the dirichlet process producing the number of topics), not the topics themselves- the topics are still flat clusterings.
hLDA, on the other hand, is an adaptation of LDA that models topics as mixtures of a new, distinct level of topics, drawn from dirichlet distributions and not processes. It still treats the number of topics as a hyperparameter, i.e., independent of the data. The difference is that the clustering is now hierarchical- it learns a clustering of the first set of topics themselves, giving a more general, abstract relationships between topics (and hence, words and documents). Think of it like clustering the stack exchanges into math, science, programming, history, etc. as opposed to clustering data science and cross validation into an abstract statistics and programming topic that shares some concepts with, say, software engineering, but the software engineering exchange is clustered on a more concrete level with the computer science exchange, and the similarity between all of the mentioned exchanges doesn't appear as much until the upper layer of clusters.
Answer: Yee Whye Teh et al's 2005 paper Hierarchical Dirichlet Processes describes a nonparametric prior for grouped clustering problems. For example, the HDP helps in generalizing the Latent Dirichlet Allocation model to the case the number of topics in the data is discovered by the inference algorithm instead of being specified as a parameter of the model. Detailed explanation on Dirichlet Process can be found here
Topic models promise to help summarize and organize large archives of texts that cannot be easily analyzed by hand. The Hierarchical Dirichlet process (HDP) is a powerful mixed-membership model for the unsupervised analysis of grouped data. Unlike its finite counterpart, latent Dirichlet allocation, the HDP topic model infers the number of topics from the data.
Answer: Actually HDP require a lot of hidden parameters, which are in code. If you play with such parameters you will get different results (different topics). People usually does not pay attention to such hidden parameters and thinks that model able to find such parameters. It is not true. User have to define parameters 'eta' 'gamma' and 'alpha' and maximum of topics. If you specify max of topics say about 23 topics, then youк model provide 23 topics in output. If you set up 15 topics then you get 15 topics in output….
Answer: I have a situation where HDP works well compared to LDA. I have about 16000 documents that belong to various classes. As I am unaware of how many different topics I can gather for each class, HDP is really helpful in this case.


Meaning of "doesn't even begin to cover it"

Question: I saw the movie Ice Age 4, in which there was the quote "Okay doesn't even begin to cover it". After searching on the internet, I couldn't find the meaning of the sentence at all. Is that "Begin to cover" an idiom? What's the meaning of the sentence?
Answer: Here, "Okay doesn't even begin to cover it" means "The word okay is so inadequate that it does not even have the slightest chance of describing [topic]."
From Oxford Dictionaries Online:

begin

[no object with negative] informal Not have any chance or likelihood of doing a specified thing

cover

Deal with (a subject) by describing or analyzing its most important aspects or events

More generally, "doesn't even begin to..." is used when you want say that something is extremely lacking; that it does not have any chance of accomplishing the goal that it intends to. Some examples of proper ways to use "doesn't even begin to...", from the above source:

Indeed, even today, one cannot begin to comprehend the appalling fate suffered by these two young girls.
He concluded by saying that we couldn't even begin to comprehend what one day in his shoes would be like.
Clearly this too is an honour that most of you have little chance of even beginning to aspire to.
Comment: Yes, but I think your final example is a bit extreme. I imagine the only context in which such words might be uttered would be in an address to "raw recruits/hopeful candidates" (who in practice are probably already aspiring to merit the relevant honour).
Comment: @FumbleFingers Yes, I agree that the words are a bit harsh. But those are the examples listed under ODO's entry for the word *begin*, copied verbatim. Maybe someone at Oxford University Press was having a bad day.
Answer: Look at this definition of begin from TheFreeDictionary.com:

To do or accomplish in the least degree

Those measures do not even begin to address the problem.

It talks about an action/thing being so hugely dramatic that something else said or done in return almost pales in comparison to it, so it doesn't even begin to solve the problem.
For instance, if you have done a grave mistake, or a terrible sin, and upon realizing your mistake, you say "I'm sorry", you might get a reply:

Sorry doesn't even begin to cover it

or

Sorry doesn't cut it

I cannot give you an exact answer on your quote without the context, but "Okay doesn't even begin to cover it" is also used in a similar sense here. The key point to focus on is "doesn't even begin".
Answer: I haven't seen the cartoon but I got the following from the script:

Peaches: "Do I look okay? Louis?
Louis: Okay doesn't even begin to
cover it."

So Louis is having fun with her by saying that Peaches looks fantastic and beautiful. ('begin to cut' from freedictionary.com)
Comment: Context does help immensely in this case. So the real meaning of "doesn't begin to cover" is "insufficiently (positive) description".
Answer: To cover something in this sense is to describe it in an adequate amount of detail: for example, "The professor covered Shakespeare's sonnets in his lecture." So, to not even begin to cover something means to not even come close to describing it adequately.


How to choose docking score cutoff?

Question: I made a virtual screening of a large database (~5M) and want to filter ligand structures for further more accurate screening (from Schrodinger HTVS to SP resolution). My next step is to define a cutoff docking score, but it seems arbitrary to choose one. Are there any established methods for filtering the ligands out?
Answer: It is utterly arbitrary and depends on your resources.
We can all agree your cutoff would be a lot lower during the ordering step than at followup in silico analyses, but even then if you were ordering the top N at \$100-250 each, should you spend \$1,000 or \$10,000?
In the in silico step you have real time and CPU-time to factor in making this call even blurrier.
But there are some things to put those scores into context:

The units are kcal/mol, i.e. these are predicted ∆∆G of binding. Here is an explanation of what does a kcal/mol mean for docking — 1 kcal/mol is a hydrogen bond or the average collision energy of water at 37°C.
If you have a crystal structure with a known ligand, re-docking and cross-docking that would give you a benchmark of what you should expect ——keeping my mind that natural ligand are horrid and don't obey Lipinski's rule. The natural ligand will wander and to assess how good the docking went RMSD is used, but for this I mean looking at its GlideScore as if it were any other compound.
Rescore with a different tool —Gold etc.

Ligand efficiency
An important thing to remember is that ∆∆G is size dependent —a huge peptidomimetic will score more than a smaller molecule that hits the hotspots perfectly. Therefore, ligand efficiency (LE), ∆∆G over heavy atoms (reviewed in detail here) is a good metric to prevent huge molecules dominating spuriously. If your library has a variety of different sizes, it is best to sort by LE than ∆∆G alone. In fact, if you get a few small hits you can merge/link them or expand on them, whereas if you get nothing because you gambled on larger hits you have to start from square one. I would argue that this is true for repurposing screens and the low success of repurposing VLS despite the enthusiasm is due to the neglect of this.
Comment: Great answer. Just to add context to the kcal/mol point; these will only be close to accurate if the parameters and assumptions perfectly mimic the chemistry, and even then the biochemistry can complicate things further as the linked article points out.
Comment: @James Your link did not stick. But thanks —you reminded me that I did not mention ligand efficiency!!
Comment: Sorry Matteo, I was meaning to refer to the link in your question explaining kcal/mol in docking.

How to choose docking score cutoff?


sn754410ne driving one motor faster than another

Question: I have a sn754410ne IC (quad half h-bridge). I noticed that whenever driving two motors, one motor is driven faster than the other (with both DC power and a PWM signal from my Arduino UNO). I measured the voltage across each motor and noticed there was a discrepancy of .015V. What can I do to drive the motors at the same speed, aside from sending a smaller PWM signal to the faster motor?
Comment: Did you try swapping the motors over to their counterpart drive circuit to see if the low speed followed was related to the driver or the motor. Do you have both motors driving similar mechanical loads?
Comment: Easiest way to run the motors at the same speed is to connect the shafts together.
Answer: The reality is that your two "identical" motors are only approximately identical; there are always going to be minor manufacturing variations.  If you want to run them both at a more accurate approximation of the same speed, you will need to provide feedback (of the motor speeds) to your controller so that it can adjust the drive PWM signals so that the speeds of the two motors match.


Necessary parts to build a DIY smartwatch

Question: I want to create a simple smartwatch that can receive text messages via Bluetooth/wifi from a computer. However I start doing research on necessary components and either get completely professional chips that do much more than needed (also extremely expensive) or simple plug ins for arduino. Where can I start searching for this parts? which companies should I look? Also important information on other parts that could help me with this project will be greatly appreciated.
Comment: What you describe requires a wireless connection and an LCD, and obviously a battery. Putting that in a watch-sized encolsure is not a simple task, and will be terribly expensive for a one-off.
Comment: An Android phone and duct tape should suffice
Comment: What are you doing for living? Are you a hardware engineer? What are other requirements? What kind of chip you expect to see?
Comment: "or simple plug ins for arduino" - what's wrong with that? http://www.arduiner.com/en/news-september-2016/9498-hj-580-serial-port-transparent-transmission-minimum-ble-module-da14580-5-6-2mm-3809200647452.html
Comment: What if you get a very cheap Bluetooth LE to UART bridge (search CC2540, chip made by TI, or HM-10 for examples), let that be the prepackaged wireless interface. Interface to that with a small uC to handle the display.
Answer: Any wearable computer project needs these subsystems:

Power - A Li-Ion battery is ideal. This requires a charge controller and regulators to provide your voltage rails.
Output - You'll find miniature OLED displays that are perfect for a smartwatch. Also consider a vibrating motor for notifications and haptic feedback.
Input - Buttons are easiest to implement. You can also consider an IMU, jog dial, or even a five-way tactile joystick.
Connectivity - Bluetooth Low Energy is ideal for a smartwatch. The HM-10 is a commodity part, but the state of the art does change often. Find one that comes preconfigured with a GATT server to make things easier.
Processing - The state of the art changes too quickly for a recommendation. I've used the Teensy 3.2 for many projects because it's small and Arduino compatible. Find something easy to develop for. If this is your first project, use a development board instead of mounting a processor on a custom PCB - burning a bootloader is complex.
Enclosure - You'll likely need to use a 3D printer or laser cutter. For prototyping, you can simply hot-glue a watchband or Velcro strap to your electronics.

I always recommend prototyping first with off-the-shelf modules, then design a custom PCB once you've tested your project.
If this is a little complex for your project, you could consider a complete off-the-shelf system. TinyDuino sells a complete kit that includes display, power management, processor, and Bluetooth connectivity.
Bear in mind that the computer client will likely be far more complex than the hardware. Slap some hardware together ASAP so you can focus on seamlessly forwarding notifications to the watch and work on your UX.
Answer: I really like Zack's answer (and upped it.) He's telling you to get out there and prototype things so that you know what basic functions are required and exactly how they will need to operate together. Then you can sit back and review all that effort and detail to come up with a well-vetted approach. It's doable. But there's a lot you need to work through first.
I worked on the Seiko Message Watch. This watch received messages from the sidebands of city-wide FM transmitters, picked off of a loop of messages as convenient. There are some truly difficult problems, though. One is power consumption and battery resources. The Seiko watch would literally work for up to two years off of one button cell. Consider that for a moment! Another is packaging and size. Another is that people don't buy watches for time, but truly more as jewelry.
You are going to have to do some very very serious work to figure out your energy budget. You can only turn on the receiver every so often (and not too often), since receivers take up lots of power. (So do transmitters, but that's another issue.) In the Seiko watch situation, the receiver was the biggest hog of power. Not the watch, or time-keeping. It was the receiver that was a big pig. So you need to carefully nurture this.
There are so many different details you need to work out. But probably the power budget and the size are going to be the biggest problems for you. And if you are serious about something actually wearable as a watch, then you have a huge hurdle there, as well, in figuring out how you will get power, antenna, receiver and transmitter (for Wifi, you need both), and all the rest into something that can be reasonably worn and will last at least some modestly reasonable period of time on a tiny battery supply system.
It will truly be a long process for you, I expect, with many hurdles to surmount in the process. I think this is part of why I like Zack's advice so much. There are lots of pieces you can get to work out the detailed functioning, just to see if you can climb over those. If you do, then you will have MANY MORE yet ahead of you. But at least you managed to divide this into two pieces -- proof of concept and eventual implementation. If you can't prove the concept, you can save yourself the rest of the headaches.
Best wishes. But this is serious work ahead.
Just as a boost up, though, let me recommend that you start with one of the Texas Instruments' eZ430 Chronos Development Tool watches. They come in different frequency flavors (I have all three of them.) You can get a complete development system at no cost, they include a 96 segment LCD, and a USB stick with which to communicate with them, as well. You can learn a great deal using them as a start. Probably the closest thing I can think of as a nearby solution to try out. You can certainly send them messages!! So this may be a complete solution for you without any hardware development at all. Just software. Check it out. (I'm using them to develop grand mal seizure detection for people who suffer from that problem.)