Can I run 11-32t on my Bike and 11-28t on my smart trainer using the same bike?

Question: I run an 11-32t on my rear wheel and completely forgot to check the specs of the 11-speed cassette I ordered for my smart trainer. Turns out the one I got for the trainer was 11-28t. Can I run the bike on both these cassettes without issues or should I just suck up my mistake and go and buy another 11-32t for the trainer to match that on my wheel?
Answer: Yes, you can run the 11-28 on the trainer while running an 11-32 on the wheel used when riding outdoors.
If the bike is set up correctly for the 11-32, the 11-28 will run identically on the 11 cog for both the trainer and the rear wheel, and when on the 28 on the trainer, it should be transparent to the smaller 28 cog (relative to the 32).
There is an unlikely possibility that gear shifting on the smaller cassette on the trainer may be affected on the larger cogs of the 11-28, but it should not be due to indexing (alignment of the rear derailleur [RD] with the cassette cogs). In the rare event that shifting is not ideal, I would still check the indexing first, as even though the cogs should be aligned the same on the trainer as it is on the wheel, sometimes tolerances just allow it to be off. If the indexing is good (as it should be) and shifting is still sub-par, it may benefit with an adjustment of the "B-screw" which adjusts the gap between the upper RD pulley and the cassette cogs.
I would give it a try without adjusting it first, and only adjust it if it really is necessary. If you do adjust the B-screw, you will need to reverse adjust it when using the 11-32 cassette on the bike because the upper pulley would be too close to the 32t cog if you don't.
You should not have any issue with your chain length.
Comment: @WeiwenNg I would disagree with the length being slightly too long as both cassettes retain an 11-tooth as the smallest cog, which is the along with the small chainring is the driver for the chain being too long. Regardless of which cassette is used, the chain wrap would be identical in the 11 cog. However, the advice that the OP (or anyone for that matter) avoid the small-small combination is prudent.
Comment: Another minor thing to consider is that the OP's chain will be slightly too long on the trainer, and they should avoid small-small. Which one should generally do anyway.
Answer: You should be able to run these no problem. For example, I used to run 9-32 on a wheel and an 11-28 on trainer without any complications.
Comment: 9-32 cassette ??
Comment: Yeah, 3T Bailout.
Comment: Wow! Thanks for the info. Never seen 9T cog before!


Working with an external programmer

Question: Hello I want to build a website I found Programmer and He wants me I'll provide him a server with certain requirements.
Where is the best website  to rent a server ?
What kind of access he needs ?
How do I provide him access Without the ability to change things as payment information for your server ?
Comment: There are literally hundreds of options. To narrow them down, could you give a little more info on what type of site you plan building?  Specifically, what language you want it and what the function of the site will be?
Comment: You should give me detail about the type of website you plan to build, also you could ask the programmer which host he would refer to you, post the link here and let us inform you if this is a good choice.
Answer: As RandomBen alludes to, this is probably something you need to discuss with the programmer. Give him the requirements for the project, and he should be able to tell you what kind of hosting plan you need.
Most decent hosting plans allow you to create SFTP and shell accounts that are separate from your main billing account. With shared hosting, you may need to create a database for him via your web host's admin panel. In most cases, this is all the developer needs to develop and set up the site.
However, unless you're trying to develop a custom application or online service, you would probably be better off spending your money on a web designer and using an open source CMS. For most businesses, this is a better value than hiring a programmer/developer.
Answer: I use HostMonster.com. It's a great website that offers a lot of hosting space / features at a pretty low price. ~$14/mo for everything. It includes a great control panel for everything you need.
All you need to do is make an FTP account for your programmer, give him the username/password and he can use third-party software to upload the files. You might have to do a little configuring for him (Such as creating an SQL database, but all of that is really simple).
Comment: What additional do you get for $14/mo? The standard plan on their site looks to be $6.95/mo (currently $5.95 for a promotion). At those prices, it looks pretty good assuming they have good uptimes and support. Though their site isn't all that well-designed. But if you don't need more than one shell account and only need a standard shared hosting plan, it doesn't look too bad.

Working with an external programmer


Calculating least cost pathways for region and create distance rasters to rivers using ArcMap

Question: I am using ArcMap.
How do you calculate all the least cost pathways that exists for a region?
I would like the output map to display all routes (and was wondering whether this can be done in one set of operations). I want to determine this by taking into account two things: slope and valley floors.
I have been informed that I need a DEM raster, and distance rasters to valley floors and rivers. I have a river system shapefile (once is in a polygon and the other is in a line format) but I don't know exactly how to create these rasters. As it stands, this is what the DEM raster and the riverways shapefile look like:

I have followed the tutorials in ArcGIS help 10.1 but I just don't seem to be going anywhere. I am able to create least cost pathways between two points based solely on slope, and I have tried reclassifying via building models but have been unsuccessful in creating images that display meaningful results - I think the biggest issue is inputting or creating distance rasters to valley floors/rivers and combining that with the slope raster.
Can anyone explain in layman's terms how I could create distance rasters to valley floors/rivers from a polygon or line shapefile and how this can be combined with a slope raster to create an output map displaying all existing least cost pathways for a selected study area?
Answer: You can create the distance raster using the Euclidean Distance tool, then you can combine that with your DEM using raster calculator and it looks like you already know the rest


Where to get Duty Free Liqour in UAE?

Question: Is there any place from where we can get liquor products at duty free prices in United Arab Emirates?
Comment: *In* the UAE, or on departure from the UAE? (Makes a big difference!)
Comment: could you be more specific? Where in the UAE are you going? Dubai?
Comment: Dubai airport duty free is one of the best in the world. Does that work for you?
Comment: Actually I am on a diplomatic mission to UAE and will be travelling across UAE. It would be nice if anyone can suggest an online store for me.
Comment: Are you going to travel across UAE or just to specific location? If you are going to Dubai or Abudhabi then you can buy liquor at lenience wine shop at Airports. If you are traveling across UAE, you better get it ordered from an online store.
Answer: If you want to get liquor from a diplomatic store then you can get online from flemingo international's online store http://www.flemingodiplomatic.com/Flemingo/AlcoholicBeverages.aspx

Where to get Duty Free Liqour in UAE?


How to set default finder window size?

Question: How do I set the default size of my finder window to a size of my choice? Currently each time I open a finder window, it opens up in a very small size and I have to adjust it before I can start looking for my files. I'm running Yosemite.
Answer: It is very easy to do this:

Open a new Finder window.

As you resize the window, hold the Command ⌘ (not Alt / Option) key. Close resized window.

Then hold the Alt / Option key as you right click on Finder in the Dock and click Relaunch. Another way to implement this step is to press Command ⌘ + Alt ⌥ / Esc, select Finder from the menu to pop-up and click on Relaunch.

Any Finder windows opened after this will open at that size.

Note: This does not work for windows opened from folders on the desktop.
Comment: Doesn't work for me.
Comment: Does not work when opening shared network drive.
Comment: @tog22 : Yeah, I second the "you're not holding it right" (except I'd add "maybe you're...").  I had to do it several times before noting, for example, that you have to let go of the button before you let go of the command key, and you have to let go of both the Alt and Ctrl keys (I didn't have a right-clickable mouse) before you choose "relaunch".  This would have been much easier as an actual option to choose, instead of this dumb click-drag gymnastics.
Comment: Great answer. Under Monterey, I didn't even need to do step 3. Normally opening a new Finder window was in the size I set.
Comment: **Note:** After relaunching the finder window once, through the above method, the 3rd step is not required to open the finder again. The finder window opens with the size you specified, even after restarting the mac. *Tested on - mac version 10.13.6*
Comment: @tog22 : you're not holding it right.
Comment: This worked, but after opening a file from airdrop, it got tiny again.
Comment: Works on macOS Big Sur
Comment: Perfect solution! Wonder how you discovered it :-)
Answer: This works for me in MacOS Catalina, Monterey (in 2022) and Ventura (in 2023):

Open a new Finder window, do not navigate to any folders yet;

Resize the window to the size you want (however don't move the window to your desired location yet);

To lock the location and size:

start by pressing the Command ⌘ and Alt / Option keys together and drag the window to your desired location;

release your mouse button first then release the Command ⌘ AND Alt / Option keys second;

Close resized window;

Any Finder windows opened after this will open at that size.
Comment: This works, unlike the top answer. I feel like my chest is free from a really tight fitting jacket now.
Comment: Note, when you open a finder window, do *not* navigate to any other folders. you need to all the adjustment on the folder that opens. You cannot navigate to a particular folder. Confirmed this works on MacOS Ventura 13.2.
Comment: This does not seem to work on MacOS 12.5 Monterey.
Comment: @todd412, not sure what problems you had but it worked for me last year when I upgraded to Monterey, and now to Ventura as confirmed by technogeek1995
Comment: Strange, this no longer works on `10.15.7 (19H2026)`
Answer: Open a finder window, hold down the option key and resize the window as you wish. Close all finder windows and next time you open a new one it will remember the size.
Comment: This is what worked for me.
Comment: This also worked for me on Big Sur. Both launching Finder via icon and `open .` from Terminal too!
Comment: Option is disabling snapping for me.
Comment: It works but it's only temporary, it doesn't set it as default. If you relaunch the finder or reboot it loses the setting. So in fact it doesn't work.
Answer: Open a folder in list or cover flow view. Then press cmd+J. Now hold option key and press Return to default button at the bottom. New finder windows will be opened normally.
You can try deleting .DS_Store file in folders with false view.
You can also delete the normally hidden .DS_Store file with some utilities or with the terminal app and a command line removal - since Finder will recreate this file when it's missing, it's pretty safe to delete them.
 rm .DS_Store

You need to get to the directory so you can type cd and then drag in the folder that needs clearing. (Navigate one folder up in path view or using the title bar of the finder window) and drag the folder in to the terminal window after you type cd and space
Comment: Yes, it requires setting to list view. Can't do with column view. I had to do more steps than this answer describes. But I eventually got it to work.
Answer: Previous solutions seem to have stopped working with recent macOS releases. Yesterday, I answered a very similar question related to both size and position of Finder windows. I am reflecting it here for completeness.
There's now a specific solution to Finder's lack of ability to remember its size and position. What's more, it seems to have been inspired by this exact question.
FinderFix Give extra powers to your Finder windows!

If after all those years of using your Mac you are still fighting with
Finder to get it to behave as you wish, look no further, FinderFix
will get it to open every new window in the exact same position and
size you want it to.

I tried it, and it works as advertised. It also comes with some of the essential features of TotalFinder such as the option of opening all windows in tabbed mode or activating Cut & Paste with Cmd+X / Cmd+V, without compromising the System Integrity Protection (SIP).
Comment: Thanks - this is the only fix I've seen that works when opening finder windows from the Desktop
Answer: Applescript
For the desperate, here is something you could run as a cron job:
tell application "Finder"
    set everyWindow to every Finder window
    repeat with currentWindow in everyWindow
        set bounds of currentWindow to {100, 100, 1200, 750} -- Adjust the dimensions as needed
    end repeat
end tell

How to set default finder window size?


Unrecognized configuration section system.serviceModel

Question: When I publish my website to my plesk server I get an error about a:

Unrecognized configuration section system.serviceModel.
Comment: I think marc_s is correct, but please post your full error message
Answer: What version of the .NET framework does your hoster support??
The <system.serviceModel> is the WCF section and WCF only came about in .NET 3.0 - if this hoster is only supporting strictly .NET 2.0, then you're out of luck :-(
Solutions:

either you can get your hosting provider to install .NET 3.0 (or preferably .NET 3.5 SP1) so you can use WCF
you remove that <system.serviceModel> section from your config file if you don't even need and use WCF
Answer: The error message:

System.Configuration.ConfigurationErrorsException: Unrecognized configuration section system.serviceModel. (c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 146)

is probably caused by missing WCF section handlers. Wenlong Dong1 explains in more detail, what might be going on.
In my case I could restore the sections by running the solution steps for what he calls issue 2, that is:
%windir%\Microsoft.NET\Framework\v3.5\WFServicesReg.exe /r /b

"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" /i

%windir%\Microsoft.NET\Framework\v3.5\WFServicesReg.exe /c /b

Comment: Those three lines fixed it for us as well.
Answer: I came across this error while trying to install one of my company's standard products, that I just couldn't get working (it's an ASP.NET 2.0 website).  I found that within the C# code it references System.Configuration.ConfigurationManager.ConnectionStrings["our param name"].
I went in to IIS Admin (it's on Windows XP/SP3), the ASP.NET tab  and 'Edit Configuration', and when I got to the Application tab, it just threw an unhandled exception as above, "Unexpected section system.serviceModel in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config".
I deleted the section from machine.config, and all was well, the website was able to come up as expected.
Although, to add further confusion, I have a second machine running the same web application, which also has the "system.serviceModel" section, and that works fine.  Both machines have .Net 1.1, 2.0SP2, 3.0SP2 and 3.5SP1 installed.  There's obviously a bit more to this, but just deleting the section appears to resolve the problem.
Answer: Symantec Backup Exec has also problems with this.
Solution:
Removed

              all inclusive

And works fine.
Link:
The Backup Exec for Windows Servers console does not open
Answer: We have two load-balanced web servers with basically identical configurations, and one of them started receiving this error after installing Windows Updates last night (1/29/2013).
I copied the machine.config file from the working machine, and it appears that everything is now working correctly.


2 dimensional homogeneous riemannian manifold has constant sectional curvature

Question: Why does 2 dimensional homogeneous riemannian manifold have constant sectional curvature? I have no idea. Any hints to get me thinking?
Comment: Hint: Start by writing down the definition of a homogeneous manifold; then think if isometries preserve Gaussian curvature.
Answer: On a 2-dimensional manifold there is only one 2-dimensional direction therefore there is only one sectional curvature at a point, namely the Gaussian curvature.  By Gauss's theorema egregium the Gaussian curvature is invariant under isometries.  Therefore if the manifold is homogeneous, i.e., there is an isometry moving any point to any other, the conclusion follows.


Join lines perfect to each other in AI

Question:

The other red line is set to opacity 50% and is closed. I'd like to join them to later subtract them from from the basic picture (the fill) or make it white, but how to join them perfectly?
Comment: I am a bit curious though, why would it matter if the computer allowed you to do this versus you layering them on top so you cant see the difference? Why would you want the program to be this much more complicated, when most people have hard enough problems with the simplest of concepts.
Comment: I'd like to make sections with different colors. But it'll do with gradient transitions  hidden in the lines, but I was aiming for paint bucket.
Comment: paint bucket conceptually just builds new shapes you can put gap detection on so then you dont need to be so accurate
Answer: You can't connect paths in the middle of segments with Illustrator. It's simply not possible.
Paths can only be connected at anchor points. And even then, you are only permitted 2 path segments per anchor point. Never any more than two.
Comment: So only solution to make this look better is to arrange the transparent part in front and hide these line(s). Thanks for the answer.
Answer: Given the background is jpeg or Image
Re-create the curves using pen tool. Not necessarily same color for the mean time. Re color it later.

Select the paths the red target and the curve edges

Use the Shape builder tool (Shift+M); then Press Alt + click the unwanted areas

You can re color it to see the changes

Option 2 - Given the paths are layered; just put the red path behind. it will hide the corners

Join lines perfect to each other in AI


Can Nikon biological microscope model SE be converted to a digital microscope?

Question: I am looking to buy a second hand microscope but I'd like to replace its eyepiece with a digital sensor. I am specifically looking at this Nikon stereo microscope Model SE. I asked the seller but they simply said they're not sure if we can remove one of the eyepiece lens or not.
I'd like to use a sensor like this: https://www.opticscentral.com.au/celestron-5mp-microscope-digital-imager.html
Comment: Seems like a good question for the camera seller.
Comment: I don't know about every Nikon stereoscope, but I know that the Nikon SMZ-U which I have, supports both replacing eyepieces with cameras, and a dual camera port accessory. But you would need to check the manual for the one you are looking at.
Even if it doesn't directly support using a camera with it, you can use afocal/eyepiece projection, to use it with a camera, though this often comes with reduced image quality.
Comment: @xbmono The ones for telescopes should work, as long as you can get one the correct size for whatever eyepiece is on the microscope
Comment: @BryanKrause As I mentioned, the seller didn't know the answer. Either he is not familiar with microscopes or he didn't bother to check :(
Comment: @Topcode So that's like an adapter that sits on top of eyepiece and project to camera? That's good point... I did a search and I found many for telescopes but not sure if it works with microscopes too... I don't see why not tho. Thanks!
Answer: Short answer is yes, with a few caveats.
In general you can use a camera of any sort with a microscope if you have the right adapters and mounts. You can even manually hold a camera and take photos with the eyepeice in place, though it is difficult and hard to get good images due to you moving and the narrow window of focus with a microscope eyepiece. So, basically all you need is that the camera is held steadily at the optical focus point or has a lens mounted on it that will compensate for the eyepiece if removed. You can even get mounts that are designed to hold a cellphone for taking photos. These often have a lens in a tube similar to the eyepiece and support your cellphone via fitting into the eyepiece tube.
The camera you mention has this to say in it's advertising blurb:

The Imager will replace any standard 23mm or 30mm eyepiece on your microscope

The camera is made by Celestron, which is a good, reliable brand for telescopes and cheaper microscopes, so I think it will be a reasonable camera, though probably no better than your cellphone camera.
It looks to me like it comes with an adapter designed to centre the camera down the eyepiece tube and to fit it into the eyepiece tube (images 2, 4, 5 on the page; small black ring with 3 brass screws coming out of it). Whether this adapter will fit into your microscope will depend on the dimensions of your eyepiece.
I note that their images have it mounted on a monocular microscope, but this also shouldn't be a problem; eyepiece lens mounts are fairly standard for a given brand.
One thing to be aware of is that if you have a binocular microscope, you will need to remove the camera if you want to use the eyepieces, unless you can cope with looking down the microscope with the wrong one eye (e.g. camera in left eyepiece will mean you need to look down the right one with your left eye so your head doesn't bang into the camera). You should be able to remove the camera and place it carefully on a bench to use both eyepieces, but you should be careful to not bump it too much (knocks it out of alignment) and aim to not get dirt (fingerprints etc.) or dust on the sensor/lens end - storing in a box/case will be fine though.
I also can't tell if there is some method of preventing dust from getting down the adapter tube for the camera and into the microscope (you definitely want to avoid this!), though this should be minimal anyway. Given that it is Celestron, there's a good chance they have thought of this and have something in place.
Comment: @xbmono I've not used that particular microscope model, and would need a more complete model number to be able to tell you for sure. However, in my experience, Nikon makes high-end microscopes, which means you get things like functionality to change eyepieces as you like. You may have to unscrew a holder screw, or maybe even unscrew the eyepiece lens (rare, typically microscopes from 50's-60's), but generally these are held in by friction and being angled above horizontal.
Comment: I finally bought it and as you said, the eyepiece can be removed, easy! I also tested it with my DSLR camera and a adapter tube I had for my telescope and handheld it because the tube it's a bit large.. but it works fine. I just need another tube with smaller diameter for this microscope.
Comment: Thanks for the complete response. Do you know if the eyepiece of Model SE can be removed or it's fixed? I'm worried, I buy it and the eyepiece is fixed in place or is it standard for all microscopes to have removable eyepiece? Unfortunately the seller didn't know the answer, either he wasn't sure or he didn't bother to check


Have a US felony but want to visit the UK

Question: Back in June 2007 I was sentenced to 9 months jail time and 3 years probation for a felony (soliciting to promote prison contraband) and a misdemeanor(possession of marijuana).  I want to visit London specifically in 2020, but am worried that with my record I could be turned away.  Even though I'm from the US, should I get a visa?  Don't really want that extra cost, but I don't want to be turned away either.
Comment: Related, especially the accepted answer: https://travel.stackexchange.com/questions/85316/can-a-us-citizen-with-a-criminal-record-travel-to-the-uk
Comment: Can you even get a US passport? A friend of mine had a similar conviction and couldn't even travel to Canada.
Comment: Burgi from what I've seen I should be able to, and Canada is just really strict on who they allow in, luckily I never had a desire to travel there
Comment: @Burgi your friend was probably denied entry by Canadian authorities, not denied a passport by US authorities.
Answer: Please take it with a grain of salt - as this is always the case with visas or entry, we can only speculate here. So you have two options:

Going without a visa. The UK Landing Card does not ask about prior convictions, and in my countless visits to UK I have never been asked any criminal history questions. Assuming you come as a genuine tourist, with a reasonable length of stay, this question might never pop up at all. There is however a risk to be refused entry, although - in my personal and totally ungrounded opinion - it is very unlikely. And see the bottom.
Obtaining a visa. This is more reliable, as obtaining the visa pretty much assures that you can enter UK. However there is also a risk to be refused the visa. Considering that your conviction happened then longer than ten years ago, included less than one year of prison stay and that you been straight since that, it is unlikely to have any severe impact.

There is also another option - you can fly to Dublin, Ireland (and depending on where are you in USA, it might be even cheaper than flying to London). From there you can fly to London, which would not be subject to passport control.
In any case, do not lie about your criminal record, but also do not volunteer this information unless asked.
Comment: @Hoki Ireland is not in Shengen area, instead it's part of Common Travel Area with the UK
Comment: @Hoki when flying from Dublin to London you do NOT pass immigration. You only show your passport to the airline, and you land in a domestic terminal. There is no place to even show your passport "when entering UK".
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/82791/discussion-on-answer-by-george-y-have-a-us-felony-but-want-to-visit-the-uk).
Comment: Can you explain why flying to Dublin would be a better option than London?
Comment: @IarekKovtunenko Yep my bad, I just checked and indeed Ireland is not in Shengen. I'll delete my previous comment. Nevertheless, only Irish citizen can enter UK without a passport, and they still need an official photo ID of some sort. Any other nationality would have to at least show a passport when entering the UK. There is no path to enter the UK by air where you wouldn't pass immigration. From the UK home office: "_Citizens of countries other than Ireland and Britain must produce a valid passport and visa where applicable for travel between Ireland and Britain._"
Comment: I don't see how flying to Dublin removes the worry around prior convictions though? Travelers doing this must still pass through Irish immigration.
Answer: Highly unlikely you'd be turned away over it; however, with the UK and the US sharing criminal records, do not lie if asked about it.
Do bring proof of your ties to the US, just in case they decide to dig deeper into you.
Comment: @MichelleS Anything and everything that helps in answering the question "why would she return home and not just stay illegally". Again, though, this is all just as a backup; chances are you'll sail through.
Comment: I would be traveling during the summer, and have a young child who will be spending his summer vacation with his dad, what kind of documentation should I bring?  My ex and I are not on the best of terms so hopefully nothing from him.  I also have an adult child and a job.
Answer: Worth noting that if you apply for a visa and are refused (unlikely, but possible as a previous commentator has mentioned), you will no longer be eligible to enter the UK via the visa waiver program. That is, you would need to be explicitly granted a visa for every subsequent visit.
Comment: That's not true


add stroke to text (outline) with Coldfusion and Java (classes/methods)

Question: I've been trying to add stroke to text using Coldfusion code and Java classes / methods. I found some pointers on Leigh's old blog (cfsearching) and have been spending a lot of my free time reading more about Java objects, how to call Java class/method .etc on Ben Nadel's blog. I have a lot to learn on this and I would be happy to do so with your help :)
I put together a test code, here is what I have so far
<cfset text = "This is just a text sample">
<cfset img = imageNew("",500,500,"rgb","blue")>
<cfset graphics = ImageGetBufferedImage(img).getGraphics()>
<cfset renderContext = graphics.getFontRenderContext()>

<cfset Font = createObject("java", "java.awt.Font")>
<cfset NewFont = Font.init( "Arial", Font.BOLD, javacast("int", 40))>
<cfset txtLayout = createObject("java", "java.awt.font.TextLayout").init( text,NewFont,renderContext)>
<cfset txtBounds = txtLayout.getBounds()>
<cfset txtWidth = txtBounds.getWidth()>
<cfset txtHeight = txtBounds.getHeight()>
<cfset shapeObj = createObject("java", "java.awt.geom.AffineTransform").init()>
<cfset shape = txtLayout.getOutline(shapeObj)>

<cfset color = createObject("java", "java.awt.Color")>
<cfset stroke = createObject("java", "java.awt.BasicStroke").init(10)>
<cfset strokeWidth = stroke.getLineWidth()>
<cfset graphics.setStroke( stroke )>
<cfset graphics.setColor( color.decode("##ff0600"))>

<cfset attr = { font="Arial", size="40", style="bold" }>
<cfset x = (ImageGetWidth(img) / 2 - txtWidth / 2)>
<cfset y = (ImageGetHeight(img) / 2 + txtHeight / 2)>
<cfset imageSetDrawingColor(img,"yellow")>
<cfset imageDrawText(img,shape, x, y, attr)>

<cfimage source="#img#" action="writeToBrowser">

I am aware that I somehow incorrectly combine CF and Java and that's why I would really appreciate your help on this one :) I also tried dumping almost every variable in order to see what's hiding behind, what methods/classes can be accessed, though I was not able to sort it out :((
Answer: If the goal is to both fill the text with color and outline it, then you really cannot mix the two drawing functions (CF and java). It is difficult to match the positioning exactly, so you frequently end up with a shadow, rather than an outline. For consistent results, I would draw all of the text in java.
First get the graphical representation of the text:
graphics = ImageGetBufferedImage(img).getGraphics();
context = graphics.getFontRenderContext();
Font = createObject("java", "java.awt.Font");
textFont = Font.init( "Arial", Font.BOLD, javacast("int", 40));
textLayout = createObject("java", "java.awt.font.TextLayout").init( text, textFont, context);

Then calculate the positions to center the text. This part is a little counter-intuitive, but ... basically you use the AffineTransform to set the position before drawing it onto the image:
transX = (imageWidth/2) - textLayout.getBounds().getWidth()/2;
transY = (imageHeight/2) + textLayout.getDescent();
transform = createObject("java", "java.awt.geom.AffineTransform").init();
transform.setToTranslation( transX, transY );

Next, get the text shape, and fill it with whatever background color you want:
// fill it with a "yellow" background
shape = textLayout.getOutline(transform);
color = createObject("java", "java.awt.Color");
graphics.setColor( color.decode("##ffff00") );
graphics.fill( shape );

Finally, draw the text outline:
// finally, draw a "red" outline
graphics.setColor( color.decode("##ff0600"));
stroke = createObject("java", "java.awt.BasicStroke").init(1);
graphics.setStroke( stroke );
graphics.draw( shape );

Then display the image as usual:
<cfimage source="#img#" action="writeToBrowser">


How can signing and sending transactions take place within Meta Mask if the user is not running a local node?

Question: I have been trying to wrap my head around this for a while to no avail, so please help me understand.
I've created several dapps and smart contracts in the past using web3.js, ethers.js, web3.py, etc.  What I'm trying to do is create a C++ desktop application that communicates on the Ethereum network. I would like users to be able to send and receive ETH and interact with smart contracts via this application. Although there are a couple ways to execute Python and Javascript code from within C++, it is very hackish and not something I would ideally want for my project. I have already investigated how this would work, and while it might be sufficient for what I'm trying to do, surely there must be a way to do this purely in C++.
So far, I have been able to use curl to make RPC calls to Infura to get account balances, and that works perfectly. But according to this answer, signing and sending transactions purely through Infura is impossible. I have done a lot of research to try and figure this out, and I think I must not be understanding something on a conceptual level about how signing a transaction actually works.
Ordinarily, the user would hold their ETH in a Meta Mask wallet (or something similar). Then the front-end code would either use web3.js or web3.py to ask Meta Mask to sign a transaction or send ETH to a smart contract. I assume this works because Meta Mask has access to the keystore file from which it can derive the private key. Meta Mask is just a browser extension, and so that means the private key never leaves the user's computer. That, and because the project is open-source, is what gives users the trust to use it to store their funds. Users know for sure that their private key isn't being sent somewhere else to be stolen. So the signing is done locally, and then the transaction hash is sent along with the transaction to Infura, which then carries out the transaction.
However, isn't there a problem here? Looking at this answer again, it implies that you cannot sign a transaction without spinning up a local Ethereum node such as geth. Obviously, Meta Mask is not doing that. I know I'm not running an Ethereum node because I still have plenty of hard drive space. So how exactly is Meta Mask signing the transaction? I have the same exact question regarding web3.py, because I am able to do the exact same thing using it, even though I am not running a local node. And this answer adds to my confusion, as it indicates that web3.py is doing the exact same thing that Meta Mask is doing, both of which connect to the blockchain using Infura. Why then, is web3.py able to sign a transaction, when a direct RPC call to Infura's API in C++ is not able to do so?
Furthermore, the Infura docs do list "eth_signTransaction" as an endpoint but it does not take a private key as a parameter. That's fine, but then this is the code I call in web3.py:  signed_tx = web3.eth.account.sign_transaction(transaction, private_key)
So web3.py requires the private key in order to sign the transaction (where the transaction is just a JSON object and the private key is a string). So what goes on inside of web3.py? I've tried to look but the code is confusing. Despite Meta Mask and web3.py being open source, there's no easy way to tell what is going on inside of that code to actually sign the transaction. Does this mean I basically need to create my own version of web3.py (web3.cpp?) in order to accomplish my goal?
The only thing I can think of is that somehow it must be possible to make an RPC call to Infura's API in order to sign a transaction. But that doesn't make any sense, because then you are exposing the private key, which is exactly why Infura would disable that kind of call... So Infura disables it, which means web3.py and Meta Mask shouldn't be able to call it, but they can... But if they're calling a function that exposes private keys, why would anyone use these services? ...It's an endless back-and-forth of not understanding what is going on.
Possibly the simplest way to phrase this question: How can the signing and sending of transactions take place within Meta Mask if the user is not running a local node?
My goal is to create an application that users trust they can use to store their funds. Ideally, it would probably be best to connect it to Meta Mask, but I don't know how you would go about connecting a desktop app to a browser extension. So the alternative is to just store the private keys in the desktop app (on the user's computer) almost like it's its own wallet, and then make the app open-source so that people can trust what it does with the keystore file. Is this the right approach, or am I missing something here as well?
Comment: MetaMask asks a `nonce` to the infura node then compute the signature locally using the privatekey and send the signed transaction back to Infura. PrivateKeys remains secret !
Answer: You don't need an geth or any ethereum node to sign a transaction. Even you can sign a transaction offline without internet access.
We can say that Metamask act as a "middleware", it injects an ethereum provider in the web pages that catches signature requests. When one request arrives it ask the users for approval and if it is accepted Metamask will sign them with the private key stored previously.
I don't think that the browser extension is prepared to be used by a desktop application. Perhaps you should look at proocols like WalletConnect or WalletLink.


How to enable direct payment in Moneybookers

Question: I want to enable direct payment for the customers using credit/debit card in Moneybookers payment gateway.
It's asking the buyer to login/register to Moneybookers.
I tried the hidden variable payment_methods, but it failed.
How can I implement direct payment for the customers through credit/debit card?
Comment: What did Moneybookers say when you asked their support this question about their service?
Answer: <code>    <input type="hidden" name="hide_login" value="1" />
</code>
Answer: And you must be a Merchant (you must have a Merchant account).


Get selected text in searchable dropdown using js

Question: I want to get the selected text in searchable dropdown using javascript function. My expected output is my selected text. But in below code, always return the value as undefined. There's an another problem with this dropdown. When I click one time on the dropdown, it doesn't show the dropdown items. Always, I have to double click to see the dropdown items. My main issue is how to get the seleted text using js function. Hope your help.

document.querySelector('#get-value').addEventListener('click', ()=> {
  var elmValue = document.querySelector('#suggestions').value;
  document.querySelector('#result').innerHTML = elmValue;
})
    <datalist id="suggestions">
         <option>First Option</option>
         <option>Second Option</option>
    </datalist>
    <input class="form-control" autoComplete="on" list="suggestions" id="agentName"/>

<button id="get-value">
Get Value
</button>

Selected Value:

Thank you.
Comment: maybe this link can help u
https://stackoverflow.com/questions/58521557/get-selected-value-of-datalist-option-value-using-javascript
Answer: I found a solution for this issue. I included name attribute to the input field.
 <input class="form-control" autoComplete="on" list="suggestions" id="agentName" name="agentName"/>

Then, using the line of code below, I was able to get the selected text.
var selectedValue =  $('[name="agentName"]').val();


Does the Xbox 360's 'Auto Shut Off' Feature Wait for Downloads to Finish?

Question: I think the title is pretty self-explanatory.  The newest version of Xbox 360 firmware comes with a feature that automatically shuts down your Xbox after a period of inactivity, which you can set yourself.  If I'm downloading something big enough that it takes longer than my shut-off time, will the Xbox wait until it's done before powering down?
Comment: There's a system setting that will cause the Xbox to stay on (even if you power it off with the power switch) to continue a download.  I think it's called "Background Downloading"  With that on, I'm fairly certain the answer is yes.  With it off I'm not so sure.  More testing would be required...
Comment: I am pretty sure @agent86 is right. I was downloading some demos on a super slow internet connection (about 4GB worth) and I left for the night, turning off the Xbox on my way out with only one of the downloads half completed.  When I turned it on the next day, all of the demos were ready to play.  I wasn't even aware of that setting (it was my roommates Xbox), but I'm assuming that's how it happened now.
Comment: @turboSwag but you actively turned it off, right?  I guess it doesn't really matter if it's on or off if I'm going to be away from it, as long as it's downloading.  But I'd still like to know about the *automatic* shutoff.
Comment: I'm not sure actually, I forgot about it, but my roommate who owned the Xbox might have turned it off.  This was also before the automatic shutoff feature possibly (around August 2012), if it is recent as you stated.  I would assume it works the same though, if anything more likely to work with automatic shutoff than manual shutoff.
Answer: The 6 hour turn off won't stop downloads if you have "background downloads" turned on. This is accessed via the normal 360 settings on the right most "screen".
If its downloading the power light will continue to flash after you've powered the console off. Sometimes it might take a minute or two before it kicks into this mode after being powered off - I'm not sure why but my 360 does at least.
Comment: Oh, so it will still auto-shut off, but continue to download until it's done?  That's handy.
Answer: Yes it does. If you turn it off or if it turns off automatically it will work. I was downloading GTA 5 and I fell asleep with the Xbox on and woke up with it off and it was ready to play :) Hope I helped.
Comment: Hi nick hon, and welcome to Arqade. I've suggested an edit to your answer that adds capital letters and punctuation, and expands things like "u" to whole words. You'll probably find that writing in good English makes things much more likely to be upvoted here.


Drawing a zig-zag line within table similar to that of the periodic table

Question: I have searched quite a bit for something related to what I am trying to create. I am trying to replicate a table with a zig-zag line such as that of the periodic table. I managed to define a new Cline thickness, however that merely draws the thick horizontal line beneath a certain or some cells. I am struggling the draw the thick vertical lines. I have read about multicolumn definitions but do not know if this is merely the approach to follow or if there is a quicker way. In short i just want to add a thick zig-zag line to a table such as that of the periodic table. Any help would be much appreciated. Thank you advance.
Comment: [Welcome to TeX.SX!](http://meta.tex.stackexchange.com/q/1436)
Comment: Not an answer to your question - just a comment. You may consider producing the table as a graphics, e.g. using the TikZ package. This allows much more variability than a standard table. For example, see the [periodic table using TikZ](http://www.texample.net/tikz/examples/periodic-table-of-chemical-elements/). Of course, it depends on what you are trying to achieve...
Comment: I'd consider a matrix of nodes from tikz
Comment: Could you show us a sample table? It'll help to shape answers....
Answer: I guess you want a thick separation line in a tabular environment like so:

Maybe this Questions may help you:

pdfpages doesn't allow me to draw a thick horizontal line in "tabular"
Change border of a few cells in a table
How can I reproduce this table with thick lines?
Nice-looking tables with thick rules

It would really help to know what this is for. Tikz is an easy way for making complex drawings like a periodic table (at least in comparison to Tabular :P).


Submersible pump won't continue to run

Question: Last summer I put a Wayne VIP50 submersible pump under my crawlspace. This winter there's about 6" of water in there and I checked out the pump. Since the discharge hose had a kink, the water couldn't come out. The pump was running the whole time too, don't know how long it was running. But after the kink is fixed, water comes out in spurs. The pump also does that, runs for 3 seconds, stops, runs again, stops, then runs again. So, was the pump damaged since the hose was kinked for however long and it was left running?
Answer: Might have overheated - if so it should get better when it has a chance to cool down. You could try turning it off for an hour os so.
Might be damaged in some other way, in which case it probably won't improve. For non-temporary use, pipe beats hose as it won't kink while you are not looking at it.
Intake might be clogged, too - it may be pumping out what filters in, running out of water to pump, stopping, and repeating that cycle. Check and clean the intake area.

Submersible pump won't continue to run


Combinatorial proof that the maximum of an i.i.d. sample of size $n$ uniform on $(0,1)$ has expectation $\frac{n}{n+1}$?

Question: Let $X_i \sim U(0,1)$ for $i = 1,\dots,n$, and let $X = \max(X_1,\dots,X_n)$. Is there a combinatorial way of seeing that
$$\mathbb E(X) = \frac{n}{n+1}$$
and likewise for the minimum? Intuitively this is my guess for the expectation since, "on average," the experiment results will be distributed evenly on $[0,1]$. This may of course be verified by
$$\int_0^1 x[P(X < x)]' \mathrm dx = \int_0^1 nx^n \mathrm dx = \frac{n}{n+1}.$$
Comment: A technique that would avoid integration by turning it into some counting problem. For instance, one can compute the probability that $X_1 < X_2$ via integration, but it's easier to note that there is a $1/2$ probability that any two numbers chosen from $[0,1]$ are in order.
Comment: Could you make more precise what a "combinatorial" proof is to you?
Comment: I see. Thanks. $ $
Answer: This might not be what you are after but...
Let $(Y_1,Y_2, \cdots, Y_n)=(X_{(1)},X_{(2)}, \cdots, X_{(n)})$ be the ranked (ordered) variables. Let $(Z_0,Z_1, \cdots Z_n)$ be the differences : $Z_i=Y_{i+1}-Y_i$ (with $Y_0=0$ and $Y_{n+1}=1$); hence $Z_i\ge 0$ and $\sum\limits_{i=0}^n Z_i=1$.
It can be shown that the $Z_i$ have the same distribution as $n+1$ i.i.d. exponential variables $W_i$ conditioned on $V_n=1$, where $V_n=\sum\limits_{i=0}^n W_i=1$.
Once we accept this, then we get
$$E(Z_i)=E(W_i\mid V_n=1)=\frac{1}{n+1}$$
So
$$E(Y_1)=E(Z_1)=\frac{1}{n+1}$$
and, for every $1\le k\le n$,
$$E(Y_k)=E(Z_0 + \cdots + Z_{k-1})= \frac{k}{n+1}$$
in particular,
$$E(Y_{n})=E(Z_0 + \cdots + Z_{n-1})= \frac{n}{n+1}$$


Repenting when sun rises from the west

Question: Hi so im a revert and I just read that you can't repent once the sun rises from the west. But I'm wondering, does that mean that if we commit sins after that we can't repent? Or does that just mean the disbelievers? What would happen if I accidentally commit shirk/kufr after that sign, can I not ask for forgiveness anymore? I don't know how to interpret it and it really scares me now.
Comment: Please consider adding a source of your claim.
Answer: Hey I'm so happy for you actually! Very glad you were able to stumble upon the truth and I ask The Lord, Allah The All Mighty to keep you steadfast on your deen! With regards to the sun rising from the west, that's one of the last signs of the hour (judgment day); which a lot of the signs has already happened actually. And yes, once the sun rises from the west, the doors of repentance are closed for good, and no amount of belief will save you if you were a non-believer (non-Muslim) prior to that incident, as it's too late at that point.
But there's no need to be stressed over it or feel scared! All Praise be to Allah, the religion is very easy and simple and Allah said in His Wise Book:

"Allah does not charge a soul except [with that within] its capacity. It will have [the consequence of] what [good] it has gained, and it will bear [the consequence of] what [evil] it has earned. ..." Quran [2: 286]

"... Allah puts no burden on any person beyond what He has given him. After a difficulty, Allah will soon grant relief." Quran [65: 7]

And no need to have these insinuations, have the strongest trust in Allah Subhanahu' Wa Ta'la and remember that Our Prophet (ﷺ) said, "Allah says: 'I am just as My slave thinks I am, (i.e. I am able to do for him what he thinks I can do for him) and I am with him if He remembers Me. ... [Sahih al-Bukhari 7405]
Comment: Thank you, but I still have one more question: do your good/bad deeds after that count? Because people would still sin but since you can't repent I was wondering that
Comment: @dlsj I believe that all actions will be dismissed from that point onwards, as the Hadith narrates that once this incident takes place; ```everyone``` will become a believer (in Allah), because everyone will see it with their own naked eyes and the ultimate truth has prevailed. Check the Hadith: https://sunnah.com/bukhari:6506

Repenting when sun rises from the west


Why do trains use the same wheels for staying on track and propulsion?

Question: Trains where originally designed to keep the train on track. At the time trains where pulled by horses and used to transport coal (and such) out of mines. The two functions have very different requirements:
- Keep the train on track
- Push the train forward
How effective would a solution be to push/pull the train forward that pulls on a serrated track?
Or some other surface that provides far more grip/traction?
Comment: @TigerGuy No, funicular uses a rope for propulsion, and rack railways use the rack for propulsion. In both cases the wheels are here only for staying on the tracks. Although mixed rack/normal trains exist as well where whells also do propulsion.
Comment: Funicular trains use some type of gear or cog for propulsion.  I suggest that the simplicity and cost of a single set of tracks is the driver for current general usage.
Answer: Trains do sometimes use different means for propulsion: Rack railways use cogs, and Funiculars use ropes
I think the reason these are uncommon is that the available traction of smooth tracks is more than sufficient for all but really steep slopes (>10% ).  Train engines may be limited in both torque and power when it comes to moving a heavy train up a steep slope, so the lack of traction is only part of the problem.  That's why trains tend to avoid slopes, or if absolutely necessary go up in S curves or zigzags.
Racks have hugely greater maintenance costs, and hugely greater friction resistance, so they would be avoided except for special circumstances (very steep slope, very slow speed, and special engine/light load).
Even in mines, I think it is more common to use a combination of smooth tracks and elevators - it's worth dumping ore from one to the other rather than laying down rack rails.


The pane on the left of the screen (2.83.18) shrunk while I was concentrating on my model

Question: WHile I was building my model, I hit some hotkey or other, and the pane on the left of the screen shrunk (it shows the icons in Object mode, Edit mode, etc.)
I can now barely read it. The panel was far bigger before.
I can't find a way to make it readable again, despite spending some time in the preferences section.
Can any of you guys come up with a fix, please?
Even better, can you take a guess at how I messed it up in the first place?
Many thanks
P
Comment: move your cursor over it and use scrollwheel.
Answer: You can increase/decrease the size of most areas using Numpad +/Numpad - keys
Just hover your cursor over the area.


Is the KP's built-in flash really only half as powerful as the K-7's?

Question: Is the Pentax KP's built-in flash only half as powerful as that of the K-7?
Comment: You've apparently researched this a bit. It might be helpful if you would include references to what led you to ask this. For instance, what is the respective Guide Number for each one? If more of what you've already learned is provided in the question, it's more likely someone will give you a good answer without having to take the time to go dig up again what you've already found.
Comment: Really, who cares :) A built-in flash is really a stopgap, and is never really adequate, especially when shooting people. A cobra flash is a huge step forward: more power, zoomable, orientable, usable as "bounce" flash, easier to fit with a diffuser... and for occasional uses the no-name ones are not that expensive and work quite well.
Comment: @xenoid "Cobra" flash is a relatively regional term. For most of the world it's either "speedlight" or "speedlite".
Answer: Per Pentaxforums.com the K7 has a guide number of 13 meters and the KP has a guide number of 6 meters.
The inverse square law applies.
The K7's flash provides appoximately 4.7 times more light output than the KP.
Comment: Yes, 4.7 times the power is correct for GN 13 vs 6.  Someone had said half power, but it has to be squared, so closer to 1/4.  And 4.7x power is the precise number.   4.7x power is 2.23 EV more exposure.
Answer: Yes, the Pentax KP built-in flash Guide Number is only about half the Pentax K-7.
Page 128 of the Pentax KP user manual specifies the Guide Number at 6 meters.
Page 312 of the Pentax K-7 user manual specifies the guide number at 13 meters.
There is some speculation in online Pentax forums that the KP's better ISO performance can make up for the weak onboard flash. Others say it is really to only be used as a wireless controller for off-camera flash.
In any case it is a big departure from all other Pentax DSLRs and also DSLRs of all manufacturers which generally have a Guide Number of about 13 meters.
Pentax KP user manual

Pentax K-7 user manual


Is there a robust, free module for SE-style social signup?

Question: I want to enable users to create accounts using existing Google, Facebook etc accounts, without needing to come up with and remember yet another password. Similar to how the StackExchange network does.
There's a proliferation of modules that have related features to these. I'd like to know if there's any one of them which has proven to be stable, robust, simple (requiring few dependencies or possible points of failure) and working without requiring paid subscriptions.

Some modules I've looked at:

I've seen many recommendations for Janrain Social Login, but I read that it's a paid-for service. This site is a very small project and that's beyond its scope. The demos I've seen also suggest that it removes the ability to create a Drupal-only account should the user want to.
I tried the built-in OpenID module plus OpenID Connect, but discovered that it only supports log in, not sign up.
There's a stack of modules built around OAuth (e.g. OAuth Connector). I gather that OAuth is a different protocol to OpenID, and requires dependencies to be installed on the server. In terms of functionality I haven't yet figured out what the fundamental difference is between the OAuth stack and Drupal's built-in OpenId stack, and I can't find any confirmation in the various docs available that it does indeed support signups. It has all the hallmarks of a serious project, though.
There's the connector module - I think this an API module used by the OAuth stack?
Hybrid Auth looks really promising and is my current front-runner: it explicitly supports signup and login, and has minimal dependencies (one open-source library, php-curl, and ctools), and is under active development with a stable D7 release. Sounds great, but I've not seen many recommendations for it, so I'm wondering if there's something I've overlooked.
There's Gigya, which looks like a 3rd-party service with fancy social features that aren't relevant in my case.
There's OneAll social login, which has a promising-sounding description but doesn't appear to be widely used.
There's Social Connect, but it seems to be Facebook only.
...and loads more, including many more 3rd party services and modules for specific providers.

I'd appreciate any expert advice from experience on the simplest stable way to get a sign up screen similar to this:
Answer: I used Hybrid Auth . It works well. I tried anothers. They were not so good. Yes,  Hybrid Auth does not have another functionality to share content. But It should not have it. It uses the separated library. It does not use third party services. It's free and independent.
If you tell me your successful experience with another libraries I will be pleased.


What, if any, groups of pro-Russian separatists are in East-European countries?

Question: Russian separatists in Ukraine have had an important role in "inviting" Russia to invade Ukraine. In order to predict future steps that may be taken by Russia, it may be useful to know: are there substantial groups in other East European countries (particularly those bordering Russia or Ukraine), that support accession to Russia? If so, what are they?
Comment: [Relevant map](https://en.wikipedia.org/wiki/Russian_irredentism#/media/File:Russians_ethnic_94.jpg)
Comment: @Egor I do not say that all Russians are separatists. By "separatists" I mean only those who actively want to detach the region they leave in from their current country, and adjoin it to Russia. The fact that they "think" differently is not a problem; the problem is that they invite the Russian army to take their country by force. Think what would happen if e.g. the Buddhists in Tuva would decide that they want to separate from Russia and join Mongolia, and invite the Mongolian army to initiate war with Russia.
Comment: I don't think that you can call Russians in different countries as "separatists". There are just huge amount of people in some countries (including different nations btw) who thinks like us. You cannot force them to think as you want. The stress between pro-american goverment and pro-neutral nations produces some kind of `separatists` activity as you like to call it
Answer: Moldova (which borders Ukraine to the West) definitely has them. They have a self-declared republic there too, Pridnestrovian Moldavian Republic (PMR), better known as Transnistria in the West.
It's more debatable if the Russian minority in the Baltic countries (~20-25% of the population in two of those) could count as such, but relations with the majority there have been tense at times and...

Latvia and Estonia designated Soviet-era migrants as non-citizens.

and e.g.

Contact between Russians and Estonians is rare.

and (2018)

A New Law In Latvia Aims To Preserve National Language By Limiting Russian In Schools

This by Western mainstream media accounts. You can only imagine how the Russian media portrays these matters.
Comment: As I understand it, Estonia has made it fairly easy for long-term residents to become citizens; it merely requires an oath of loyalty and tests on Estonian language and citizenship (and they offer free classes for learning the Estonian language.)
Comment: `It's more debatable if the Russian minority in the Baltic countries (~20-25% of the population in two of those) could count as such` - if they live there, probably they are not :)
Answer: Georgia also needs to be mentioned: Wikipedia on South Ossetia.
Specifically regarding your question: Plans of integration with the Russian Federation.
I almost don't dare to try to write what the Wikipedia link says so it becomes a real answer, but the situation there is a lot like Crimea. (Smooth military operation to take it away from Georgia; if there was election then a big chance they would choose Russia.)
Comment: With the difference that Ossetes and Abkhaz people aren't technically russian, have their own language, but otherwise it's very similar.
Comment: @Bregalad: yeah, see https://politics.stackexchange.com/questions/69531/why-didnt-russia-annex-abkhazia-and-south-ossetia for some details.


Can the 13ʺ MacBook Pro satisfactorily drive two Thunderbolt displays?

Question: The new 13ʺ Retina MacBook Pros have 2 Thunderbolt ports, and Apple appears to indicate you can plug in and use 2 Thunderbolt displays with them, but is the video performance satisfactory when doing so? I'm not planning on doing anything that graphically intensive, but I wanted to make sure that the performance was still fine. (Also, I'll be using the MBP in clamshell mode, so I'll only be driving 2 TB displays, not 2 TB displays and the laptop screen.)
Comment: To get a more specific answer you need to quantify "satisfactorily" and "anything THAT graphically intensive."  Specifically what games are you planning on playing?  What resolutions do you need?  Specifics give reliable answers.
Answer: Yes - the CPU/GPU are powered up enough for two external screens in my experience.
My experience is Apple won't bless as supported configurations where the majority of users will see laggy performance that cannot be tuned if needed with a firmware update or better drivers.
The higher end 15 inch retina MBP can crank out many more pixels, but the situation you mention with two TB displays with the Mac operating in closed-clamshell mode actually is less pixels to drive than the situation of one display and the internal display still running.
Answer: I run a 15" Macbook Pro Retina with two thunderbolt displays in clamshell mode.  I have them daisy chained one to the other, then to the laptop.  This configuration allows me to only plug/unplug one cable for all peripherals.  I have had no lagging, video rendering trouble or over-heating.
I run them at native resolutions and it looks beautiful.  I occasionally use graphics and video editing and playback software without reservation or degradation.  I also have VM's running that show no lag.
I don't have statistics or links to back this up, only experience.
* EDIT - Adding screen shots of configuration *
Answer: If it's Apple Thunderbolt Display with a resolution of 2560x1440, I would say it might be quite disappointing.
My 15" MacBook Pro has a GT 650M, which is much more capable than the built-in Intel graphics. However, driving 3 1080p displays has given it quite some hard time, the UI is not as responsive.
It will work, won't be very disappointing, but doesn't live up to Apple standards.
Also, what application you run will affect you performance, what will you run?
Comment: There's many things that Iris (integrated graphics) does better than GeForce (dedicated graphics).  e.g. barefeats.com/rmbpc.html


Connecting LED strips lights under outdoor stairs

Question: Hey guys I'm looking to install LED strips lights underneath the  tread of our outdoor garden stairs. I have 5 rows of stairs and each row is 1.5wide. I will need to install 5x 1.5m led strip's under each tread. My question is what's the best way to connect these strips to a power supply, in series? Or run dedicated wires to each strip and connect multiple led strip's to one power supply? Is that even possible? 12v or 24v and I'd like to have a PIR as well. Thanks in advance for any solid advice to this complete novice!
Comment: Welcome @BNAK, yes everything you have mentioned above is possible, the Voltage will depend on the type of LED strip you plan on using. The way to wire them up (Parallel 1.5m Strips vs Series 1.5 Strips) will depend on the strips & the power supply. You need to suggest what strips you want to use, LED density, number of diodes (RGB/RBGW/W) before we can help further. To me it sounds like you want something like a waterproof version of this https://www.aliexpress.com/item/32950789769.html
Comment: it makes no difference how you connect the strips together because the LEDs are all connected in parallel
Comment: @jsotola no it does. Running power through the strips to wire then another strip will introduce high resistance due to the FPC and voltage drops. Wiring in parallel would reduce that.
Comment: I would say learn a little bit of DC electronics.  That will make this job a whole lot easier because you'll have the vocabulary to understand what to do and how to do it.
Answer: In parallel.  if you connect them in series, the last one in the string will be a lot dimmer than the first.  It's up to you whether to use fat cables running from string to string, or separate thinner wires to each.
Get an appropriate LED supply for the number of strings you're using.
You can buy standalone PIR units.  Connect your power supply to one of those.
Comment: I think if you connect them in series the shorter strips will be brighter and might even burn out.


Raspberry Pi with touchscreen - screen turns white and pi restarts when trying to use LEDs

Question: We currently have a Raspberry Pi 3B+ with touchscreen hooked up to a PCB, and are trying to run adafruit neopixel 60led strip but, when we try and send data using their library, the screen turns white and the pi restarts. We've tried hooking up a different Pi, but the same problem continues. Does anyone know why this may be happening?
Comment: @Dougie Thanks for the help. After some investigation, our electrical guy determined that when the pin is turned on, there's a capacitor that is drawing too much power from the pi and causing it to restart. We do have an external power supply but it's voltage is too low apparently. Thanks again.
Answer: You're blowing the power budget. You need an external power supply for your LED strip.
You're lucky you haven't trashed your SDCard by losing the power supply when the system is busy.


Ceiling light controlled by switch stays on permanently once something is plugged into an outlet

Question: Hoping for some help here. My parents recently moved into a new place (older house though) and there is one quirk about it I can't seem to figure out. In one room, the ceiling light is controlled by a switch and works fine until something is plugged into an outlet on one of the walls.  Once something is plugged in the outlet, the ceiling light stays on permanently and the light switch now controls the power going to the outlet. This happens for two outlets, both on the same wall. I looked in the ceiling light and there are two 14/2 wires entering the box. One white wire is marked with black tape and crossed with a black wire. I had a quick inspection of the outlets and nothing obvious (didn't see anything loose, etc). Any thoughts on what is going on here.
Comment: Can you post photos of the insides of all boxes involved?
Comment: Hi and Welcome.  Use an incandescent lamp for device A.  When this device A is plugged into the outlet, does the ceiling light get dim and bright as the switch is turned on and off?  Does device A turn on and off opposite to the ceiling light?
Comment: Is the wall switch a standard mechanical single pole switch or is it a dimmer? Is the light in the ceiling fixture an LED, a fluorescent or an incandescent? Does the switch control the **hot**  slot in the wall receptacles whether there is any ordinary load plugged in or not? Can you check the *hot* with a plug-in circuit tester or a non-contact voltage tester?
Comment: What cables are in the switch box? Do want the receptacles to be be always on, *not* switched?
Comment: A picture of what is in the light fixture box and what is in the switch box would really help, but failing that answer some questions. Are there two 14/2 + gnd *cables* entering the fixture box, that is, two cables each with a black wire and a white wire so two blacks and two whites (plus grounds)? How many *cables* are there in the switch box and are they all 14/2 or is there also a 14/3 (B, W, R + gnd)?
Answer: Sounds like poster is not coming back... Short answer is
Look in the receptacles
Usually, receptacles that control lamps are split.  This is done by breaking off a tab of metal that resides between the two brass screws on the hot side of the receptacle.
It happens all the time where a novice decides "I'm going to replace all my receptacles for some reason" (color change, weak old receptacles that don't hold, GFCI, you name it.)  Because they are a novice, they have no idea how the "tabs" work, and don't even realize "tabs" are a thing.  They end up defeating the switched light, have no idea why that happened, don't even know where to start, so they shrug, decide "fix it later" or  live with it, and switch the lamps on and off at the lamp.
Or, they do something weirder like break off the neutral tab by mistake.
Regardless, something like that has gone wrong.   Look for abnormal wiring in each of the receptacle boxes.  Shoot us a photo, and edit your question to add them.
Comment: +1 for "don't even realize "tabs" are a thing".  I was considering that the outlet in question was somehow wired *across* the switch rather than in series with it. We may never know. :-(


How do people get logos to look "drawn" like the first and third logo in the image I provided?

Question:
What is the best way and process someone does to go about making a logo like that? I have seen people draw a logo and then use "image trace" but is that what people typically do? If they don't use "image trace" but use the pen tool for example, how do you make it look like someone drew it? How do you get the lines to look like that? Any help would be appreciated! Thanks!
Comment: Is it possible that it **is** in fact **hand drawn** and then just touched up in Photopshop/Illustrator?
Answer: FWIW - those look to me like either actually hand drawn or a great deal of effort and planning to give that feeling - one looks like it's a hatch-based imitation of woodblock style texturing, the other looks very like a hand drawing.
You can achieve these looks in Illustrator, in InkScape and in Affinity Designer with time, practise and with brushes; if working in Illustrator you can also purchase plugins from Astute Graphics (Width Scribe, Stylism, Stipplism) which can make achieving this sort of feel a lot easier and faster - but.. even then, in all cases, this type of graphic treatment takes a lot of time, practise and skill: there's no quick click a button to get hand drawn effect tool, it's just planning and work.
Answer: Those are illustrations made with a lot of patience. There are many tutorials in internet about how to do it. You should look for:
Vector Engraving Illustration that simulates the old metal engravings. Tutorial Link

Vector Linocut Illustration that simulates the linoleum block engravings. Tutorial Link

For Illustrator there are plenty of engraving brushes that make work much easier. Tutorial link
Comment: @Ryan In my opinion it is not just a link answer, but a relevant information with the explanation and the links as a third option. In some other questions I have read about the opinion of users and moderators and it is usually explained that maybe the OP doesn't know the exact terminology to access information about what they are looking for, something that maybe the person who answers knows and this can give the exact info, such is the case of my answer.
Comment: downvoted because for all intent purposes this is a link only answer that basically says, "theres tutorials for that."
Comment: Don't forget the OP is asking for ... logos to look "drawn"... or making a logo like that? ... draw a logo and then use "image trace" ... how do you make it look like someone drew it? ... How do you get the lines to look like that? ... In any case does it speak of images simulating **metal engravings** or **linocut**, information given in the answer with a short explanation of each case, to make easier the Internet search. I thought about this when I wrote the answer, that's why I put the links as secondary thing.

How do people get logos to look “drawn” like the first and third logo in the image I provided?


Is Magnesium Oxide alkali

Question: Given that Magnesium Hydroxide is an alkali, can we say Magnesium Oxide is an alkali since dissolving Magnesium Oxide in water can produce Magnesium Hydroxide?
Comment: If a question is asked on Chemistry SE site, then, in contrary to sites like Quora, it is expected from the author to elaborate the topic in the question, doing at least basic research oneself, writing what he/she found and understood, and what is the stumblestone. The quick questions without explicitly expressed particular effort are not very welcome, and may be closed.
Answer: Tl, dr:  Chemists would generally say "No".  But it's not as cut and dried as one might think.  The alkaline character of magnesia and heavier Group 2 oxides is one of many examples in chemistry where the actual character is intermediate between the extremes a yes/no answer seems to imply.
Usually the term "alkali" is reserved for the hydroxides of Group 1 metals, which (at least among compounds of commonly observed elements) uniquely combine strong basic character with high solubility in water.  Even barium hydroxide, whose solubility in water is limited to less than one molar unless the water is heated, does not get there on solubility.
That being said, there are applications where magnesia (and its congeners with heavier alkaline earth metals, such as lime) functions as an alkali would.  Given the solubility product of magnesium hydroxide being roughly $10^{-11}$ (different sources quote slightly different values), magnesium remains freely soluble up to a pH of about 9 (with lime the corresponding limit for calcium is around pH 11 or 12), which is high enough to displace most transition metal hydroxides from solution.  From Wikipedia:

Magnesium oxide is used extensively in the soil and groundwater remediation, wastewater treatment, drinking water treatment, air emissions treatment, and waste treatment industries for its acid buffering capacity and related effectiveness in stabilizing dissolved heavy metal species.
Many heavy metals species, such as lead and cadmium are most soluble in water at acidic pH (below 6) as well as high pH (above 11). ...
Granular MgO is often blended into metals-contaminated soil or waste material, which is also commonly of a low (acidic) pH, in order to drive the pH into the 8–10 range where most metals are at their lowest solubilities. Metal-hydroxide complexes have a tendency to precipitate out of aqueous solution in the pH range of 8–10.

In effect, magnesia and other alkaline earths act as alkalies in some reactions (displacement of other metal hydroxides) but not in others (failing to form concentrated strongly basic solutions).  They represent an intermediate stage between full-fledged alkalis and the majority of metal oxides and hydroxides which are inert in the absence of added acid or strong base.
Comment: So is the premise I took, which Mg(OH)2 is alkali, also right or just intermediate?
Comment: Yup, intermediate.  Again, if forced to say yes or no, ignoring the subtleties involved here, chemists would say yes only for alkali metals.
Comment: Only for alkali metals? Even Ca(OH)2, Ba(OH)2...?
Comment: As I say, even the most soluble alkaline earth hydroxides don't come close in solubility to their Group 1 counterparts.  You're not going to find 1M barium hydroxide solutions sitting on the lsboratory shelf, whereas sodium hydrixide can easily exceed that.
Answer: The word alkali is reserved to hydroxides of elements of the first column of the periodic table (Li, Na, K, Rb, Cs, Fr). So oxides are not alkalies. Furthermore Magnesium is an element of the 2nd column. It is an alkaline earth metal. It does not produce an alkali when oxidized to MgO.
Nevertheless, the "Concise Encyclopedia Chemistry" states that "in a broad sense, the alkalies also include the alkaline earth hydroxides and aqueous ammonia, because of their weaker basicity". So Mg(OH)2 may be taken as an alkali, but not MgO.
Concise Encyclopedia Chemistry, translated by Mary Eagleson, ISBN 0-899-457-8, Walter de Gruyter Berlin NRef.: ew York 1994
Comment: So, you mean Na2O and K2O are not alkalis but only bases in this regard?
Comment: Yes. Oxides are not alkalis.

Is Magnesium Oxide alkali


Sleeping hours during the day

Question: I've noticed that you all refer to the 4-5 hours of sleeping at night only. My newborn is 11 days today. Sometimes he sleeps for 2 hours, sometimes for 1 hours, sometimes for 3 hours. The lactating expert told me to only make him sleep for 4-5 hours once a day ( I'm trying to make it happen at night) . So I am waking him up if he goes more than 3 hours without feeding. Can you please advice?
Answer: Congratulations on the birth of your baby, @Souha, and on the great start the two of you have made with breastfeeding!
The lactation consultant's advice strikes me as good advice in the medium term.  For the short term, though, you can feed on demand for the most part.
Now, the fine print: if your baby is still asleep three hours after his last feeding, and it is daytime, please do wake him up to feed him.  This will encourage him to get his day/night set, it will help him gain well, and it will prevent you from getting over-full and possibly engorged.
In short, it sounds like you are on an excellent track.
Please do not hesitate to contact the lactation consultant with follow-up questions such as this, if she is available for questions.
Another very helpful resource for you is La Leche League International.

Sleeping hours during the day


Making crunchy creamy hash browns

Question: I want to make southern style hash browns (cubed 1/3-1/2 inch potatoes) and I WANT them to be more on the greasy side. This accomplishes that they have crunchy spots but are creamy. I've tried pan frying them but that makes them too oily. What would happen if I deep fried them on a low temperature, let's say 275-300f? Would they brown? And would they be more creamy? Or is there a better way?
Comment: Deep frying at a low temperature tends to make foods more oily - the food takes long enough to cook to soak up a lot of oil, and can become quite soggy with it.  It isn't likely to make them "creamy", and is likely not what you're looking for if pan-frying made them too oily.
Comment: Do you cook the cubes first, or do you fry raw cubes?
Answer: The way I have achieved this is by gently simmering the potato cubes until they soften. (You want them pretty much cooked, but not so done that they won't hold together well.)
I also lightly salt the water so they take on a little seasoning while they cook. This, of course, is optional.
Next, I drain the potatoes very well. I want them to essentially be dry for the next step. Lastly, I lightly coat the surface of a non-stick pan with oil and cook the cubes on a medium heat, tossing as needed, until they are browned to my liking.
This results in potatoes that are crunchy on the outside and still creamy on the inside.
Comment: And make sure the pan isn't crowded when crushing them
Comment: Par-boiling first is definitely the way to go for oven fries or deep-fried potatoes. I follow Cook's Illustrated's suggestion and add a little bit of baking soda to the boiling water. It helps to break down the starches a bit more on the surface of the potatoes which helps to get that crunchy crust. https://lauriecooks.wordpress.com/2012/10/28/cooks-illustrated-oven-homefries/
Comment: @Cindy : no.  That's what I get when I mistype 'crisping' on my phone's on-screen keyboard and audokorekt kicks in
Comment: @Joe Did you mean to say crushing?
Answer: Par-boiling first is definitely the way to go for oven fries or deep-fried potatoes (similar to Cindy's answer).  With relatively thick pieces of potatoes, they recommend starting with them in cold water, and bringing it to a boil, taking them out five minutes after the water started boiling.  With smaller cuts, you'd probably boil for much less time.
I follow Cook's Illustrated's suggestion and add a little bit of baking soda to the water. It helps to break down the starches a bit more on the surface of the potatoes which helps to get that crunchy crust.
Cook's Illustrated Oven Homefries – Laurie Cooks
Answer: I would call these "home fries" rather than hash browns personally.
I've had much success with two methods.
I've prepared them in a commercial kitchen in large batches by baking whole potatoes in an oven, peeling, dicing, seasoning, then frying individual portions in butter or oil until crisp.
At home I prefer to microwave the whole potato (poking holes in it so it doesn't explode) until tender instead of using the oven.
These two-part cooking techniques are the best way to ensure a doneness in the middle that allows you to focus on building your crust as desired. Deep frying works just fine, but again I'd suggest cooking through first.
I would advise against boiling. Adding moisture to the potato is counter productive to your goal of a crispy finish.

Making crunchy creamy hash browns


MathType in C# (OLE)

Question: I'm trying to run a MathType in a C# app... using OLE in forms to signify the equations/images.
This is how I started with the code.
I got the CLSID object for math type equation. I create a new instance and run a verb to start Math Type. This works good until I try to set or get data of the IDataItem attribute I have.
Code:
string progID = "Equation.DSMT4";
comRetVal= CLSIDFromProgID(progID, out eqContainerGUID);
Type t = Type.GetTypeFromProgID(progID); //ok-> MT6 Equation
Object instance = Activator.CreateInstance(t);

IDataObject oleDataObject = instance as IDataObject;
MTSDKDN.MathTypeSDK.IOleObject oleObject = instance as IDataObject;

//run verb Run For Conversion - I'm not sure what this verb does
oleObject.DoVerb(2, (IntPtr)0, activeSite, 0, (IntPtr)this.Handle, new MathTypeSDK.COMRECT());

//up to here everything is find

//Now say I want to put a MathML string into the IDataObject
//set format
formatEtc.cfFormat = (Int16)dataFormatMathMLPres.Id; //<-this overflows. I verified that the only format that works is Presentation MAthML
formatEtc.dwAspect = System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_CONTENT;
formatEtc.lindex = -1;
formatEtc.ptd = (IntPtr)0;
formatEtc.tymed = TYMED.TYMED_HGLOBAL;

//set medium
ConnectSTGMEDIUM stgMedium = new ConnectSTGMEDIUM();
string mathEqn = "<math><mi>x</mi></math>";
stgMedium.unionmember = Marshal.StringToHGlobalAuto(mathEqn);
stgMedium.pUnkForRelease = 0;

//if now i write the equation to console from STGMEDIUM i see that after each char there is a null. Is this normal?

//now I try to set data in IDataObject and the OLE object
//I thought this set the data of the ole object to the MathML string I put in STGMEDIUM
oleDataObject.SetData(ref formatEtc, ref stgMedium, false);

The app now crashes with this exception:

System.Runtime.InteropServices.COMException was unhandled Message="Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC))" Source="System" ErrorCode=-2147221404 StackTrace: at System.Runtime.InteropServices.ComTypes.IDataObject.GetData(FORMATETC& format, STGMEDIUM& medium)

I'm not sure what this means, but I think it might have to do with
formatEtc.cfFormat = (Int16)dataFormatMathMLPres.Id;
because that ID is 50000 and does not fit in a short (cfFormat is a short) so it overflows to something like -15000.
Answer: I have solved similar issue by converting it from unsigned to signed value. it means that if the value (dataFormatMathMLPres.Id) is grater than 32767. Use (dataFormatMathMLPres.Id - 65536) instead. It will fit signed short.

MathType in C# (OLE)


Unit selection circle in BGE?

Question: Someone call it a Selection Indicator or Halo. I would like to know how to make this effect in BGE?
Comment: Could you just have a plane with an image on it, parented to the character, and use the objects alpha color to determine whether it is visible or not?
Answer: The best way to do this at the moment is having an object (the shape itself or a plane with a shape texture) that follows the Character, and turns visible or invisible depending on the character selection state.
You should be able to do this even without coding, by using the visibility actuator logic brick.
Answer: Belated answer, but necessary.
Parent.Blend
This builds the ring at the current object, deleting it and reproducing it every .1 ticks.
It may actually be more efficient to parent it, which yes you can do in the bge, I just can't find the command that allows it. And another note, you shouldn't use real geometry for this effect(I only did because I wanted to build it quickly) you should use a plane with a circle image UV mapped onto it to reduce processing time.

Unit selection circle in BGE?


Security for MCU

Question: Oflate there has been a lot of interest in Microcontroller community about security with ARM TrustZone for MCUs. TrustZone is deemed to protect MCUs against software attacks. My question is what are the ways a malicious code can even enter an MCU?
Comment: Here's a good example use-case, I think. I couldn't find a reference in my quick google search, but I remember reading some discussion that this tech would enable Router manufacturers to allow custom firmware like DD-WRT while still complying with the FCC ruling that manufacturers prevent users from messing with the device's transmission power. https://hackaday.com/2015/08/31/fcc-introduces-rules-banning-wifi-router-firmware-modification/
Comment: This article probably covers what I was talking about above, better. The basic idea being to protect the radio-controlling firmware while allowing loading of other custom open source software on the router. https://arstechnica.com/information-technology/2016/05/linksys-wrt-routers-wont-block-open-source-firmware-despite-fcc-rules/
Comment: usually via existing built-in firmware update routines. in some edge cases, via file uploading+interpretation, poor handling of fuzzy inputs, overflows, and sqli
Answer: I apologize that I am answering this from a little bit of a vague higher level, since I'm not as familiar with the specific attacks that are made against embedded systems.
Commercial Applications for TrustZone
In my comments on the question, I've linked some news articles about Router manufacturers needing to have a trusted environment to run WiFi radio firmware, separate from untrusted code (ie. DD-WRT) to comply with an FCC ruling that manufacturers must put security measures into place to prevent consumers from boosting their 5GHz signals to levels that cause interference outside their rated levels.
This demonstrates a type of attack where a user is intentionally loading code that is not trusted by the manufacturer. This type of crafted software update could be relatively benign (depending on your perspective), or it could be malicious code.
Attack Mitigation
Having a trusted code layer, like ARM TrustZone provides, can also be used as a secure bootloader. To illustrate the purpose of such a system, it helps to understand that a program cannot verify it's own integrity. If one were to check digital signatures, an attacker could just modify the signature that the program was checking against. With a secure loader, you can be assured that the verification process has not been tampered with, and thus can be used to prevent an application that has not been signed (or has been signed with an invalid key), from loading.
The same technique could be used to validate software updates before installation, preventing malicious firmware installation.
Answer: How to make MCU secured? - Write program and lock program memory from reading externally.
How to make MCU firmware Trustful?
Probably having a root key, with now access form outside. It can be a part of your code. Implement authentication when interacting with other devices, use derivation keys. Implement versioning, to deny working with outdated devices. Implement secured update. Also MCU can work with external memory, so this memory can be vulnerably for mounting attacks. All this is not TrustZone (c) ARM CPU, but how we can make MCU based more secured.
Comment: Just because some MCUs let you lock firmware or memory does not mean you can actually secure it. Think of the ever-popular 8051 for example which has both a firmware read lock and write lock bit. Even with those locks set, it's still fairly trivial to bypass using glitching attacks. In other words, common 8051s are not secure. Locking the data is useless.
Comment: Fair enough, but it is easier build reliable and secured lock mechanism, than full blown Arm Trust Zone, besides not all Trust Applications are encrypted, they are just signed and executed in secured env.

Security for MCU


Monitoring transfers and keep transfer alive

Question: we are trying to integrate polkadot support for our exchange. Currently we want to monitor the blockchain and see if any of our address receive deposits, I am currently doing this by checking the extrinsics and see if the method transfer or transfer_keep_alive is called and see the destination of the transfer is equal to our address. Is this enough of do i need to check the events as well not quite sure
Answer:
I am currently doing this by checking the extrinsics and see if the method transfer or transfer_keep_alive is called and see the destination of the transfer is equal to our address

Calling methods does not guarantee success. It is best to ALWAYS listen for events. In many cases an Event can also be emitted from an Extrinsic where you would not expect it. This applies to many other blockchains as well. In the case of Substrate you probably also only want Finalized Events.
There are indexing services which conveniently ingress the events and make them queryable et. al in case you need to quickly bootstrap your backend.
Comment: Exactly this. We also have an [integration guide](https://wiki.polkadot.network/docs/build-integration) with a specific note about monitoring deposits:

"If you want to monitor deposits into an address, keep in mind that several transactions can initiate a balance transfer (such as `balances.transferKeepAlive` and a `utility.batch` transaction with a transfer inside of it). Only monitoring `balances.transfer` transactions will not be sufficient. Make sure that you monitor events in each block for events that contain your addresses of interest to ensure that you can properly credit deposits."
Answer: I think this should depend on what you want to support for the target chain. (allow the users to deposit tokens to your exchange in what way)
If you want to support XCM, then you should also check those pallets' logic.
For the pallet-balances, I think transfer, transfer_keep_alive and transfer_all are enough.


Would it be possible to invert a tokamak to make a solar probe?

Question: I was just browsing random stuff on the internet, and I came across this article about the parker solar probe. The rhetoric was like "oh my, the sun is so hot but the probe won't melt.. etc. etc.", and I had a flash back to someone lecturing about tokamak fusion, so I thought the article was going to say something about magnetic fields, but it didn't. And as I was thinking about it I remembered the earths magnetic field, but that just channels the suns plasma to the poles? For a solar probe you'd need to channel the plasma from coming directly towards the object to going any other direction... it's like the opposite of confinement need for fusion, but I'm not smart enough to think about it that abstractly and say it's possible...
Answer: A magnetic shield of the sort you are proposing can indeed block plasma, and so can prevent damage due to direct exposure to the plasma. However, a magnetic shield cannot block electromagnetic radiation.  The following information is a bit off the point of your question, but it shows the importance of electromagnetic radiation to a solar probe:
The sun radiates a black-body spectrum of light at 5,778 Kelvin.  The temperature of Mercury's surface at an average of 36 million miles from the sun is ~800 Kelvin or about 500 C.  The Parker Solar Probe will approach to ~6.2 million miles from the sun's surface.
In this paper, it is shown that the equilibrium temperature of an object at distance $d$ from a star is

where $T_p$ is the temperature of the object, $T_O$ is the temperature of the star, $A$ is the albedo or fraction of light reflected by the object, $d$ is the distance between the star and the object, and $R_O$ is the radius of the star.  A decent mirror reflects about 99% of all light in the relevant spectral range.  So, the equilibrium temperature of the Parker Solar Probe, if it is completely covered with a silver mirror, should be roughly 400K or ~105C.  Hot enough to boil water. Give it an albedo of, say, 75% instead of 99%, and that temperature goes up to ~ 890K or roughly 600C, which is well above the melting point of most solders.  The maximum operating temperature of a SiC transistor is 225C.
So, designing a solar probe is a challenging task!
Answer: It's an interesting idea, and in principle, you might be able to confine the solar plasma away from such a probe using a strong enough magnetic field. However, in practice, all of the things that make building a tokamak so hard become much more difficult in this situation.
For one, even though we've become pretty good at confining plasma using magnetic fields over the years, anything we confine is still vulnerable to instabilities. The dynamics of confined plasma are very complicated, and border on chaotic in many situations; as such, none of the field configurations that we use at the moment completely eliminate the possibility of a chunk of plasma (all of it, in a lot of cases) escaping confinement and colliding with the wall after a short time. In a tokamak, this is usually fine, as the plasma is rarefied enough that the total momentum transfer causes no mechanical damage (though the high energy density does tend to cause some very interesting surface chemistry to happen). Within the solar atmosphere, this may not be the case, especially if the instability allows for a continuous flow of plasma in from the solar atmosphere, rather than a single burst of energy and momentum. So it's not likely that the solar atmosphere will be held off for long.
And that's assuming that you can even maintain a constant magnetic field to begin with. Tokamaks are built to be pulsed-power devices, where part of the confining field is created by ramping current up and down in a giant solenoid. So the field will only exist in pulses in the first place. Even if you don't build a tokamak and find a way to create a favorable steady field configuration, creating the field in the first place requires two things: lots of power, and an efficient way to get rid of heat. Neither of these are particularly plentiful in space. Even if you find a way to carry enough power with you to efficiently create the magnetic field, sustaining it without your coils melting (if they're conventional electromagnets) or quenching and even more rapidly melting (if they're superconducting electromagnets) or demagnetizing after they reach the Curie temperature (if they're permanent magnets) will be difficult, especially if you're surrounded by the hot plasma of the solar atmosphere.
Answer: The thing you are describing is called a magnetic sail.
https://en.wikipedia.org/wiki/Magnetic_sail
Comment: Uhhh.. no. It's just not.
Comment: Well your question is very unclear. I understood you to be asking how to channel a source of plasma (like the sun) for thrust. In your question the source of the plasma is explicitly not part of the probe. In your own words "For a solar probe you'd need to channel the plasma from coming directly towards the object to going any other direction"