What does the panel release button do on this hinge?

Question: I've just spent some time fighting with the hinge in the image below and finally worked out how it works. There is one part of it that's still a mystery and in the documentation it's called the Panel Release Button. It's the button marked with an R just above and to the right of the Horizontal Adjustment Screw. Anybody know what this does?
Answer: To directly answer the question: The panel release allows the hinge to be separated into two parts, so the door can be dismounted without removing the screws and later snapped back into position. (Essentially, it gives you the same capability that removing the hinge pin would in a more traditional design.)
Answer: This is an anderson series 400 hinge that limits or adjusts the swing opening on French type windows.  Here is a link to the Anderson service guide that explains the functions and how to use the adjustments.  http://www.andersenwindows.com/-/media/aw/files/technical-docs/service-guide/serviceguide-0005225.pdf


IE6 and SP2010 functionality

Question: If I run SP 2010 UI in MOSS 2007 compatibility mode by using UIVersion=3 do I still get all of the SP 2010 functionality eg enterprises wide taxonomy and metadata and FAST for SP 2010 and document and records management functionality ?
Answer: IE6 is not supported as an authoring browser in SP2010.
Read more on the support levels for browsers on TechNet
http://technet.microsoft.com/en-us/library/cc263526(office.14).aspx
Just saw Randy Drisgill did a nice post on this subject as well: http://blog.drisgill.com/2009/11/sp2010-branding-tip-5-handling.html
Comment: Hi Anders

Totally agree if you are using the SP 2010 UI (UIVersion=4) but as the UI is still MOSS 2007 UIVersion=3) and looks and feels like MOSS 2007 why should IE6 not be supported ?

Regards

Nigel
Comment: While I'm not 100% sure, i think the version only changes the general navigation and editing like the ribbon, while the HTML editor for example is the same across versions (i will check this when i get access to a box tomorrow). Hence support for level 3 browsers should not be expected.

IE6 and SP2010 functionality


Help me identify this animal from Bangladesh

Question: I have come across this animal in a facebook group. After one group member identified it as Asian palm civet, I looked at some google images, I am not convinced. Judging from google images, this animal doesn't look like any of the common civet species found in Bangladesh.
Location: Noakhali, Bangladesh
Answer: Looks like the Large Indian civet. Notice the size and the fur coloration pattern on the neck.
From wikipedia:

The large Indian civet ranges from Nepal, northeast India, Bhutan,
  Bangladesh to Myanmar, Thailand, the Malay peninsula and Singapore to
  Cambodia, Laos, Vietnam and China.[1]

Looks like it is found in eastern parts of Bangladesh including Noakhali district – the place where the picture was taken.
Answer: Is it a Small Indian Civet?

From Wikipedia: The small Indian civet has a rather coarse fur that is brownish grey to pale yellowish brown, with usually several longitudinal black or brown bands on the back and longitudinal rows of spots on the sides. Usually there are five or six distinct bands on the back and four or five rows of spots on each side. Some have indistinct lines and spots, with the dorsal bands wanting. Generally there are two dark stripes from behind the ear to the shoulders, and often a third in front, crossing the throat. Its underfur is brown or grey, often grey on the upper parts of the body and brown on the lower. The grey hairs on the upper parts are often tipped with black. The head is grey or brownish grey, the chin often brown. The ears are short and rounded with a dusky mark behind each ear, and one in front of each eye. The feet are brown or black. Its tail has alternating black and whitish rings, seven to nine of each colour. It is 21–23 in (53–58 cm) from head to body with a 15–17 in (38–43 cm) long tapering tail.
Comment: The fur pattern on the neck is entirely wrong, and the coloration doesn't match: the Small Indian Civet is two-colored (typically light and dark brown), while the mystery animal appears to be three-colored (black, white, and brown).


Unusual Flash IOError

Question: I stopped working on a technology I've been developing with Flash for three months. I went back to this project last night and it my Flash app is behaving unusually. URLLoader and Loader instances throw IOErrorEvents when loading from web but not local files. This is happening with all Flash applications on my computer. I have internet access and I can browse the web normally using any browser. I saved my application to use on my MacBook and it work fine. This issue isn't with my code but maybe Flash Player. I have the latest version on my Windows XP pc which is behaving strange. Thank you in advance. Also Flash seems to be working normally on websites meaning they seem to be able to contact their servers and what not. Thank you.
Answer: Go to http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html  and add your local folders
Comment: I don't know if this helped but the problem is gone. Thank you.

Unusual Flash IOError


Does model check data or presenter do it?

Question: I have question about MVP. If presenter sends request to model for data. Does model check these data or does presenter have to do it? For example: are data ok etc. Thank you for answers.
Answer: I think there are a couple approaches you can take to validate your data: Either the Domain objects or a Service.
You model is your domain. In domain driven development, your domain should know how to validate itself. So, you might have a standard Validate method on either class in the model. That can get a little tricky, though, if you need to make a database call to do the validation, although you could require the relevant data to be passed to your validation method, or provide a delegate to get the data if it's necessary.
Alternatively, you could put all the validation in the Service later, which your presenter would be calling to retrieve and to persist the model. This would result in the so-called antipattern "anemic domain". But, if that fits your application and architecture best, it might be the correct choice.
I would caution against having the presenter do it. That's not really it's job and it does not get reused like the model and service.


DB log message: login failed for user xxx

Question: Does anyone ever get "Login failed by user xxx" messages in their recent log entries?  I have been getting the same message over and over for the past several days, always from the same IP address and user trying to access node/add.  It's kind of freaking me out.  Anything to be done about it?
Answer: These are often spammers, but might also be malicious users who are trying to break into your site (for example, to use it to post malware, distribute files, or as an email relay). If your set of users is small and well known then you should only be worried about these messages if they are for actual accounts on your site - that would be an indication of a brute force attack.
If your site is Drupal 7 then you already have some built in protection against brute force.
Some modules that might be useful to improve the overall login security of your site.

http://drupal.org/project/user_restrictions
http://drupal.org/project/password_policy
http://drupal.org/project/mollom - configured to show a captcha on the login page
http://drupal.org/project/tfa
http://drupal.org/project/ga_login
http://groups.drupal.org/node/235938
Answer: That means some spam robots trying to access your add form. But since only logged in user can post content, this wont be a big problem. But make sure every permission is okay and also use captcha module to secure forms.
Also use strong passwords for all users
Comment: It happened to me also. I wonder how these spam bot reach my Drupal website...
Answer: You can also use Restrict IP module to restrict the IP from which the node/add was visited.
Here's an excerpt from module's project page:

... allows administrators to restrict access to the site to an administrator defined set of IP addresses. Anyone trying to access the site from an IP address not in the list of allowed IP addresses will be redirected to an access denied page with the message "Your address is not in the list of allowed IP addresses". No blocks will be rendered, and no javascript will be added to the page. This will happen for any and all pages these users try to access.
Comment: above module allows administrators to restrict access to the site to an administrator defined set of IP addresses ,not to block. To block an ip you can use core user setting page.


In the Intel 8080, where does the "Stack" start?

Question: Having trouble trying to search for this in the data sheet, just have seen how big it is and how it handles stack pointers. Would anyone mind helping me out where the "Stack" start on an Intel 8080?
Comment: Th stack can be anywhere in the 64 KB address space and grow to any amount of the 64 KB address space. Software first loads the stack pointer with an initial address of the programmer's choice.
Comment: The 8080 stack doesn't remain in a confined space like the 6502 stack. It can potentially romp all across memory, causing a condition which StackExchange's original site was named after. In fact, that's one lazy way to do a memory clear, set the SP to the space, and "push like hell"...
Comment: @JBentley [To my endless frustration](https://retrocomputing.meta.stackexchange.com/q/690/278), we do things differently here at Retrocomputing.
Comment: Some demo / game programmers of the era even temporarily moved the stack pointer to the video RAM address space to speed up blitting (one could transfer data in 16-bit words by hard-coding source addresses and using an unrolled loop like LHLD  followed by PUSH H)
Answer: The stack starts wherever you as the programmer choose to initialize it to. Note that the stack grows downwards (i.e. towards lower memory addresses) so you would normally initialize the stack pointer to point to the top of a free area of RAM.
Comment: Short and to the point.
Comment: @another-dave Thanks. It sounds as though OP has access to low-level documentation in the data sheet but, as is too often the case, it lacks context on how you might use a feature.
Comment: Normally you would initialise it to point to an address _one above_ the area where you want the stack to start. The current value of the stack pointer points to the most recent LSB (of a register pair) pushed on the stack and the next PSH will put the MSB in (SP-1) and the LSB in (SP-2).
Answer:
Would anyone mind helping me out where the "Stack" start on an Intel 8080?

After Reset content of the stackpointer is undefined.
Keep in mind, these are early 8 bit machines. There is no huge hardware and microcode that puts every part into a well defined state. For the 8080 the only thing guaranteed is that the PC will be reset to zero and execution starts from there (*1). Everything else has to be initialized by software (Boot code).

*1 - Reset is effectively just a clear input for the PC.
Comment: @supercat That's why the specifier 'effectively' has been used. After all, this is not supposed to be a course in CPU design, but helping the OP on a rather high abstraction leven, isn't it?
Comment: Reset isn't just a clear input for the PC.  It also needs to block execution of any instruction in progress.  Otherwise, if e.g. RESET were asserted between the fetch of an "STA" instruction and the fetch of its operands, and the instruction at address 0000 was a JMP [ocode 0C3h], the STA instruction would write to address 0C3C3h.
Answer: Stack resides where the programmer tells.
LXI SP,0FFFFh
or
LXI H,0FFFFh
SPHL

are the most commonly used construction to tell CPU where the stack should reside. So the main program has to set SP itself, and the best practise is to do it at the same beginning of execution.
The typical sequence is:
ORG 0
DI
LXI SP, STACK

The DI instruction disables interrupt, which is effectively the same as CALL, i.e. it writes the return address on the stack. So DI is often the very first instruction, just to be sure that interrupt does not execute prior the stack pointer is valid.
Comment: Note that this sets the top of the stack to $FFFE: the current value of the stack pointer points to the most recent LSB (of a register pair) pushed on the stack and the next `PSH` will put the MSB in (SP-1) and the LSB in (SP-2). If you wanted the stack to start at the top of memory, you need to load it with $0000.
Answer: An example: the source code for a simple 8080 Monitor is here (PDF format, code starts on page 8 of 41).
After several repeats of MVI A, ... / OUT ... to set up hardware, we hit the magic line:
LXI SP,STACK        ; SETUP THE STACK AT 0EFF0H

So the user has to initialize the stack in the right place, as Graham Nye said.
The comment in the very next line explains why this is so important:
                    ; Have a Stack, so we can use CALL

CALL and PUSH are effectively unavailable to the user until SP is set.


WM_POINTER and High DPI settings

Question: I've been working for a while with the Windows 8 Touch API (WM_POINTERDOWN / WM_POINTERUPDATE / WM_POINTERUP) on a desktop touch screen. Then I tried my test program on a Windows 8 tablet and found out that my application was not able to detect accurately where the user was touching the screen.
Using the mouse on the other hand, worked fine: I got the correct coordinates. Since I have the EnableMouseInPointer(TRUE) mode active it means that the same code is being used to process the mouse events and the touch events, which at least means that my code is somewhat working correctly.
What I found out, is that the tablets have the High DPI mode enabled to make it possible for the users to touch what would be otherwise very small on the screen. When I changed the DPI on the tablet to remove the scaling my application worked fine, when I upped the DPI on my desktop screen things got wrong. (And yes, my application is High DPI Aware)
The annoying thing is that apparently the coordinates I receive from the touch interface are not the same depending of the device used:

if the user used the mouse, the coordinates are scaled to take into consideration the High DPI scaling.
if the user used the touch screen, the coordinates are not scaled and are in physical pixels

So, what would be the correct way to handle that?
An obvious hack would be to check the pointerType member of the POINTER_INFO struct, and apply some rescaling depending of the type (PT_TOUCH or PT_MOUSE), but as far as I could see it is not documented anywhere, and for example I have no idea if a PT_PEN should be rescaled or not.
That does not seem very elegant and future proof.
Any suggestion on how to do that cleanly would be welcome.
Answer: If you have processes that are running at different DPI awareness levels (private, inter-process communications are not virtualized) you can run "SetParent" across processes so that the DPI awareness level will be inherited from the new parent. http://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx#input_issues

WM_POINTER and High DPI settings


How can i reject connection from LAN and WAN to some ports?

Question: Scanning with nmap, I discovered that there are 3 open ports on my server. I want to deny any access to these ports from any machine, regardless of whether it is on the same LAN or via WAN. How do I write an iptables rule for this?
Comment: You should indeed block them using iptables if other hosts should not have access - but you also need to work out why they are open in the first place and either remove redundant servers (i.e. daemons) or configure them so they don't listen on interfaces they shouldn't.
Comment: What type of server is it? More details required about the operating system of the host with the open ports and any networking devices you have otherwise you will end up with a pretty generic answer :)
Comment: I think it doesnt matter what type and what os is it! I just want generic answer :)
Comment: Well if its `iptables`, then Linux / IPtables, no?
Comment: @sophist it matters a lot what type of system it is because the answer will vary greatly between Windows, Linux, BSD, etc.
Comment: yes it's linux.. How to restrict connexion to those ports via lan and wan ? (i don't want any other machine except mine have access to those ports) Do u have an idea ? :)
Answer: If you want to deny access to all the machines ("any machine from LAN and WAN") it is better to either stop those services or bind them to the localhost. This way there will be no chance of messing up iptable rules.
Still, you can use IPTABLES to block access to specific ports as well.
iptables -A INPUT -p tcp --destination-port <port of the service you want to block> -j DROP

Repeat the above rule for all the ports you want to block access to.
Answer: To close an individual port, you can do the following.
iptables -A INPUT ! -i lo -p tcp --dport 80 -j REJECT

Adjust tcp to be udp if that's the case, change 80 to the appropriate port. That will reject anything that didn't come from the local loopback interface.
See also Reject IP packets with an ICMP error, or just drop them?
Note that this solves the individual problem, but in a general sense you should explicitly allow which ports you wish to have open and then deny the rest. Particularly since you probably still want to access these ports from your the local machine, that adds a lot more convenience in rule writing as well.
Comment: there are web services opening those ports..I think that this rule "iptables -A INPUT -p tcp --dport 80 -j REJECT" will deny any input, isn't it ?
Comment: @sophist Can you rewrite that? I can't understand what you tried to say.
Comment: In fact there are 3 web services installed in my machine (= 3 open ports).. I have to deny any other machine connecting with the same lan and wan from using those ports..

Is the rule u mentionned realize that ?
Comment: No, it does not. You'll need to set a rule for each port.
Answer: Are you trying to block all open ports on a specific interface? If so, you can use the following command
iptables -A INPUT -i <interfaceName> -j DROP

for example:
iptables -A INPUT -i eth0 -j DROP

where eth0 is usually for LAN interface
and
iptables -A INPUT -i eth1 -j DROP

usually for WAN
Comment: How can i know the interface name (lan and wan) ?
Comment: use the `ifconfig -a`. The last line for the interface description will contain `Base address:0xe800` where 0xe800 stands for LAN interface and `0x2000` for WAN. There is a file on linux system which explains all these, I don't really remember where exactly it is situated on the system. Usually by default eth0 is for LAN and eth1 i for WAN. I hope I answered your question.


How long will spaghetti and meat sauce last in the refrigerator?

Question: Today, I accidentally forgot that I had brought my lunch in - leftover spaghetti noodles and a meat sauce (sauce from a jar, meat cooked fresh and added to the sauce) that we had last night. They are in separate containers.
I'm going on an anniversary trip with my wife this weekend, so this lunch will be left in the office fridge for the next three days - one of which is a work day where people will be putting things in and taking things out of the fridge, but I won't be there.
Will my spaghetti and meat sauce lunch, that was cooked on Thursday, put in the company fridge Friday (today), and will be left in there until Tuesday (four days) still be safe to eat?  Or should I toss it when I get back?
Answer: Sauce = 5 days
Meat (Left Overs) = 3 or 4 days
http://www.cbsnews.com/news/how-long-foods-stay-fresh-in-fridge/


How to add/remove edge loops in Geometry Nodes?

Question: There is no loop cut node in Geometry Nodes. Is there a workaround to add loop cuts/edge loops in GN?
Comment: One possibility https://youtu.be/q2JqOVp-mEo
Answer: Actually, you can do it with limitations. Add Merge by distance node to the end if you want to merge vertices.
Answer:
Note: This answer may no longer be up-to-date for Blender 4.0+. Even if there is still no satisfactory/simple solution for this problem, there may be (computationally expensive or useful for some use cases) alternatives.

This time, unfortunately, the answer is: No, it does not work.
With Geometry Nodes you can only subdivide an existing mesh with the nodes Subdivide Mesh and Subdivision Surface. However, neither of these nodes provide any way to specifically subdivide or split in certain areas.
The only other possibility would be to build two (or more) completely new meshes, but this would not be procedurally feasible at the moment due to the multitude of possibilities.
Therefore, this question has to be answered unsatisfactorily, and I'm afraid this won't change in the future.
Answer: here is another approach and it does work on 4.0.2
Comment: Could you please explain a little about what exactly you are doing here? Because without an explanation and without a blend file, I'm afraid this answer is not very helpful for others. Thank you for your understanding!
Comment: right, so this GN setup does loopcuts on 3 axis, you can add multiple nodes destributed on even distance with control over starting point, or you can add single loopcut and control starting point and axis. This GN also quite heavy if you wanna chop cube in hundreds loopcuts, however at the end this does the job.


Views fields settings style settings no options avaible

Question: In views, after I choose 'Fields' as format, I want to add HTML to the title field.
The way you would normally do this is is expand the "Style settings" fieldset, then check "Customize field HTML". Only on the Drupal site in question there is nothing that expands under the checked item. I checked permissions and flushed caches but other than that I don't know how I woul be able to look at this. Could this be a javascript issue? Also checked console for that, but no errors there.
Answer: I had the same problem and found that it is caused by using jQuery 1.8, so with an older jQuery versions it should works just fine.
Comment: Fortunately, jQuery Update allows for a separate jQuery version on admin pages, so I was still able to have the version I needed for the public part of the site, while using your solution to fix the Views functionality.


@future method vs Async callout

Question: Some days ago I imported a WSDL into Salesforce and (different of some years ago) it created an Async class (and of course the sync class). So I decided to search on Google how to use this Async class. I've found some articles about that and I implemented this solution for test... For my surprise, the Async class can't be called inside a trigger. Now I'm asking myself and now asking you all: What's difference between of using this Async class and use @future method (and use Sync class)?
Answer: The Async class is intended to be used in a continuation. See Make Long-Running Callouts from a Visualforce Page

Basically, a continuation will provide a callback mechanism so that when the async callout is complete you can bring the result back to the client.
A @future method won't provide that callback mechanism. It's more fire and forget.
Comment: But on trigger context (that you can't wait for an awnser), are @future method and Async class equals?
Comment: You can *only*[*](https://twitter.com/FishOfPrey/status/644671324556795904?ref_src=twsrc%5Etfw) use the async Continuation classes from a Visualforce context. They don't work anywhere else. Plus a trigger isn't going to wait around for the callback to occur before it can finish. Triggers need to be as fast as possible.

@future method vs Async callout


Allegro PCB design: How to set referenced center during Footprint making

Question: I have designed the Pads from Orcad Pad designer. Now I would like to make footprint of my IC but to design that i need a reference center point so that i can decide location of pins. Please tell if any other alternative is available to do so.

Please help in this regard.
Comment: The center point is just the handle by which you will place the IC, so it mainly affects editing. Typically this would be the exact center of the IC, so if you rotate the IC on the board, it doesn't shift around.
Answer: Finally I got the solution. Actually the origin point was in mid of grid but it was in black colour so it was not visible. I go thorough Change colour option then on Drawing tab i changed the origin colour from the black to red. Now it is visible.


how to update AndroidManifest.XML in resources.arsc using the aapt tool for Android using terminal

Question: I need to update my package id used in the AndroidManifest.XML that is compiled into a resources.arsc file for my Android application (.apk) without decompiling the resources.arsc.
The android aapt tool includes the option to update (-u) as well as rename the package id in the manifest.xml and the rest of the project (--rename-manifest-package && --rename-intrumentation-target-package).
Being able to update or output the resources.arsc without first decompiling is very important. I have a replacement AndroidManifest.XML with new id ready to go as well. I have provided the terminal "usage" doc below for reference. Im not sure if im misunderstanding the docs or if its just a lack of understanding the required syntax to be used in the terminal (tried both DOS and UNIX).
Thanks in advance!
Usage:
aapt l[ist] [-v] [-a] file.{zip,jar,apk}
List contents of Zip-compatible archive.

aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]
badging          Print the label and icon for the app declared in APK.
permissions      Print the permissions from the APK.
resources        Print the resource table from the APK.
configurations   Print the configurations in the APK.
xmltree          Print the compiled xmls in the given assets.
xmlstrings       Print the strings of the given compiled xml assets.

aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M AndroidManifest.xml] \
    [-0 extension [-0 extension ...]] [-g tolerance] [-j jarfile] \
    [--min-sdk-version VAL] [--target-sdk-version VAL] \
    [--app-version VAL] [--app-version-name TEXT] [--custom-package VAL] \
    [--rename-manifest-package PACKAGE] \
    [--rename-instrumentation-target-package PACKAGE] \
    [--utf16] [--auto-add-overlay] \
    [-I base-package [-I base-package ...]] \
    [-A asset-source-dir]  [-G class-list-file] [-P public-definitions-file] \
    [-S resource-sources [-S resource-sources ...]]         [-F apk-file] [-J R-file-dir] \
    [raw-files-dir [raw-files-dir] ...]

Package the android resources.  It will read assets and resources that are
supplied with the -M -A -S or raw-files-dir arguments.  The -J -P -F and -R
options control which files are output.

aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
Delete specified files from Zip-compatible archive.

aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
Add specified files to Zip-compatible archive.

aapt v[ersion]
Print program version.

Modifiers:
-a  print Android-specific data (resources, manifest) when listing
-c  specify which configurations to include.  The default is all
   configurations.  The value of the parameter should be a comma
   separated list of configuration values.  Locales should be specified
   as either a language or language-region pair.  Some examples:
        en
        port,en
        port,land,en_US
   If you put the special locale, zz_ZZ on the list, it will perform
   pseudolocalization on the default locale, modifying all of the
   strings so you can look for strings that missed the
   internationalization process.  For example:
        port,land,zz_ZZ
-d  one or more device assets to include, separated by commas
-f  force overwrite of existing files
-g  specify a pixel tolerance to force images to grayscale, default 0
-j  specify a jar or zip file containing classes to include
-k  junk path of file(s) added
-m  make package directories under location specified by -J
-u  update existing packages (add new, replace older, remove deleted files)
-v  verbose output
-x  create extending (non-application) resource IDs
-z  require localization of resource attributes marked with
   localization="suggested"
-A  additional directory in which to find raw asset files
-G  A file to output proguard options into.
-F  specify the apk file to output
-I  add an existing package to base include set
-J  specify where to output R.java resource constant definitions
-M  specify full path to AndroidManifest.xml to include in zip
-P  specify where to output public resource definitions
-S  directory in which to find resources.  Multiple directories will be scanned
   and the first match found (left to right) will take precedence.
-0  specifies an additional extension for which such files will not
   be stored compressed in the .apk.  An empty string means to not
   compress any files at all.
--min-sdk-version
   inserts android:minSdkVersion in to manifest.  If the version is 7 or
   higher, the default encoding for resources will be in UTF-8.
--target-sdk-version
   inserts android:targetSdkVersion in to manifest.
--values
   when used with "dump resources" also includes resource values.
--version-code
   inserts android:versionCode in to manifest.
--version-name
   inserts android:versionName in to manifest.
--custom-package
   generates R.java into a different package.
--auto-add-overlay
   Automatically add resources that are only in overlays.
--rename-manifest-package
   Rewrite the manifest so that its package name is the package name
   given here.  Relative class names (for example .Foo) will be
   changed to absolute names with the old package so that the code
   does not need to change.
--rename-instrumentation-target-package
   Rewrite the manifest so that all of its instrumentation
   components target the given package.  Useful when used in
   conjunction with --rename-manifest-package to fix tests against
   a package that has been renamed.
--utf16
   changes default encoding for resources to UTF-16.  Only useful when API
   level is set to 7 or higher where the default encoding is UTF-8.

Answer: Did you try --rename-manifest-package . it wont affect the generated R file as well
However If you load some resource ids at runtime, you may need to update your code.
for eg. (for this code has to be changed)
String packageName = context.getPackageName();
Resources res = context.getResources();
int id = res.getIdentifier("my_drawable", "drawable", packageName);

you can go to this link for more info.
Comment: The question is over 2 years old. So I'm not planning on testing this functionality unfortunately for others to consume, But I must say your username made me laugh.


How to protect Server running on Windows 10 with Node Ngrok against attackers?

Question: I'm running https://ngrok.com/ on Windows 10 pro with a custom app made on Node server running locally (can't be Linux) for a test suite that uses both web and desktop integrated. So I'm basically hosting a server on the machine for another internal machine to access via the internet (there is no other way to solve the problem). Not considering securing the app itself but in case someone discovers the IP of the machine what can I do to secure it? The machine cannot use VPN, it's not connected to a domain but just plugged into ethernet. Only minimum software is running and everything else was removed. Everything is up to date and Bitdefender is installed.
Answer:
So I'm basically hosting a server on the machine for another internal machine to access via the internet ....

In this case protect the access with authentication, so that only this other machine can access your server. When using the authentication build into ngrok only authenticated requests will reach your server which should greatly limit the attack surface and should allow access only for trusted peers.
Comment: Yes there is authentication. Yes I will do whitelisting. The machine is the server. I will try to protect the app but what if someone tries a cold attack directly in windows?
Comment: @DanielVianna: I don't know what you mean with "cold attack". But in order to attack Windows the attacker must reach your system first, which means that the attacker must be a user successfully authenticated by ngrok. And the attacker must then exploit a bug in your application in order to execute code on the system.  If you want limit the risks associated with this don't run the application on plain windows but inside some sandbox, VM ... and/or isolate your server from other systems in the network with firewalls etc so that an attacker cannot attack other systems there.


How exactly does mitotic recombination help repair damaged DNA?

Question: I understand the utility in crossovers during meiosis, but how exactly is mitotic recombination useful for dealing with DNA damage? If one sister chromatid is damaged, the other can supply a functional replacement for the defect part, sure, but then the donor chromatid will lack that section. Isn't that a zero-sum game? What am I missing?
Answer: Note: the technical term is homologous recombination (as DNA repair is actually its primary function), and this answer focusses on lesions affecting both strands at approximately the same level (as a lesion affecting only one strand at a particular location can easily be repaired by using the clean strand as a template), such as symmetrical double-strand breaks (where both strands of the double helix are severed at the same level; commonly caused by [and responsible for the main lethal effects of] overexposure to ionising radiation; used as the example type of damage for the purposes of this answer).
Short answer
The homologous DNA serves as a template for synthesis of new DNA to repair the damaged area.
Long answer (paraphrased from here)
If both strands of a chromosome are severed at or near the same location, special enzymes unwind the broken ends, and other enzymes then clip off a length of one of the strands from each end (the strand that gets clipped off is always the one with the exposed 5-prime end, in case you were wondering), leaving an exposed single-stranded flap on each side of the break.
At this point, other special proteins grab onto these flaps, and take them looking for an intact homologous piece of DNA (that's why it's called homologous recombination), which can be either a sister chromatid (which is guaranteed to be either identical or very nearly so, and is, thus, the preferred solution when possible) or a homologous chromosome (which is always available, except for haploid cells [such as human gametes], but is virtually guaranteed to be not-quite-identical, and, thus, is a less-optimal solution).
With the help of the aforementioned special proteins, one of the flaps then butts into the homologous double helix, base-pairs with the strand it's complementary to (forming a structure known as a Holliday junction [well, technically, seven-eighths of a Holliday junction, as one of the junction's four arms has only a single strand, rather than two]), and kicks the other strand out of formation.  The displaced strand forms a single-stranded loop hanging off to the side (known, unsurprisingly, as a displacement loop, or D-loop), while a DNA polymerase latches onto the bare 3-prime end of the invading strand and lengthens it, using the homologous DNA as a template.1
At this point, things can go in either one of two ways:

In the simpler pathway (the synthesis-dependent strand annealing, or SDSA, pathway), the polymerase simply continues to lengthen the invading strand until enough DNA has been added to the end to bridge the gap between the two broken ends and base-pair securely to the flap on the other end; at this point, the invading strand backs out, allowing the invaded DNA to reassume its double-helical dignity, and the newly-lengthened flap grabs onto the complementary flap on the other broken end.  More DNA polymerases fill the remaining gaps, and a ligase seals the helix back up.  The SDSA pathway is the major homologous-recombination pathway for cells not planning on undergoing meiosis.
In the more complicated double-strand-break repair (DSBR) pathway, the exposed flap on the other broken end also gets in on the action, base-pairing to the exposed D-loop and likewise being lengthened by a DNA polymerase.  When enough new DNA has been synthesised to completely fill the single-stranded gaps, the exposed ends are joined together by ligases, forming a structure with no exposed ends and two complete Holliday junctions.  To turn this back into a pair of separate bog-standard double helices, two of the four strands in each Holliday junction are cut by endonucleases, causing the two DNAs to separate.  (There are rules as to which two strands are cut; either both of the two strands that cross over in a given Holliday junction, or else both of the two strands that don't cross over in said junction, but never one crossing and one non-crossing strand [as this would merely create a new double-strand break at the location of the junction].)  Depending on how the Holliday junctions are severed, the portions of the two chrom[atid/osome]s distal to the original break may or may not be exchanged between the chrom[atid/osome]s; if both junctions are severed on their crossing strands, or both on their non-crossing strands, this distal DNA will not be exchanged, while, if one junction is cut on its crossing strands and the other on its non-crossing strands, said DNA will be exchanged.  Due to its possibilities for swapping bits of genetic material, this is the preferred pathway for cells that are planning on undergoing meiosis (although it also occurs to some degree even in somatic cells).

Here's an image to illustrate the process:

(Image by Emw at Wikimedia Commons.  Blame them for the typo in "Strand invasion", not me.)

1: This is why the 5-prime strand got pruned back, and not the 3-prime strand; all DNA polymerases known to science lengthen DNA strands in exclusively the 5-prime→3-prime direction, and can only add nucleotides to exposed 3-prime ends (exposed 5-prime ends need not apply).


Moveit planning scene collision padding

Question:
Moveit's planning scene has collision checking functions, some with and some without padding.  Is the padding configurable and how big is it by default?

Originally posted by BrettHemes on ROS Answers with karma: 525 on 2017-05-13
Post score: 1
Answer:
For PlanningScenes maintained by the PlanningSceneMonitor, the parameters can be configured by ROS parameters.
The code that parses the parameters can be found here: https://github.com/ros-planning/moveit/blob/kinetic-devel/moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp#L1412
However, greping further through the code suggests that default_object_padd_ and default_attached_padd_ are not implemented though. They can be queried through getDefault*Padding, but are never used anywhere.
So you can set the default robot padding, scale, and their corresponding link versions through the parameters and these should be supported.
To set the parameters for a scene that is not maintained by the PSM, you have to set them for its RobotState directly:  https://github.com/ros-planning/moveit/blob/kinetic-devel/moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp#L198
By default the padding seems to be 0.0 everywhere.

Originally posted by v4hn with karma: 2950 on 2017-05-13
This answer was ACCEPTED on the original site
Post score: 2

Original comments
Comment by BrettHemes on 2017-05-16:
Thanks v4hn!
Comment by johnyang on 2017-09-11:
I'm still not 100% sure what is the best way to add this parameters.
I created a paddings.yaml file and loaded it through rosparam in my launch file, and make sure it's sitting in the correct namespace like //robot_description_planning/default_attached_padding ?
Answer:
Since this is the top result on Google for "moveit default_robot_padding", I though having a working example might be good. Here's how I have set the default_robot_padding parameter:
Add a file padding.yaml, for example in <robot>_moveit_config/config, with the following content
# parameters for padded robot (not used for self collision checks)
default_robot_padding: 0.05
default_robot_scale: 1.0

and load the parameters from padding.yaml into the correct namespace in a launch file somewhere, for example in planning_context.launch

<group ns="move_group">
  <group ns="$(arg robot_description)_planning">
    <rosparam command="load" file="$(find <robot>_moveit_config)/config/padding.yaml" />
  </group>
</group>

Originally posted by FSund with karma: 33 on 2021-03-25
This answer was NOT ACCEPTED on the original site
Post score: 2

Original comments
Comment by tgaspar on 2021-05-25:
Thank you for providing this example. However, we could not get it to work the way you describe it. We made sure that the padding settings are indeed in the correct namespace and that they get loaded. But we do not see the desired behavior, i.e. detection collisions at the distance of the padding.
Would you be prepared to share something like an example how you tested and made sure that your settings work?
In our scenario, we are interested to use padding around either the robot or scene to avoid collisions that could arise due to discrepancies between the real system and the model of the cell.
Comment by FSund on 2021-05-25:
What I did was to add a collision object to my scene (a box or something else), and tried moving the robot near the object. When I got around 5 cm from the box (the size of the padding I used), the part of the robot close to the box was marked in red/in collision. Make sure your collision tags are set up properly as well as the visual tags.
Comment by tgaspar on 2021-05-25:
Thanks! I followed the steps you described here and was finally able to see the padding parameters having some effect!
Now I have to figure out how to achieve the same behavior between my robot arm and the structure of the robot cell as they are part of the same URDF. Any pointers in or advice in this regard?
p.s. if anyone ever finds themselves in the similar situation and is looking for answers I tried the following parameters separately and they all worked: default_robot_padding, default_robot_scale, default_robot_link_padding: {}.
Comment by FSund on 2021-05-25:
No, sorry. We're having the same problem here, trying to tackle the posibility of unreliable motor positions. If the robot cell is static (as in, not moving) you could load it separately by publishing a model on the /collision_object topic instead of loading it as part of the robot. Or importing it via PlanningSceneInterface (Python) add_object or add_mesh. http://docs.ros.org/en/noetic/api/moveit_commander/html/classmoveit__commander_1_1planning__scene__interface_1_1PlanningSceneInterface.html.

Moveit planning scene collision padding


Do the EDO and TET acronyms mean the same thing?

Question: In the context of dividing an octave into n intervals, I understand n EDO to mean n Equal Divisions per Octave and n TET to mean n Tones Equal Temperament. Do the EDO and TET acronyms mean the same thing or is there some subtle difference?
Comment: I'm a lot more used to seeing 12TET than 12EDO, so maybe there is some difference in connotations.
Comment: I just read that the EDO acronym makes it clear that the interval being subdivided is an Octave. The TET acronym doesn't stipulate that an Octave is the large interval - so it could be an interval other than an octave. But it seems that stating TET without further qualification implies Octave as the large interval.
Answer: In addition to TET referring to temperament, which does not make sense for e.g. 11EDO, it also differs in that it does not specify what range these notes divide equally, whereas EDO explicitly states that it's the octave. Now, the vast majority of commonly used tuning systems do use the octave as their foundation, but not all, notable counterexamples being the (tempered) Bohlen-Pierce scale (13EDT) and Wendy Carlos' α (9EDF), β (11EDF) and γ (20EDF) scales. The latter can't really be considered temperaments at all, but the Bohlen-Pierce scale absolutely is a temperament: in much the same way 12EDO tempers the Ptolemaic system of just intonation (5-limit with octave equivalency, i.e. the set of intervals in the range [1,2[ which can be constructed as integral frequency ratios using only the numbers 2, 3 and 5), Bohlen-Pierce tempers the odd 7-limit with tritave equivalency (the set of intervals in the range [1,3[ which can be constructed using only the numbers 3, 5 and 7). So, one might well interpret "13TET" as Bohlen-Pierce, which is very different from 13EDO.
I personally think that non-octave based scales are actually more promising for making new microtonal music that's practical to play and somewhat easy to grasp from listening, in particular if you go to the 11-or even 13-limit, which gets extremely difficult (see Ben Johnston) to do with all the octave-derived pitches available (giving the factors {2,3,4,5,6,7,8,9,10,11}, but much more tractable when the ratio 2 is out and you only have {3,5,7,9,11}. Bohlen-Pierce itself is in fact arguably a bit too tidy, making it hard to build up any sort of direction-defining dissonance.
Comment: Well, 11EDO probably could be a temperament for some obscure just-intonation system using only high number ration, but this would be really far-fetched and probably not work in an actually audible way. As Some_Guy said, if you use 11EDO you would probably not attempt to temper any JI intervals but work atonally. — [1,2[ is not musical notation at all, I use this for the half-open interval {x ∈ ℝ | x≥1 ∧ x<2}. Many people would write this as [1,2), but I don't like that notation because it gets ambiguous for intervals that are open at both sides – "is (1,2) supposed to be a tuple or interval?".
Comment: You say 11EDO can't be a temperament. Is this because none of the scale intervals is just, i.e. Is related to the root note by a ratio of small whole numbers? Also would you explain the [1,2[  notation, which I haven't seen before?
Comment: Thanks for the clarification. In the explanation of 12EDO, is the word 'the' used in its mathematical uniqueness sense? When you say *the* set of intervals, does that imply there exists only *one* set, or are there multiple possible sets of intervals and we choose 12 of them?
Comment: Well, that's not really mathematically rigorous. The integral ratios using only the numbers 2, 3 and 5 (or _only_ 2 and 3) are actually dense on the real line if you allow any combination of these factors. In practice, you'll only use particularly simple combinations. There are some ways to quantify this rigorously without arbitrary "cutoff" choices, but [they're a bit to mathematically involved](http://xenharmonic.wikispaces.com/The+Riemann+Zeta+Function+and+Tuning) to bring them in here.
Comment: @leftaroundabout "We are sorry, but the site you are looking for no longer exists."
Answer: In practice, they are the same thing, but they show a slight theoretical distinction in their "purpose", which is outlined quite well here http://xenharmonic.wikispaces.com/EDO+vs+ET
EDO indicates that an octave is being subdivded, and nothing more.
A temperament is essentially an attempt to "square the circle", and get intervals that transpose well but also provide a reasonably effective approximation of "pure" (or "just") intervals (whole number frequency ratios).  It is an exercise in compromise.  Some (most?) temperaments rely on other methods than subdividing the octave equally: so you can have a temperament that is not equal (like meantone temperaments for example), and you could also have an equal division of the octave which doesn't really approximate any pure intervals.  In fact, more of them don't.
In that sense, you could argue that, say, while 12TET/12EDO, 19TET/19EDO, 31TET/31EDO etc. are exactly identical, 11TET doesn't really exist, as 11EDO isn't really a "temperament" at all; it doesn't make any attempt to be an approximation to natural whole number frequency ratios.
That being said, if you say 11TET, it's never going to cause confusion, but 11EDO is more "technically correct".
Comment: And don't forget 10TET, as in that Mellertion!
Comment: @Tim  Mad... I just assumed it was a typo and left that question alone!  Thanks for drawing it to my attention :D
Answer: The main difference between an EDO and an ET is whether you declare it to represent a JI system well. For example, you could call 9edo an ET because it maps nicely to 7-limit intervals.
Answer: In addition to the points already made, there is the issue of the word "tone."  We already have this problem with twelve-tone equal temperament because in most contexts the twelve equal divisions of the octave are called semitones, not tones.  In fifty-three-tone equal temperament, at least when it's used to approximate just intonation of traditional harmony in traditional staff notation, a semitone can be anywhere from three to six of these divisions and a tone can be eight or nine of them.  It's confusing to call the divisions "tones" in this context.
By the way, the fact that "n-tone equal temperament" is properly written with a hyphen and "n divisions of the octave" is not explains why (e.g.) 31-TET should be written with a hyphen but 31 EDO is not.
Comment: I find it helpful to think that in this context "tone" means a note/pitch, rather than an interval.


What, if anything, can be done with intelligent cross-aligned artifacts?

Question: My neutral caveman found a Mitre of Holiness and an Orb of Detection in a bones pile.  I hate leaving good items, esp. artifacts, just laying around. Aside from burying them, or letting a pet have them, is there anything I can do with them?  Helm of Opposite Alignment excluded--can't wear both helms and already have Orb of Detection (as well as +18 bought protection).  I do have wand of Polymorph if they can polypile.
Answer:
If you've not yet identified a helm of brilliance yet, take this opportunity to Name it from the floor.
About your polypile idea:  While the Book, Bell, Candle, and Amulet of Yendor, can't be polypiled.  All other artifacts have (only?) a 95% chance of resisting each polymorph attempt.  Good luck.
Alternatively, spare Quest Artifacts might make fine bait for Rodney's Covetous attack, but I'm not sure I'd carry around another heavy crystal ball for such a small benefit.

Personally, I'm not sure I'd be too concerned about an inability to wear the Mitre of Holiness.

You probably already have intrinsic Fire Resistance, as it's not tough to get.
The 1/2 damage from undead & demons is only available to Priests anyway.
As the game's 2nd worst spell caster, a caveman would probably need a robe more than a helm of brilliance to become a decent caster.  In any case you can still use a normal helm of brilliance if you really want to go that route, and Rodney won't be undressing you in combat.
Instant 1/2 Mana recovery on Invocation:  How much mana is your caveman going to be spending anyway?
If you need the +1 MC, you can be get that from a ring (or better, cloak) of protection (that Rodney won't steal).

Let's be honest, for a caveman, the +1 MC is probably the most compelling aspect of that artifact.  Given your high intrinsic protection, a +0 ring of protection should do the job without adding to the rate at which you burn nutrition.
Another fine choice of headgear for a melee character that just might want to cast some spells is the Elven Helm.  No spell casting penalty and can be enchanted for better protection than a helm of brilliance.


Are contours allowed to contain branch points / branch cuts on the contour (not inside)

Question: I just wanted to verify something, since I saw some notes online that confused me. They were doing some contour integral and $0$ was the only branch point of the function, and they chose the branch cut connecting $0$ to ${+\infty}$ on the real axis. The contour they chose was a semi-circular contour. The part that confused me, was that at $0$ rather than just "go through" $0$ - they made some small $\epsilon$ semi-circle around $0$, but then allowed themselves to integrate along the branch cut. I thought that as long as the function is analytic at $0$ (which it was) - it's fine to integrate over a contour containing branch points/cuts on the contour? So long as you don't actually "cross" that branch cut or encircle any problematic branch points. Am I correct? Or is there a valid reason they did this? Thank you!
Answer: One might say you shouldn't integrate along a branch cut since (depending on exactly how things are defined) the value of the function on the branch cut is ambiguous (it's one thing on one side of the cut, another thing on the other).  So integrate on a path that's very close to the branch cut (and on the side you want), and take the limit as your path approaches the branch cut.  The result should be the same as integrating along the branch cut (using the values that come from the side you want).
As for a path that goes through a branch point, as long as the function has a finite limit as you approach the branch point, there should be no problem.  Again you could avoid the branch point by taking a small detour around it, but in the limit as the size of the detour goes to $0$ you will get the same result.
Comment: I see that makes sense to me. So integrating along a branch cut isn't a problem, but because of ambiguity in which "side" you are talking about it helps to instead take a contour "hovering" just above or below it and then take a limit? And with the branch point part - with the whole "detour" part, this is exactly what I was thinking - as long as it's nicely behaved at the branch point, any detour will give $0$ in the limit so I thought it seemed pointless. Thank you so much for taking the time to respond :)


What is this plant with leaves like a cattail but with triangular waxy pods?

Question: I found this plant near a river in Wisconsin. The leaves look like a cattail but this thing grows pods! The pods are triangular and are waxy and smooth at the same time. The leaves are very much like a cattail.
.
Answer: It's a little hard for me to tell from the photo, but I suspect that you have a wild iris. Blue flag and yellow flag irises can both be found in the wetlands and near bodies of water in Wisconsin.


expectation of random walk with barriers

Question: Suppose we are flipping a coin with probability $p$ of coming up heads and $q$ of coming up tails. We start with $n$ dollars, and the game is over when we either lose all our money or win $m$ dollars. Each toss wins (if heads)  or loses (if tails) $\$1.$ We play the game for $t$ turns (or until we hit one of the barriers). Question: what is our expected capital at the end of the game? Obviously, if $p>q,$ and $t\gg 1,$ we asymptote to $m+n,$ and if $t < \min(m, n),$ the expectation is simply $n+t(p-q).$ But in between it seems a bit less obvious.
Comment: This seems to be equivalent to finding the probability distribution of the first hitting time of $\{0,n+m\}$ (together with the hitting distribution). I do not think there is a closed-form expression for this.
Comment: @MaxAlekseyev of course, yes.
Answer: Let $k:=m+n+1$, and consider $k\times k$ transfer matrix:
$$M := \begin{bmatrix}
1 & q & 0 & 0 & \dots & 0 & 0 & 0\\
0 & 0 & q & 0 & \dots & 0 & 0 & 0\\
0 & p & 0 & q & \dots & 0 & 0 & 0\\
0 & 0 & p & 0 & \ddots & 0 & 0 & 0\\
\vdots & \vdots & \vdots & \ddots & \ddots & \ddots & \vdots & \vdots \\
0 & 0 & 0 & 0 & \ddots & 0 & q & 0\\
0 & 0 & 0 & 0 & \dots & p & 0 & 0\\
0 & 0 & 0 & 0 & \dots & 0 & p & 1
\end{bmatrix}$$
Then the expected capital at the game end is
$$[0,1,\dots,m+n]\cdot M^t\cdot e_{n+1},$$
where the $e_{n+1}$ is the unit column vector with the $(n+1)$-st component equal 1.
Matrix $M$ is tridiagonal and almost Toeplitz, and so it should be possible to get an explicit formula. For example, its characteristic polynomial can be expressed in terms of Lucas sequences as $(1-\lambda)^2 U_{k-1}(-\lambda,pq)$. Its eigenvalues are $1, 1$, and $2\sqrt{pq}\cos\frac{j\pi}{k-1}$ for $j=1,2,\dots,k-2$.
Answer: UPD. Formulae corrected.
Second approach, which follows the ideas from this answer to other question.
Consider the game as a random walk on the real line, starting at vertex $n$ and making steps +1 with probability $p$ and $-1$ with probability $q=1-p$. To answer the question, we need to find the probabilities of the following outcomes:
1) Path of length $\ell\leq t$ from $n$ to $n+m$, not visiting $0$ and not visiting $n+m$ except at the end.
2) Path of length $\ell\leq t$ from $n$ to $0$, not visiting $n+m$ and not visiting $0$ except at the end.
3) Path of length $t$ from $n$ to $k$, where $0<k<n+m$, not visiting $0$ or $n+m$.

1) First, we notice that the probability of a path of length $\ell-1<t$ from $n$ to $n+m-1$, not visiting $0$, equals
$$[x^{n+m-1}]\ x^n (px + qx^{-1})^{\ell-1} - [x^{-(n+m-1)}]\, x^n (px + qx^{-1})^{\ell-1}$$
$$=[x^0]\ (x^{-(m-1)}-x^{2n+m-1})(px + qx^{-1})^{\ell-1}$$
Second, the probability of a path of length $\ell-1<t$ from $n$ to $n+m-1$, not visiting $0$ and $n+m$, equals
$$[x^0]\ (x^{-(m-1)}-x^{n+2m-1}-x^{-(m+1)}+x^{n+2m+1})(px + qx^{-1})^{\ell-1}$$
Finally, the probability of a path of length $\ell\leq t$ from $n$ to $n+m$, not visiting $0$ and not visiting $n+m$ except at the end, equals
$$p\cdot [x^0]\ (x^{-(m-1)}-x^{n+2m-1}-x^{-(m+1)}+x^{n+2m+1})(px + qx^{-1})^{\ell-1}$$
For all these paths the capital at the end is $n+m$ and their contribution to the expectation is given by the sum over $\ell=1,\dots,t$, i.e.,
$$(n+m)p\ [x^0]\ (x^{-(m-1)}-x^{n+2m-1}-x^{-(m+1)}+x^{n+2m+1})\frac{1-(px + qx^{-1})^t}{1-(px + qx^{-1})}$$
2) The probability of such paths can be computed similarly, but their contribution to the capital expectation is zero.
3) Similarly, the probability of a path of length $t$ from $n$ to $k$, where $0<k<n+m$, not visiting $0$ or $n+m$, equals
$$[x^0]\ (x^{n-k}-x^{n+k}-x^{n+k-2m}+x^{n+2m-k})(px + qx^{-1})^t.$$
Their contribution is given by
\begin{split}
[x^0]\ &\sum_{k=1}^{n+m-1} k(x^{n-k}-x^{n+k}-x^{n+k-2m}+x^{n+2m-k})(px + qx^{-1})^t \\
=[x^0]\ &\big(\frac{x^{n+1+2m}-x^{n+1-2m}-(x^{1+m}+x^{1-m})+(x^{1+2n+m}+x^{1+2n-m})}{(1-x)^2} \\
+& (n+m)\frac{x^{1+m}+x^{1-m}+x^{2n+m}+x^{2n-m}}{1-x}\big)(px + qx^{-1})^t.
\end{split}
The expectation can now be computed routinely.
Answer: Call $X_k$ the amount of money at time $k$, $T_0:=\inf\{k,X_k=0\}$, $T_{n+m}:=\inf\{k,X_k=m+n\}$ and $T=T_{0}\wedge T_{n+m}$
First we have that $M_k:=X_k-(p-q)k$ is a martingale then (as already mentioned by Matheus) we have
$$ n =\mathbb{E}(M_0)= \mathbb{E}(M_{k\wedge T})=\mathbb{E}(X_{k\wedge T})+(p-q)\mathbb{E}(k\wedge T). $$
Second we have that $N_k = \big(\frac{p}{q}\big)^{-X_k}$ is a martingale, then
$$ \mathbb{P}(T_0<\infty)\leq \lim_{k\rightarrow \infty} \mathbb{E}(N_{k\wedge T_0}) = \mathbb{E}(N_{0})=\big(\frac{p}{q}\big)^{-n}$$
that decay exponentially with $n$. Therefore if $(p-q)\gg\frac{1}{n}$, I guess we can just forget about the $0$ boundary, and then $T=T_{n+m}$.
Third, for all $i\geq k$, $Y_i :=(T_{i+1}-T_i)$ are iid random variable with mean $\mathbb{E}(Y)=\frac{1}{p-q}$. And then by CLT $$\frac{T_{m+n}-m(p-q)^{-1}}{\sqrt{m}}=\frac{\sum_{i=n}^{n+m-1}(Y_i-(p-q)^{-1})}{\sqrt{m}}\rightarrow \mathcal{N}(0,\sigma^2) $$ as $m\rightarrow \infty$ with $\sigma^2$ the variance of $Y$.


FX hedged investments

Question: I was reading FX hedged investments do not have an impact on the FX rate. For example, a Japanese fund buying US treasuries fully FX hedged. I understand the hedging is usually done through short term FX swaps/forwards. Would you be able to explain why acquisition of foreign currency assets does not have an impact on the FX rate when the investment is FX hedged?
Comment: Perhaps this was true in earlier theories of FX, but I think recently some research papers have argued that hedging *does* have an effect on exchange rate determination https://www.federalreserve.gov/econres/ifdp/the-hedging-channel-of-exchange-rate-determination.htm The amounts hedged nowadays are so large that it is IMHO not surprising that they can have an effect, especially on the behaviour of FX during crises when the desire to hedge increases
Comment: The Japanese investor is buying USD in the spot market and selling it in the forward market. Traditionally it was argued that "it all evens out" with no impact on the exchange rate but we now realize these are separate markets and banks may have limits on balance sheet capacity to arbitrage between them, so the "everything cancels out" theory may not be quite true. But this new view is controversial and not accepted by all (yet) ...
Comment: @noob2 I had a look at the paper you shared. Quite interesting! I have one question. On page 17 (20 of pdf), the author mentions: "the announcement of swap lines may instill more confidence in the financial sector and lower the overall balance sheet costs for swap intermediaries that are producing forward contracts" AND "provision of dollar liquidity can also reduce capital retrenchment and dollar hoarding, thereby reducing possible future exchange rate volatility and lowering institutional hedging demand.". Can you explain these 2 points? thanks
Comment: In December 2007 and again in early 2020 the Federal Reserve announced Swap Lines to provide foreign central banks (and thus the banking system in those countries) with USD liquidity. Foreign banks that had been fearful of running out of money and had been cutting back on issuing forward contracts could feel more confident and resume this business. The investors in the financial sector (i.e. buyers of bank stocks) would also feel more confident, the price of bank shares would go up and again the banks could resume their activity of providing hedging. On the other side, hedgers would hedge less
Comment: ...since insurance cos and other insitutions believe that the Fed intervention means that the worst volatility may be over in exchange rates.
Comment: the second point on fx volatility is now clear, thanks. In terms of the first,  "the announcement of swap lines may instill more confidence in the financial sector and lower the overall balance sheet costs for swap intermediaries that are producing forward contracts", could you clarify why swap lines/dollar liquidity to foreign banking systems lowers balance sheet costs?
Answer: Forwards have a large impact on the spot market, swaps much less so. For example a 100m usd swap against mxn has a spot delta of less than 1m usd for all tenors less than a year ( and actually quite a bit longer in the current rate environment).
Where swaps do impact the spot market is in the cost of carry, large swap transaction drive the funding basis between the currency pairs in question and that determines the cost of keeping the spot position open or the price of the outright forward.

FX hedged investments


What are the built-in routing algorithms of NS2?

Question: I'm doing a few small simulations in NS2 as part of an assignment. I chose the simulator myself, the only real requirement was to compare two routing algorithms.
So i've followed the tutorial provided by Marc Greis here
Because of that i have used <code>$ns rtproto DV</code> to set the routing algorithm to 'dynamic routing'.
What are the other algorithms? Is there a default if I do not use the command above? Is there somewhere I can go to read about how they work?
Thanks!
Answer: There are quite a few algorithms implemented in ns2: DSR, DSDV, AODV, TORA.


How many Master Seals are in the game?

Question: Upon reading the description of the master seal it appears there is a limited amount of them in game. My question is how rare are they actually? Is there enough to promote mostly every unit? Will I run out and then unlock my favorite hero and never be able to promote them?
Answer: Yes, from the story mode and history mode combined, there are currently enough Master Seals to upgrade every character that is available, and when the DLC is released, they will include more Master Seals for the new heroes in the new history mode maps.
While the story mode seals are relatively easy to get, the history mode missions require an S ranking on maps that may be difficult, so be sure to diversify the types of heroes that you use the seals on (swords, axes, lances, etc.) so you have a good choice of powered-up warriors when trying to get the others.
Comment: I wish I could add another upvote for mentioning to keep the classes diverse when promoting. The Weapon Triangle is crucial in the FE series
Comment: Not so much in Warriors. A high level or popping awakening mode throws the triangle out the window ;)
Comment: @Rapitor Haven't played Warriors yet, so I wasn't aware of that :)
Comment: For such a crucial mechanic, it doesn't really matter too much in Warriors. Chrom and Xander can easily get through enemy soldiers and even Generals as long as you constantly attack.
Comment: They removed the crucialness(?) of the triangle mainly because over half the cast is sword users... and its a warriors game first, fire emblem second.

How many Master Seals are in the game?


What is the value of having tube amp in guitar power amp?

Question: Do we really need tube amp for power amp? I understand that the tone change is done in the preamp. And preamp with tube sounds a lot better than solid state amp as it's more rich and full in tone. However, as solid state amp can easier generate enough power for the amp for the output, if it's just for driving power for the sound output, how important to have the amps with tubes in both preamp and power amp? There are a few options for having tubes in preamp and solid state for power amp. Do they perform good as well?
Comment: The answers will likely be very opinionated, and it all depends on the sounds you're trying to create (especially overdrive tone)
Comment: I don't think this warrants a full answer, but as a Front-of-House Audio Engineer, I can't stress enough the benefits of having a quiet stage, even for a loud concert.  It sounds a ton better to the audience if I don't have to mix around a bunch of stage spill that doesn't match my PA's dispersion pattern.  And your Monitor Engineer will love you too, if you have one, because he doesn't have to make me mad for the same reason, just for you to hear someone else.  (for smaller gigs, the FOH and ME are the same person on the same console at the FOH position)
Comment: Just don't ever forget to always have SOME kind of a load on a tube amp!  You can break it by running it without anything.  The reason can be a bit unintuitive, but as long as you never have it turned on without a load of some kind - speaker, power resistor, whatever - you'll be fine.
Comment: The reason has to do with the output transformer that most of them have.  When it's loaded correctly, the load current on the secondary winding counteracts the primary winding, so as to reduce the internal magnetic field.  When it's unloaded, the primary current is not counteracted, and so the magnetic field goes way up.  When it gets too high, the iron core essentially clips, and any input beyond that effectively sees a short circuit.  Now the amp itself is getting shorted at high power...because you *removed* the external load!  (I told you it was unintuitive, but it's true)
Comment: That said though, I also want to capture every bit of the guitarists' well-crafted sound, and part of that does indeed come from a tube power stage running flat out or perhaps slightly more.  I've seen several solutions to get both "the complete sound" into the PA, *and* a quiet stage, and my favorite is to replace the speaker with a dummy resistor load and a speaker-level DI box.  Then the amp can drive hard into its rated load, and I get that signal silently into my gear, within the variation that mic choice and placement would have anyway on a live cab.
Comment: "Do we really need tube amp for power amp". IMHO: No, some don't, todays amp simulators (Fractal Audio, Line 6, Kemper, Tech 21, Zoom, Atomic Amps, Mooer and many more) can create the sound of an overdriven tube pre amp, power amp and cabinet which will survive any blind-test. Today many top artists use solid state amps (actually flat response monitors) with amp simulation and reduce tons of problems: transport weight (try bringing two amps plus backup amps), reliability (tubes may break), reproducing the same sound over and over, and last but not least, they make sound engineers really happy.
Answer: It's an oversimplification to claim that "the tone change is done in the preamp". It's the complete signal chain that results in the final sound, including the power amp and the speaker cabinet. Note that it's not only the tubes that make the difference between a solid state and a tube power amp, but also the output transformer, which is necessary for tube amps but not for solid state amps. The output transformer's response is frequency dependent and non-linear, so it definitely influences the final sound coming out of the speakers. Of course, the influence of a tube power amp and of the output transformer becomes more pronounced at stage volumes, not so much in your bedroom.
Concerning the choice of tubes or solid state circuits in the pre-amp and the power-amp stages, I would even claim that nowadays many setups are the opposite of your suggestion: a solid state (mainly modelling) pre-amp driving a tube power amp, or driving a clean tube amp, including a pre-amp, but without pre-amp overdrive.
I more often encounter simple solid state overdrive pedals driving a good tube amp, than much more expensive tube-preamps driving a solid state (power) amp.
After all it's about taste and the style of music that one plays. It's important to try several combinations and to be open to everything instead of relying on what one thinks should be the "right" combination.
Comment: Note that it would be perfectly possible to build a solid-state amp that uses an output transformer. It would just be rather pointless. (And, the transformer is actually much more linear than both the tubes themselves and the speaker.) About transistor-based distortion etc. pedals – yes, they provide most of the gain&clipping in many guitarists' sounds, however that doesn't mean they don't make use of some tube overdrive. The key is often to get some broadband harmonic spectrum from harsh transistor clipping, the smoothen it up again with some filtering & softer tube clipping.
Comment: @leftaroundabout  Transistor amps with output transformers were extremely common in the 1960's. Part of the reason was that the engineers were used to that design from making tube amps.  It's not entirely pointless! Suppose the output transistors are running on, say +25/-25 power rails. That limits the output voltage and ultimately power to nominally around 40W RMS into an 8 Ohm load. A transformer could step that voltage up to drive more power: say double the voltage for theoretically quadruple the power.
Comment: @Kaz: Center-tapped output transformers could also make it easier to design symmetric push-pull output stages using two transistors rather than four, and can help protect amplifiers from a variety of things that could otherwise go wrong.
Comment: @supercat Ah! You jogged my memory about something. Vacuum tubes do not come in complementary pair devices. The push and pull circuits use a phase inverter, and the same polarity. The correctly assembled signal comes out at the output due the way the two halves of the stage are wired to the transformer. And, so, that's exactly what some transistor amps were doing in the early days. Those designs didn't use matched PNP/NPN complementary devices, but the same devices, with inverted phase, so "push" and "pull" were the same direction voltage swing. The output transformer was then essential.
Comment: @Kaz: Yup.  When power transistors first came on the scene, they were relatively expensive compared to passive devices like transformers, so using two transistors and a transformer would often have been cheaper than using four transistors.
Comment: @supercat Plus power transistors might not even have handled the VCE voltages someone might have wanted in some application. The output transformer can step it up; the transistor just has to source the current.
Answer: Tube power stages only have a notable effect when driven at high signal levels, so they don't just linearly amplify the signal but soft-clip it somewhat. This is in effect also what high preamp-gain accomplishes, but it is controlled with the master volume pot – which really works the same way as the gain pot, except it's placed after the preamp(s) and right before the power stage. That means it's only possible to overdrive a power stage by also taking the amp to its loudness limits. (Though it is possible to "burn" some of the energy with resistors, to avoid the loudness going too crazy.)
Many guitarists insist that power stage overdrive sounds inherently different/better compared to mere preamp overdrive. I'm not completely convinced about this, but what's for sure is that the standard preamp designs clip in a different way from the standard power stage designs. There are mainly two differences:

Power stages tend to be built in a "push-pull" configuration, which means both polarities of the signal clip in a symmetric manner. As a result, the overtones introduced by the overdrive are all odd-numbered harmonics, whereas assymmetric preamp overdrive excites both even and odd harmonics. I find it a bit dubious that this would make a big difference, because if you send in even harmonics into the power stage, even harmonics will also come out, even though the overdrive was symmetric.
Power stages sit after all tone-shaping circuit elements. Therefore, the waveform will not get warped anymore before it reaches the speaker (except a little by the output transformer).More importantly (but note this depends on the concrete amp design), if the tone shaping sits between the preamp gain stage and the power amp, this will affect how much each of the partials are driven into the power overdrive but not into the preamp overdrive. So having both pre- and post gain controls gives you more flexibility about how the overdrive reacts. However, this phenomenon doesn't really require the second overdrive to be a power stage – you could as well achieve this by cascading two preamps with an EQ between them.
Comment: 'Power stages sit *behind*' - sounds a little ambiguous. Would *after* be better?
Comment: I missed that one. Meant the one in the final para.
Answer: A solid-state amp has some decent features that are worth considering when buying an amp. For high-gain sounds I have found that solid-state makes the controlling of the gain more precise, a solid-state amp just responds to gain in a more predictable manner.
For a long time it was rather hard to get truly hard to get high-gain sounds out of tubes. I don't know if that is the case anymore though. I do remember Dimebag Darrel playing solid-state amps for many years because he was not happy with tube's gain sound.
I just think the stigma that surrounds solid-state amps is not entirely warranted by the technology. Solid-state amps where originally designed to be affordable alternative to tube amps. They where also designed to be much more practical and have less parts that can break.
This made it so that for many years high-end solid-state amps sounded like an oxymoron, but really nowadays there really is no reason to choose anyone over the other, even modelling amps have become really great.
I can honestly say that the Marshall code 25 amazes me every time I play it. For the breadth of tones at the price, I don't see you really getting anything better.
So in the old days there may have been issues regarding quality, but these days like most things in guitar tone, it just boils down to personal preference.
Comment: Please stop using "gain" as a synonym for overdrive/clipping/distortion. They're not the same; you can in principle have lots of gain without any nonlinearity whatsoever.
Comment: @lefaroundabout In a guitar setting, it's perfectly clear (or not any less unclear than usual). You're asking dogs not to bark. :) No guitarists says "I need more gain" meaning more volume for clean jazz chords.
Comment: > *For a long time it was rather hard to get truly hard to get high-gain sounds out of tubes.* That must have been before Deep Purple, Black Sabbath, Hendrix, ... the problem of getting distortion out of a tube amp was solved when Dimebag Darrel was climbing monkey bars in a schoolyard.
Answer: Although there is nothing "magical" about vacuum tubes that couldn't be emulated with a transistor-based circuit in a power amp, most transistor-based amps are designed to behave as thought they have a source impedance that is very near zero ohms.  Thus will cause them to put half as much power into an 8 ohm load as they would put into a four ohm load.  Many tube amplifier designs, by contrast, will behave as though they have a significant output impedance.  They use a transformer to reduce the output impedance enough to usefully drive 8-ohm or (depending upon the transformer and the windings chosen, 4, 16, or 32 ohm) speakers, but the impedance will still typically be higher than that of a solid state amp.  Some tube amps had an output impedance that was on the order of hundreds or thousands of ohms, but tube amps can use feedback to substantially reduce output impedance.  I have no idea to what extent different kinds of tube amps did so, however(*).
Because the impedance of a speaker can vary in ways that depend upon the drive frequency and the speaker's position relative to things like walls or corners, the amount of power a speaker will draw from an amp which is fed a constant signal will vary as a result of such factors in ways that depend upon the effective output impedance of the amp.  For many purposes, it is considered desirable to minimize output impedance, but doing so is easier with solid-state designs than with tube-based ones.  Thus, many transistor designs have an effective output impedance that is lower than would be typical of tube-based amps.  One wouldn't need to use vacuum tubes to recreate such effects (using a more powerful amp than one would otherwise need and putting a resistor in series with the load could have a similar effect), but such effects would represent a difference between common tube amps and common transistor amps.
(*)A power amplifier using bipolar transistors in an emitter-follower configuration can very easily achieve a very low output impedance with linear response, and will be inherently stable.  It's possible for a tube amplifier to use voltage feedback to counteract the inherently-high output impedance of the tubes, but it requires precisely-balanced compensation circuits.  Applying two little compensation will leave the amplifier with some residual output impedance.  Applying too much will cause the amplifier to oscillate or otherwise malfunction.
Comment: Interesting point that I had not considered. But it would be nice to quantify how much influence the impedance really has. — If it's actually a significant effect, then one consequence would be that resistive power attenuators are actually _not_ neutral to the power stage behaviour.
Comment: Correction: a voltage amplifier (exemplified by a good solid-state) will put **half** as much power into 8 ohms as into 4 for the same signal at the same amplification level.  A tube amplifier will still put less into 8 ohms, but it could have a separate tap on its output transformer to compensate for that.   Current drive can be obtained in a transistor amp using a *tiny* resistor in series with the output, which used to obtain a feedback signal to mix with or supplement the voltage feedback.
Comment: Some solid state guitar amps use current feedback it. On a Marshall 8008, it is switchable. Early Roland JC-120's had current feedback: by 1981-ish, it was gone! (I compared the schematics at one point). I experimented for years with a current feedback amp mod. I don't run that amp in current mode any more; I just EQ it. I keep thinking about undoing the mod, but never get around to it.
Comment: @Kaz: You're right about power being inversely proportional to impedance.  Mea culpa.
While tube amps do indeed generally have separate transformer taps for different speaker impedance, all frequencies will generally have to go through the same transformer taps.
Comment: @leftaroundabout: From a random google search, http://education.lenardaudio.com/en/05_speakers_3.html would suggest that speaker impedance would increase by a factor of about 3-6 fold near the resonance peak, and also start to increase again past a certain point, so a current-based output would drive more power at those frequencies than a voltage-based one.
Comment: @supercat That is true; and due to the increasing impedance of the speaker coil at higher F, there is more gain with rising frequencies, as you also note. So together, those two things give us a "smiley curve" that guitarists like: some thump in the bottom and a chime on top.  We could do similar things with EQ controls int the global feedback loop, or just with regular EQ. (Global feedback loop controls in guitar amps sometimes have names like "resonance" for the bottom and "presence" for top).
Comment: Well, maybe it's more to the point to say that feeding with a current source can avoid some of the extreme mid-focusedness that the 1-way design incurs. This does make sense because magnetic speakers are better understood as "current consumers" than "voltage consumers" to start with (unlike electrostatic / piëzo speakers). But that wasn't really the point of my comment: what I mean was, _is_ the impedance of tube amps actually high enough for this to matter? If it's still lower than the resonance-f impedance, then it's anyway more of a voltage-fed situation there.
Comment: @leftaroundabout: I do know that there have historically been some tube-based amplifier designs that ran "open loop" and essentially behaved as current amplifiers whose output impedance was more than an order magnitude larger than the speaker impedance.  Such amplifiers had the nice trait that they didn't mind having their output short-circuited, but had the annoying trait that they could be damaged if their output was open-circuited.  I don't know to what extent tube amplifiers today use voltage feedback to control output impedance, but an "open loop"  tube amp would have a high output Z.
Answer:
Do we really need tube amp for power amp? I understand that the tone change is done in the preamp.

The situation is nuanced. For instance, the late Eddie Van Halen's legendary sound is almost automatically associated with tubes, and nothing but tubes, right? But, when playing live, he used a technique of of capturing the output of an entire tube amplifier (power section and all), putting that through some processing, like delays, and feeding the output into several powerful solid-state amps, such as the HH Electronic V800: a 1979-dated solid-state amplifier that can drive 800W into 8 Ohms, when bridged to mono, or else 250W per channel in stereo. Still, though making use of solid state power amplifiers, he did use the entire tube amplifier for creating tone.
The mistake people make is thinking that a solid state amplifier rated at 50W or 100W will "do" the same kinds of things as a tube amplifier with the same numbers. Without getting too much into details, the nutshell of it is that

You don't want to drive a solid-state power amplifier into clipping, so you need more headroom; and

Tube amplifiers often have multiple outputs for speakers of different impedances (like 4, 8, 16 Ohms) so they can drive those different speakers with the same power. This is because they are transformer-coupled: there is a transformer between the output tubes and the speaker, and output transformers can have multiple taps for different numbers of output windings. Solid-state amplifiers do not have this feature: they drive less power into higher impedance speakers. A solid-state amplifier rated at 100W into 4 Ohms will not put out 100W into 8 Ohms: it could be 75 or as little as 50. A tube amplifier rated at 100W into 4 Ohms can still put it into 8 Ohms if it has dedicated output jack for 4 Ohms and 8 Ohms.

Both of these points indicate the need for getting a decent amount of wattage in a solid state amplifier.
Another mistake is buying a solid-state guitar amplifier from a company/brand that is famous for tube amplifiers. Such gear is always going to be entry-level fare whose upgrade path is that maker's tube product line. That tube product line is where they make the revenue, and that business is bolstered by a customer base that believes in tube amplifier myths. Of course, they are not going to produce myth-busting solid-state amplifiers.
If you want great sound, get a powerful professional audio power amplifier, in a wattage that is at least four times more than the tube amplifier you would otherwise use (chances are it will still weigh less than the tube amp, and fit into two "U" spaces of a 19" rack, and cost less).
Look for something that can be bridged to mono for more power: for guitar, you don't always need stereo.
Lastly, I want to mention something noteworthy: tube amplifiers face speakers with a relatively high output impedance, whereas the output impedance of solid-state amplifiers is low. This creates a different frequency response: the way tube amps drive a speaker naturally creates a "mid scooped" response that works with guitar. This is absent in a solid-state amplifier unless it is designed for guitar and compensates for it in some way. The tone controls of a guitar preamp might go only so far; it helps to have an equalizer.
(I'm not writing about digital modeling situation here, but using a bona fide analog pre-amplifier with tubes and a traditional tone control stack, going through perhaps some effect loop, and into a power amp. It's useful to have an EQ: graphic or parametric.)
P.S. It's worth mentioning a tube amplifier effect that doesn't easily reproduce in off-the-shelf solid state amplifiers: power supply sag. Tube amplifiers (which are totally tube, and thus use a tube-based rectifier for converting AC to DC instead of a silicon diode-based one) can exhibit a "sag" in their internal power supply voltage when used at high volume, during transient peaks. This creates an interactive, dynamic quality in the note attack, like compression. Someone who is specifically seeking this effect will probably not be satisfied by any combination of tube pre-amp and solid state power-amp. It may be obtainable via modeling or some amplifier mods to give the power supply apparent internal resistance or some such thing.  So for instance, someone using Eddie Van Halen's aforementioned trick of using an entire tube amplifier as a pre-amplifier could obtain power supply sag, using the right amplifier used in the right way. Then that effect would simply be reproduced in the subsequent solid-state part of the signal chain.
P.P.S. Another tube amplifier effect is the fact that the output signal passes through an output transformer, which introduces nonlinearities, particularly when the transformer's iron core is saturated with magnetic flux. For a time, transistor amplifiers were built with output transformers. Modern transistor amplifiers aren't and so the output transformer effects are absent.
Answer: Benefits can be   cost or convenience in using the design as an amp.
Also in reliability and other NFRs  such as perceived sound differences.
Like @Neil Meyer said it is really up to personal preference to decide.
Answer: Don't ignore the subjective effects.
A channel that I find fascinating, regularly does blindfold tests to see if people can really tell the difference between, say, an expensive guitar and a cheap copy; a 'boutique' effects pedal and a mass-produced one, etc. In a lot of cases the differences are illusory. Even experienced experts can be fooled.
Andertons do lots of comparisons like this and the results are fascinating. I'm pretty sure they've compared valves with solid state several times over the years. Here are a couple of examples from 6 years ago. Modelling has improved enormously since then.
I'll let you draw your own conclusions.
Blindfold Clean/Blues Amp Test - Modelling vs Solid State vs Tube
Blindfold Challenge - Driven Guitar Amps - Modelling vs Solid State vs Valve


RPi3 power consumption based on CLI or Desktop GUI. Which consumes more power? CLI vs Desktop GUI

Question: I am planning to do a project where RPi3 will b run by a powerbank. But I am bit confused with power consumption and in my project I am not running any heavy load expect camera interface. In my case RPi3 will run a bash script on startup and enable camera interface. But I like to do it on CLI interface while startup. So using GUI generally consumes more power than CLI?
Answer: according to https://www.raspberrypi.org/forums/viewtopic.php?t=223399

Well, an HDMI connection will use a tiny bit more power. As for the OS
  itself, running the GUI requires more software, and that would put
  more load on the SoC, but I doubt it would have a large impact on
  total power consumption. And as klricks said above, the Desktop
  version of Raspbian can be configured to boot to the CLI (not load the
  GUI).


Minecraft java.io.IOException : Unable to connect to remote host : Connection refused

Question: I installed java 9.On minecraft i can play with java 9 on singleplayer.But When i want to connect to a server minecraft doesn't crash it only gives an error saying "java.io.IOException : Unable to connect to remote host : Connection refused" I looked up to internet but i couldn't find something similar to mine
I also got an error from another server.The error is Internal Exception : java.lang.runtimeException : Unable to access address of buffer.
Answer: you have a premium account?, i got the same problem with a minecraft server and was that you need a premium account, i bought my premium account and all was solved, by the way this question is not related to elementary so pleease check this in a minecraft forum or in the suport page of mojang
Comment: I can't find solutions to my errors >:
Answer: Found it.It is because of Java.I uninstalled Java 9 And i installed Java 7 Everything worked fine.(I didn't install Java 8 because last time it was crashing Minecraft.)
Comment: Does Java 9 even exist  ? It is prerelease


90s-2000s anime about a girl and her father looking for gems

Question: I watched it when I was a kid in Bulgaria (on the channel "BNT 1" it could help). What I remember was a girl and her father looking for gems/stones around the world to add to a bracelet and at the end of each episode we could see the bracelet on a black background and the new gem adding to it. The world was kinda medieval fantasy but I really can't remember more and I'm not sure if they were really father and daughter but the girl was younger and the man had a beard, they both had brown hair.
Answer: Is this Deltora Quest (2007–2010)...?

Leif must restore the seven gems and the belt of Deltora to save his homeland. Along with his companions Barda and Jasmine, Lief must face devious enemies and dangerous beasts to oust the Shadow Lord and return peace to Deltora.

The plot centres around a quest to find seven gems.
It takes place in a medieval fantasy setting.
Two of the three main characters are Jasmine, a girl with green hair, and Barda, an older man with brown hair and a beard. They aren't related, though.
There's a shot of the belt of Deltora with the gems on it, on a dark background, at around the 0:38 mark in this video of the closing credits.
Comment: it's weirdly close to the description but I don't really that's the one :( the the girl and the older man were the only main characters and I don't remember a blond main character. The artstyle was more ghibli like and the world wasn't that fantastic


Export a high resolution image from ArcScene

Question: My 2D output from ArcScene is very pixelated, regardless of the export format I use. I've tried higher DPI, but that doesn't seem to help. I've tried PDF, JPEG, SVG, TIFF, .ai. They're all very pixelated. I attached an example of a 300 dpi JPEG output. Any ideas on how to adjust the settings so I can get a higher resolution? I tried zooming in and exporting, and the zoomed-in version of the layer had higher resolution. This is my first time using ArcScene so I'm not very familiar with the basics.
Comment: How did you configure the surface on which the scene was built?
Comment: I created a TIN using a 30-meter resolution DEM. Then I imported the TIN into ArcScene. I'm not sure if this is fully answering your question. Two other layers (bottom and top) are polygons and one is a point layer.
Comment: There's a number of controls that allow you to specify the analysis resolution. There's a memory/compute cost for increased resolution (based on a square rule -- twice the resolution costs four times as much), so you need to be very careful. It's been ages since I last used ArcScene, but setting the underlying surface is pretty fundamental, so you want to look at the properties of your scene.
Comment: Thanks for the advice, Vince. I tried adjusting those rendering settings (under Layer Properties - Rendering - Optimize) and nothing changed. I also tested this with the vector layers to no avail, and they appear pixelated in the ArcScene display, even with the highest rendering settings. Maybe there is a specific location that adjusts the scene resolution properties, rather than just the layer properties? If so, I haven't been able to find it.
Comment: I ended up exporting 2d maps from ArcMap at high resolution, then edited the perspective in Illustrator. I never figured out how to increase the resolution from ArcScene.
Answer: Go to "Export Scene", choose export format as .tif, select the resolution you want and then on the bottom of the window change "View size" to the highest it'll let you. That should make it better...


Stationary distribution for a Markov Chain on an uncountable space

Question: Suppose $X_n$ are i.i.d. random variables on $\mathbb{R}$ with compact support, and define the Markov chain $Y_n=X_n +\frac{1}{Y_{n-1}}$ on $\Omega=\mathbb{R}\cup \{\infty\}$. Does the chain $Y_n$ have a finite stationary distribution $\pi$, i.e., is there a distribution $\pi$ s.t. if $P(X_n \in A)=\pi(A)$, then $P(X_{n+1}\in A)=\pi(A)$?
Comment: Do you mean to say "if $P(Y_n \in A)=\pi(A)$, then $P(Y_{n+1}\in A)=\pi(A)$"? Also, are we supposed to find the distribution for $Y_0$? Are we also supposed to find the distribution for $X_n$ as well?
Answer: In this case, you can give a somewhat explicit description of the stationary distribution. It's the distribution of
$$
X=Z_1+\frac 1{
Z_2+\frac 1{
Z_3+\frac 1{
Z_4+\ddots}}},
$$
Where the $Z_i$ are iid with the same distribution as $X$.
Comment: Thanks! But how do you show that the right hand actually converges to a random variable? (If the Z_i are non-negative then it is known).
Comment: I agree. This is the right question. I think you should be able to show that for almost every realization of the $Z$'s, this random variable becomes exponentially less sensitive to $Z_n$ as N\to\infty$. That is: there exists $\theta<1$ (depending on the distribution of $X$) and $K$ depending on the realization of the $Z$s such that the derivative of the continued fraction expression with respect to $Z_n$ is at most $K\theta^n$. I have not written down a proof of this.