How to make a kaiju in a city?

Question: I've seen a few Kaiju stories, and other than Pacific Rim 2 (ugh), I don't think they explain why Kaiju end up in big cities (correct me if I'm wrong). You'd think that the buildings would make manoeuvrability hard and cause them lots of injuries, so it'd be really inefficient. How do I make my Kaiju believably go to a city?
Comment: You don't need to explain a trope. The trope of Godzilla-always-heads-for-Tokyo was set while folks readily understood the human-collective-hubris and nuclear-war-fear metaphors of the early movies and no further explanation was needed to drive the story. If you remove the metaphor that most big-monster-stories are built upon, then what's left is arguably empty spectacle. A writing problem, to me, more than a worldbuilding problem.
Comment: Kaiju go where the people are.
Comment: Pacific Rim explains this by making the Kaiju alien-built bioweapons that home in on population centers, possibly by following urban runoff. Thus, they aren't trying to survive, they're just trying to cause as much damage as possible.
Answer: First, out of world motivation is rule of cool.
Try rephrasing the question "If a tree falls in a forest and no one is around to hear it, does it make a sound? to "If a kaiju walks in a place and no one is around to hear it, does it make a sound?"
A story where your kaiju would attack a barren land wouldn't be as interesting as if the target is a large city.
Second, in world explanation is that big cities, with their large footprint in term of emitted sounds, lights, smells and food are not meant to stay hidden for a creature which is a top predator.
Answer: Reputation. Being a kaiju is a cutthroat field. Nobody wants to be yesterday's monster, only fit for D-list heroes to cut their teeth on. You want to be the top, the biggest, baddest, most impressive monster around!
And that means picking big fights that really matter. Let's be honest, if you had two monsters, one wrecking Tokyo and the other trampling Des Moines, Iowa, which one would you pay attention to? Probably not the one menacing your cornfields.
Comment: Looking at the map, it probably already thrashed something big on the way from ocean shore to Des Moines. Like Houston or New York.
Comment: @JanDorniak Maybe it flew?
Comment: Maybe you SHOULD pay attention to the one menacing your cornfields, simply because without them you'll starve.
Comment: @Brinstar77 Sure, and without farmers we'd all starve but that doesn't mean they're celebrities. Societies don't necessarily focus on things in order of importance.
Answer: To get rid of skin parasites
Years ago, I saw a nature documentary where a bird was attacking an ant nest. The ants were trying to defend themselves by spraying the bird with their formic acid. It was then explained that the bird had no interest in eating the ants, and that their formic acid had no effect on the bird... but it was lethal for the bird's skin parasites, which was the reason why the bird was assaulting the anthill.
Kaijus are usually big t-rex-like creatures, which means that their tiny arms aren't the best tool to scratch or to remove parasites, so they need to find an alternative method.
For a kaiju, attacking a city is the best way to upset a lot of those small creatures, which start to attack him with rifles, tanks, cannons and so on... These weapons have no effect on the thick skin of the monster, but are extremely effective in killing all of the (huge) fleas and ticks that torment the poor kaiju.
As a bonus, the concrete buildings, being tall and rough, are extremely good also for scratching the back, like the trees for the bears
Answer: reproduction or energy
Kaiju are unbelievable themselves. Their size and weight is impractical from the start. Their own weight threatens to crush them. They have a relatively low surface area which endangers to overheat them as they can't dissipate heat. Their lungs, heart(s) and veins need to work so incredibly hard they will wear out fast. Their food intake would be incredibly difficult. This means one more unbelievable thing might not be noticed as much.
Ignoring these problems, the cities have several things in abundance. Certain materials in buildings, garbage, humans and energy in the form of electricity and oil. Each can be a reason to stay there.
The building (materials) can be used as shelter or a nest (premise of one of the Godzilla movies for the observant). Only tall jungles and buildings will likely hide such big creatures, which is a desire of many creatures for sleep or reproduction.
The humans might seem as a nice addition to their normal food. There is a huge concentration of them in the cities. However, a kaiju would need to eat a lot of humans to stay alive. If it reproduces, the children can prey on the humans.
Finally the energy. For whatever reason, electricity or oil can help the creature survive (or undergo metamorphosis. New Godzilla movie). Maybe an addition to food intake. There is an abundance of electricity and oil in cities.
Answer: Kaiju were not always so big.
Big grazers like it out in the open, so they can see what is coming.  But lots of other animals like things around them.  Especially smaller land animals like cover - down in the rocks or underbrush, hidden in the surroundings. An animal suddenly out in the open will run for cover and hunker down.
Your kaiju have brains that are for smaller animals.  Some force made the kaiju big.  Now too big for their worlds, they feel exposed towering above everything, the wind blowing on their skin, eyes staring at their exposed bigness.
Being in with the big buildings feels right to certain ancestral parts of their brain.  They like solid stuff around them providing cover.  Outside of cities, it is hard to find natural formations that provide a comparable environment.

How to make a kaiju in a city?


How to add add more properties to WP_Post object in search results loop

Question: I am using a plugin called Event Organiser, and it seems that it will only append its custom properties to the post object for all other instances of the WordPress loop except the search. Is there a way to access the search loop only and inject these properties into each WP_Post instance in the results?
Answer: The custom properties you refer to are dates which a stored in a custom table, and which are joined onto the query for events. At this point in time, when querying events, this table is only joined when only the 'event' post type is being queried.
That is, you can search for events - but the dates are only pulled in if you are searching only for events. The following snippet will ensure all front-end ("main") searches are for events only - which may or not may not be the desired behaviour, but you can of course target specific queries or simply set the post type to 'event' when you create your WP_Query object.
add_action( 'pre_get_posts', 'wpse172161_set_search_post_type' );
function wpse172161_set_search_post_type( $query ){
     if( !is_admin() && $query->is_main_query() ){
           $query->set( 'post_type', 'event' );
     }
}

Comment: `$query->is_main_query` property does not exist in the WP_Query object btw. At least not in the search query.
Comment: It's a class method: https://github.com/WordPress/WordPress/blob/4.0/wp-includes/query.php#L4525


php script to find synonyms

Question: Im writing a php script to compare the similarity of  2 strings.  This works pretty good at the moment, but what I would like to do is match words when one is a synonym of the first.
Any thoughts?
Answer: You might want to try looking for a thesaurus service that allows you to query the synonyms for a word and have it return an XML list of synonyms.
Here is something to look at: http://nbii-thesaurus.ornl.gov/thesaurus/
Comment: @Anthony: What do you mean by that?
Comment: I meant to say that I believe your idea is good, and went to add that using your idea is a good start.
Answer: I don't know if this would be helpful for you but time ago I have been working on a PHP (CodeIgniter) library for Google Search that gets related terms by using the ~ on searches.
Maybe you can digg on the source code codeigniter-googlesearch-api
Formally aren't synonymous but depending on the application that you have in mind it could be useful (for example for SEO purposes).
As a side note, if you put ~term in Google, then it will bold you the terms that are related. Try it with ~investment for example.

php script to find synonyms


Motor PWM Controllers Too Good to be True

Question: I am working on a project which involves driving 2 high power 60amp stall 12v motors from an arduino.  I had been browsing available drivers, and everything on the market seems to be quite expensive (examples: this, this).  However, I was browsing on Ebay and came across this generic board.   It seems to have the correct specs to control one of my motors.  Granted it doesn't have current sensing or anything else fancy like that, but does that really warrant an extra $150?  If there is something wrong with that board, could you recommend me a cheaper alternative to either of the examples above?  Thank you.
Comment: Hah! I was *just* looking at a HHO controller on eBay as you posted this...
Comment: @IgnacioVazquez-Abrams What is a HHO controller?
Comment: @W5VO: "HHO" is a colloquial name for [oxyhydrogen](http://en.wikipedia.org/wiki/Oxyhydrogen), specifically when used as a dopant for petroleum in ICEs. A "HHO controller" presumably controls (via PWM) the current used for hydrolysis in HHO generation. (I wasn't specifically *looking* for HHO controllers, I happened upon one when looking for voltmeter modules.)
Comment: You get what you pay for.
Answer: I'm not sure the one you found will be easy to interface with an Arduino as it is obviously controlled with a potentiometer.
If you want to go on the cheap road, you should have a look at ESC for RC models. Brushed motor versions are rare as everyone uses brushless motors now, but you can still find a few of them. They are controlled with a ~30Hz PWM which is easy to produce with your Arduino, it's just like controlling a servo: http://playground.arduino.cc/Learning/SingleServoExample
Comment: Interesting.  Out of curiosity, what would you consider to be the disadvantages to using either an esc or generic PWM vs a standard motor controller?
Comment: A standart motor controller like the one from Pololu will probably report error conditions (undervoltage, overcurrent, overheat etc...). An ESC for RC models will just stop in case of error.
Answer: They seem to have substantially different capabilities -  and US design and manufacture increases cost.
The Talon ($59) claims increased efficiency at stall - suggesting it may be energy converting to get stall current rather than just dropping excess V linearly - and is specifically robust and debris proof.
The Polulu ($200) includes a range of interfaces and mentions quadrature encodes, PID control and rather more.
The $14 'HHO' is pot controlled, has vast quantities of heatsunk TO220's (or larger?) suggesting linear control, and probably doesn't know its PID from its quadrature. It's probably effectively an electrically variable electronic resistor bank - it MAY do speed feedback using motor back emf or may be wholly open loop. It MAY do what you need but may well fail valiantly.
Depending on your task (which you have not described so we do not know what you NEED) the $14 may work. If there is a moderate chance the trying one and taking due care of your motor investment may be a good idea. May.
Answer: I am posting this answer as I have just realized the biggest disadvantage to cheap PWM controllers (and hobby ESCs): no reverse.  That makes these controllers impractical for many applications (including my own) which require multidirecional control.


How to make the D: folder look like the desktop folder? (Windows)

Question: The desktop allows me to arrange files/folders as I'd like on it, so I'm wondering if it's possible to allow the same thing for my D: folder/drive? Is this possible?
Comment: Remembering icon positions and the like is a unique feature of the desktop.  Other folders can remember all sorts of default properties (like sort,group, and the like).. but alas.. not icon positioning or individual order.  One trick I use (when I care) is to put 1_, 2_, etc etc in front of folder names that I want to be sorted when I can't keep the order through settings.
Answer: Long answer short: you cannot.
This used to be possible in early windows versions, but in recent versions of windows, the Explorer window just does not allow you to arrange files/folders at all. They are always sorted afterwards. This is also the case if you use explorer to navigate to your desktop folder. You can't drag the icons around there either.
Given that sort is always applied in explorer, if you want to sort your folders differently, rename them and add a number in front. Such as:

My stuff

Awesome Projects

The rest
Comment: At an MVP summiit in (I think) '08, the Shell team explained that saving arbitrary icon order/positon (as well as folder window position), for every file in every folder was a feature implemented when a "Power user" might have several hundred files. The registry value for my Deskop (ÌconLayouts`), which only has 25 items on it, is 2,312 bytes. As storage capacity and file counts increased by orders of magnitude, saving this data for every folder was seen a cause of registry bloat and slowed down response time, and was eliminated for those reasons.
Comment: There were too many complaints of people accidentally turning of sort, not getting their files back in order anymore.
Comment: Thank you for explaining that. I wonder why they got rid of it.
Answer: No. The Windows Desktop exists for the operating system as a whole and not for the individual drives.
You can only have one real Desktop (the one you see when you log on.
With Windows 10 you can have virtual Desktops but they are still a Windows desktop and do not extend to folders.
Sorry - desktop arrangements do not apply to folders in the way you are asking.
You can place files / folders anywhere on your Desktop.
Within Explorer, file and folder views are limited to the Windows Explorer folder options and cannot (safely) be re-arranged anywhere.


How can I produce a time series of bitcoin blockchain data?

Question: I want to fetch statistical data about the bitcoin network. Things things like wallet count, transaction count etc. Had a node running and the blockchain is on my disk. However parsing it seems to be not that trivial. I tried python-blockchain-parser however I get leveldb issues on all of my machines. I dont know the structure well and it seems like an easy thing to miss out data (segwit, lightning). Any tips?
Answer: If you are comfortable with SQL and are interested in running queries over the entire chain, there is a BigQuery database hosted by Google. You can find more information here: https://bitcoin.stackexchange.com/a/117171/139612
If you are more interested in the analysis of specific blocks or of transactions, bitcoin-cli provides a number of RPCs that can be used for fetching data, although this can be very slow when querying over large ranges.
In general, I'd recommend against parsing block files or leveldb files as those files are designed for efficient storage and easy use in the Bitcoin Core client and make no guarantees about being usable in other applications or providing a stable format.
Answer: In order to produce this graph

I used a blockchain parser to read block files that Bitcoin core had created. The blockchain parser created CSV data that I summarised using a second program and plotted using GNUPlot
A search for "Bitcoin blockchain parser" ought to find some examples. Perhaps one of them would be of use to you.
I wrote my own (see my profile)


SVN URL non-existent in that revision Error

Question: Im getting an Error that is in my Tourtouse SVN Repository...
The Error is "URL non-existent in revision"
I just reformatted my computer that contained all the source code.  On that machine is another harddrive that contains all my source code.  I didn't reformat that hard drive.
Now When I try to connect to that repository from another machine (laptop) I get this error when opening up the repository or trying to commit or even update.  I don't know much about SVN so I don't know how it works so I can fix this issue.  Any help would be appreciated.
Thanks.
Answer: Just had the wrong URL being used as my repository...


Where are the templates?

Question: I have a question where the seemingly simple solution seems to be eluding me. I also don't see it anywhere online.  When I create a site template with Sharepoint Online where are they stored? I need to delete one but I can't seem to locate where they are kept. If I cannot go directly to a URL and just "delete it", is there a way to do this programmatically with powershell?
Comment: how you create the template? development or Saving the site as template?
Comment: You don't work for MS do you? I don't want you to shut down or block that work-around. :)
Comment: I am not Msft employee and I have no power to shut down things in sharepoint...lol...which workaround u talking about....mainly if msft come to know a things, they called it un  supported
Comment: Ok good. Lol. They don't like it when you don't work for them but you come up with a workaround to what they disabled. :)

In Sharepoint designer go to > site options > highlight SaveSiteAsTemplateEnabled property > click modify > change "false" to "true" > click "apply" > click "ok".
Comment: U are talking about publishing template when there is no option for save as template, right? They know it but it is unsupported
Comment: not publishing template specifically. Any custom template.
Answer: If you created the site template using the Site settings > save as template options,
It will be in Solution Gallery which can be access by this:

Click Settings  SharePoint Online Public Website Settings button and
then click Site Settings.
In the Web Designer Galleries section, click Solutions.

Here is good article about it: Create and use site templates
Comment: I didn't use site settings > save as template. I used Sharepoint designer > save site as template. Would it still be in solutions?

Where are the templates?


Using Multi-Select Checkbox Visual Flow

Question: I have created a Visual Flow in Salesforce and I wish to use the option of a Multi-select Checkbox. I cannot seem to find a way to map these Multi-select checkbox choices to a record. I have tried mapping each choice to a checkbox and also each choice to a multi-select picklist value but I cannot seem to get it to map. Can someone help me with this?
Comment: The values get stored as a concatenated string, seperated by semicolons. You can get the values using formula's or an apex call. When using a dynamic lookup for multi choices, only the last checked value is stored (which, in fact, renders the whole dynamic lookup on multi choicelists useless! oh salesforce why).
Comment: Can you show an example of your fields on your Salesforce object please?
Answer: I have been able to create a record populated via a Multi-select Picklist.
This is my screen setup...

This is my flow..

I then mapped my Multi-Select Picklist to the Record Create task

When I ran the flow it resulted in my field displaying as follows on the new record...

Note that i did find the following statement (second bullet) in the documentation, section Multi-Select Choice Fields Overview, which seems to suggest if i read the record i cannot map the value to be displayed...

You can't populate multi-select picklists in flows with the
  picklist values of standard or multi-select picklist fields elsewhere in your organization.
Comment: Hi Andrew. Thanks for your reply. I can create and map multi-select picklists but I am having an issue creating Multi-select Checkboxes. Since there is no Multi-select Checkbox Field type for records in Salesforce, I cannot seem to match the multi-select checkbox in the flow to anything. As a way of resolving this for now I have just reverted back to using normal checkboxes and mapped them to checkbox fields on the record.
Comment: I'm sorry you did mention that, apologies i misread the question. I am though curious what Salesforce field type are you trying to map to a Multi-select Checkbox field type?
Comment: I have tried matching the Multi-select Checkbox type to the Checkbox field type and multi-select picklist field type.
Comment: Hmmmm my first thought is i'm not surprised this use case is not supported, but i sense i may still be missing a bigger picture, speaking of which did you see my request to see some more information on your fields and use case above?
Comment: There are over 100 fields for this Object so I do see why any of them would be relevant to the multi-select checkbox? I have decided to use original checkboxes in the Flow so I can map them directly to the checkbox on the object's fields. This workaround has proved to be far easier and effectively the exact same thing. Thank you for your help. Much appreciated.

Using Multi-Select Checkbox Visual Flow


ASP.Net: word creation/manipulation at client side

Question: I have a asp.net web app. On click of a button on a web page,I want to create a new MS word document on the client machine and show some data fetched from the server in it. Client can make changes into that document and save it on it's machine.
After that client can again upload the saved document in the server and we need to update the data on the server based on changes done by client. Here, the constraint is, Office suite is only installed on client machine. so we have to extract the data from word document only at client machine and send it to server in any form like xml. Also I am thinking to use content controls in word document. What are the possible ways to meet above requirement???
In a quick way I found that probably it is possible through silverlight 4 but that is in beta version. can I do it by Active x using c#?? Any other approach would also be highly appreciable.
Comment: "Office suite is only installed on client machine" limits the approaches
Comment: Yes but that is a condition we have to abide by...
Answer: This is not a free solution, but Aspose.Words has an object model for manipulating Word documents on the server side without Microsoft Office installed. Creating them on the server using Aspose would be easy. The uploading back and extracting content is also possible. Rather than trying to extract XML on the client side you could just have them upload the whole document back and use the Aspose object model to open it up and grab the relevant sections.
I have no commercial interest in Aspose -- just a happy customer.
Answer: This is definitely one of those times when I would just say... "no."  Getting anything to work in the way you describe would be difficult at best.  Would definitely require custom ActiveX in order to work at all.  But there are so many problems with the basic idea, I'd be surprised if this ever worked very well.  It would basically be one hack on top of another.
It sounds like ultimately what you want to do is share an MS Word document.  Isn't this what Microsoft Office Sharepoint Server is for?


Are adverbs as transition a bad thing?

Question: I am using prowritingaid to edit my writing and it keeps flagging all adverbs. They have a post related to it here.
Yet I feel like adverbs as transition such as finally, additionally can be useful to connect sentences and add fluidity.
Need some advice.
Comment: The prowritingaid article you linked seems to indicate that flagging all adverbs is *exactly* what it offers to do for you (among other things).  As I read it, this is meant to help you review your usage, not to indicate that all adverb usage is necessarily poor.
Comment: Adverbs are quite misunderstood — one should avoid overuse to prevent sounding fake and faux-fancy, but effective usage can improve prose profoundly. Case in point: James Joyce.
Answer: They don't have to be.
Compare adverbs to calories: you gorge on pie and chocolate, you become fat. However, not eating results in starvation and death. Every once in a while you need an adverb.
The problem here is confiding trust in a computer. Computers are rocks with lightning trapped inside and, while exceptionally good at math, make no distinction between good and bad foods. They'll slap the 2 kCal head of lettuce from your hand and shout 'No! Bad! It ends in -ly so it must secretly be chocolate cake!'
Wrest control back from your computer. A sentence reads better with an adverb? Then ignore the red Twizzler drawn under it.
Comment: "Computers are rocks with lightning trapped inside" - love it!
Comment: If only the computer could actually turn lettuce into chocolate cake ....
Answer: My understanding of the main objection to adverbs is that it dilutes the writing. Rather than saying "Jack ran very fast" one ought to write "Jack sprinted". Same idea, but the second version is punchier in that it takes less time to read. If you can find a stronger verb that can replace a weaker verb modified by an adverb, you should consider it. But your consideration should include notions about how the narrator typically expresses ideas, about how the sound of the language soothes or incites the reader, and about how the language sounds. It might be that "Jack ran very fast" becomes "Jack ran as if all the demons of hell were chasing him!" Not as punchy but maybe more effective in conveying the writer's ideas.
Comment: I completely understand this example and it makes sense. Now when using them as transition is the question.
Comment: This indeed seems to be the main point that the article linked from the question is raising.
Answer: Since you mention transition, are you using adverbs such as "meanwhile", "later", "afterward" and the like, to move to a new time, new location or new set of characters? If so, consider instead leaving a blank line and then dropping clues in the next paragraph as to where or when you've changed to, without your having to call out the change with an adverb.
If not, then please be more specific about what kind of adverbs you're using that are getting flagged.

Are adverbs as transition a bad thing?


How do I impress a senior developer?

Question: I'm a relatively new developer. I've been doing development for four years. I think I'm competent at what I'm doing for my level. I'm a fast learner of new technologies and code bases. I'm also good at following the coding standards. I'm assigned to work with a senior developer soon. He is very good at programming and he is also a big picture/architecture person (which I'm not). He sometimes challenges the existing architecture of the codebases; most of the time, he makes very good decisions for architecture and design. He is also very particular on how he wants something to be designed.  I want to have a good work relationship with him and make good impression. I will work hard and I'm confident that my work  will speak for itself. But how do I make good impression quickly? I'm not as experienced as him so I cannot articulate as well as him on the high level stuff.
Answer: Treat him as your mentor.  Listen carefully to his perspectives and politely ask questions – specifically including "dumb questions."  Show that you are seeking to find the answers yourself, that you are trying to pull your own weight, but that you realize that you need his wisdom and experience.  Be humble, though not subservient.
Almost everyone, at some point or another in their journey, had a mentor.  I have had several.
Comment: Maybe you could expand on what a "dumb question" is.  There are good and bad "dumb questions".  Anything you can Google is a "bad dumb question".  What is `bash` - bad question.  Why did we at  decide to use `bash` instead of `bourne` is maybe a good question.
Answer: What has impressed me about junior developers in the past

Ask well thought-out questions that you have attempted to answer yourself
Remember or write down the answers to the questions; don't ask the same question multiple times
Listen to the answer and ask questions if still confused, or if I didn't answer what you asking
Don't take abuse, but accept constructive criticism with an open mind
Do what you say you will do
Comment: I think that is pretty common in the developer world. It depends on the culture in your organization, but I do not think the lack of participation in meetings is a negative on its own. Make sure you look interested, stay off your phone, and be able to answer questions directly asked of you
Comment: @Sally People usually learn about your character quickly. Within a month everyone knows "Sally is shy, she doesn't like to speak up in meetings with a bunch of managers etc. But she will ask questions privately".
Comment: As a senior developer and sometimes mentor, I would not hold not speaking up in meetings against you, but I would encourage you to improve upon this slowly, as it can be important to participate actively (and be perceived to do so) in such meetings.
When asked for assessment, I would not judge developers on their meeting participation though, I would look at the code and other contributions, as well as their professionalism - the points above cover this well
Comment: Thank you so much for your response. It's nice to hear from other senior developers to know their perspectives. I'm a shy person. I ask good questions but I generally don't like to speak up in meetings with a bunch of managers, senior devs and customers.  But I like asking questions privately. Do you think that can give people the wrong impression that I don't pay attention or not good at what I'm doing?
Answer: Imho the best thing you can do is just play to your strengths, and in particular development-wise NOT try to do things a certain way just because you want to impress the Senior. It's a bad basis for good decisions. If I notice people implement over-complicated stuff that does not fit the problem well - perhaps just to show off - I'm not impressed, on the contrary. If people try to be in the center of everything, without having to say something that speaks against them,too. Try to suggest doing tasks that you are good at or that interest you (in that order).
This will both present your good sides in doing the tasks and also show that you can judge your own abilities on top. Especially at the beginning, don't take the most difficult task just to impress (unless you know you can likely do it, with perhaps minor help), first establish your base strengths, then go up for more difficult tasks that might need a bit more assistance.
The same holds with your behaviour: play your strengths first and work on improving your weaknesses later. If you are rather quiet, don't try to suddenly be the most talkative person (unless it comes totally natural when working with the new guy for some reason). If you are rather implementing stuff on your own in your quiet corner, don't try pair programming as the first thing etc. If you notice the senior prefers some ways to operate that aren't matching your way, try to slowly adapt if that works for you, otherwise discuss what you need to adopt and what he does not care about. Don't just assume.
Answer: First of all: do the things that you are asked to do, and try to do them well and in time.
If you don't understand a task: ask for clarification and don't just tart with whatever you thought you understood. The lost time by doing the wrong thing is much worse than somebody explaining your task to you a second time.
If you understood the task but don't know how to do it: try to find out a solution by googling or trying. BUT: don't use to much time for finding out "how". If you don't have a starting point after a quite short time then ask the senior how he would approach that task.
Also: don't try to reinvent the wheel. Ask the senior if there is a base for your task, if something similar has been done already that you can reuse.
There is nothing worse than giving someone a task to do and ask after half of the assigned time just to find out that he still didn't find out how to start.
If you discuss possible solutions beforehand then take his advise but don't be afraid to say if you think you have a better idea.
Don't go like: your idea X is stupid, it would be much more clever if we did Y, but say something along the line of: what do you think: could approach Y work as well for this?
If the senior criticises your work: take his advice and don't be offended. Don't become passive (aggresive).
As soon as the senior sees, that you do your job well and manage to complete the tasks he assigns, he well see how valuable you are.

How do I impress a senior developer?


JACOB throws EXCEPTION_ACCESS_VIOLATION

Question: We are getting EXCEPTION_ACCESS_VIOLATION error on our windows server, but we are not able replicate/reproduce this error.
<code>#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180012df1, pid=1604, tid=4232
#
# JRE version: 7.0_07-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.3-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [jacob-1.14.3-x64.dll+0x12df1]  Java_com_jacob_com_Variant_getVariantType+0x51
#
# Core dump written. Default location: c:\xxx\xxxx\xxxx\hs_err_pid1604.mdmp
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
</code>
We are using Java version 1.7, Windows server 2008 R2 Enterprise and Jacob-1.14.3. I am assuming that the error is because of Jacob-1.14.4.dll but not sure why its causing the issue. If I upgrade to latest Jacob-18M.jar will solve the issue? Can someone confirm?
Thanks.
Comment: Hi Crew, Any updates on my above query?
Answer: I had the same problem in my project and it was solved after some months investigating all of our environment, If anyone still needs it here is the link.
EXCEPTION_ACCESS_VIOLATION in Jacob dll using VM in Jenkins pipeline
There we have the description of all the  things we have tried.

JACOB throws EXCEPTION_ACCESS_VIOLATION


How should this be ruled?

Question: Little league baseball. No outs runners on 2nd and 3rd. Batter hits fly ball to outfield that is caught, runner from 3rd doesn't tag up and crosses home plate. Runner from 3rd heads into the dugout. Runner from 2nd tags up, advances to 3rd, then advances home safely due to an errant throw.
Should the runner on 3rd be out once they enter the dugout or does an appeal need to take place.
Also, is the runner on 2nd out for passing the runner on 3rd since they didn't legally advance?
Answer: Runner on 2nd is definitely not out - they get to score.  See for example this explanation in 5.09(b)(2) from the MLB rules:

This rule also covers the following and similar plays: Less than two out, score tied last of ninth inning, runner on first, batter hits a ball out of park for winning run, the runner on first passes second and thinking the home run automatically wins the game, cuts across diamond toward his bench as batter-runner circles bases. In this case, the base runner would be called out "for abandoning his effort to touch the next base" and batter-runner permitted to continue around bases to make his home run
valid. If there are two out, home run would not count. See Rule 5.09(d).

Not an identical situation, but not all that different in that a runner legally scores after a runner does something illegal; the first runner's breaking the rules doesn't invalidate the second runner or cause them to "pass" them.
As for the runner on 3rd - yes, this is an appeal play.  From 5.09(b)(5):

(5) He fails to retouch his base after a fair or foul ball is legally caught before he, or his base, is tagged by a fielder. He shall not be called out for failure to retouch his base after the first following pitch, or any play or attempted play. This is an appeal play;

So, the runner from 3rd is out, and the runner from 2nd scores legally, assuming the defense properly completes the appeal on the runner from 3rd.
Comment: I'd stress the appeal more. Basically, the runner is *safe* unless and until the appeal is made, because it's the *appeal* (not the failure to tag before scoring) that produces the out. The umpire will call the runner safe even if they know the runner did not tag, as opposed to signaling to everyone that they failed to tag by refusing to make a safe/out call immediately. (And they cannot call the runner out, because technically the runner can still turn around, tag, and rescore, defense allowing, before they heading to the dugout.)

How should this be ruled?


What are some useful physical information of a protein?

Question: Beside energy and heat, I don't know any useful physical information of a protein. Can you help me list some of it. Somethings like Fourier-transform infrared spectroscopy to provide protein structure aren't what I'm looking for.
Comment: What about the sequence and the 3D-structure? This is important information...
Comment: Please clarify what kind of information you are looking for.
Comment: Somethings like energy, heat, entropy, which are physical measurable things. The structure is a good point, I don't know what the sequence information are.
Comment: sounds like you mean 'typical means of monitoring the folding of a protein' or something like that?  such a question would work...
Comment: Something like that. I need some new conceptions to research deeper.
Answer: All the information about a protein, biochemical or functional is encoded in its structure, which are primary (Amino Acid (AA) sequence), secondary (alpha helix or beta pleated sheet), tertiary (overall 3D structure of a single peptide) and quaternary (overall 3D-structure of a protein composed of multiple peptides which are attached together through various different bonds) structures (http://en.wikipedia.org/wiki/Protein_structure).
Obviously, the key determinants for all these structures is the AA sequence of a protein, since that determines the biochemical property of a protein as well as its function (e.g. enzymatic residues and active sites, functional domains, motifs, whether it is post-translationally modified or not by phosphorylation and whether that causes its activation or inactivation through conformational changes or its interaction with other proteins etc).
Answer: I'll make a list, by wavelength then 'others'.  This is only the most common techniques list.  i'd be here all week if I tried to get all the applications.  Scientists are crafty and are always coming up with stuff.
Electro magnetic protein derived measurements:

NMR spectroscopy (radio) - can detect the structural variations in
the individual amino acids allowing a protein structure with the
dynamics of the peptide chain to be modeled.
IR spectroscopy - can
look at bond-bond vibrations.  Mostly used to observe for non-peptide
moities and cofactors of the protein like heme in hemoglobin for
instance.
RAMAN spectroscopy - also an IR spectroscopy, but which
can look for dynamic qualities of the interatomic vibrations.  Like
IR this is used with cofactors usually and not the protein, which
looks very much the same over most of a peptide.
UV/visible spectroscopy - on the low end, examine the behavior or concentration of chromophores associated with the protein.  used for kinetics - study of enzymes in the act of catalysis.  On the high end can also be used for things like watching photon-energy transduction in photosynthetic systems and things like this. The peptide itself has no Visible absorption, but the colored molecules are often used as a probe to watch the peptide in action - like folding.
FRET is a technique that can measure how far apart two colored labels are - two separate points of a protein are labelled and a distance measurement obtained.
UV circular dichroism.  the aromatic side chains of Phe, Trp, Tyr, His etc absorb in the UV and are directly observed to follow folding some times.  Circular dichroism looks for differences in the absorption of right and left circularly polarized light and can show secondary structure.
X-ray.  Scattering of proteins in solution can measure the so called 'radius of gyration' which profiles the overall shape of the protein.  X-ray scattering off of 2D and 3D crystals can reveal the molecular protein structure.

Others:

Calorimetry.  By tracking the heat capacity/heat given off/taken in by a protein, its folding state, binding and other structural characteristics of a protein sample can be measured.
Mass Spectroscopy - generally this just measures whether a protein is present, by fragmenting it and measuring the mass of the fragments.  useful for mixtures of many proteins (like a living cell).
Peptide sequencing - like Mass Spec, but often used when there is just one protein in a pure sample.

There's lots more - just depends on where you want to cut off the list.  Hopefully this is a good start.


Standardizing inputs for CART

Question: I know I do not need to standardize the predictor variables before applying CART but would there be any adverse effects to doing it anyway? I'm comparing CART to a linear regression where I did standardize the inputs and for the sake of consistency I'd like to do the same for CART, but could it be detrimental to my results? I'm not really sure how CART goes about finding the splitting point at each node (I can't find a copy of the original paper and most of what I've read just skips over that detail) but I would think that standardizing the inputs would actually help speed up that process. Does anyone have any intuition in this regard?
Comment: Trees are invariant to any monotonic tranformation of predictors, including standardisation. See this very closely related thread http://stats.stackexchange.com/questions/51523/log-transformation-in-cart-analysis/51534#51534
Comment: So long as you are doing "intercept only" regressions at each terminal node, the difference can only be in numerical calculations, or possibly in some of the arbitrary implementation specific choices - such as which variable to try first.  Although, it could be important to standardise "within replicates" if you are using cross validation or bootstrapping with CART.
Answer: My answer at this stage is based on my intuitive understanding of how CART works, so take it face value.
Standardization does not add or subtract information contained in a given variable and does not distort its relationship to a target variable. For example, if you had a variable "age" which was a predictor for "purchase car". By changing age to (age - mean / sd ) is not going to change its relationship to purchase car, it merely maps it to a new space.
When CART looks for the best splits, it going to use entropy or gini to calculate information gain, this is not dependent on the scale of your predictor variable, rather on the resultant purity of the variable "purchase car".
So long story cut short, standardization should have no influence on your final solution. To verify this, simply run your model twice. Once on the standardized version of data and once with the original. If all goes well, you should see the same variables and order of selection, just different cut off points.
Edit: I've appended two images for your reference for a tree with and without standardized inputs.
Comment: But the different scales might affect the route the optimization algorithm takes to find the splits... it could affect convergence which could then lead to different trees. The problem with your test is that even without standardizing, you don't always get the same tree when running twice on the same data (at least not in the Matlab implementation) so you'd actually have to run it many times on each and do some stats tests to check for equivalence.
Comment: For classification it really does not matter. For numerical variable the only important thing is the order which is preserved after standardization.
For regression I managed to demonstrate something, but not enough. Note that the question is about regression (since it is compared with linear regression), and in the regression setup info gain or other impurity functions are not used.
Comment: @Dan As far as I see it, the problem should be considered without additional random induced (which might be the case for mathlab, is for sure in R) in order to optimize computation time.
Comment: @ArunJose Your tree uses a single predictor variable? It looks like this. I managed to show that after scaling the best split for the same variable, scaled and unscaled is the same. The question is how scaling affects the interactions between variables. I still consider that not a proof. And again, impurity functions like gini and brothers are not used in regression trees.
Comment: I just re-ran this with more than one predictor variable and had same results as well. Will append them if you need.
Comment: And to make doubly sure, I did all sorts of combinations. 1) two raw variables 2) one standardized, the other raw 3) both standardized. All yielded identical trees.
Answer: I will try to give a formal proof here to clarify things.
Step 1
We denote with $x = {x_1, x_2, .., x_n}$ a vector, and with $var(x)=\frac{1}{n}\sum_{i=1}^{n}(x_i-\frac{1}{n}\sum_{j=1}^{n}x_j)^2$ the biased sample variance.
We denote with $y = \frac{x-m}{sd}$ the scaled version.
We work out a formula for $var(y)$ in terms of $var(x),m,sd$.
$$var(y)=\frac{1}{n}\sum_{i=1}^{n}(y_i-\frac{1}{n}\sum_{j=1}^{n}y_j)^2
= \frac{1}{n}\sum_{i=1}^{n}(\frac{x_i-m}{sd}-\frac{1}{n}\sum_{j=1}^{n}\frac{x_j-m}{sd})^2
$$
$$= \frac{1}{n sd^2}\sum_{i=1}^{n}(x_i-m-\frac{1}{n}\sum_{j=1}^{n}(x_j-m))^2$$
$$
= \frac{1}{n sd^2}\sum_{i=1}^{n}(x_i-m-\frac{1}{n}\sum_{j=1}^{n}x_j+\frac{1}{n}\sum_{j=1}^{n}m)^2
$$
$$
= \frac{1}{n sd^2}\sum_{i=1}^{n}(x_i-m-\frac{1}{n}\sum_{j=1}^{n}x_j+m)^2
= \frac{1}{n sd^2}\sum_{i=1}^{n}(x_i-\frac{1}{n}\sum_{j=1}^{n}x_j)^2
$$
$$
= \frac{1}{sd^2}var(x)
$$
So we know that the variance of the scaled version is proportional with the variance of the unscaled version.
$$var(y)=\frac{1}{sd^2}var(x)$$
Step 2
For CART regression we know that the split test is evaluated with a formula like $var(x_{left})+var(x_{right})$, where $x_{left}$ consists of all observation values of the target variable which are less than or equal some threshold value on the test variable.
In order to show that various tests preserves the same order after scaling I think there is enough to say something like:
For any given two binary splits of the values of the target variables, if the evaluation function for the first split is less than the evaluation function for the second split on the unscaled variable implies that the evaluation function for the first split is less than evaluation function for the second split on scaled variable.
In plain English comparison between splits is the same for scaled and unscaled variables.
Demonstration is trivial since the evaluation function is $split(x_{left},x_{x_right})=var(x_{left})+var(x_{right})$, and we know that variance for unscaled version is proportional with variance for scaled version and this property is preserved on addition.
Final comments
Based on intuition, I agreed with @ArunJose from the begining. However, I wanted a solid proof. So, no offense, @ArunJose, I just wanted to be sure.
Comment: No offense taken at any point! A formal clarification helps me too understand what I "think I know".

Standardizing inputs for CART


How are the horizontal maps in the push out square defined?

Question: Let A be an Eilenberg-Zilber category and $X\subset Y$ be presheaves over A. For any non-negative integer n, there is a canonical push out square $\require{AMScd}$
\begin{CD}
\sqcup_{y\in \sum}\partial h_{a} @>{}>> X \cup Sk_{n-1}(Y)\\
@VVV @VVV\\
\sqcup_{y\in \sum} h_{a} @>{}>> X \cup Sk_{n}(Y)
\end{CD}
where $\sum$ denotes the set of non-degenerate sections of $Y$ over $a$ that do not belong to $X$, and such that d($a$) = n. What are the horizontal morphisms in the above square? How are they defined?
Answer: $\newcommand{\sk}{\operatorname{sk}}\newcommand{\set}{\mathsf{Set}}\newcommand{\op}{{^{\mathsf{op}}}}\newcommand{\nd}{^{\mathsf{nd}}}$I only know about simplicial sets, but hopefully the answer for that can help you in general. That is, I work in $A=[\Delta\op,\set]$ where $\Delta$ is the simplicial category. For any $n\in\Bbb N_0$ let $\Delta^n$ and $\partial\Delta^n$ be the $n$th representable simplicial set and its boundary, respectively.
In this instance we set, for all $n\in\Bbb N_0$, $\Sigma_n:=Y_n\nd\setminus X_n\nd$ and we want a pushout: $$\begin{align}&\bigsqcup_{\sigma\in\Sigma_n}\partial\Delta^n\quad\quad\overset{f}{\longrightarrow}&X\cup\sk_{n-1}Y\\&\,\,\,\iota\downarrow&\downarrow\iota\,\,\,\,\,\,\,\,\,\,\\&\bigsqcup_{\sigma\in\Sigma_n}\Delta^n\quad\quad\overset{g}{\longrightarrow}&X\cup\sk_nY\end{align}$$
(that formats nicely on my computer but may break on other devices, let me know if there is a problem)
This is a case of the maps being "obvious" and the reader has to struggle past the author's terseness. By the Yoneda lemma, every $\sigma\in\Sigma_n$ yields some $\overline{\sigma}:\Delta^n\to Y$, and this restricts to a map $\partial\Delta^n\to\sk_{n-1}Y$ and we get a map into $X\cup\sk_{n-1}Y$ in this way. $f$ is simply what you get when you apply the universal property of coproducts to this collection of arrows $\partial\Delta^n\to\sk_{n-1}Y$.
$g$ is defined very similarly, for each $\overline{\sigma}:\Delta^n\to Y$ corestricts to some $\overline{\sigma}:\Delta^n\to\sk_n Y\hookrightarrow X\cup\sk_n Y$, and these arrows assemble to an arrow $g$ out of the coproduct. Verifying the pushout is indeed a pushout was not as super obvious to me as my own textbooks thought it was.


Where is my mysql log on OS X?

Question: I checked /var/log and /usr/local/mysql and i can't seem to find the log.  I am trying to troubleshoot an error establishing a database connection with a php function.
Answer: As Chealion mentioned, there are several ways that your mysql could have been installed. Each of which will place your data dir and/or logs in different locations. The following command will give you (and us) a good indication of where to look.
ps auxww|grep [m]ysqld

# Putting brackets around the first char is a `grep`+`ps` trick
# to keep it from matching its own process.
# Note: For zsh compatibility put quotes around the grep regex

Can you post the result of that command here please? Mine looks like this:
_mysql     101   0.0  0.3   112104  13268   ??  S    12:30AM   0:13.20 /opt/local/libexec/mysqld --basedir=/opt/local --datadir=/opt/local/var/db/mysql --user=mysql --pid-file=/opt/local/var/db/mysql/rbronosky-mbp.pid
root        76   0.0  0.0   600172    688   ??  S    12:30AM   0:00.02 /bin/sh /opt/local/lib/mysql/bin/mysqld_safe --datadir=/opt/local/var/db/mysql --pid-file=/opt/local/var/db/mysql/rbronosky-mbp.pid

From that you can see that my datadir is /opt/local/var/db/mysql (because I installed via MacPorts). Let's take this lesson a bit further...
From the first line you can see the my daemon is /opt/local/libexec/mysqld. The mysqld can be called with --verbose --help to get a list of all command line options (and here is the important/valuable part!) followed by the values that would be used if you were launching mysqld instead of just checking the help output. The values are the result of your compile time configuration, my.cnf file, and any command line options. I can exploit this feature to find out EXACTLY where my log files are, like so:
/opt/local/libexec/mysqld --verbose --help|grep '^log'

Mine looks like this:
log                               /tmp/mysql.log
log-bin                           /tmp/mysql-bin
log-bin-index                     (No default value)
log-bin-trust-function-creators   FALSE
log-bin-trust-routine-creators    FALSE
log-error                         /tmp/mysql.error.log
log-isam                          myisam.log
log-queries-not-using-indexes     FALSE
log-short-format                  FALSE
log-slave-updates                 FALSE
log-slow-admin-statements         FALSE
log-slow-queries                  (No default value)
log-tc                            tc.log
log-tc-size                       24576
log-update                        (No default value)
log-warnings                      1

LO AND BEHOLD! all of the advice in the world was not going to help me because my log file is kept in a completely non-standard location! I keep mine in /tmp/ because on my laptop, I don't care (actually I prefer) to loose all of my logs on reboot.
Let's put it all together and make you a oneliner:
$(ps auxww|sed -n '/sed -n/d;/mysqld /{s/.* \([^ ]*mysqld\) .*/\1/;p;}') --verbose --help|grep '^log'

Execute that one command and you will get a list of all of the logs for your running instance of mysql.
Enjoy!
This Bash-Fu brought to you for free by my commitment to all things Open Source.
Comment: `mysqladmin variables` is now the preferred command for getting the current value instead of directly using `mysqld`
Comment: Today I got a down vote with no comments. I maintain all my answers. Even the ones that are 10 years old. You're not helping anyone by down voting. Leave a comment!
Comment: upvoted for all the efforts and the oneliner command
Comment: @jm3 care to elaborate? I no longer have access to MacOS.
Comment: @JohnCummings, Source?
Answer: There are 3 types of MySQL/MariaDB logs:

log_error for the error message log;
general_log_file for the general query log file (if enabled by general_log);
slow_query_log_file for the slow query log file (if enabled by slow_query_log);

Check the settings and location of above logs by this shell command:
mysql -se "SHOW VARIABLES" | grep -e log_error -e general_log -e slow_query_log

By default the logs are stored in your data dir, so check location by this shell command:
mysql -se "SELECT @@datadir"

To view your error log, you can run:
sudo tail -f $(mysql -Nse "SELECT @@log_error")

If you've general log enabled, to view it, run:
sudo tail -f $(mysql -Nse "SELECT CONCAT(@@datadir, @@general_log_file)")

Answer: Another way to find this information is to use lsof.

Use Activity Monitor to find the PID of mysql, or use ps -ef | grep mysqld to find it.
sudo lsof -p PID_OF_MYSQLD and see which files MySQL has open.
Comment: this is the only method that worked for me.   Mysql totally ignores what is in my 'my.cnf' files.
Answer: Took myself a while to find this... try this location:'
sudo vi /usr/local/mysql/data/YOUR-USERNAME.local.err

Comment: Mine was in `/usr/local/var/mysql/.local.err`
Answer:
By default, all log files are created in the mysqld data directory.

Source: MySQL Documentation
You can use mysqlbinlog to read the binary log files in /usr/local/mysql/data/ (in my installation not all were binary). Some errors are simply directed to stderr so you may want to check /var/log/system.log as well.
Comment: i don't have a data directory in the mysql dir.  i have looked all over the /usr/local/mysql/ directory and can't find the log.  there is no way to view the mysql configuration? like a phpinfo()
Comment: How did you install MySQL? The pre-installed MySQL with Mac OS X Server, MacPorts, or the official MySQL package?
Answer: The folder holding that log may not be accessible to you without using sudo:
sudo ls -l "/usr/local/mysql-5.0.51a-osx10.5-x86"
[..]
drwxr-x---   4 _mysql  wheel    136 Jul 10 23:06 data

If you happen to find a large log file and when you're using Time Machine, you may want to read What is Time Machine doing? on Server Fault.
Comment: i have no data dir in /usr/local/mysql
Answer: By default, all log files are created in the mysqld data directory.  Unfortunately, many people don't put their log files (and programs) in their typical locations.  I'm one of them!
I went through this routine myself with MySQL until I tried out Navicat for MySQL.  Later I upgraded to Navicat Premium.  Both have a Monitoring tool that contains a tab with all of the server variables in one comprehensive list.  Here's a screenshot with the log_error server variable:
log_error server variable in Navicat Server Monitoring Tool

You can also set the variables right there in the list.
Cheers!
Answer:
Open System Preferences

enter image description here

Select MySQL -> Configuration

Your Path to Error Log should be visible:
enter image description here
Answer: Try to locate your mysql (or mariadb) log folder by this command:
locate local.err

Answer: The approved answer from Bruno didn't work for me on MacOS Monterey, and in any case, it won't help you if your problem is that there is no mysqld process because it failed during startup.
However, following some of the others here enabled me to find the error log:
$ ls -l /usr/local/mysql
lrwxr-xr-x  1 root  wheel  26 18 Jul 13:39 /usr/local/mysql -> mysql-8.0.29-macos12-arm64
$ sudo ls -l /usr/local/mysql-8.0.29-macos12-arm64/data|grep err
-rw-r-----    1 _mysql  _mysql        3308 18 Jul 15:01 mysqld.local.err

Answer: To avoid difficulties in locating the MySQL log on OS X, I use dbForge Studio for MySQL.
You can easily find out its location by checking the value of the log_error system variable:
log_error=/var/log/mysql/error.log
screenshot
Answer: /Library/Logs/MySQL.log
Comment: i see other logs in there, but not mysql
Comment: What version of Mac OS X Server is this? In general, you'll want to look in /var/log/ & /Library/Logs/ under Mac OS X Server.

More specific to this issue, watch /var/log/system.log, there may be something of use in /var/mysql (like the .err log files), but I (on Leopard Server's default config) also have the aforementioned /Library/Logs/MySQL.log.

Are you trying to connect via the socket or a network connection? If the latter, did you "Enable network connections" in Server Admin (on Leopard; In Tiger it was a separate app in /Applications/Utilities)?

Where is my mysql log on OS X?


What are the logical 0 & 1 states for the 17 qubit (9 data qubit) surface code?

Question: What are the logical  1 and logical 0  states for the 17 qubit (9 data qubit )  surface code given stabilixzers below ?
I have read there is an algorithm that calculates the logical 0 and 1 states given the stabilizers . Any more info on this ?
Answer: The logical $|0\rangle_L$-state is created by initialising all data qubits in the $|0\rangle$-state, running all stabiliser circuits, and measuring all 8 stabilisers. You will end up in a random state, of which there are exponentially many, that respects the symmetries of the stabilisers. The $Z$-stabilisers measurement outcomes should all read 0, while the $X$-stabilisers all have a 50-50 probability of being measured as either 0 or 1.
The logical $|1\rangle_L$-state is created by applying the logical $X_L$ operator to the logical $|0\rangle_L$-state, in this case: $|1\rangle_L=X_L|0\rangle_L =X_2X_4X_6|0\rangle_L$. Note that initialising all data qubits in the $|1\rangle$-state and running the stabiliser circuits does NOT guarantee that you end up in the logical $|1\rangle_L$-state, for general stabiliser codes! In this case it does, but it's coincidental.
You should try this by hand, but you can show that the family of states corresponding to $|0\rangle_L$, when measured, will always give you a measurement outcome with an odd number of 0s, while measuring the $|1\rangle_L$-state will always give you an odd number of 1s. That is how you distinguish them in experiment.


how to use a package button in visual force page standard controller

Question: Hi have a custom button named Manage_Activities in Account, I want to use it in Account detail VF page, where I have written the page using standard controller.
Can I use command button functionality? If so, how to use the action function here.
The package is has a URL for the button: /apex/Aspiro__ActivityManager?id={!Account.Id}
Please help, how do I achieve the above functionality?
Answer: You'll need to use an apex:commandButton, example:
<apex:commandButton onclick="window.open('/apex/Aspiro__ActivityManager?id={!AccountId}','Aspiro Activity Manager','_blank');"/>

Comment: Of you can use URLFOR: {!URLFOR($Action.Account.~~API NAME OF BUTTON~~, account.id)}


Can my cars in my game look like real cars?

Question: We are making a game filled with thousands of cars. We were wondering if we need a licence to use body designs of lets say a Lamborghini, Ferrari, Impala. etc. We do not want to pay money to use the designs in our game, of course we are going to make our own car brands though. Can we use a similar body design??
Answer: Technically, the design is owned by the company as well. Now, depending on how realistic the game is or how many details you can see about the care, it might not matter at all.
What is important is not to use any distinctive symbols that appear on the car, or any actual names. There are many games that make cars that only look like the original ones, but give them different qualities (like, top speed, sign, name) so that they won't infringe any copyrights or trademarks.
Here is also a nice article on this subject: http://www.giantbomb.com/fictional-car-brands/3015-5156/
Answer: One of the best seperators between real cars and toy cars, is in my experience the shaders.
I've spent quite some time with BMW, where we needed to hit the exact glossyness, reflection and feeling of one of their chrome textures.
Without it, the car looked like a small plastic toy, but once it got on, the whole imagry changed, and the car turned into a "believable" vehicle.
Also, use of camera is important here as well. Notice in both car games and especially car ads, how they portray the car to make it look big and robust. In reality, cars aren't that impressive in size, but they always manage to make that feel to it.
And last, but not least, make sure it FEELS like a car. The audio, the steering, the way it moves in place when you hit the brakes. The feel of an object is the final touch in making it feel believable.


How can I remove system apps on my amazon fire 7 9th gen tablet using adb commands?

Question: I'm tired of bloatware on my amazon fire 7 tablet (9th gen)
Comment: https://forum.xda-developers.com/showthread.php?t=3922213
Answer: 1. Find out the package names
In order to uninstall the apps, you need their package names. Within an adb shell, execute:
pm list packages

Take note of all the package names that you want to uninstall. (PLEASE be careful. DO a backup first. Many if not all sources say it's oh so easy to re-install apps because you don't really fully delete them and only uninstall them for the current user but I did have issues with re-installing it on some devices in the past! Also removing crucial system applications can cause bootloops.)
2. Uninstall the package
pm uninstall -k --user 0 PACKAGE

Replace PACKAGE with the name of the package (e.g. com.confetti.app).
-k is to keep the data and cache directories around after package removal, this might be neccessary without root. It worked without it on an LG device for me in the past though.
--user 0 uninstalls the app just for the current user, so basically the app is still there, but since uninstalled for the main user, it won't bother you in any kind of way. Without root or RW access to the system partition, this is your best bet.
Done.

Alternative method (requires a recovery with RW access to the /system partition):
On some devices you can use a custom recovery to do this, slightly more efficiently, aswell. You won't need root within the phone (e.g. no superuser app.) but you will need a custom recovery and the ability to mount the /system partition as RW. Then you can use this, within an adb shell in recovery:
mount /system
ls /system/app

This will list your system apps. Take note of what you want to delete. For example if you want to delete confetti.apk, run this command:
rm /system/app/confetti.apk

Do this command for every app you want to remove, then restart your device.

In any case: BACKUP FIRST


How to change the demo OS in Sony xperia tablet z

Question: I have bought a sony xperia tablet z yesterday.. the showroom dint have the stock right now, so he sold me the demo piece in the display.. it is working fine, so i took it.. but after using it i understand that..it is running some kind of demo settings.. a demo video is being palyed for every 20 minutes.. if i re arrange any icons and go to another screen.. when i came back.. the icons are automatically restored to defaults..similar with volume settings.. how to remove those demo settings.. make it work like usual tablet.. thank you
Answer: Since you don't have a dialer app in the tablet, Ali Kabiri's answer can't be directly used. But there's a way to get into a mode where you can enter these "service codes". See this blog post for images.

Open the Contacts app
Exit the initial setup if it pops up
Go to Menu -> Settings
Long-press the blank space in the bottom of the screen, in the middle (see images in link)
A button called "Enter service code" should appear
Tap the button to get a "dialer"
Enter the code *#*#73556673#*#*
Demo mode should now be deactivated!
Answer: You can dial *#*#sellmore#*#* or *#*#73556673#*#* and you will not see the demo mode anymore,
but a normal retail phone doesn't have demo mode activated...
and you have to consider that demo-activated phones doesn't have warranty.
Edit:
as Onik said,
if your tablet doesn't have dialer application installed,So you have to access the service menu for inserting service commands, so you can do the following as described in the link: Xperia Tablet Z: How to access the service menu
Comment: The tablet doesn't have a dialer, so the code can't be entered normally.
Answer: Had no luck with the ##sellmore## solution. Downloaded towelroot (search Google)and titanium backup (Google store) You have to enable unknown sources in the security settings to install towelroot. Also in developer options there's a toggle upper right to enable that. In that screen enable usb debugging. Install towelroot version 3 and run it. Then install titanium backup and wipe data and uninstall the "retail demo" program. You'll never have to see that dude looking at how thin the tablet is again...or readjust your brightness.


Image Maps with Flash/Flex & jQuery

Question: Is there anyway to create an image map in Flash/Flex, and have it as a scriptable element in the DOM through jQuery?
I currently have a standard HTML image map that, when a certain selection is clicked, checks a checkbox on a form on the same page (via javascript).  I'd like to replace it with something more visually appealing, so I thought that Flash/Flex & jQuery might be a neat way to go, but I don't know if Flex can talk to jQuery very easily.
As a related question, if I have form elements in a Flex component (like the selected map areas), and I post the form using an HTML component on the same page, will the values of the Flex fields post alongside the HTML fields?
(Note: I'm aware of CSS Image sprites, and have concluded that it won't work for my project; too many irregular shapes too close together, and I'd be sacrificing too much accuracy if I went that route.)
Answer: Javascript and Flash plays along nicely.  Check the ExternalInterface class definition in the API.  With that, it should be fairly easy to invoke Flash routines from Javascript, and vice versa.
It shouldn't be too difficult either to create a click map in Flash.  You can create a sprite for each clickable area: it is easy to draw rectangular, circular, and polygon shapes in flash.
As for the form related question: no, posting an HTML form will not post the form in your Flash app.  That being said, there is no reason why you couldn't use the mentioned ExternalInterface and javascript to copy the form fields from Flash into hidden HTML form elements before submitting the form.
HTH
Comment: Thanks for the info; I figured this must be possible. Shortly I posted the question I stumbled upon this tutorial, for anyone interested: http://www.viget.com/inspire/bi-directional-actionscript-javascript-communication

Image Maps with Flash/Flex & jQuery


Photoshop: Channel use cases?

Question: I understand channel just store color information for an image. But in the real world, what are the actual use cases?
Comment: Not an answer: Photoshop wouldn't be an industry leading tool without them. Many discreet and powerful Photoshop features are only used by a small (but far from insignificant) market.
Answer:
Keying. Channels can be used as a starting point for very fast and very accurate selections.
Storing selections. Storing a selection allows you to do filters and math operations on it.
Storing color channels for spot colors. In other words you want to have that golden color on your print or you want varnish on specified locations or just orange.
Un-premultiplying color.
Viewing raw channel info.
Comment: Do you have a link to elaborate on #2?
Comment: Unfortunately I'm not at my Photoshop now, but if I recall correctly, you can make a selection (marquee, magic wand, quick mask, etc), then right click it, and choose "save selection".  This will save the selection as a new channel, which you can then Ctrl+Click on the thumbnail of to recall.
Comment: @AdamBarnes your right, but you can also use the **Select->Save selection...** and **Select -> load selection...** menu items. That does the same thing.
Comment: @LateralTerminal  When you have one channel active (others hidden) then all menu items in **Image -> adjustments** and **Filter** menu affect that channel only! This only works well if you have a normal layer active and most of the stuff you dont want on that layer hidden though. BUt yes its possible to blur only the blue channel.
Comment: @joojaa I'm sorry I specifically meant math operations. I wasn't sure what you were referring to with that.
Comment: @LateralTerminal **image -> calculations** usefull for all kinds of stuff such as haze reomoval
Comment: @LateralTerminal Such as implementing [this pdf paper](https://www.robots.ox.ac.uk/~vgg/rg/papers/hazeremoval.pdf) without writing a single line of code.
Comment: @joojaa you never stop surprising me with useful knowledge. I gotta give you an upvote
Answer: It's extremely useful for the press industry.
Color separation is important.
It's the only way you can clean up crappy non-vector art for the printing press.
For example, prepress has to use Photoshop channels to bring specific colors up to a certain % in order to get enough dot gain for the image to look clean.

To reproduce color and continuous-tone images, printers usually
separate artwork into four plates (called process colors)—one plate
for each of the cyan, magenta, yellow, and black portions of the
image. You can also include custom inks (called spot colors). In this
case, a separate plate is created for each spot color. When inked with
the appropriate color and printed in register with one another, these
colors combine to reproduce the original artwork. https://helpx.adobe.com/illustrator/using/printing-color-separations.html

That quote is for Illustrator but the same concept applies to Photoshop when dealing with the press industry. You won't always have vector art that has easy color manipulation
Comment: Hey, sorry to bother, but how does that help clean up "crappy non-vector art"?  I understand it's the method of separation that the physical printer can act upon, but nothing is mentioned about vector art or cleaning up, there.
Comment: @AdamBarnes For example, prepress has to use Photoshop channels to bring up specific colors up to a certain % in order to get enough dot gain for the image to look clean. If colors are below a certain % it gets nasty.
Comment: @AdamBarnes Alright. Another reason is you may want to remove a specific color from printing in certain areas of your print.
Comment: @AdamBarnes Almost all press work is done in vector art. Manipulating color is easy in Illustrator which is why the preferred format is always vector.  Of course some parts of the design may not be vector. The only way to clean up non-vector art is in Photoshop.  Photoshop is raster based image editor. Illustrator is a vector based image editor.
Comment: My apologies; I understand the difference between photoshop and illustrator, vector and raster, I just don't understand how splitting a raster image into channels will help vector industries "clean it up".  :(
Comment: Aah I see.  That's interesting thank you.  Could you add that to your answer?
Answer: Channels don't only store color.
They can store transparency (alpha) as well. In fact every single layer mask in Photoshop creates an alpha channel.
While alpha channels may not be what one immediately thinks about when thinking of "channels", rest assured there would be no such thing as transparency in Photoshop without channels.
I start almost all extractions with a selection based upon a color channel. Convert it to an alpha channel and refine.
Example: How to remove white background in Photoshop
Answer: When taking pictures with an infrared filter in front of the sensor, the results often appear pink and unpleasing.
Here's an example of what a picture could look like straight-out-of-camera:

After white balance adjustments, clouds are white again but the sky still looks weird:

By switching the red and blue channels, the sky becomes blue again:

St Lawrence, Stratford-sub-Castle, in infrared..
Note that the first picture isn't the original one. I didn't have access to the RAW file, so I applied the described process in reverse to show the steps.
Here's a youtube video describing this process : "Color Infrared Channel Swap in Photoshop". The swap is done with Channel Mixer but could also be done by copy-pasting the Red and Blue channels.
David Keochkerian is a photographer who took many great IR pictures (example).
His workflow is described here and here. Red/Blue channel swap is mentioned in both.
Comment: @usr2564301: Well spotted. I didn't have access to a RAW image taken with the infrared-blocking filter removed, so I just modified this [picture](https://commons.wikimedia.org/wiki/File:St_Lawrence_infrared.jpg) to show what it could look like. With a completely grayscale image, applying this process would render everything blue, including the trees. When removing the IR-filter in front of the sensor, the 3 channels are very different to one another, and the red one gets the biggest part of IR. With a cheap IR passing filter, only the red channel gets any light at all.
Comment: Interesting practical effects! I wasn't expecting that.
Comment: I'm not totally convinced. Would it not work quite the same way with an originally grayscale image? Is the infrared a one-channel or a two-channel image?
Comment: @usr2564301: Updated with examples.

Photoshop: Channel use cases?


comparing predictive model with hold out set

Question: In Rapid Miner, I  created a predictive model  (SVM) with Kernel type = polynomial, c= 10, and obtained 80.77% accuracy using cross validation. When compared to hold out set my accuracy on the test set was: 71.54472%. That is 9.23% difference.  My questions are
1) Is my SVM model overfit?
2) I created other models like k-NN, decision trees, Naive bayes etc but they all gave accuracy of less than 70%. Will the difference against the hold out set  be less than 9.23% ?
Comment: How did you choose the polynomial and the regularisation parameter?
Comment: @DikranMarsupial I tried all of the kernels with c=10 and polynomial kernel is the only one which gave accuracy more than 70%.
Comment: do you mean cross-validation accuracy or test accuracy?
Comment: It is cross validation accuracy.
Answer: This question  cannot be answered without knowing the test sample size of the holdout set and the number of samples in the cross validation, because they heavily influence the random uncertainty of both hold out estimate and cross validation estimate.
Also, did you perform the cross validation independently of the modeling (i.e. any data-driven optimization (data pre-processing, choice of c, choice of kernel)?

Edit: using the detail information provided in the comment.
Terminology I use:

Overfitting is caused by (some reason).
Optimistic bias of cross validation results is a symptom of overfitting.

Considering the sample sizes:

In order to judge whether the cross validation results are accidentally better (random error) than the hold out set or whether this is systematic (optimistic bias; symptom of overfitting) we need to consider random uncertainty due to finite test sample size.
p.cv <- 0.8077
p.ho <- 0.7154472

n.cv <- 4545
n.ho <- 1968

Now, calculate 95% confidence intervals for the observed proportions:
require("binom")
binom.wilson(round(p.cv * n.cv), n.cv) # pick your method of choice

##   method    x    n   mean lower  upper
## 1 wilson 3671 4545 0.8077 0.796 0.8189

binom.wilson(round(p.ho * n.ho), n.ho)

##   method    x    n   mean  lower  upper
## 1 wilson 1408 1968 0.7154 0.6951 0.7349

They are well apart, so the cross validation is optimistically biased.
By the way: this should also tell you how to sensibly round the reported numbers.
We could have directly tested for equal proportions:
prop.test(round(c(p.cv * n.cv, p.ho * n.ho)), c(n.cv, n.ho), alternative = "greater")

##
##  2-sample test for equality of proportions with continuity
##  correction
##
## data:  round(c(p.cv * n.cv, p.ho * n.ho)) out of c(n.cv, n.ho)
## X-squared = 67.54, df = 1, p-value < 2.2e-16

[...snip...]
There's a second source of random testing uncertainty for the cross validation. You can check that e.g. by doing repeated/iterated $k$-fold cross validation and checking the variance between different predictions for the same sample.
Why is the cross validation optimistically biased?
Cross validation by itself is not optimistically biased. It may have a slight  pessimistic bias. The optimistic bias comes from confusing what exactly is measured and what should be estimated. If you want to estimate the performance for unknown samples, then you need to make sure that you test with unknown samples. If you want to measure goodness-of-fit, then use known samples.
Esbensen and Geladi (2010): Principles of Proper Validation: use and abuse of re-sampling for validation gives a thorough discussion of such considerations (and goes a step further: if you want to estimate performance for future unknown samples, you need to acquire unknown samples a certain time after the training samples were acquired, etc.).
In my experience, these are the 3 most common ways of test-sample information leaking into model training:

Data-driven optimization means that the test data enters the model in form of hyper-parameters (Dikran's terminology). That can be cross validation, but it cannot be the cross validation you use for choosing the best model.  Optimization is a multiple testing situation, and selecting the apparently best of $m$ models wil "skim" the random testing uncertainty. I.e. the more models you compare, the higher the risk for overfitting. This kind of overfitting can happen even if the model has apparently restricted degrees of freedom.  See Eriks and Dikrans answers and Dikran's paper.
All data-driven steps in the model building e.g. feature generation or data pre-treatment that uses multiple cases (i.e. cannot sensibly be done one row alone), like

centering on the column averages,
variance scaling,
MSC without fixed reference,
using PCA scores as input for the "actual" classifier
etc. - you get the idea
need to be done separately for each cross validation split. These steps determine hyper-parameters as well.
The same would of course apply to data-driven post-processing of the classifier output.
You have this for sure: "Only polynomial kernel give accuracy of more than 70% with c=10. So I chose that model."

Rows of your data matrix are not independent. This happens with "clustered" or "hierarchical" data structures. You may say you have multiple rows per case, e.g.

repeated measurements of the same case
several samples taken from each patient
multiple locations measured on the same specimen

The common point is that the test data is not unknown to the model: with data driven optimization, you adapt the model to that particular test set. If determine PCA projection from the whole data set, then the (later) test data did influence this projection. If you have multiple rows of data of a case , make sure your cross validation splits the highest level cases (e.g. patients).
Edit: as you comment above that you are very new to the whole field, feel free to ask for more literature. Also dig around here at cross validated. There are lots of useful questions and answers about (cross) validation topics.
Comment: the training set contains 4545 examples. the test set contains 1968 examples. The holdout set is with my lecturer and I have no idea how big it is.  I used K-NN, Logistic Regression, Naive Bayes and SVM. For SVM, I used c=10 on kernels like multiquadratic, dot, radial and polynomial. Only polynomial kernel give accuracy of more than 70% with c=10. So I chose that model
Comment: Thank you very much for taking the time to  answer my questions, There are terms that I am not familiar with and need to read more like PCA projection and MSC without fixed reference. Also, I think binom.wilson is an R function?  I  will have to find similar one in RapidMiner.
Also, When you mentioned  2 sample test for equality of proportions, do you mean 1 sample from the training and another 1 sample from the test set? I will read the link that you gave. Thank you very much for that too :D
Answer: The simple is answer is yes, the fact that your accuracy goes down when you compare to a new set means that your model is overfitted. However, almost all models will display this behavior, so it doesn't mean that you don't have a good model. 71% accuracy is still very good for many purposes, but you need to ask yourself if it is "good enough" for your purpose.
I can't tell you if the differences with other models between cross-validation sets or test sets will be less than 9%. You will have to perform the predictions with those models yourself, and compare them.
I doubt that these other models that you have tried will be better than the one you have just described. If the accuracy is less than 70% on a cross-validation set, it's possible though very unlikely that they will be more accurate on a test set.
Comment: This is not quite correct, if cross-validation performance is performed correctly, it is almost unbiased, so it should give the same performance estimate as a test set *in expectation*, whether the model is over-fit or not.  However, in this case CV has been used to make model choices, so it is no longer an (almost) unbiased estimator.
Comment: Yes I am quite a beginner and I followed the tutorials in youtube. They showed that in order to obtain accuracy, I need to use cross validation. I also used ROC chart and compare the models. k-NN, Naive bayes and decision tree graph,  didn't look normal. While SVM and logistic regression give the normal curve graph.I then chose SVM because it plots higher than logistic regression
Comment: @siga, it is a problem that is quite common in machine learning, which is one of the reasons I wrote the paper I mentioned in my answer.  I was very surprised when I saw the experimental results just how big a difference this can make.  It is easy to get round though, use nested cross-validation (see the paper for details).
Comment: Thank you very much for the help @DikranMarsupial . I sure will refer to the paper that you wrote. :D
Answer: As the models have been chosen by optimising the cross-validation error, I suspect this is part of the reason for the cross-validation accuracy being a lot higher than the test error.  Essentially the model has been tuned by optimising the cross-validation error, which means it then provides an optimistically biased estimate of performance.  The bias introduced by this king of thing can be surprising large, and can easily result in drawing incorrect conclusions, see
G. C. Cawley and N. L. C. Talbot, Over-fitting in model selection and subsequent selection bias in performance evaluation, Journal of Machine Learning Research, 2010. Research, vol. 11, pp. 2079-2107, July 2010. (www)
Consider a problem were the aim is to predict the outcome of 10 flips of an unbiased coin.  The "model predictions" are formed by generating 10 flips of other unbiased coins (so that the skill of the predictions is exactly zero).  However if you choose the best of these models on the 10 flips you observed, you are likely to get one that appears to have some skill and the more models you have to choose from, the greater the apparent skill.  However, the best model will still have skill of zero if the coin is flipped another ten times.
Likewise, if you choose your model by optimising the CV accuracy, the choice is partly due to genuine gains in generalisation, but also partly due to random chance (you have over-fitted the cross-validation estimate).  As a result, the CV accuracy is higher than the true generalisation performance of the model (estimated by the test set).
@cbeleites also makes an excellent point (+1) that if the test and training sets are small, then the performance estimates (both CV and test set) will have a high variance, so it wouldn't be too surprising for one to be higher or lower than the other.
Comment: Thank you for the reply. Yes I chose my model based on the CV accuracy and partly from the ROC chart. But I was not too sure of the ROC chart because 2 of the models that I designed gave weird pattern on the ROC chart. Thank you for the link too. It sure helps me in writing my report :)
Answer: There is more than one possible cause here. Model overfitting is one for sure. I don't know how you fitted the model, with an SVM you tune the parameters by CV as well. If the tuning CV and performance estimation CV is the same (you should have two, with the tuning CV layered within the estimation CV) then yes, your model is probably overfitted.
OTH this can simply be chance. It depends on the size of both your training and hold whether this is a plausible explanation. Even if your cv-estimated accuracy was absolutely correct, the test accuracy will still be binomially distributed around it, so you can check. But there is also uncertainty involved with the cv-estimated accuracy, so you also need to check the range of your confidence interval for that.
Comment: Thank you for the comment. As a beginner, I randomly select the c value for SVM. May I ask do you mean tuning CV as in training CV? and the estimation CV, do you mean the predicted cross validation (accuracy)  on the selected model? My lecturers did not inform me the size of the hold set , they only gave me my accuracy on the test set when compared to hold out set.


Can Google Earth App for the iPad specify a KML using a URL without dealing with Google MyMaps?

Question: Can Google Earth App for the iPad specify a KML using a URL without having to go through  with one's Google My Maps Account?
Answer: Yes with the deprecation of the Maps DATA API
http://googlegeodevelopers.blogspot.com/2010/11/maps-data-api-deprecation-announcement.html
you can now use v3 Google Maps API with Fusion Tables
http://googlegeodevelopers.blogspot.com/2010/05/map-your-data-with-maps-api-and-fusion.html
(this becomes the default and will be official on 1st Feb 2011)
Comment: Actually the Fusion Tables information is very interesting Thanks. But that wasnt my question. I am using Google Earth on iPad (not Google Maps) and wanted to view simple KMLs (not tabular geodata) overlayed onto 3-D Google Earth. I wanted to know if I could do this by storing my KMLs outside of Google My Maps?
Comment: You can store KML files anywhere that is publicly accessible via the web with a valid url, Google encourage you to do this (and they index KML geographically).
Comment: thanks...On an iPad, I think that when using Google Earth app it is not possible to specify any URL as it is with the normal PC Google Earth.


Quermassintegrals as mean curvature integrals

Question: It is well-known that the quermassintegrals $W_{i}$ of a convex body $K\subset \mathbb{R}^{n}$ can be written as a mean curvature integral
$$ W_{i}(K)=n^{-1}\int_{\partial K}H_{i-1} d\mathcal{H}^{n-1}, $$ where $H_{i-1}$ is the $i$th elementary symmetric polynomial in the $n-1$ principal curvatures. This can for example be found
in Schneider's book on convex bodies in (4.2.28) on p.210 for convex bodies whose boundary is a regular $C^{2}$ surface (here regular means all principal curvatures are positive). Other authors
allow for a larger class, for example in Santaló's book on integral geometry III.13.6, p.224 only $C^{2}$ is assumed, although it seems to me that he also needed positive principal curvatures in the proof.
So, I guess, my question is the following: Is this result true for convex $C^{2}$ surfaces without assuming that the surface is regular? If this is not the case, is there an easy counterexample?
Answer: These things hold in amazing generality, but you must dig into  bit of geometric measure theory, which is the right language for this. Here is the paper that probably started the industry in this direction:
http://www.ams.org/journals/tran/1959-093-03/S0002-9947-1959-0110078-1/S0002-9947-1959-0110078-1.pdf
There are many works in this direction by Schneider, Fu, and Bernig.
Comment: I think he's just writing your mean curvatures in terms of traces of powers of the second fundamental form  (a generalization of it). If it's just a citation, write Rolf Schneider: he'll be able to point you  to an exact reference. Here is a paper where he retakes Federer's work, but in the convex setting.

http://www.springerlink.com/content/82601181g8507k16/
Comment: Dear alvarezpaiva, thank you for your answer! Before I start with Federer's paper, I would be interested to know if the result I asked about is really contained in the paper and following;
what makes me somewhat doubtful about this is that Schneider knew about these results and even contributed, but does not comment on this specific representation of $W_{i}$
for a more general class, although he has quite extensive notes in his book.
Comment: "5. The curvature measures. In this section several versions of Steiner's formula are derived by a modification of the classical method of [W]; the main innovation is the use of the algebra A**(£). By means of Steiner's formula the curvature measures corresponding to a set with positive reach are defined, and their basic properties are established. The proofs of the cartesian product formula and of the generalized Gauss-Bonnet Theorem were partly suggested by [H, 6.1.9] and by [A; FEl]."
Comment: Federer is never an easy read. On the other hand, this is the right language for many things in integral geometry so if you're working on this, you may as well learn it.
Comment: Actually I only need a citation for this result and the only one that I could find (and understand immediately (-; ) has a proof that is in my opinion flawed.
I spent some time looking trough Federer's work and could not find anything resembling the mean curvature integral I'm looking for (but maybe if one knows what one is looking for it is quite easy to spot).
Still I find it quite curious that Schneider would restrict the surfaces unnecessarily to be regular if he knows that he does not need to. Are you sure that for these surfaces the results of Federer
give exactly the formula above for
Comment: the quermassintegrals? Sorry for being annoying, I appreciate your help!


Is there any motivation for the direct sum?

Question: I believe that everything have reason to exist . I want to learn why the direct sum exist.
Is there any motivation for the direct sum to exist ?
Comment: Direct sum of what? The term exists in many different branches.
Comment: While constructions can seem artificial at first, with experience and hindsight we can see that they are natural. One important thing to keep in mind is that mathematics is not pure *invention*, it is also largely *discovery*.
Answer: From a bottom-up perspective, one thing we do with mathematical structures is combine them to make new ones. The most basic way of doing this with e.g. groups and rings is the direct sum. This is how get get vector spaces from scalar fields, after all (up to isomorphism), using coordinates.
In the top-down perspective, one thing we do with mathematical objects is describe their internal structure, which means decomposing them into simpler things (like naturals factoring into primes or representations into irreducibles), and with groups and rings this means decomposing into internal direct sums (among various more general types of reductions, like semidirect products or not-necessarily-split extensions). For instance the fundamental theorem on finitely-generated modules over a PID generalizes the classification of all finite abelian groups which is itself a generalization of the fundamental theorem of arithmetic.
From a categorical point of view, one notices a number of independently motivated operations on mathematical structures in different areas (direct sums of abelian groups and rings, disjoint unions of sets and topological spaces) have the same arrow-theoretic abstraction in terms of universal properties. This leads to the categorical operation of coproduct, a generalization of direct sum.
Answer: Have a look at the universal property defining it. Isn't the idea of having a single object that an concurrently encode morphisms elated to other objects a must-have?


Visual Source Safe(VSS) can not work !

Question: I m working on Microsoft Visual Stdio 2005. I am working on ASP.NET. I added project to VSS. I found this project correctly, but other user can't access this. show this error message. and this web project cannot working in vssalt text http://img251.imageshack.us/img251/5721/vsserror.png
Answer: I know this doesn't exactly answer your question, but I would highly recommend using something other than Visual Source Safe.  It has many problems and will only cause headaches for you in the long run.  Unless you are mandated to use VSS (hopefully not), I would recommend something like Subversion or Mercurial.  Save yourself headaches.
Answer: 1) Use source safe client. Get latest all the code.
2) Open visual studio. Ignore all the errors.
3) Remove the missing projects from the solution. Add them back from their new path
4) Select change bindings within visual studio itself. Make sure the paths are correct. Click save
5) Save your solution and close. Then pray that the bindings worked.
Rinse and repeat every few weeks when your bindings break for no apparent reason.
Actually, the problem is within the sourcesafe binding files (vcssproj or some other funny extension which i cant remember now).
If you absolutely cannot get it to work, open your sln file in notepad and delete the bindings in there and try again.

Visual Source Safe(VSS) can not work !


ERROR: App can't run on your PC. Tried all options found on internet to fix

Question: I downloaded a version of the Sims to my Windows 10 PC just an offline play zip file. Keep getting the error message App can't run on PC. I have tried every solution I can find as to why this keep popping up. I'm at a loss. Maybe I am missing something small & I'm just an idiot but any suggestions would really help :)
Comment: When you unzip it, what are you using? Is it unzipping into it's own folder? Is it an .exe file you are trying to run from (Setup.exe), does it show an Icon? Is your Windows 10 64-bit or 32-bit (x64 ; x32). If it is a 32-bit, you might be trying to run a x64 software which Windows x32 cannot run.
Comment: I downloaded it through MEGAsync & then extracted it to my PC. As far as I know I'm running on 64bit In my system info it says "64 Bit operating system, ARM based processor" but in my compatibility admin it says (32-bit) in the top. Not sure if one has to do with the other I honestly haven't worked with windows in years so I am a little lost.  The program is going into the folder for the MEGAsync downloads
Comment: If you press the Winkey+Pause/Break you will open Windows system properties window. On the right it should give information about your system.
Comment: yes it is 64 bit os
Comment: Go into the folder where you extracted the .zip file and you should find an .exe program, most are called setup.exe. If you right-click the file choose properties and look for a tab which says Details, it should give you information about the file. The more tabs you find and read the better, they can give you more insite on the program. If you find an .msi instead right-click on the .msi file and choose Install. __It may be that Windows Defender is not allowing it run.__
Answer: The App is made for another platform. Please verify the specification/information on the page from where you downloaded the file (or post the link here for a more specific answer).
Just in addition:

A zip file can contain anything, it doesn't say anything about the platform the App is for.
It doesn't look like a permission issue at all.

Update
Look here: https://steamunlocked.net/the-sims-4-free-download/
and the "HOW TO RUN GAME!!.txt", as described in the first comment.
Comment: The point is that the App was made for another platform. Unless you cannot fix that with Windows Compatiblity settings (right click on EXE file, Compatiblity), you won't be able to run the App on our PC. Sorry to say.
Comment: https://mega.nz/#!rl0T3Y4T!qa_fKn2is5pEkbGW9ocy1VjdTx753K2o3T8rDvfvVWc               That is the link.
Comment: Thank you, but this is just the file download link, and I need the link where this file is linked from (describing the file/app).
Comment: I clearly have no absolute idea what I am doing. So it was actually basically purchased from someone & I am assuming that may prevent me from actually getting you that information???