Why is this angle of attack sensor tab not symmetrical between the leading and trailing edges?

Question:
Here is an Angle of Attack (AoA) sensor I took from here. If you are interested to know the AoA detail, just click the link. You may see what is inside it. But not sure what airplane's AoA sensor it was, he didn't mentioned it, but he said from Soviets' airplane. And my question is, why is the trailing edge is not smooth and gradually reduce the tip, not just like wings trailing edge? I mean, in the trailing edge there will be curl or eddy's current. Why didn't it make symmetrical between the leading edge and its trailing edge so it will smoothly release the air?
Comment: It's probably more accurate that way, and the drag penalty is trivial.  But as to *why* it is more accurate that way-- ??
Answer: From a couple of patents it seems it's a preferred shape – example:

In cross-section, the vane 4 preferably has a wedge shape as shown in FIG. 3 with a narrow or knife-like leading edge.

But why is it preferred?
A 1971 paper on AOA sensor design references a 1967 paper that compared various shapes, which says the single wedge shape is inferior but remains popular due to "vague intuitive reasoning," citing a 1935 work that I'm yet to find. Also a streamlined shape would have bad characteristics because a streamlined shape "is meant to diminish aerodynamic action" at low angles of attack.
So, a streamlined shape is not good, a flat plate is better, and the wedge shape is popular but not for any particularly good reason, and supposedly works well enough.
Also from the 1971 paper, the drag force is negligible and "does not appear in the equation of vane response."
Much google-fu later, another research undertaken by NASA (1976) tested various flat plates of various aspect ratios (among other shapes), with no mention of the cross section. Oscillation damping according to that report is a function of arm length, and is independent of airspeed.

Lenschow, D. H. "Vanes for sensing incidence angles of the air from an aircraft." Journal of Applied Meteorology and Climatology 10.6 (1971): 1339-1343. p. 1340.

Wieringa, J. "Evaluation and design of wind vanes." Journal of Applied Meteorology and Climatology 6.6 (1967): 1114-1122. p. 1120.

Barna, P. S., and Gary R. Crossman. Experimental studies on the aerodynamic performance and dynamic response of flow direction sensing vanes. No. REPT-75-T7. NASA, 1976.
Comment: I can't prove it but I think the wedge is less susceptible to oscillations. An airfoil would oscillate around the equilibrium position much more than a wedge does.
Comment: +1 A flat plate is easily bent. The triangular profile is stiffer and is in equilibrium with two balanced non-zero aerodynamic forces.
Comment: @PeterKämpf: I found a NASA paper – *that* wasn't easy; the basic keywords of this topic bring everything up but AOA vanes(!) – which you may be able to glean something from; see post update.
Comment: @ymb1, thank you for your explanation even still no firm answer, but at least I now understand about it.
Comment: @PeterKämpf thank you for your info. It is also make sense.
Answer: The shape seems to be a combination of a wedge and a parachute, which would adjust rapidly to a change in airflow and have structural strength.
A cone has 10 times more drag than an airfoil, and, importantly, a sharp leading edge that will respond instantly to a change in airflow.
The wedge/drag combination minimizes reading lag from inertial acceleration, allowing for heavier and stronger construction.  It looks like a meat cleaver, and will likely last as long too.  This would be an important consideration flying through frozen precipitation, such as hail.
A slight "boat tailing" or rounding of the trailing edge, along with the mass of the vane, would render reading fluctuations from trailing edge turbulence much less than the "steering" effect of drag and the leading edge "wedge".  In short, the design is rugged and reliably works.
Comment: Notice where the "pivot point" is compared with the US Patent 5,438,865


How to make Web service "page" which can be data source for Ms Office Excel 2007

Question: In MS-Excel under the Data tab there is button "From WEB".
Ill love to try make my web-service (web-page ) which can supply data for  Sheet.
Where I should start looking and what kind of web service, page EXCEL can import using this method.
Ill love to try make this using C# (.NET) ASP.NET
Answer: The "From Web" button pulls information from any HTML table.
You just have to put the data in an HTML table, and Excel will pull that data into a new spreadsheet or an existing spreadsheet.


How can I repair a ground-fault?

Question: I'm hooking up a new GFCI in a remodeled bathroom, replacing an older one.  There are two outlets following on the circuit.  The GFCI works fine, but as soon as I would plug a light into the next outlet, it would trip.  Another thread suggested checking between Ground/Common/Hot wires to make sure there wasn't a short, and sure enough, I'm showing continuity between the ground and common wires.  My question is, does this mean I have to run new wires, put in a new box, or is there a simpler solution?
Comment: Aren't ground and common supposed to be connected?  At the panel?
Comment: @User58220 The grounding and grounded conductors should be connected at the main service panel, and **only** at the main service panel.  If they are connected anywhere else it's a ground-fault, as it provides an alternative path for current to flow. Though you have made a good point, in that if you have not isolated this portion of this circuit, you will detect the connection at the panel.
Comment: have you tried using a plug in circuit tester to absolutely confirm the wiring is connected properly? Have you tried plugging something different into the outlet with same tripping result?
Comment: @shirlockhomes Those plug in circuit testers won't detect a ground/neutral short (since they're connected at the panel), but a GFCI will trip if you have one.
Comment: @BMitch,  Good point, the plug in testers don't indicate neutral to ground short at the device, only an open ground or neutral.  GFI's  detect a difference in current between neutral and hot, not neutral and ground. It is assuming current is going to ground through a path other than the neutral or ground conductor, thus it trips. Since ground and neutral should read 0 ohms, a dead short,  I'm not sure that would trip a GFI. I'm Really not sure, since I've never really tried that intentionally or seen it in the field. I could be wrong.
Answer: The best thing to do is replace the defective wiring. Disconnect the load side of the GFCI and at all downstream junctions. Then check for neutral/ground continuity on each segment of the wiring. Once you locate the segment that shows continuity, search for a short location inside the junction box, and failing that, replace that part of the circuit.
Short of that, depending on your situation, you may not need to wire the following outlets to the GFCI load (e.g. if they are not in the bathroom). You could pigtail the load connection to the line side of the GFCI so that the downstream devices are not protected. If they need protection, they can each have their own GFCI installed, again, only wiring to the line side of the GFCI.
Comment: Wait... Are you saying the ground-fault is only a problem, if the GFCI device is detecting it?  The way to solve a ground-fault, is to simply not detect it?
Comment: Nope, I'm saying replace/repair the wiring. But if you're going to ignore a ground/neutral short, there are options that will keep a GFCI from tripping. I'll leave the question of whether that's up to code for someone with more knowledge.

How can I repair a ground-fault?


Touchscreen technologies for outdoor use

Question: First of all - I must say that I am not a hardware expert, I am just a simple programmer, and I also not sure this is the right place for this question (but title of site suggest it might be).
I have tried to read a lot about touch screen technologies - but I am a bit in lost here . So many technologies (resistive, capacitive, OLED, PCAP, - everywhere I tried to search explain how they work, but I would not find condition based recommendations)
I wanted to know what types of touchscreen technology would be best for an outdoor kiosk, that can be potentially exposed to direct sun, dust or small debris, as well as rain?
My aim is to build some kind of a self-service "kiosk", the kind you often see at a metro station, or train station, or even ATM's, but this particular one would have to be placed in totally exposed outdoor areas.
I have already built a few prototypes, and totally excluded the IR types (any dust or debris on the edges would compromise performance).
The screen size would be around 17", and the preferred solution would be one that can be covered with 2-3mm tempered glass (meaning glass as top layer).
Comment: I'm having a hard time following your question here. Are you asking for a specific touchscreen to use outside? Recommendations on what type of technology?
Comment: @enderland No.. not a specific touch screen `model` or `manufacturer`. I am asking   about `type` or `technology`.. see my original question again. there are many available technologies, all with pros and cons , and all with different types of implementations. I am searching a use specific technology to be adapted to a specific case use scenario . in my case - outdoors use .
Answer: I would recommend a resistive touch screen for outdoor/rugged devices. Resistive touch screens uses two sheets of non conductive material with conductive material in between the two sheets. When the sheet is pressed, a current is allowed through and a touch is registered. Unlike capacitive touch screens (found on most smartphones/tablets these days) it is more durable and can be used with gloved hands. The downside to this is that it is not super precise and will need calibration from time to time.
Comment: @Alpha3031 IDK? Experience?
Comment: Citation needed for "it is more durable".


cache gets lost when duplicating a scene

Question: I have a scene with a Cloth Simulation and I want to duplicate the scene (new scene/full copy). The problem is that the cache is not duplicated. My idea was to store the cache externally (disk cache) so that I could link the folder with the cache manually. But I can't find an option where I could link the cache. I am not getting anywhere right now. I appreciate your help.
Comment: Most caches can be specified to be placed in a particular folder of your choice.  If you keep exploring here on BSE and the cache panel you will see a place to specify the folder.  You can copy files within a cache.  Please beware of unintentionally changing parameters of shared cache data because you may delete/replace data and have to create it again.   If you place an image of the cache panel in your question you may see text fields for the specification of the folder
Comment: https://docs.blender.org/manual/en/latest/physics/baking.html ...  latest means 3.3 today.  You may want to state which version of Blender is in use.
Answer: To load the baked cache, in addition to activating the "Disk cache" option, you need to assign a name to the cache, after bake physics, and after full copy scene, you can load the cache with "Current Cache to Bake" button.


In which situations should I use 'while loops' instead' for loops' in JavaScript?

Question: I've been always confused at the time to choose between the for and while loop.
In which situations should I use 'while loops' instead' for loops' in JavaScript? Does it make a difference?
Answer: In terms of "what works", they're interchangeable.
In terms of best practices and conventions, for loops are for a known number of iterations and while loops are to be executed until their intended job is done.
Comment: _>for loops are for a known number of iterations_. Not necessarily. `function (elt) {for (let e = elt; e.tagName != "HTML"; e = e.parentElement) {/*do something unknown number of times depending on how deep the elt is in the DOM*/}}`
Answer: There are three things you might have in a loop control structure: Something you do before the loop (like set the loop variable to zero), something you do in each iteration of the loop (like increment the loop variable), and something you do to tell if you're done looping (like compare the loop variable to something). If you have all three, and they're all simple, use for. If you only have a condition to tell if you're done looping, use while.
Answer: (This will soon get closed as too subjective, or moved to another forum, but anyway...)
Obviously any for loop can easily be rewritten using "while". But given the syntax of:
for ([initialization]; [condition]; [final-expression])

that is used by the for loop it is obviously very well suited to situations where there is some simple initialisation and a simple end-of-iteration update or counter increment. Putting all of the loop control logic right there in the loop's opening statement makes it easy to see at a glance what makes the loop tick.
With a while loop the end-of-iteration processing generally has to happen at the bottom of the loop's body, so it's harder to see at a glance how the loop works, but also that is much more suited to the situation where you have to perform a number of calculations to decide whether to keep the loop going.
Of course you can shove multiple statements in a for loop initialisation or final-expression by separating them with commas, but if that is anything more complicated than i++, j++, k-- it quickly gets too messy for my taste and a while loop would be a better choice.
Answer: For loops are great for doing the same task over and over when you know ahead of time how many times you'll have to repeat the loop.
On the other hand, while loops are ideal when you have to loop, but you don't know ahead of time how many times you'll need to loop.

Say, for example, you wanted to keep choosing playing cards from a
  deck until you get a spade. You don't know how many cards you'll need
  to choose, so a for loop won't work. In situations like these where
  you don't know in advance when to stop looping, we can use a while
  loop.

Courtesy: codecademy.com


When a creature affected by a change-of-control effect is destroyed, where does it go?

Question: If I use Captivating Crew to gain control of opponent's creature before my combat phase and then attack with that creature, if that creature is then blocked and destroyed does it go to opponent's graveyard? Seems like it would. Just wanting to know for sure.
Answer: Yes, cards will always go to the owner's graveyard, not the controller's. The other answer quotes the rules dealing with specific cases of a permanent going to the graveyard, but there's another more general rule that ensures that it is impossible to lose track of which cards are actually owned by which player:

400.3. If an object would go to any library, graveyard, or hand other than its owner's, it goes to its owner's corresponding zone.

This rule is important, because "owner" is more than just an in-game term, it generally refers to the actual real-world owner of a card:

108.3. The owner of a card in the game is the player who started the game with it in his or her deck. If a card is brought into the game from outside the game rather than starting in a player's deck, its owner is the player who brought it into the game.

Of course, you may be playing with a friend's deck, etc, so the in-game owner may not be the real-life owner, but this is still a necessary rule for dealing with the common situation of players playing with their own cards.
Answer: Yes, when a creature, or any card, goes to a graveyard, it goes to the graveyard of the owner, not the controller.
From the comprehensive rules

701.7a To destroy a permanent, move it from the battlefield to its owner's graveyard.
701.15a To sacrifice a permanent, its controller moves it from the battlefield directly to its owner's graveyard. A player can't sacrifice something that isn't a permanent, or something that's a permanent he or she doesn't control. Sacrificing a permanent doesn't destroy it, so regeneration or other effects that replace destruction can't affect this action.
704.5f If a creature has toughness 0 or less, it's put into its owner's graveyard. Regeneration can't replace this event.
704.5g If a creature has toughness greater than 0, and the total damage marked on it is greater than or equal to its toughness, that creature has been dealt lethal damage and is destroyed. Regeneration can replace this event.
704.5h If a creature has toughness greater than 0, and it's been dealt damage by a source with deathtouch since the last time state-based actions were checked, that creature is destroyed. Regeneration can replace this event.
704.5i If a planeswalker has loyalty 0, it's put into its owner's graveyard.

As far as the game is concerned, the owner of an object is the person who's deck the card was in, or who cast the spell that created the object (in the case of tokens)


How to load a stacktrace into Visual Studio 2013 for offline debugging?

Question: Well i'm in the situation where my dll file passes all the tests but somehow on the production server it sometimes does crash at the least expected moments.
There is actually no possibility to run a debugger but there is a generated stacktrace file:
<code>An exception occured at address 0x0045DA51 in module my.dll

Registers:

EAX: 0x61A881BC
//data......
EFLAGS: 0x00010206

Stack:
+0000: 0x0379F5E4   0x00000000   0x01F1B968   0x00000001
+0010: 0x00000007   0x01F1BCA8   0x00454622   0x742F3500
+0020: 0x00000034   0x00000001   0x00000009   0x00000002
+0030: 0x00000000   0x00000240   0x61A881BC   0x000000A4
+0040: 0x00000000   0x60104F70   0x01F1C15C   0x60104F7D
//more data..
</code>
Is there any possibility to load this data into visual studio 2013 to perform some offline debugging (not runtime debugging, I don't know how to call it)?
Answer: You should see a crashdump somewhere, a .dmp file. You can export that through sysinternals PrcessExplorer, not sureif that's possible with the default task manager, but that's of course before the crash. I unfortunately don't know anymore how to force a process to generate a .dmp file on crash..
But once you have the .dmp file, you can open it in VS (I think since 2010, maybe 2012).
There are two kinds of dumps, a minidump (basically just including the point of the execution at that point) which is usually < 1 MB, and a "full dump", which incorporates the whole working set of the process afair, which can easily be hundreds of megs. The minidump usually is enough to get started.
Sorry for the incomplete answer, but maybe it gets you on the right track (no time to investigate on my own right now).


PATRAN Order of Operations

Question: To preface this question, almost all of my FEA experience has come from SolidWorks, so I haven't had to deal with these types of problems.
I'm designing a truss structure in PATRAN composed of 1D line elements.
At some point, I have to do the following two things:

Mesh each individual line to create nodes
Apply properties (material, cross-section, stiffness) to curves

Sometimes I apply the properties first, but when I attempt to mesh PATRAN tells me "Curve is in property xyz which does not support Bar2."
Sometimes I mesh first, but when I analyze the truss my results file is sometimes empty. I can't tell what distinguishes when it works and when it doesn't.
In which order should I do these?
Comment: This might help: http://web.mscsoftware.com/support/online_ex/previous_Patran/Pat302/Exercise_16_Freebody_Analysis.pdf. Without a detailed step-by-step description of what you did, it's hard to guess where you went off-course.
Answer: The material orientation matters. For 1D, give the  material(section) direction as <0 1 0>

PATRAN Order of Operations


Trying to understand the First Responder object in nibs

Question: Let me summarize this shortly: A "First Responder" in a nib file is an object, which represents the UI control element that has the user's focus. So if the user clicks on a control, the nib sets that clicked UI control as First Responder. In my app I could make an outlet to that "First Responder" from the nib, so that I could for example send a message "make red font color" to whatever the user has activated by clicking.
And then, if this First Responder UI control does not understand that message, the message gets passed up in the responder chain, until a parent element or grandparent (and so on) UI control element understands the message. Otherwise it will be ignored.
So First Responder always establishes a "link" to the UI control that has focus. Is that right?
(Exact duplicate of "First Responder" - Did I get that right? by the same author)
Comment: Voted to close. Exact duplicate (as pointed out by amdfan)
Comment: @Unknown Individual: This looks like the same question with a different title. The proper thing to do would have been to edit your question and make a change to the title instead of starting a new question.
Answer: The first responder is simply the object that will be told (and given a chance to respond) to an event (such as a mouse click) in your application.
Comment: I thought we notifiy the view Controller by setting IBAction?


Images Clear on Windows but Fuzzy on Mac

Question: So I have a website and it has a carousel on one of the sidebars. On windows, the pictures that flip through are crisp and clear, but I looked at them on a Mac and they're all fuzzy. Does this have to do with the resolution of a Mac v. the resolution of my Windows laptop, or is it something else?
Answer: Your Mac is probably retina, which means it uses twice the amount of pixels to display things.
Some articles with more information:

http://blog.endpoint.com/2014/05/supporting-apple-retina-displays-on-web.html
http://www.leemunroe.com/designing-for-high-resolution-retina-displays/

You can emulate retina displays on Windows in Firefox by changing the pixel ratio. This should replicate the problem you are seeing on the Mac but this time within Windows.


Can the lunatic cultist spawn on iOS

Question: I have the 1.3 update and it's 2019 but it still doesn't work.i have defeated the golem about 20 times now and the lunatic cultist didn't spawn. Please help!
Comment: Did you kill the cultists outside of the dungeon? That is usually how the Lunatic Cultist spawns.
Answer: not sure if it changed in later versions, but as far as I know the iOS version never had the entire moon lord event. the final boss was Ocram, which meant no moon lord, no celestial pillars, and no lunatic cultist.
Comment: Ocram is an optional boss that becomes accessible after you beat the wall of flesh. He is also removed in 1.3.

Can the lunatic cultist spawn on iOS


Mobile phone wavebands and signal attenuation

Question: We know low freqs. (800 Mhz) are preferred for rural area for they are travelling great distances.
So, why do em waves (of mobile phones) with lower frequencies travel greater distances than em waves with higher frequencies, even though the latter have higher energy? Is this related to Rayleigh scattering like blue light from sun scatters more and attenuates in the atmosphere?
Comment: Scattering is a good point but not at atoms of the atmosphere as in the blue sky example. Urban areas have a high concentration of metallic perturbations. That is more likely to be the problem.
Answer: Free-space path loss (FSPL) occurs in a vacuum or air with inverse f² loss due to the antenna aperture, effective area, or receiving cross section area shrinking with frequency.
At any point, a beam of radio waves has an irradiance or power flux density, PFD, which depends on $ \frac{1}{\lambda ^2} $  for inverse area in $\frac{1}{m^2}$.
Side notes
This aperture effect occurs on both the transmitting and receiving antenna and becomes part of the Friis Path Loss calculations simply as a frequency dependent loss with gains defined for each antenna.
Satellite dishes can overcome some of this with larger area but accuracy errors of the parabolic shape diminishes the returns on gain with multiple wavelengths.
Comment: They are the real reason lower frequencies are better for longer range propagation ion REALLY terrestrial environments. The FSPL is very irrelevant in those environments. And the simplistic calculations with FSPL are too trivial for physics to spend time on. if you want to ask this question do it where it might belong, in an engineering or EE site. I've done both physics and EE and it's embarrassing.
Comment: So, i understand distance decreases the power distribution per surface area but does not understand the frequency relation or Friis Path Loss part. Antenna sizes are proportional to wavelengths or freqs so what makes the difference?
Comment: The smaller wavelength has a smaller aperture and hence smaller flux density per unit area.  $ f=c/\lambda $  Friis Loss you can look up is how system losses are computed simply including FSPL
Comment: So actually the main reason is not any of those. It is that attenuation beyond the $1/r^2$ terms, given the same antenna sizes, is heavily dependent on additional absorption, scattering and other electromagnetic effects from the terrain, the vegetation and the man-made structures. And all of those tend to block the higher frequencies and allows the lower frequencies through because it'll go around objects - diffraction- much more. That is why lower freqs like 700 MHz can be seen without  a direct line of light, whereas 3 GHz or 5 GHz needs direct LOS. See any wireless communications book.
Comment: None of the things you mentioned are related to FSPL, they are additional losses
Comment: So, smaller wavelength requires a smaller antenna aperture which will be receiving less power. So, could we improve the power by making a bigger antenna for same frequency?
Comment: Bob dont fret from your loft mobile tower.  It's a newbie question about EM physics (best case) not a real application with Ricean Fading and leaf reflections.  I explained clearly why the phenomena occurs and also explained larger antenna has diminishing returns. The geometric error increases with size and gain so that 20 dB needs better than 0.01% precision on curvature. More than this is very expensive. ( Andrews.com antennae cost $xx k ) and is impractical because an omni antenna is usually needed for mobile and horiz-array high gain expensive antenna are already used base stations.
Answer: Low frequencies waves suffer less from diffraction, by geographical features, implying they  undergo less distortion from the cell mast to your phone.
A further reason is that low frequencies are less attenuated and absorbed over long distances than higher frequency waves.
Whalesong is a natural example of a similar phenomenon, as well as the fact that communication with submerged military  submarines utilises low frequencies, the disadvantage here  being a slow rate of information exchange.


Self-referencing as an Apikorus

Question: I have a friend who has a habit of joking about being an apikorus (because he wears his peyos behind his ears). Beyond the strictly judgmental, is there a problem with self-referencing as an apikorus, particularly if one is known to be fromm (religious) and to believe in the ikarim?
Comment: I had a friend in Yeshiva who was into "nonstandard" ideas. This was met with people calling him a kofer. To which he would jokingly reply that he is a modeh bimiktzas.
Answer: I think that there is a general prohibition that one is not allowed to be self-disparaging. I haven't seen this as an actual issur - prohibition per se. However, there are many paragraphs in Pirkei Avot that in some way, mention that one should not do this. The two most notable that I can think of:
וְאַל תְּהִי רָשָׁע בִּפְנֵי עַצְמָךְ - Avot 2:13
Do not be a wicked person in your own eyes.
אל תהי בז לכל אדם - Avot 4:3
Do not disparage anyone (i.e. - including yourself. It does not say "anyone else")
An apikoros, as you know, does not receive commendations in the Talmud, or anywhere, in general, in Judaism. Self-evaluation is valuable if it is used to improve oneself. But, generally, a person should not publicize his own character faults other than for useful positive purposes. For example, if he had a flaw in the past that he has improved, it is very useful to teach others who have currently a similar flaw, his example of how he improved himself so that they learn to emulate how he improved.
Comment: Beautiful answer
Comment: This may not apply if the person is obviously joking as is the case in the question.

Self-referencing as an Apikorus


What is NUMA node limit in modern Windows OS

Question: What is the highest number of NUMA nodes in Windows 10 / Server 2012? In Windows 7, it was documented that OS supports only up to 4 NUMA nodes1 but with modern systems supporting 320 logical processors this clearly cannot be the case anymore.
Answer: HP Sold an Itanium-based 64-socket/NUMA-node Integrity server that ran Windows Server 2003 for Itanium and Server 2008R2 supports 64 x64 sockets/NUMA nodes, I can't find any details for Server 2012R2 but I'd imagine it supports the same limits or more. No idea about client OSs.


What is the purpose of dynamic memory arrays?

Question: Dynamic memory arrays have a fixed size.
What is the purpose of using a dynamic memory array vs. a fixed-size memory array?
What makes them dynamic?
Answer: in solidity, fixed arrays are allocated in memory or storage at compile time, which makes them more efficient in terms of gas costs and faster to access than dynamic arrays. A dynamic array, however, can change in size during runtime. Dynamic arrays are allocated on the heap and require more gas costs to access and modify elements compared to fixed-size arrays.
One key advantage of dynamic arrays is their flexibility to adjust their size, which makes them suitable for storing large data where the size is not known in advance. However, this flexibility comes at the cost of higher gas costs and slower execution time.
So, fixed-size arrays are more efficient in terms of gas costs and faster to access, while dynamic-size arrays are more flexible but require more gas costs and are slower to access. The choice between them depends on your use case
Hope this helps
Comment: Dynamic memory arrays are mainly used when you want to create an array with a size that is not known at compile-time, and you want to allocate memory for it during the runtime of the program.
Comment: Thanks! I think dynamic arrays in memory cannot adjust their size, and thus I'm wondering what their purpose is for.

From the solidity documentation: https://docs.soliditylang.org/en/latest/types.html#allocating-memory-arrays

"Memory arrays with dynamic length can be created using the new operator. As opposed to storage arrays, it is not possible to resize memory arrays (e.g. the .push member functions are not available). You either have to calculate the required size in advance or create a new memory array and copy every element."


my kitten is litter trained but does a poo on his bed and blankets

Question: I recently got my kitten, the owner says he is litter trained, yet he hasn't used the litter box and has only done a poo on his bed and a blanket. I am using a different ,scented, litter to what he had in his home and I'm not sure if that is the problem
Comment: Welcome to pets.SE! Because this is not a forum but a question and answer site, youbwill get better answers as specific your question is. Guessing is not good behavior here. So maybe you can edit your question and add an aim you want to reach, or a specific thing you ask for.
Answer: A kitten in a new home is scared and confused. He may not be comfortable enough yet to leave his bed and go wandering around, plus he may have trouble finding your litter box (and getting into it) in time anyway. So, he poops where he knows it's safe.
Also, you should be using the exact same litter (and food) as his prior home until he's fully settled in. Cats recognize things mostly by smell, and he may not realize that your scented litter is litter yet.
So, switch to the litter he knows and move the box closer to where he sleeps. Once he is using it regularly, you can consider slowly switching to your preferred brand and location.
Comment: "he may have trouble finding your litter box" This is why more current recommendations for adopting cats and kittens includes the advice to place the cat in the litterbox when first bringing him into the new home. Wherever he goes to hide for the first day or two, he'll know how he got there from the litterbox and be able to find his way back.


Did Microsoft just update Sharepoint online?

Question: Over the last couple of days the html markup of several of my customers completely separated Sharepoint online sites have changed slightly. For example the element with the id Suite_MainLink_ShellDocuments has changed to O365_MainLink_ShellDocuments, breaking my Jquery script! I can't see any other reason than that there has been an update to the Sharepoint Online services. But I can't find any notification about it anywhere. Shouldn't I be able to get some kind of notification about these kinds of updates? Has anyone else seen this?
Comment: Not a good question in the long run. Should be reformulated to deal with such updates in general.
Answer: Probably. And you won't get any notification, as it says in their terms of use. As someone supporting a customised solution you need to be aware of what can go wrong and plan it in your support agreement somehow.
Have a read of this blog post I wrote recently on the topic, with some good food for thought from Marc Anderson: http://omicron-llama.com/2014/01/29/supporting-office365-customisations/
Comment: Oh! That's tough. I guess I have to always take into account that things will break, and try to make the fall as smooth as possible. And then maybe develop a dashboard monitoring version changes on my customers sites. Thanks for the input!
Answer: Another change you might face is that you won't find a field by it's title because for required fields they changed that value.
This is finding was document by Mark Anderson too:
Office 365 update changes display name on required field
A workaround can be found on my blog post:
Safer request form fields using JQuery
Sad to hear that other ID fields are affected too by those changes.
Comment: I've released SPServices 2014.01 with fixes for these issues on 2014-02-19.
Comment: That's even worse than changing the ID:s. Thanks for the links.
Answer: Interesting. If we look at one of the entire elements where this has occurred:

we can see that there are classes with the o365cs prefix. This would seem to indicate that there are CSS class differences between Office365 and on premises. This will be a big barrier to migration from on premises to Office365, as much branding and/or functionality will break in testing.
Comment: There is something big coming our way because the also included a new css file to handle these prefixes.
Comment: Yes, https://prod.msocdn.com/3.06.4929.2/Unknown/en-US/css/O365Shell15.css
Comment: Yeah saw that too. We will see what the future brings. I think we will only know the reason on the SPC.
Answer: This was really frustrating as we just rolled out our custom branding on Monday, then Tuesday night they pushed the update and broke our new enterprise menu that we injected into the O365 blue header bar.
It was a quick fix to just rename the ID's and Classes appropriately, but I woke up Tuesday morning to a slew of help desk requests and panic attacks from our users in Asia....bleh
For those paying attention, they originally pushed out the changes for some O365 tenants back around December 20th, then reverted them a day or 2 later.  I was building our branding then, had to fix it to account for it, only to unfix it after they reverted.


Wallet Selection Modal

Question: I am working with the team that is developing the MetaMask snap for Polkadot-like networks. In addition to this wallet and the well known Polkadot-JS extension, there are Nova Wallet, Talisman, and I'm sure many others. The Ethereum ecosystem maintains a modal to make it easy for dApp developers to support multiple wallets, as does the Near ecosystem. Is there an established/preferred pattern for dealing with the multiple wallets that exist in the Polkadot ecosystem? If such a solution doesn't currently exist, would a solution similar to the Ethereum/Near solutions be a desirable addition to the Polkadot ecosystem?
Comment: Just wondering if you could update us on this solution? Thx!
Answer: A similar solution to support multi-wallet on polkadot ecosystem is in progress right now. I'll keep you posted once we are close to release.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

Wallet Selection Modal


Why is my Weeping Cherry tree growing like a bush?

Question: 2 years ago, I planted a Weeping Cherry tree (it was about 1 ft tall when I planted it). It doesn't seem to be growing taller, but it IS growing wide. It is growing kind of like a Japanese Lace Leaf Maple. I grew up with a Weeping Cherry in our yard and always loved it...however this doesn't appear to be normal, to me. Is this to be expected? Is there something I should do to correct how it is growing? Any help would be awesomely appreciated!]1
Answer: I'm assuming that your weeping cherry is grafted onto a rootstock that was about a foot or two tall. I've worked with such "trees", and in my experience the rootstock never grows taller after grafting. You were actually sold a shrub-form weeping cherry, not a tree-form (in which the rootstock would've been about six feet tall or more at the graft). There is nothing that you can do to make a tree out of the shrub-form that you have.
If you have the room, you could create a large-ish garden bed around the shrub and add more shrubs, some perennials, maybe a very large rock or two, and perhaps a bench. Properly landscaped, this could result in a rather spectacular garden. If you don't have the room, maybe create a bed just for the weeping cherry, perhaps about four feet in diameter larger than the shrub is now to allow for future growth.


All in player mucks hand before runout

Question: (2/5 cash) The hand is heads up to the flop and after the flop the action is all in, and call. After counting the amount of the all in the dealer begins to put the turn and river when the player who called the all in tables Aces. The player who originally made the all in bet is disgusted and weakly pushes his cards forward while the turn is being put out. After the river which is a board pairing ten the all in player reaches forward and turns over king ten for a rivered three of a kind cracking the aces. The player with aces is livid that the other players cards weren't mucked before the turn and river and believes the pot should be awarded to him. My question is, should the dealer stop the runout, muck the players cards, and award the player with aces the pot without seeing a runout.
Answer: This is not so much a matter of rule as of dealer training and casino policy. If a player leaves his hand face down and unprotected, the dealer may muck it, but most are trained to do this only when the player has done so in response to a bet. Once both players are all in, both are entitled to see the runout, and there's no reason for the dealer to muck a hand unless the player really tries to throw it in the discards or something.
A second point to mention, though, is you say the player only exposes one card: that means nothing. In that case, the dealer should announce "best hand shown is aces", ask the other player to show his hand or muck it, and absolutely take it an muck it if unprotected, even if the single shown card is enough to win. A hand not shown completely does not exist.

All in player mucks hand before runout


Children's Sci-Fi novel 1980s, another planet with moth-like creatures and glass-like grass

Question: I'm trying to figure out the title of a book I read as a child -- probably around 1988 -- aimed at 9-10 year olds.  The story had to do with people leaving Earth and they were only able to take one personal item with them each.  I remember one person bringing a biology book -- which was helpful.  When they arrived at the new planet, there was glass-like grass that burned funny colors and strange stones around that turned out to be eggs for some beautiful moth-like creatures.  If it helps, this was a reading assignment given to me in the 5th grade in the United States.  Any ideas on what book this might have been?
Answer: I feel silly having posted this question earlier, but now I've found the answer.   I had help from some friends from Facebook finding the answer.  The book is called The Green Book by Jill Paton Walsh.
Comment: Don't forget that you can come back and click the gray checkmark on the left to mark this question as solved! :)


What are the important factors I must consider while applying to a CS program for an MS after majoring as a mechanical engineer in my undergrad?

Question: I have a master's in mechanical engineering from a pretty decent college in my country with a GPA of 7.9/10. I'd like to know what constitutes a good application to a Master's program in CS (ML, to be precise) and how I must choose my Universities that are safe and in those I have a chance.
Comment: What country is yours, and what countries are you planning on applying in?
Comment: Sorry about the late response. I am from India. I am planning to apply to USA, Canada and Germany.
Answer: Overall, your MS in ME will be viewed positively when you apply for MS in CS with Machine Learning specialization.  What will matter most are how many computer science courses you have taken (and grades you received) and how many relevant math classes you have taken -- calculus, probability & statistics, linear algebra, numerical methods, optimization.  The project work you have done in simulations could be very relevant and helpful, too, if the software you wrote was something more than procedural programming or deterministic simulation.
In your Statement of Purpose, it would be to your advantage to make a strong link between your ME education and work experience and your goals in CS-ML.  Are there applications or problems that arise in ME that you want to address with ML methods? Are there particular methods of optimization or classification that you've encountered in ME that you want to explore further in other settings?
Regarding what schools to which you might apply: I would suggest that you aim at CS departments that are part of an institution with a strong "engineering" culture or focus.  In the US there are many colleges, universities, and institutes that have an engineering focus, including the Polytechnics, Case Western Reserve, Harvey Mudd, Carnegie-Mellon, and many others.  In contrast, the CS departments at Yale, Harvard, etc. have less orientation toward engineering.
Answer: One thing that stands out in your question is your mechanical engineering background. That suggest a leaning toward more "theoretical," and less "applied" areas of computer science.
Computer science programs come in many varieties, and in your shoes, I would give the most weight to the ones "heavily oriented toward theory and simulations." Those are probably the "safest" and "best chances" for you.
Note: I have amended my original response based on comments below.
Comment: Mechanical is not necessarily a hardware thing. My projects have all been heavily oriented towards theory and simulations. I'd go as far as saying my "hardware" knowledge is quite limited.
Comment: @AkshayRangasai: In that case, I would give the greatest weight to CS programs "heavily oriented toward theory and simulations." Those are probably the "safest" and "best chances" for you.


PDF created in Adobe LiveCycle Designer does not open

Question: I designed a editable PDF in Adobe LiveCycle Designer.
Customers complain that PDF does not open and displays the following message:

Please wait...  If this message is not eventually replaced by the
  proper contents of the document, your PDF viewer may not be able to
  display this type of document.  You can upgrade to the latest version
  of Adobe Reader for Windows, Mac, or Linux by  visiting
  http://www.adobe.com/go/reader_download.  For more assistance with
  Adobe Reader visit http://www.adobe.com/go/acrreader.

I personally walked down to check and they are using the most recent updates too.
Answer: Figured it out.
Customer was trying to open editable PDF in browser.
Asked customer to download and then open. Works fine.
Answer: If you are on Linux you cannot open even after downloading the file. I get complains about forms used.
Answer: This is old, but if anyone else comes across this issue, if you are using Life Cycle try saving your form as a static PDF.
Save as>> Adobe Static PDF Form
Answer: To add to the accepted answer by @terminator
You can force the document to download on modern browser with the html download attribute
Example


Why is Time Machine not saving Google Chrome History file?

Question: I need to restore Google Chrome (Canary) browsing history from a Time Machine backup. It seems Time Machine has backed up all the profile files in ~/Library/Application Support/Google/Chrome/Default except the History file. Oops. Why is that, and how can I restore Chrome's History from a backup?
Answer: Why Chrome history is not backed up
You are correct that the ~/Library/Application Support/Google/Chrome/Default location you reference is where Google Chrome's history (among other things) is stored.
However, (and I don't recall exactly where I originally came across this), that App developers can determine which files (if any) they want skipped by a Time Machine backup and that Google doesn't allow Chrome's History to be backed up by Time Machine after changes made in 2009.
Although I only use Google Chrome occasionally, I personally get around this limitation by manually backing up the five files not backed up via Time Machine. The five files in question are:

Favicons
Favicons-journal
History
History-journal
previews_opt_out.db-journal

Restoring your missing Chrome history
Now, in terms of restoring your currently missing history, you may have some luck if you have a Google Account. If so, you could check whether you had Chrome Sync enabled. If you did, Chrome Sync syncs your history (as well as bookmarks, passwords, etc) to your Google Account so you can use them on other devices.
Comment: Thanks--further research shows the chromium team decided to mark the History database as not backed up, in order to keep the backups from growing larger with the ever-changing History file. Terrible design decision--they should just split and rotate the History so that only the most recent portion is backed up often. Sure, if you are willing to upload your entire browsing history, etc. to Google then no problem. In this case, it was kept locally and needed to be restored for forensic purposes, but SOL. Oops.
Answer: There is a different way than trying to back up the History and the History-journal. Because my guess is what you care about is the open tabs that you lost, not the history itself. These are actually backed up by TimeMachine.
You can find them here:
~/Library/Application Support/Google/Chrome/Default/Sessions
You should find 2 'Session_' files and 2 'Tabs_' files there. Close Chrome. Enter TimeMachine from the date of your choosing to the same location. Copy the 4 TimeMachine files. Replace your current 4 files with the ones. Then open Chrome. It will open all your lost tabs.
I thought I had lost over 200 open tabs in Chrome and got them all back using this method. You might want to back up your current 2 'Session_' files and 2 'Tabs_' as a safety precaution, but you shouldn't need them.
Comment: Don't guess. The history database is specifically mentioned by the OP, and the **accepted** answer references the reasons why. Tabs are not mentioned though your answer has some use if trying to recover them.


Deformed priorities of the forum

Question: The question that get most rating are the least interesting in terms of engineering/science /technology. Let's stop using rating at all.
Comment: You're going to need more than two sentences to convince people of your position. How about a careful explanation of what issue you're trying to solve, and a reasoned argument about why your proposed solution would actually solve it?
Comment: I'm voting to close this question as off-topic because this is obviously just a rant and of no substantial value to the community.
Comment: https://en.m.wikipedia.org/wiki/Law_of_triviality
Comment: I don't want to talk about specific names. And i bet you, as a local veteran, know exactly what I mean.
Comment: But if we stopped voting, where would all the imaginary internet points come from? I'm really unsure what you are trying to convey here.
Comment: Post some example(s), please.  There are multiple mechanisms at play.
Comment: While I have a few hunches, I don't know exactly what you mean.  As I've already mentioned, there's more than one mechanism at play.  In addition to the general Law of Triviality, we also have the Hot Network Questions, which acts like triviality on steroids more often than not.
Comment: What a question's _rating_? Do you mean the vote score?
Comment: And you decide what's obvious based on what knowledge?
Comment: @GregoryKornblum No one _decides_. It's a vote.
Comment: Democracy is a vote. It still allows minorities to rule. And i am only asking for a small change.
Comment: Vote, no problem. Don't award for points. A guy who asks a trivial question gets a higher vote. A guy who answers a trivial question gets higher votes. Meaning the vote is meaningless
Comment: No, i don't think so. I am sure you guys know exactly what i mean, and you definitely have a chance to look up highest voted questions/answers. Nothing to add to this.
Answer: This is more about the inner working of Stack Exchange, and has been asked multiple times on Meta. Unfortunately it is not a perfect system, and its flaws are quite well known. But so far, no better alternative has been found to preserve the quality of sites, and given the overall success of the network I think there isn't much interest to change that.
Comment: I think success is relative at best. Many good people are frustrated, many questions are not answered. So site could be much better
Comment: @GregoryKornblum of course, but by success I mean that the network (as a whole) grows in content and in users. I agree that it could be improved, but this is not something we can do within the EE site.
Comment: Ok, let's start with your agreement.
Comment: @GregoryKornblum I'm afraid it won't get you that far

Deformed priorities of the forum


Can I receive missionaries in my house?

Question: Missionaries from other religions often comes to the house of everyone in the neighborhood. I used to speak with them, but today I'm trying to avoid them. I should receive them in my house or I must say that I don't have interest in what they have to say?
Answer: So one of my friends did something like this. He told missionaries that if you are going to talk about your faith for say 10 minutes, then i will talk about my faith for 10 minutes.
Please do so if you can really well represent your faith the way they do. Otherwise, you can avoid them. If you are living in US/Canda, you can get ICNA (Islamic Council of North America) brochures on Islam and give them some.

Can I receive missionaries in my house?


Creating a local variable in an if statement?

Question: I'm looking at a function that creates a local variable in an if statement. If someone called that function and the condition to the if statement was not triggered, that local variable wouldn't exist, right?
Answer: Yes. It's like other languages it won't exist in out of the scope.
solc compiler give you Undeclared identifier error.
for example
if (everything) {
   uint testVariable = 1;
}
require(testVariable == 1, "error"); // you will have Undeclared identifier error in here


using legacy project in Eclipse

Question: I wish to use "C" legacy project in the Eclipse. In the project it require "autoreconf
-vi" followed by "./configure" before make to start. My problem is I am not able to do "autoreconf -vi" and "./configure" from the eclipse.
Thanks
Arpit
Answer: You should try enabling the autotools features from the Eclipse Linuxtools Plugin: if you have CDT, the Linuxtools plugin should already be available in your eclipse environment. However, you need to enable features from it:

use the following menu: Help / Install New Software
in the search box type "linux", find the plugin and
check the box (+ OK)
finally select at least Linux "Tools/Autotools support for CDT" (also call graph, gcov, gprof, ltt could be interesting but not needed for your problem)

Note: if you do not already have the plugin available, detailed instructions with an update URL are available in the Linux Tools Project/PluginInstallHelp wiki page.
Once you have this plugin installed, you can:

Convert an existing project by: File / New / Convert to a C/C++ Autotools Project / Next / Next / Finish
Edit the project properties as needed: Project / Properties / Autotools / Configure Settings, e.g., to specify configure flags in the advanced tab, platform specifiers for cross compilation etc.

Hope it'll help.
Cheers,
Christophe.
= They did not know it was impossible, so they did it! --Mark Twain =
Answer: The use of "autoconf" and similar hacks is no longer required. They were needed to port C code to platforms that failed to properly support ISO C89, but did made a reasonable attaempt. We're 21 years later and such systems are quite rare.
So, you should check for the use of Autoconf macros and remove those.
Scrapping ./configure might be harder, but it's also possible you might not need it at all - it could exist only as a result of autoconf.
Comment: I can not scrap configure or "autoreconf -vi".

using legacy project in Eclipse


Static analyzer for MSDOS .bat files, compatible with NT-derived versions of Windows?

Question: command.com had a nifty /y /c option that allowed one to check syntax without executing the code. Does cmd.exe have a similar option? Are there third party linters for .bat files?
Comment: You could check this yourself with `cmd /?`
Answer: cmd help message (Windows 8):

Starts a new instance of the Windows command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] string]

/C      Carries out the command specified by string and then terminates
/K      Carries out the command specified by string but remains
/S      Modifies the treatment of string after /C or /K (see below)
/Q      Turns echo off
/D      Disable execution of AutoRun commands from registry (see below)
/A      Causes the output of internal commands to a pipe or file to be ANSI
/U      Causes the output of internal commands to a pipe or file to be
        Unicode
/T:fg   Sets the foreground/background colors (see COLOR /? for more info)
/E:ON   Enable command extensions (see below)
/E:OFF  Disable command extensions (see below)
/F:ON   Enable file and directory name completion characters (see below)
/F:OFF  Disable file and directory name completion characters (see below)
/V:ON   Enable delayed environment variable expansion using ! as the
        delimiter. For example, /V:ON would allow !var! to expand the
        variable var at execution time.  The var syntax expands variables
        at input time, which is quite a different thing when inside of a FOR
        loop.
/V:OFF  Disable delayed environment expansion.

Note that multiple commands separated by the command separator '&&'
are accepted for string if surrounded by quotes.  Also, for compatibility
reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the
same as /C.  Any other switches are ignored.

If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (") characters:

    1.  If all of the following conditions are met, then quote characters
        on the command line are preserved:

        - no /S switch
        - exactly two quote characters
        - no special characters between the two quote characters,
          where special is one of: &()@^|
        - there are one or more whitespace characters between the
          two quote characters
        - the string between the two quote characters is the name
          of an executable file.

    2.  Otherwise, old behavior is to see if the first character is
        a quote character and if so, strip the leading character and
        remove the last quote character on the command line, preserving
        any text after the last quote character.

If /D was NOT specified on the command line, then when CMD.EXE starts, it
looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if
either or both are present, they are executed first.

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun

        and/or

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

Command Extensions are enabled by default.  You may also disable
extensions for a particular invocation by using the /E:OFF switch.  You
can enable or disable extensions for all invocations of CMD.EXE on a
machine and/or user logon session by setting either or both of the
following REG_DWORD values in the registry using REGEDIT.EXE:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions

        and/or

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions

to either 0x1 or 0x0.  The user specific setting takes precedence over
the machine setting.  The command line switches take precedence over the
registry settings.

In a batch file, the SETLOCAL ENABLEEXTENSIONS or DISABLEEXTENSIONS arguments
takes precedence over the /E:ON or /E:OFF switch. See SETLOCAL /? for details.

The command extensions involve changes and/or additions to the following
commands:

    DEL or ERASE
    COLOR
    CD or CHDIR
    MD or MKDIR
    PROMPT
    PUSHD
    POPD
    SET
    SETLOCAL
    ENDLOCAL
    IF
    FOR
    CALL
    SHIFT
    GOTO
    START (also includes changes to external command invocation)
    ASSOC
    FTYPE

To get specific details, type commandname /? to view the specifics.

Delayed environment variable expansion is NOT enabled by default.  You
can enable or disable delayed environment variable expansion for a
particular invocation of CMD.EXE with the /V:ON or /V:OFF switch.  You
can enable or disable delayed expansion for all invocations of CMD.EXE on a
machine and/or user logon session by setting either or both of the
following REG_DWORD values in the registry using REGEDIT.EXE:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion

        and/or

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion

to either 0x1 or 0x0.  The user specific setting takes precedence over
the machine setting.  The command line switches take precedence over the
registry settings.

In a batch file the SETLOCAL ENABLEDELAYEDEXPANSION or DISABLEDELAYEDEXPANSION
arguments takes precedence over the /V:ON or /V:OFF switch. See SETLOCAL /?
for details.

If delayed environment variable expansion is enabled, then the exclamation
character can be used to substitute the value of an environment variable
at execution time.

You can enable or disable file name completion for a particular
invocation of CMD.EXE with the /F:ON or /F:OFF switch.  You can enable
or disable completion for all invocations of CMD.EXE on a machine and/or
user logon session by setting either or both of the following REG_DWORD
values in the registry using REGEDIT.EXE:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar

        and/or

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar

with the hex value of a control character to use for a particular
function (e.g.  0x4 is Ctrl-D and 0x6 is Ctrl-F).  The user specific
settings take precedence over the machine settings.  The command line
switches take precedence over the registry settings.

If completion is enabled with the /F:ON switch, the two control
characters used are Ctrl-D for directory name completion and Ctrl-F for
file name completion.  To disable a particular completion character in
the registry, use the value for space (0x20) as it is not a valid
control character.

Completion is invoked when you type either of the two control
characters.  The completion function takes the path string to the left
of the cursor appends a wild card character to it if none is already
present and builds up a list of paths that match.  It then displays the
first matching path.  If no paths match, it just beeps and leaves the
display alone.  Thereafter, repeated pressing of the same control
character will cycle through the list of matching paths.  Pressing the
Shift key with the control character will move through the list
backwards.  If you edit the line in any way and press the control
character again, the saved list of matching paths is discarded and a new
one generated.  The same occurs if you switch between file and directory
name completion.  The only difference between the two control characters
is the file completion character matches both file and directory names,
while the directory completion character only matches directory names.
If file completion is used on any of the built in directory commands
(CD, MD or RD) then directory completion is assumed.

The completion code deals correctly with file names that contain spaces
or other special characters by placing quotes around the matching path.
Also, if you back up, then invoke completion from within a line, the
text to the right of the cursor at the point completion was invoked is
discarded.

The special characters that require quotes are:

     &()[]{}^=;!'+,`~

I do not know a third party tool for this.


How to prevent Windows from showing desktop when the pointer hover over the right bottom corner?

Question: I'm using Windows 10, and it happens that the mouse pointer comes near that corner and shows desktop distracting me from the work i'm doing. I want to disable it if available?
Answer: Waiting an answer, I right clicked this corner and I found the option that disable it, I unchecked Peek at desktop
Answer: Right click your taskbar at the bottom of your screen and select 'Properties'
This should appear:

From here, you would uncheck the box that states "Use peek to preview the desktop when you move your mouse to the Show Desktop button at the end of the taskbar"
Let me know if that helps!
Comment: No problem.  Already gave you a +1 for resolving it yourself.  Two different ways to achieve the same thing, so I figured it wouldn't hurt to leave this too :)


Question about the usage of "WAS"

Question: I have a question that really confuses me. Imagine I was chatting with my friends in a cafe, and friendA walked out the place for whatever reason. FriendB replied "she was beautiful," in this case shouldn't it be "she is beautiful? Or is there any other meaning behind it?
Comment: FriendB is casting their mind back to the time when they were looking at FriendA. That might only have been 30 seconds ago, but it's still in the past, and so their instinct is to use the past tense. As @rogermue says, it's colloquial, but very common. It doesn't have any particular meaning.
Comment: In my view you are right. She is still beautiful, and "She is beautiful"  or "A beautiful girl" would be better. But in colloquial speech you often say things  that considered later are not for print.
Comment: Literally speaking, the word "is" would be better, since as rogermue said, she's still just as beautiful when he said it as she was when he saw her. However if we read a little deeper into it, the implication of speaking in the past tense is that as far as he's concerned, she's only in his past now. After-all he'll probably never see her again if he did not get any of her contact information. Otherwise, I'm inclined to agree with Morton's reasoning.
Answer: I prefer "is" in this case, but either could work. "Was" has something of a nostalgic / reminiscent feeling. I would say it has a slight implication of not expecting to see the person again.
Imagine seeing somebody on vacation, and then telling a friend about it. If it was some random person on the street you might say "she was so beautiful". If it was a friend that you just happened to run into, I think it would now be more appropriate to say "she's so beautiful".

Question about the usage of "WAS"


create flat faced edge

Question: im relatively new to using blender and i was wondering if anyone could help me find the quickest way to create a flat face on an odd angle with more than 3 vertexes. Here is an example of what im looking to achieve. (This was done by putting a cube up to the corner and using Boolean to delete the corner) any help would be awesome :D
Answer: You can use the Mesh > Bisect operation for this.
Just look from the side angle you want to cut from, draw a line over your geometry with LClick+Drag, and release.

There are some settings in the Operator Panel. Enable Fill and Clear Outer to get the cut to produce a face like in the GIF above.
Answer: If face is not yet created, you can use :

booleans, as you used it in example, probably the fastest way. 2 different manners :

intersect, used in edit mode
modifier, used in object mode

knife or knife project could do the job too

If face already exist, in edit mode and with face selected, you can :

mesh > clean up > make planar faces
set the 3D manipulator to normal orientation and make a Z scale of 0 (SZZ0)

Note that the last 2 ways affect the topology around the face.
Answer: Another way is to use Bevel tool in Edit mode and then dissolve middle edge to cut that face quickly:

However note that if dissolving you get big Ngon (face consisting of more than 4 vertices) which might create problems afterwards even if it's flat. Depending on the purpose this mesh is created for it might be better to split that face into triangle and quad or change the mesh design.

create flat faced edge


How do I install Debian on Thinkpad T430 under UEFI?

Question: I am trying to install Debian to a Thinkpad T430 that uses UEFI as a bootloader. The system is set to do a native UEFI boot. It is able to start GRUB from the installation media but upon choosing any installation option (both graphical and text installations) the screen goes black with visual glitches along the top. How do I get the kernel to boot?
Answer: You need to disable CSM in the T430's BIOS. It is not enough to disable legacy BIOS boot.


Center of maximal compact

Question: Let G be a connected reductive group and K a maximal compact subgroup of G, is it true that the center of K is the intersection of the center of G with K?
Comment: My recollection is that all maximal compact subgroups of $SL(2,R)$ are isomorphic to the circle group $T$, and so the answer would appear to be no.
Comment: It's perhaps interesting to note that $\dim Z(K)/(K\cap Z(G)) \leq 1$, so you're not so far off.
Answer: To elaborate on Yemon's comment: a noncompact, irreducible Hermitian symmetric space is of the form $G/K$, where $G$ is a noncompact simple Lie group with trivial center, and $K$ is a maximal compact subgroup with nondiscrete center; see e.g. Thm 6.1 in Chap. VIII of S. Helgason, ``Differential geometry, Lie groups and symmetric spaces'', Academic Press, 1978. So there are lots of examples where the two centers are un-related.

Center of maximal compact


Why Mongolia is not a part of Shanghai Cooperation Organization?

Question: All neighbouring countries are, while Mongolia is not. Why?
Comment: Its human rights record is too good to be a member.
Comment: It's an observer state, according to Wikipedia. https://en.m.wikipedia.org/wiki/Shanghai_Cooperation_Organisation
Comment: Are you interested to know if Mongolia is a member or want to know why isn't a member, just an observer?
Answer: There seems to be two main reasons for this policy. In an essay posted on the East Asia Forum, Jargalsaikhan Enkhsaikhan, an expert on Mongolian foreign policy for the UN explains Mongolian foreign policy objectives writ large:

Strengthening its relationship with its two immediate neighbours — China and Russia — is a priority in Mongolia's foreign policy. This does not necessarily mean that it will be aligned with any one of its neighbours or any third power. Rather, Mongolia aims to promote, to the extent possible, a balanced relationship with both of its neighbours. This policy is in line with China's and Russia's policies not to use their neighbours against each other. At the same time, Mongolia's foreign policy objective cautions against becoming overly reliant or dependent on any country or falling under any form of condominium. This caution applies equally to both its political and economic relationships.
Beyond China and Russia, Mongolia is also diversifying its foreign relations through its 'third neighbour' policy, whereby it is attempting to align its interests with highly developed democratic countries and influential international organisations. Third neighbour countries are selected according to their potential contribution to Mongolia's economic development and common values—among them are the United States, Germany and Japan. It also seeks to complement and sustain its political interests with economic ones by attracting investment and establishing economic interests in those countries.
[Emphasis Added]

Therefore, there are two reasons for Mongolia to maintain only observer status at the Shanghai Forum:

Observer status allows Mongolia to maintain cordial relationships with its only neighbors, without becoming overly reliant upon them, whereas full membership might cultivate a reliant relationship, and non-membership might cultivate a hostile relationship.
Mongolia has decided to throw in with democratic countries, especially like the U.S., Germany and Japan and the Shanghai Cooperative is essentially in competition with those countries. Full membership would make such cooperation and relationship building, difficult.


Streaks in PDF when using preview

Question: When opening a PDF in preview there often are streaks like this:

Does anybody have an idea where this is coming from?
Answer: There's a bug somewhere (maybe a PostScript bug related to Preview) in the Mac workflow when you Save as PDF. There is a rare occurrence where a line like that will occur, and the workaround is to repeat the Save as PDF command. The bug is rare, so you probably won't get a repeat the second time.
I've encountered the bug a handful of times because I frequently use Preview to compile screenshots (from online seminars) into a single PDF for later review. Here is the workflow I'm using when I encounter the bug:

Select all your screenshots, right-click, open with Preview.
Review the screenshots; right-click and delete any you don't want.
On the left, use [Cmd+a] to select all the screenshots.
Use [Cmd+p] to open the Print dialog, but at the bottom-left, choose Save as PDF.

After step (4), I find it necessary to quickly skim through the resulting PDF, just to confirm that a random line hasn't occurred. If it has, then I repeat step (4) and check again.
If my descriptions above are not helpful to you, then another thing to check is the software that was used to generate the PDF. For example, if you open a PDF in Acrobat (I'm not certain about Adobe Reader), then use [Cmd+d] to open the Document Properties dialog, and the Description tab will list the software used to produce that PDF. Knowing this, you can potentially identify the source of issues.

Streaks in PDF when using preview


Answer tab show "sorry no answers" for short time

Question: Go to a question with non zero answers. Tap on answers tab. Notice orange no answer button is visible, until answers load. Was expecting progress spinner instead. Happens more with slow network conditions.
Answer: The correct behavior (showing a loading indicator) was already the case here but a related bug fix from last month broke it and I didn't notice that, sorry about that. It's been fixed for the next update, 0.1.51 coming out later tonight.


Respect of children

Question: What if parents disrespect their children.
Some time parents disrespect their own children they abuse their children. We often heared about the rights of parents but what about rights of children of age more than 20  who are still depending on their parents.
Answer:
"Although the father deserves to be warned (of divine punishment) for his sin and neglect of shar'i duties, disobedient children and those who do not treat their parents kindly are also warned about their actions; it is not permissible to repay mistreatment with mistreatment or wrongdoing with wrongdoing.
Thirdly:
Although children are not to be blamed for feelings of resentment in the heart towards the father who commits sin or is a disbeliever, that does not contradict the duty to treat him kindly and obey him in that which is right and proper. But you have to hold your tongue and refrain from speaking badly to him (father), and also refrain from mistreating him in practical terms. " (https://islamqa.info/en/answers/176847/hating-an-unjust-father)

So from the aforementioned FATWA, one may conclude that children must treat kindly with their parents even if they do injustice with their own children. Children should also follow their parents as long as it does not lead to Shirk.

"But if they (both) strive with you to make you join in worship with Me others that of which you have no knowledge, then obey them not, but behave with them in the world kindly, and follow the path of him who turns to Me in repentance and in obedience. Then to Me will be your return, and I shall tell you what you used to do"
  [31:15].
Answer: Protecting the rights of children is sometimes considered so great that it is also considered as protecting the privacy of parents. Traditions in which there is talk of protecting the rights of children and the sanctity of children, and sometimes this is considered so great that it is also called protection of the privacy of parents.
The Messenger of God (peace and blessings of God be upon him and his family) said:

Just as a child should not disrespect his parents, parents should not
disrespect him "

Or elsewhere It is stated: "The Messenger of God (peace and blessings of Allah be upon him) said:" Glory be to your children and make their manners good. " (Awali al-Laali al-Aziziyya fi al-Ahadith al-Diniya, Ibn Abi Jumhur, Muhammad ibn Zayn al-Din, vol. 1, p. 254, AH 11) Prophet of God (peace and blessings of Allah be upon him): Respect your children and raise them well.
Ref: https://namnak.com/%D8%AD%D9%82%D9%88%D9%82-%D9%81%D8%B1%D8%B2%D9%86%D8%AF%D8%A7%D9%86.p32192
Comment: Do you know the source of the first hadith cited?
Comment: This hadith? : Just as a child should not disrespect his parents, parents should not disrespect him "       ------------  That's it: رسولُ اللّه ِ (صلی الله علیه و آله) «یَلزَمُ الوالِدَینِ مِن عُقوقِ الوَلَدِ ما یَلزَمُ الوَلَدَ لَهُما مِن العُقوق. (من لایحضره الفقیه، شیخ صدوق، ج3، ص483، ح4705)  ----

Respect of children


How many samples are needed to estimate a p-dimensional covariance matrix?

Question: In general, how many points are needed to estimate a p-dimensional covariance matrix? Does it depend on how the data are spread out across the different dimensions? Does it depend on the true distribution of the data? Thank you!
Comment: You are exploring two different situations. Estimated covariance matrices will be singular if and only if the data are collinear.  With $p$ data points in $p$ dimensions, if their values are chosen independently and randomly according to some common underlying continuous distribution, the chance is extremely high that the covariance matrix will *not* be singular: this merely generalizes the fact that a randomly chosen number will not be zero with high probability. If the data are generated by some other process they can have a singular covariance matrix no matter how much there are.
Comment: Two cases will do it, period: this can easily be proven by examining the formula for the usual sample covariance estimate.  If you want a more precise answer you will need to stipulate the level of accuracy needed in the estimate.
Comment: Thank you. I see what you mean, since having two points always allows you to compute a sample mean. Then, one can take differences between the original points and sample means to compute covariances.

When I try simulating in MATLAB, however, the covariance matrix I end up with is singular. For example, if I do: `x = [1 2 3; 4 3 6; 7 8 10]; eig(cov(x))`, one of the eigenvalues is 0. On the other hand, if I do `x = [1 2 3; 4 3 6; 7 8 10; -1 2 5]`, none of the eigenvalues are zero. How many points do I need to ensure that the matrix I estimate is not singular?

Thanks!
Comment: It depends on how you simulate the matrix. Your matrices do not appear to be simulated randomly, nor according to any clear rule, so it would be impossible to answer that question. What, then, is the question you really want to ask? Are you interested in creating random data with nonsingular covariance matrices?  For what purpose?
Comment: Not for any particular purpose. I just want to understand some principles behind estimating covariance matrices. In both my examples above, the dimensions are not highly correlated (i.e. there is not a deterministic relationship between any of the dimensions). When I have three data points and three dimensions, the covariance matrix _is_ singular; when I have four data points and three dimensions, the covariance matrix _is not_. Does that mean that as long as the dimensions aren't correlated that having p + 1 data points will guarantee a non-singular covariance matrix? Thank you!
Comment: Gupta, P.L., Gupta, R.D., 1987. Sample size determination in estimating a covariance matrix. Computational Statistics & Data Analysis 5, 185–192. https://doi.org/10.1016/0167-9473(87)90014-4
Answer: As @whuber has commented (+1 to his comment) you need "$p$ data points in $p$ dimensions" under the assumption those points are independent. Nevertheless as you correctly recognise this will depended on the underlying distribution of your data as well as your sample size. That is because in finite samples sizes you have finite sample effects. That means that, in very approximate manner, your random sample exhibits properties (usually regularities in the form of collinearity) that should not be there. This is not something new: Finite or small sample corrections are something that is done ubiquitously in Statistics, for example the very popular Akaike Information Criterion (AIC) has a very easy to compute version that is corrected for finite samples: the AICc (that is unfortunately underused - AICc corrects for deviations from normalities, not collinearities). So how bad things might be?
[A quick note: A singular covariance matrix is essentially one that is not positive definite (PD). You can check if a matrix is PD by checking if it has a Cholesky decomposition. That is much faster than using eigendecomposition or SVD.]
Let's say is looking at a random sample $S_1$ such that $s_1 \sim U[0,1]$ and another sample $S_2$ such that $s_2 \sim T_{\nu=1}$ ($\nu$ being the degrees of freedom). How would thing go with a relatively small (<200) sample? Well... not splendid! Let's simulate something like this (in MATLAB):
<code>rng(1234)
N = 200;
M = 200;
FailsU = zeros(N,M);
FailsT = zeros(N,M);

for i = 1:M
    for j = 1:N;
        K = cov(rand(i));
        [L,p] = chol(K,'lower');
        if(p)
            FailsU(j,i) = 1;
        end
        K = cov(random('t',1,[i,i]));
        [L,p] = chol(K,'lower');
        if(p)
            FailsT(j,i) = 1;
        end
    end
end
</code>

About 50% of the time you will get a non-PD matrix. That's definitely not good. What about if we had $p+1$ samples though?
<code>% Same initializations as above

for i = 1:M
    for j = 1:N;
        K = cov(rand(i+1,i));
        [L,p] = chol(K,'lower');
        if(p)
            Fails1(j,i) = 1;
        end
        K = cov(random('t',1,[i+1,i]));
        [L,p] = chol(K,'lower');
        if(p)
            FailsT1(j,i) = 1;
        end
    end
end
</code>

Yeap we are fine! Why all this trouble though?
Let see the $p \times p$ version first:
When you are saying that a matrix is non-invertible or it has zero eigenvalues you are saying it is rank deficient. That is because the rank of a covariance matrix can be thought as the number of non-zero eigenvalues. In addition, when you compute the product $S_x^T S_x$ you can get at most a matrix of rank $p$ because the rank of a product of matrices is at most equal to the rank of any matrix in the product. That means that the covariance matrix of your $p$-dimensional sample has at most rank $p$.
Therefore for any number of samples $N$, the rank of $S_x$ is at most $p$. From this we can assume that even small deviations from complete randomness would make our covariance matrix rank deficient (as seen in the first simulation). OK, fine why does $p+1$ seems to work so nicely?
Now let's see the $p+1 \times p$ version:
Think of how you estimate a sample covariance matrix: While in a quick manner we can write : $K = \frac{1}{N-1} S_x^T S_X$ (because we assumed $S_x$ to have mean 0, we should properly write things as: $K = \frac{1}{N-1} \Sigma_{i=1}^N (S_{x(i)} - \hat{\mu})(S_{x(i)} - \hat{\mu})^T$ where $\hat{\mu}$ is the sample mean. But what about the rank of this $(S_{x(i)} - \hat{\mu})(S_{x(i)} - \hat{\mu})^T$ matrix? Well... that is 1! Not only that but exactly because we subtracted $\hat{\mu}$ we reduced the original rank of the matrix $S_x$ to begin with! So as we add up points ($N$ gets larger) we have more chances to have a full-rank matrix. For the current case, exactly the covariance in our sample is completely diagonal, just adding another point ensure that it was extremely unlikely (not guaranteed) to have a rank deficiency.
Answer: By construction, a covariance matrix of dimension $n$, computed with $n$ data points is singular. Consider the following $2 \times2$ example.
Data: $x_1, x_2$ and $y_1, y_2$.
Let
$x_1 - \bar{x} = -(x_2 - \bar{x}) = a$
$y_1 - \bar{y} = -(y_2 - \bar{y}) = b$
The covariance matrix (ignoring bias/ML issues) is:
$$
\pmatrix{2 a^2 & 2ab \\
2 ab & 2b^2}
$$
which is singular.
Comment: I'm not sure that this answers the question.
Comment: This seems more like part of an answer to this question than a complete answer. Can you expand this to provide a complete answer?
Answer: The short answer to the question is: it depends on the distribution of the data.
Also, it depends on your definition of estimation: should they be close in the l_2 norm or do we use other metrics?
As specific case, in the case of the operator norm, we can ask how many samples do I need if the data is a p-dimensional Gaussian with variace $\Sigma$. the answer is fortunately $O(p)$. You might need more samples if the data has other distributions.
Best source of information that I was able to find online this paper, along with the presentation of the same author here.
Comment: Could you please provide some basis for these assertions, in light of the fact that they contradict other answers?  You seem to have in mind a more specific version of the question in which the covariance matrix needs to be estimated with a given degree of precision and accuracy.


Most Useful services/methods for Geocoding in Augmented Reality app for iPhone?

Question: I'm building an Augmented Reality application in the fashion of Yelp, and need to access the geodata of various buildings in as accurate a fashion as possible. What is the most accurate Geocoding service available?  Price is also an factor, but less so than the accuracy of the data.
Answer: From my experiences, Google's geocoding service is incredibly precise, especially when using address data that is missing information or is formatted incorrectly.  Though google does limit you to how many geocode requests you can have per day.
WebGIS is (currently) an unlimited geocoding web service, though it is a little harder to get precise results with malformed address data.


What happens if you mix brain waves?

Question: I was learning about brain waves, i.e. gamma, alpha, beta, etc., and was wondering what would happen if you mixed them together - e.g. I listened to Gamma waves and Delta waves at the same time. Would I get some sort of brain damage or is the brain able to handle that?
Comment: Your question is very unclear. What do you mean by "listening" to brain waves? Do you mean hooking someone (yourself?) up to an EEG and using software to translate the various types of waves to sound? The only damage you'll get is to your ears if the volume is too high. Why on earth would you get brain damage?
Comment: how it is possible to 'mix' some brain waves? as well; isn't we naturally get all- ranges of neural-rhythms (alpha, beta, delta, theta, etc) on same-scalp at same time?
Answer: Everyone has a mix of ongoing oscillations, of brain waves, at any given point. Some frequencies of waves are more or less likely to co-occur with other types of waves.
In general, brain activity follows roughly a power law distribution - that is, there is more power at lower frequencies and that power decreases in a predictable way as you go to higher frequencies.
When researchers talk about brain waves at a particular frequency, they are talking about a deviation from power law at that frequency - if they say "gamma waves" what they really mean is "there is more energy at gamma frequencies than we would expect if things were random."
Some of these deviations are predictable with changes in brain state - for example, low frequency (delta) activity is greater during sleep, and higher frequency (gamma) activity is higher during cognition.
It should also be understood that these terms really come from a method of data analysis such as Fourier analysis that breaks a signal down into component frequencies. It isn't necessary that a signal is actually produced by combinations of sine waves to break that signal down into component sine waves and describe it that way.

What happens if you mix brain waves?


Default file on a cck field

Question: I want to have a .pdf application form attached by default as a cck field on a custom content type called vacancies, so that every new vacancy created has the pdf file attached without the user having to upload it manually. Is there any way to do this? Thanks in advance!
Answer: Probably you need to show a default PDF file attachment with custom type nodes. And need to upload some specific to replace the default one via CCK file field.
CCK file field cannot be associated with some default file easily.
The best approach can be...

Place the default document in file system
Edit content-type.tpl.php and check CCK field (e.g. $node->field_name) for file upload
Print the link of uploaded file if exists Else print the link to default file
Comment: I suppose it will be the same for views, modifying the template file, will it not? Thanks for that.

Default file on a cck field


What's the purpose of these copper tracks on the bottom of BGA package?

Question: These are STM32F746NGH6 microcontroller chips in .8 mm pitch BGA package. I noticed that there are copper tracks on the bottom of this chip, some of which lead to the edge of the chip and are left exposed. What could be the purpose of these copper tracks? Would they be useful for factory programming/debugging?
Comment: They provide electrical continuity for the plating step of the PCB production process. These connections are subsequently broken when the edge of the PCB is routed to the final shape.
Answer: "Hard gold" plating finish requires an electrical connection to the pad to be plated during the process. You'll find that with board edge connector too, although in those cases the board edge would usually be cut with a V-score. Not that it would necessarily matter, but V-score cut prevents the ends of the tracks you are seeing from being pushed against a surface and making contact.
Comment: Thank you for your response! However, do you think hard gold plating would be necessary on this BGA chip that comes pre-balled from the factory? (This chip is fresh out of its packaging, those solder balls are not attached by me) Additionally, wouldn't stubs on every pad cause issues with SI/EMC issues, particularly with high speed digital signals? (This chip has clock speed over 200 MHz, and quite fast pins)
Comment: Yes to both really. As you said it could be for debugging, such as testing the circuits in a panel, if the chips are bonded onto a panel, but I think that makes even less sense. Certainly a contact bed would be more standard and robust way to do it, unless they have some special reason that I cannot think of. Testing in panel with such routes does make sense at times, but not with a microcontroller chip for many reasons.

So I'd say the same carrier has been used for a non-balled version.


Modified Taylor-Couette flow

Question: I have a question regarding the case of two nested cylinders (both infinitely long and massive) with a fluid between them, but rather than being fixed the inner cylinder is free to rotate while the outer cylinder has a constant torque applied to it.
I assume that the problem has axisymmetric flow, such that the fluid velocity is only in the angular direction and depends only on the radial distance $r$.
Now, assuming Navier-Stokes, and the solution to the fluid velocity will be of the form $A(t) r + B(t)/r$, what are our expected boundary conditions for the problem?
On the outside, we have constant torque, which means at the outer cylinder we will have a $A(t)r + B(t)/r = ctr$, where $c$ is determined by the constant torque and $t$ is time. However, on the inner cylinder, I am having some trouble. Since we are starting from rest but we are free to move, is there something I can say about the system evolving with time, without having to solve numerically?
My most simple solution would be to use Torque = Force * Lever Arm, where the lever arm would be calculated based on the distance from the two cylinders, but I do not think we can assume this.
Any help would be appreciated.
Answer: You set the velocity equal to zero at the outer cylinder and equal to the imposed velocity at the inner cylinder.  This determines A and B.

Modified Taylor-Couette flow


Cache control: max-age settings

Question: This below is the HTTP header of my site. I need to know:
what is Cache-Control: max-age=259200?
Do you think that a so high value 259200 would prevent Googlebot to index my pages? Should I lower that value?
We talk about a blog of information, publishing articles every day.
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 25 Feb 2017 15:07:53 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 123783
Connection: keep-alive
X-Powered-By: PHP/7.0.14
X-Pingback: http://www.example.com/xmlrpc.php
Link: <http://www.example.com/wp-json/>; rel="https://api.w.org/", <http://www.example.com/?p=1427>; rel=shortlink
Vary: Accept-Encoding
X-Powered-By: PleskLin
Cache-Control: max-age=259200
Expires: Tue, 28 Feb 2017 15:07:52 GMT

Answer: According to https://developer.mozilla.org/ru/docs/Web/HTTP/Headers/Cache-Control

max-age=<seconds>
  Specifies the maximum amount of time a resource will be considered fresh. Contrary to Expires, this directive is relative to the time of the request.

In other words this is time interval for which any client such as browser or proxy server might use cached version.
How exactly it affects google I'm not sure. Googlebot might take it into account in some way (but I doubt they blindly trust you). This might be an issue if you have it on your main page because the bot might not come back for 3 days (259200 seconds = 3 days) to see new articles/posts. The same goes for new comments. Still if google ignores your site for much longer than that, the issue is not with caching but somewhere else.
You might also consider looking into Google Webmaster Tools. Start at https://support.google.com/webmasters/answer/34397/?hl=en and https://support.google.com/webmasters/answer/6065812/?hl=en

Cache control: max-age settings


How to change statistic text to String?

Question: guys.
I want to replace the statistical code for code that can receive text from strings.xml (in this case "App Name":
private final static String APP_TITLE = "App name";

This is full code.
Thank you!
P.S. Nope, getString doesn't work(
Comment: Well, you cannot change final Properties after you assigned something to them.
Comment: try getResources().getString(R.string.yourString);
Answer: If you want to change a property value, don't make it final static.
Instead you should do :
private  String appTitle = "App name";

Answer: If I understand you correctly you want a static String field to contain a value from resources?
You cannot initialize a static string from resources because resources are not available at that point. What you can do is
private static final int RES_ID = R.String.app_name;
and call getString(RES_ID) anywhere you would call APP_TITLE (or just once and save to a variable)
Answer: Your main problem is you don't have a context to get resources. This can be solved by getting a context before this field is initialized. A possible workaround for this is to create an Application class, set it's context to a static field, then used this field in your Activty to get the desired string.
Application class:
public class AppContext extends Application {

   public static Context cntx;
    @Override
    public void onCreate() {
        super.onCreate();
        cntx=getApplicationContext();
    }
}

Register it in the manifest:
  <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="Test"
        android:name=".AppContext"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".Main2Activity"
            android:label="Test" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

Activity:
public class Main2Activity extends AppCompatActivity {

    private final static String APP_TITLE = AppContext.cntx.getResources().getString(R.string.app_name);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main2);
        Button b = (Button) findViewById(R.id.button);
        b.setText(APP_TITLE);
    }
}

How to change statistic text to String?


On direct image of the relative pluri-canonical divisor

Question: Let $\pi:X \longrightarrow C$ be a smooth projective morphism onto a smooth projective curve. If the general fibers are of nonnegative Kodaira dimension, is $\pi_{\ast} \mathcal{O}(k K_{X/C})$ nonzero for sufficiently divisible $k$? If it is, is there an algebraic proof? That is, without using invariance of plurigenera.
Comment: This question is an exact duplicate of your previous question http://mathoverflow.net/questions/102165/direct-image-of-relative-pluri-canonical-bundle-on-a-smooth-fibration
Comment: not exactly. Here I assume the general fibers are of nonnegative Kodaira dimension
Comment: I have to say I still don't understand what "central fiber" means in your other question. Moreover your new question is surely equivalent to the other one (a posteriori using invariance of plurigenera).
Comment: I think Artie's other's proof (which he deleted) did this case (unless I'm misremembering/reading).
Comment: Re YangMills: "central fiber" means a fibre over a fixed closed point on C
Comment: Re Karl Schewede: I don't know how to ensure the generic fibre has nonnegative Kodaira dimension.
Answer: The stalk of $\pi_* (\omega_{X/C}^{\otimes k})$ at the generic point $\eta$ of $C$ equals $H^0(X_\eta, \omega_{X_\eta/\kappa(\eta)}^{\otimes k})$.  If the generic fiber $X_\eta$ has nonnegative Kodaira dimension, then there exists an integer $k$ such that $H^0(X_\eta,\omega_{X_\eta/\kappa(\eta)}^{\otimes mk})$ is nonzero for every positive integer $m$.  Since the stalk $\pi_*(\omega_{X/C}^{\otimes mk})_\eta$ is nonzero, in particular $\pi_*(\omega_{X/C}^{\otimes mk})$ is nonzero.
Comment: I wonder how you can ensure the generic fibre has nonnegative Kodaira dimension?
Comment: @Hu Zhengyu: I suppose this depends on what you mean by "general fibers".  If you are working over $\overline{\mathbb{F}_p}$, then I agree that your definition of "general fibers" (whatever it is) might disagree with the standard definition.  However, if you are working over an uncountable algebraically closed field, or over any "sufficiently large" algebraically closed field, then this follows by upper semicontinuity, cf. Theorem III.12.8 of Hartshorne.
Comment: @HU Zhengyu: To spell it out, for every $k$, by Theorem III.12.8, there exists a proper Zariski closed subset $Z_k \subset C$ such that for every $p\in C\setminus Z_k$,  '$h^0(X_p,\omega_{X_p}^{\otimes k})$' equals '$h^0(X_\eta, \omega_{X_\eta}^{\otimes k})$'.  If your ground field is uncountable, then for every dense open subset of $C$, or even for every countable intersection $G$ of dense open subsets, there exists a point $p$ of $G$ which is no $Z_k$.  So for this "general point", for every $k$, `$h^0(X_p,\omega_{X_p}^{\otimes k})$` equals `$h^0(X_\eta, \omega_{X_\eta}^{\otimes k})$'.