Is Trek Emonda ALR have thinner or thicker diameter tubing than the carbon model?

Question: I'm wondering if Trek Emonda ALR have thinner or thicker diameter tubing than the carbon model SL/SLR? I might actually get the aluminum one if it's thinner.
Comment: If your question is about the tube wall thickness, then that can't be answered for the CF bike because it will vary all over depending on strength requirements.
Comment: May we ask why you want the bike with thinner tubes?  Model selection is usually about components, ride quality, weight and price. Is it just an esthetic consideration?
Comment: I just like the skinny look of a vintage bike, but not necessarily want a vintage bike.
Answer: That's a question with multiple answers depending on what you're trying to find out.
From a distance the Aluminium and Carbon bikes look almost identical.
 Compare these two Emonda bikes and see which you think is CF and which is Aluminium.  Try to ignore the wheel rims and different colour schemes, barsm stem, saddle, seatpost, and that both have a carbon fibre fork.

SE Bicycles doesn't offer the Spoiler markup tag.....
.
.
.
.
.
The top bike is the aluminium Trek Emonda , and the bottom is the carbon fibre version of the same bike.
Differences:

The CF bike has visually chunkier tubing over the AL one.
The CF downtube appears to be consistent thickness whereas the AL one tapers thinner as it drops to the BB
That head tube on the CF bike looks enormous compared to the AL head tube.
CF bike has thicker chainstays and seat stays over the AL bike
The seatpost clamp area looks quite different too - the AL bike has tubes that stop at the welds whereas the CF bike has curves merging one tube around a corner into the next tube.

Curiously, the only tube that looks the same on both frames is the seatpost tube.
However the hidden difference is that the CF bike could be as much as a kilo lighter than the equivalent AL one.
Comment: Both are very nice looking bikes, and I'd expect the carbon version to cost more and be specced slightly lower than the aluminium one in terms of drivetrain or other parts.  A common dodge is to have the CF bike with 105 grade parts, and cheaper FSA cranks, but the AL bike to have all Ultegra grade parts, which are higher spec.
Comment: As far as I know Trek always spec full groupset down to the chain.
Now I'm debating whether I should take the ALR or SL...
Comment: @RizkiHadiaturrasyid OK that's unusual, and will be reflected in the price difference.  Trying to avoid making this a shopping question, but if you can reasonably afford the lighter bike then go for it.  If you ride a lot of hills then the CF bike will help.  If you mostly ride flat or have other financial commitments then the AL bike will still be awesomely good.


How to calculate the prices of option instruments for a new underlying

Question: Can someone with practical experience with implementing and verifying please point me in the right direction.  Let's say I have 3 months of data for an underlying.  I want to generate theoretical option prices of all the options strikes and expirations.  How do I generate the volatility smile across the full set of option strikes and expirations?  Let's say I have the historical volatility.  Can I use this as the starting poing to generate the volatility surface?  Is there any literature on how to do this?
Comment: you need option prices (not underlying) to imply volatilizes.
Answer: This is a very common real-world task in quantitative finance, because new underlyings or options series pop up frequently.
Single Volatility
At its simplest, a volatility surface can be represented by a single constant parameter, $\sigma_C$, which to first approximation can be taken equal to the historical return volatility of your hypothetical underlying $H$.  With a mere 3 months of daily data, and assuming options near the money, I would put a "safety factor" on $\sigma_C$ (positive or negative depending on whether you will be long or short optionality) and stop there.  Frankly, even a Bachelier volatility on $H$ (rather than returns on $H$) would be fine.
Volatility Mapping
Your next best method is to "map" a surface from some economically similar underlying $U$ for which options exist.  Let's say you get a volatility surface $\sigma_U(K/U_0, T)$ for $U$.  note that I have expressed it in terms of relative strike $K/U_0$, the proportion of strike K to current underlying value $U_0$.  Let's also choose some canonical volatility representative of $U$, say
$$
\sigma_A := \sigma_U(1, 3/12)
$$
From this, your mapping comes from mapping strikes to the same proportions, multiplying the volatility curve by a correcting constant, and adjusting the time parameter
$$
\sigma(K/H_0, T) = \sigma_C\frac{\sigma_U(K/H_0, T\frac{\sigma_A^2}{\sigma_C^2})}{\sigma_U(1, T\frac{\sigma_A^2}{\sigma_C^2})}
$$
Stochastic Volatility
If you want to get a fancier surface, you will have to choose some kind of  favored stochastic model, other than plain Black-Scholes, for the underlying.  Any fit of such a model gives you option prices for your choice of tenors and strikes, and those option prices in turn define a volatility surface.
Given that you lack option prices, you would fit by maximum likelihood techniques, as described in Maximum likelihood estimation of stochastic volatility models by Ait-Sahalia and Kimmel.  This sort of fit involves forming a power series approximation for each day's data, which in their paper comes from equation 9,
$$
l_X^{(J)}(\Delta,x|x_0;\theta) = -\frac{m}2 \log(2\pi \Delta) - D_\nu(x;\theta) + \frac{C^{-1}_X(x|x_0;\theta)}{\Delta} + \sum_{k=0}^J C^{(k)}_X(x|x_0;\theta)\frac{\Delta^k}{k!}
$$
and then employing a multidimensional optimization algorithm, such as BFGS, to determine the maximum likelihood coefficients.
Using maximum likelihood estimation of stochastic volatility has various practical and theoretical problems, including

This technique locks you to a picture of stochastic behavior that is probably not realistic, say by ignoring jumps
Past behavior does not make a good representation of the future
You need a lot of data, not just a few dozen points, to have a hope of getting low estimation error
The varvol or "variability of volatility" parameters are latent and always come with large error bars
Comment: Actually, it does answer my question.  Thanks to Brian B for taking the time to answer.  Brian: Let's say I am using method A in your answer (Single Volatility).  From there, is there any literature that shows how to build the vol surface across strikes and expirations?  The center would be the ATM strike.  I am trying to understand how to establish a realistic volatility surface.
Comment: This doesn't appear to answer the question ('how to calculate a theoretical option chain')
Comment: Form that starting point, you will not be estimating stochastic vol parameters so let's ignore part 3.  Start by using $\sigma_C$ as your ATM vol.  Find some other similar underlying with observable option prices.  Convert the option prices of it to implied volatilities, and then copy over the surface shape.


Is it possible to long press on Apple Maps screen in CarPlay and get directions to that location?

Question: I'm familiar with long-pressing on Apple Maps on iPhone to drop a pin and then getting directions to that location. Is it possible to long press on Apple Maps screen in CarPlay to a drop a pin?
Comment: Do you use CarPlay and long-pressing doesn't work, or are you wondering whether it would work if you buy one?
Comment: Use CarPlay and it doesn't work
Comment: CarPlay is a very limited subset of Apple Maps. It doesn't even support multi-touch. I was fairly disappointed by the lack of 'phone-ness' when I first got mine, 5 or 6 years ago. The interface has improved, but it's still very limited. I often just set mine up on the Mac the night before, & send it to the phone. If you do that, make sure you set it to *Go* for a few minutes, then End Route, or it will have forgotten the location by morning.
Answer: As of iOS 14.4, you're not able to long-press a location on Maps in CarPlay to select a destination.
Apart from selecting a destination on your iPhone prior to using CarPlay, you can only select a destination by choosing a previously entered Destination or by using Search.
I often just tell Siri where I want to go and I'm presented with different options that meet my criteria.


How to view map of the world

Question: Opening map of the world is possible in Terraria PC (by using button on the screen) but I had hard time figuring it out for android version. Today I finally found the map option in the mobile version. It is given in solution below
Answer: There is'nt a particular button for opening the map.
But map can be opened by pinching 2 fingers(like zooming out the game screen) above the joystick area i.e. top right area of screen
Comment: well you are close, its actually a vertical pench in the center of the screen.

How to view map of the world


Windows Local Account and Group Maintenance

Question: How does one remotely maintain Local Accounts and Groups in a Windows environment?
Answer: You can do this with a variety of means. I'd just use a CMD script calling the NET.EXE command-line utility.
To remove the user:
NET USER <username> /DELETE

To create a new user and add it to the Administrators group:
NET USER <username> <password> /ADD
NET LOCALGROUP Administrators <username> /ADD

Be aware that your script will have the password in it in plaintext and protect it accordingly. If you assign the script as an AD startup script (which is what I would do), alter the security permission on the script to include "Domain Computers - Read and Execute" and remove the "Authenticated Users" permission and you'll go a long way to keeping that plaintext password secure.
The script won't hurt anything if you run it multiple times on the same machine. If, however, you'd like to keep track of which machines it has run on, you might consider the following:

Create a group in AD-- say "User Creation Script Complete".
Modify the permission on the group to include "Domain Computers - Write / Add Self as Member"
In the script, above, add the line:
NET GROUP "User Creation Script Complete" /DOMAIN /ADD %COMPUTERNAME%$

You'll see the group "grow" member computers as it runs on each machine.
If you want to stop the script from running on computers where it's already run, add a permission to the GPO that assigns the startup script "User Creation Script Complete - Deny Apply Group Policy". Then the script will run once on each machine. (I do this kind of "trapdoor" script a lot, actually, for various system administration functions.)
Comment: I know those commands well.... but over looked them because I thought of them only as a local solution. I had in mind something a little more Powershelly.

But those three lines and a copy of PSExec.exe aught to do it. Thanks.
Comment: Heh heh... I'm still not really sold on PowerShell yet. When I hear "We'll solve this problem with PowerShell!", I think to myself "Great-- now you have two problems." A lack of consistency in the arguments for cmdlets annoys me. (Then again, the consistency between, say, "NET USE" and "netsh" is nil, as well...)
Answer: 1. The MS way: http://support.microsoft.com/kb/272530
2. The MS hired a genius way: http://technet.microsoft.com/en-gb/sysinternals/bb897553.aspx
3. The GPO way: http://www.gilham.org/Blog/Lists/Posts/Post.aspx?List=aab85845-88d2-4091-8088-a6bbce0a4304&ID=505
4. The machines are off at times way: Use SMS/SCCM to advertise a cmd to change the pass warning: this leaves the pass in clear text, so script to remove the file when it's done
Answer: I recommend using Restricted Groups for adding the user to the Administrators group, as opposed to scripting it. Apply this using a GPO.
Combine it with @MathewC's #3 and you should have a robust solution.
Answer: Found a post on how to add Domain Accounts to a Local Administrators group via Group Policy.
Found a post with information on how to list/add/remove accounts from a local group with Powershell.
Powershell Change Local User Account Password Example
$userObject = [adsi] 'WinNT://ComputerName/UserName,user'
$userObject.setpassword('NewPassword')

More WinNT / ADSI provider Information

Setting and Changing User Passwords with the LDAP Provider (Windows)
Account Disabled (WinNT Provider)
ADSI WinNT Provider
IADsUser Interface


Same Mail In Multiple Folders

Question: In my Gmail account I notice that when I go to different labels in my account some of my mail will be in multiple folders. For instance I have a folder where all of my poetry is. Then say I have another folder for job info. I'll delete the job info because I'm finished with it, but I noticed my poetry is in that folder too. So if I delete that job info I will delete my poetry too.  Why is my mail showing in multiple folders?
Answer: Gmail's labels act like "tags" on a blog post.  Any individual email message can have multiple labels, and thus appear under multiple mail listings.  These same labels can be used like folders but depending on how you assign/file the email messages, they may or may not be reassigned to just one label.
This PCWorld article summarizes with screenshots how the "move to folder" and "assign label" icons treat the selected messages.

Based on the description you've provided, I'd suggest "moving" the messages you want to keep out of the label you're looking to delete.  You can test with just on message and see what active labels are applied to it after the move.
Alternatively, you could also remove the label association from the messages in bulk.  Go to your "job info" folder, bulk select the messages within it that should be under "poetry" (and possibly other labels), click the labels icon in the toolbar and unselect "job info", then click apply.

Same Mail In Multiple Folders


How to make the turret focus the clone of Wukong? (decoy ability)

Question: I know it's possible, but although I main Wukong I've never been able to do it properly.
Answer: You cannot drop the aggro once you've gained it since the turret has True Vision and you become stealthed with your W and not Untargetable.
Your clone works pretty much like a Mordekaiser Ghost or a Shaco clone. It counts as a champion but also as a pet which puts it pretty high on the priority list of turrets.
The only way to get the turret to focus your clone is by using the ability right before the last of your minions dies. Also keep in mind that any damage to a champion before or after you cast your spell will let the turret focus you again which requires walking out of range in order to drop aggro.
Comment: meeeeeeh don't compare it with shaco... because he will drop turret aggro when using R. this might confuse people.
Comment: @DropDeadSander-EUW Well it's how the clone works not the spell. Shacos R makes him disappear for .25 seconds while Wukongs W stealthes him. The clones still work pretty much the same (they block stuff like Ashe Arrow and Caitlyn Ult)
Comment: yes. i just wanted to clarify it ... the CLONES work in the same way. the ABILITIES dont.
Comment: @Pierre Yup I clarified it.
Answer: You also used to be able to accomplish this by timing flash between turret shots such that the turret would be unable to target you, and thus, target your clone instead (or another nearby creep/champion).
You can see an example of this in action:

 Around the 0:15 mark, Cassiopiea flashes, which causes the turret to fire at Nunu instead (just imagine 2 Wukongs, rather than Nunu/Cass).
This "bug" was fixed around the time the new season started though.
Comment: A shame we can't do it anymore! =) but thanks!


Python - Get height of all children in Tree

Question: I'm having trouble visualizing a way to recursively get the height for all child nodes in a normal tree (non BST).
For BST's it's fairly obvious since there's only two nodes. How would you do it given the fact there could be multiple children per node?
How would you go about getting a list of all of the heights of child nodes in a normal tree?
I can't draw a picture since I have under 10 rep, but say I have a tree with multiple children. Each of those children leads to different leaf nodes at the end. I want a list of heights for each the paths from the root node to the leaf node. How would you go about doing this?
I know that:
def height(t):
    if not t.children:
        return 1
    else:
        return max(height(c) for c in t.children) + 1

Would obviously return the max height but I can't think of a way to do this for every path to the end of the tree recursively. I don't want just the maximum height, I want all of the heights.
Answer: it's rather easy, you should pass another parameter, level which defined by 1 + the number of connections between the node and the root
when you get to a leaf you add the level value into a global list, at that point the level value will be the length of the path between the root to the leaf
at the end of the run the global list will contain all the heights
heights = []

def height(t, level=0):
    if not t.children:
        heights.append(level)
    else:
        for c in t.children:
            height(c, level+1)


Is there any way Dan Dennett's multiple drafts theory of consciousness could support an ego theory of consciousness, as opposed to a bundle theory?

Question: Is there any way Dan Dennett's multiple drafts theory of consciousness could support an ego theory of consciousness, as opposed to a bundle theory?
What, if any, are the flaws in Dennett's theory?
I want a materialist from materialist perspective.
Comment: What does "a materialist from materialist perspective" mean? Google has never heard of it.
Answer: Dennett's entire motivation is distrust of the Cartesian Theater, which is basically equivalent to the ego having a clear central auditor in an ego theory of consciousness.  Very few notions of ego do not have such an aspect, and those seem, to me, simply evasive, and religious in form.  So I would say there is no way of retaining the ego as a central aspect of consciousness without wholly violating Dennett's work in both form and spirit.
Besides that, the entire multiple-drafts theory is only meant to be a metaphor for how an ego might arise from a 'bundle' and be properly maintained without losing track of itself.  It is not meant to model anything realistic, or even to truly be a theory of consciousness, but only to prove that a real theory of consciousness that allows for an apparent ego as a natural outcome is possible and not far from being attainable.
As I see it, in any realistic theory, there is likely no equivalent of the 'draft' in the metaphor.  Each 'editing' process would not have a broad enough sense of context for a snapshot at a given instance to constitute a collection of competing drafts.  So Dennett has presented a motivation for a model, but not a direction toward one.
To my mind, the consistency is entirely socially constructed.  We impose the notion of a potential 'draft' -- a consistent whole account of ourselves, perhaps with subtle inconsistencies, but largely constituting a convincing story in competing forms -- from our linguistic experience that other humans expect stories to have a given quality.  But that quality is not necessary for communication, it is necessary for social cohesion.  We want a story to have a cohesive and coordinating effect on a group of listeners.
Interpreters like Feyerabend, talking of 'paratactic aggregation', and Bruno Scnell discussing how Greeks keep changing the metaphors in which they express the internal focal points of independent thought in Homer, even after the content is fixed, have the right idea.  Our lives are stories, not because that is a realistic way of capturing and individual human's experience, but because we are not alone.  It is likely that the notion of story as a cultural nexus evolved first, and around it we built our model of individual experience.
So, as science proposes broadly about other forms of perception, if we want to understand consciousness, we will be looking at illusions forced upon the data and re-constructed backward in time, and not at ongoing processes that actually maintain the consistency of our experience as we handle and store it.  There is no draft, only competing revisions.
The apparent 'drafts' arise because we are tied to specific stories by our having negotiated them with others.  Or, more commonly by having personified our goals as others and negotiated between our own internal goals as if they were separate individuals.
I don't think Dennett would defend himself against this kind of evaluation of his theory's "weaknesses".  He does not offer it as a real theory, but a proof-of-concept that proves that the reality of the 'bundle' and the experience of the ego are not absolutely at odds, and nature would not require intractable quantities of computation to maintain them both and use them together fluidly.
Answer: Yes, Dennett's multiple drafts model is easily adapted to an ego model.
In Dennett's model, the multiple rafts arise thru some mysterious organic process, where perhaps variants of ideas are randomly generated.  Then the collapse into a single dominant "draft" is based on an unstable "competition", where the nature of competitive dominance is not specified, nor why collapse happens.
If one combines multiple drafts with an ego model, where, say, the ego decides to try to return a ping-pong serve, and the drafts are the half dozen different moves one might have to make to return different types of serves, the ego choice "return serve" plus the circumstances constrained by context "ping pong" and the intention generate the drafts.  Then as the world starts to reinforce one or another of the drafts (the opponent turns left while serving, thus focusing your attention on the right side response options) the ego-based intention plus events act to produce the REASON for one of the drafts to dominate.
Combining multiple drafts with an ego agent -- produces a MUCH more plausible and useful psychological model of mental activity than multiple drafts without a "center".


CS5453 Energy Meter IC

Question: Recently I have come across Energy Meter IC "CS5463". I read the datasheet and it says that the internal registers of the IC stores the Power information as a percentage. My understanding is that I have to multiply the percentage with a number to get the absolute power rather than normalized power. My question is what that number should be?
Comment: With the full-scale value which is probably dependent on external component selection (I think of a user defined current sense resistor which is selected according to the expected current range).
Comment: Link to the datasheet and tell us what bits of it you're having trouble with. The information will be in there somewhere.
Comment: https://www.cirrus.com/en/pubs/proDatasheet/CS5463_F3.pdf
Comment: This is the link to the datasheet. it says on page 16
Comment: It says on page 16 under section 5.4 "All measurements are available as a percentage of full scale." I cannot get what full scale is.
Answer: Full scale is the maximum value that the register or channel can holdor display.
section 5.1 on page 16 says

The full-scale differential input voltage for the current
  and voltage channel is 250 mVP.

Current may be sensed eg with an inline shunt rsistor.
By choosing a shunt resistance or other means the current which causes 250 mV peak to occur at the current input is the full scale current.
Voltage may be sensed with a resistive divider.
The input voltage which when applied to the installed resistive divider causes 250 mV peak to occur at the voltage input for is the full scale voltage.
Comment: Yes exactly, using this approach when we read current and voltage registers we can convert the normalized value to the real values but how can we use active power register(which holds normalized value) to calculate power? should I assume that full scale active power and apparent power is V(full scale)*I(full scale)?
Comment: @Khurram Page 28 on in the data sheet advises on what you'd expect to find in the registers. In each case FS returns a 2's complement value of 1 in a 23 bit register. This is when eg on current Vsense at current input is at max value (which seems to be 60% of abs max to allow overload). PRESUMABLY by applying the various formulae and establishinhg what the derived values are when source values are at maximum (eg power when V & I are max) you'd expect a value of 1.00000 ... in the power register. BUT trying it and seeing what happens seems wise and more liable to give the right answer :-). Alas

CS5453 Energy Meter IC


Batch Renaming Relationship Classes using ArcPy

Question: I'm trying to rename about 100 relationship classes in a Geodatabase.
All the relationship classes are named under a naming convention and a standard part of that has changed, i.e:
abc_feature1_rel
abc_feature2_rel
Renamed to:
ddd_feature1_rel
ddd_feature2_rel
I would like to create a small script to automate this if possible, rather than doing it manually.
Answer: This code snippet should work for File GDB relationship classes.  Uses the Describe object properties (arcpy) and the Rename (Data Management) tool. If your data is in SDE then you will need to account for the fully qualified names, ex. database.schema.abc_feature1_rel
import arcpy
import os

desc = arcpy.Describe(r'C:\Users\<username>\Documents\ArcGIS\Default.gdb')

for child in desc.children:
    if child.datatype == "RelationshipClass":
        new_name = "ddd" + child.name[3:]
        arcpy.Rename_management(child.catalogpath, os.path.join(child.path, new_name))

I was initially having trouble listing the Relationship Classes in the GDB (there is not a "List RelationshipClasses" arcpy function) but found this forum post to be helpful.
Answer: This approach uses a list comprehension to rapidly generate the list of relationship classes.  The input name is then split by "_" and reconstructed to your specifications.
import arcpy, os

workspace = r'C:\Users\OWNER\Documents\ArcGIS\Default.gdb'

# Generate the list of relationship classes
rc_list = [c.name for c in arcpy.Describe(workspace).children if c.datatype == "RelationshipClass"]

# Loop through the list and rename
for rc in rc_list:
    outname = "ddd" + "_" + rc.split("_")[1] + "_" + rc.split("_")[2]
    arcpy.Rename_management(os.path.join(workspace,rc), outname)


Constipation problem in two months pregnancy

Question: i am two months pregnant. Feeling constipation every two days. What should i take to get relieved of this problem? Pls somebody advice.
Comment: What's your diet like? Diet as in food intake, do you eat fresh fruit and veggies or are you a fast food addict? Do you smoke, drink coffee, skip breakfast? It all depends.
Comment: Welcome to Parenting.SE. What doctors normally recommend for decreasing constipation applies here as well: more fresh vegetables and less highly processed foods (as @Mari-Lou A stated), lots of fluids, regular exercise, prune juice, pear juice, etc. If that doesn't help, talk to your doctor. This is common in pregnancy, so they should have some good advice. Again, welcome.
Comment: Depending on your area, pear juice, as @anongoodnurse suggests, may be hard to find, but it's *much* more pleasant than prune juice. For us, we've only ever been able to find it in the infant sections of grocery stores and markets, so I'd recommend checking those spots to see if it's available in your area!
Answer: As you want something for "long" term, not just for a given crisis, the dietetic solution likely is the best one.
Eating more fibers and fluids is usually the answer though depending on the person you need more soluble or insoluble fibers.
Most people need more soluble fibers (whole cereals, vegetable skins and fruits) for some though insoluble fibers will help, in this case Beans/lentils/split peas are completely outstanding in terms of fiber content.
My wife had extreme constipation and we tried both diets high in one or the other for two days, in both cases with a lot of water and we knew right away that beans was the answer. For my mother, whole wheat is the answer.
If it doesn't get better after trying both you should definitely see a dietician or a doctor for a personalized check of your general health and diet.
Comment: Welcome to Parenting.SE. Good advice!
Answer: Constipation is one among the most common concerns affecting women during pregnancy.diet, side effects of medications, heavy metal toxicity, hypothyroidism and hormonal disorders are some factors causing this constipation.
During this constipation,your stools are hard and difficult to pass.
Natural Ways To Tackle Constipation:
Exercises are known to stimulate the bowel as well as to improve digestion,But make sure to get guidance from expert or practice under a certified trainer.
Fresh fruits and raw vegetables are the best foods to include in your diet during this time.
Make sure you keep up with your water content throughout the day during this time and stay hydrated.
Answer: The most common problem during pregnancy is constipation. Causes of constipation during pregnancy may be:

hormonal changes, which makes digestive system sluggish
consumption of oral iron tablets
dehydration, stress
enlargement of uterus and pelvic pain.

Try these natural remedies to relieve constipation

It is very important to keep your body hydrated during pregnancy. Which can help in easy bowel movements.
Drink warm lemon water everyday in the morning, it can help boost your bowel movements.
cabbage is an amazing source of fiber, It is very good to treat constipation. Drink cabbage soup to regularize bowel movements.
Drinking a glass of warm milk before going to bed also helps to relieve from constipation.
Yogurt also helps to treat constipation problem effectively

Here are some natural ways to get relief from constipation. I hope this will help you http://www.momjunction.com/articles/natural-ways-to-tackle-constipation-during-pregnancy_0083681/


Where is "Run Selection/Line in Interactive Window" in VS Code when connected to a Remote Server via SSH?

Question: I am coding a project on my local machine with VS Code. Everything works fine. I deploy the code to a remote ubuntu server in the google cloud and connect to the code base there via VS Code SSH.
(https://code.visualstudio.com/docs/remote/ssh) The connection works and I see and edit the code base fine with git.
Problem is that I've lost the keyboard shortcuts to "Run Selection/Line in Interactive Window" and "Run Selection Line in Python Terminal" when I am connected to the remote server. In fact, my right click options are much reduced. See screens below to get an idea.
On my local machine all of the options are there. I have researched the VS Code documentation and cannot find mention of remote restrictions related to the right click options. When I go to preferences, most all of the keyboard shortcuts from the local workstation are missing.
I can run the code on the remote server using a bash shell in VS Code. But ideally, I would like to run the code, or bits of it in an interactive window using the jupyter kernel like I do locally.
How do I enable the usual right click "Run" options when I connect to the remote server? I feel like I'm missing something in the configs but cannot find how to remove the remote restrictions. (Perhaps it is just not allowed?)
Right Click Options on Local Workstation
Right Click Options on Remote Server
Answer: OK - I've discovered the answer. I did not realize that my local extensions are not installed by default into the workspace for the remote server. (I thought it did this automatically)
With the Python and Jupyter extensions installed into the remote workspace, my menu options have now re-appeared.
I hope this helps someone else!


Can my daughter's iPad mini upload photos to Photo Stream without downloading photos from my devices?

Question: I just bought my daughter an iPad mini for her birthday, and I have everything set up with iCloud like mine, because if she takes a picture, I want it to show up in my photo stream so that I see what she's taking pictures of. But - I don't want all of my pictures to go into her photo stream. Is there a way to do that?
Answer: No, this is not possible. Enabling My Photo Stream to allow photos to be uploaded to the Photo Stream also enables downloading of the Photo Stream to the device.


QGIS Raster to Vector Conversion - 3.4.6-Madeira

Question: I have some contour lines in raster format, I want to convert them vector. I tried with QGIS (version 3.4.6) I got the vector form.

But when I tried to select the contour lines to put the actual values those lines represent, I noticed that these lines are formed by rectangles as shown below.

Now the problem is I can't select the entire contour and put the required values. How can I get a line instead of these?
Comment: Buffer them, then debuffer them - or manually retrace them. Vectorizing contour lines is a pain in the... behind.
Comment: @Erik. what do you mean by buffer and debuffer? Can you elaborate? I'm new to this
Comment: Create a positive buffer, then create a negative buffer.
Answer:
Use the Identify tool to click on one of the large polygons between contour lines. Find out what value this polygon has for its elevation value. It's probably NULL, but it might be 0 or 9999 or some other value that represents nodata.
Next, use the Select by Value tool to select all the polygons with that elevation value. This should select all the large polygons.

Use the Delete holes tool to fill the hole in the center of each polygon.
Use the Polygons to lines tool to convert the selected polygons into lines. Be sure to check the box for "selected features only."

Now you should have a line that represents each contour, with a slight offset towards the inner edge of the ring. The amount of offset is the width of 1-2 "pixels" or grid cells of the original raster.
Note: if that slight offset is unacceptable, skip step 3 (delete holes). Step 4 will give you a pair of lines for each contour. Now you need a way to fill in "centerlines" between the pair of lines. See this question: "Average" of two lines. There are a few tools that supposedly do this, including the HCMGIS plugin and the GRASS tool v.centerline. (I couldn't get the centerline tool in HCMGIS to work, and my version of QGIS seems to be missing v.centerline. But perhaps you will have better luck.)


CakePHP session/auth logging out intermittently

Question: I'm having reports and complaints from my user that they will be using a screen and get kicked back to the login screen immediately on their next request. It doesn't happen all the time but randomly.
I am using CakePHP and the Auth component, which seem to work well other than this issue
I got some feedback on the Cake forums once that this is sometimes caused by a 404 request that resets the session, i.e. if you have a broken image link or a missing favicon file. I have firebug open and there are no failed requests, so I ruled this out as a possibility, but the user is getting sporadically logged out. This seems to occur across browsers and operating systems.
Below is a summary of my config settings:
Security.level = high
Session.timeout = 1200  // this means my actual timeout should be 12,000 seconds
Session.save = php
I am really at a loss as to what is causing this issue...
Answer: I have also had a problem with my security set to high.  When you have it set to high it regenerates the session on every request:
"CakePHP session IDs are also regenerated between requests if 'Security.level' is set to 'high'."
I had this problem cross-browser as well, so I know its not the best solution but I just changed the security setting to medium, and changed my session timeout to reflect that setting and have not had any problems since.
Answer: I had a similar problem, I found it to be the user_agent check in the core.php file, set this to false!
What was happening was after a page refresh the session id changed and I was logged out, but in the Session object there was an error saying Attempted Session Hijack!!!
pr($this->Session);
Set this to false in core.php!
Configure::write('Session.checkAgent', false);
Comment: thanks a lot for this. Configure::write('Session', array(
    'defaults' => 'database',
    'checkAgent', false,
    'handler' => array(
        'model' => 'cake_sessions'
    )
   //'timeout' => 480 // 8 hours
));
Answer: Check your Auth->allow or ->deny, because it might be, that your user accesses an restricted part or action of your controller(s).
Second, check your specific Sanitize of CakePHP, because 'high security' options often like to cause trouble.
404 pages reset the session? I never heard about that.
I think your problem is located somewhere in the authentication routines. If you restrict too many things it can happen, that some constellations of requests will fail due to their missing attributes.
For example: UserOne tries to access your website, his user name contains some strings which cause wrong interpretation of the user name.
The name could be found within the database, but the authentication could not link it to the request.
Errors like this always hide inside your code, where you did not expect them to be.
Comment: Sorry, I probably needed to specify further.. the user login process with Auth is fine.  When trying to access /admin/ urls I have it set to require Auth, and it does so for the correct screens.  Logging in is no problem, it finds the names in the database, but the problem is that it will sporadically kick me out when I'm already in.
Comment: The 404 request apparently can reset the Cake Auth/Session, not a generic PHP issue
Comment: Try to set up cakephp once again including your database (etc.) this might help.
Answer: Security.level on high will do that. set it to medium in core.php


Minimizing an Integral (Chebyshev Polynomials)

Question: I'd like to minimize the integral
$$\int_{-1}^{1}\sqrt{1-x^2}\left(f(x)-p_n(x)\right)^2dx$$
given $f(x)\in C^0\left([-1,1]\right)$ and where $p_n(x)$ is allowed to range over all polynomials of degree $\leq n$. The weight is a good indicator that $p_n(x)$ is related to the Chebyshev polynomials, but I'm not sure how I would show that they might be the minimizers of this functional without being able to take derivatives.
Comment: So $f$ can be any function in $C^0$ you want to fit for and $p_n$ should still be a Chebychev polynomial?
Comment: With respect to that weight, I'm thinking yes, and it would be of the second kind, but I don't know how to show it to be true.
Comment: It's not clear to me. It feels like if anyone is free to pick a function of all in $C^0$ it should be possible to not be a Chebychev that fits best of all the polynomials in the world, but I have no proof. But it seems to be an interesting problem to experiment on in Matlab or similar software.
Answer: If we consider $L^2(-1,1)$ equipped with the following dot product
$$\langle f(x), g(x)\rangle = \int_{-1}^{1} f(x)\,g(x)\,\sqrt{1-x^2}\,dx $$
we have that Chebyshev polynomials of the second kind are a complete base of orthogonal functions:
$$ \langle U_m(x), U_n(x)\rangle = \frac{\pi}{2}\,\delta(m,n) $$
By Parseval's theorem, the best $L^2$-approximation of $f(x)$ in terms of polynomials having degree $\leq n$ is given by the projection of $f(x)$ on the subspace generated by $U_0,U_1,\ldots,U_n$:
$$ p_n(x) = \sum_{k=0}^{n} U_k(x)\cdot\frac{2}{\pi}\int_{-1}^{1}f(x)\,U_k(x)\,\sqrt{1-x^2}\,dx.$$


Elements of Dihedral Groups

Question: Is there an elegant way of showing that the elements of a dihedral group are only rotations and reflections? Specifically, I'm having trouble convincing myself that a composition of a rotation and a reflection must always result in either a rotation or reflection.
Comment: There are many ways to regard dihedral groups in terms other than reflections and rotations of the plane, so it's probably prudent not to refer to elements of an abstract dihedral group as rotations and reflections in their own right, without establishing a bit of geometric context first.
Comment: I found a nice answer to this in an expository paper by Keith Conrad. He first points out that every point on a regular polygon is distinguished among all other points on the polygon by its distances from two adjacent vertices on the polygon. Using this, it is established that 2n is an upper bound on the number of elements in the group. Finally, it is simple to show that there are n unique pure rotations, and n unique pure reflections, and clearly no pure reflection equals a pure rotation. Thus there are exactly 2n elements, and these are all accounted for by the pure reflections and rotations
Answer: One can show that for integers $n > 1$ the (matrix) subgroup $G \leq GL(2, \Bbb R)$ with elements
$$\pmatrix{\frac{\cos 2 \pi k}{n} & \mp\frac{\sin 2 \pi k}{n} \\ \frac{\sin 2 \pi k}{n} & \pm\frac{\cos 2 \pi k}{n}}$$
is isomorphic to the dihedral group $D_{2n}$ of order $2n$. (Hence the map $D_{2 n} \to GL(2, \Bbb R)$ is a faithful representation of $D_{2n}$.) In particular, this is actually a subgroup of the orthogonal group $O(2, \Bbb R)$, and so the elements of this group can be identified by with the linear transformations of the plane that preserve the standard inner product; these are precisely the rotations (given by taking $\pm$ to be $+$ in the above) and the reflections ($-$).
With this representation in hand, it's easy to check (either directly, by multiplying generic elements of $G$, or using that $\det G \to \Bbb R^*$ is a group homomorphism) that the product of a rotation and a reflection (in either order) is a reflection.
Answer: Here is a somewhat more synthetic answer to the question.
Given a rotation $f \in \text{Isom}(\mathbb{E}^2)$ and a reflection $g \in  \text{Isom}(\mathbb{E}^2)$, it is not generally true that the composition $g \circ f$ is a pure reflection. That composition is either a pure reflection or a glide reflection, and the latter occurs if and only if $f$ is a rotation through angle $\pi$ and its center of rotation does not lie on the reflection line of $g$. But that cannot happen if $f,g$ are elements of a standard dihedral subgroup of $\text{Isom}(\mathbb{E}^2)$, because all elements of the subgroup share a common fixed point.

Elements of Dihedral Groups


Router Standard ACL

Question: I was configuring Standard ACL on router 1841 on Cisco Packet Tracer with the help of command access-list 1 permit 172.16.40.3 0.0.0.0 and access-list 1 deny 172.16.40.4 0.0.0.0 and then I applied this ACL to interface f0/0 which should have allowed the host 172.16.40.3 and blocked the host 172.16.40.4 instead it blocked the entire network 172.16.40.0 network not a single host can ping to the 172.16.10.1 router even the neighbour routers are not able to ping to 172.16.10.1 router. What should I do to solve this problem?
Answer: You need to use wildcards. What you did permits 172.16.40.3 to talk to 0.0.0.0 (invalid address) and the implied deny any any blocks anything else.
Try
permit 172.16.40.3/32 0.0.0.0/0
deny 172.16.40.4/32 0.0.0.0/0
permit any any

or
permit 172.16.40.3 0.0.0.0 0.0.0.0 255.255.255.255
deny 172.16.40.4 0.0.0.0 0.0.0.0 255.255.255.255
permit any any

Comment: I tried what you suggested to me but the router is not recognising /32 and /0 mask I think that's the old syntax.
Comment: @user60845 I've added the lengthy wildcard syntax as well.
Comment: Tired that too again it's a old syntax
Comment: Hey man problem solved I was applying the ACL on inbound connection that's why it was not letting other devices to communicate to the router. As I applied the ACL on outbound connection the problem solved. Thank-you very much for replying I really appreciate that

Router Standard ACL


How to add Beamer `\frametitle` to `imenu`?

Question: I know that there is RefTeX with its TOC, and I know how to include \frametitle there (see here). Nevertheless, I would like to see \frametitle also appear in imenu. What would be the minimal way to get to this?
Answer: Try this
(push '("frametitle" 2) TeX-outline-extra)

See the documentation for TeX-outline-extra. The first element of the list being added is a regexp and the second is the imenu level. You can also see LaTeX-section-list for the default levels that imenu uses for latex.
Update:
As suggested in the comments, it might be a little safer to use the following. This change makes no difference for my use though.
(push '("\\\\frametitle\\b" 2) TeX-outline-extra)

Comment: [AUCTeX manual](https://www.gnu.org/software/auctex/manual/auctex.html#Outline) also says: _A '^' is automatically prepended to the regular expressions in the list, so they must match text at the beginning of the line._  Hence, I suggest you do `(add-to-list 'TeX-outline-extra '("\\\\frametitle\\b" 7))`.
Comment: That may be what it says, but that's not the regexp that is actually used. See the `LaTeX-outline-regexp` function. In any case, your regexp will prevent matching against something like `\AframetitleA{}` so I updated it. Thanks


Clarifying the meaning of $\mathcal F$ in the probability triple $(\Omega, \mathcal F, \Bbb P)$

Question: I don't understand completely the definition of $\sigma$-algebra in the probability triple $(\Omega,\mathcal F, \Bbb P)$ . By the definition,  $\mathcal F$ is the set of all events(outcomes) of the sample space $\Omega$. So basically the power set of $\Omega$. Now my concern is: How is the empty set an outcome? For example our sample space is of the experiment of tossing a coin twice. Then $\Omega={HH,HT,TH,TT}$ . How is the empty set an "outcome" ? Also, why is $\mathcal F$ defined as the power set of $\Omega$? Why can't it basically be equal to $\Omega$? Since there is no outcome ${{HH,TT}}$ (since this would be an outcome of the experiment of tossing two coins twice?
Answer: The elements of $\Omega$ are the so-called elementary events. It's useful and interesting to construct more complex events from them. For example, the event $E_1 =$ 'When tossing the coin twice, we get both times the same result' is in symbols
$$
E_1 = \{ HH, TT \}.
$$
Note that this is an element of the power set of $\Omega$. Similarly, the event $E_2 =$ 'When tossing the coin twice, we get different results' is in symbols
$$
E_2 = \{ HT, TH \} = \Omega \setminus E_2.
$$
So you see that sets of elementary events can be used to formally express interesting more complex events.
Also, the empty set is the event that nothing happens. Appropriately, this set has probability zero in any probability space.
$$
\mathbb P (\emptyset) = 0.
$$
Nevertheless, the empty event is useful, for example $E_1 \cap E_2$ is the event that, when tossing the coin twice, we get at the same time equal and different results. Of course, this does not happen, and appropriately
$$
E_1 \cap E_2 = \emptyset,
$$
as you can verify from the expressions for $E_1$ and $E_2$ above.
Comment: Okay, I understand. But physically how is it possible to describe $\emptyset$ ? How is it possible that if I flip a coin twice and nothing occurs?
Comment: In my answer, I give an example of how the empty event "naturally" pops up when we manipulate other events. You can compare it to the number zero, whose existence and meaning were not always as clear as they are nowadays. See here: https://en.wikipedia.org/wiki/0#Classical_antiquity
Answer: "Outcome" usually refers to an element of $\Omega$, whereas an event is an element of $\mathcal F$. The outcome is a full description of what happened. An event is something that can be decided based on this full description.
For instance the event that there is at least one head and one tail would be represented by $\{HT,TH\}$. So an event is said to occur if the outcome that occurs is an element of the event. The empty set is a boring event that is characterized by the fact that it never occurs. Similarly $\Omega$ always occurs.
Also note that while $\mathcal F\subset P(\Omega),$ we often want a smaller sigma algebra than the full power set, since  the measure we are interested in can't be defined on the full power set (as in the case of measures on the real line). In the case where $\Omega$ is finite the full power set is the natural choice, though.
Comment: Sorry, could you clarify what do you mean by ''So an event is said to occur if the outcome that occurs is an element of the event"?
Comment: Say the event of interest is $\{HT,TH\}$. Then for example, if the outcome is HT then this event does occur, whereas if the outcome is HH, then it does not.


A/C vent not connected to duct?

Question: So I am in the process of doing a light reno to a bathroom in my 1954 ranch style home and I took off the a/c vent to wash it and/or buy a new one. To my surprise (okay not really surprise— there was a lot of "homeowner specials" done to this house before we bought it) the vent is not even connected to the duct work. The duct work is just blowing straight into the (very minimal) attic space. Any ideas on how I can fix this or at least make it more energy efficient? I really don't want to rip down the ceiling, so anything I can do to work through this vent hole would be optimal. Thanks
Comment: What are we looking at here? Is this from your camera stuck up into a hole in the ceiling? What's at the other end of that small square somewhere on the other side of the wall? Can you give us another picture showing a wider view of what we're looking at for reference?
Comment: Okay so the camera is stuck up in the vent that was taken off. The small square you see is the ductwork over the hallways that leads to the other bedrooms. It's really a small space above this bathroom, and there is nothing else surrounding the vent besides the 2x4 on the right side. I added two more photos to my original post showing the vent hole (with cover removed obviously) and pointing the other direction in the hole. I hope that helps clarify!
Answer: So it looks like you can't even get to the actual duct. What I would do:
That "wood tunnel" between the end of the duct and the space above the bathroom ceiling can function as a duct. Cover end of the wood tunnel with a piece of drywall (or wood) with a hole in it that will accommodate a short piece of flex duct. Run that flex duct to your vent grill (technically called an air register). You will need to install a register boot in the ceiling behind the grill, it's what the duct and the air register attaches to:
Comment: There is really only about 6/8 inches of space from the drywall hole in the ceiling to the truss of the roof, so I'm not sure if ductwork would fit? I was thinking I might just have to frame/tape with insulation board, but I'm not sure that's the right call?
Comment: Even 4" flex duct connected to the ceiling register via a boot would be better than what you have now. The boots also come in a 90 degree elbow configuration.
Comment: "about 6/8 inches" is that "6 to 8 inches" or "6/8ths (or 3/4) of an inch" @Olivia?
Comment: Sorry! 6 to 8 inches
Answer: It looks like you have access to the ductwork through the rectangular hole in the wall above the ceiling.  It should be very easy to connect that properly to a new ceiling vent.
Look for HVAC ducting, Use a rectangular flange against the wall and a vertical elbow to transition to the ceiling near the wall (or use some duct to move it away from the wall).   Then put a new grill over it.
You'll have to hunt around and maybe adapt the wall opening to get sizes that fit one another.
These photos are not the right size for your wall or for each other, they are just to give you an idea.

A/C vent not connected to duct?


Sniffing an Android app to find API URL

Question: I'm curious as to how I could figure out the API URL an Android application (any app I have installed) uses if it makes API calls to some online server (a RESTful service for example). I presume I have to capture packets on the device and maybe analyse them in Wireshark or something to find the URL? I'm fairly competent in Java/Android development, but a bit lost when it comes to any sort of network analysis business.
Comment: Essentially, you install Charles on your computer, tell your Android device to use that computer as a HTTP proxy, and then all requests will be sent through there, allowing you to see the individual requests made through apps. SSL is a little more complicated.
Comment: You could use a debugging HTTP proxy like Charles.
Answer: you can do this with help of WireShark. I am listing steps here

Install WireShark on your computer
now we have to create Android virtual device(AVD) so we will download Android SDK from official site. Android SDK come with emulator for testing
after setting up Android SDK, create a Android virtual Device(AVD) on which we will install app
start that virtual device. you can use command line to start (emulator @<AVD name>)
after creating virtual device install app using adb command adb install app_file_name.apk
now we can start capturing the packets so I will suggest to close other application on your computer which are using network so our captured packets would be more relevant.
now start wireshark with root access
select interface which you want to capture and click start to start capturing.

now start using that app so packets will transfer to and fro and wireshark will capture it.

if you have used app covering all sort of activity then you can stop wireshark to capture packets.
now start main business to analyse packets carefully but not all packets are usefull for our job. so lets filter packets which are relevant for you. lets your IP address is 192.168.0.32 then filter all the packets whose IP is this. so filter expression will be ip.addr==192.168.0.32  apply this filter. still we an apply another filter to list up only relevant packets only so possibly that app is accessing API with HTTP protocol so apply HTTP filter. expression would be http. you can apply both are filter at once ip.addr==192.168.0.32 and http press enter to apply.

see the info carefully for listed packets you will see lot of important details, API keys, cookies etc
Comment: what about https? İf app connecting over https protocol still can whireshark log?
Comment: with https, protocol is "TLS 1.2" and the request is encrypted so, the request is logged by wireshark BUT not much usefull info (No endpoint, no cookies)
Comment: you have to install android sdk to get adb and emulator
Comment: does it show https log?
Comment: It should be noted that interfering in any packets can actually be in breach of law in some countries
Answer: A very fast method.
Go to PlayStore, search for Packet Capture
Download, install and run.
It's easy simple and fast. It will give you details about the APIs, URLs and response with their headers.
This application follows the concept of Packet Sniffing. Thus, this might not work with much secured applications like WhatsApp, Facebook, Twitter.
UPDATE 1:
The  Packet Capture is no more available in playstore, try OS Monitor
UPDATE 2:
The  Packet Capture is available again.
Comment: Currently broken in recent android.
Comment: The original suggested app is still available (again) as before.
Comment: Any alternative? Because this app is not available for my device even if my phone has newer version for android.
Comment: The app is no more available on Play Store. Is there any replacement solution?
Comment: @118218 You can try with this https://play.google.com/store/apps/details?id=com.eolwral.osmonitor
Comment: This is easy and worked for me. This should be the accepted answer, Thanks.
Comment: @AliSajjad I haven't had a chance to really test it out, but check out my comment I left [here](https://stackoverflow.com/questions/20778072/sniffing-an-android-app-to-find-api-url#comment137109519_58681628)
Answer: In windows 10 machine just follow the below steps:

Go to Settings > Network & Internet > Mobile hotspot and enable Share my internet connection with other devices.

Connect your Mobile Device to that shared hotspot.

Now for getting internet access in your mobile click on Change adapter options.

Go to properties by right click on the the Network Adapter from which the internet is
being shared to your windows machine.

Tick the Internet Connection Sharing  options in the Sharing tab by selecting the
appropriate connection (Local Area Connection used by mobile device) and click ok.

Now you will be able to see all the network traffic of the mobile device in Wireshark if you select the Local Area Connection used by mobile. For filtering the result by http traffic you can enter http in the filter field and for https web traffic you can enter tls.handshake.type eq 1
Comment: easy solution, but for analyzing HTTPS content with modern Android Apps it's nearly impossible
Answer: Download Android +6.0 image for PC from this site: https://www.android-x86.org/.
For example: https://www.android-x86.org/releases/releasenote-6-0-r3.html
Make sure that your app works with this Android version -- you can check the minimum Android version on Google Play store --, and don't take a too high number for the Android version: the higher the number, the more security constraints is has.
Install VirtualBox, mount the ISO image, boot Android, and install the app through Google Play.
Now you have a few options:

If traffic is unencrypted, you can log all NIC traffic to a text file. e.g. VBoxManage modifyvm "vm-name" --nictrace1 on --nictracefile1 c:\file.pcap (cf. here), or just follow the steps outlined in this answer with Wireshark.

If traffic is encrypted, you can't use (1) but you can use a man-in-the-middle approach. An app that allows this is HttpCanary (renamed to Requable?). It will make a VPN connection and redirect your traffic through that VPN. It decrypts and works well, but take care with your private data.

If the app is using certificate pinning, then it becomes more complicated. Read this blog. You will have to use this approach on x86 images. Note that in that article, the author is using Android x86 8.1 (not x64!) and Xposed Android SDK27. Good luck!!
Comment: HTTPCanary was the only solution that just worked for me
Comment: Honestly think this should be the accepted answer! HttpCanary is what I used in the past and I forgot the name since it was removed from the app store. Got the APK and able to introspect my APIs just fine :)
Comment: Looks like it has been renamed to [Reqable](https://github.com/reqable/reqable-app)
Answer: Use debug proxy. Click on the play Button and you will be able to capture URLs and view more details
https://play.google.com/store/apps/details?id=com.dans.apps.webd
Answer:
install  virtual box and  genymotion
http://www.2daygeek.com/install-upgrade-oracle-virtualbox-on-ubuntu-centos-debian-fedora-mint-rhel-opensuse/
and http://www.2daygeek.com/install-genymotion-android-emulator-on-ubuntu-centos-debian-fedora-rhel-opensuse-arch-linux-mint/#
Run genymotion .
3 . after that your desire android ADV install .
now start wireshark with root access
Answer: try classic tcpdump
$ tcpdump -D
1.eth0 [Up, Running, Connected]
2.any (Pseudo-device that captures on all interfaces) [Up, Running]
3.lo [Up, Running, Loopback]
4.bluetooth-monitor (Bluetooth Linux Monitor) [Wireless]
5.usbmon2 (Raw USB traffic, bus number 2)
6.usbmon1 (Raw USB traffic, bus number 1)
7.usbmon0 (Raw USB traffic, all USB buses) [none]
8.nflog (Linux netfilter log (NFLOG) interface) [none]
9.nfqueue (Linux netfilter queue (NFQUEUE) interface) [none]
10.dbus-system (D-Bus system bus) [none]
11.dbus-session (D-Bus session bus) [none]
12.bluetooth0 (Bluetooth adapter number 0)
13.eth1 [none, Disconnected]

Answer: I know that this thread is quite old but in 2022 using Postman Proxy can help.
Check this link out to see the simple steps
https://blog.postman.com/using-postman-proxy-to-capture-and-inspect-api-calls-from-ios-or-android-devices/
see here to setup for https traffic https://learning.postman.com/docs/sending-requests/capturing-request-data/capturing-https-traffic/
Answer: You can use this: https://github.com/kendarorg/HttpAnsweringMachine
Is able to record (change and replay) all http AND https calls plus intercepting all servers contacted. Just set it up like this: https://github.com/kendarorg/HttpAnsweringMachine/blob/main/docs/generated/googlehack_android.md add the dns and ssl certificates for the addresses you need to capture then record them (https://github.com/kendarorg/HttpAnsweringMachine/blob/main/docs/generated/localsample.md). It will store everything readable. Just need a pc or mac with java 11 and is ready to start :) PS I am the creator of the project :p

Sniffing an Android app to find API URL


Could an animal have a set of scales supporting its body instead of a spine?

Question: Could an animal, similar in size and lifestyle to a hippopotamus, be supported by a set of hard, exposed scales instead of a spine and a ribcage? The scales would not be fused, but connected by joints. The animal has limbs and a skull similar to tetrapods, and a sternum like that of a spider (except that it is mineralized like the rest of the skeleton). It is a piscivore, but will eat terrestrial animals if they are available. It breathes air and has the lungs, and other internal organs, of a tetrapod. It has a sprawling posture, and walks with its sternum sliding on the ground when out of the water
Comment: What about turtle-like creatures ? They walk on their sternum and their rib-cage has evolved into a shell. Some leather around, and off they go ...
Comment: @a_donda Turtles have a single fused shell, this creature has many scales
Comment: While I think this could be made to function, I think it has the less advantageous parts of both designs, and would be eventually out-competed by other more specifically evolved animals (possibly descendants with an exoskeleton or ones with bones/spine and no armor to be more nimble). Armor is there to protect from bad things, and a big predator will crush your creature, while slowness means fish will be harder to catch.
Answer: There are some smaller insects with many smaller "scales" or segments of armor, like an armored centipede which indicate that such a design is probably possible:

That said, in today's climate and atmosphere conditions, extremely large insects are no loner possible due to (probably) the lower oxygen content in the air and the scaling inefficiencies of exoskeletal creatures suffer from. Still, if your creature spends a lot of time underwater, size limitations can be somewhat looser as it doesn't need to support itself completely or maintain full mobility on land. This is where the largest exoskeletal creatures are found today, in the ocean:

It is thought that in prehistoric times, extremely large insects were found on land, ranging into the 2-3 meter size range at maximum, so I don't see any hard reason such a creature shouldn't exist. Here are some artistic renditions:

In general though, while such a creature would probably be "designable", I don't see how it would evolve naturally or what evolutionary advantage having no internal skeleton would pose. For example, insectile and thus exoskeletal creatures typically have many legs because the design favors many smaller actuators instead of only four thick and powerful legs and making the leap from insect-respiration to a lung-based approach is also quite the leap. Additionally, exoskeletal approaches typically require a complex, incremental, shedding process which makes growing to very large sizes difficult compared to the endoskeleton approach.
I really don't see the advantage to ditching an internal skeleton, as it's clearly still possible to be heavily armored, four legged, and mostly aquatic while reaching multi-meter sizes:
Comment: Don't forget sources for pictures where needed!
Answer: Probably not.
Your scale system seems to be forgetting about something very important: the ribcage and spine don't only provide structural support, they serve as anchor points for the limbs and neck.

In this image you can see it
This image made by YishanJiang can show fairly well how the spine and ribcage provide important connection points to the limb and neck muscles. Now imagine we magically remove the entire ribcage and vertebrae and leave a single line of osteoderms on top and a hard bony structure like a spider sternum on the bottom. Now we have a hippo with a group of osteoderms, an exposed spinal cord and organs and an inability to property use its limbs. The only way this could properly work was if instead of a group of scales the animal had an actual exoskeleton-like structure in its abdomen that provided proper attachment points to the muscles, more similar to an armadillo's shell.

However, not only do armadillos all still have a spine and ribcage, other prehistoric armadillo-like creatures that were more similar in size to the hippo, like glyptodon, all had osteodrems arranged in a shell-like structure, and even then they still kept their spine, even if it had its servical vertebrae fused together to better support their carapace. Furthermore, like glyptodon also shows, a large carapace, even in the form of segmented plate-like structures, is usually very heavy and requires proper support (just look at glyptodons, their strategy clearly didn't involve running around or walking along the river bottom), and we can't really make these plates too light by removing material because they need to be capable of enduring the working of the muscles as the new places they'll attach to.
So is it possible for it to exist? Arthropods show use its not impossible to survive with as exoskeleton providing support. Is it likely to evolve? Most likely not. Turtles transformed their sternum and spine into a shell they could use as a defense, while mammals and that one eccentric crocodilian relied on osteoderms to have a shell-like structure for protection, with zero instances of an armored animal simply ditching its spine and ribcage to rely on the shell for support (and for good reason, since the shell itself requires the animal to be able to support it due to its weight). Hippos not only don't need any osteoderm armor since their natural anatomy and fat deposits make them pretty tough animals that can potentially shrug off being attacked by a pack of lions by default, having a shell like structure for protection and structural support would probably only weight them down and make them less capable of what they do, and having a set of loosely connected scales sounds even worse as a place for them to anchor their muscles to.
Comment: Great answer!  The way I'd put it is that in, say, an arm, a single bone can be shared by skeletal muscles pulling from all directions.  But nothing can pull from *outside* an exoskeleton, so more skeletal elements are needed for movement in multiple directions.  (A continuous exoskeleton therefore needs to be heavier than a single bone)  The square-cube law makes such redundant skeletal elements more practical for small organisms because the skeleton can be a lower fraction of body mass for any given arrangement.


m4 sendmail.mc command fails no error

Question: I'm trying to make some changes to my configuration file in sendmail using this command:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

The problem is, it's not working, or at least I'm pretty sure it's not. There is no output at all. Not to stderr, or to the file sendmail.cf. So I'm completely stumped, that, and I can't wrangle google to give me any results to this specific issue, which I am pretty sure is a case of m4 failing for some reason.
And I hate to mass paste this entire thing, but here is my mc file...
divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl #     /etc/mail/make
dnl #
dnl include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # Do not advertize sendmail version.
dnl #
dnl define(`confSMTP_LOGIN_MSG', `$j Sendmail; $b')dnl
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
dnl define(`confLOG_LEVEL', `9')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl define(`SMART_HOST', `smtp.your.provider')dnl
dnl #
define(`confDEF_USER_ID', ``8:12'')dnl
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
dnl define(`confAUTH_OPTIONS', `A p')dnl
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl # Please remember that saslauthd needs to be running for AUTH.
dnl #
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl #     cd /etc/pki/tls/certs; make sendmail.pem
dnl # Complete usage:
dnl #     make -C /etc/pki/tls/certs usage
dnl #
dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
dnl define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
dnl define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SENDMAIL', `groupreadablekeyfile')dnl
dnl #
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl #
dnl # The following limits the number of processes sendmail can fork to accept
dnl # incoming messages or process its message queues to 20.) sendmail refuses
dnl # to accept connections once it has reached its quota of child processes.
dnl #
dnl define(`confMAX_DAEMON_CHILDREN', `20')dnl
dnl #
dnl # Limits the number of new connections per second. This caps the overhead
dnl # incurred due to forking new sendmail processes. May be useful against
dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address
dnl # limit would be useful but is not available as an option at this writing.)
dnl #
dnl define(`confCONNECTION_RATE_THROTTLE', `3')dnl
dnl #
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
dnl #
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl #
dnl # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment
dnl # the following 2 definitions and activate below in the MAILER section the
dnl # cyrusv2 mailer.
dnl #
dnl define(`confLOCAL_MAILER', `cyrusv2')dnl
dnl define(`CYRUSV2_MAILER_ARGS', `FILE /var/lib/imap/socket/lmtp')dnl
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 465, but
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
dnl #
dnl # For this to work your OpenSSL certificates must be configured.
dnl #
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
dnl #
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
dnl # device. Remove the loopback address restriction listen to the network.
dnl #
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl #
dnl # enable both ipv6 and ipv4 in sendmail:
dnl #
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
dnl #
dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
FEATURE(`accept_unresolvable_domains')dnl
dnl #
dnl FEATURE(`relay_based_on_MX')dnl
dnl #
dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`localhost.localdomain')dnl
dnl #
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
MASQUERADE_AS(`ichangedthisforthepost-but-just-the-name.com')dnl
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl

Answer: I figured out the answer on my own before I even got a single comment, or anything. The problem was this line here:
dnl include(`/usr/share/sendmail-cf/m4/cf.m4')dnl

I needed to uncomment it:
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl

That was it...

m4 sendmail.mc command fails no error


Why do I have to add System.Data.Entity to use System.Data.Objects?

Question: I am still learning about programming as you can probably tell by my question.
How come I have to add System.Data.Entity as a reference to my project to use System.Data.Objects?  Does Objects live in namespace System.Data.Objects?  Wouldnt it make sense for Objects to live in System.Data.Entity.Objects?
Answer: The .NET namespaces are cross-assembly.  This allows the library designers to expand particular namespaces as appropriate without polluting core libraries with non-core functionality.  The naming of individual DLLs is unfortunate, but it is not intended to reflect namespace information in the way you're thinking.
In your example, System.Data.Entity is a DLL containing elements from a number of different namespaces.  One of these is System.Data.Objects, as you've discovered.
Answer: Namespaces and assemblies are entirely separate concepts. Sometimes - heck, often they will match up, but they certainly don't have to. You don't tend to use the mscorlib namespace, for example :) Likewise most of the System.Linq types are in System.Core.dll. One assembly can contain types in multiple namespaces, and multiple assemblies can contribute to the same namespace.
It's worth keeping the two concepts as distinct in your mind as possible. Fortunately it's easy to find out where a type "lives" in both respects from MSDN.
Comment: That further clarifies @mike answer. Thanks!
Answer: The System.Data.Objects namespace is defined in System.Data.Entity.dll.
Answer: The assembly is called System.Data.Entity which means the DLL System.Data.Entity.dll.
System.Data.Objects is a namespace within that assembly.
A single assembly may contain one or more namespaces possibly all with different names.


To which extent language exists disconnected from the physical world?

Question: If I would put you in a closed room with a computer containing terabytes of alien written symbols. Those aliens are from another dimension where the physical laws are different and our understanding of the world and needs do not apply. Given as much time and computing power as you want, how far would you be able to go in your understanding of their language and way of living?
Comment: Closer to home: What do computers understand of our world?... What does a robot with light sensor eyes understand? Personally, I think our own knowledge of *a* physical world would help in your scenario. But all the specific identifications could be as uncertain as precious stones in the Bible...
Comment: Since there is no way to actually come up with an answer on a factual basis and we couldn't decide which answer is right, are you looking for the best-looking opinion?
Comment: @user3091275 Unfortunately that's not what the Stack Exchange model is good for.
Comment: Yes, that's another way to frame the question. In NLP you can generate vector representations from symbols alone (unsupervised learning). My question could be: how far can we go with this approach ? Unsupervised learning is only making use of co-occurrences of symbols in a large volume of text. How far can simple co-occurrences take us?
Comment: Interesting viewpoints / references to relevant articles or books. I'm more looking for a discussion than an answer. The answer bringing the more arguments would win.
Comment: Went to Quora, wish me luck: https://www.quora.com/unanswered/To-which-extent-language-exists-disconnected-from-the-physical-world
Answer: What we mean by understanding a thing is fitting it into our understanding of the physical laws of our universe, so the answer is: no way. If you could go any way in your understanding of this hypothetical alien language, it would show that there was after all something in common between your and the aliens' understanding of the physical world.  Thus, you cannot understand.
There is a fictional working out of this idea which, though it is not scientific, is nonetheless worked out by a brilliant scientific mind.  See Fred Hoyle's The Black Cloud. On his deathbed, the protagonist scientist who has tried and failed to conform his thinking to that of the alien's idea of what the world is like, conjectures that he might have succeeded if he had been a newborn, who had not yet learned anything about humans' ideas of what the world is like.  (I would be less optimistic.)
Answer: As for understanding their language, it depends on what you would consider "understanding". Given sufficient training data, we may be able to devise rules of its grammar, without knowing what any of it refers to. This is pretty much how most language models work for us at the moment. You might talk to your phone and tell it, "Make an appointment with Dr. Smith for tomorrow at noon". Your phone would follow through, and may mark "Dr. Smith" as the person with whom you have the appointment, but it would have no conception of what a person is. Given your scenario, we will never get to the stage of comprehending their language to understand their lived experience in any capacity. The idea is further explored in Searle's paper Minds, Brains, and Programs.
What's missing in your scenario is covered in the topic of the symbol grounding problem.
However, not all is lost. Given a suitable corpus of their language, we may be able to figure out their formal mathematics. By that, I mean, the kind of mathematics that Russel & Whitehead got around to formulating in Principia Mathematica. As a result of that, we may understand some of their mathematical proofs, and that may include theorems not yet proven by humans so far.
Comment: Thanks a lot for your answer! I really like the thought of being able to relate to a completely alien language through mathematics ! I am still processing the content of the links you provided.
Answer: It's absolutely impossible to find out if the something is a language or not, if we don't have even a tiniest clue. If you're, say, John, and in some galaxy you find some stars situated so that they look like to make the the shape of the word "John", you can never know if it was intended or it was just a coincidence. We cannot know if the patterns on the Andean textiles are symbols of their ancient script, we cannot know, if the patterns of the sunspots are messages from an alien race... Without a clue or feedback nothing can be identified as a language, for languages can be immensely different.
Comment: No, people have explored this topic in some detail already. See this for example: https://www.math.dartmouth.edu/~carlp/PDF/extraterrestrial.pdf
Comment: @prash - OK, but that's the case of extremely rare fortune, there's the other side described by Stanisław Lem in his sci-fi novel [His Master's Voice](https://en.wikipedia.org/wiki/His_Master%27s_Voice_(novel)). Moreover, an alien language can be in the media absolutely imperceptible by humans or their machines.


what happens if you delete a category in EE?

Question: What happens when I delete a category? We have created far too many categories, in a hierarchical list. I want to reduce it from 100 to 15 by deleting the sub-categories. Will the article then default back to the parent category? Or will it be completely detached from any category?
Answer: Lets make it simple.
Suppose I have a category named Blog and have sub-categories like Articles, news, magazines. My Tree will look like this:

Blog

Articles
News
magazines

Now, If I assign any entry to "News" category. Later if I decide to remove "News" category, My entry will still relate to it's parent category (In this case Blog)
Deleting category will delete the category from exp_categories and exp_category_field_data


Cyborg movie from the 80s where the protagonist dies in a plane crash and is made into a cyborg

Question: I am looking for an older cyborg movie. In the beginning the protagonist dies in a plane crash, and later is made into a cyborg. Can't remember most of the movie, but at the end his maker turns himself into a red cyborg and fights him. They each have a half head still human and the other half has a red eye.
Answer: Quite probably Eliminators

Eliminators is a 1986 science fiction action film directed by directed by Peter Manoogian, starring Andrew Prine, Denise Crosby and Patrick Reynolds. The plot centers around a "Mandroid" constructed by an evil scientist from the body of a downed pilot, who teams up with the scientist responsible for android technology, her pet robot Spot, a riverboat guide, and a martial arts warrior.

....

Arriving in South America, Hunter hires the best river boat captain she can find in a seedy bar, one Harry Fontana, and they head down a river. After running afoul of rival riverboat captains and Reeves' men, they end up finding the Mandroid's crashed plane after an encounter with a tribe of cavemen brought to this time by Reeves' time travel experiments. They also meet Kuji, the ninja son of Doctor Takada, who has come to find his father. The Mandroid informs him that his father is dead, killed by Reeves. He joins the group, which then storms Reeves' headquarters, only to be captured by Reeves, now a cyborg himself, more advanced than the Mandroid, whose body is designed to look like Roman armor. Reeves plans to travel back to ancient Rome and become the new Caesar.

Comment: This one comes up fairly often on the site. If it is the correct one, please click on the checkmark by the voting buttons to accept.
Comment: https://scifi.stackexchange.com/questions/75826/80s-or-90s-movie-asian-man-jumps-through-large-spinning-fan/75846#75846 and https://scifi.stackexchange.com/q/74121/23243


Can I transition from real to fictional places in fantasy series?

Question: I've started to write my first Fantasy novel. But there's one question that always bugs me. If I were to have a Kingdom, of course I would have a fictional name for it. So if I have a non-fictional place in my first few books, can I have a non-fictional setting later on in the series?
Comment: It's not clear to me why you would "of course" give your fantasy kingdom a non-fiction name.
Answer: Fantasy literature is full of examples of characters passing between real and imaginary worlds. It is one of the core theme of fantasy literature. Indeed, the roots of fantasy literature are all in the long folk tradition that has seen a magical world existing side by side with the real world, and with passages between those worlds, in both directions.
I think it is probably fair to say that the fantasy that happens entirely in an invented world a la Tolkien is probably a very recent thing, at least as a dominant form of the art. It wasn't something his contemporaries practiced. C.S. Lewis' work was all about children passing from England into Narnia. Charles Williams's books (which deserve to be far better known than they are) were all about incursions of Faerie into the real world.
Alan Garner, Susan Cooper, Madeleine L'Engle are all examples of writers who work was about the border between worlds and transitions between them.
In short, no, there is nothing to prevent a transition from the real to the imaginary world. What you do have to be careful about, though, is maintaining a consistent overall tone and mythos. If the transition comes out of the blue and upsets the order of the story world, you are likely to lose your audience. Foreshadowing is your friend.
Comment: I will second the final paragraph. You have to let your reader know that the real world exists for your story if you start in the fantasy world (or vice versa). Suddenly plunging characters into a world we didn't know existed is very, *very* jarring. Look to Harry Potter. Rowling makes sure we know about the existence of magic and wizards in the very first chapter (book 1). As a result, we are not surprised when Hagrid arrives and the truth comes out. Imagine reading those first few chapters without that knowledge.
Comment: Moorcock did this with the Von Bek series.  The novels contain a realm called Middlemarch, which lies in the gaps between nations.
Comment: There's one series I've heard of where some of the action is set in London but the bulk of the action is set in this school called Hog-something.
Answer: "So if I have a non-fictional place in my first few books, can I have a fictional setting later on in the series?"
If you mean, the first three books in the series are rigorously historically accurate historical drama set in, say, Britain, and then in the fourth book the characters head off to the Land of Oz, this could be very tricky to pull off. I can enjoy a historical drama like Downton Abbey. I can enjoy a science fiction story like Star Trek. But if on the fourth season of Downton Abbey the characters were beamed aboard the Enterprise and headed off to another planet, wow, that would have to be done VERY skillfully to work. Most likely I'd say "oh give me a break" and turn it off.
Jumping from one genre to another is possible, but very hard to pull off.
Comment: The question was not about jumping between genres, but between fictional and real settings.
Comment: There are plenty of fantasy stories that switch back and forth between a real place and a fictional place. It's fairly common for a fantasy story to start in the real world and then the characters are somehow transported to a fantasy world. If your "first few books" are set in the real world and then in the next book they are in a fantasy world, that sounds to me like you are switching genres. Maybe I'm misunderstanding what the OP meant by that sentence.
Comment: That's true, and maybe that's what the OP means and maybe not.
Comment: The question says, quote, "So if I have a non-fictional place in my first few books, can I have a fictional setting later on in the series?" As I said in my answer, it is ambiguous if that means that the first few books are not fantasy but he now wants to make the next book fantasy, or if all the books are fantasy but the first few are fantasy set in the real world.
Comment: Mark Baker covered it in his answer. If you train your dragon in the Bronx, and then fly to Narnia, it is not switching genres, it is switching settings.
Comment: What part of "transition from real to fictional places in *fantasy series*" seems ambiguous to you?
Comment: Read the title of the question
Comment: What is the point of this argument? I said, "if you mean ..." If that's NOT what the OP means, then fine, my answer is irrelevant.


How can I make vertices on a cylinder create a circle?

Question: How can I make vertices on a cylinder create a circle (like in this tutorial https://youtu.be/cHbOCSkqmo8?t=2m43s) ?
Comment: @marcus I like the first idea of your friendly comment.
Comment: Honestly, I won't do that. I'd rather ask somewhere else. 1. The video describes perfectly well what I want to do. No word could describe it better. 2. This is definitely NOT off-topic. 3. If someone does not understand, well, I suggest to not answer at all. 4. Downvoting this is just so lame. Get a life...
Comment: You were actually right about that it wasn't offtopic. As it was then it should've been closed as "unclear what are you asking". If the question is not clear the questioner is advised/asked to add clarification and that's *totally* fine. The question most likely was downvoted because of one reasons for that "the question doesn't show any research, is unclear". So read the rules of the site. Words *can* describe what you want; if you can't add 2 images - before and after. Now your quesiton is clearer.
Comment: @marcus asking a question with just a link to a video is "just so lame." Really you cant be bothered to write your question in a way so that it is answerable without going somewhere else? You don't have to get all in a huff over the DVs. This site do not allow link only questions or answers. The post must be self standing. Just reading your question it *was* unclear. Thus why it got closed (and DVed).
Answer: You may use To Sphere operation (as @Dontwalk pointed), but Loop Tool's Circle creates much better result.

Activate the Loop Tools add on in User Preferences (Ctrl+Alt+U). Apply the transformations to the object (Ctrl+A-->Rot&Scale). Select the edges on a cylinder you want to transform to a circle and snap the cursor to it (Shift+S). Press W-->LoopTools-->Circle. Finally uncheck the Flatten checkbox in a Circle panel of a Tool Shelf (T).

You may then extrude the circle inwards as was shown in the tutorial.


Looking for Geoserver REST PHP examples

Question: I am in deadly need of geoserver rest php scripts for creating workspace, store, publishing layer etc. I have done a lot of googleing but couldn't find any. In geoserver site only examples using cURL are given. Can anybody provide me PHP scripts
Answer: Geoserver REST API can be constructed using
Path
GET (read)
POST (create)
PUT (update)
DELETE (delete)
http://geoserver.org/display/GEOS/User+Collaboration+REST+API
for selecting a SLD you need to GET {yourserver} {port} {user} {password}
/geoserver/rest/styles (exists already in rest api)
This might help for you too
http://geoserver.org/display/GEOS/GeoExt+Styler
Answer: Have you seen http://docs.geoserver.org/stable/en/user/restconfig/rest-config-examples/rest-config-examples-php.html
Comment: It has only scripts to create a workspace. What about creating a store,publishing a layer and selecting a sld?? where can I find thesE?

Looking for Geoserver REST PHP examples