Short Puzzle: Graphic Painting

Question:
The artist in the market is giving this painting for free (the last one on his rack). I asked him if I can take it but he replied "Why should I give it to you?" The frame could be useful but I dont want to tell him that so I ask him why should he give it for free. He answered "because I miss to paint something into it". It looks like straight edge drawing to me but I'm curious so I asked him what is missing in his painting. He told me that I can take it if I figured it out. I offer to buy it if he would tell me but he just refused while people are now gathering around the painting. What is missing?
Comment: I suggest adding a hint! I've been thinking about this: rot13(Pbhyq vg or gung zbfg bs gur qenja yvarf naq neebjf pbhyq or pbzovarq gb sbezf Kf. Fb vs jr pbzovar nyy bs gurz, jr trg na K gung vf zvffvat n yvar be neebj, fbzrubj?)
Comment: @PaulKaram-Znlor vs lbh vtaber gur fgbel naq whfg ybbx ng vg lbh'yy svther vg bhg.
Comment: Is it related to some rot13(gvzrfgnzc sbe rnpu K)? @TSLF
Comment: @SamRoy-Whfg gur fgvyy cerfrag, fcngvnyyl qvfgbegrq.
Comment: I am still curious about this!
Answer: I think the painting is meant to portray:

 Four dimensions - because that appears to be the name of the painting.

But it is missing:

 One of the dimensions. Possibly depth, or the 'fourth' dimension'.

My reasoning:

 The commonly recognised three dimensions are height, width and depth. The fourth dimension is considered to be either the concept of time in physics; but in geometry it can be the direction of movement of the 3-dimensional object. The painting appears to have axes for height and width with marks to denote some kind of scale. The diagonal line in the middle of the painting has arrows instead of scale markings. Perhaps this denotes time (because time only travels in one direction), in which case the painting lacks depth. Or perhaps it is meant to denote depth, in which case it is time that is missing.

It also occurs to me that:

 The action of taking the painting away would technically add the fourth dimension of movement to the existing three, so maybe that is why the artist is inviting people to take it away?
Comment: Depth can be represented by the thickness or layers of the paint. It looks like he ought to portray the 4 dimensions  (4Xs) using the "4th dimension" or time.
Answer: I'm no art critic, but I'd still say

 the painting lacks depth.

The painter missed to paint something into it, because

 he wants to depict a nice projection of the 4-dimensional coordinate axes, but that takes 3 dimensions, so his paintbrush literally misses when he tries to paint outside the plane of the canvas.

Maybe :-)
Answer: The painting is missing:

 the artist's signature, so it is obviously a forgery, hence the price tag.
Answer: The painting is missing

 a Time axis.

It's clearly titled.

 It has 4 Xs but only three axes.
 Read both aloud, enjoy the verbal pununciation, realize "4 Xs" does not equal "3 axes" and tell the painter he needs one axis more (not only for this reason but because, obviously, the titular 4th Dimension needs a 4th axis to be represented on a graph).  The missing axis must be the 4th dimension one for Time.

Take your painting home and enjoy the new frame.
Comment: It is about time or 4th dimension
Comment: @TSLF I don't exactly understand your comment. My answer *is* about time or the 4th dimension; what is your comment supposed to tell me?
Comment: The painting is just 2D with 3 arrows that looks like axes. The artist maybe just portraying  space by using time elements. The artist just missed something to paint and maybe there would be no free frame if  he correctly included it to the painting.
Comment: Well. Obviously this is too esoteric for me. :)
Comment: i thought of it as a short puzzle but the "aha" went that illusive
Answer: Two things:

 the arrows on the diagonal axis (not the last one) should be replaced with strokes to represent intervals.

And:

 thanks to @Bass, the picture lacks depth, and therefore the intervals on the diagonal axis should be of increasing distance from the origin.
Comment: count the letters
Answer: I've got a feeling that the image should have been drawn like this:

Reasoning:

 Each X represents a vector. Since this is a 2D plan, a vector that is perpenduclar to our plan should be represented with a circle that contains a point, or a circle that contains an X (point means the vector is pointing from the screen to you, X means the vector is pointing from you to the screen.)

Another possible solution is:

Comment: Normally I'd think of a clock (digital or analog), date, seconds, minutes, stuff like that... @TSLF
Comment: It is just 4th dimension (time).  What's the first thing that you can think of?

Short Puzzle: Graphic Painting


Best way to do input validation when using Asp.Net Mvc 1.0, Json and jQuery Ajax

Question: I went through a few blogs/posts and there are some good solutions for input validations in Mvc 1.0, but most of them are about non-Ajax scenarios, so I was wondering what your preferred method is when using jQuery Ajax?
Answer: In asp.net mvc 1.0 you don't really have many options for validation. It is absolutely required to have server-side validation and I usually make my own custom validation. It is also good to have client side validatio that is easy to do with jQuery. There are several good projects for automated validation like MVCValidationToolkit and xVal that you can try.
Answer: I've just blogged about Asp.net MVC, Ajax and model validation error handling. Could be useful to you. The main thing is that you can easily do model validation as long as you can bind data to a strong type model (naming input fields does the trick). Going a step further, handling model validation errors is covered in my linked blog post.
I'm using custom exception with a custom exception action filter that proved to work fine in such situation. And the best thing is that you can still use error and success options of the $.ajax() call. Which is in my opinion the proper way of doing it.


iPhone 5S Personal Hotspot sometimes automatically turns on

Question: Why does my Macbook Pro "see" my iPhone Personal Hotspot even when it is turned off?  And sometimes, my iPhone Personal Hotspot gets turned on automatically.  What is happening here?  This does not happen often, and when it does, it is usually when the WiFi signal is unstable.  3G is always there as a back up, so I don't know why my phone is trying to cover for this unstable signal.
Comment: When the personal hotspot is turned off read the second sentence of the text beneath the switch for it. "Other devices signed into your iCloud account will be able to use Personal Hotspot without having to turn it on manually."
Answer: It seems you're seeing the "Instant Hotspot" feature available on the devices running iOS 8 or later. It's a part of Apple's continuity features that lets you share the data connection from your iPhone or iPad (cellular) to your WiFi only Apple device. It uses your Apple ID for authentification, BT LE for connection and Wi-Fi for data transfer. Thus, it's different from a personal hotspot, which required a password. You can read about it here: https://support.apple.com/en-in/HT204681#hotspot
As of iOS 9.3, you cannot disable the Instant Hostspot. Only way is to call your carrier and have them remove the feature from your account.


Eclipse as an IDE - What do you find missing as a beginner in Java?

Question: I am working on a solution that aims at solving problems that newbie programmers experience when they are "modifying code" while bug fixing / doing change requests, on code in production. Eclipse, as we all know is a great IDE. Features such as Code Completion, Open Declaration, Type Hierarchy, Package Explorer, Navigator, Finding References etc aids people in fixing things quicker compared to say using something like Textpad.
If you are a newbie java programmer and you are using Eclipse IDE, what areas of the Eclipse IDE do you think were less helpful/ less intuitive? If you are a seasoned programmer, what are the common issues that newbies look up to you to solve for them?
Please ignore issues related to : Domain Expertise (Business Knowledge), Infra( where to test your change etc), performance related (eclipse search being slow,etc), Skill level in a particular language (think of the developer as a noob) ... and think one language - Java
I did a local survey in my small team and here are some:

Newbies using Eclipse to handle code that is written to interfaces where the implementation is supplied at runtime. Doing a 'Open Declaration' will always show you an interface. This could be confusing at times.
Eclipse is not intuitive while developing EJBs. Sure, you know all you have to do to create a new bean is to right click and 'Create Bean', however, once created it shows no contextual help to what the next step should be. For instance, generating stubs.
When Data Source Mapping with entity beans, changing something screws up the entire flow of things and eclpise never complains / hints.
Developing applications that make use of Struts, eclipse doesn't tell you that when you change struts-config.xml, particular web flow would get affected.

At this point, to me, as someone who is interested in collecting opinions for my research, it appears as if Eclipse could use more 'contextual runtime hints'.
I am sure the community would have a lot more to add... Please add more of your negative experiences (just from the code change perspective).
EDIT:
I guess, my question was too lengthy and confusing. I am gonna rephrase it a bit and keep it short:
While "making a code change" (not analogous to code formatting, infra related activities, CVS etc... say something like refactoring), what feature(s) of eclipse IDE did you not like / hate the most? Here are the examples:

When modifying code that has been written to interfaces: 'Open Declaration /F3 on an object instance shows you the interface when the implementation is supplied at runtime'.
When changing apps using EJBs: No contextual help
When changing apps using MVCs(Spring / Struts) : No warnings about change impact.
Comment: First indent of short version - I really hated that, but now I am using CTRL+G and it's fine. For MVC's there's a few plugins that help you, I guess Eclipse can not handle all frameworks to support them in.
Answer: Missing in Eclipse are:
Software visualization, as for example System Complexity View [Lanza 2003]
And also by Lanza, the Class Blueprint [Ducasse 2005]

Post Scriptum: Software visualization in Eclipse: X-Ray provides System Complexity View of Java projects, http://xray.inf.usi.ch/xray.php (via @anjaguzzi and Paul Lammertsma)

And then collaborative filtering "other developers that edited this method before also edited" [Zimmermann 2005]
And the collection of browsable examples, and autocompletion at the level of these examples. That is, for example if your write
<code>ByteBuffer buf = file.
</code>
and hit autocompletion it should search the codebase and the interwebs for examples that convert files to bytebuffers and insert that 10-20 lines there.

Parseweb supports developers by recommending method invocation sequences that yield a required
destination data type from given input parameter types. http://doi.acm.org/10.1145/1453101.1453129
Prospector supports developers by recommending method invocation sequences that yield a required
destination data type from given input parameter types.http://doi.acm.org/10.1145/1064978.1065018
Strathcona provides source code examples and structural con-
text for the code fragment under development. http://lsmr.cpsc.ucalgary.ca/papers/holmes-icse-2005.pdf
Rascal recommends how and when to call the methods of objects from common libraries such as Java Swing, based on an analysis of existing classes. It uses collaborative filtering. http://dx.doi.org/10.1007/s10462-005-9012-8

And of course also the feature that I can write a Unit test and then the IDE searches the interwebs for classes that pass the test. Yes, this can be done!

CodeGenie is an Eclipse plugin that allows you to write unit tests and then uses the Sourcerer source code search engine to find passing classes. http://doi.acm.org/10.1145/1529282.1529384
CodeConjurer which is based on Merobase also offers that feature, see http://dx.doi.org/10.1109/MS.2008.110

This list could go on and on, good starting points for more work are the proceedings of past

Conference on Mining Software Repositories (MSR)
Workshop on Search-driven Software Engineering (SUITE)
Workshop on Recommendation Systems for Software Engineering (RSSE)

which are all under the umbrella of the ICSE conference.
Comment: Both System Complexity and Class/Package Dependencies can be added to Eclipse with the X-Ray plugin: http://xray.inf.usi.ch/xray.php Officially still in beta, but works brilliantly!
Comment: Soo...these are the problems newbie programmers experience? :)
Comment: @robert my suggestions are visionary rather than incremental, for sure. How to get from type A to B is a problem newbies face very often, also search by writing a test might help them a lot.
Comment: They're great suggestions, no doubt; great responses to another question :p
Answer: For me, most of the newbie problems in Eclipse come from one of it's strengths, its configurability & plugin structure.
When I need to change a property in Eclipse, I always seem to have to spend a few minutes working out where to change it. Example: changing the Java editor to insert 4 spaces instead of a tab. The search bar in the properties is always welcome :-)
That and the lack of documentation for some of the plugins always makes for fun when I'm setting up a project.
EDIT: You can always show the classes that implement an interface using ctrl-T.
One thing I would add is that when I have a complex project, I tend to use Refresh & Project->Rebuild All *a lot". And I use TortoiseSVN to maniuplate stuff outside of Eclipse, because a lot of times this is easier (some refactoring for instance). However, if I'm modifying the project outside of Eclipse, I *always" quit Eclipse, and do a full refresh and build when I restart it. Otherwise Eclipse gets very confused sometimes.
Answer: "newbie issues" I've seen myself (I've used Eclipse for a good while, but it keeps "surprising" me occasionally) and helping colleagues just starting to use Eclipse:

It's large and complex enough to be very intimidating to some at first. Seems people consider netbeans easier to use initially. One colleague took refuge with the VI editor for a god while...
Installing plugins can be tricky (finding site URLs, awareness of plugins, why is "install"+"update" under the Help menu???)
Updates are still slow (but much better than before) with Eclipse 3.5/Galileo. It's difficult to understand which plugins to install just by their name sometimes.
Any platform besides Mac - preferences under the Window menu seems illogical?
Understanding how to set the project class path neatly. Setting the right project JDK version.
Lack of or unexpected interaction between ant/maven build tools' classpath and that of eclipse's (ant/maven clean causes Eclipse compiler errors when classpath is shared etc.).
Views and (large number of) perspectives are confusing/overwhelming at first. Which are useful when? How to drag views to the desired location or restoring closed ones?
Some JDK/Eclipse version combinations required too much PermGen space than available by default, took a while to diagnose.
Answer: I think the biggest problem I faced (and still face) with Eclipse is that it isn't particularly aware of standard technologies that surround modern Java development. If I'm developing an application, it might include the following:

Spring
Maven
JSF/Struts 2
Subversion
JUnit

I think Eclipse handles those technologies in increasing levels of awareness: (so JUnit will be fine, it works out of the box; Subversion requires Subclipse, and it's a little ropier than the CVS support; JSF needs some WTP tooling to be installed; Maven...you're probably best off setting up your own external tools commands rather than trust M2Eclipse, unless it's become dramatically better in recent times; and Spring, well, as you say, try ctrl-clicking on a method and you'll almost certainly get an interface, because the implementation is hidden away behind a Spring config file).
Getting all of that to play together and check out/compile, then later compile/run tests/check in is the difficult bit. The code change itself is probably easy :)
Comment: +1, it's so true, especially for Spring and Maven. SpringSource Tool Suite (http://www.springsource.com/products/sts) adds a little comfort, however, still a lot os missing.
Comment: M2eclipse has become really nice recently. Works well
Answer: For me, the biggest hurdle to learning to use eclipse effectively was understanding where to set the classpath and also how to figure out exactly what is included on the classpath for various stages of development (compile, build, test). I was confused for a long time about the difference between compile time, debug configurations, and run configurations classpaths. Then if you throw ant into the mix (which automatically creates a run configuration ) it makes it even more confusing for newbies.
Comment: this kind of qualifies as infra (setup/build related). assuming that your class paths are correct, you are going to change a method / class or whatever, what did you find it difficult?  (for instance, when you are about to change a method name, it is an intutive thing in eclipse to right click and look for references - when I was a newbie, this was one of the positive reasons for using eclipse. Today,I am here to collect all negative opinions :-)
Answer: As a beginner, I didn't do EJB or Struts stuff. Or even data source mapping. So I think the question's title may be a little misleading.
I would have appreciated having something like JadClipse built in to "look at" library code when I hit it in debugging or such. But it should be made VERY clear that this is "reconstituted code" and not meant to be hacked around in.
Second, noobs need to be made much more aware that Shift-F2 will get them the API documentation for whatever class/method they're looking at. I know too many novice Java programmers who explore their APIs with nothing more than code completion; they're missing many valuable hints provided by the library authors.
Comment: Seconding the lack of a decompiler.
Answer: A mindreader which generates code on the fly, so that a single click is sufficient to complete a project.
Answer: I found Visual Studio easy to pick up, I tried clicking on each button at least once, and figured out what the whole thing does.  It's thought out by a single design team at the highest level, and everything follows the standards top to bottom, more or less.
Then, I play with Eclipse.  In technical terms, it's janky at best.  Look at the preferences dialog; it's an overwhelming trainwreck, unless you already know exactly what you're looking for, and what the developer working on that feature decided to call it.
Eclipse's configurability relies on the fact you already know how to configure it.  The learning curve there is awful, and the only saving grace is that most of the defaults are okay to begin with.
Answer: Here are basic missing features as far as I know :

Show the beginning '{' when you are at the end '}' where beginning '{' is out of the view
Automatically synchronize the editor with package explorer
Go to different view (package explorer, outline, etc) with keyboard
Inline find, which does not open a dialog.
Go to next error location with keyboard
Go to next/previous structure with keyboard
More stability in general.

These features work great in IntelliJ. Especially #1 and #5 are really useful.
Answer: I was a noob to eclipse recently, mostly doing Android and BlackBerry stuff.  And one thing that eludes me to this day is the massive multitude of options and settings and various places they can be found in.  For instance, if you have a plugin installed (say BlackBerry plugin), the setting might be found in the general prefs or BlackBerry prefs or the project prefs.
It's always a hunt.
Answer: VCS integration - typically the developer is also new to merging changes, keeping working copies in sync, resolving conflicts and so on. There are often several ways of achieving the same thing in Eclipse and I've seen this cause confusion on several occasions (actually, I've seen this with experienced developers too; they know Subversion but not Eclipse, and the latter tries to 'hide' the underlying repository operations).
Comment: @SimonJ : VCS integration - would be infra. Assuming that the code is already setup and the developer is ready to do his/her change - what kind of problems would a developer face in such a scenario?
Answer: I think the issue with all IDEs for beginners is the disconnection from the tool chain: how the compiler takes some source and compiles it to bytecode which I then run using the VM with a correctly configured classpath.
As a dev I love the fact I don't need to deal with this - and I've never found myself unable to do what I want concerning more complex build configurations - but it's too important for beginners to understand what's happening when you press that Play button to be ignored.
Answer: when i first tried using eclipse i absolutely hated it's coplexity.. you had to do a whole bunch of things befor you were able to start working. furthermore you have way to many options to check and it's not always selfexplaining what each button does.
instead i started using netbeans. way more intuitive and easier to handle. check there gui.. not to much buttons and most of the time you know what the button does even if you have no clue of java (as i had at that time).
when i changed back to eclipse (due to some features not supported in netbeans) it seemed far easier to work with it. so some part of the gui might just be added in a not intuitive way and beginners will definitly have a hard time with it.
Answer:
simplicity
clearness
consistency

I might write it much more in detail, but i think, that eclipse is overweight and much too much oriented on features - instead of ease of use. IMO, this concerns beginners as well as professionals.
Comment: I'd second that one and then some; "infinitely configurable" isn't a good thing, unless you really, really, really want to sort through a wall of buttons, knobs, and switches to do something common, like changing a tab to four spaces.
Answer: Eclipse has no visual designer for Swing components.
Compare that to Visual Studio, where:

click 'new form'
drag buttons and text boxes onto the form, move them around, add some labels
double click on a button, add some code
done, one quick application, show it to the boss, get paid/promotion/coffee break

In Eclipse you either have to use Netbeans instead (ie not Eclipse...), or use IBM's SWT, or code the Swing forms by hand.
I feel it would be very nice to have a great wysiwyg forms designer in Eclipse for Swing forms.
Answer: The other confusing part is that for web development there is a separate version that needs to be used! Well I didn't like this at all and I know that a lot of people just don't about this.
Answer: Eclipse is missing Maven Embedded in standard distribution , Maven would help any user in getting their program all the jars and better library management .
Netbeans already has this tools.
Also eclipse misses integrated tools for hibernate , spring , xfire and tomcat deployment using maven.
Check this site http://maven.apache.org/
Answer: All of my other problems with Eclipse have already been mentioned except one: It's slooooooooow. Was their goal to prove the "Java is slow" people right? I'm guessing this is related to the "Eclipse does everything", but I stopped using it because it lags every time I click on anything. Change tabs? Lag. Open preferences? Lag. Change tabs in preferences? Lag. It's like using Photoshop with 32 Mb of memory.

Oh and it's incredibly ugly. I wish I could get it with real GTK+ integration.
Comment: And apparently having a real problem with Eclipse gets me modded down with no explanation?
Answer: The android SDK integration is full of jank. xml layouts don't render correctly. Code completion doesn't work well. IBM needs to fix the jank for sure.


Self-complementary and bipartite graphs

Question: I'm trying to construct the collection of self-complementary graphs which are also bipartite. For a graph G to be self-complementary, then its complement must be isomorphic to G. If G is bipartite and self-complementary, then I believe that it's complement must also be bipartite. But I'm wondering if the complement is necessarily bipartite on the same subsets of vertices? In other words, if I have a self-complementary bipartite graph G with bipartition (X,Y) where X and Y are subsets of V(G), then is the complement of G also bipartite on (X,Y)? Or can it be bipartite on two different subsets of vertices? In that case, could you still say that the two graphs are isomorphic?
Comment: The vertex sets don't have to be identical.  There has to be a one-to-one correspondence that preserves adjacency.  Look at the definition of isomorphism again.
Answer: HINT: If both a graph $G$ and its complement are bipartite, then it can have no more than 4 vertices. Indeed, if $G$ is bipartite and has 5 or more vertices, which implies that one side $S$ of $G$ has at least 3 vertices, which implies that the complement of $G$ contains a complete graph on $S$ and thus has a triangle [as $|S| \ge 3$] and is not bipartite.
So now you are left considering graphs on 4 or fewer vertices, which is quite a small enough search space.

Self-complementary and bipartite graphs


When and why during software reengineering sometimes the document reconstructing is skipped?

Question: While studying the book of Software Engineering by author Roger Pressman I came across this point about software reengineering , where it is written in the book that if creating documentation is time consuming then it is skipped. Roger Pressman says if there are no significant changes after reengineering then documentation creation is skipped. But if we take example of 'javadoc' and if the javadoc creators just skip the documentation restructuring while new release of java version, just because there is no major change it could be disastrous for the 'javadoc' user. I am confused if this software engineering practice is practical. Can anybody ellaborate and help me understand what Roger Pressman expects here.
Comment: Being curious can cost a downvote these days....
Comment: Yeah your question didn't deserve a downvote without explanation
Comment: I think the point of these remarks is that people are lazy (or being pushed to finish faster) so you can either automate documentation (so it takes no effort) or you have to make it very important. Otherwise people move on to other stuf
Comment: I didn't downvote, but: 1.  Questions containing words like "fair" are unanswerable unless you can  specifically define such words within the context of a practical problem you're facing.  2.  We don't know what Roger Pressman was thinking when he wrote his book.
Comment: You might not be able to guess or understand what Roger Pressman was thinking. But some others do answered well.... . Thanks for pointing out my mistakes.
Comment: Ok you downvoted...
Comment: That was quick...
Answer: Documentation is more than reference documentation. Keeping Javadoc- or Doxygen-style references up to date is fairly easy because they are written right next to the code.
A lot of documentation lives in completely separate documents. For example, end-user software may have a manual. There may also be internal documents, like architecture overviews, UML diagrams, change request documents, or audit reports.
All of these documents have value. But their value does not always outweigh the cost of updating them after each change. E.g. doing an audit may be very costly, but it may be possible to skip it for minor changes. If the architecture was not changed significantly, there's no need to redo all diagrams. It depends on the chosen development process, on the business priorities, and on the regulatory context which documents need to be updated.
Staying with your Java SDK example, there's not just the Javadoc documentation. The SDK also contains extensive guides and tutorials for specific parts of the language and standard library, e.g. a guide through available Swing GUI widgets. It is likely not necessary to update these for each Java release because the library and the language mostly stay the same.


What is the difference between 包む(つつむ)and 包む(くるむ)?

Question: The verbs つつむ and くるむ and both written 包む, and according to my English-to-Japanese dictionary both have the meaning "to wrap". くるむ is glossed "おおう", while つつむ is glossed "すっぽりと覆う", but I am having difficulty distinguishing the two from these definitions and from the example sentences provided. Is there a difference in usage between the two words, or can they be treated as synonyms?
Answer: Both mean to "wrap" but つつむ is the one that has the more general meaning of "wrap" that we think of. くるむ is usually written in hiragana and has a nuance of rolling something up in order to wrap it, or generally enclose it, for example with 風呂敷{ふろしき}, or even 毛布 like in 毛布にくるまれた女の遺体 (a girl's corpse wrapped in a blanket). A little gross, sure, but a poignant image to drive the point home.
So 包む is basically always going to be つつむ. It refers to "wrapping."
くるむ is going to be hiragana. It refers to "rolling."
Comment: Yup! And I found the mimetic word 「くるくる」 helpful in memorizing the nuance of 「くるむ」.
Comment: Is the word 車 related to くるむ?

What is the difference between 包む（つつむ）and 包む（くるむ）?


What is the difference between multiplication and direct sum on homotopy groups of spheres?

Question: In Allen Hatcher's book Algebraic topology he states that factoring out 2-torsion $\pi_{i}(S^{2n})\cong\pi_{i-1}(S^{2n-1})\times\pi_{i}(S^{4n-1})\:\forall n$ but in his book Spectral Sequences in Algebraic Topology he has $\pi_{i}(S^{n})\cong\pi_{i-1}(S^{n-1})\bigoplus\pi_{i}(S^{2n-1})\:\forall n$ even. Am I correct in assuming these are the same or am I totally missing something?
Answer: Finite direct sums and finite direct products are the same thing on groups. The homotopy theory part has nothing to do with it. (Infinite direct sums and products are different, though, so be careful about this.)
Comment: The difference is this: An infinite sum of groups has elements with only finitely many coordinates non-zero. An infinite product does not have this limitation on its elements (the real, formal difference is category-theoretical, but for groups, this is what the difference manifests as)
Answer: The higher homotopy groups are all abelian, so for finite indices you have the canonical isomorphism:
$$
\prod^{n}_{i=1}A_{i}=\bigoplus^{n}_{i=1}A_{i}
$$
by mapping $(a_{1}\cdots a_{n})$ to $\sum_{i=1}^{n}a_{i}$.
Comment: Abelianness is unnecessary here. (The direct sum still makes sense for nonabelian groups, it just isn't the coproduct anymore. Instead it's the "commutative coproduct.")
Comment: Yes, thanks for the reminder. I am only aware of direct sum as the coproduct. But I think you mean "non-commutative coproduct" right?
Comment: No, I mean "commutative coproduct." The direct sum of a family of groups $G_i$ is the universal group equipped with a map from all of the $G_i$ all of whose images commute.
Comment: I see. Thanks for explaining. This does appear to be the right generalization.


Headphone jack dusty or broken?

Question: Recently I have been having trouble with my LG Optimus F60. At first, whenever I'm listening to music through Google play music, the music suddenly stops halfway and when I click the play button, it goes to play the previous song. I assumed it was a bug in the app so I never gave it much though, but now, the music stops entirely while I'm using my headphones.  The song will either pause as if I removed the headphones or the song will start to play through the phone's speaker WHILE the headphones are plugged in. I've tried blowing into the hole and even tried canned air in case it was dust or lint. I've only had the phone for just barely 4 months. Can anyone help me figure out what the problem is? Can't afford to get a another new phone right now.
Comment: Did you try another music player? What are your results?
Comment: It was the same issue with the other player
Answer:
First check whether you have the same issue with another set of headphones. If it persists, change your headphones. Even if there is no issue with the headphone, it might not be compatible with your device. So always check with a compatible model.
Check the headphones with your default music player to make sure there is no bug in Google play music. Even, in his case, switching headphones is recommended.
If none of the above work, you can easily fix this from an authorized support center, this is a minor fix that would be done free under warranty, and certainly won't set you back more than $10 without a warranty.

However it is very unlikely that this has anything to do with the phone, most probably swapping headphones will work.
Comment: @Antoinella, while doing the above try to see whether an headphone without mic or control buttons work normally. I suspect the button in the headphone with which one can pause or skip track is posing you trouble - in case your troublesome headphone has one.
Comment: @Narayanan the headphones I use don't have a mic or any button on them.

Headphone jack dusty or broken?


Does nominalism about kinds/universals entail eliminativism/nihilism about ordinary objects?

Question: If one holds a nominalist or conventionalist view of universals or kind, then do they believe that there are ordinary objects?
Comment: I don't think so, but maybe some could have drawn that conclusion.
Answer: According to the SEP's article Nominalism in Metaphysics:

Nominalism comes in at least two varieties. In one of them it is the rejection of abstract objects; in the other it is the rejection of universals. Philosophers have often found it necessary to postulate either abstract objects or universals. And so Nominalism in one form or another has played a significant role in the metaphysical debate since at least the Middle Ages, when versions of the second variety of Nominalism were introduced. The two varieties of Nominalism are independent from each other and either can be consistently held without the other. However, both varieties share some common motivations and arguments.

So the simple answer to your question is a nominalist believes in the existence of everday objects that are concrete, and not abstractions of them. For instance, if someone owns two dogs, Foo and Bar, then Foo and Bar exist, but 'dog' in the abstract does not. You can pet and feed Foo and Bar, but you can't pet and feed a 'dog', not in the abstract. On this view, when you say 'I CAN pet and feed a dog', what you are really saying is 'I can pet and feed a dog (where dog is a variable for any concrete members of the class dog such as Foo and Bar)'. Thus, in essence, one might treat universals and categories as variables that function anaphorically:

anaphora (/əˈnæfərə/) is the use of an expression whose interpretation depends upon another expression in context (its antecedent or postcedent).

It's not radical to suggest, for instance that the general 'you' doesn't exist, but is a pronoun, where 'you' refers to a specific person in a specific conversation. Thus, physical existence isn't determined by if a word to refer exists, but is determined through ontological indicators, such as having mass, having a social security card, being able to participate in a conversation in person, etc. Nominalists, therefore, might not stress over how unicorns don't exist despite the fact that someone can use the word unicorn in a sentence. Words aren't magical artifacts that summon matter and energy, after all.
So, if by ordinary objects, you mean concrete instances or particulars of a class, then yes, nominalists believe they exist. There is a term to describe the nihilism you ask after, and it's called mereological nihilism, where objects are merely viewed as structures or configurations of particles, as opposed to things in and of themselves. Thus, to a mereological nihilist, there are configurations of atoms as chairs, but chairs do not exist.
Comment: It looks like one could (but doesnt have to) be both nominalist and mereological nihilist. Something like "There are a bunch of configurations of atoms sharing a common set of properties that we call chairs"
Comment: @armand Good question. No idea.


no man pages on kubuntu 18.04

Question: I have just installed kubuntu 18.04 and I have no man pages.  I have tried all the different permutations of mandb to update the database, but I am always presented with a blank page.
Any help appreciated.
Many thanks
Comment: No manpages != man showing blank page. For some particular manpage, say `less`, what does `man -w less` output? If it shows a file path, is that file non-empty? Does `env -i TERM=$TERM /usr/bin/man less` show the manpage?
Comment: Did you solve your problem? If you did, please post the solution as an answer. It may help others with the same issue.
Answer: For anyone else interested, I was having this same issue on Ubuntu 18.04 on two separate devices. I tried reinstalling mandb, groff, and manpages, but none of these worked. However, when I tried env -i TERM=$TERM /usr/bin/man <command> (like @muru suggested) the manual pages appeared. I then modified my /.bashrc with an alias to this command. While it's not a cure to the problem, it is an acceptable workaround for me.
Answer: Not an answer, but a clarification and expansion:
No man pages in Kubuntu-18.04 != no man pages in the system. I too rely on Konqueror to read man (and info) pages. I especially appreciate the ability to go into finer detail on ancillary pages by right-clicking to open in a new tab or window. e.g. from the lvm manpage open new elements for pvcreate, vgcreate and lvcreate, and be able to quickly switch back and forth. I find reading man (and info) pages in Konqueror to be much more flexible and useful than on a terminal window (konsole) or the K Help Center.
At least on my system, I have no trouble issuing a "man whatever" command from the command line and opening up a man page, I just can't do it from within Konqueror.
Curiously, the Konqueror kio-slave for the man pages starts to work. If I enter "man:" into the URL field, it show all of the sections where the pages may be loaded; from man:/(0)/ to man:/(l)/ [that's a lower case L, not a one]. But that's as far as it will go. In the past, I could enter "man:ls" and the ls manpage would pop up. Now there's just a blank page.
Searching through the system, I find the kio-slaves for the man and info pages, but I can't find any of the kio-slaves for compression. According to https://docs.kde.org, there are kio-slaves for xz/lzma, bzip/bzip2 and gzip, but I can't find any of them on my system, nor can I figure out which packages is supposed to have them.
My guess is that since all of the manpages are gzipped, Konqueror can't display them since the gzip kio-slave isn't present on the system.
I have a backup of Kubuntu 16.04 which I made just before upgrading to 18.04. If I can't find the compression kio-slaves for Kubuntu 18.04, I may revert back to 16.04 and do some experimentation there to see if my suspicion is correct.
If someone knows which package contains the compression kio-slaves, please let me know.
Thanks,
ron

no man pages on kubuntu 18.04


MS Access - Close form without save design changes, acSaveNo doesnt work

Question: I have a Front End/Back End app in MS Access and I'm having some problems with performance when I close forms.
These forms are always saving before close because in Form_Open I hide some columns and edit the caption. Then, when I close the form, it saves the hidden columns and wastes much time!
I have already done a lot of settings modifications in Access for optimize for FE/BE. But I'm still have problems with forms that save before close. On save event it really wastes a lot of time. With the hide/edit columns routine it takes 20s to save. Without the routine it takes 1s or less, but my data is not saved.
How could I hide/edit these columns without the need to save the form afterwards? Or how could I close the form without saving structure changes?
Unfortunately Access doesn't have a BeforeClose event, and in a Close or Unload event it saves before going to this sub, so I can't cancel it to close later in code.
Hide Code:
'show all columns
For i = 1 To 8
    Form_Y_SubF_LP.Controls("Item_00" & i).ColumnHidden = False
    Form_Y_SubF_LP.Controls("Quantity_00" & i).ColumnHidden = False
    Form_Y_SubF_LP.Controls("DistributionEQ_00" & i).ColumnHidden = False
Next
'Hide unnecessary columns
For i = 8 To ProtQuant + 1 Step -1
    Form_Y_SubF_LP.Controls("Item_00" & i).ColumnHidden = True
    Form_Y_SubF_LP.Controls("Quantity_00" & i).ColumnHidden = True
    Form_Y_SubF_LP.Controls("DistributionEQ_00" & i).ColumnHidden = True
Next

'Change the caption of columns to the real name of each prototype
prot = DLookup("[Prototype]", "Y_Configurações", "[Program]= '" & ProgramName & "'")
For i = 0 To UBound(Split(prot, ";"), 1)
    Form_Y_SubF_LP.Controls("Item_00" & i).Properties("Caption") = "Item_" & Split(prot, ";")(i)
    Form_Y_SubF_LP.Controls("Quantity_00" & i).Properties("Caption") = "Quantity_" & Split(prot, ";")(i)
    Form_Y_SubF_LP.Controls("DistributionEQ_00" & i).Properties("Caption") = "DistributionEQ_" & Split(prot, ";")(i)
Next

Answer: A simple solution is to set Close Button = No on the form's property sheet, then add a command button, cmdCloseMe, with this for its On Click event:
Private Sub cmdCloseMe_Click()
    DoCmd.Close acForm, Me.Name, acSaveNo
End Sub

If you need your form displayed in Datasheet View, you would need to embed it in a subform control of another form and add the cmdCloseMe button to that form.
Comment: My form it is a datasheet.. but i'll try to do what you said.. thanks for your help!


notation for summation of subsets of time data

Question: I am analysing electricity consumption by checking firstly if the demand (say beta) is greater than a certain constant limit (baseline, say alpha) for every hour of the year, and then summing this difference (beta - alpha) each hour over a day for those hours greater than the baseline (ignoring hours where beta < alpha).
There may be e.g. 10 days in the year where the consumption exceeds the baseline and I would like to represent the largest of these summations.
Is there notation for describing the maximum value of this daily summation?
Answer: Let $D(t): \lbrace 1,2,\dots,365 \rbrace \to \mathbb{R}$ be the function that takes as input the day of the year and as output the summation over the hours that you described. Then, one would write $$ \max \lbrace D(t) ~\vert~ 1 \leq t \leq 365 \rbrace.$$
You would read this as "the maximum value of the function $D(t)$ over the domain of integers between 1 and 365 inclusively."
Comment: thanks - so, if beta is the hourly demand, and k is the baseline constant, then something like: $\max \lbrace D(t) ~\vert~ 1 \leq t \leq 365 \rbrace$ where
$D(t) = \sum_{t=0}^{24} (\beta_{(t)} -k) \text{ for }\beta_{(t)} > k $  (I only want to sum the exceedances)


Do 3rd party camera apps really improve picture quality?

Question: I've got a Samsung Galaxy Grand Neo (Jelly Bean). It has a 5 mp camera but I'm not satisfied with the picture quality. Will it help if I use another app like Camera Zoom FX or anything? If yes, then which app should I use?
Answer: Some camera apps improve the photos taken, but it's usually on a case-to-case basis. Some phones have limited / low-quality hardware and won't benefit from 3rd-party apps. Others have high-quality hardware, but poor camera software.
It's difficult to recommend a specific app. I have a Samsung Galaxy S4 and have installed the following: Camera Zoom FX, ProCapture, Snap Camera, official Google Camera. However, I don't get very good photos, probably because I think the camera is defective. My phone has been dropped several times already.
But your mileage might vary. Try the different apps, and see what works for you. There are trial versions.


Internal process to recertify DMZ zones

Question: How would a DMZ zone recertification process look like? Say we create a separate security zone for each application hosted in DMZ. Now we would like to get in touch with the person in charge for the given zone to ask if it's still needed. How could this be handled? Are there any ISO 27001 directives related to this?
Comment: Re-certify is maybe wrong term. Currently there's no process at all. After a zone is provisioned there's no life cycle management so it's possible that some of them are not even needed. We want to create a process to get in touch with the zone owners to check if the zone is still in use.
Comment: I'm not asking about how to get in touch with zone managers. I look rather how to address it in first place (how would such a process look like, maybe someone did something similar before) . There's no standard we need to stick with, so I guess it might complicate it.
Answer: What you are asking for is basic lifecycle management:

Design
Deploy
Maintain
Review
Decommission

You need a policy and a procedure to review all the firewall configs (including the zones) to ensure that the current 'design' is meeting the needs and goals of its intent. The frequency of this review is up to the needs of your organisation, yearly might be fine.
Each 'zone' requires an 'owner' who designs and drives the controls in this zone. Any changes to the zone require the owner's input. Ownership is set up as early as possible to prevent the owner being surprised that they are responsible for critical infrastructure.
During the review phase, each relevant element of the zone is verified by the owner as being current, and the verification is challenged by an outside party (GRC, Information Security Steering Committee, etc.) as being accurate.
Once verified or modified, the zone returns to a 'maintenance' state. If the zone is deemed redundant, a decommissioning phase is initiated which defines and tests the removal of the zone in order to ensure a complete and secure decommissioning with minimal impact to the organisation.
As for ISO 27k, the terms you are looking for a 'controls review', and there is a whole document about this: ISO 27008
Comment: DMZ zones are firewall configs - it's the same concept
Comment: As I said, verification has to be done against the *design* of the zone. What is its purpose? Why was it designed that way? Is the design and its implementation still relevant? That's what you review and that's how you review it. The paper you need to read is the design docs. And, as I say, if it is not needed, you go through a decommission process.
Comment: The level of surprise you introduce is directly proportional to the level of resistance you will encounter. they should know there is an annual review and a notice ahead of time is just simply professional courtesy. How much time would *you* like before a friendly audit?
Comment: Thank you, I appreciate your comment! Our focus is on the "review" part. I have to mention that for now *for whatever reason* we won't make it on firewall rules level for now, it's more about to verify if the zone is need. Could you please give me some hints how to handle this, any reference to any type of paper I could read ? One year as you mention should be fine. But should this be as simple as do you need the zone *yes* or *no* or should they also justify why ? What when they say , no we don't need it.
Comment: Should the zone managers be notified prior the upcoming review say one month before ? What would you recommend ?
Comment: True. A very valid point!

Internal process to recertify DMZ zones


"There will be no extensions given for this project." order?

Question:
There will be no extensions given for this project.

In the above sentence I need some explanations about grammatical role of "given".
Answer: The sentence is written in the passive voice and is equivalent to any of the following:

No extensions will be given for this project.
The teacher will not give any extensions for this project.

The verb "to give" serves the same role in each sentence.
Answer: More than one explanation exists.

If it is a coherent phrase, the entire phrase "no extensions given for this project" has a grammatical role.   If we regard "there" as a pronoun and a subject, then "no extensions given for this project" is a subject complement and the clause is in canonical order.   If we regard "there" as an intransitive preposition, then it is the subject complement, the long phrase is the subject and the clause is in inverted order.  This inversion is triggered by the existential semantics of "there".
If it is not a coherent phrase, then "no extensions" acts as either subject or complement on its own, "given" is free to be part of the verb of the clause, and "for this project" is an adverbial prepositional phrase.   Godel9 has already posted an answer under this assumption, showing one active voice equivalent of the passive voice interpretation.
Under this interpretation, the grammatical role of "given" is to be a part of the passive future construction "will be given".

I prefer a different interpretation:
"No extensions given for this project" is a coherent noun phrase, and the keyword noun is "extensions".   This noun has two direct modifiers: the adjective "no" and the participial phrase "given for this project".
The participial phrase has constituents.   It is formed by the so-called past participle "given", which is modified by the prepositional phrase "for this project".   Delving deeper, the preposition "for" takes "this project" as its object, and the demonstrative adjective "this" modifies the common noun "project".
"Given" is a non-finite form of the verb to give.   As a non-finite form, it has no tense, forms no predicate, and takes no subject.   Instead, in this case it takes a prepositional phrase as an adjunct or adverbial modifier, forming a participial phrase.
Just as the prepositional phrase modifies the participle that precedes it, the participial phrase modifies the noun that precedes it.
Under this interpretation, the grammatical role of "given" is to form an adjectival participial phrase.

There you go.   You now have two explanations about the grammatical role of "given".


Is a bearded dragon measured from nose tip to end of tail tip or nose tip to begining of tail

Question: How is a bearded dragon measured? some say from the tip of the nose to the tip if the tail. Then some say from the tip of the nose to the tail base. Which is correct?
Answer: The proper measurement of a lizard's size is "snout to vent length" (SVL). The measurement is taken taken from the tip of an animal's nose to the opening of the cloaca at the tail's base.
Measuring the entire length (including the tail) has no biological meaning and can be somewhat deceptive about what it means. The length of a tail varies so greatly, it has little correlation with age, size, health, or whatever other biological factors you might be trying to determine from a reptile's overall length. Reporting the entire nose-to-tail length is typically reported to exaggerate the actual size of the animal (as in "a ten-foot alligator was found in the neighbor's pool")… but beyond that, such measurements have little biological value.


Destruction order of static objects in C++

Question: Can I control the order static objects are being destructed?
Is there any way to enforce my desired order? For example to specify in some way that I would like a certain object to be destroyed last, or at least after another static object?
Answer: The static objects are destructed in the reverse order of construction. And the order of construction is very hard to control. The only thing you can be sure of is that two objects defined in the same compilation unit will be constructed in the order of definition. Anything else is more or less random.
Comment: There are techniques to work around the problem if you need an order: see http://stackoverflow.com/questions/335369/finding-c-static-initialization-order-problems#335746
Comment: Technically the *completion of the destructor* happens in the reverse order of the *completion of the constructor*.  This makes a difference in the case where a static object is initialized during the constructor of another. See C++14 [basic.start.term]/1
Comment: I -1 because this answer isn't really an answer to the OP's question.
Comment: Just answer me if possible; if I am having static object 'a' and 'b' constructed respectively, now if 'a' destructed before 'b', regardless of how this can happen. Does the program is ill-formed
Answer: The other answers to this insist that it can't be done. And they're right, according to the spec -- but there is a trick that will let you do it.
Create only a single static variable, of a class or struct that contains all the other things you would normally make static variables, like so:
class StaticVariables {
    public:
    StaticVariables(): pvar1(new Var1Type), pvar2(new Var2Type) { };
    ~StaticVariables();

    Var1Type *pvar1;
    Var2Type *pvar2;
};

static StaticVariables svars;

You can create the variables in whatever order you need to, and more importantly, destroy them in whatever order you need to, in the constructor and destructor for StaticVariables. To make this completely transparent, you can create static references to the variables too, like so:
static Var1Type &var1(*svars.var1);

Voilà -- total control. :-) That said, this is extra work, and generally unnecessary. But when it is necessary, it's very useful to know about it.
Comment: Hmmm -- if *pvar1 and *pvar2 are the static variables whose construction and destruction order you want to control I can't help but remark that you solved this problem by making them not static any longer ;-). Your class is actually often not needed at all: If you can have all variables in the same translation unit (which may well be impossible due to circular header dependencies) you could simply declare them, which perfectly well defines construction (and hence destruction) order.
Comment: Your class trick is only needed and possible if (1) Your objects can be dynamically constructed and don't need too much information to be constructed (which would typically only be available in their "natural" TU); (2) if all needed headers can co-exist; (3) if indeed no reverse of any possible construction order fits your needed destruction order.
Answer: Static objects are destroyed in the reverse of the order in which they're constructed (e.g. the first-constructed object is destroyed last), and you can control the sequence in which static objects are constructed, by using the technique described in Item 47, "Ensure that global objects are initialized before they're used" in Meyers' book Effective C++.

For example to specify in some way that I would like a certain object to be destroyed last, or at least after another static onject?

Ensure that it's constructed before the other static object.

How can I control the construction order? not all of the statics are in the same dll.

I'll ignore (for simplicity) the fact that they're not in the same DLL.
My paraphrase of Meyers' item 47 (which is 4 pages long) is as follows. Assuming that you global is defined in a header file like this ...
//GlobalA.h
extern GlobalA globalA; //declare a global

... add some code to that include file like this ...
//GlobalA.h
extern GlobalA globalA; //declare a global
class InitA
{
  static int refCount;
public:
  InitA();
  ~InitA();
};
static InitA initA;

The effect of this will be that any file which includes GlobalA.h (for example, your GlobalB.cpp source file which defines your second global variable) will define a static instance of the InitA class, which will be constructed before anything else in that source file (e.g. before your second global variable).
This InitA class has a static reference counter. When the first InitA instance is constructed, which is now guaranteed to be before your GlobalB instance is constructed, the InitA constructor can do whatever it has to do to ensure that the globalA instance is initialized.
Comment: For later readers: in Effective C++ *3rd edition*, this information is now in Item 4, not 47.
Answer: Short answer: In general, no.
Slightly longer answer:  For global static objects in a single translation-unit the initialization order is top to bottom, the destruction order is exactly reverse.  The order between several translation-units is undefined.
If you really need a specific order, you need to make this up yourself.
Comment: Dude! Was I ever sleepy when I wrote that! Even I have no idea what I meant :)
Comment: Although your order I normally right I think the standard doesn't require order so it's really compiler dependant.
Comment: Sorry, I could not understand this comment.

Yes, the order is between translation units is random.  Did I say something else?
Answer: Read:
SO Initialization Order
SO Solving the Order of Initialization Problem
Answer: Theres no way to do it in standard C++ but if you have a good working knowledge of your specific compiler internals it can probably be achieved.
In Visual C++ the pointers to the static init functions are located in the .CRT$XI segment (for C type static init) or .CRT$XC segment (for C++ type static init)  The linker collects all declarations and merges them alphabetically.  You can control the order in which static initialization occurs by declaring your objects in the proper segment using
#pragma init_seg

for example, if you want file A's objects to be created before file B's:
File A.cpp:
#pragma init_seg(".CRT$XCB")
class A{}A;

File B.cpp:
#pragma init_seg(".CRT$XCC")
class B{}B;

.CRT$XCB gets merged in before .CRT$XCC.  When the CRT iterates through the static init function pointers it will encounter file A before file B.
In Watcom the segment is XI and variations on #pragma initialize can control construction:
#pragma initialize before library
#pragma initialize after library
#pragma initialize before user

...see documentation for more
Answer: No, you can't.  You should never rely on the other of construction/destruction of static objects.
You can always use a singleton to control the order of construction/destruction of your global resources.
Answer: Do you really need the variable to be initialized before main?
If you don't you can use a simple idiom to actually control the order of construction and destruction with ease, see here:
#include <cassert>

class single {
    static single* instance;

public:
    static single& get_instance() {
        assert(instance != 0);
        return *instance;
    }

    single()
    // :  normal constructor here
    {
        assert(instance == 0);
        instance = this;
    }

    ~single() {
        // normal destructor here
        instance = 0;
    }
};
single* single::instance = 0;

int real_main(int argc, char** argv) {
    //real program here...

    //everywhere you need
    single::get_instance();
    return 0;
}

int main(int argc, char** argv) {
    single a;
    // other classes made with the same pattern
    // since they are auto variables the order of construction
    // and destruction is well defined.
    return real_main(argc, argv);
}

It does not STOP you to actually try to create a second instance of the class, but if you do the assertion will fail. In my experience it works fine.
Answer: You can effectively achieve similar functionality by having a static std::optional<T> instead of a T. Just initialize it as you'd do with a variable, use with indirection and destroy it by assigning std::nullopt (or, for boost, boost::none).
It's different from having a pointer in that it has preallocated memory, which is I guess what you want. Therefore, if you destroy it & (perhaps much later) recreate it, your object will have the same address (which you can keep) and you don't pay the cost of dynamic allocation/deallocation at that time.
Use boost::optional<T> if you don't have std:: / std::experimental::.


How to make an image shown only on a particular domain

Question: Is there is a secure way that makes an image allowed to display within a particular domain, and preventing it to be shown on any other website?
Comment: No. What has this got to do with security?
Comment: I think we need to understand your situation better. What do you mean by "shown"? Do you want to prevent people from copying it and serving it from their site? Do you mean "hot linking"?
Comment: I meant the both meanings
Answer: There is the notion of a HTTP "referer" (originally a misspelling of "referrer") which your browser will send when requesting pages and assets (images, stylesheets etc). Some security products scrub this though (as a privacy risk) so if you're not willing to accept some false positives (users unable to see the images who should) then this would be a bad solution.
You could set it so the images are not revealed if the referring page is not your website/domain and can either do it:

On the web-server if it supports it like using .htaccess permissions on Apache

Or

You can have your images link to a script which will display the correct image if the referrer matches but send a different file if not (i.e. yoursite.com/showimage.php?image=holiday.jpg ) for instance, which would check the referrer in code and decide whether or not to show the image, see $_SERVER['HTTP_REFERER']; for PHP.

The HTTP REFERER is set by the user so can easily be forged so is not a good security mechanism for a determined attacker at all.. but should serve a useful purpose for most non-technical users where it is only your bandwidth you are trying to protect.
You can see what headers are set by your browser by clicking on this link which should show that you were directed to it via this site.
Comment: Doesn't prevent anyone from downloading it and uploading to their server, or proxying via their server.
Comment: Agreed. It's useless for any person who is fairly technically competent (and if it's been saved or transferred to somewhere else then all bets are off as it's outside your control!). Better than nothing but I make no promises this is more than security by obscurity. For some people this is all they want, depends on their risk management and perceived threat actors. If you were looking for something bullet-proof, then we start getting into the [Analog hole](https://en.wikipedia.org/wiki/Analog_hole) problem :).
Comment: "not a good security mechanism" Damn! Hopefully, I'm not on infosec exchange! Don't take it bad: there's actually no safe way to do what OP asks for. Once it's online, one cannot prevent it to be publicly shared.
Comment: It is "a" security mechanism though.. just like locking your front door assists with preventing getting burgled ;-).. whether it's a good one or not is definitely a bigger discussion but not everyone who visits this site is looking for countering advanced persistent threats ;-). I also have given no illusion this is a fantastic solution and read the question as the user is trying to protect their site's bandwidth from hot-linkers not the images themselves.
Comment: Thank you for your answer, but as you mentioned, this is not a good security mechanism and I would like the image to be fully secure for a particular domain. what I want is that just like in Captcha services, for example the reCaptcha, that ensure a Captcha image is displayed  for a particular domain, what is the mechanism that Google uses to do so?.
Comment: I think even Google suffers from the [Analog hole](https://en.wikipedia.org/wiki/Analog_hole) problem. As Xenos said there is no entirely safe way to do what you have asked.


Looking to get my first credit card

Question: I have no prior credit history. Does anyone know of a credit card company that doesn't require much (if any) deposit money down and has a high approval rate for first time credit card holders?
Comment: In which country are you seeking a credit card? Are you willing to provide any additional information such as whether you are a student or have a brand-new job, etc.?
Comment: @DilipSarwate US, and yes I would be willing to provide that information, conveniently I am a student with decently good grades and just recently got hired at a new store so I'm hoping those factors will benefit me somewhat.
Comment: I think the question you need to ask yourself is why you need a credit card. Building credit history is important, but unless you can be able to pay off the max balance of that card every month it doesn't make sense to get one.
Answer: It used to be quite easy for students to get credit cards. When I was in college in the early 1980s, credit card companies set up tables in the student center and offered low-limit cards along with free t-shirts on an almost daily schedule. The Credit CARD Act of 2009 made this much more difficult for banks.
If you have a bank or credit union account, the first thing I would do is talk to them about getting a card. Some banks offer a VISA Student Card specifically for college students. My daughter was able to get one when she turned 18, just before starting college. The credit limit is very low ($200 for freshmen, increasing each year until the limit is $500 during senior year). After graduation, it converts to a regular VISA account with a limit that depends on post-graduation income and the now established 4 years of credit history. The VISA web site has a list of banks offering this type of card.
Now I will give you the same unsolicited advice I gave my daughter, and the same advice I think most others here would give you. For building credit, this kind of card is excellent, but you should still use it very sparingly, and pay off the balance every month. Make it a hard rule to never pay interest on a credit card bill. I told her to charge perhaps one or two purchases totaling no more than $25-$50 each month, and pay them off as soon as the statement arrives. This is much easier if you have a deposit account at the same bank, since you will be able to pay the bill instantly on line. Have your employer direct deposit your paychecks into that bank account, if at all possible.
Comment: The college's credit union may also offer accounts to students; if you don't already belong to a CU, check there.
Comment: @MHH - Really? Wow. I don't remember that from my college card. But, then again, I don't remember a lot of details from that era. It was pretty much automatic for my daughter to get the student card from USAA--we're long-time members, so she could open a bank account and get the card with a quick online application (but not until her 18th birthday, a couple of days before she left for school).
Comment: In addition, prior to 2009, credit card companies would allow students to count tuition money they got from their parents or scholarships as income! Can't do that anymore.
Comment: I can't be certain that it was written down anywhere, but the person who signed me up for a card at the student union back in 2004 said "remember to count your tuition as income." I called the credit card company just to be sure and they said yes you can do that. I got something insane like a 5k line of credit. It felt all sorts of wrong but luckily I was responsible enough to only make a few purchases a month and pay the card off in full.
Comment: The income you declare on a credit card application is on a honor system. They don't validate the income you write is correct. You could lie and put down $1,000,000 as your income if you wanted.
Comment: Never, ever, think of your credit limit as the amount you can safely spend. If I maxed out all my credit cards, I can't imagine how I would ever pay it all back. For the most part, I limit my spending to what I can afford to pay in full when the bill arrives. Sometimes I will run up more in special cases and take a couple of months to pay it off, but that should NEVER be a regular practice.
Answer: Department store cards will appear on your credit report and is often much easier to get approved for. All my friends that have applied for a Macy's card have always been approved. If you are new to the country, department store cards are a great way to build history. Target and Nordstroms are two other department stores to look at. Target is my first suggestion since they carry every day items and will be easy to consistently put charges on the card to build credit history.
Answer: Store cards are incredibly generous with their approvals. I recently graduated and started working making around 100k and Bank of America only approved me for a $1000 credit limit... Macys however approved me for $2000 for everyday purchases and $5000 for large-ticket items like furniture sets. It may not sound so glamorous to have a specific store card but they all allow you to build credit, and a credit card really doesn't let you do anything a debit card can't unless you're buying things you don't currently have the money for.
Amazon is also issuing credit cards now, so with one of those there really isn't much you couldn't buy if you needed.
Comment: Amazon is through Chase so the approval process is not so different from any other credit card. If you have no credit history, you may be denied.

Looking to get my first credit card


Where is my minecraft jar file

Question: I have a problem.I can not find my jar folder for minecraft.I have 1.7.4.So does anyone know where the jar file is?
Answer: Open Start menu, if in windows 7 type in %appdata% and press enter, if on widndows xp open start, click run and type in %appdata% and press enter. When i %appdata% folder, open .minecraft folder and then go to bin or versions. If in versions folder just open the folder that has the name of the minecraft version that you are looking for.
Answer: So, we're talking about a version of Minecraft newer than 1.5, which means that the game organizes its files slightly differently.
Seeing as you can have multiple "profiles" in the newer launcher, and that they can have different versions, one might ask: How might they manage all these different versions? It's actually quite simple if you think about it. Basically, the game uses a folder containing multiple other folders, each of these containing a .jar and dats file for a certain version of Minecraft.
First off, navigate to the AppData folder where the Minecraft files are located. Assuming you're running Windows 7, open the file browser and search for "%appdata%". The first result should be the right folder. Alternately, navigate to it manually by going to: "C:/Users/[your username]/AppData/Roaming". Note that AppData is a hidden folder, so enable "Show hidden folders" if you don't already have it enabled.
Your .minecraft folder should be located here; open it. There should be a folder labeled "versions", which is what we're going after. Open it and look for a folder with the same name as the Minecraft version you are looking for; in your case, it will be named "1.7.4". Inside this folder should be the jar file you're looking for.

Where is my minecraft jar file


Inverting Laplace transform

Question: I am trying to solve the integral-differential equation: $$x'(t) + \int_0 ^{t} (t-s)x(s) ds = t + \frac{1}{2}t^2 + \frac{1}{24}t^4$$ With $x(0) = 1$ Taking the Laplace transform of this and using the convolution theorem I obtain: $$\bar{x}(p) (p^3+1) = p^2 + p + \frac{1}{p} + \frac{1}{p^2}$$ And now I am really struggling to invert this to find $x(t)$, so any help is very much appreciated, Thanks
Answer: I only know how to solve it directly.
You decide if it is useful to you or not.
Differentiating (1) wrt $t$ twice and we obtain:
$$x^{(3)}(t)+x(t)-1-t^2/2=0$$
The solution (via Mathematica) is given by:
$$x(t)=1+t^2/2+c_1e^{-t}+c_2 e^t \sin\left(\frac{\sqrt{3}}{2}t\right)+c_3 e^t \cos\left(\frac{\sqrt{3}}{2}t\right)$$
$$1=x(0)=1+c_1+c_3$$
Therefore $c_3=-c_1$.

Inverting Laplace transform


i replaced cv axle but still making squealing noises

Question: i have a 2005 hyundai sonata. Can a cv axle made for anti lock brakes be used on my car if i dont anti lock brakes? friend installed anyway.
Comment: I just did a part search and see no evidence there are different parts for antilock brakes. Kind of surprised they weren't standard. (where in the world are you?).  Note there are different parts depending on which engine you have, and it is entirely possible they are nearly the same but slightly different length.
Answer: Does the cv axle really have anything to do with ABS? The cv axle is just splined from the trans to the hub, so I'd say yes you can use the cv axle!
Comment: There may or may not be a tone wheel on the hub side of the axle. That's what's meant by ABS/Non-ABS. Some setups are different where the tone wheel is part of the wheel bearing.
Comment: thank you   , wasnt sure if i had to get the one that says without anti-lock brakes
Answer: Yes, you can. Both versions of the axle are the same length. The only difference is the tone wheel that's pressed on to the knuckle end of the axle. See Napa part numbers NMD 958395 & NMD 958399.


Creating blacklist on login page

Question: I am working on how to secure login page from tautology attack. Can anybody help me on how to create blackist of SQL keywords in php ?
Answer: If you are worried about SQL injection, try whitelisting instead of blacklisting . Also parameterize input parameters and white-list only allowed chars, like [a-zA-Z0-9.] for example. SQL injection (always) relies on some delimiter like "'"--;*", or '%' in case of MS based db. I'd go with white-listing instead of thinking of every possible dangerous character there might be depending on back-end system.
Comment: or treat all inputs as a string

Creating blacklist on login page


How to capture a Phone Number

Question: I'm looking to create a windows application in vb.net or c#.net that will capture the phone number of incoming calls.  This would be a land line.  What would the hardware requirements be?  Which .Net libraries would be used?
Comment: Could you point a camera at a phone with caller ID? Then it's just an OCR problem... :-)
Answer: You'll need a recent modem that supports Caller ID and is supported by Windows.  Windows provides an API for talking to the modem called Telephony Application Programming Interface, a.k.a. TAPI.  Unfortunately, this API cannot easily be accessed from managed code.
Your best bet for getting access to Caller ID in managed code would be to use one of the free or shareware TAPI OCX controls that sit on top of the TAPI API, most of them should have a simple API that would give you the incoming number.  Google for something like 'TAPI OCX' or 'TAPI Caller ID' to see what's available.
Answer: If it's a landline you're talking about, all you would need would be a standard analog modem and a serial port to connect it to. You'd use standard AT-style commands to control the modem and monitor incoming data.
For specific commands and events, check out the Wikipedia article on the Hayes AT command set
Answer: If you have a VOIP system, your system provider may have an API available to do this. Based on my experience, it will cost extra and be buggy.

How to capture a Phone Number


What opposes a smooth motion of a rubber eraser on a glass surface?

Question: A metal block smoothly moves on a glass surface. But a rubber eraser doesn't move very smoothly on a glass surface. In each of the cases, the surfaces are smooth at the macroscopic scale. If the latter is due to friction at the molecular level, how come a metal block can be moved happily on a glass surface?
Comment: I'm not sure what the "latter" is referring to (smooth at macroscopic scale? rubber not moving smoothly?) and what that means for the metal block.
Comment: @KyleKanos Why doesn't the rubber block move smoothly on a glass surface? Is it due to friction at molecular level? If so, why is such a friction not seem to be there between metal and glass?
Answer: Glass is smooth but it's not perfectly smooth. Glass has little imperfections. Otherwise it'd be frictionless. The better a material can dig into those imperfections and grip them, the better higher coefficient of friction that material will have when it's pressed up against glass. One reason rubber has such a high coefficient of friction is because rubber is a flexible material, especially when compared to metal. A flexible material can squeeze into those little imperfections in glass like a lock into a key, resulting in a high coefficient of friction. Metal tends to be relatively inflexible. It won't squeeze into those imperfections very much.
Another reason rubber has such a high coefficient of interaction is due to Van Der Walls forces, demonstrated for the first time in only 2013 (Matthias, 2013). Van Der Walls forces come from molecules' electric dipoles. Rubber, involving lots of highly-electronegative carbon atoms bonded to low-electronegativity hydrogen atoms, creates lots of dipoles for other molecules to stick to. Metals, on the other hand, tend to be of middling electronegativity, neither too high nor too low, resulting in few strong dipoles. Many metals are a single element which further reduces the possibility of dipoles.
Answer: It all comes down to molecular arrangement. Metal atoms are arranged in a somewhat crystalline configuration called a lattice, and this orderly arrangement is what makes the surface of a buffed and finished metal surface having less friction than a rubber. Looking at the rubber surface microscopically, it isn't as smooth as you think it is, and the molecular arrangement isn't as orderly. On the other hand though, the adhesion force between rubber molecules seems to be way more than that of a metal, I'm not certain about that, but empirically it's highly probable.


What do the PCB markings mean?

Question: On a printed circuit board, I see lots of tiny letters and numbers. Is there some kind of standard that dictates what letter indicates what type of component?
Answer: The technical term for the markings is "reference designators" (aka "refdes") and there are a few standards can define them. Take a look at this wikipedia page for a quick overview.
http://en.wikipedia.org/wiki/Electronic_symbol
http://blogs.mentor.com/tom-hausherr/blog/tag/reference-designator/

For schematic components, most EDA tools start off with one or few alphabets and then a sequential number. For example, R1 for the first resistor, C1 for the first capacitor, IC1 for the first IC and so on. You can download a free EDA tool such as Eagle to play around. Also, see the wikipedia page for a few more examples.
For PCB footprints, different vendors do make naming convention suggestions. See Altium's suggestions here, for example.
Edit: I do NOT know anyone personally that refers to this as a strict standard or a standard at all. It's mostly what you are used to and familiar with.
Answer: The standard which I think is most commonly used for symbols/reference designators is ANSI/IEEE Std 315 (1975). It has been revised a couple of times since but the basics have remained pretty much the same.
You need to be a subscriber to download it.
I have a copy here on my machine, here is an example of the first few letters:
<code>A
*†
(see also U and 22.2.4)
electronic divider
electronic function generator (other
than rotating)
electronic multiplier
facsimile set
field-polarization amplitude
modulator
field-polarization rotator
general circuit element
gyroscope
integrator
positional servomechanism
sensor (transducer to electric
power)
separable assembly
‡
separable subassembly
telephone set
telephone station
teleprinter
teletypewriter

AR
amplifier (other than rotating)
repeater

AT
bolometer
capacitive termination
fixed attenuator
inductive termination
isolator (nonreciprocal device)
pad
resistive termination

B
blowermotor
synchro

BT
barrier photocell
battery
battery cell
blocking layer cell
photovoltaic transducer
solar cell

C
capacitor bushing
capacitor
</code>
Comment: A flag states that the answer has been downvoted because it's incomplete.  I understand that you've not completed it because you're quoting this copyrighted work under the [Amount and Substantiality Fair Use exception](http://en.wikipedia.org/wiki/Fair_use#Amount_.26_substantiality).  I'd upvoted you before the downvote or flag, your net rep is +18 for this answer.  This, in my opinion, is the correct answer to the question.  You might mention IEC 60617, but they're basically the same AFAIK.
Comment: Ah, I see. As you guessed it's intentionally incomplete - I just quoted a small part to give an idea of the detail the standard goes into.
Answer: In addition to that, you will also find other markings on the PCB.  These are done by the fab house and are used to show UL certification numbers, UL standards that the PCB conforms to, sometimes showing RoHS compliance, and sometimes even a logo of the fab house.  These can be done in silkscreening process, or anti-soldermask processes.
You can look up UL cert numbers here:  http://database.ul.com/cgi-bin/XYV/template/LISEXT/1FRAME/index.htm  Fill in the UL file number with the ~7 digit number on the PCB to find who actually fabricated it.
Comment: @kinokijuf, this is an equally valid answer to the possible source of markings on a PCB and I could see a marking like this show up next to a component. Why the downvote for a valid yet less directly correct to your question answer?
Comment: -1 I was talking about the markings next to the components
Comment: @kinokijuf, note I said "In addition to that..." as an extension of other markings you find on a PCB.
Answer: Yes, there is, but its not really a standard, everybody simply does it more or less the same way.

IC? stands for an IC
R? stands for a resistor
C? stands for a capacitor

these are the "names" of the component. the boardmaker then has a kind of list where is written what name stands for what component, e.g. R1 - Resistor, 100Ohms
here is a more complete list: http://www.electro-tech-online.com/circuit-simulation-pcb-design/112835-component-designators-pcb-design.html
Comment: On all PCB I've seen, ICs are marked as U.
Comment: U is "undefined", which what got used for ICs when they first became available.  They are common now, so it makes sense to give them their own designator.  I use IC in all my schematics.
Comment: I think that historically, 'IC' was/is found on British PCBs whilst 'U' is found on US boards. Likewise for transistors, 'Tr' used to be common in Britain but the American 'Q' designator has largely replaced it.
Comment: I can confirm, I hav a board in front on me with "IC"notation
Comment: well, as I said, there is no real standard. but yes, U is much more common
Comment: I use 'IC' on my own boards. My PCB software uses 'U' by default, I keep meaning to change it.
Comment: It is really a standard, or rather a set of standards: IEC 60617 and ANSI standard Y32 (aka IEEE Std 315).  See [Oli's answer](http://electronics.stackexchange.com/a/25323/857) for an excerpt.

What do the PCB markings mean?


If I add a user to sudoers to be able to perform root functions

Question: If I add a user to sudoers to be able to perform root functions, does it mean this user is the same as root?
Comment: What do you mean by "is the same as root"?
Comment: What actually is your question, please? I also tend to thinking that what you want to know can just be searched online and read about... If it's just for the knowledge sake, I think it must have been written somewhere sometime somehow. :) Btw, welcome to Ask Ubuntu @NatureSquare.
Answer: No. It means that the user has the right to use the sudo command. Everything else he do on the system (without sudo) is done with his now mal privileges.
Answer: No, Sudoers is controls who can run what commands as what users on what machines and can also control special things such as whether you need a password for particular commands.
You can give all command privileges to user, or just give some privileges to run particular command, like :
#allow all command to user with sudo
iamsudo  ALL=(ALL)       ALL

#only allow reboot command to user with sudo
iamsudo ALL=/usr/sbin/reboot

Hope this will help.


Could someone who chooses to downvote please leave a comment as to why they have chosen to do so?

Question: I've noticed a lot of questions getting downvoted with no comment or clarification on how they can be improved or a reason for the downvote. Its not required, but it would be nice if folks would leave a little note in the comments telling the OP why they have downvoted.
Comment: @dancek - Or amusing, depending on how you want to look at it.
Comment: This suggestion (which I second) having been downvoted without comment is sort of disturbing...
Comment: I've noticed several threads where the question and all the answers have all been downvoted by 1. I think we are getting people who are downvoting just for the sake of the topic being discussed. Isn't there any mechanism to prevent an entire topic being down voted like that?
Comment: @What - there is no mechanism to deter it. However 1 question up vote is 2.5 times more powerful than a downvote and 1 answer up vote is 5 times more powerful in the scheme of reputation. Sure it makes questions and answers a bit less appealing if they are downvoted, but people are free to sue their votes as they see fit.
Comment: The criteria for +/- vote on an answer is whether one found the answer useful or not, which one can easily explain. It appears therefore that anonymous downvoters may be using another criteria, which then does not justify their downvoting.
Comment: Would the site consider having the -downvoters leave their comments anonymously? If they don't, their vote is not registered.
Answer: This topic has been hashed over many times on many SE sites.  The short of it is that commenting on your own down-vote essentially removes your anonymity from that vote.  Anonymity is an individual right that is central to the integrity of any public voting system, and not everyone is comfortable with giving up that right.
I personally am very much for adding commentary to go with a down-vote, or up-voting existing commentary which applies.  Otherwise, the down-vote is not really serving any constructive purpose.
Again though, not everyone is as comfortable giving up their anonymity in the voting process.  We'll just have to accept that and respect their rights.
Comment: What does anonymity have to do with the criteria of +/- voting and giving a reason for it? It appears you are defending those who can't stand by their votes.
Answer: I believe that if you are downvoting something, there should at least be an explanation as to why, unless someone already explained for you.
Downvotes, while they may be anonymous, I suspect are as such because listing everyone who voted on everything would be massive clutter. It could be done, but there are practical reasons not to (and I don't intend on speaking for the admins here, I'm just speculating).
I've found a few of my answers being downvoted. I asked about one of them in chat today and someone (who had not seen my answer to that question before) gave his opinion as to why it might have been (or why he did). I agreed and edited accordingly. However, just downvoting with no comment as to why the answer isn't good isn't helping anyone.
Given the nature of the topics discussed, and how some of them are historically divisional, I can't help but wonder if people are simply downvoting a post that they don't agree with, even if it's a valid answer from a particular point of view, and isn't overstating itself. If that's not the case, then commenting would only serve to make the answers better quality.
Why seek anonymity on your downvote? If you are going to voice your own opinion in a vote, then stand by it and defend it. Perhaps you may change someone's mind or clarify a point by doing so!


Comparing documents within MongoDB

Question: I'm looking to compare fields between potentially millions of documents within a mongo collection. The fields will be determined ahead of time and weights will be given to each field. These weights will then be used to return document pairs representing suggestions for 'like' documents. For instance, if 2 documents are being compared and both have the same value for the field 'first_name', the weight table will be referenced and the score for the pair will have that weight added to it. If another field is the same between the two, the score will updated to reflect a higher likeness.
I'm currently approaching this by iterating through the initial result set, then having an embedded iteration that also goes through the result set and compares each document to the document that the first iterator is on (extremely inefficient). This is currently all done by php as it grabs elements through the cursor.
I'm open for any suggestions including MapReduce implementations (doesn't really seem applicable), cursor manipulation, pretty much whatever you can conjure up to simplify the process because im working at O(n^2) complexity right now (Well, a little better as I skip the documents that have been covered so far by the first iterator).
Answer: To avoid n^2 you would have to look at storing fields and their values in a reference collection, e.g. :
<code>{
    field: "firstName",
    value: "Remon",
    documents : [ <list with all document _ids of documents that have "field" set to "value">]
}
</code>
This way you can query directly on this collection to get all documents that are "like" your source document. Additionally this allows you to query for multiple key/value pairs with a single O(n) query.
Obviously the only tricky thing is maintaining this reference collection in the first place but in your case that seems pretty straightforward (update references when you update the fields).
Does that help?
Comment: I looked at creating a setup pretty similar too this and was hoping to avoid creating additional collections to be maintained but this is looking more like the route I'm going to have to go. Thanks for the input.

Comparing documents within MongoDB


How to perform a filter in a child entity inside an Aggregate Root in Entity Framework

Question: I'm trying to access an item in a list inside an aggregate root, but since it has a lot of entries (40K+), Entity Framework takes a long time to execute it, 150.180 ms on my dev machine.
Here's a stripped down example that shows this behavior:
public class Parent
{
    public int Id { get; private set; }
    public virtual ICollection<Child> Children { get; private set; }

    public void Remove(string someProperty)
    {
        var itensToRemove = Children
            .Where(x => x.SomeProperty == someProperty)
            .ToList(); // -> this is where it takes a long time to run

        // remove...
    }
}

public class Child
{
    public int Id { get; set; }
}

Seeding:
INSERT [dbo].[Parent] ([Id]) VALUES (1)
INSERT [dbo].[Child] ([Id], [Parent_Id]) VALUES (1, 1)
...
INSERT [dbo].[Child] ([Id], [Parent_Id]) VALUES (40000, 1)

I also tried casting to List and using .RemoveAll(), but the result is the same.
(Children as List<Child>).RemoveAll(x => x.SomeProperty == someProperty);

Since I'm using lazy loading, I always thought that EF would consider the .Where(...) and create a filtered SQL query, but SQL Profiler tells me it doesn't:
exec sp_executesql N'SELECT
    [Extent1].[Id] AS [Id],
    [Extent1].[Parent_Id] AS [Parent_Id]
    FROM [dbo].[Child] AS [Extent1]
    WHERE
        ([Extent1].[Parent_Id] IS NOT NULL) AND
        ([Extent1].[Parent_Id] = @EntityKeyValue1)
',N'@EntityKeyValue1 int',@EntityKeyValue1=1

What's interesting is that when I run the above query in SSMS it returns all rows instantly.
In terms of design, I'm considering accessing it directly based on this answer, but I feel it would break the DDD design in my case since it involves business logic that belongs in the parent.
Comment: You have to delete the Children themselves, i.e. without involving the parent. Lazy loading only loads entire collections.
Answer: I wouldn't attempt logic like this from within an entity. "Children" is either eagerly loaded as a list at the time that the parent is read, or it is lazy loaded within the scope of the context when referenced.
When you attempt:
var itensToRemove = Children
            .Where(x => x.SomeProperty == someProperty)
            .ToList();

... this lazy-loads all children for the parent prior to the Where condition executing. If this is running across many parents or large sets of children it will be very inefficient.
Entities are not business logic, they are data. If you have a requirement like an action to remove all matching children from a parent entity, or from several/all parent entities, then this should be handled at a service or repository level to encapsulate the business logic and use the entities as a representation of the data.
For instance, given a parent ID to remove all children with a "childType" of "Answer". If a parent has a few children, and children are relatively small entities then you can load the parent with it's children eager loaded, and remove the applicable entities, then save the parent:
var parent = context.Parents.Where(p => p.ParentId == parentId)
  .Include(p => p.Children)
  .Single();
var childrenToRemove = parent.Children.Where(c => c.ChildType == "Answer").ToList();
foreach (child in childrenToRemove)
   parent.Children.Remove(child);

context.SaveChanges();

If you are bulk removing children from many/all parents, or child entities are bulky in size, then I would consider keeping children as a top-level entity (with a DbSet in the context) and delete them directly. This is assuming that there is a 1-to-many relationship between parent and child (child contains a parentId) and child does not have any children itself:
List<Child> childrenToDelete = new List<Child>();
do
{
  childrenToDelete = context.Children
    .Where(c => c.ChildType == "Answer")
    .Select(c => c.ChildId)
    .Take(1000)
    .ToList() // Execute the query to get our 1000 IDs. We need Linq2Obj references to continue.
    .Select(id => new Child { ChildId = id})
    .ToList();

   foreach(var child in childrenToDelete)
     context.Children.Attach(child);

   context.Children.RemoveRange(childrenToDelete);
   context.SaveChanges();
} while (childrenToDelete.Any());

The above loads applicable children IDs and compose/attach new child entity references using those IDs. This saves loading all child data to perform the removal. We load and delete in batches of 1000 to keep the transaction size reasonable.  This also needs to be done with a "clean" context where parents/children haven't already been loaded as this would cause issues with Attach. This also needs considerations for error handling, and considerations about handling failures part way through as each batch of 1000 will be committed.
If you're faced with children that have child references of their own then you can look at defining a context and entity model set specifically for this operation where the only data is the required references. (PKs and FKs) where you can load children and their related entities from the bounded context for the operation and issue the deletes. Again, if this is going to affect a large # of rows, pull the data in batches.
The last alternative I can suggest is to utilize a stored procedure for the operation, then be sure that any loaded parent entities in the context are re-loaded.
Hopefully that provides some ideas on how to handle your scenario.
Comment: My example was a [very simplified one](https://stackoverflow.com/help/mcve) because I wanted to focus on finding out how to do it with EF6. In my real world case, the entities are more complex than that, and there is logic involved in removing one child, and since I'm using DDD, that logic does belongs in the entity, or else it would become an [anemic domain](https://www.martinfowler.com/bliki/AnemicDomainModel.html). But thanks for the ideas.
Comment: Best of luck, that is where our approaches differ. IMO EF entities make a poor choice for Domain in DDD, they serve best as proxies for data state. For more DDD-like (in that I am by no means a strict DDD disciple) behaviour I utilize the repository pattern. The important distinction is to do away with the concept of generic repositories, but rather treat the repository like an MVC controller, except between data (entity) and domain (view model). DDD actions are facilitated by repository methods. ____U__ against domain state is managed at the view model and mapped to entity. Repo manages CR__D


How does sound get generated when you whistle?

Question: how does sound get generated when you whistle?
I.e. what creates the sound/vibrations when you whistle on your lips?
Answer: While I whistle, there is a whole lot of action taking place. My lips vibrate ever so lightly, along with the air around my lips and inside my mouth, this in turn causes the air molecules in front of me to vibrate - meaning it compresses and expands. This causes a sound wave, (Sound waves consist of areas of high and low pressure) and the closer together these compressions and expansions the higher the note will be. I can lower the pitch by increasing the size of cavity in my mouth (by lowering my jaw) and increase the pitch by reducing the size of cavity in your mouth.
Comment: https://en.wikipedia.org/wiki/Physics_of_whistles