Font identification - Interesting federal gov. typeface that's simple, but hard for me to ID

Question: Found this interesting font on a government letter in an archive. Would love to learn the type face!
Comment: There are many very similar on whatthefont. The only thing really 'interesting' is the kerning appears to have been done on horseback ;)
Comment: And despite the "lovely" characters they couldn't spell FORWARDING correctly.  [sigh]
Comment: There is always a sacrificial tpyo in printed matter. Just be glad it wasn't a misspelling of "Public"
Comment: Haha yeah fair enough, but I kinda love it?
Comment: imho there's strange letter spacing in this font
Answer: The general genre is neogrotesque, and it looks like Univers was the main inspiration or even that this is a licensed version of it. A lot of characters especially GQty17 are very similar, almost identical. (It's heavily inked so it's hard to be sure what the original font design looks like underneath the noise.)
Here's a remake in U001, URW's version of Univers:

But the spacing is very different to any version of Univers I've ever seen. Univers has very regular spacing, this has lots of weird gaps like at the "vic" on Services or after the "r". So this doesn't look like Univers in metal type or phototype-it looks like something made by some kind of limited lettering or reproduction machine. The odd spacing on the lower case suggests a machine which had to use a set of specific character widths. It reminds me a lot of an adaptation IBM did of Univers for typewriter-but that looks different to this, far more tightly spaced. (Tighter than the metal type, in fact.) Overall this feels like something drawn by an engineer creating a machine, one in which the letterforms weren't the highest priority.
More subtly, this could be the effect of ink spread and I'd need to measure to be sure, but this also feels a bit more monoline than most standard font design, the horizontal strokes would perhaps normally be slightly thinner compared to the verticals. But it's subtle and I could be seeing things on that one, it could be an effect of the reproduction method.
To find something like this, I would search for fonts in the neogrotesque style but not the famous ones, not Helvetica and Univers and Folio, look at more recent fonts by more experimental designers interested in more "outsider art" feeling fonts. Authentic Sans has a lot of the "not-designed" feel of this font, it's free in the basic styles with a paid-for version in more weights, and maybe also check out Reader by Colophon too. Or look at Fonts In Use and start clicking through the neogrotesque fonts that have been popular lately.
There's a freeware digitization of Univers in eight styles called U001 (released by font digitization company URW for a freeware project-long story), which I used for the remake. But it's not going to look quite like this in overall color, it actually has more stroke contrast than the original Univers, so it's going to look much more "designed" than this. Still, it's a nice family and I use it often.
Comment: Yeah, I think it's very likely some sort of type/reproduction machine font. It's definitely older than 20 years given its location in the archive. An IBM printing machine using a (perhaps dumbed down?) version of Univers for large-scale operations would make sense.
Comment: ZIP+4 was introduced in the early 80s. Federal Government agencies would have  adopted it quickly. The comma before the state was "officially" deprecated in the mid-90s by the US Postal service I think (formalization for electronic sorting)
Comment: There are signs that this is a dot-matrix font, especially on the curves. I expect it doesn't read that way because it was used as art for a press and so photo thresholding/contrast > plate (no halftone) > ink. If dot matrix, then it would probably be a device bitmap font
Comment: That's a good point. I'm not sure it's dot matrix, it could also be some kind of font made of straight lines rather than complete curves so the curve is actually lots of small straight lines linked up. But I think tracking down someone who worked in government printing at this time would be your best bet. Post on some LinkedIn or Facebook group for retired government workers?


How to scale a monolith's release process?

Question: There is a back end application with a few development teams working on it. The application is a monolith. Before releasing any new features they need to be system tested on the last application's version(to avoid bugs). That said, the current process is teams taking turns, doing manual testing and then releasing. This makes the release process a bottleneck.
Is there a way, other than microservices, to speed this up? Something like automating the system testing by qa engineers? Would that be a good and safe practice? Is there another way to scale this release process?
Comment: @CapBarracaduas just for clarification. You are looking for a way to articulate the lifecycle of each new feature. E2E, from development to release. Am I right?
Comment: yes, I want each team to be able to release their features independently(as much as possible) without having to queue up too much(waiting to do manual testing on the last version) without adding risk to the process
Comment: The fact you gave us so few information about your release process (except that involves lots of manual testing) gives me the impression there could be two reasons for that: either you were to lazy to give us more detailed information (maybe because you were wrongly assuming it is not important), or you have actually no idea where the bottlenecks are.  For the first case, I recommend you edit the question and improve it. If it is the 2nd, follow Thomas Owen's advice: make a thourough analysis of the release steps and measure how long they take, the focus on the bottlenecks.
Comment: To be honest I can't see any bottleneck other than the manual testing part.
Answer: Reliance on manual testing is almost always a bottleneck. If you were to only use automated testing for regression testing, you would be able to run your regression tests far more frequently. This means you won't be waiting until your release process to find potential issues as early as commit time. If you incorporate the creation and maintenance of automated testing as part of your development work, you can ease the integration burden as well. By automating these tests, people can focus on exploratory testing to think through edge cases and how end users will interact with the system, which could result in other interesting test cases to automate.
I would focus on test automation before thinking about decomposition into microservices. If you were to split your monolith into separate buildable and deployable modules, you would lose opportunities to find errors at build time. Plus, having robust automated testing at all levels would allow you to perform any refactoring necessary to split functionality into services.
Depending on what your release process is, there may be other opportunities for improvement. One option to consider would be to create a process map or value stream map of your development process, perhaps focused on your release/deployment activities, and see where your time is spent. Understanding steps that take a long time or segments where people are waiting can help you find places to improve.
Answer:
automating the system testing by qa engineers?

Yes, using a tool like Selenium or SmartBear would certainly help you detect regressions.
It's no substitute for manual system testing and
acceptance testing, but it can definitely reduce the time needed.
You didn't mention your release pain points.
What defects manage to get through {part of, all of} your process,
and how many {dollars, man hours} are you willing
to spend to improve those KPIs?
Improve them by how much?

A relatively low cost technique you can use is Feature Flags.
Then new feature code can be released in production
in an "inert" state.
Individual testers can enable it as needed.
You can do a
canary release,
and rapidly back it out if things don't go well.
Answer: I will appeal to the last comment

I want each team to be able to release their features independently(as much as possible) without having to queue up too much(waiting to do manual testing on the last version) without adding risk to the process

Ok, manual testing is lagging for sure, but whether these they are the real bottleneck or not, I'm not so sure.
I think @ThomasOwens hit the nail

Depending on what your release process is, there may be other opportunities for improvement. One option to consider would be to create a process map or value stream map of your development process.

They become a bottleneck when we  turn them into a gateway. Turning a stage of the release process into a gateway is rather an organizational issue.
To the said above, I would add an evaluation of the teams (its composition) and the distribution of the work. These are factors that potentially generate bottlenecks due to dependencies. Siloed teams, teams by stack, and homogeneous setups are often very dependent and not very autonomous. However, when work is distributed by verticals (complete business or functional units) and teams are cross-functional, the work happens with higher levels of autonomy.
When you enable the previous, then it's time to look for techniques to mitigate the unwanted but possible dependencies and bottlenecks. For example, the well-known feature flags, modularization, plugin & microkernel architectures, microservices, etc.
Now you have several teams, working on "decoupled" business units, with few or no dependencies. It's time for you to provide them with resources to run automated, manual, exploratory or monkey tests in parallel too. For example, think about sandbox test environments deployed in IaC fashion.
Bear in mind that the technique (how) serves the strategy (what) not the other way around.
Answer:
Is there a way, other than microservices, to speed this up?

I think a lot of people get stung thinking that because they call things microservices and adopt its form, they must therefore be gaining something.
Like all forms of componentisation, it only really works if firstly the software design itself is amenable to some kind of componentisation (that is, independent staffers or teams can proceed with the design of their component, without unreasonable overheads of communication or ongoing coordination with other teams), and secondly if the whole is just so big that you need to allocate different full-time teams to different components (you can't do it monolithically).
If the software isn't amenable to componentisation, then you end up with a kind of faux-componentisation where the design itself is still monolithic but the implementation has all the overheads and trappings of multiple components.
And if the same team handles all components, then clearly the design process is still monolithic, but now your team have extra overheads for nothing - there's no second team existing to justify those overheads.
Even if the componentisation occurs because a future second team is anticipated, without the actual contemporaneous existence of another team, it's very unlikely the design will be done in a way that is sensible and actually allows another independent team to adopt the component later.
The definition of a monolith, in my view, is that it is designed by one mind - whether an individual or a team. It isn't specifically about any particular pattern manifest in the source code or arrangement of machinery.
A monolith may have internal modularity for good housekeeping - what it doesn't have, is the capability of more than one team working on it at a time.
Monolithic design is invariably the most efficient, until the scale and complexity exceeds the capability of one individual or team mind to work with it.
You only need to consider non-monolithic designs at the point where you have at least two independent development teams who do not (and would not be expected to) work on any component besides their own, because by definition the design is so complicated it needs two full-time teams just to marshal enough intellect.
Many systems with microservices end up as a poorly integrated, non-transactional menagerie, with an unfathomable number of implied constraints that operate across interface boundaries. Not only are these designs often flawed from the outset, there is often no hope later of modifying anything in the zoo independently of anything else.
Even just simple things like you can't temporarily turn one service off for maintenance independently of any other, and expect things to catch up later. So you don't even have independence of maintenance and deployment. It's faux-componentisation; it's still monolithic in design and operation.


How to store data / use databases with Windows Universal Apps (C#, XAML)

Question: I'm looking into developing Universal Windows Applications with C# and XAML. If I were to design an application to log user's meals (nutrition log app) I'd need a database of foods (nutrition data - protein, fat etc.), user's data (age, weight, height, goals, calorie needs etc.) and meals (time, foods consumed, quantity of each etc.).
Some of these would be local, some not.
QUESTION: What's the best approach to take here, what kind of databases should I be looking into, what form to store data in, what's the best way to store a lot of data and have it readily available, what do others use with Universal Windows Applications?
Side note: I've written a simple C# Console Application that takes my data, calculates my needs, allows me to input food's nutrition data and then use that data to log meals. This data is written in separate XML files (user.xml, meal.xml and food.xml). I can do all kinds of queries using LINQ - what I've eaten in the last X days, how much do I still need to eat today, how much protein does food X contain... But XML can't be the best way to store and handle lots of data.
Help appreciated!
Answer: You can use SQLite. It is a full-blown SQL relational database which stores its data in a single file. It has ports for PCL and Universal apps, and has a .NET connector which allows it to work with ADO and LINQ. See download page.
Answer: We have been using SQLIte and its working fine for us.
You can use either SQLIte PCL if you wish to work with raw SQL queries or SQLite NET which gives you object instances to play with.
Only catch is that SQLite is a native component which forces you to build against three CPU archs x86, x64 and ARM. So you need to have three different build output. Some details here http://codifyit.blogspot.in/
For your data which you does not get updated too often, you can use some kind of database caching controlled from your code.
cheers,
Saurav
Answer: We are using Azure Mobile Apps and leveraging;
using Microsoft.WindowsAzure.MobileServices.Sync;
using Microsoft.WindowsAzure.MobileServices.SQLiteStore;

With these you define a local data store;
MobileServiceSQLiteStore store = new MobileServiceSQLiteStore(ApplicationData.Current.RoamingFolder.Path + "\\MyLocalSQLite.db");
Debug.WriteLine("Database Location: " + ApplicationData.Current.RoamingFolder.Path + "\\MyLocalSQLite.db");

store.DefineTable<Account>();

await App.MobileService.SyncContext.InitializeAsync(store);

This allows you to store data in the cloud as well as locally using
private IMobileServiceSyncTable<Account> accountsTable = App.MobileService.GetSyncTable<Account>();

You will need to read up on using them a bit, but its fairly strait forward.
https://blogs.msdn.microsoft.com/azuremobile/2014/04/07/deep-dive-on-the-offline-support-in-the-managed-client-sdk/ got me started.
These tables can convert to collections;
Accounts = await accountsTable.ToCollectionAsync();

which you can then bind to with your UI.
All in all its a pretty slick system once you make it up the learning curve, some of it is still pretty new though, and you will run into a few gotchas.  Happy Coding!


what progression is it in the mario theme song?

Question:
it's in key of c and it seems to be Fm7 -Bb7 - C. Is it a change of key here and what function does it provide?
the part before this progression
Comment: The G#s ought to be Ab, but hey ho. It's in C by the look of it, so is returning to C. But from where? The previous 3 or 4 bars might help.
Comment: @Tim picture 1 is right after picture 2
Answer: Trusting solely your guitar sheet music, the chord progression is indeed Fm7/C - Bb7 - C.
From what I recall of fuller versions of the famous Mario theme, there's an Ab in the bass at the first chord of your excerpt, so I often interpret that excerpt as an inflection towards C minor. The repeat snaps back towards C major pretty hard, but the part after the repeat (starts with C-C-C-C-D-E-C-A-G) stays in that C minor-like territory for a little while afterward.
This theme borrows so many chords from the tonic minor that it's tough to completely justify whether it's in C major or when it switches between major and minor, though.


FCM push notifications to Chrome while killed

Question: I'm having a problem receiving push notifications to an Android Chrome PWA when no Chrome apps are running.  I can reproduce this with 3 different public web-push examples.  The first question is should a web-push example work the same as a PWA with web-push? That is, should a web push on Android be able to be received and display a notification even if the browser is not running. Docs seem to say yes.  Why does the test below not confirm this.
Problem Description
The problem does not affect Firefox.  There are other posts that have attributed similar behavior to the payload of the message (data and/or notification) or the battery optimization settings.  Altering these variables doesn't seem to improve my situation.  Here's a method for reproducing the problem using one of the online examples (Thanks to Carlos for pulling this together..see code here).
Reproduction Steps

Open up Carlos demo on your Android phone.  Accept the notification permissions and ensure that you can send yourself a notification.
Open up the same page on another machine.  Ensure that you can send your phone a push notification using the "Send to all subscribers immediatelly"[sic] function.
Kill all the Chrome apps on your android device.  To be on the safe side, kill all your running apps cause I've found it not obvious what's using chrome and I think this has confused a lot of previous posts/answers.
Repeat step 2 on the second machine.  You should not get the notification on Chrome.
Once you're convinced the message is not coming, open any Chrome app.  After a few seconds, you should receive the notifications.

Repeat all of the above with Firefox on Android and you will get the notification in step 4.
You can run a similar tests here or here.
Comment: Possible related Chrome bug - https://bugs.chromium.org/p/chromium/issues/detail?id=935931
Comment: I believe this is resolved in Chrome Dev 74
Answer: There are several bugs related to this issue on Chrome.  The problem is resolved in Chrome Dev 74 which is due to be stable on Apr 23, 2019.


IS SharePoint 2007 compatible with SQL 2008 SP3?

Question: IS SharePoint 2007 compatible with SQL 2008 SP3? I didnt find any know issues with this combination and or a support document which says it is compatible.
https://docs.microsoft.com/en-us/sql/reporting-services/install-windows/supported-combinations-of-sharepoint-and-reporting-services-server
Answer: Yes, It's compatible. Just make sure you use MOSS SharePoint Service Pack 3, and you should be just fine.
Also there's no difference to SharePoint concern whether you use SP2 or SP3 on the SQL Server. In general SHarePoint installations work with one version up and down of the current minimum requirements. As SharePoint 2007 minimum requirements are SQL Server 2005, all versions of SQL Server 2008 (including R2) works properly.
Reference: MOSS 2007 SP3 with SQL Server 2008 R2
Comment: @moe True, but there are no difference when it comes to SharePoint 2007 whether or not you use SP2 or SP3. Maybe I was a bit sloppy not explaining that :-/
Comment: That supplements the answer well. It's good to be added!
Comment: Doesn't the reference actually contain SQL Server 2008 R2 SP2 related discussion, not SP3?
Comment: If it is not MOSS SharePoint Service Pack 3, will that be any problem? i mean lower patch version of SP 2007 doesnt work with SQL 2008 SP3?
Comment: @AchieverSP Sure. To install SP3, you first need vanilla, SP1 and SP2. So it will work ;)
Answer: Yes, SharePoint 2007 is compatible with SQL Server 2008 Service Pack 3.
As your link covered the "Supported Combinations of SharePoint and Reporting Services Components", I'm assuming you are after these features. So, for the Reporting Services, you need to have this additional Add-in installed:
Microsoft SQL Server 2008 SP3 Reporting Services Add-in for Microsoft SharePoint Technologies
Comment: We are upgrading the Windows server from 2008 to 2012, and only SQL Server 2008 SP3 is compatible with it and not SQL Server SP2. Unable to find a related literature for this combination ( SharePoint 2007, SQL Server 2008 SP3, Windows Server 2012). Thanks for your suggestions.
Comment: @AchieverSP I'd advice to ask only one thing per question, but briefly about that: it depends where you are installing Windows Server 2012. SharePoint 2007 **can't** be installed on Windows Server 2012. SQL Server 2008 SP3 **can** be installed on Windows Server 2012 ([source](https://support.microsoft.com/en-us/help/2681562/using-sql-server-in-windows-8-and-later-versions-of-windows-operating-system)). You can use SP 2017 with an SQL Server 2008 SP 3 hosted on Windows Server 2012.
Comment: Yes but just want to be sure that any patch version of SP 2007 or does it need SP 2007 SP3 to connect SQL Server 2008 SP3 ?
Comment: @AchieverSP I think Benny Skogberg has already answered that question above. See https://www.habaneroconsulting.com/insights/sharepoint-sql-server-support-matrix#.WT7D_OuLRhE - this suggests SP1 is the minimum.


Zenoh with turtlebot4

Question: as mentioned in this ticket, we are facing problems in running reliably the turtlebot4 (aka T4) with nav2. This robot has a raspberry PI communicating over USB (simulated as an ethernet communication) to an "embedded processor" which runs a closed source fw. The problem seems to be triggered during the discovery process (not clear yet which is the real cause) and ultimately seems to impact the CPU usage of the embedded processor of the robot. In the ticket mentioned above, we are using FastDDS. Recently I have seen that at RosCon23 there have been demos running one and two T4s with Zenoh. Has anyone tried a similar configuration? There is some info here, but I couldn't find any details about those demos. Thanks
Answer: I recently gave an online webinar about the Zenoh plugin for ROS 2.
It includes a detailled explanation of the Turtlebot4 + Zenoh demo we showed at ROSCon 23.
Here is a direct link to this sequence:
https://youtu.be/-WZAA35jLxc?t=1525
And here is a short description of the setup:

On Turtlebot4:

Use those ROS settings:
ROS_DOMAIN_ID=0
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

Use this CycloneDDS configuration file:
<CycloneDDS>
  <Domain>
    <General>
      <Interfaces>
        <NetworkInterface name="usb0"/>
        <NetworkInterface address="127.0.0.1"/>
      </Interfaces>
      <DontRoute>true</DontRoute>
    </General>
  </Domain>
</CycloneDDS>

Install the zenoh-bridge-ros2dds binary following the instructions
Use such Zenoh configuration file, replacing the 192.168.123.130 IP with your Turtlebot4 WiFi IP (or better, its hostname):
{
  mode: "peer",
  listen: { endpoints: ["tcp/192.168.123.130:7447"] },
  plugins: {
    ros2dds: {
      id: "bot1",
      namespace: "/bot1",
      deny: {
        publishers: [".*/_internal/.*"],
        subscribers: [".*/_internal/.*"],
        service_servers: [".*/_internal/.*"],
        service_clients: [".*/_internal/.*"],
        action_servers: [".*/_internal/.*"],
        action_clients: [".*/_internal/.*"]
      },
      pub_max_frequencies: [
        ".*/image_raw=10",
        ".*/camera_info=10",
      ],
    },
    rest: { http_port: 8000 }
  }
}

On your teleop host

Use those ROS settings:
ROS_DOMAIN_ID=0
ROS_LOCALHOST_ONLY=1
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

Install the zenoh-bridge-ros2dds binary following the instructions
Use the same Zenoh configuration file than on Turtlebot4, but replacing:
listen: { endpoints: ["tcp/192.168.123.130:7447"] },
with:
connect: { endpoints: ["tcp/192.168.123.130:7447"] },
Run rviz2 or any teleop/navigation ROS 2 node, without any namespace remapping
Answer: I can get this to work (needed to remove the id tag on the desktop machine as well to get it to receive).
I am trying to use it with multiple turtlebots now on one network, with the turtlebots isolated from each other.
So I have one in the /botE namespace, one in the /botF namespace, and they are each using different ROS_DOMAIN_ID values. When run separately it works with navigation etc running fine
As soon as they second turtlebot bridge is started the desktop that is configured to hopefully just see botE sees all the topics from that robot, I run ros2 topic list but it also lists the topics for the other robot, with the namespace left on (/botF/cmd_vel for example). As they are configured to connect to connect to the bridge on one robot, and they are in different ROS_DOMAIN_ID I would not expect to be able to see them.
I have tried adding "/botE/.*" to the deny publishers in the config file on the desktop, but this has made no difference to what I see when I run ros2 topic list

Zenoh with turtlebot4


Cross-Over Interactions: understading the extent of the switch in sign

Question: I estimated a model for which I tested the assumption that the effect of my variable of interest is homogeneous for observations belonging to two different groups (for simplicity assume rural/urban).
Results show that, on the one hand, both the main effects are not statistically different from zero*, on the other the interaction term is statistically significant. This denotes a cross-over interaction where the effect changes direction in sign according to the group being considered.
Specification ONE:
In this particular example I constructed the dummy as 1 if the observation is a rural household, 0 otherwise. As anticipated above the only statistical significant coefficient is that of the interaction term, which is negative (-0.62), thus the overall effect for rural households coincides with the interaction's coefficient.
I thus reject the assumption that the effect of my variable of interest is homogeneous for the two groups.
However, I am interested to see the extent of this switch in sign of the coefficient of interest.
Specification TWO:
Conversely, if I construct the dummy in the opposite way (i.e 1 if the observation is urban, 0 otherwise) and estimate the same model. I get the following results:

interaction: statistically different from zero (0.62);
main effect of variable of interest: statistically different from zero (-0.63);
main effect of the dummy defining the groups: not statistically different from zero.

The overall effect of the interest variable for urban households equals -0.01.
However, two questions arise:

Given the detection of a cross-over interaction in the first specification, is it worth computing and showing the results re-computing the dummy for rural/urban as in specification two above? As a reader I would like to see at what extent the effect is positive (something I cannot see from the results of specification one).
Can I still talk of cross-over interaction even if in specification two I get a rather very small but still negative and significant effect?

Note: Statistical significant results are those for which p<0.05; for not statistically significant results p>0.1.
Answer: When a cross product is in the model the effects of other variables are really simple effects: they are effects when the other variables are 0. You might find your results more interpretable if you use contrast coding (-1,1) and center your other variable.
Comment: I see your point. However, the contrast coding will allow me to explore the differences in mean of the two groups. Moreover, its interpretation is straightforward only for farily balanced designs. I do not see how this is able to provide an answer to my question. What I am interested at is the change in sign and the magnitute of the overall effect by group, not difference in groups' means.


What's the best way to check if an SMTP server is SSL-enabled or not?

Question: What's the best way to check if an SMTP server is SSL-enabled or not?
Follow-up question: How do I make it SSL-enabled if it's not yet SSL-enabled.
The OS is CentOS.
Answer: That depends whether you mean SSL or TLS.

SSL has it's own dedicated port at TCP/465. The best way to test for it's presence would be to use OpenSSL's wonderful s_client which will negotiate the SSL trickery for you.
  openssl s_client -connect localhost:465

If your server isn't bound to localhost then obviously replace that with the IP or hostname.

TLS looks just like normal SMTP at first. The encryption is negotiated from and on-top of the plain-text protocol. You can test whether it is available by issuing an EHLO request to the server. You can use Netcat or Telnet clients for this.
  $ nc -v localhost 25
  localhost [127.0.0.1] 25 (smtp) open
  220 mail.example.com ESMTP Exim 4.69 Fri, 11 Sep 2009 09:25:20 +0100
  ehlo test
  250-mail.example.com Hello localhost [127.0.0.1]
  250-SIZE 10485760
  250-PIPELINING
  250-STARTTLS
  250 HELP

The important line is second from last (250-STARTTLS) which advertises the STARTTLS capability.
In order to say how to enable SSL/TLS for your mail server you'll need to tell us what mail package you're using.
Comment: You can use openssl for TLS too, if you add -starttls smtp
Comment: This answers mixes up the terminology big time !!.  SSL and TLS are simply encryption protocols. When the poster talks about 'TLS' I believe he really means 'STARTTLS'. See my answer below.
Comment: I really meant SSL. Thanks! But don't remove the part with TLS; I'd probably refer to this thread again when I'm dealing with TLS already.
Comment: Beware that a server offering `250 STARTTLS` may still be configured to use *opportunistic TLS*, which means that it will accept it when the client chooses to continue without it. You usually want the server to use *enforced TLS*, so it aborts the connection when the client does not answer `STARTTLS` to start establishing a TLS connection. See also: [How to check if a mail server is Enforced-STARTLS rather than Opportunistic-STARTTLS?](https://security.stackexchange.com/q/252325/134095)
Answer: In my mind the answers given on this page are simply wrong.
The reason is that SSL/TLS + SMTP can mean two different things.
One is where you wrap the socket in SSL/TLS. If the server wants to service both unencrypted and encrypted traffic then it needs two ports for this purpose, one for each type of traffic. By convention SMTP servers normally uses port 25 for unencrypted traffic and port 465 for encrypted traffic. By use of external tools such as stunnel this can actually be implemented in such a way so that both the client and the server are unaware that the actual traffic travels on an encrypted socket. So you can implement this approach even if your SMTP server does not support SSL/TLS .. but servers like sendmail and postfix do support this so no need for an external tool.
The other approach is that STARTTLS is used. This is an extension to the SMTP protocol and thus requires both the server and the client to support it. Using STARTTLS the server can serve both encrypted traffic and unencrypted traffic over the same socket, i.e. you can use port 25 for both. You can see if a SMTP server has STARTTLS enabled by connecting to it on port 25 and issuing the EHLO command as Dan explains elsewhere on this page.
Both SSL and TLS are just encryption protocols, TLS being the successor to SSL.
I've got my info from here.
The confusion between the two approaches is accelerated by the terminology used by SMTP servers. Think of Postfix's parameters smtpd_tls_security_level and smtpd_use_tls and their associated documentation. These parameters deal with STARTTLS, not as such with TLS. Other SMTP servers does an equally great job at confusing the terminology.
Answer: There's a simple tool for this. You send them an email and they reply with a bunch of details:
https://www.checktls.com/perl/TestSender.pl
Answer: If you are running CentOS, you are probably using Sendmail.  Install the Sendmail-mc package.  Inside the /etc/mail/sendmail.mc are some directives for you to look into for TLS:
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl #     cd /usr/share/ssl/certs; make sendmail.pem
dnl # Complete usage:
dnl #     make -C /usr/share/ssl/certs usage
dnl #
dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
dnl define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
dnl define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl

Once you have that working, you can enable Sendmail over SSL with something like so:
DAEMON_OPTIONS(`Addr=188.8.131.52, Port=465, Name=SSA, M=Eas')

Oh, and block a bunch of time to play with it before you get it right.
When I've done this, I've almost always had to run three instances of sendmail:

one with TLS enabled on port 587 with the various SMTP-AUTH configurations (so authenticated remote users can send arbitrary mail);
one with SSL enabled on port 465 with the various SMTP-AUTH configurations (same reason, different clients (thank you Microsoft Outlook "Express"); and
one with TLS enabled but no AUTH, locked down so that it only receives mail for valid local recipiants (remote senders can use TLS or not as they like).

Each one had a separate config file.  There should be a way to get the first two to run as the same instance listening on both ports, but I could never get it to work right.
If you get big enough, these different instances can get run on different machines.


Cannot find downloaded file(mp4)

Question: I have downloaded a video file from youtube via command line (youtube-dl) but couln't find it and when I again tried to download the same file the terminal says the file is already downloaded but after rigorous searching of the file in every folder I was unsuccessful.I have only one partition. My O.S is Ubuntu13.10.
Comment: on the same terminal run `pwd` command.The output shows some directory path. Your youtube file would be downloaded on that directory itself.
Answer: By default the videos should be downloaded into the current working directory.
If you're not sure where you are, just run nautilus . from the command line where you are and that should open up a file browser. Or you can run pwd to get the path.
There's quite a good recent answer pointing out how to change the default location for youtube-dl which might help you in the future.
Comment: And don't forget the `.` after nautilus in `nautilus .` otherwise it will open up your home folder.
Answer: You could use the find command to search for it, if you'd like.
find ~/ -type f -iname 'somename'

Search for all files (-type f) in the ~/ (home) directory with name (case insensitive) somename. You can also use -iname '*.flv' if you know what the file extension is (in this case, .flv).
Comment: Nope. couldn't find it.
Comment: Assuming your `find` statement was correct, that actually means the video doesn't exist anywhere in your home directory.
Answer: From the instruction:
Example: youtube-dl "http://www.youtube.com/watch?v=foobar". The video will be saved
to the file foobar.flv in that example. As YouTube.com videos are usually in Flash
Video format, their extension should be flv.

The name depends from your link, the path should be the current (pwd show whichis)
Answer: check in your home directory for the downloaded file

Cannot find downloaded file(mp4)


Does the distance increase as the polarity increases?

Question: According to the dipole moment's definition, as polarity increases, the distance between the centres of positive and negative charges increases. In the ionic bond, as the polarity is maximum, the distance between the two charged centres is maximum. Is this concept correct? If not, what is the relationship between distance and polarity?
Answer: I'm not sure if the guideline actually works out in empirical observations. There are at least two factors affecting bond length - atomic radii - and polarity of the bond. A more polar bond will have a less even distribution of electrons. The electron density will generally be closer to the more electronegative atom. This isolation of electrons may have the effect of "stretching" the bond.
Consider the following two molecules, both of which are linear and polar:

From polarity considerations alone, we might expect the $\ce{H-F}$ bond to be longer than the $\ce{H-Cl}$ bond because fluorine is more electronegative than chlorine. However, chlorine is a bigger atom than fluorine by nature of having additional sublevels of electrons.
Also, consider the below data: bond length actually increases with decreasing polarity (quantified through dipole moments).
Fluoromethane Bond length 136pm, Bond strength 108 kcal/mol, Dipole moment (D) 1.85
Bromomethane Bond length 178pm, Bond strength 84 kcal/mol, Dipole moment (D) 1.87
Chloromethane Bond length 193pm, Bond strength 70 kcal/mol, Dipole moment (D) 1.81
Iodomethane Bond length 214pm, Bond strength 56 kcal/mol, Dipole moment (D) 1.62
The unfortunate thing about your guideline is that I thought that it would work at least across periods - in which atomic size stays relatively constant. However, the facts do not fit the case. Consider $\ce{H-N}$ and $\ce{H-O}$. Oxygen is more electronegative than nitrogen; we'd expect the $\ce{H-O}$ bond to be more polar, and thus longer than the $\ce{H-N}$, at least according to your guideline. The opposite is actually true; the $\ce{H-O}$ bond is actually shorter than the $\ce{H-N}$ bond.
Comment: So what is the role of distance in measuring the degree of polarity.According to u , polarity is inversely proportional to the distance?Can u plz explain?
Comment: I didn't say that. I think that you should consider bond length on a case by case basis as there are several factors.
Comment: Can u give me the actual answer:what is the role of $d$ in measuuring the polarity ?
Comment: How does $d$ affect the dipole moment?
Comment: d is a measure of the dipole moment.
Comment: What is the difference between dipole moment and polarity?
Answer: The dipole moment $\vec\mu$ is
$$\vec\mu = q\cdot\vec d,$$
where $q$ is the magnitude of charge on any particle and $\vec d$ is the distance between them.
This must imply that if charge increases or distance between the charges increases, dipole moment increases. The larger the dipole moment, the greater the polarity.

Actually when the more electronegative elements pulls electrons, the partial charge, $q\le e$, increases and in case of $100\,\%$ polar compound, $q=e,$ whereas in $100\,\%$ covalent compounds $q = 0.$
So, you can see dipole moment and polarity is maximum for ionic compounds. But if two atoms have greater bond length, surely dipole moment and polarity increases.
Comment: If suppose a compound can exist in covalent and go to ionic form[totally hypothetical]in which one is more electronegative,then as dipole moment is max. in ionic compound,is this because there is whole charge than partial charge or as it goes from covalent to ionic,the distance increases or both? Thanks again.
Comment: can't say about the distance, as in real there is no change of covalent to ionic, so changing nature will change distance, can't say.
Answer: The bond length decreases as polarity increases because in a polar bond, one side is partially negative and one side is partially positive, so these two sides attract even more, get closer together, and the bond length decreases. So, more polarity means more attraction (or attractive pull), which brings the atoms closer together, hence decreasing the bond length.
That is why when there is more difference in electronegativity between atoms, their bond length is shorter; when there is more difference in electronegativity, there is more polarity, and shorter bond length.


If ex postfacto is after the fact, what is during the fact?

Question: In law, ex post facto is used to refer to something done after the fact. I'm interested to know what Latin phrase would mean done during or simultaneously with the fact.
Comment: I'm not sure the question as such makes much sense to me. _Ex post_ means "after", yes, but this usually refers to knowledge, a motive, a point of view or things like that, and in direct opposition to _ex ante_. It only makes sense in comparison. What exactly is it you are trying to express?
Comment: Hi @Ingmar, I'm trying to express that instead of a behaviour happening after another event has completed, that that behaviour is happening at the same time as the other event.
Comment: Sorry for even more information @Ingmar, ex post facto is also used in another sense where a judge gives reasons for his decision 'ex post facto', ie, not the reasons that were the operative or actual reasons for his decision, but which were thought up afterwards. I'm interested in a slightly different sense, where a judge thinks up misleading reasons as he goes along, ie say he's biased for whatever reason, then he thinks of a misleading basis for his decision that he updates as the case goes along to account for any new evidence.
Comment: *" in flagrante delicto"* suits some occasions.
Answer: Perhaps surprisingly, ex post factō isn't actually a valid Latin phrase on its own: it's got two prepositions in a row, and Latin doesn't allow that.
So why do people use it? Well, in legal Latin, a law made after the fact is a postfactum, a "thing-made-after". So a punishment originating from one of these laws comes ex postfactō, "from a thing-made-after".
If you want to adapt this phrase, you could use the adverb simul, "at the same time". Something made at the same time as another thing could, perhaps, be a *simulfactum, or a simultāneum; I like the second option more because it's attested in mediaeval Latin and rolls off the tongue a bit better. And a punishment originating from one of these could, perhaps, come ex simultāneō.
Comment: *Post* can be an adverb, so the phrase is valid Latin (though I don't know if it's classically attested).
Comment: @Draconis, I really like this answer. Could it be used in the sense described above (see comment in response to @Ingmar), ie to describe a misleading account of a judge's decision that the judge thinks of (and updates) as the case goes along, rather than thinking of it only after all the evidence has been heard?
Comment: @Poul Legal terms aren't my specialty, but I would say yes, it could be.
Comment: @Poul To me this was an interesting question. It seems you are pleased with the answer you were given, and be that the case, I would kindly advise you select the answer as your chosen one.


How can I say "How many more apples does John have than Phil?" in Spanish?

Question: Does the following translation make sense in Spanish? What would be the appropriate translation?
English:

How many more apples does John have than Phil?

Spanish:

¿Cuántos más manzanas tiene John que Phil?
Answer: Firstly, "cuánto/cuánta/cuántos/cuántas" is an adjetivo interrogativo which, as all adjectives, must agree with the noun it qualifies — "manzanas", in this case.
Secondly, the adverb "más", if paired with some kind of quantifier, is generally placed after the noun:

¿Cuántas manzanas más necesitas?
  Necesito tres manzanas más.

Then I wouldn't separate "más" and "que" because that makes it more difficult to parse.
Summing up, I'd say:

¿Cuántas manzanas más que Phil tiene Ali?

You can also say:

¿Ali tiene cuántas manzanas más que Phil?

The last one sounds clunkier to me, but it could sound natural if pronounced with a different intonation. I would pronounce the first one with a falling intonation, and the last one with a rising intonation (or a "less falling" one), as though I wanted the addressee to complete my sentence.
Of course you could go with a different wording:

¿Cuántas manzanas más tiene Alí con respecto a Phil?

I don't love the last one, but that is personal preference.
Answer: Your attempt is correct. You just missed the fact that "manzanas" is feminine, so "cuántos" has to match the gender and be "cuántas":

¿Cuántas más manzanas tiene Ali que Phil?

However, to me it sounds a bit better to swap both terms and say:

¿Cuántas manzanas más tiene Ali que Phil?
Answer: In light of the English grammar involved, to make it similar of what a Spanish speaker would say, I'd phrase it as:

¿Cuántas manzanas más tiene Alí que Phil?

So it's perfectly idiomatic.

Swapping we get another sentence given by fedorqui:

¿Cuántas más manzanas tiene Alí que Phil?

I remember saying this wording once, but now it doesn't click on my ears, so I'd use the first one.
Answer:
How many more apples does John have than Phil?

In Spanish:

¿Cuántas manzanas de más tiene John que Phil?

Source: myself,  Spanish is my native language.


Og Image is not working in facebook share in php

Question: I am working with Php, Actually i want that whenever i copy url of my current page and paste in
facebook (as create new post) then Image/Thumbnail should display in facebook wall,how can i do this ?
I tried with following code,How can i fix this ? Thank you in advance.
<meta property="og:image" content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg
" />

Comment: What is the URL you are trying to share on Facebook?
Answer: Have you tried removing the line break?
<meta property="og:image" content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" />


What published adventures are available for D&D 5e?

Question: I'm running the Lost Mine of Phandelver adventure for my son and his friends as DM.
With the future in mind, I want to get more published adventures.  How can I find out a comprehensive list of all the published adventures for 5e, ideally with enough information (character levels, etc.) to determine which I might want to purchase and use?
Answer: The best way to get a comprehensive listing of adventures for D&D, or any system, is via RPGGeek, a comprehensive listing site.  In this case it's a little tricky though.

Go to the D&D 5e page and filter the linked items by Category: Scenario/Adventure/Module. That gets you all the official WotC adventures.
Then, go to the 5e Compatible page and do the same to get all the third party published adventures.

Unfortunately you have to drill down on each item to see level information (and even that's dependent on what they thought to put in the description). See Is there a good searchable database of D&D adventures? for the previous question on this (tl;dr - no good solution exists).
Comment: I feel like this is basically the only answer that won't be out-of-date essentially instantly.
Answer: The best way would be to visit my site, where I keep a list of all the adventures published so far for D&D 5E. I maintain two lists - one by publisher, and one by level.
https://merricb.com/2014/08/06/the-great-list-of-dungeons-dragons-5e-adventures/
http://merricb.com/dungeons-dragons-5e/dungeons-dragons-5e-adventures-by-level/
Enjoy!
Comment: This answer is fine, the question asks for a resource and this provides a resource.  Including an actual list inline would be problematic.
Answer: Princes of the Apocalypse looks like your best option. It is set close to Phandelver, has the same look and feel (same cartographer) and is for characters level 1-15. It really starts at level 3 though.
Your other options are Hoard of the Dragon Queen (1-7) and Rise of Tiamat (7-15) A lot of work required by the DM, but both nice adventures.
You could also try the Wizard's Amulet by Kobold games for a free 5e adventure
https://froggodgames.com/sites/default/files/promos/The%20Wizards%20Amulet%20(5E).pdf


Discretizing/Binning Continuous Variable by Continuous Response

Question: I am trying to discretize a continuous variable that does not follow a linear relationship with our response variable.  I am trying to find the optimal way to discretize this variable to better capture the nonlinear relationship.  The method we are using right now is to cut the variable into numerous quantiles, then conducting t-tests between each neighboring group, and combining the most like neighbors until the highest p-value is below our significance level. Is there any more efficient or accurate way to conduct this process?  Many of the discretization methods I have been able to find seem to refer to a binary response.
Answer: Don't discretize at all, see Frank Harrell's explanation why this is a bad idea. If you have a nonlinear relationship, use splines instead, e.g., restricted cubic splines. Frank Harrell's textbook Regression Modeling Strategies contains a very good introduction to these.
Comment: I understand now the reasoning for why discretizing is not a great idea, but the models constructed with bins are out-performing all models with cubic splines in glm using ns() and smoothing in mgcv.  Any idea why this would be occurring?  And the aspect of non-linear regression that initially kept us from embracing splines/smoothing is the loss of interpretability.
Comment: How exactly do they outperform? In prediction on holdout data? If so, are the holdout data binned or not, and what is the accuracy measure?


Create list of Safari bookmarks

Question: I want to create a list of my Safari bookmarks (folder, webpage title, and URL) to put into Numbers or a database app. This will help me find duplicates, tell me where a certain bookmark is, and keep from saving bookmarks again and again.
Comment: You can export the bookmarks within Safari: File - Export Bookmarks.
Comment: to add to @Scot : this exports an HTML file that can be opened with Excel or a text editor where the data can be manipulated.  Is this the type of thing you are looking to do?
Answer: Safari Bookmarks can be exported as an HTML file.  This file can be opened with any text editor and reviewed or even cleaned up with a little HTML know-how.  Then it can be reimported after clean up.  Recommend cleaning up a copy of the original in case you need to revert.

To export:

From the Menu: File > Export Bookmarks...
Choose a location to save the HTML file.
Open in a text editor.  (Drag the file to the text editor's application icon or option+click and choose Open with
Examine the file and make changes.
Reimport using File > Import From > Bookmarks HTML File…

Alternatively, if one just wants to examine in a spreadsheet, Excel for Mac will open HTML files.  Even though the result is easier to read, the data is harder to manipulate unless you understand Hyperlinks.

Create list of Safari bookmarks


What does dot product really mean?

Question: While calculating the flux of a vector field through a region, we need to find the normal components of the vector field i.e perpendicular to the surface. Now I don't understand why we take the dot product between dA vector and vector field for that. Because dot product not only does projecting it into direction normal to the surface but also expand it by the length of the vector.
My question simply is, why we take the dot product between dA and vector field as it not only does projecting but also expanding it? Why We shouldn't simply take the normal of a vector field in that direction?
(Assume the vector field to be electric field)
Comment: The area element as a vector is just a unit normal vector $\hat{n}$ multiplied by $dA$, if you want just separate them out and it solves your issue.
Answer: A very good explanation is given in Electricity and Magnetism, Purcell, Section 4.1 Electric current and current density. The discussion is in the context of current density but gives the answer to OP's question.

Consider the figure shown below:

A swarm of charged particles all moving with the same velocity $u$. The frame has area a. The particles that will pass through the frame in the next $\Delta t$ seconds are those now contained in the oblique prism.
The prism has base area $a$ and altitude $u\Delta t\cos\theta $, hence it's volume is $au\Delta t\cos\theta$ or $\mathbf{a}\cdot  \mathbf{u}\Delta t$
Considering the per unit time, total flux thus given by
$$\Phi = nq\mathbf{a}\cdot \mathbf{u}\equiv I$$

What does dot product really mean?


How are server side errors handled in Post/Redirect/Get pattern?

Question: For the successful use case, the Post/Redirect/Get (PRG) work flow is pretty simple: simply redirect (client-side) to the desired page. But what about cases when errors are encountered during server-side validation and we want to preserve the inputs when we display the input page again?
As far as I can tell, there are two approaches: simply re-render the input page after the form POST submission (i.e. no redirection) during errors (thus disregarding the PRG pattern); or, redirect to the input page, and store the previous inputs somewhere it can be retrieved later (e.g. session), during rendering. Both have drawbacks: in the first, we are presented with the problems PRG pattern helps us to avoid (e.g. bookmarkability, double submission); the second approach leads to inconsistent GETs (first GET will find the stored inputs, subsequent GETs might not). Are there other alternatives to those mentioned here? I am hoping for inputs from the community on how this case is best handled.
Answer: I typically do it the first way you describe—redirect only in the event of a successful submission. It's hard to see a real use case for bookmarking a form containing invalid data; on the other hand it often makes sense to bookmark a confirmation page (after successful submit).
Answer: If the URL being used to fill out the form is the one the form POSTs to, I don't think there's an issue. If the input is valid, Redirect and GET. If it's invalid, redisplay the filled-in form. This way, the interaction looks like:
GET  /your-url => blank form
POST /your-url (success) => Redirect => GET /success-url
POST /your-url (failure) => filled-in form

Answer: The mentioned bookmarkability issue is affecting both approaches, you cannot really bookmark something that relies on some temporary data preserved on the server.
And the double-submission is not really a problem if you ensure that if the validation fails, you don't save any data (i.e. every submission with failed data is idempotent request).
So PRG only on success is a very clean approach.
Answer: Like the other answers say, only use Post/Redirect/Get pattern on successful server-side validation. When a form is invalid, just respond to the response directly, with error messages.
For usability, you should make sure that client-side validation is excellent, this is a good idea any way, as users like immediate feedback. Use Javascript, or the new HTML5 form features, such as the required attribute or the maxlength attribute or type="email" attribute and so on.
Of course, you should still have server-side validation for security, and for graceful degradation.
Answer: If you are using ASP.NET MVC then there is another method that can be used for the Post -> failure situation.  It is covered in #13 of this article: ASP.NET MVC Best Practices (Part 1).
If you implement that method then you can always redirect after a post, even if the post resulted in a failure.


Hosting a WCF service from a Windows Service

Question: I have made a Windows Service that host a WCF service on http://localhost:8080/SomeService
The Windows Service is configured to run using the NetworkService account.
When I try to start the service, I get the following exception:
System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL
http://+:8000/. Your process does not have access rights to this namespace
(see http://go.microsoft.com/fwlink/?LinkId=70353 for details). --->
System.Net.HttpListenerException: Access is denied
What I want to do is to add some code to the service installer (inside AfterInstall for example) to give the service the proper rights.
How can this be done in C#?
EDIT
I know that this service will be installed on XP, Vista and Win7 machines, so I will need something that works on all these platforms.
Answer: Try LocalSystem account. (filling remaining space)
Answer: Try "Run-as-Administrator" when you launch your application


DropDownList doesn't show enough rows

Question: In ASP.NET, a ListBox has a Rows attribute I can set to say how many rows to show.  A DropDownList, though, doesn't.  Is there any way I can set the maximum number of rows a DropDownList should display?  Code?  Markup?  CSS?
Answer: If you want that level of control, you are left to re-implement drop down lists in javascript.  Kinda sucks.
Answer: Dropdownlist is rendered in a browser as html select... html
select does not support the requirements you are asking...
You will need to write a custom control to set the limit on max number of rows.
you got to write a custom control for that or use client side add-ins...
The following post also answers your question.

DropDownList doesn't show enough rows


I am trying to find correlation between two ChIP-seq datasets but the Pearson and Spearman test results do not correspond with the peak overlap

Question: I am trying to compare two ChIP-seq datasets for histone modifications, however, the Spearman and Pearson correlations between two particular datasets does not correspond to their peak overlap (peak overlap is very low, while both pearson and spearman tests are showing strong correlation). I am performing this analysis on Usegalaxy, first using multibamSummary on both bam files followed by plotCorrelation. What could be the error here?
Comment: I can readily imagine a situation where the bulk data agree very well in terms of the overall genomic profile, but the statistical process by which you pick peaks yields different results. Knowing more about the samples would be handy- are they technical replicates, biological replicates, experimental arms?
Comment: Can you please show any plots or data that have helped you come to the conclusion that there is a problem?
Comment: I agree with this, the correlation could be supported by the breadth of values across the data set. The actual r2-value is key: if it's 0.5 to 0.7 I wouldn't consider there to be a discrepancy. If it's >0.8 thats puzzling. At >0.9  there's definite selective sampling occurring because thats weird. The r alone (Spearman's) will be higher in most cases so I would use r2 as the guide. **Summary** a correlation can be stabilised by agreement between low and high values, so the exact correlation score is needed.
Answer: Correlations like this between ChIP-seq datasets is common.
If you're calculating the correlation between BAM files across the entire genome, those are largely going to be the same (hence the need for input controls in ChIP-seq for performing the peak calling in the first place).
Similarly, many ChIP-seq experiments only have 30 - 60% of reads within their peaks (FRiP), which means that 40 - 70% of reads don't fall within peak regions.
This is going to heavily skew any correlation calculations that don't exclusively focus on the peaks themselves.
To more clearly compare ChIP-seq data against each other, global metrics like FRiP can help you diagnose measurement/sequencing issues.
Looking at the correlation across ChIP-seq signal within peaks may be a more informative calculation than looking at all reads across the genome.
Similarly, principal component analysis on signal within peaks can be helpful here.
DiffBind has some helper functions to perform these types of calculations that you can look at.


create a modal that is animated via jquery plugin

Question: I'd like to create a customizable jQuery modal that is animated in and out (css color changes + fade in and out) that is triggered by a click on the main html page. I know how to pass option variables into a jquery plugin, but I am not sure how to animate within the plugin. Eg: with inline jquery you can just say:

How would I be able to make these same changes within a plugin? Here is a chunk of the code (was trying to use Jeff Ways' jQuery plugin tutorial:
var mybigmodal= {
        init: function( options, elem) {
            var self = this;

            self.elem = elem;
            self.$elem = $( elem );

           if ( typeof options === 'string') {
                var w = 400;
                var h = 600;
           } else {
                //object was passed
                self.options = $.extend( {}, $.fn.mymodal.options, options)

          }

          self.mshow();
        },

        mshow: function() { //show the modal via animation?

          $('#lightbox-pane').fadeIn(50).animate({
              width: 50}, 150).animate({
                  width: 100},200);
          }
        };
    });

I don't need someone to code this for me, I just would like to know what I'm doing wrong in order to make these same animations happen that are so simple while inline..
I'd really like to enable the user to be able to use options like custom width or color as well.
(I know this maybe a noob basic question, but any help would be appreciated!)
Answer: You can try something like this inside your plugin code:
First extend your plugin options as
var options = $.extend({
            height : "250",
            width : "500",
            color: "red",
            title:"Modal Box Demo",
            description: "Example of how to create a modal box.",
            top: "20%",
            left: "35%",

        },prop);

       $('#modal').animate({top:'toggle'},80);


What's the significance of highlighted Answers in my User Profile?

Question: Can anyone please explain why, in the list of Answers in my User Profile, some entries are highlighted?
Comment: May you provide a screenshot?
Comment: @kiamlaluno: I'm afraid I don't know how to post a screenshot here. The effect has changed somewhen in the last few days, though. Previously all Questions in the Answers section were in red, just some were high-intensity red. Now those ones show in black. If I click on a black Question to view what Answers/Comments I made, when I return to the User Profile page that Question will have turned red.
Comment: When edit a question, or an answer, on the top of the text field you will see some icons; the sixth one, the one to the right of the icon showing "101010", is the icon that allows to attach images. Without to know something more, I can guess it's the browser that is showing you the links you didn't visit.
Comment: @kiamlaluno: I think you are right. jasper has suggested the same thing in his comments.
Answer: Are you sure it's not the browser that is showing you the links you didn't yet visited?
In my user profile, the questions with the title in red are the ones I recently visited. As the different color used for those links depends from the browser, other users could see in red a link you see in black, or vice versa; you can check this looking at my user profile.
I don't remember until when those links are rendered in a different color, though.


Stability of equilibria of a system given a governing ODE

Question:
Given a governing ODE such as $$m\ddot{x}=x^3-1$$ how do we go about
  finding the stability of the various states of equilibria?

I am aware that, given a potential $V$ for the system, we can determine the equilibria by taking the first derivative with respect to time and then analysing the sign of the second derivative to determine whether each state is stable or unstable. Here is my attempt at the above question:
Clearly the RHS of our ODE is zero only if $x=1$ (we're dealing with real numbers only here). So to determine if this is a stable or unstable position of equilibrium, I would take the derivative of the RHS with respect to $x$, giving $3x^2$. At $x=1$, this is clearly positive. Therefore this is a position of unstable equilibrium.
Is the above correct? In particular, I know that $V^{\prime\prime}>0$ implies stability, but would it be the opposite that implies stability of a force ie. $(m\ddot{x})^{\prime\prime}<0$? (My thinking behind this was that $F=-V^\prime$, but this would surely be assuming that $F$ is conservative, which may not be the case?)
Answer: $$
m \dot x\ddot x = x^3\dot x -\dot x \Rightarrow \frac{1}{2}\frac{d}{dt}(\dot x)^2-\frac{1}{4}\frac{d}{dt}x^4+\dot x = 0
$$
then integrating
$$
\frac{1}{2}(\dot x)^2-1/4x^4+x = C
$$
This show us that no closed curve is allowed in the set $\dot x \times x$ hence no stable equilibrium points exist for this dynamic system.


What is the difference between grey and gray?

Question: What is the difference between grey and gray? I've seen both used and I'm wondering which I should use when talking about the color. Why are there two spelling's for the same word and is there a difference in the meaning between the two?
Answer: They are two different spellings of the color gray/grey:

Gray and grey are different spellings of the same word, and both are used throughout the English-speaking world. But gray is more common in American English, while grey is more common in all the other main varieties of English.  In the U.K., for instance, grey appears about twenty times for every instance of gray. In the U.S. the ratio is reversed.
Grey gained ascendancy in all varieties of English in the early 18th century, but its dominance as the preferred form was checked when American writers adopted gray about a century later

(The Grammarist)
Comment: I didn't know "gray" was more common. In my college English class last week, the professor had "grey" written in a sentence on the board. Is this really the case? To me, "gray" and "grey" are just one of those words whose spellings are interchangeable no matter where on earth it may be written. Now, "colour" and "color" are normally not interchangeable; one is British and the other American normally.
Comment: @NicholasCastagnola: There's something in that. M-W describes "colour" as "chiefly British", whereas it simply describes "grey" as a "less common" spelling of "gray", with no mention of Britishness.  (British dictionaries, on the other hand, regard both "center" and "gray" as solely American.)
Comment: The spelling distinction between British grey and U.S. gray developed 20c. https://www.etymonline.com/word/gray
Answer: First off, "spelling's" should be "spellings" above.  Second, there's no difference in meaning between "grey" and "gray"; there are just two different spellings of the same word.  There are a lot of words like this in English.  Usually, there are different spellings because different versions of English spell it differently, i.e. there are British and American spellings of words.  I don't know whether this is the case with "grey" and "gray".  I'm American and I have spelled this word both ways, but I usually spell it "grey" as I think it's a more common spelling.  Does that mean that's how all Americans would spell it? No, I don't know.  There are words that are clearly more of an American spelling than British:

color (American) / colour (British) / eon (American) / aeon (British) /
  canceled (American usually but not always) / cancelled (British) /
  edema (American) / oedema (British) / anesthetic (American) /
  anaesthetic (British) / apnea (American) / apnoea (British) /
  capitalize (American) / capitalise (British) / practice (verb)
  (American) / practise (verb) (British) / counselor (normally
  American) / counsellor (British) / center (American) / centre (British).

It's just the way it is because there are so many variants and dialects of English.
Comment: "Capitalize" is both really (indeed, the "-ize" spellings are preferred by Oxford), though most British speakers prefer "-ise" (and there's quite a widespread myth on both sides of the Atlantic that "-ize" is purely American).  Australians, on the other hand, avoid "-ize" completely.
Comment: Okay, that's good to know. I still spell it "grey" and "theatre" because that's how I've always spelled it. I also spell it "cancelled" and "counsellor" and traveller", but I'm probably in the minority in that regard. I spell it "center", "-ize", and "color" obviously. I just spell it the way I have seen it the most, I think, growing up. I think I spell it "theatre" because of the "movie theatre" by my house when I was growing up, which spelled it "theatre".


I have a custom baby gate that has two swinging doors that open either way. How do I make them swing closed when opened from either direction!

Question: I have a custom baby gate that has two swinging doors that open from either direction. How can I make them automatically swing shut when we walk through from either direction
Comment: Hello, and welcome to Stack Exchange. A diagram and/or picture would really help here.
Comment: Would a gate like this, which would pinch baby hands or heads when 'swinging' closed, be a good choice as a baby gate? If left open and a child pushes through from one side they would be trapped and pinched trying to back up.
Comment: We've got one that does this, at the bottom of the stairs. It's seriously anything when you're trying to carry stuff. It crosses the line from irritating to hazardous when you open it, pick up the baby and it shuts in front of you. We've defeated the auto close (simply by using rubber bands to pull it open)
Comment: @ChrisH  "It's seriously anything when you're trying to carry stuff"   i can not wrap my head around that sentence.
Comment: @Alaskaman swift key defeated me - it should have read "annoying"
Answer: The design of the door would be helpful for illustrative purposes, but I think that you could probably make it work with a stiff spring.
Since this is a DIY forum, see the DIY idea below.

The idea is not to stretch the spring outward but side to side- allowing the straightening force to close the door. You may also need some medium washers to secure the spring. You can probably cover the spring with a hose or a fabric tube so that baby doesn't get pinched.
Answer: Use double-acting spring hinges, also known as bi-swing spring hinges or double-action spring hinges.
A vendor lists some additional names:

Saloon Door hinges, Cafe Door hinges, Swinging Door Hinges, or Double Acting Barrel Hinges.


How to control CEF3 portions of .NET project using Webdriver2?

Question:
We have a very large .NET project. This has been E2E/regression tested using QTP for 3 years.

Eventually, our AUT is moving to the WEB. This process is expected to take a couple of years, it will be Angular-JS/HTML5, I have been testing automating a demo angular app using Protractor quite successfully.
In the interim, any new UI development on the App will be done using CEF3 and angular.
I wrote a small test of a pure CEF .NET app to test a theory of testing using chromedriver. This was solved by setting the chrome.exe to be the path to the App.exe and worked quite nicely, but required using chromedriver to start the app.
BUT - we will now be entering the phase of hybrid development, we have the situation where QTP will be kicking off the AUT, and performing some actions on older portions of the UI, but then we will encounter a newer CEF portion which we need to be able to test using chromedriver(well QTP if it could actually cope - which it can't). As a first phase, I need to be able to kick off a CHROME driver test which will perform actions on an already running app where CEF is present.

Can anyone point me at information about this, please. I have tried extensive googling, but I don't seem to be googling the right questions, just vague hints.
Comment: Please can I ask that any answers are to this thread on the hub and not via webex connect or email. I would like to keep things together, and I already lost one reply via webex from a non-contact.
Answer: Please check out UFT 12.54 Patch 4, UFT 14.01, preferably 14.01 as it is latest release for this moment.
Guidance can be found from online help (it works same for CEF and CEFSharp):
https://uft-help.saas.hpe.com/en/14.01/UFT_Help/Content/Addins_Guide/Work_with_CEF_Applications.htm


Auto on camcorder

Question: Used to have an old SD camcorder which had a power "switch" not a button. You could mount it out of reach and then flip it on easily with like a wall switch via aux power. Worked nice for video recording at my church. We now have a HD camera but it has a power "button". So now we have to reach or get a stool to turn on every time, total pain. Any way I can make this work like before or a better camera maybe that has a switch. Or maybe just need to get one with a remote?
Answer: Almost all mid-range camcorders nowadays allow controlling them from a smart phone over wifi. You can leave the camera on a DC cable, always on (not all models support this), and just connect to it and start recording when you need to.
Not as simple, needs connecting etc, but could help.

Auto on camcorder


Validating changed queryset not working - Django

Question: I want to do the following:
A user sees all eventrecords he previously created on one page and can edit them.
The problem I have is that if he edits one or more of them and inputs an invalid choice no validation errors are shown. Instead, nothing happens (if I have if changed_events.is_valid() in the code) or I get "ValueError at /coding/assignment/3/
The EventRecord could not be changed because the data didn't validate." If the user puts in valid data, saving works just fine.
I would like to show validation errors on the page, the way it is already working when creating new entries.
Following my code:
The view (I'm not posting my whole view, as it's fairly complex and everything else is working fine. These are the parts responsible for what's not working):
##### Show already created events on the page
    current_article = paginator.page(current_page).object_list[0]
    EventFormSet = modelformset_factory(EventRecord, can_delete=True, exclude=('coder','article','url','last_updated'), extra=0)
    event_queryset = EventRecord.objects.filter(article__id=current_article.id).filter(coder=request.user.id)
    coded_events = EventFormSet(queryset=event_queryset, prefix="event_form")

elif 'save_changes' in request.POST:
            formset = CodingFormSet(prefix="coding_form")
            changed_events = EventFormSet(request.POST, prefix="event_form")
           # if changed_events.is_valid():

            instances = changed_events.save()

            try:
                history_record = ArticleHistory.objects.filter(article__id=paginator.page(current_page).object_list[0].id).filter(coder=request.user.id)[0]
                history_record.last_updated = datetime.datetime.now()
                history_record.save()
            except:
                history_form = ArticleHistoryForm()
                article_history = history_form.save(commit=False)
                article_history.article = paginator.page(current_page).object_list[0]
                article_history.coder = request.user
                article_history.last_updated = datetime.datetime.now()
                article_history.save()

            redirect_to = "?page=%s" % current_page
            return HttpResponseRedirect(redirect_to)

The template:
{% for eventrecord in coded_events %}

            {{ eventrecord.id }}

                {% if eventrecord.non_field_errors %}
                {{form.non_field_errors}}
                {%endif%}

                {% for field in eventrecord %}
                {% if field.errors %}

{{ field.errors|striptags }}

                {% endif %}
                {% endfor %}

Has anyone an idea what I'm doing wrong?
Clearly Django is recognizing that something is going wrong, but why doesn't it show it in the template but creates an error-page? Why does nothing happen when I include the is_valid()?
I really don't know what I'm supposed to do, any help is greatly appreciated!
Answer: Oh man, this was stupid:
Right after posting my question I saw the answer, after working days on it.
Here's what went wrong:
The queryset was passed to the template as coded_events.
During the save_changes operation, I renamed it to changed_events, which then couldn't be passed back to the template in case of validation errors.
After fixing that, everything works fine.


Electric goes out

Question: My basement lights, dishwasher and tv on ground floor keep going out all at once. The breakers are all ok. trying to find out what else went out I turn on my electric stove and all come back on. This has happened 4 times sense I had my air conditioner fixed.
Comment: Is this outrage covering all / most circuits on the left or right side of your panel or a section? The reason I ask this is a bad breaker in a rule of 6 panel will cause this. If everything on 1 side or the other is out it can be the feed to the main and will require the power company to check at the meter, usually you have to have an electrician check at your main as the power company's responsibility ends at the meter.
Answer: PHASE OUT - CALL THE ELECTRIC COMPANY - POTENTIALLY DANGEROUS SITUATION
Details based on typical USA 120/240 service.
Sounds like you one of your phases is out. Residential power typically comes in 2 phases. If everything is set up well then you have ~ 1/2 your receptacles, lighting and other single-phase circuits (120V) on one phase and the rest on the other phase. A few larger appliances - e.g., oven, electric water heater, air conditioner - will use BOTH phases.
If one phase goes out then everything on the OTHER phase will still work. However, if you turn on an appliance that connects to both phases then it can backfeed from the good phase to the bad phase. This can cause all sorts of problems.
Unless you have had work done on your electrical system recently that might explain it (in which case, call the electrician who was doing the work), this is most likely an electric company problem. Call the electric company, tell them you think a phase is out. If they don't respond with "we'll be right over to check it out" then make sure they know that you are concerned about a life & death safety issue.
EDIT based on reading more carefully: AIR CONDITIONER
I missed the first time around that you had your Air Conditioner Fixed recently. That should not CAUSE this problem, but it could be related, and could be the cause. So check first with whoever did that work (HVAC tech. or electrician). If they are clueless, call the power company.
Until this is resolved, the safest thing to do is to NOT use any 240V equipment - Air Conditioner, Oven, etc. If you have an electric water heater then that may be part of the mess - any time it cycles ON you would have backfeed power, and when it cycles off you would "lose" power - except if you turn the oven on.
If you do have an electric water heater, I recommend turning it off during a "everything seems OK even though the oven is off"  moment and see if you "lose" power again.
Definitely get a professional to check it out immediately.
Answer: CALL THE POWER COMPANY! Tell them you lost a phase
This is a "red alert" situation.. well, OK, "Yellow alert".  There's a related but slightly different problem that is "red alert" because it'll fry all your appliances and start a fire.  This may only fry motor motors e.g. your A/C unit.
But the power company should come out quick and look at this for free.  They may end up chasing it to a problem on your side.  In which case you'll need to bring out an electrician; it's not practicable to get from skill level of "replacing the occasional outlet" to "servicing main feeder" overnight.
If any recent work was done, that might have something to do with it, but that's no guarantee.
Comment: What is the related red alert situation?

Electric goes out


Change gradle build directory in android studio?

Question: I just installed Android Studio and I am just learning to build using Gradle. However, with the default project setup, my builds are located in the project directory and I would like to have them placed elsewhere (preferably outside of the project directory). Is it possible to achieve this? Where do I make a change and what change do I make?
Answer: in root build.gradle
allprojects {
    buildDir = "/path/to/build/${rootProject.name}/${project.name}"
}

See also Gradle global build directory
and docs https://gradle.org/docs/current/userguide/writing_build_scripts.html
Comment: This will cause: `Duplicate content roots detected` for test directories.
Comment: Works like a charm. Had do shift my build folder out of `eCryptfs` directory!
Comment: Yeeeee! I can finally work in our company's Dropbox, thank you!
Comment: @AlexeyKuznetsov I tried this and something similar by jsut applying it to subprojects, but, i only get some things move out of the default directory, i still see the R files and the intermediates (like exploded-aar, and things like that) on the default directory, which are the things that i wanted to move out in the first place, any idea what can i do? i've tried everything i've found online as far now
Comment: Had to tell MalwareBytes that gradle was not making a Exploit.PayloadProcessBlock once I did this.
Answer: You can pass the "buildDir" property to the gradlew.bat (I'd assume you can do this in the Linux version as well but I haven't tested it)
Example:
gradlew.bat assembleRelease -PbuildDir="C:\BuildFolder"

Answer: Created a new app a few days with
Android Studio Giraffe | 2022.3.1 Patch 4
Build #AI-223.8836.35.2231.11090377, built on November 13, 2023
Runtime version: 17.0.6+0-b2043.56-10027231 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

and the above no longer work. I hate that.
But found that this one does
allprojects {
    setBuildDir("C:/Users/YourUserNameHere/AppData/Local/Android/build/${rootProject.name}/${project.name}")

}

I use this when I want to run/compile that/any app while it's in Google's "My Drive" In this way, I can code on multiple computers.
Answer: When creating a new app with the nowadays default Kotlin DSL builDir = "path" indeed doesn't work. However, builDir = file("path") still does, being deprecated nevertheless. While setBuildDir("path") is its direct successor, however meanwhile this as well became drepacted as has to replaced by the following.
At least for Kotlin DSL, latter however is now as well deprecated and you should switch towards the following.
layout.buildDirectory.set(file("C:/Users/YourUserNameHere/AppData/Local/Android/build/${rootProject.name}/${project.name}"))

Despite its name file() indeed works for directory paths as well

Regarding old Groovy Gradle builDir = "path" is still the "non-deprecated" way to go.
Answer: The project iml file has a BUILD_FOLDER_PATH attribute.  I haven't tried changing it myself yet, so not sure if it will work.   The default value is $MODULE_DIR$/build.
Edit: I did a quick test and this did not work.  Once changed, the project needs to reload because the iml file changed.  Upon reload it reverts the build directory to default.
Comment: I never used this answer. So I can't verify that it is indeed correct.
Comment: Note that this answer is telling you something *_NOT_* to do! That `.iml` is automatically generated.


Will money be transferred alongside my character if I move from Xbox 360 to Xbox One?

Question: If I transfer my character from Xbox 360 to XBone will my GTA money in my 'cash' section transfer to my Xbox One character?
Answer: On the Rockstar website regarding transfers you can find this:
"All earned in-game money will transfer. Purchased in-game money that has not yet been spend will only transfer within a same console family (e.g.Xbox 360 to Xbox One)"
I'm pretty sure this includes cash.
But even though I recommend putting all your cash on your bank account before transferring, 'just in case' especially when you have a lot of cash.


ADODB.ORG - Database Abstraction Layer for PHP to MS Access DB

Question: Trying to get it to connect in this environment:

Windows 7 Pro - 64bit
  MS Access 2010 - 32bit  (Tried both ACCDB and MDB versions)
  ADODB abstraction package, Version 5.20.9

This is the test code:
<code>include("C:\php\adodb5\adodb.inc.php"); // includes the adodb library
$db = NewADOConnection("access"); // A new connection
$db->Connect("", "", "", "D:\...\PhpPlay.accdb");
</code>
I've tried all kinds of variations for host, user and password params in the $db-> connect line, but no success. (The first two lines execute without error.) Here's the error message for line 3:
PHP Warning:  odbc_connect(): SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\php\adodb5\drivers\adodb-odbc.inc.php on line 66
So I'm grasping at straws now. I'm concerned about the mixed 32/64 bit settings, but don't want to do something drastic unless someone can confirm that this is a problem.
Thank you for any ideas you might be able to provide!
Answer: Third party modules are not needed. Simply use PHP's PDO class and the already installed MS Access ODBC driver:
DSN Version
<code>$database="D:\...\PhpPlay.accdb";

$db = new PDO("odbc:DSN=MS Access Database;DBq=$database;");
</code>
Driver Version
<code>$database="D:\...\PhpPlay.accdb";

$db = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBq=$database;");
</code>


How did the US Thanksgiving holiday become associated with the Plymouth harvest festival of 1621?

Question: Proclamations of the Thanksgiving holiday by, e.g., Presidents Washington and Lincoln made no mention of the Plymouth colony. When and how did the Plymouth harvest festival of 1621 become a canonical (and ahistorical) justification for the existence of the Thanksgiving holiday?
Comment: To put a time box on this, after a cursory search the first [Presidential Thanksgiving Proclamation to mention the Pilgrims is 1939](https://web.archive.org/web/20100620235148/http://pilgrimhall.org/ThanxProc1930.htm).
Answer: It was a gradual process spanning many decades. A connection existed in at least some New Englander's minds as early at the 1840s, but you are correct that the idea was not well-entrenched nationally until long after the Civil War if not well into the 20th century when, as mentioned in the comments, "the Pilgrims" were referenced in a 1939 Thanksgiving proclamation by President Roosevelt. By then, the idea of the holiday must have been considerably less controversial for Southern whites as it once had been, and the slow rise of modern mass media also payed a role in spreading what was previously a regionally-specific form of the celebration.
Philip Deloria gave the following high-level summary of the overall process in a New Yorker article from 2019:

In 1841, the Reverend Alexander Young explicitly linked three things: the 1621 "rejoicing," the tradition of autumnal harvest festivals, and the name Thanksgiving. He did so in a four-line throwaway gesture and a one-line footnote. Of such half thoughts is history made.
A couple of decades later, Sarah Josepha Hale, the editor of Godey's Lady's Book, proposed a day of unity and remembrance to counter the trauma of the Civil War, and in 1863 Abraham Lincoln declared the last Thursday of November to be that national holiday, following Young's lead in calling it Thanksgiving. After the Civil War, Thanksgiving developed rituals, foodways, and themes of family—and national—reunion. Only later would it consolidate its narrative around a harmonious Pilgrim-Wampanoag feast, as Lisa Blee and Jean O'Brien point out in "Monumental Mobility: The Memory Work of Massasoit" (North Carolina), which tells the story of how the holiday myth spread. Fretting over late-nineteenth- and early-twentieth-century immigration, American mythmakers discovered that the Pilgrims, and New England as a whole, were perfectly cast as national founders: white, Protestant, democratic, and blessed with an American character centered on family, work, individualism, freedom, and faith.
The new story aligned neatly with the defeat of American Indian resistance in the West and the rising tide of celebratory regret that the anthropologist Renato Rosaldo once called "imperialist nostalgia." Glorifying the endurance of white Pilgrim founders diverted attention from the brutality of Jim Crow and racial violence, and downplayed the foundational role of African slavery. The fable also allowed its audience to avert its eyes from the marginalization of Asian and Latinx labor populations, the racialization of Southern European and Eastern European immigrants, and the rise of eugenics. At Thanksgiving, white New England cheerfully shoved the problematic South and West off to the side, and claimed America for itself.
Comment: Yeah, those are helpful quotes although I wouldn't personally have put quite that much emphasis on Young. His footnote could have easily been lost and forgotten if it weren't for all the other dynamics.
Comment: It appears that the spurious description of the 1621 festival as "the first Thanksgiving" originated with Young in that 1841 footnote, and people latched onto it because it was a good story.

> The modern Thanksgiving tradition is rooted in a 165-year-old historical misunderstanding that goes far beyond the question of whether turkey was served. There was no connection made between Pilgrims and Thanksgiving until 1841, when Alexander Young published a book in Boston containing a letter written by Edward Winslow, one of the Plymouth Colony leaders, on Dec. 11, 1621.
Comment: > The letter includes one paragraph in which Winslow described a three-day harvest celebration attended by the 50 colonists and some 90 Indians.
> On his own, Young decided to add an asterisk, a fateful footnote describing the event as "the first Thanksgiving" ... In essence, Young wrongly conflated the English tradition of a secular harvest festival with the very specific Puritan tradition of observing holy days of Thanksgiving, which occurred primarily in church and only when occasions warranted.
Comment: > But it all started with Young's faulty footnote. "So, basically, that asterisk sets the myth in motion," said Jennifer Monac, public-relations manager for Plimouth Plantation. "That's all it was, a paragraph in a book, and it's turned into America's most beloved holiday."

https://www.chicagotribune.com/news/ct-xpm-2006-11-19-0611190267-story.html


Safe to use a BCrypt hash directly as a key to HMAC-SHA256?

Question: Is it safe (or optimal) to use a BCrypt hash directly as the key to an HMAC-SHA256? I ask because all the BCrypt hashes I will use contain the same salt, version, and cost, so the first 29 characters of the hashes will all look the same, e.g. <code>"$2a$06$/H63GWnve78WGVBSDouFTO"</code>. I'm not comfortable with this much known structure in a key. Should I run the BCrypt hash through a SHA256 first before using it as the key to an HMAC-SHA256, or is it ok to use it as-is?
Comment: It would be bad practice that "all the BCrypt hashes (…) contain the same salt, version, and cost", for that makes salt ineffective at preventing password search on several different passwords. Using the BCrypt hash as key to HMAC-SHA256 won't cure that. As pointed in this [answer](https://crypto.stackexchange.com/a/107592/555), HMAC-SHA256 works fine for a key of any length, and will hash it before use if too long (over 64 bytes).
Comment: bcrypt is [not](https://www.usenix.org/legacy/events/usenix99/provos/provos.pdf) a password-based KDF, just a password hashing algorithm. For key derivation, you should use [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html). If using bcrypt for password hashing, it's best to use [hmac-bcrypt](https://github.com/epixoip/hmac-bcrypt) as this avoids some design/implementation limitations.
Answer: In principle HMAC can use a key fo any size. However, I'd argue that only the final 31 characters of the returned string are of importance, as that consists of the calculated bcrypt hash / the HMAC secret. Obviously you'll need to store the salt somewhere public if you want to just keep the password secret. As such it doesn't count towards the security of the resulting secret.
Now there is something of a problem: those 31 characters only represent 23 bytes of generated secret information. In principle HMAC should take a key of 32 bytes. So the output of bcrypt seems to be fall somewhat short of the recommended size for HMAC. Generally I'd say that 184 bits offer plenty of security, but switching to PBKDF2 or Argon2 could an idea.
For HMAC I say it doesn't matter much if the characters are used "directly" by interpreting them as bytes (using one specific character encoding) or if they are base 64 decoded first.

I don't see much point of hashing the output of bcrypt before putting it into HMAC. HMAC can take any size of key, and will automatically hash the input using the internal hash if it would hamper the efficiency of the algorithm.
Comment: Switching from BCrypt to PBKDF2 would sizably reduce the cost of password search (at equal work for key stretching by legitimate user). That's a much worse issue than the 184-bit restriction, or even the BCrypt password size limit of 72 bytes (which can be much less characters). Thus I would not recommend using PBKDF2. Switching from BCrypt to Argon2 is unlikely to harm, would raise the cost of password search (particularly when context of legitimate use allows free use of multiple processors). That's good, and has all the benefits of PBKDF2 except simplicity.
Comment: Keeping the metadata from the hash type would be a no-effort way to provide domain-separation from other key derivation types. Since bcrypt has a fixed hash size, including the metadata would also partially fix the issue HMAC has of not discriminating between keys of different sizes that are less than the block size, where the variable bits of the key are trailing zeros. I say "partially" because there's still a possibility that a random key could incidentally contain a prefix which matches bcrypt metadata while also being of ambiguous size.


The goal of fine tuning

Question: I would like to ask what is the goal of fine-tuning a VGGNet on my dataset.
What does fine-tuning mean? Does it mean to change the weights or keep the weight values?
Comment: https://datascience.stackexchange.com/questions/28383/using-a-pre-trained-cnn-classifier-and-apply-it-on-a-different-image-dataset/28387#28387
Answer: Fine tuning means changing the weights such that the VGGNet can perform the task you want in your dataset. The reason why fine-tuning is not called training (which is what you are doing) is because it implies that you already use a network that has been trained on a dataset. However, the concept is the same as training, but you just happen to it do with a convenient set of initial weights.
Comment: The initial weights are the result on training the network in another set of images. This is a better initialization than choosing random weights.
Comment: What do you mean by " but you just happen to it do with a convenient set of initial weights."?
Answer: Basically fine-tuning or transfer learning is used for situations where you don't have so much data or computation time or maybe computation capacity to train a whole network from scratch. In this way, you usually replace the last layers of a pre-trained network with new ones. The first layers have already found the needed good features and last layers try to classify, you replace them because you have your own labels. Take a look at here for considering how it should be applied and here for more details. You can keep weights, also called freezing, or let the gradient-based algorithms change them, but usually freezing first layers and training last layers is faster.
Answer: Networks like VGGNet have huge numbers of parameters (see Appendix D for details, but it's something like 135 million). Training such a big network takes a lot of data and a lot of time. There is ImageNet, which has 1000 classes and many thousand images. For ImageNet, some people already trained VGGNet and provided the parameters.
One way of finetuning is to replace only the last layer (about 4 million parameters) and add a new layer which has the number of classes you need. Then you can freeze all other weights and train on your data. Hence you will have lower training time and you will likely get better results (at least on similar datasets ... for datasets which look very different, there seems not to be documented conclusive evidence)
Comment: Professor Andrew Ng has investigated what I've said in details in the third course of his DL specialization.

The goal of fine tuning


Users of GSAT-6A or similar communication satellites

Question: Who are the actual users of the recently launched GSAT-6A(or similar communication satellites). Are these satellites only for millitary communication(using satellite phones)? I have a suspicion that it might be assisting our regular mobile phone(cell phone) communication as well but I don't know how because mobile phones use mobile towers(eNodeB in case of LTE) to communicate. Also, how can a civilian get access to the satellite phones which use such satellites?
Comment: Satphones use for example the Iridium constellation which is in much lower orbit (iirc this sat went to GTO so will be operating at Geostationary orbit - much higher latency).
Answer: GSAT-6A has 6m antenna that allows to receive low power signals from handheld devices, thus allowing two way communication.
In 2005 the Antrix signed contract with bangalore based devas multimedia to lease 90% of S-BAND transponders for 12 years to it. But subsequently S-band being scarce the deal was terminated with reason being that military needs should be met first. The controversy
Therefore, the main user shall be only security personnel in remote areas.
However, DRDO is still perfecting and tuning its handheld device used for such communication. Info link