Difference between presentation layer and user-interface

Question: What is the difference between a presentation layer and an user-interface?
Answer: They are close in execution, but they come from different directions. They aren't well defined, depending on the specific context, they may be almost identical or overlap only slightly.
Presentation layer is term in the taxonomy of code and associated resources.
User Interface is the implementation of the intended User Experience in terms of page layout, page transitions and page control elements. (I am using "page" loosely here - you can replace it with "form" or "window").

The distinction is important when you consider how a user interface gets created. If you come from the code, you are basically working with the needs and mechanisms of the code - what data is there to show?, and in what ways your code can change that?
If you come from the user, the questions are rather what data the does the user need? and what data the user wants to change?
(The first one isn't necessarily worse - it's perfect for users who have a good idea of the inner workings of the application, and it makes it often easier to make use of the full capabilities of the code.)
Answer: The link in the John's answer refers to the OSI model, which is not the term intended here IMHO.
I think presentation layer and UI are overlapping concepts, though not 100% overlapping.
Form one angle:
The term presentation layer suggests a layered structure in the application, while the term UI does not suggest anything about the inner structure of the application.
From another angle:
The term UI might only include the collection of controls and their event handlers, while the term presentation layer could include some deeper non visual parts of the application like ViewModels or Presenters.
Answer: The presentation layer delivers information to the application layer for display.
The presentation layer, in some cases, handles data translation to allow use on a particular system.
The user interface shows you the data once the presentation layer has done any translations it needs to.
More here:  http://en.wikipedia.org/wiki/Presentation_Layer
Answer: Here's my own interpretation:
Presentation layer loosely refers to the layer which is responsible for somehow displaying the data for the users.  It is often spoken of in the context of a software architecture along with other layers such persistence layer, business logic layer, etc, and rarely by itself.
User interface simply refers to the point of interfacing between the users and some software programs.  User interface do not always have to have a nice graphical windows capabilities.  A console program, one which runs on the prompt, is also said to have a user interface, just not a graphical one.


Does "two weeks before the last frost" mean when the ground is still frozen?

Question: I was reading how to plant catnip seed, and noticed that it said 1-2 weeks before the last frost. Does that mean to plant it when the ground is still frozen?
Comment: The last frost is normally in spring. Is your ground still frozen in spring?
Comment: yes, zone 4A is frozen down for probably up to 4 weeks still
Answer: No, it does not mean when the ground is frozen; it means before your last frost date. Frost and frozen ground are not quite the same thing. This answer here, though it's actually about when to cut grass, has information regarding the difference and may be of relevance How long after last frost before lawns need mowing?.
Usually, two weeks before your last frost date will mean the ground is not frozen solid, as it might have been in cold regions during winter; the height of the sun in the sky and longer days should ensure the ground is no longer frozen, but it's still entirely possible for a frost to occur overnight without the soil actually freezing. If you've had an unusually cold and long winter, the scheduled last frost date might take place later, so conditions where you are should be taken into account. You can check if the ground is still frozen by trying to stick a garden fork into it - if it goes in fairly easily all the way down, it's not frozen.
Comment: why do they say 2 weeks before last frost then if the last frost is normally when the snow melts in MN?
Comment: It can be very cold without the ground being frozen. :) I think our ground has been workable all winter (but it's been a dry winter, and not a cold one for SW Idaho). The winter before was much colder and wetter, but every time I tried to dig, it wasn't frozen, either. I think our soil must insulate well. I do remember seeing frozen ground plenty of times in the past, though.
Answer: No, it doesn't. If the ground is frozen, you're a long way until the last frost.
Frost is an icy substance that forms on the ground, plants, car windshields, and things. It tends to form in the early morning.
Since weather people take the temperature higher up, it can be freezing lower down, and frost even at 41° F. (which I have witnessed), although in my experience, frost above 32° F. is much rarer than at or below 32° F., and I've often felt confident planting as long as it's consistently above 32° F. It's still a good to idea to protect some kinds of plants for a bit, though.
Dave's Garden has a handy page for looking up your last frost date.
Answer: Since I am actively buying seeds from various sources, I came accross the same directions for planting/sowing as you did, and from many vendors.
My understanding is that 'frost' means 'the lowest air temperature during the day was less than 0° Celsius'. Exact date of 'two weeks before last frost' is, of course, your estimation, based on past experiences, current season, and weather forecast.
Your soil may or may not be frozen at that moment. Mine was not frozen at all during whole winter, but I am zone 8a.
The bottom line, this is just a rough guideline for planting/sowing date, a convenient way of specifying a good planting/sowing date that is not a specific date (like March 12th), but dependant on particular hardiness zone and current weather seasonal condition - and is not directly related to the soil being frozen.
Comment: i'm zone 4A, so it's probably somewhat different for me.


What happens if a shot rebounds off a defender to an attacker in an offside position?

Question: I was watching a soccer game and saw a player on the attacking team take a shot at the goal. It was blocked by a defender and ricocheted towards another attacking player who was in an offside position.
The referees called offside on the play.
Was that the right call, or should they have allowed the play to continue?
Comment: I think in this case the other player would be in an offside position right from the moment the attacking player took the shot (and not just when it ricocheted towards him)... that would be the reason the ref called it offside...
Answer: Whether a player is in an offside position or not is determined when the ball is last played by a teammate. This is described (albeit in a poorly worded manner) on p. 36 of the 2015/16 FIFA Laws of the Game (emphasis on relevant phrases mine):

A player in an offside position is only penalised if, at the moment the ball touches or is played by one of his team, he is, in the opinion of the referee, involved in active play by:

interfering with play or
interfering with an opponent or
gaining an advantage by being in that position

On p. 110, in the interpretations section, it is elaborated on what these three somewhat ambiguous sub-clauses mean (emphasis once again mine):

"interfering with play" means playing or touching the ball passed or
  touched by a team-mate
"interfering with an opponent" means preventing an opponent from playing or being able to play the ball by clearly obstructing the opponent's line of vision or challenging an opponent for the ball
"gaining an advantage by being in that position" means playing a ball

that rebounds or is deflected to him off the goalpost, crossbar or an opponent having been in an offside position
that rebounds, is deflected or is played to him from a deliberate save by an opponent having been in an offside position

A player in an offside position receiving the ball from an opponent, who
  deliberately plays the ball (except from a deliberate save), is not considered to have gained an advantage.

Judging from your question, it seems that the attacker that the ball ricocheted towards was in an offside position when the shot was taken. If they weren't, there can be no offence.
Putting this together, further elaboration is needed upon what is meant by blocked by a defender in your original question.
If the ball merely deflected off the defender (as is implied by your question and the use of the word ricocheted), an offside offence has been committed. The attacker is penalised for gaining an advantage by being in that position by playing a deflection off an opponent.
If the defender deliberately tried to play the ball, it needs to be determined whether it was a deliberate save or not. If the ball was heading towards the goal (since it was a shot), it probably was a deliberate save, and there would still be an offside offence. However, if this was a cross or pass not heading towards the goal and the defender deliberately played the ball, there would be no offside offence committed here.
It is irrelevant here if the ball does not go where the defender intended - all that matters when determining whether the defender's contact with the ball is a deflection or deliberately played is whether they attempted to play it or not.
In your example, it appears the offence was called before the attacking player touched the ball. Usually, the player is required to play the ball before an offside offence is called by the refereeing team. However on p. 113 it says:

A player in an offside position may be penalised before playing or
  touching the ball, if, in the opinion of the referee, no other team-mate in an onside position has the opportunity to play the ball.

This is done to avoid unnecessary collisions between attackers and defenders (particularly the goalkeeper), and large delays in having to bring the ball back to where the attacker was positioned when the ball was played for the free kick when it's completely obvious an offside offence is about to occur.
Answer: The fifa Rules state on page 36(If this is a professional soccer game):
<code>A player in an offside position is only penalised if, at the moment the ball
touches or is played by one of his team, he is, in the opinion of the referee,
involved in active play by:
1. interfering with play or
2. interfering with an opponent or
3. gaining an advantage by being in that position
</code>
Therefore, If the player was actually shooting and an defender blocked the shot and bounced off to a player in an offside position and the player did not try to interfere with the opponent, It should have not been an offside, because it has to be play including both the player and the offside player. The offside player was not in the play if he did not attack the ball or the opponent, nor was the player passed to.


how to really force Wine to grab/re-grab the mouse?

Question: Some few 3D games are very hard to work well with the mouse grab.
Sometimes even with winecfg force grab on full screen checked, and the regedit key MouseWarpOverride set to force, it may still not work well.
So, what can be done to really force the mouse pointer to be grabbed or re-grabbed?
Answer: First you have to force ungrab the mouse with:
setxkbmap -option grab:break_actions;xdotool key XF86Ungrab I bound it with xbindkeys (but read this about security https://unix.stackexchange.com/a/62255/235896)
now, click on the title bar of the game window and it should force re-grab properly.
If it doesn't work, try toggle the application between full screen and windowed mode, and try to ungrab again and click on the title bar. The title bar may have to be the linux one or the windows one (in case your are emulating a windows desktop), try on both.
I couldn't determine yet the right steps that always work at once, when I find it I edit here again.
This (may require some tries) but works on Ubuntu 18.04 with Wine 5.8 at least.


How to use gulp-newer?

Question: I'm new to gulp and I tried to follow the documentation in https://www.npmjs.com/package/gulp-newer to understand how it works. However its not working as expected for the below task. I think I'm missing something obvious.
Here's the folder structure,
    temp
      file1.js
      file2.js
    new
      file1.js
      file3.js
    change
      <empty initially>

I want to compare temp folder with new folder and if there are any new files in new folder(which was not present in temp earlier) then move those files to change folder. This is just me trying to understand how gulp-newer works. Am I doing it right?
    gulp.task('newer', function() {
        return gulp.src('temp/*.js')
                .pipe(newer('new/*.js'))
                .pipe(gulp.dest('change'))
        });

However when I run this task it just copy all the files in temp folder to change folder. So after task run change folder has file1.js and file2.js. I'm expecting just file3.js to be present in change(since that's a new file). Correct me if my understanding with the approach is incorrect.
Answer: From gulp-newer:

Using newer with many:1 source:dest mappings Plugins like gulp-concat
  take many source files and generate a single destination file. In this
  case, the newer stream will pass through all source files if any one
  of them is newer than the destination file. The newer plugin is
  configured with the destination file path.

and the sample code:
var gulp = require('gulp');
var newer = require('gulp-newer');
var concat = require('gulp-concat');

// Concatenate all if any are newer
gulp.task('concat', function() {

  // Add the newer pipe to pass through all sources if any are newer
  return gulp.src('lib/*.js')
      .pipe(newer('dist/all.js'))
      .pipe(concat('all.js'))
      .pipe(gulp.dest('dist'));

});

it seems that you need to pass in all the files already concatenated to newer. In your case:
gulp.task('newer', function() {
        return gulp.src('temp/*.js')
                .pipe(newer('new/*.js'))
                .pipe(concat('*.js'))
                .pipe(gulp.dest('change'))
        });

Also, since newer checks the files modified date make sure that the files are actually newer. I know it's obvious, but I'm usually stuck on "obvious" stuff.
Answer: May I also suggest gulp-newy in which you can manipulate the path and  filename in your own function. Then, just use the function as the callback to the newy(). This gives you complete control of the files you would like to compare.
This will allow 1:1 or many to 1 compares.
newy(function(projectDir, srcFile, absSrcFile) {
  // do whatever you want to here.
  // construct your absolute path, change filename suffix, etc.
  // then return /foo/bar/filename.suffix as the file to compare against
}

How to use gulp-newer?


GIT Permissions

Question: There is something not clear for me and this is how to prevent other people read my code. The thing is that I want people create their own branches but not to view the other's branches. If someone is responsible for networking, I don't want this guy to view graphics codes. S/He must be forced to work on his branch only.
Comment: Identical question posted by same user: http://superuser.com/questions/619171/git-permissions
Answer: You could let each individual create their section of the code in a submodule and then include all of the submodules into the main project. This would add a lot of complexity to the whole process though.
The git-submodule has this to say about them:

Submodules allow foreign repositories to be embedded within a dedicated subdirectory of
  the source tree, always pointed at a particular commit.

You create a submodule just as you would a normal repo and include it in the main repo like so:
git submodule add <repository>

where <repository> is the url to the repo to include.
The main question is why do you need to enforce this level of isolation and what happens if one part of the project has a dependancy on another one?
Edit
As the questioner has indicated that they want to protect IP from third party espionage action I have the following suggestion:
In stead of extracting the code for each person into a separate repository tree have the main IP that you want to keep separate contained in a "black box" library and have the development of that take place on a private repository by trusted developers. The untrusted developers can then develop the code that consumes this library in a less restricted repository.
This approach would have the advantage of requiring fewer repositories which will hopefully ease the process of development somewhat.
Comment: I want to find some people to help my project. However, they will be in a place of the world I dont know and cannot go. I want to keep my intellectual property in safe because those will be stranges at the beginning.
Comment: Hmm. I suppose the question you have to be asking there is what kind of impression does that give them? I understand there are needs to protect privacy. Is a contractual agreement not strong enough in this situation? I don't know. Another suggestion would be if there was only a certain piece of IP that you are really concerned about extract that into a separate tree to keep it away from prying eyes but have the remaining development take place in the main tree. I'm only thinking of the potential for headaches due to the complexity of the development process here.

GIT Permissions


Haptic Feedback with Gingerbread on Samsung Galaxy mini 2

Question: How can I turn off vibrations when I long press on start screen (to add a widget, etc.) or in Opera mini when long press on a link?
Answer: The Haptic Feedback is a global setting provided by your phone, you can turn it off by:

Click your device "menu" button";
Tap "Settings"
Tap "Sound";
Tap "Haptic feedback" to remove the green tick, thus disabling this feature.

What is "haptic feedback"?

Haptic feedback, often referred to as simply "haptics", is the use of the sense of touch in a user interface design to provide information to an end user. When referring to mobile phones and similar devices, this generally means the use of vibrations from the device's vibration alarm to denote that a touchscreen button has been pressed. In this particular example, the phone would vibrate slightly in response to the user's activation of an on-screen control, making up for the lack of a normal tactile response that the user would experience when pressing a physical button. The resistive force that some "force feedback" joysticks and video game steering wheels provide is another form of haptic feedback.

More about this at Wikipedia.
Comment: what is haptic feedback? my samsung mini 2 doesnt have it in settings and also iam having the same vibration problem
Comment: @lily I've updated the answer with a small description and example of Haptic Feedback. **Ps:** Does your device have Gingerbread installed?


Word for a desire that you can not do anything about

Question: I'm looking for a word that means a desire/wish that is improbable to be fulfilled ( and you can not do anything to change it).
Comment: _hopeless_, perhaps?
Answer: "Pipe dream" encompasses the first requirement (that the word or phrase must define a desire or wish that is improbable to achieve), but I don't know that it fully satisfied your second component (that the desire or wish in question be intrinsically unattainable)
If you need a single word only, "chimera" means basically the same thing, but is probably less widely known.
Answer: I would use "yearning". In all examples I know, it has been used in the sense that it is a longing that carries the connotations of "intense", "unsatisfied", "never to be satisfied" or "very unlikely to be satisfied".
Comment: Thanks for your answer and reminding me of the beautiful word yearning.


What do you call an arched entrance to a garden?

Question:
What do you call an arched entrance to a garden? I am not sure if there's a word specifically for garden entrances, but I am willing to bet there's a word for an arched entrance like that. What do you call it?
Comment: Eddie's answer may be correct for the US, but I (BrE) would call it a garden gate with an arch. You may find this reference useful for garden terms: https://edis.ifas.ufl.edu/ep432
Comment: I'd just call it a "fence gate". Maybe "a fence gate under an arch".
Comment: You could refer to it as a lych gate, but this term is mainly used for the entrance to a churchyard, and normally has a waterproof roof. https://en.wikipedia.org/wiki/Lychgate
Answer: I call it an archway, or An arch over an entrance or passageway but those can vary a lot in size and materials. If you are speaking very specifically about an arched entry into a garden, I would call it a garden arch or an arbor.
Arbor was the first thing I thought of, but in my mind, it is always meant to be covered in some sort of climbing plant, and it's not always over a passageway. Arbors can be set over a bench to provide a nice shady place to sit.
Like most words in English, the choice of which one works best depends on the context.


Woodbury matrix identity to solve linear system

Question: I have the next linear system: $$\left[{\bf A} + {\bf Q} \cdot {\bf Q}^T\right] \cdot {\bf x} = {\bf z}$$
The dimensions are: ${\bf A} \in \mathbb R^{n \times n}$, ${\bf Q} \in \mathbb R^{n \times m}$, and  ${\bf z} \in \mathbb R^{n \times 1}$, where $m < n$.
I want to resolve it only with the Woodbury matrix identity that state: $$(A+UVC)^{-1}=A^{-1}-A^{-1}U(C^{-1}+VA^{-1}U)^{-1}VA^{-1}\text.$$
I don't understand how go from my inicial problem to the statement of Woodbury. Does anyone know how applied it. Thanks you.
Sorry any mistake in my writting.
Answer: Apply the Woodbury matrix identity with
$$
A = \mathbf A, \quad U = \mathbf Q, \quad C = \mathbf Q^T, \quad V = \mathbf I_n.
$$


What's the highest glucose concentration (in mM) anywhere in the human body (tissue, capillaries, tumor microenvironment, etc.)?

Question: Glucose blood levels are around 5mM, or 10mM after meals. In capillaries these levels can rise by about 40 %. I haven't found measurements of glucose concentration in tissues, or in extracellular spaces. I'm wondering what's the highest glucose concentration, anywhere in the human body?
Comment: I would guess that the highest glucose concentration would be during the active absorption of a high carbohydrate meal - the carbs would be digested and broken down to glucose. The glucose concentration in the GI capillary beds - which would include both circulating glucose and glucose absorbed from the GI tract would be the highest concentration - not sure if there are any good estimates of the actual concentration
Comment: Fasting or prandial state?
Comment: @VanceLAlbaugh Highest, any state.
Comment: @VanceLAlbaugh I just need an order of magnitude.
Answer: Glucose concentration in the blood is a highly regulated biologic variable. From personal laboratory experience, it is very difficult to raise a healthy, non-diabetic individual's blood glucose over about 6.5-7 mM (i.e. 120-130 mg/dl). My best guess at where the highest glucose concentration might be in the body is within the hepatic portal vein that drains the intestines after a high carbohydrate meal. The glucose concentration is probably highest in the prandial state or, in other words, when carbohydrates (i.e. food) is being digested and absorbed by the gastrointestinal tract. Many simple and/or complex carbohydrates are digested to glucose and absorbed through the gastrointestinal tract. Once absorbed the glucose enters the venous mesenteric circulation and then drains into the hepatic portal circulation. This allows high concentrations of glucose and other compounds like amino acids from dietary nutrients to be "buffered" by the liver.
I don't have hard evidence to demonstrate that this is the highest glucose, but I think it's probably a good guess. It is inherently difficult to measure the blood glucose concentration in the portal vein - mostly because it's so difficult to get to that place anatomically during a meal. The dog is probably the most used animal for these types of metabolic studies, because catheters can be placed in the peripheral venous and arterial circulation, as well as in the portal vein and hepatic veins, to measure nutrient uptake by the intestine and nutrient extraction by the liver.
A number of previous studies by Cherrington and colleagues, who have done some of the most comprehensive work in this field, frequently measure glucose concentration and blood flow rates across the liver. In one such paper that is freely available from the American Journal of Physiology by Abumrad et al (1982) entitled, "Absorption and disposition of a glucose load in the conscious dog" you can see from Figure 1 the average plasma glucose concentration in the portal vein from a group of dogs given an oral glucose load of ~40 grams is somewhere in the 250 mg/dl region (i.e. ~14mM). These were otherwise healthy dogs, and similar to healthy humans I would bet the glucose concentration doesn't rise too much further. As you could imagine though, in a diabetic individual who has high peripheral glucose concentrations to start, the portal vein concentration might be expected to be higher. How much higher is another educated guess - maybe 100-200 mg/dl higher on an extreme end (obviously pathologic).
In a healthy human (i.e. non-diabetic) who undergoes a 75-gram oral glucose tolerance test I can't imagine that the portal glucose would go any higher than 300-400 mg/dl (or, 16.5 to 18 mM). But again - these numbers are just educated guesses. This is probably the highest glucose concentration anywhere in the body. Additionally, in diabetic patients the glucose concentrations would be expected to be slightly higher because circulating glucose may be slightly higher, but probably not by too much (definitely not an order of magnitude).
Comment: Thanks, these sort of estimates is kind of what I was looking for to get started.
Comment: happy to help @becko - in diabetic patients the numbers might be a little higher, but not that much higher (definitely not an order of magnitude)
Comment: @becko if this answer is sufficient to answer your question... think about accepting it officially - thanks!


If I get a speed restriction from ATC, at what point am I no longer obligated to comply with the restriction?

Question: If a controller clears me for a procedure, and also says "...do not exceed ___ knots", how long does that restriction apply for?
Comment: Is your question referring to anytime a controller issues a speed restriction or only after a controller "clears" you for a specific procedure (such as an ILS approach, or similar)?  Your headline question and your actual question do not make this distinction. (almost like you are asking two different questions)
Comment: Which country are you asking about? Rules may vary.
Comment: @757toga Both, I guess? Your answer is great though, thank you so much
Comment: @randomhead I was asking about the US, I definitely should have put that in the question.
Answer: In the U.S., if you are assigned a speed restriction by ATC that restriction remains in place until you are "cleared" for a approach procedure (such as an ILS),  receive a "climb via" or "descend via" clearance ( when flying SIDs or STARs), instructed to "resume normal speed" (or similar phraseology such as "delete speed restrictions," etc.) or given a different speed assignment/restriction.
If you are cleared for a procedure, such as an ILS approach, and are instructed to "do not exceed 150 kts" (for example from your question), this speed restriction is to be followed for the duration of the approach unless you are given a different speed assignment or instructed to (something like) "resume normal speed."
Also, keep in mind that if you are instructed to "maintain 270 kts" (for example) while above 10,000 ft (msl) and then instructed to descend below 10,000 ft., you are required to (without having to receive ATC authorization to do so) slow to 250 kts before descending below 10,000 ft. This same requirement (see [14 CFR 91.117]) regarding regulatory speed requirements, also has to be observed by the pilot while flying in other airspace areas that have specific speed requirements.
Additionally, there are circumstances where a published speed restriction is automatically canceled (such as when receiving a vector off of a SID/STAR for some reason).
To have a more complete and comprehensive understanding of the subject of your question, the Aeronautical Information Manual (AIM), section 4-4-12, Speed Adjustments, contains an explanation of the ATC/Pilot requirements pertaining to speed assignments. This would be an important reference for you to read and understand.
Comment: Assigned speeds are not *supposed* to apply within the FAF or a five-mile final. When assigning a speed in conjunction with an approach clearance (because absent such an instruction, the approach clearance automatically deletes speed restrictions) ATC is *supposed* to phrase the instruction so that it only applies until the FAF or a five-mile final.
Comment: @randomhead - that is an ATC responsibility not to assign a speed adjustment inside the final approach fix on final or a point 5 miles from the runway, whichever is closer to the runway. Should not be an issue that the pilot needs to be aware of.
Comment: Just mentioning it because you said a speed assigned along with an approach clearance applies for the entire approach. That could work for a "do not exceed XXX knots" instruction, but not for a "maintain XXX knots" instruction. Pilots should be aware that they can speak up if necessary, should they ever get such an instruction.
Comment: @randomhead Well, not to grind this point too fine, but the procedures (not me) say that the speed assignment (in the circumstance asked specifically by the OP) would apply for the duration of the approach unless canceled (procedurally or by phraseology) by ATC.  Of course if "any" speed assignment is unacceptable to the pilot he/she should advise ATC.
Answer: You must maintain that speed until
ATC releases you from that restriction. When ATC want you to do something, there's a good reason for it, so we do as we are told. However, if you think they may have forgotten you, you can always ask


Transferring money to Indian private bank

Question: I work for a friend overseas who want to pay me through SKRILL (MONEYBOOKERS - PAYPAL like service) in USD. I would have my Moneybookers account linked to my Savings Bank Account in a private indian bank. If I transfer US $5000 per month, will my bank investigate about the source of income in details? If yes, what proof I need to provide ?
Comment: Have you tried asking your private Indian bank? Bank-to-bank transfers of funds via SWIFT transfers through Indian _public_ banks require the _remitter_ to provide the reason for the transfer; MONEYBOOKERS might not, and your _private_ bank may well have internal rules that are different from the rules that public (regulated) banks have to follow.
Answer: Any such amount has to be reported by Skrill and the Bank to RBI. As long as your earnings are legitimate and you are paying the taxes you shouldn't be worried. If its for services rendered, you would have a contract and / or invoice ... ie some paper work. It is important to keep the paper work in order.


is it possible to save a stack of smart filters in photoshop?

Question: I have several objects in different photos to which I would like to apply the same effects to.
Comment: I don't understand the question. The only thing that I could figure out was that the title and your description of the issue don't seem to be talking about the same thing. One is about saving smart filters and the other is about applying one effect to multiple layers easily, I guess. — I think you might want to make a few edits to the question. maybe it would help if you write a list of things you want to do And why that is not working for you.
Answer: I do not believe it is possible to save a smart filter stack in an easily-accessible manner.
What you can do, is create a template image. Create a new document with layers containing your smart filters. When you need this "stack" of smart filters, open the template image, copy the layer to the document you are working on, and then copy the smart filters to the layer you need.
Yes this is cumbersome. However, I think until Adobe implements some sort of "filter styles" saving, this is about the best you'll get.
Answer: As @Scott says in his answer, I don't believe there is a real solution to the problem. I have two different workarounds though:

Create an action
You'll have to recreate each of the smart filters which is annoying, but once you made it, it only takes one click to apply the filters to another smart layer.
Drag the smart filters from one document to another
Open the source document with the stack of smart filters you want to copy and the target document you want to apply them to. Tile the windows so both documents are visible. Convert the background layer in the target document to a smart layer. Drag and drop the stack of smart filters from the source document to the target document.


Growing the Retirement Money 10% or higher

Question: I have noticed that many people have mutual funds in their 401K and IRAs. The gain with mutual funds is significantly low. Sometimes the gain is flat or loss if the investment stays for some years. What type of strategies the people who approach retirement follow to grow their $300,000 in the account to $1,000,000 in 5 years?
Comment: "The gain with mutual funds is significantly low." What is your basis for this?
Comment: I think that will depend on the definition of "low".
Answer: Growing 300k to 1M in 5 years is a 27% annualized return which would be extraordinary over 5 years. That level of growth in passive investments would take a significant amount of risk, which would mean it would take a good amount of luck (since there would be a symmetric chance of having high losses as well).
The safest way to grow 300k to 1M in 5 years with minimal risk is to increase your savings rate, so that you require a lower rate of return and can take less risk.
Answer: One way to help is to maximize the contributions into the IRA and 401(k).
Assuming over age 50 and married. Each can contribute $27,000 to their 401(k), and also they might be able to put as must at $7,000 each into an IRA. That would be $68,000 in contributions. If they also received $5,000 each in company match they could take it to a total of $78,000 a year. That would mean $390,000 in new money over the 5 years.
Some people when they get close to retirement age are able to significantly increase their retirement investments, because the kids have moved out of the house and college bills are behind them.
Under this scenario my back of the envelope calculation shows the required rate of growth would drop to closer to 11%. Much more doable.


Can I use the spiritual weapon spell so it can take the form of a legendary weapon and gain it's effects?

Question: In dnd, I'm planning on playing a fighter/sorcerer with divine soul (giving me access to cleric spells) and battle master, essentially having the ability to be the active person in the group (I call it the "holy errand boy") however, during theory crafting I found legendary weapons and figured "if I can take the form of any weapon and it's effects if it's associated with a deity, then what about weapons like Defender which is stupid versatile or Luck Blade which according to CBR is the best weapon in the game apparently?" I'd love the ability to conjure Luck Blade and have access to wish for about 60 seconds and get the real thing, but that seems incredibly overpowered and WAY too good to be true. Is it?
Comment: I've added the dnd-5e tag since this looks like a 5e question. Is that correct?
Comment: yea thanks for the clarification btw
Answer: The spell does what the description says it does.
The spell description tells you exactly what the effect of the spell is. The rules for Spellcasting state:

Each spell description in Chapter 11 begins with a block of information, including the spell's name, level, school of magic, casting time, range, components, and duration. The rest of a spell entry describes the spell's effect.

Spiritual weapon tells you what it can do, and what it can do is create a weapon that resembles a certain weapon:

The weapon can take whatever form you choose. Clerics of deities who are associated with a particular weapon (as St. Cuthbert is known for his mace and Thor for his hammer) make this spell's effect resemble that weapon.

It can resemble a particular weapon, but only has the effect of the spell, not any affects the real version of the weapon may have.
And for a bit of general guidance, if your reading of a 2nd level spell (spiritual weapon) allows you to recreate the effect of a 9th level spell (wish), that should give a strong indication that you've misunderstood something
Comment: @egg Spiritual weapon is a fantastic spell. I don't understand why you would be so disappointed that a 2nd level spell is not as strong as a 9th level spell. That's like buying a car and being upset it can't fly to Mars.
Comment: So spiritual weapon can make a replica of a another weapon? Damn that sucks.
Comment: Because luck blade, also I'm not complaining seeing as though it has access to inflict wounds and it has a lot of staying power because the **at higher levels** thing.


Uninstall the Magento extension with its associated database tables and settings

Question: I have created the Magento extension. I have installed and uninstalled it. During the uninstallation, what I found that the associated database tables are not being deleted and the settings from the core_config_data and core_resource. Can somebody help me?
Answer: When removing files of an extension, the data stored in the database (dedicated tables and config in core_config_data) are not deleted.
To do this, you have two choice, create a sql upgrade setup to delete those entries, and upgrade your extension, or manually do it in phpmyadmin.
Even if it's not recommanded, I always use the second one, I just run queries likes
DROP TABLE 'mytable';
DELETE FROM 'core_config_data' WHERE path LIKE '%mymodule%';

Of course the cleanest way would be the other, create these request in a sql file upgrade from your version to the next and run it by upgrading the version in the etc/config.xml on the extension.
If the extension is not yours, I suggest to look at system.xml and/or other xml files from the etc/ folder of your module to find informations store in core_config_data, then in all files from the sql/ folder to find other information (table, columns, row added).
Comment: Can you tell me that how can i define the upgrade in the config.xml file? Thanks
Answer: With some extensions an additional attribute related entry to is added.
So apart from removing entry from core_config_data this also needs to be removed.
$eav->addAttribute('customer', 'some_property', array(
    'label'     => 'some label',
    'type'      => 'varchar',
    'input'     => 'text',
    'visible'   => true,
    'required'  => true,
    'position'  => 1,
));

Comment: yes +1 for you it was my point, table, column or rows can be added via sql setup, so it could be drop a table, alter a table to remove a column or just delete some rows


What is a "reverse" seoi-nage?

Question: The IJF recently banned "reverse" seoi-nage in competition, due to the difficulty of breakfalling safely. But how exactly is a reverse seoi-nage defined? What variants are/aren't legal?
Answer: "Reverse" seoi-nage
The IJF define it as a seoi-nage like technique where you grab the same side lapel with both hands, and rotate away from uke i.e. similar to

a morote-eri-seoi-nage rotating in the opposite direction, or equivalently
a morote-eri-seoi-nage gripping the opposite lapel

No score and shido for reverse seoi-nage. The application of seoi-nage techniques when uke can perform ukemi and tori can control is allowed. In the variation of seoi-nage techniques when tori turns away from uke, twisting their tsurite and hikite using the sake [sic] lapel of uke's judogi, without controlling uke, standing or dropping down in an unknown direction, without giving the possibility to the opponent to perform ukemi and sometimes with uke falling with the neck on the mat, is forbidden.

IJF Sport and Organisation Rules (SOR) (24.04.2023)

Lascau: In the moment you grip on the same side with both arms we start to talk about Reverse Seoi Nage...

DAY 1: Lisbon EJU Refereeing & Coaching Seminar 2022 (062 - 080) (5:52:56)

They explain this is an unambiguous definition based on the actions of tori (easily reviewable by referees), whereas the actual direction uke falls in is unpredictable and shouldn't be considered.

Similar techniques
There are similar competition throws which involve turning from the outside with a seoi-like grip:

"sambo" seoi nage
"drop" kata-guruma

Since they typically involve holding both the lapel and sleeve of the same side (and not a two handed grip on the lapel) ending up in an ippon style grip, they would appear to be legal given the discussion above.

Source:

2022 - 2024 IJF Judo Rules Information (Decision 6: Reverse Seoi Nage)
Comment: For those trying to visualize this, there's a nice example at: https://youtu.be/S-1tBxD3D6c
Comment: Another bogus decision, really. A viable throw gets banned because people tried to turn out of throws instead accepting defeat...
Comment: @SteveWeigand Just stumbled across this older comment...I think if it is used to break (or ignoring) an existing grip on the elbow/shoulder from the outside or the lapel, trapping the arm somehow, it can easily become a standing kimura. It does not have to be that way though.
Comment: I spoke with an olympic judoka recently about this technique. He said he was surprised it wasn't banned before now, as it's basically a standing kimura. I thought that was an interesting answer. I was expecting that he'd say it could land your opponent on his neck or dislocate his shoulder too easily.

What is a "reverse" seoi-nage?


Power steering pump is whining and has foamy orange stuff

Question: I have a 2004 Honda Accord. It is foaming orange stuff. The fluid should be clear?? Took it to a shop, they flushed the system, said they had to do it 3 times, said there were no leaks in the lines and the pump was working fine. Said they got most of the orange stuff out, but theres still a tinge of it, but its mostly clear again. Felt better driving it after the flush. Started it up this morning, made the same whining noise as before, worse when you move wheel back and forth. Looked in the reservior, orange and foaming again. Sigh. Any ideas??
Comment: ADD 1/3 cup of ATF Dextron only is a cure I found during my research
Answer: The 'foaming' you describe is almost certainly air getting into the system. The power steering pump will cause a suction effect in the pump and then pressurise the system. Look for loose hose clips, damaged piping, and leaking seals on the pump body between the pump and its fluid reservoir.
Comment: @leesa You have a leak, no question. A hose can suck air in and not leak fluid out. Take it back to the shop that inspected it before.
Comment: I just had the system flushed and checked, shop said they didn't detect any leaks, cracks, etc any where in the system. Why did the fluid turn orange?
Comment: Or, if the failed to find the leak, it might be better idea to take it to a different shop.
Answer: What usually gets overlooked is the Rack and pinion as they are notorious for failing and allowing air to come in through worn seals.
Comment: Is this a comment regarding rack-and-pinion setups in general or is this specific to this model of Accord? Worth clarifying...
Answer: I had the same after I flushed it myself.  The Honda dealer told me that I need a new pump which I could not believe.  It worked fine before I changed the fluid.
I noticed that the level in the reservoir is below the return line.  I think that the air must come in due to that.  I added more fluid and let it stand over night to allow the foam to turn into liquid again.
Before I turned on the engine I turned the wheels about 5 time left to right.  Some air bubbles came out.  After that everything works fine.
Answer: agree with Allan but will add many times I have see air can also be entering at the actual pump from a bad steering pump seal so add this to your inspection. That color reminds me of a power steering stop leak product added.


Categorizing with metaphor, analogy, and symmetry

Question: Continuing the discussion Categorizing with metaphor, analogy, generalization, and abstraction my next question is how two concepts metaphor/analogy equivalent to symmetry(change without change) .If yes how? Give me some examples
Answer: The concept of symmetry as "change without change" is already a "poetic" way to describe the fundamental concept of symmetry, which encompasses various forms like Reflectional Symmetry, Rotational Symmetry, Translational Symmetry, Scale Symmetry, and more. In other words, symmetry involves the constancy of fundamental qualities within an object or pattern despite undergoing different transformations. Therefore, if two analogous concepts fulfill the following conditions: 1) the definition of a transformation can be established, and 2) the results of these transformations are identical to each other, then symmetry can be defined. Merely applying "change without change" for discussing these matters lacks the necessary rigor.
Your insight that analogy aligns with generalization might be useful here. When there are two analogous concepts, A and B, their relationship represents a generalization—that is, two abstracted outcomes established over similar specific instances. Consequently, we can potentially "construct" a ratio function for the extracted predicate here and attempt to uncover another symmetry. However, I am doubtful whether this can be applied to any pair of arbitrary analogous concepts with a fixed transformation. Therefore, I perceive the responder's answer as negative.


Origin of "g-string"

Question: Does anyone know the origin of the term "g-string" (clothing)? All of the dictionaries I've looked at are uncertain about the origin of the word. I even tried googling for the answer, but to no avail.
Comment: https://www.theguardian.com/notesandqueries/query/0,5753,-20902,00.html
Comment: G, I'd always assumed that the term referred to the G string of a violin.
Answer: Opinions about the origin vary, which is a sign that no one really knows the answer. Here are some discussions of the quustion in various reference works.
From Mitford Mathews, A Dictionary of Americanisms on Historical Principles (1951):

gee string, a breechclout or breech-cloth. Also G-string. [Cited occurrences:] 1878 BEADLE Western Wilds 249 Around each boy's waist is the tight geestring from which a single strip of cloth runs between the limbs from front to back. 1891 Harper's Mag[azine] Dec. 36/2 Some of the boys wore only 'G-strings' (as for some reason the breech-clout is commonly called on the prairie). 1948 Time 5 April 12/3 The American Airlines' lost & found department was looking interestedly for whatever party had lost a case of beer, an automatic back-scratcher, three burlesque-type G-strings, a strait jacket.

From Don Wilmeth, The Language of American Popular Entertainment: A Glossary of Argot, Slang and Terminology (1981):

G-string: A thin strip of cloth passed between the legs of a stripteasrs and supported by a waist cord or band. Ann Corio claims that the term was originated by early striptease artist Carrie Finnell. Presumably, when she tossed the apparatus on her dressing table one night it fell in the shape of a "G." see CHICAGO G-STRING [the entry for which reads "An especially revealing type of G-string used by strippers which is sewn to an elastic band in a manner that allows "the bauble to fly" and reveal pudendum underneath."]

From Robert Chapman, New Dictionary of American Slang (1986):

gee string or G-string n phr or n fr middle 1800s A breech-cloth, or brief covering for the genitals, worn especially by striptease dancers: Thus the G-string became an integral part of a stripper's apparatus —Toronto Life {origin unknown}

From Barbara Kipfer & Robert Chapman, Dictionary of American Slang, fourth edition (2005):

G-string or gee string n phr or n A breechcloth, or brief covering for the genitals, worn esp by striptease dancers [citation omitted] {1878+; origin unknown; the dated use refers to Plains Indian use of a loincloth; the stripper sense is found in the 1930s}

From Robert Hendrickson, The QPB Encyclopedia of Word and Phrase Origins, fourth edition (2008):

G-string Stripteasers, who sometimes call this a "gadget," aren't responsible for the word. G-string is an Americanism first used to describe an Indian's loin cloth or breechclout in the 19th century. It could be that some fiddler in the West compared the heaviest of violin strings, the G string, to the length of sinew or gut the Indians tied around their waists to hold up their breechclouts. But even the heavies of violin strings wouldn't really do the job. Perhaps the g i is just a euphemistic shortening of "groin," an indecent word at the time. The burlesque G-string is of course far smaller than the Indian variety and must have seemed even skimpier a century ago, considering the Brunhildean builds of yesterday's ecdysiasts. One burlesque company of the day proudly advertised "two tons of women" and had only 20 strippers.

So your question about the origin of G-string might actually be separated into three distinct questions: (1) why did U.S. settlers on the Great Plains in the 1870s call the rawhide band used to hold a Native American's loincloth in place a "geestring"? (2) why did U.S. dance-art enthusiasts call the genital covering used by striptease artists a G-string? (3) what connection is there between the nineteenth-century "gee string" and the 1930s–present "G-string"?
I will run some database searches into those questions and add to this answer if I find anything interesting.

On the transition from 'geestring' to G-string'
With regard to the question of the connection between geestring and G-string, it is noteworthy that G string appears as early as 1881 as spelling variant for geestring. From "Society Report," in the [Globe City] Arizona Silver Belt (July 16, 1881):

Mrs. Natch-il-a-tilly was magnificently attired with a g string around her waist with some suggestions of faded magnificence suspended therefrom.

As for the transition between geestring as a breechclout and G-string as striptease accoutrement, a newspaper instance of "gee string" from 1921 may provide a missing link. From "Fringe Sewed on Beach Queens Who Lack Conscience," in the [Coronado, California] Strand (August 20, 1921):

Chicago.—Censors at the bathing beaches in Chicago, just now densely populated with gay crowds have solved the problem of dealing with girls who are a trifle shy on clothes. Last year the matter was left to the conscience of the bathers, but it was discovered that some of them had no conscience at all, or one composed of gutta porcha, so something had to be done about it.
Some of the beach queens were getting don to the fig leaf proposition and fig leaves this season are quite small. Consequently there was a grand display of legs and arms and spinal columns and shoulders and patella and torsos, to say the least.
The police censors, mean and women, who patrol the beach have solved the problem in a delicate way. The women police go armed with a needle and thread  and when a girl is discovered tastily clad in a gee string and a light sprinkling of tan, the coppess takes her to one side and sews on fringe.

An Elephind search also yields three matches for the odd expression "bust a G string"(one each from Australia, California, and Virginia) and two for "broke a G string" (from Colorado and Illinois)—all between 1907 and 1937. The earliest of these appears in Marion Hill, "The Busiest Dollar," in the Los Angeles [California] Herald (February 24, 1907):

"Jerrie said," continued Dazalia, still droning unctuously," as how she an' her folks 'd have to pass the meetin' house on their way to the deppo near by, an' as how shed leave 'em a moment an' attend to her duty here; leastwise, that's not what she said. Jerrie said as how 'she'd bust a G string an' fly the coop to roost on the gospel perch an' cackle a spell.'"

And the last of them is from "Those Shorts," in the [Kilgoorlie, Western Australia] Western Argus (July 13, 1937):

Some of our local girl tennis stars favour shorts of the most abbreviated type. This naturally has its disadvantages. One "Suzanne Lenglen," who, spends her spare time as a shop assistant up Lamington way, is now convinced that skirts are better.
Playing in a big match recently, she bust a "G string" (or elastic), but, with remarkable fortitude, kept on playing. A crowd of interested male spectators soon gathered at the court fence, all awaiting with eager anticipation for something to happen. They were disappointed for all their virgil was rewarded with was the gymnastic efforts of the tennis player to avoid embarrassment.

Earliest match for 'G-string' in the context of ecdesiast performances
The earliest match I have found for G-string as a vestigial garment worn by otherwise naked lady dancers is from "Nudist Style in Night Life Latest Vogue: Paris Music Halls and Clubs Using G-String for Dress," in the Breckenridge [Texas] American (April 26, 1935):

The famous French Can-Can, with its flinging about of multiple petticoats, and the traditionally Parisian reviews in which daring costumes left little to the imagination, have given way to the G-string. Nude choruses and naked dancers are the only order of the day.
Practically every Paris music hall exploits this nudist movement which has invaded the theaters. The prime offering at the Casino de Paris is "Naked Bath at Midnight," while the attraction at the Alcazar is "Nude Review," and at the Concert Mayol the program is "Naked Parade."
...
A curious feature of these nudist performances is the attitude of the Paris police, who only object when the distance between nudity and spectators is not sufficient.
An example of this subtle distinction is the case of Joan Warner, whose exhibitions as "the American Poetess of Naked Rhythm" were stopped because she was too close to the diners. Now she performs in the more spacious confines of the Alcazar Theater.
Comment: Two tons divvied up to only twenty women is impressive.
Comment: Wow, this answer is much longer than I would have expected. It has a ton of very interesting information providing some insight to the origin of "G-string".
Answer: I found this on Wikipedia:

Since the 19th century, the term geestring referred to the string which held the loincloth of Native Americans and later referred to the narrow loincloth itself. William Safire in his Ode on a G-String quoted the usage of the word "G-string" for loincloth by Harper's Magazine 15 years after John Hanson Beadle's 1877 usage and suggested that the magazine confused the word with the musical term G-string (i.e., the string for the G note). This is apocryphal, as the narrowest string on a violin is the E string.
Safire also mentions the opinion of linguist Robert Hendrickson that G (or gee) stands for groin, which was a taboo word at the time.
Cecil Adams, author of the blog The Straight Dope, has proposed an origin from "girdle-string", which is attested as early as 1846.
History
The G-string first appeared in costumes worn by showgirls in Earl Carroll's productions during the 1920s, a period known as the Jazz Age or the Roaring Twenties. Linguist Robert Hendrickson believes that the 'G' stands for 'groin'. The Oxford English Dictionary reports that the G-string was originally a narrow strip of fabric worn by Indian women. During the Depression, a "G-string" was known as "the gadget", a double-entendre that referred to a handyman's "contrivance", an all-purpose word for the thing that might "fix" things. During the 1930s, the "Chicago G-string" gained prominence when worn by performers like Margie Hart. The Chicago area was the home of some of the largest manufacturers of G-strings and it also became the center of the burlesque shows in the United States.
Comment: So the origin of "G-string" is debatable. However, I find the "string on a violin" rather unlikely, because why would anyone name an undergarment after a string on a musical instrument?
Comment: https://en.wikipedia.org/wiki/Air_on_the_G_String
Comment: @JennaSloan - Because the garment is a thin as a string on a stringed instrument.
Comment: A natural option they forget is that it stems from an indigenous word, if it's first recorded in reference to native inhabitants of the Great Plains, although that might have been loaned along with the item (e.g. *jute* cloth, I guess).
Answer: Strippers used to dance to live music, so they'd likely be well-acquainted with some of the musicians.  Maybe one provided a literal G-string for a dancer in a moment of wit and/or need.  A woman named Kiki, in 1920s Paris, was known as "the Queen of Montparnasse."  She was a cabaret dancer/stripper, painter, socialite, and model for many famous artists.  It is her very famous back that is painted as a violin - with violin f-holes! to go with her cabaret dancer's G-string? - in Man Ray's 1924 photo, "Ingres' Violin." (Le Violon d'Ingres).  The era is about right too, isn't it?
Check her out; she is a fascinating charachter. https://johnrlovett.wordpress.com/2017/03/23/le-violon-dingres-ingres-violin/
Comment: What do you mean by "f-hole" and "literal G-string"? Please do not respond in comments; [edit] your answer to make it clearer and more complete.
Comment: @Scott I think the "f-hole", which could be misconstrued for something completely different,  refers to the characteristic  shape of the two holes found in a violin. It must have a proper name, but I don't know what it is. Nope... that's their proper name: [f holes](http://blog.feinviolins.com/2013/04/why-f-holes.html)
Comment: @Mari-LouA: Yes, it occurred to me that multiple meanings could apply.     :-)
Comment: Some musical instrument strings are made from nylon, most notably the Guitar's, which is import, if it's purpose was to be invisible, albeit rather uncomfortable to wear, I imagine.

Origin of "g-string"


Is there a BB tool that has the Park BBT-69.2 16-notch pattern but can be used with a BB with spindles?

Question: My BB spindle is bottoming-out against the inner wall of the BBT-69.2 even though the spindle is a short one, 103mm; so I would like to find a 3/8 square drive BB tool with the same 16-notch pattern but with a taller height, not dome-like but more conical in its shape. Is there such a tool that can be used with a 3/8 drive torque wrench like the Park TW-2?   I don't have enough experience to know by feel when things are properly torqued and prefer to rely on the manufacturer's torque specs. Or are the only 16-notch choices available the hand wrenches, e.g. the Park BBT-9, where you have to go by feel?
Comment: Is the spindle stuck? What's keeping it from smacking through?
Comment: Sorry for the lack of clarity. I'm trying to install the BB. It's an old-school square-taper BB but with a 16-notch (external) cup.  I will add a picture.
Comment: I think the BikeHand YC-29BB-2A might work. It is cylindrical rather than dome-shaped, so the spindle might not bottom out. It is a weird hybrid. You can just go by feel or use a torque wrench with a 1/2 drive.
Answer: I see you found a tool that works, I just wanted to add that they do make wrenches that also have a 3/8" driver hole to be used with a torque wrench. I like these as it gives you a couple options. The example here is a Pedro's but there are other brands that make them as well.
Comment: Thanks for the 3/8 option!
Answer: I can confirm that the tool I found after asking the question, the BikeHand YC-29BB-2A, does indeed work with square taper BBs that have 16-notch external cups.  It got a good purchase on the notched cup so I was able to torque the drive side to 60Nm and the NDS to 40Nm.
The cylinder of the tool is quite deep, so there's no bottoming out of the spindle against the inner wall, and a torque wrench with a 1/2 drive can be used with it. It can also be used to tighten the BB by feel, with the handle.
There also appears to be a socket-only version without a handle, YC-29BB, which I assume takes a 1/2 drive as well, although none of the descriptions I've found online saw fit to mention the driver size.


XML to Relational with DB2 and Java (and Hibernate?)

Question: What I have here is a bunch of XML-Files containing data and a nice ER-Model to which the data belongs. What my problem is: I need to get this data into a db2. The tables with all necessary attributes and keys are already created.
I was thinking of three different solutions:

Parsing the XML and creating SQL-Queries from it. This solution seems straight forward but would require a lot of rather ugly string comparations and the like.
Inserting the XML into the database and levering pureXML to query the data from it and then inserting it into the relational tables. This would require some tinkering with pureXML or XML Extender as I'm not really familiar with them.
The IMHO most elegant solution. Creating an object model of the ER-model and a Hibernate mapping. Than use reflection to create objects from the XML data. Than somehow get the relations between the objects right (This isprobably the hardest part.) and let Hibernate to the rest.

Is there another way I have overlooked? What solution would you prefer? Is think there are a lot of pitfalls along the way with either solution and I'm afraid I completely missed something.
Answer: Number 3 all the way. You talk about using reflection to create the objects from the XML. have you looked at using jibx to map the xml to your object model.
What you just described is used a lot in STP systems to map xml from other sources into downstream systems.
http://jibx.sourceforge.net/
Karl


How do I interface two Arduino boards so they act as one with double the code space?

Question: Can I connect two ARDUINO UNO circuit boards in serial to increase room for more code and more functionality. For instance I wish to connect six sensors to a board. I need code for all six sensors and there is not enough space on one board. If I connect two circuit boards in serial will that provide the space and functionality to run the code for all six sensors.
If not how is this accomplished? I am a beginner with ARDUINO and I have been assigned a big task to make the ARDUINO UNO circuit boards provide six different functions using sensors such as temperature, pressure, humidity, voltage, current and possibly other functions. I am new at this.
Comment: You don't.   Two Unos do not equal a Mega (or a cheaper ARM Cortex with a reasonable amount of resources).  With some care you can probably fit everything you just described in the Uno's ATmega328p, but the ground rules of the assignment really need to be called into question, as unless there is closet full of hardware that is already paid for it is likely they were written by someone ill-informed.
Comment: It would probably be easier to optimize your code so that it fits. Reading six sensors doesn't sound too complex for an Uno.
Answer: There is no simple way to combine multiple boards into a unified system. What you will need to do is delegate certain tasks to each board and then have them communicate via SPI, I2C, or UART between a master board and each slave board in the system. The master system will then present the interface of the system as a whole via serial, wifi, console, etc.
Answer: If you're doing something that exceeds the resources of an UNO, then one simple next step would be to try a MEGA.  It is similar enough to the UNO that porting should be trivial, but has more RAM, more flash, and more I/O ports than two UNO units combined.
Answer: What you described is not a big task. I suspect you are new to both the Arduino and computers in general, and so it seems big to you. Hang in there, it is a lot easier than you think.
In many cases, a sensor requires 1 electrical pin (plus ground, which is shared by all).  So even an Arduino UNO can read a dozen or more sensors.  In many cases the instructions to read the sensor is as simple as 'read(x)'  and that takes 2 bytes, so if you got really lucky, the UNO's 32k of memory could read 16k sensors (a 'k' being a thousand if you didnt know).
Reality is it is not quite that simple, but it is not far from it.  You probably want to find a library that matches your sensor, and the only hard part is figuring out how to combine many libraries, which indeed do interfere with each other on occasion.
Step 1, learn the basics.  Get an Arduino experimenters kit or equivalent, play with the examples until you understand them. It will include some of the sensors you may use later.
Step 2, identify which other sensors you will need, find Arduino compatible versions of those.  You will know if it is Arduino compatible if it has an accompanying library, get that also.
step 3, make sure you can make each sensor work by itself first.
step 4, start combining sensors and resolving errors that will show up.
Forget the idea of combining boards, it is an advanced topic and you are no where near ready to try that yet.


Detecting and blocking TCP VPN connections that bypasses existing VPN detection software

Question: I help manage a small college campus network and students are not allowed to visit certain sites and download using torrents. Currently I'm able to block UDP VPN connections, but TCP VPN connections are a bit tricky. What are some methods to prevent users from  using VPN connections to bypass these systems? Is there a service or software that can help with this? How does the China firewall do it?
Comment: Are you sure they are only using VPN? SSH Tunneling, Proxy, etc. are also solutions to enable unfiltered internet behind a Firewall. (SSH on Port 443 would like much like a normal HTTPS Traffic)
Comment: @Serverfrog: *"SSH on Port 443 would [look] much like a normal HTTPS Traffic"* - not really. SSH and TLS (HTTPS) look totally different on the wire and one can see from the first bytes the difference. Of course, this would require to actually look at the payload and not just filter by port numbers.
Comment: @SteffenUllrich: You are right, but it should be possible to tunnel a SSH connection inside an HTTPS one. That way you have a correct HTTP protocol at high level, and the ssh is hiden in the encrypted HTTP bodies. AFAIK, only timings and sizes of packets in both directions could be a hint that the exchange is likely to be a tunnel..
Comment: @SergeBallesta: I agree that it will be much harder to distinguish. But "SSH tunneled over TLS looks mostly like HTTPS" is very different from "SSH looks mostly like HTTPS".
Comment: @SteffenUllrich: Of course! :-)
Comment: @SteffenUllrich Okey, i reduced to much information in this comment ;) that is the thing i meant in the core. (Used that in the past to get around a School Firewall)
Answer: It is the never ending race between weapons and armors... No firewall can prevent a user to do bad things. Stupidly simple firewalls (only port filtering) will mainly prevent unintentional misuse. Common firewalls (port filtering + HTTP(S) white/black lists will be enough for not too technical attackers.
If you want more, you will have to consistently analyze the logs to detect any anormal trafic, and then act accordingly by inspecting more and eventually asking the users for what they were actually doing.
What I mean here, if that the amount of work will grow by magnitude orders if you want to have the most secure firewall on earth. At a time, you will end in the good old cost/gain ratio...
And you should not forget the legal way. A firewall must exist to protect the internal network. By users should be warned that targetted attacks aimed at bypassing the firewall are strictly forbidden and could have legal consequences. A user that will use an unfiltered external HTTP proxy to bypass some HTTP rules can pretend it did it without really realizing what was happening. At least for the first time. But users that would setup a specific HTTPS tunnel to completely bypass the firewall would also have to fully assume their action. Technics is one hand, legal approach is the other one.


"Man dies after hit by truck" - or "Man dies after BEING hit by truck" - the difference?

Question: What is the use of being in below sentence?

Man dies after being hit by truck.
Man dies after hit by truck.
Answer: I was surprised to learn that both sentences would look acceptable in a newspaper headline (thanks to Snailboat's comment below), so I remodeled my answer a little:

Man dies after being hit by truck.

The word "being" helps create the Passive Voice:

A truck hit a man. (active voice) -> Man dies after truck hits him. (A newspaper headline)
A man was hit by a truck. (passive voice) -> Man dies after being hit by truck. (A newspaper headline)

Being is the gerund-participial form of was which is used in the creation of Passive Voice constructions.
Note that there is no a before "man" and no a before "truck": that's because it's a sentence written in a "newspaper headline style", or "headlinese".

Man dies after hit by truck. (WRONG in usual style, OKAY in headlinese)

..this sentence is ungrammatical when used in usual writing but is acceptable in "headlinese", where all forms of the verb be are omissible.
Why is it wrong when used in normal writing? The word after demands either some "noun" denoting an event:

Man dies after his birthday.

..or some "full clause" with a subject:

Man dies after [truck hits him].

The word being is a form of verb, but a verb ending in -ing is "closer to noun" in its meaning. Sometimes it's very close, then it's called a gerund, sometimes it's not so close, then it's called present participle. Sometimes it's not easy to distinguish between the two terms, so some people call it the "-ing" form or "gerund-participle".
Since it's "closer to nouns", you can write

Man dies after [being congratulated on his birthday].

but not

Man dies after [congratulated on his birthday]. (WRONG, except in "headlinese")

.. "congratulated" is not an "ing" form: it's clearly a past-tense form of the verb, so we look for some "subject" (who congratulated him?), but find none.
Comment: Note that all forms of *be* are commonly omitted from headlines.
Comment: I'd expect to see "Man hit by truck, dies," myself.
Comment: @A.Beth Nonetheless, people write it the other way.  My guess is that they want to move *dies*, the most important word, earlier in the headline.
Comment: @snailboat - Thanks for the comment! So "Man dies after hit by truck" is okay? Or there's an exception for the gerund-participial in passive constructions?
Comment: @snailboat - I did a search and there are indeed instances of **being** being omitted in headlinese!
Comment: Could be. May also be regional, with variation by newspaper, local dialect, etc. All the subliminal things that build up to expectations.
Comment: @Cowper +1 vote for answer !
Answer: As said by CopperKettle, it's a passive voice thing.
Another reason is: "hit" is ambiguous. It can mean a collision, or it can mean an assassination. The second sentence would be somewhat more naturally read as a man dying after an assassination by truck (presumably the hit-man ran him down in a truck); it would be a slightly awkward reading, but less awkward than the other way.
The correct form -- if you are not writing a newspaper headline -- is "Man dies after being hit by a truck."
If you are writing a newspaper headline, you can do "Man dies after being hit by truck," or "Man dies in collision" ("collision" is almost always a traffic accident, in newspapers, I think), or "Truck causes fatality"...
Comment: It could also mean "taking a shot of drugs", making the "by" ambiguous as well: "Man dies after truck takes a shot of drugs" or "Man dies after receiving a shot of drugs from a truck".

(Not saying any of these make sense!)
Comment: It could also mean 'success', as in the music business. Man dies after hit by alt-rock indie band, 'truck'. Band reported to be making a killing.


Recruiter Parlance - What is an "Authorable Workflow?"

Question: I found an employer who requires that employees debug "Authorable Workflows." A quick google search reveals that the term is only ever used in job classifieds. Given the way the English language works, an "authorable workflow" is a workflow able to have an author. However, I do not know what it would mean for a workflow have an author.
Comment: Is this for a potential job?
Answer: I don't believe it has an general definition, so you'll have to interpret the phrase literally.
The recruiter will have been given a job spec, then translated it into vague language to stop people finding the employer.
The software is designed to build workflows - perhaps they are talking about a CMS which lets you setup workflows such as edit, review, release and these steps require logic between them.
It may also be some form of workflow management software. A quick search engine query will bring up examples.
Answer: I googled for it and found quite a few adverts. In that position, you would be designing work flows that other employees would follow. Or in this case, looking at work flows that have been designed and are used / followed by employees, and figuring out if there is something wrong with those workflows.
It is quite likely that if you don't know exactly what it is then the job is not for you. I have a vague idea what it is, and I think the jobs that I saw are not for me.


Android 12(Api Level 31): TfLiteGpuDelegate Invoke: GpuDelegate must run on the same thread where it was initialized

Question: After upgrade my android os to version 12, my code stopped work, I use flutter plugin tflite_flutter 0.9.0 and I launch tflite in isolation.
It throws this error:
TfLiteGpuDelegate Invoke: GpuDelegate must run on the same thread where it was initialized.
E/tflite (20055): Node number 64 (TfLiteGpuDelegateV2) failed to invoke.
E/flutter (20055): [ERROR:flutter/runtime/dart_isolate.cc(1111)] Unhandled exception:
E/flutter (20055): Bad state: failed precondition
E/flutter (20055): #0 checkState (package:quiver/check.dart:74:5)
E/flutter (20055): #1 Interpreter.invoke (package:tflite_flutter/src/interpreter.dart:150:5)
E/flutter (20055): #2 Interpreter.runForMultipleInputs (package:tflite_flutter/src/interpreter.dart:190:5)
E/flutter (20055): #3 Classifier.predict (package:myai/ai/tflite/mobilenet/object/classifier.dart:179:19)
E/flutter (20055): #4 IsolateHelper.entryPoint (package:myai/ai/helper/isolate_helper.dart:51:30)

My code:
final gpuDelegateV2 = GpuDelegateV2(
options: GpuDelegateOptionsV2(
isPrecisionLossAllowed:true,
inferencePreference:TfLiteGpuInferenceUsage.preferenceSustainSpeed,
inferencePriority1:TfLiteGpuInferencePriority.minMemoryUsage,
inferencePriority2:TfLiteGpuInferencePriority.auto,
inferencePriority3:TfLiteGpuInferencePriority.auto,
)
);
var interpreterOptions = InterpreterOptions()..addDelegate(gpuDelegateV2);
_interpreter = interpreter ??
await Interpreter.fromAsset(
MODEL_FILE_NAME,
options: interpreterOptions
);

Anyone faced such problem? Any suggestions how to fix it?
Answer: Is it possible that the error you encounter is
Can not open OpenCL library on this device - dlopen failed: library "libOpenCL.so" not found?
Version 12 requires modules to declare dependencies in the manifest. When targeting Sdk version S you need to add the TFLite dependencies to your manifest. Read the follow relevant comment taken from here.

Note: You can now target Android S+ with targetSdkVersion="S" in your manifest, or targetSdkVersion "S" in your Gradle defaultConfig (API level TBD). In this case, you should merge the contents of AndroidManifestGpu.xml into your Android application's manifest. Without this change, the GPU delegate cannot access OpenCL libraries for acceleration. AGP 4.2.0 or above is required for this to work.


Is it best practice to paint bath walls before before installing vanity, tile and sink?

Question: Should I paint the drywall walls, before installing tile, sink and vanity?
Comment: While this question does come down to personal preference, there is a best practice for most cases. The same can be said for almost any home improvement project. I vote to *not* close.
Comment: The answer is easy.   If you are a painter you paint first.  If you are a plumber or installer you paint last.
Answer: Paint first
You will have fewer things to mask/protect and fewer critical edges to deal with and less stuff getting in the way. If you have large areas that you know will never be exposed, you can skip them - or paint them generally (e.g., roller but not brush edges; or primer only) but not worry about getting it "perfect".
Comment: I agree, IF the "large areas that you know will never be exposed" is new drywall or has never been painted you want at least a coat of primer on that area.
Comment: Paint first just looks better, if the vanity has a solid back at least paint several inches inside the top and sides. Also around the drain area. Painting after requires masking the cabinet and will usually leave brush strokes that are not the same as the rest of the wall so it looks better to paint first in my opinion.+
Answer: There isn't an exact answer but I can break it down for you.
You can always prime first.   Since this is 60-70% of the job with new drywall - get this done.   You will want to use a good primer for a wet area - Killz makes a good product but if it is my house I use oil based primer.   But the point is a good primer is more apt to stain things or cause damage so you get that out of the way.
Whether or not you put on your finishing coat is dependent on what is right next to the things you need to paint.   I normally always paint ceiling.
But the vanity and mirror and stuff like that.   Most of the time I paint around it.   The thing is there is a good chance that during your install you will scratch something.   Touching up is no big deal but and a big but making your touchup look like it was the same coat can be a little trickier.   Also if you bang something into wall it is like 5 minutes to hit it with quick dry spackle then primer after and that surface will mimic the other primed surfaces... You nic a wall that is painted and hit it with spackle and primer... it will look like a patch job.
So really you have a to do an analysis of how much room you have to work with, how likely you are to mess up paint job and how much extra time it will take you to paint around things.   I would say 70-80% of the time I paint after but I have done some large bathrooms where I wouldn't have even thought about painting after.
Answer: I don't know how much it matters but I would personally feel better about not painting behind where the tile would go as much as possible. That could mean painting first but leaving the tiles areas as unpainted as possible or painting after tiling. If wall behind toilet is painted paint that because it's hard to access after toilet is in.
I would rather have the tile attached to the wallboard directly if possible.
Paint can peel. Especially in the presence on moisture. If your using thinset for the tiles it contains water.
If the walls are already painted... Not fresh drywall paint first but let paint cure fully before tiling over it. Pain can should say how long till cured. Not just dry but cured.
Comment: Sealing the drywall (with PVA primer or paint) solidifies its surface, actually improving its bonding ability. Of course you'd want to use a compatible mastic or mortar.
Answer: I prefer to paint before installing.  If you have to move or adjust cabinets, mirrors ect.before installation. it is much easier to move. On top of that it is way more easy to roll out the whole wall than to cover and tape everything off and cut it in.


What size fork can accommodate this bike that is larger than the normal one?

Question: My bike is a 2019 Boardman Mtr 8.6 and I'm wondering if I am able to fit a 140mm travel fork to my bike?
Here's a link to the bike and it's specs:
https://www.cyclerepublic.com/boardman-mtr-8-6-mens-full-suspension-mountain-bike-2019.html
Answer: You can swap out a suspension fork for a different one with more of less travel as long as the new fork has approximately the same axle to crown distance - the distance between the center of the axle and where the fork mates with the bottom of the head tube.
IF this distance is too long the frame is tipped back and the steer angle slackened, if the fork is too short the frame tips forward and the steering angle is steepened. Both can have negative effects on handling.
Longer travel suspension forks tend to have longer axle-crown distances as obviously they need more room for the front wheel to move.
Note that many forks are designed to compress with the rider on the bike. The compressed axle-crown distance is whats important.
Answer: As far as I know you should be able to install a fork with any amount of travel as long as a few conditions are met:
PS: I've based the dimensions/sizes in the following text on the info/specs found on this website: https://www.cyclerepublic.com/boardman-mtr-8-6-mens-full-suspension-mountain-bike-2019.html

steerer tube diameter correct diameter (some headtubes are tapered but from the images I've seen it looks like you have a non tapered 1 1/8" diameter steerer tube)
fork matches wheel size; get a fork which can fit 27.5" or bigger wheels in order to prevent running into clearance issues or simply not being able to install your front wheel (27.5" wheel size is based off of the previously mentioned link)
steerer tube length is sufficient (if your steerer tube is too short you won't have enough length sticking out to mount your stem/(potential) spacers. You can always shorten a steerer tube, usually when buying a new fork the steerer tube will have to be cut to size (video:

 , they use road bikes in the video but the method is exactly the same for mountainbikes).
also make sure to get the correct axle length/diameter when getting a through axle fork, to make sure your current wheel will fit properly on the new axle.

More travel might mean the front end of the bike will be a bit higher up than on a shorter travel fork but the change of 120mm to 140mm won't make much difference in that aspect.
Also in the description of the Boardman Mtr 8.6 (https://www.cyclerepublic.com/boardman-mtr-8-6-mens-full-suspension-mountain-bike-2019.html) it is mentioned that the Boardman mtr 8.8 has a 140mm fork installed. Quote: "If you want a few upgrades, why not trade-up to the MTR 8.8 for 140mm of Rock Shox travel, 1x10 Shimano Deore gearing and Shimano hydraulic brakes."
And it looks like the 8.8 uses exactly the same frame as the 8.6 does.
TL;DR Yes you can as long as you adhere to some rules (mentioned above)


Is it possible to create a 'logic system' equivalent to humans?

Question: I've heard of AI that can solve math problems. Is it possible to create a 'logic system' equivalent to humans that can solve mathematics in the so called 'beautiful' manner?  Can AI find beauty in mathematics and solve problems other than using brute force? Can you please provide with examples where work on this is being done?
Answer: There is of course a vast amount of work in the area of Automatic Theorem Proving, but most of it is simply concerned with proof, rather than human notions of beauty, elegance, parsimony etc.
There has however been some work in this general area over the years:

Douglas Lenat's famous AM ('Amateur Mathematician').
Douglas Hofstadter's NUMBO program for number sequence extrapolation.
A range of publications by Simon Colton
Shalosh B. Ekhad, the automated proof assistant for Artificial Combinatorics created by Doron Zeilberg and credited by him as a co-author on numerous papers.


Xbox 360 controller commands to Uno-compatible board via USB module

Question: I am trying to receive commands on a third-party Arduino-Uno-compatible board from an Xbox 360 controller via an M5Stack USB module but in my Arduino program I am not able to establish a connection from which to receive commands from the controller.
To be clear, I am talking about reading commands from an Xbox controller using an Arduino, not emulating an Xbox controller using an Arduino.
I'm reposting from the Arduino StackExchange because I got past a first hurdle since that post. (The problem I resolved was using the SS pin on the USB module.)
Hardware

A Bluno Nano. (An Arduino-Uno-compatible board in a Nano-like form factor with program uploading and serial communication via a matching Bluetooth USB dongle. However, I am using a wired USB connection to my PC instead.) The board is recognized as an Uno by the Arduino IDE. The same board has worked as expected for other projects.

An M5Stack USB module (with a MAX3421E chip), which is  primarily meant to be compatible with an M5Stack microcontroller module. Either way, the USB module can communicate successfully using SPI.

A wireless Xbox 360 controller, but I connected it to the USB module using a USB cable that plugs in to the controller with a seemingly proprietary connector. Should be in working order. I assume that the USB connection is not just for power but for data too because the USB cable's proprietary connector with the Xbox controller has a sort of 'cuff' around it that seems to very intentionally block the "Connect" button on the back of the controller from being pressed; the USB cable appears to preclude a wireless connection by design.

I am not using an Xbox 360 wireless receiver to connect to the Xbox controller, nor do I want to connect to it wirelessly.
Wiring

I connected the GND (#1/3/5), +5V (#28, VBUS), SCLK (#11, GPIO18), MISO (#9, GPIO19), MOSI (#7, GPIO23), and SS (#20, GPIO5) pins of the USB module to the corresponding pins of the Bluno Nano: GND, +5V, SCK (D13), MISO (D12), MOSI (D11), and SS (D10).

USB module schematic
Attempts

Unplugging and re-plugging the Bluno Nano's USB cable with my PC.

Pressing the Bluno Nano's reset button.

Unplugging and re-plugging the Xbox controller's USB cable with the USB module, or vice versa (that is, starting with it unplugged).

Pressing or holding the center "X" button or other buttons on the controller, presumably to turn it on or hopefully enter some kind of connection-setup mode, maybe.

Managing to press the "Connect" button at the back of the controller, even while plugged in through USB.

Using a wired USB mouse instead of the Xbox controller. This works.

Trying various combinations of the above in different orders.

I have ensured that the Xbox controller is receiving power because the center "X" button lights up upon being pressed.
Software

Arduino IDE 2.0 on Windows 11

USB_Host_Shield_2.0 version 1.6.2 (latest) installed through the Arduino library manager. Note that this library seems to be primarily designed for a particular USB host shield, but I see it being used with other USB host shields, including in my USB module's documentation, and it works with my shield for receiving commands from a wired USB mouse using the example sketch at USB_Host_Shield_2.0/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino. There is a library for Xbox 360 within the USB Host Shield 2.0 library which works with a USB controller or a wireless controller, with example sketches for each:

USB_Host_Shield_2.0/examples/Xbox/XBOXUSB/XBOXUSB.ino

USB_Host_Shield_2.0/examples/Xbox/XBOXRECV/XBOXRECV.ino

I am trying both of these example sketches with some modifications in attempt to make either work. Both upload successfully without errors.
The problem is that Xbox.Xbox360Connected or Xbox.XboxReceiverConnected is false and that no commands are received.
In the Arduino IDE Serial Monitor, I set the baud rate to 115200 to match that specified in either example sketch.
Expected behavior
To be printed in the Serial Monitor (<...> is how I indicate my comments):
XBOX USB Library Started  <This works; `Usb.Init()` returns 0 for success.>
<Then I expect Xbox controller commands upon controls/buttons being pressed, e.g., "LeftHatX: ...">

Attempts

The USB Host Shield 2.0 documentation says about use with an Xbox 360 controller: "To use it via USB use the XBOXUSB library or to use it wirelessly use the XBOXRECV library. Note that a Wireless controller can NOT be used via USB!". It is unclear to me if my wired USB connection to my wireless controller calls for the XBOXUSB or XBOXRECV library, so I tried both libraries (tried both accompanying example sketches) to no avail.

I tried using an older version of the USB Host Shield 2.0 library.

I tried specifying the following in the library's settings.h, with no apparent change in output.
/* Set this to 1 to activate serial debugging */
#define ENABLE_UHS_DEBUGGING 1

I tried setting the following in XBOXUSB.cpp and XBOXRECV.cpp, with no apparent change in output.
#define EXTRADEBUG // Uncomment to get even more debugging data
#define PRINTREPORT // Uncomment to print the report send by the Xbox 360 Controller

I tried removing Usb.Task() in loop() to no avail.

I tried removing/ignoring the Xbox.Xbox360Connected and Xbox.XboxReceiverConnected checks before the code attempts to receive commands from the controller (i.e., using Xbox.getButtonPress(LT)). This was unsuccessful.

In the case of the XBOXRECV.ino example, I tried using only the first of up to 4 controllers that can connect to the same Xbox 360 wireless receiver (which I am not using). For example, instead of the following lines of code from XBOXRECV.ino, I tried using only i = 0 instead of the for-loop (or not even indexing with i at all).
void loop() {
  Usb.Task();
  if (Xbox.XboxReceiverConnected) {
    for (uint8_t i = 0; i < 4; i++) {
      if (Xbox.Xbox360Connected[i]) {
        if (Xbox.getButtonPress(LT, i) || Xbox.getButtonPress(RT, i)) {
...

Making that change to the above lines of code was unsuccessful.

I suspect that I'm missing something simple and obvious, or that my setup can't work for some reason.
Thank you very much for your help!
Comment: If you plug your 360 controller into a PC using that same USB cable, does your PC recognize that anything has been plugged in?
Comment: The controller appears as "Xbox 360 Wireless Controller via Play & Charge Kit" under "Xbox 360 Peripherals" in the Device Manager. Less importantly, upon plugin the "X" button flashes quickly, then more slowly. Also, the light on the USB cable's proprietary connector to the controller flashes green, turns off, then stays red. This light being red does't happen with the USB module.
Comment: Turns out, "Play & Charge Kit" refers to the controller's removable rechargeable battery and the USB cable. According to [this](https://linustechtips.com/topic/658562-solved-xbox-360-controller-via-play-and-charge-kit/), "The play and charge kit only carries power. It does not carry the data required to connect a controller to a PC." I suppose that answers my question. I don't know why the USB cable stops the controller's "Connect" functionality from being used...
Answer: I discovered that, upon plugging the USB cable into my PC rather than the USB module, the controller appears as "Xbox 360 Wireless Controller via Play & Charge Kit" under "Xbox 360 Peripherals" in the Device Manager.
Turns out, "Play & Charge Kit" refers to the controller's removable rechargeable battery and the USB cable.
According to this, "The play and charge kit only carries power. It does not carry the data required to connect a controller to a PC."