Zadar to Split by Any Means Possible

Question: I'm flying into Zadar Friday evening next week. On Saturday morning I need to get down to Split.  There's limited information on Wiki and so on - any suggestions? Need to be there by noon, and could bus or train or drive, depending on what makes the most sense.
Answer: My friends recommend the buses, as the trains are more expensive.
Official site for the bus transfers is here.
According it, there are several buses from Zadar to Split, about 3 hours to ride. Unfortunately, there are no prices in english version:
<code>08-09-2011  10:00   13:35   Čazmatrans Dalmacija d.o.o.
08-09-2011  12:45   16:00   Autobusni promet d.d. u stečaju
08-09-2011  13:30   16:30   Čazmatrans Promet d.o.o.
08-09-2011  13:30   16:30   Panturist d.d.
08-09-2011  14:20   17:15   Croatia bus d.d. u stečaju
08-09-2011  16:00   19:35   Autotransport d.d. Šibenik
08-09-2011  16:45   20:00   Autobusni promet d.d. u stečaju
08-09-2011  22:30   01:00   Autotrans d.o.o.
08-09-2011  22:45   01:35   Croatia bus d.d. u stečaju
09-09-2011  10:00   13:35   Čazmatrans Dalmacija d.o.o.
09-09-2011  12:45   16:00   Autobusni promet d.d. u stečaju
09-09-2011  13:30   16:30   Čazmatrans Promet d.o.o.
09-09-2011  14:20   17:15   Croatia bus d.d. u stečaju  (Most cheaper for you)
09-09-2011  16:00   19:35   Autotransport d.d. Šibenik
09-09-2011  16:45   20:00   Autobusni promet d.d. u stečaju  (Last bus for you)
09-09-2011  22:30   01:00   Autotrans d.o.o.
09-09-2011  22:45   01:35   Croatia bus d.d. u stečaju
</code>
*Last column is a carrier name.
According to the Croatian version, price is from 110 HRK (Croatia bus d.d. u stečaju carrier) up to 184 HRK (Autobusni promet d.d. u stečaju carrier).
Comment: Kinda need to be there by noon to catch a boat though - any sites you can find with earlier buses? I'm having trouble reading Croatian ;)
Comment: @Mark Mayo Sorry, I've found nothing here. May be you must get the train, as _Gilles_ said.
Comment: @Mark Mayo It looks like there is no other buses between 22:45 and 10:00 time
Comment: @Mark Mayo Am I right you need the schedule for the 09/09/2011? I'll update it then.
Comment: It's for the morning of the 10th.  Fortunately it looks like the other sites in other answers have found some in the morning for that date, which I'm in the process of investigating.
Answer: I think it depends. If you there to see something, i.e. on vacation, I would recommend to drive by yourself. The route there is really nice and you will see a beautiful landscape with a lots of possible stops between that are worth a visit, e.g. Trigor! The road is also very nice, directly at the coast with a lot of small nice beaches.
I personally drove there some years ago and can really recommend it.
But if you just want to get there as fast as possible, I would agree with VMAtm and use the bus.
Answer: There are trains via Knin, which means a large detour inland (there just isn't a coastal line). The train journey is slow (5 hours) and the trains are infrequent, so you won't be able to get there in time.
There are buses, running approximately every half-hour on Saturday morning then down to every hour or so later in the day. The journey takes about 3 hours.
Answer: As others have said if you want to get to Split the best public transport offering is by bus. There are many different bus lines between the two cities. Check this page for a time table in English. You can also ride on one of those that have final stop further south like the ones that go to Makarska or Dubrovnik, as most of these will stop in Split too.

Zadar to Split by Any Means Possible


Enable mobile broadband not working

Question: I'm using an EVDO usb Modem on 12.04. It works perfectly fine for few times. But now on wards when ever I try to connect it shows not enabled in status . I tried to enable it by ticking "Enable Mobile Broadband" but still it shows not enabled but that option gets a checked(tick) mark. And when ever I restart my system "Enable Mobile Broadband" option autamatically unchecked.  Any help please
Answer: could be, that you are too quick or impatient ?
mobile broadband needs sometimes more time to initialize the connection.
it depends on reception of the technical devices in broadband.
my huawei mobile broadband usb stick is sometimes not working too. but it is
matter of reception (state of satellites - not state of Linux). - then it can last
5 minutes or more until it works.
Comment: @dschin1001 thanks for reply. My network name appear in list but there is status message at top where it shows signal written "not enabled"
Answer: Most probably it is your service provider issue, It works in 2 modes, cdma and evdo, when cdma is not available, network-manager is unable to connect then.
If you can manage to install gnome-ppp (sudo apt-get install gnome-ppp), and then try to connect through it, it will work for you.
If you have any other wired network connection, or a friend's wifi, you can install gnome-ppp from there, and then try again with gnome-ppp using your evdo connection.
run sudo gnome-ppp after installing it, and give it ur provider dial number, username and password.
Answer: I ran 12.04, And I also use EVDO modem device. Here is the solution:
It doesnt always work, so to know when it works,

plug in your device
when it shows up in neywork menu, click on "enable mobile broadband"
when you click on that, above the network, if it says"home network(EVDO)", then you can click on the network name and use the network.
if not unplug your device and redo all the steps until you get good results.

Enable mobile broadband not working


How to get a permanently invisible armor stand without cheats

Question: I am trying to create some armor stand art in my Hermitcraft-style world, but I am not sure how to do it. I have seen ZombieCleo do it on Java Edition, but I am playing on Bedrock Edition and don't know how to turn armor stands permanently invisible. Is there a way to do this without cheats?
Comment: Did ZombieCleo do it without cheats on Java Edition? If they used cheats, then it could be the only way.
Comment: I'm not sure. I am using Bedrock Edition.
Answer: I have no way to verify this (I don't play on Bedrock Edition), but this seems to be one of those things that isn't possible in Bedrock Edition because of the lack of support for most NBT data.  You need to set the Invisble tag to true, but that tag doesn't exist in Bedrock Edition.  Additionally, in Bedrock Edition you're limited in what poses are available for armour stands, whereas in Java Edition you can pose each limb individually.


Dangers of capacitors blowing up

Question: I was wondering what kind of damage a 350V, 6000uF (link to capacitor) electrolytic capacitor could do. will this kill me if it blew up next to me? I have never blown capacitors before, but I definitely would not want to blow this one. Has anyone reading this blown a capacitor this large before? If so, what could I expect to happen, and how could I take precaution against it?
Comment: (1) EE.SE isn't Twitter.  No need to use URL shorteners.  (2) Please don't use eBay auctions as reference.  The auction will expire in a matter of months, the link will perish, the question will loose the context.  Instead, post model number and manufacturer.  Better yet, post a more permanent link to the datasheet on the manufacturer's site.
Answer: If properly abused, that capacitor would make quite a bang and mess.  It is unlikely that the bang would kill you even if you were a couple of feet away, but you can't rely on that, and it could certainly hurt you pretty severly.  A serious injury like loosing one or both eyes isn't far fetched at all.
The secondary effect could be quite serious too.  The whole room will be filled with stuff you really shouldn't breath.  It could immediately damage your lungs, possibly killing you from oxygen starvation before any medical help could reach you.  Even if you can still breath, you may end up at a greatly elevated risk of cancer.
Depending on what is nearby, there may be additional dangers.  Anything flammable could get ignited, which comes with its own dangers and likelyhood of property loss.
Deliberately exploding it for fun or to see what happens is irresponsible and a waste of resource.  But if you do that for whatever reason, do it in a open field with you at least 20 meters and upwind.
Answer: Large capacitors are less spectacular than small ones, because they always have some kind of vent. Often these days, it's in the form of scores in the aluminum can which weaken it so it will fail in a fairly predictable fashion in case of internal overpressure. Top vent:

Typical manufacturer's caution on vent clearance:

Another caution note here
Old-school computer capacitor with bottom vent (the grey rubber circle)

Dangerously hot chemicals can be ejected, as well as bits of aluminum, particularly if stupidly high power dissipation is involved. You should not deliberately induce such failures, and getting too close to any kind of unhoused power electronics should involve at least eye protection and perhaps a full face shield where higher power is involved. The chemicals are not particularly toxic, but they won't do you any good if inhaled.
Answer: There are too many factors to consider to say "yes it will kill you" or "no it will not kill you". It might just pop a seam and vent smoke for a while, or the entire thing might explode violently, showering the entire room with boiling electrolyte and send shrapnel everywhere.
Your best bet at prevention is to just not be stupid. Don't over-volt it and don't connect it backwards. If you're still concerned about it exploding, set up a blast shield between you and the capacitor (but don't enclose it! That could act like a secondary bomb!)
If you keep it within its specified operating conditions, it won't explode. Just be smart and be safe.
Answer: In my experience large electrolytic capacitors all have pressure vents built into them, especially those with screw terminal connections. An overload or reverse voltage will cause the capacitor to heat up until the vent (usually hard rubber) pops and vents out smelly gases, maybe leaving a puddle of electrolyte by the vent. At this point the capacitor is already destroyed and not usable. The capacitors that go "BANG" and send their metal cans flying along with a cloud of stinky wax paper are the smaller 'can' type electrolytics found on pc boards. I have seen tantalum capacitors go "POP" but with much less violence-though they are prone to catching fire and burning the PCB. Disc capacitors tend to crack open if overloaded-the polarity does not matter. Unless you overvoltage them or reverse voltage them or have a high current ripple in the DC power line beyond the capacitors rating they are safe to use. I have had them (electrolytic can capacitors) explode in my face due to being installed in reverse. When building circuits pay attention to DerStom8's answer and do not install one in reverse!
Comment: On the contrary, for tantalum capacitors (particularly leaded, epoxy-dipped ones), over voltage or reverse voltage under high-current conditions can result in a literal firework.
Comment: @user2943160 is right: tantalums can literally catch fire. See [this answer](http://electronics.stackexchange.com/a/99321/29434) by Russel McMahon.
Comment: @user2943160. I have seen tantalums "POP" and leave nothing but 2 thin wires where the capacitor used to be. The use of the term 'less violence' is relative, by all means. But I think you also are including burning of the PCB due to it getting coated with soot from the capacitor, making the PCB conductive and actually burning. I used to test PCB mounted fuses this way at 100 amps of fault current. I do miss those fun days...
Comment: I have seen wet tantalums that have gone spectacularly pyrotechnic that have *vapourised* the nickel lead; considering that nickel *melts* at 1455C, I think that speaks for itself.
Answer: Exploding this capacitor deliberately will not be so exciting. As other answers describe, the precut vents will open up to release the pressure harmlessly.
But you can make it spectacular if you charge it with 350V DC (in the correct polarity of course) and short out its terminals with an iron screw driver. The full energy can be held by this capacitor is 367 Joules and this is pretty nasty. If you short the terminals in a fraction of a second, hundreds of ampere will flow causing metal melt down with huge pop and spectacular arcing....
That will be far dangerous than exploding the capacitor itself. Having said all these, I don't recommend you to try this out unless you know the dangers associated with it.
Comment: Precut vents can open "rather rapidly". I have been "shot" with a capacitor's innards (long ago) and have heard similar tales from other people. Not as spectacular as your screwdriver "suggestion" though  :-).
Comment: I've never heard of a can exploding - and I've been playing in this area for 50 years+ [!] BUT that's not to say it doesn't happen. I have heard of numerous end ejections though. Failure mode of a cylinder of equal strength material throughout is a longitudinal wall split due to "hoop stress" exceeding end stress by 2:1. If the slits weaken the top by a factor of 2 or more you can expect quite reliable end ejection failures. | If it's  'fun' you are after, easier are PET plastic bottle (Coke etc) pressurised to 150-200 + psi. **LOUD**. Don't try this at home NSFW IANAL YMMV.
Comment: Really? I got to try that out. Must use very low source impedance high voltage such as mains voltage and supply it into one cap behind a protective shield. This won't give enough time for the vent to do its job and hopefully the whole body pops.
Comment: Fifty years? That's long time.....
Comment: Not long enough :-). Mind can't work out why body seems to be starting to not keep up with its commands. Some of it feels like "just a few years ago". Some doesn't.
Comment: I bought my 1st transistor somewhat over 50 years ago. (OC71 I think). ICs existed but were so unusual as to not be seen in any everyday equipment. Learning how not to kill yourself along the way is useful. Especially if you like making things explode :-). Pop bottles not too too bad compared to most else BUT you could probably die very unlucky worst case. I've had 1200 VDC shock, several N00V smaller shocks and numerous 230 VAC mains shocks. I try very hard indeed to avoid these as life goes on, in order that it may. [Along the way](http://bit.ly/RedolentRedundancies)
Answer: Based solely on a video of a 1 Farad, which is 200 times greater capacity than a 0.006 farad capacitor you link, it's unlikely to do anything other than take your eye out or leave a welt. It's not big enough to spew much liquid electrolytic, and not big enough to fill a room or even a small cabinet with smoke. It may just vent instead of explode. Think of a small firecracker.
https://youtu.be/6OaR58pLmlQ
A 6 milli farad cap is pretty small. It will however stink the room up something fierce.
Unless you are holding it in your fist or something when it explodes. That could take a finger off.
Comment: his capacitor has an energy capacity slightly greater than that 25V 1F capacitor.
Comment: @jasen possibly. Only if charged at over 350V, instead of reverse voltage at much less. It's still limited by the volume of its electrolytic content and Physical mass. The trade offs pretty much make the two even imho.
Comment: physically it's about the same size, it's likely to make the same sized pop too,
Answer: With a 3-phase Variac supplying voltage through a rectifier with nothing limiting the charging current, I once blew up several 350 V, 2500 uF capacitors by turning up the voltage too quickly. At least one capacitor blew out the top and the Variac was damaged. The rectifiers and capacitors were inside a perforated metal enclosure. That was about 45 years ago and it taught me some lessons that I still remember.
Over the years, I occasionally heard reports from people I worked with describing similar capacitor explosions due to various types of faults. We never used capacitors like that without some kind of protective enclosure.
Answer: Small capacitors without precut vents are the dangerous ones. I had the can of one dent it's self on the ceiling at work. Germanium low power transistors in a metal TO1 can are even more dangerous. They have heatsink compound inside that can vaporize & blow the can off like a bullet. In a chart recorder pre-amp I repaired, where an insulation breakdown had applied mains voltage across it, it had dented the aluminium lid, while the bottom came down so hard, the edge sheared through one of the steel wire leads & cracked the PC board. If you are likely to blow one of them up, WEAR SAFETY GLASSES!, & a face mask if it's a germanium transistor.
Answer: Likely to KILL you? Not unless you put your head right next to it or something.
Likely to spatter you with hot gunk from its internals? Oh HELL yes!
It's unlikely to do more than scare you senseless, and give you some nifty burns.... like what you get from accidentally dropping molten solder on yourself while soldering. Hurts like hell but won't kill you.
Of course if any of those acidic chemicals or the safety plug hit you in the EYE, it'll be a whole different story.
Seriously, if you must blow up that capacitor, treat it like a big ass firework, stay at least 30 feet away, and do it outside.
Source: I've worked as an electrician for over ten years.
Answer: Stored energy = 0.5CV^2 =~ 367 Joule.
That's a serious amount of energy - slightly below
the muzzle energy of a '38 special'.
IF you directed all that energy unidirectionally and drove something solid with it then it could kill.
IF you could couple all that energy into a 6mm steel ball bearing it would have an exit velocity of about 1 kilometre/second [!!!].
BUT in almost all cases worst case is being shot in the face with an energetic wad of caustic goo. Losing an eye could happen, but more likely is just having a story to tell to your friends.
(Ask me how I know :-) - but not THAT energetic).
So, as has been noted in various ways by various people.

Check polarity
Be aware if you stand above it that you are facing a loaded gooey-shelled 38 special equivalent.
Do not place such a capacitor in an enclosure such that the energy could be focused and channelled.
Comment: I have been evaluating some ultracapacitors (the only ones that are good to 85C to my knowledge): http://www.ioxus.com/files/5014/5200/4340/Ioxus_DataSheet_Titan_60mm_151217.pdf When fully charged, there is *4556.25* Joules of energy per device. I have yet to test to destruction (which I need to do) and when that is due, I will sell tickets.
Comment: @PeterSmith Right up there with all but the top hunting rifles. That would power a genuine rail gun quite nicely, probably :-)
Comment: I have 10; that equates to roughly 50% of the energy of a hand grenade :)

Dangers of capacitors blowing up


Minecraft /testfor item rotated a certain way in an item frame

Question: Is there a way to set a command block to detect if an item frame has a certain item in it rotated to a certain position?
Answer: A quick internet search yielded a video by Dragnoz.

The command he uses:
/testfor @e[type=ItemFrame] {TileX:-819,TileY:32,TileZ:-245,Facing:3b,ItemRotation:3b}

You would have to change the numbers to match your situation.

Update: The type has changed to item_frame.  Also, you do not have to specify Facing, which will accept an item frame in the specified block facing any direction.  Item rotation is a number between 0 and 7.  You can also specify the item with the Item tag.
Here is a command which will run in 1.12.2:
/testfor @e[type=item_frame] {TileX:<x>,TileY:<y>,TileZ:<z>,ItemRotation:0b}

Here is the wiki on item frame data values for more information.


Does Siva reside In the Sun?

Question: Are there verses praising Siva as residing within the Sun like there are statments for Vishnu regarding the same?
Comment: Does this answer your question? [What are the eight forms (Ashtamurti) of Lord Shiva?](https://hinduism.stackexchange.com/questions/21725/what-are-the-eight-forms-ashtamurti-of-lord-shiva)
Answer: The Sun which is seen in the sky above is directly told as having darshan of Lord Shiva in Veda Samhitas. In the first Anuvaka of Sri Rudram we have:

असौ यस्ताम्रो अरुण उत बभ्रुस्सुमङ्गलः  । .... असौ योsवसर्पति नीलग्रीवो विलोहितः । उतैनं गोपा अदृशन्नदृशन्नुदहार्यः ॥ उतैनं विश्वा भूतानि स दृष्टो मृडयाति नः ॥ (Yajurveda 4.5.1)
This Sun who is copper-red when he arises, then golden-yellow, this highly auspicious and beneficent one is truly him. The Nilagriva Rudra who has assumed the form of the sun that glows red when rising. Him the cowherds, the women carrying water, and all the creatures behold. He, who is seen by all, let Him send happiness to us.

Similarly in the Brahmanas of Vedas as described in this answer.

He answered, ' You are Mahadeva' Since the sun is Mahadeva, thereby the Mahadeva harms him not, nor his offspring, nor his cattle, nor any one claiming to he his.... (Rigveda Kausitki Brahmana chapter 6)

Similarly in Upanishad also like:

यो वै रुद्रः स भगवान्यश्च सूर्यस्तस्मै वै नमोनमः ॥ ७॥ (Atharvasiras)
He who is Rudra, He is Bhagavan, He is in the form of Sun, Salutations to him

Similarly in multiple Puranas as described in this answer.

रुद्र इत्युच्यते देवैर्भगवान् भुक्तिमुक्तिदः ।
सूर्यात्मकस्य रुद्रस्य भक्तानां भक्तदायिनः ।।
सुवर्चला स्मृता देवी सुतश्चास्य शनैश्चरः ।
समस्तसौम्यवस्तुनां प्रकृतित्वेन विश्रुतः ।। (Linga Purana)
The Lord in the form of Sun is called Rudra by the Gods. In the form of sun he bestows prosperity to all and yields all the worldly pleasures and salvation. When he becomes Sun then his Godesses is Suvarchala and their son is Saturn (Sanaishchara).
सूर्यों जल मही वहिर्वायुराकाशमेव च।
दीक्षितो ब्राह्मणः सोम इत्येतास्तनवः क्रमात्॥७॥
सुवर्चला तथैवोमा सुकेशी चापरा शिवा।
स्वाहा दिशस्तथा दीक्षा रोहणी च यथाक्रमम् ॥८॥ (Vishnu Purana)
He also assigned to them their respective stations, the Sun, water, ether, air, fire, earth, the ministrant Brahman, and the moon; for these are their several forms. The wives of the Sun and the other manifestations, termed Rudra and the rest were respectively, Suvercalā, Uma, Vikesi, Sivā, Svāhā, Dišā, Diksā and Rohiņī.
Answer: Yes.

Vyasa-Gita , Kurma Purana II.29.39
Answer: Yes, Bhagawan Shiva reside in the Sun plus he is also the Sun as we see it.

"He said to him, 'Thou art Îsâna (the Ruler).' And because he gave him that name, the Sun became suchlike, for Îsâna is the Sun, since the Sun rules over this All. He said, 'So great indeed I am: give me no other name after that!' (Shatapatha Brahmana 6:1:3.17).

Then, [worship of the effulgent being in the sun]: The white glow of the sun is sā, and the dark bluish-black glow is ama. These two together make up the word Sama.There is a deity within the orb of the sun, who is seen by the yogis. His whole body glitters like gold, even to his toe-nails. He has a bright golden beard and bright golden hair. (Chandogya Upanishad 1.6.6).

Salutations again and again to the Golden armed, to the the golden hued One, whose form is resplendent like Gold, who is the Lord of Gold, who is the Lord of Ambika, of Uma, who is the Lord of Pashus"~ (Taittiriya Aranyaka 10.22.1).

I know the great Purusha (Rudra), who is having sun like luster and is beyond darkness. Only by knowing him one overcomes death, there is no other way to supreme goal. (Svetasvatara Upanishad 3:08).

When there is complete absence of the darkness of ignorance, then what is experienced is neither day nor night; neither existence or non-existence; the Supreme Lord Shiva alone exists as pure; that is indestructible; that is adorable light and the deity of even Savitar (Sun) himself; from that this ancient wisdom proceeded all over the world". (Shvetashvatara Upanishad 4.18).

"This Sun who is copper-red when he arises, then golden-yellow, this highly auspicious and beneficent one is truly Rudra. These other Rudras who are quartered round about in all directions of this earth, may I ward off their anger by my praise".  (Yajurveda Sri Rudram – Anuvaka -1).

"The black-throated Rudra who has assumed the form of the sun that glows red when rising. Him the cowherds, the women carrying water, and all the creatures behold. He, who is seen by all, let Him send happiness to us". (Yajurveda Sri Rudram – Anuvaka -1) .

For more you can see this answer of mine.
I hope this clarifies all your queries. Prd..
Answer: Garuda purana mentions the worship of Suryarupi Shiva through surya mantras. Thus, it is established that Siva resides in the sun.
Garuda Purana  Acharakhanda Chapter 23

Does Siva reside In the Sun?


Where is the terminal application on the filesystem?

Question: I want to be able to launch a Terminal window using JiTouch, which allows me to make a gesture open a file, so I want to know the location of the Terminal app so that I can open it.
Answer: Is this all you want?
/Applications/Utilities/Terminal.app
Comment: A little bit of Spotlight cleverness allows you learn where an  item is by Cmd-clicking or Cmd-ing its entry in the Spotlight list.  Instead of launching the item, it will open a finder window to the item's parent folder with the item highlighted.  Besides showing you where that item resides, it lets you do lots of things to it - delete it, move it, or open it with a non-default application.  My favorite, for a PDF or a spreadsheet, is to just touch  to open it with QuickView.
Comment: Yeh, that is it. I just retried searching with spotlight and saw that it was actually finding it - it was just down the bottom!
Comment: Or just hold the ⌘ key – try it! (:
Answer: In macOS 10.15 Catalina, I found it in:
/System/Applications/Utilities/Terminal.app
This is how I found it:

open Spotlight (Cmd+Space)
type: Terminal (typing the full name ensures it's the first search result at the top)
if not already selected, select (single-click) the Terminal.app found by Spotlight (should the first one in the list), after the app is selected, press the Cmd key, while holding that key the full path will be shown in the bottom-right corner of Spotlight
alternatively continue with the following steps: hold the Cmd key, then hit the Enter key or double-click on the Terminal.app found by Spotlight
that will open Finder and highlight Terminal.app
if you drag Terminal.app into a text file, another terminal, or even a browser URL bar, it will show you the full path

(Funny enough, if you right-click and choose Get Info, it will show you as if it's actually just in /Applications/Utilities, e.g. without /System).
The difference between the two paths is significant when used in a shell or (I assume) programmatically, for example:
~ % file /Applications/Utilities/Terminal.app
/Applications/Utilities/Terminal.app: cannot open '/Applications/Utilities/Terminal.app' (No such file or directory)
~ %
~ % file /System/Applications/Utilities/Terminal.app
/System/Applications/Utilities/Terminal.app: directory

Comment: It's not inconsequential in certain cases (which seem to apply to the OP), see latest edit I just did.
Comment: This is, strictly speaking, the correct answer - however the shorter form refers to this location so the difference is inconsequential for the purpose of locating the application.


Replace soil pipe or continue cleaning it annually?

Question: Tree roots grow into the house sewage drainage pipe some 6+ feet out of the house.  Each year I have a company clean out the roots with a large drill.  Replacing the pipe will be expensive.  What conditions or symptoms should I take as indications that I need to replace the pipe?
Comment: If you divide the replacement cost by the annual cost you will see how many years it will take to break even - just remember the trees never stop....
Answer: If you have roots in your pipe it needs replacing. The cleaning company is just using you as a yearly revenue source. If there is a leak in your waste pipe you are leaking untreated waste into the ground. Not particularly good from an environmental standpoint.
Have a look into pipe burst. These guys actually pull a new pipe through the old one breaking up the old one as it goes.


Sharepoint 2013 Enterprise Calendar "Event" and "Calendar" Tabs not showing

Question: I added several new Calendar apps to my site and, when I open them, most show the tabs "Browse", "Events" and "Calendar" (the latter allows a user to connect the calendar to outlook). However some of them only show the "Browse" tab so the user is unable to connect. Does anyone know a solution to this?
Answer: Ah, I discovered the reason from another post. Here:- Can't see list options after adding content editor
You need to make sure the actual calendar has focus not the container.


Intution: second derivative corresponds to curvature?

Question: What's the intuition for understanding that the second derivative does correspond to the curvature of the function?
For first derivatives one can think of the tangent lines, but what to think for second derivatives?
Answer: The second derivative is the instantaneous rate of change of the first derivative.
So if the second derivative is large and positive, then the slope of the tangent line is increasing quickly, which means the graph is curving sharply.
Answer: How about the definition of curvature? Let $y=f(x)$ be a function. Then we have:

$sgn(\kappa) = sgn(y'')$
Answer: The curvature of a function can be approximated by the second derivative when the first derivative at that point is close to zero.
If the curvature is given by
$$\frac{y''}{\sqrt{(1+y'^2)^3}}$$
and $y' \approx 0$, then the curvature can be approximated by
$$\frac{y''}{\sqrt{(1+0^2)^3}} = \frac{y''}{1^{3/2}} =y''$$
I know essentially nothing about the curvature of surfaces but I suspect a similar relation will apply to the partial derivatives when the gradient is close to zero.
Intuitively, it makes sense that the second derivative approximates curvature when the line itself is almost flat. Consider $x^4$ between x=10 and x=12.

This slope appears to be hardly curving, but if we take its second derivative at x=11, we get $y''=12(11)^2 = 1452$ which is huge. It just happens to be almost completely swamped by the slope (at x=11 it is 5324), which when plugged into the curvature equation results in a tiny curvature of 0.0037.

If you want the second derivative to be within 99% of the curvature, the first derivative needs to be at maximum $\sqrt{\sqrt[3]{(\frac{1}{0.99})^2}-1} = 0.081$ the magnitude of the second derivative.
When the second derivative comes up in differential equations, whether it's the deflection of a beam or vibrations in a string or membrane, one of the implicit assumptions is that the magnitude of deflection/vibration is tiny relative to the curvature. If you were to use the curvature itself, these equations would be much harder!


How much does string weigh?

Question: I'm creating a rogue character and I've looked through all the equipment I can get with my class and decided to get the burglar's pack. Within this, I get 10 feet of string. I'm calculating my equipment's weight at the same time. I've looked through the D&D handbook 5e for the weight of string, but there is nothing. Does anyone know what the weight of string is?
Comment: Does your group actually even use weight in your games? Many groups don't bother with such petty bookkeeping.
Answer: Negligible
10 feet of string are about 3 meters. Common Sense tells you that such an amount of string has a weight that is totally negligible. Even 3 meters of metal wire are in that area.
Many small items are without weight because you won't get encumbered by having said items in your pocket. 10-feet of string is one of these items.
If you really must have a weight: Yarn for knitting can be measured in "meters per 100 grams". The thickest available wool is 40 meters per 100 grams, resulting in about 7.5 grams for that thickness, but you will most likely have a less thick yarn, but even if you had such super thick yarn, you are facing less than 10 grams/a third of an ounce for the 10 feet.
Comment: I live in the United States of America. Did you add the '3 meters' as clarification for those souls using the metric system?
Comment: @TieflingDragon84 the meter equivalent is required because of the meters-per-100-grams measurement. Which is the only measurement that gives you *somehow* a proper estimation for both thickness and weight in a wool supplier. Yarn Type is merely a thickness, just as Ply, Wraps per inch is a measurement for calculating knitting patterns and Tension/Gauge is for determining elasticity. In general you buy yarns by weight and thickness, at which point Meters-per-100-grams gives you the length of the bundle. And as said, those are *way thicker* than string, as it is knitting yarn.
Answer: String weighs a negligible amount.
"String" is a bit of a vague category, but I wouldn't say it would weigh any more per foot than, say, twine. Looking at a couple of listings online, 328' of twine is 2.89oz and 500' of another brand of twine is 6.3oz. That's a weight of ~0.0088 - ~0.013 ounces per foot, or up to an eighth of an ounce for 10' of twine. That's well below what would be modeled for encumbrance.

How much does string weigh?


What kind of bike is a brooks champion flyer saddle suitable for?

Question: I have a brooks champion flyer, sprung saddle which I have used in the past for touring on a converted mtb.However, I have read recently on Sheldon Brown that they are best suited to bikes where the handlebar is higher than the saddle. Is there a recommended bike setup or limit for handlebar to sandle height difference for using this saddle? I've got this in my head now and I cant remember the difference between handlebars and saddle I had when I was using the saddle for touring. Now I want to use the saddle for commuting but my mtb has a different cockpit set up and wanted to get third opinion!
Comment: If it's not too wide and doesn't chafe on the inside of your thighs then the only disadvantage is that this saddle is probably much heavier than a narrower, unsprung one.
Answer: I assume you are talking about this page: https://www.sheldonbrown.com/saddles.html
I think what Sheldon is saying is that upright riding positions - with the bars level with or higher than the saddle -  would benefit from a sprung saddle. I don't see anywhere where he says spring saddles are not suitable for use with lower bars.
If you like the saddle and it works on your commuting MTB go ahead and use it.
Comment: fair enough, I could also wear my speedos for cycling if I liked it, but it isn't what they are designed for.
Comment: @AndrewWelch:  If it works for you, go for it.  The "official gear" is what many cyclists have found works for them.  If you are having fun riding with the gear you have, why change?  I wear bike shorts but many of my jerseys do not have pockets.  I wear a waist pack to replace the pockets.  It works for me, but I am not promoting that approach for others.
Comment: I also use a bum bag or "fanny pack" if you are American.


"Law" or "principle" or "rule"?

Question: I write an essay on typography.
I want to keep it more or less informal but
still with some structural highlights.
Typical presentation for central ideas (sort of "bullet points"),
will be in such form:

Statement:
[A postulation of a technical rule, based on experience
and  is believed to be a very probable, "strong" technical rule]
Observation:
[description of observation and possible connection with
the statement]
....

I am looking for good synonyms for "statement" in such context.
It is declared globally, that the essay is  about my own treatment of results based on experience.
The statements are not laws or strict rules, but a verbal
summaries of technical knowledge, and is a possible candidate for such rules.
In other words there is no aim to  prove something in the first place.
An observation is a description, how the statement can be experimentally
supported.
For example:

Statement 1:
Straight text lines is the optimal glyph placement principle.
Observation(s):
Create different curvy text lines and observe the results
...

So it is sort of rule, sometimes obvious sometimes not, sometimes the rule itself is not explainable, still shows itself practically as a kind of global technical rule or potential "law".
The question is what would be a good word instead of "statement" here?
A more lively illustration of the principle in a dialogue:
Peter : Probably we can use the method 'B' to forge this tool?
Michael : Method 'A' works better. If you dig it you'll come
to the method 'A'.
Answer: How about guidance

Advice or information aimed at resolving a problem or difficulty, especially as given by someone in authority.

Oxford Dictionaries Online

"Law" or "principle" or "rule"?


Forward declaration of enums in C (not C++)

Question: Forward declaration of enums in C does not work for me.
I searched the Internet and Stack Overflow, but all of the questions regarding forward declarations of enumerators refer to C++. What do you do for declaring enumerators in C?
Put them at the top of each file (or in a header), so that all functions in the file can access them?
Comment: Typically its in an include, can you show us code to see what the problem you are having is?
Comment: Related: *[Forward declaring an enum in C headers used in C++ code](https://stackoverflow.com/questions/45852169/forward-declaring-an-enum-in-c-headers-used-in-c-code/45856576#45856576)* - *"Forward declaration of enums in C just makes no sense"*
Answer: Put them in a header so that all files that need them can access the header and use the declarations from it.
When compiled with the options:
$ /usr/bin/gcc -g -std=c99 -Wall -Wextra -c enum.c

GCC 4.2.1 (on Mac OS X 10.7.1 (Lion)) accepts the following code:
enum xyz;

struct qqq { enum xyz *p; };

enum xyz { abc, def, ghi, jkl };

Add -pedantic and it warns:
$ /usr/bin/gcc -g -std=c99 -Wall -Wextra -pedantic -c enum.c
enum.c:1: warning: ISO C forbids forward references to 'enum' types
enum.c:5: warning: ISO C forbids forward references to 'enum' types

Thus, you are not supposed to try using forward declarations of enumerated types in C; GCC allows it as an extension when not forced to be pedantic.
Comment: Why exactly ISO C forbids forward references to 'enum' types?
Comment: Because until the compiler knows the definition, it can't be sure how big the storage needs to be.  It might be possible to store the values in 1-byte integers (`char`) or it might require 2 or 4 bytes.
Answer: You can't "forward-declare" enums because the compiler won't know the size of the enum.  The C standard says " Each enumerated type shall be compatible with char, a signed integer type, or an unsigned integer type. The choice of type is implementation-defined, but shall be capable of representing the values of all the members of the enumeration".
Comment: This is not an argument. `typedef struct S S;` works, but `typedef enum E E;` doesn't, despite both having undefined sizes. Actually, forward declarations are just about _not_ knowing the sizes of the involved entities.
Comment: @luserdroog you can use an incomplete definition of a struct in header files, so likewise you could have an incomplete definition of an enum backed up by a definition elsewhere, and having that definition included at every point of use of enum values.
Comment: @luser: You could, just about, make a case that a pointer to an incomplete enum (as in my example code) makes some sort of sense.  But it is pretty tenuous -- your conclusion that they are of essentially no practical use when incomplete is correct.
Comment: Isn't it more likely that it isn't allowed because it just don't make any cotton-pickin' sense! You can't refer to any of the enum NAMES until you tell the compiler what they are. Of what possible use is an enum that defines no names?
Comment: @luserdroog.  My use case was (in a header):
`enum Foo { ... };
enum Bar;
enum Foo bar2foo( Bar bar );`
So we declare function which returns a Foo.  If you want to use it, you'll also need to include the definition of Foo.
Comment: It is not only because of size but because you'll not know the compatible type of the *pointers* and hence the representation  if you use the typedef in pointers.
Answer: I came here having the same error, but there is not really much information provided here on the code/error.
My Makefile-flags are: -Wall -Wextra -Werror -pedantic -std=c17
In my header I have the following enum:
typedef enum
{
  IS_HEAD = 1,
  IS_VALUE = 2,
  IS_SIDE
} CoinResult;

The tutorials here and there
Would recommend to use something like this:
enum CoinResult cr;
cr = IS_SIDE;

This results in the error stated by the OP.
Solved by using:
CoinResult cr = IS_SIDE;

Not sure which C-Standard, Code or reference OP was using, but I somewhat agree: Most tutorials and solutions for this relatively simple issue are kinda ambiguous.
Comment: If the variable definition and the subsequent assignment are at file scope, then the error is simply that you can't have random assignments at file scope.  A translation unit consists of a sequence of 'external declarations', which may be function definitions or declarations.  The assignment `cr = IS_SIDE;` is neither a function definition nor a declaration.  The initialized declarations is a declaration (and a definition).  If your definition/assignment combo occurs inside the scope of a function, we need to see an [MCVE] of the problem.
Answer: CoinResult isn't an enum; it's a type. If you had
enum CoinResult {
    IS_HEAD = 1,
    IS_VALUE = 2,
    IS_SIDE,
};

then
    enum CoinResult cr;

would be correct.
Comment: This is a correct criticism of Qohelet's answer. But it doesn't directly address the original question.
Comment: Related: *[Why do I need 50 reputation to comment? What can I do instead?](https://meta.stackexchange.com/questions/214173/)*.


Are trends in crossplots of compositional data from different analyses valid?

Question: Some geochemistry papers that I have read contain crossplots of compositional components that resulted from different analyses of a rock sample.  For example, one is the percent volume of TiO2 versus parts per million (ppm) of Nb.  Results from such a plot seem highly suspect to me because of the closed nature of both attributes.  However, I am not a geochemist, so I would appreciate any feedback on the validity of such results from both a geochemical and data analysis perspective.
Answer: The question is not exactly clear. Are you asking about the different methods used to analyse the rock, or are you asking about using closed (aka compositional) data in a bivariate plot?
Using different methods
This is just fine, as long as both methods are accurate. For instance, you can analyse a mineral for major elements (e.g. TiO2) using an electron probe, and then use LA-ICP-MS for trace elements (e.g. Nb). If both methods are properly standardised and all possible interferences are taken care of there is no reason why the analyses should not be used together. If the analysis was not performed properly, I wouldn't trust even as single one, regardless of whether it is used in a database together with data acquired using a different method.
Closed data
Closed data means that it has to sum to 1 or 100%, and this can cause correlations that don't necessarily mean anything. A simple example is an MgO vs FeO plot in olivine. Of course there would be a negative correlation! This type of plot would be obvious and wouldn't tell us a thing. However, in more complicated cases, this becomes less and more of a problem. It mostly depends on a case by case basis. Note that if you're comparing a major element (TiO2) with a trace element (Nb), there is less of a problem. The trace element is not one of the components that hardly has any implications for the close problem. Whether you have 10, 20 or 100 ppm Nb will not change anything for the 5% of TiO2 you got in your rock.
Classic statistics done on compositional data is almost always wrong. In the past 20 years or so, a new statistical field called "compositional data analysis" has emerged to solve some of the problems arising from the closure problem. In short, it means that you have to transform all of your data to log-ratio form, do your stats, and transform it back. This can't solve all of the problems, however.
Now, the question is - do we care that it's wrong? In the vast majority of papers, there is hardly any statistics done of compositional data, and many correlations and trends are eyeballed and drawn by hand. Often, the hassle of doing statistics the correct way does not actually contribute everything. I've heard senior petrologists claim more than once that "if it looks like a line, it is a line. If it doesn't, then it is not a line. I don't need the R2 and p-values for that".


Is Maxout the same as max pooling?

Question: I've recently read about maxout in slides of a lecture and in the paper.
Is maxout the same as max pooling?
Answer: They are almost identical:

The second key reason that maxout performs well is
  that it improves the bagging style training phase of
  dropout. Note that the arguments in section 7 motivating
  the use of maxout also apply equally to rectified
  linear units (Salinas & Abbott, 1996; Hahnloser, 1998;
  Glorot et al., 2011). The only difference between maxout
  and max pooling over a set of rectified linear units
  is that maxout does not include a 0 in the max.

Source: Maxout Networks.
Answer: That paper of Goodfellow is a little bit cryptic. For what I understand, the max out networks let the net to find the best activation function for the specific problem. This is done through a winner take all algorithm in  intermediate layers. Accidentally this kind of networks compress the information in term of paths. This means that the information is stored in the net in term weights and paths that the net create. In my opinion this is not the same as the max pooling, even though we use a winner take all in both cases, we perform a max pool in a layer to reduce the dimensionality of the problem.

Is Maxout the same as max pooling?


Anonymous Attributes and Capture Attribute

Question: Can somebody please explain me the Anonymous Attributes and Capture Attribute in simpler words. How do attributes interpolate; and when Capture Attribute can be used. I am excessively simple-minded with the Manual; and tutorials I have watched didn't seem to help.
Answer: Don't worry about the documentation not being clear to you - unfortunately it's just not clear enough on many things.
The default cube has an attribute on all vertices - it has a name position, therefore it's not anonymous:

You can Modify this attribute either by using Set Position node:

Or by treating it like any other Vector attribute and just adding to it:

In both cases the attribute gets modified when the Geonodes modifier is evaluated:

Now let's say you want to change the attribute randomly using Noise Texture:

 (⬅ not synced ➡)
Now let's say you want to add another noise to only affect the Z coordinate, but affect it by a lot. This maybe could be achieved just by increasing the Z component of the Vector Multiply node, but let's say it's easier to reason about the logic by adding a separate Noise Texture:

(old Noise Texture is called General, the one just added is called Vertical)
You can see that this noise has more scale, so it's more rough, fine-grained, however, the animation part (the driver), divided current frame by two more orders of magnitude, so the added change on Z should actually be much slower than that of the first Set Position. Let's test it:

This is not what I meant by "much slower". What happens is that while the 2nd Add Node changes the coordinate very slowly, by only 0.0001 unit every frame, The 2nd Position node connected to it doesn't contain the original vertex position - it is evaluated after the first Set Position was evaluated (read this answer to understand the order in which nodes are evaluated), so the vertex positions are already changed by the first noise. Effectively, we're traversing through the noise with the speed between 0.0001 (when the first noise outputs absolute black color and doesn't offset a vertex, so the only offsetting is done by the 2nd Add Node) and Vector((0.3, 0.3, 0.3001)).length = ~
0.52, which is a lot for a noise of scale 20.
To solve it, you need to access the original position. For example by reading it from the original geometry using the Transfer Attribute node:

Now it works as it should:

How does this Transfer Attribute node work? Current geometry has the same number of vertices as the original geometry. Also, each moved vertex has the same index as the original vertex. So by passing the currently evaluated vertex's index (and I'm doing that by not connecting anything to the Index input of TA node), and passing the Position field, the position of the vertex with the same index in the connected geometry is read - the original position.
Finally, rather than transferring, you can just save the original position and pass it along the geometry:

The effect is the same, but now the geometry contains this additional attribute. However, you don't see it in the spreadsheet, because you never output it, so it's discarded at the end, without a name - it's anonymous. You can confirm it resides on the geometry by attaching a viewer:

Finally finally you can output it and give it a name to save it:

Comment: @Asc 1. In this specific case TA and Capture can be used to the same effect, but notice the layout differs - in TA case you read from the original geometry when you need it, in CA case you save from the original geometry and pass the field forward. I think CA is more readable, because it's immediately clear you're reading previously saved value for the same element (same domain, index, geometry), just a previous version of it. In case of TA you could for example read a position of an edge of another object with the same index as the current vertex's index: https://i.imgur.com/lY2gp4v.gif
Comment: @Asc 2. Imagine that you design a location in Blender, and create an API, where someone can ask what's on coordinate X, Y, Z in that location, and the API responds for example "a tree". Noise Texture is like that, except it the location is clouds, the response is color (how dense is the cloud on that X, Y, Z coordinate), and rather than the location being generated and stored, it's just computed based on some mathematical formula based on the inputs - the `vector` location, the `scale` (actually all the scale does is multiplies the `vector`) and so on.
Comment: @Asc 2a. So if you change Vector, you move inside this world. If the change of the vector is small enough and smooth, it feels like traveling through the world https://i.imgur.com/zhpmdb2.gif  3. I didn't actually explain why the object phases through itself, because it's irrelevant... But it's simple: the output of the noise texture is between 0 and 1. Then the Z component is multiplied by 20, so now it's between 0 and 20. The height of the cube is only 2, so if bottom vertex is moved 20 up, and top vertex is moved 0 up, the bottom vertex is now 18 above the bottom vertex.
Comment: Thank you a lot!! But I have several questions, if you will.

First of all, we can use capture attribute instead of attribute transfer for the same result, right?

Secondly, (very stupid question, probably) how the vector input in Noise Texture works, and how does it affect the Noise Texture itself?

And lastly, we use Attributes in order to store information of object in some state, which we indicate (e.g. original position at the start)?

And sadly, I did not understand the reason of the object phasing through itself. Could you, please, explain it again?
Comment: Sorry, but I become exponentially more confused with each of your explanations. I still don't understand the difference between CA an TA and how Vector input in Noise Texture works. I will ask these questions separetely. Anyway, thank you!


User with Full Control can't access or edit member of a group

Question: Like the title describes I have a user who is assigned full permissions but when I click on on the user groups I get a permissions error "You do not have permission to view the membership of the group".
Comment: I am seeing two groups as Full Control. For example, Group 1 and Group 2 are both full control. The people that should be full control are in Group 1. If I remove Group two, the people in Group 1 are not able to update permissions. How can I make SharePoint know that Group 1 is the owner (and true full control) group?
Answer: This is probably due to the group being owned by a singular person.  Check the group settings for the ownership and change it to the site/collection owner group preferrably so any owners can manage the group.
Comment: That's a good suggestion, but the specific user could normally access that in the past, I'll have a look but I don't think that's the problem.
Answer: Go to:
Site Actions -> Site Settings -> People and Groups -> [From the list of the left, select the group which you want] -> Settings -> Group Settings -> Make sure that "Who can view the membership of the group?" is set to "Everyone" -> Make sure that "Who can edit the membership of the group?" is set to "Group Members"
Comment: Glad I could help out!
Comment: I love your answer. 1) Thank you even posting your answer and 2) Thank you for posting in an clear way. You are awesome. Thank you!!!
Answer: Step 1: Create a group with Full Control permission level (for example, name is Group1). Let's say Group2 is the group that needs users to be added/removed.
Step 2: Under Group Settings, add Group1 as the Group Owner of Group2 (this is possible). Now all members of Group1 will be able to add/remove users to/from Group2.
Hope this makes sense.


If I reset my phone will I lose updated windows 10?

Question: I have updated my windows phone from Windows 8 to Windows 10. If I reset my phone will I lose the updated Windows 10?
Answer: No, you will not go back to Windows Phone 8 when you reset your phone. The phone will be reset to a clean install of the latest installed Windows 10 Mobile version.
Comment: This used to happen when windows 10 was newly launched and in its couple of months of release. But now when you will reset your phone it wont go back to windows 8 instead you will get clean windows 10.


Do leaking shocks need to be changed?

Question: I own a 2013 chevy spark. It rear left shock is leaking oil gradually. Should I change it now or wait till it empties off? If it should be changed, should they be changed in pairs?
Answer: I saw a really minor oil leak in the shock of my new 2011 Toyota Yaris shortly after purchase. The shock worked perfectly, and nobody in annual inspections complained about a broken shock. I also didn't feel any reduced effectiveness of the leaking shock when driving. I just ignored the problem, and after a while the shock was so dirty that you couldn't see any visible oil. Yes, the very small amount of leaked oil was probably there, mixed with dirt.
Shocks are usually changed in pairs. If your vehicle is 4 years old, this advice is very sound for you, as a 4 years old shock can have reduced effectiveness. You don't want the rear left shock to be much better than the rear right shock.
So, my advice would be to ignore the problem if the leak is very minor. If, on the other hand, it is leaking substantial amounts of oil, replacement may be advised. Most parts of the world have mandatory inspections of cars, and they will surely tell you when the shock needs to be changed, so if you're on a tight budget, you can wait for their test results. However, more important than that is the feeling of the shocks when driving the car. If you feel the car is dangerous to drive on a bumpy 120 km/h highway, replace it now!
Answer: Any leakage means the shock is not 100%. However , at least thru 1980 year model most american car shocks leaked, so were not at 100 % but were driven anyway. My first new car ( 1979 Olds 88 ), I replaced the shocks before 20.000 miles. When I returned them to the dealer , he refunded me some cash, no questions asked. PS - I did not want any OEM shocks.

Do leaking shocks need to be changed?


My friend thinks the WCC has 14 games in a short amount of time with the purpose to induce player errors. Is that true at all?

Question: For some reason, my friend believes that the format of the World Chess Championship is made in such a way with the purpose of increasing the amount of errors by the players. Is there any trutto this claim, and why?
Comment: Why does your friend think the format induces errors?
Answer: The change in time controls from the 2018 match (which had an increment from move 1) to the 2021 match (no increment until move 60) is widely acknowledged as having the goal of increasing the likelihood of time trouble and hence mistakes.  This is exactly what happened in game 6, and Magnus acknowledged this point in the press conference.
Some people have also suggested that the decrease in rest days was also intended to make the players more likely to make errors.  This is less clear-cut, because the increase in number of games is also a good reason to have fewer rest days.
Comment: Actually, it's completely clear cut. It's all for more decisive games. Dvorkovich is on record saying so (check for example his interview for Chess24 with Tania Sachdev).
Comment: I was partly going off Magnus's opinion from the press conference that fewer rest days as such wasn't a problem, but that having a marathon game did effect the play in the games between that game and the rest day.  If I've found the correct Dvorkovich quote, it's a little ambiguous to me whether it's the lack of rest days as such that he's talking about or rather that the key thing is having more games.
Comment: "The key difference is 14 classical time control games instead of 12. With more games that we have now, the probability of error increases. Moreover, tension is known to go up as the number of rest days goes down. We will actually have two rest days per week, unlike the previous one rest day following every two games [...] This is to bring up the rate of decisive games compared to the 2018 London match between Magnus Carlsen and Fabiano Caruana, in which all 12 classical control games ended in a draw. I hope that Dubai will bring us more decisive games, after all."
Comment: Right! Since you adduce the full quote, perhaps it belongs in your answer. (on Chess.SE comments are not sacred)


What could cause Sitecore to use high CPU?

Question: We are having high CPU issues on our CD servers while running Sitecore 9. The CPU on each server (Quad core 2.6GHz Intel Xeon) are nearly maxed out while the memory usage remains fine. We have load balancing and our traffic isn't exceptionally high. Over the course of several hours the CPU usage will gradually increase until it maxes out at 100%. We have the servers to cycle the w3wp.exe process when this happens, but obviously this is not ideal. Any known issues or tips on troubleshooting this? Common issues to look for? We are caching our renderings. I am not highly experienced with Sitecore, but have a technical background and can figure things out. Thanks!
Comment: A simple thing you can always check is the log files to see if there are excessive exceptions being logged (located at `/YourSitecoreFolder/Data/logs`). Another thing you can use is the Sitecore Log Analyzer, which might point you to ERROR or WARN message trends around the times you're seeing CPU spikes: https://marketplace.sitecore.net/Modules/Sitecore_Log_Analyzer.aspx
Comment: I think You are going to need something like redgate tools and find what code is causing the issue.
Comment: I've used debugdiag (https://www.microsoft.com/en-us/download/details.aspx?id=49924) in the past to help troubleshooting this.  Redgate tools are a great resources as well.  But your best resources might be sitecore logs to see what is going on during the spikes.  For me, I had to make adjustments to my indexing strategies.
Comment: Hi Justin, welcome to Sitecore Stack Exchange. Sadly, I am not sure if this question is answerable.  We're going to need to more information about your implementation, custom configs, what's enabled, modules in use, custom code, etc.  Chris is right, you might need to run some profiling tools like RedGate or dotTrace to get an understanding of what the w3wp.exe process is doing. I believe in it's current state, this question is too-broad.
Comment: Get a memory dump of the process and analyze that using debug diag. Look at event queue table getting over 5k records. Is indexing backed up?
Answer: You can try the following to identify your issues:

Enable Sitecore Pipeline Profiling by setting
<code><setting name="Pipelines.Profiling.Enabled" set:value="true" />
<setting name="Pipelines.Profiling.MeasureCpuTime" set:value="false" />
</code>
and browsing to /sitecore/admin/pipelines.aspx
Profile a Sitecore Page by going into debug mode
(add these parameters to your url ?sc_debug=1&sc_prof=1&sc_trace=1)
Use Visual Studio Profiler to identify your cpu issues. (Debug>Profiler>Performance Profiler)

There is also a very good blog post by Jeremy Davis to learn more on profiling. https://jermdavis.wordpress.com/2017/10/02/measure-if-you-want-to-go-faster/


Want to recover internal data of my phone from cwm-based recovery

Question: Whenever I switch my phone on it always shows the name of rom installed, but after that my phone does not get on. I want to recover its internal data .I don't know what to do with cwm-based recovery. Can I retrieve whatsapp chats too?
Answer: Ideally you can retrieve nearly everything under CWM via ADB. Use adb shell to explore file structure and adb pull to pull what you want to PC.
However, 1) finding what you want to achieve can be painful, since you need to be familiar with Android filesystem structure, and ADB command line isn't friendly either; 2) even if you managed to find WhatsApp's data, you might not be able to make out what file(s) correspond to chats, and have to do a whole-folder backup, which then means restoring will be a pain (setting permissions and owners).
Retrieving contacts, SMS and simple game saves shouldn't be a problem though, as these usually are stored in one or two files. I've always backed up my savegames in a similar manner. Internal storage is also easy since you know that file structure well.


Riemann tensor and the non-commutativity of parallel transports

Question: Riemann curvature s denoted by $R^a_{bcd}$. If you try to attempt to parallel transport a tangent vector $\psi$ along an infinitesimal parallelogram given by two tangent vectors along non-parallel sides as $\eta$ and $\nu$, the following holds true.
$$\psi^a_{;cd}  - \psi^a_{;dc} = R^a_{cdb}\psi^b$$
where the $;$ indicates covariant differentiation. Here the $c$ and $d$ on the L.H.S. implies the two directions of the parallelogram. My professor said that the Riemann curvature tensor denotes the extent of the non commutativity of the covariant diferentiation along directions. In flat space, I would expect the Riemann Tensor to be zero. But does this imply commutativty of covariant differentiaton? Because covariant differentiation of a vector along a direction denotes how much the vector deviates during the parallel transport and one would not expect a deviation in flat space. So this should make the left hand side zero independent of the right hand side. What do you think?
Comment: Note that it is not the commutativity of covariant derivatives, but, specifically, the commutativity of the *2nd-order* covariant derivatives!
Answer: In flat space the covariant derivative reduces to the partial derivative (by definition). The partial derivatives do commute, hence the L.H.S. vanishes and the R.H.S., that is the Riemann tensor, measures zero.
Just a comment on the statement, it should be:
$\psi^a_{;cd} - \psi^a_{;dc} = R^a_{bdc}\psi^b$
As I know the indices of the non-parallel sides of the infinitesimal parallelogram should be the third and the fourth. A possible ambiguity remains in the sign, as you can decide which way of the loop to assume as positive, however it is a matter of convention.
Comment: However in a flat manifold the parallel transport is independent of the path, so after a loop it delivers the same vector. No change in the vector means a zero R.H.S. in any case.
Comment: If the covariant derivative reduces to the partial derivative, the notion is still that of parallel transporting vector $\psi$. In this case, it might help to think of $\psi$ as a constant vector field $\psi(x)$ over the manifold. Partial differentiating a constant vector field at any point would give zero for each of the terms individually on the L.H.S. Would this be correct?
Answer: The right hand side in that equation is identically $=0$ since the component of the vector are smooth and the covariant derivative reduces to partial derivative, in fact the $\Gamma$s are zero in a flat space.


Q value for a high pass filter

Question: How to calculate the Q value for a high pass filter ?
Ps: I'm a beginner in signal processing, so please put it in simple terms.
Answer: You can look at these set of notes provided by Analog Devices as part of their "Basic Linear Design" seminar, or just look for notes on second order filters.
The transfer function of a second order high pass filter is
$$H(s) = \frac{A s^2}{s^2+\frac{w_0}{Q}s+w_0^2}$$ where $w_0$ is the cutoff frequency, $Q$ is the $Q$-factor, and $A$ is the gain.

Q value for a high pass filter


Courses recognized, but grades are not converted?

Question: I have attended a university in Russia, and then transferred to Italy, and in Italy they recognized many courses  but said to me we can't convert grades, we only recognize courses. Is this a common practice? I find it quite bizarre.
Comment: Not uncommon - direct conversions are difficult since they rely on fairly detailed understanding of specific university policies at the two places.
Comment: An easy example - in Canada, grades are about 10% lower than in the US so transferring my Canadian grades to the US even though they seem really similar would have really dinged my GPA
Comment: I suspect that the question is moot for you. If they "accepted" the courses then they aren't concerned about fine gradations of the grading. Bizarre, perhaps, but not necessarily bad.
Comment: @Buffy Assuming they got good grades in the courses originally, probably the way it would most affect OP is in their GPA. And that's also probably why they don't do the grade conversion - they're willing to let the courses count towards prereqs and degree requirements, but don't want to mess with GPA by assigning a grade.
Comment: Obviously, Canadian students are 10% worse than US students.
Answer: It is quite difficult to directly compare grades. For example, in the US, we use an A/B/C/D/F grading scheme, sometimes with pluses or minuses attached. In India, students are graded on a scale from 0 to 100. In Iran, on a scale from 0 to 20. In each case, there is an understanding what exactly, say, a "C" grade means and the people in that culture know how that compares to, say, a typical undergraduate student's knowledge.
But it is very hard to know what precisely a 16.5 in the Iranian system means, for example. Unless you have worked there, you won't know and won't be able to judge. It would require knowing what the average in the Iranian system is, and to also know whether the average is the same at all universities, all disciplines, or whether there is a substantial difference between universities. It would also require to know which Iranian universities are good and which aren't.
For all of these reasons, you have to expect that in many cases, grades can not be meaningfully translated.
Comment: Sure it's difficult. But here in Germany we have special offices who have conversion tables and experts for pretty much all conversions from different systems. They are even standardized in Germany and I suspected that the standards hold for the EU.
Answer: Yes, I have heard universities in North America doing it both ways (giving grades and not giving grades). It might even vary based on what country the grades were from. This may have consequences for what courses taken abroad can count for. Unfortunately, if your university is choosing one way or the other, you aren't likely to get an exemption.
Answer: Grade conversion is difficult, but it is essentially a solved problem. Conversion tables should exist, but I don't know about the situation in Italy. In Germany we usually convert all grades, but the question is more difficult than just converting the grade. Other questions are:  Is there are corresponding course here? Does it have the number of credits?
Coming back to the question "Is it common?": Conversion is surely possible (and is may even be standardized) but many other factors come into play. So the policy "we just accept courses" sounds reasonable. The places I know about convert as many grades as possible (but I know just a few places).


Add "light-novel" to tag blacklist

Question: Since "anime" and "manga" tags are blacklisted, light-novel should be blacklisted as well since it serves the same purpose
Comment: Where is it stated they were blacklisted?
Comment: @Alenanno http://meta.anime.stackexchange.com/questions/18/ Note the status tag and Shoq9's response to Robert's answer.
Comment: Ah thanks. :) I didn't see it.
Answer: I posted a counter-proposal a little while back which got very little discussion on either side of the argument. In my opinion, we got rid of anime and manga not because they were bad tags, but because they were bad descriptors of what the tags were actually used for and hence were overused. If we used anime-specific and manga-specific then there would be no problem. Likewise light-novel should be changed to be light-novel-specific rather than deleted.
I'm not sure I still care strongly about this either way, but I'm posting this as an answer to gauge the opinion of the community and in case anyone else does feel strongly that we should keep this tag.

The above now seems obsolete. This tag is only used on one question, and that question doesn't particularly need it. Rather than blacklisting, which should be avoided except in cases of repeated abuse (because it requires SE involvement), I think it's reasonable just to delete the tag from that question. If anyone feels strongly that this tag should exist, and can come up with a good argument for why, feel free to edit it back into the relevant questions, but please provide an answer here or somewhere else on meta as to why you think so.
Comment: The main part of the problem (I think) was that these tags would be used so much to the point that they would become the most popular tag on a question. The most popular tag is appended to the page's title which influences search engine hits.
Comment: @atlantiza If that's the problem, then I don't think we'll run into the same issue with [tag:light-novel]. It doesn't seem like the kind of tag that will be common, based on the fact that we only have 1 question tagged as such currently.

Add "light-novel" to tag blacklist


scaling of motor power

Question: For car engines, the cylinder volume is often associated with the engine power, which suggests scaling of the power as $L^3$ where L is the linear size. Consider a system consisting of a motor and its energy supply, e.g., an internal combustion engine with a fuel tank, or an electric motor with a battery, or a steam turbine with a nuclear reactor etc. Now we scale the system geometrically, up or down by some factor, using same materials, and assume that in the scaled system nothing breaks or burns through, so it can function. What should we expect for the scaling of the output mechanical power? Would it be close to $L^3$? Can an example be constructed where the scaling is very different from $L^3$?
Answer: This is really a comment not an answer, but it got a bit long for the comment box.
The problem with your question is that the power of the engine is related to the amount of fuel/air mixture that burns with each cycle, and the frequency (i.e. engine speed). There is clearly some connection between the amount of fuel/air mixture burned per cycle and the size of the cylinder it's burning in, but the efficiency of cylinder filling is affected by so many other factors that we rarely see any but the most basic correlation.
For example, most family cars come in a range of types from those aimed at grannies to those aimed at excessively enthusiastic teenagers and over this range you'll find that engines of the same size can produce very different powers. Typically this is because the valve timing and lift differs between the different engines and hence the cylinder filling efficiency varies. You might wonder why car manufacturers don't always aim at maximum filling efficiency - it's because if you maximise filling efficiency you tend to find you get a high efficiency at only a narrow range of engine speeds, which is great for the racetrack but not much use driving to supermarket.
If you take some example engine cylinder of capacity $C$ then the fuel/air mixture that fills it has to flow in through the inlet valves, and because air has a non-zero viscosity this takes time. If you now double the cylinder size (i.e. raise its volume to $8C$) but don't change the valve size the air/fuel flow rate wouldn't be adequate to fill the cylinder in the time available between cycles. So you double the valve size as well, but of course this only increases the valve area, $A$, by a factor of four to $4A$, and the ratio of valve area ($\approx$ flow rate) to cylinder volume has fallen by a factor of two. This means power won't scale with $L^3$. In practice engine manufacturers combine increased cylinder volume with changes to the valve design, and not simply size. Even so it's hard to maintain efficiency over a large range of cylinder sizes, which is why large engines tend to have more cylinders rather than the same number of bigger cylinders.
Comment: John - this is great, I was hoping for physics analysis along these lines. To take this a bit further, for the flow of fuel/air mixture, if we assume the Poiseuille flow, for given pressure difference $\Delta P$ the flow speed scales linearly with the system size L. So the throughput of fuel will scale as $L^3$ - correct?
Comment: @MaximUmansky: Poiseuille's law won't describe the flow for two reasons. Firstly the flow is turbulent not laminar, and secondly the cylinder filling is not simple flow. It's strongly influenced by pressure waves in the inlet and exhaust systems. I don't think your question can be usefully answered on this site because it's too broad. You need to do some background reading around engine design.
Answer: Leaving heat engines aside for now, let's try to understand the scaling for a DC electric motor with a battery, which seems to be a simpler case to analyze. For a circuit including a battery with EMF $E$, a motor, and some effective resistance R (distributed between the battery, motor winding, and connecting wires) one can write the energy equation
$E \; I = I^2 R + P_{mech}$
where $P_{mech}$ is the mechanical power in the motor.
Consider the maximum mechanical power for given $E$ and $R$. The maximum of the quadratic function is achieved at $I_0 = \frac{1}{2} E/R$ and is equal to $P_{max} = \frac{1}{4} E^2/R$.

Next, note that if we scale this system geometrically, keeping same materials, then $E$ stays the same (it is set by the electric chemistry of the materials) and $R$ scales as 1/L, where L is the linear size of the system. So the conclusion is that $P_{max}$ scales as L to the first power.

scaling of motor power


linux permission inheritance

Question: I'd like some clarity on linux permission inheritance and subversion.
If I check something out that is owned by "svn:svn" and commit it, then, run svn update on a directory that was originally checked out, the file(s) gets MY permissions.  I am a member of group svn. Could I remove myself from the svn group to force the permissions to stay svn:svn when I do an update?
I am using an Subversion client to check out the files and this uses svn as the user.
Thanks
Comment: How are you using Subversion? For example, are you running svnserve or running everything through http? Or, are you using svn+ssh?
Answer: You need to set the sticky bit on the group permissions on that directory.
chmod g+S svndir

This will force the group permissions do be inherited by it's descendants.
Comment: +1: that's correct, but do note that this is something you do on the local machine, *not* something that has any effect on the repository. This must be done on the checkout machine whenever anyone checks out the module.
Answer: You can set the group sticky bit on the parent directory, which'll auto-assign that directory to any NEW files created in there
chmod g+s .

I don't think it'll apply the sticky bit to any subdirectories, so you'd have to replicate this for each sub-dir, but at least the files will come out with the proper group ownership.
Answer: Subversion doesn't store file ownership or permissions in the repository. If you check something out, it's owned by you. I'm not sure what it is you're trying to accomplish, but it's going to involve a script to change file ownerships on your local machine.
Comment: Ok Here is the delema I cant seam to get my head around. I am using a GUI (Sycro) to checkout and commit to a repo. I also have a hook that updates a webserver. If I check out a file, alter it and commit, the hook updates the server with the file and the correct (Svn) username.But...If I terminal into the webserver and do an update, the permissions are ME.How do I get around this? If I log into the webserver as "svn" it wont let me update.. tells me there is a permission problem.

linux permission inheritance


vb.net db application - deployment

Question: developed a win. form vb.net db app that uses an access.accdb backend. I am struggling to find the best deployment strategy. In the past, I have distributed the .exe and access.accdb from the /bin/debug  folder. This works, but Im not sure if it's the best method.

this db app. will be used by 5-10 ppl, non-simultaneous
my current plan is to put the .exe and access.accdb on a network share drive, users will launch from network share
users do not have admin privs, the computers have strict security settings

I have noticed that when launching the .exe from network share, you get the unknown publisher warning; this message does not appear when launching from local drive. Due to users security restrictions, I know that simply hitting 'continue/run' on the publisher warning is NOT an option. There is no 'continue/run' button.
So, I assume I have to buy a code signing cert and strong name sign the assembly?
I also read here http://msdn.microsoft.com/en-us/library/142dbbz4%28v=vs.80%29.aspx that clickonce deployment does not require admin privs, and can be launched from network share and ran from cache.
In this case, I buy Authenticode cert and sign the clickonce manifest?
Any advice?
edit
I left out a key function of the app that will affect deployment.
Users can select files and upload them. The basePath/filename is stored in the db. uploading and retrieving the file via openFileDialog and datagridview.cellContentClick is all relative to where the .exe is launched from (application.startupPath). I didn't want to hard code full paths into the db, because I'm sure it will be moved, (both app and files) over time to a new location.
Comment: Can you put just the db file on the network share, give users a private copy of the .exe?
Comment: the app involves uploading files to a directory that's relative to application.startupPath, so I don't think this would work. the relative path is stored in the db.
Comment: Can you change the app? 'cause it seems like that is something that would be nice to be able to configure
Answer: ClickOnce deployment is the way to go here.
You do not have to buy anything, you can self sign your assembly with a strong name.
This should be fine for an internal application

vb.net db application - deployment


Zero Deflection

Question: The best possible way to prevent the
bracket from failure is to ensure that it is enough rigid thereby ensuring absolute zero deflection at all points of the bracket. What is the view on the real world feasibility of this?
Comment: there is no material in the world that would not deflect.
Answer: There is no material with zero deflection in the world. Every thing deflects, to different degrees.
The best possible way to prevent a bracket from failure is to design it for the task it must do.
If the load is a vibrating machine, it must be allowed to vibrate by with a frequency that is not likely going to resonate with that of the machine.
if the load is off center, it must be strong enough to resist the moment plus all the shear and normal forces.
If the load is cyclic, it must be designed for fatigue, etc.
If it is part of a structure of an airplane it must be strong enough for all the above and be reliable under extreme temperatures and be light within the reason.
EDIT
As commented by some, I thought a few points may help clarify my answer.
Deflection is actually the way a bracket or any structure undertakes to support the load. Of course it has to be controlled. But a beam or slab or any other member of a structure as long as it is not deflected is not carrying any load.
An archer knows to pull his bow to the most deflection to shoot his arrow faster and farther. Many huge suspension bridges find strength in predesigned deflection.
Strength in engineering is the capacity to support static or dynamic loads or impact of objects while maintaining the geometry within accepted tolerances. it doesn't matter for this discussion the kind of deflection, or strain that has caused it.
Comment: Even if you found a (theoretically) rigid material, you can still have (theoretically) infinite stress concentrations at re-entrant corners, so rigidity would not protect you from failure by a crack propagating through the bracket.
Comment: It might be good to mention that rigidity and strength are two different properties. You could have a very rigid, but brittle, structure that is weak. Compare that to a more flexible structure that while bending has high strength. Chalk might be more rigid than wood, but likely less strong.
Answer: Building on to what was previously said, when designing a bracket or mechanical fastener based connection, my major concern would most likely be the failure of the plate or the bolt/screw. For this, you may need to consider: bolt tearout, hole yielding or general yielding/failure of the plate. Furthermore, you may also need to consider the strength of the fastener.
For further information and the actual regulations, check the AISC steel construction manual or other relevant steel connection codes.

Zero Deflection


Z offset incorrect

Question: Repetier host 1.6.2.
Used Slic3r and CuraEngine in RH1.6.2 to slice my prints.
OK, I have a problem. Z offset does not work. Well...

Flashed EEPROM clear.
Enabled EEPROM and CHIT CHAT within the firmware.
I've set -0.4 in Marlin firmware 1.0.2-1 stable and flashed it.

results in
<code>    G28; home axis = works
    G29; auto level = works
    G28; it goes to home and then sets Z to 0.4
    G1 Z0; brings nozzle down from 0.4 to 0, so this works also.
</code>
But when I slice with Repetier host 1.6.2 with the latest slicer/curaengine, it does not go down 0.4 mm before starting to print.
I've set the first layer to 0.2 mm, but when it starts printing the first layer, it goes from 0.4 mm (after home Z is on 0.4 mm) to 0.6 mm instead of 0.2 mm! ...
How do I fix this?
Gcode start:
<code>    ;Generated with Cura_SteamEngine 15.01
    ; Default start code
    G28 ; Home extruder
    G29 ; Auto level
    G1 Z15 F100
    M107 ; Turn off fan
    G90 ; Absolute positioning
    M82 ; Extruder in absolute mode
    M190 S35
    ; Activate all used extruder
    M104 T0 S230
    G92 E0 ; Reset extruder position
    ; Wait for all used extruders to reach temperature
    M109 T0 S230
    ;Layer count: 226
</code>
It's definitely Repetier or its slicers. I'm using Cura 15.04.6 and it also calculates the offset set in Marlin when printing! I'm trying to use Cura 2.1 because it's newer, but I do not get the print USB option in Cura 2.1 :/
I just don't get it, it was printing very nice the first 4 layers, and suddenly it moved up more than 0.5 mm and continued printing there, in the air.
Yesterday's print:

Today's print:
Answer: Your question is a little hard to pin down, but I'll try to help anyway.  :-)
Z-Offset:

It appears you may be misunderstanding the way z-offset is supposed to work especially when it comes to Marlin setup and routine bed leveling and printing.
This may help.
And this

Print Quality and Skipped layer issues:
From your pictures, you do have some loose or wobbly belts, pulleys, rails, or other mechanical components causing excessive play in your x and y axis...very apparent with the way your layers don't align well resulting in the very visible lines.  You can address this in two ways:

Make sure your physical components are tight and rigid enough to handle the print speed you're using.
Slow down your print speed to something that your machine can handle with reasonable quality...whatever reasonable is for you.

You mentioned skipped layers.  I see that in your tower.  This is most likely caused by:

Tower legs too thin so Cura skips it because it can't fit there. I'd suggest using the layer preview in Cura, if the layer doesn't show in the preview, it won't print.  If this is because the leg is too thin for your nozzle diameter, you could increase the scale of the tower, edit the model to have thicker legs, or install a finer nozzle.
Issues with your mesh so Cura skips it.  Also use Cura's x-ray view.  If there are red areas, you have issues with your mesh.  Search for ways to fix your mesh and make sure your model is good to print.

However, it could also be caused by issues with your filament feeding or your hot end.  Clogs, snags, etc.  If this were the case, your previews in Cura would all be fine.  To solve this you could:

Increase your print temperature slightly to ensure you're filament is melting quickly enough to support your print speed.
Slow down to allow the filament plenty of time to melt.
Make sure your feed system is snag-free.
Make sure your feed system is clean and adequately gripping the filament so it can push the filament into your hot end reliably.

I hope this helps.  :-)
Comment: Also looks like it went a bit fast on the upper part of the Eiffel Tower, increasing minimum layer time might help a bit.
Comment: Hi! Thanks for helping me out. I have had few good prints, but then it randomly starts printing bad. When I enter the Z offset in the Marlin code to -0.5, it doesn't go down 0.5mm when starting the first layer. It stays at the same height, which is 0.5mm above the bed. So Z offset doesn't work trough the Marlin code. Then I tried Z offset in Repetier and the same happens. Does not lower. When setting Z offset to 0 in Marlin, and then adding G92 Z0.5 in the GCODE, it lowers the model in the slicer, so 0.5mm of the part goes into the ground. But adding that to the Gcode, lowers my nozzle to.....
Comment: ... the right height, which is one paper height between the bed and nozzle. The prints turn out better this way. I have figured out some lose parts which I will tighten up soon and test it out again. The legs of the eiffel tower do show normally in the slicer. I managed to print again with my printer, but now with really small layer shifts (which is because of lose parts I guess), and some missing outer layers (like it did not feed enough filament at that moment.). Increasing filament feed rate from 100 to 130 and increasing the temp from 220 to 230 fixed this problem a little bit, but...
Comment: Still missing outer layers every few mm heights. maybe this is also caused by little movements in the components? Going above 230, e.g. 235, the filament feeds really hard. I thing it's too hot for the plastic housing inside the extruder hot end, or the filament just gets burnt or something. ... So my question, why does Z offset not work when adding in Marlin code, or slicer? I will update here if the quality improves after making everything stable. Thanks again
Comment: "randomly starts printing bad"...yeah, I know it can seem that way sometimes.  There are many many variables that sometimes play together in mysterious ways.
Comment: Based on your comments about Marlin Z offset, I think you are misunderstanding how that is supposed to work.  I'll update the answer to include some helpful references.
Comment: Thank you for your help! I am printing some idler pulley for my x and y axis bearings (608z) so that the belt doesn't slip to one side. It moves really hard I noticed when the belt is sticking to the sides. Then I found out that my y axis just wiggles, so need to tighten that up after this print.
Comment: Also, your answer will most likely solve lots of my problems and has answered my main question. Thank you :)
Comment: Glad to be helpful.  Good luck!  :-)

Z offset incorrect


Using urllib2 in Python. How do I get the name of the file I am downloading?

Question: I am a python beginner.  I am using urllib2 to download files.  When I download a file, I specify a filename to with which to save the downloaded file on my hard drive.  However, if I download the file using my browser, a default filename is automatically provided.
Here is a simplified version of my code:
def downloadmp3(url):
    webFile = urllib2.urlopen(url)
    filename = 'temp.zip'
    localFile = open(filename, 'w')
    localFile.write(webFile.read())

The file downloads just fine, but if I type the string stored in the variable "url" into my browser, there is a default filename given to the file when I download it.  I want to use this filename for my downloaded file not 'temp.zip' or whatever I assign it.
How do I use urllib2 (or some other Python library) to save the file with the filename that the server I am downloading from intends it to have?
If anyone doesn't understand this question, please say so, so that I can try to make it clearer.
Comment: possible duplicate of [urllib2 file name](http://stackoverflow.com/questions/163009/urllib2-file-name)
Comment: There are two places to look for a file name: the Content-Disposition header field and the URL. Use cgi.parse_header() to parse the header field. Use urlparse()/urlsplit() and posixpath.basename() to parse the URL. See this answer for examples: http://stackoverflow.com/a/11783319/205212
Answer: The filename is usually included by the server through the content-disposition header:
content-disposition: attachment; filename=foo.pdf

You have access to the headers through
result = urllib2.urlopen(...)
result.info() <- contains the headers

i>>> import urllib2
ur>>> result = urllib2.urlopen('http://zopyx.com')
>>> print result
<addinfourl at 4302289808 whose fp = <socket._fileobject object at 0x1006dd5d0>>
>>> result.info()
<httplib.HTTPMessage instance at 0x1006fbab8>
>>> result.info().headers
['Date: Mon, 04 Apr 2011 02:08:28 GMT\r\n', 'Server: Zope/(unreleased version, python 2.4.6, linux2) ZServer/1.1 Plone/3.3.4\r\n', 'Content-Length: 15321\r\n', 'Content-Type: text/html; charset=utf-8\r\n', 'Via: 1.1 www.zopyx.com\r\n', 'Cache-Control: max-age=3600\r\n', 'Expires: Mon, 04 Apr 2011 03:08:28 GMT\r\n', 'Connection: close\r\n']

See
http://docs.python.org/library/urllib2.html
But be aware that this header does not need to be present. Otherwise you need to generate a reasonable name yourself from the URL requested - e.g. from the last component of the URI.
Use the urlparse() method of Python in this case.
Answer: My issue with the previous answers is that they were using the original URL, and that would fail in the case of a redirect. Here's how I do it: (note the use of result.url instead of url)
import os
import urllib2
result = urllib2.urlopen(url)
filename = os.path.basename(urllib2.urlparse.urlparse(result.url).path)

Answer: You can do that using urlretrieve :
http://docs.python.org/library/urllib.html
Answer: I had an issue where server did not give me any content-disposition header so if it's also your case, you can extract filename from url like this:
os.path.basename(urlparse.urlparse(file_url))

In my case, I used file_stream.headers.subtype which contained file extension and I renamed files based on my django's model slug, here's an example:
import urlparse, os

tmp_file = NamedTemporaryFile(delete=True)
file_stream = urllib2.urlopen(file_url)
tmp_file.write(file_stream.read())
tmp_file.flush()

new_file_name = "some_prefix_" + my_model.slug + "." + file_stream.headers.subtype
#You may prefer this:
# new_file_name = os.path.basename(urlparse.urlparse(file_url))

my_model.file.save(new_file_name, File(tmp_file))

Last line is saving file using django's save method, also handling duplicated file names by adding random characters at the end :)
Awesome.


Measure scanning time - Canon scanner

Question: I have a CanoScan lide 25 scanner . How can i measure the time to scan a document (trying different dpi) . Any command line tools ? Either Windows or Linux ...
Answer:
How can i measure the time to scan a
  document

This sure works for your scans, whether in Windows or Linux:

If you want a software solution:
TimeLeft is a versatile desktop utility - it can be used as a countdown clock, reminder, clock, alarm clock, tray clock, stopwatch, timer, sticker, auction watch, work days/hours countdown clock and time synchronization utility.
TimeLeft is freeware (Windows only).
... from the command line, you can use this:
STOPWATCH can be used to calculate the elapsed time, (in seconds), in a batch file. It does this by redirecting the current time out to a file when the "start" command is given, and then reading that time back in when a "stop" command is given. For example:
C:\>stopwatch start > timestamp.txt
... other batch commands here ...
C:\>stopwatch stop < timestamp.txt
10

Note that the output from the stop command can be piped or redirected to a program or file if required, and multiple "stop" commands can be executed to get intermediate timestamps. If you want to save the output of the "stopwatch stop" command to a variable, DOS/Windows doesn't make things easy for you. Here's an example that includes an ugly workaround to get the elapsed time into a variable called "elapsed_time":
@echo off
stopwatch start > timestamp.txt
... other batch commands here ...
stopwatch stop < timestamp.txt > elapsed.txt
for /F %%a in ('type elapsed.txt') do set /a elapsed_time=%%a
echo %elapsed_time%

Answer: On Linux systems, use the time command to run a command and output some basic system time stats after the command finishes.  You'll need a commandline to initiate the scan.
user@host:$ time some-command arg1 arg2 arg3
<some-command output>

real    0m1.140s
user    0m0.015s
sys     0m0.016s

real is the elapsed real ("wall") time the process takes to run, start-to-finish;
user is the time the process used directly in user-mode (ie, not counting time the CPU spent servicing other processes);
sys is the time the process used directly in kernel-mode (again, not counting time the CPU spent on other processes).

time can summarize lots of other system-resource usage on processes; see man time on your system for details and options.
This also works in the Cygwin unix environment for Windows if you can locate a commandline tool for grabbing a scan.

Measure scanning time - Canon scanner


The Train and The Cyclist

Question: A railway track runs parallel to a road until a bend brings the road to a level crossing. A cyclist rides to work along the road everyday at a constant speed of 12 miles per hour.
He normally meets the train that travels in the same direction at the crossing.
One day he was late by 25 minutes and met the train 6 miles ahead of the crossing.
Figure out the speed of the train
Comment: Why is this question closed if it has a positive vote record and also required logical deduction? It is not textbook style
Answer: The train is travelling at:

72 miles per hour.

Working:

The train reaches the crossing at some time t. The cyclist is 25 minutes late, so he'll reach that point at t+25min. He travels 1 mile in 5 minutes, so at t he's 5 miles back.
The train and cyclist met 6 miles before the crossing. Therefore at time t, in the same time it took the cyclist to travel 1 mile, the train went 6 miles. The cyclist's 12mph is 1 mile per 5 minutes; so the train travelled 6 miles in 5 mins, or 6*12 = 72mph.
Answer: An alternate approach:

 The cyclist has half an hour (6 miles divided by 12 miles per hour gives 0.5 hour), or 30 minutes, to go to the crossing (on that day when he was late). Since he is late by 25 minutes, he is usually 5 minutes away from the crossing at that moment (when the train is 6 miles away from the crossing). So, this means that the train travels 6 miles per 5 minutes, or 6 miles per hour / 5 minutes * 60 minutes in an hour = 72 miles per hour.
Comment: This could work as well!
Comment: I request you to vote to reopen this question
Comment: @Quark-epoch If the question is closed, it doesn't mean that it's bad. Actually, your question is very good (I've upvoted it). The only thing is that it's in the place which is a bit wrong for this kind of questions, since it's really textbook-style (I've personally encountered such problems many times, however, they're usually marked as higher-level ones). So, I believe that the question should be migrated to Math.SE.
Comment: Yeah, I guess you are right in saying that. I never thought this would be called 'Textbook-Style' for my questions have also been closed for the same reason in the past and I didn't feel like it was one of them. Still, I think that this question should be migrated to Math.SE. Maybe I'll try doing that.

The Train and The Cyclist