Does C# experience translate well to C++?

Question: My programming classes in school were C++, but I ended up working a job doing C# for the last few years. If there was a position that required say 1 or 2 years experience in C++, would my experience in C# be worthy of consideration? How effective could I be in such a position? So do I need to start out as an entry-level C++ programmer to gain the necessary experience?
Comment: @DeadMG: I don't know what you mean by that.  Even if you've heard of them, you still have to learn them.
Comment: The hardest part will be learning the idioms of C++ and the "correct" way of doing things. In C#, things like memory management and bounds checking are baked into the language and the framework. In C++ there are many more ways to shoot yourself in the foot.
Comment: The Effective C++ series is a lot more mind-bending than the effective C# series.
Comment: @RobertHarvey: Only if you've never heard of smart pointers. Or containers.
Comment: @Robert: Well, if you do containers and smart pointers, then you don't have to manage a lick of memory. And learning them is C++ 101.
Answer: The problem here is that C++ and C# are, fundamentally, extremely different languages with different approaches to many problems. It's easy to lump them in as "An OO language", but the simple fact is that many C# idioms are considered to be very bad code in C++ (and vice versa).
If you actually know the differences and what C++ idioms look like, then I see no reason that it shouldn't be fine.
Answer: I was in the same boat about 2 years ago. Your c# experience would probably not be worth as much for a c++ job as c++ is for a c# job. That said, if you know how c# actually works (very few c# programmers actually do), and learned your c++ well then the c++ will not be the problem. What will be the problem is the way you have grown accustomed to certain design patterns which will be too high level for c++.
For instance, going from the nice ADO.NET data access model to using cppcon for mysql access, System.Collections.Generic to using stl, multiple-inheritence, garbage collection to cleaning up your memory in destructors and so on... all tend to be tough transitions. C++ isn't the problem, learning the libs, design patterns, and how to use them is the challenge. Most recruiters don't realize this. If you can do basic design and can use the actual commonly used features of c++ then you should be fine in the interview.
However, ready for the job is a different story. It is a fun challenge though, I hope all goes well.
Comment: All the C++ jobs I see want 2-3 years of experience in C++ but mine is in C#. This is really frustrating to me, I want to do C++! You're right about the recruiter, they shot me down. How can I ever get this experience if nobody will let me try? I am confident that if someone let me in the door I could learn quickly I just don't know how I can get through to them on that.
Comment: I jumped on a c++ project at my current job. That is probably your best bet. Or, you can always get on an open source project that is in c++.
Comment: @Ryan As Jonathan said, there is plenty of ways to get experience in C++. Atleast where I am from, you have to prove you have experience (instead of the popular statement; having 1 year of experience five times over). This works both ways - someone without much "paper" experience can get a chance to prove him/herself aswell. Just make sure you actually know C++ before you try!
Answer: I cant speak for every employer but I personally view programming as the skill and language specifics as a nice to have. Its still quite possible to get hired in another programming job that isn't your main skill.
Having said that its very very unlikely I would hire someone that had absolutely no experience  in the language I'm hiring them for. Spend a few weekends learning and have a couple of pet projects to bolster your CV. Even small ones prove you are capable of learning and keen.
Answer: You are exactly in the same situation I was in 4 years ago.
I did some C++ during my studies, but I hated it. I did a lot of web dev when I could on my spare time and got a job in that field.
When I moved I applied for a C++ job which had 2 years of C++ experience as a requirement.
Well I refreshed my C++ memories before the interview and when the time came for the tests I managed to get away with a few things I wasn't so sure I was doing right.
But most of the interview was about problem solving and creative solutions and C++ ended being just a minor factor.
So the chances really depend on the employer and the positions they have.
If you are going through a recruiting agency you will "probably" be told your profile doesn't match. But with a real employer your chances are way better as they really know what they need.
Comment: As the others said it make sure you remember the few basics of memory management in C++. It is the fundamental difference. Otherwise concerning libraries and frameworks Most (large) companies have their own libs and wrappers, so they don't expect you to know their implementations. Contrarily to C# where most of the high level libs are backed into the .net framework and the requirement will be to know a set of libs relevant to the position.
Comment: just make sure you know what a virtual destructor is so you make it past the phone screen.
Comment: So did you get the job? I'd really like to move into doing C++ but my lack of documented experience is closing doors, not sure how to build it up otherwise.
Comment: Yep... Worked there for 3 years. It was a great experience... but I had to do some catchup with C++ particularities the first few months.
Answer: It depends. If you can answer some basic interview questions about pointers and such, then you should be fine.
It's also beneficial if you can list the differences between C++ templates and .NET generics.
Other than that, it's pretty easy to catch up with the rest as you go along.
Answer: Yes. It may not be as relevant as C++ experience, but it is good.
Good employers are going to be interested in how you think, more than how many years of a specific language you have.
An entry-level C++ position is fine: you can learn quickly, and do a great job. A good company will give you plenty of opportunity to grow. If not you can go somewhere else, and have both C# and C++ experience.
Answer: It really does depend on the nature of the business you're applying to. If they're looking for someone who has good OO-based programming and architecture skills, C# is likely as good as the next thing.
If they take pride in their software's speed/responsiveness, then you're going to need to know your algorithms as this matters more than micro-optimisations - Hash Tables versus Linear lookup, etc. C# is still relevant here, but you'd need to demonstrate understanding of the performance characteristics - not everyone knows about ngen.exe, for example.
If they're into embedded/mobile and/or non-garbage collected environment, you really need to know about how to effectively manage memory. Smart Pointers, as @DeadMG pointed out, are key here, but so is understanding the memory allocation profile. Games programmers often pre-allocate large arrays of objects and recycle them in order to know the memory requirements up-front and reduce unknowns on a per-frame basis. This is also the technique used in the scrolling TableViews in iOS.
If there's any integration work, you're likely to need C-level expertise in terms of marshalling data between languages (like P/Invoke) but also byte-level understanding of how these data structures may get used, which is not common practice in C# in my experience.


where can i found salesforce latest dumps for dev 401 exam

Question: I would like to know the study plan  of Certification (401). can you help me the sites to download the dumps.
Answer: Here are some example questions but make sure you read the official documentation to get yourself prepared. I don't think you'll find actual exam dumps, but a lot of questions are the same, if not similar to what you find online. Just use google, he's your best friend!
Also go through the Study Guide for more detailed explanation of what the exam will look like.
And this is another question asked previously on this site regarding how to prepare.


Need of terminal emulator in unix systems

Question: I am trying to understand the concept of virtual terminals in unix and I am not able to figure out the need of terminal emulator and concept of virtual consoles clearly. I was going through a video lecture on youtube and the lecturer says that now a days we do not have a terminal as we have full fledged setup of monitor, keyboard and mouse. Why we can not consider them as terminal ? According to the definition of a terminal, it is a set of hardware used to communicate with processes. Then why the author says that we do not have terminals now a days ?

Why do we need terminal emulator ? Lecturer says that the terminal emulator sits between "x window system server" and the processes talk to the output devices using terminal emulator. But in case of GUI processes talk directly to "x window system server" which in term communicates with device drivers for stdin/stdout. But why do we need terminal emulator in case processes are capable to talking to "x window server" directly. Is it the case that for "x window server" does not support CLI and for command line interaction, terminal emulator acts as an adapter between process and "x window server" ?
EDIT:-

I went through the answer below and some other resources and here is what I got. Display can work in both character mode as well as APA mode. When we use command line interface, the system expects terminal character device files for I/O. Now when we are already running a GUI which means we have display in non character mode, and we open up a CLI, that session expects a terminal character file to communicate, which is not there. So, we need terminal emulators which creates pseudo terminal character files and also communicates with x-window-server and acts like an adapter.
Kernel also have some device specific actual terminal character files which come into play when we connect it to any display using text mode. When we are using GUI there is no need of terminal character files.
Is the correct or I have got it wrong ?
Comment: When you say "Author says", please mention the book and the author with the chapter. When you say "According to the definition of a terminal", please provide the source of this definition. Is it a book? Wikipedia? Your lecturer's definition? Some random website? Or was it a voice you heard emanating from the Heavens?
Comment: @muru Yes and I think that vagueness comes from people not knowing the historical significance of terminals in computing. Hints the why rather than the what.
Comment: @7_R3X Added sources
Comment: @muru The question is whats the need rather than what it is.
Comment: @jdwolf I think the question is predicated on a hazy understanding of what the terms mean.
Comment: @jdwolf and Gilles's answer there covers "historical significance".
Comment: @muru I feel its more an etymology rather than an explanation.
Answer: Unix-like operating systems were designed for time sharing environments which used terminals and terminal protocols to talk to processes running on those systems.
In modern Unix-like systems simply both the process and its terminal are running on the same system. Therefor a terminal emulator acts like a physical terminal running in software and then talks to a process.
There are practical reasons for keeping that system around including maintaining POSIX compatibility as well it is just a convenient form of inter process communication.
Comment: and systems are still compatibles with physical terminals of course.... using serial ports & usb ports with cable adapter.
Comment: So when I open a terminal in my ubuntu, basically it is simulating a physical terminal in software, and we are maintaining it for backward compatibility ? Also when you say that it helps in IPC, it is about pipes or something else ?


Are there critics against supporting Ukraine based on an economical viewpoint?

Question: I understand that there are several reasons politicians consider when they decide about sending military or financial aid to Ukraine. But in the end, these aids are financed by US/UK tax payers. The national debt of the US is already quite high, especially because of the big spending in the last years to mitigate the effects of COVID. Are there mainstream politicians or political organisations in the US or in the UK who argue that this kind of spending must be reduced due to possible financial problems in the future, even if this may lead to some let's say partial win of Russia in the war?
Comment: @Trilarion Are you sure that the aids to Ukraine are that small as compared to the costs of the war on Iraq? Ukraine officials estimated that about 10 billion USD is needed per month just to run the country (not including the military aids). For a year this is 120 billion USD, about the same as the directs military costs of the Iraq war around 2007-2009 (https://en.wikipedia.org/wiki/Financial_cost_of_the_Iraq_War)
Comment: @AdamGyenge I don't know the costs of the aid, but surely part of the arms are actually already written down and the values given are pure booking values. The US army is probably glad to get rid of older equipment so they can get newer stuff to replace it. Also the aid is shared between many nations. So I still would say it's much, much below even a single trillion, I'm quite sure without knowing the exact numbers.
Comment: @AdamGyenge are you interested in a yes or no answer? Identification of these politicians if they exist? The reasononing of said politicians if said politicians exist? What's the actual question you want answered? The title is a simple yes or no.
Comment: @AdamGyenge yes, the aid cost is incredibly small, and considering the damage it is wrecking on the Russian military it is pennies on the dollar. The weapons are often made in the US, so there's an economic/jobs benefit, it makes our defense contractors a lot of money and gives them free advertising, we are spending most the money on shoring up NATO allies (they get to swap out old equipment to Ukraine in exchange for shiny new planes and tanks) and bringing Norway/Sweden into the fold.  You really aren't going to find a constituency in the US opposed to that outside the far left / tankies.
Comment: to put it in perspective, biden's current student debt cancelation proposal has a price tag of around 320+B. 100B / year is 'change you found in the couch' kinds of cash when you are talking about the US budget.
Comment: In the UK, at least, public sentiment is very much behind the Ukrainians. I'd be surprised if any politicians publicly voice an opinion that opposed supporting them.
Comment: Compared to many other expenses (like for example but not limited to the war on Iraq) the aid given to Ukraine is comparably small. It might not affect the debt much. Just compare the aid (in the order of billions) to the debt (~30 trillions). But nevertheless there might be people arguing that way. For most things there are some people arguing for it.
Comment: US Senator Rand Paul is a notable critic. But I don't think he qualifies as "mainstream".
Comment: @Trilarion Re:it may not affect debt much. That's very dangerous thinking and is generally how people go from credit card debt to bankruptcy. I'm not one of these critics but given the current economic situation in the U.S. (highest year over year and month over month in over 40 years) I would gladly hear the arguments of anyone with reasoning based on fiscal responsibility.
Comment: @uberhaxed Didn't wanted to say that, just that somehow estimating the ratio of the aid and the total debt would suggest that the aid is just a very minor part of the debt.
Comment: @uberhaxed I was interested if there is a public discussion about this issue in the US/UK at all, and if yes who are participating in it. I can look up their arguments if you name a few of them.
Comment: Delivering arms to the Ukraine is actually very cost efficient. These weapons do exactly what they were originally acquired for: Destroying Russian equipment. The donor just doesn't use his own soldiers.
Answer: The question as written is less relevant to the United Kingdom because the UK debt is significantly lower as a percent of GDP in comparison to the United States.
With respect to the United States,a proxy for politicians against supporting Ukraine is the vote record in the US House of Representatives for the S.3522 - Ukraine Democracy Defense Lend-Lease Act of 2022. Only 10 members of the House of Representatives voted against the bill.  All of which were members of the Republican Party. It's not viable to go through the histories of each, but here is a quote from Matt Gaetz who was one of the ten that voted against the bill:

Why should Americans have to pay?

As only 10 members of the GOP voted against the bill, there are no major political organizations against the support measures. Whether the individuals from the votes against the support measures are mainstream or not is highly subjective.
Comment: The recent additional $40 billion aid package (Additional Ukraine Supplemental Appropriations Act, 2022) still got overwhelming support in both Houses, but not that big as the one you mention in the answer. [86 for it and 11 against it in Senate](https://www.senate.gov/legislative/LIS/roll_call_votes/vote1172/vote_117_2_00191.htm) for example. Maybe some of the nay-sayers even said why.
Answer: Senator Rand Paul, while he seemingly did not vote against US trade sanctions on Russia (incl. oil), which passed 100-0 in the Senate (in April), was apparently opposed to just gifting weapons to Ukraine, as quoted in March by Fox News:

Sen. Rand Paul, R-Ky., weighed in on the White House's request to Congress for $10 billion in aid to Ukraine, saying he's not opposed to selling weapons to Ukraine, but the U.S. should be careful about giving weapons away and expanding on national debt, which would threaten national security. [...]
Paul responded to the White House's ask, saying he's "not opposed" to selling weapons to assist Ukraine, but he's "opposed" to giving away weapons and expanding upon the United States' trillions of dollars in debt, which would "threaten our own national security."
"I'm not opposed to selling defensive weapons to Ukraine. I am opposed to giving away weapons or money to buy weapons as I believe that we should not expand our $30 trillion debt that threatens our own national security," Paul told Fox News Digital.

I'm not sure how he voted on specific bills relating to that kind of military aid though.
It turns out it would be a lot harder to parse the positions from votes before April, because the bills for supporting Ukraine with aid were tacked/combined with other appropriations that elicited opposition.
On the other hand, Rand Paul and 10 other Republican Senators voted against the $40 billion aid package for Ukraine, in May. CNN reported in one of those live feeds that make it hard to link to individual posts:

All Democrats supported the legislation. Eleven Republican senators voted against it: Marsha Blackburn of Tennessee, John Boozman of Arkansas, Mike Braun of Indiana, Mike Crapo of Idaho, Bill Hagerty of Tennessee, Josh Hawley of Missouri, Mike Lee of Utah, Cynthia Lummis of Wyoming, Roger Marshall of Kansas, Rand Paul of Kentucky and Tommy Tuberville of Alabama.

However, from another CNN report, it seems that Rand Paul opposed this bill
mainly for lack of a spending accountability mechanism to his satifaction:

But Sen. Rand Paul, a Republican from Kentucky, blocked passage of the aid package until Thursday, which is the day the Biden administration said additional funds must be approved to avoid a lapse in support for Ukraine.
Paul has demanded that language be added to the bill that provides a special inspector general new authority to oversee how the Ukraine aid is being spent. And while members from both parties broadly agree with that notion, forcing a change to the bill at such a late stage is time consuming and would slow getting the needed emergency aid to country.
Under Senate rules, any one senator can slow down the process. It took about a week to overcome Paul's objection through timely procedural steps that the majority leader had to take on the Senate floor.
"I think we should have an inspector general," Paul told CNN earlier this week. "We have one out there and overseeing Afghan waste. He's been very good at it. You don't have to wait for an appointment. He's got a team up and running. And I think that's what we should do."

So it seem he's changed his reasoning for opposing compared to earlier reports... somewhat. He also repeated however (last week):

Paul said in a floor speech before objecting to the legislation's passage last week that his "oath of office is the US constitution not to any foreign nation" and, "we cannot save Ukraine by dooming the US economy."

I also managed to find his taped remarks on that occasion and he summed up the military aid to Ukraine to $60 bn, which he then said it that it exceeded the yearly military budget of any country outside the top 5 spenders. And he's made various other comparisons with cancer research spending, the State Department budget, etc. So, yeah, he thinks the US spends too much on this war.
Answer: I think the closest an MP in the UK has come to this sort of criticism was Jeremy Corbyn, former leader of the Labour Party who now sits as an independent in Parliament. In a speech to the People's Assembly Against Austerity on February 12th - note that this was before Russia invaded Ukraine - he made the following remarks:

I say to this, to the Treasury Building over there, to the MPs over there; I've always noticed whenever they want money for arms, for weapons and war, it's always there. When you ask for money for benefits, when you ask for money for housing, when you ask for money for councils and the health service - "you've gotta be very careful, we can't afford this".
A nation that can afford to spend so much on nuclear weapons and other weapons, and be prepared, wrongly in my view, to be involved in a war in the Ukraine, can well afford to support the poorest communities in this country.
Comment: @Trilarion yes, I did note it was before the war. I still think this is the closest a UK MP has come to such a statement; if you don't think this counts, then I'd say there has been no such view expressed.
Comment: This was before the war in Ukraine. Maybe Corbyn who expresses here a general dislike of military spending, would have approved in this case. The question asks specifically for the spending on the war in Ukraine. Also much of the spending is on sanctions and aid, not only military.


Can a general many-body Hamiltonian with quadratic and biquadratic terms be diagonalized?

Question: Can an arbitrary many-body hamiltonian in second quantization form with quadratic and biquadratic terms
$$H=\sum_{v_1,v_2} \alpha_{v_1 v_2}\ c_{v_1}^{\dagger}c_{v_2}+ \sum_{v_1,v_2,v_3,v_4}\beta_{v_1 v_2 v_3 v_4}\ c_{v_1}^{\dagger}c_{v_2}^{\dagger}c_{v_3}c_{v_4}$$
be diagonalized into
$$H=\sum_{u} \epsilon_u c_{u}^{\dagger}c_{u}$$
?
Answer: No.

I assume you talk about fermions (not that is matters much -- a similar argument would work for bosons).
Consider the 2-fermion Hamiltonian
$$
H=E_{00}+(E_{10}-E_{00})c_1^\dagger c_1 +
(E_{01}-E_{00})c_2^\dagger c_2 + (E_{11}-E_{01}-E_{10}+E_{00}) c_1^\dagger c_1c_2^\dagger c_2\ .
$$
This Hamiltonian has eigenstates which are Fock states, with four independent eigenvalues $E_{00}$, $E_{01}$, $E_{10}$, $E_{11}$.
On the other hand, the most general Hamiltonian of two non-interacting fermions,
$$
H'=\epsilon_0 + \epsilon_1 d_1^\dagger d_1 + \epsilon_2 d_2^\dagger d_2 \ ,
$$
has only three independent parameters, and thus only three independent eigenvalues. It therefore can by no means reproduce the energy spectrum of a general Hamiltonian $H$ above.
(If you want to see this concretely, choose e.g. $E_{00}=E_{01}=E_{10}=0$, $E_{11}=1$.)
Comment: Get it. Actually I was thinking about that with a fixed particle number N, the many-body Hamiltonian should be diagonalizable. Now I realize being diagonalizable with a fixed N doesn't mean being able to write H into quadratic terms. Because quadratic H cannot necessarily CONNECT N particle's energy spectrum with N+1 particle's energy spectrum.
Comment: You can do the same with 3 or more modes, where you project onto a fixed particle number: You will observe the same.  The point is that for free fermions, the n-fermion energies are always sums of n single-particle energies, which is a severe constraint.


EE3: Polls or surveys?

Question: Does anyone know of any poll or survey modules that work with EE3? The ones I've checked out say - on the companies' sites - that they currently work with EE2, and not yet EE3.
Comment: I don't have any module development knowledge. That was one of the things that I liked about EE: a pretty robust group of plugins. Things seem like they're dying out now. Well, looks like I'll have to go with third-party/embedded for this for my site, then. Thankfully there are options...
Comment: sorry to inform you, there is no available plugin for polls or surveys for EE3. You can covert one in EE3 if you have some module development knowledge.
Answer: As I'm also researching such add-on possibilities so far I found:

DevDaemon Channel PollsChannel Polls
EE Harbour Polls (acquired from Solspace I think) Polls
accuired  1: http://www.devdemon.com/expressionengine-addons/channel-polls
VWM Polls - a free one from depot:ee

I found these, but I think for my purpose I need also a custom development as they are giving you pretty basic and standard options as most of the polls on the market
Comment: I think all of them deliver you basic poll functionality. If you want to go crazy - either you should extend some of them, create your own or go for external solution.
Comment: I'm using Channel Polls, to display the results and having more options the Channel Fields entries are converted to JSON, CSV or XML and imported in many JavaScript charts ( I'm using Higcharts). So many more options are available.
Comment: Yes you're right, but add-on like Channel Polls have a questions system with data statistics. It'very well integrated to EE, I didn't have time to develop a such own solution. In 15 min, I linked Channel Polls to Higcharts, results: it's very powerful and fast to implement! No need  to reinvent the wheel , if your time delay is short.

EE3: Polls or surveys?


Is the Instantaneous Axis of Rotation in rolling without slipping defined only in non-inertial frame about the point the point in contact?

Question: Consider a body rolling on rough surface. And its rolling without slipping. Is the Instantaneous Axis of rotation about the point in contact defined only  in non-inertial frame? I mean do we consider point 'A' as part of the rotating body in contact with the surface and then define the Instantaneous  Axis of rotation or Can we define instantaneous axis about a point B at infinitesimally small distance from the point in contact which (B) (ie a inertial frame) is a part of the surface on which the body is rolling.
Answer: You can rotate a body many ways. The axis of rotation can pass through the body or be entirely outside it. The axis is a mathematical line. It isn't part of the body.
To see the point of the instantaneous axis of rotation, imagine two identical bodies. One is rolling on a plane. It passes over a line x. The other is placed next to the line so it is tangent to the surface of the body. This body rotates around x. There is an instant where the two bodies are moving exactly the same way.
For that instant, you can use the 2nd body to figure out things about the first body. They have the same kinetic energy and angular momentum. The speed of each point in the body is the same. And so on.
Note that only inertial frames at rest with respect to the plane were used in this example. Of course we have to keep changing to different frames with a different 2nd body if we want to keep up with the 1st body.
Answer: The instantaneous centre of rotation (ICR) is not a material point, and it does not belong to any object. It a geometric object defined by measuring the motion of a body from some reference frame (origin + basis vectors), such that the measured velocity of a body at that location is zero (in 2D).
A better way to think about is by asking the following:
What is the velocity of whatever particle happens to be under the location in space I am interested in? Each velocity measurement is like having a magnifying glass and measuring the velocity of what is on the focal point of the glass.

The point where the magnifying glass is focused on is just a location in space, and not attached to the object we are measuring.
The ICR is exactly like that, except it is the special point in space where the velocity of the object on this location happens to be zero.
If the velocity measurements are against an inertial frame, then we're looking at the absolute ICR of a body, and if we attach a measuring frame to a moving body then we're look at the relative ICR of a body.
Answer:
At the contact point A , you have the tangent vector $~\vec t~$ and the normal vector $~\vec n~$ to the curve $~f(x)~$ . $(~\vec n\perp\vec t)~$
thus, the Instantaneous Axis of rotation
is $~\vec t\times\vec n$
The "Instantaneous Axis Frame" is then
$$F_{Ai}=[\vec t_{A_i}~,\vec n_{A_i}~,~\vec t_{Ai}\times\vec n_{A_i}]$$


Email Attachment Size Limits

Question: Given I have plenty of disk space to work with, what are some technical considerations that I need to consider when configuring email attachment size limits?
Comment: [email != FTP](http://s3.amazonaws.com/theoatmeal-img/comics/email/6.png)... [*](http://theoatmeal.com/comics/email)
Comment: @jscott - exactly! Also, my Exchange server IS **NOT** an extension of your allocated network storage quota!!
Comment: @Ben: zimbra (postfix), in this case. I attempted to asked the question in a server agnostic fashion in order to get a better understanding of what to consider w/ any email server. I support others also.
Comment: What email server are you using?
Comment: Good question.  This gets debated a lot between users who are used to pseudo-infinitly large mailboxes from "free" providers such as Gmail, and us sysadmins who are working with limited storage and backup budgets.
Answer: Some of the considerations:

Mail limits on other email systems, not everyone likes receiving 150MB attachments. Bounces will annoy YOUR users (and consume their quota, if any), and generate calls.
Any mailbox size quotas you have in place. Large attachments make hitting them a LOT easier.
Large-attachment virus scanning overhead.
If your mailer is database backed (Exchange, others) how large of a database you're willing to put up with.
How long it takes to recover from disaster. A large mail-store can take a lot longer than smaller ones.
How many users you have and however long it takes to hit whatever mail-quotas you have in place.
Mail client mail-download times(1). If a user has a 15GB mailbox, even in IMAP some clients will pull down all the mail.
Mail client mail-download times(2). 75MB attachments can take a really long time to pull from your mail-server. This may annoy users.
Comment: +1 good summary, including a point or two I forgot last time I needed to defend not increasing our limit!
Comment: Even the great Google [imposes a 25MB limit](http://mail.google.com/support/bin/answer.py?hl=en&answer=8770) for email attachments.
Comment: @David We have researchers here who insist, *insist* they need to email 250MB datasets to fellow researchers at other institutions. I know this argument well.
Answer: I have a 10MB attachment limit set on my Exchange server for the following reasons.
First of all, those huge 20MB PowerPoint presentations that people send around are taking up space on my server which would be better placed on a network drive/in SharePoint (this isn't necessarily an issue if your mail server only delivers mail rather than storing it too).
Disk space may well be plentiful on your server, but email is not designed as a method of transferring files to co-workers, neither is it designed for storing masses of attachments. You need to think of the time it will take to recover all this information if your email server goes pop and you have to restore from backup. That extra 2GB of attachments in peoples mailboxes takes precious time to restore, and in my experience Exchange isn't the quickest at restoring from backup.
As I mentioned above, and so did jscott in his comment - email is NOT a method for your users to transfer files to each other. This should also be done via some kind of shared network drive, USB Hard Disk or USB memory sticks.
If these attachments are going external to your company, that huge attachment has to go through the internet. If you have a slow connection from your server to the outside world, this will take time to send and if you have a bandwidth limit on your line, you will very quickly eat into that. It will also take an equally long time for the receiving party to download it too.
Please also think of the recipient when you send large emails. They also may be on a slow connection (more than likely if they are on a home grade ADSL) and won't appreciate it when they press Send/Receive and it takes forever for their new mails to download because of a large attachment. Equally, they will probably have a bandwidth limit (especially so if it's a home user) and would probably be rather angry if your large email took them over their bandwidth limit and they were charged for it.
There are also factors beyond your control. When an email is sent across the internet, it may pass through many mail servers. These intermediate mail servers may have a size limit imposed on them. If that happens, your message won't be delivered to the recipient because it is too large.
Answer: If you are meaning for incoming mail and/or internal, then space is the only real factor unless there are store size problems with your mail system (if you specify what mail system you are using people may be able to give you specific hints there) - though make sure your users know there are often better ways to distribute large content and make sure you consider the implications for your backup solution.
For outgoing mail you should set a reasonable limit otherwise people may send out massive mails which go out (taking bandwidth and wasting their time) only to be rejected at the other end for being over-sized. Many mail systems set the maximum size (after any encoding of binary data, like base64) to around 10Mbyte which I think is fairly sensible with today's connection speeds though smaller limits are not uncommon. A rejection at your end will be much quicker than a bounce from outside.

Email Attachment Size Limits


Is it safe to replace ethernet wall plate with a camera?

Question: I want to mount a camera horizontally with no wires showing. I thought it might be easiest if I just covered the ethernet wall plate with the power over ethernet camera. This would completely cover the hole in the wall, but there would be a small gap (2-3mm maybe) between the camera and the wall. Since it is a low voltage wire, I'm tempted to think it doesn't violate electrical codes. Would it violate building or fire codes?
Answer: It would not violate NEC code. There is no box required for communications cable like cat 5-6. Putting a device that covers the hole even 100% covered is fine.


Interaction of redistributive taxes, monetary policy and the growth rate

Question: While studying macroeconomics, interaction with taxes are not seen to importantly. I am though interested in an interaction with redistributive taxes (such as the income or the inheritance tax rate), monetary policy and the growth rate. Does anybody of you know good starting points ?
Comment: Your first sentence is a bit confusing. Are you saying there is little on taxation in the economic research literature? To be honest, it's hard to miss! If you enter "economics taxation" into google scholar you get 1.85 million results! But maybe I misunderstood the first sentence.
Answer: A redistributive taxation or progressive taxation would be used by a government to increase equality/ decrease its gini coefficient. This wouldn't result in an increase in growth rate as aggregate supply would decrease, because of a decrease in capital of firms. (Usually firms are run by higher earners which wouldn't benefit from such a taxation.) If redistributive taxation was applied and the government was trying to increase its growth rate, it would probably intervene in the market to increase spending. Therefore, it would decrease interest rates or indirect tax (bigger burden on lower earners). I tried to understand what you were asking, but the question is a bit confused
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-ask).


Asterisk with MySQL

Question: How does Asterisk saves it's data? Does it use flat files, SQLite, or a database like MySQL by default?
Can I change the way data is being stored?
Answer: If you are talking about CDRs (Call Detail Records) then it looks like it uses a CSV file as default, but you can change it to MySQL or many other formats if you wish:
http://www.voip-info.org/wiki/view/Asterisk+billing
Answer: The question is not specific enough. Asterisk uses different methods to store data for different stuff.
If you are referring to the astdb: Till Asterisk 1.8 they use Berkeley DB. Beginning with Asterisk 10.0 they use SQLite. Have a look at https://wiki.asterisk.org/wiki/display/AST/SQLite3+astdb+back-end
Answer: You can also use php agi to communicate to php webserver and then to mysql...it's most commonly use method to communicate to mysql DB...

Asterisk with MySQL


Uniformly continuous function acts almost like an Lipschitz function?

Question: Can anyone help?
Let $g:I \to \mathbb{R}$ be an uniformly continuous function, where $I$ is an interval. Prove that exists an constant $c$ that satisfies:
$$\lvert g(x)-g(y)\rvert < 1 + c \lvert x-y \rvert, \forall x,y \in I$$
Comment: Hint: take $\delta$ from uniform continuity (doesn't matter for which $\epsilon$) and use it repeatedly, moving from $x$ to $y$ in small steps. Count how many steps you need.
Answer: Apply the suggestion of @5pm. Take $\delta$ in the definition of uniformly continuity which corresponds to $\epsilon=1$. You can suppose $\delta<1$ (decreasing $\delta$ does not hurt). Given $x,y\in I$ let $x=x_0<x_1<\dots <x_n = y$ so that $|x_{i+1} - x_i|< \delta$. You can do this with $n = \lceil (x-y)/\delta \rceil$, so
$$
|f(x)-f(y)| \le \sum_{i=1}^n |f(x_{i})-f(x_{i-1})| \le n = \lceil (x-y)/\delta \rceil \le 1 + (x-y)/\delta.
$$
Let $c=1/\delta$ and you are done.
Answer: From the definition of uniform continuity you have that $|x-y|<\delta$ implies $|g(x) - g(y)| < \epsilon$ and specifically $\delta$ can only depend on $\epsilon$ and must be independent of $x$ and $y$. So you would have that $|x-y|< M\epsilon$ where $M \in \mathbb{R}$ for all $x,y \in I$ implies $|g(x) - g(y)| < \epsilon$.
From here I'm not entirely sure where to go, I'm wondering if you can assume $\epsilon <1$ so you get $1 + \frac{1}{M}|x-y| < 1 + \epsilon$ but since, from the definition of continuity $\epsilon > 0$ you get $1 <1 + \frac{1}{M}|x-y| < 1 + \epsilon$
Thus
$|g(x) - g(y)| < 1 + \frac{1}{M}|x-y|$
Where $\frac{1}{M}$ is your constant.
There's far more qualified people on here though (I'm just nervous about posting it, in case it takes you in a wrong direction)
Comment: I don't see why $M\epsilon$ appeared instead of $\delta$ at the end of the first paragraph.
Comment: Correct me if I'm wrong, but if $g$ is uniformly continuous then $\delta$ just depends on $\epsilon$, so you can write $\delta = M\epsilon$ for some constant $M>0$, or is that not correct?
Comment: It is correct that $\delta$ depends only on $\epsilon$. However, writing $\delta=M\epsilon$ amounts to saying that $\delta$ depends *linearly* on $\epsilon$, which is not necessarily true. For example, the function $f(x)=\sqrt{x}$ is uniformly continuous on $[0,1]$. For this function the biggest $\delta$ we can take is $\delta=\epsilon^2$. Setting  $\delta=M\epsilon$ will not work no matter what positive number $M$ you take.
Comment: Ah of course, do you think there's a simple way to change my solution to account for it?
Comment: No. It's best to start over. The first step is to give up the idea that some algebraic manipulations with $x,y,f(x),f(y),g(x),g(y)$ will yield the result. That's not going to happen. Other points, besides $x$ and $y$, must be considered. The comment I left under the question suggests what is to be done.


Do backer board seams on tiled floor need to be taped?

Question: First time tiling a floor, I have hardibacker down throughout. Do I need to tape and mortar the seams?
Answer: Yes. And use the alkali-resistant CBU tape.
One tip, which might help or hurt - when you tape ahead of time and let the thinset dry before tiling you can get some bumps among the tape and thinset. These are less of a problem with big tiles which sit on a deeper thinset bed, but can be a pain if using small tiles on a shallow bed. You'll want to keep a rub stone handy when you start lays by tile. Like here: I was not able to get a smooth finish on a shower pan, how can I smooth it out?
The other thing you can do is tape as you are laying the tile. This avoids the dry thinset bad tape bumps, but adds one more thing to the various things you'll be juggling.
I can't tell you which method is better, but you def want the tape so you'll have a rigid substructure to prevent cracks. If it were me, and I wasn't in a hurry, I'd tape ahead of time, being very careful to keep everything nice and flat.
Good luck!
Comment: I think I am going to tape ahead of time.  How long approximately does it take to dry?  Overnight?
Answer: Over HardieBacker, it dries out fast, in an hour or two. To help keep a smooth joint, take a grout sponge and wipe the seams down first with water.  This will stop the backer from sucking the moisture out of the mortar too fast. Don't forget to put mortar under the backer, also.


Showing current employers work on own website?

Question: I want to create a portfolio website and show potential employers the websites I have made at my current job. But, hosting company code without their permission is unethical, so what should I do to show them my work?
Comment: See also: [Applying for jobs, new company wants to see source code that I don't have access to any more](http://workplace.stackexchange.com/questions/57990/applying-for-jobs-new-company-wants-to-see-source-code-that-i-dont-have-access)
Comment: If your employer's websites are publicly available then have you considered posting links to them instead?
Answer: Is there anyway you could take screenshots of the finished product?
^If this is still a violation of your company policy, I would create different work samples. The last thing you want to do is get in trouble with your current company.
Answer: Do a google search for: web design company
Many company/designers showcase direct links to the public websites that they have built. Where showcasing your work becomes an issue is if the design was meant for internal use only.


Returning from a finally block in Java

Question: I was surprised recently to find that it's possible to have a return statement in a finally block in Java.
It seems like lots of people think it's a bad thing to do as described in 'Don't return in a finally clause'. Scratching a little deeper, I also found 'Java's return doesn't always' which shows some pretty horrible examples of other types of flow control in finally blocks.
So, my question is, can anyone give me an example where a return statement (or other flow control) in a finally block produces better / more readable code?
Answer: I had a REALLY hard time to track down a bug years ago that was caused by this. The code was something like:
Object problemMethod() {
    Object rtn = null;
    try {
        rtn = somethingThatThrewAnException();
    }
    finally {
        doSomeCleanup();
        return rtn;
    }
}

What happened is that the exception was thrown down in some other code. It was being caught and logged and rethrown within the somethingThatThrewAnException() method. But the exception wasn't being propagated up past problemMethod(). After a LONG time of looking at this we finally tracked it down to the return method. The return method in the finally block was basically stopping the exception that happened in the try block from propagating up even though it wasn't caught.
Like others have said, while it is legal to return from a finally block according to the Java spec, it is a BAD thing and shouldn't be done.
Comment: @parsecer, ?? Just do it the usual way, after the finally.
Comment: Where should one put the return then?
Comment: @parsecer I'd say right after calling somethingThatThrewAnException() inside the try block
Answer: The examples you provided are reason enough to not use flow-control from finally.
Even if there's a contrived example where it's "better," consider the developer who has to maintain your code later and who might not be aware of the subtleties.  That poor developer might even be you....
Comment: Sure. I guess I'm asking in case someone can give me some really compelling example on the side of good.
Comment: @MattSheppard in daos, I will often log the exit of a query in a [try-finally](https://gist.github.com/bicabone/8722d72301798bece20e649b6c1dfcda)
Answer: javac will warn of return in finally if you use the -Xlint:finally. Originally javac emitted no warnings - if something is wrong with the code, it should fail to compile. Unfortunately backwards compatibility means that unanticipated ingenious foolishness cannot be prohibited.
Exceptions can be thrown from finally blocks, but in that case the exhibited behaviour is almost certainly what you want.
Answer: Adding control structures and returns to finally{} blocks are just another example of "just because you can" abuses which are scattered throughout virtually all development languages.  Jason was right in suggesting it could easily become a maintenance nightmare - the arguments against early returns from functions apply more-so to this case of "late returns".
Finally blocks exist for one purpose, to allow you to completely tidy up after yourself, no matter what happened in all the preceeding code. Principally this is closing / releasing file pointers, database connections etc., though I could see it being stretched to say adding in bespoke auditing.
Anything that affects the return of the function should lie in the try{} block.  Even if you had a method whereby you checked an external state, did a time consuming operation, then checked that state again in case it became invalid, you would still want the second check inside the try{} - if it sat inside finally{} and the long operation failed, you would then be checking that state a second time needlessly.
Answer: A simple Groovy Test:
public class Instance {

  List<String> runningThreads = new ArrayList<String>()

  void test(boolean returnInFinally) {

    println "\ntest(returnInFinally: $returnInFinally)"
    println "--------------------------------------------------------------------------"
    println "before execute"
    String result = execute(returnInFinally, false)
    println "after execute -> result: " + result
    println "--------------------------------------------------------------------------"

    println "before execute"
    try {
      result = execute(returnInFinally, true)
      println "after execute -> result: " + result
    } catch (Exception ex) {
      println "execute threw exception: " + ex.getMessage()
    }
    println "--------------------------------------------------------------------------\n"

  }

  String execute(boolean returnInFinally, boolean throwError) {
      String thread = Thread.currentThread().getName()
      println "...execute(returnInFinally: $returnInFinally, throwError: $throwError) - thread: $thread"
      runningThreads.add(thread)
      try {
        if (throwError) {
          println "...error in execute, throw exception"
          throw new Exception("as you liked :-)")
        }
        println "...return 'OK' from execute"
        return "OK"
      } finally {
        println "...pass finally block"
        if (returnInFinally) return "return value from FINALLY ^^"
        // runningThreads.remove(thread)
      }
  }
}

Instance instance = new Instance()
instance.test(false)
instance.test(true)

Output:
test(returnInFinally: false)
-----------------------------------------------------------------------------
before execute
...execute(returnInFinally: false, throwError: false) - thread: Thread-116
...return 'OK' from execute
...pass finally block
after execute -> result: OK
-----------------------------------------------------------------------------
before execute
...execute(returnInFinally: false, throwError: true) - thread: Thread-116
...error in execute, throw exception
...pass finally block
execute threw exception: as you liked :-)
-----------------------------------------------------------------------------

test(returnInFinally: true)
-----------------------------------------------------------------------------
before execute
...execute(returnInFinally: true, throwError: false) - thread: Thread-116
...return 'OK' from execute
...pass finally block
after execute -> result: return value from FINALLY ^^
-----------------------------------------------------------------------------
before execute
...execute(returnInFinally: true, throwError: true) - thread: Thread-116
...error in execute, throw exception
...pass finally block
after execute -> result: return value from FINALLY ^^
-----------------------------------------------------------------------------

Question:
One interesting point for me was to see how Groovy deals with implicit returns. In Groovy it is possible to "return" from a method simply leaving a value at the end (without return). What do you think happens, if you uncomment the runningThreads.remove(..) line in the finally statement - will this overwrite the regular return value ("OK") and cover the exception?!
Answer: Returning from inside a finally block will cause exceptions to be lost.
A return statement inside a finally block will cause any exception that might be thrown in the try or catch block to be discarded.
According to the Java Language Specification:

If execution of the try block completes abruptly for any other reason
  R, then the finally block is executed, and then there is a choice:
   If the finally block completes normally, then the try statement
   completes  abruptly for reason R.

   If the finally block completes abruptly for reason S, then the try
   statement  completes abruptly for reason S (and reason R is
   discarded).

Note: As per JLS 14.17 - a return statement always completes abruptly.

Returning from a finally block in Java


Visualforce rich text input area spacing

Question: I have a rich text textarea on my vf page that I am populating with the html from an email template.  Everything appears correct except the paragraph spacing is double spaced.  Does anyone know how to control the vertical spacing?  Is it  a style element?
Answer: There are some inconsistencies between the rich text control and the email template html version.  The template editor puts a style in the beginning to limit the  tag spacing.

I could not simply prefix the body html with the style as the rte control stripped it out. I put code in the controller for all p tag styles to include these entries.  Fortunately they were all one of two standard formats.
There also appeared to be unprintable characters that caused an extra  tag in a couple places.  Deleting all white space and replacing with only the required spaces and returns seems to resolve that as well.
Answer:
 elements include a 1em space afterwards; it's part of the HTML specs. If you want to have single spacing, use a line break (
) instead.
Comment: The data for the edit object is pulled from an email template which is built with a similar rich text editor.  I don't control the html in either case.
Answer: I have run into the "oppossite" scenario to these multiple times (= how a rich text field sent over an email in Salesforce appears with double spacing), and it's confusing mainly because the text in the Salesforce UI (at least in Lightning Experience) looks different (nice, i.e. without extra spacing) than when that same text is sent over email using an Email Template (where the extra spacing appears).
I have found that you can actually add styling to the template that will fix this in Outlook (and possibly other, not-so-quirky email clients), but warning: it does not fix it for Gmail because styles aren't applied unless they are inline at each tag's level (!). For Outlook though, add something like p{margin-top:3px; margin-bottom:3px;} where appropriate in the template (ex: inside the parent div where you will embed the rich text field) and the email will render as you expect.


Are questions about why a solution worked acceptable?

Question: If I had a problem, and fixed it, but do not know WHY it was fixed, would that question be acceptable to ask?
Comment: We do allow questions for explaining code. But please do make sure to explain what you understand about the code and what is unclear. Questions like "explain this <code>" are not easy to answer, as it's not clear what to explain - variable assignments? What a loop is? Something else entirely?</code>
Comment: Generally, yes, but have you [researched first](https://meta.stackoverflow.com/q/261592/4642212)?
Comment: Does this answer your question? [Is it ok to ask a question where you've found a solution but don't know why something was behaving the way it was?](https://meta.stackoverflow.com/questions/306287/is-it-ok-to-ask-a-question-where-youve-found-a-solution-but-dont-know-why-some)
Comment: I think it is totally acceptable, cause we want to learn and actually know the answer and not magically sort things out. its like debug with print you can do the job but not fully understand the solution
Comment: @Obscerno sure but it helps if there is a very specific topic involved, like performance. If you have two methods and method A happens to work a lot faster than method B and you can't explain why... that would be very valuable to see explained. But just having a random code dump and asking why it works... a debugger also works to explain that to yourself.
Comment: If you don't know why it was fixed, go back piece by piece until it is broken again. The last step on this way tells you why. (Opposite from where people usually come when doing a minimal reproducible example, but works like a charm as long as you keep a history to go back to.)
Comment: @SebastianSimon Yes I have, and found nothing useful.
Comment: Not exactly the same, but relevant: https://meta.stackoverflow.com/a/253788/843953
Comment: I think these kinds of why questions can be very valuable for developing a deeper understanding, especially if you didn't actually come up with the solution yourself. I ran into this myself, and tried to frame the question as "Is there a better way to do this, also why does this work?" In retrospect it would have been better to ask "Why does this work" as it's more focused and that's what I mainly wanted to know. For the curious: https://joomla.stackexchange.com/q/28085/8455 (not on stack overflow but hopefully it illustrates how these questions can be valuable)
Comment: @Gavin S. Yancey: I *knew* it wasn't just déjà vu. (For those who don't get it, I answered that, five and a half years ago.)
Answer: In theory, yes
There are no rules prohibiting this, and asking how code works, or why a specific approach works is on-topic here. There are some well received questions asking why a specific approach works.
In practice, it's not likely to be well-received
You apparently have a problem you solved yourself without knowing how you solved it.
That reeks of overcomplicated code, shotgun debugging, and no minimal, reproducible example. It's odd to be able to write working code without understanding how this code works.
If you truly have reduced the code to a fully reproducible example while using the minimal amount of code to reproduce it, and both the error and the solution are reproducible, but you still don't understand the problem, well, then something odd is going on, and it may be a great question. However, such questions are incredibly rare.
Do make sure you show your research, e.g. linking to the docs of the relevant function, explaining why you think it shouldn't work while it does work, etc. If you ask us to explain how something works, starting with what you understand about how it works allows us to fill the gaps, instead of just repeating the docs that explain the subject.
Comment: A few hours of shotgun debugging will always save a few minutes in the documentation!
Comment: Shotgun debugging, ooh I like that. I was calling it "Throw random things at the wall and see what sticks", quite wordy.
Comment: I didn't know this term existed https://en.wikipedia.org/wiki/Shotgun_debugging
Comment: @zcoop98 - Or worse, *not* save them.
Comment: @Gimby I've always preferred the phrase "a stochastic approach to programming" - using buzzwords makes everything sound fancier.
Comment: I imagine more the following: somebody asks for X, one answer says "try Y" and it's not obvious why Y solves X. Often enough there are code-only answers on SO that do not sufficiently explain a solution. Asking why Y solves X might be a natural follow-up question but one that basically would be better answered by extending the answer to the original question.
Comment: I know they stated they wrote it. The more common case I see is someone else's code/answer that OP wants explaining.
Comment: @Gimby Another meaning to spaghetti code? It's done when it sticks.
Answer: I think that it is. I will put one of my questions as an example.
As long as you have a minimal example, and you show some effort from your part, i think to ask them is fine.
And they can be helpfull too, in my case, I got to the answer based on the comments, and learned something new, that wasnt really obvious for me.


Does magic work on Animagi?

Question: According to the question and the answer here, it is quite unresolved if Animagi can or cannot perform magic. However, is it possible to perform magical spells on Animagi (spells such as Stupify, Rictesumpra or any other common spells)? Except the spell to reverse transform animagi back to their human form, are there evidences of other spells cast on animagi?
Comment: Spells that only affect humans and not animals might not work, but there's no reason to think other spells wouldn't.
Comment: @HarryJohnston That sounds about right. But are you aware of any instances where such a thing has been mentioned by JKR or any authentic source anywhere?
Answer: Yes.
Remus Lupin and Sirius Black threatened to perform magic on Wormtail should he transform. By definition, their threat would only have been carried out if Wormtail was in his rat form.

"I'm going to tie him up," said Lupin. "That's all, I swear."
  Harry stepped out of the way. Thin cords shot from Lupin's wand this time, and next moment, Pettigrew was wriggling on the floor, bound and gagged.
  "But if you transform, Peter, growled Black, his own wand pointing at Pettigrew, too, "we will kill you. You agree, Harry?"
  Harry looked down at the pitiful figure on the floor, and nodded so that Pettigrew could see him.
(Prisoner of Azkaban, Chapter 19, The Servant of Lord Voldemort).
"One wrong move, Peter," said Lupin threateningly, ahead. His wand was still pointed sideways at Pettigrew's chest.
(Prisoner of Azkaban, Chapter 20, The Dementor's Kiss).

It's unclear exactly what spell they were proposing to use on Wormtail but it's a fair guess that it was Avada Kedavra. Since both Lupin and Black were deadly serious in their intent to revenge the Potters it's very unlikely that they would make this sort of threat if they were not capable of executing it.
We don't know whether other forms of magic work when cast upon Animagi. As far as I'm aware, this is the only instance of magic being performed on, or threatened towards, an Animagi. (Hermione performing an Unbreakable Charm on the jar containing Rita Skeeter is the next-closest example, but it scarcely counts). I don't see any reason why spells shouldn't work as they would upon normal animals since the Animagi becomes the animal in almost every respect.
Comment: Another example is the battle in the Ministry, if taking your Animagus form makes you invulnerable why wouldn't Sirius have done so?  (This one is better, though.)
Comment: @HarryJohnston I don't think we was trying to make himself invulnerable at any point, though. I think he was trying to protect Harry from the Death Eaters.
Comment: ... and what better way to do that than to make himself invulnerable and then start biting their wand hands? :-)

Does magic work on Animagi?


Is Global Entry worth it?

Question: I am an international student attending boarding school in the US. I am on an F1 student visa. I will likely visit home (India) one to three times a year for the next three to five years. All international flights will be out of Boston Logan (BOS) or New York City (JFK). I cannot stay on campus for breaks, so I will definitely have to fly somewhere a minimum of five (round) trips a year. Is Global Entry (and the TSA PreCheck that comes with it) worth it? What have your experiences been with both of those? Does TSA PreCheck really save that much time when flying domestic? Is immigration easier and/or significantly quicker with Global Entry? What about non-immigrants using Global Entry?
Comment: Short answer : yes.
Comment: You may want to edit this question to be clearer on what you mean by 'worth it' as it may be closed for opinion based answers otherwise.
Answer: My wife and I have had Global Entry for over 5 years. My experiences are as follows:

TSA Precheck: As more and more people have signed up, the time saving vs. the normal line has become less. However, during busy times, at many airports, the TSA agents will make an effort to speed up the Precheck line at the expense of the normal line. I've even seen some of the Precheck travelers diverted to agents handling the normal line; in this case, those travelers are given cards to allow them the benefits while in the normal clearance areas.

However, regardless of the time savings, Precheck gives extra conveniences including not removing the liquids bag, keeping on shoes and using the metal detector instead of the body scanner. These may be worth it to you.

Global Entry: this is often a significant time savings going through immigration. No only do you often bypass a significant amount of waiting in line but the typical clearance process is much quicker. You go to a kiosk, scan your fingerprints, answer a few questions on the screen and go straight to an agent who typically scans your passport and waves you on through. Also, there is no need to fill out the form 6059B which is the card that is handed out to everyone on the international flight.

They have the right to do a more thorough check and I'm sure they do that at times (probably randomly) but it's never happened to us.
One additional note: with Global Entry, you are put through a more stringent background check vs. simply Precheck. I don't remember the disqualifications, but many people would not qualify for GE who could get Precheck. The application process is also more time consuming, including an in-person interview at a GE center (by appointment). I don't know how it is now but in 2021, when we renewed, getting an appointment was very difficult due to COVID. However, if you are arriving internationally to an airport with a GE center during business hours, you can get an appointment at arrival.
You will have to resubmit the forms and get an interview (typically much shorter) when you renew every 5 years.
Also, if you are rejected, there is no refund of the $100.00 charge. Finally, if you are found to have made a misrepresentation of your travel circumstances (for example, not declaring items for customs and this is discovered) they can and will kick you out of GE with no compensation and no chance of re-enrollment.
I should also note that while I have had GE, they implemented Mobile Passport Control via smartphone app which also cuts down on wait time. This does not require GE and is an alternative. GE still seems to be quicker and less hassle.
Personally, I am quite happy to have Global Entry and is well worth the $100 charge every 5 years. I also think it is a much better deal then getting just Precheck for $85. You need to make a decision for yourself.
Comment: @Zo-Bro-23 I'm a US citizen. I have no idea what effect being a green card holder would have.
Comment: Thank you for the detailed answer. Just one clarification - are you a US citizen or a US Green Card holder? Or do you travel on a non-immigrant visa? Not sure if that makes a difference to how quick/easy the Global Entry process is.
Comment: Also, the interview on renewal is not necessarily required. When I renewed, I got an email a couple of days after submission that my renewal application was approved without appearing in person.
Comment: @IanCampbell Interesting. When we renewed, we had to go in for a brief interview. This may be a recent change.
Answer:
Is Global Entry worth it?

YES, YES, YES, YES.
I've had GE for 10+ years and it's been a life saver on many occasions.
Immigration lines at US airports are highly unpredictable and can be horrendous. I've had at least a dozen incidents were regular immigration lines (both citizens and foreigners) were 2+ hours and I got through in 5 minutes or less.
One egregious example was indeed Boston: immigration was so backed up, that they were holding people on the arriving planes since there was no more space in the  entire Terminal. Once we were allowed to deplane they lined up citizens on the right side of the hallway and foreigners in the left side, while the few GE people could walk through the middle right to the very front.
Keep in mind that you need to clear immigration and customs at the first port of entry in the US which makes any connection a bit of a nail better. I've certainly made connections with GE that were entirely impossible to do without including one that saved me a two extra night layover in New York (made the last flight before a snow storm out of EWR)
TsaPre Check is nice too: lines tend to be shorter and faster but IMO the biggest benefit is that you don't need to unpack your stuff, so the risk of misplacing or losing an item is much lower.
Caveat #1 Global Entry applications are horribly backed up at the moment. I've renewed mine over a year ago but nothing has happened. Mine has expired 6 months ago, but GE has now implemented a 24-month grace period  after expiration. I would apply as soon as possible, but you may have to shell out $100 and don't get anything for it for the next 18-24 months.
Caveat #2 You need to always make sure that your GE number (aka "Known Traveler Number") is provided & recorded during check in. I have it on all my accounts and put it manually on all my (international) bookings, but in half of the cases it does not make onto the passenger manifest and I have to manually add it when checking in. Sometimes you need to be pushy: some check-in agents abroad don't know what that is and/or do not know how to do it.
Comment: If you have the time, check multiple locations for appointments. I have 3-5 within several hours drive. The 2 closest had nothing for months. The 3rd, at 2.5 hours drive, I was able to get Saturday appointments within 2 weeks. Bonus: I got my kids appts but couldn't get one for me. The agent did mine as well (luckily, I'd brought the paperwork).
Comment: Apparently they can't do interviews for people under 18 without a parent present. I'll be flying alone for the next three years and have no idea when (and if) my parents will travel to the US. Even if they travel, chances are slim that we'll be traveling together. I guess that's that for the time being then. Thanks for the detailed post!
Comment: "Mine has expired 6 months ago, but GE has *no* implemented a 24-month grace period after expiration." I'm pretty sure this is a typo, but is it meant to be *not* or *now*?
Comment: @Coxy: yes, typo. Fixed. Thanks
Answer: Absolutely.
US immigration, especially at airports, is one area where we consistently fall short compared to many other countries. By comparison, entry control into the Schengen Area as a non-citizen is (as long as you're eligible for visa-free entry) consistently faster and less of a hassle than entry control into the US is for US citizens. For perspective, the only times I've had to wait longer than 5 minutes for entry or exit control in the Schengen Area were two recent trips through ZRH, and that was just a matter of sheer volume of travelers, but every time I've ever entered the US without GlobalEntry it's been at least a 10 minute wait, usually closer to 15.
GlobalEntry flips that on its head, giving you a process equivalent to what most native citizens have in other countries for entry/exit control. Depending on the point of entry, you either get put in a priority queue with a relaxed screening, or you walk up to a kiosk and scan your passport (or more recently, stare at a camera for 10-15 seconds or so) and then walk on. I've literally never had to deal with any wait when using the kiosks, and I've never waited more than about 2 minutes when I still needed to interact with an officer.
It also includes TSA PreCheck despite (currently, as of 2023-12-30) costing only USD 22 more than TSA PreCheck does. This isn't as big of a perk as it used to be given that more and more people are signing up for PreCheck, but it will still save you some time on average when entering the US (wait times for regular and PreCheck screening at security after entry control in most US airports are identical, but PreCheck means you don't have to pull stuff out of your bags or take off quite as much clothing, which will save you some time) and at lower volume regional airports in the US (especially ones with only 1-2 lanes at their security checkpoint).
There are also a handful of other benefits (land border crossings are a bit nicer to deal with, some states will let you use a GlobalEntry card in place of some required documents for renewal of state-issued ID, etc), but there are also some limitations:

The fee is non-refundable, so if you don't get approved, you don't get your money back.
Any actual customs or immigration violation will get you kicked out of the program, permanently.
Actually securing an interview is nontrivial. It's better than it was during the pandemic, but it's still difficult to actually get an interview slot scheduled reasonably.
While you can theoretically get an interview on arrival at airports that have GlobalEntry interview centers, this is hit or miss at best (you have to show up during normal operating hours, and they have to happen to actually be operating and have the time to do it).
There are some additional limitations on interviews that may make it untenable for some people to get them (the most obvious is that you have to have a legal guardian present if you're under 18).
For GE and PreCheck to actually do anything, you must have your enrollment number ('Known Traveler Number') associated with the tickets. This is not always easy to do, especially if booking through a carrier outside of the US.
Comment: @Anyon, we do not mind bigger edits but a few letters and a small word is not worth the extra work for those having to approve.
Answer: We can estimate the amount of hours it takes to get GE for an Indian citizen and then calculate the approximate number of flights you'll have to take for the investment to pay off:

Apply Online with CBP: Complete a TTP online application and pay the $100 non-refundable application fee.

This should take 1 hour.

After completion of step '1' applicants need to submit the requisite information, along with the applicable fee of ₹500, in the Passport Seva Portal, www.passportindia.gov.in for their background check in India. In addition to this, all Indian applicants must schedule an in-person interview at the respective Passport Seva Kendra/Passport Seva Laghu Kendra (PSK/PSLK) office as per their residential jurisdiction in India (as per the address furnished online). During the interview, Indian citizens will have their fingerprints and photo captured and complete other formalities.

This will probably take around 6 hours total, taking into account extra travel, waiting in line, and the interview process itself.

Schedule an Interview in the U.S.: Once your application is reviewed, you will receive a message in your TTP account instructing you to schedule an interview at one of the Global Entry Enrollment Centers.

This should take around 3 hours, taking into account potential extra travel and the interview itself. So we're looking at a total of 10 hours of your time, plus $107 in application costs.
As far as the flights are concerned you'll save approximately...

20 minutes per outbound flight on average, thanks to TSA PreCheck
40 minutes per inbound flight on average, thanks to bypassing normal immigration lines with Global Entry

So around 1 hour per international round trip. If you do 10 international round trips in 5 years, the GE card will pay off.
Comment: Not all hours are created equal. Hours saved using GE can be more valuable if you need to make it to a connecting flight in time.
Comment: @akhmeteli I've previously missed connecting flights despite having GE. It helps on the margin but doesn't guarantee anything.
Comment: I agree with both points.
Comment: @JonathanReez: YMMV but I've had some "high value" connection saves due to Global Entry (and PreCheck) including multiple overnight stays. Just having to take a later flight on the same day is not much of a deal but having to spend an extra (or in case 2 extra) night/s can be a bummer. US international to domestic connection are one of the most "fragile" since immigration times can vary drastically. That's IMO the real value of GE.
Comment: @Hilmar would depend on how many of the flights will be a connection then. If OP flies from NYC it's unlikely to be a concern. Boston might be a concern if they fly via NYC or Atlanta rather than via Dubai or Turkey.
Comment: @JonathanReez: fair point but keep in mind that connecting flights are often substantially cheaper than direct flights (airline pricing being what it is). Personally I try to avoid connecting inbound in the US (despite being a citizen and having Global Entry)  but it sometimes saves a big chunk of $$$
Comment: @Hilmar for Boston to Delhi all the cheapest flights are via Doha, Dubai or Paris rather than a domestic U.S. airport. If that's the connection OP takes connecting in the US won't be an issue.
Answer: I've looked into this a couple of times, and for me it absolutely would not be worth it. I fly internationally only around 5 times a year these days (down from 30-ish a year 20 years ago) and there are no benefits that would be worth it to me for the money it costs.
It can reduce queues, but the last few times I have flown to the US, the difference has varied from the GE queue being around 30 minutes faster to about 15 minutes slower! and queues aren't exactly stressful.
Of course, being Scottish, and using an ESTA means the checks are a quick fingerprint and a couple of questions anyway, so it isn't onerous. It may be worse for other nationalities.
Comment: Interesting: that goes to show that everybody's experience can be different. I enter the US maybe 5-10 times/year and I have NEVER encountered a significantly line at Global Entry (3 minutes tops), whereas the normal lines are horribly about 1/3 of the time. Earlier this year I came through Chicago where not only immigration was totally gummed up but there was a massive line at customs as well (no idea why), Luckily for me customs had also an extra line for GE so I walked right out.
Answer: Personally, I don't think pre-check is worth $85.  It may get you through faster.  On the other hand, here's a photo taken at JFK in 2019, of a sign saying that both queues were five minutes long:

And twice, I've been had pre-check gratuitously printed on my boarding pass but didn't think it made much difference.
Comment: Not having to take out electronics and leaving on shoes and belt are good enough for me--but traveling with two kids under 12 (they get pre-check automatically when flying with me) is a wonderful bonus.
Comment: I've seen the opposite too where PreCheck was 20+ minutes and non-PreCheck was 10 minutes. But most of the time you do end up saving time, especially if you have Clear.
Answer: This is a frame challenge.
Just because the campus is shutting down for US holidays doesn't mean you need to fly out of the country each time.  Even if your school doesn't have an exception to its everyone must leave on certain holiday period policy for international students (the one I attended did), staying somewhere else in the US is a much cheaper option than flying halfway around the world.
Comment: Round trip from NYC to Delhi is $1300 during the summer. You won't find accommodation in the US for $1300/3 = $430/month unless you choose a very rural area.
Comment: "I cannot stay on campus for breaks, so I will definitely have to fly somewhere" - Even if I choose to stay within the US, I'll still need to fly, which means that PreCheck could potentially be useful.
Comment: @JonathanReez OP stated they were expecting to need to leave several times a year, that would include some holidays.  Staying in a basic hotel/etc would be cheaper than $1300, staying with newly made friends could be free if they're within driving distance.

Is Global Entry worth it?


loopj jQuery Tokeninput (tokenized autocomplete) - getting value

Question: Edit:  This appears to be a known issue in both accessing and removing items.  The POST functionality (to provide a set of ids) also is no longer present.
I'm using jQueryUI on my page but haven't found an adaptation of the built-in autocomplete function which will tokenize results Facebook-style.  There are a couple plugins built for this purpose and I'm using the loopj package to do this.
I've got it hooked up to my PHP datasource and can pull suggestions and set tokens - I'm just having a problem getting the all-up value from the input.  My understanding is that it is exposed as a list of id's (id and name being the two elements transferred to it via JSON) pertaining to the selected tokens.
Calling the following should (I think) return the value:
var t = $('#tokenizedinputid').val();

...but it comes back undefined.  Strangely, if I place this in the onAdd: parameter in initialization, it fires once upon page load and then not when tokens are added.  However this example from the demo page fires correctly, upon token addition:
onAdd: function (item) {
  alert("Added " + item.name);
},

Is there a way to adapt the above snippet to expose all of the selected tokens?  Perhaps using .each()?
Answer: Recently added was this patch:
var tokens = $('#tokens').tokenInput('get');
This will return all id/name pairs programatically.


Does Android Studio supports AngularJS for Android UI design?

Question: I have a question about Android Studio: Does AS supports AngularJS code while designing XML files, e.g. for small animations or effects?
Answer: SUMMARY : NO
There is no way you can write Angular JS code while developing Android Native app. You can use Angular in a WebView (using js/html so), that's all.
Comment: Material design is the only way to do better UI ,, don't go with 3rd parties
Comment: So we only design android UI in xml?
Comment: @SumitPathak if you don't use a framework : yes. Probably some hybrid framework like Ionic will help you more, but you are loosing the native app
Answer: AngularJS is a completely different technology than what is used in native Android apps. Native Android apps use Java and/or C for their code, which is compiled when you build the app. AngularJS is a framework for web development, running specifically on Javascript (a completely different technology than Java).
You can build apps without using native Java or C code, but there are tradeoffs. As noted in other answers, you can display webpage views as apps (using technologies like Cordova]), or use frameworks like React Native to write code in Javascript that then gets compiled to a native app. You could use AngluarJS in the webview instance, since it just displays a webpage, however not in something like React Native. I highly encourage you to check both of these (and other options) out, but keep in mind that they have their own limitations and tradeoffs – no one way is the "right" way to build an app.
In summary: No, AngularJS is a web technology, not a native app technology.
Answer: new answer = Yes... Sort of, you can do it with:
https://www.nativescript.org/
It translates javascript, angular and typescript code into native components!
Apparantly it's possible to use nativescript in Android Studio with:
https://docs.nativescript.org/runtimes/android/getting-started/hello-world
Answer: Android Does not support AngularJs. but still if you want to use you can use it in webview.


Process checkout using WC REST API

Question: With a main site using WordPress/WooCommerce, and a remote site serving front end; is it possible to process checkout form using WooCommerce REST API, and receive a redirect URL to the selected Payment Gateway?
I tried creating a custom AJAX function, but It seems it requires a nonce field on the submitted form, and that is problematic for the front end is not on the same server.
Answer: To process payment for an WooCommerce Order, the workflow goes like the following:

Create an WooCommerce Order
Process Payment for this order, using one of WC_Payment_Gateways
Change order status (default is pending->processing, or to complete if empty order)

IMHO, Step two can be implemented as the following:

Use a front-end lib to tokenize payment info, using frameworks like Stripe or PayPal.
Pass the payment token to your WordPress backend using WP REST API
Let WordPress and WooCommerce process the payment as usual.

You can create a custom REST API endpoint to process payment for your WooCommerce website, add the following code to your code.
<code>add_action( 'rest_api_init', 'wc_rest_payment_endpoints' );
function wc_rest_payment_endpoints() {
    /**
     * Handle Payment Method request.
     */
    register_rest_route( 'wc/v2', 'payment', array(
        'methods'  => 'POST',
        'callback' => 'wc_rest_payment_endpoint_handler',
    ) );
}
function wc_rest_payment_endpoint_handler( $request = null ) {
    $response       = array();
    $parameters     = $request->get_json_params();
    $payment_method = sanitize_text_field( $parameters['payment_method'] );
    $order_id       = sanitize_text_field( $parameters['order_id'] );
    $payment_token  = sanitize_text_field( $parameters['payment_token'] );
    $error          = new WP_Error();

    if ( $payment_method === "stripe" ) {
        $wc_gateway_stripe                = new WC_Gateway_Stripe();
        $_POST['stripe_token']            = $payment_token;
        $payment_result               = $wc_gateway_stripe->process_payment( $order_id );
        if ( $payment_result['result'] === "success" ) {
            $response['code']    = 200;
            $response['message'] = __( "Your Payment was Successful", "wc-rest-payment" );
        } else {
            return new WP_REST_Response( array("c"), 123 );
            $response['code']    = 401;
            $response['message'] = __( "Please enter valid card details", "wc-rest-payment" );
        }
    }  else {
        $response['code'] = 405;
        $response['message'] = __( "Please select an available payment method. Supported payment method can be found at https://wordpress.org/plugins/wc-rest-payment/#description", "wc-rest-payment" );
    }

    return new WP_REST_Response( $response, 123 );
}
</code>
If you're looking for a hassle-free way to do this, you checkout our plugin WC REST Payment.
It supports WooCommerce Gateways including Stripe, PayPal Express, PayPal Standard, Direct Bank Transfer, Cheque, Cash on Delivery.
Comment: thank you for the thorough guide, but I opted for calling process_checkout using ajax some time ago. This site uses a lesser known payment gateway, so it's all or nothing when I call it on the front-end (no tokenization).
But since I didn't mention it in the question I'm marking this as an answer.
Comment: how do you know what the decline codes are from stripe, I don't see how you would handle those here...
Comment: You can't, if you are using the WooCommerce Stripe Gateway. I've dig into their source code, they don't return the error. However, if you enable debugging log, you can see  the error from WooCommerce -> Status -> Logs
Comment: @JackSong this works fine for Stripe, thank you plenty. What architecture would you suggest to implement for Paypal? I have found react libraries for the paypal buttons which seem to work just fine, would you on success make a separate call to wordpress to place the order with `status: confirmed`? It seems a little insecure to me which is why I am asking

Process checkout using WC REST API


Converting DateTime to SmallDateTime in c#

Question: How can ı convert datetime to smalldatetime in c# ? I'm taking the date and ı need to convert it to be accordance with database. It is forbidden to change the datatype of column in sql.
Comment: Related: http://stackoverflow.com/questions/14124887/datetime-from-net-to-smalldatetime-in-sql-how-to-do-queries
Comment: Please show us the relevant code.  You say you are converting, but do you mean in a where clause? During deserialization into your entity? Something else?
Comment: And since this is down-converting, you would do well to explain what you want from values that press the edges of smalldatetime boundary.
Comment: @MattJohnston  I'm using entity framework. I guess I need to write a trigger to solve this problem.
Answer: You can use the .NET DateTime type for your entity framework model, but tell EF that it uses a non-default column type in the database. You do this by overriding the OnModelCreating method of your DbContext, and using the HasColumnType method:
public class Foo
{
    public int Id { get; set; }
    public DateTime IAmSoSmall { get; set; }    // wants to be smalldatetime in SQL
}

public class MyContext : DbContext
{
    public DbSet<Foo> Foos { get; set; }

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
        var foo = modelBuilder.Entity<Foo>();
        foo.Property(f => f.IAmSoSmall).HasColumnType("smalldatetime");

        base.OnModelCreating(modelBuilder);
    }
}

Of course, you'll have to do the appropriate range-checking on your DateTime property to be sure that the stored values fall between those supported by SQL's smalldatetime. I guess you could do that with a property attribute like:
    [Range(typeof(DateTime), "1/1/1900", "6/6/2079")]
    public DateTime IAmSoSmall { get; set; }    // wants to be smalldatetime in SQL

...based on a valid range from January 1, 1900, through June 6, 2079, as documented on MSDN.
Comment: You can also change the column type using the data annotation `[Column(TypeName="smalldatetime")]`. See http://stackoverflow.com/a/4833477/1180926
Comment: @Arithmomaniac Yes, it looks like as of EF 4.3.1 the column type data annotation works. Nice.
Answer: Sql Server datetime and smalldatetime are both automatically mapped to and from the CLR's System.DateTime. A smalldatetime has a precision of 1 minute; a datetime has a precision of approximately 1/300 of a second (Don't ask why. It just is). Since the CLR's System.DateTime1 has a precision of 100-nanoseconds, the runtime takes care of rounding.

smalldatetime is internally a 32-bit integer, containing a count of minutes since the smalldatetime epoch (1900-01-01 00:00).
In conversion, seconds and fractional seconds are rounded using SQL Server's arcane date/time rounding rules, so the date 2013-01-31 23:59:59 gets rounded to the next date 2013-02-01 00:00:00'.
datetime is a pair of 32-bit integers internally. The high-order word is a count of days since the epoch; the low-order word is a count of milliseconds since start-of-day (00:00:00). The epoch of a datetime is 1900-01-01 00:00:00.000.
And again, values are rounded in the conversion in the same arcane way, with franctional seconds getting placed into one of the appropriate millisecond buckets for SQL Server, a multiple of 3ms — there is no SQL Server `datetime value like 2013-05-01 13:57:23.004. That will get "rounded" to either 23.003ms or 23.006ms.

If you want more control over things, you'll need to adjust your datetime values in C# before sending them to the database.
Comment: Eh? SQL Server counts time in increments of 0.000, 0.003 or 0.007 seconds for no apparent reason. Always has since the Sybase days. Even then, under Windows NT, both BIOS and the WinNT system clock had a resolution c. 10ms. Sybase must have implemented their own time implementation using the CMOS "real-time"  clock, bypassing BIOS. That chip ticked at something like 32.768 kHz to make binary arithmetic easy. Why they'd hammer that into unevenly sized buckets that don't mesh well with either a decimal values or it's binary representation. I'm sure it made sense to somebody at the time.
Comment: I totally misread that the first time as if you were saying there was no rational for the different precisions of `datetime` and `smalldatetime`, not catching on to the fact that your paranthetical referred to the arbitrary 1/300 s precision of `datetime`. Sheepishly removing my misguided comment now.
Answer: Maybe you can do something like YourDateTime.Date
Normally, when you do that way, it will set time to 00:00:00.
Comment: `smalldatetime` *can* represent a time component.  See [the docs](http://msdn.microsoft.com/en-us/library/ms182418.aspx)


Can TS-1 fuel be used in an aircraft that takes Jet A?

Question: Reading up on some airports in Russia I noticed that some only supply TS-1 jet fuel (see point 7) instead of Jet A. I tried to find out more about this fuel, but only saw that it has a lower freezing point and a higher flash point. What I couldn't figure out was if this fuel is "compatible" with Jet A. Could a plane that usually flies with Jet A operate with TS-1 instead, or vice versa? My guess is yes, but I couldn't find anything authoritative about this.
Answer: The answer is maybe.  You would have to check the Fuel System Limitations in the Operating Limitations in the AFM of the aircraft in question to find a table or list of the approved fuel types, which may or may not include TS-1, and if it doesn't you're kind of stuck.
For example, if I look up the allowable fuel grades for the CRJ700, it includes several worldwide standards (American, British, Chinese, NATO etc), and a fuel type is listed as "RT" under CIS (Russia's official name - Commonwealth of Independent States I believe).  But there is no listing for TS-1, so unless RT and TS-1 are the same thing and you have official documentation confirming that, it can't be used in the RJ (I'm retired and the pilot reference handbook I'm using is quite old and out of date so perhaps TS-1 is listed in current ones, but in any case you get the drift).
You can't use wide cut fuels in the CF-34 family (gasolene-kerosene) but if TS-1 is equivalent to Jet A there is a good chance it's approved for a particular airplane, but don't be surprised if there is a temperature limitation or other restriction.


How to create this 'bad photocopy' effect or voluntarily 'thrash-ize' like the pic, but for a text or a photo?

Question: See how the characters and edges 'bleed' a little bit and the whole grunge xerox vibe of it :))
Comment: Does this answer your question? [Looking for ideas how to create this effect (photocopied, degraded, Xeroxed, brutal)](https://graphicdesign.stackexchange.com/questions/118923/looking-for-ideas-how-to-create-this-effect-photocopied-degraded-xeroxed-bru)
Comment: This is a bit broad. Using what: a computer, a camera, both? There are many ways of doing this, with computers and without.
Answer: It doesn't have a xerox vibe. In my opinion this is a scan of a laser printed low resolution raster image, or perhaps it's a scan from a badly printed newspaper. The dots are a halftone pattern. Basically it's just a bad print. For the ultimate authenticity you could print a low resolution raster image of some text on a laser printer, and then scan it.
Or, you can simulate it in Photoshop.

Create a new document - say about 500 to 600px wide, and type some large bold black text.
Do Image > Mode > Greyscale choose Flatten, then Discard
Do Filter > Blur > Gaussian Blur, with radius set to 0.5px
Do Image > Mode > Bitmap. Set the method to Halftone Screen. Click OK.
In the dialog that opens, set the frequency to about 20, leave other settings at default.
Finally do Image > Mode > RGB, and then apply the Gaussian blur again to give this very slightly blurred effect:

Note: The reason I suggested the Bitmap halftone effect rather than the standard halftone filter was to make it look extra crappy. LOL!
Comment: wow!! thank you so much for ur tutoring :))
Answer:
Create an image of the type.
Save the image as a JPG.
Open the JPG you just saved (not the original image)..
Save it as a JPG again...
....repeat.

Each save of a JPG will degrade the image. Simply keep saving a jpg as a jpg, open the saved image and resave until you are happy with the degradation.
Comment: so simple yet had to know!! merci :))
Answer: You can try this : copy all the layer you have and merge them, then apply a tiny gaussian blur to this new layer and play with the Color Halftone Filter (in Pixelate) parameters (for this kind of effect, put 0 in all the channels). Then put this layer into multiply mode or something.
It should do the trick. Maybe ad a tiny Median (Noise Filter) to this layer also.
(I talk about Photoshop here)
Comment: that's amazing! will do! tyyyy


Are GPTs close to real intelligence or just another Data In -Data Out -Data Permutation and Combinations?

Question: Use cases and Solutions surrounding GPT's have taken NLP world with storm and started the GPT-Best vs GPT- Not So Best war on the internet. There are solutions been derived from API's provided by HF. What would be the impact and how feasible would be GPT development and deployment in the real world use case across domains?
Answer: To answer that we Need to have a formal Definition of real intelligence. You got multiple definitions, but which one satisfies you?
Lets say you Claim real intelligence is Awareness. Than if you ask a machine can you prove to me that you are Aware you wont be satisfied. But can you prove you are Aware.
I mean at the end of the day it does not even matter. What matter is we are solving some specialised takes with GPTs a lot better than with other language models. Thats it. GTP(3) has a lot of flaws, just Google it.