Is there any correlation with the number of tags used and the quality of a question?

Question: Do more tags mean a better question? a worse question? Is this even a relevant metric? I feel like more tags are indicative of an unfocused question or a question that is desperate for answers. Any data to support or refute this assertion?
Comment: For anyone with good skills with the data explorer, some interesting data would be: questions open/closed with each number of tags, number of tags vs views, number of tags vs votes, number of tags vs answers.
Answer: I doubt it indicates a better/worse question, although it might indicate a newer user.
Before I understood how SE worked, I used to always use 5 tags because I thought it meant I would get more views. I'd actually spend extra time trying to figure out a 4th or 5th tag, even if one wasn't actually needed.
Now I understand how SE works better, and only use more tags if the question warrents more tags. And it turns out, most questions I ask don't need more than 2, maybe 3, tags.
Answer: It's not a relevant metric, quantitative metrics rarely are.
Empirically, questions that have five tags (the upper limit) tend to be better quality wise from questions that have a single or two tags, because the OP put a little bit more effort in categorizing the question. Four/five good tags is a hint that the OP is familiar with the site, but just a hint, the question itself may be crappy.
Then again, it's not extremely rare to see questions (good and bad) with three or four useless tags (think: meta tags). I don't remember seeing a question with five useless tags, let's hope the careercareer-developmentsoftware-developmentsoftware-engineeringbest-practices beast remains a mythical one.
We seem to have a bigger problem with tagging than other sites, at least the sites I frequent. If you take a look at stci, tags, tag-blacklist and tag-merge questions you'll get a better idea of the various tagging issues we've had (and in some cases continue to have). The first Structured Tag Cleanup starts tomorrow, hopefully we will get rid of some of the most troublesome tags.
Now, let's see how we can retag this question, because discussion alone doesn't say much...

Interesting SEDE queries

How many tags per question
Average tag count per question
How many tags per question for top questions?
Close count per tag with close rate >= 10% (irrelevant but still interesting!)


Why is scale factor inversely proprotional to temperature?

Question: In all lectures, books and papers I have read about, the scale factor of the universe is inversely proportional to temperature
$$a \propto \frac{1}{T}$$
What is the reasoning behind this relation?
People did mention stretching of wavelength proportional to scale factor and wavelength being inversely proportional to temperature by Wein's law, but somehow this argument doesn't seem convincing to me. How did we initially come about to this relation?
Answer: There is a nice clear discussion of this in the paper Cooling in the Universe by Sohrab Rahvar. We are not supposed to give link only answers, but I'm not sure what is to be gained by just duplicating the working in Rahvar's paper. Basically you define temperature by the associated random thermal velocities, then write down the geodesic equation for these in an FLRW spacetime. This is realtively straightforward as only a few of the Christoffel symbols are non-zero, and the result falls out that the velocities scale as $a^{-1}$. That means the temperature scales as $a^{-1}$.
Comment: It is time till I touch relativity quantitatively, but at least I now know that a better proof exists, and the fact for non-relativistic particles.
Thanks.


Team Foundation Server (TFS) 2017 Failing to create backup

Question: So we've had backups running for a few years now, and in the last few days it started backing up extra times.  I went to reconfigure the backups to verify the settings and got an error saying it can't backup the dummy database.
<code>[Info   @12:03:50.669] +-+-+-+-+-| Running Confirming Permissions: Confirming Permissions |+-+-+-+-+-
[Info   @12:03:50.669]
[Info   @12:03:50.669] +-+-+-+-+-| Confirming Permissions |+-+-+-+-+-
[Info   @12:03:50.669] Starting Node: CONTAINER
[Info   @12:03:50.669] NodePath : Container/Progress
[Info   @12:03:50.669] Node returned: Ignore
[Info   @12:03:50.669] Completed Confirming Permissions: Ignore
[Info   @12:03:50.669] -----------------------------------------------------
[Info   @12:03:50.669]
[Info   @12:03:50.669] +-+-+-+-+-| Running VerifyCanBackupDatabase: Verifying backing up an empty database succeeds |+-+-+-+-+-
[Info   @12:03:50.669]
[Info   @12:03:50.669] +-+-+-+-+-| Verifying backing up an empty database succeeds |+-+-+-+-+-
[Info   @12:03:50.669] Starting Node: DUMMYDATABASE
[Info   @12:03:50.669] NodePath : Container/Progress/DUMMYDATABASE
[Info   @12:03:50.669] Creating dummy database to test backup.
[Info   @12:03:51.200] Queue verify backup job
[Info   @12:03:51.263] Queued job [GUID]
[Info   @12:03:51.263] Starting backup job to verify necessary permissions
[Info   @12:03:56.295] Waiting for backup job to finish
[Error  @12:04:01.311] Backup job Failed: TF400797: Job extension had an unhandled error: System.Data.SqlClient.SqlException (0x80131904): The server principal "[DOMAIN\SERVERNAME]$" is not able to access the database "Tfs_Temp[GUID]" under the current security context.
BACKUP DATABASE is terminating abnormally.
   at Microsoft.VisualStudio.Services.Configuration.SqlDatabaseBackupRestoreComponent.Execute(String sqlStatement)
   at Microsoft.VisualStudio.Services.Configuration.SqlDatabaseBackup.Backup(ISqlConnectionInfo connectionInfo)
   at Microsoft.TeamFoundation.Admin.Jobs.DatabaseBackupJob.TakeFullBackupOfSingleDatabase(IVssRequestContext requestContext, String dataSource, String databaseName, String fullFileName, ITFLogger logger)
   at Microsoft.TeamFoundation.Admin.Jobs.VerifyBackupPermissionsJobExtension.Run(IVssRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime jobQueueTime, String& resultMessage)
   at Microsoft.TeamFoundation.Framework.Server.JobRunner.ExecuteJob(IVssRequestContext requestContext)
ClientConnectionId:00000000-0000-0000-0000-000000000000
Error Number:916,State:1,Class:14
[Info   @12:04:04.405] Node returned: Error
[Error  @12:04:04.405] TF401002: The SQL Server Database Engine failed to save the database backup to path \\[MACHINE]\TFSBackups.  Please grant SQL service account read/write access to that folder.
[Info   @12:04:04.405] Completed VerifyCanBackupDatabase: Error
[Info   @12:04:04.405] -----------------------------------------------------
</code>
The permissions on the folder are fine with both our service and the machine having full write permissions
Is there a way to bypass this temp database? The normal backup was working, but now that it has failed to backup this test one, it removed the nightly scheduled backups
Answer: A TFS server backup can only be restored by restoring all databases that are part of the TFS instance. performing a backup that is skipping one of the databases puts you in an unrecoverable state.
The first error message is likely the cause of the issue, the backup is being executed by the LocalSystem account of the TFS Data Tier server (e.g. <code>[DOMAIN\SERVERNAME]$</code> and because that user doesn't have the permission to create backups of the temp tfs_temp database, it is unable to complete the full backup set.
The solution is to either drop the temp project collection from the TFS admin console or to fix the security settings of the user performing the backup, so that it can perform a complete server backup.
Comment: But the temp one is one that it is creating right before it tries to restore it. It has all the correct permissions and *was running backups* until I re-ran the setup wizard for the backups and it failed to backup its temp db


How are data sources used in Terraform?

Question: The Terraform Data Sources documentation tells me what a data source is, but I do not quite understand it. Can somebody give me a use case of data source? What is the difference between it and configuring something using variables?
Comment: good question. I also hadn't understood it until I read it for a 3rd time in the 3rd day...
Comment: I had to go thorough their tutotial [here](https://developer.hashicorp.com/terraform/tutorials/configuration-language/data-sources) to understand what is going on
Answer: Data sources can be used for a number of reasons; but their goal is to do something and then give you data.
Let's take the example from their documentation:
# Find the latest available AMI that is tagged with Component = web
data "aws_ami" "web" {
  filter {
    name   = "state"
    values = ["available"]
  }

  filter {
    name   = "tag:Component"
    values = ["web"]
  }

  most_recent = true
}

This uses the aws_ami data source - this is different than a resource! It will instead just give you information, and not create anything. This example in particular will call out to the describe-images AWS API call, pass in a few --filter options as specified, and return an object that you can get information from - take a look at these attributes!

name
owner_id
description
image_id

... The list goes on. This is really useful if I were, let's say - always wanting to pull the latest AMI matching some tags, and keep a launch configuration up to date with it. I could use this data provider rather than always have to update a variable or hard-code the ID.
Data source can be used for other reasons as well; one of my favorites is the template provider.
Good luck!
Comment: HI, Thanks TJ. your answer is very clear. I do not understand why terraform does not explain what is data source in your way. :-)
Comment: UPDATE
template_file is obsolete: https://registry.terraform.io/providers/hashicorp/template/latest/docs
Comment: 1 more question which may or may not related to data source: I have created a few new services (using terraform) in an existing AWS cloud (manually created). Right now, I indicated the ids of existing cloud (subnet, role, vpc id, etc) in my service resources, e.g. subnet_id = "${var.subnet_private1_id}", and I set subnet_private1_id as the actual subnet id in terraform.tfvars In the future I will run my terraform code to another AWS cloud. then all id I related to the current cloud will be re-configured. Should I just set all related id of current cloud as variables, or shall I use datasource?
Comment: You want to use `terraform import`
Comment: T J Biddle: I do not  need to change the existing things, I only need to create new stuffs based on the existing cloud so I do not need to import. see https://stackoverflow.com/questions/47665428/how-to-launch-ecs-in-an-existing-vpc-using-terraform
Comment: Gotchya - Well I really recommend trying to get as much of your infrastructure into code as possible; it will make things a lot easier down the road.
Answer: Data sources provide information about entities that are not managed by the current Terraform configuration.
This may include:

Configuration data from Consul
Information about the state of manually-configured infrastructure components

In other words, data sources are read-only views into the state of pre-existing components external to our configuration.
Once you have defined a data source, you can use the data elsewhere in your Terraform configuration.
For example, let's suppose we want to create a Terraform configuration for a new AWS EC2 instance. We want to use an AMI image which were created and uploaded by a Jenkins job using the AWS CLI, and not managed by Terraform. As part of the configuration for our Jenkins job, this AMI image will always have a name with the prefix app-.
In this case, we can use the aws_ami data source to obtain information about the most recent AMI image that has the name prefix app-.
data "aws_ami" "app_ami" {
  most_recent = true
  filter {
    name   = "name"
    values = ["app-*"]
  }
}

Data sources export attributes, just like resources do. We can interpolate these attributes using the syntax data.TYPE.NAME.ATTR. In our example, we can interpolate the value of the AMI ID as data.aws_ami.app_ami.id, and pass it as the ami argument for our aws_instance resource.
resource "aws_instance" "app" {
  ami           = "${data.aws_ami.app_ami.id}"
  instance_type = "t2.micro"
}

Data sources are most powerful when retrieving information about dynamic entities - those whose properties change value often. For example, the next time Terraform fetches data for our aws_ami data source, the value of the exported attributes may be different (we might have built and pushed a new AMI).
Variables are used for static values, those that rarely changes, such as your access and secret keys, or a standard list of sudoers for your servers.
Comment: Thanks d4nyll. In another word, 1) data source is to provide information of existing infrastructure not to create new services. 2) and it retrieves dynamic entities based on your filtering logic.
Comment: 1) Yes! 2) Each data source is different. For the `aws_ami` data source, because it actually called the [`describe-images`](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html) CLI command in the back, and _it_ supports filtering. For other data sources, there may not be filtering. The configuration of each data source is specific to that data source and provider.
Comment: Oh. Good to know. Thanks again @d4nyll
Comment: Hi @d4nill, Thanks for the explanation. How about the archive_file data source? A new file is created when using this, not just "read" something. Why do they consider that a datasource then?
Comment: @Averell that's a data source that I haven't used before, and it does seem like it goes against the norm. If you find any other examples, let me know, I will update my answer. I guess a more accurate way of describing data sources is that they get the state of existing resources and incorporate it as part of the Terraform state. The `archive_file`'s existing resource is a file or directory of files, and it seems like the entire file content are stored in the state.
Answer: The main difference between a Terraform data source, resource and variable is:
Resource: Provisioning of resources/infra on our platform. Create, Update and delete!
Variable: Provides predefined values as variables on our IAC. Used by resource for provisioning.
Data Source: Fetch values from our infra/provider and provides data for our resource to provision infra/resource.
Answer: Data sources are used to fetch the data from the provider end, so that it can be used as configuration in .tf files instead of hardcoding it.
Example: Below code fetches the AWS AMI ID and uses it to launch AWS instance.
data "aws_ami" "std_ami" {
  most_recent = true
  owners      = ["amazon"]

  filter {
    name   = "root-device-type"
    values = ["ebs"]
  }

  filter {
    name   = "virtualization-type"
    values = ["hvm"]
  }
}

resource "aws_instance" "myec2" {
  ami           = data.aws_ami.std_ami.id
  instance_type = "t2.micro"
}

How are data sources used in Terraform?


Replacement for obselete OpenDNS Umbrella App on iPhone

Question: I have been a Prosumer OpenDNS Umbrella customer for years, but their App isn't being upgraded to 64-bit, so it won't work with iOS 11. It provides Umbrella's protections and also allows filtering by category of all internet traffic to/from an iPhone. This has saved me multiple times when I've mistyped web addresses and it reassures me that my child won't as likely stumble across inappropriate content.
Is there another similar product to OpenDNS's prosumer Umbrella for iPhones? I've searched online and keep coming across OpenDNS Umbrella or simple VPNs that don't have the same filtering capabilities or that go overboard (in my opinion) requiring jailbreaking the iPhone so that it can "spy" on all of your users' iPhone activity for you.
Simply blocking adult content in Safari is possible (as suggested here, go to Settings->General->Restrictions->Allowed Content->Limit Adult Content. But that only automatically blocks one category and doesn't necessarily block malicious sites and so many other features I like about OpenDNS Umbrella.
I'm not a company, so I don't think I can use Cisco's other VPN commercial products to do the same thing. And if I could, it would cost a minimum of $380/year for a minimum of 10 users. Prosumer OpenDNS Umbrella has been only $20/year per user who can put it on up to 3 mobile devices.
cross posted on Software Recommendations
Answer: I'm using DNS Override and it is working well.
With it, you can choose one DNS provider for all WiFi networks your phone connects to as well as for cellular data. It is supposed to be compatible with services that allow you to block web content by category.
Comment: Welcome to Ask Different.  We like answers to be more than just one line;  *explain* what makes your answer "right."  It's also helpful, to explain how to implement your solution.


In zsh, what is the meaning of the '$==*' idiom

Question: I have found the $==* idiom in several zsh solutions that I use. It seems to be equivalent to $argv. But I don't know how it gets interpreted. Could you explain?
Answer: This is one of Zsh's parameter expansions here applied to $*:
${=spec}
Perform word splitting using the rules for SH_WORD_SPLIT during the evaluation of spec, but regardless of whether the parameter appears in double quotes; if the '=' is doubled, turn it off. This forces parameter expansions to be split into separate words before substitution, using IFS as a delimiter. This is done by default in most other shells.
See Gilles' typically thorough answer to What is word splitting? Why is it important in shell programming for context.
Normally, zsh doesn't do word splitting by default, so presumably, that's to make sure $* is not split even when the SH_WORD_SPLIT option has been enabled one way or another (for instance via a emulate sh).
However, in most cases, you'd rather want to use "$@" (note the quotes which are important here) instead of $==*. $==* (like $* when SH_WORD_SPLIT is off) expands only to the non-empty positional parameters, while "$@" expands to all the positional parameters (regardless of SH_WORD_SPLIT, and that works in all Bourne-like shells).
Comment: @StéphaneChazelas Thanks: that is much better...


How can I change my Apple ID region from Asia to U.S

Question: My Apple ID region is Indonesia but I wanted to change it cause I can't download some app on the Indonesian store
Answer: I think this page can help you.
But I'll explain it here too.
On your device, tap Settings > iTunes & App Store.
Tap your Apple ID.
If you're not signed in, sign in with the Apple ID and password that you use with the iTunes Store.
Tap View Apple ID.
If prompted, enter your password again.
    Tap Country/Region. Learn what to do if you can't change your country.
    Tap Change Country or Region.
    Tap your new country, then tap Next.
    Review the Terms and Conditions and Apple Privacy Policy, then tap Agree if you agree to the terms and conditions.
    In the prompt that appears, tap Agree.
    Select a payment method and enter your payment information. Learn more about how to change or remove your Apple ID payment information.
    Enter your billing address and tap Next.
Your Apple ID country updates for all of your Apple services on all of your Apple products.
Open iTunes.
If you're not signed in, sign in with your Apple ID.
From the menu bar at the top of your computer screen or at the top of the iTunes window, choose Account > View My Account.
    If you're using Windows and can't see the menu bar, learn how to turn it on.
    Enter your password, then press the Return or Enter key on your keyboard, or click View Account.
On the Account Information page:
To the right of Country/Region, click "Change Country or Region."
    From the "Select a country or region" menu, select your new country. Learn what to do if you can't change your country.
    Click Change.
    On the Welcome to the iTunes Store page, click Continue.
    Review the Terms and Conditions and Apple Privacy Policy. If you agree, select "I have read and agree to these terms and conditions."
    Click Agree.
    Enter your payment method. Learn more about how to change or remove your Apple ID payment information.
    Enter your billing address.
    Click Continue.


Port Forward to openVPN client through local client network

Question: So I have a WD MyCloud EX2 using openVPN to connect to a paid VPN service, but I still want to have access to my ssh,ftp, and plex ports (22,20-21,32400) from an external network using port forwarding to the local network. I'm aware I can setup port forwarding on the VPN server and my provider allows for that, but the ip always changes and I don't want to go through the VPN providers. I am able to access these ports by default when on the local network with the NAS (and when using openVPN to route into the local network), but I am unable to connect using port forwarding (it stops working once I enable the NAS VPN). I tried some basic Iptables rules such as iptables -A OUTPUT -p tcp -m tcp --dport 32400 -j AC but they do not seem to work. I've seen various posts about attempting similar things but they seemed either supeDoes anyone has any ideas on how to allow the NAS to bypass openVPN for specific ports?
Thanks
Answer: The problem is likely because of routing. Most likely, your VPN provider pushes routes that force your device to use the VPN server as the default gateway. Usually, it will push 0.0.0.0/1 and 22.214.171.124/1, as these two routes combined will cover the entire IPv4 address space, and still allow you to talk to your immediate upstream gateway and local network(s), as they take precedence since they have larger prefixes (e.g. /24).
This means that if your VPN client receives a packet from a host on the internet (e.g. 18.104.22.168) on its eth0 interface, for example, it will match the route 0.0.0.0/1 and get sent to your VPN server. 18.104.22.168 is not expecting a packet from your VPN server, and thus the connection fails to be established. What you want is for the reply packet to be sent out from eth0, back out the way the initial packet came in.
This can be accomplished with routing policy on the machine that is the VPN client that you need to access with port forwarding. See this similar question and the first answer: Reply on same interface as incoming?
To quote:
echo 200 isp2 >> /etc/iproute2/rt_tables
ip rule add from <interface_IP> dev <interface> table isp2
ip route add default via <gateway_IP> dev <interface> table isp2

Answer: You can set a ddns (dynamic dns) that will allow you to have a domain to your dynamic ip address, i personally use no-ip, its free, you just need to press a button every 30 days to confirm you still want the domain, its free.
You can set it o your primary router, by a client on your win machine, or from a linux server in your network.
You can setup the openvpn (if you have build it by yourself) and make it vpn type 3 with tunneling, which will make your device be on the same subnet as your devices, from every network you connect, its recommended to have a different ip address for your home network like 10.10.1.0/24 so you won't have ip addr collision when you use it.


Swift on Xcode 6

Question: I'm trying to use Swift on Xcode 6 for an OS X application, but it defaults the language to Objective-C and won't let me switch it to Swift. I can use Swift for iOS but not OS X. I have the latest software so I'm not sure what the problem is. Can someone help?
Answer: The current version of Xcode doesn't support Swift for OS X… yet.
The App Store update description says:

* NOTE: Swift support for OS X is coming in a future Xcode update

So you'll either have to download the beta version from http://developer.apple.com/xcode/downloads or wait for support to be added for the release channel.
Answer: Swift is currently supported by 2 versions "XCode Ver. 6.4" and the latest "XCode 7 Beta 2 Ver."
Download Either of them from http://developer.apple.com/xcode/downloads
XCode 6.4 Recommended as of now due to stable release.

Swift on Xcode 6


Adding on my command to services menu or adding keyboard shortcuts

Question: OnMyCommand allows commands to be added to the shortcut menu. Unfortunately, I can't add them to the services menu or add a keyboard shortcut for them. Is this possible?
Answer: Use Apple's automator and save the result as a service. If you select the right conext for the service it will appear in the right click menu. You can add shortcuts to services using System Preferences > Keyboard > Keyboard shortcuts. Click somewhere to the right of the service name (near the right edge of the white box). A field appears and you can type a shortcut. This is not very intuitive.
Comment: Thanks, but I am trying to get it to work with commands from "On my command" rather than having to create new commands in automator
Comment: Automator does everything you want, including shell script, applescript, shortcuts, services and contextual menu. Why use OMC?


How does current flow in the given case?

Question: Suppose each Coulomb of charge in a circuit has 6J of energy. When these electrons pass through the bulb (which is like a resistor) they give away all the energy to the bulb. In that case, the electrons are now left with 0J of energy. How can the electrons make it to the positive terminal if they are left with no energy?
Answer: The electrons flowing through the battery, and the wire, and then....your bulb, are many, many in number. ALL of them do not give up their entire energies to heat the filament of the bulb. Some might lose more energy and some less, on colliding with the atoms in the filament. These electrons are always under the force of electric field, generated by the battery driving the circuit. So they are always pulled by the positive terminal of the battery and keep on flowing, hence, completing the circuit, for which the bulb lights up.
Even if you consider your case, where an electron is losing its entire energy in a collision, then so what? It might get kicked by other flowing electrons, and hence gain energy, Or it might feel the field force of the battery and get accelerated again.
Answer: Shaona's answer is very good.
I'll only add that "0 joules" is absolutely irrelevant.  Saying that the negative pole is 0V is absolutely arbitrary. We don't care about the real "energy", which is unknown. We can only measure differences of energy, and that is work (and heat). Energy is free, work isn't.
Answer: A simplification of the situation is to consider the  gravitational analogy of the passage of an electron through the light bulb.
Imagine a block of wood (the electron) at the top of a slope (the bulb).
The slope has a number strips across it some of which present no friction to the passage of the block (gaps between ions in the conductor) and some horizontal stripes which result in friction between the block and the strips (electron colliding with an ion).
The inclination of the slope is so arranged that the speed of the block at the top of the slope is the same as the speed of the block at the bottom of the slope.
At the top of the slope the block has some gravitational potential energy and some kinetic energy (electron leaves the negative terminal of the power supply and enters the light bulb with some kinetic energy and electrical potential energy).
The block accelerates on a friction less stripe gaining kinetic energy whilst losing some gravitational potential energy (electron loses some electric potential energy and gains kinetic energy between collisions with ions).
On traversing a horizontal stripe which provides a frictional force the block loses kinetic energy ie slows down and heat is produced (the electron interacts with an ion and make the ion vibrate more whilst at the same time the electron loses some kinetic energy).
The sequence repeats itself each time the block losing some gravitational potential energy and gaining kinetic energy and then losing the kinetic energy it gained to produce heat and at the bottom of the incline the block has the same kinetic energy as it had at the top of the incline.
(The electron gains kinetic energy whilst losing some electric potential  between collisions with the ions and then loses the kinetic energy it gained on collision with an ion.  After passing through the bulb the electron has as much kinetic energy as it had when it entered the light bulb).
So it is not an all or nothing situation the electron loses electrical potential energy as it passes through the light bulb and that energy ends up as heat (and light).
When the electron leaves the light bulb it still has enough kinetic energy and electrical potential energy to travel through the connecting wire and arrive at the positive terminal of the power sourc
Answer: It is ok to define the potential of the positive terminal as zero and measure the potential or voltage everywhere else in the circuit relative to that reference point.
By that definition, an electron that was pulled from the positive terminal and moved to the negative terminal by the battery, gaining some energy in the process, will lose all its energy, as it moves back to the positive terminal through the circuit, only when it gets back to the positive terminal. Not sooner and not later, because in our reference frame that is the point where electron's potential energy was defined as zero.
This balancing act happens automatically through the adjustment of the current in the circuit.
As an example, in the case you are describing, where each Coulomb of negative charge passing through the circuit, starts up at the negative terminal with 6 Joules of energy, which just corresponds to 6V (V=U/Q=6J/1C). If the total effective resistance of the circuit, including the bulb, the wires and possibly other bulbs, is equivalent to, say, 10ohm, the current in the circuit will automatically become 6V/10ohm=0.6A, which will guarantee that every Joule of energy will be spent exactly at the time the charge will arrive to the positive terminal.
Of course, in reality (as far as we know), the electrons in the circuit move very slowly and create current by pushing each other, therefore, it is likely that 6J of energy will be spent before the electrons starting at the negative terminal reach the bulb, but there will be another group of electrons, closer to the positive terminal, that will reach it in their stead and their energy at that moment will be exactly zero.


htmlentities 'Invalid Multibyte Sequence' error

Question: While trying to run a string through PHP's htmlentities function, I have some cases where I get a 'Invalid Multibyte Sequence' error. Is there a way to clean the string prior to calling the function to prevent this error from occuring?
Answer: As of PHP 5.4 you should use something along the following to properly escape output:
$escapedString = htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED | ENT_HTML5, $stringEncoding);

ENT_SUBSTITUTE replaces invalid code unit sequences by � (instead of returning an empty string).
ENT_DISALLOWED replaces code points that are invalid in the specified doctype with �.
ENT_HTML5 specifies the used doctype. Depending on what you are using you may choose ENT_HTML401, ENT_XHTML or ENT_XML1.
Using those options you make sure that the result is always valid in the given doctype, regardless of the kind of abominated input you get.
Also, don't forget to specify the $stringEncoding. Relying on the default is a bad idea as it depends on ini settings and may (and did) change between versions.
Comment: @Lekensteyn `ENT_HTML5` is not redundant, especially when `ENT_DISALLOWED` is used. It will replace code points that are invalid in the HTML5 doctype with the Unicode Replacement Character. E.g. see this example: http://codepad.viper-7.com/q5bPMQ The `ENT_HTML5 | ENT_DISALLOWED` makes sure that the output does not contain any invalid codepoints.
Comment: The PHP documentation is unclear about it, but `ENT_HTML5` is redundant for htmlspecialchars. See http://stackoverflow.com/a/14532168/427545
Comment: Thanks for the correction, I have expanded my answer to take invalid characters into account. At first I did not know the difference between DISALLOWED and SUBTITUTE, but now it has become clear to me.
Answer: I've encountered scenarios where it's not enough to specify UTF-8 and found the ENT_IGNORE option useful. I don't think it's documented for htmlentities, only for htmlspecialchars but it does work in stifling the error.
Comment: I know this is an old topic but I came across this problem too and thought it might be worth noting that the use of ENT_IGNORE is not recommended as it may have security implications: http://unicode.org/reports/tr36/#Deletion_of_Noncharacters
Comment: Yeah, ENT_IGNORE was the only fix (/hack) that I found for this issue, at the moment.
Comment: Better try to fix your UTF8. In my case, I used `substr()` on the string, which produced invalid UTF8. Using `mb_substr()` instead fixed my issue. `ENT_IGNORE` would have worked as well, but it is not a clean solution.
Answer: For PHP 5.3.0 and below, the default charset for htmlentities()  is ISO-8859-1. (Manual)
You are probably applying it to a UTF-8 string. Specify the character set using
htmlentities($string, (whatever), "UTF-8");

Since PHP 5.4.0, the default charset is UTF-8.
Answer:
In general the php ini setting display_errors can be used to control
  whether errors are output to the browser, the ini setting log_errors
  can be independently used to control whether errors are written to
  logfile, and if a custom error handler has been set with
  set_error_handler() then this is always called for all errors and can
  then read the values of display_errors and log_errors along with the
  value of error_reporting() and take the appropriate course of action,
  right?
Wrong! In this case, htmlspecialchars() and htmlentities() only trigger the error if the value of display_errors is false. If the
  value of display_errors is true then no error is triggered at all!
  This seemingly nonsensical behaviour makes it impossible to detect
  these errors during debugging with display_errors on.

I got the information from here
Comment: Thanks for pointing this out - it explains why I only saw this error on production! I couldn't figure out why, on my development box, where all error reporting is turned _ON_, I couldn't reproduce the error.
Answer: Do you use substr somewhere in the string you want to check. I suggest then to use mb_substr as an alternative.
The problem is that substr is not unicode aware. So, it is just chopping off bytes in your multi byte character set.
Answer: html_entities($variable, ENT_QUOTES); always works just fine for me.
Comment: The default encoding in some versions of php is iso-something-something, and only later in php 5.4 is it utf-8.  Note that regardless, it is not consistent across versions, so it's probably best to specify the encoding to match whichever encoding is actually in use.
Answer: Note that using utf-8 requires enabling multibyte string functions.  This could mean replacing functions like substr with mb_substr, except that php provides a php ini setting to turn on overloading of those functions with the mb equivalent.
See here for more detail: http://www.php.net/manual/en/mbstring.overload.php


Best way to protect a server with encryption

Question: I am planning to deploy a server at a customer location, probably either of  linux/bsd based system. How can I ensure that the server is protected from data-theft/replication, for eg. someone(maybe customer himself) making duplicate copies of the disk.
I understand disk encryption could help, but anyone with a valid passkey can decrypt, is there any way to make it transparent from the user/customer, so that he doesn't have to enter passkey at boot.
Answer: The only way I know of is to include the passkey on an unencrypted partition on the hard drive.  Hardly secure - the customer could just read that partition.
The only 'secure' way would be to tie the encryption into the hardware somehow so the disks (or images of the disks) can only be used on one set of hardware - maybe use something like the BIOS ID as part of the encryption key maybe?  Not quite sure how you'd go about doing this.
Comment: or I was also thinking of writing an application (on unencrypted partition) which can fetch passkey from a remote server(with auth), and not start all the services until passkey is fetched.Looking for any best practices on this scenario.
Answer: You could store the sensitive data on an encrypted partition, then require someone to login through SSH and enter a key to unlock it. Obviously, after a restart, the system will not be working properly until someone unlocks it.
Comment: I am expecting frequent reboots, so thinking of something that can be sort of transparent( no human intervention ) and also secure. I believe if I somehow put it in a executable, beginner user wont  be able to retrieve the key.
Answer: It just won't work that way.
If you want to protect against physical theft, the key must be stored off-site. Keeping it in a special server won't help against someone who can convince your server to reveal the key as if a normal boot was in progress, or modify the boot process to dump the key. (Without revealing the key, there's just no way to unlock the data.)
Also, no matter what software you use, it will still be possible to make a byte-exact copy of the drive's contents, by both the thief and the customer. Some kind of hardware solution would be necessary.
In the end, though, whoever has physical access can find a way to bypass the security.
Answer:
http://loop-aes.sourceforge.net/loop-AES.README

Look at part 7:
<code>7.    Examples
7.1.  Example 1 - Encrypting swap on 2.4 and newer kernels
7.2.  Example 2 - Partition backed loop with gpg encrypted key file
7.3.  Example 3 - Encrypted partition that multiple users can mount
7.4.  Example 4 - Encrypting /tmp partition with random keys
7.5.  Example 5 - Encrypting root partition
7.6.  Example 6 - Boot from CD-ROM + encrypted root partition
7.7.  Example 7 - Boot from USB-stick + encrypted root partition
7.8.  Example 8 - Encrypted partition using serpent cipher
</code>
Comment: Can you please elaborate on that instead of just linking somewhere? Otherwise this answer will be deleted.


What are the mandatory and optional address fields in geocode?

Question: What are the mandatory and optional address fields in geocode?
 As the address format is different for different countries throughout the world, what is the format that needs to be used in geocode .Is there a specific format for it, like mandatory fields and optional fields in address.
Please let me know.Thanks
Answer: No specific format. Just give it some data and it will try its best to discern it. I have an app that the user inputs zip/postal code and it will retreive all the relevant info (city, state/province, country).


Should I publish book chapters as standalone articles before approaching a publisher?

Question: [Humanities - Post Doc Stage] Do you encourage the publication of chapters as articles prior to full book publication, with the aim to improve research profile? Or do you advise publishing a book of previously unpublished work? Or do you suggest publishing some and retaining other research? Please detail any experience of this in your response, with reference to approaching publishers if possible.
Comment: Some publishers won't republish existing work. And it is up to the publisher whether to publish something or not. Find a publisher and work with them.
Comment: As I understand it, in certain branches of the Humanities, typically the first publication is a book based on the thesis.  You are (if lucky) hired to an academic position, you work hard preparing your thesis for publication, and then that publication is the basis for promotion.  That was years ago.  Nowadays perhaps that "academic position" may be a postdoc, and that "promotion" may be a regular teaching position.
Answer: Publishers are going to look at your background before agreeing to a publish your work. Things looked at include:

Your citation metrics
Reviewers for your publication proposal
Your CV

Publishing some standalone articles will certainly improve all three, but you'd have less material when it actually comes time to publish a book (because the same material typically cannot be reused). So the question effectively becomes, "can I publish now or do I need a better profile?". Only you can answer that question, unfortunately.
If you don't know the answer either I'd suggest contacting a publisher now, and if they reject your proposals, then publish standalone articles first.


Disable incoming telnet connections

Question: I'm trying to secure my Debian server, and noticed that if I type telnet myserverip port# then anyone can see my ssh version. I'm a bit worried that people can do some harm aside from that. How can I make it so that my server refuses any telnet related requests? I googled around, but most sites tell me to modify my init.d file, but there is no telnet service in the first place. I'm sure I'm misunderstanding some things about telnet and how it works so sorry if that's the case.
Comment: Being able to use the `telnet` utility to connect to a remote port does not mean that remote server has telnet running. From your description, it sounds like you're connecting to port 22, and getting sshd's banner. You cannot disable this, and you shouldn't either as the version number is used to ensure compatibility between client & server.
Comment: oh I see. Thank you for your help. I'm still learning how to do all this
Answer: SSH is a TCP service and there is no way to realize whether the client is telnet or whatever. If you want to hide your system version and/or system architecture, you can try for instance:
http://en.wikipedia.org/wiki/Port_knocking
Or, it's simple to recompile openssh with your own "version". AFAIR there is a header file which contains #define witch you can change. It shouldn't be difficult to find. Just grep the sources.
Comment: This is actually pretty useful. Thank you.
Answer: If you're not going to use it why not unistall it?
apt-get --purge remove openssh-server
If you don't want to uninstall it you can disable its automatic startup with
update-rc.d -f sshd remove
Or you can do what smrt28 sugested and can compile it yourself changing the version so that it will be more difficult to identify it.

Disable incoming telnet connections


Is it possible to create rotationally symmetric Venn diagrams with 7 sets?

Question: I need to construct a two-dimensional Venn diagram with 7 sets. The examples I found on-line do not have rotational symmetry, so they are rather confusing to use. Is there a way to construct these in a way which is rotationally symmetrical?
Answer: If you are looking for a rotationally symmetric Venn diagram which divides the region into $2^n$ regions, the article here addresses it for the case $n=7$.
Here is one such rotationally symmetric Venn diagram taken from here.

Typically, though when I think of a rotationally symmetric Venn diagram with $n$ sets, I would construct $n$ circles, where the $k^{th}$ circle is given by
$$(x- r\cos(k \theta))^2 + (y-r\sin(k \theta))^2 \leq cr^2$$
where $\theta = \dfrac{2 \pi}n$ and $k \in \{0,1,2,\ldots,n-1\}$. Below is one such construction with $c = 1.5$ for $n=7$. However, as Martin rightly points out in the comments, this doesn't divide the region into $2^n$ distinct sub-regions.

PS: The figure was done with grapher on Mac OS X
Comment: Isn't a Venn diagram supposed to have $2^n$ regions?
Comment: @Martin Thanks for pointing that out. I did not know that in a Venn diagram, we needed to have all the $2^n$ regions i.e. I did not know the difference between the Venn diagram and the Euler diagram. This is a good piece of information to know. Thanks.


How do I create a new directory to hold the assets for a new menu item?

Question: I'm a new webmaster, given a WP site to fix.  two menu items on the front page are dead since the code does not href a url.  I also am not yet a full admin since the Dashboard does not offer Appearance and Plugins submenus.  Working on the admin problem.  Do I need to create a directory on the server to hold the assets I will add or does WP take care of that?  Im using Word Press the Missing Manual as my reference.  What book or website do you recommend?
Answer: You need access to Appearances to change the menu. Once in Appearances, click on Menus and create your new menu. Then in the Menu settings select a location (usually primary for the header menu)
Comment: I do not need to create a NEW menu, my mistake in the initial question, I need to fix a menu item that is not working because the href= statement is missing in the index.php.  How do I edit the index.php?  Does editing the index create the directory that holds the text and picture assets?  If not, how do I create the directory?


Healthy riding for asthmatic

Question: I have asthma and find it very hard to ride for a very long time without tightness in my chest. Is this safe for me? I have knee pain as well and I find bike riding helps with the knee pain, but asthma is a different story.
Comment: This is between you and your doctor -- we generally don't give medical advice here.  But I had asthma as a child and overcame it, in part, by riding a bicycle -- around and around a 2-block circuit, up and down a moderate hill.
Comment: For the knee pain you need to be sure that your seat is not set too low -- having the seat too low can cause knee injury.
Comment: Search the site a bit - we have plenty of answers on knee pain which tends to be bike setup, or possibly joint wear with age.  Either way bike fit.
Answer: I can not give any advice, but I can present my personal story and experience. When I was a child, I was diagnosed with asthma. I needed to take a lot of medications in order to fight against asthma. I stayed also a lot of nights in hospital. At the age of 11, doctors suggested my to try endurance sports. I have chosen cycling. In fact, I really had a lot of problems with breathing in my first two years of cycling career. I needed to take Ventolin (Salbutamol) every training. During the years, situation became much better. After some years of training, I became competitive enough on a national level. In line with this, I have never faced any major problems with asthma again. I am racing now Ironman triathlons without any medications. I only sometimes have problems with breathing when there is a mix of hot and cold weather. Usually, when Autumn is transitioning in Winter I need to take one or two inhalations of Ventolin. Anyway, I also avoid riding in fog.

Healthy riding for asthmatic


SVP=SIVP in ring lattice (ideal lattice)

Question: SVP (shortest vector problem) is equivalent to  SIVP (shortest independent vectors problem) in ring lattice (ideal lattice). How to prove this? Could someone explain it to me?  Thanks!
Answer: Consider the ring $R = \mathbb{Z}[x]/(f(x))$ for $f(x)$ an irreducible monic polynomial of degree $n$.
Fix a basis $\{1,x,\dots,x^{n-1}\}$, and define the following transformation:
$$L(x^i) = x^{i+1}$$
Extend this transformation to all of $R$ via linearity.
Cayley-Hamilton theorem [1] states that the characteristic polynomial $p(t) = \det(L - tI)$ is such that:
$$p(L) = 0$$
One can explicitly compute the square matrix corresponding to $L$ (it is the companion matrix of $f(x)$), and it is known that:

The characteristic polynomial of $L$
The minimal polynomial of $L$
$f(x)$

Are all identical.
It follows that $f(L) = 0$, and this is the smallest polynomial $f(x)$ for which this holds, so among other things $\{1,x,\dots,x^{n-1}\}$ are linearly independent over $R$.
Now let $v(x)\in R$ be any vector (including a candidate "shortest vector").
We have that $\{v(x), xv(x), \dots, x^{n-1}v(x)\}$ are linearly independent over $R$.
This is because if there were some linear relation between them:
$$\sum_i a_iv(x)x^i = 0\implies v(x)\sum_i a_ix^i = 0\implies \sum_i a_i x^i = 0$$
Contradicting the linear independence.
As $\| x^i v(x)\|$ are all the same, we've exhibited a basis of vectors of the same norm.
So finding one short vector is enough to find all $n$ short vectors.

[1] Technically we need to make sure that Cayley-Hamiltonian holds over modules over general rings. Fortunately it is known to hold for commutative rings, so we're fine.
Comment: It's not true that $\| x^i v(x) \|$ are all the same (in general), because there is "wraparound" modulo $f$, which can affect the norm. For certain $f$ it is true, but in general, the choice of $f$ affects the loss factor between the SVP and SIVP problems.


live asp.net web.config settings

Question: I've only recently started working with asp.net and c#. Is there a standard practice set of web.config settings for a live final website? There seem to be a ton of options available and I'm looking to streamline performance, close possible security holes and other unnecessary options.
Answer: Tip/Trick: Automating Dev, QA, Staging, and Production Web.Config Settings with VS 2005
Answer: An empty web.config (or at least an absent <system.web> element) would mean that all of the framework's recommended defaults would take effect. You would then just need to be concerned with the host (e.g., IIS) set-up.
Answer: Start with a clean web.config and only add the sections you need.
For security, all you really can do is make sure you flag
    <compelation debug="false">
 for your production box and set custom errors to true.
Answer: Secure all folders containing any sensitive info with the location tag. Encrypt any connection strings with DPAPI.

live asp.net web.config settings


Where is the backup location from Titanium Backup on a phone without an SD card?

Question: I am currently using a Samsung S6. Today I backed up all of my data with the app "Titanum Backup". After backing up all of the data, I transferred the folder of Titanium Backup to my Google Drive. Afterwards, I restored my phone. Then I installed Titanium Backup. However, I don't know where I need to import the folder "Titanium Backup" for the app to restore the the data. I saw many YouTube videos, and their restore was in a SD Card. However, the S6 doesn't have an SD card. Can someone please help me? Thanks.
Answer: You can put it on the internal SD card as well (e.g. <code>/sdcard/TitaniumBackup</code>). At its first start, TiBu will ask you to chose a location.
Comment: @LouisRuan, try to understand: if your device doesn't have an external SD card, then the location /sdcard will point to internal SD card (it comes with all phones and S6 is no exception). Just make sure to download the folder from Drive and put it in the heart of `/sdcard/`. Use a file manager such as ES File Explorer. If TiBu doesn't detect the folder, go to its settings and choose the folder manually. Then reboot optionally.
Comment: s6 don't have an  sd Card. So what should i do?
Comment: It hasn't even an *internal* SD card? So where does it store photos etc? Hard to believe ;)
Comment: For you it may be 'internal shared storage' or 'main storage' or similar name. Check with whatever file explorer app you have. And also you can always change the location of backups from within tb setting 'storage preferences'.


"program" Equivalent in Arabic

Question: Program and programming language don't have a known translation in Arabic. برمجة and برنامج are used, even though they aren't Arabic.
Is there a native word that can be used instead?
Comment: This is a legitimate linguistic question about Arabic borrowings from Greek and Persian. I don't think it should be closed.
Comment: I don't know who downvoted this, but presumably it's because if the word is used by native Arabic speakers when speaking and writing about programming in Arabic, it _is_ an Arabic word. Saying they "aren't Arabic" implies some unspecified and probably unjustifiable rule about what actually "is Arabic". Mohammed used plenty of words that had ultimately been borrowed from Aramaic and other languages (or constructed from such borrowings), and surely nobody would say he wasn't speaking and writing real Arabic as a result?
Comment: I didn't know the origin of the word. Thanks everyone. :)
Answer: "Program" in English originally meant a structured list of things to happen (and it came from French from Latin from Greek for "edict" but that's not relevant). A computer program is a list of things for a computer to do, so the word was borrowed for that.
The common Arabic word for a structured list of things to happen is, to my knowledge, بَرْنَامَج barnāmaj. This was borrowed from Persian somewhere around 1500 years ago; while it might not appear in the Qur'an, it's been in Arabic longer than "program" has been in English. This then got verbed in Arabic just like "programming" did in English.
If you're looking for a pure Arabic form, you could potentially use something like جدول أعمال "itemized list of actions". But this would sound strange, like calling a computer program a "computer agenda" in English. I'd recommend sticking to the Persian words.
Comment: @SherifAhmad. barjama برجمة is to barnāmaj as falsafa فلسفة is to faylasūf. English has nothing to do with it.
Comment: @SherifAhmad Exactly what fdb said. Compare Modern Persian _barnâme_. There's no English influence here, except in the decision to use the word for "agenda" for a computer program.
Comment: How to use بَرْنَامَج  to correctly derive  the equivalent to "programming" and "programming language"?
برمجة seems derived from English not Arabic, isn't it?
Answer: barnāmaj is a loan word from (Middle) Persian; barmaja is a remodeling of the same word according to an Arabic pattern. Although of foreign origin, these are long established Arabic words.

"program" Equivalent in Arabic


24V voltage regulator from ~55V/5A

Question: I have a sun battery which produces around 55V / 5A at most. I need to regulate this to 24V. I wanted to use the L7824 family, but they have a maximum DC input voltage of 40V so it would burn down.
I was looking for some eaiser solution for this but couldn't find anything.
Could you recommend a simple regulator circuit that would fit to this sun battery?
Answer: If you use a linear regulator, you're going to waste more than half of the available power.  I would recommend some sort of switching converter.  That's a pretty high input voltage, though.  I don't know of any good switchers offhand that will run with a 60V+ input voltage.
I would suggest taking a look at the power converter availble from Linear and TI.  It looks like linear has a few that will work:
http://parametric.linear.com/External_Power_Switch_Buck_Controllers#!1646_Buck!1032_%3C=50!1033_%3E=60!1105_%3C=24!1034_%3E=24!1107_2:15!vinmin_50!vinmax_60!vout_24!iout_2
The LTC3810 looks like a good candidate - it will work on input voltages up to 100 volts and it can provide output voltages from 6 volts to 55 volts.
http://www.linear.com/product/LTC3810
It does take a handful of external components to work, but the datasheet walks through the calculation of the various passive components.
Comment: Thanks for your reply! Would it change anything if the maximum voltage of the sun battery would be ~42V instead? The real life tests show that the voltage does not cross this 42V limit (the specs says other).
Comment: Well, you want to spec your regulator/converter for the highest voltage possible.  If the converter only goes up to 50 volts and you put 55 on it, there is a good chance you will get a surpise visit from the genie of the magical blue smoke.  Which, unfortunately, doesn't grant any wishes.
Comment: Yeah I know that. Besides that, how about a 48V to 24V step down converter? Or similar?
Comment: It would work fine, presuming you don't exceed the input rating.

24V voltage regulator from ~55V/5A


SSR Latching Circuit

Question:
Is there any issue with connecting the output of an SSR back to its input to implement latching functionality as in the diagram?  I've searched but can't find anything that says definitively whether this is an acceptable or unacceptable configuration.  U1 is a Sensata-Crydom Power Plus DC SSR with 1-60VDC operating voltage and 4-32VDC control voltage (internally current limited but not shown in symbol).  D1 prevents the 28V load supply voltage from shorting into the (non-isolated) 24V control voltage when SW1 is pressed, D2 prevents control voltage from trying to power the load.  The goal is to have the load disconnected when power is removed from the system and not automatically start back up when power is reapplied.  In the past, I've used a PLC channel for this but it seems a bit overkill for such a simple function.
Answer: If you don't need the isolation, why use an SSR at all? A simple two-transistor latch would be much simpler.

simulate this circuit – Schematic created using CircuitLab
If the circuit tends to power-up in the "on" state (and you don't want this), add a capacitor across SW2. If SW1 needs to be connected to a different voltage source, that works, too.
Comment: For the heat transfer capability and convenient terminals of the hockey puck SSR package, I suppose.  The drawing shows a 20A relay but I'd like to duplicate this on some of our larger (~70A) loads and having a readily available package/heatsink combination with well-defined thermal derating curves and built-in 8-32 screw terminals takes a lot of the guesswork out of the design.

SSR Latching Circuit


King of Tokyo, effects of cards after monster death

Question: In King of Tokyo, when a monster dies does the effects of shrink counters or poison counters placed by that monster still apply, or do those counters fall away with the eliminated monster ?
Answer: There are no rules that say effects that originated from a monster go away once that particular monster has perished, so they persist.
Other than being logical it saves on bookkeeping too, otherwise you'd need to track who gave you which counter because powers can be stolen and multiple monsters may have given you a counter from the same power...
Comment: There is actually a rule for the Poison Spit and Shrink Ray cards, on page 7 of the current King of Tokyo rulebook.  https://www.iello.fr/sites/default/files/2016-10/KingOfTokyo_2016_EN_Rules.pdf   It reads, "Poison and Shrink tokens stay in play and in effect even if Poison Spit or Shrink Ray leaves play..."  This clarification is also present in older editions at least going back to 2015 edition.  The current rules do clarify that a player's Keep cards are discarded when they are eliminated (page 4).
Answer: We're not talking about an effect requiring ongoing effort (e.g. Killing Magneto would allow Wolverine to move again), we're talking about a permanent physical change (e.g. Killing a snake doesn't neutralized poison it previously injected into you).


Shift+L is not working properly

Question: I am working through the Blender tutorials by Blender Guru, and I am having trouble with linking the material of my doughnut sprinkles (objects) in Part 7 on particles; I'm using Blender 2.79b. As I go through, I have added the material to the first sprinkle. I unselect that sprinkle, then I Shift+Select the other sprinkles before selecting my sprinkle with the assigned material last (making it the active one). I press Shift+L, selected Material from the drop down menu, and all the sprinkles become unselected except the active one and none of the other sprinkles get the material assigned. I'm not sure what is going on here, and I can't find any suggestions. Now I can easily go through and select the individual sprinkles and assign the material, which is easy with a small number of objects, but if I want to create a scene with a large number of objects that are assigned the same material, that's not going to be so easy. Any idea what is going on here?
Answer: Here is the answer:
Use CTRL+L instead of Shift+L
Comment: Hello and welcome to the site! Could you elaborate a bit or add some screenshots? OP clearly had some effect when pressing Shift+L, so maybe you could explain what that did.

Shift+L is not working properly


How to enable customer user for existing contact using apex?

Question: For the community self registration page if the user enters the detail, I want to check if the contact already exist on the basis of email entered by user. If it does, I want to create user for that existing contact. How can  achieve this?
Answer: I just found the solution.I have Prepared the User record data using the Contact details.Then call theSite.createPortalUser(user, accountId, password, sendEmailConfirmation)  method to create the user.It is working fine.
Comment: @pepper42 Yes, I have posted the sample code in the Salesforce developer community.You can find the sample code from the link https://developer.salesforce.com/forums/ForumsMain?id=9060G000000IA5FQAW
Comment: So You are just setting up contact Id on newly created user Like new User(ContactId = exisitngContact.Id); and the pass that user to createPortalUser method??


ATMega 328 AREF and PWM/analogWrite()

Question: I'm have a project which is using an ATMega 328 which is powered by 5 volts. It is connected to an accelerometer/gyro breakout board through a 3.3 voltage regulator and supplying the 3.3 volts to the ATMega's AREF pin. I want to control a Jaguar speed controller via PWM, which I believe expects a 5 volt signal. My question is, when I set the AREF pin to 3.3 volts, is that going to change the upper limit of my PWM output from 5 volts to 3.3 volts?
Comment: Your 328 is running at 5V, so your IO pins output 5V when high
Answer: AREF is nothing to do with PWM, it's the analogue reference input for the ADC. With a 5V supply, you will get a 5V PWM output.
Answer: AREF is defined as as the analog input voltage-reference.  I looked in a few places and I can't find any discussion of changing the PWM voltage.  Not a definitive 'no' but that would be my guess.  I'd be reaching for my meter, right about now.

ATMega 328 AREF and PWM/analogWrite()


Machine Learning to improve Encryption algorithms

Question: Can machine learning be used to improve encryption algorithms e.g.image encryption algorithms that use ECC ?
Answer: No. There is large consensus that:

There is nothing special about image encryption algorithm, they are just encryption algorithms.
ECC is useful for such algorithms inasmuch as they need to be made public-key. That's done by way of hybrid cryptography. Directly encrypting images with ECC cryptography would have terrible performance, thus is not worth serious consideration.
There's no clear need to improve any of these algorithms in a way where machine learning seems to be necessary or even helpful.

In a quite different direction: Machine learning also has a poor track record at attacking modern cryptographic algorithms, but that idea may not be worthless. Perhaps machines one day will learn cryptanalysis.
Comment: https://eprint.iacr.org/2020/957 seems a decent example of ML in attacking PUFs, though those aren't what I'd generally classify as cryptography. And https://eprint.iacr.org/2020/1235 tries to use it finding differentials in block ciphers, though it's not terribly good at it.
Comment: With regards to ML-aided attacks, this thread and the references cited therein seem worth mentioning: https://crypto.stackexchange.com/questions/72175/using-ai-to-perform-cryptanalysis .

Automated tools of any kind that can do interesting cryptanalysis could also potentially be very helpful in pushing the design of e.g. ultra lightweight ciphers further. I would therefore not be quite as pessimistic as you about machines maybe some day learning to design ciphers.


Solutions : Henry Law

Question: In below solution why the moles are considered half as their is nothing clearly specified in question. I mean it is not given that that mole fraction we get is for litre water.
Comment: They just wrote the multiplication by liters in an unusual way. You are going from molarity to moles, which means multiplying by .5 L or 1/2 L. @user560199
Answer: If you look at the question closely, it states in the equation, moles per litre. The reason the moles are divided by two is the fact you need to find the moles of CO2 in 500 ml and not 1000 ml.

Solutions : Henry Law


How to batch convert word documents to pdf?

Question: Is there a scriptable way that I can convert several MS Word documents to PDF? I thought this might be possible using python, but I am unable to find any advice online on how best to do this.
Comment: You can use docx2pdf to batch convert word documents to pdf: https://github.com/AlJohri/docx2pdf. It has a command line tool and a python library.
Answer: NOTE : the below instructions are for Macs running 10.4 or earlier, no longer works on 10.5 (Leopard), 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion).
Open Automator.
Create a new custom workflow.
From the Actions panel library, select Files & Folders then double-click Get Specified Finder Items.
Add the items you wish to convert.
Next, from the library, select Documents, then double click Convert Format of Word Documents.
From the dropdown menu, select the format you wish to convert the files to. In our case we select Portable Document Format (PDF)
Now we are ready to run the action.
Click the run button in the top right of the automator window.
Open up your destination folder and verify your files have been successfully converted.
Source: http://aseriesoftubes.com/articles/how-to-batch-convert-doc-files-to-pdf-format-using-mac-osx-automator/
Comment: This is an old Automator action, there is no longer a "Convert Format of Word Documents" (also no "Documents" folder from within the Actions panel "Library" folder.


When to apply binning?

Question: I have read quite a lot about discretization techinques, measuring WoE and IV etc., but the basic question - when is it worth to use binning and when isn't - is not entirely clear. On the one hand, the result of discretization seems quite "pretty" and more easy to handle for me, but on the other hand it is always emphasized that binning always causes information loss. Could you provide some clues when should one use this technique?
Answer: Mostly this is avoided if reasonably possible in my experience, but:
One scenario where you may want to consider binning is if you are doing modeling with a logistic model.  The coefficients indicate that per unit increase of the IV, the log odds of the dependent variable will increase by ___.  The important distinction is that we are assuming a linear relationship in the logit by saying "per unit increase, we see ___ increase", when in fact it may not be linear.  To fix this, one possible solution is two bin/discretize your IV to make the relationship more linear, and this interpretable.  This is only important if you are interested in interpretability, not just prediction.  There are also other techniques to account for this that may be preferable (like generalized additive models)
Another scenario is for certain kinds of "big" data where the signals can shift a little bit on an axis due to measurement/machine error, and binning techniques allow you to make sure that the correct signal is matched up closely to other runs where the signal may be in a slightly different position. like below:
you may bin 65,000 x-axis values into 3200 x-axis values and average their appropriate y-values.  This reduces dimensionality and accounts for the minor shifts in x-axis position that can occur.  e.g. bin 1324 will likely capture the same signal across all other runs, where if you specificed bin 23,950, it might correspond to bin 24,000 on another run of the machine/technique, and your columns wouldn't match up correctly between samples.  In the example below, by binning you are making sure each respective compound is correctly captured, considering slight x-axis variation.

Last but not least, among several other factors seen here and here, you are purposefully dropping information for the model, which means you will lose power, as you mentioned.  Also, when you are deciding a cutpoint to (for example) categorize a continuous variable as high vs low, how do you choose the cutpoint?  Can you defend your choice, or is it somewhat arbitrary?  Did you choose multiple cutpoints to see which one favored your results and thus committed the tempting garden of forking paths/multiple testing?
Comment: Great response. I always emphasize these problems. Most importantly, in the worst case scenario, you can end up giving up all of your information if you choose these apriori. It's usually better to let a learning algorithm identify the cut points in a supervised way (e.g., MARS).

When to apply binning?


How to create union of two directories?

Question: In case of unix/linux, is there a way to create union of two directories without copying or linking manually everything to a single directory?
Answer: One option is to use unionfs

Unionfs: A Stackable Unification File
  System
This project builds a stackable
  unification file system, which can
  appear to merge the contents of
  several directories (branches), while
  keeping their physical content
  separate. Unionfs is useful for
  unified source tree management, merged
  contents of split CD-ROM, merged
  separate software package directories,
  data grids, and more. Unionfs allows
  any mix of read-only and read-write
  branches, as well as insertion and
  deletion of branches anywhere in the
  fan-out.

Or another similar option aufs.
Comment: Your answer seems much better !
Comment: Having used unionfs to create a read-only filesystem with a read-write RAM FS on top of it, I can say that it's very easy to set up and works with little overhead.
Answer: mhddfs is great for making a heap of drives that are transparently linked. It takes some /etc/fstab fiddling, but the solution works great for me
http://blog.mindlesstechie.net/2009/01/19/combine-your-partition-space-with-mhddfs/

How to create union of two directories?


How to remove ubuntu-desktop completely and retain gnome-shell?

Question: I have installed gnome-shell and want to remove ubuntu-desktop. How do I do that without destroying gnome-shell? Because, right now, I got many duplicates, e.g. two software updater and two system settings.
Answer: First, install the full ubuntu-gnome-desktop metapackage to get all that comes with the full ubuntu-gnome-desktop:
sudo apt-get update
sudo apt-get install ubuntu-gnome-desktop

Next, remove the ubuntu-desktop:
sudo apt-get remove ubuntu-desktop unity && sudo apt-get autoremove

or, if you would like to remove the configuration files as well
sudo apt-get purge ubuntu-desktop unity unity-greeter && sudo apt-get autoremove

Just BE CAREFUL to review the list of programs to uninstall before selecting "Y" to accept the changes to ensure sure you are not uninstalling something you want to keep or need!!!
If there are any applications you want or need to keep that are to be removed, do not except the changes and instead, press CRTL + C to exit the command and then explicitly install these applications using sudo apt-get install to mark these wanted or needed applications as selected. After doing this, run sudo apt-get autoremove again and once more, review the list of applications to be removed to verify before accepting the changes to the system.
Comment: Ah, i see what's missing. You want to install ubuntu-gnome-desktop package. Gnome-shell by itself just gives GUI
Comment: I also had to remove `rm /etc/init/lightdm.conf`
Comment: @Stanislav That is a result of the unity-greeter; I have included that in the uninstall command. On the newer versions, lightdm.conf is now depreciated and there should be a file /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf. Alternatively, gnome doesn't use lightdm so if you run `dpkg-reconfigure gdm` and you can select gdm to be the default display manager.
Comment: don't run this command if you like your ubuntu os being able to connect to a network as it auto removes network-manager-gnome along with network-manager
Comment: @JamesKirkby I'm sorry to hear this happened to you, apt-get is certainly not perfect.  Let me just say that what you experienced is quite un-typical on Ubuntu at least (more common on Debian) and should not occur on a normally configured Ubuntu system. With that said, I cannot stress enough that whenever running *any* apt-get command,  you should *never*, *ever* type Y and press enter *without first reviewing the changes to be made to the system*. If you don't agree with the changes to be made, type `-n` or press CTRL+C to exit the command. You should also never include the `-y` flag *ever*.
Comment: @JamesKirkby All you have to do to prevent this is to run:  `sudo apt-get install network-manager-gnome network-manager` before running the command and those applications will then be marked as selected packages and thus will not be removed when you run `autoremove`. In fact, you can go through the listed applications that appear in the autoremove suggestion that appears from time to time, explicitly `sudo apt-get install` any application in that list you want to keep before running autoremove and then there should be no problem.
Comment: Gnome also contains a  network manager version. I've run the very same commmands in my VM and worked fine.
Comment: @Serg Thanks, I've updated the answer to include this.
Comment: To avoid intaling 500Mb of packages, only to be removed later, do `sudo apt-get install --no-install-recommends ubuntu-desktop`. Followed by `sudo apt-get remove ...`


Can I use my raspberry pi as a server without having it connected to my router?

Question: Basically I want to be able to connect to my raspberry pi from outside my house, it has a java server on it (it should be accessible from anywhere) but I don't want people to go through my router, then to the raspberry pi. Is there anyway I can create a public internet connection point from my pi without a router?
Answer: Your router is the means by which inside and outside networks are connected.
The only way to have your Pi contactable by the outside world is to connect it to the Internet through a router. So, if you don't want to use "your" router, you'll need to get another one, and an Internet connection for it.
Regardless of through which router your Pi is connected, there are significant security implications to allowing public access to any computing equipment which will need to be addressed, but that's a question for another place and time.
Answer: I think you don't need router to connect your computer (whichever it is, even Pi) to the internet - you can connect directly to the internet provider modem. Of course you would need second modem (and router) for the rest of your computers at home ;-)


How to show parallelism

Question: Problem:
Given two non-congruent circles that intersect at two points X and Y. One secant segment passes through X and intersects one circle (C1) at A and the other circle (C2) at B. Another secant passes through Y and intersects C1 at C and C2 at D.
Show $\overline{AC}$$\parallel$ $\overline{BD}$

I have tried to show $\angle$ABD and $\angle$DBA are supplementary. Here I get stuck because there is nothing to associated congruent angles between the different circles. The critical point can be shown that the measure of the arcs $\stackrel\frown{XY}$ are different between the circles.
I have tried to show (extending $\overline{BD}$ to $\overleftrightarrow{B'D}$ with B'-B-D) $\angle$ABD $\cong$ $\angle$ABB'. Same problem as above.
I have tried using the tangent lines at A, B, C, D to show the construction of a right angle from the intersection of the tangent lines at A and C with a segment through the center of C1 forms a right angle with $\overline{AC}$. Extending this segment to $\overline{XY}$ creates a segment $\perp$ with $\overline{AC}$ at M. I can also do this with C2 to create a segment $\perp$ with $\overline{BD}$ at N. I then let the C1 segment intersect $\overline{XY}$ at M' and the C2 segment $\overline{XY}$ at N'. I have tried to show that $\angle$MM'Y $\cong$ $\angle$NN'X which would show $\overline{MM'}$$\parallel$ $\overline{NN'}$ which would lead me to both segments being $\perp$ to either $\overline{AC}$ or $\overline{BD}$. Thus both
$\overline{AC}$ or $\overline{BD}$ would be $\perp$ to the same line and hence parallel. However, I have nothing that can be used to establish these two segments $\overline{MM'}$ and $\overline{NN'}$ are parallel. Distance to the circle centers is not established and angles between the segments with $\overline{XY}$ are not defined and not clearly derived.

The trouble I am having with all of these approaches is I am lacking some definite relationship such as two angles or segments being congruent that would bridge the gap so to speak to form an acceptable relationship. For instance, the circles are given as non-congruent. Thus, no relationship can be derived based on distance (that I can see) as the one reasonable value I can use - the radius - is different between the circles. The use of angle congruence is discouraged as the inscribed angles that may be derived are different between the circles due to the differing radii. There is no definite diameter that can be used to leverage right triangles as segments drawn through given points do not pass through the circle center. Furthermore, the right angles formed by the tangent lines focus all congruency at the segments $\overline{AC}$ and  $\overline{BD}$. The segments $\perp$ from these congruencies at both circles do not form the same segment or line.
To state perhaps more generally, the luxury of have a congruency established based on symmetric relationships - as is frequent  with these type of euclidian problems - is not apparent to me due to the non-congruent nature of the given circles.
I wish I was more talented to provide diagrams, but any insight to this - even a subtle hint - would be deeply appreciated.
Comment: Hint: *Opposite angles of a cyclic quadrilateral are supplementary.*
Comment: Brilliant. Thank you.
Answer: As I understand it, $\angle$CAX is supplementary to $\angle$CYX. $\angle$CYX forms a linear pair with $\angle$XYD, so $\angle$XYD is also supplementary to $\angle$CYX. By transitivity, $\angle$XYD $\cong$ $\angle$CAX. Furthermore, $\angle$XYD is supplementary to $\angle$XBD. Hence, $\angle$XBD is supplementary to $\angle$CAX. Therefore, $\overline{AC}$ $\parallel$ $\overline{BD}$ with interior angles on same side of transversal supplementary.
Comment: Bingo! :) (FYI: It took me a bit to realize that this answer could be this straightforward.)

How to show parallelism


Can anyone help me figure out why my Gravatar won't change?

Question: I'm not sure if this is the sort of thing to ask here, but, about 5 hours ago, I changed my Gravatar. I've tried clearing my cache, logging out, and back in, and it still hasn't changed. Does anyone know if there's a specific amount of time before the changes are seen? Or is something wrong?
Comment: Did you associate the gravatar change with the right email that you're using for your account here? There is usually a bit of a delay but only about five minutes, never five hours as far as I'm aware.
Comment: @Mana I have experienced hours in delays too
Comment: @badp Ah, okay.
Answer: The site hotlinks Gravatar, so there's not really much you or we can do about it. :(
Yes, it takes frustratingly long, but eventually it'll get through. Give it a couple more hours. :)
Comment: Alright, hopefully it'll go through eventually. Cuz I'm tired of looking at the little blue square thing.


How to edit title on Edit post pages?

Question: The <title> tag in pages for post edit is Edit Post < Site name — WordPress. I want to change it to Edit Post < Site name – The title of the post in editing. Is this possible? Where can I locate the header of this page? Apparently it cannot be in the theme.
Answer: Add this code instead on your functions.php, this will change the post and product title to the post or product that is being edit:
add_filter('admin_title', 'my_admin_title', 10, 2);
function my_admin_title($admin_title, $title)
{
        global $post, $action;
        if ( isset($post->post_title) and $action == 'edit' ){
        return 'Edit < '.$post->post_title.' - '.get_bloginfo('name');
        } else {
            return $title .' - ' .get_bloginfo('name');
        }
}

Comment: This is perfect. Do you know why the code doesn't work when put it in the child theme?

How to edit title on Edit post pages?


Dishwasher part identification

Question: This dish washing machine piece seems to be leaking (in red). My mom wants to change the dishwasher but I want to try and replace it if it isn't to complicated (hoping the leak doesn't come from somewhere else). Do any of you know how this piece is called?
Answer: You don't need the name. Just go to a site like repairclinic.com and enter the model number of the dishwasher. Then browse through the pictures until you find the part.

Dishwasher part identification


linq to sql ordering issue

Question: I have currently an IQueryable that consists of multiple concats of linq queries, lets call it baseQuery.  I want to call skip and take on this baseQuery object, but I have been informed by the compiler that I have to call OrderBy first.  Basically the order is already correct inside of my baseQuery object, the order I want everything in is in the order I already called concat.  So how do I tell the compiler that its already in the order I want?
Comment: 'I have been informed by the compiler that I have to call OrderBy first' Can you expand on what that mean?
Answer: Unless you specify the order you want using ORDER BY, you cannot guarantee  that LINQ will return it in some order. It is subject to things like the data access methods and join-types the DBMS chooses. The order might be what you want in some cases, but without specifying it explicitly with ORDER BY, you cannot be assured that this will always be returned in the right order.

linq to sql ordering issue


Blender renders HDRI instead of background clip

Question:
I am a little confused right now. My plan was to take a 360 image with the camera in the spot where that red thing is, take that picture as enviroment light for more or less realistic reflections. Then I filmed the same spot with my camera and tried to add that metal sphere in.
Tracking worked fine.
The problem now is, that blender shows the actual footage I want in the preview render but when I try to render a frame by hitting F12 the background is this distorted version of the footage.
It cant be the image from the 360 camera because the perspective doesn't fit.
How do I fix it?
Answer:
Ok, turns out this automatically created node was responsible. It's not supposed to be here.
I guess I'm not gonna delete this post for now in case someone else needs it.


Stabilizer witness for entanglement detection

Question: I am studying on entanglement detection applying stabilizer operators. In page 4 of this paper https://arxiv.org/abs/quant-ph/0501020 ,"for the detection of $N$-qubit entanglement we have to make measurements on all qubits and have to measure a full set of generators. This is because we need that the expectation value of the witness is minimal only for the GHZ state. If the witness does not contain a full set of generators then there are at least two of the elements of the GHZ basis giving the minimum." I do not understand this argument, how can we prove the existence of at least two GHZ basis elements for a given witness which does not contain a full set of generators?
Thank you.
Answer: Imagine you have a generating set of stabilizers for a state $|G\rangle$ (i.e. it's a +1 eigenstate of all the generators). Now take one of them away. You will be able to find a sequence of Pauli operators, $P$, that anti-commute with the stabilizer you have removed, but commute with everything else (you can set this up as a binary programming problem, and you'll find it always has a solution). By construction, $|G\rangle$ and $P|G\rangle$ have the same expectation on all the remaining generators, and hence will return the same value for the witness.
(Put another way, $P|G\rangle$ is the state which is a +1 eigenstate of the remaining stabilizers and -1 eigenstate of the one you removed.)

Consider the example of a 4-qubit GHZ state. (For simplicity, I'm going to choose something that's locally equivalent, rather than using exactly the GHZ state). I have generators
$$
X_1Z_2Z_3Z_4, Z_1X_2, Z_1X_3, Z_1X_4.
$$
I'm going to write these in a 4x8 matrix: one row for each stabilizer. The first 4 columns indicate positions of Xs, the second 4 indicate positions of Zs.
$$
G=\left(\begin{array}{cccc|cccc}
1 & 0 & 0 & 0 & 0 & 1 & 1 & 1 \\
0 & 1 & 0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 \\
\end{array}\right)
$$
Now imagine some other string of Pauli operators $P=(x|z)$. I want to find one the commutes with the first 3 rows and anti-commutes with the last one. We set this up as
$$
G\left(\begin{array}{c} z^T \\ x^T \end{array}\right)=\left(\begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \end{array}\right).
$$
Notice the change in order between $x$ and $z$. This is because we already know that $X$-type operators commute with $X$s in the stabilizer. They must be compared with $Z$s instead. Also note that all the algebra is being done Mod 2.
We just have to find something that solves this equation. I can immediately tell you that $P=Z_4$ will work. Now that I tell you that, you can verify the relations. But if I hadn't know, I'd have gone to Mathematica (or equivalent, but I find Mathematica particularly convenient), and calculated
<code>G = {{1, 0, 0, 0, 0, 1, 1, 1}, {0, 1, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0,
    1, 0, 0, 0}, {0, 0, 0, 1, 1, 0, 0, 0}};
LinearSolve[G, {0, 0, 0, 1}, Modulus -> 2]
</code>
which gives an answer

{0, 0, 0, 1, 0, 0, 0, 0}

exactly as I predicted.
Comment: Thank you very much for the solution! I have two questions: 1. Why P|G⟩ is necessarily a GHZ basis element? 2. Could you please explain more about constructing of P and binary programming problem?
Comment: Part 1: if you apply Pauli matrices to a GHZ state, you get something that's in the GHZ basis. (Up to a point, that's a matter of definition about how you extend the GHZ state into a basis.)
Comment: Thank you very much! As you wrote, we can find more than one solution for P, because here we have 8 variables and 4 equations. Am I right? And this argument holds for general case, similarly.
Comment: Well, there might be multiple solutions, but they all work out equivalently, because they're terms like $Pg_i$ where $P$ is the Pauli string I already found, and $g_i$ is a generator. So the action on $|G\rangle$ is the same.


I cannot find the packer of the executable

Question: There is this executable that is packed however neither peid nor protection_id nor RDG tell me what it is, as they dont know.
How do i go about finding the packer?
Or what if its' custom made?
Answer: It could easily have been derived from another packer in such a way as to destroy the signature by which the packer is recognized by those tools.  Someone with experience looking at packed binaries might be able to detect obvious signs that it originated from a specific tool, but if all three tools fail to detect it, there's a good chances that it's custom made.  A sign that it's custom made would be if the unpacking code is fairly simple and doesn't go through more than a few KB of code before executing the payload.  Also look for signs that it doesn't look like it could pack generic program binaries.


Purchasing bitcoins online

Question: Is anybody aware of websites that are secure and reliable which will sell BTC promptly? I made the rounds around my city today, but all of the BTC ATMs were tapped, and I'm beginning to feel a little helpless as I continue to watch the price grow and grow and grow...
Answer: there are lot of grate websites where you can buy bitcoin..
example: coinbase.com, blockchain.info
https://www.bitcoin.com/buy-bitcoin <-- here are some ways to buy
http://cryptosort.com/wallet <-- here you could find something as well..
but if you are starter i suggest you to use coinbase, because there is simple interface and 3 cryptocurrencies available :)
Comment: mm.. yes.. you will need to verify identity but it takes seconds :)
yeah, you can buy them there but probably some of them are scammers so be careful..

mm.. when i made my first wallet at coinbase i think it took max 30min to set it up and verify so.. :)
Comment: it only takes second to create an account, verify identify, and start buying BTC on coinbase?!?!?! It should be noted that I have my own Bitcoin Core wallet. i would never wanna store my BTC in an exchange after what happened before.
Answer: I buy Bitcoins and trade on Paxful
They have Escrow and 24/7 support & Moderators as well.
They have guides on how to buy bitcoin as well:
Comment: thanks i'll def check it out. if i were to buy BTC on Paxful, i could get it sent to my wallet right?

Purchasing bitcoins online


Difference between core i7 and dual core i7

Question: Usually we heard about core i5, core i7 etc. but in the recent years we hear about dual core i7 and quad core i7 etc. This confuses me. Does it generally mean that they have double and quadruple performance respectively as compared to core i7 computer?
Comment: Can you provide us specific product model numbers?  I am not aware of there ever being a dual core i7
Comment: Possible duplicate: [CPU Cores: The more the better?](http://superuser.com/questions/2489/cpu-cores-the-more-the-better)
Answer:
One core meant:

One core meant it could follow one set of instructions at a time.

Dual-core meant:

These could follow two instruction sets simultaneously.
Triple core and Quad-core followed suit, with three or four threads respectively.
Then Intel introduced Hyper-Threading ---> The ability for a single core to follow two threads. All Core i3's, i5's, and i7's are hyper threading.
This means that a Dual-core i7 can follow up to Four threads simultaneously, while a Quad-core can follow up to Eight.
For a power user, from which it sounds like you are, a Quad-core is the way to go.
Comment: //Dual-core i7 can follow up to Four threads simultaneously, while a Quad-core can follow up to Eight.//
And what in case of simple core i7?
Comment: Do i5's really support Hyper threading? I think no...
Comment: @AliAsmat What do you think is a "simple" Core i7? I don't believe the current lineup of i7's has any single-core models. Basically, all current i7 processors have hyperthreading, which means the supported amount of concurrent threads is double the core count.
Answer: First off, I'll limit my answer to current generation (6th gen desktop) Core-i5 and Core-i7 models, this makes it very easy since there's not a whole lot of variation core-wise.
First interpretation
All 6th generation Core-i5 processors have 4 cores, this means they can execute 4 concurrent operations.
All 6th generation Core-i7 processors have 4 cores with hyperthreading, this means they can (theoretically) execute 8 concurrent operations. I believe there are some technicalities regarding how well hyperthreading works for certain tasks though.
Second Interpretation
Dual or quad Core-i7 might also mean that a system has multiple processors. This interpretation depends very much on how it's actually written.
If someone writes "I have a quad Core-i7 system", I assume they mean that their system contains four separate Core-i7 processors - each of which has 4 cores.
However, if someone were to say "I have a Quad-core Core-i7 system", I assume their system contains a single Core-i7 processor - which has 4 cores.
this second interpretation is a little far fetched, since I don't think people really say that, but it might be possible.


MS-Word and Digital Signatures

Question: We would like to digitally sign DOC (MS-Word) and PDF documents using PKI.
Is this possible using an internally deployed CA?
I've found lots of articles getting email digitally signed but almost no reference for Word documents.
Answer: A simple Google search points to this page which explains how to sign Word documents, with Word itself. The signer must own a certificate, and the signature will be considered as valid by any Word instance only if that certificate has been issued by one of the CA that the host Windows system trusts. Most commercial CA can sell certificates which will be appropriate; see for instance that page.
For PDF files, using Adobe's product, you need the "standard" Acrobat to sign documents. However, signatures can be verified with the free Adobe Reader. Note that the Reader uses its own list of trusted CA, not that of the underlying OS; and it is more restricted. There again, some commercial CA can sell you the relevant certificates; e.g. see this page.
(For some reason, Globalsign's pages come up first in my Google searches, which is the only reason why I use them as examples.)
There also are free tools to generate PDF signatures (the format is sufficiently open for that), e.g. PortableSigner. You still need a certificate that will be considered as "valid" by whoever will verify your signatures.
Answer: Disclosure: I work for CoSign.
Word includes the ability to digitally sign and verify Word documents via the Microsoft CAPI NG API which is in Windows. Americans use the term "Digital Signature." Europeans say "Advanced Electronic Signature" or "Qualified Electronic Signature," depending on the source of the signer's certificate.
Word is a client of the CAPI API. You also need a supplier. It is possible but not very secure to install a digital signing certificate on the Windows machine. Better is to use a secure CAPI supplier. They are provided by my company, CoSign and others.
For example, if you install CoSign, you can digitally sign the Word doc from within Word. The CoSign appliance includes a secure CA reached over the network--the digital certificates are not installed on the Windows machine itself.
Word knows how to verify a signed document. It uses the Microsoft OS certificate store to verify the trust relationship that you have with the signer's certificate. (Or signers' certificates.)
CoSign signs Word, Excel, and PDF files out of the box.
Word docs can be signed from Windows, from a browser/mobile/tablet, from SharePoint Server (on-prem) and from Office 365 (SharePoint Online).
Our typical customer self-signs a certificate for the organization (the private key is kept securely inside the CoSign appliance). The signers' certs are then chained from the organization's cert. The organization's cert can be published on the organization's web site.
The appliance's internal CA can also be chained (as a sub-CA) from an organizational's cert. Via special arrangement with some general Certificate Authorities, we can chain from them as well.

MS-Word and Digital Signatures