What is the best way to save an image to a publication that will allow you to zoom in to greater detail

Question: I am working on a project for a small organization that publishes PDF magazines to ISSUU.com. We are discussing adding infographics to the publication, but some can be tall and can't be used in their full size withing the boundaries of the page.
Is there a way to save an infographic or insert it into the publication that will allow the viewer to zoom in on the content? Can we still use PDF, or do we need to publish in something else before uploading to ISSUU?
Our publication is small and working off of a PC, not a Mac, but we are working towards expansion. Any advice you can give will help us, if not at the present, then with budgeting for future purchases of better resources and tools.
Comment: I don't quite understand the question. I don't see how saving the info graphic in another format would help you fit in any better. -- Maybe you could have a text link or cropped image of the info graphic that is linked to an external pdf with the full image or if at all possible, link to a specific page where there is more room ( http://issuu.com/services/customize/links.html )?
Comment: I think there's two parts to this: what can be done to include awkwardly long infographics in publications in general, which we can help with (see answer below), and what features does ISSUU have for magnifying images or attaching files, which probably only ISSUU themselves can answer.
Comment: What about embedding a swf?
Answer: You're not the first to have this problem: a lot of tall 'tower' infographics can be very awkward to re-use. There's a bit of a trend away from them since they can be awkward on social media outside of blogs, tumblr etc as well (they can also be associated, often unfairly, with the trashy end of the market where graphics get long due to lack of quality control rather than an excess of interesting information).
If you've got one of the high quality ones that is long for good reason, here's a few possible options:

PDF attachments: Regular PDFs can have attachments - other files embedded in the PDF. There's also such a thing as 'PDF Portfolios' but my experience of these is that they're a bit of an inflexible powerpoint-inspired early 2000s monstrosity. I have no idea if ISSUU supports PDF attachments (you should maybe ask for their advice directly - post an answer here if they suggest any useful tips). I did a short write-up on PDF attachment options for a slightly similar question about including raw data in PDFs, which might help.
Ask about reorganising it: Well-designed multi-message infographics usually organise their messages and information into bite-size chunks that lead into each other in some kind of narrative. With the original designer and/or copyright owner's permission (and you should be in contact with them anyway to get permission to re-publishing their work), you may be able to divide the infographic's chunks into panels which can be organised to run across multiple pages of your magazine. Be careful though that you don't ruin it... Some designers might volunteer to quickly do the chopping up and re-organising for you to make sure it looks right to their standards (others never would, or would charge to, varies from person to person).
Pull out and magnify sections of interest: If the purpose of including the graphic is to illustrate or demonstrate certain points, have it scaled down on the page as a central column, and use the whitespace on either side of the tower for magnified call-outs for particularly interesting chunks. Then include an easy-to-type short-form link (e.g. bit.ly/some-graphic) to the full thing. So, people get an idea and get the point you're making, and can then go see the full thing if they're interested.
Do what books do: Look at how infographics showcase books get around this problem, and talk to ISSUU about the best way to do the digital equivalent. Since these are things the print industry does, someone is bound to have asked before and they should have some suggestions:

Rotate it: Placing the graphic landscape across a double-page spread (bare in mind though that it's easier for a reader to turn a book around than a computer monitor)
Fold out spreads: Having a fold-out spread for particularly large ones, again rotating the image if necessary. PDFs support varied page spreads, but talk to ISSUU about whether their digital platform does.

Some books get around this problem by being absolutely absurdly massive... (Image from the blog ixycreativity.ro). Not sure if that's an option or not...
Comment: I think there is good advice here, but the important advice embedded in the original question is not emphasized enough: ISSUU.com uses a proprietary PDF viewer, so the question isn't "is it supported in the PDF standard?" but rather "is it supported by their viewer?" My guess is "no" partly because allowing and supporting arbitrary binaries embedded within documents becomes a technology nightmare and a large security surface for HAX.
Comment: Agreed - as I said in my comment to the question and in bold in the first point of my answer, what can be done with ISSUU depends on questions about what ISSUU is capable of which should be addressed to ISSUU staff.
Comment: Hi all, thank you for the great responses! I am awaiting reply from ISSUU, but taking a step back, going slightly off topic for a second... I seem to remember viewing an infographic online, I forget where, and without leaving the page I was on was able to zoom in and view the image in greater detail. The concept was very much similar to those old novel miniatures of news papers (real life, not online) that you would have a cheap magnifying glass.
The concept we are trying to develop with our newsletter is the appearance of an 8.5x11 page, but filled with greater detail as you zoom in.
Comment: @Jason If it was on a web page it was probably something like [Zoomify](http://www.zoomify.com/), there are loads and loads of little Javascript widgets like that, browse them. But they're based on regular image files (or, images chopped into tiles), not PDFs


app engine connected android tutorial - localhost:8888/index not showing registered device

Question: I did the google tutorial on the app engine connected android app . Both the app engine and the android app are working fine, when I register the emulator device. I get the screen saying  registration succeeded and Im able to view the registered device on the localhost:8888/admin/_ah page. However when I open the localhost:8888/index file to send a message, the page says "searching for devices" instead of listing the registered device. Have any of you encountered a similar problem? Any help would be appreciated..Thx..
Answer: I came across the same problem. here is what I understood before trying to resolve the issue.
- go to yourproject-AppEngine-->war-->index.html
This html file is what is loaded when you go to localhost:8888. Now look inside the code of this html file. There are few javascript methods being called here. Look out for two methods
<code> // This method loads the deviceinfoendpoint and messageEndpoint libraries
 function loadGapi() {
 gapi.client.load('deviceinfoendpoint', 'v1', function() {
   updateRegisteredDeviceTable();
 });

 gapi.client.load('messageEndpoint', 'v1', function() {});
 }
</code>
and
<code>function generateRegDeviceTable(deviceInfoItems)
</code>
These the two methods which do the job of getting the registered devices from datastore and display on html page.
You can play around with this html file to debug the reason. In my case the reason was the backend libraries were not registered. When I am creating my own entities and using them to be displayed in the index.html then it works fine. the GCMEndpoint libraries come default when you install GPE and enabled the backend engine. Hence just redo the process and manually register the libraries and your error should be gone.


Sprite Kit physics variables comparing to Cocos2d+Box2d

Question: I trying to rewrite simple game (developed by me with Cocos2d+Box2d sometime ago) using Sprite Kit framework. Everything looks much simpler in Sprite Kit, which is great, but I have a problem adjusting physics world parameters in the new project. I have noticed that sprites created using exactly same graphic images (all have basic rect-based bodies) have four times lower mass in Sprite Kit than it had in Cocos2d+Box2d. Setting bodies density to 4 solve the problem, unfortunately that's not the main issue. It looks like the same problem with 4-time multiplier works for all forces in the physics world. I have done some testing in Sprite Kit and create a body with mass four time higher than in Cocos2d+Box2d, I have also set the world gravity to be four time lower than in Cocos2d+Box2d. As a result physic in both projects (first using Cocos2d+Box2, second using Sprite Kit) behaves similarly. I can't find anything like PIXEL_TO_METER_RATIO (that was available in Box2) in Sprite Kit. Is there any option that allows to adjust the physics world in Sprite Kit to behave like in Cocos2d+Box2d without multiplying all forces, masses etc? Maybe there is some kind of configuration property that allows to adjust it. If I leave the same values for gravity, mass and forces in Sprite Kit that I was using in Cocos2d+Box2d everything in the game will be simulated too fast. My question is how to deal with problems like this when migrating from Cocos2d with Box2d to Sprite Kit framework?
Answer: The only solution is to re-tweak the forces and other settings until things feel right.
Internally Sprite Kit uses Box2D but we have no way of knowing if and how Apple may have modified it. What is known is that they use different default settings for the Box2D world which means physics values can not be ported as is and expect the same results.
I believe this was discussed in the developer forum (under Sprite Kit) where someone investigated the actual numbers for changed settings. Note that these are settings in Box2D's code most users won't even consider to modify, so we have to assume Apple had their reasons to change them in the first place.


infopath connecting to an access database on Sharepoint

Question: I have an Access Database (accdb) with relationships (and linked tables) that is incompatible with Access Services. It is currently saved locally but I have it on a SharePoint site as well.
I also have created an Infopath form that queries the local Access Database for different fields, and is able to submit data back to make changes to the tables, etc.
I now want to shift the connection to the database that is saved on the SharePoint site. I went to modify my Main data connection (the locally saved Access Database), changed database to point it to the access database that is on the SharePoint site. It definitely recognized that it was an Access Database, because it even showed me my tables and queries and asked me to select a table. But when I do so, it says there is "An unspecified error occurred while attempting to
connect to the data source. Microsoft Office InfoPath supports only MS SQL
Server and MS Office Access databases. Please check the connection to ensure
it uses one of these two databases."
Would any of you know how to resolve this error, without having to set up SharePoint Lists to connect back to my Access Database (I don't see how this would allow the initial querying of the data that my InfoPath form has to do).
Thanks in advance for your help.
Answer: Make sure your database it Access 2013 or older, older versions of access aren't supported in SharePoint to modify.
I would create with Access 2016 a database that lives in the SharePoint Data Connected Library and connect to that.


Can I create a second filestream container on an existing SQL Server 2008 database without going offline?

Question: Our production DB is using the FILESTREAM option for our sharepoint environment. The volume where the files are residing is getting full and I am planning to add another volume to ease space issues. Is the solution as simple as creating another filestream container and adding this container on the existing filestream filegroup? Would SQLServer take care of balancing among the two volumes?
Answer: Unfortunately no, not in SQL Server 2008.
According to FILESTREAM Overview - multiple containers can be added to a single FILESTREAM Filegroup but only as of SQL 2012.
Comment: You're welcome. The best way to show your appreciation/love is by giving up votes/marking it as the answer.


The importance of changing DNS when Using Antifiltering software

Question: Is it safe that sometimes my Anti-filtering program does not change the DNS address?
Answer: If your DNS queries are being resolved by your ISP, then yes, you should change your system DNS server to 220.127.116.11 or 126.96.36.199 (Google's public DNS resolvers).
DNS filtering is performed by the ISP, typically under instruction by a governing body. In this case, the actual DNS server queried is irrelevant, the ISP will drop any DNS queries for a particular domain name, preventing users from resolving it. This occurs irrespective of the target DNS server. However, if you are actually using your ISP's DNS server, then you are giving them a second opportunity to filter your lookups.
Your antifiltering software can work in one of two primary ways;

Out-of-band DNS Queries The anti-filtering software performs DNS queries by dialing out to a C&C server, which performs the actual DNS lookups on your behalf and returns the results to you via an encrypted (SSL) tunnel. This method requires a browser plugin and is rarely used, because it is a terrible hack.
Full Connection Tunneling This is by far the most common approach, your connection is tethered to a remote server via an encrypted (SSL, PPTP, IPSec etc) tunnel, also known as a VPN gateway. All traffic is passed through this tunnel, including DNS queries. Your ISP cannot see what you are doing, instead the ISP of the VPN gateway sees all the traffic, which is why you put the gateway in a country with less strict filtering laws than your own.
Comment: Thank you, I forgot to mention that I am from Iran and filterring is very irritating here.
By your answer I got that they can use the opportunity to filter by DNS, but about the security risk I did not get it. Is it less safe when I use ISP DNS Server or does not make any differences?
Can they get my place If that happen(Using ISP DNS server)?
Comment: If you are using a VPN, then no - your ISP cannot determine that *you* are making the queries even if you are using the ISP DNS. However, if you are using the ISP DNS, you might find that your queries go unanswered all the same. The best thing to do is use a VPN outside your country, and to configure your machine to use the `220.127.116.11` DNS server.


In this BJT circuit why can I apply a voltage divider in the resistors?

Question: I presume that I can remove the capacitors since the circuit uses DC, but then I don't understand why I can apply a voltage divider in the 30K and 20K resistors since the base is connected between them.

My professor changes the circuit into this:
Comment: Are they in parallel?  Looks more like series to me.
Comment: @JRE I know, it was a mistake. But what my professor does to simply the circuit is, he applies a voltage divider at the 20k resistor which gives -4.8V and then takes the parallel of the 30k with the 20k
Comment: Your latest comment describes finding the thevenin equivalent of the divider
Comment: @sstobbe yes, but I don't understand why I can do that
Answer:
I don't understand why I can apply a voltage divider in the 30K and
  20K resistors since the base is connected between them.

The emitter resistor of 1 kohm projects an impedance onto the base that is beta times higher. So, if beta is 100 and the emitter resistor is 1 kohm, the base will look like a loading impedance of 100 kohm. This loading resistance is seen in parallel with the 20 kohm resistor thus, the effective resistance at the base to ground is 20 kohm || 100 kohm = 16.67 kohm. You can use this to determine a more precise value of base voltage to ground.
I estimate 12 volts * 16.67/(30 + 16.67) = 4.29 volts.
What your prof does is find the equivalent series resistance of the 20 kohm and 30 kohm resistors and to do that you parallel them (12 kohm = 20 k || 30 k). He then calculates the open circuit voltage (base disconnected) as being 12 * 20/(20 + 30) = 4.8 volts.
Comment: It is that process I don't understand, why can I "disconnect" the base and how in turn take the parallel of those two resistors?
Comment: *Thevenin's Theorem states that it is possible to simplify any linear circuit, no matter how complex, to an equivalent circuit with just a single voltage source and series resistance connected to a load.* - quote from the web @pedro. So 12 volts, the 30 k and the 20 k can be reduced to a new value of voltage source (4.8 volts) in series with an impedance of 20 k || 30 k. You probably need to go google Thevenin's theorem.
Comment: I know how to do the Thevenin equivalent, I've just never done it in the context of a BJT, that is why I'm having trouble visualizing how it works. I only did it for simple RC circuits
Comment: First thing to do is recognize that 12 volts in series with 30 kohm is exactly the same as a current source of 0.4 mA in parallel with 30 kohm. The 2nd stage then recognizes that the 30 kohm is now in parallel with the 20 kohm giving a resistance of 12 kohm. The third stage is calculating that the modified open circuit terminal voltage is. 0.4 mA into 12 kohm = 4.8 volts. Stage 4 is converting the current source and 12 kohm resistor back into a voltage source of 4.8 volts in series with 12 kohm.


How to calculate salary expectation

Question: I would like to move to another company but I don't know how to calculate my salary expectation . Do i need to calculate  20% of annual salary? or 20% of annual salary plus bonus ?
Comment: Related: [How can I determine a reasonable salary to ask for?](https://workplace.stackexchange.com/q/896)
Comment: If someone told you you should ask for 20% more than what you're getting now, I wouldn't call that particularly good advice (or at least outdated advice) - [there are plenty of resources available to help you determine how much you're worth](https://workplace.stackexchange.com/questions/896/how-can-i-determine-a-reasonable-salary-to-ask-for) so basing expectations mostly on current earnings would not be in your best interest.
Comment: Well, you would **definitely** include your bonus in any calculations.  Your salary "is" your "base" salary plus bonus.
Comment: ...But do consider that unless you're contractually entitled to a bonus, getting one is not guaranteed.
Answer: Not sure what you mean by 20%, but sounds arbitrary. A couple options:

If another company also means another city, consider using a cost of
living calculator (lots available online) to get a sense of relative
price levels, and use that as a weight in your salary calculation.
This is assuming salaries in your line of work and market keep up
with COL.
Sites like Glassdoor can be useful resources for checking salaries.
Just lookup your company and check the Salaries section, for a list
of reported averages by job title. This assumes the company you are
considering is on Glassdoor.
Ask around. Use your professional network on LinkedIn, friends who
may live/work in the city where the company operates, who might know
someone who knows someone who works for your target company, or works in the same geographic location, and might provide an insight of the going rate. This is probably more risky because the advice might be biased, outdated, or based on incorrect assumptions. So I would exercise caution and triangulate (double check) estimates against other sources.

One caveat: As I mentioned here, think twice about communicating salary expectations to prospective employers. They are professionals at such negotiations whereas you might not be, so chances are they will be able to use whatever information you provide to their advantage, not yours. It's one thing to be doing research for your own private knowledge, and another thing to try to come up with a figure that you use to signal your own estimated self-worth. Good luck!
Comment: Depending upon the company, some are awful at calculating salary/wages; often withdrawing the position when they discover new hires want significantly more than the indentured employees. Businesses with work and money can always pay *whatever* and simply either increase the difficulty of one job or give you more hats. Otherwise, an answer that got a  from me.
Answer: Know your value - first and foremost. You need to understand the local market average salary range based on your experience. Specifically years doing this type of job - not total years doing other type of work. You must be confident in what they would pay someone with your same relevant experience.
There are several great resources for this: Salary.com and Glassdoor both have general salary calculators that focus on Job Title and Location. LinkedIn lets you add years of experience and also industries to better hone in on salary ranges (a premium subscription is required but if you are job searching this is money very well spent). There are also industry/role specific salary calculators like the one on our sister site Stack Overflow that include degree, years of experience, etc (all for free) specific to developer and IT roles. For a more in-depth salary calculator look at PayScale and be sure to use "evaluate a job offer" option - you want to be paid for the work you will be doing and not what you do now or in the past.
Once you know your worth here's a strategy for negotiating salary:
If the ranges you find are suitable to your needs, then you should use language like this:
"I am pursuing XYZ job titles in the range of $ABC to $QRS. Based on my experience and market averages for ABC titles in EFG location, this range is very consistent with market rates."
This establishes that you know what you are worth, you have done homework and it gives you a range of salaries that you would be comfortable making. It takes your personal situation off the table and makes the salary negotiation more fact-based. You are competing against others with similar backgrounds - not your past experience - if you can do a job they should not underpay you because you were underpaid at your previous jobs. If they ask you what you are making now - simply say that your

current job isn't really relevant to the kind of work you are seeking
  and I would prefer to use fair market rates. Assuming we mutually
  agree this is a good fit, I would imagine prevailing market salaries
  would be fair to both of us.

Caveat - if you get some incredible bonus or perks or if the job is not a standard industry job these ranges may not work. If you are looking for typical industry jobs these averages will give you confidence to seek what you are worth.
I personally used this approach and it was helpful not only in negotiating my current salary but also for eliminating positions that could not meet my salary range - being transparent saves everyone time and if the data is good (generally I found most of the ranges converged pretty tightly across sites) then it is a fair conversation.

How to calculate salary expectation


(ubuntu 16.04) How can I detect a device independent USB insert event

Question: I am trying to detect an USB insert regardless of the device it is. Eg: A phone, a battery pack, a biometric system etc., which may or may not be recognized by Linux (no drivers or nothing to "Drive/run").
Presumably, Linux will detect the USB insert (independent of the device), and then proceed to register and act on Recognized devices only. For instance it will list recognized USB device details in /dev/bus/usb/ etc. Instead, I would like to trap/process everything that is inserted into a USB slot.
This presumably implies, that I can't depend on stuff like udevadm as it kick in only on recognized devices. This also means that I will need to trap the insert event early on the curve.
How do I do this?
Comment: Some usb devices are "dumb" and just use the socket to get or give power, with no communication on the data pins. Linux does not detect these devices. You can see all the events generated by the kernel when other usb devices are added or removed with `sudo udevadm monitor -k -p`.
Comment: Hardware events (including USB events) get logged in `/var/log/messages`. You should be able to view these with the `dmesg` command.
Comment: @Timothy Pulliam, thanks. Let me try it and will circle with my findings!
Comment: @TimothyPulliam It looks like the kernel is returning messages only for the devices it recognized.
Eg:
When I plugged in an external HDD last messages were:
[45452.482281]  sdb: sdb1
[45452.484858] sd 19:0:0:0: [sdb] Attached SCSI disk
[45453.882985] systemd-journald[274]: Successfully sent stream file descriptor to service manager.
[45452.482281]  sdb: sdb1
[45452.484858] sd 19:0:0:0: [sdb] Attached SCSI disk
[45453.882985] systemd-journald[274]: Successfully sent stream file descriptor to service manager.
Comment: Can you try attaching an unsupported USB device to check for its output?
Comment: Checked with a USB battery pack and my Android phone (Both in developer mode and Non-Developer mode) .... No reaction from dmesg :(
Comment: This can be useful, just delete the bits referring to the ID in the rules file. http://askubuntu.com/questions/844646/running-the-script-when-it-detects-i-o
Answer: I don't believe that you can accomplish this with dumb devices as mentioned in @meuh comment here.. With devices that actually communicate udevadm monitor works fine. Here's an example of plugging and unplugging an android phone (powered on):
$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[115749.498687] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6 (usb)
KERNEL[115749.499591] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0 (usb)
UDEV  [115749.511659] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6 (usb)
UDEV  [115749.516846] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0 (usb)
KERNEL[115767.515839] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0 (usb)
KERNEL[115767.516143] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6 (usb)
UDEV  [115767.517088] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0 (usb)
UDEV  [115767.522116] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6 (usb)

A flash drive produces similar but much more verbose results. If you wanted to make use of this information to trigger some action, you could redirect the output to a file and use tail to monitor the file for new activity.
Tests with an android phone (turned off, but charging) indicated no change whatsoever in lsusb -v |grep Power output which IMHO confirms that dumb devices that just draw or supply power can't be detected.
Another simple way to detect devices that aren't dumb is to store baseline information and compare current info to that. There are numerous ways to do this. One simple alternative to udevadm mentioned above that leaps to mind is to simply collect baseline data for the system without the device to be detected plugged in. For example:
Collect baseline data: lsusb > baseline.txt
Check current data and compare:

while true; do lsusb > compare.txt ; diff compare.txt baseline.txt; sleep 1; done

This will compare the current USB connections to the baseline once every second.
If your script updates your baseline data upon detection you will also be able to detect device removal by this method.
Answer: One way of capturing all traffic over USB is to use wireshark after inserting the usbmon kernel module, as detailed in:
Wireshark USB monitoring
That's about as 'early in the curve' as you can get. But I'm assuming your intention is to use some sort of programmatic trigger, like an event, to do something interesting - so, given that running 'lsusb -t' gives you a static list of inserted USB devices, along with their respective drivers (if they exist), you could create a cron job to run lsusb and compare it with the previous version to ascertain if a new device has been inserted, even if it hasn't a driver associated with it.
The downside to this simple solution is the large latency that cron gives between insertion and detection.


People with similar traits

Question: I am curious as to whether there is a noun or some other, more suitable expression for that group of people which shares my personality type. I often use 'people with same traits or personality'.
Comment: When you say 'mates', do you mean 'sexual partners', or simply 'close friends' (as in the colloquial British English / Australian term, e.g. "I spent last night with my mates down the pub")?
Comment: If you mean people who share your personality type but with whom you don't necessarily socialize [after all, a group of mates may well have very different personalities], perhaps the modern use of 'tribe' is closer.  But that does also imply a lifestyle choice.
Answer: It is more general than personality type but it fits somewhat:
Kindred souls.
Answer: "Birds of a feather (flock together)"
Answer: possibly clique or coterie
I can't comment so I have to write it in an answer
Answer: The best word I can think of is peers.

one that is of equal standing with another :  one belonging to the same societal group especially based on age, grade, or status
a person who is equal to another in abilities, qualifications, age, background, and social status

Peers could refer to anyone who shares your personality or otherwise "belongs to the same group", regardless whether they are actual acquaintances of yours.

People with similar traits


Eigenfunctions of the Laplacian on singular spaces

Question: Consider a compact manifold $M$ with boundary and corner. As an example, we could have the cube $\{(x_1, x_2,..x_n) \in \mathbb{R}^n : x_i \in [0,1]\}$. We could very well define the Laplacian $\Delta$ on such an $M$ with Dirichlet or Neumann boundary conditions. In such situations, are the eigenfunctions of the Laplacian smooth? It seems to me that this requires some sort of elliptic regularity theory for singular spaces (maybe there is an elliptic regularity theory for manifolds with Lipschitz boundaries). A reference would be highly appreciated.
Answer: There is an extensive literature on elliptic problems on domains with corners. Grisvard's book (Elliptic Problems in Nonsmooth Domains) is a good place to start.
Answer: Let me add some other references about elliptic regularity on singular manifolds:
1) B.-W. Schulze and his co-authors have developed a comprehensive calculus for elliptic pseudo-differential operators (in particular differential operators) on singular spaces, including elliptic regularity and Fredholm properties:
1.1) For manifolds with conical singularities and manifolds with edges consider the following books:
B.-W. Schulze. Boundary Value Problems and Singular Pseudo-Differential Operators. J. Wiley, Chichester, 1998.
Ju.V. Egorov and B.-W. Schulze. Pseudo-Differential Operators, Singularities, Applications. Birkhäuser Verlag, Basel, 1997
1.2) For manifold with corners consider the following paper:
Schulze, Bert-Wolfgang. "The Mellin pseudo-differential calculus on manifolds with corners." Symposium "Analysis on Manifolds with Singularities", Breitenbrunn 1990. Vieweg+ Teubner Verlag, 1992.
1.3) For manifolds with corner and edges the following is an upgraded version of the last paper:
B.-W. Schulze, Operators with symbol hierarchies and iterated asymptotics, Publications of RIMS, Kyoto University {38}, 4 (2002), 735-802
1.4) For a more geometric treatment of elliptic operator on singular spaces consider:
Nazaikinskii, V. E., Savin, A. Y., Schulze, B. W., & Sternin, B. Y. (2005). Elliptic theory on singular manifolds. CRC Press.
In these papers/books they approach the problem with the goal of obtaining an algebra that contains elliptic operators and their parametrices (inverses module compact operators). If you are interested in a particular class of operators and need a concrete theory for that specific class you should also check the books of Mazya/Rossman/Kozlov:
Mazya, V. G., and J. Rossmann. Elliptic equations in polyhedral domains. No. 162. American Mathematical Soc., 2010.  (this book might be particularly useful for the Laplacian on a cube)
Also for eigenvalues and spectral theory check this one:
Kozlov, Vladimir, Vladimir G. Mazí̂à, and Jürgen Rossmann. Spectral problems associated with corner singularities of solutions to elliptic equations. No. 85. American Mathematical Soc., 2001.


Why is the question "what character is unbeatable or most powerful" not objective?

Question: Why is the question "what character is unbeatable or most powerful" not objective? Why is it "opinion based?" What is it about it that makes it subjective?
Comment: Because the question is *objectively* unanswerable and Stack Exchange is about objective questions (and answers).
Comment: Shouldn't it be obvious? It's precisely because it is fiction. Thus there's nothing to stop a writer adding a new ability to make their character stronger at any point. There's always another level of Super Saiyan to be had.
Comment: Disagree - which character is most powerful is not possible to answer. *Why* it cannot be objectively answered, is an answerable question.
Comment: @Michael thank you, that is a better way of putting it, I don't think I was clear enough.
Comment: Related: https://www.youtube.com/watch?v=L4_zFYnnn2Y
Answer: Different universes, different rules, different definitions.
Firstly, characters exist in different fictional universes with different rules, so a straight comparison is hard. A good story should have some consistent internal logic, so transplanting a character doesn't work - a Merlin-like wizard might be powerless in the Star Trek universe where magic doesn't exist.
You also run into a challenge in defining 'powerful'. For a simple metric, like strength, you can probably compare (e.g. what is the most they can lift - with the different rules caveat, is that native, with a magic spell, with enhancing armour?) Power is poorly defined though - what speed compares to what strength? Is a genius strategist more powerful than a single skilled warrior? Do you look at achievements or potential? Is ruling a medieval country a greater achievement than a sci-fi planet?
Done in good humour they can be interesting discussions, but without a true answer - so fine on discussion forums, but not SE which looks to provide definitive answers to questions. The site-wide description for these questions is 'gorilla vs. shark'; the consensus application of the rule on SFF is posted here.
Comment: @Michael Yes, there's an SFF-specific writeup on [the site blog](https://thesffblog.com/2015/06/gorilla-vs-shark-not-so-fast/) by the late long-time contributor KutuluMike. It was published there after getting community buy-in [on meta](https://scifi.meta.stackexchange.com/q/7003/31394).
Comment: It may even be important whether they fight when fresh.  There could easily be characters where one would win in a standalone fight, but if they met after hours of grueling battle, the other would.  (More stamina.)


How to stop swinging and rotating during one arm dead hang?

Question: I can two hand dead hang for 1.5 - 2.5 minutes. When I try one arm dead hang I can't stop rotating and swinging, so my time is probably 15 seconds. How can I achieve balance?
Answer: I don't see why you would generate swing during the hang, so I have to assume that you start the hang with some swing. In that case, just make sure you don't release your feet from the platform until you've ensured that your body is at equilibrium.
In order to stop rotation, you're going to have to make an effort to counter the rotation. Hanging from one arm will tend to rotate, but you have to just counter it by twisting your arm against it. It's hard at first, but you'll soon enough have trained the relevant muscles to make it easy.
An alternative is to use your free hand to hold onto the frame that holds the bar, or use a rubber band hanging next to you. You don't use it to assist the hold. Only to stop rotating.
Comment: The reason he is swinging is because he is starting in a position where it will require counter rotation to stay still. Ex: if you hold onto a bar with one hand wile facing the bar with an overhand grip, you will automatically rotate until you you reach a neutral grip where you are nearly looking at the side poles/doorway. Similar to how if you look at people doing one arm pullups, they are always in neutral grips. Another solution to add onto yours is simply to start in the neutral position if the goal is simply to increase one arm dead hangs.


A beyond-nature proof of God

Question: I have just started studying some arguments on the existence of God. They all inherit a common feature: all use some explanations of the universe. For instance, take Kalam proof for God. It states everything has a cause, the world has a begining and so there the world has a cause which we take as God. For another example, in Aquinas's Five ways, he in general argues based on the fact that infinite series of dependent essence cannot exist. Personally, I expected to reach an argument that is not based on any explanation of the mechanism of the world. Whatever we think is right, in an ideal situation one should be able to prove their statement to an alien or to a person without any sense. For this reason, first I ask my question and second, I propose my guess which leads to another question. Here is my question:
Is there any argument for or against the existence of God that is NOT based on any explanation of how the universe work?
The answer probably is no. So I propose my main question:
Is there any proof that states there is NO such argument which means there is no argument for or against God that is not based on any explanation of the universe?
P. S. Please note that I mean "no explanation" and not "no observation". What the question is seeking is a totally logical argument based on common sense of a human.
Another concern is that the second and main question asks for a no-go theorem but the first question ask, at the first hand, for an argument for the proof or disproof of God. Probably this is not the case, so my second question is basically a question in logic.
Comment: So-called [St. Anselm's Ontological Argument](https://plato.stanford.edu/entries/ontological-arguments/#StAnsOntArg) is **not** based on "nature".
Comment: Although Kant denied the possibility of an ontological proof, the *Critique of Pure Reason* serves as an excellent *rational* proof of God (i.e. as the ground for reason), given that both practical and pure reason depend on a capacity to judge which, in turn, presupposes an original source of knowledge, i.e. God: "For the greatest systematic and purposive unity, *which your reason demands* as a regulative principle to ground all investigation of nature, was precisely what justified you in making the idea of a *highest intelligence*." (*CPR* A699/B727)
Comment: Leszek Kolakowski's book "Religion" is interesting. Robert Bezimieny's review of the book at Amazon is a good review.
Answer: It is often criticized, but Descartes' argument for God in the Meditations is at least intended as what you seek, a purely rational argument for the existence of God, independent of all empirical observations.  As such, it probably traces back to the abstract neo-Platonic conceptions of God as the unity of all perfections, which are likewise not founded primarily on sensory data.

A beyond-nature proof of God


Can I legally change my name to "Darth Misogynus", or would I get sued by Disney?

Question: Obviously, Darth comes from Star Wars, which is currently owned by Disney. Misogynus is an expression of my ideological beliefs. If I legally change my name to "Darth Misogynus", will I get sued by Disney? Can I use the name "Darth Misogynus" in business if I have legally changed my name to it? I live in the US.
Comment: This asks two differnt questions.
Comment: It really asks at least 3 questions: (1) Can I legally change my name to include "Darth" which is some sort of trade name of Disney? (2) Can I legally change my name to include the potentially offensive "Misogynus"? (3) Can I use the name "Darth" in business bearing in mind Disney's interests in the name? I can't see any problem in using "Misogynus" in business but maybe it would contravene some rule too.
Answer: germany
No. You can not take a proper name or be named by your parents with a name that is made up of fantasy words, or which is insulting on itself. As such, you can't use "Darth" as a name part, and "Misogynus" is also not allowable as a name.
You are not free to change your name at all after you have been named. Only important reasons allow to apply for a change of name (Namensänderung), and the new name needs to comply with the rules when naming a child. It is an exception to be allowed to change the name, and only to remove problems the old name imposes. Merely "i dislike my old name" or "that other name is cooler" is not an important reason under the law.
The best you might get is this as an artisan's name in addition to your normal name.
Comment: Good news for some Germans: You can now exchange the order of your given names. They still don't allow Russians with gendered last names to fix an incorrect name.
Comment: Artist or stage name, not artisan, I believe. This would also cover names in religious orders. I wonder if the Jedism movement could affect this ...


Efficient way to index text files

Question: I have a series of text files I'm downloading from a Yahoo Group and I'd like to tag them and index them. What program will help me do this?
Comment: You mean something like a desktop search program?
Comment: It might be useful to know the OS.
Comment: Actually, I'd probably want to make it web accessible...
Answer: Funcionality for indexing text files is built into Windows Vista/7 and available for XP by downloading either Google Desktop Search or Window's Desktop Search.
Of course, if you're interested in only indexing and tagging these specific files, I would recommend Microsoft Office OneNote, it is web accesible and offers a lot of useful note-taking features.

With Microsoft OneNote 2010 you can collect and organize everything you need—notes, photos, videos, and web links— for any project you are working on. OneNote keeps the information you need at your fingertips and, with powerful search capabilities, you can easily find exactly what you are looking for. Toss those paper-based notebooks in the recycling bin—you've got a digital notebook now!, part of the Microsoft Office suite.
Answer: you can use:

Omega, which is a preconfigured indexer based upon the Xapian search engine.
Solr, which is a full text search server, based Lucene.
Nutch, which is a search engine, also based upon Lucene.
Answer: You might find Evernote helpful for achieving your task:

Evernote makes it easy to remember things big and small from your notable life using your computer, phone, and the web.
1. Capture everything.
Chances are, if you can see it or think of it, Evernote can help you remember it. Type a text note. Clip a web page. Snap a photo. Grab a screenshot. Evernote will keep it all safe.
2. Organize it. (Or let us do it.)
Everything you capture is automatically processed, indexed, and made searchable. If you like, you can add tags or organize notes into different notebooks.
3. Find anything fast.
Search for notes by keywords, titles, and tags. Evernote magically makes printed and handwritten text inside your images searchable, too.

Efficient way to index text files


Is any way able to pass a column list into values constructor in merge statement?

Question: I tried to find a way to pass a column list into values constructor in merge statement. Any idea?
The reason is we have a lot of source tables and want to update target table for each of source tables by using merge. If merge statement find not matched, inserting to target should be choose. However, in this insert statement, it ask for a column list of source. That means I have to list each of column of source table. It is so tedious for each table that I am wondering if any way to pass it as a parameter. Appreciate for any idea.
Answer: Try this approach based on INFORMATION_SCHEMA and FOR XML PATH.
Answer: If I understand the problem correctly (?), I'd create a proc that dynamically builds the merge SQL statement.  Create a cursor on the INFORMATION_SCHEMA.columns sorted by table_name, loop though it to build a dynamic string, run sp_executesql for each table_name.


Can i play an F# note on a guitar melodic passage over a G chord bar?

Question: Let's say it's a song in the key of Am, and i want to play a short guitar solo over a bar of G chord. Can i play an F# note in that passage. Would it sound harsh or sound ok? (because the F sharp is in the G major scale, but isn't in the Am scale- the root scale of the song)
Answer: A lot can depend on how you play the F#. If it were played as a quick neighbor note to the G it may sound as a chromatic embellishment and not a proper scale tone. On the other hand, if it sounds like you are using the G major scale it certainly matches the G major chord, but moves away from the A (natural) minor tonality. Changing the tonality in that way isn't necessarily a bad thing. I suppose it might brighten the mood of the music a little. Try to make a choice that gives the expression you want.
Answer: Am6 and Gmaj7 fit together very nicely.  I just recorded this snippet to prove the point.   It's alternating Am and G triads, with a melody absolutely LOUSY with F sharps!
But why are you asking us if it will sound good?  Do it and see for yourself!   When you discover it sounds just fine, discard any theory 'rule' that says it shouldn't.
Answer: It depends entirely on the voicing, and what effect you want. For example back in the 16th century, there are plenty of examples of two "soloists," one playing F# and E, and the other F and Eb, at the same time (in different octaves) over a G chord - and the result sounds entirely "OK" and not harsh.
The only "rule" worth learning is use your ears.
Answer: It isn't diatonic to the key of A minor, but over the Am the F# produces an Am6 sound and over the G it would produce a Gmaj7 sound.
With only those 2 chords to base an answer on, I would say the F# adds pleasing dissonance to the Am, and would naturally fit over the G.
The rest of the progression in the piece you are composing would provide more context and would likely influence what your next note choice would be.
I've still got a lot to learn myself, so I'm interested to see other answers, and of course, your ears will always be the best judge!
Comment: Interesting that you consider a maj7 'natural' but an added 6th dissonant!
Comment: You've got me wondering as well now! I suppose it comes down to context and familiarity. I heard, learned and used maj7 chords well before min6 chords, and early on avoided m7b5 chords all together (for the poster Amin6 = Gbm7b5). To my ear a maj7 sounds wide, full and peaceful, it might be that it has 2 major 3's and 2 perfect 5's. The min6 on the other hand having one minor 3, one major 3, one perfect 5 and a tri-tone might be what I'm hearing? I don't know that I have an actual answer but this seems plausible as an explanation to me?
Comment: 'Amin6 and F#m7b5 are the same notes.  (Even if you shift enharmonically and call it Gbm7b5!).  But there's a reason for having two names.


I got the new iPad Air for Christmas. Everything transferred seamlessly but one app. What now?

Question: It was the game Tribez. The information was last backed up on my old iPad 2 11/18/13. I don't understand how all of my other apps were brought over perfectly, but this one. I have contacted their customer service and they said to do another back up on the old one, then restore my new one again. That would mean I need to do a backup of the new first. Do the backups cancel each other out? Keeping only one?
Comment: Are you backing up to a PC or a Mac or iCloud? Each has different options for when backups over-write each other as well as strategies to keep a new backup from clobbering an old one. Also, if you have a spare iOS device to hold an old backup or test, you might be able to work around limitations on backup times and storage.
Comment: PC. I understand what you say, just feel like I'm going to blow it trying. It's a stupid game. Maybe I should just start it over!
Comment: Perfect - on a PC you can look in the folders listed to make a copy of the old backup to be sure you don't overwrite things. http://support.apple.com/kb/HT4946 You are correct, that it's a bit of fuss just to try again at the restore.
Answer: You can backup data from apps with a program such as PhoneView (Mac) or iFunBox (Mac & Windows).

Browse, manage and download most any data saved by App Store apps from your iPhone, iPad or iPod Touch. If you're looking for a quick way to download saved recordings, videos or images from your apps, this is it. Even transfer game high scores between devices. --PhoneView

Once you have the app data, it can be restored to a new copy of the app downloaded from the App Store.


Angular JS render JSON in tree like format

Question: How do I render JSON in tree like way just like http://jsonviewer.stack.hu/ does using angular JS?
Comment: This is not as complete as the viewer you mentionned but you can draw your inspiration from [json-tree](https://github.com/krispo/json-tree)
Answer: I've made this Angular directive for rendering JSON in a nice way. It's available in bower:
https://github.com/mohsen1/json-formatter
Answer: The technique you are interested in is 'recursive directive'. If you don't know how to write a directive yet, then you should start learning it first. The official Angular JS doc got a lot better in explaining about directive Creating Custom Directives
Once you know how to write custom directive, you can learn about recursive directive. I found this Google Groups thread helpful: Recursive directives. Especially, I found Mark Lagendijk's Recursion Helper service in that thread very useful.
Make sure to checkout the examples there. Some relevant examples for you are:
plnkr
jsfiddle
In the jsfiddle example above, take a look at:
module.directive("tree", function($compile) {
    return {
        restrict: "E",
        transclude: true,
        scope: {family: '='},
        template:
            '
' +
                '

' +
                '
{{ family.name }}
' +
                '
' +
                    '<tree family="child"></tree>' +
                '
' +
            '
',
        compile: function(tElement, tAttr, transclude) {
            var contents = tElement.contents().remove();
            var compiledContents;
            return function(scope, iElement, iAttr) {
                if(!compiledContents) {
                    compiledContents = $compile(contents, transclude);
                }
                compiledContents(scope, function(clone, scope) {
                         iElement.append(clone);
                });
            };
        }
    };
});

Some of the code above is abstracted away by Mark Lagendijk's Recursion Helper service I mentioned above.
Lastly, I implemented angular-json-human, which renders JSON in a nested table structure, which makes it easier for human to read. You can modify it to suit your need. The demo is here and the repo is here
Hope this helps!
Answer: I wrote a function to display a JSON data in the angular-ui-tree component.
The key point is the following:
In your parse routine, keep the 'JSON string' of the current node in the node itself, every 'not parsed' node has this payload and a 'load' function.
function parse(name, value) {

  var node = {
    name: name
  };

  if (Array.isArray(value)) {
    node.isEmpty = value.length === 0;
    node.payload = value;
    node.props = [];
    node.load = function(node) {
      for (var i = 0; i < node.payload.length; i++) {
        node.props.push(parse(node.name + '[' + i + ']', node.payload[i]));
      }
      delete node.isEmpty;
      delete node.payload;
    }
  } else if (value !== undefined && value !== null && typeof value === 'object') {
    node.isEmpty = Object.keys(value).length === 0;
    node.payload = value;
    node.props = [];
    node.load = function(node) {
      var keys = Object.keys(node.payload);
      for (var i = 0; i < keys.length; i++) {
        node.props.push(parse(node.name + '.' + keys[i], node.payload[keys[i]]));
      }
      delete node.isEmpty;
      delete node.payload;
    }
  } else {
    node.value = value;
  }

  return node;
}

Then, when the user click on the toggle button you can call this function to parse the next nodes in the tree and bind tha data to the HTML.
Can be more clear with a example:
https://jsfiddle.net/MatteoTosato/ghm4z606/


ERC-20 Token Gas Fees

Question: I have been researching gas fees, but there is one thing I have not figured out; and that is "Are the gas fees the same regardless of the amount of ERC-20 token I am trying to move around?" For example, I have X amount of ERC-20 token that I am trying to move between two wallets. The gas fee for this transaction is ~$50. During the same time, if I attempt to move 100X of another ERC-20 token, the gas fee is the same. So the question is, does it cost the same whether you send 100 dollar or 10,000 worth token?
Answer: It depends on the token, ERC-20 token can do anything in their transfer function.
For example there is popular "SafeMoon" type of tokens that under some circumstances it will interact with a pool causing a rebalancing which is more expensive that a simple transfer.

ERC-20 Token Gas Fees


Letter of recommendation from a professor with whom I took a class

Question: I understand that there are many posts similar to this, however I believe (upon reading other posts), that this thread would not be redundant.  I am an undergrad currently applying to grad schools and am in the process of asking for recommendation letters from professors.  Prior to my current university, I was at a different institution where I took courses.  There is a particular professor I am interested in asking for a letter from, however it has been two years and since then he has moved to a different university.  My reasoning for asking him for a letter is that I took his PhD course as an undergrad and received a better grade than over half the PhD students (not trying to brag but trying to emphasize there are some non-generic characteristics about me).  In addition, he is a well-known individual in my area of studies.  Given that I took his course two years ago is it still appropriate to ask?  A concern of mine is that it will be a generic letter of rec which I have read admissions committees don't like.
Comment: @AzorAhai Even in a class with all As you can have a distribution of number grades that might meaningfully distinguish between students.
Comment: At my previous institution, GPA distributions are publicly available .  With that said, it does not say the students name rather how many got As, how many got Bs, etc.  The type of course was an applied math course.
Comment: What sort of class? In the US, usually PhD grades are entirely meaningless (e.g. all As) so it's odd to me that you would do better than half.
Comment: I am currently at a US institution.  I am not sure about other institutions, however professors at my both previous and current university do not hand out As for "free".  EDIT: Upon looking at the grade distribution only 40% of the students got an A, which granted is not as impressive as attaining an A in a class where only 1-5% get As.
Comment: @user2705196 It would still be odd for those grades to be shared, IMO. But perhaps students casually discussed it. Motig: I didn't say "for free" but generally PhD students are at points where succeeding in a class in their specialty is not difficult.
Answer: Yes, it is appropriate to ask. There is never any issue about that. He may automatically remember you if you stood out as two years isn't that long. But you may need to remind him of the course and say some things about what you've been doing since.
The best way to manage this is face to face. I mention this even though it may now be impossible with the pandemic, and may be hard in any case due to distance. But actually seeing you would help jog his memory. But perhaps you have photos online somewhere to help refresh his memory.
You can also ask him whether he thinks a letter from him would be helpful or not. He might be able to say more than you think. The main reason for a letter is so that an independent person makes a prediction about your suitability for a program and your likelihood of success. Perhaps he can do that easily. If he has any hesitation, then you'd be better off asking someone else.
I had a few standout students in my teaching career. It would be easy to write recommendations for them even though our interactions were brief. If you made an impact it can work out.


Update field with unique value via workflow

Question: I have a Number field which I want to update using workflow. But since this field has unique option checked so how can I generate unique value in workflow? any thoughts?
Answer: As you have mentioned in Mohith's answer you can't populate a number field with an Id (or String).
What I would suggest is create an Auto Number field on the Object with the format <code>{0}</code> (This is a number only format) This will guarantee a unique number for every record. Then you will be able populate your unique number field with the auto number value.
It sounds like the unique number field is not well designed, I would recommend reconsidering why the Number is unique at all.
Answer: We all know very well that salesforce ID is unique and hence you may use formula like 'UNIQ-'+VALUE(Id)
So your external Id will be UNIQ-+salesforceID(18 digit)
Comment: Awesome....even I am surprised why couldn't think of that. Thanks Mohit
Comment: I guess we both forgot that field is number field whereas salesforce record id is of string type we can't assign it.
Comment: Thanks it happens and therefore we have stackexchange and salesforce community to help us.
Comment: You can always convert back string to to number .Use Value function.Updated the answer


InfoPath alternative on O365

Question: My company is switching to SharePoint on premise. We got the O365 package and I was searching how could we create custom input form and confirmation form like with InfoPath 2013. Is there a way to edit that form for a list? How do edit Flows email template? Like with those approve and reject buttons.
Comment: Do you ask for alternatives for InfoPath on Office365? if yes!, so you should check [PowerApps](https://spgeeks.devoworx.com/did-you-consider-powerapps-is-a-replacement-for-sharepoint-designer-and-infopath-in-sharepoint/) if I didn't get your point please specify your issue in more details to can help you faster!
Comment: SharePoint On Premise 2019 ?
Comment: @MohamedEl-QassasMVP you got it right. I am trying to figure it out how to make it for desktop? All I get is phone sized canvas
Answer: Unfortunately, you can't convert or migrate from PowerAppas to InfoPath form.
As it's mentioned at SharePoint Designer 2016 and InfoPath 2016 in SharePoint Server 2016, What're the alternatives?

Power apps is a cloud service that can't be used with on-prem like
  InfoPath, meanwhile, you can create a gateway to get data from on-prem
  to the cloud!

Therefore, you can't migrate PowerApps to InfoPath forms and you need to start your business logic from scratch using SHarePoint Designer workflow and InfoPath and that will require enterprise edition!

Regarding the ability to do the same business logic with InfoPath, I think you can BUT without the same simplicity and functionality and of course, there are more functionalities in InfoPath that not available in PowerApss and vice-versa.

You can also check The key differences between InfoPath and PowerApps.

So I suggest trying 3rd party tools like Nintex or K2 to build your forms and business logic in an effective manner but sadly, it would be costly!

InfoPath alternative on O365


Logistic regression: categorical predictor vs. quantitative predictor

Question: Why is it the case that when I run logistic regression with one categorical predictor, my regression is not significant whereas if I run the logistic regression with the same variable except it is continuous, the logistic regression automatically becomes significant?
Answer: That is not a necessary result, but it is certainly plausible. If you turn a quantitive predictor into a single categorical predictor you lose a lot of information; with the categorical predictor you only know whether an observation is below or above a certain threshold (e.g. the mean or median), while with a quantitative predictor you also know how much below or above the threshold that observation is. It is not unreasonable to suspect that if you feed your model more information (i.e. add your variable as a quantitative predictor), you will get more precise results.
One of the reasons why this is not necessarily true is that if you add a variable to a regression model as a quantitative variable you assume the effect of that variable to be linear. If the effect is strongly non-linear, then that may undo the advantage of adding quantitative variables. There are however easy ways to check whether that is the case (plots of residuals against predictors), and easy ways to solve it (adding your variables as splines or polynomials are probably the easiest solutions).
Comment: This is a good answer but, given the increasingly common use of tools like generalized additive models, the comment *"if you add a variable to a regression model as a quantitative variable you assume the effect of that variable to be linear"* is not quite true. But, given that the OP was most likely talking about _linear_ logistic regression, I think it's a good point to make. +1!
Answer: It depends what you mean by "the same variable except it is continuous". Binning a truly continuous variable into two or more categories loses information as described by @Maarten. If you're comparing analyses treating the predictor values, say ${1,2,3,4,5,6,7,8,9,10}$, as either continuous or categorical, in the latter case you fit nine parameters & the resulting drop in residual degrees of freedom can make the regression insignificant, especially in smaller data-sets.
Answer: As @MaartenBuis wrote, you lose a lot of information by categorizing. Lagakos wrote an excellent article a while ago about the loss of power when mismodeling explanatory variables. In table IV you can see how much information you loose by discretizing by different schemas. You may also want to have a look at Frank Harrell's list on the categorization subject.
While the residual plot against the continuous predictor is a simple approach to checking the linearity assumption I find that the ANOVA is really convenient here. The rms-package in R allows you effortlessly to test the linearity, straight from the man-page for the lrm()-function:
# Fit a logistic model containing predictors age, blood.pressure, sex
# and cholesterol, with age fitted with a smooth 5-knot restricted cubic
# spline function and a different shape of the age relationship for males
# and females.  As an intermediate step, predict mean cholesterol from
# age using a proportional odds ordinal logistic model
#
n <- 1000    # define sample size
set.seed(17) # so can reproduce the results
age            <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol    <- rnorm(n, 200, 25)
sex            <- factor(sample(c('female', 'male'), n,TRUE))
label(age)            <- 'Age'      # label is in Hmisc
label(cholesterol)    <- 'Total Cholesterol'
label(blood.pressure) <- 'Systolic Blood Pressure'
label(sex)            <- 'Sex'
units(cholesterol)    <- 'mg/dl'   # uses units.default in Hmisc
units(blood.pressure) <- 'mmHg'

# Specify population model for log odds that Y=1
L <- .4*(sex=='male') + .045*(age-50) +
    (log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))
# Simulate binary y to have Prob(y=1) = 1/[1+exp(-L)]
y <- ifelse(runif(n) < plogis(L), 1, 0)
cholesterol[1:3] <- NA   # 3 missings, at random

ddist <- datadist(age, blood.pressure, cholesterol, sex)
options(datadist='ddist')

fit <- lrm(y ~ blood.pressure + sex * (age + rcs(cholesterol,4)),
           x=TRUE, y=TRUE)
#      x=TRUE, y=TRUE allows use of resid(), which.influence below
#      could define d <- datadist(fit) after lrm(), but data distribution
#      summary would not be stored with fit, so later uses of Predict
#      or summary.rms would require access to the original dataset or
#      d or specifying all variable values to summary, Predict, nomogram
anova(fit)

Gives you the ANOVA output:
                    Wald Statistics          Response: y

     Factor                                           Chi-Square d.f. P
     blood.pressure                                    0.23       1   0.6315
     sex  (Factor+Higher Order Factors)               38.17       5   <.0001
      All Interactions                                26.25       4   <.0001
     age  (Factor+Higher Order Factors)               30.48       2   <.0001
      All Interactions                                 3.68       1   0.0552
     cholesterol  (Factor+Higher Order Factors)       24.15       6   0.0005
      All Interactions                                22.74       3   <.0001
      Nonlinear (Factor+Higher Order Factors)          5.11       4   0.2759
     sex * age  (Factor+Higher Order Factors)          3.68       1   0.0552
     sex * cholesterol  (Factor+Higher Order Factors) 22.74       3   <.0001
      Nonlinear                                        4.54       2   0.1031
      Nonlinear Interaction : f(A,B) vs. AB            4.54       2   0.1031
     TOTAL NONLINEAR                                   5.11       4   0.2759
     TOTAL INTERACTION                                26.25       4   <.0001
     TOTAL NONLINEAR + INTERACTION                    26.98       6   0.0001
     TOTAL                                            62.10      10   <.0001

As you see there is no strong support for non-linearity in this example. I find it surprisingly easy to test very complicated models in this way. Hope this helps.
Comment: The Lagakos link does not work.


How to map different json with RestKit?

Question: Im new to Restkit and I want to use it for my iOS project.
I ran into a problem, because I get different JSON back from the server
and I don't know how to configure my mapping with RestKit.
Here are the two types of JSON messages I can receive from the server.

First json message:
<code>{"result":"not found"}
</code>
Second json message:
<code>{ "OPDRACHT":
     { "streetnaam":"value",
       "postalcode":"value",
       "city":"value"
     }
}
</code>

I've been reading in the RestKit documentation about mapping without KVC and Dynamic Object Mapping but I can't figure out how to configure the mapping for RestKit.
Anyone an idea how to configure the mapping with RestKit in this situation?
Answer: I fixed my mapping problem today.
I changed my json output from the server in a more object structure. Now
RestKit works great with my json.

How to map different json with RestKit?


Asphalt 8 multiplayer rating

Question: I have a problem with Asphalt 8. Multiple times when I get third, my rating goes down by 10. When you get third in pro league or higher, your rating is supposed to stay equal if you get third. But instead of my rating staying equal, it goes down by ten and the person who leaves has their rating increase. And for some reason, my rating decreases when it should stay equal if I get third. Does anyone know why this glitch is happening?
Comment: This may be intended behaviour. Odd, but oh well.
Answer: According to this Reddit thread, you are experiencing a difference in points depending on whether your opponent was of higher or lower rank than you are.

Depends on how high or low ranked your opponents are. If they're significantly higher than you and you actually beat them, you earn a lot of points but if you lose to them, you might not lose or gain much depending on how bad the loss is.
If you're beating lower ranked players, you won't get much but if you lose to them, you'll lose a lot of points.

Thus, in the matches where you got third place but your rating went down, it was likely that you lost to a significantly lower ranked opponent. As a result, your score went down.

Asphalt 8 multiplayer rating


Potential issues with adding /usr/local/[s]bin to root's path?

Question: I've noticed that the root account $PATH does not include /usr/local/bin or /usr/local/sbin by default. Are there any potential issues that could arise from adding those directories to the path? If so, what is the best way to make sure your shell finds executables in those directories, without affecting the stability and security of the system?
Answer: Make sure that the write permissions on the directories and files are reasonable. You don't want "Other" to be able to write there. File owner and group are also very important. You don't want someone adding or changing something that will be executed under root privileges but that may do something either malicious or have unintended consequences.
Adding those directories to the end of the PATH is safer, but doing that doesn't give you the opportunity to have local overrides of standard utilities. There are pluses and minuses to either approach.
If you leave them out of root's PATH, you can still specify the absolute path explicitly.
Comment: Very comprehensive answer. I neglected to consider the user/group permissions on the `/usr/local` tree. I rather err on the side of having only executables in the root $PATH that root alone could have put there/changed.
Answer: /usr/local/bin and /usr/local/sbin are generally reserved for user-installed executables.  Add them to the end of your path, just in case you're concerned about conflicts.  The packages for your distribution should place binaries in /usr/bin and /usr/sbin.
Short version: add the paths to the end of your current path, and you should be fine.


Can't log into Google Play, gmail, or other apps on new Samsung 7

Question: I have changed my Google password in an attempt to be able to log into gmail, Play Store and other apps on my new phone. However, the Play Store app is not recognizing the password change. I cannot get into other apps that I downloaded via the Play Store. Can someone help?
Answer: you should try clear the data of google play store and google play services by going into app settings, if it doesn't work,  you can follow Google Accounts Help Center


Is it considered cheating if you post assignment questions on a site but no one answered it?

Question: If you post an assignment question on a 3rd party site and get no answers about the subject matter, is it still considered cheating?
Comment: This is called "unsuccessful cheating".
Comment: Most cheating policies specify "attempting to cheat", so if you had received answers you would have used them...
Comment: Just to be sure we're not in some kind of endless loop here, is this an assignment question in an ethics class you're taking?
Comment: If a tree falls in a forest and nobody is there to hear it, does it make a sound?
Comment: Asking for help (i.e. showing your work and where the issue lies) I feel is totally acceptable. Asking for the solution is unacceptable (and more forums will generally not help someone who just wants answers). I would never have passed my advanced physics courses without Physics StackExchange.
Answer: At my university, the answer is definitely yes. The rules here clearly state that even the attempt to cheat is misconduct (e.g. bringing a device that is capable of cheating to an exam is considered cheating even if it not used/touched).
(However, if asking a question about your assignment in some forum is cheating, depends on the rules for your course/institution. In my courses, this would not be forbidden for homework assignments, for example.)
Comment: Second paragraph here is important.  The word "assignment" (as opposed to "exam") suggests to me an exercise in which some degree of conferring with others is permitted.
Answer: Yes. As one example of a formal policy, here is the opening definition in the CUNY (City University of New York) Academic Integrity Policy:

1.1 Cheating is the unauthorized use or attempted use of material, information, notes, study aids, devices or communication during an
academic exercise.

Exact penalties will, of course, vary by institution, department, instructor, etc. In my courses, such a case on a homework assignment would result in a zero on the assignment, and a report to the school's Academic Integrity officer (who may lay out further penalties for repeat offenders). On an exam in one of my courses, this would now be an immediate failure of the course for the semester.
Answer: Yes, attempted-but-failed cheating is still unethical/immoral, though perhaps less so (?!?) than successful cheating.
Attempted-but-failed (bad thing) X is bad, but not as bad as succesful X?
Certainly attempted murder (even if unsuccessful) is a serious crime most places.
Really, how much "moral currency" do you get back by trying but failing? Sympathy points?
Comment: Someone on another question was trying to argue that attempted cheating was not as bad as successful cheating in the same way that an attempted crime was not as bad as a successful crime. I think this is the wrong analogy. The problem with a crime is the damage that results from it, and potential damage is less serious than actual damage. In the case of cheating, the "damage" isn't the outcome of the cheating, it's the dishonest intention because it creates a culture of dishonesty. It's pretty much irrelevant whether or not the cheating succeeded in the goal of getting a better grade.
Comment: @ElizabethHenning, I wouldn't argue with you at all... I guess I should have made the point more explicitly that (in my opinion) _intent_ to engage in unethical/immoral behavior is still unequivocally a bad thing (whether or not one fails...) and whether or not one thinks that intent and so on are real or not... Probably my real issue is with the world-view/mindset of the person asking such a question. "I tried to embezzle money, but I failed, and maybe got caught... Did I really do such a bad thing?"
Comment: ... and, yes, the whole worldview/mindset in which contemplating (for other than recreational/venting purposes) doing anti-social things, hoping not to "get caught", etc., is a problem in itself. So, yes, a worldview in which it somehow makes sense to ask the question is already morally/ethically failing/flawed.


Difference between a LinkedList and a Binary Search Tree

Question: What are the main differences between a Linked List and a BinarySearchTree? Is BST just a way of maintaining a LinkedList? My instructor talked about LinkedList and then BST but did't compare them or didn't say when to prefer one over another. This is probably a dumb question but I'm really confused. I would appreciate if someone can clarify this in a simple manner.
Answer: Linked List:
Item(1) -> Item(2) -> Item(3) -> Item(4) -> Item(5) -> Item(6) -> Item(7)

Binary tree:
                 Node(1)
                /
            Node(2)
           /    \
          /      Node(3)
  RootNode(4)
          \      Node(5)
           \    /
            Node(6)
                \
                 Node(7)

In a linked list, the items are linked together through a single next pointer.
In a binary tree, each node can have 0, 1 or 2 subnodes, where (in case of a binary search tree) the key of the left node is lesser than the key of the node and the key of the right node is more than the node. As long as the tree is balanced, the searchpath to each item is a lot shorter than that in a linked list.
Searchpaths:
------ ------ ------
key    List   Tree
------ ------ ------
1      1      3
2      2      2
3      3      3
4      4      1
5      5      3
6      6      2
7      7      3
------ ------ ------
avg    4      2.43
------ ------ ------

By larger structures the average search path becomes significant smaller:
------ ------ ------
items  List   Tree
------ ------ ------
     1      1   1
     3      2   1.67
     7      4   2.43
    15      8   3.29
    31     16   4.16
    63     32   5.09
------ ------ ------

Comment: Your graphs look fantastic. How did you generate them?
Comment: Can you also please explain the difference in time complexity
Comment: @ismailpervez this is more or less about the time complexity.
Answer: A Binary Search Tree is a binary tree in which each internal node x stores an element such that the element stored in the left subtree of x are less than or equal to x and elements stored in the right subtree of x are greater than or equal to x.

Now a Linked List consists of a sequence of nodes, each containing arbitrary values and one or two references pointing to the next and/or previous nodes.
Answer: In computer science, a binary search tree (BST) is a binary tree data structure which has the following properties:

each node (item in the tree) has a distinct value;
both the left and right subtrees must also be binary search trees;
the left subtree of a node contains only values less than the node's value;
the right subtree of a node contains only values greater than or equal to the node's value.

In computer science, a linked list is one of the fundamental data structures, and can be used to implement other data structures.
So a Binary Search tree is an abstract concept that may be implemented with a linked list or an array. While the linked list is a fundamental data structure.
Comment: @VarunGupta - it's been a few years, and I doubt I could dig up the source at this point, but I created a simple node structure with a data pointer, a left (subtree) pointer, and a right (subtree) pointer. The overall BST was simply a head node pointer. I wrote functions for insert/delete/etc.
Comment: Binary Search Trees aren't just abstract. I had to implement one in my Algorithms and Data Structures class. I didn't use a linked list or an array in the implementation.
Comment: Harper Shelby, please divulge more details regarding your implementation?
Answer: I would say the MAIN difference is that a binary search tree is sorted.  When you insert into a binary search tree, where those elements end up being stored in memory is a function of their value.  With a linked list, elements are blindly added to the list regardless of their value.
Right away you can some trade offs:
Linked lists preserve insertion order and inserting is less expensive
Binary search trees are generally quicker to search
Answer: A linked list is a sequential number of "nodes" linked to each other, ie:
public class LinkedListNode
{
     Object Data;
     LinkedListNode NextNode;
}

A Binary Search Tree uses a similar node structure, but instead of linking to the next node, it links to two child nodes:
public class BSTNode
{
    Object Data
    BSTNode LeftNode;
    BSTNode RightNode;
}

By following specific rules when adding new nodes to a BST, you can create a data structure that is very fast to traverse. Other answers here have detailed these rules, I just wanted to show at the code level the difference between node classes.
It is important to note that if you insert sorted data into a BST, you'll end up with a linked list, and you lose the advantage of using a tree.
Because of this, a linkedList is an O(N) traversal data structure, while a BST is a O(N) traversal data structure in the worst case, and a O(log N) in the best case.
Answer: They do have similarities, but the main difference is that a Binary Search Tree is designed to support efficient searching for an element, or "key".
A binary search tree, like a doubly-linked list, points to two other elements in the structure. However, when adding elements to the structure, rather than just appending them to the end of the list, the binary tree is reorganized so that elements linked to the "left" node are less than the current node and elements linked to the "right" node are greater than the current node.
In a simple implementation, the new element is compared to the first element of the structure (the root of the tree). If it's less, the "left" branch is taken, otherwise the "right" branch is examined. This continues with each node, until a branch is found to be empty; the new element fills that position.
With this simple approach, if elements are added in order, you end up with a linked list (with the same performance). Different algorithms exist for maintaining some measure of balance in the tree, by rearranging nodes. For example, AVL trees do the most work to keep the tree as balanced as possible, giving the best search times.  Red-black trees don't keep the tree as balanced, resulting in slightly slower searches, but do less work on average as keys are inserted or removed.
Comment: +1 Why is this (correct) answer downvoted while the original (strange) question upvoted?? I don't understand it...
Comment: Have another upvote -- much better explanation than the accepted answer in my opinion. I think the original question was clearly about multi linked lists (the distinction between a binary tree and a singly linked list is obvious).
Comment: @TT_ Thanks! I've always felt a bit bad about this answer getting down-voted.
Answer: Linked lists and BSTs don't really have much in common, except that they're both data structures that act as containers. Linked lists basically allow you to insert and remove elements efficiently at any location in the list, while maintaining the ordering of the list. This list is implemented using pointers from one element to the next (and often the previous).
A binary search tree on the other hand is a data structure of a higher abstraction (i.e. it's not specified how this is implemented internally) that allows for efficient searches (i.e. in order to find a specific element you don't have to look at all the elements.
Notice that a linked list can be thought of as a degenerated binary tree, i.e. a tree where all nodes only have one child.
Comment: If a "stupid" tree devolves into a list, then isn't a list a "stupid" tree and therefore has more in common with a tree than you initially suggest?
Comment: @ChiefTwoPencils Sure, but such relationships exist between *all* data structures, and they're not particularly informative.
Answer: It's actually pretty simple.  A linked list is just a bunch of items chained together, in no particular order.  You can think of it as a really skinny tree that never branches:
1 -> 2 -> 5 -> 3 -> 9 -> 12 -> |i.   (that last is an ascii-art attempt at a terminating null)
A Binary Search Tree is different in 2 ways: the binary part means that each node has 2 children, not one, and the search part means that those children are arranged to speed up searches - only smaller items to the left, and only larger ones to the right:
    5
   / \
  3   9
 / \   \
1   2   12

9 has no left child, and 1, 2, and 12 are "leaves" - they have no branches.
Make sense?
For most "lookup" kinds of uses, a BST is better.  But for just "keeping a list of things to deal with later First-In-First-Out or Last-In-First-Out" kinds of things, a linked list might work well.
Comment: Binary trees should have a cost during addition. +1 for skinny tree lol.
Answer: A linked list is just that... a list. It's linear; each node has a reference to the next node (and the previous, if you're talking of a doubly-linked list). A tree branches---each node has a reference to various child nodes. A binary tree is a special case in which each node has only two children. Thus, in a linked list, each node has a previous node and a next node, and in a binary tree, a node has a left child, right child, and parent.
These relationships may be bi-directional or uni-directional, depending on how you need to be able to traverse the structure.
Answer: The issue with a linked list is searching within it (whether for retrieval or insert).
For a single-linked list, you have to start at the head and search sequentially to find the desired element. To avoid the need to scan the whole list, you need additional references to nodes within the list, in which case, it's no longer a simple linked list.
A binary tree allows for more rapid searching and insertion by being inherently sorted and navigable.
An alternative that I've used successfully in the past is a SkipList. This provides something akin to a linked list but with extra references to allow search performance comparable to a binary tree.
Answer: Linked List is straight Linear data with adjacent nodes connected with each other e.g. A->B->C. You can consider it as a straight fence.
BST is a hierarchical structure just like a tree with the main trunk connected to branches and those branches in-turn connected to other branches and so on. The "Binary" word here means each branch is connected to a maximum of two branches.
You use linked list to represent straight data only with each item connected to a maximum of one item; whereas you can use BST to connect an item to two items. You can use BST to represent a data such as family tree, but that'll become n-ary search tree as there can be more than two children to each person.
Answer: A binary search tree can be implemented in any fashion, it doesn't need to use a linked list.
A linked list is simply a structure which contains nodes and pointers/references to other nodes inside a node.  Given the head node of a list, you may browse to any other node in a linked list.  Doubly-linked lists have two pointers/references: the normal reference to the next node, but also a reference to the previous node.  If the last node in a doubly-linked list references the first node in the list as the next node, and the first node references the last node as its previous node, it is said to be a circular list.
A binary search tree is a tree that splits up its input into two roughly-equal halves based on a binary search comparison algorithm.  Thus, it only needs a very few searches to find an element.  For instance, if you had a tree with 1-10 and you needed to search for three, first the element at the top would be checked, probably a 5 or 6.  Three would be less than that, so only the first half of the tree would then be checked.  If the next value is 3, you have it, otherwise, a comparison is done, etc, until either it is not found or its data is returned.  Thus the tree is fast for lookup, but not nessecarily fast for insertion or deletion.  These are very rough descriptions.
Linked List from wikipedia, and Binary Search Tree, also from wikipedia.
Answer: They are totally different data structures.
A linked list is a sequence of element where each element is linked to the next one, and in the case of a doubly linked list, the previous one.
A binary search tree is something totally different. It has a root node, the root node has up to two child nodes, and each child node can have up to two child notes etc etc. It is a pretty clever data structure, but it would be somewhat tedious to explain it here. Check out the Wikipedia artcle on it.


How to train an LSTM with varying length input?

Question: I have a dataset where each of the training instances is different in the length and the data is sequential. So, I design an LSTM but I am thinking about how to train the LSTM. In fixed-length data, we just keep all of the input in an array and pass it to the network, but here the case is different. I can not store varying length data in an array and I do not want to use padding to make it fixed length. Now, should I train the LSTM where each training instance are varying in length?
Comment: Are you predicting a sequence e.g. like in machine translation?
Comment: I am performing prediction but not like the machine translation
Answer: You could sequentially pass in each element of your sequential data and save the hidden and cell states in a separate buffer. In a typical LSTM implementation, you input the entire sequence and the hidden and cell states are propagated internally. In the end, the final hidden and cell states returned as the output. This works if your input is all the same length. Instead, you can handle sequentially giving the next element to the LSTM as well as the hidden and cell state yourself. To keep it efficient you can batch your inputs by the batch dimension (batch_first=True in the pytorch LSTM implementation).
For example, propose you have 5 sequences of length 5, 4, 3, 2, and 1. You initialize your hidden and cell state buffers for each of the sequences and pass the first batch containing the first element of all 5 sequences. You save the output hidden and cell states in the buffers for each sequence. Next, you input the batch of the second element of the 4 sequences with length > 1, and save the states in the respective sequence buffers and so and so forth until you exhaust the sequence of greatest length.
Comment: What if all of the sequences are different length, so I can not batch the same length sequence together?
Comment: You don't need to batch the sequences, you just need to batch the elements of the sequences. Batch all the first elements of your sequences into one vector (or matrix if your elements are multidimensional), all the second elements in another etc.
Comment: I do not want to pass the first batch containing the first element of all 5 sequences like this, I am also curious about why one should pass input like this?
Comment: Because this avoids having to pad your input to efficiently process variable length sequences. AFAIK the LSTM implementations in all typical python packages receive input of size Batch x Sequence x Hidden (or a permutation). Since your sequence dimension is not the same for every sequence, you either need to pad your sequences. Or as suggested in the answer, you can change the sequence dimension to 1, but need to handle the hidden and cell states of the LSTM yourself.


Correct and secure manner of storing in-app-purchases

Question: What is the best way to store an in-app-purchase on a device,
so that the purchases can also be accessed offline but
the security of the purchases are not compromised?
Answer: Do not store anything valuable on the device as it cannot be trusted and it can easily be compromised by someone motivated.
Now, all of this depends on the type and value of the item that is being purchased and what happens if its compromised.
If its truly valuable then use a remote secure server for managing secure items. In app purchases include a receipt that can be verified by your remote secure server talking to apple's servers directly through a secure connection. See this link to verifying store receipts.
Answer: As far as I know, the most convenient way to securely store a purchased asset would be to use some form of encryption.
The user should be able to download an encrypted asset, and the app should decrypt it on the fly.
However, make sure that you store the key in a secure fashion as well, as string keys (within the app binary) can easily be recovered by a skilled hacker. A good way to secure the key would be to use some sort of authentication with a server-based system. The app would get the key off the server and keep it only for the few moments required to decrypt the asset.
This defense mechanism is not impregnable; I feel that it is sophicaticated enough to discourage most users from attempting to undermine it.
To decrypt your assets on the device, a good idea would be to use CommonCrypto. It's provided by Apple (with the iOS SDK), so you don't have to build it from scratch and you don't have to provide documentation (required by US law) for your app. I find Jim Dovey's Common Crypto wrapper the easiest way to use it.
Hope that helps. :)
Answer: You'll want to encrypt the file, for which your best bet is probably Common Crypto. In order to be able to access the data offline, you need to store the encryption key on the device.
The solution is to use the keychain: Use SecRandomCopyBytes to generate a key of sufficient length, and store it in the keychain using SecItemAdd. Then use that key to encrypt the data and write it to the device's local storage in the normal manner. When it comes time to read the file back from disk, use SecItemCopyMatching to load the key from the keychain and use it to decrypt the data.
Comment: How interesting. I expect Apple will fix that, since the whole *point* of the keychain is to securely store passwords and such.
Comment: Hi Anomie! Your approach is more convenient in terms of implementation and user hassle, but apparently the keychain can be readily accessed after jailbreaking - no passcode required: http://www.digitaltrends.com/mobile/devices/iphone-security-flaw-puts-keychain-passwords-at-risk/
Comment: Keychain should be, and if things worked properly Keychain would be the best option.


The tip of the lotus plant was $6$ cm above the.

Question: The tip of the lotus plant was $6$ cm above the lake but forced by the wind it gradually advance and submerged into the distance of $10$ cm. Now find the depth of the pond
I couldn't get any idea regarding how to solve. But I have made a figure (if that is correct)
Comment: Does this question really belongs to trigonometry???
Comment: @Harshkumar, if trigonometric ratios could be used. (just a guess)
Comment: I don't think the problem is clearly stated.  We can assume the plant was vertical before the wind but have no idea the configuration when the wind is blowing.  Without further information it cannot be solved.  This is especially true as wind does not penetrate into the water so there is no reason for the plant to submerge.
Comment: $\text{cm}$ and $\text{m}$ are different things,be clear.
Comment: @Fawad,  sorry. Both are in cm
Answer: EDIT 2
(sorry for the bad art)

EDIT
Assuming we are supposed to use trig on this problem, then we assume the lotus plant, at the end, was floating on the surface of the pond. So at the start, it was "hovering" $6$ cm above the water. The wind blows it away, so now it's floating $10$ cm from where it was.
So now we have a triangle. (Sorry I can't do a picture.) The hypotenuse is the length of the lotus stem, call it $h$. The short leg along the top of the pond is 10 cm. The long leg is the depth of the pond, $d$. Pythagoras gives us $d^2+6^2=h^2$. But we know that $h=d+6$. So we have $d^2+10^2 = (d+6)^2$, which gives $d=\frac{16}{3}$ cm.

Assume the lotus was floating on the surface of the lake. Therefore the lotus is $6$ cm tall. Now, it's $10$ cm underwater. It remains $6$ cm tall. If we assume it's now resting on the bottom of the pond, some subtraction would tell us how deep the pond is.
Does that help?
Comment: No. Lotus plants float. How could the wind push the lotus so it was 10 cm underwater? The water itself would keep the wind from pushing it so far, not to mention the buoyancy of the plant. I'm thinking something was lost in translation, so to speak, which is why I asked if the problem was stated correctly.
Comment: Did you copy the problem text correctly? As written, I find it vague. Your diagram is one interpretation, but there could be others (especially if you are supposed to use trigonometry).
Comment: not much clearly!!
Comment: could you help using trigonometry?
Comment: @ÉvaristeGalois See my edit.
Comment: is the plant submerged or not?
Comment: I was about to answer,it will be super easy for OP to understand if you add picture describing situation.


Best way for server-to-server auth to Salesforce to be able to then query as specific user

Question: I am trying to authenticate to Salesforce from 3rd party service (custom java app). Users in the 3rd party app should be able to search records in salesforce (query rest api call) and create new records. However they should not authenticate to Salesforce every time they open the app (web server oAuth flow wouldn't be very user friendly). Ideally user in the 3rd party app shouldn't even know records are coming from Salesforce.

All users of 3rd party app can also access salesforce and vice versa
Both apps authenticate users with 3rd party iDP

Theoretically the best candidate here would be JWT bearer flow https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5
However that flow, if I understand it correctly, will give access to salesforce records with permissions of user defined in the managed app.
How can I possibly run salesforce's rest api query as a given user as opposed to that integration user from the connected app? I want to respect sharing hierarchy in salesforce while making these queries
Answer: You must authenticate to Salesforce as the user whose permissions and visibility you wish to apply.
Bear in mind the the Web Server flow provides you with a refresh token, so you don't need to have the user log in every time.


Armor enchantment on a held item 1.14

Question: How do I enchant a held item with a working armor enchantment (eg. a stick with respiration)?
I can use commands to give the item the enchantment, but it currently seems to have no effect when I am holding it.
I'm using 1.14
Comment: Perhaps I wasn't very clear. What I mean was is there a way to put an enchantment designed for armour (eg. thorns or respiration) on a non-armour item (eg. a stick) and then have it work in your hand (eg. I hold a stick with respiration and get the respiration effect from it)
Answer: You can only do that by editing the item's "Enchantments" NBT tag, which is not possible in a playet's inventory. You can only use /replaceitem to overwrite it with a new item or ask the player to drop it, then you can modify the drop.
Example for /replaceitem:
/replaceitem entity @p weapon.mainhand stick{tag:{Enchantments:[{id:"knockback",lvl:8}]}}

Answer: You need to use the enchant command given up above my answer that command will enchant your item at any enchantment level! Also any enchantment in the game!
Comment: Remember to use the command below -------->

Armor enchantment on a held item 1.14