Linux(Ubuntu) Terminal-how to view previous pages not visible anymore

Question: When you scroll up, say to see a log, the first portion of it will not be visible since the terminal only supports a limited no. of lines. So if you want to scroll up and be able to see everything, at least a few pages up, how do you do it?
Comment: Since you mention Ubuntu: do you mean the 'bare' terminals or a GUI terminal like in Gnome?
Answer: Use Shift+Page Up and Shift+Page Down.
Comment: Ah, you must mean to go the terminal program, click "Edit/Profile Preferences/Scrolling/Scrollback/Unlimited" radio box.
Comment: My impression of the original post was that the scrolling you're describing didn't go far enough.  Which it usually doesn't, in my experience.
Answer: Piping the output to a pager like the following is a better choice:
command | less

command | more

Answer: You can enable unlimited scroll back (or a huge amount if you want).
To do this, go to

File → Profile preferences → Scrolling [tab]

Then, check Unlimited, or set the number of lines desired. And of course, it only applies to the next typed lines.
Answer: Some tricks I use-
some terminal applications (gnome-terminal) allow you to increase the scroll-back buffer size
pipe output to a file:
command > file.log

pipe your command to less:
command | less

tail log and pipe to grep to reduce output
tail -f example.log | grep 'search text'

Comment: command > file.log is a good solution. You can then use "more file.log" command to have a global view of your file.
Answer: An alternative to screen is using tee to copy all output to a file while still printing it on the terminal:
yourcommand | tee output.txt

Answer: Try using the screen command, and set its scrollback buffer to a larger size.
screen has many other benefits and wonderful features.
If all you're doing is looking at a log, you could alternately use a pager such as less
Answer: If you want to scroll line by line, you can use

Control+Shift+Up/Down Arrows.
Comment: To be exact, that's for `gnome-terminal` :}
Answer: If you are using gnome-term (the default), then you can change your settings.  Either set the no. of lines to unlimited, or to a much larger buffer size than the default.
Answer: Essentially seconding to @zerick's solution but if you're on gnome-terminal you can modify its config. See this.
Answer: If you are in tmux (can create multiple terminal sessions in a single terminal session, highly recommended), you can easily use your normal navigation keys to scroll around after you do Ctrl-b then [, for more details let's take a look at: How do I scroll in tmux?
Comment: Answers containing pretty much only a link are not recommended.
Comment: @Steve Smith, I hope now it will be better. Sorry, that is my first try to answer a question:)
Answer: None of these answer the original question.  All answers are how to make new terminal windows (or current one) start behaving a certain way.  The question is about how to see whats already scrolled away.
To answer this, each terminal session should have it's own "history" file (not to be confused with what command history is) containing all the stuff that relates to stdin/stdout displayed.  I could be wrong but this may be different depending on the terminal emulator you use. Some just trash it when you close the window/ end the session.
I am trying to get this figured out myself so here is the more direct answer in a different thread.
https://unix.stackexchange.com/questions/145050/what-exactly-is-scrollback-and-scrollback-buffer
From what this tells me, I suspect best advice you can get is, for whatever terminal emulator you use, look for where it stores the scrollback buffer and that might be your only hope.  It's what I am going to try right now. (and that is IF the session is currently still open, not closed terminal windows)


Usb stick does not mount automatically

Question: Currently, I can not use any usb stick or external hard disk in Ubuntu 12.04 via graphics user interface. While trying to mount them manually, I realized that they are actually mounted automatically at /media/usb0,usb1 etc. However, I can't use the file manager to do something on the usb. I want to use file manager to copy, cut etc. In addition, while the usb is being mounted automatically, it's symbol does not appear on the left menu (dash home) which prevents me to safely remove the usb easily.
How will be really thankful if somebody help me on this please?
Regards.
Answer: Run:
dmesg

to find what name your device has, something like /dev/sdb1 or so.
Then mount it with (media/usb0 exists):
mount -t auto /dev/sdb1 /media/usb0 && ls /media/usb0

Comment: Dear David,I have updated the original post, and will be glad if you look at it again.

Usb stick does not mount automatically


Vim creating files

Question: Is there any setting for vimrc that changes the permissions that it sets on the file if it's creating a file? For example, if I create a file now it's 664, but I would like it to default to 755. Anyone know of the setting that I can put in the vimrc to do so?
Answer: You can't do it in your .vimrc, but if you set your umask properly in the environment where Vim is launched, you can (mostly) accomplish what you want.  See Wikipedia's umask article.
Umask will not default to executable on files (unless the program creating the file asks for execute permission on creation), but it will on directories. However, even if you could, jjlin is correct, you should never default to executable on files; change it only on an as-needed basis.  This is easily achieved by doing something like ":!chmod a+x %" from within Vim.
Answer: Files should not default to being executable, so even if vim had such a feature, you shouldn't be using it. Set the executable bit on a case-by-case basis.
Answer: As already pointed out, you should not ever create files with the executable bit set by default. The standard mechanism for setting so called file creation masks, is controlled by umask. The umask command can be used to view and set these values for the current environment. However, you'll only be needing to set the executable bit on your files whenever this really is necessary - when writing scripts and such. So you'd be better off creating i.e. a bash wrappy function for doing exactly what you want:
vimx() { vim "$@" && chmod +x "$@"; };

Stick this in your ~/.bashrc file and run source ~/.bashrc. Now, whenever you run vimx the file will be saved with the executable bit set.
If you just want a test run on an opened file (without +x permissions) you can simply run the following command from inside vim to test your script (here bash script):
:!bash %

Comment: `vimx() { touch "$@" ; chmod +x "$@" ; vim "$@" ; }`
Comment: Or `vimx() { echo '#!/' >> "$1" ; chmod +x "$1" ; vim "$1" ; }`
Answer: As others have written, you shouldn't just set execute permission on every file you write. On the other hand, if you are creating a new file in some scripting language, you presumably want to execute it, so why not save yourself a few keystrokes.
To automatically make new shell scripts executable by you, put the following in your ~/.vim/after/ftplugin/sh.vim file.

au BufWriteCmd <buffer> call s:BufWrite(expand("<afile>"))

function s:BufWrite(file)
    if v:cmdbang == 1
        let bang = "!"
    else
        let bang = ""
    endif

    if glob(a:file) != ""
        exe 'w'.bang a:file
    else
        try
            exe 'w'.bang a:file
        finally
            exe '!chmod u+x' a:file
        endtry
    endif
endfunction

Answer: If you are interested in making newly created Unix-style #! scripts files executable when you first save them, then you might find Tim Pope's vim-eunuch plugin useful. It includes some (undocumented†) "autocommands" that will do a chmod +x on a new file whose first line starts with #! (e.g. #!/bin/sh) immediately after saving it for the first time.
† Undocumented in the sense that they are not mentioned in the README file.

Vim creating files


AirPort Extreme won't turn on after power outage

Question: So, we had a short power bump the other night and now I cannot get my AirPort Extreme to come back on.  I have completely unplugged it and tried the reset button with no luck.  This happened months ago as well, the difference was that after three days of being unplugged- when I plugged it back in it did come on and eventually reset. I'm at a loss and very frustrated- help!
Comment: I have the same problem
Answer: As there is no power switch or external fuse on the airport line of hardware, the absence of any lights when you plug it in means that the hardware is failed.
If you have AppleCare on the computer it might cover that airport so definitely check that if you have a covered computer. If not, the repair cost for an airport is generally not much less than a refurbished or new router. Since there's not much that even a technician can repair inside an airport once they die, you're probably looking at having to spend some money to replace the unit.
Answer: This sounds suspiciously like a hardware fault. If you are in an area with a Genius Bar or an authorized Apple repair centre, I would take the unit in for testing/diagnosis. As these are always-on devices, they should be able to sustain brownouts and outages without issue.


I'm a practicing Roman Catholic, but considering attending a Greek Orthodox church instead of our local RC church. Will I be welcomed?

Question: I am Roman Catholic, but am considering attending an (Greek)Eastern Orthodox Church on Sundays instead of my local RC Church. Will I be able to receive communion? What differences should I expect? I understand that the Divine Liturgy is different from Catholic "mass", but as I read about the reasons for the split back in 1054 I have recently realized that I tend to lean toward the Orthodox beliefs.
Comment: Have you considered speaking to the clergy at that church in person about this?
Comment: Welcome to Christianity.SE. For a quick overview, please take the [Site Tour](http://christianity.stackexchange.com/tour). For more on what this site is all about, see: [How we are different than other sites](http://meta.christianity.stackexchange.com/q/1808/20394).
Comment: These questions are certainly on topic: "Will I be able to receive communion? What differences should I expect?" But "Will I be welcomed?" is off topic and subjective. You would need to speak with the priest of a specific parish.
Answer: I cannot speak for whether the Orthodox will welcome you or not, although I'm fairly sure they'll push for you to convert, that is, formally leave the Catholic Church and join the Orthodox one; depending on the Church, they might even not recognize your baptism as valid and thus require you to be baptized again, though most will allow conversion through chrismation.
Regarding the Catholic Church, however, Canon 844 forbids Catholic faithful to receive Eucharist from non-Catholic ministers except in emergencies:

Can.  844 §1. Catholic ministers administer the sacraments licitly to Catholic members of the Christian faithful alone, who likewise receive them licitly from Catholic ministers alone, without prejudice to the prescripts of §§2, 3, and 4 of this canon, and can. 861, §2.
§2. Whenever necessity requires it or true spiritual advantage suggests it, and provided that danger of error or of indifferentism is avoided, the Christian faithful for whom it is physically or morally impossible to approach a Catholic minister are permitted to receive the sacraments of penance, Eucharist, and anointing of the sick from non-Catholic ministers in whose Churches these sacraments are valid.
§3. Catholic ministers administer the sacraments of penance, Eucharist, and anointing of the sick licitly to members of Eastern Churches which do not have full communion with the Catholic Church if they seek such on their own accord and are properly disposed. This is also valid for members of other Churches which in the judgment of the Apostolic See are in the same condition in regard to the sacraments as these Eastern Churches.
§4. If the danger of death is present or if, in the judgment of the diocesan bishop or conference of bishops, some other grave necessity urges it, Catholic ministers administer these same sacraments licitly also to other Christians not having full communion with the Catholic Church, who cannot approach a minister of their own community and who seek such on their own accord, provided that they manifest Catholic faith in respect to these sacraments and are properly disposed.
§5. For the cases mentioned in §§2, 3, and 4, the diocesan bishop or conference of bishops is not to issue general norms except after consultation at least with the local competent authority of the interested non-Catholic Church or community.

So, if you're somewhere there are no Catholic priests, and you understand that it is better for you as a Catholic to receive the Eucharist from a Catholic priest (even if Eastern) rather than a non-Catholic one, you may go receive it from an Orthodox or Old Catholic or some other kind of non-Catholic priest with a valid Apostolic Succession and Eucharistic prayer.  It doesn't seem to be the case with you, though; so I would recommend looking for an Eastern Catholic parish near your home, where you may participate in Byzantine (or Antiochene, or Alexandrian) Divine Liturgy and remain in the Barque of Peter.
One more point, raised by AthanasiusOfAlex in the comments, is that Divine Liturgy at an Orthodox Church also does not fulfill Sunday obligation (save in the case of some very small Eastern Churches where the Church in question and her Orthodox sister have formally agreed to share priests).
The relevant Canon is 1248:

Can.  1248 §1. A person who assists at a Mass celebrated anywhere in a Catholic rite either on the feast day itself or in the evening of the preceding day satisfies the obligation of participating in the Mass.
§2. If participation in the eucharistic celebration becomes impossible because of the absence of a sacred minister or for another grave cause, it is strongly recommended that the faithful take part in a liturgy of the word if such a liturgy is celebrated in a parish church or other sacred place according to the prescripts of the diocesan bishop or that they devote themselves to prayer for a suitable time alone, as a family, or, as the occasion permits, in groups of families.

Again, all these issues do magically solve themselves if you manage to find an Eastern Rite parish somewhere you can attend; then you may attend Divine Liturgy there and never worry about violating any Canons, or worse, receiving Communion illicitly or invalidly.
Comment: So, the problem is not so much that the O.P. can't receive Communion (although this should not be done on a habitual basis, except under very exceptional cases), but that the Sunday precept is not fulfilled.
Comment: @KorvinStarmast: in page 19, Father Dragas writes: _"... The decision for the employment of the one_ [akribeia], _or the other_ [oikonomia], _rests with the Church
of each time..."_ So the answer is clearly that individual bishops may claim one or the other.
Comment: You might want to add: attending a Greek Orthodox divine liturgy would not fulfill the Sunday obligation. See "[Sunday Precept and the Orthodox Divine Liturgy](https://zenit.org/articles/sunday-precept-and-the-orthodox-divine-liturgy/)." On the other hand,  Byzantine Catholic divine liturgy would.
Comment: @AthanasiusOfAlex: Thanks for the tip! I've added some text based on your comments and the source you linked to; please tell me if I misrepresented something.
Answer: You will not be able to receive the Eucharist at the Orthodox Church until you have been Chrismated as an Orthodox.  But you will certainly be welcome (at least in my experience).  You could even ask around at the Church regarding classes...I know at mine they hold classes for inquirers and Catechumens (those looking to become Orthodox) during certain times of the year, so you can learn more about the Orthodox beliefs and traditions and how they differ from those of the Catholic church that way.
As far as the differences between Orthodox Liturgy vs Catholic Mass, though, I am not familiar with Mass so I don't have a specific answer for that.  Having gone to a mass once a long time ago the bit I remember is they actually aren't THAT different in that they are both liturgical - you will probably have a much easier time transitioning to Orthodoxy than I did coming from the evangelical church!


Using dpkg for package info

Question: I'm trying to use dpkg tool to list which packages are installed on my machine. Using the -l option it reports "un" for some packages which means unknown, "not-installed". Does "not-installed" flag means that there is such a package, it is available for the system I'm running at but it's not present on my machine (locally) and I have to download the .deb file from the web and install it?
Answer: I'll address the underlying question first:
dpkg -l | grep '^.i'

will list all installed packages. Other tools can provide this information too; for example
apt list --installed

In dpkg -l's output, "not-installed" does indeed mean that dpkg is aware of a package's existence, even though it's not installed on your system. The package file itself might be available on your system, for example in the APT cache in /var/cache/apt/archives, but dpkg's doesn't know that. From dpkg's perspective, as you say, you'd have to download the package file, or obtain it in some other way, and install it.
Answer: dpkg print un (unknown) because its database isn't updated. You can use the sync-available from dctrl-tools package to synchronize dpkg info with apt.
sudo apt install dctrl-tools
sudo sync-available

man sync-available :
 sync-available - sync dpkg's available database with apt's database

DESCRIPTION
This program updates the dpkg(8) available database with the data in the apt(8)
package database. This is required for grep-available(1) and other similar
programs to give up-to-date results.

Using dpkg for package info


check How many Time Document is view from SharePoint Document Library

Question: In custom web part how to check how many Time Document is view from SharePoint Document Library.
Answer: You need to enable auditing for tracking and reporting on Document views. It's possible using the Audit Logging feature in SP:

Configuring Audit Logging: http://office.microsoft.com/en-us/sharepoint-help/configure-audit-settings-for-a-site-collection-HA102866204.aspx?CTT=5&origin=HA102772739
View Audit Log Reports: http://office.microsoft.com/en-us/sharepoint-help/view-audit-log-reports-HA102772739.aspx
Find the most visited sites in SharePoint: https://www.lepide.com/how-to/track-most-visited-sites-in-sharepoint-2013.html


Database agnostic jdbc table import/export to files?

Question: Is it at all possible to do database-agnostic table dumps/hydrates? I don't have any complicated constraints. I would also settle for db-specific ways, but the more pure jdbc it is the better (I don't want to resort to impdp/expdp).
Answer: Have a look at DBUnit.  DBUnit support exporting to a xml file, and importing from a xml file.  Their faq has some advice on how to make the export / imports fast, be sure to check that out.
Answer: DBUnit looks good, however you probably are not going to beat the vendor tools for import/export. If you are going to be importing or exporting 100,000+ rows it's probably best to use impdp/expdp.
I've also done strange things like building an insert statement from a sql query and then using sqlplus to process.  [select 'insert into table values ( ...'||column||' ...) ]  But i was being lazy and didn't want to create a sqlldr or jdbc insert program.
I've used perl the same way for when i needed larger imports.
Answer: If it's a small volume of data, some programs (like Aqua Data Studio) can export data as a sequence of SQL 'INSERT' statements.


GDAL VRT Display Weirdness in QGIS

Question: I am building VRT's from many single channel, continuous data (i.e. float32) geotiffs.
My desire is that when these VRTs get added to QGIS, they are symbolized in a particular manner.  For example, all pixels that have a value of 0.0 - 30.0 are red, 30.0-60.0 are yellow, and 60+ are red...
As far as I can tell, the best way to do this is:

Add a python pixel function that returns a integer value (0,1,2) based on the underlying data value. With this pixel function, the VRT now shows as integer type with values 0,1,2.
Add a color table into the VRT, one entry each for 0, 1, 2

With these updates to a VRT, when added to QGIS they do render as paletted/unique values with the colors I expect from the color table.
My issue is that when zoomed to full extent of the VRT, the seams of the individual tiles are very noticeable.  Without getting into unnecessary detail about the data, it doesn't make sense.

Eventually, I hit to a zoom level where seams disappear.  All zoom-ins from this point forward, no seams:

I suspect this is the result of some form of resampling, but where - QGIS or the VRT?  I have tried adjusting QGIS blending and oversampling thresholds to no avail.
Any ideas of what is going on here?
Answer: After building standard overviews gdaladdo sample.vrt - no more seam lines visible at any zoom level

GDAL VRT Display Weirdness in QGIS


How to add/delete fields dynamically using Entity Framework during runtime?

Question: I have a requirement in my project to add/delete fields dynamically during runtime. I have created already this feature but not in EF. I want to create this feature using EF. Any ideas how to do this one?
Comment: EF is not suited for this type of requirements.
Comment: What do you mean by 'field'? Do you mean you want to add database columns without having to recompile your project?
Comment: @Steven-Yes, is there is a possible way to recompile the schema at runtime?
Answer: If you need to have dynamic data structure you must either use completely different architecture or you cannot use EF. EF is not tool for dynamically changing databases - just look how do you work with EF. You map static table to static class definition. If you change table at runtime how do you change the class (no dynamic support in EF)?
As example of alternative database structure you can use either database with multiple predefined columns of different types and new fields will be mapped to new types. You will have additional layer of "mapping" in your application which will interpret your database content based on some type metadata stored elsewhere. This is approach for example used by Sharepoint (at least 2007) where you have separately stored content type (data description) but all content is in one huge table with large number of columns.
Another example is structure where you have separate table for core data (shared among all entities), separate table for property description and separate table for property values related to core data. This database structure has a name but I cannot recall it at the moment.
Every dynamic approach has its price. Generally you will lose some part of strongly typed work and you will lose performance.
Your linked tool is not for changing database structure. It is just for modification of names in mapping but table structure must remain the same.
Comment: "Recompiling" model is not enough you need to recompile your code and reload the assembly and it is all very hard because for example once you loaded assembly you cannot unload it - you can only unload `AppDomain` which loaded it.
Comment: @Ladislav-is there no way to recompile the schema(edmx) at runtime, once there is any changes in the db?
Comment: Anyone know the name of the database structure? Is it "Key-Value Store"?
Comment: @AXMIM, I guess Ladislav is talking about entity–attribute–value model. It's certainly not a key-value store.
Answer: This is takne verbatin from the Rowan Miller Blog.
http://romiller.com/2012/03/26/dynamically-building-a-model-with-code-first/ .
Still Has to be changed so the properties for the classes are read from some configuration source or from the fields on the database table.

Dynamically Building A Model With Code First
Posted on March 26, 2012.
I've answered a few emails recently on this topic so it felt like time to turn it into a blog post.
In this scenario the set of classes that make up your model isn't known at compile time and is discovered dynamically at runtime. An example of such a scenario is a WordPress/Orchard/etc. style website that allows modules to be plugged in. These modules live in a separate assembly and may contain classes that represent data to be persisted in the application database. These classes are all pulled into a central Code First model to be used for data access.
Finding the Classes
There are lots of different approaches for identifying the classes to be included in the model. For this example lets use a [Persistent] attribute, something like this:
[AttributeUsage(AttributeTargets.Class)]
public class PersistentAttribute : Attribute
{
}
Now we can add some logic to the OnModelCreating method of our context to scan assemblies and add any classes with the [Persist] attribute. We're going to assume that the assemblies that may contain classes are all loaded into the current AppDomain, of course you may have some other mechanism that provides a list of the assemblies to check.
public class MyContext : DbContext
{
  protected override void OnModelCreating(DbModelBuilder modelBuilder)
  {
    var entityMethod = typeof(DbModelBuilder).GetMethod("Entity");

    foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
    {
      var entityTypes = assembly
        .GetTypes()
        .Where(t =>
          t.GetCustomAttributes(typeof(PersistentAttribute), inherit: true)
          .Any());

      foreach (var type in entityTypes)
      {
        entityMethod.MakeGenericMethod(type)
          .Invoke(modelBuilder, new object[] { });
      }
    }
  }
}

In this example the entire model is dynamically discovered, but you could also have some static parts of the model that are registered with modelBuilder too.
An Alternative Using EntityConfiguration
Code First allows you to create a class that derives from EntityTypeConfiguration to encapsulate the Fluent API configuration for an entity. If your using this approach to configuration you can just look for these configuration classes and register them, instead of finding the entities to register. Notice that we are filtering out the EntityFramework assembly since it has some configuration classes that it uses internally.
public class MyContext : DbContext
{
  protected override void OnModelCreating(DbModelBuilder modelBuilder)
  {
    var addMethod = typeof(ConfigurationRegistrar)
      .GetMethods()
      .Single(m =>
        m.Name == "Add"
        && m.GetGenericArguments().Any(a => a.Name == "TEntityType"));

    foreach (var assembly in AppDomain.CurrentDomain
      .GetAssemblies()
      .Where(a => a.GetName().Name != "EntityFramework"))
    {
      var configTypes = assembly
        .GetTypes()
        .Where(t => t.BaseType != null
          && t.BaseType.IsGenericType
          && t.BaseType.GetGenericTypeDefinition() ==     typeof(EntityTypeConfiguration<>));

      foreach (var type in configTypes)
      {
        var entityType = type.BaseType.GetGenericArguments().Single();

        var entityConfig = assembly.CreateInstance(type.FullName);
        addMethod.MakeGenericMethod(entityType)
          .Invoke(modelBuilder.Configurations, new object[] { entityConfig     });
      }
    }
  }
}

What if the Model Changes?
Code First Migrations to the rescue… You may not be able to use Migrations from the Package Manager Console because the logic to discover your model may require you full application to be running. Fortunately those commands are just thin wrappers over an API. Here is some code to automatically change the database when new classes or properties are added to the model. My recent blog post has more details on invoking Migrations from code.
var config = new DbMigrationsConfiguration<MyContext> {     AutomaticMigrationsEnabled = true };
var migrator = new DbMigrator(config);
migrator.Update();

Answer: Adding and deleting fields during runtime is not a good idea to start with.
The database structure should be static, as it should reflect your class structure, and your class structure is static, whether you want it or not.
In case you have a dynamic table you there are better was to implement it, for example, have a table with fields "rowID, field, value", and fill in the values this way.
If you really need to add/remove fields to a table at runtime, you can create a stored procedure that adds/deletes the field, and then map the SP with Entity Framework.
This, however, might cause a lot of problems, because Entity Framework will not be able to map/unmap the new/deleted fields, and therefore will crash the moment you try to access the said table.
Comment: @Svarog-Yes, I have experienced this one, that is why I used another approach. I am trying my luck her in stackoverflow if someone done this before. I don't know if this link http://efmodeladapter.codeplex.com is applicable to my problem.
Comment: The Runtime Model Adapter is for adding/removing prefixes and such fine-tunings. You can not change the fields in your classes/tables with it.


Bitcoin too large file

Question: I installed the bitcoin program and now it's synchronising, and although I installed it on my very large D: disk it's moving all of the stuff on my little C: disk.
It's now around 6 GB in size with 45 weeks to go and I'm out of room. Is there a way I can safely move it to my D: or make it synchronise onto my D: instead?
Comment: Maybe it is a time for you to use thin client, like multibit? Is there any particular reason you are going after full node?
Answer: You can specify where to store the blockchain by starting QT with the following command argument:
-datadir D:\BITCOIN

Answer: You can either start the bitcoin client with the command line option -datadir=<path to another directory> (you would have to do this every time you start the client) or you can link the blocks directory to another location. How to do this depends on your operating system:

For Windows I found this forum post (didn't test it but sounds reasonable)
On Linux you could do something like this: ln -s ~/.bitcoin/blocks /another/directory (make sure you use an absolute path for the source directory).

Bitcoin too large file


impact on hypothesis if t-stat is equal to t-critical value for one-tail two-sample t-test?

Question: I have a two-sample t-test where the t-statistic is equal to the critical t-value (at three decimal points) at a p-value of 0.05. does this mean i reject the null hypothesis or the opposite? thank you so much!
Comment: Also see [here](http://stats.stackexchange.com/questions/79855/is-p-5-0-significant) for another duplicate.
Answer: The traditional tests says that the probability has to be less than 0.05, so this is not statistically significant.
However, this shows up the problem of being forced to make a dichotomous yes/no decision for statistical significance. Are you really going to make a decision one way or the other when your answer could be changed by one person (or whatever you're measuring) moving by 1 point.
Comment: This answer is not quite correct, I am sorry. The critical region strictly speaking includes the critical value itself. If the test statistic is continuous and p were "exactly" 0.05, that should be rejected for a 5% test (though the probability of this is 0). If the test statistic is discrete, then you would generally choose an achievable significance level (and typically, one smaller than the desired type I error rate, but this is not a rule) -- but once you choose the achievable significance - say 0.0467, for example -  then the case at that boundary is in the rejection region). ...ctd
Comment: ctd ... If - as occasionally happens - you get a discrete test that can achieve the exact desired significance (0.05 say), then you definitely reject when p=0.05, or you aren't doing a 5% test! Please see the discussion at the indicated duplicate.
Comment: This case: `wilcox.test(c(1,4,5),c(2,3,6:12),alt="less")` is an example of *exactly* 5% being achieved with a discrete test statistic (in this case for a one tailed test). In that case, you must reject the null for a test with a 5% type I error rate. [I find it helps to state the rejection rule and the implied type I error rate for the rejection rule you give.]


Are rules of an organization on-topic?

Question: Are rules about a non-governmental organization on-topic on this site? For example, "Are there minimum vision requirements to compete in biathlon at the Olympic Games?". Other questions could involve the penalty for a Boy Scout being caught lying to their group leader, the requirements for becoming a Freemason, or whether the rules of a specific private university allow a student's grade to be lowered as punishment for a non-academic conduct violation and, if so, what the burden of proof is.
Answer: I would argue no.
We are experts in law, not experts in internal rules (published or not) of private organizations.
We could answer questions about whether a particular organization's rule is contrary to statute, or whether statute requires certain types of organizations to organize in a particular way. Those are legal questions.
Answer: I would argue yes.
If the organisation is a person under law then its creation, existence and ultimate dissolution exist under some jurisdiction's law. You can't have a company in Australia that doesn't fall under the Corporations Act for example.
Therefore an organisation's constitution, charter, by-laws or whatever are ultimately a creature of that law and questions about "Is this constitution legal?" or even on the interpretation of the constitution notwithstanding their legality are legal questions.
However, the question you have suggested is off-topic because its a treasure hunt. If you find the rule come back and ask if its legal.

Are rules of an organization on-topic?


FFT magnitude as a function of frequency resolution

Question: My learning research on FFTs has identified that (for example) with a FFT frequency resolution of 8 Hz, the magnitude of the FFT spectral lines (computed as the absolute value of the complex numbers returned by the FFT function) should be higher than if a FFT frequency resolution of 4 Hz is used (twice the number of samples per FFT) on the same (IQ) sample data. I see evidence of this when using a Spectrum Analyser receiving broadcast FM signals and also in SDR software when doing the same (both when changing the RBW). But, when using the MatLab FFT function (on broadcast FM IQ data) the opposite is what I see - i.e the higher the FFT frequency resolution  (lower number of samples per FFT), the lower the scalar magnitude of the FFT complex values. What I am I doing wrong / not understanding?
Answer: Bottom Line: From the O.P.'s description, the FFTs reported by the Spectrum Analyzer and SDR are scaled by dividing by the number of samples (and possibly additional scaling factors as explained in the links at bottom if windowing is used), which is reasonable to do. The FFT's returned by MATLAB simply need to scaled by dividing by the total number of samples to match this.

Details:
The frequency resolution as reported by a spectrum analyzer (RBW) will indeed result in higher signals for wider resolution bandwidths when the signal energy is spread wider than the bandwidth. This makes sense as the analyzer is reported the total power within the bandwidth of a filter, centered on any particular frequency, and we observe this power as the filter effectively sweeps over a range of frequencies, or equivalently done with a filter bank where we observe the total power within the bandwidth of each filter.
The DFT (which the FFT as an algorithm computes) also has a resolution bandwidth, and is equivalently a bank of filters with each filter centered on each bin center in the FFT. The resolution bandwidth is also commonly called the equivalent noise bandwidth: the DFT filter without further windowing has an approximate Sinc function magnitude response (and precisely the "Dirichlet Kernel" which is an aliased Sinc function), and the equivalent noise bandwidth (EQNBW) is the bandwidth of a brick filter that would report the same total integrated power as the total integrated power under the Sinc function for the case of white noise. In the case of an unwindowed DFT, the EQNBW is one bin, and this only gets wider if we use windowing (which also improves the DFT as a filter for non- white noise cases).
That said, this is exactly the result the OP is expecting: for a tighter RBW (or EQNBW), the total power in each bin should reduce under the conditions of signal spectrums with power that is spread over multiple bins, and this is exactly the result we will see. For this reason the "DFT Noise Floor" as observed when we take the DFT of a white noise process, will go down as we increase the number of bins in the DFT.
The FFT reported by MATLAB however also includes a "DFT Gain" as MATLAB (as well as Octave and Python scipy.signal) provide a non-scaled DFT as the result. When we wish to see a "Spectrum Analyzer" result with an output power level consistent with the power in a particular resolution bandwidth, the FFT result needs to be properly scaled which includes dividing by the total number of points.
The FFT magnitude is simply given by the assumed operations for computing the DFT (if it scaled or not), either approach can be taken and should be defined. (The FFT is an algorithm for efficiently computing the DFT).
For example, an non-scaled DFT is just the sum of the products and given as:
$$X(k) = \sum_{n=0}^N x[n] W_N^{nk}$$
And would result in a scaling by $N$ for each of the $N$ dft outputs.
And similarly the scaled or normalized DFT is given as:
$$X(k) = \frac{1}{N}\sum_{n=0}^N x[n] W_N^{nk}$$
Where above $W_N$ is the "DFT twiddle factor" and given as $W_N = e^{-j2\pi/N}$ and all the integer exponents of $W_N$ are the Nth roots of unity.
To see this simply, consider the first bin with $k=0$ which is the DC bin, and with a DC input in time of all ones for each sample. For that case all the twiddle factors are equal to one and we see that the result sums to $N$ for the first case and to $1$ for the second.
Note that "Frequency Resolution" is another topic detailed here and is a function of the windowing used if any, and if we are measuring signals with power that occupies only one bin, or is spread across multiple bins, in which case different scaling factors need to be provided.
Other posts related to spectrum analyzers and FFT spectral analysis that may be of interest:
How to reprocess SDR data to be equal to that captured with a higher RBW
Radar terminology - Specific meaning of "video signal"
about PSD scailing factor
Comment: Thanks - yes I've not been applying any specific windowing in my tests - so rectangular. The calculations all add up now. I found some on-line MatLab code which was calculating PSD by dividing the square of the absolute value of the raw MatLab FFT by (Fs*N), which is algebraically identical to calculating the square of the absolute value of: (raw MatLab FFT / N) and dividing the result by the RBW. :-)
Comment: Apologies; I've just realised that I didn't previously get as far as reading your post at the link 'about PSD scailing factor'. My head was spinning at that time. I see you'd already done the algebra to equate the MatLab code to the standard form of dividing by RBW! :-)
Comment: Many thanks for your helpful response. If I understand correctly, it is necessary to divide the absolute value of the raw output of the MatLab FFT function by the number of FFT bins, N, in order to observe the effect described on multiple web sites where a larger RBW gives rise to larger 'FFT' spectral line magnitudes. I.e. the 'FFT' that the web sites are talking about is actually the (FFT/N)? If so, that's a relief; when I divide the absolute value of the raw MatLab FFT by N with my data, larger RBW values do give rise to larger spectral line magnitudes
Comment: Following on from this, I've seen web sites explaining the conversion from FFT to PSD saying it is necessary to square the absolute value of the FFT and DIVIDE by the RBW. Would they also be referring to 'FFT' as (MatLab FFT / N)?
Comment: Yes in the simplest case that the sampling rate is 1 (which refers to normalized frequency given as $f/f_s$ where $f$ is the frequency and $f_s$ is the sampling rate), and no further windowing other than selection (rectangular window) is done. Then the RBW is $1/N$ in units of normalized frequency. But as detailed in my linked post in the answer, if we window (as commonly done) then this will increase the resolution bandwidth so we also divide by that factor in that case.


How can i set an unbreakable password on py PC?

Question: I want to set an unbreakable password for windows 7 on my personal computer because my friends mostly guess my password. When they are failed to guess my password they break  it with an technique. I want to get rid off this all. I often try to change windows 8 and 10, but they reset all my settings and i loose my privacy. My computer contains my personal data like family pics so i want to them private. My friend break my password and after this they tell me about my personal data that what kind of pic, videos, and documents i have. Me and my friends are room mates. It can be another one who breaks my password for my room mates. My laptop is secured because i have an fingerprint privacy on my laptop but any type of password on windows is easy to breakable for my room mates which not secured for me.
Comment: It seems to me that you should upgrade your friends, or at least deny them physical access to your computer.
Comment: It's impossible to answer this question, unless you provide more details. The strength of the password is likely to be totally irrelevant here. If you keep being "hacked" by your friends, you need to tell us what they are doing exactly, and the whole scenario. For example, if they have physical access to your computer and they are knowledgeable enough, the strength of your password is irrelevant and the solution to your problem is totally different.
Comment: You need to edit your answer and add as many details as you can about the whole situation, for example: how do you find out you have been hacked? How do you know it was your friends? Can your friends physically access your computer while you are away? What do you do to fix the hack and restore your computer to a safe state? Etc.
Comment: All respect able members i often keeps the length of my password upto 20 which contains symbols, numbers and alphabets. But its is difficult to break so how they do so.
Answer: Remember, depending on your jurisdiction, your friends may be breaking the law.
There are a couple of really neat techniques to create near-unguessable passwords.
The first is online tools: just Google "strong password generator". For your needs, 8 characters should suffice. They should be generated randomly. If you can remember a phone number (typically 11 characters in the UK) you can remember 8.
The second is to pick four words at random, and then a capitalisation strategy of your choice. resilientHORSEBATTERYstaple would do.
A third technique is to use an equation. FIVEtimes5=25 or 5*five=TWENTYFIVE! would keep you safe.
However, a Windows password alone won't keep you safe if your friends are able to boot using a Live CD. This may be a bit advanced for you, but consider using an Encrypted Windows install next time you install Windows, or putting a password on your Bios. The Bios password is hard to do, and if you mess up you can break a lot of things, so just go with the above strategies as a first attempt.
Hope that helps!
Comment: This is terrible advice. Most of this is just homebrew schemes which can be trivially guessed by a Hashcat ruleset (an equation? Really?), and the rest is outdated advice (4 words is _not_ enough).


How to display geotagged photos from my domain in leaflet

Question: I already asked a question similar to this then I used a plugin of displaying geotagged photos in leaflet from (Google+ photos|Instagram / CartoDB|Norvegiana ) photos in leaflet
This plugin gets photos over the internet connection (Google+ photos|Instagram / CartoDB|Norvegiana ) I want the same but from photos hosted in my domain .
Comment: i tried the code but it dose not show the photos in my map and it shows this error: Cannot read property 'cluster' of undefined which is related to this line of code:
L.photo.cluster()
do i need to add additional leflet package in it ?
Answer: Though all the examples on the Leaflet.Photo plugin page involve getting data via an API, all you really need is an array of objects with the latitude, longitude and URL(s) for each image. For example:
var photos = [{
  "lat": 34.04555452,
  "lng": -118.3001509,
  "thumbnail": "http://www.mydomain.com/photo1_thumb.jpg",
  "url": "http://www.mydomain.com/photo1.jpg",
  "name": "My First Photo"
}, {
  "lat": 34.0522683,
  "lng": -118.2698607,
  "thumbnail": "http://www.mydomain.com/photo2_thumb.jpg",
  "url": "http://www.mydomain.com/photo2.jpg",
  "name": "My Second Photo"
}, {
  "lat": 34.06281904,
  "lng": -118.2809651,
  "thumbnail": "http://www.mydomain.com/photo3_thumb.jpg",
  "url": "http://www.mydomain.com/photo3.jpg",
  "name": "My Third Photo"
}]

var photoLayer = L.photo.cluster().on('click', function(evt) {
  var photo = evt.layer.photo;
  var template = '
{name}
';
  evt.layer.bindPopup(L.Util.template(template, photo)).openPopup();
});

photoLayer.add(photos).addTo(map);

The lat, lng and thumbnail properties are required, since these are what the plugin uses to create the marker, but you can add any other properties you like, such as the full-size image URL, caption text, styling parameters, etc. The simplest way to use photos from your own domain is just to store this array of objects in your script, or as a separate file on your server, which you could load either with the page or later via AJAX.
Here's an example fiddle with the objects included in the script:
http://jsfiddle.net/nathansnider/q8ar6wu9/
Comment: It worked fine ,only one small issues the close popup images is not like usual  here the usual : http://i.imgur.com/PbSbiWq.png  and our close button :http://i.imgur.com/DuDmH2I.png
Comment: The author is using some custom css in those examples ([here](https://github.com/turban/Leaflet.Photo/blob/gh-pages/examples/css/map.css)). It's not really part of the plugin, but it does look nice, and probably makes it more mobile-friendly. If you use that css, you just need to add the `leaflet-popup-photo` class to your popup. [Example here](http://jsfiddle.net/nathansnider/t34qytf1/)
Comment: You are a master, It worked as I wanted .


Bike for college campus

Question: I'm looking for a good bike to use to get around campus and use on the local trail which is about 10 miles paved and unpaved and goes around a lake. Preferably under $300.
Comment: Welcome to [bicycles.se]. We cannot help with shopping question here; we aim for question and answers that have long-term and wide-spread value. Shopping questions tend to help just the one person get out of date quickly. Since you want if for use on campus, try the student association, local bike shops, and campus notice boards for second hand bikes.
Comment: Product recommendation questions are generally a poor fit for a Q&A site since the answers quickly become out of date. There are a number of previous posts that will help you know what to look for when buying a new/first [road](http://bicycles.stackexchange.com/q/7979/213) [bike](https://bicycles.stackexchange.com/questions/1121/what-makes-a-good-entry-level-road-bike), [commuter](http://bicycles.stackexchange.com/q/23282/213) [bike](http://bicycles.stackexchange.com/q/15696/213) and [mountain](http://bicycles.stackexchange.com/q/6238/213) [bike](http://bicycles.stackexchange.com/q/5745/213).
Answer: If your campus is like most I have ever heard about, you want the cheapest bike that will do the job.
Bike theft is a common thing everywhere but campuses where a lot of young people are in need of bikes are certainly not less risky than average.
Most students I know look for second hand bikes, either at the university, online or where they grew up/have their relatives and friends network.
The brand of bike is less important, I guess you know better than I do what kind of bike you like for that.
Comment: Some campuses are starting to catch on. My Alma Mater has a caged bike area with cameras that logs who goes in and out with a swipe card system.  Bicycles are a very economical means of transportation. It's disappointing that the lack of security on campus stops most students from being able to use bicycles.
Comment: I don't think lack of security should ever stop anyone. As long as you follow 2 simple rules no one should ever steal your bike: know how to lock it (always lock two wheels and frame to a secure place) and most important, go for the combo: very cheap bike, very expensive lock. Make sure the bike next to yours is nicer to steal and requires less effort.
Comment: I do not tell the OP not to buy a bike but to go for a cheap one as long as still living on campus. When you move around a lot there is the day you forget to lock your bike. I personally love the ring locks that keep the rear wheel with the frame, I do lock the front wheel to the frame with the lock I use to attach to a fixed object.
Answer: I had a BMX bike for two years in college and no one wanted to steal it. To most common thieves it does not have a high value since it looks like a kids bike. They are fun to ride, can get you across campus through any terrain, and are small enough to fit inside closets and crevasess if you forgot your lock.
If that's not your thing. Try an older road bike off of craigslist. Something that you can maintain yourself, but not too shiny to get noticed. You want something light and with less moving parts so that way there is less to go wrong. Make sure you replace all the quick release parts.
I had a 20 year old Specialized road bike before going to the BMX. Before that, I had a 2 year old Mongoose that got stolen piece by piece.
Comment: Because with quick releases, unless you are careful to lock both wheels, someone can steal them literally in 5 seconds without any tool.
Comment: Why replace the quick releases?
Answer: Especially considering the theft issue raised by Willeke, I'd say hands down the bike for you is a rigid mtb. That's what I ride. I live in a high-crime city, and ride it on fairly technical trails.
I would buy used. You could probably get a decent used one for less than a hundred bucks.
I would probably put some skinnier 26x1.5 tires on it, depending on how rough the unpaved stuff is.

Bike for college campus


Do I need a star's permission to write a fiction TV series inspired but not exactly as his life?

Question: I want to write a fiction TV series inspired by a true love story between a star and his fans except that I'm going to represent the fans as an actual female character and make it a romantic series. Also this star has had a girl making up false rumors (scandal) about him and a I want to include that in my TV series although I still don't know whether to use the same scandal or makeup another one according to what the story needs. So I want to know: Do I need that star's permission first to write that series?
Answer: Probably yes. There is a common law form of intellectual property called a right of publicity, which basically means that no one is entitled to use your identity or image commercially without your consent. It was originally developed to protect models whose images were used in commercial advertising without their consent and without compensation.
There are exceptions to the right of publicity. It doesn't apply to satire or to efforts to faithfully recount someone's life in an unauthorized non-fiction biography. It doesn't prohibit criticism of someone.
But, the semi-fictional use that you contemplate is neither satire nor an attempt to make a fully truthful news type report of the person's life and instead is an attempt for you, a third party, to profit from that person's famous identity without their consent.
It is not a copyright, it is not a patent, and it is not a trademark.
Comment: Okay. Thank you, I will try to get his permission. If he doesn't approve, I will not write it. One more thing, does that law apply to making and selling T-shirt designs for stars' fans to show their love for their star and support them? I mean by using stars' name and popularity to make T-shirt designs and selling them, is it illegal?


Fibonacci numbers prove by induction that $F(n)>2n$ for $ n>7$

Question: So I am having trouble proving that $F(n)>2n$ for all $n>7$.
for base case I took n=8, so obviously $f(8)=21> 2*8= 16$
Assuming$ f(n)>2n$
$f(n+1)>2(n+1)$
$f(n)+f(n-1)>2n+2$
$f(n)> 2n$ according to the induction hypothesis and since $n>7$ ,$f(n-1)$ should be at least $f(7)$ and therefore more than 2, however I'm not sure if this is the correct way to prove this by induction on n...
Comment: please use mathjax syntax otherwise it is tedious to read. (He was named Fibonacci anyway) ;-)
Comment: The easiest way is to use a variant of the induction slightly different to the usual induction (See my answer)
Comment: Your method is ok (if you already know that $F(n)\ge2$ for $n\ge7$)
Comment: When doing proofs by induction on the Fibonacci sequence it is almost always the variant that you apply the induction hypothesis to two previous cases (so that you can use the recurrence relation). For the argument to have a solid footing it is then imperative that you check two smallest indices separately, i.e. there will be two base cases.
Comment: @HagenvonEitzen I know that because since we're only above n>7, we know that F(8+) will be more than 2, I'm not sure if I need to prove this somehow.
Answer: Assume $$f_n>2n$$ and $$f_{n+1}>2(n+1)=2n+2$$ for $n\ge 8$.Then you have
$$f_{n+2}=f_n+f_{n+1}>2n+2n+2>2n+4=2(n+2)$$
together with the start $f_8>16$ and $f_9>18$ this completes the proof
Comment: How do you know that 2n+2n+2 > 2n+4 ? I mean we get that 4n+2 >2n +4 and how do you know that?
Comment: @user381994 We have $2n+2n+2=2n+(2n+2)>2n+4$ for $n>1$. And the equation $4n+2>2n+4$ you mentioned is equivalent to $2n>2$ and therefore $n>1$. And $n>1$ is obvious because we assumed $n\ge 8$
Comment: Instead of "equation" in my last comment, it should, of course be "inequality"
Answer: Another way :
It is easier to prove :
$$\begin{array}{l}
{F_n} = \frac{{{\varphi ^n} - {\psi ^n}}}{{\varphi  - \psi }} = \frac{{{\varphi ^n} - {\psi ^n}}}{{\sqrt 5 }} > \frac{{{\varphi ^n}}}{{\sqrt 5 }} = \frac{{{{(\frac{{1 + \sqrt 5 }}{2})}^n}}}{{\sqrt 5 }}\\
\varphi  = \frac{{1 + \sqrt 5 }}{2} \approx 1.61803{\mkern 1mu} 39887 \cdots
\end{array}$$
so prove that $$\forall n>7 :F_n>\frac{{{{(\frac{{1 + \sqrt 5 }}{2})}^n}}}{{\sqrt 5 }}>2n$$ so
$$p(8) \space \frac{{{{(\frac{{1 + \sqrt 5 }}{2})}^8}}}{{\sqrt 5 }}>2\times 8 \\20.57>16 \checkmark $$
$$p(n) :\space \frac{{{{(\frac{{1 + \sqrt 5 }}{2})}^n}}}{{\sqrt 5 }}>2n\\p(n+1): \space  \frac{{{{(\frac{{1 + \sqrt 5 }}{2})}^{n+1}}}}{{\sqrt 5 }}>2(n+1)$$ multiply $p(n) $ by $\frac{{1 + \sqrt 5 }}{2}$
$$\space \frac{{{{(\frac{{1 + \sqrt 5 }}{2})}^{n+1}}}}{{\sqrt 5 }}>2n(\frac{{1 + \sqrt 5 }}{2})>2n(1.5)=\underbrace{3n >2n+2}_{\forall n>7} \checkmark$$
Answer: Consider the following proposition (P):
For all $n\in \Bbb N$ if $F_{n+8} > 2(n+8)$ and $F_{n+7} > 2(n+7)$ then
$F_{n+9} > 2(n+9)$.
Let us prove $P$ by induction: The basis is easy:  For $n=1$ this becomes
$F_{10} > 2(10)$ or $55> 20$.
Now assume (P) holds for all $n<k$.  Then
$$
F_k = F_{k-1} + F_{k-2} > 2(k+8) +2(k+7) > 4k+30 > 2k+18 = 2(k+9)
$$
so (P) holds for $n=k$ as well; this establishes induction.
Thus (P) holds for all $n \in \Bbb N$, which in turns says that  $\forall n\geq 9 : F_n > 2n$.
The proof of the original statement is then completed by noting that the only omitted cases is $n=8$ and $F_8 = 21 > 16$.


Am I eating too much fat? How healthy fat help to lose weight?

Question: I am now following a healthy eating cookbook by a body coach.
I am doing an HIIT training routine he has suggested for 20 minutes, 4 times a week.
The confusion I have is the amount of fat I am consuming following his cookbook.
His logic is to have carbohydrates only after the HIIT session and food with healthy fats the rest of the time.
He suggests eating healthy fat helps to lose weight? How is this possible? Can someone explain this to me please?
Having a full avocado with bacon for breakfast, is that healthy with the amount of workout I do?
Comment: Can you define healthy? Are you defining that as a healthy body or healthy weight loss? Please be aware that eating fats will not inherently make you fat.
Comment: one of his recipe includes filo pastry,cream. I thought these to be unhealthy food items. so was bit worried that I might be following something unhealthy. but thanks your comment. It does make sense
Comment: I would ask him to explain his "cookbook" with some solid facts based on research.
Comment: Fat storage is regulated by insulin. The more insulin, the more fat storage. 50% of Insulin is produced in response to diet. Carbs cause a lot of insulin secretion; protein causes a little bit, and fat causes none.
Answer: To lose weight: Calories In < Calories Out
Eating Fat does not make you fat. Eating too much makes you fat.
The specific fat/carb/protein breakdown of those calories influences your energy levels and rate of muscle growth (amongst many other things) but does not directly affect your weight loss. Again, to lose weight: Calories In must be less then Calories Out.
You eat more satiating (filling) foods by cutting carbs in favour of fats. You get more food and feel more full eating that way. Cutting carbs and increasing fat to counteract the calorie change is a fine way to lose weight provided you remember, Calories In < Calories Out.
Comment: -1 because of the calories in calories out nonsense. calories out (and hunger) are regulated by hormones. If you eat the same # calories butter and sugar, your insulin release will be totally different, and so will your calories out, independent of your exercise routine.


Open map within application for iOS6 or previous

Question: I have lat and long of address and I want to open maps for both iPhone Map in iOS6 and Google Map before iOS6 within application. I tried to open map of google for before iOS6 but it not working.
[[UIApplication sharedApplication] canOpenURL:
     [NSURL URLWithString:@"comgooglemaps://?center=46.414382,10.013988&mapmode=streetview"]];

I am doing above line of code mentioned but its not working. Kindly if any one know please help me on that. Thanks in advance.
Comment: [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"comgooglemaps://?center=40.765819,-73.975866&zoom=14&views=traffic"]]; Try this and tell me its working or not
Answer: There are two different methods: canOpenURL and openURL
With canOpenURL you only check it it is possible to open an external application (in your case the map app -from Apple of from Google-.
Once you have checked it, you have to use [[UIApplication sharedApplication] openURL:NSURL URLWithString] to open it.
So you can try:
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"comgooglemaps://?center=46.414382,10.013988&mapmode=streetview"]]){
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"comgooglemaps://?center=46.414382,10.013988&mapmode=streetview"]];
}

It is good to use canOpenURL, by this method you check if you are trying to open an app that is not present in the device so you can show an alert of some feedback to the user instead of a not working button without any "visual" action for the user.
Hope it helps.


Extracting Data Issues

Question: I often receive rent rolls with the individual charges in rows, and I need to convert them to columns, though the spacing is inconsistent. I tried filling in the unit numbers so that each charge has the applicable unit number in column a, then used index match match, but it isn't working.  Below is an example, though the file can have hundreds of units, so I'm looking for a formula that can pull in the applicable charges based on the unit number.  I would think it would be simple, but can't find an answer.
Comment: Welcome to SuperUser! Please note we're a bunch of volunteers and we aren't a code-writing service. If you were to show us what research you've done, and what you've tried so far to put this macro together, we'd be happy to advise you on it.
Comment: I'd ask the people making your source spreadsheet to generate it in column format.
Comment: I was hoping there would be a formula that I can use. I'm not technical enough to work with code. Agree it would be easy if I could get it in the correct format, but different systems generate the reports in this format, and they can't change it.
Comment: As a partial answer, here's what I'd try: 1. **Make a backup copy!!** 2. Delete all the blank rows.  https://www.excel-easy.com/examples/delete-blank-rows.html 3. Add *Pet* rows which don't exist. There's probably an example macro out there to help with that. 4. Transpose the rent/pet/utilities/total rows.  Hopefully this is a helpful start.
Answer: Taking a few liberties with assumptions
Refer to table at end for reference cells/ranges in formulas.
First things first, take the "What you get data" and convert it to "What I'll work with Data".  In order to do this just grab some empty space beside the original data or use another sheet if you like.  Use the following formula to either take the information in the corresponding cell or if the cell is blank use the information from the cell above. (Assumes the first cell is not blank)
=IF(A3="",H2,A3)

I placed that in cell H3 and copied down and to the right as required.  Don't worry about the repeated rows that occur when there is a blank row.  That information gets ignored in the end.
That range of H3:L13 I'll call the "What I'll work with data" with row 3 being the header row.  Note you will need one row above the header row to get that H2 reference in. or you will have to adjust the formula to suit first row exception.
Now lets look at the what you need. I am going to start with the assumption that you will type in all the headers manually.  To get a complete list of what is actually in your list, you could use the built in remove duplicates button and the data ribbon.

Then transpose the results into a row and rearrange the entries to suit your liking (ie. putting Total at the end and starting with Rent which is not an alphabetical sort). Alternately you could do it with the formula for getting the unit numbers I am about to show as an option to the remove duplicates button. You would need to copy, paste values, copy, paste transpose, and then rearrange just like above so I would recommend the more manual approach to set up.  once set up though you should not need to go through the process again.
So once you have your header row layed out like you want, use the following array formula to generate a unique list of unit numbers.  This method will not not sort your unit numbers for you.  (alternatively look at the remove duplicates button mentioned above).  I placed the following formula in O4 and copied down to O13:
=IFERROR(INDEX(H:H,MATCH(1,1/((COUNTIF($O$3:O3, $H$4:$H$20)=0)*($H$4:$H$20<>"")),-1)+3),"")

Note this is an array formula (also known as a CSE formula).  In order to enter it properly when you go to confirm the formula press CONTROL+SHIFT+ENTER instead of just ENTER.  You will know you have done it right when you see { } around your formula in the formula bar.  Note that the { } cannot be manually entered around your formula.
Copy cell O4 and paste into O5:O13 or whatever range suits you.  just do not include O4 in your paste or you may get an error message about not being allowed to edit part of an array.
in order to get Resident and Market Rent (Columns P and Q) a simple lookup method will work.  I am using a combination of INDEX/MATCH wrapped in an IFERROR formual to give empty looking cells when information is not found.  I placed the following formula in P4 hen copied down and then to the right.
=IFERROR(INDEX(I:I,MATCH($O4,$H:$H,0)),"")

Now to pull the next set of data (columns R to V), I found the corresponding row number for when the unit number matched and the column header matched.  I used the following formula in R4 and copied it down and to the right as needed.
=IFERROR(INDEX($L:$L,AGGREGATE(14,6,ROW($H$4:$H$13)/(($H$4:$H$13=$O4)*($K$4:$K$13=R$3)),1)),"")

Note that AGGREGATE performs array like operations within its brackets.  As a result, do not use full column/row references like H:H or 3:3 or a lot of excess calculations can be made which can bog down your computer.  Not too bad for a single cell calculation, but when the formula gets copied multiple times it can get ugly.

NOTES:

no duplicate unit numbers with different resident names.  only first unit name combo will get listed
Cell O7 with "103" was a manual entry to demonstrate the option of manually entering unit numbers and demonstrating blank row results for unit not in list.  Similar to column U and manually entering Cable which is not in the list.
Column V "Total" is actually a look up using the Aggregate.  It might be preferable to change that to a SUM formula.

Extracting Data Issues


How can I create a wireless hotspot on OS X like Internet sharing but without an actual internet connection?

Question: I want to use my Wi-Fi Printer with my MacBook and it works great when the Printer connects to the Wi-Fi Network created when I set up Internet sharing. What I want to know is, is there a way to set up the MacBook as a Wi-Fi Hotspot but without requiring an internet connection?
Answer: Yes, you just set up Internet Sharing the same as if you had an Internet connection on one of your non-Wi-Fi interfaces. You don't actually have to have a working Internet connection on the interface you use as the "From" (that's "From" as in, "Share your connection from:") interface. You just need to pick a non-Wi-Fi interface as the "From" interface so you can use your Wi-Fi interface as the "To" (that's "To" as in "To computers using:") interface.
Just like when you've used Internet sharing before, this will put your Wi-Fi interface into "Access Point" mode and start publishing whatever network name you tell it to publish. It'll also start up a DHCP server process to assign private IP addresses to any devices that join the Wi-Fi network it's creating.
The devices that join the Wi-Fi network won't be able to get to the Internet unless you bring up an Internet connection on whatever interface you used as your "From" interface.
Comment: This is not true in Mountain Lion. I am quite certain that previously I could share the network connection as you explained - picking ethernet and sharing it via WiFi. That *worked* even without any cable connected to the Ethernet port.

It seems that Mountain Lion actually checks for network connectivity (active link on ethernet port) and disables the hotspot as soon as the connectivity drops.

I checked this on two different macbooks and I would be more than happy to hear for trick to get around this limitation. Create network does not achieve the same goal as it doesn't come with DHCP.
Answer: What I figured out was that I could use Internet sharing to setup a Wi-Fi network if I connected the ethernet cable from my Macbook pro to a router (Apple AirPort Express in my case). This worked even if the router didn't have Internet access.
The reason why I did this is that the router had only 802.11 a/n Wi-Fi support, while the Internet sharing on my Macbook pro, mid 2015, is 802.11 ac. My tests showed a speed difference of ~250 Mbps vs. ~50 Mbps between a Macbook pro and an iPhone 6.
Answer: You create a network for computer-to-computer communication.
Comment: I know how to do that between computers but I don't think this will work with the printer, it expects to connect to a router (which is what the Mac becomes with internet sharing) and doesn't have any settings for computer-to-computer networks that I can find.
Comment: The iPad sees the network made by the Mac, so why the printer shouldn't do the same?
Comment: Create network does not start a DHCP server which is required so that the devices get an IP. You could always reconfigure everything by hand, but I doubt that the OP has the skills for that.


Modified Mesh networking using nrf24l01

Question: I am trying to make a mesh network of three nrf24l01 nodes in which all three are transceivers, such that all three are in a line. The modification I want to make is that if two end nodes are not able to communicate with each other as they fall short of range the signal must be sent via the middle node. How should I approach?
Comment: Or just use a [library](https://github.com/nRF24/RF24Mesh) that does it for you?
Comment: You can do it this [way](http://lmgtfy.com/?q=nrf24+mesh+network)
Answer: To be honest, I still have to receive my RF's... But I have a similar problem, meaning I also need to have them all to both receive and transmit.
I thought it was not possible, since in a 6-1 network, one is receiver, 6 are transmitting. With auto-ack messages can be returned.
Depending on the amount of messages being sent and latency you can let them talk when needed and hope there is not too much sending simultaneously (causing resends).
One solution you could use, is to put in the message a receiver ID. Suppose the 'geographic location' of your objects are
A   <---->   B  <----> C
Assume A wants to send to C, but it will not be received by C, C does not auto-ack, and A knows this. Know A can send the message to B, which can auto-ack, and B has to send it to C. Possibly the original source (A) has to be added to the message as well, if this is important for C to know.
Update: (in steps)
Suppose A wants to send a message m to C

A sends message m to C
C does not receive it, thus is does not send an ACK-message back to A
A gets a timeout
A knows that message m has not been sent to C (so it is out of range)
A sends the message m to B (adding 'A' as sender of the message if not already done)
B receives message m
B sends an ACK back to A
A knows message m has been sent to B
B sends message m (with A as sender) to C
C receives the package
C sends back a message to B
B needs to send a message to A that m has been sent successfully

Some generic remarks:
- This scheme is maybe not full-proof or can be optimized (like that A knows from now on it needs to send to B first to reach C).
- Also both B and C can be out of range, you want to resend it (later)?
Comment: Sorry Michel but I could not understand your logic clearly. Can you explain it to me as if i am a layman.
Comment: I updated my answer with some possible steps

Modified Mesh networking using nrf24l01


Debit card without address

Question: I am wondering if there is a way to get a bank account/debit card without an address to send it to. I am wanting to give the cards to people in need and be able to send money to the bank/card when needed. Is there an online bank that offers something like this? The plan is to buy the cards beforehand then register them as they are handed out?
Answer: Debit card, no. Prepaid card, probably; some charities do use that approach to make monthly support payments, including to the homeless. You might want to find and talk to one of those groups to find out how they did it.

Debit card without address


Do recurrent neural networks learn indefinitely?

Question: I was wondering if, unlike feed forward networks, a RNN continues to learn when used so the weights are always being optimized even after training has been completed?
Answer: Actually, this can be done to both FFNN's and RNN's, as long as the correct output is given after your inference. For instance, imagine you have a robot that needs to learn the consequences of its actions on the environment. You could use a FFNN for this task and, after each performed action, the robot will receive the correct output by observing the environment and correct its weights (it is called inverse model learning and you can find a paper which applies RNN's to this kind of task here).
Applying this to RNN's on time-series prediction tasks may be more obvious: you predict the next value, then observe the actual value and make corrections.
This may or may not be the best approach depending on your problem. For instance, you may have found a good model for your data and don't want to risk messing with it. It is common, for instance, in the videogames industry: if you happen to train (offline) some NN as the controller for an agent, you turn off learning during the game, so it doesn't make something unexpected which breaks the game after release.
UPDATE: testuser suggested citing the term temporal difference learning. It is another great example where you can (in this case you need to) keep learning while acting. It is similar to the robot verifying the consequences of its action, but here it corrects its predictions about the value/quality/reward of the next state.
Comment: Good answer, might want to add the term temporal difference learning for those looking for references, though
Comment: I didn't mention TD specifically in my examples, but it is nice you mentioned it, indeed it is related and useful in the context of the question.


the operator of spin

Question: I am kind of confused about the operator for spin, all  the ones I've seen are written in terms of matrix, but this form can not be applied to things like $1s$ orbital of a hydrogen atom, which is $e^{-(r/a)}$. Or is there actually a way to multiply matirx with functions that Im not aware of. I am taking a quantum chemistry class which does not deal with dirac notation, so I am not sure how to use a matrix as an operator where we have wave functions , not "wave vectors"
Answer: Wave functions in ordinary non relativistic quantum mechanics, written $
\psi (x)$, only capture the spatial part of the full state of a particle with spin $\not= 0$. The full state $\Psi$ is equal to the tensor product of $\psi (x) \otimes\chi_{s}$ written as the product $\psi(x) \chi_{s}$ where $\chi$ is the 2s+1 dimensional spin state where s is the intrinsic spin of the particle.
For electrons in a hydrogen atom s = 1/2 so $\chi_s$ is a two dimensional column vector.
The spin operator $S$ acts on the spin part of the total state $\Psi$, which is a 2x1 column vector and as such can be acted on by a 2x2 matrix.
Comment: Sorry to confuse you, maybe in words is easier. A particle without spin can be purely describe by its wave function $\psi$. But when a particle has spin it's state can no longer just be described by this wave function, because it has more degrees of freedom than just $x, y, z$ in $R^{3}$. The extra degree of freedom is captured by the spin part of the state. The $\chi_s$ I mentioned. The spin operators S is a vector operator (S_x, S_y, S_yz), their form can be looked up easily on the internet. Just act S_x, or S_y, or S_z, on the spin state $\chi_i$.
Comment: I kind of got more confused, so is there a way to write out the operator for spin. for example, we write the operator of momentum as -ihbar*partial wrt x, so is  there a similiar way to write the spin operator, or is there no way except as a matrix, which means I just have to know that spin for a electron is either +1/2 or -1/2

the operator of spin


Installing a wireless remote switch for a ceiling fan in an existing single gang box

Question: I installed a ceiling fan that has a wireless remote switch to control the light and fan speeds.  It can be mounted in the wall in an existing single gang box.  However the power to the fan must now be permanently on.  To do this I am assuming that I just need to use a wire nut to  connect the two black wires that go into the existing switch.  I.e., remove the existing switch, connect the two wires going in to the switch, and then mount the remote switch  in the existing gang box.  Is that correct?
Answer: Yes, that will do it. Just remember to turn off the breaker and test wires to make sure they are not energized.


Non-quasi separated morphisms

Question: What are some examples of morphisms of schemes which are not quasi separated?
Comment: Is there a finite dimensional example?
Comment: A morphism is **separated** if its diagonal is a closed immersion. A morphism is **quasi-separated** if its diagonal is quasi-compact. In particular, a quasi-separated scheme over a field has the property that the intersection of two affine open subsets is quasi-compact.
Answer: Suppose $U\hookrightarrow X$ is a non-quasi-compact open immersion. Then you can glue two copies of $X$ together along $U$ (effectively doubling up the complement of $U$) to get a non-quasi-separated scheme $Y$.
By the assumption that $U\hookrightarrow X$ is not quasi-compact, there is some open affine $W$ of $X$ such that the intersection of $W$ and $U$ is not quasi-compact. So there are two copies of $W$ sitting inside of $Y$ (one for each copy of $X$). The intersection of these two is exactly $U\cap W$, which is not quasi-compact. So we found two open affines in $Y$ whose intersection is not quasi-compact, which shows that $Y$ is not quasi-separated.
Now we just have to find some non-quasi-compact open immersions. The complement of the origin in $\mathbb A^\infty$ is one (so $\mathbb A^\infty$ with a doubled origin is a non-quasi-separated scheme).
Edit: Here's another one that I don't completely understand, but gives a finite-dimensional example (zero-dimensional in fact). Consider $X=Spec(\overline{\mathbb Q}\otimes_{\mathbb Q}\overline{\mathbb Q})$. Topologically, $X=Gal(\overline{\mathbb Q}/\mathbb Q)$, with the profinite topology (perhaps somebody could explain how to see this in a comment). In particular, any point is closed, but the complement $U$ is not quasi-compact, so we get another example of a non-quasi-compact open immersion, so $X$ with a doubled point is non-quasi-separated.
Comment: I was just in the middle of trying the example you just edited in! Profinite topology... very nice :)  I'd also like to see an explanation of this...
Comment: A quick explanation to the Galois example: Spec \bar{Q} --> Spec Q is a pro-torsor, in fact a pro-Galois one, with Galois group Gal(\bar{Q}/Q). If we take the fiber product of the torsor against itself, we get the product of Spec \bar{Q} and the Galois group. This is set-theoretically (not scheme-theoretically) a disjoint union of copies of Spec \bar{Q}, indexed by the Galois group.
Comment: See also http://mathoverflow.net/questions/30030/galois-group-as-a-sheaf/30038#30038 for a proof.
Answer: Here is some intuitive propaganda for Anton's answer...
We know that a  qsep (quasi-separated) scheme (over $\mathbb{Z}$) is precisely one where the intersection U∩V of any two open affines, U=Spec(A) and V=Spec(B), is quasi-compact.  Looking at compliments gives a different perspective: that their differences U\V and V\U are cut out by finitely many elements in A,B respectively, meaning that these differences are "easy to see".  I'd say this justifies the following credo:

A quasi-separated scheme is one where any two open affines are "easy to distinguish".
A non-qsep scheme is one containing some "subtle distinction" between open affines.

The two copies of $\mathbb{A}^\infty$ in Anton's answer differ only by the origin, which is "hard to see" in that it cannot be cut out by finitely many ring elements, and I'd say using infinitely many variables to cut out one point is about the most natural way to achieve this.  Thus, I like to characterize non-qsep schemes as containing "(infinitely) subtle distinctions" such as this one.
Further tinkering yields a similar way to think about a qsep morphism $f:X\to Y$.  I'd say the corresponding credo is that:

A quasi-separated morphism is one which preserves the existence of "subtle distinctions".
A non-qsep morphism is one which destroys some "subtle distinctions".

This helps intuitivize theorems like:
(1) " Any map from a qsep scheme is qsep ", because it has no subtle distinction that can be destroyed.
(2) " If $Y$ is qsep, then $f:X\to Y$ is qsep iff $X$ is qsep ", since $f$ destroys subtle distinctions iff $X$ has them.
(3) " If $g\circ f$ is qsep, then $f$ is qsep ", since if $f$ destroyed some subtle distinction, then $g$ could not recover it.
Here is a coarse and a fine justification for this credo in each direction...
Coarse version: By 1971 EGA I 6.1.11, for any cover of Y by qsep opens $V_{i}$, $f$ is qsep iff each preimage $f^{-1}(V_i)$ is qsep.  Thus, $f$ is non-qsep iff there is some qsep open $V\subseteq Y$ such that $f^{-1}(V)$ is non-qsep, meaning it contains some subtle distinction which is lost after application of by $f$.
Fine version: Suppose $f$ is qsep.  By 1971 EGA I 6.1.9, fibre products and compositions of qsep morphisms are qsep, and any universal injection is qsep (for example any immersion).  Now suppose
$S\hookrightarrow X$
$T\hookrightarrow Y$
are any universal injections such that $f|_S$ factors through $T$, for example if $T$ is the scheme-theoretic image of $S$.  Then $T$ qsep $\Rightarrow$ $S$ qsep, hence $S$ non-qsep $\Rightarrow$ $T$ non-qsep, meaning $f$ preserves the existence of subtle distinctions in passing from any such $S$ to $T$.

Non-quasi separated morphisms


ESP32-S3 with Coded PHY using Arduino

Question: I am using a M5AtomS3, which is a variant of the ESP32 using BLE 5. I would like to use the CODED_PHY function to extend the range of my project and develop in Arduino.
Based on this example I need to set CONFIG_BT_BLE_50_FEATURES_SUPPORTED which is supposed to be in the sdkconfig file. However it appears that I have to recompile Espressif libraries.
Is there an easier way of activating this feature or prebuilt libraries that do this?
Why would this feature not be enabled by default, given that the S3 is meant for BLE 5.
Answer: Okay do after a week of messing around I found this library that does exactly what I was looking for.
https://github.com/h2zero/NimBLE-Arduino
The code already supports Bluetooth 5 and extended PHY can be set using nimconfig.h.
If you are using an RF%2 board with the ESP32 then you will need to install the n-ablecore  - https://github.com/h2zero/n-able-Arduino

ESP32-S3 with Coded PHY using Arduino


If $\lvert z \rvert < 1$ then $z^n \to 0$ as $n \to \infty$

Question: $\renewcommand{\abs}[1]{\lvert #1 \rvert}$Let z be a complex number. I would like to show that if $\abs{z} < 1$, then $z^n \to 0$ as $n\to\infty$. Could anyone provide me with a proof of this? I have no trouble showing the corresponding statement if $z$ were a real number.
Comment: Use $|z^n|=|z|^n$.
Answer: $|z^{n}|=|z|^{n} \to 0$ by  the real case since $|z|$ is a real number in $[0,1)$.  If $\epsilon >0$ then there exists $n_0$ such that $|z|^{n} <\epsilon$ for all $n >n_0$. Hence $|z^{n}| <\epsilon$ for all $n >n_0$. This is what it means to say that $z^{n} \to 0$.
Comment: $\renewcommand{\abs}[1]{\lvert #1 \rvert}$Yes, I got this far as well. But how does it follow that $z^n \to 0$?
Comment: @SimonSMN If the norm of a sequence of complex number tends to $0$, the limit of the sequence is $0$. Think geometrically.
Comment: Do you  know  the definition of limit for complex sequences? @SimonSMN
Comment: Got it now, Kavi. Many thanks for your excellent explanation. I needed a reminder of what the definition of convergence for a complex sequence is.
Answer: Let $z=re^{i\theta}$. Then $z^n=r^ne^{i\theta n}$. As $|e^{i\theta n}|=1$, and $r\lt1$, then $z^n\to0$ as $n\to\infty$.
Answer: Let z=modz e^i0 z^n=modz^n e^i0*n as e^i0n is some complex no. And mod z^n is 0 so 0 into any no. Is anyways zero


Mini Whirlpool Refrigerator

Question: I unplugged my refrigerator without turning it off.  Now it won't come back on.  The light works however, the compressor does not.  Will it ever come back on or should I just throw it out.  I've only had it for about 18 months purchased new.
Thanks for you help.
Answer: Refrigerators turn on / off based on the internal temperature, check your thermostat dial and make sure it is set properly - perhaps initially to coldest. If it has a power switch as you said - model number not listed, cycle the power switch.
Some of these units have a trip on the back side of the unit to protect the compressor - check that it is not tripped (might be a red or black push pin style), light will work but cooling will not, it protects the compressor it is an overload, unplugging and plugging while running may have caused this to trip.

Mini Whirlpool Refrigerator


Animated show about a little boy who could travel to different places

Question: The start would always either be the little boy on his bike or playing. He would travel to different places. One place was Canada and he helped drive a train and gave different people syrup. Another place was he went to went visit Narwhals or he went and drove horse carts. I've been looking for this show for forever. The little boy had brown hair and was always traveling with someone else.
Comment: You used the [time-travel] tag for this question, so did the boy explicitly travel through time? If so, how? And what time period was he from originally? Also in roughly which year did you watch this, and was the animation hand-drawn or computer-generated?
Answer: Is this Justin Time (2011–2017)...?
According to the Wikipedia page, it's an animated series about a boy named Justin who has "adventures through time and around the world," alongside his shape-shifting sidekick, Squidgy. Their best friend, Olive, also appears in each episode.

Justin Time is a Canadian animated television series created by Brandon James Scott and developed by Frank Falcone, Mary Bredin, and James Scott. The series premiered on September 22, 2011, with the finale airing on June 24, 2016. A total of 76 segments in 39 episodes were produced. This show was made for Disney Junior in Canada.
[...]
The series revolves around the adventures of Justin. In every episode, Justin encounters a problem of everyday childhood (such as sharing, teamwork, or paying attention). Then, Justin and his shape-shifting sidekick Squidgy solve the problems by tackling them in adventures through time and around the world. In every adventure, Justin and Squidgy meet their best friend Olive, who always lives in the place and time they are visiting, and who usually needs their help to accomplish a task. Together, the three of them encounter the same problem that Justin faces in his world, and together they solve the problem before he gets called back by his parents to his world.
In the original concept, Justin travelled via a time machine, which led to the title "Justin Time". Because the concept of "the past" is challenging for preschoolers, the TV series instead focuses on more developmentally appropriate adventures of fun.

According to the IMDB episode guide, a segment in S01E11 titled "The Pancake Express" involves Justin and Squidgy driving a steam train through the Canadian wilderness with a barrel full of maple syrup as their cargo.

'All aboard!' Justin and Squidgy are driving a steam train that chugs through the Canadian wilderness. Olive joins them and loads the train with some very important cargo - a barrel full of maple syrup for the Pancake Festival in Flapjack Falls! Justin, Olive and Squidgy face challenges along the journey, but Justin is determined to deliver their cargo on time!

A segment in S02E05 titled "The Northwest Shortcut" involves Justin, Olive and Squidgy helping a narwhal tangled in seaweed while journeying to the Northwest Passage.

The Northwest Shortcut - The The sea is freezing over. Justin, Olive and Squidgy are in a hurry to find the Northwest Passage but they take some time to help a narwhal tangled in some seaweed. The thankful narwhal comes back later to return the favor when the ship gets stuck.

Justin evidently has brown hair, judging by the opening below.


Why would a shallow well pump go on and off too much?

Question: Shallow well pump pressure goes up to 50, then pump shuts off, even though the tap is still on. With a small, I think 2 gallon, pressure tank, usually the pump stays on until you turn off the tap. Water pressure seems fine, but the pump is going on and off too much.
Answer: Your pressure tank is what is considered "water-logged". If it is a bladder tank, the bladder inside the tank may need to be re-pressurized or perhaps the bladder tank needs to be replaced. There is an air valve on top to do this, if it only needs re-pressurizing.
To my recollection, and I may be wrong, and possibly your specs may differ, the tank, with no water in it, and the pump turned off, should have about 7 PSI of pressure in the bladder. You may need to drain the water lines in the house to do this. When the tank is then working with the system and the pump increases the pressure to 40 PSI+, then the pump should cycle as it used to.
Comment: Non-bladder tanks, (air accumulator, floating disc separator), drain until the tank is empty of nothing but air. If there's an air-charge Shrader valve on the manifold, you can use compressed air to hurry the process. Depending on water use, non-bladder tanks need to be recharged with air every 3-6 months as the air diffuses into the water and slowly gets removed. Bladder tanks that have a perforated bladder will hold no pressure when the tank is empty, replace. Bladder air pressure will be 5-20psi depending on manufacturer, is usually posted on a ring escutcheon around the Shrader valve.


iPhone 6 low on storage and becoming non-functional

Question: I have a 64gb iPhone 6. I've been butting up to my local storage limit for a while now but yesterday all my photos disappeared and most of not all of the apps on the phone no longer open. I've deleted several very large apps, but every time I do the available storage only goes up temporarily before getting very low again. I've been able to open a couple apps now but still no photos (the app never even opens). I've tried syncing to computer but it doesn't recognize any photos on the device. This happened once this summer but only lasted for a few hours. This is well past the 24 hour mark. I would prefer to back up the photos before going the nuclear option of restoring it. Any ideas of what I could try would be appreciated?
Comment: Afaik, photos don't sync from the phone, only to the phone. You back them up to Photos. (Note: I don't use any cloud service so this is for phone/computer only)
Answer: I am assuming here that you have synced your phone to a Mac or PC and continue to do so? If so and you have the options in iTunes checked to sync photos (on a Mac it would be photos.app and on Windows it is usually a folder in your Pictures folder) you should be able to verify that they are on your computer.
Once you have found your missing photos and verified all you need is safely on your computer I would do a wipe and restore. That cleans out temporary/cached files and files left over from deleted apps and the like. To be safe I would make another backup of your phone on your local computer. And I would password protect the backup so it preserves any passwords saved on your phone. Once that is done...
On the phone it is in Settings > General > Reset > Erase All Content And Settings.
Erase the phone and then restore it from the backup you just made. That, in itself, may clear enough space on your phone to help the issue. If not you may have to remove some apps, music or photos to clear more space.


Do browsers validate SSL key with CA for CORS Ajax requests?

Question: Does the iPad browser go look for CA recognition of an SSL key offered by the server during an Ajax request?
A mobile app I'm developing will use PhoneGap which means that the main page is loaded already by the time the additional resources get loaded.  As such, the Ajax requests to the server are essentially CORS over SSL.
One of the final critical issues I face in my threat assessment is how to avoid the possibility of a malicious user tricking the DNS service so that requests would go to another server and potentially upload sensitive data.  For this, I would like to know if the browser will fully validate the SSL key before sending the request?
If not, is there another way that I can be certain that my Ajax requests are going to the right place?  Other than hard-coding the IP-address into the app? (which would still leave a slight vulnerability)
Thanks!
Tyler
UPDATE:
I believe I have answered the question, and the answer is "Yes."
Wish that I could offer a definitive answer, as with a reference to the HTML specifications for XmlHTTPRequests, but instead all I have are experimental results.
I started up a PhoneGap app and was able to make a simple jQuery.ajax() request from

https ://www.google.com/  (surprise)
http ://www.pcwebshop.co.uk/

Both returned http status 200, etc., not surprising.
But https://www.pcwebshop.co.uk/, which has a self-signed certificate, fails and the jqXHR request object has the following:

textStatus: 'error'
status: 0  (not an XXX http status)
responseText: [empty]

So it's an inductive conclusion but should work.  Still interested if anyone can answer this canonically.
Answer: It wouldn't be implementing HTTPS/SSL correctly if it didn't validate that the server certificate is trusted. NB 'certificate' not 'key'.