Why aren't duplicates deleted?

Question: Let's say a question is closed as duplicate and someone provided the link of the original question:  Wouldn't it be better that duplicates are deleted off of the site? Or deleting them would be a waste of time and generally does no improvement to the site?
I have no idea whether deleting duplicates permanently does technical improvements to the website.. So if anyone can help regarding this issue, it would be much appreciated.
Also, if there's no significant improvement resulting from the permanent deletion, then it is definitely a waste of time.
Comment: Many closed duplicates are useful to funnel duplicate traffic to the main duplicate because of their variations in titles and statements.  In some cases a duplicate does not even add this value, and is fair game to delete.
Comment: A related older discussion: [Is it okay to delete unanswered, marked as duplicates questions?](https://math.meta.stackexchange.com/q/22181) It was pointed out there (and in the above comment) that duplicates actually [can be useful](https://math.meta.stackexchange.com/questions/9586/avoiding-duplicates/9588#9588) in some cases.
Comment: Some of them, when they are PSQs, should be deleted, and should have been closed as not fit for this site due to lacking context.  But some dupes are very well asked questions, and, as @rschwieb argues, can help to funnel duplicate traffic to the main traffic.  But I think PSQ dupes serve no purpose.
Comment: Thank you for your responses. It is fair to say that everyone has his own way of expressing his/ her question.
Comment: I often wanted to vote to delete already closed and downvoted questions , but could not because of a duplicate or a bounty.
Comment: Duplicates seem to shield poor posts from being deleted, as well as bounties apparently do. This is not good. If there are good reasons to delete a question, it should be possible under all circumstances.
Comment: @Peter Can you please elaborate what you mean?
Comment: @Peter Yes, that was one of the reasons that made me ask this very question. Some duplicates are better off deleted in my opinion. But, then again, moderators certainly know what they are doing
Answer: This is a combination of the comments mentioned by the kind users:

Everyone has their own way of expressing their problem/ question.
Closing duplicates instead of deleting them helps in funneling the duplicates and redirecting those who asked the original question hence building up a series of duplicates leading to the main question.
This answer by a moderator proves to be helpful as well: https://math.meta.stackexchange.com/a/22183/784761
Comment: I find it somewhat ironic that the sentence reading "Everyone has his own way of expressing his problem/question" (which was the particular expression of the original author) was edited to change the pronouns (thus depriving that author of their original expression).  While I have sympathy for making attempts to make the language here more gender-neutral, (1) editing a post *just* to change the pronouns isn't really appropriate, and (2) in this case, I think that it is doubly inappropriate, as the answer author is also the question author, and the "his" appears to be self-referential. :/

Why aren't duplicates deleted?


What is the difference between inheritance and Categories in Objective-C

Question: Can some one explain to me the difference between categories and inheritance in Objective C? I've read the entry in Wikipedia and the discussion on categories there doesn't look any different to that of inheritance. I also looked at the discussion on the topic in the book "Open iPhone Development" and I still don't get it.
Comment: @bobobobo 'bear' as in 'bearing the burden of a journey' not 'baring one's soul'
Answer: Sometimes, inheritance just seems like more trouble than it is worth. It is correctly used when you want to add something to an existing class that is a change in the behaviour of that class.
With a Category, you just want the existing object to do a little more. As already given, if you just want to have a string class that handles compression, you don't need to subclass the string class, you just create a category that handles the compression. That way, you don't need to change the type of the string classes that you already use.
The clue is in the restriction that categories only add methods, you can't add variables to a class using categories. If the class needs more properties, then it has to be subclassed.(edit: you can use associative storage, I believe).
Categories are a nice way to add functionality while at the same time conforming to an object oriented principle to prefer composition over inheritance.
Edit January 2012
Things have changed now. With the current LLVM compiler, and the modern, 64-bit runtime, you can add iVars and properties to class extensions (not categories). This lets you keep private iVars out of the public interface. But, if you declare properties for the iVars, they can still be accessed / changed via KVC, because there is still no such thing as a private method in Objective-C.
Comment: True, but that still doesn't _add_ storage to the class.
Comment: It should be noted, you *can* declare properties for existing ivars with Categories. By that I mean, you can declare an `@property` and either `@synthesize` or `@dynamic` them in the implementation. I have done this with `readonly` properties, although I imagine they could be used for anything. That is, assuming `MyClass` has `int myVar`, then `MyClass (MyCategory)` can have a property for `myVar`.
Comment: @Cthutu that's private by convention. If you try to call such a method you will get a compiler warning, but Objective-C is dynamic, and you can still send the message to the class even if it is not publicly declared. That's what I mean when I say there are no private classes. You can still send the message to the class.
Comment: There is such a thing as a private method in Objective-C.  It's a method that's defined in the @implementation or declared in a nameless category.
Comment: You can add properties to categories (http://stackoverflow.com/a/8733320/1226304) and this might be useful, when you're creating category for class that doesn't support subclassing, e.g. `UIAlertView`.
Comment: @StasDerpoliuk You could always add associative storage to classes using the runtime, but that isn't the same as a property.
Comment: @Abizern I see. But the point is that in some cases it might be useful.
Comment: What is also to add here, is when you think of the extendability of it. You can inherit from an inherited class (plant <- tree <- oak <- Canadian oak). But you can't do that with categories.To me besides the properties, this is the main difference.
Answer: Categories allow you to add methods to existing classes. So rather than subclass NSData to add your funky new encryption methods, you can add them directly to the NSData class. Every NSData object in your app now has access to those methods.
To see how useful this can be, look at: CocoaDev
Comment: It doesn't automatically apply to NSData objects, you still need to #import the header where you define the category.
Comment: A category is not a class; it doesn't replace the existing class. It adds methods to the existing class.
Comment: The link to CocoaDev is down
Comment: are you sure that just by making a category out of NSData everywhere NSData is used the category is used, I thought you need to make the category pose as NSData for it to be used instead of NSData
Comment: No, classes pose. All NSData objects get the methods of categories that are loaded.
Comment: And it doesn't matter if you import the header — the objects still get the method. The compiler will complain if you try to call it directly, but you can still call it with performSelector:.
Answer: One of favorite illustrations of Objective-c categories in action is NSString.  NSString is defined in the Foundation framework, which has no notion of views or windows.  However, if you use an NSString in a Cocoa application you'll notice it responds to messages like <code>– drawInRect:withAttributes:</code>.
AppKit defines a category for NSString that provides additional drawing methods.  The category allows new methods to be added to an existing class, so we're still just dealing with NSStrings.  If AppKit instead implemented drawing by subclassing we'd have to deal with 'AppKitStrings' or 'NSSDrawableStrings' or something like that.
Categories let you add application or domain specific methods to existing classes. It can be quite powerful and convenient.
Answer: If you as a programmer are given a complete set of source code for a code library or application, you can go nuts and change whatever you need to achieve your programming goal with that code.
Unfortunately, this is not always the case or even desirable. A lot of times you are given a binary library/object kit and a set of headers to make do with.
Then a new functionality is needed for a class so you could do a couple of things:

create a new class whole instead of a stock class -- replicating all its functions and members then rewrite all the code to use the new class.
create a new wrapper class that contains the stock class as a member (compositing) and rewrite the codebase to utilize the new class.
binary patches of the library to change the code (good luck)
force the compiler to see your new class as the old one and hope it does not depend on a certain size or place in memory and specific entry points.
subclass specialization -- create subclasses to add functionality and modify driver code to use the subclass instead -- theoretically there should be few problems and if you need to add data members it is necessary, but the memory footprint will be different. You have the advantage of having both the new code and the old code available in the subclass and choosing which to use, the base class method or the overridden method.
modify the necessary objc class with a category definition containing methods to do what you want and/or override the old methods in the stock classes.
This can also fix errors in the library or customize methods for new hardware devices or whatever. It is not a panacea, but it allows for class method adding without recompiling the class/library that is unchanged. The original class is the same in code, memory size, and entry points, so legacy apps don't break. The compiler simply puts the new method(s) into the runtime as belonging to that class, and overrides  methods with the same signature as in the original code.
an example:
You have a class Bing that outputs to a terminal, but not to a serial port, and now that is what you need. (for some reason). You have Bing.h and libBing.so, but not Bing.m in your kit.
The Bing class does all kinds of stuff internally, you don't even know all what, you just have the  public api in the header.
You are smart, so you create a (SerialOutput) category for the Bing class.
<code>[Bing_SerialOutput.m]
@interface Bing (SerialOutput)   // a category
- (void)ToSerial: (SerialPort*) port ;
@end

@implementation Bing (SerialOutput)
- (void)ToSerial: (SerialPort*) port
{
... /// serial output code ///
}
@end
</code>
The compiler obliges to create an object that can be linked in with your app and the runtime now knows that Bing responds to  @selector(ToSerial:) and you can use it as if the Bing class was built with that method. You cannot add data members only methods and this was not intended to create giant tumors of code attached to base classes but it does have its advantages over strictly typed languages.
Answer: I think some of these answers at least point to the idea that inheritance is a heavier way of adding functionality to an existing class, while categories are more lightweight.
Inheritance is used when you're creating a new class hierarchy (all the bells and whistles) and arguably brings alot of work when chosen as the method of adding functionality to existing classes.
As someone else here put it... If you are using inheritance to add a new method for example to NSString, you have to go and change the type you're using in any other code where you want to use this new method. If, however, you use categories, you can simply call the method on existing NSString types, without subclassing.
The same ends can be achieved with either, but categories seem to give us an option that is simpler and requires less maintenance (probably).
Anyone know if there are situations where categories are absolutely necessary?
Comment: Sounds like you should start a separate question regarding "...there are situations where categories are absolutely necessary?"
Answer: A Category is like a mixin: a module in Ruby, or somewhat like an interface in Java.  You can think of it as "naked methods".  When you add a Category, you're adding methods to the class.  The Wikipedia article has good stuff.
Comment: No, you are not making a new class. You are adding methods to an existing class.
Comment: but you are still making a new class aren't you? So what is the difference between that and inheritance
Comment: @charlie-martin - There is major difference between Ruby Mixins and Objective-C categories, a Ruby Module is not related to a Class it is being mixed in, but a Category is "attached" to the Class.
Answer: The best way to look at this difference is that:
1. inheritance : when want to turn it exactly in your way.
example : AsyncImageView to implement lazy loading. Which is done by inheriting UIView.
2. category : Just want to add a extra flavor to it.
example : We want to replace all spaces from a textfield's text
<code>   @interface UITextField(setText)
      - (NSString *)replaceEscape;
   @end

   @implementation UITextField(setText)
      - (NSString *)replaceEscape
      {
         self.text=[self.text stringByTrimmingCharactersInSet:
                           [NSCharacterSet whitespaceCharacterSet]];
         return self.text;
      }
   @end
</code>
--- It will add a new property to textfield for you to escape all white spaces. Just like adding a new dimension to it without completely changing its way.
Comment: I think this is a very confusing answer.
The grammar is awful.
It is totally unclear what is meant by poetic phenomenolgy such as 'flavor', 'dimension', and 'the way'.
The naming of a category (setText), and the method (replaceEscape), to remove spaces from a textfield are badly chosen and not descriptive.

Also, it is plain wrong to say that categories add new properties to the textfield. I am asuming that 'property' in this context should be interpretted as 'method'.
Comment: Its just adding a method. `replaceEscape` to the class IUTextfield.


Recreate "Desktop" directory

Question: I accidentally deleted ~/Desktop. This directory plays some kind of important role because now that it is gone all of the folders under ~/ are showing up on my accounts desktop. How do I fix this?
Answer: Press Ctrl+Alt+T to go to a terminal and type:
mkdir ~/Desktop

and then press F5 on the desktop to refresh it.
Answer: First you should create the directory again:
mkdir ~/Desktop

Now if the default icon has not appear then you should edit ~/.config/user-dirs.dirs file.
gedit ~/.config/user-dirs.dirs

It should be same as this:
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Take a look over this for more information
NB: you may need to have a restart or logout and then login to apply the new settings

Recreate "Desktop" directory


How to make spiral with editable vertices

Question: I want to make a (very rough) model of a cochlea in an ear. However, whenever I look up a spiral tutorial (I'm very new to Blender) and follow it, it has me make a spiral that when looked at in edit mode only has vertices in the center of the spiral. If I want to make some parts of the spiral wider, for example, I cannot do that. I need vertices on the outside. Does anyone know how to do this? I don't really know if I'm explaining this right.
Comment: I need coffee. I read "How to make spiral with edible vertices." which made me do a double-take.
Answer: You can change the radius of parts of a curve by selecting the control points and changing the Mean Radius value in the N > Item > Transform panel. Once  you're reasonably happy with the curve, if you want to have the vertices on the surface, you can convert it to mesh by selecting Convert to > Mesh from the right click menu. It'll probably harder to control as a mesh though, since you'll lose the parametric nature of the curve, so I'd suggest making a copy first.

As a bonus, if you enable the "Add Curve: Extra Objects" add-on from Preferences > Add-ons, you get many curve presets in your Add menu (Shift+A), like so:
Comment: I actually used the add-on in the tutorial, I just wanted the "convert to mesh." Thanks! And I'll use the radius tip too.
Answer: They probably used modifiers to create the spiral.  You can apply all of the modifiers at once by entering Object Mode and pressing Ctrl + A -> Visual Geometry to Mesh.
Here's an example default cube with Bevel and Subdivision Surface modifiers.


Objects spawn on cursor rather than in the origin

Question: I just got Blender 3 days ago, and I messed something up. Whenever I create a new object, it spawns wherever my cursor currently is. But instead, I want it to spawn at the original world origin. Any help?
Comment: I have no idea what you mean by "spawn" in this context, however new objects (from Shift+A menu) in Blender are added at the 3D cursor location.
Comment: All objects are created where the 3D cursor is. That is one of it's functions.
Answer: You mean the 3D cursor right? According to blender manual, this is exactly what 3D cursor does:

The 3D Cursor is used as the origin for any added object, can be used and moved with the snap tool, and is an option for the pivot point.

If you need a shortcut to place the 3D cursor back at the center, try using Shift + C.
Comment: I thought I remember every object spawning at the xyz origin, not on my cursor (yes the 3D cursor). I did some configuration where now every object I create is placed on my cursor. If that is the default, correct me, because that's not what I thought. Thanks for your help, though.
Comment: As @sacrish says, by default, added objects get placed at the 3D cursor, not the world origin.  If there's a setting or add-on to change this, I've never seen it.  However, immediately after adding an object at the 3D cursor, you can press Alt-G to clear its location transform which will move it to the world origin.


Is this the position from TCEC Season 18, Game 80 a win or a draw?

Question: This position from move 42 of TCEC Season 18 Game 80, with Black to move. Is it a win or a draw?
<code>[FEN "8/1k5p/1P3pp1/K1P2b2/5P1P/8/8/2B5 b - - 0 1"]
</code>
Comment: Black to move , I forgot to say.
Answer: The key point in this endgame is that the bishops are of opposite colours. It is a trivial draw. White is a pawn up but with nothing more than barely competent play by black, white will never be able to advance his pawns. The black king can never be moved from b7 and the black bishop can take station on the diagonal between c6 and h1 making the pawn move c6 impossible. Black will also play h5 at some stage leaving him with only the g6 pawn to protect. The f6 pawn is an irrelevance.
To be able to win an opposite coloured bishop endgame one player has to have two passed pawns separated by a minimum number of files. That isn't the case here. The problem for the side with the extra pawns is that the opposing king and bishop can always blockade the colour of the bishop and the attacking bishop cannot help.
Answer: Is it a win or a draw?
The position from the diagram is a dead draw.
How can White win?
<code>[Title "White wins with queenside pawns"]
[StartFlipped "0"]
[fen "8/1k5p/1P3pp1/K1P2b2/5P1P/8/8/2B5 b - - 0 1"]

1...Bg4 2. f5 {No matter how Black captures the pawn, White plays Bb2 and gets the f6 pawn} Bxf5 3. Kb5 Bg4? {I am just setting up the winning position for White, proper defense shall be demonstrated in a separate diagram} 4. c6+ Kb8 5. Bf4+ {That was the point of f5, to vacate f4 square for the bishop}  Kc8 6. b7+ Kd8 7. b8=Q+ 1-0
</code>
There are only two ideas that can make White win on the kingside:
<code>[Title "White wins with h-pawn"]
[StartFlipped "0"]
[fen "8/1k5p/1P3pp1/K1P2b2/5P1P/8/8/2B5 b - - 0 1"]

1...Bg4 2. Bb2 Bd7 3. Bxf6 Bc6? 4. h5!+- {With Black king tied to the queenside, only bishop is left to defend, which is why Black may not take, because White king will help the f-pawn to queen, forcing Black to give up the bishop. White bishop easily stops Black's passed h-pawn} Bf3 5. h6 g5 {Sooner or later, Black will have to play this move in order to defend the h-pawn} 6. Bxg5! 1-0
</code>
Similar idea looms in the air:
<code>[Title "White wins with f-pawn"]
[StartFlipped "0"]
[fen "8/1k5p/1P3pp1/K1P2b2/5P1P/8/8/2B5 b - - 0 1"]

1...Bg4 2. Bb2 Bh5? 3. Bxf6 Bg4 4. Be7 Bf3 5. Kb4 Bg2 6. Kc4 Bf3 7. Kd4 Bh1 8. Ke5 Bg2 9. Kf6 Bf3? 10. Kg5 Bh5? 11. f5 {Black loses bishop if he takes the f-pawn, otherwise f-pawn promotes to Queen} 1-0
</code>
How can Black hold? What are his plans?
Black needs to:

stop f-pawn from moving
stop h-pawn from moving
stop queenside pawns from rolling

Points 1 and 2 are easily achieved with the pawns placed on g6 and h5. Bishop then needs to be on the b1-h7 diagonal once White plays Kg5 and there will be no way for White to break through. To be ultra safe, we will keep Black's bishop as further away as possible from the White king.
Point 3 is achieved by keeping the bishop on h1-a8 diagonal.
The only question remains if White can somehow overburden Black pieces with piece maneuvers, namely with the king. Bishop is faster than the king, so Black just needs to shuffle the bishop on the relevant diagonal.
Let us put this all together:
<code>[Title "Black holds comfortable draw"]
[StartFlipped "0"]
[fen "8/1k5p/1P3pp1/K1P2b2/5P1P/8/8/2B5 b - - 0 1"]

1...Bd7! {Now White can not perform the queenside pawn roller described earlier} 2. Bb2 h5! {No more h5 ideas} 3. Kb4 Bc6! {Flexibly posting the bishop, so he can shuffle on the required diagonals. F-pawn is irrelevant} 4. Bxf6 Bh1 5. Kc4 Bg2 6. Kd4 Bh1 7. Ke5 Bg2 8. Be7 Bh1 9. Kf6 Be4! {As long as White king attacks the g6 pawn we defend it by shuffling on the b1-h7 diagonal} 10. Ke5 Bh1 {Once White king abandons the g6 pawn, Black switches the bishop back to the h1-a8 diagonal} 11. f5 gxf5 12. Kxf5 Bf3! {Now we just shuffle on the d1-h5 diagonal} 13. Kg5 Bd1 14. Kf5 Be2 15. Ke5 Bf3! {Remember, as soon as White king moves away from the kingside pawns we switch back to h1-a8 diagonal to block the queenside pawns} 16. Kd6 Bh1 1/2-1/2
</code>
Black can play like this forever, he will simply shuffle between the relevant diagonals as shown in this example. White has nothing in this endgame.
If you have any questions leave a comment, I will gladly reply.
Comment: @RewanDemontay: Thank you.
Answer: It is rather easy to just chuck this position into a chess engine to determine the result, but let's try to manually to improve our analysis skills.
Clearly, White is up one pawn with two connected passed pawns. These pawns are threatening to check agter White moves their king to b5, and push dawn the Black king to do so. But these pawns are easily neutralized by Black's light square bishop since the pawn's checking square is protected by it, The Black king can now sit and blockade the pawns, like so.
<code>[FEN "8/1k5p/1P3pp1/K1P2b2/5P1P/8/8/2B5 b - - 0 1"]

1... Be4
</code>
White's kingside threats are easy to counter and therefore not a threat at all. Now we can turn our eye to Black's queenside majority. Black can make a passed pawn no matter what White does, but it will never be of any use due to White's dark-squared bishop.
<code>[FEN "8/1k5p/1P3pp1/K1P2b2/5P1P/8/8/2B5 b - - 0 1"]

1... Be4 2. Kb5 h6 3. Be3 g5 4. fxg5 hxg5 5. hxg5 fxg5 6. Bxg5 *
</code>
Neither side can advance their pawns for promotion because of the opposite colored bishops. White can try ideas such as protecting their kingside pawns with their bishop and moving their king to the queenside, but Black will always be able to force the exchange of pawns on the queenside before than.
The end effect is that the pawns are practically non-existent, leaving an opposite colored bishop endgame with only kings and them on the board, which are always are a draw, unless a FIDE player runs out of time of course.
All in all, the position is a draw.


Resizing class according to screen size on flutter

Question: I'm new to flutter,I've designed my app using fixed dimensions.
What's the easiest way to resize scaffold according to screen size (different phone screen size).
Comment: You need to research first if you do not find this solution then post it here. Please read this article  https://stackoverflow.com/help/how-to-ask
Comment: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Answer: You can use MediaQuery.of(context).size inside build method.
build(BuildContext) {
   final Size size = MediaQuery.of(context).size;
}

Then use it like this:
SizedBox(
   height: size.height,
   width: size.width * 0.85,
),

Another options are using external libraries like GetX or ScreenUtils
Answer: You go through official documentation here
And use MediaQuery.of() Responsive, Adaptive classes/Widgets
Answer: To resize your screens/widgets you can use MediaQuery.
You can use it like ->
screenHeight: MediaQuery.of(context).size.height,
screenWidth: MediaQuery.of(context).size.width,

Then you can scale it like ->
Container(
        width: MediaQuery.of(context).size.width* 0.5,
)

If you multiply with 0.5, that means, you want to use 50% of screen width.
Answer: Packages and sources  :

https://pub.dev/packages/responsive_framework
https://flutter.dev/docs/development/ui/layout/adaptive-responsive

You can check height and width by MediaQuery.
Example :
double _height =  MediaQuery.of(context).size.height;
double _width =  MediaQuery.of(context).size.width;


What is a man who is fond of learning various types of languages called?

Question: Question:- A man who is fond of learning various types of languages is called?
Ans:
Comment: Ans: the same thing as a woman is called in a less sexist world.
Comment: @tchrist ??? Just add '-trix' to the end. Aviatrix, judgeatrix, polyglotatrix.
Answer: Probably the best word is linguaphile.
Answer: The term that I would use is polyglot.
This article suggests that the meaning of polyglot is evolving (online at least) to specifically mean someone who is deliberately learning languages:

This is by no means official, but it looks like in the common online language discourse polyglots are those who have learned multiple languages deliberately, whereas multilinguals acquired them from their environment. With such a division, a polyglot naturally wins more right to be admired as one who has put effort and time into mastering a skill, rather than passively absorbing knowledge from the surroundings.

This article is used as a reference for the wikipedia entry for polyglot.


Pi Pico- How to use XIP

Question: I am trying to boot my Pico from an external NOR flash module, but I'm not sure how to do it. The QSPI pins on the RP2040 look to be used already, is there any way I can access these externally or set up another interface? Theoretically, XIP would work, but I'm even more confused on how to use it. Any help would be great.
Answer: XIP is only available on the QSPI interface. You have to boot first from the NOR flash on the QSPI interface or via USB programming. You can't run code from an external flash module, but you could copy code from that flash module to the internal SRAM first and then execute that.

Pi Pico- How to use XIP


How to rename Whatsapp contact info?

Question: Is it possible to rename whatsapp contact info? Suppose in my address book, person name is X,now the same name is coming in whatsapp, I want to rename as Y in whatsapp only.
Comment: Whatsapp reads from the contacts in Windows Phones People Hub. If you want a name to appear in a certain way in Whatsapp, it needs to be the same in the People hub.
Comment: Hopefully it can't be done, the whatsapp shows the info which is saved in phone contact it can not be changed only in whatsapp.
Comment: Sorry you cant able do like that in any of the mobiles..Even in Android or iPhone.  The name you have saved in your contact will be the same shown up in whatspp..
Answer: No this is not possible, in any version of WhatsApp, not just the WP one.
Answer: Go to People -> Select contact to change -> Edit and change name . Same name will reflect onto whatsapp contact name.
Comment: doesn't work, those options don't exist

How to rename Whatsapp contact info?


Calculating area of vegetation in raster file?

Question: How do I calculate area of several vegetation types in a raster (.img file type) image. They are color coded. Am using QGIS (1.8.0) and ERDAS 9.2.
Answer: You can open the raster image as a GDALDataset :
poDataset = (GDALDataset *) GDALOpen( pszFilename, GA_ReadOnly );
Then get the raster band containing the color codes with :
GDALRasterBand  *poBand;
poBand = poDataset->GetRasterBand( i ); where "i" represents the raster band id.
Then iterate over the raster band pixels and read each pixel color code value to count the number of pixels for a selected color code.
Knowing the area represented by a single pixel you should be able to calculate the area for all the pixels representing the selected color code.
To read values from a raster band you should use :

CPLErr GDALRasterBand::RasterIO ( GDALRWFlag eRWFlag,
int     nXOff,
int     nYOff,
int     nXSize,
int     nYSize,
void *  pData,
int     nBufXSize,
int     nBufYSize,
GDALDataType    eBufType,
int     nPixelSpace,
int     nLineSpace
)

For a full documentation about the GDAL LIBRARY : http://gdal.org/index.html
GDAL class list : http://gdal.org/annotated.html
Get some help with the GDAL API : http://gdal.org/gdal_tutorial.html
Answer: you can check out Qgis Sextante Toolbox in plugins repository. it has lots of geoprocessing alagorithm in it.

SEXTANTE is a spatial data analysis library and a powerful
  geoprocessing framework.The main aim of SEXTANTE is to provide a
  platform for the easy implementation, deployment and usage of rich
  geoprocessing functionality. It currently contains more than three
  hundred algorithms for both raster and vector data processing, as well
  as tabular data analysis tools.

and there is a good answer for classified vectorizing here from @nhopton. follow his direction to achieve what you want.
Answer: You can do this task with Erdas itself.
Convert the color coded image to vector by using raster to vector option under vector utilities tool. Convert the resulted Arcinfo vector file to shapefile using Import/Export option.
Open the vector file in QGIS. You can see the vector polygons corresponding to the vegetation class are coded as 1, 2, 3 in grid code field of attribute table. Calculate the area by using field calculator.


Web pages on a Screensaver

Question: I'm trying to make my office a bit more professional and I need the employees to check constantly some web pages. Is there a way to have two or three web pages rotating on a screensaver? And also need them to be updated quite often...Any suggestions?
Comment: You are missing OS related information. Also have you tried searching by yourself ? http://stackoverflow.com/a/6680625/3363219
Comment: A screensaver is usually displayed when the computer is not being used... surely, your staff letting their computers go to screensaver when they're at their computer shows a lack of productivity? Additionally, if your staff *are* being productive and are at their desk and not looking at their computer (to allow the screensaver to come on) then they'd not be looking at your screensaver... any solution you find will have minimal impact on productivity. A better solution would be to have, say, some additional screens or a large monitor(s) in the office to permanently show your desired webpages...
Answer: You can look up some free tools for that purpose, such as:
http://www.web-screen-saver.com/download.html
, depends on your OS and hardware.
There are some very good priced tools for that too:
http://www.finalhit.com/downloads/ultra-screen-saver-maker/
Comment: Welcome to Super User. Can you expand your answer a bit? Just pointing to a product doesn't really explain how to accomplish the solution, and it's often viewed as spam. It's better to include some instructions on how to use the product to solve the problem, or at least describe what makes the product a good solution. Good guidance on recommending software here: http://meta.superuser.com/questions/5329/how-do-i-recommend-software-in-my-answers.  Thanks.
Comment: Hi, thanks ;). I've tried to input some more but being new currently prevents me from tagging users, share more than certain amounts of contents etc. I'd like to ask Richard Hall what OS does he have and for some more details, but I cannot comment on his post - still.
Comment: The main thing isn't more recommendations, but more information about the ones you do recommend.  For example, are you a satisfied user or did you just stumbled across them on Google?  Do they do everything described in the question?  What makes these programs particularly good as a solution (vs. any random Google hits)?  If you can: what's the gist of the procedure to set up what's asked in the question?  If screenshots would be helpful, post links to them at a sharing site, like imgur.com, and someone will embed them for you.
Answer: If you are looking for a solution for Mac OS X, we made a product that is exactly what you are looking for: Screensaver Ninja.
If you are looking for a solution for Windows, we are in the process of building it: Screensaver Ninja for Windows

Web pages on a Screensaver


Buying Evil Genius pre-patched

Question: I'm hoping to buy Evil Genius, but I remember there being two patches (official and unoffical), each which only worked with some versions. Does anyone know where I can get a copy that's pre-patched or works with whichever patch is better?
Comment: @Powerlord Can the Steam version be patched?
Comment: Sadly, the Steam version is version 1.0, not the 1.1 official or 1.2 unofficial patch.
Answer: GOG.com's release comes pre-patched to 1.01.  I successfully applied the unofficial patch to it without issue and completed the game with it.
There has been some confusion regarding the GOG.com version actually being 1.01.  However, GOG.com contacted Rebellion who confirmed that it is indeed 1.01.  There are more details on this in the linked thread.
Comment: This is a really old question, but Rebellion outright lied about the Steam version being 1.01, so I doubt that the GOG version is either.  (Oh hey, I said something like this from my old user2974 account too...)
Answer: The Steam version has a patch available through their forums.
*This patch contains the following things:

All the files you would need from both the official US and EU Patch, carefully hand-picked and tested for use in the Steam version (also see: Readme.txt).
Contents of the freely available Bonus CD, which is not included in the Steam version.
Unofficial Patch 1.2, which was originally made for the non-Steam version (also see: Unofficial Patch 1.2.txt).*

Buying Evil Genius pre-patched


Trying to get iOS 4 iPod app on a jail broken iOS 5 iPad without totally downgrading

Question: I'm one of the many haters of the new music app because of its useabiliyt. I have an iPad 2 with iOS 5.1 installed on it. Is there any way to download the old iPod app from iOS 4 onto my current device?
Comment: You might get more interest in your question if you consider accepting any answers of your previous questions...
Comment: Did the answer work? It *probably* will, but I'm a little skeptical, especially because Apple changed the way that iOS organizes its music from iOS 4 to 5.
Answer: Sorry to disappoint you, but there is no way of just getting the Music app from another version of the iOS. If you are so concerned then please try the App store for Music player apps, i have used iAlbums, it has a very nice and slick UI. It uses the default music player's backend to play music, so you won't lose on any features.
If you are ready to do some experiment, then you need to build a custom firmware (cooking a rom) with new iOS and old Music app, non-advisable since you risk bricking the device.
Hope i made some sense.
Answer: Very interesting issue. It MAY be possible, but I don't know. Here's how I would go about trying.

Jailbreak both devices
Install OpenSSH on both devices
Find a SSH client for your computer (I like Cyberduck)
SSH into the iOS 4 device, navigate to /Applications, look for the iPod app (I think in iOS4 it was MobileMusic.app...could be wrong though) and copy it to your computer.
SSH into the iOS 5 device, navigate to /Applications, and copy the Music~iPhone.app to your desktop (just to be safe and back it up)
Delete the Music app from the iOS 5 device
Copy the iOS 4 Music app to the /Applications folder of the iOS 5 device.

Let me know if that works.


Difference between "have done" and "had done"

Question: I want to know the difference between "have done" and "had done". When and where it should be used?
Answer: Have done ---  Have done is a present perfect tense, generally it is used when the action is completed recently/just now.
Had done-- Had done is a past perfect tense, generally refers to something which happened earlier in the past, before another action also occured in the past.
For Example:
We have done the work  --  Here the action completed recently/just now.
My friend offered me an apple in classroom yesterday, but I wasn't hungry because I had just eaten lunch            --  Here the action happened earlier("yesterday"),  and another action ("I had just eaten lunch") also occured in the past.
Answer: "Have (or has) done" can be used as a standalone declarative phrase. ("I have done my homework."), although other phrases can be added ("I have done my homework, so I'm going to visit a friend.")
"Had done" is always used in a multi-phrase construction ("I had done my homework, so I went to visit a friend." or "If he had done his homework, he could have gone to the party.")
Answer: Here is the answer I found on one of English forums:
We have done our homework. present perfect tense. Completed in the very recent past.
We had done our homework, so we were allowed to go to the movies.
past perfect tense. Completed in the past, prior to the simple past "act" of being allowed.
Note that the simple present of "to have," third person singular, is "has."
He has done his homework. The "done" remains in the base form, and does not change.
"Had" is simple past, and does not change for person or number:
He had done his homework, so he was allowed to go to the movies.
Source:
https://www.englishforums.com/English/HadDoneVsHaveDone/xjczc/post.htm
Answer: I "have done" is present perfect while I "had done" is past perfect. What these tell us is when the action was completed (made perfect/perfected).
So, "I have done the thing" tells us, at this present time, that "the thing" is completely done. At this present time the action is complete or perfect. Present Perfect.
On the other hand, "I had done the thing" tells us, that at some time in the past, "the thing" was already completely done. At some past time the action was complete/perfect. Past Perfect.
You can use them like this
Present Perfect: Something you have recently completed or something you did a long time ago or something you used to do, but you don't do any longer.
I have ridden horses in the past. (but I no longer do)
I have baked that cake. (just recently)
Past Perfect Is used when you want to talk about what happened in the past AFTER the event in question.
I had ridden horses, but I was still afraid of them.
I had baked a cake, and it was delicious.
I suppose another way to envisage them is like this.
Historic Past, Past, Present, Future.
I have baked a cake (Past) and it is tasty (Present). Soon it will all be gone. (Future)
I had baked a cake (Historic Past) and it was tasty (Past). But now it's all gone (Present).


Ubuntu not loading after reboot

Question: I installed ubuntu on my hp cs3006tx laptop. After installation was asked to restart. During restart it was asked to remove installation medium and press enter. After doing so I was unable to load ubuntu and was directeed back to windows.
Answer: When the computer start go to the UEFI Boot menu (a key to press on boot depending of your manufacturer) and in the boot place the ubuntu entry before the windows entry.
You need to disable Secure boot and fastboot too.
Comment: I tried doing it after disabling both secure & fast boot and placing ubuntu on top,still ubuntu is not loading and Im directed to windows
Comment: Do you see the ubuntu boot entry in the UEFI menu ?

Ubuntu not loading after reboot


Brightness doesn't change on Dell XPS15 9550 with 16.04

Question: If I try to change screen brightness on my Dell XPS15 with Fn + F11 or Fn + F12 or in the System Settings Dialogue, nothing happens. The bar indicating the screen brightness changes but the screen stays at a constant brightness, except when I turn the brightness off, the screen goes dark. I tried changing the grub settings as indicated here: Unable to change the brightness on my Dell XPS 15 (L502X), but that didn't change anything. Has anyone encountered this problem before and can tell me how to solve it?
Answer: I had the exact same behaviour than you so hopefully this will solve your issue:
In a terminal Ctrl + T type acpi_listen and press alternatively the luminosity up and down keys F11 and F12 you should get and output similar to the one below.
alexisv@SlingBeast-XPS15:~$ acpi_listen
 PNP0C14:02 000000d0 00000000
video/brightnessup BRTUP 00000086 00000000
 PNP0C14:02 000000d0 00000000
video/brightnessup BRTUP 00000086 00000000
 PNP0C14:02 000000d0 00000000
video/brightnessdown BRTDN 00000087 00000000
 PNP0C14:02 000000d0 00000000
video/brightnessdown BRTDN 00000087 00000000

That tells us the BIOS is registering the key presses and forwarding them to the OS correctly.
Now press Ctrl + C to exit from acpi_listen and type lspci, in my case I was looking for the Intel VGA chip PCI id.
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Skylake Integrated Graphics (rev 06)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 07)

Then still in the terminal type:
sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf

The file didn't existed so I created it, paste into the newly created file the following content:
Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"
EndSection

The BusID section should match the "VGA compatible controller:..." ID retrieved previously with lspci. "00:02:0" becomes "PCI:0:2:0"
Save it, log out and restart.
That did for me. Creating the missing X config file got rid of the behaviour you described.
Let me know if it works.
Comment: @user1435514 what if at the first step I only get
`PNP0C14:03 000000d0 00000000`?
Comment: it looks like the action regarding display control is not executed, sometimes there is a switch on laptops called FN to change behavior of the buttons, is it your case or you have single function button to control brightness?
Comment: While this worked for me, it broke steam which now reports "OpenGL GLX extension not supported by display". So I have to remove and add this file if I want to play games or a functioning backlight.


Show that $\mathbb{Z}[x]=\lbrace \sum_{i=0}^{n}{a_ix^i}:a_i \in \mathbb{Z}, n \geq 0 \rbrace$ is not a principal ideal ring.

Question: Show that $\mathbb{Z}[x]=\lbrace \sum_{i=0}^{n}{a_ix^i}:a_i \in \mathbb{Z}, n \geq 0 \rbrace$ is not a principal ideal ring. I know the definition of principal ideal ring is that every ideal is generated by a single element. So my aim here is to find an ideal which is not generated by a single element. But I fail to locate such ideal. Can anyone help me in finding such ideal?
Answer: Hint: What about the ideal $\langle2,x\rangle$?
To answer your comment, a principal ideal is just a "set of multiples" of the generating element. Thus every element of a principal ideal has the generator as a divisor, and usually has similar properties. For example, in $\mathbb{Z}[x]$, the ideal $\langle2\rangle$ is the set of polynomials where every coefficient is even, and $\langle x\rangle$ is the set of polynomials of degree greater than $1$. However, $\langle 2,x\rangle$ is made up of all polynomials with even constant term. It doesn't feel as if polynomials with this property have a shared divisor (If they did, what would it be?) so this ideal feels like it's not principal.
In a way, there are somehow too many restrictions on the elements of the ideal to be generated by a single element. (Degree is greater than one AND constant term is even.) To illustrate the idea of "too many restrictions" further, consider the ideals $I_2=\langle 2,x\rangle$, $I_3=\langle 4,2x,x^2 \rangle$, $I_4=\langle 8,4x,2x^2,x^3\rangle, \dots$ It is a fact (that I recall being reasonably hard to prove) that $I_n$ is generated by $n$ elements and no fewer. This is because of the inrease in the number of restrictions of what elements of $\mathbb{Z}[x]$ can be in each ideal.
Comment: well, what motivates you to think of this ideal ? I mean intuitively, how you know that this ideal is not principal?
Comment: @Idonknow I just updated my answer to address your comment, hope it helps!
Comment: @Idonknow The idea is that there is nothing "in-between" being a constant and being a formal variable. (Constants can only be multiples of other constants, and monic polynomials of degree $\ge1$ cannot be multiples of anything but other monic polynomials of degree $\ge1$.)
Comment: @Idonknow See my answer for one way to motivate the search for a counterexample.
Answer: Alternatively, if $R$ is a PID, then any (non-zero) prime ideal is maximal (i.e. it is dimension $1$). Note that $(x)$ is a prime ideal of $\mathbb{Z}[x]$ which is not maximal--this follows because $\mathbb{Z}[x]/(x)\cong\mathbb{Z}$ is a domain but not a field.
This further shows that if $R[x]$ is a PID, then $R$ is a field. The converse is also true, because $R[x]$ will posses a euclidean function ($\deg$).
Comment: @RagibZaman Yeah, yeah, yeah :)
Comment: *Non-zero* prime ideals :)
Answer: Hint $\ $ A nonzero ideal $\rm\,I\,$ in a PID is generated by any element of $\rm\,I\,$ having the least number of prime factors among all elements of $\rm\,I.\:$ Hence if $\rm\,I\,$ contains nonassociate primes then $\rm\: I = (1)$. Counterexamples abound in $\rm\,R = \Bbb Z[x],\:$ i.e. it is easy to find primes $\rm\:p,q\in R\:$ with $\rm\:(p,q)\ne (1).$


change the order of input fields in billing information

Question: How can I change the order of input fields in billing information page?
I am setting up our store with Magento CE 126.96.36.199.
Comment: what is mean by " change the order of input fields in billing information page"?
Comment: For example i need to have "Email Address" input field before "Company" input field.
Answer: i am going to assume that this is the default code for magento v.126.96.36.199 and that you are using one page checkout. If so, then you can find the code for this Billing Section in frontend>base>default>template>checkout>onepage>billing.phtml
In that file you will find on line 44-57 the code for email and company fields, you just need to switch the block of code i marked below.

Furthermore, i would not suggest doing it on this file as it is very bad practice to edit magento core file, one option would be to create you own theme, copy this file into it and make the changes there(frontend>mypackage>mytheme>template>checkout>onepage>billing.phtml. I am not going to into the details of magento theming here as its a big topic but you can read this article to get a good idea about theming
http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy
http://code.tutsplus.com/tutorials/magento-for-designers-part-3--net-11050
P.S you can easily find more article on google


Did any major epic or puranic character ever die of natural causes like disease or old age?

Question: Did any major Epic (itihasa) or Pauranika character ever die of natural causes like disease or old age?
I have heard of major characters only dying in battles or unnatural deaths due to curses or conspiracies. They lived so long. Never had any problems like cancer, heart attack, stroke, Alzheimer's, or attacked by diseases like malaria, typhoid, dengue (not as a result of a curse, but a mosquito bite for example)?
Comment: there are many.
Answer: Interesting question. The way I would like to respond to this is as follows:

There are many Puranic characters such as for example, Yayati, Devahuti, Dasaratha's queens possibly passed away due to old age. It is hard to ascertain that or provide reference because such incidents are not recorded by the authors / poets. Not sure if you consider Yayati or Devahuti as major characters (which is subjective). King Janamejaya could be another example. King Vichitravirya (half brother of Bhishma) would be an example of a person who died of illness (by some Mahabharata accounts at least, I can't pull the source immediately. Will get back later adding it as a comment)
Disease classifications like Dengue, Multiple Sclerosis etc are modern terms. With what we have today in the way of historical evidence, it is very hard to know if such ailments existed in the historic times (either recorded or unrecorded period, which brings me to the next point).
Puranas and Itihasas, form part of unrecorded part of history. Don't take this to mean they are fiction etc. I am not even going there. I am simply saying the level and quality of evidence sharply declines as we go back in time, and beyond a certain point, things go into the unrecorded period. We only have indirect evidence if at all we use that word. So finer details of how the lives ended for many of the characters is hard to trace (and hence provide a reference)

Adding to this answer, Rg Veda, Mandalam 10, Sukta 163 (yakshma nasanam) addresses various forms of diseases such as tuberculosis etc. Though it does not say which Puranic characters were afflicted with this disease, more to the point of your question, it does enumerate various natural diseases, which could be taken as an indirect evidence that people did suffer from those diseases. And the extension of the thought would lead us to conclude that some characters, did die of natural causes.

FROM both thy nostrils, from thine eyes, from both thine ears and from thy chin,
Forth from thy head and brain and tongue I drive thy malady away.
2 From the neck-tendons and the neck, from the breast-bones and from the spine,
From shoulders, upper, lower arms, I drive thy malady away.
3 From viscera and all within, forth from the rectum, from the heart,
From kidneys, liver, and from spleen, I drive thy malady away.
4 From thighs, from knee-caps, and from heels, and from the forepart of the feet,
From hips from stomach, and from groin I drive thy malady away.
5 From what is voided from within, and from thy hair, and from they nails,
From all thyself from top to toe, I drive thy malady away.
6 From every member, every hair, disease that comes in every joint,
From all thyself, from top to toe, I drive thy malady away.
Comment: it's like asking what lunch did you have 7 years 3 months ago.. it is irrelevant detail that doesn't help your current self. that's why most puranas don't care about recording mundane things. People might say *'but there is a point in recording mundane things, because it will make it more believable*, cos otherwise, rishis might have just made up stories like today's fiction writers. The counter to that is - they could have also made up mundane details. The existence of mundane details, or larger-than-life characters, both can be questioned. However, only one of these is useful. So record that
Comment: Malaria is a very old disease.
Comment: I agree, so are probably many other diseases, albeit they were known by different names, or unknown (unclassified). My point was not that these diseases are new. Rather the classification we have today, and the tests to diagnose might not have existed in the past. If such classifications didn't exist back then, we won't find it in the scriptures or history. If we assume they did exist (though we don't have evidence), then the simple answer is we don't know why we don't find instances of characters with these ailments. Possibly the authors didn't find it worth mentioning - but that's a guess
Answer: I will quote some instances, wherein the major characters of an EPIC died naturally.

Yayati - It was mentioned in Sambhava Parva that Yayati, after installing Puru on the throne, succumbed to the inevitable influence of Time.
King Dhritarashtra - He, along with his Wife Gandhari and Kunti, the wife his brother Pandu obtained death in a forest fire.

Sage Narada says,
Restraining all the senses, he remained like a post of wood. The
  highly blessed Gandhari, and thy mother Pritha too, remained in the
  same attitude. Then thy royal sire was overtaken by the
  forest-conflagration.
Sanjaya, his minister, succeeded in escaping from that conflagration.
  I saw him on the banks of Ganga in the midst of ascetics. Endued with
  great energy and great intelligence, he bade them farewell and then
  started for the mountains of Himavat. Even thus the high-souled Kuru
  king met with his death, and it was even thus that Gandhari and
  Kunti, thy two mothers, also met with death, O monarch.
In course of my wanderings at will, I saw the bodies of that king and
  those two queens, O Bharata. Many ascetics came to that retreat,
  having heard of the end of king Dhritarashtra.
Comment: Death due to forest fire is not natural death.
Comment: @sunyata: You had stated that " . . .or attacked by diseases like malaria, typhoid, dengue (not as a result of a curse, but a mosquito bite for example)?".  So I thought in the list of ". . . for example", death due to fire is included.
Comment: @sunyata: King Dasaratha died of mental anguish as well as curse.  King Santanu died of mental anguish.  If we go through the EPICs we can find some more, but I had restricted myself to 2 examples only.
Answer: Yes, the three wives of King Dashratha (father of god Sri Rama) viz. the Queen Kaushalya, Sumitra & Kaikeyi, died from the natural causes of ageing and senescence.
This is mentioned in the Uttara-Kanda of the Valmiki Ramayana.

Chapter 99, Uttara-Kanda, Valmiki Ramayana

अथ दीर्घस्य कालस्य राममाता यशस्विनी । पुत्रपौत्रैः परिवृता
कालधर्ममुपागमत् ।। ७.९९.१५ ।। अन्वियाय सुमित्रा च कैकेयी च
यशस्विनी । धर्मं कृत्वा बहुविधं त्रिदिवे पर्यवस्थिता ।। ७.९९.१६
।। सर्वाः प्रमुदिताः स्वर्गे राज्ञा दशरथेन च । समागता महाभागाः
सर्वधर्मं च लेभिरे ।। ७.९९.१७ ।।

After many years however, Rama's aged mother, surrounded by her sons and grandsons, passed away and she was followed by Sumitra and
the renowned Kaikeyi, who having performed many righteous acts went
to the celestial region, where those happy Ones were re-united with
Dasaratha and received the fruit of their merit in heaven.

English Translation by Hari Prasad Shastri.


How do shell text editors work?

Question: I'm fairly new at programming, but I've wondered how shell text editors such as vim, emacs, nano, etc are able to control the command-line window.  I'm primarily a Windows programmer, so maybe it's different on *nix.  As far as I know, it's only possible to print text to a console, and ask for input.  How do text editors create a navigable, editable window in a command line environment?
Comment: Making a text editor in Windows Shell: just download the now free visual basic dos 1, you can easily make a edit.com clone with that. -OR- For those who want to make editors in *nix/bsd/osx scenarios: ncurses has a fine method for doing this, using 'pads' to hold the entire document (or to hold the largest amount it can in memory before buffering), this allows you to essentially copy a 'window' of the buffer to screen and even scroll it around, enter text, etc. A good book to read is: Programmer's Guide to NCurses ISBN 978-0470107591 (ncurses is a LOT easier than you may think!)
Answer: By using libraries such as the following which, in turn, use escape character sequences

NAME
       ncurses - CRT screen handling and optimization package

SYNOPSIS
       #include

DESCRIPTION
       The  ncurses library routines give the user a terminal-independent
method of updating character screens with reasonable optimization.  This
implementation is ''new curses'' (ncurses) and is the approved replacement
for 4.4BSD classic curses, which has been discontinued.

[...snip....]

       The ncurses package supports: overall screen, window and pad
manipulation; output to windows and pads; reading terminal input; control
over terminal and curses input and output  options;  environment query
routines; color manipulation; use of soft label keys; terminfo capabilities;
and access to low-level terminal-manipulation routines.
Answer: Short answer: there are libraries for it (like curses, slang).
Longer answer: doing things like jumping around with the cursor or changing colors are done by printing special character sequences (called escape-secquences, because they start with the ESC character).
Answer: Learning about ncurses might be a good starting point.
Answer: There is an old protocol called vt100 based on a "VT100" terminal.  It used codes starting with escape to control cursor position, color, clearing the screen, etc.
It's also how you get colored prompts.
Google VT100 or "terminal escape codes"
edit: I Googled it for you: http://www.termsys.demon.co.uk/vtansi.htm
Answer: You will also notice this if you type "edit" in a Windows command line console. This "feature" is not unique to unix-like systems, though the concepts for manipulating the windows console in that way are quite different to in unix.
Answer: On Unix systems, a console window emulates an ancient serial terminal (usually a VT100).  You can print special control characters and escape sequences to move the cursor around, change colors, and do other special effects.  There are libraries to help handle the details; ncurses is the most popular.
On Windows, the [Win32 Console API](http://msdn.microsoft.com/en-us/library/ms682073(VS.85%29.aspx) provides similar functionality, but in a rather different manner.
Answer: Type "c:\winnt\system32\edit" or "c:\windows\system32\edit" at the command line, and you'll be shown a command line text editor.
People are mostly right about the ESC character being used to control the command screen, but some older programs also write characters directly to the memory space used by the Windows Command Line screen.
In order to control the command line window, you used to have to write your own windowing forms, entry box, menus, etc. You'd also have to wrap all that up in a big loop for handling events.
Answer: More Windows command line specific, the app typically calls DOS or BIOS functions that do the same.  Sometimes ANSI command code support is available, sometimes it isn't (depending on exact MS OS version and whether or not it's configured to load it).

How do shell text editors work?


How can I secure-wipe free space?

Question: Any way that I can securely wipe free internal storage on Android? I am not talking about secure deleting, but just wiping whatever is possible to recover.
Answer: The most reliable method is to manually copy large non-sensitive files (such as Linux images or the LibreOffice Installer Setup File) to the partition that you wish to erase the free space from, delete and repeat it around THREE to FIVE times. Ensure the files you copy fill up the drive as much as possible, i.e. start copying small files when the large ones are too big to fit in the last remaining MB / KB of free space.
If you don't want to mess around finding files to write, you can use a utility called Dummy File Creator: http://www.mynikko.com/dummy/
This will allow you to create files of a specific size containing random data (ensure the Random File Content option is selected).
Comment: I quite like this. might try it.
Answer: There are several apps claiming to help you out with this, see my Secure Wipe app list. They support different sub-sets of actions (e.g. only wiping free space versus "secure deleting files", or only working on SD card) – so make sure to read their descriptions. Secure Eraser might work for your case.
Comment: Yes, I have run them multiple times. Many of those 1600 files(mostly pictures) are partially damaged, but still can be recognizable. They are from deleted gallery items. One strange thing I noticed - none of applications produced low memory warning on device, which makes me think that the file they create to wipe data is not exactly as much big as free space. Unless app can suppress low memory warning. Internal memory(which is only thing my phone has) is consisting of 32GB. Free space is 6GB.
Comment: Nice and detailed list. I tried `Secure Erase with iShredder 3` and `Secure Eraser`. It eliminates most of data, but still a lot of files are recoverable. I am using `DiskDigger Pro` to recover files.
Comment: That's surprising, and not good news. Bad enough if it happens with one of those apps, but two? Did you try some of the others, e.g. *Andro Shredder* or *Disk Sanitizer* as well?
Comment: The result is same. About 1600 files are very well recoverable. However, initially there were about 22000 files.
Comment: OK, so it's "better than nothing" – but far from "working as expected". All those apps claim to securely wipe *all* free space, which they obviously don't manage. Maybe too much space? Tried running them multiple times? Not that I think that will make a difference (unless "free space to wipe" is selected "in random order"). Thanks for testing!
Comment: They might write in chunks, relying on the controller cycling through the "empty blocks" (see [Wear Leveling](https://en.wikipedia.org/wiki/Wear_leveling)). I don't think they address blocks explicitly (which might require root – which these apps AFAIR do not request). Wow, until today I thought "military grade security" (iShredder) was not supposed to have holes a tank can drive through – but now I'm not sure if it didn't rather mean exactly that :)

How can I secure-wipe free space?


What additional uses are there for a food dehydrator?

Question: Recently browsing a certain online website I've discovered the cost of food dehydrators has fallen considerably since they first came to market. Realising that I may incur the wrath of my other half if I purchase yet another "White elephant" kitchen appliance, what are they most useful for in the domestic kitchen? It is clear that they can be used to produce dried fruit, which is then eaten all by itself. Are there any uses beyond that, which may make them more versatile?
Comment: They're great for restoring 1980's Ampex 456 magnetic recording tape. I charge £70 a reel for "tape baking" & can get 4 reels at once in my dehydrator ;) [sorry, joke answer, but true scenario, you can google it.]
Comment: Some air fryers say that they can also work as food dehydrators.  I don't know if you need to get alternate trays or such to use them that way … you might want to check reviews to see how well they can do it, as that might be an alternative to not have an appliance that can only do one thing
Answer: I've got one, and I don't use it much.
Dehydrating food is worth it if you have a surplus of suitable homegrown or cheap local produce, or if you particularly want dehydrated food for some reason (portable snack probably).  If your oven goes cool enough you can dehydrate in that, except the fumes from dehydrating chillies make it worthwhile to do that outside.
Dehydrators are rather bulky, so mine ends up stored in the attic, which is partly why I don't use it often.
Answer: slow, mostly unsupervised liquid reduction with no risk of burning and a big loss of aromas
Answer: We now have the Airfryer/toaster oven/dehydrator.
The dehydrator function is used most often to get the zucchini slices dry enough to make keto lasagna that won't be soupy without having to salt it and deal with the mess and extra work that involves. We have also made some really delicious beef jerky.  Sadly it was too tasty and disappeared very quickly.
For Christmas I dried a large amount of thyme, sage and rosemary that was then blended to a nice powder and mixed with 5lbs of salt for a lovely herb salt. It is perfect with chicken soup. We are needing to do this again as it went over so well.
We are loving the Airfryer/toaster/dehydrator and use it daily. Ours sits on top of the microwave so it doesn't use anymore counter space.  I was successful in talking my boss (nanny/cook) into getting one of these instead of a regular air fryer and he has been very happy.
I hope any of this is helpful.
Answer: i use ours for drying excess herbs and fruit mainly, however a tasty thing you can do is dry veggies to add to casseroles or other slow cooked dishes, as they then absorb the flavours of any stock in said casserole or soup or whatever. we have also made jerky a few times.
Answer: I use mine in patisserie, for making concentrated food puree. I use this concentrate for flavoring different creamy substances such as buttercream, pudding, pannacotta, etc.
The reason I do it is that, if you want your buttercream to have a fruit taste, you cannot simply put the raw fruit in, it has too much water. Jam and other preserves are an option, but they bring in too much sugar, and don't taste like the original. Similarly, cooking out the water at high heat also produces a taste very different from raw. Ideally, one can use freeze-dried fruit powder, but it's difficult to source and very expensive.
The solution I use is to start a fruit leather process, but to inspect it every hour or so and mix-and-spread the fruit mass with a spatula so it doesn't make a skin. I stop when the result is at the desired thickness - still miscible, but with as little water left as possible - and fold it in in my buttercream. This produces lovely aromatic results, and "I used real fruit" bragging rights.
Answer: Long term storage is one reason to dehydrate. There are others…jerky…fruit leather, dried fruit and tomatoes…all not necessarily long term situations. There are other creative culinary applications…dehydrated olives…working with methocel, for example. Is it worthwhile? Only you can answer the question. I use mine 6-8 times a year. Have had it for many years. Just another tool in the toolbox.
Answer: You can make black garlic in a food dehydrator, here's as video from Bon Appetit on it. While it's delicious, it's also really pricey if you buy it from a specialty store - while garlic itself is often dirt cheap. Maybe you can convince your other half that you can finance the purchase by selling black garlic? :)


Can potential energy be the sum of the work done by all forces?

Question: I often see that the total energy of a system is the sum of potential energy+ kinetic energy. Is it always like that? Could I say that the total energy of a system is the sum of the work of all force + kinetic energy? I'm always confuse on which force gives a potential or not... But maybe at the end, it's just the sum of work of each force?
Comment: @Pygmalion Please post answers as answers and not as comments
Comment: Body has energy of movement, that is kinetic energy.  Potential energy is defined as a work of certain (so-called conservative) forces to a body.  So total energy in mechanics is simply the potential energy plus kinetic energy.
Comment: @Pygmalion : why don't w consider the work of the non conservative force in the total energy ?
Comment: Because it turns into other non-mechanical forms of energy (internal energy, heat...)
Answer:
Could I say that the total energy of a system is the sum of the work of all force + kinetic energy ?

It is not useful to do this because the work done by a force is not a state function. What this means is that we cannot define a unique "work done by all forces" of a system based on the state of the system alone. You would have to know how the forces acted on the system in the past, and even then you would have to define a starting time and initial energy of the system to using this method. In other words, the total energy would depend on when we decide to start adding up all of the work that has been done on the system.
The reason we define the total energy as $E=K+U$ is because of how we define these energies and forces to make life easier. I will consider a single particle, but this can be generalized to more complicated systems. We know that the net work on a particle (over some time) determines its change in kinetic energy:
$$W_{net}=\Delta K$$
But we can also express the net work as work done by a sum of work done by conservative and non-conservative forces:
$$W_{net}=W_c+W_{nc}$$
But by definition of conservative forces and their associated potential energies, we know that
$$W_c=-\Delta U$$
Therefore, if we define our total energy as $E=K+U$, then we see that
$$\Delta E=\Delta K+\Delta U=W_{nc}$$
So we find that only non-conservative forces can change what we have defined as total energy. Furthermore, if there are no non-conservative forces acting on the particle, we see that total energy is conserved.
Going back to my first point, we see that our definition $E=K+U$ only depends on the state of the system (typically just the position and velocities of particles). It doesn't depend on the history of the system. Notice how work only determines changes in energy, never actual energy values.

I'm always confuse on which force gives a potential or not

Conservative forces have a potential energy associated with them. Conservative forces are forces that have zero curl, or in other words are forces where the work done by that force does not depend on the path through space the system takes. When this is the case, we can write out a potential energy such that
$$\mathbf F=-\nabla U$$
Or in one dimension
$$F=-\frac{\text d U}{\text d x}$$
Comment: Being relative to starting time is not much worse than simply relative to chosen zero point of energy. And potential energy (and thus total energy) does have this freedom.
Comment: @Ruslan I see what you mean. I'll think about it more and edit my answer tomorrow.
Answer: For a given system the total energy is described as the energy contained in the movement of the components of the system and a potential enery given by the conservative forces that affect the system. Other forces normally make the system either lose or gain energy so those are not accounted for in the system directly (refer to "heat" in thermodynamics) and if you consider relativistic effects you should also account for rest-mass energy with Einstein's equation.
Answer: This question touches on a deep subject with many facets. The other answers already posted represent some of those facets.
I'll briefly mention one more: Noether's theorem. This theorem says that in a model that respects the action principle and that is symmetric under time-shifts, there is automatically a conserved quantity. We call it "energy." In Newtonian mechanics, this energy ends up being a sum of kinetic terms and potential terms. Other models might not have such a natural separation into "kinetic" and "potential" parts, even though they still have a conserved total energy defined via Noether's theorem.
In electrodynamics, the force due to a magnetic field on a moving charged particle is proportional to the particle's speed but perpendicular to its velocity. This force is not the gradient of any potential energy in the more-familiar Newtonian sense, but electrodynamics still has a conserved total energy defined via Noether's theorem. Whether or not we try to separate this into "kinetic" and "potential" terms is a matter of taste and convenience. The total energy is what matters in this context, because the total energy is what's conserved.
This definition based on Noether's theorem is just one of several related-but-different meanings of the word "energy" in physics. It's a deep subject, and the fact that the word is overloaded can make navigating the subject even more challenging.
Answer: It is in fact the work done by all the forces plus some constants. These constants are just formalisms which are of no use in dynamical problems. In fact you don't even need the potential formalisms as long as you make sure to include the work done by those forces separately. In that case the work done on the system would correspond just to the change in kinetic energy of the system. The potential concept is there so that you don't need to integrate the force with x again and again, you can just use a formula. As long as you don't want to lose the sense of causality, I recommend not to use the potential; you can still get the same results by using only kinetic energy but including work by all forces.


Infimum and supremum of the empty set

Question: Let $E$ be an empty set. Then, $\sup(E) = -\infty$ and $\inf(E)=+\infty$. I thought it is only meaningful to talk about $\inf(E)$ and $\sup(E)$ if $E$ is non-empty and bounded?
Thank you.
Comment: What is the question?
Comment: @Did He's asking if the thought what he thought.
Comment: It's because every real number is an upper bound/lower bound as its empty. Of course, in this definition we're using the extended reals.
Comment: @Git Gud: I read this from a textbook on Analysis some time ago( I can't remember the name). Can I see it this way: sup(E) = the least x such that x is greater than or equal to all elements in E. since E is empty, any x would be an upper bound for E, so just choose the least one;  similarly, inf(E) = the greatest x such that x is smaller than or equal to all elements of E. Since E is empty, any x will be a lower bound for E, so just choose the greatest one.
Comment: @Alexy Can you provide more context? Are you considering $E$ as a subset of a strictly larger poset? Is so, what poset is that? Where are you getting this from? I'm guessing it's a definition. It's not possible to prove a definition.
Comment: @AlexyVincenzo That's correct.
Comment: [Related](http://math.stackexchange.com/questions/472532/why-is-the-supremum-of-the-empty-set-infty-and-the-infimum-infty?noredirect=1#comment1017444_472532).
Answer: There might be different preferences to how one should define this. I am not sure that I understand exactly what you are asking, but maybe the following can be helpful.
If we consider subsets of the real numbers, then it is customary to define the infimum of the empty set as being $\infty$. This makes sense since the infimum is the greatest lower bound and every real number is a lower bound. So $\infty$ could be thought of as the greatest such.
The supremum of the empty set is $-\infty$. Again this makes sense since the supremum is the least upper bound. Any real number is an upper bound, so $-\infty$ would be the least.
Note that when talking about supremum and infimum, one has to start with a partially ordered set $(P, \leq)$. That $(P, \leq)$ is partial ordered means that $\leq$ is reflexive, antisymmetric, and transitive.
So let $P = \mathbb{R} \cup \{-\infty, \infty\}$. Define $\leq$ the "obvious way", so that $a\leq \infty$ for all $a\in \mathbb{R}$ and $-\infty \leq a$ for all $a\in \mathbb{R}$.
With this definition you have a partial order and it this setup the infimum and the supremum are as mentioned above. So you don't need non-empty.
Answer: When you say "meaningful" you actually mean to say something "$\sup(E)$ exists". But what does it mean to exist? In the context of the real numbers it means that there exists a real number $r$ such that $r=\sup(E)$.
Of course $\pm\infty$ are not real numbers, but they still contain information for us. When we say that $\sup(E)=+\infty$ then we say that $E$ does not have a supermum in the real numbers, or equivalently for every $r\in\Bbb R$ we can find $e\in E$ such that $r<e$.
So in fact we can extend the definition of $\sup$ and $\inf$ to include $\pm\infty$ as possible values by adding two formal symbols for these "points at infinity".
Now, what was the definition of $\sup(E)$ anyway? It was the least point which is not smaller than any of the points in $E$. That is, $\sup(E)=x\iff\forall r\in E:r\leq x\land\forall z(\forall r\in E(r\leq z)\rightarrow x\leq z)$.
Plug this to the empty set, then $\forall r\in\varnothing$ is vacuously true, so every $r\in\Bbb R$ satisfies this condition. It follows that $-\infty$ also satisfies this condition. Therefore $\sup(\varnothing)=-\infty$.

If grasping this is somewhat difficult, here is an equivalent way of looking at this. Consider only $[0,1]$, and now define $\sup^*$ and $\inf^*$ as before but for subsets of $[0,1]$ and requiring that the $\sup^*$ and $\inf^*$ are from $[0,1]$ as well. What is $\sup^*(\varnothing)$?
Comment: Thanks for your instructive comments! May I know how  $-\infty$ satisfy this condition?
Comment: Alexy, because every number does, so no real number is an upper bound. On the other hand, $-\infty$ is still vacuously larger than all the members of the empty set, but it is smaller than all the other values!
Comment: Hi Asaf, since every real number satisfy this condition, this means every real number is sup(E).( Isn't this contradictory?)  Hence, in order for sup(E) to be unique, we define sup(E) = $-\infty$  ?
Comment: No, I meant to say that every number is an upper bound. The $\sup$ is the least possible value which is still an upper bound.
Answer: Let $\Bbb{R}$ be the set of real numbers with the usual order and let $\overline{\Bbb{R}}=\Bbb{R}\cup\{+\infty;-\infty\}$ with the following rules:$$-\infty< x< +\infty~~\forall x\in\Bbb{R}$$
Let $E=\emptyset$ be a subset of $\overline{\Bbb{R}}$. $U$ is an upper bound of $E$ if: $$\exists U\in\Bbb{R};~x\leq U~~~\forall x\in E$$ and $E$ doesn't have an upper bound in $\Bbb{R}$ if:$$\forall U\in\Bbb{R},~\exists x\in E;~~~x>U$$
which is clearly false since $E$ doesn't contain any element, so $E$ doesn't have an upper bound in $\Bbb{R}$. Let us define $\sup(E)=-\infty$ (you'll see why in a moment).
We have the relation $\sup(A\cup B)=\max\{\sup(A);\ \sup(B)\}$. If $B=\emptyset$, we expect $\sup(A\cup B)$ to be equal to $\sup(A)$ which is only verified if $\sup(\emptyset)=-\infty$
Answer: It seems you are aware of the following:

Fact: For any non-empty set of real numbers $E$ with an upper (lower) bound in $\Bbb R$, there is a least (greatest) upper (lower) bound. We call this $\sup E$ ($\inf E$).

Now, suppose we are given any set $E\subseteq R$. Define $U(E):=\{x\in\Bbb R:\forall y\in E(y\le x)\}$ to be the set of upper bounds of $E$ in $\Bbb R$. Similarly, let $L(E):=\{x\in\Bbb R:\forall y\in E(x\le y)\}$ be the set of lower bounds of $E$. You should be able to show the following:

$U(E)$ is an upward-closed set--that is, if $x\in U(E)$ and $z\in\Bbb R$ with $x\le z,$ then $z\in U(E)$. Likewise, $L(E)$ is downward-closed.
The only upward-closed subsets of $\Bbb R$ are $\emptyset,$ $\Bbb R,$ and the sets of the form $(a,\rightarrow):=\{x\in\Bbb R:a<x\}$ and $[a,\rightarrow):=\{x\in\Bbb R:a\le x\}$ for $a\in\Bbb R$. Similarly, the downward-closed subsets of $\Bbb R$ are $\emptyset,$ $\Bbb R,$ and the sets $(\leftarrow,b):=\{x\in\Bbb R:x<b\}$ and $(\leftarrow,b]:=\{x\in\Bbb R:x\le b\}.$
$\Bbb R$ is the only upward-closed (downward-closed) subset of reals that is unbounded below (above).
$E=\emptyset$ if and only if $U(E)=L(E)=\Bbb R.$

Now we can see the following:

Fact (rephrased): For any non-empty set of real numbers $E,$ either $U(E)$ is empty--meaning that $E$ has no upper bound in $\Bbb R$--or $U(E)$ has a least element--meaning that $U(E)=[a,\rightarrow)$ for some $a\in\Bbb R.$ This $a$ is uniquely determined by $E$, and we call it $\sup E$. Likewise, for any non-empty set of real numbers $E,$ either $L(E)$ is empty or $L(E)=(\leftarrow,b]$ for some unique $b\in\Bbb R$, which we call $\inf E$.

In the case that $E=\emptyset$, we have $U(E)=\Bbb R,$ which has no least element, so we can't say that there is any real number that we call $\sup E$ in this case. Accordingly, "$\sup E=-\infty$" should be interpreted (using my notation) to mean that $U(E)$ is unbounded below, which (by the discussion in the bullet points) is just another way of saying that $E$ is empty. Likewise, "$\inf E=+\infty$" means that $L(E)$ is unbounded above, just another way of saying that $E$ is empty.
Finally, note that if $E$ is non-empty and bounded above, then $\sup E=\inf U(E)$. In this light, we should interpret "$\sup E=+\infty$" in the same way as "$\inf U(E)=+\infty$," meaning $U(E)$ is empty (see previous paragraph), meaning that $E$ is unbounded above. Similarly, we should interpret "$\inf E=-\infty$" as saying that $E$ is unbounded below. These conventions are usually easier to grasp/swallow than that "$\sup E=-\infty$" and "$\inf E=+\infty$" both mean "$E=\emptyset$"--at least, that has been my experience--and I know you didn't directly ask about them, but I felt they were worth mentioning for elucidation.
Answer: If $A\subset B\subset \mathbb R$, then lower bound of $B\leq $ lower bound of $A\leq$ upper bound of $B$, and lower bound of $B\leq$ the upper bound of $A\leq$ upper bound of $B$.
Now, consider  $p\in \mathbb Z$, where  $\mathbb Z$ is the set of +ve and -ve integers. Since $\emptyset \subset \{p\}$, so  lower bound of $\{p\}\leq$ lower bound of $\emptyset\leq$  upper bound of $\{p\}$, i.e. a lower bound of $\emptyset$ is $p\in \mathbb Z$. Hence, the greatest lower bound of $\emptyset$ is $\infty$.
Similarly, the least upper bound of $\emptyset$ is $-\infty$.
Notice that, $\emptyset$ has a nice/absurd property that it is a subset of any set, so it runs over the real line and so its upper and lower bound also run over the real line. While a nonempty set is fixed in its place, so it becomes unable to play such a game what $\emptyset$ plays.
Answer: We can prove it by contradiction. Let $S = \varnothing$ be the empty set and let $S$ does not have any upper bound i.e. there exists no real number $M$ such that $M$ is greater than or equal to every $x \in S$, which implies there exist at least one element $x \in S$ such that $x > M$, which is a contradiction since $S$ is an empty set and has no elements.
Similarly if $S$ does not have any lower bound then there exist no real number $m$ which is smaller than or equal to every element of $S$, implies there exist at least one element $x \in S$ such that $x < m$, again a contradiction since $S$ is an empty set and has no elements.
Hence our assumption is wrong and $S$ has both upper and lower bounds in fact every real number is an upper bound and every real number is a lower bound of an empty set $S$.
But an empty set has no least upper bound since we don't have any smallest real number, similarly an empty set has no greatest lower bound since there exists no greatest real number.

Infimum and supremum of the empty set


How does drag change efficient cruise conditions?

Question: If I have an aircraft, and I reduce the induced drag produced by it, does this mean I should operate it at a higher altitude and faster speed to take advantage of the drop in total drag, or slower at lower altitude to take advantage of the lower green dot drag?
Comment: It depends on the numbers. "reduce the induced drag" is vague. And we know nothing about the engines (altitude matter). What about same altitude, same speed, less fuel consumption? Try with real numbers.
Comment: @sophit [What is an airliner's "green dot speed", and how does it vary with weight, and why?](https://aviation.stackexchange.com/questions/75215/what-is-an-airliners-green-dot-speed-and-how-does-it-vary-with-weight-and-w)
Comment: @Bianfable: thanks, never heard about it
Comment: Would it be accurate to say that you specifically mean you reduced the *coefficient* of induced drag?
Comment: Thanks people! This is all extremely helpful and really useful!
Answer: The easiest way to reduce induced drag in an aircraft is to make it lighter.  However, I'll assume you're talking about design / configuration changes, not operational ones.
If the drag polar has the simple form:
$C_D=C_{D,0}+\frac{C_L}{\pi\,e\,AR}$
We can talk about the balance of induced and parasite drag.
If you change the balance such that induced drag coefficient goes down (say by improving $e$), you'll need to fly at higher lift coefficient to achieve best L/D.
$C_L=\frac{W}{q\S}$
$q=0.5\,\rho\,V^2$
So, if wing loading stays the same, to fly at higher $C_L$, you want to fly at lower $q$.  This requires flying at lower speed or higher altitude.  You probably want to maintain your cruise Mach number, so you'll fly at higher altitude.
This helps explain why the Global Hawk flies where it does.
Comment: Thank you, very helpful!
Answer: We use the usual approximation that the drag coefficient for the entire airplane can be expressed via the well known:
$C_d=C_{d_0}+kC²_l$
The first term represents the "parasite drag" while the second term is the "induced drag".
Equating the power requested to win that drag $C_d$ with the power available from the engine(s), the results of the following table are obtained:

Speed best range
Speed best loiter

Propeller
$\sqrt{\frac{2W}{\rho S}\sqrt{\frac{K}{C_{d_0}}}}$
$\sqrt{\frac{2W}{\rho S}\sqrt{\frac{K}{3C_{d_0}}}}$

Jet
$\sqrt{\frac{2W}{\rho S}\sqrt{\frac{3K}{C_{d_0}}}}$
$\sqrt{\frac{2W}{\rho S}\sqrt{\frac{K}{C_{d_0}}}}$

Being $K$ at the numerator, all the rest being the same a reduction in the induced drag always implies a reduction of the optimal speed (of whatever you'd like to optimise, either range or loiter).
If you want to compensate for this reduction and increase again the optimal speed, then you have either to fly at a lower density $\rho$ (i.e. higher altitude) and/or increase the wing loading $W/S$ and/or reduce the parasite drag $C_{d_0}$ as well.
Comment: The other assumptions commonly left out for these 'best' conditions include: fuel consumption (BSFC or TSFC), propeller efficiency, and drag polar all constant with flight condition -- airspeed / Mach, altitude, throttle.  In reality, none of these things are true.  In practice, they are close enough as long as you're careful.

The variation of max L/D with Mach number sets the cruise speed for a transport.

The variation of TSFC with altitude TSFC=TSFC$_0\sqrt{\theta}$ drives transports to want to cruise at the Tropopause (11km, 36,089ft).
Comment: @RobMcDonald: well, there are other simplification too other than what you've listed (a real polar has three terms at least; the weight changes during the flight; and so on). Anyway those simplified equations are enough to grasp the basic behaviour of an airplane in terms of speed optimisation. And... this is not Journal of Fluid Dynamics  Thanks anyway for you comment, which applies equally well to your own answer
Comment: That is why I left my answer at CL and best L/D.  I was trying to stray away from the specificity that leads to needing the rest of the complexity.

Weight change during flight is captured by your equations, you aren't ignoring anything there.

The simplicity of the drag polar was clearly stated.  The fact that you're solving for a best speed -- using information that in reality varies with Mach number is a hidden nuance.
Comment: @RobMcDonald: if it's ok for you I'll expand my answer with you suggestions
Comment: By all means, go ahead.
Comment: Thanks people!!
Answer: You may notice airliners are designed to have their Vbg (best glide) very close to their desired cruising indicated airspeeds.
It is better to go high, because at higher flight altitudes True Airspeed is greater then Indicated Airspeed.
This means the plane goes farther for the same amount of "push".
All well and good until True Airspeed gets too close to Mach 1, the speed of sound.  Then drag begins to rise.
So you want to fly "Green dot" indicated as high as you can until Mach number increases to the point where fuel economy is lost.
Subsonic airliners use swept, supercritical wings to get as close as they can to Mach 1 economically.
Comment: Thank you, although most airliners are not operated at green dot but faster, since their total fuel consumption is lower over a given DISTANCE if you fly faster.
Comment: @AlastairWyllie lowest fuel consumption per distance is at **Vbg indicated**.  Airliners indeed fly faster **True Air Speed** at higher altitudes up to Mach limits, but for best fuel economy they want to be around Vbg **indicated**, just like gliders.


Geotools create shapefile in memory

Question: Is it possible to convert between shapefile and geojson using geotools without access to file system? I have that restriction in my web app, but I need to create shapefile as byte array and then do something with that. Unfortunately I only found a way where I need to specify new data store based on file path.
Answer: Despite its nice sounding name a "shapefile" is not a single file but a whole bunch (at least 3 probably not more than 10) of related files which share a common base name. This is why GeoTools requires a URL pointing to the base file (x.shp) and then picks up the other files it needs based on that location.
If you are building your shapefile in memory why not just build a FeatureCollection and then dump that out as GeoJSON (or any other supported DataStore)
Note: You will need to be working on master for the GeoJSON store as I haven't backported it (no demand yet).
Update based on comment
With some luck you can access a zipped shapefile using something like this:
URL zip = DataUtilities.fileToURL(new File("../../data/coast.zip"));
URL shape = new URL("jar:"+zip+"!/110m_coastline.shp");
Map<String, URL> params = new HashMap<>();
params.put("url", shape);
DataStore ds = DataStoreFinder.getDataStore(params );
String name = ds.getTypeNames()[0];
SimpleFeatureSource source = ds.getFeatureSource(name);
System.out.println(name+" has "+source.getCount(Query.ALL)+" features");

It's left as an exercise for the reader as to how you determine the contents of the zip file, but I guess you can do it using the Zip classes in java.util.
Comment: The thing is that I need to implement shapefile export/import functionality. User will upload zip file that needs to be exported as geojson, or user will click export and then I need to create shapefile from the geospatial data from the database and then return the zip file
Comment: see if the updated code helps
Comment: but it again seems to be accessing the file system? I have a restriction to not use the file system and to not operate with local files. I should only use ram memory
Comment: that is just because that is where my file lives, you must have some reference to the zip file somewhere. Anyway this is wandering off topic.

Geotools create shapefile in memory


How do the public 21 BP's nodes prevent DDOS attacks?

Question: There are 21 BP nodes, how do they prevent DDOS attacks that knock them offline by sending massive amounts of traffic to these public ips?
Answer: We hope they are paid well, perhaps when the EOS toke price picks up like 10x, to maintain high-end DDOS mitigation infrastructure.
Assuming geographic redundancy and cloud-level diversity, it is possible to have a very strong resistance towards massive DDOS attacks.  However, if most of our BPs are concentrated on AWS or Google Cloud or God forbid the Microsoft one (sorry could not resist), then your concerns are extremely valid.
Having geographic data-center redundancy, ASN number ownership, and a bunch of hackers on the staff would be a good starting point for many of the BPs.
Comment: The question also is: can the replacement of attacked/down BPs with stand-by BPs or votes work seamless if the network is under attack. That's also why bare metal should be used instead of cloud providers running the EOS.IO software...


Why is "New Incognito Window" disabled in Chrome?

Question: I'm trying to use an incognito window so that I can test have a clean slate on cookies without restarting my browser.  Unfortunately, incognito windows are disabled for some reason.  Does anyone know why that is?  I'm on Windows 7 using Chrome 18.0.1025.168 m.
Answer: Simply add the following dword entry in the registry as this link describes:
Windows registry location:
Software\Policies\Google\Chrome\IncognitoModeAvailability
Supported on:
Google Chrome (Linux, Mac, Windows) since version 14
Google Chrome OS (Google Chrome OS) since version 0.14

Description:
Specifies whether the user may open pages in Incognito mode in Google Chrome. If 'Enabled' is selected, pages may be opened in Incognito mode. If 'Disabled' is selected, pages may not be opened in Incognito mode. If 'Forced' is selected, pages may be opened ONLY in Incognito mode.
0 = Incognito mode available.
1 = Incognito mode disabled.
2 = Incognito mode forced.

If this is a work system, then the creation and maintenance of this key (and in turn the availability of the option) may be under the control of your network admin.
Comment: Ahh, it must be disabled on my work system.  That's too bad since it hinders my development.  +1 for the info, thanks!
Answer: @ukanth way is right and to save-up some more time you can copy the below text and save it in a text file and rename it to some_name.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"IncognitoModeAvailability"=dword:00000000

Later you can double click this file to enable incognito mode.
(Tested and working fine in Windows 10)
Answer: How To Enable Incognito Mode In Windows
First, open the registry editor:
Open the Start menu
In the search box, type "regedit"
A program called regedit.exe will appear, click on this
If a warning comes up click Yes
Next, navigate to the Policies key:
Start by double clicking on "Computer"
Then, double click on "HKEY_LOCAL_MACHINE"
Next, double click on "SOFTWARE"
Finally, double click on "Policies"
Next, create a new entry called IncognitoModeAvailability:
Right-click on "Policies" and select New >> Key
Enter "Google" (without the quotes) as the name of the key
Right-click on "Google" and select New >> Key
Enter "Chrome" (without the quotes) as the name of the key
Right-click on "Chrome" and select New >> DWORD (32-bit) Value
Enter "IncognitoModeAvailability" (without the quotes) as the name
Right-click on "IncognitoModeAvailability" and select "Modify..."
Type a 0 in the "Value Data" text box
Comment: Please read the question again carefully. Your answer does **not** answer the original question. OP already has Incognito disabled. Has wants to enable it. The accepted answer show how to do this.


Suffering siblings abuse

Question: Is there somebody who can help me. I am really going through a hard phase both financially and emotionally
My sister has made my life a living hell
She always fights with me and God forbid if i say something in my defense she makes a big issue out of it. Slandering my character has become her favourite hobby and not to mention the physical abuse she does with me. Few months back she slapped me on my face  and kicked me in the belly. I cannot forget that trauma to this day. Plz help me i am so scared adn after all this she stops talking with me as if i have done something wrong with her. For sometime i think it's good she stopped talking because i want to maintain a distance for now because wallahi right from childhood she has made my life miserable. Not only she fights with me she fights with our parents and other siblings also and I don't know why she becomes so violent and starts hitting even parents
Please help me
Answer: I'm so sorry for what is happening. I don't have the best advice as I am stuck with toxic siblings too but thats why I wanted to send you a messege to let you know you're not alone.
InShaAllah your relief and happiness is coming very soon. Make Dua to Allah swt he will resolve everything. Ask him in Tahajjud. Until then I know it can be hard and confusing. Physical abuse is especially not okay, you can certainly report her if the abuse endangers you.
Also whereever you live search for a local free therapy service. Sometimes toxic family members can make you feel worthless and the cause of everything but as soon as you speak with people outside of the situation you will gain clarity and confidence in your sanity. And the emotional, mental and physical toll of your situation the therapist may help. If you cant find a therapist book a doctors appointment and ask for any kind of help.
May Allah swt help you swiftly Ameen!

Suffering siblings abuse


Do monsters give back all money they steal?

Question: If an enemy picks up 5 gold in expert mode, will it give back 5 gold or some fraction of that?
Answer: They will drop the entire amount collected (75% of your total gets dropped in expert mode), however it's extremely hard to find the same enemy again as it will probably despawn, unless it was very close to your player spawn. If it indeed despawns, the coins are lost forever.
The enemy holding your coins will be the one with a sparkly effect.
Comment: If you meant that 75% gets dropped on player death, you might want to specify that, as it looks like you mean monsters drop 100% of their stolen money in normal, but only 75% in expert.