is it possible to achieve 1000C temperature in a cabin?

Question: is it possible that if i have a cabin which is insulated from outside but is built with some sort of material like copper and there is a heating element of sort which is providing 100C constantly but because room is totally insulated and shut can the temperature goes upto 1000C or not ?
if it is what kind of material can be used other can copper ?
Comment: What you want isn't called a "cabin".  Look up "oven".
Comment: define "totally insulated"?what material? thickness...
Comment: Insulated by thick layers of mud, from every side and thickness of mud around the cabin would be at least 9 inch.
Comment: The internal temperature will stabilise when the energy input is equal to the energy losses from the outside of your cabin : top, bottom and sides...
Comment: Any particular material which losses less energy to outside meaning more and more heating should be inside?
Comment: as for "totally insulated", no such thing as perfect insulator. You could look into Aerogel, which is incredibly efficient as insulator, but even it has its limits.
Answer: If the heating element is constantly at 100°C, there is no way it can cause the room can get warmer than 100°C.
Otherwise, perpetual motion machines would be possible.
If you meant the heating element is providing a constant 100 Watts, then it is possible for the room to get to 1000°C with enough (meaning a lot) of insulation.
Your copper building might weaken to the point of collapse at 1000°C because copper melts at 1083°C.
Comment: @Davidweb one way to think about this is the 100c heating element would be a cooling element for any room temperature above 100c.
Comment: Heating element that i am meaning to use is simple pipes and then revolving 100 C water in it just like normal radiators.
Answer: To answer the question the way it's asked

heating element of sort which is providing 100°C constantly but because room is totally insulated and shut can the temperature goes upto 1000°C or not ?

No, this is not possible.  A 100°C heater can't heat its surroundings above 100°C.  Heat will not pass from cold part of the system to hot part of the system.  Heat passes only from a hotter to a colder system.  First law of thermodynamics.


Trouble creating a volume from a plane

Question: My friend and I are trying to create a landmass for a nautical table top game. We want to create an STL file to 3d print. The piece is seaside village on a hill at the edge of the board.
This being my first blender project I sculpted the land from a plane and then added the buildings as cubes. Now I want to cut the edges of the landmass to be flat and filled in, and I am have a lot of trouble.
The first image is the model. The second image represents where I would like flat faces for the STL. These are cubes added for the purpose of a Boolean difference.
I have tried a couple of things.

Cutting the plane and manually filling all the vertices. Was impossible to get all vertices filled.
Extruding the edges down and then filling to bottom before trying a Boolean difference with cubes on the bottom and back (see the second image). Blender had a meltdown with the landmass disappearing entirely but the buildings remained (not sure why since they were already joined as the same object).

Please let me know if you have any thoughts.
Thanks!
Comment: extrude the ground should work, but you need to be sure that it is non manifold (no overlapping vertices, no inner edges, no holes, etc). Also make sure that your houses are really joined to the ground as one unique mesh, if they are separate meshes you won't be able to print (I suppose)
Answer: It's not working properly because you simply joined the two cubes. Now they are a single object, but in Edit Mode still two separate meshes with their own volume, but overlapping in some parts.
In order for the Boolean Modifier to work, the volumes you want to subtract from the landscape have to be either separate without overlapping or you have to create one continous volume for the overlapping cubes.
Since the overlapping is necessary in your case, you have three options, all require you to separate the cubes beforehand and make them two objects again:

Work destructively by first subtracting one cube, apply the modifier and subtract the second cube.

or:

Give the first cube a Boolean Modifier and join it with the second cube by setting it to Union, then choose the first cube for Difference in the Boolean Modifier on the landscape.

or:

Maybe the simplest way: put two Boolean Mdifiers on the landscape, choose one cube for the first modifier and the other cube for the second modifier.

Trouble creating a volume from a plane


Is the Dmaj chord made from D major scale or the C Dorian mode scale?

Question: Is the Dmaj chord made from the first, third, and fifth notes of the D major Scale or the first, third, and fifth notes of the C-Dorian mode scale?
Answer: It is made from the 1st, 3rd and 5th of the Dmajor scale.
Notes D, F#, A
The 1st, 3rd and 5th notes of C Dorian are;
Notes C, Eb, G
The root chord you get from C Dorian is a C minor chord.
C Dorian is not related to the Dmajor scale, nor is a D major chord found in the harmony of the C Dorian scale. The D chord you find in the harmony of the C Dorian scale is a D minor;
Notes D, F, A
The D chord you find in C Dorian is aligned with the D Phrygian scale, which is a scale with a minor 3rd.
With key OR modal analysis, you can get a D major chord in some places other than the root of a Dmajor scale. eg, the IV chord built from the A major scale is D major. But this may be of not too much use in aiding your clarity at this stage.
If you want to develop the question to outline your current understanding then that may help. Chords can be thought of as being built off of modes, but it's probably best to first learn the concept of a key and the chords you get within it. Modal analysis, while fairly fundamental to some music, is kind of a layer of abstraction over basic diatonic harmony and it's probably best to start with key first. Essentially, chords are not really built off of the modes, they are built off of the key, modes are a way of visualising a particular position in diatonic harmony with a new scale specific to the root of that degree when compared to the key.
They all merge together at some point, and modal theory extends much further than purely key based, but your question makes me think you may have skipped a step, understanding the chords you get from a key in diatonic harmony.
Comment: @GRANZER "Isn't the second mode of C major scale (the dorian mode of C) made of D, E, F, G, A, B, C, D? ", yes it is, note that D to F is a minor 3rd, it gives a minor chord. The scale has a minor sound. But with the B, a natural 6th, which is different to any of the other minor scales. It's a new scale, a mode. The D tonality you find in C major is a D minor tonality. In modal terms we name it D dorian. D, F, G is a minor triad, it's the spelling of a minor not a major chord. In normal diatonic terms we say the chord built on the II is a minor chord.
Comment: @JohnBelzaguy thanks, brain fog, fixed!
Comment: Isn't the second mode of C major scale (the dorian mode of C) made of D, E, F, G, A, B, C, D? so the first third and fifth note will be D, F, G?
Comment: The second mode of C major is D dorian. D dorian is the dorian mode of C, it is a natural minor scale with a natural 6th (the characteristic feature of dorian). What may be of confusion is a common mistake, the modes of C major do not keep the C root note name, they are C major, D dorian, E phyrigian, F Lydian etc. C dorian belongs to Bb major, C phyrigian to Ab major etc.
Comment: @OwenM Happens to the best of us…
Answer: A D major chord is the tonic chord of the key of D but it is not only made from the D major scale. It however is not made from a C Dorian scale, whose D chord (ii) is D minor.
Thinking just in terms of major scales, a D major chord, D F# A, can be built as the I chord in D, the IV chord in A and the V chord in G. That is not even counting the minor keys and modes (for example the III chord in B minor, the II chord in C Lydian, etc.) A single chord like D major can exist and function in a multitude of keys.
Answer: The D major chord comes from the key D major, which has the key signature of two sharps - F♯ and C♯. Thus the notes that make up the root triad are D, F♯ and A.
C Dorian has the parent key of B♭. That has the key signature of two flats - B♭ and E♭. Meaning the root chord from C Dorian is made up from C, E♭ and G.
There is no relationship between the two, as the notes from one triad are completely different from those of the other. And they will sound very different. D major being major, C minor being minor at very least!
It would seem the question is asked from a false premise! Also please note that the 'Dorian of C' is not the same as 'C Dorian'. Maybe that's where the confusion lies.
Answer: For what it's worth, the D major chord can be made from any diatonic scale with a key signature of one, two, or three sharps, so:

G major
A Dorian
B Phrygian
C Lydian
D Mixolydian
E minor
F♯ Locrian
D major
E Dorian
F♯ Phrygian
G Lydian
A Mixolydian
B minor
C♯ Locrian
A major
B Dorian
C♯ Phrygian
D Lydian
E Mixolydian
F♯ minor
G♯ Locrian

Key signatures with four or more sharps have D♯, so they lack the root of the D major chord, and key signatures with fewer than one sharp (that is, the natural key signature and all of the flat-side key signatures) lack F♯, so they lack the third.  D major chords can or course appear in music using these key signatures, but only as a result of chromatic alteration.
I will also mention that the question suggests a possible misunderstanding of the convention for identifying various modes.  I suspect that by "C Dorian" you meant "the Dorian mode that has the same key signature as C major."  As you've no doubt inferred by now from the comments and other answers, that's not how it works.  Instead, the mode is named after its home key, so "the Dorian mode that has the same key signature as C major" is called "D Dorian."  (But even still, if you check the list above, you'll see that D Dorian isn't there, which is because the third degree of the D Dorian scale is F natural rather than F♯.)
Answer: To complete other answers, and to give some theoretical background behind this (you don't have to understand this stuff, only if you're interested!):
A chord is a collection of multiple notes grouped in a meaningful way. A chord with 3 notes is a trichord. A triad is a trichord build on successive thirds.
Triads are so prevalent so we use the term "chord" and "triad" interchangeably.
So a triad is build on successive thirds, and a Major triad (or Major chord) is build with a major third, and a minor third on top of that. Alternatively, you can think of it as a root, a major third on top of the root, and a perfect 5th on top of the root.
So if you take your root, D, and add a major third you get F#, and if you add a minor third on top of that (or a perfect 5th on top of D), you get an A.
These notes are also the 1, 3 and 5 of the D Major scale. This will be true for any key - the Major chord is always build using one major and one minor third, and it is always the 1, 3 and 5 of the major scale.
Comment: More strictly speaking, that triad  is R, M/m3 and P5. I got picked up for stating M3 and m3 on this very site!
Comment: This answer uses terminology that diverges both from my music theory education and from my nearest music dictionary, which defines "trichord" only in relation to musical set theory, which is rarely encountered in practical contexts.  By contrast, it illustrates "triad" with examples of both root-position and inverted triads.  The Wikipedia page on quartal harmony similarly mentions "triadic quartal harmony."
Comment: @Tim it's certainly not _wrong_ to think of a triad as stacked thirds; it just doesn't reflect the origin of triadic harmony as faithfully, and it doesn't explain the naming convention.  I also think it must be harder to remember ("why is a minor seventh chord m3M3m3 and a dominant seventh M3m3m3," etc.), but since I didn't learn it as an elementary theory student I can't judge that properly.
Comment: @phoog that's the terminology used by Stephen C. Stone in the book "Music Theory and Composition" (see https://www.waterstones.com/book/music-theory-and-composition/stephen-c-stone/9781538101230). For all I know it may be wrong or unusual - if you can point me to somewhere with more commonly accepted terminology, I'm happy to edit my answer to reflect it :-)


Officer's Name In Women In Black

Question: What was the officer's name that was stationed outside Nick and Juliette's house at the end of season one? He was knocked unconscious on their porch by Akira Kimura.
Answer: The IMDB page for that episode lists three police officers (other than Nick, Hank and Captain Renard):

Sgt. Wu played by Reggie Lee
Sgt. Franco played by Robert Blanche
Officer #1 played by D'Emmanuel Ball

I'd have to rewatch the episode to check (which I wouldn't be able to do until later) but for now the best I can say is that it's very likely to be either Sgt. Franco or the mysterious Officer #1.
Comment: Sgt. Franco is one of the officers that enters the house while the officer is down on the porch. There are several other uncredited officers that enter as well. I wish there was better crediting of background actors...

Officer's Name In Women In Black


SOAP web-services with security header

Question: I am going to implement SOAP web-services with a security header for my Java EE project. I am developing the server side application, where I have to validate the header. I am going to do this job for the first time. Can any one provide some valuable idea for this and help me? Any help is welcome.
Comment: What exactly is the 'security header' (SOAP, HTTP, JMS header)?
Answer: If security is being implemented in the HTTP header, then you can get map of the HTTP headers from the message context (returned from WebServiceContext.get(MessageContext.HTTP_REQUEST_HEADERS)).
There is a good intro tutorial here: http://www.mkyong.com/webservices/jax-ws/application-authentication-with-jax-ws/
Alternatively, the WS-Security standard implements authentication information in the SOAP header.  Validation can be accomplished by writing a SOAPHandler that is deployed on the endpoint.  You can find an example here: https://forums.oracle.com/forums/thread.jspa?threadID=2335032&tstart=15

SOAP web-services with security header


How can I calculate a server's amperage?

Question: When ordering co-location services, a certain amount of power is included, for example 0.25 amps, 0.5 amps, 1 amps, 2 amps, etc. How do I calculate how much a server is going to require?
Answer: Watts = Volts * Amps
None of that should matter though -- You will typically be charged for how many watts you use.  You can think of this as the volts are the water pressure, the amps are the size of the hose, and the watts are how much water has actually gone through the hose.  This sort of description fails in a bunch of ways, but as long as you don't build things based only on this abstraction you'll be okay
The only way to be sure about your system's utilization is to measure your server's utilization under your expected load.  A PSU that can draw 500 watts, if you've got 220v power, can draw up to 2 amps, but it may draw only .5 amps under typical loads for your workloads.
Commonly you usually only pay attention to the amperage to figure out how big a wire you need to use to connect your box to the mains; if it is drawing more current it needs a larger wire (which, weirdly, is a smaller "gauge" wire, but don't worry it'll be thicker and more expensive).
Lastly, if you go beyond 15 or 20 amps (at least in the US, with 110v circuits), you'll get into a situation where you have weird connectors (twist lock connectors that vary in geometry depending on the current rating of the circuit; you can't plug a 20amp twist lock connector into a plug for 30 amps, for instance).  But again, most of the time you don't need to worry about these details unless you're looking at big arn.
Answer: Just a thought, if you have your server already and want to test out the actual amps it is drawing, you could use Kill-A-Watt or something similar to measure the actual draw before placing it in the datacenter.
Answer: Other answers correctly refer to wattage as being the important measure of how much power you really use, however... many data centers and colo providers (like the two that I use, one in Canada, one in the US) will bill you a flat rate per circuit, measured in amps.
So it is useful to know the power draw in amps that your equipment will use. A very rough rule of thumb for ball-park estimation would be about 2A per "average" server. But if you need precision, then measure it precisely. Don't rely on ball-park estimates. :)
You can buy power bars that show you the amps used by whatever you plug into them. Good ones will let you poll that data by SNMP and you can graph it or whatever.
Comment: That's an interesting way of metering power.  Do they just give you a circuit breaker?  Power draw for a large number of machines can be pretty accurately predicted but if I run my systems close to the allocation then get slashdotted and exceed my power budget, things might get interesting pretty fast.
Comment: Yes essentially, they give you the circuit and let you run with it. :)

But they strongly recommend that you do not run your systems close to the max.

In fact, on our 30A circuit, we have APC power bars that are rated for 30A, however their warning threshold is 24A. If we go over that they start sending out alerts. From what I've been told by more err... electrically inclined people, you shouldn't be running near the max anyway.
Comment: Yikes.  I'd rather they give me as many (metered) circuits as prudent, give me a  power budget and a (monetary) penalty if I exceed it.

That said -- 30A is a lot, and it would likely be hard to suddenly go from 24A to 30A.
Answer: Amp is a current measure, not power. Although knowing the Voltage of you power source it is trivial to use current values as a measure of the power consumed. W=VA, Watt=Volt*Amper (disregarding the power factor, the phase between this two vectors).
Knowing this you can easily look at your HW power consumption details, it will give you the max Watt consumption, divide it by you electrical Voltage (110 or 200, depending of you location) and you will have how many Apms would consume, in the better case of course!
Answer: You can calculate the amperage from the wattage of the server by the following equation
watts=volts x amps
therefore you know your operating voltage and the wattage of your PSUs so you can calculate the amperage by dividing the wattage by the voltage. For instance 1100W @ 110V = 10A
This is the "ideal" calculation and doesn't take into account efficiencies and load levels. But if you put in the worst case scenario figures (I.E. maximum PSU draw) then you will get your WCS amperage which the Co-Lo company will thank you for.
Answer: Most modern servers have some sort of on-board managemend card. For example, IBM x3550 servers have the BMC interface for in or out-of-band management and among other things it shows the ammount of power (in watts, see previous posts ) the server uses.
For example on debian 5 you would do:
<code>aptitutde install ipmitool
modprobe ipmi_devintf
modprobe ipmi_msghandler
modprobe ipmi_si
ipmitool sensor - look at 'AVG power' counter but it might be different on your hardware
</code>
Comment: Keep in mind that this is the number of watts the motherboard is getting from the power supply.  The input to the power supply will be a bit higher because power supplies are not 100% efficient.  See 80plus.org for more info.
Answer: You can only get the real reading of the current by inserting an ammeter in the power lead. You may be able to borrow an AC ammeter, or a low power tong tester, from a friendly electrician.
Insert the ammeter in series with one of the mains wires - or clip the tong tester around one of the mains wires. Either way will require a modified mains lead. And do be careful - mains voltages can kill.
The current will vary depending on the power management built into the server so you will need to run the server in a simulated full load condition in order to show the maximum current drain.


How would I UV Unwrap such a complicated mesh

Question:
This is the picture of the mesh I wanted to UV unwrap. I've already re-meshed it, I just don't know where to add the seams to UV unwrap it because it has so much odd geometry.
Comment: the topology is very dense,, are you sure you need so many faces?
Comment: if you want to unwrap I guess it's not for 3D printing, in that case it's for game, animation or picture, and you don't need such a high-poly mesh, use the Subdivision Surface modifier and right click > Shade Smooth and your object will look smooth
Comment: It looks pixelated if I do anything else less
Comment: please share the file
Comment: Unwrapping is always a matter of choosing a balance between seams and distortion, so nobody can tell how you to unwrap without knowing what you want from the UV.  If you don't care about seams, do a smart project.  If you don't care about distortion, treat it like a cylinder (circle of seam at either long end and a single seam to join them.)
Answer: The answer is you don't. Generally you want to retopologize the mesh by hand or addons and then bake the high poly version as textures onto the retopology version. If you where to UV map that mesh and then would go on to texturing you would not have a good time.
However lets say you still want to UV unwrap that high poly mesh. You have some ways of doing it.

U > Smart UV Unwrap

Or use Ctrl click and select edge loops at hidden locations like in the mouth and mark them as seem(Like in the mouth, behind the horn, at the end of the head and around the eyes and horns) It's hard to tell from the image how exactly the edges flow is but this could be quite hard with your mesh

Also if you choose to retopolgize, there are addons and websites however you can also use blender modifiers, like decimate or Remesh with Shrinkwrap for example.
If you want to know which way is the correct way the retopology way is the correct way, sometimes you will get away with static render meshes to not retopolegize them but you won't be able to progress as a 3d artist without knowing the proper ways.
Edit: I didn't know you retopologized it but I still stick by what I said, if you really can't work with this use a different retopolegy tools like: Instant remesh, retopo gun, retopo flow (although I don't recomend actually paying for it, total scam for 80$ but cracks exsist). Vanilla blender retopologizing is also quite good


Importance of "Days" in the process of Creation

Question: Why is it important that the Creation process is divided into 6 "days", as opposed to "parts" or "stages" or even presented in simple succession without mentioning "units"?
Comment: Can you please clarify the "it was all theoretical until the real doing" position?
Comment: @user9806 I referred to the approach that the 6 days were "theoretical "as nothing was "actually" created (בריאה refers to thought/speech whereas עשייה/יצירה refers to the actual doing), as the Torah says"וְכֹ֣ל ׀ שִׂ֣יחַ הַשָּׂדֶ֗ה טֶ֚רֶם יִֽהְיֶ֣ה בָאָ֔רֶץ וְכָל־עֵ֥שֶׂב הַשָּׂדֶ֖ה טֶ֣רֶם יִצְמָ֑ח"
Comment: Interesting - are there any sources (Rishonim, Acharonim [early or late]) which espouse that approach?
Answer: Rav Hirsch explains the reason for the terms Day and Night in Bereishis 1:5
The translation given below is that of Rav Hirsch's grandson who translated Rav Hirsch's German translation into English in order to keep showing exactly what Rav Hirsch meant to say. Note how it differs from the chabad.org translation.

And God called to the light: Day! and to the darkness He called:
  Night! and it became evening and it became morning: one day.

Rav Hirsch explains that this is not just a period of time or the usage of the day and night caused by the rotation of the earth under the light of the sun, but the creation of separate phases of existence. Thus each of the days is an independent creation (יום אחד one day) leading up to the final unit of creation in which the complete creation begins functioning.

This cannot mean simply He gave the name, for the words light and day
  are by no means identical, but day is the measure of time in which
  light rules over the earth, and similarly darkness and night.
...
In any case where got does call something by a name it always
  expresses a mission, a calling for the one to be so called as Abraham,
  Israel etc.
...
"Hashem called to the light and appointed it to the tasks of the day,
  and Hashem called to the darkness and appointed it to the tasks of the
  night". He directed both to their separate provinces.
Answer: Because Hashem wanted to make a 7 day (meaning, 24 hour period) calendar for us to keep Shabbos, every 7, literal days, like it says "6 days you shall do your work and on the seventh day you shall rest, for in 6 days did Havaya, Elokaycha create the heavens and the earth and on the seventh day he rested", if the "days" meant some arbitrary number of stages, then we shouldn't keep shabbos every 6, literal, 24 hour days, we should only keep shabbos maybe once every 2.4 billion years, why not?


Bad layers in otherwise good prints

Question: I can print a reasonably high quality print, but then there will be a millimetre or two of rubbish.

This can happen at the start of a print, in the middle or at the end.
It doesn't seem to be bad G-code as I can reprint with good results.
There seems to be a correlation between the bad layers and walls.  They seem to occurs when there is a transition to printing a horizontal wall.
The latter if there two images if the tail end of a thirteen hour print.

What's causing this?
Is it something I can fix or is it that the (new) printer is failing?
Comment: that looks like 3 or 4 bad layers before recovery and then again... can you do a 2 cm diameter, 10 cm high pillar test print and check if that error always happens at the same height?
Comment: @Trish I did some narrow cylindrical prints, 0.5 cm by 10 cm with a curved base for support.  The first failed the first millimetre then reduced, the second no failures (both had wobbly profiles but good adhesion).
Comment: @Trish I'll print your recommendation, any specific settings that are good for a test print?  The prints above were 0.1mm layers.
Comment: Thanks for the test. a larger diameter would allow to rule out thermal troubles with printing narrow objects (at some point they just blob). Just the diameter and some arbitrary hight that is larger than where you get errors is needed - if it always appears in the same hight on prints one after another it hints to the movement while random placement hints to extrusion. I suggest no infill and 2 or 3 walls - and no top layers
Answer: This can be caused by various problems, of which an aforementioned filament diameter is only one of multiple possible causes.
The observed phenomenon is called under-extrusion. Temporary under-extrusion can also be caused by filament friction on the spool, too low or too high filament extruder gear friction (pressure on the filament by the roller), or friction in a Bowden tube (dust particles).
Please ensure your spool unrolls freely (not entangled; entangled filament is audible like "ker-chunk" when the filament is rearranged on the spool by force of the extruder pulling) and check the extruder for friction or slip. If the extruder gear slips, this is also accompanied by an audible "click" that is called clicking. This generally implies that there is too much friction in the hot end, or an obstruction/clog.
Considering that your print recovers from the problem, and that it occurs randomly, the best guess is that your filament in entangled now and then.
Comment: I just realised, I occasionally hear a loud "ker-chunk" which I'd attributed to the spool turning ungracefully around the holder.  I'm wondering not if that's when the bad layers appear.
Comment: Thanks Oscar.  How do I check the extruder for friction and slip?  Is there a calibration process or similar for it?
Comment: @BanksySan If you hear that, it means your filament is entangled on the spool, this causes extra friction, it is most probably your actual problem. Checking the filament that comes out if the extruder will reveal if you have too much or too less tension on the roller, you see that by the indentation the gear leaves in the filament. There are many pictures to be found on that topic. If you have a direct drive extruder you need to un-mount the hotend.
Comment: @BanksySan Ker-chunk can also be a skipping extruder. It hints to a clogged nozzle often
Comment: I've had similar problems related to friction in my bowden tube. The extruder will make frequent clicking sounds as it skips. Certain filaments seem more prone to this as well. I've found that lubricating the tube and/or filament fixes it. There are several sponge holders on Thingiverse; add a little cooking oil to the sponge and install it where the filament enters your extruder.
Comment: @mbmcavoy Shortening the bowden tube a little also can help
Answer: One of the reasons for such a defect may be a local decrease in the diameter of the filament. Carefully check your filament.
Comment: Thanks Dmitry, what do you mean by _check the filament_?  It looks OK.  It's gray and long and thin.
Comment: @BanksySan, measure the diameter of the filament with the micrometer or caliper in several points (>=10) on length about 5-10 meter
Comment: @BanksySan, can you disassemble the extruder? The extruder gear can be loosely fixed to the motor shaft.

Bad layers in otherwise good prints


Handling big numbers in code

Question: I'm working on a programming problem where I need to handle a number involving 100000 digits. Can python handle numbers like this?
Comment: Very similar: http://stackoverflow.com/questions/538551/handling-very-large-numbers-in-python
Comment: Depending on what you're doing with these numbers, you might consider storing them as log(number).
Answer: As other answers indicated, Python does support integer numbers bounded only by the amount of memory available. If you want even faster support for them, try gmpy (as gmpy's author and current co-maintainer I'm of course a little biased here;-):
$ python -mtimeit -s'import gmpy; x=10**100000; y=gmpy.mpz(x)' 'x+1'
10000 loops, best of 3: 114 usec per loop
$ python -mtimeit -s'import gmpy; x=10**100000; y=gmpy.mpz(x)' 'y+1'
10000 loops, best of 3: 65.4 usec per loop

Typically, arithmetic is not the bottleneck for working with such numbers (although gmpy's direct support for some combinatorial and number-theoretical functions can help if that's what you're doing with such numbers). Turning the numbers into decimal strings is probably the common operation that will feel slowest...:
$ python -mtimeit -s'import gmpy; x=10**100000; y=gmpy.mpz(x)' 'str(x)'
10 loops, best of 3: 3.11 sec per loop
$ python -mtimeit -s'import gmpy; x=10**100000; y=gmpy.mpz(x)' 'str(y)'
10 loops, best of 3: 27.3 msec per loop

As you see, even in gmpy stringification of huge numbers can be hundreds of times slower than a simple addition (alas, it's an intrinsically complicated operation!); but in native Python code the ratio of times can go to stringification being tens of thousands times slower than a simple addition, so you really want to watch out for that, especially if you decide not to download and install gmpy (for example because you can't: e.g., gmpy is not currently supported on Google App Engine).
Finally, an intermediate case:
$ python2.6 -mtimeit -s'import gmpy; x=10**100000; y=gmpy.mpz(x)' 'x*x'
10 loops, best of 3: 90 msec per loop
$ python2.6 -mtimeit -s'import gmpy; x=10**100000; y=gmpy.mpz(x)' 'y*y'
100 loops, best of 3: 5.63 msec per loop
$ python2.6 -mtimeit -s'import gmpy; x=10**100000; y=gmpy.mpz(x)' 'y*x'
100 loops, best of 3: 8.4 msec per loop

As you see, multiplying two huge numbers in native Python code can be almost 1000 times slower than the simple addition, while with gmpy the slowdown is less than 100 times (and it's not too bad even if only one if the numbers is already in gmpy's own format so that there's the overhead of converting the other).
Comment: GMPY2 supports the GMP library for integer and rational arithmetic but GMPY2 adds support for multiple-precision real and complex arithmetic as provided by the MPFR and MPC libraries.

GMP (GNU Multiple Precision Arithmetic Library) aims to be faster than any other bignum library for all operand sizes.

http://en.wikipedia.org/wiki/GNU_Multiple_Precision_Arithmetic_Library
Answer: Yes; Python 2.x has two types of integers, int of limited size and long of unlimited size. However all calculations will automatically convert to long if needed. Handling big numbers works fine, but one of the slower things will be if you try to print the 100000 digits to output, or even try to create a string from it.
If you need arbitrary decimal fixed-point precision as well, there is the decimal module.
Answer: Sure it can:
>>> s = 10 ** 100000

Answer: It seems to work fine:
>>> x = 10**100000
>>> x
10000000000000000000000000000000000000000000000000000000000000000000000000000000
[snip]
00000000L

According to http://docs.python.org/library/stdtypes.html, "Long integers have unlimited precision", which probably means that their size is not limited.
Answer: As already pointed out, Python can handle numbers as big as your memory will allow. I would just like to add that as the numbers grow bigger, the cost of all operations on them increases. This is not just for printing/converting to string (although that's the slowest), adding two large numbers (larger that what your hardware can natively handle) is no longer O(1).
I'm just mentioning this to point out that although Python neatly hides the details of working with big numbers, you still have to keep in mind that these big numbers operations are not always like those on ordinary ints.

Handling big numbers in code


Cyclic Subgroup of Order 2

Question: I came across something while looking up abstract algebra which said "Let G be a group and suppose there is an element $a$ in G which generates a cyclic subgroup of order 2 and is the unique such element." Could some please give me an example of such a group and element, and/or elaborate on this topic?
Answer: The easiest one is in $\mathbb{Z}_4$. The element 2 generates the subgroup $\{2,0\}$, and it's the only one, since all the other elements have order 4 or 1.
More generally, every $\mathbb{Z}_{2d}$, has this property, since the element $d$ generates $\{0,d\}$
Given $G$ finite group with odd order, then $\mathbb{Z}_{2}\times G$ is also ok.
switching to theory, we have that $a$ must be the only element in $G$ with order 2, so it is invariant by conjugation. It means that $H=\{0,a\}$ is a normal subgroup of $G$.
If $G$ is a finite group, and $H$ is a $2$- Sylow, then $G=H\times G'$.
Answer: Consider $\mathbb{Z}/4\mathbb{Z}$. $2$ is the unique element that generates the cyclic subgroup $\{0,2\}$.

Cyclic Subgroup of Order 2


Can nuxt js develop with server language?

Question: I started using nuxt js .
It is running on own URL localhost:3000
So I can't develop with my local project together - 'say laravel running on localhost:8000 '.
So if I use nuxt , must I use server side as a API ?
Or is there a way to develop together on same url ?
Answer:
So if I use nuxt , must I use server side as a API ?

I would say yes, as it creates your complete frond end app (complete html output inlcuding client side routing).

Or is there a way to develop together on same url

Because it creates the complete app it wouldn't make sense I guess. But if you're thinking about interweaving it with your Laravel app I would go for plain vue.js as it is easy to integrate into an existing app and templates and with some configuration you can also work with the development tools on the same domain. Let me know, I can share my setup.
Answer: It depends of what you wanna do.
If you want a project with server side redering, then you have to use nuxt on your full project.
If you want to use Nuxt only to develop your front side, then you can add a lib/framework (like Laravel).
:)


Handle URL fragment identifier (anchor) change event in Javascript

Question: How can I write the Javascript callback code that will be executed on any changes in the URL fragment identifier (anchor)?
For example from http://example.com#a to http://example.com#b
Answer: Google Custom Search Engines use a timer to check the hash against a previous value, whilst the child iframe on a seperate domain updates the parent's location hash to contain the size of the iframe document's body.  When the timer catches the change, the parent can resize the iframe to match that of the body so that scrollbars aren't displayed.
Something like the following achieves the same:
var storedHash = window.location.hash;
window.setInterval(function () {
    if (window.location.hash != storedHash) {
        storedHash = window.location.hash;
        hashChanged(storedHash);
    }
}, 100); // Google uses 100ms intervals I think, might be lower

Google Chrome 5, Safari 5, Opera 10.60, Firefox 3.6 and Internet Explorer 8 all support the hashchange event:
if ("onhashchange" in window) // does the browser support the hashchange event?
    window.onhashchange = function () {
        hashChanged(window.location.hash);
    }

and putting it together:
if ("onhashchange" in window) { // event supported?
    window.onhashchange = function () {
        hashChanged(window.location.hash);
    }
}
else { // event not supported:
    var storedHash = window.location.hash;
    window.setInterval(function () {
        if (window.location.hash != storedHash) {
            storedHash = window.location.hash;
            hashChanged(storedHash);
        }
    }, 100);
}

jQuery also has a plugin that will check for the hashchange event and provide its own if necessary - http://benalman.com/projects/jquery-hashchange-plugin/.
EDIT: Updated browser support (again).
Comment: Nowadays you can listen to the `hashChange` on `window` http://stackoverflow.com/questions/6390341/how-to-detect-url-change
Comment: @TimoHuovinen: `hashChanged`, in this case, is intended to be a function implemented by a developer using this code.  The answer here just demonstrates how one may monitor the hash for changes where the `onhashchange` event is not available, and combines the event-based and timer-based approaches to provide a universal solution. My point is that the answer that you linked to adds absolutely nothing to the answer here ;-).  They provide the same basic information, even the link to Ben Alman's jQuery plugin.  The only difference is that I provided a pure JS solution in my answer.
Comment: I was looking for some lightweight JS router, but this did the job nicely. Also eliminated all dependencies :)
Comment: for completeness, add `var storedHash = window.location.hash;` to the putting-it-together summary block. Btw: Nowadays this is called polyfill I think.
Comment: @AndyE I did read the answer, I missed the small note, and I have never seen events that look like `hashChanged(storedHash);`
Comment: @AndyE ok, wasn't aware of the requirement to implement that function, thank you for clarifying
Answer: An event listener can be added for the hashchange event, which will fire whenever the fragment identifier changes:
window.addEventListener('hashchange', function() {
  // Perform action
  // [...]
})

I would recommend this approach instead of overwriting window.onhashchange, otherwise you will block the event for other plugins.
Looking at the global browser usage today, a fallback is longer needed, as modern browsers support this event.
Answer: From what I see in other SO questions, the only workable cross-browser solution is a timer. Check out this question for example.
Answer: setInterval() is only universal solution for now. But there are some light in the future in form of hashchange event
Comment: FYI: `onhashchange` event's [documentation at Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onhashchange)
Answer: (Just for the record.) The YUI3 "hashchange" synthetic event does more or less the same thing as the accepted answer
YUI().use('history-hash', function (Y) {
  Y.on('hashchange', function (e) {
    // Handle hashchange events on the current window.
  }, Y.config.win);
});

Answer: Here's a simple way that worked just fine for me with jQuery.
I've added a animation to scroll to the anchor element aswell:
$(window).on('hashchange', function(e){
     var origEvent = e.originalEvent;
         var elementToBeClicked = $('a[href^="'+window.location.hash+'"]').click();
        $([document.documentElement, document.body]).animate({
        scrollTop: 200
    }, 100);
});

Hope it works for you.
Answer: You can get more info from this
Mutation event types

The mutation event module is designed
  to allow notification of any changes
  to the structure of a document,
  including attr and text modifications.
Comment: This is about DOM changes.


How do I trade my friend's genuines?

Question: My friend got some genuines, and he wants to give them to me, being that he does not play TF2. I got on his account and got them, but they are untradable, even though some of them are from older games. Is there a certain time that must be waited from the time they are earned. He is not premium, but he can become one.
Answer: Genuine items are always tradable. However, if you're not premium on TF2 and you look only through the Steam inventory interface, every item (except those you've received from trades with premium members) will have the Not Tradable tag.
Once your friend upgrades to premium, the Not Tradable tag will be removed from all items aside from achievement items.
Comment: You must be aware that not all Genuine items are always tradable, and some may take some time before promo restrictions are lifted on them. If your friend plans on trying to trade them before the restrictions are lifted, they must use Gift Wrap to "trade" it out.
Answer: In order to trade genuines from a non-premium account, that account must become premium to trade. The easiest way to do this is to buy a $.49 item from the Mann Co. Store. If you use the "try out" feature, you'll get a discount that should bring it down to about $.36.

How do I trade my friend's genuines?


Physical meaning of simultaneous hyperplane

Question: If we consider a null cone and a world line $\mathcal{C}$ we can define a 3-plane $\Sigma_P^{\,}$ called simultaneous hyperplane (world line)  as the set of 4-vectors in the tangent space of Minkowski that are orthogonal, according to Minkowski metrics, to the tangent 4-vector to the world line:$$
{\large{\Sigma_P^{\,}}} =\left\{v\in T_P^{\,}M^4 : g\left(\dot{\mathcal{C}}, v\right)=0\right\}
\,.$$ But how can we link this definition with the physical spatial present? The definition seems to have just a mathematical meaning and I am not able to understand how this definition leads to construct a 3-plane that corresponds to the spatial present as we know it.
Answer: This spacetime diagram might help to supplement the tensorial explanation.
Consider it as a slice of a full 3+1 spacetime diagram.
Consider the 4-velocity OP of an observer at event O
and the future-timelike branch of the "unit-hyperbola centered at O"
(which is asymptotic to the null-cone of O).
The tangent-line at event P is Minkowski-orthogonal to the radius vector OP (as Minkowski defined in his 1908 paper). So, "space along MPN" is Minkowski-orthogonal to "time along OP".
That tangent-line intersects the null cone at events M and N, and P is the midpoint of MN. (This is related to a theorem by Apollonius.) So, since M and N are (according to OP) equidistant in space from P and since the light-rays from O to M and to N travel at the same speed, then OP would assign M and N the same time-coordinate (in fact, the same time coordinate as P)--- M and N are simultaneous according to OP.
To clarify this, consider the event Q "2 ticks after O along OP" and its past null-cone. This meets O's future null cone at M and N. (I call OMQN the "causal diamond of OQ".) By a radar experiment (emission at O and reception at Q), observer OP would regard M as simultaneous with P (as the midpoint of OQ), and the same for N... thus by transitivity for observer OP, events M,N, and P are simultaneous according to OP.

There is an interactive GeoGebra diagram that has a variation of this diagram at https://www.geogebra.org/m/HYD7hB9v#material/qAt9EQgd ,
which I developed into a way to draw spacetime diagrams on "rotated graph paper" so that ticks along observer worldlines can be visualized.
Answer: The orthogonality with the worldline (the t-axis) means $t=0$ (i.e. the present) -- you can show this by calculating a trivial dot product, or just realise it's obvious, since the axes are orthogonal.
If you have trouble understanding this, you might want to step back and review some basic linear algebra. In particular, you shouldn't be considering relativity in 4 dimensions right away -- think in terms of two dimensions, with the $x$ and $t$ axes and prove all the results this way before generalising stuff to 4 dimensions.
Comment: Ok, in the case of time axis is trivial. But why do we take the tangent 4-vector to the worldline? Is it because in the frame of reference of the worldline the 4-velocity coincides with the t-axis?
Comment: The worldline *is* the moving guy's t-axis, that's the point. You take the tangent 4-vector to the worldline because that's what you want your surface/"worldpresent" to be orthogonal to.


Maximum distance between two related shapefiles

Question: I have two shapefiles of points, the first one with the point's name and the second one with several points and each point with a name of the first shapefile point. I need to measure the farthest point from the second shapefile for each point in the first shape.
For example I have 7 points with the name A and 8 point with the name B. I need from those 7 point with the name A, the farthest point and the distance between A and the specific point. And from those 8 points with the name B, the farthest distance between B and farthest point.
Answer: Here is a set of instructions to find the maximum distance per Name between the two Point layers:
Run "Add XY Coordinates" on each feature class.
Join the single name Point featureclass to the multiple names featureclass.
Create lines connecting the matching Points using "XY to Line".
Find the maximum distance per Name by running "Summary Statistics".
If you need the Points that makeup the max distance, join the "Summary Statistics" table to the Line Featureclass. You may need to build a composite join key by concatenating Name + MaxDistance.
Once you have the max Lines, you can "Select by Location" to select the underlying Points.


Users cannot delete Public icons

Question: We are rolling out new laptops to my company and we are no longer setting the user as a Local Admin. Instead, the user will be a part of the "Users" group. While I am not a part of the team that dictates desktop policy, I am assisting with the roll out. One issue that some people I have set up have encountered is they are not able to delete icons on their desktop that are a part of the Public profile and thus available to all users. If I were in their shoes, this would annoy me as well. Is there any simple way to grant them this ability?
Answer: Give the "Users" group full control over the c:\users\Public\Desktop folder.
Comment: This is an option. We could add this to our image for future machines. But, it would be very difficult to do this on machine already rolled out. I'll see if there is a way to push this out.
Comment: @Nik GPO can do that for you simply enough **Computer Configuration > Windows Settings > Security Settings > File System**
Answer: The best solution would be to configure the public profile to suit your needs. Unneeded shortcuts can be easily deleted with a batch file which is run by an admin account while the machines are being configured.
Comment: We want the user to have the choice. A lot of users want the icons, but not all.
Comment: @Nik, in that situation I move the icons from public profile to the default profile. That way they get added to each user's profile the first time they log on and they can do what they want with them. Again, this is easily scripted.

Users cannot delete Public icons


Why aren't mRNA vaccines being updated for new variants?

Question: From what I understand, updating an mRNA vaccine is trivial. According to this answer, no or small clinical trials would be needed to update the vaccine, and updating production would also be trivial. Why, then, are we still producing the original vaccines if their efficacy is decreasing given the new variants?
Comment: You ask different questions in your question title and body: 1) Why aren't mRNA vaccines being updated for new variants? 2) Why are we still producing the original vaccines.
Comment: What research have you done to verify that mRNA vaccines are indeed not being updated for new variants?
Comment: @Armand, if you search for it, you'll find that all the pharma companies are developing "boosters", not updating their existing vaccines.
Comment: I suspect there's no difference between a "booster" and an "updated existing vaccine".
Comment: Exactly. So why not get the booster as the vaccine? That is my question. I hope eventually it will be that way, but it seems not at the moment.
Answer: Trivial in concept, sure, but not necessarily trivial in practice. It's not about just producing a handful of doses in a proof-of-concept; if you want to produce a different version of a vaccine at scale it means either building a bunch of new equipment or retooling a previous production line to make the whole vaccine. Since only a minority of people are vaccinated world-wide, it makes sense that the original vaccines continue to be manufactured since these are still effective against the variants that are being transmitted (maybe not as effective as they can be, of course). Right now, it's almost certainly more important to get any vaccine into arms rather than the ideal vaccine.
That said, it would be false to state that vaccines to target variants are not in the pipeline. Pfizer announced today, for example, that they are developing a booster to target the delta variant. Presumably other vaccine manufacturers are doing so as well - not everything in pharmaceutical research labs gets reported. Manufacturers have to make cost-benefit analyses about what variants to target. Had they prepared a variant booster a few months ago it might have targeted the alpha variant rather than delta variant, for example; today, it seems targeting the delta variant is more pressing.
I'd also add that, as far as I know, no regulatory agency has declared that no clinical trials of an "updated" mRNA vaccine is necessary, or publicly specified what data are required, so I think that's just speculation so far, although well-informed. If descendants of COVID-19 become endemic like influenza, then it seems likely that a regulatory framework similar to that for the annual influenza vaccine would allow new formulations to be distributed without large-scale testing (like in this Q&A: Flu vaccine paradox), but we aren't there yet.
Comment: @herman Unless new guidance is issued by regulatory agencies or it's used only in places with little or no regulation then new trials in some form are definitely needed.
Comment: Thanks for the answer. I guess my question is about the retooling part. The vaccine is not made using a die or a mould. I would think that the process  and equipment remain the same, regardless of the internal mRNA sequence itself, as per e.g. https://pubmed.ncbi.nlm.nih.gov/33771389/. The issues of scaling should remain the same when changing a few A, C, D, and U's around. But yes, maybe new trials are needed.
Comment: It is still not clear whether the updated version of Pfizer's vaccine is tested/marketed only as "booster", or it will become the new base standard. I.e. would a new patient has to go through 2 doses of the old vaccine before having a chance of receiving an updated version?
Answer: Here is the best answer that I have found, from Dr. Katelyn Jetelina, MPH PhD, writing as Your Local Epidemiologist

If we need another vaccine, we can do this incredibly quickly. Thanks
to the new biotechnology, mRNA vaccines are really easy to alter. Once
the minor change is made, only 2 dozen people need to enroll in a
trial to make sure the updated vaccine works. Then it can be
distributed to arms. Because the change is small, an updated vaccine
doesn't need Phase III trials and/or regularity approval. So, this
whole process should take a max of 6 weeks.

Source


Large classification dataset

Question: I am very curious about a very large classification dataset approx. 1e9 samples and 1e4 classes. However, I cannot find any. Could you recommend me some?
Answer: 1B rows is easy to reach.  10K labels can be achieved with concatenations.
For example, take Wikipedia for 100 languages, and split it into rows - by sentence, by n-gram
You now have enough rows, but still only 100 labels.
Then run some lib over each, and concatenate the output to the labels, yielding a new set of labels.
The lib could be a parsing lib like spaCy (POS tag sequence), it could be the language identification like langid.py, it could be sentiment, or combinations of the above.  But somehow there should also be ~100 possible outputs (100^2 == 10^4).
For example you might have a row from the 3-gram va a Milano from the Corsican Wikipedia (co).  For that sequence langid.py returns [['es': 0.5, 'it': 0.4, ...].  So the generated row can be:
va a Milano \t co_es_it
Note the classes will not be balanced, although you could balance them by doing it at greater scale and then discarding as needed.

Large classification dataset


How can I create a dynamic number of DefaultMessageListenerContainer MDPojos in Spring?

Question: I need to create a variable number of these based on a configuration value, the intention is to have multiple consumers where each corresponds to a physical resource that can only be used by one thing at a time to process the message.
Answer: I implemented a container that manages multiple instances of DefaultMessageListenerContainer(s) which it creates based off of a prototypical instance if the listener.  Based on a system property (a # value), a number of listeners are created and the queues they listen to are numeric "my.Queue" + ordinal number.  This could obviously be modified to look up the queue names if necessary.  That being said, this is not a dynamically expanding/contracting list of listeners. They are created at the beginning, although I think you could use this as a starting point to make it more dynamic if you wish to.
I wrote a pretty rudimentary unit test and a very rudimentary implementation (no multithreading taken into consideration), and it appears to work.
The maven project can be downloaded here -
http://dl.dropbox.com/u/7812537/StackOverflowMultipleListeners.zip
BTW - there's an interesting thread here - http://forum.springsource.org/showthread.php?t=69604
I think there could be a way to do this by extending a generic bean factory but i'm not sure what your requirements are.


Can't select bone while weight painting after parenting an object to a specific bone in the armature

Question: I've tried parenting a backpack to a bone before and after parenting the rest of the character to  the armature with automatic weights. In both cases, this seams to turn off my ability to select a bone in weight painting mode with ctrl. lmb.I don't have Paint Mask or Vertex Select on, but I do use Vertex Select while weight painting usually. I'm in the latest build of Blender 4.02. I'd be ridiculously grateful for some help on this'n.
Answer: Woops! They changed the hotkey in Blender 4.x.  It's now Shift CtrlLMB. Never mind...
Comment: Shift LMB should work as well


Short Story about a teen girl that meets a mute boy with strange hands that crashes on her farm

Question: I'm looking for a short story collection that had a story about a teen girl that witnessed a craft crash on her family's farm and a strange mute boy with block hands is in it. The family takes him in and the story ends with them married and their son has his father's block hands. I read this in the 90s. It was told in first person from the girl's point of view. I believe it was in a sci fi short story collection.
Comment: What are "block hands"?
Answer: If I interpret "block hands" as a variant of burned hands, this very nearly fits the short story "Troubling of the Water" (1966) by Zenna Henderson, which was republished in her short story collection The People Collection (1991).
Told from the perspective of a teen girl living on a family farm during a severe drought, she witnesses the crash of an alien craft and rescues the sole passenger, a boy who does not speak.  He suffers terrible burns to his hands and face, which the family bandages, and they take him in during his recovery.
The girl and boy are not romantically involved, but the story does follow them well into the future.
"Strange hands" could also be a reference to the alien powers the boy possesses. He is able to move objects from a distance by manipulating patterns of sunlight or moonlight with his hands, among other things. These abilities are also passed down to his children.
After reviewing the collection, I think it's very possible that the ending described here is actually remembered from the story which immediately follows, Return (1961) - they are very similar in tone, and in my copy, there is barely a page break between them.  This story follows an adult woman grappling with the idea of raising her son in the aftermath of an accident (she and her husband were also in an alien craft which crashed) and spends some time contemplating his similarities to his father.  The son does not, however, have burned hands.
Comment: Does their son have burned hands?
Comment: They do not have a son together.


Modelling delays in Verilog code?

Question: I am using Xilinx ISE design suite for simuation of my Digital Circuit. I want to model delays into each individual element of my combinational circuit during simulation. I don't want to explicitly add delays into my module as it will bias my circuit. Is there a way?
Comment: Feels like a XY problem. Why do you want to do this?
Answer: There are at least three kind of simulations in FPGA design.
First kind is behavioral simulations, the fastest one. You really should explicitly add delays, but only to non-blocking assingment, to represent physically-existing propagation "clock-to-Q" delay on flip-flops. The value of delay should be taken from typical elements of FPGA registers, 20-50 ps is enough to get the circuit to behave correctly. Combinatorial logic doesn't need preemptive delays. As long as the prop delays are reasonably fit to used silicon thechnology, it won't "bias your circuit". Some compilers might do this job for you, but I always prefer the explicit delays.
Second kind of simulation is performed after mapping your logic into CLBs, which have known basic delays, so you don't need to change anything. Your pre-inserted delays will be ignored, so they do no harm.
The third round of simulation is run after place and routing. The tool will now know all delays nearly exactly, and back-annotate them into your netlist. Again, your artificial explicit delays will be replaced with real delays.
As you can see, the explicit delays in non-blocking assignments are harmless, but without them your design might behave incorrectly. You might make a mistake to tweak the design to meet your expectations of behavior, but this design might totally fall apart on next stages of compile process.
Comment: One more question. Is adding explicit delays a bad practice?
Comment: @AshutoshSancheti, first, it is not "explicit delay", it is an "ordinal" delay to maintain the natural cause-effect relationship in register data transfer. As a matter of fact, in one company I used to work for, the discipline to use of flip-flop delays was eventually MANDATED by design automation management after several hick-ups and corresponding slips in development schedule.

Modelling delays in Verilog code?


How to smoothen such jagged edges on curves?

Question: I am newbie photoshop designer (not really a designer). I have this design done by me , you can clearly see those non-smooth curves, I want to know how I can smooth them out to look good in photoshop.
Comment: Take your pick from the answers: vector is the way to go, but I am guessing that the circle was made at the current size and the rest was enlarged. This is the reason why it is not smooth: you have enlarged the image, which enlarges the problems
Answer: You have as bitmap that kind of stuff which really benefits, it is created as vectors. You have too low pixel dimensions when compared to what sharpness you expect. Your best bet is to take a vector drawing program (Inkscape, Illustrator) and redraw your creation as vectors. Then it will be freely scalable without any loss of quality. It's not a hard job for a shape this simple.
If it happens that you already have this in Photoshop as vector shapes, you should be able to increase your pixel dimensions freely. Also you can transfer the shapes to Illustrator.
In theory you can refine the edge after selecting the green area, but that will round all sharp corners.
So: Goto vector domain. The redrawing takes 10 minutes or less.
Comment: @vishaldharankar yes, it should be. You may need to drag your shapes to bigger size after making yor pixel dimensions bigger. Unfortunately I do not know, would the newest PS do that automatically.
Comment: Yes I have vector shape in photoshop which isn't drawn by me its a readymade icon which I am modifying , does simply increasing the resolution remove those jagged edges / corners for example ?
Comment: Yes it does and I got it done that way , thanks , this was a good help.
Answer: Logos should not be created in Photoshop.  The reason is that Photoshop is for editing raster images, and whatever size you make them, that is the size they will be.
Instead, make logos in Illustrator as vector graphics.  That way, they can be scaled to any output size and will never be pixelated.
Raster images store color information for each pixel (each small square).  Vector images store a mathematical description of curves and angles.  They're fundamentally different, and for artwork that should be scaleable to any size, vector artwork is immeasurably more appropriate than raster images.

If you place that artwork into Illustrator, there are several "Trace" options you can use to create vector artwork based upon it.

This goes triply if you didn't create the logo yourself and already have it in SVG form.  If I sent an SVG logo to a designer for a color change and adding a circle and got back a pixelated PNG and no SVG, I would be extremely annoyed.
Comment: First of all i havent designed the icons, I have got them ready in svg form , I am just modifying color and exporting as PNG, secondly I am not going to modify may just add other images to it if needed such as circle in this case. I think there has to be some way to reduce those jagged corners and make them even or better .
Comment: @vishaldharankar, as noted in [user287001's answer](https://graphicdesign.stackexchange.com/a/93975/57377), tracing/redrawing will take less than ten minutes.  Just put it into Illustrator and then export from there as PNG.  It's easier and will produce a better final product for this purpose than anything you can do in Photoshop.
Answer: Building on what @Wildcard said, you will likely have much better success if you convert that image into a vector format like .eps, .svg, or .ai.
If you have (or know someone who has) Adobe Illustrator then you may choose to try the Live Trace option to convert this raster image into a vector.
Once you have the image in a vector file format, you can resize it up or down with no loss of quality and then simply export a raster image (.jpg, .png, etc.) at the correct size you need for web or whatever.
The reason this is happening to you right now is that increasing the size of a raster image means the computer has to guess at some additional pixel information and that can lead to blurriness or jagged edges. Think of a poor quality photo blown up - that's essentially what is happening in your example.
There may also be some image conversion web apps out there, but I can't comment on the quality of any of them.
Comment: Any reason for the downvote?


Magento Extension read/write permissions

Question: When publishing Shopify or Bigcommerce Apps, I had to specify the read/write permissions I wanted for my app (eg. read products, read/write orders...). I am now developing a Magento Extension and wondering where and how I would specify my desired permissions. I took a look in the Connect Marketplace and when downloading extensions, there doesn't seem to be a step, where you agree to any permissions. Am I missing something?
Answer: There are not permissions at "extension" level in magento, regardless the installation source (connect, manual, etc).
You could set some ACL at backend level for menus and actions (view/save/edit)
And you can set some permissions for the SOAP an REST APIs throw configuration files.
I don't know exactly how Shopify works but based on my experience with this kind of SAAS product the permissions you set in your extension are very close to a manifest related to API features.
Comment: so, theoretically, some harmful script (delete all products every 15 minutes), could be included in my code? Is there no other safety layer?
Comment: ... Or delete all products and send all customer data to al qaeda. It's PHP all your actions are visible, in 6 year working with magento i never seen such actions in an extension.
Comment: just saying....
Comment: @Kevin Wu Me too! I'm just enforcing your concept you could do everything! Without any problem. In the new magento2 marketplace all extensions will be tested and manual reviewed, at least is what mage team says.
Comment: Anyone know how to give write permission to folder in windows?


How are spend/out/in proofs sent to verifiers?

Question: I am currently reading the Zero to Monero book, section 8.1.2/8.1.3/8.1.4. I am unable to understand how these proofs work. Each section talks about generating a signature, however, the tx structure does not store them in the MG field (or do they?). So how can the verifiers know about these proofs?
Comment: These are proofs you make after a transaction has been added to the blockchain.
Answer: You can use email, or a USB stick, FTP, pastebin sites... It doesn't matter how you send that information, as long as it arrives verbatim.
The wallet saves the proofs as binary by default, but if you're going to transfer that data via text protocols which aren't 8 bit clean, you can switch it to ASCII export (using "set export-format ascii" in monero-wallet-cli).
These proofs should not be in the transactions, otherwise they'd necessarily be public, which would defeat the purpose of being private by default while being to prove particular things to a particular party.


Is there any evidence that JS Bach, A Vivaldi and/or J Handel had perfect pitch?

Question: Is there any evidence that JS Bach, A Vivaldi and/or J Handel had perfect pitch? Perhaps, if one can devote so much time and energy to music, he would develop such abilities.
Comment: Hehe "suffered". I'm reminded of the story of a person with perfect pitch who experienced my he downside as he aged. As our basilar membranes stiffen with age our detection of absolute frequency shifts. This man's favorite sounding keys (and pieces in those keys) turned into his least favorite as he aged.
Comment: In what way would it matter?
Comment: I had a friend who was listening to a choir rehearsal, having been given the score. He had to go outside to read it, he couldn't read it against what the choir were actually singing ;-)
Comment: Have you done any research? The amount of evidence in general on these composers is vast. For one thing, there were multiple pitch levels in use just in Bach's church alone.
Answer: Today we have digital tuners and we agree that all instruments are tuned to A = 440 cycles per second. There were no such standards in those days.
I doubt any of them would have perfect pitch in the modern sense of the term, because every church they went into would have a pipe organ tuned to a different reference pitch. Furthermore in that time, pipe organs and vocal choirs and brass instruments all had different reference pitches. And reference pitches, to the extent that they existed, would be different depending on what nation or region you were in at the moment. So to have perfect pitch in the modern sense would be very confusing to a musician in their time.
Comment: Yes, A = 440 is a late 1800's American thing, standardized as ISO 16 in 1975.
Comment: @SimonWhite the first standards body to settle on A=440 Hz was a German organization in the early 1800s.  If it became prominent in the US in the late 1800s that is no doubt attributable, along with other aspects of US musical culture, to the large number of German music professors in US universities in the late 1800s.
Answer: As Laurence alludes to, when discussing "perfect" pitch, there is a difference between relative pitch and absolute pitch.
Relative pitch -- knowing where a pitch falls within the context of a scale, and hearing the purity of intervals (rather than individual pitches) -- can be learned relatively easily, through exposure to music, and most musicians probably end up developing it to some extent, even if only instinctively. In fact, for vocalists, string players, and trombonists, relative pitch is an extremely important aspect of performance. The composers you listed above certainly would have had a strong sense of relative pitch, if for no reason other than all of them were violinists.
As for absolute pitch -- recognizing individual pitches without the need for a reference pitch -- your question seems to revolve around whether or not this ability can be "developed" by spending so much time and effort on music. To my knowledge, there is differing opinions about how well it can be trained -- especially after childhood -- and how useful such hypothetical training actually is in practice. See: Is there a way to develop "Perfect Pitch"?
I am not aware of any evidence that any of these three musicians had perfect pitch (though it wouldn't necessarily surprise me, either). What is more interesting to me, is asking how the phenomenon of perfect pitch would have even manifested in the Baroque Era. This was a time before any standardized reference pitch (A=415 is just a modern compromise, not an actual period standard), so pitches could vary wildly (as much as a minor third!) from region to region, or even between two church organs in the same town. IIRC, I think Bach is known to have written organ parts in a different key from that for the choir and orchestra.
How could someone with perfect absolute pitch even perceive pitch names in such an environment? Edit: By which I mean, any attempt by the mind to create some sort of mapping between letter names to specific frequencies would have been foiled by the widespread fluidity of such pitch assignments.
Comment: As an interesting sidenote, I knew a cellist with perfect pitch who took up Baroque 'cello.  She said that, over time, her sense of perfect pitch shifted to A 415 rather than A440.
Comment: I think it may be easier to have absolute pitch within the range of the instrument you play. I'm a flutist and for any pitch between middle C and three octaves and a fifth above I get a "finger feel" of where the pitch is fingered on my instrument, and that's how I decode the pitch. And all the musicians I've known who have unlimited absolute pitch have been piano players, who play all the notes.
Comment: When people say "perfect pitch" they are talking about absolute pitch, not relative pitch. They are talking about the ability to avoid hitting a note on the piano at the top of a session, as though that matters.
Comment: Pitch is very important to a singer.  Whether the singer had absolute pitch or not, she would quickly learn which towns to avoid because of the difficulty of reaching the high notes.


How can a new user be given write/chmod permissions to a single file and write/chmod permissions for that file then be removed from root?

Question: I have a friend (with root access) that wants to prevent himself from having write access to /etc/hosts. I'm wondering if he can create a new user, give me the passcode for that new user, grant that new user write permissions for the file and then remove write permissions and chmod permissions for that file from root. Is something like this or something similar in effect possible?
Comment: If it's a case of blocking access to web/internet hosts via /etc/hosts another possibility is to use something like OpenDNS - which you can set at the router. There are relatively easy workarounds, but that's true for /etc/hosts entries too.
Answer: Nope, the root user can not possibly be restricted. If you have root access, you can do everything and also revert all kinds of protections one could think of.
Besides, you should normally not directly use the root account anyway but log in as regular user and use sudo to run single commands with elevated permissions. This also helps preventing some accidental changes, compared to always operating in a root shell.
To further protect against accidental modification, you could make the file immutable using
sudo chattr +i /etc/hosts

to prevent modifications by everybody, including root and system processes (which might be something that could cause trouble depending on the file and what you're doing with it). But still, root can lift that protection again.
To sum it up, with great powers (root login or sudo access) comes great responsibility. If your friend thinks they must be prevented from altering system files like that, they should not have administrative access to the machine.
Comment: Perhaps I've misread the situation but it's worth noting that modifications will be recorded, that the system can be set to log sudo commands; you could have off-site journals to get around local modification of log files, but it starts getting super convoluted IMO. (Maybe point a private webcam at the computer.)
Comment: An excellent, concise answer that covers all the bases. This is the right way to look at the problem.


Potential potential?

Question: I'm a noob trying to understand concepts before details (which itself could be a mistake cuz I think my head is about to explode)
A big part of my difficulty is terms - they are blocking my conceptual comprehension. From what I can divine, energy is "potential work" evidenced by both being measured in Joules. So what is potential energy? Potential potential work? Does that have a meaning I am not grasping kinda like seconds cubed is real and useful but hard to envision? Or is it imprecise terminology so I don't need to be trying to figure out if this is like a 2nd order derivative of work? Also if kinetic energy is moving "potential work"?  That implies that potential energy (potential potential work) really means stationary potential work.  My current internal paradigm is that when work is done on something it ALWAYS gets stored as potential future work. It can be stored in ONLY 2 ways. Either as motion in space-time OR as part of a deformation of space time itself (in the form a field of some sort (gravitational, magnetic , electric or nuclear). Well to be clear there would be a 3rd way which is a combo of movement and field (ya know akin to Mechanical energy = Potential + Kinetic). Also my internal model says chemical electromagnetic and nuclear energy is really mechanical – it is all about something moving, just when the motion falls under scale that is nicely ergonomic we give it a different name.. like electrical or chemical or nuclear. Oh which reminds… potential is even more confusing cuz is also used for is electric "potential"  and "potential difference"  -   I will save that for another day. But for now,  please disabuse me of any and all flawed notions I currently entertain and maybe clear up this potential ^2 issue.
Comment: Don't get caught in terminology. Look straight to the meaning. "Work" is a process of converting one form of energy to another. That's it. No puzzles. For example, a compressed spring lifts up a body . The potential energy of the compressed spring converts to the potential gravitational energy of the body (also involving the kinetic energy of the movement in the process). You can phrase this process with many repetitions of the word "potential" through the terminology of "work", but it would not change what actually happens.
Comment: I like that way of thinking of it.. work is just a change in form. Kinda like getting 4 quarters fior a dollar.  Nothing new has been created. you still have what you had before, but sometimes quarters are more adavatages that bills. It is tuff to look striaght to te meaning since the meaning is often unclear, but your point is still taken thanks
Answer: The concept of "energy" is indeed hard to explain. It has become consensus for people working in the field to explain it as "the ability to do work". Or "the potential to do work", if you will. This may feel fluffy, but at least it is a quite tangible definition.
Objects with kinetic energy can do work (when impacting something), those with thermal energy can as well (they can cause expansion) etc. All those are just different kinds of energy that can all do work under the right circumstances. Therefore they have the potential to do work.

So what is potential energy? Potential potential work?

Well, yes, you can actually say it like that, if you wish. Sometimes energy is stored in some way. Compress a spring and wrap a rubber band around it - you have stored some energy. We can call it elastic energy. But because it is stored, it can later be released. If it is released it can do work (the spring can push on something).
You could even dare say that it has a potential to do work.
So, it has become common terminology to call any kind of stored energy potential. We would call it elastic potential energy as well as gravitational potential energy, electric potential energy, magnetic potential energy etc.
You may find the terminology a bit pleonasm - a bit of a "doubled" potential. But just think of this as poor wording. You know understand the meaning of the terms, and if something can do work, then it can do work regardless of how "doubled" it is expressed in the term. Just get used to the term "potential" only being used when energy is stored - in other cases people don't call it that. Although energy is always a potential to do work.

Also if kinetic energy is moving "potential work"? That implies that potential energy (potential potential work) really means stationary potential work.

Yes. Now you are talking about the different types of energy. All motion energy is called kinetic. Therefore potential energy can be considered not related to motion, or "stationary" if you will - a thrown taught spring contains both kinetic energy and elastic potential energy at the same time.

[Energy] can be stored in ONLY 2 ways. Either as motion in space-time OR as part of a deformation of space time itself (in the form a field of some sort (gravitational, magnetic , electric or nuclear).

That really depends on your scale, as you mention yourself. At the macro-scale, you can also have thermal energy for instance. At the micro-scale, that thermal energy actually comes from atoms and particles in rapid random motion and vibration - so it is kinetic energy.
So, on the micro-scale, yes, I would agree with you. On the macro-scale it is often much more convenient to group the types of micro-scale kinetic energies and field energies and invent concepts such as elastic energy, thermal energy etc. As long as you understand what they are while you remember where they come from at the micro-scale, you are good to go.
Comment: Very helpful. my internal model is that Energy is not the abilty to do work nor the potential, it is, as you basiclly said, STORED work. Potential (to me anyway) implies a gain of some sort - as in "that kid has potnetial" - he will be more than he is currently.  But referring to it as stored work keeps the idea of conservatrion of energy at the fore and it is more intuitive (to me) that energy would be measure in joules.  Since having a unit for a somethign that does t exit (it is merely pootential) kinda messes with my head.  You helped cement that idea, and maybe others will use it too.

Potential potential?


Would it be interesting or useful to map objects' current (predicted) locations?

Question: Due to light travel time, we observe astronomical objects as they were in the past. If we knew objects' motion (relative to us), it seems like we could extrapolate to their present positions, but I can't remember ever reading about anything like this. Has there been any work like this done--or is there some reason why it would be pointless?
Comment: This is actually something I wondered during my undergrad astronomy classes but I never asked.  I think part of the answer is that it's not worth doing in general because of the computation required (e.g., to do so with individual stars in a galaxy, galaxies in a cluster, etc.) and also because gravity also travels at the speed of light so the objects are affecting us from their current seen locations rather from where they "really" are today.  But this is a guess on my part which is why I'm posting it as a comment and not as a full response.
Answer: The geometry of space-time is a major issue in cosmology, but the focus is on cosmic time-scales, the data (necessarily) are from the past, and physicists can sometimes get a little testy if you push them to use the word "now" in reference to distant things. But in casual conversation, you can say that the Andromeda Galaxy is "right now" closer to us than it appears (or vice versa for most other galaxies).
But as @Stuart Robbins said in his comment, no information can move faster than the speed of light, so scientific predictions outside the light cone are unlikely to have a practical benefit. (I hesitate to say "pointless" because I'm not a physicist or cosmologist.)
Comment: I may be just a grad student, but *as an astrophysicist* I fully back the statement that such predictions will not have a practical benefit. Even if you worked to develop a well-defined notion of "now" (possible thanks to the CMB, but not possible in pure SR), information outside your light cone is in some sense outside your universe, and making statements about it is bad practice at best.
Answer: Very interesting and thought provoking question. Unfortunately we are not in the era of "Enterprise" to care that much about the current placement of cosmic bodies further than our Solar System. For the bodies in our Solar System we do map objects' current or predicted locations for various reasons as you are aware of.
Answer: To know where an object is 'now', you need to know its space velocity as well as its distance so that you can calculate its present three-dimensional position from the position that you measure from its light. For most stars, it's easiest to get the radial velocity since that just needs a spectrum. To get the velocity perpendicular to the line of sight, you need both its distance and apparent motion in the sky. For distant galaxies, one can't normally determine space velocity at all since the measured redshift is made up of both distance and space velocity effects; and, even if they are moving very fast perpendicular to the line of sight, it will take thousands of years to see this motion on the sky.
So, in short, it's a lot of trouble for very little gain.


Same files have different "size on disk" on new drive

Question: I recently bought a 8TB HDD to replace my 1TB drive for storing my backups. However after moving the files to the new drive I noticed they take up a substantially larger amount of space on the disk, even though the true file size is the same. Both drives are formatted to be exFAT so I am not sure why the reported size is so different. Why is substantially more space being used on the new drive?
Comment: It's probably a different cluster size; might be worthwhile to use a more resilient filesystem if you're storing your backups on those drives.
Answer: The default cluster size for exFAT is extremely large. According to this answer it's like this
<code>Volume size   Cluster size
  500 GiB          128 KiB
 1000 GiB          256 KiB
 1500 GiB          512 KiB
 2000 GiB          512 KiB
 3000 GiB            1 MiB
 4000 GiB            1 MiB
 5000 GiB            2 MiB
 8000 GiB            2 MiB
10000 GiB            4 MiB
20000 GiB            8 MiB
</code>
Your files are 753674490827/726245 ≈
0.9897 MB on average, so on the 1 TB drive with 256 KB cluster, about half of the files take 4 clusters (and waste almost nothing) and roughly the remaining half need 5 clusters (and waste 1 cluster)
The average wastage is 0.5 clusters = 128 KB per file or 12.5%. The total expected size on disk is 753674490827 × 112.5% ≈ 789.7 GB which is extremely close to what's in your screenshot. However on the 8 TB disk, the clusters are 2 MB, so you're wasting ~1 MB per file, which is why the new size on disk is almost twice the total size and the previous size on disk
See

Please explain wasted space on an exFAT formatted external hard drive
Why is exFAT's default allocation size in Windows so high?
1-byte file takes up 2 MB (yes, megabytes) on 6 TB exFAT Veracrypt volume. Why?
Why is "size on disk" much bigger than "size" when I copy data from NTFS to exFAT?

It's also the same reason as this question Why is there such a big difference between "Size" and "Size on disk"?
On NTFS there are many other reasons. If you're interested read Why does "Size on disk" vary when "Size" does not with the same set of files?
In short, exFAT is bad for storing small files. Either use NTFS, or reformat exFAT with a smaller cluster size (4 KB just like almost everyone else including NTFS)
Answer: Phuclv is right.
If you are using ExFAT on a 8TB disk your cluster size will be 8MiB which means that any file will take at least 8MB of disk space, even if it's only a small txt file.
For a drive that big I would recommend ReFS (if you are using Windows 10 or 2012/2016 server) with a 4KB cluster size:

or if you are looking for an even smaller cluster size go for NTFS:


Is it possible to have 2 iCloud email accounts in IOS 5?

Question: Under a Mobile Me Family Pack, I set up a secondary email account for myself, giving me two "firstname.lastname@example.com" addresses. When I transitioned to iCloud, I used my primary Mobile Me account, which I set up on my Mac and iPad. In June of 2012, Mobile Me will cease to exist, but I still need to use that second account. Is it possible to have both my primary iCloud email, and that secondary account on my iPad? (On my Mac, i just set up another User Account, and used it to "migrate" that second Mobile Me account to iCloud.)
I would Only need to sync Mail to my iPad for the latter, so would not be concerned with duplicating Adress Book contacts, Calendar etc.
Answer: It sounds like you've already discovered that you can migrate each MobileMe Family Member sub-account individually to iCloud. Having done that, you can now add the second account to your iPad as a secondary iCloud account by going to Settings > Mail, Contacts, Calendars > Add Account… > iCloud.
You can also add secondary iCloud accounts in OS X by going to System Preferences > Mail, Contacts & Calendars > Add Account… > iCloud. This way you don't have to switch users in OS X to access the second iCloud account's mail.
You can migrate remaining MobileMe Family Members by going to me.com/move, instead of having to create a new user in OS X to do the migration.
Primary iCloud accounts can use a few features that secondary accounts can't:

iOS 5: Photo Stream, Documents & Data, and Backup
OS X Lion: Bookmarks, Photo Stream, Find My Mac, and iCloud Storage
Answer: iCloud has a feature called "iCloud mail aliases" which allows users to create up to three so-called alias emails. Each of these is a completely separate email address which forwards email to you and lets you send email from it. Unfortunately, there's no way to have two separate accounts in iCloud, but this may prove useful to you anyway.
To set up a new alias, go to https://www.icloud.com/#mail and open Preferences, accessed via the gear icon in the top right. Under the Accounts tab, click "Add an alias…" and fill out the desired settings.

The Accounts pane in iCloud Mail

Creating an alias
Comment: You are correct about aliases but it *is* possible to have multiple iCloud accounts and you can access the mail for those multiple accounts on a single iOS device or computer–which is what the OP wants to do.
Comment: @jaberg Oh, I hadn't thought it was... thanks for the clarification.


How prevent of attack in Ethereum

Question: I hope you are well. The topic of my thesis is to increase security in blockchain-based IoMT (Internet of Medical Things). I aim to present new ideas to reduce attacks in the blockchain, considering that consensus is PoS (Proof of Stake) in Ethereum. Thank you for your advice on which of the attacks I should work on and how to prevent these attacks?
Answer: Some common blockchain attacks include

Denial of service
Sybil
Transaction censorship

See here more on the topic.
Note that as a blockchain user, unless you are building your own public blockchain (which you are not), you do not need to do anything. This is the work for those who develop blockchain themselves. The major blockchains today have been in production for many years, seen a share of their issues and can be considered safe today. Bitcoin and Ethereum have less downtime than most of the critical services like Amazon cloud or financial services.

How prevent of attack in Ethereum


Howto publish in Ubuntu App Sotre an app that was not writted with Ubuntu SDK?

Question: I have written a game for Ubuntu Phone, without using Ubuntu SDK. I have written, compiled and tested it on Meizu MX4 Ubuntu Edition. I have the binary file and .desktop launcher for it, plus couple of wav files with sound effects.
How do I go about oackaging the app and publishing to Ubuntu App Store?
I wrote the game in Lazarus (Freepascal) on the phone itself, below few screenshots, so you can see that Ubuntu SDK is not really the only mean to make apps working on Ubuntu Touch devices:
app icon, launching and spread
gameplay
Comment: At this point I can send my app to anybody as a download link, and people can install and use it on Ubuntu Devices like my phone, yet, I cannot publish it via the Ubuntu App Store. Ubuntu Touch is such an amazing, open, powerful operating system, yet Ubuntu App Store seems so restrictive, as nowhere can I find way to publish anything that wasn't made in Ubuntu SDK.
I have even started a blog to discuss broad possibilities with Ubuntu Touch platform as soon as we go out of the box, and beyond the proposed SDK:
http://kriscode.blogspot.tw/2016/09/freepascal-development-for-ubuntu-phone.html
Comment: Perhaps I found a solution, but need to understand and try, following this post: http://notyetthere.org/on-manually-creating-click-packages/
Comment: Click approach doesn't work. I am able to build click package, and also to install the package locally. The problem however is, that after installing the click package, the automatically created app launcher runs the app via an AppArmor confinement, by prefixing the app in the launcher with aa-exec-click.
Apparently Xmir apps do not run confined. Unless there is a way to create a proper profile, which I don't know.
This is however a separate roblem and I will create a separate question for it. I will accept the click method as a valid response to how the question is written.
Answer: I fond the answer on G+: just package the app as click, which can be done directly on the phone itself: # click build
an the directory has to contain the binary, the data like sounds, images, config files etc, AND 2 files for the click package builder that you can make yourself in text editor: manifest.json and .json, like explained here: http://click.readthedocs.io/en/latest/file-format.html


How does cabin pressure vary with respect to ambient pressure during descent?

Question: I came across this statement in a book -
"During a descent, the cabin pressure in a pressurized aircraft usually climbs at as lesser rate than ambient pressure".
Could someone explain this statement in simple words?
Comment: There's a graph of possible cabin and outside pressure for a flight on this answer.  https://aviation.stackexchange.com/a/26345/3159
Answer: During descent, the rate of change of pressure inside the cabin of a pressurized aircraft is lower than outside (ambient).

Inside the aircraft, under active control the  cabin pressure increases from equivalent ~8000ft above sea level to ground level. In the meantime, the aircraft descends from cruising altitude which is typically much higher, also to ground level.
Assuming the pressurization and descent start and end roughly at roughly the same time, the cabin is necessarily pressurized slower than the increase of air pressure outside in absolute terms  (e.g. psi per minute) assuming a steady pressurization profile .
Corner cases arise when the airport is at an elevation above 8000ft or so since the cabin will be further depressurized during descent. So while the relation holds in absolute magnitude , they will be of opposite sign. (until there is an airport  24,000 ft or so....)
Answer: The pressurization system uses a controller that manages pressure changes for the least impact on the passenger.  This means avoiding sudden changes and keeping the rate of change as low as possible, generally between 100 and 300 fpm, and never more than 500 fpm (about the most most people will tolerate without complaint) while the airplane is going 2000-3000 fpm.
One important issue the controller is designed to avoid is the "pressure bump" right after liftoff.  This is from the system reacting to the ambient pressure drop of the initial climb (the input/output response loop is quite long) and there can be a bit of a response overshoot that pops peoples' ears, generating complaints.
To avoid this, the system will slowly pre-pressurize the cabin to a few hundred feet below the current elevation before takeoff, too slowly for most people to notice, to get the system settled into its regulation mode and have a bit of pressure margin that allows the system to smooth out its own reaction to the sudden drop in pressure during the initial climb.