Theoretical justification for technical analysis

Question: What are the theoretical justifications for the operation of trading algorithms based on technical analysis using different indicators such as rsi, stochastic, macd, etc.? or do they really not work?
Comment: In neoclassical models with reasonably informationally efficient markets such indicators (like all technical analysis) should not work (most empirical evidence points into this direction). If you trust a more behavioural approach, you could justify such indicators if you believe that they reveal some temporary emotion-driven mispricing.
Comment: Technical indicators can work in the situations where the proportion of traders that believe they work is not insignificant...
Comment: There are also a bunch of rational theories explaining a momentum effect. There is (and will be for a long time) an argument about which approach is better. Both probably contribute to a full understanding of financial markets. But technical indicators are still used because their users simply _believe_ that their information is helpful.
Comment: @David Duarte .  Excellent comment. I think the self-fullfilling prophecy concept of technical analysis ( or even other strategies ) doesn't get as much hype as it maybe should.
Comment: To add, this seems like a pretty atheoretical field. Some of it seems to be catching patterns like momentum that have been studied in the academic finance literature. Now that literature has offered explanations to patterns like momentum, most of them behavioral. I do not think there is full agreement though.
Comment: @fesman if in reality they do not work, why are they still used? and if they work, is it possible to somehow explain their working?
Comment: Some of it might work, at least historically. There's likely also tools that are sketchy and applied because some investors, especially on the retail side, don't know what they are doing. I am not an expert on technical analysis though.
Comment: I agree with previous comments, I think much of technical analysis usefulness derives from self-fulfilment.
Answer: The answer to your question about the theoretical justification for technical analysis depends on the price series being analyzed. There is some evidence for a few technical indicators to have predictive value. In general, though, there is little theory behind technical analysis apart from an appeal to psychology.
Indicators
There are many indicators used by technical analysts. Often, indicators describe an envelope: a set of lines that define a region containing prices. Basic indicators include:

resistance: lines suggesting prices have difficulty rising above a certain level;
support: lines suggesting prices have difficulty falling below a certain level;
trend: lines suggesting support and/or resistance where the level is increasing or decreasing;
broadening: lines suggesting resistance/support or trends which get further apart in the future;
pennants: lines suggesting resistance/support or trends which converge in the future;
breakouts: the idea that maybe the price will cross the resistance/support line where pennant lines cross; and,
head-and-shoulders: prices that rise and fall making three humps with the middle hump being the highest.

There are other indicators which look at moving averages, where moving averages cross, analysis of volume, etc. These have even less theory behind them.
Theoretically-Supported Indicators
I only know of two indicators which could claim some general theoretical support. The first is money flow, how much notional trades at the bid versus ask. This is related to measures of asymmetric information in some microstructure models such as Glosten and Milgrom (1985).
The second measure with theoretical support is cross-sectional momentum, aka the Carhart (1997) factor: long stocks which did relatively better and short stocks which did relatively poorer (aka WML="winners-minus-losers"). Sinha (2016) shows that cross-sectional momentum may be explained by diffusion of news sentiment (information).
For Which Prices Should Technical Analysis Work?
For commodities, commodity spreads, and foreign exchange rates, ideas of resistance and support are very sensible.
Commodities are physical goods which means they have physical infrastructure which is used in their extraction or creation, refining, and transport. Physical infrastructure like that changes very slowly, so the industry overall has a stable distribution of production costs. Furthermore, as prices rise, more expensive producers will enter the market. That increase in supply will bias prices downward. Similarly, falling prices induce some producers to cease production -- and the decrease in supply biases prices upward.
Commodity spreads may be similar. Refineries buy barrels of crude oil and refine them into RBOB gasoline, Diesel (and similar middle distillates like jet and kerosene), LPGs and petrochemicals, bunker (residual, heavy fuel oil), and asphalt. The difference between the sale value of those products and the cost of the inputs (crude oil) is the gross producer margin (GPM). GPMs tend to revert toward the long-term mean GPM for an industry.
Foreign exchange (FX) rates may revert to typical levels based on slowly-changing relationships (differences in purchasing power parities, mutual trade) and more quickly-changing relationships of interest rates. There is not a strong connection between prices and supply: high FX rates do not automatically lead to more creation fo the expensive currency. Therefore, FX rates may not be strongly-mean-reverting (or reverting at all). Therefore, ideas of resistance, support, and trends may not be sensible.
Stocks have no reason to revert to any level apart from some idea of (what a model says is) fair value. Similarly, real estate prices have no reason to revert to typical levels. (A "typical" level is even a difficult concept since no two properties are the same.)
Bonds may revert toward their face value, especially as they approach maturity. This is not, however, a novel concept nor is it information that is unlikely to be already impounded in the bond's price.
Empirical Academic Studies
I said I can only think of two indicators with general theoretical support. I also mentioned that there may be industry structural or trade-/PPP-based reasons why some technical analysis might work for commodities and FX. However, we might wonder how technical analysis performs empirically.
The most rigorous empirical study of technical analysis was done by Lo, Mamaysky, and Wang (2000). I recommend reading the paper because it reveals just how difficult it can be to study technical analysis rules.
In short, they created computer programs to do technical analysis; brought those results to technical analysts to see if the analysts agreed with the programs; and, continued doing this until the programs and analysts were in agreement.
Then, they used those calibrated programs to do technical analysis on 31 years of stock data. What they found was that a few indicators, head-and-shoulders and resistance, seemed to be statistically significant. The other indicators seemed to be like the mythical cologne in Anchorman: "60% of the time... it works every time." (In other words, randomly working = not significant.)
Kidd and Brorsen (2002) looked at technical analysis of commodity prices and found that the returns to trading based on technical analysis has declined.
Menkhoff and Taylor (2007), however, found that technical analysis is profitable for foreign exchange rates. They suggest that this is due to technical analysis uncovering "nonfundamental influences."
You also asked about more complicated indicators than those discussed above. There are many studies on using these indicators; however, most of these studies conclude the indicators are not significant or dubious. For example, Cohen and Cabiri (2015) found RSI predictive in 5 out of 6 years -- a level that does not rise to statistical significance. Perhaps the most hopeful studies are Chong and Ng (2008), which looked at the RSI and MACD and found it to perform better than buy-and-hold in some cases for London Stock Exchange stocks, and Chong, Ng, and Liew (2014) which finds the RSI and MACD to work well in Italian markets and the US Dow 30 stocks.
While the last works are hopeful, I would remember that there are many other studies which are not hopeful. Unfortunately, there is not a convincing argument for most technical indicators that is supported by a majority of studies.
Comment: There's a paper by Hallerbech and someone who show that some technical indicators are equivalent to betting on lagged returns. I'll try to dig it up and provide the exact title. It's pretty interesting because it shows that, when one uses prices ( really log prices ) as indicators ( which is sneered at by a lot of academics ), there is an  equivalent strategy in the return space..
Comment: Not necessarily easy to find with author name but no title but I found it. Hopefully it's relevant with respect  to the OP's original question. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2604942
Comment: I thought Lo, Mamaysky, and Wang also noted some equivalences to AR models. Will check out this other paper. And yeah... we so hate working with prices but if we allow for inefficiency in markets, then processes which are slow to adjust may look like they have level effects or level and return effects. (Never mind that levels in some markets are indicators of different regimes.)
Comment: Lo, Mamayksy and Wang may have done what you describe. ( I can't remember what was in that. getting old ).  These two authors come at it from a somewhat different perspective and basically show that every MA crossover on log prices is a lagged return model. They also do something with the MACD in the appendix also but I forgot those details.
Answer: Really great question. Having studied finance academically, in an academic setting, you will always be told that technical analysis is non-sense. In the world of pure academics, the efficient market hypothesis is still the preferred way of thinking. Furthermore, academics will point out that empirical data and historical back-tests thoroughly disprove technical analysis (and this is true over daily samples over long periods of time).
When I started trading, I had this mindset and completely ignored the technicals. Furthermore, there are many traders who are completely oblivious to technical analysis who are highly successful traders.
Nonetheless, I would say that for some asset classes, mainly spot FX, technical analysis can be useful when there are no fundamentals driving the markets. I noticed many times that on days when important macro figures come out (GDP, CPI, payrolls, etc), technical levels play no part whatsoever. But on some days when the markets are "dead", there is no news-flow and not much else is happening, the technical levels are watched by traders and algos and I have seen multiple times that on these mundane days, an FX pair would slowly drift towards (say) a 50-day MA, only to " bounce off" exactly of that level.
I know it sounds stupid. But based on my experience, I would nonetheless conclude with the following summary:
(i) In my view, markets normally function in three modes: (a) risk-on, (b) risk-off, (c) neutral
(ii) during risk-on or risk-off, technicals play little to no part and the markets are driven by fundamentals and news-flow (which translate into order flow)
(iii) during the neutral mode, you often see the major stock indexes (DAX, SPX etc) close within a few bps of where they opened (i.e. they hardly move at all when looking at daily close), but there is still an intraday volatility, sometimes even + / - 0.5%. I view that as complete noise and "trading for the sake of trading". I would say that in theory, on a day when there is no significant news and not much happening, instruments should hardly move at all: but they still do (scalpers still try to scalp, algos still try to snap inefficient quotes, etc). On such days, in my experience, moving averages on FX and major stocks seem to play a noticeable role.
EDIT: I also attach a chart depicting a "resistance" line on the SPX500, that stretches quite some years back: this resistance line is quite notorious in that it has been publicized quite a lot, for example by a top Bloomberg analyst Cormac Mullen a number of times. Therefore, many traders have become aware of it. The traders that do pay attention to it tend to sell the SPX futures when the levels reach the "resistance" line: and indeed, this shows how TA really works: if enough market participants pay attention to a particular level, it becomes a self-fulfilling prophecy, because the order-flow will become significant enough to affect the price action.
(PS: yes, miraculously, the resistance also "worked" in March 2020 as Covid kicked in and the SPX "bounced off" the resistance line very heavily: but that is of course a coincidence).
Comment: is "risk-on, risk-off" still relevant when (nearly) every asset class loses money in 2015 and in 2018? Or is it "liquidity-on, liquiduity-off" now?
Comment: @demully: risk-on and risk-off, in my experience, is applicable in all circumstances, but sometimes only to specific asset classes rather than markets as a whole. For example, the past few months, equities have been risk-on, but bonds have been bid (i.e. what one would typically describe as "risk-off"): so I'd describe that as bonds risk-off but equities risk-on.
Answer: The theoretical justification for technical analysis (TA) is less about market (in)efficiency; and more about prices as a signal of sentiment and positioning biases, that are neither always neutral nor unbiased.
Anecdotes are cheap; but sometimes still helpful. In a past job, I was a traditional sell-side fundamental market strategist. But I was sat next to our local house "guru" chartist. Unlike me, he had done his internship at a central bank. And his "road to Damascus moment" came when his boss told him in advance what the inflation would be: how would the market react? My friend knew what the consensus on the print was; and textbook-answered that bonds would sell off on the news, the print being higher than the market. Except, of course, the opposite happened - bonds rallied... either the perception of the "expectation" was wrong, or the perception of a higher CPI figure was so widespread that everyone who wanted to sell had sold, so there were no new sellers into the news; and plenty of leveraged sellers, eager to get out of their leveraged positions if the market went the other way (irrespective of their "expectations").
To believe in TA, you have to believe that the market knows, and has priced, the relevant fundamentals. And then that the bulls and the bears on those fundamentals have decided to place differently-sized bets on their conviction on those bets. Then you can get indeed get asymmetric reactions to "new news". Which is exactly what the chartists are trying to find; and dowse.
The ultimate irony here is that TA and EMH are not actually inconsistent! Efficient markets just assume all knowable knowledge is in the price. They just take the next step for granted - that is, the confidence of the agents' behaviour setting that price is a constant function of their economic view; as opposed to this ALONGSIDE their current portfolio risk!
Relax this behavioural constraint; and it quickly becomes possible for "rational" economic agents to behave sub-optimally. Which is the POTENTIAL theoretical basis for TA skimming off the top of conflicted, and mis-positioned, fundamental types. In short, TA believes that the economically fundamentalist types will misbehave, dealing with their inevitable cock-ups!
Whether or not this is true, I honestly don't know... but it's the least-bad theory I've seen ;-)
DEM
Answer: There's papers, etc. as others note.
But I think it may be informative to debate the theoretical justifications of EMH. Because a conversation on technical analysis never seems to convince anyone.
EMH can be generalized as (1) "the price is right" (2) "you can't beat the market".
"The price is right":
The idea of EMH was formalized around 1970, when 10y treasury yield was ~7%. The WACC for any given company was 10%+. With such a large discount rate, the possible range of valuation is rather narrow.
The discount rate for the safest companies are now below 1%. How do you values companies, when nobody can predict 5 year, let alone 20 ? Any change in assumption should produce massive price swings. Yet, the past decade has been the least volatile.
Needless to say, I think this notion that it is EMH to debunk can be argued against.
"You can't beat the market"
Plainly, I think a lot of people have beaten the market.
It's pretty straight-forward, tech stocks only go up.
Now, addressing the theoretical justification for technical analysis directly, it should be noted that game theory is reason enough in many domains that are dynamic and can't "math it out", eg strategic combat.
The real world is a lot messier than theory.

Funds want to minimize market impact (so their aggregate buying may take months)
Options market makers do have to hedge, which means shorting/buying dynamically based on price. Their concern is not valuation.
Options are typically concentrate towards levels, which again, has an impact on buying/selling from the market maker
A significant share of the daily volume is trading, not investing.
Volatility suppression a la carry trade

Price is the single factor that can be observed, without understanding all the hidden forces.
Anyways, this is not trading/investment advice.
There's a lot of subjectivity and there should be a lot of skepticism with anyone selling "secrets".
My broader point is that (1) declining interest rates have paved way for other forces to outweigh EMH (2) trend sometimes (certainly not always) reflect a price/demand-related truth.
We saw many false breakouts with EM over the decade, with EM being a particularly crowded trade amongst trend-following hedge funds.
The problem with many domains is the contextual nature. It's why we consult with doctors and lawyers.
US tech stocks have been a crowded trade that have persist. I think it makes sense. Valuations have never been obscene in aggregate, but there has been near constant grind up reflecting the near constant bid.
I wouldn't doubt there's a true, universally generalizable/applicate justification of trend (or the various ebb and flow of price signals for that matter). But you probably won't find it written here or screamed on CNBC.
Answer: There are a number of investor classes that behave in patterns.  An example are institutional investors, such as pension funds.  A large portion of these investors religiously follow certain investment edicts, such as rebalancing and adhering to a benchmark with no active risk.
Some of these investors adopt a calendar based approach that regardless of how the economy is doing, they will rebalance to the benchmark weights at every quarter end.  Others use a threshold approach where they will rebalance a portfolio when the actual portfolio weights are off by a certain percentage.
Other investors such as trend followers have such investment rules for entry and exiting trends in a name or certain asset class.
It is easy to see that with enough of these players adhering to certain rules, that a pattern emerges based on the performance of the certain assets.  Technical analysts use the analysis to these trends to identify patterns resulting from such behavior to make market and investment calls.
In short, technical analysis works because 1) Investors behave in such patterns and 2) because enough Investors adopt them in their investment approach.
Then there is the knock on effect that if something is shown to work, it will develop a following and it becomes self-perpetuating.


Carto Help in minimizing geographic dataset

Question: I have a file that contains location points all over the world, using lat long coordinates. I am trying to trim it down to only new York and Newark new jersey. I have a shape file that is the boundaries of new York and includes new jersey but is in shape area and shape length. I am trying to extract the data points that fall in those boundaries but I am stuck. Does anyone know how to do this in carto or any other program?
Answer: You can do that with SQL and PostGIS in Carto's SQL tray. If your table of NY boundaries is ny_boundaries and your point dataset is points_data, then the following query will do the filtering for you:
SELECT p.*
FROM points_data As p
JOIN ny_boundaries As n
ON ST_Intersects(p.the_geom, n.the_geom)

You can leave the query applied to keep that view of the data, or create a new dataset from the query.
Docs on Carto's SQL tray: https://carto.com/docs/carto-editor/managing-your-data/#running-sql-queries
Lessons on SQL: https://carto.com/academy/courses/sql-postgis/


Bat mitzvah party invitations

Question: My daughter is having her bat mitzvah party in January. A few other girls have had birthday parties and did not include her. They are now asking her if they are being invited which makes her really uncomfortable. What do I do? My daughter asked why she was not invited and the reasons are crazy: "I don't have your phone number," "my mom made a mistake," "I didn't think you liked parties."
Answer: Mazel tov :)
A bat mitzvah is the same as any party: she invites those people who she wants to share in her celebration and achievement.
I'd encourage your daughter to consider inviting them. Being forgiving shows a level of maturity, and it's an important lesson of adulthood that sometimes you have to put up with inconsiderate, entitled people. But don't push it, particularly with girls who made some of the sillier excuses. Nobody is entitled to be there except your daughter. (The only exception I'd make is if she's inviting her entire class, in which case leaving out a few isn't appropriate.)
So nobody should expect an invitation, particularly somebody who didn't extend your daughter the same consideration. But let's assume Friend's etiquette isn't up to snuff and she is asking about the party in such a way that it's clear she expects to come.

Avoid snarky comments like "didn't think you liked parties" or "my mom made a mistake," which is just weak.
The most reasonable response is straightforward:

You aren't invited.
I'm sorry, but you aren't invited.
I don't think I'm going to be inviting you.

Friend doesn't really need to be told more than that, but maybe Friend is just clueless and rude, or your daughter wants to let her down more gently.

We've only got a limited space and/or guest list. I had to think of my family and close friends first.
I was only allowed to invite so many people, sorry.

Or focus on the meaning of a bat mitzvah (which is only effective if Friend is not Jewish):

This isn't just "some party," it's an important part of my religious journey and has deep meaning to me. Do you know what being called to the Torah is about?

If Friend gets pushy and whines that she thought she was a close friend, then a couple of options...

Oh, I was confused when you didn't invite me to your party. That hurt my feelings and I just assumed we weren't as close as I thought.
Friend, I don't feel like we're that close. You didn't invite me to your birthday party and you gave a sort of weird excuse about it. I just don't feel comfortable sharing this event with you.

This can also be used directly instead of starting off with excuses about space or religious reasons. It's what I'd choose to say personally, but I'm an adult and capable of handling awkward situations. When I was 13, I would never have wanted to start off with that level of confrontation.
Answer: Personally I think that she'll only have one bar mitzvah. She should invite those who are special to her. If people are asking her if they are invited she can then be honest and say "It's a really special thing to me and so I need people there who I'm close to."
Regardless, it's about giving her the tools to achieve what she wants on this special day. Explaining to her that future consequences of not inviting this or that girl are irrelevant since it just makes clear a situation that is already there. It will also help the other girls understand that there is a consequence to their actions, and provided your daughter continues to be herself and not proud or haughty or uses the party as something to come back in an argument with, then they may end up having second thoughts on how they treat her.
Sadly I think it's clear that maybe some group bullying is going on, and when it's a group, factors like respect and honour don't generally have a say, so if she invites them, she may have an issue.
Help her understand that it's her decision and she should not be scared or unsettled by anything the other girls say, because you are there to help her, give her the language that she needs, back her up at school without disempowering her. Part of the deal here is empowering her to do what she wants to do, not what the other girls want her to.

Bat mitzvah party invitations


View camera boundaries in user perspective?

Question: I'm currently weight painting and find myself glancing back and forth between camera view and user perspective view to check where I'm painting in relation to my camera boundaries (for an environment scene).
Is there a way to view the camera boundaries from within the user perspective view?
Answer: Another option is to simply scale up the camera object. It doesn't effect the FOV at all. Select the camera, go to the properties panel and Camera > Display > Size.

Scale it up until the frustrum covers your painting area. You can see it from any angle. Alternatively you could parent a lamp with a square cone to match the camera frustrum.
Add a spot lamp and constrain it to the camera and copy the camera's Field Of View to lamp Size. You will have to scale the lamp's Y axis to fit aspect ratio.
Comment: Hardly intuitive, but highly effective results!
Comment: Thanks I think it would make a neat little addon if automated.
Answer: I don't think it's possible as of 2.77, but a quick workaround would be to use Clipping Border to visualize what's visible from camera regarding its field of view angle setup.

Enter camera view (Numpad 0) and enable Clipping Border tool with Alt+B.
Draw the rectabgle which should be the same as camera boundaries.

Now once exiting the camera view you'll see large grey cone of nearly the same area visible to the camera.

Note:

Clipping border means that any geometry out of its boundaries is hidden.
The border drawn may be not the most convenient while in 3D Viewport because of grey area it consists of.
Comment: Well that just makes my method look stupid haha.
Comment: @RayMairlot well I wouldn't say as *Clipping Border* hides any other geometry which may be undesirable and it has quite strange visualization in 3D Viewport (it's much more friendly with mesh), but the method is faster.
Comment: Thanks for this, have never used that before but looks like it should work. I also thought your idea Ray was good!
Answer: Blender has an option to display camera bounds. The option is only available for the 3D stereoscopy camera. If we want to use it for a normal camera it is possible to enable the multi-view option without altering the camera view, this needs to be disabled again to render unless you setup the camera properly.

Once enable we have the stereoscopy panel in the 3Dview properties panel (N)
Answer: Currently there is no built in way to do this. Someone did start building a patch for this here, with the developer, Ulysse Martin, stating:

I'm not convinced about the usefulness of this too finally. So I close
  the task for the moment, and if users request such a feature, I'll
  reopen it.

If you feel this is an important feature I would suggest commenting on the patch as Ulysse Martin suggested.
However, I was able to make a rough camera frustrum by modelling it with geometry:

Select the camera, press Shift+S and choose Cursor to selected.
Go to the camera view (Numpad 0) and add a Plane with Shift+A, which results in:

(This depends on the Editing user preference Align To set to View, so new objects are aligned to where you are looking)

Extrude the plane along its face normal until it aligns with the front of the camera.
Scale down the face so it matches the camera shape. Using a local transform manipulator can help with this:

Select the other end of the cube and press S,0 to scale down the face to a point.
Select the face that aligns with the front of the camera and press G twice to perform an Edge Slide. While edge sliding press C to turn off Clamping. You can now adjust the 'camera frustrum' to be as big as necessary:

You could then parent the frustrum object to the camera with Ctrl+P so it follows the camera if you move it.
For convenience, while doing this I set the object to Wire display mode by going to Object Properties> Display and setting Maximum Draw Type to wire.
I'm not sure if you want to go to this effort or if this is even useful doing it in this manner (as it may still be hard to tell what is inside or outside the object), but this is the only way I know of doing it.
Answer: As an extension to Rays answer, this script automates making a camera frustum mesh object,
the object can also be scaled up to show it at further distances

<code>import bpy
import math

scene = bpy.context.scene
camera = scene.camera

# this script tries to recreate what the camera shows in the viewport (orange pyramid) as a mesh

# the viewport camera looks like a point and a plane, this starts by making the plane

#  get the height scale for the new plane
#  like 9/16 for a 16:9 ratio
height_ratio = scene.render.resolution_y / scene.render.resolution_x

new_plane = bpy.ops.mesh.primitive_plane_add(
    size=1,
    enter_editmode=False,
    align='WORLD',
    scale=(1, height_ratio, 1),
    location=(camera.location),
    rotation=(camera.rotation_euler),
)

# make the plane have the correct aspect ratio (like 16:9)
# (for some reason, setting scale when creating doesn't work)
bpy.ops.transform.resize(value=(1, height_ratio, 1), orient_type='LOCAL')

#  using trigonometry to figure out the plane distance from the camera point
# (imagine looking from above the camera, and halving it into two right angle triangles)
#  using half the FOV as the angle, and knowing the length of the OPPOSITE side (0.5) , we can calculate the ADJACENT side (distance from camera point to the camera rectangle shown in the viewport)

# for the Soh Cah Toa trigonometry stuff, this is half the width of the plane (the plane width is 1)
opposite = 0.5

camera.data.lens_unit = 'FOV'
field_of_view = camera.data.angle

# this is the angle for the trigonometry right angle triangle
angle_radians = camera.data.angle / 2
extrude_distance = opposite / math.tan(angle_radians)

#  turn on edit mode
bpy.ops.object.editmode_toggle()
# select the planes face
bpy.ops.mesh.select_all(action='SELECT')
# move it to the same position as the camera rectangle shown in the viewport
bpy.ops.transform.translate(value=(0, 0, -extrude_distance), orient_type='LOCAL')
# extrude it backwards to the camera point
bpy.ops.mesh.extrude_region_move(
    MESH_OT_extrude_region={},
    TRANSFORM_OT_translate={
        "value": (0, 0, extrude_distance),
        "orient_type": 'NORMAL',
        "orient_matrix_type": 'NORMAL',
        "constraint_axis": (False, False, True),
    },
)
# join the extruded face in the middle into one point, so it makes a pyramid shape
bpy.ops.mesh.merge(type='CENTER')

# turn off edit mode
bpy.ops.object.editmode_toggle()

# now there should be a mesh the same shape as the camera object
# the new mesh can be scaled to see the camera frustum at a longer distance

</code>
Answer: Initial Solution: AltB select the camera boundary. Pro: Simple Con: Limited view of other references. Alternative Solution: Vertex/ Face Mask. Pro: Flexibility & control Con: N/A.  Most Efficient Solution: Adjust Mesh to Camera View. Pro: No wasted vertices Con: Camera is set - less flexible.


Illustrator: Gradient with thicker stop lines

Question: I just want to create a simple gradient from 1 color to another - the only difference is, is that I don't want a smooth gradient. I want a gradient with those fancy thicker than normal stop lines, where you can see that it's still a gradient but you see the 'not smooth' transition to the end color. I don't really know how to explain - so I've attached a link to a picture that goes from light gray to darker gray. Is it done with a setting or with double gradient overlaying each other?
What's the best practice for this? and how can I reproduce this effect in Illustrator, mind as well tell me how to do it in Photoshop please :)
image with gradient background
Comment: Are you talking about the diagonal "banding" that goes across the image producing about 20-30 "bands"?
Comment: Yes that's the one
Answer: If you are using Photoshop, you could switch to Indexed colour mode, and reduce the number of colours to a low number like 17 or so, ensure dithering is set to none, then switch back to RGB mode.

If you are using Illustrator, you could simply edit the gradient, by adding more stops, and adjusting the midpoint of each stop.
Comment: @mXX Yeah, but I suppose you could try making a stepped gradient in Photoshop too.
Comment: Thanks! I was able to reproduce it in Illustrator. Also tried it in Photoshop, but between every stop/band - I get noise, it's not a straight line. Same settings as you posted, but when looking at your image, it has the same.


Schengen main destination

Question: From what I understand the main destination of a Schengen visa is the country that you will spend the most period of the trip in. I've my Schengen issued from Germany - multiple entries - and I already spent three days there. If I used it to spend three days in France would that violate the definition of the main destination or not?
Comment: Don't have any references on hand but I remember that if you're spending the same number of days in every country, apply to the country you're first arriving to, in this case Germany
Answer: This rule is used to determine which consulate/member state should examine a visa application. It's not directly relevant if you already have a visa. Not going to your main destination at all could create problems because it might suggest you lied to get a visa but there is no explicit requirement to stay longer in the country that issued the visa.
Additionally, multiple-entry visas work somewhat differently (they are supposed to be used for other trips than the one you described on the application). In principle, you should get one if you have reasons to visit a country repeatedly but it's not required to go to that specific country on any given trip. Because of this, changing your plans and staying a bit longer in France is even less of a concern in your case.

Schengen main destination


How can I give my squad more weapons?

Question: I have quite a lot of weapons to choose from for myself, but how do I give some to my squad? Currently they only have one each, and some empty slots.
Answer: Like in Mass Effect 2, squadmates can only use certain types of weapons.  When you depart for a mission, you can click on the empty blue slots in order to pick a new weapon for them by clicking on it. Grey slots are weapon types that you are unable to equip for that squadmate. Unlocking a new weapon will allow you to equip it on a squaddie only if they can equip that weapon type.
In addition, when you pick up a new weapon during a mission, if you choose to go to the loadout screen, you can equip your squaddies there as well.
Here you can see that James can use Assault Rifles and while he does not have a Shotgun equipped, he can equip one. He is unable to use Sniper Rifles, SMGs, or Heavy Pistols.

I'm a little unsure on how you've managed only one weapon type for your squadmates though, because I get a popup message saying "You must have at least 2 weapons equipped" if I try to leave the loadout screen with a setup like the above one.
Answer: You can't. Unlike Shepard, they can only use 2 predetermined types of weapons. The grey slots on their equipment screen are locked, but you can change what they have in their blue slots in the regular manner. The easiest way to change their loadout is when embarking on a mission, you will get a screen prompting you to choose the weapons for your squad.

How can I give my squad more weapons?


Download all images from Facebook inbox

Question: Is there any way to download only the pictures from the inbox of my Facebook account? I'm trying to make a collage from my fraternity and everyone has to send me pictures, but I need to download them all to my computer and I don't want to download them all one by one.
Answer: No, this isn't possible without programming via the Graph API (programming is out of scope for this site). You will also not find any third parties offering this service as the permission needed for approval requires the following

This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop, in-car and TV apps will not be granted this permission.

see https://developers.facebook.com/docs/graph-api/reference/v2.3/user/inbox and https://developers.facebook.com/docs/facebook-login/permissions/v2.3#reference for more info
Answer: OK, might be stupid to answer this 3 years after the question was asked, but perhaps someone else needs it.
There's a browser extension that can save Facebook chats, including the option to save media as well. So you might just save the chat you need, and in the archived folder you will find all your pictures.
The link Messages Saver for Facebook

Download all images from Facebook inbox


Screen brightness reset to minimum after every reboot

Question: Ubuntu 11.10 doesn't save my brightness settings between sessions. Everytime I boot up, the brightness is always at zero, and I always have to set it back to my preferred setting (at maximum). How can I ensure that my brightness preference will persist after reboot?
Answer: In the file /etc/rc.local add before line exit 0:
echo 5 > /sys/class/backlight/acpi_video0/brightness

Where 5 is the brightness level from 0 to 10
Comment: The max brightness is defined in /sys/class/backlight/acpi_video0/max_brightness. The default is 15 on my laptop. So if you want to set it to 50%, you should use `echo 7`.
Comment: Since upstart is asynchronous it can happen that `/etc/rc.local` is executed before the screen is fully initialized. If this happens (it happened on my laptop) you need to add `sleep 5` (or more, or less) a line above your `echo ...`-line
Answer: Basically you need to run
echo X > /sys/class/backlight/acpi_videoY/brightness

during the boot process after the graphics drivers have loaded with appropriate X and Y. The other answers and comments explain how to find X and Y.

While the /etc/rc.local suggestion works, the most consistent way of doing this, in my opinion is the following:
Create a file, say customsetbootbrightness.conf, in /etc/init (avoid collisions with existing filenames in that directory) as root with the following contents:
description "Sets brightness after graphics device is loaded"

start on graphics-device-added
task
exec echo X > /sys/class/backlight/acpi_videoY/brightness

This way, the behaviour of the system will the same as systems without this particular quirk (of brightness being 0 at startup). In the /etc/rc.local method, there is usually a small period when the brightness remains 0.

Also, this should remove the necessity (in some systems) of having to sleep 2 before echo... - not checked though. (See http://xchamitha.blogspot.co.uk/2013/07/set-screen-brightness-when-booting.html or http://ubuntuforums.org/archive/index.php/t-2061712.html for example)
Answer: You should probably check first:
ls /sys/class/backlight/ | grep 'acpi_video'

So you will get list of all possible displays and then you can experiment to find which is the display you want to modify. On one laptop, the screen was called "acpi_video0". Replace "acpi_video1" below with the actual screen name of your screen. On systems using the initsystem (e.g. 11.10) I must put
echo 5 > /sys/class/backlight/acpi_video1/brightness

in my /etc/rc.local file, whereas on systems using the newer upstart mechanism (e.g. 13.04) I must put this into /etc/init/screen_brightness.conf
start on runlevel [2345]
stop on runlevel [016]

script
echo 5 > /sys/class/backlight/acpi_video1/brightness
end script

post-stop script
end script


Editing code without invalidating answers

Question: This question picked up two answers before it was closed as stub-code.  Now, the OP added the missing snippets without removing a single line, and the answers are likely still valid as they only covered the structure of the code, which was unchanged.  Why was this edit rolled back as invalidating the answers when it didn't invalidate any answers, and it made an off-topic question on-topic?
Answer: I believe that the code added in Rev 5 should be kept, and the question reopened, because:

Rev 5 doesn't invalidate any existing answers.
That revision just added code, and didn't really modify existing code.  (If the added code were in a separate block rather than interspersed, I doubt that we would even need to have this discussion.)
The users who answered took the risk when they gave their advice despite having incomplete information.
Making the original poster ask another question with identical intent is just pointless red tape.
Comment: *draft discarded* - I completely agree with this. I've rolled back, reopened and cleaned up the comments.
Answer: I rolled it back, since I handle the following principles.

If a question has answers, you don't edit the code.
  If a question is off-topic, we close it.

This gets tricky if an off-topic question can only be made on-topic by changing the code, since the moment a question gets answers there's a catch 22 situation.
In my opinion, off-topic questions should not be answered.
If the general consensus is that this specific edit should not have been reverted, let's hear it.
Comment: You're correct that it's a catch 22 scenario here, but I think you're being a little over-zealous. I didn't realise it was off-topic before I went to bed and obviously some people decided to try and help anyway (I don't know if they answered before or after it was marked off-topic). I rectified the issue as soon as I became aware of it. This is clearly an edge case.
Comment: @FizzBuzz for the record: questions that are put on hold cannot be answered. That's the whole point of doing that


Minimap Around Perimeter of Screen, Code Provided

Question: What I'm essentially trying to do is what a lot of FPS's nowadays do in regards to their HUD.  When an objective is off-screen, a small icon / symbol is shown on the perimeter of the screen, basically pointing towards the objective.
I'm working in 2D and I'm trying to get offscreen enemies (top-down) to show their positions via small points around the perimeter of the screen (a rectangle view, pretty standard).
Simply put, I'm trying to find the value of the red point when everything else is known:

Here's my code, and while it seems to be half functioning, sometimes it'll do funny things.
<code>// Scan through enemiesRef list, and update dots to draw.
// ------------------------------------------------------
Enemy enemyRef;
float a, b, x, y;
float screenRatio = frustumWidth / frustumHeight;
float minX = topLeft.x;
float maxX = topLeft.x + frustumWidth;
float minY = topLeft.y;
float maxY = topLeft.y + frustumHeight;

// Loop through each enemy.
// ------------------------
for (int i = enemiesRef.size() - 1; i >= 0; --i)
{
    enemyRef = enemiesRef.get(i);

    // Get x and y distance to the enemy.
    // ----------------------------------
    x = enemyRef.position.x - center.x;
    y = enemyRef.position.y - center.y;

    // Check if the enemy is on-screen and skip.
    // -----------------------------------------
    if (Math.abs(x) < halfFrustumWidth && Math.abs(y) < halfFrustumHeight)
        continue;

    // Determine the known variable and derive the unknown.
    // ----------------------------------------------------
    float ratio = Math.abs(x) / Math.abs(y);
    if (ratio >= screenRatio)
    {
        // The a is known, the dot is on either the left or right.
        // -------------------------------------------------------
        if (enemyRef.position.x < center.x)
            a = minX;
        else
            a = maxX;

        // Calculate b.
        // ------------
        b = a * (enemyRef.position.y / enemyRef.position.x);
    }
    else
    {
        // The b is known, the dot is either on the top or bottom.
        // -------------------------------------------------------
        if (enemyRef.position.y < center.y)
            b = minY;
        else
            b = maxY;

        // Calculate a.
        // ------------
        a = b / (enemyRef.position.y / enemyRef.position.x);
    }
}
</code>
It seems the code accurately detects whether the point should be on the top / left / bottom / right, but if the object is far enough off screen (as in, it's both past the upper boundary of the view and the left boundary view at the same time, for example), the dot on the map just flies off the screen (for example, to the left, it's x coordinates going into negatives).
I believe the error lies somewhere in calculating a or b:
<code>a = b / (enemyRef.position.y / enemyRef.position.x);
b = a * (enemyRef.position.y / enemyRef.position.x);
</code>
Whether it be with the signs of the values, or if the values I'm calculating are just wrong, etc, I don't know.
Answer: Nevermind, I got it working by using the equation of a line rather than this pseudo-trig stuff.  Thanks anyway.


Advantages of PHP CLI?

Question: What are the benefits of PHP's CLI over other scripting languages/environments such as VBScript or even windows scripting?
Answer: One use would be as a scheduled maintenance task that is related to a web application.  You will be able to use the libraries and functionality from the web app.
I guess another benefit is that if you are familiar with php web development, then hacking out a quick cli script in php may be a quick way to get something done quickly.
Answer: We use the PHP CLI for cron tasks like sending out emails, closing old threads and sending out email queues across web servers. You can also use it for one-off projects like parsing a flat text file straight into your database. That's not something you want to be web viewable. These tasks have the advantage of sharing libraries you've built for your website such as database access and sending emails.
Answer: I suggest using Symfony Console Component http://dev.umpirsky.com/building-cli-apps-with-symfony-console-component/
Answer: The best scripting language for a job is almost always the one you know best.  So if you know PHP better than VBScript, that's going to be your biggest advantage.  I have written a number of command line utilities and maintenance scripts that a lot of other people would probably write in PERL, BASH or even Python, but I simply don't know those languages nearly as well as I do PHP.
Answer: That PHP is OS-independent, and it has a very complete utility library.
Answer: First thing that springs to mind is a PHP application that you could easily render as a daemon in conjunction with a task scheduler to constantly do certain updates because you can't/wouldn't want to depend on user activity to trigger the execution of the application - but you really don't need an interactive CLI for this sort of stuff, that is you could just use the available task scheduling tool through something other than a CLI and let it do all the dirty work.
The major reason would be PEAR, and I think this is when PHP starts getting really interesting. It's a must for symfony, but you can really see it help automate your work with a language your already familiar with - no need for learning python, perl, etc. and it's a plus that PEAR scripts don't have to reside in the cgi repository (some shared hosts are very restrictive).
Answer: All else being equal, use the language you know best. And for a lot of utility programming, all else is equal.
In most such cases, VBScript or Powerscript probably are at least as suitable.
Answer: Extending an otherwise web-only project to the commandline;
See how drush is extending drupal.

Advantages of PHP CLI?


What kind of strategy goes into the picks and bans phase?

Question: Does your first champ pick matter (like jungle or mid)? Is it mostly counter-picking, or do you still choose a team that your team has already decided?
Answer: I played a lot of ranked, almost 1600 elo atm so I'll try to answer. In order of importance, here is what I think goes into the picks:
1.Role
Each person on your team should have a role. You don't want to pick multiple champions that can only jungle or only mid/top. Unless you've agreed with your team pregame, usually you have 2 bottom, 1 jungle, 1 mid, 1 top. Pick champions for available roles.
2.Counterpicking
In a lot of organized teams and high elo games, people usually pick ad carries or support champions first, since these are generally hard to counter because of the role they play. The ad farms and the support provides utility, roles that's difficult to counter. Mind you, there are specifics like sivir being good against Caitlin.
For the rest of your lanes, you have to be very careful about counterpicking. This is why it is always a bad idea to first pick kassadin, as he has numerous counters that simply prevent him from laning at all.
A lot of people also pick champions that can fill multiple roles to throw people off. For example, when I pick gangplank, he can go top or jungle. If my opponents pick pantheon, gp's hard counter, I go jungle and have a teammate pick another top.
3.Team composition
You have to pay attention to how your team can work together and work to win team fights. Picking for roles and counters do little if your team doesnt work. I'll list the most common team comps:
A. Poke team
Your team has the ability to do significant damage from a distance over time. This allows you to slowly push down towers or seize objectives.
B. Standard team with moderate CC
Basically you have some crowd control abilities that allow you to protect your carries and shut down the enemy team.
C. Gank team
Your team has a lot of mobility and always maintains map presence. Good examples of gank teams include heavy ganking junglers like alistar or champions that can pressure globally like shen, karthus, or twisted fate.
There are many more, experiment!
Answer: Normally taking AP or Top champions 1st is a bad choice because its all about countering your opponent's lane and if you take those 1st they will normally counterpick you.
Thats why mosty supports/junglers are picked first because it doesn't matter much (at least in higher elo). Jungle speed does matter but you can't counter everything.
Answer: It depends a lot on what champion you are picking for a specific role. There are champions for each role which are considered "safe picks" because they aren't really hard countered by any other champion. Examples would be:
Top: Irelia, Kennen, Riven
Mid: Ryze, kennen, cassiopeia
Bottom: I mostly just play Aps and sometimes top in ranked so I cannot really comment much on bottom lane, also there are way more variables there since it is a combination of 2 champions.
Another thing to consider during picking phase is to see what the opponent is banning as it often indicates on what they're going to pick on a specific lane, for instance if someone bans ryze and leblanc, there's a good chance they want to take ahri since those are both counters against her.
Hopefully that helped you out a bit.


How should I use the meta-tags [feature-request], [bug], [support], and [discussion]?

Question: On meta, each post must be classified into one of four classes. Which should I use?
Note that in addition to these four classes there are numerous other tags on meta that can and should be used in addition to classify the question more precisely.
Comment: I've made this community wiki if someone wants to flesh it out a bit; limited internet right now.
Answer: You should use feature-request for specific suggestions for modifications of the software (or 'official policy'). If the request isn't yet clearly defined, use the discussion tag first, and plan to post a later feature-request.
Remember that eventually all feature-request posts will eventually be tagged status-planned, status-completed, status-deferred, status-declined, or status-bydesign with by an MO moderator or SE staff. If that doesn't seem appropriate, don't use feature-request!
Comment: Scott, to refer to meta tags use `[meta-tag:name]`. Also, it's status-declined and status-deferred.
Answer: Use support for questions regarding the use of specific features of MathOverflow, whether the site itself or anything associated to it.
This question is a good example of this since it asks how to use certain tags. Another example is our very first meta question which asks where to find the previous meta site for MathOverflow.
Answer: Use bug if you notice anything about MathOverflow that is not functioning as expected. Such bugs can range from minor as simple typos to major system failures.
This tag is continuously monitored by MathOverflow moderators and Stack Exchange staff. This is the tag to use for any critical problem with MathOverflow.
In view of this please limit the use of this tag to situations where you are convinced something is not working as intended by the designers or the matter is urgent. Otherwise it is usually better to use support to ask why something is working the way it is and if a behavior that might seem strange to you is expected or actually a bug.
Answer: Use discussion for everything not covered by the three others. Moreover, a questions intended to gather contributions from several users is usually tagged discussion; if you are just seeking a piece of information from someone in the know it is often rather support.
Thus, a post about several options how some aspect of the site could be changed is a discussion not a feature-request; to be the latter you should present one specific proposal.
When in doubt use discussion (or  support).


Remove "Favorites" in Windows 7 Explorer navigation pane

Question: Is there a way to remove the "Favorites" item at the top of the navigation pane in Explorer in Windows 7? It really bugs me that it wastes so much space, and I can't find a way to remove it.
Answer: Here are links to remove any or all parts of the navigation bar so you can customize it the way you like. Personally I remove Homegroup and Libraries as I like having My Computer Network and Favorites. As for favorites if you click the favorites it will bring you to the folder that contains your shortcuts and you can ad or remove anything you like. Personally besides the the computer and network browsing shortcuts this is the best, you could actually remove everything but favorites and add your computer and network folders in it.
Anyway here are the links and the site they all come from is a GREAT resource.
First off to stay on topic this is the link to remove Favorites then i will follow with the instructions for the rest in the list of links below they all contain the registry information on how to remove or ad them and if you are so inclined you can create a .reg file to edit them on the fly or to create a.reg file to bring back anything you removed (that is if you know how to create on I wont get into that here):
Favorites,
I am a new user so i am only able to post one URL so if you want to edit anything else read the whole post this links you to and at the bottom their are links to do the same for all the other nav options available.
Comment: +1. You can add other links as comments, or update your answer.
Answer: Edit - As John T said, there is no way to remove just the favourite section - the following refers to the whole bar.
To shrink the favourites bar, click on the separator line and drag it further to the left.
If you want to remove it completely do the following:

Click "Organise"
Expand the "Layout" option
Untick the "Navigation pane" option.
Comment: Well, unfortunately I like the navigation pane, I just don't want the Favorites thing taking up space. I'll just have to live with it, I guess.
Answer: Follow this: http://www.mydigitallife.info/2009/09/02/how-to-remove-and-hide-libraries-group-from-navigation-pane-of-windows-7-explorer/
But use 0xa9400100 instead. I've seen different values for this in various places. I assume it is a bit flag.... What I would do is change just the 0->4 digit in what ever value you have there currently. If it doesn't work try the value I gave. Do remember or backup the original key in case you get some weird effect though.
Props to i-g for the link above.
Answer: There is no way to completely disable it yet, but you can hide the entire navigation pane, or delete items from favorites to make that section smaller.
Comment: "yet" - what versions of Windows 7 does this answer apply to, when did it change?
Answer: I found a way to remove the Libraries dropdown, but I don't know if there's a similar way to get rid of Favorites. Unfortunately, I can't test it myself, since I'm not running Windows 7 yet. Here it is:
It seems pretty straightforward. Just remember to back up the entire parent of the registry key you're modifying before you make any changes. (Just  select the parent key/folder and export it to a .reg file.)
Answer: I searched for "favorites" in the HKEY_CLASSES_ROOT\CLSID  part of the registry, and I found key {323CA680-C24D-4099-B94D-446DD2D7249E}. The key looks a bit like the library key and has a shellfolder subkey with a Attributes d-word set to a0900100.
After I made a restore point for the operating system, I first tried to change the attributes word to a0800100, which didn't do anything; then I deleted the shellfolder subkey; which left the Favorites folder but rightclicking offered to delete the folder… but didn't execute the promise.
Then I deleted the entire key. That left only a vague icon with the same right-click menu, and the same behaviour. So maybe it is some setting in the explorer itself.
Comment: answer not clear
Answer: Collating the answers above, here is a registry file that works without admin access (tested on Win 7) that will hide:

Favourites
User Folder
Libraries

in both Windows Explorer and Open/Save dialogs.
Save it and import it in regedit (Start > Run > regedit).


SWTOR Group Conversations and Companion Affection

Question: I know in group conversations that light and dark side points are decided not by the winner of the conversation roll but the choice that you selected. How about with companion affection? I pretty much know which conversation option will cause a gain in affection points with my companion, if I select the option and my groupmate wins the roll will I still gain the affection points I normally would have if I were doing the conversation on my own?
Answer: If you do not win the conversation roll, then since you didn't say it, the companion does not get any affection points.
You have to both choose the appropriate option to gain (or lose) affection with the current companion, and win the roll.
Of course your companion must be summoned and in the group, so this only works for groups less than 4.
It is not like Light/Dark side choices where you get the points for what you chose regardless of who won the roll.
Comment: Citation needed.
Comment: @MatthewRead: Don't have a reference; this is based direct experience from playing the game.
Comment: That's reference enough for me. The problem was the other answer, which sounds also like it's from personal experience. If you could relate a specific experience ("I chose X in Y conversation with companion Z") it would be helpful to distinguish/show the other is wrong, I think.
Answer: Same way as LS/DS points work, you get/lose affection based on what you choose, though in specified group content (Heroic/Flashpoint stuff) there don't seem to be any conversation triggers tied to companions to cause it.
Comment: Citation needed.


How can I change directory of AnkiDroid to external Storage

Question: After using anki for a while , my internal storage (16gigs)became full, and now I'm unable to add more cards, then I tried to change directory to external Storage but it did not work for me (I'm using Android 7.1.1 moto g4 play) and ot keeps popping up message saying 'the given path isn't valid' .if someone could help me out it would be great
Comment: What do you mean by "ot"? Is it a typo maybe?
Answer: The reason you are not able to store an app on your memory card could be using a card formatted in "Portable storage" mode. In that case no one single app can be pushed out of internal memory, but reformatting of a memory card in "Internal storage" mode can change that. Another reason could be a restriction made by app's developer and there is nothing a user can do about it.
Sources: https://www.androidpit.com/how-to-format-microsd-cards-as-internal-storage
https://developer.android.com/guide/topics/data/install-location.html


Why worry about CS (creep score)?

Question: If you focus more on kills and objectives you would obtain a ton of gold. So what does a good CS in a game provide?
Answer: Simply put, creeps are much more reliable than any other source of income in the game aside from gold per 10 (which they outpace dramatically). Comparatively, dragon is worth a little bit more than 10 creeps for each player on your team. Killing enemy players also has diminishing returns. The second consecutive kill on a player with no kills is worth less, and the reward for additional kills on that player diminish further.
To be specific, killing the first 3 waves of creeps is worth MORE than an ordinary kill and only 30 gold less than first blood (which is never guaranteed).
However, the biggest problem with roaming around killing objectives for gold, is not so much the lack of gold, but the lack of experience. Minions provide the bulk of experience for champions trying to level up. Also, kills and objectives are not actually worth "a ton of gold."
Dragon is worth 190 gold, or about 10 creeps per player (fewer creeps by the time you can actually kill it reliably)
Baron is worth 300 gold, or about 15 creeps per player. (again, fewer by the time you can even attempt to kill it)
Towers are worth 150, or about 7 1/2 creeps per player. (likely fewer by the time a tower goes down)
The other problem with focusing on objectives without killing creeps is the limited number of available objectives. dragon is only on the map once every six minutes. towers are one time affairs. Baron is only available every seven minutes after his initial kill. Minions, by comparison, are infinite. They will continue to be available as long as the game goes, and they spawn every 30 seconds with increasing value the longer the game goes.
Answer: CS is much better gold because it is more reliable than player kills. An average creep wave will get you almost as much as killing a champion.
Comment: Maybe in a bot game when kills are worth a lot less after constantly killing that bot but in a real game, ~3 waves = 1 champion kill.
Answer: IT provides gold so you can secure those objectives. You can't just go an instantly take a tower down, since you're not strong enough or high enough level. CS'ing gives you the gold and levels you need to gain an advantage over the opponent, so you can obtain those objectives.
Answer: It gives you lots of gold. Fifteen Creeps = One Champion.
Answer: CS is low risk high reward.  Unlike kills where you can die in the process with CS you get free gold based on your skill of last hitting.  If you only focus on kills you will fall behind if your ganks fail or make the enemy stronger if they cs well and take you out when you go for them.
Answer: Focusing on kills often means being executed by a turret or minion, or ganked, or caught by the lane partner from behind/stealth because you're over extended
Creeps = XP and gold for less risk.
My unscientific approach is to examine K/D/A scores vs minions killed in the post-game stats. Low minions = high deaths, no matter what the kill number is.

Why worry about CS (creep score)?


Notes 4.0 (El Capitan) strikethrough option removed

Question: Does anyone know how to apply a strikethrough to text in the new Notes app? It seems the option has been removed entirely from all font menus, contextual menus and even the font palette!
Answer: Yeah, the option is a bit well hidden, dunno why.
Its called Struck through  instead of strikethrough
To get the text formatting in Notes 4.0

1) Make a text selection for the struck through, right click on it
2) Select Fonts then Styles

3) Use the Style Browser or whatever that is called
to check the Favourite Styles and then select Struck Through from the dropdown list. Tada!

Wow. That was really easy and accessible, right? Why not add
another step since all that makes a lot of sense. I guess, this time
Apple struck through the UX.
Here one close-up of the option. I think one can make a Keyboard
shortcut that will make this more ehh sane to use. Maybe there is
one already.
Comment: Apple definitely "struck" out on this.
Comment: Notes 4.5 has improved with right-click (context menu) -> Font -> Strikethrough. Two clicks. Or you can choose Format -> Font -> Strikethrough from the application menu.
Comment: Yeah, they don't use lists? Took me a while to figure that out. Will be probably corrected with the next update ;)
Comment: What a horribly obscure place to hide a formatting feature that lots of people use.  I vaguely remember there being a shortcut in the past using the "-" character in combination with other control characters that would strikethrough selected text.  That, however, doesn't seem to exist anymore.  Would love if they put this in a better place or assigned a shortcut. SMH.
Answer: I believe that ⇧⌘L is intended to replace striking items through. This provides you with a very nice list that you can check and uncheck items. It is annoying that they would bury the strikethrough, but I do enjoy the checklist a lot more, especially when viewing the notes on my iPhone or iPad.
Answer: To add on to PJJ's answer, you can more quickly strike through text with the copy style keyboard shortcut. Select some already struck through text, Opt+Cmd+c (Format > Font > Copy Style). Then select the text you want to strike through and Opt+Cmd+v (Format > Font > Paste Style).
From: Has anyone figured out a keyboard shortcut to globally strikethrough selected text in any OS X app?
Comment: This is cool. Very useful for even other formatting cases. Now I kept a snippet of strikethrough text and leave it as a template for your method. Thanks!
Answer: Notes checklists are way cool, but that's only one of many uses for strikeout (errrr .... "struck out").
Answer: The question has probably been answered, but as a side note, there's something nice you can do; assign a keyboard shortcut to strikethrough.


How to repaint a metal door and keep the paint from scratching off?

Question: I need to paint an exterior door that not only is metal, but has a small amount of rust on the outer edges. The door is used quite often and takes a lot of wear and tear. The past paint jobs have not held up very long and I have been given the task to prevent this from happening again. I primed, painted and put a laquor finish on the door, thinking this would do the job. Nope, didn't work! Any suggestions?
Answer: Priming and Painting Galvanized Metal, condensed from KILZ.com, other manufacturers also make specific paints and primers for galvanized metal.
The galvanizing process, which is designed to prevent rust, leaves an oily film that can prevent coating adhesion. The zinc in galvanized metal can produce a milky "white rust" (which is common when it has weathered) that must be removed with a stiff brush or abrasive pad, prior to coating. It's necessary to remove the oily film that can prevent coating adhesion with a water-based cleaner/degreaser.
Prime the surface with a water-based primer. Since oil-based primers can interact with the zinc in galvanized metal, causing premature peeling, always use a water-based primer when painting galvanized metal. KILZ® 2 Primer is an excellent choice when priming and painting exterior galvanized metal. It will grip to the metal surface and provide a better surface for the paint to adhere.
todayshomeowner.com/how-to-paint-a-galvanized-metal-door
Comment: +1 for the point about interaction with zinc and the suggestion to remove any oils. Of course Kilz isn't the only brand which makes a good product for the purpose; they're just the ones whose marketing department sponsored the piece you're quoting from.
Comment: Indeed they had the best writer, it really was a good read and a shame to butcher it. @keshlam
Answer: Wirebrush the rust to remove it. Apply a primer designed to adhere to bare metal. (I'm fond of those which react chemically with rust to help finish the job of preparing the surface, but those are only available in dark colors as far as I know.) Then apply a paint compatible with that primer -- not all paints layer happily on top of each other; generally you want the topcoat to use the same solvent the undercoat did for best adhesion.
Theoretically, painting a metal door is like painting a metal car...  I wonder what an auto body shop would charge if you asked them to paint it.
Answer: I paint all metal doors with automotive primer (helps with rust and binds harder) and automotive spray paint.  Need to spray a good distance away and layer it on lightly but if you take your time it can look almost perfect.  Bonus points for following it up with a clear coat a few days later.
Answer: Since you can rarely get rid of all rust without sanding completely through the metal, due to pitting, you should remove as much as possible, and the apply a rust fixer.
Answer: After sanding all the rust, apply a rust neutralizer, such as loctite rust neutralizer. Spray it on, read instructions. then follow that with either priming the surface or applying some auto body filer, such as Bondo, If the surface was compromised from the rust. Sand the body filler until it is smooth and flush with surrounding metal, then primer, then follow up with finished paint coats.


Sonar XML Plugin: XPath rule and namespaces

Question: We are trying to implement the Sonar XML Plugin to analyze the XHTML of our project. I am having trouble with the Xpath rules and multiple namespaces. We want to run Xpath checks against files whether or not they contain several different namespaces, but that doesn't seem to be possible.
By default Sonar auto-detects the namespace--in our case the XML or XHTML namespace--and uses the associated schema. The problem is that we use Primefaces tags in our XHTML and we want to use Sonar's custom xpath validation to check some specific things with the primefaces tags. For example //p:outputPanel[not(@layout='block') to find specific elements in the XML files.
We put this XPath rule into Sonar and run our checks:
mvn -f pom-xhtml.xml sonar:sonar

What happens is that on files that do not have Primefaces tags in them, and thus do not have the Primefaces namespace declared, we get the following error:
[ERROR] [13:35:54.918] Could not analyze the file /Users/...snip.../header.xhtml
org.sonar.api.utils.SonarException: javax.xml.xpath.XPathExpressionException
    at org.sonar.plugins.xml.checks.XPathCheck.getXPathExpressionForDocument(XPathCheck.java:120) ~[na:na]
    ... snip ...
Caused by: javax.xml.xpath.XPathExpressionException: null
    at org.apache.xpath.jaxp.XPathImpl.compile(XPathImpl.java:408) ~[xalan-2.7.1.jar:na]
    at org.sonar.plugins.xml.checks.XPathCheck.getXPathExpressionForDocument(XPathCheck.java:118) ~[na:na]
    ... 40 common frames omitted
Caused by: org.apache.xpath.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: p
    ... snip ...
    ... 41 common frames omitted

An example of such a file might be this one line file:
<?xml version="1.0" encoding="UTF-8"?>
<s:resource xmlns:s="http://jboss.com/products/seam/taglib" xmlns="http://www.w3.org/1999/xhtml" />

As far as I can tell, because Sonar is trying to test an Xpath rule with the "p:" namespace, it errors out on files where that namespace is not declared. We would rather not add all our namespaces to all our files, as it is not needed for any other reason.
I saw that Sonar can handle custom schemas (using the sonar.xml.schemas option), so I created one that would then import the needed namespaces into it. If Sonar uses this schema to analyze with, then all needed namespaces for the Xpath checks could be declared.
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:import namespace="http://java.sun.com/jstl/core"/>
   <xs:import namespace="http://java.sun.com/jsf/facelets"/>
   <xs:import namespace="http://java.sun.com/jsf/html"/>
   <xs:import namespace="http://jboss.com/products/seam/taglib"/>
   <xs:import namespace="http://java.sun.com/jsf/core"/>
   <xs:import namespace="http://primefaces.prime.com.tr/ui"/>
</xs:schema>

When I try that, though, I get the following error:
[ERROR] [12:59:30.197] Could not analyze the file /Users/...snip...header.xhtml
java.lang.NullPointerException: name
    at java.util.zip.ZipFile.getEntry(ZipFile.java:156) ~[na:1.6.0_33]
    ... snip ...
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) [plexus-classworlds-2.4.jar:na]

Which isn't exactly helpful. If I try a blank schema:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xs:schema>

Then we're back to the first error. Thus sonar is successfully pointing at the custom schema, but it is not working. So it seems that Sonar (or Java?) can't handle importing other namespaces as part of an XML schema.
Am I doing something wrong in my schema that could cause this? Has anyone solved a similar problem involving Sonar? Any advice is appreciated.
Answer: Well, it wasn't the answer I was looking for, but we just ended up adding all of the namespace declarations that we needed to do XPATH tests for to each page. So our short pages became:
<s:resource xmlns:ui="http://java.sun.com/jsf/facelets" xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jstl/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui" data="#{}" contentType="#{}" fileName="#{}"/>

All of the extra namespace declarations are unneeded for that page, but they make the XPath checks work in Sonar. Not ideal, but... it works.


How to do machine translation with no labeled data?

Question: Is it be possible to train a neural network, with no parallel bilingual data, for machine translation?
Answer: In this paper: Unsupervised Machine Translation Using Monolingual Corpora Only
 the authors proposed a novel method.

Intuitively it is an autoencoder, but the Start Of Sentence token is set to be the language type.
One other advanced method is to use the pre-training model. In this paper: Cross-lingual Language Model Pretraining researchers proposed an algorithm that utilized the pre-trained multi-lingual trained BERT(with labeled data but we don't need to have a labeled dataset for our task) and the autoencoder mentioned previously.
Comment: That's crazy! I wonder if it could be a way of addressing the grounding problem too, if  media experiences could somehow be mapped to a shared embedding space . . .
Comment: @NeilSlater I know only a little about the "grounding problem" but I thought this paper would be helpful to you: https://arxiv.org/pdf/1609.05518.pdf


Why doesn't Twitter's URL shortening always work?

Question: Recently when posting links I've found Twitter has no longer offered to automatically shorten URLs; they used to be shortened to a max of 20 characters just when I pasted them into the tweet box. Now they take as many characters as the full URL.
Answer: It does work, they have just changed the way it is implemented. It now tries to leave URLs as you posted them so that users can easily see where the link is going rather than all links being http://t.co/xxxxx
See this help article on Twitters Link Shortening service.

Having trouble fitting a link into just 140 characters?

With Twitter's new link-shortening feature, you can now paste a link of any length into the Tweet box on Twitter.com and it will be
  shortened to 19 characters. You no longer have to worry about fitting
  a long link into the 140 character limit!
If you want to keep using your favorite link shortening service, you can continue to do so.
Note: If you enter a URL shorter than 19 characters into the Tweet box, our system will still "shorten" it to 19 characters.
  (example: https://about.me/ will take up 19 characters in your Tweet
  even though its URL is only 16 characters long.)

This is what posting a long URL used to look like:

This is what posting a long URL looks like now:
Fig.1 After 13 characters of a URL are entered, a message appears to
  let you know that the link will be shortened.

Fig. 2  YouTube URL has been assigned a t.co link ID, but the link
  will appear as a shortened version of the original URL.

Whenever you post a link in one of your Tweets, it will automatically
  be shortened. See for yourself!

Start typing or paste a long URL into the Tweet box.
After you've entered the first 13 characters of a URL, a message will appear at the bottom of the Tweet box, letting you know that the
  link will appear shortened. (Fig. 1)
Notice that even if you've reached the character limit, you can continue to add text to the URL with no consequence.
Once the Tweet is posted, it will be assigned a t.co link ID, but the link will appear as a shortened version of the original URL, so people who see your Tweet will know the site they are going to when
  they click the link (Fig. 2, above). Yep! It's now that easy.

Note: Twitter's link service (http://t.co) is only used on links posted on Twitter and is not available as a general shortening
  service. To learn more, see our help page on Twitter's Link Service
  here.
Safe URLS

Sometimes URLs can be harmful, so please be careful when clicking on links that were shortened using an external link shortening
  service.
Always check to see what website you're on before giving out your password or downloading any software.
URLs converted by Twitter's link service are checked against a list of potentially dangerous sites, and when there's a match, users will
  be warned before they continue.
Our Safe Tweeting help page has more information on keeping your account secure.
Comment: I know how the new URL shortening works, but on occasion I'll post a URL and the "url will be shortened" message doesn't appear. I'm pretty sure I had reached the 13 characters limit too. In my case the link was ~60 characters and took me over the limit, but the url wasn't shortened. Maybe the javascript just failed that page load. It has worked since.
Comment: For anyone who ends up on this question like I did. The "shortened" URL length is currently 23 characters (this change is reflected on the linked help page), not 19 as it was back in 2012 when this answer was posted.
Answer: I don't know why, but I can offer you a workaround that does the same thing.
TinyURL works very well for shortening URLs, and I like the preview option.  Links stay valid for a long time...  I have a TinyURL link that has worked for longer than Twitter has existed.
Comment: Can you confirm that TinyURL supports deleting of links?
Comment: A quick google search indicates "Go to your account settings, and click "Manage." All of your account URLs will be displayed. Check the box next to the TinyURL you'd like to delete, and click the "Delete" action"... so it seems like they support deletion yes; however you don't need an account to create a TinyURL so it's possible there are some that can't be deleted/hidden by a user.  If that's a concern, you can create an account.
Comment: Yeah I saw the same thing. But with all of the major URL shortening services not offering this option, I just could not believe it. Do you have an account with them? I tried to register but there is no sign in or registration form.
Comment: Just made a redirect back to this question. But there is no option to remove it. https://tinyurl.com/twitturl


My sugar cookies taste dry/stale

Question: I baked 200 sugar cookies and as I was frosting them the frosting was running together so I put them in a room we don't use to dry, now the cookies taste dry/stale. I have put an apple in with them, is there any other way to get rid of the dry taste?
Answer: Staleness in baked goods is caused by starch retrogradation. Basically as your baked goods age, the structure of the starches goes from fluffy to a more crystalline form, and this forces some of the water out of them. Unfortunately, once this has happened, there's really no way to get the water back in, as the stale flavor and feeling are more related to the starches crystallizing than to the loss of water.
Sometimes warming the starches will temporarily soften them again, but this will be temporary, and when they cool they'll be even more stale than before. You could try gently warming one cookie to see if it helps, and then warming the rest right before serving. If the cookies are already decorated, it may complicate this enough that it would be easier to just make a new batch.
As a last ditch, you could try adding a bit of simple syrup to the undersides of the cookies and letting it soak in. They won't taste "fresh" again, but it will make them less dry.

My sugar cookies taste dry/stale


How to get Android Market on Archos 70I

Question: I have an Archos 70i and am still unable to get Android Market on it. I want to get a flash player and other apps which I believe is available on Android Market. Can anyone help me in simple English, please? I do have Appslib already but this is lacking the apps i want.
Answer: You probably need to side-load a Market.apk file that's been hacked to work with your device.  This will require root.  You could also load a custom ROM with the Market already on it.  I recommend searching XDA.
That said, you won't be able to get Flash unless you have/get 2.2.  Flash requires Android 2.2+ as well as an ARMv7 or better processor.  The 70 series is supposed to have an A8 Cortex based on ARMv7, so that part's OK.
Answer: As of March 10 you can install the 'ArcTools' from the AppsLib.
This will let you install the Android Market - and thus also Gmail, Flash and all the things which are unavailable otherwise.
Did this yesterday on my Archos 101 and this worked without problems . I know now have the official Facebook, the TweetCaster program - to name but a few programs I was really missing.
Comment: @fredi: Where you able to install the Android market ? If so, could you please accept an answer ?
Comment: Edelcom, I loaded it and AppsLib informed me that the eLocity is an unsupported device.

How to get Android Market on Archos 70I


Is an abuse of power necessarily a criminal offence?

Question: Trying to make sense of the conflicting opinions regarding the 2020 impeachment proceedings in the USA. In particular, is the claim that an abuse of power does not necessarily has to be a criminal offense valid? That is, can a government official abuse power in a manner that is not a crime or a misdemeanor? I am intentionally asking the question more generally than the specific alleged actions by Trump, for I'd like to know whether such thing as a non-criminal abuse of power exists.
Comment: You're talking about the impeachment. Should be noted that the conviction vote isn't based on regular laws, but a senate vote.
Comment: This is the wrong place to ask such a question.  The definition of "high crimes and misdemeanors" is "whatever half of the House and two thirds of the Senate say it is".
Comment: "Impeachment" and "criminal law" aren't particularly compatible tags; one has nothing to do with the other.
Comment: If you just want to ask in a vaccum, that phrase has no precise meaning so the answer is trivially no. However, we aren't operating in a vaccum, and a government official requesting something of personal value in exchange for smooth performance of their duties is indeed a criminal offense. Even if its done through third parties, and even if the requested transaction never ended up taking place.
Answer: No, abuse of power is not necessarily criminal
Imagine a judge that is "heightist" - they always rule in favor of defendants who are taller than 175cm and always rule against those who are shorter irrespective of the merits of the case.
This is clearly an abuse of power. It's not illegal because "height" is not a category protected from discrimination (AFAIK). However, it is a failure to correctly discharge their legal obligations.
Comment: While an interesting example, I would argue that the judge could be charged with **corruption**: *"An act done with an intent to give some advantage inconsistent with official duty and the rights of others."*  The judge has *official duty* to make rulings on the merits of the case, and the *right to a fair trial* is Article 10 of the Universal Declaration of Human Rights Article 6 of the European Convention of Human Rights, and the Sixth Amendment to the United States Constitution (among others)
Comment: Imagine instead a Judge who orders their receptionist or a junior clerk to collect their dry-cleaning:  Certainly not illegal, but they are taking advantage of their position of power to persuade someone to do something outside the scope of their job.  (Assuming that the subordinate's job doesn't include an overly generic "plus other tasks the judges may ask of you" clause)
Comment: This particular abuse of power is best addressed by law and there is a legal remedy, namely the appellant courts.   Certainly there are some short judges in the appellant court system (at the very least, I'm pretty sure Justice Kagan is not going to be playing Center on the SCOTUS basketball team) who would overturn rulings and assign a new judge to the case.
Comment: At least in the UK, heightism is a fairly standard example of indirect sexual discrimination. Police no longer have height requirements for this reason.
Comment: This establishes that the heightist judge isn't liable under anti-discrimination law, I don't see how you jump from that that the judge isn't liable under any law. And of course there are other abuses of power than this type.
Comment: @Chronocidal "corruption is not a federal crime, unless one is speaking about corruption of seamen and confederating with pirates" https://www.scotusblog.com/2019/09/symposium-corruption-is-not-a-crime/ Not everything that is illegal is criminal.
Comment: @DaleM Malfeasance then...
Answer: The point is that an act need not be a crime for which the actor could be convicted in criminal court for it to qualify as an impeachable "high crime or misdemeanor."
So, abuse of power isn't necessarily criminal of itself, but even a specific abuse of power that is not criminal may be impeachable, Alan Dershowitz's arguments to the contrary notwithstanding.
Comment: Which of Dershowitz' arguments do you mean? Those from 1998 or those from 2020? (See https://www.youtube.com/watch?v=8llxefPibig 6:10 - 6:25)
Comment: How does this answer the question? OP specifically doesn't want to limit the scope to impeachable actions, but rather wants an explanation as to whether an abuse of power is necessarily criminal.
Comment: @JBentley the scope is explicitly not limited to "specific alleged actions by Trump," but that doesn't mean that the question isn't about impeachable acts generally.
The answer is general (the first clause of the second paragraph), but focuses on the implied context of impeachment (not Trump's impeachment, but any impeachment) because one might falsely assume in that context that an impeachable act is necessarily criminal (because some have asserted that an act must be criminal to be impeachable).
Comment: @phoog Either way, writing "abuse of power isn't necessarily criminal of itself" seems to boil down to simply "no" in relation to the core part of the question (is an abuse of power necessarily criminal) by just restating the question as a statement. Presumably OP wants some elaboration (as the other answers have given) rather than just "no". I think the OP was quite clear by writing "I am intentionally asking the question more generally than the specific alleged actions by Trump, **for I'd like to know whether such thing as a non-criminal abuse of power exists.**"
Answer: No, abuse of power is not necessarily criminal
because abuse of power is a moral construct and something being criminal is a legalistic one.
And that the law and morals are only loosely related to each other has been shown time and time again.
However, a lot of specific types  of "abuse of power" have been made illegal due to the fact that ideally law is modeled to conform  to morality. But since "abuse of power" is very vaguely defined you cannot just flat out "make it illegal" in any way that a western judicial system could work with (it would however make a good law to allow judges to screw over any politician they want due to the interpretational range)
Comment: Could it be that abuse of power not being a criminal offence be related to the fact that it is the people who are in power that decide what is a criminal offence?
Comment: exactly, so for example in some moral systems you could say most abuse of power is directly mandated by the law
Answer: High Crimes and Misdemeanors (the bigger category from which Abuse of Power was derived) was historically meant as a catch-all for any actions that could cause a peasant to believe that the monarchy was not morally/intellectually superior to the peasantry, and thus question the concept of Divine Right in early times, and the justification of the State and political system in more recent times. We give politicians leeway in their decision-making and expect them to make decisions that benefit the country.
Sir Henry Yelverton is a solid example of someone impeached for High Crimes and Misdemeanors: Yelverton was the English attorney-general in the early 1600s, and was tasked with defending the Crown's monopoly on gold and silver thread via going after the people complaining about it. This was a politically sticky situation, where if the people complaining about the monopoly got someone high-up in government to support their case, Yelverton would suddenly be in hot water and be fired. Thus, Yelverton wanted King James I's tacit approval of what he was doing. Unfortunately, the king was ailing around this time and wasn't around to give approval. So Yelverton hemmed and hawed in public, eventually imprisoning some of the petitioners but not others, and threatened to release those petitioners if the previous attorney-general (Sir Francis Bacon) didn't give his approval of what Yelverton was doing. Soon after, he was impeached for High Crimes and Misdemeanors and imprisoned in the Tower of London.
Why? He hadn't committed a criminal act; he was just trying to play politics so he could stay in power. However, he showed indecisiveness and cowardice in his public dealings, which very likely made people trust the post of attorney-general a little less, and by proxy, trust the Crown a little less.
Likewise, Trump using his office for personal gain cheapens the office of President. It means the next President will have a harder time convincing people that s/he's working for the American people and not him/herself. Likewise, foreign governments will have a little less trust that the President is truly speaking for the will of America and not just using the position to earn a buck.
Comment: On the other hand, people thinking the President is working for him/herself could be seen as an *improvement* over what people normally perceive the President to be working for (big corporations and the military-industrial complex.)
Comment: @curiousguy Making presidential choices based mostly on what choice will benefit his own wealth and power, not what he believes will be best for America as a whole. By hesitating in the administration of justice and refusing to go forward without major backers, Yelverton was protecting his job at the detriment of the monarchy.
Comment: @user560822 Those are hardly distinguishable when the President is a billionaire businessman.
Comment: What do you mean by "personal gain"?


How to request use of a patented technology?

Question: What is the best method to request use of a patented technology for use in a specific project? Is it possible to develop a simple agreement for a specific project or is it necessay to enter into a general technology licensing/royalty agreement, provided the patent holder is willing. Also who do you contact? I'm interesting in using font recognition software in the development of a mobile and desktop application.
Answer: If you are writing your own font recognition software and you plan to use a technique that you know is patented you could talk to the patent owner. The USPTO has a recordation office you can use to try to see if the patent has been assigned. Also on Google patents there is a link that takes you to the recordation database. If it is not in the assignment records you can contact the inventors. Looking up the patent in Public PAIR (lots of info in other answers) and looking at some the first filed paperwork (ADS, Declarations) should get you contact info. If PAIR shows an attorney or agent was involved they can probably get you in touch with the inventors or assignee.
A patent owner can refuse to license or can request/negotiate any deal they and you agree to. You might be able to get a field-of-use exclusive for your particular case. That would not only keep you kosher but make it harder for others who come along later to copy you - if the patent is that critical.
However if you are getting the software commercially, the vendor of that software should warrant that it either does not infringe anything or that they have licensed all rights needed. Also they might indemnify you.
Do you already know of a specific patent that might be at issue? Have you got qualified advice dissecting what the claims do and don't cover? Unless it is clear that you will be stepping on something, most people would just go for it.