How long would it take for someone to move on?

Question: In my epic fantasy, the secondary protagonist goes through tragedy. Near the middle, the group is captured by the enemy, and she is forced to watch her girlfriend get slowly executed in an extremely brutal manner. They managed to escape, but she is heavily traumatized and she almost loses her mind. Eventually, she ends up in another relationship, but until then during her arc, how long would it take for a person to move on from something that horrible?
Comment: "heavily traumatized" and "almost lost her mind" does not sound like something one just bounces back from. If she moves on at all it is gratuitous **Bury Your Gays** trope.
Comment: Another thing you need to be wary of is that some readers *won't want* your secondary protagonist to move on, regardless of how much time passes, and will see any new love interest as an inferior replacement. Look up the reaction to the final episode of the anime *ERASED* for a good example of this.
Comment: @F1Krazy Would it work if the new love interest was a character that was already introduced, and it well-written?
Answer: I would say that there can't be a definitive and quantifiable answer to this question. It depends on the person. You need to check how you portray her personality in the story. A strong person may overcome the situation to be able to move on to another relationship in a few months.
There are some people who like to feel like victims, and on the other hand, there are people who wish to self-help to move on. These factors would also affect any such timelines.
Actually, it would also depend on the person she enters into the relationship with. If she meets someone irresistible who also helps her overcome her problems, it would be much faster.
To be safe, any period less than six months would look odd.
Answer: While "moving on" quickly could be her way of coping with the traumatic experience, the loss and trauma would have a heavy impact on the new relationship.
Personally, I think that this is more likely to happen with someone she already knows and trusts rather than someone new. Also, whether the new relationship will sustain the pressure, strongly depends on how she and her new partner deal with it.


Are design patterns in JavaScript helpful? And what exactly are they?

Question: I have been learning more and more javascript; it's a necessity at my job. We have a web application that uses a lot of javascript and I will be doing more and more every day. I have read bits and pieces about design patterns, but was wondering if someone could just give me a cut and dry example and definition. Are they something that would benefit me? Or is it more high level?
Answer: Design patterns are generic and usually elegant solutions to well-known programming problems.  Without knowing what problem you're working in, I would say "Yes" they can help make your code more manageable.
This link and this link make some reference to design patterns in Javascript. They may be worth reviewing.
Answer: One of the most practical and easy to use JavaScript-specific design pattern I've encountered is the Module Pattern, which is a modified Singleton pattern that "namespaces" related code and prevents the global scope from getting cluttered with variables and functions that might conflict with each other in a complicated page.
Answer: Also there is a book about classic design patterns in javascript. You can download examples from it's site.
But from my experience its obviuosly harder to implement projects with great amount of javascript.
Answer: As design patterns are language agnostic, I would recommend reading one of the classic books on the subject.  My favourites are:

Patterns of Enterprise Application
Architecture by Martin Fowler
(http://www.amazon.com/Enterprise-Application-Architecture-Addison-Wesley-Signature/dp/0321127420)
Design Patterns: Elements of
Reusable Object-Oriented Software by
the "Gang of Four"
(http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612/ref=sr_1_1?ie=UTF8&s=books&qid=1229278937&sr=1-1).  This is a bit of a classic.

However, these aren't beginner books by any means and you might get more value out of some of the many web resources and tutorials out there (Wikipedia has some reasonable explanations).
My own experience is that the object model in javascript is a bit trickier to understand than others such as PHP or Ruby and hence, applying design patterns isn't always that easy.  Libraries such as Prototype provide functions for making inheritance easier to work with and this makes programming Javascript in an OO way much easier.
I recently used Javascript to implement the Active Record pattern using Prototype, which you can read about more about here if you want:
http://codeinthehole.com/archives/6-Active-record-javascript-objects-using-cookies.html


Should I exclude mysql database from multi master replication?

Question: Running mysql in a two master replication setup. There are many databases and they are all replicating correctly including the mysql database itself.
Is it safe to replicate mysql or should I exclude it via the my.cnf ?
Answer: Since the mysql schema is usually manipulated with GRANT and REVOKE commands, there is no need to let the mysql schema replicate. Why ?
Someone could hack privileges in by means of INSERT commands into mysql.user.
Such hacks are possible because I wrote about it before

Oct 28, 2011 : MySQL: trying to create root user
Sep 12, 2011 : How do you gain access to embedded MySQL database via localhost command line?
Mar 06, 2011 : Installing default MySQL Tables in Windows (mysql_install_db)

If these hacks were done on a Master, a Slave might intercept them. The new grants on the Slave would not be active until someone restarted mysqld on the Slave or ran FLUSH PRIVILEGES; on the Slave.
So, to answer your question: exclude it via the my.cnf


IIS 7 - ISAPI error "Printer selected is not valid": how configure an ISAPI pool for see the printer?

Question: I have a isapi *.dll made with Delphi that make and return a PDF on http request.
The code works if i build it in a standalone exe, but on a isapi it raise an exception: "Printer selected is not valid".
It seem a ApplicationPoolIdentity issue.
Googling the issue i have found this explanation (https://stackoverflow.com/a/4619757/2936170):

This is likely due to Session 0 Isolation, which was introduced in
  Vista. Services always run in Session 0, but in XP and earlier, the
  first user to log in also runs in Session 0, thus allowing services to
  access that user's desktop (thus allowing for "Interactive" services)
  and resources (like shares and printers). In Vista onwards, users
  never run in Session 0 anymore, so services do not have access to
  user-specific resources anymore. A service has to impersonate the user
  account it wants to access.

I have also builded the same code in a windows service and installed with admin privilege, it works!
The question is, how configure an ISAPI pool for see the printer?
Answer: Respond my self.
the correct pool identy is LocalSystem


issues with dryer cord

Question: i got a dryer that have a green netural cord but the cord couldn't fit in the outlet because it had 3 prong with a circle prong it may be 4 prong my old dryer has a three prong that fir in the outlet but doesn't had a ground wire can I use that 3 prong for my new dryer w/o a ground wire will that cause problems?
Comment: There's like 3 sentences in there but no periods. Please improve the grammar and punctuation of your post so that we can actually understand what you are asking.
Comment: possible duplicate [Where does the ground wire go in a 3-prong dryer cord configuration?](http://diy.stackexchange.com/q/30507/33), or [Is it safe to install a three pronged wire into a four pronged dryer?](http://diy.stackexchange.com/q/25510/33)
Answer: When moving an electric dryer or range to a new (to it) dwelling, it is not unusual to have to replace the "cord" (pigtail) on the appliance.  Look carefully at the outlet in the house and go to a hardware store, appliance store, or electrical supply store for a matching pigtail.  These tend to run $20–30 at big box retailers and a little more at electrical suppliers.
If the outlet is unusual, it might be more expedient to replace it instead of tracking down a hard-to-find pigtail.  Many do-it-yourselfers are uncomfortable working on 240 volt and/or high power outlets, so you might prefer to hire an electrician.  However, since this is a DIY board, it isn't all that difficult once you understand the legal and electrical technicalities.
Old (pre-2000 or so) appliance outlets in North America used 3 wires:  2 hot wires and one neutral.  Installations since then have added a 4th wire for ground.  Your local code requirements may allow grandfathering existing three wire systems to remain in place for a simple outlet replacement.  Other regions may require upgrading to 4 wire.  Check out what your requirements are.
Replacing the outlet is fairly straightforward:  shut off the circuit breaker.  Check the outlet with a DMM or voltage tester to assure yourself it is really dead.  Undo the retaining screws, pull out the outlet.  This will require some strength due to the thick and stiff conductors, either 10, 8, or 6 gauge.  Note carefully which wires are hot and which are neutral or ground.  Unscrew the outlet's terminal screws and pull the wires out.  If there is any discoloration or scorched insulation, trim the wire and re-strip.
Insert wires into the appropriate terminals on the new outlet and tighten securely.  Ease the outlet back into the wall and screw into place.  Turn on the breaker and check voltages are applied in the correct positions.  Turn breaker off before inserting appliance pigtail and then back on once it is securely inserted.
Comment: The only appliances in question are electric dryers and household cooking appliances.
Most all dryers and ranges are 120/240V, NOT just "240". This means they use and require a neutral conductor. Older circuits were allowed to omit the grounding conductor and used the neutral for both purposes. This is what's commonly referred to as a 3-wire cord.
Newer circuits, and those in mobile homes and those fed from sub-panels, are 4-wire circuits. These have a separate dedicated grounding conductor.
Answer: Here is a good image of a 4-wire cord connected to a dryer.

If you are going the other way, from a 4-wire to a 3-wire, then you MUST connect the internal green wire from the harness back to the chassis screw.

issues with dryer cord


How can I deploy a secure (HTTPS) Meteor app on Heroku?

Question: I would like to deploy my Meteor app to Heroku and make it only accessible through HTTPS. Ideally, I want to do this as cheaply as possible.
Answer: Create the Certificate
Run these commands to get certbot-auto. certbot-auto should work on most systems
wget https://dl.eff.org/certbot-auto
chmod 755 certbot-auto

This command starts the process of getting your certificate. The -d flag allows you to pass in the domain you would like to secure. Alternatively, without the -d flag, it will pop up a prompt where you can enter the domain.
./certbot-auto certonly --manual -d app.yoursite.com

Then it will ask you the following. Do not hit enter.
Make sure your web server displays the following content at
http://app.yoursite.com/.well-known/acme-challenge/SOME-LENGTHY-KEY before continuing:

SOME-LONGER-KEY

Use Picker
I suggest using this method because on renewal, you will only need to update an environment variable. You can use public/ as below, but it will require a rebuild of your entire app every time
Run meteor add meteorhacks:picker
In a server side file, add the following
import { Picker } from 'meteor/meteorhacks:picker';

Picker.route('/.well-known/acme-challenge/:routeKey', (params, request, response) => {
  response.writeHead('200', {'Content-Type': 'text/plain'});
  response.write(process.env.SSL_PAGE_KEY)
  response.end();
});

Then set an environment variable SSL_PAGE_KEY to SOME-LONGER-KEY with
heroku config:set SSL_PAGE_KEY=SOME-LONGER-KEY

Use public/
Create the directory path in your public folder. If you don't have one, create one.
mkdir -p public/.well-known/acme-challenge/

Then create the file SOME-LENGTHY-KEY and place SOME-LONGER-KEY inside it
echo SOME-LONGER-KEY > public/.well-known/acme-challenge/SOME-LENGTHY-KEY

Commit and push that change to your Heroku app.
git push heroku master

Now hit enter to continue the verification process. You should receive a message like this
IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/app.yoursite.com/fullchain.pem. Your cert will
   expire on 2016-04-11. To obtain a new version of the certificate in
   the future, simply run Let's Encrypt again.

Upload the Certificate
To upload your certificates to Heroku, first enable the SSL Beta
heroku labs:enable http-sni -a your-app
heroku plugins:install heroku-certs

Then add your fullchain.pem and privkey.pem to Heroku.
sudo heroku _certs:add /etc/letsencrypt/live/app.yoursite.com/fullchain.pem /etc/letsencrypt/live/app.yoursite.com/privkey.pem

You can verify that the certificate was uploaded with
heroku _certs:info

Change your DNS Settings
Update your DNS to point to app.yoursite.com.herokudns.com
Verify SSL is working
To check that SSL is set up, run the following. -v gives you verbose output. -I shows the document info only. -H passes a header to the URL. The header we're passing ensures that a cache is not being used and will ensure you get your new certificate and not an old one.
curl -vI https://app.yoursite.com -H "Cache-Control: no-cache"

Check that the output contains the following
* Server certificate:
*    subject: C=US; ST=CA; L=SF; O=SFDC; OU=Heroku; CN=app.yoursite.com

If the subject line does not contain CN=app.yoursite.com, wait 5 to 10 minutes and try again. If it does, you're almost good to go.
Make Meteor Specific Changes
To finish up the process, you'll want to change your ROOT_URL environment variable to the new https version.
heroku config:set ROOT_URL=https://app.yoursite.com

Then you'll want to ensure that your users are always using SSL with the force-ssl package
meteor add force-ssl

Lastly, if you have any OAuth logins set up in your app (Facebook, Google, etc), you'll want to provide them with the new https version of your URL.
Renewal
Run certbot-auto again
./certbot-auto certonly --manual -d app.yoursite.com

It may prompt you for the same endpoint with the same content. If it does, just hit enter. If it does not, you will need to repeat the above steps.
It will then create new certificate files, which you will upload to Heroku with
heroku certs:update /etc/letsencrypt/live/app.yoursite.com/fullchain.pem /etc/letsencrypt/live/app.yoursite.com/privkey.pem

Then to confirm, run the Verify SSL is working commands above
Sources

https://certbot.eff.org/#ubuntutrusty-other
https://devcenter.heroku.com/articles/ssl-beta
https://themeteorchef.com/blog/securing-meteor-applications/
Comment: Yes, it's a beta feature but it's available to anyone who wishes to use it. https://blog.heroku.com/announcing_heroku_free_ssl_beta_and_flexible_dyno_hours
Comment: Sorry I had to delete my previous comment, it had my client name in it, here it is  :
`heroku labs:enable http-sni -a your-app` does not work for everybody yet as this is a beta feature. Instead you can get the `fullchain.pem` and `privkey.pem` in the `/etc/letsencrypt/live/yourdomain.com/` folder and add them in your Heroku dashboard manually
Comment: I confirm the command does not work for me, from France, I have a message saying that this feature does not exist or is not available. Everything else worked perfectly, thanks a lot for this answer :)
Comment: This didn't work for me, getting warnings about needing to run `su: must be run from a terminal`


What is the rationale for calling setgroups on a list of length one?

Question: The Secure Programming Cookbook for C and C++ says that:

"Ancillary groups are inherited by a process from its parent process, and they can only be altered by a process with superuser privileges. Therefore, if a process with superuser privileges is dropping these privileges, it must also be sure to drop any ancillary groups it may have. This is achieved by calling setgroups( ) with a single group, which is the real group ID for the process." [1.3, emphasis mine]

What is the rationale for doing the above rather than just setgroups(0, NULL); that is, en empty list?
Is there some portability problem with pushing an empty list of supplementary groups?
If not, what is achieved by installing the real GID of a process as an ancillary group? Is the issue that if the real GID is not among the ancillaries, and some other GID is effective, then the process is not effectively a member of that group? That doesn't seem like a security issue and is actually a feature. In any case, this is in the context of dropping privileges, so that real GID is about to become the effective one anyway. If we are about to end up with the situation getresgid() == < 1, 1, 1 >, what is the use of arranging for getgroups() == { 1 } versus getgroups() == { }?
Answer: It does look like portability. E.g this posting on the Samba mailing list with a patch included, subject line, "setgroups requires at least one group":

"On some operating systems (in this case BSD/OS 4.2) setgroups must be
  given at least one group.  When no other groups are wanted, it is given
  the same group as the desired effective group (as seen in sendmail)."

This kind of thing is worth mentioning when making a recommendation about a practice.


Finding the home screen's most recent books on Linux

Question: Sony PRS-650 shows the three most recent books on its home screen. How can I modify this top three and how can I list the current ones when the device is connected to a PC running Linux?
Comment: The title needs to be fixed. My first impression was that it was about Linux-running reader.
Answer: Use the following shell command for listing the last three files:
find database/media/books -type f -exec stat --format '%Y :%y %n' {} \; \
    | sort -nr | cut -d: -f2- | head -3

For putting a book at the top of the list use touch:
touch database/media/books/mybook.epub


Tor browser and amazon.com

Question: Using the Tor browser on amazon.com, everything appears normal, however, when you purchase something and hit "place order" you immediately get the confirmation email but amazon.com immediately cancels the order.
Comment: Have you tried asking Amazon why? It seems like Tor Browser is working fine but Amazon are doing something so this seems more appropriately directed at them.
Answer: Amazon, Cloudflare and Google usually aren't a fan of Tor network. Google blocks connections from Tor (sometimes shows a captcha and let it go), Cloudflare keep asking to complete captcha and Amazon as you seen on your Tor browser cancels your order. They detect 3 layer of IPs which is suspicious to them so you can try reaching maximum privacy so they detect only Exit node's IP and there you go or not using Tor for these websites by bypassing them in your Tor Browser proxy settings
Note that 1) Tor is fine the problem is with Amazon 2) If you need help with reaching maximum privacy follow instructions at torproject.org 3) Tor Browser is basically Firefox so proxy settings is same as Firefox you can find out how to do it all over the Internet

Tor browser and amazon.com


Importing product listings from Amazon into Magento

Question: I am looking to import by book listings from Amazon into Magento
Comment: Do you have a question? Or are you just listing future objectives?
Answer: Have a look at this extension M2E Pro It suppports integration with Ebay and Amazon. It is free of cost. It might help .
Answer: Please check Amazon Products Manager: https://web-experiment.info/magento-amazon-products-manager
This Magento plugin allows you to easily import Amazon products into Magento. Note, it uses the Affiliate API, not the Merchant API. You can import any product available for affiliate sales.
New option "Sync ISBN Products" is available for books. Fast and easy import reviews from Amazon to Magento by ISBN.
You can use Merchant ID option. It would set the affiliate link to point to exact merchant offer on Amazon.


I use Steam to log in, how do I use this logon for stackoverflow.com?

Question: There is no option to use Steam for logon on Stackoverflow and logging in with StackExchange Account does not work apparently, because I never created one with this account.
Answer: You can manually enter the Steam OpenID URL (http://steamcommunity.com/openid) by clicking "Show more login options..." and then putting that URL into the box. Then you should be able to log in with Steam normally, and the accounts will be associated automatically.
Alternatively, you can associate another OpenID account with your account on this site by going to your user page and clicking "my logins" at the top. Then you should be able to click "add more logins..." to associate another account with this one. Then you can use that account to log in to stackoverflow.
Comment: The reason that it was added to Arqade is that the number of PC gamers who don't use Steam is basically 0. You are the target audience for the Steam OpenID login, which presumably lowered the barrier to entry. But having Steam as one of the major options for logging in doesn't make sense on many of the other sites within the network. For instance, while Cooking and Home DIY may have some gamers, that is not the primary focus for them. Having a prominent button that never gets clicked doesn't make sense for them. Having said that, it might make sense to add it to the more options list.
Comment: Why? I don't really see a problem with using Steam credentials everywhere. The amount of extra work is minimal.
Comment: I'd have to side with murgatroid. Either direction is extra work - some people don't want to have to get separate login systems (and, in fact, half the point behind OpenID is to avoid this very issue) just to access one other site. Steam still works for Stack Exchange, so it ends up being whether the user will see "entering an address" as more work versus "maintaining another login identity". All things said, though... we only have **9** tiny alternate login icons on Stack Overflow...
Comment: I would recommend the second approach. Use your Google credentials, or create a Stack Exchange OpenID.
Comment: Just for ease of logging in to other sites on the network.  Yes, using Steam is possible and relatively simple, but it's so much easier to just click on one of the options already present.  Also, if you're already signed into Google and have associated that account with the site you're trying to log into, it's literally just two clicks to log in: hit the log in link, then choose Google.  Painless.
Comment: I'm partly of the opinion that more options = better.  As can be seen [here](http://meta.superuser.com/q/2866/17529), I've had issues in the past where I had trouble logging in with one provider, yet another provider worked.  Now, to be fair, it was an isolated event, and it actually was Steam that saved my bacon, but if it wasn't for the fact that I had already associated Steam with my account, then I probably wouldn't have been able to log in at all.  Also, if you're already maintaining a Google account (and honestly, who here isn't?), then is it really that much extra work?
Comment: It's true that having more accounts is useful, but that usefulness is orthogonal to the problem in question. Besides, as Grace pointed out, part of the reason for using OpenID is that you don't have to assume that someone has any particular account. Plus, the whole reason I put both options in my post was so that the OP would be able to pick the option that is best for *their* situation.
Comment: For those who haven't logged in since forever, here's what the login page says: "**Why OpenID?** It's a single username and password that allows you to log in to any OpenID-enabled site."
Comment: That worked, thanks. But yeah, I'd like to have a "Login with Steam" option exchange wide, since they already use it on Arqade.
Comment: But it doesn't make sense that there's even no small Steam button under "show more login options".
Comment: It would be unreasonable for them to give every possible OpenID provider a button. They had to choose some subset of providers and allow the rest to be entered manually in the text box, and most likely people don't use Steam unless they are on Arqade or they come from Arqade.


Does property include money in the sense of ECHR right of peaceful enjoyment?

Question: ECHR protocol 1 article 1 protects the right to peacefully enjoy one's property. Does this include money? For example if one has frozen, seized or confiscated by fines, would this be Applicable as much as with forfeiture of a house?
Answer: The ECHR protocols are not meant (and not generally understood) to prohibit taxation or fines by the state in accordance with the rule of law. See e.g. this explanation by the Council of Europe. As to the specific question, this explanation enumerates shares and leases as property, and the text makes it clear that bank accounts or cash would also be covered:

[...] in the general interest or to secure the payment of taxes or penalties; [...]
Answer: ECHR Protocol 1 Article 1 is:

Article 1 – Protection of property
Every natural or legal person is entitled to the peaceful enjoyment of his possessions. No one shall be deprived of his possessions except in the public interest and subject to the conditions provided for by law and by the general principles of international law.
The preceding provisions shall not, however, in any way impair the right of a State to enforce such laws as it deems necessary to control the use of property in accordance with the general interest or to secure the payment of taxes or other contributions or penalties.

There is nothing in this article to suggest that it would only apply to certain kinds of property and not to others (e.g. real estate, money, moveable property, intellectual property). However, since taxes are mentioned, we can conclude that money is definitely part of this article's concept of property/possessions.
You mention issues such as confiscation. It is important to note that the right to property is a qualified right that can be restricted by law. For example, note that this Article 1 expects the right to property to be limited in the following ways:

Depriving people of their property is allowed for a public interest, subject to conditions established in law and international law.
States have the right to enforce laws that control the use of property in accordance with a "general interest"
States have a right to enforce laws to secure the payment of taxes, contributions, and penalties.

That is, the state can't just seize your money or other property – they have to do it on the basis of a law, and may have to satisfy further criteria such as a public interest.
Few fundamental rights are absolute rights, and even those can clash with other rights. For example, the right to life from ECHR Article 2 along with Protocol 13 Article 2 is pretty absolute, and forbids the death penalty – but it still allows people to be killed as the result of reasonable force.


Opamp Design Considerations

Question: Opamps are a great device for amplification. Recently i used a TL084 which is quad-channel Opamp
I used three opamps in the device for getting gains of 1 , 2 , 3 respectively. I noticed that, without any connection to the input, there was Voltage at the output of 0.4V. Please Help me understand what the problem is. Can a Pull Down Resistor help here? and also will a Series resistor to the input help? Please suggest good practices for the opamp design.
Comment: Ground the inputs and measure again.
Comment: You can't leave opamp inputs unconnected: the input pins require a small DC bias current to operate properly. A pulldown resistor to ground will set things right. The value should be high enough so that whatever connects to J1 can drive it easily, and not so high that the opamp bias current through it causes an acceptable DC offset, or the resistor noise becomes an issue. 10K-100K is a good place to start.
Comment: Thank you soo much
Answer:
Can a Pull Down Resistor help here?

It might. It depends on your type error. OpAmp inputs are high impedance. So they tend to pick up noise or static charges, if their inputs are not connected to a fixed potential. A pulldown resistor is one way of solving this issue.

and also a Series resistor to the input will help?

No. As I said. OpAmp inputs are high impedance. This means, that there is no current flowing into them (for an ideal OpAmp). Without a current flow, a series resistor at the input will be useless.

Keep in mind that you most likely also have to deal with non-ideal behavior of real OpAmps.
Supply Rails
Your circuit doesn't show your supply voltages of the OpAmp. However, keep in mind, that OpAmps can only generate output voltages within their supply voltages and, depends on your type, can only take input voltages in limits with your supply voltages.
If you supply your OpAmp with + 10V and 0V, the output cannot reach 0V. There are rail-to-rail OpAmps which allow you to get very near their supply rails, but even these, will never reach you supply rails at the output.
The datasheet of TL084 says in its recommended operating condition $$VCC+ = 5V$$ and $$VCC- = -5V$$
In this case an output of 0V is perfectly valid as it is perfectly in the middle of the supply rails. Just be careful when powering these opAmps asymmertrically.
Input Offset Voltage
As you probably know, an ideal opamp has infinite gain and will amplify any voltage between its positive and negative input. When connecting both the positive and the negative input to the same potential, the OpAmp's output is 0.
This is the essential behavior, that allows you to handle an OpAmp with negative feedback as if its inputs are always on the same voltage.
This however, only holds true for ideal opAmps. Real OpAmps have something, called input offset voltage. This input offset voltage is caused by asymmetries in the design and in the manufacturing of the OpAmp.  The input offset voltage basically adds to your input voltage and the opamp behaves at if it is seeing an input voltage higher than the actual one. When wiring OpAmp circuits at high gains, the input offset voltage is also amplified.
The TL084 states an input offset voltage of at max +/-5 mV (depends on your specific type). When wiring a non inverting amplifier with a gain of, let's say 100, you will get an output voltage of +/-500 mV although the input is connected to 0V.
You can read more about it in this tutorial by AD
Comment: Thank you soo much
Comment: @VenkateshA Glad it helped you. If an answer helped you, you can upvote it and accept it using the green check mark, so others can see that a solution for this question has been found.
Answer: Hello everyone that helped me...thank you ...i used a pull down resistor of 68k(cause i didn't have 10k or 100k) and the circuit worked...

Opamp Design Considerations


uses for the words BROAD & WIDE

Question: could anybody tell me please if there is a rule which may indicate us when to use "BROAD" and when to use "WIDE? For example: I know it is correct to say "broad daylight" but is it wrong to say "wide daylight"? 2nd Example: "world wide" it is correct, but what about, "world broad" 3er example: "Wide-awake" which is correct, but "Broad-awake" is it correct? Diccionares are unable to explain this or if there is a rule. Can you help please?
Answer: "Broad daylight" and "Wide awake" are idiomatic expressions. You can't change them. That's just how they are!
Broad daylight means

The time when everybody can see what is happening

For example, The crime happened in broad daylight
Wide awake means Fully awake. It also means a hat. Revise your dictionary for more information.
Worldwide is a word. We don't write it separately. It's an adjective, sometimes an adverb. For example, He is famous worldwide
In many contexts, wide and broad are synonym and are interchangeable.
Comment: You might want to copy and paste your answer in the "older" question. I don't think this question will resist deletion.

uses for the words BROAD & WIDE


Moving Enceladus to become Earth's Second Moon and its side-effects

Question: If we moved Enceladus (not Europa) into Earth's orbit (ignoring the plausibility of it), and gave it a breathable atmosphere, what effects would it have on the Earth? How would it affect us?
Comment: Oh, sure, but if the OP was okay with grossly temporary solutions, why didn't they say so?
Comment: Not part off an answer, but it's not massive enough to [hold on to a breathable](https://en.wikipedia.org/wiki/Atmospheric_escape) atmos. at this distance from the sun (temperature).
Comment: @BLT-Bub this argument arises often, but seems to miss the point that atmosphere escape applies over geological and astronomical timescales. It isn't really relevant if the atmosphere disappears in a million years, or even in ten thousand years, especially if the means for generating said atmosphere were still available to keep it topped up.
Comment: @StarfishPrime ... or indeed a planet-enclosing forcefield or gas-impermeable sphere. Just saying... Enceladus is small enough that it'd otherwise lose the atmos quicker than that.
Answer: Presuming you'd park Enceladus well away from Luna's orbit, you'd get either much stronger and more complex tides (if closer) or slightly increased and more complex tides (if beyond).
However, I'm not sure you could park another large moon inside our existing Moon's orbit without disrupting the system with three-body effects, so you'd probably have to park it further out -- which would be a problem in terms of keeping Enceladus bound to Earth, because the Moon is much further out than most other moons in the system, relative to the sizes of their primaries.  Try to put a second moon in even a 4:3 resonance beyond Luna (that'd be a 40-day orbit, roughly) and you've have a problem with the "new" moon wandering away into a halo or horseshoe orbit of the Sun, rather than being a satellite "of the Earth" as you seem to intend.
Most likely, because of the very large size of our Moon relative to the Earth, there isn't a way to bring in a second body of similar size/mass to Luna and not disrupt Luna's orbit in some way -- the two bodies are too close to the same mass to use Lagrange libration points, and even our distant Moon is too close (and too non-uniform) to park them in orbit of each other without perturbation by the Earth, Sun, and Jupiter causing them to drift out of that arrangement.
I was reminded in comments, however, that Enceladus is actually significantly lighter than Luna -- more than 600x lighter, in fact, which is well below the threshold to be metastable in the L4 or L5 Lagrange points.  So the simple solution appears to be to park Enceladus 60 degrees ahead or or behind the Moon in the same orbit (the additional mass added to the system, in this case, isn't enough to noticeably change the Moon's period).
Doing this will insert a second, weaker high tide each day, either four hours ahead of the main one or four hours behind it.  There are some locations (such as the Bay of Fundy, where flow restrictions make the tides much more spectacular than is common) where this will cause significant complications, but in most locations, the overall effect will be small.
Of course, there will be a second moon in the sky, with phase running about five days ahead or behind Luna's -- it will be smaller, but might be as bright or even a good bit brighter (since the artifically maintained atmosphere mildly implies surface water and clouds, which will have a far higher albedo than the asphalt pavement darkness of Luna's surface).  This would have some knock-on effects on nocturnal life -- night hunters would have more light, longer, most nights, for instance.  The second light in the sky might also confuse some night fliers for a while, because they'd have to navigate by one beacon or the other -- it might take thousands of years to select out the moths and night flies that can't deal with the change.
Comment: "The gift that keeps on giving -- provided you're willing and able to pay for it for the rest of the Sun's lifetime."    Ethical demigods owe it to the normals to use solutions that stay solved.
Comment: Actually, Enceladus is a  quite a bit smaller and lighter than the Moon.  Moon's 7.35E22kg, vs Enceladus at 1.08E22 kh. Mass limit for stability on L4 or L5 is a shade under 25:1, and Moon to Enceladus is about 680:1
Comment: @notovny that's a very good point (especially once I'd realised you meant E20 for Enceladus, not E22!)
Comment: Given the staggering difficulties involved in moving something as big as Enceladus out of a deep gravity well and then gently inject it into a terrestrial orbit, anyone capable of doing such a thing could just chuck it into an Earth-Moon Lagrange point and use the same transport mechanism it was moved with for stationkeeping.
Comment: Sure -- if they want to stick around for millions of years to adjust the orbits every few months or years, to keep from coming back from a sublight trip to M31 to find Enceladus or Luna missing and Earth with a new crust and no atmosphere...
Comment: If they wanted it there so bad, they can look after it like responsible demigods. Relocated terraformed moons are for aeons, not just for Christmas.
Comment: @StarfishPrime Yes, that's indeed what I meant to write, thank you; I can only blame kung-fu lasers and starvation for my typo.
Answer: The Orbit Matters
If Enceladus is parked opposite Luna, at a matching orbit, then these changes will happen
at minimum :  Tides will occur at the same timing (remember, both close and far sides of the Earth flex out) , and they will be stronger .  The night sky will be brighter on average, and dark nights will be rare.  Enceladus has a lighter density and much lighter mass, so its orbit will change at a different rate than Luna's, but that's a millions-of-years change.
If Enceladus is parked around and close to Luna so that the orbital plane passes through the Earth, then the tides on Earth will be stronger in general, with a new oscillation from the distance to Enceladus.
If Enceladus is parked around and close to Luna so that the orbital plane is flat to Earth, then Earth's tides will be stronger in general, and generally the same as before.
As mentioned in a previous answer, most Earth-centric orbits will result in calamity, with Enceladus flung away or falling into Earth.  Enceladus has to be in resonance with Luna's orbit around Earth (L1-L5), or Enceladus has to be a significant distance away.


Is a perfect set a boundary?

Question: In a topological space, is a perfect set (i.e. closed with no isolated points) always the boundary of some set?
Comment: In a second-countable space, yes, every closed set is a boundary there. In full generality, no idea yet.
Comment: The answer to http://math.stackexchange.com/questions/151265/a-niggling-problem-about-frontier-in-topology implies that this is true iff every space without isolated points can be partitioned into two dense subsets.
Answer: A topological space is irresolvable if there is no dense subset whose complement is also dense. If $X$ is irresolvable and dense-in-itself, then $X$ is a perfect subset of $X$ which is not the boundary of any subset of $X$. Irresolvable dense-in-itself spaces have been constructed by Hewitt and others:

E. Hewitt, A problem of set-theoretic topology, Duke Math. J. 10 (1943), 309-333.
K. Padmavally, An example of a connected irresolvable Hausdorff space, Duke Math. J. 20 (1953), 513-520.
Douglas R. Anderson, On connected irresolvable Hausdorff spaces, Proc. Amer. Math. Soc. 16 (1965), 463-466.
Guram Bezhanishvili, Ray Mines, and Patrick J. Morandi, Scattered, Hausdorff-reducible, and hereditarily irresolvable spaces, Topology and Appl. 132 (2003) 291-306.

For an easy example of an irresolvable T$_1$-space with no isolated points, take an infinite set $X$ and a nonprincipal ultrafilter $\mathcal U$ on $X$, and topologize $X$ by making $\mathcal U$ the collection of all nonempty open sets. This is a door space; clearly, a nonempty door space is irresolvable.

Is a perfect set a boundary?


Wilderness temptations of Christ: how did Satan appear to Jesus?

Question: What form did Satan assume when tempting Christ?  Or were these temptations strictly coming to Jesus through Satanic-driven thoughts?
Comment: If my edit ended up misrepresenting your intention, feel free to edit further.
Comment: https://christianity.stackexchange.com/q/48756/23657  Related
Answer: Where is there any basis for claiming that Jesus Christ had any satanically-driven thoughts?
Yes, Satan tried to put thoughts into Jesus' mind that had all the hall-marks of the deceiver. Yet the Christ knew all about this evil one from before the time of the garden of Eden. He instantly recognised who was at work, 40 days into his wilderness fast, because although his body was weakened by that, spiritually he was untouched.
Matthew's account begins by giving us this insight -

"Then was Jesus led up of the Spirit into the wilderness to be tempted
of the devil." Matthew 4:1 K.J.V.

I understand the Greek word translated 'led' has the forceful meaning of 'driven'. But as Jesus had seen the Holy Spirit descend in the form of a dove when "the heavens were opened unto him" at his baptism, and Jesus heard the voice of the Father declaring his pleasure at him, his Son, he went immediately into the wilderness fortified, knowing what was coming. He knew the purpose of the wilderness at that time. We may be sure that he used the 40 days to prepare himself spiritually for whenever the Devil made his move.
The Bible nowhere describes any form the Devil took, and nowhere tells us how Jesus saw him - whether literally, or spiritually. The simple answer to your question is "We do not know."
If we needed to know, that would have been included in the Holy Spirit inspired gospel accounts.
What we do know, from everything that is said about Christ, is that his thoughts were always driven by discerning the will of the Father (that he might do the will of the Father). That is stated time after time. His thoughts were never driven by the Devil.
Yet when Jesus went into the wilderness to fast for 40 days, the Devil must surely have found himself being tempted to try to test the Son of God at his weakest physical point, and he just couldn't resist it. The Devil's thoughts are always driven by devilish desires; Christ's thoughts are always driven by God's desires. And ne'er the twain shall meet.
Answer: What the Devil looked like
The answer is not clear from the biblical texts of Jesus' temptation in the wilderness, as no description of the devil's appearance is given. Other biblical texts give various descriptions which may or may not be intended to define his actual appearance:

In Gen. 2 he is a serpent, but one that has legs.
In Revelation 12:9, he is "the great dragon" and "ancient serpent."
In 1 Peter 5:8 he is compared to a "roaring lion."
In 2 Corinthians 11:14 he can disguise himself as "an angel of light."

Other demons mentioned in the bible took various forms. The "se'irim" were hairy, satyr-like beings. (Isa. 13:21, 34:14; Lev. 16:10) The "shedim" (Deut. 32:17) were storm-demons, represented in ox-like form. Lilith was a female demon, a succubus, described sometimes as a desert owl (Is. 34:11) and possibly the mother of Tubal-Cain in Gen. 4:22. source
We can imagine that Satan, as the chief of the demons, could assume any of these or countless other forms. The question becomes which form would be most likely to succeed in tempting Jesus. For me the answer would not be one of the frightening forms but one of more attractive ones, and not necessarily the same form for all three temptations.
Thoughts or Real?
The OP also asks if the temptations were " strictly coming to Jesus through Satanic-driven thoughts." The first temptation (hunger) was physical. The devil is described as tempting Jesus to perform a miracle and turn stones into bread. The other two temptations involve supernatural travel, similar to what several other prophets experienced. Ezekiel was taken in the spirit to a valley (Ezekiel 37:1) Isaiah was spiritual transported to the Temple and God's throne. (Isaiah 6:1) The Gospels do not describe any of these temptations as merely happening in Jesus' mind. Rather they involve "real" experiences of the spiritual realm. Believers may interpret them in other ways, but the text itself describes them as real occurrences, even though they did not happen in the physical world.
Since the devil's purpose was to tempt Jesus rather than frighten him, the most likely form he would take would be that an angel of light, a prince, a priest, a beautiful seductress, a wise teacher or other attractive form -- rather than a dragon, satyr or serpent. Since two of the temptations involve supernatural travel (a high mountain and the pinnacle of the Temple) it is likely that these took place in the spiritual realm: they were not merely "satanic-driven thoughts" but substantial spiritual realities.
Answer: Wilderness temptations of Christ: how did Satan appear to Jesus?
The Scriptures do not tell us what form Satan appeared to Jesus or what he looked like. Thus artists have a certain amount of freedom to portray Satan in several ways.
Whether it was in form of a man or angel as part of a corporeal vision, an imaginative vision or was an intellectual vision, we do not know.

Intellectual Vision
Supernatural knowledge in which the mind receives an extraordinary grasp of some revealed truth without the aid of sensible impressions. Thus St. Ignatius Loyola (1491-1556) wrote of his seeing "the humanity of Christ with the eyes of the soul."
These visions take place either through ideas that are already acquired and that are then co-ordinated and interpreted by God, or through infused ideas, representing divine things, that are thus better perceived than a person would otherwise perceive them. At times the visions are obscure and their object is only dimly understood; at other times the perception is very clear but lasts only a moment. The mystics describe them as intuitions that leave a deep impression on the mind.
The experience of St. Paul on the way to Damascus was at once sensible, imaginative, and intellectual. He beheld the blinding light with his eyes; he saw with his imagination the personal traits of Ananias; and his mind understood the will of God (Acts 9:3-12).


can't remember due to drinking

Question: About 10 plus years ago, I was drinking heavily and decided to go online and buy some bitcoin. Since it wasn't worth much at the time, I just kind of forgot. But now I'm bummed that I can't recall what wallet I would have used. Does anyone have any suggestions on how I might track this down. Can I possibly download some old bitcoin wallet that I can see if it recognized my email?
Answer: Firstly you need the computer, disk or whatever device your wallet was stored on.
If you have that finding your wallet should be easy. Just search for it. How to do that depends on hardware, operating system and so on.

can't remember due to drinking


Feature Hashing in Machine learning

Question: I've been interested in feature hashing in machine learning (the hashing trick) I can't seem to find worked examples of it being used in action for an actual algorithm. Can anyone provide an example of how it would be used from the idea behind the hashing all the way to it's implementation in an algorithm? I've seen resources on line explaining what feature hashing is but non really provide clear examples and show how they're fed into an algorithm. Does anyone know of any good resources explaining it? Any help is greatly appreciated !!
Answer: Scikit-learn provides a small example in its documentation. There is also a link to less trivial example on this page.
Another example: this notebook from Databricks Scalable Machine Learning course.
Answer: Generally, feature hashing is used to convert categorical feature into a small-dimension feature space and take these feature as input to the algorithm. You can look at the code for feature hashing separately from the algorithm part of the code. KDnuggets has a post giving pseudo code about feature hashing https://www.kdnuggets.com/2016/01/useful-data-science-feature-hashing.html.

Feature Hashing in Machine learning


Shared my work for analysis before applying for a patent?

Question: I have an idea, that is of potential. However, before applying for a patent(U.S then international) it's going through a peer-review process; that is me sharing my work with a few individuals(qualified in the field) to get their analysis, and then will apply for a patent. I've documented my conversations with those individuals. Is that considered a safe move to avoid any concerns of theft, also due to the fact that they agreed not to share my work the moment the participated with my work(no signed documents though, only statements via email). Should I be concerned?
Answer: There are two issues here:

Is your disclosure prior art?
Is there a reasonable risk of theft?

Is your disclosure prior art?
Maybe.
If you have made your invention available to the public, your invention would no longer be novel (35 USC 102(a)(1)). This would prevent you getting a patent (except for the grace period, see below).
Since you have sought analysis from others, presumably you have provided them enough details to fully understand your invention. This would prima facie be making your invention available.
But is to the public? If you disclose your invention to a person who is free to tell others, this is sufficient. Conversely, disclosing to a person who is bound by a non-disclosure agreement is not a public disclosure. Thus this turns on whether your agreement with them by email constitutes a valid non-disclosure agreement. This would depend on your jurisdiction and the terms of the email.
Grace period?
In the US, you have 12 months after your own disclosure in which you can apply for a patent (35 USC 102(b)). Thus even if your disclosure to these other parties would count as prior art, as long as you file an application within 12 months of the disclosure, you wouldn't be prejudiced by it.
This does not apply to most other countries however.
Is there a reasonable risk of theft?
Maybe. It depends on whether you trust the people you told.
There is nothing practically stopping them from applying for a patent now. It would certainly be fraud, but the system relies on you to notice it and fix it. Thus while you may well be able to prove that you originated the idea, this is a costly and lengthy process, and one that is best avoided.
What should you do in the future?
File a patent application before any disclosure to untrusted recipients. Any disclosure to trusted recipients should still be done under a valid non-disclosure agreement.
What should you do now?
File a patent application as soon as possible, I would think.
Comment: @DonQuiKong I believe Europe is rather flexible here. According to EPO Case Law " information is generally to be regarded as having been made public if even just one single member of the public is in a position to gain access to it and understand it, and if there is no obligation to maintain secrecy" (http://www.epo.org/law-practice/legal-texts/html/caselaw/2016/e/clr_i_c_3_3.htm). In other words, one person might suffice, but it has to be examined on a case-by-case basis (the Case Law Book provides a good overview, for anyone who is interested).
Comment: Are you sure one Person counts as the public? In Europe that's not enough. Though somebody not bound to secrecy could publish and therefore make their knowledge prior art. And the Grace period would impede you from extending the application to most other countries by claiming priority as the pct doesn't have this.
Comment: @DonQuiKong Yes (or at least it can). It depends on the nature of the disclosure. *[Xerox v 3Com](http://law.justia.com/cases/federal/district-courts/FSupp2/198/283/2513355/)* stands for a disclosure to a single person with an implicit duty of confidence to be ok. This sort of shows contrapositively that if there were no implicit duty of disclosure, this would be prior art (as public use).
Comment: I believe this is consistent with Europe, where an "oral disclosure of information to a single person will suffice to make it available to the public" ([source](https://books.google.com/books?id=urjmCwAAQBAJ&lpg=PA185&ots=xd9YMNr6Od&pg=PA185#v=onepage&q&f=false)).


Codeigniter - Logic

Question: Im building a commission/referral app in codeigniter but unsure how to code a particular feature.
In my database, i have a table called users with a structure like this (simplified version)
user_id   user_name          user_referredby
1         Billy Bob          null
2         Janes Smith        1
3         Test Person        2
4         Another Person     3
5         Peter Green        4
6         Jess White         5
7         Sally Smith        6
8         John Pink          3

user_referredby is null when user is added to system by admin user. The others are people who have been referred by another person in the system.
The new feature i need works two fold:
1) Admin enters a contract number, selects a (winning)user and specifies a total commission value.
i.e. CN123, 7, 1000
2) Commissions are then generated for each user based on the referral system - Maximum 7 referral levels. Commission is percentage based for each level:
level 1 - 10%,
level 2 - 7%,
level 3 - 6%,
level 4 - 5%,
level 5 - 4%,
level 6 - 3%,
level 7 - 2%
For example: The winning user is user_id 7.
User id 7 gets (10% of 1000) = 100

User id 7 has been referred by userid 6 so

User id 6 gets (7% of 1000) = 70

User id 6 has been referred by userid 5 so

User id 5 gets (6% of 1000) = 60

and so on until it hits a maximum number of 7 referrals.

If the number of referrals is less that 7, it simply starts at level 1 and ends when it hits the user_referredby null.
For example:
If winning user is user_id 3
User id 3 gets (10% of 1000) = 100

User id 3 has been referred by userid 2 so

User id 2 gets (7% of 1000) = 70

User id 2 has been referred by userid 1 so

User id 1 gets (6% of 1000) = 60

User id 1 has been referred by userid NULL so

PROCESS ENDs

To capture all the commission data, i foresee that we need a table called commission. I am thinking it will be like this:
com_id    contract_id   com_date       user_id   com_value   com_total
1         CN123         2014-06-12     7         100         1000
2         CN123         2014-06-12     6         70          1000
3         CN123         2014-06-12     5         60          1000
4         CN123         2014-06-12     Admin     770         1000

This way, i can display the commission received for a contract in the users profile page.
I would also like to capture the remaining commission and assign it to admin user as shown as com_id 4. This is calculated as Com Total - Comm values (1000 -(100+70+60))
So...
This is my problem.
1) How to get all the referral ids based on user table
2) Calculate the commission for each level based on the comm total and referral levels
3) Saving each to the database my each user can see their commission, including the remaining for admin.
I know this is a big task so happy to pay for some help if someone is available.
Thanks.
UPDATE:
I have tried doing this but it doesnt work:
public function add($user_id, $contract, $level)
{
    $this->form_validation->set_rules("contract", "Contract Number", "required");
    $this->form_validation->set_rules("property", "Property", "required");
    $this->form_validation->set_rules("client", "Client", "required");
    $this->form_validation->set_rules("commission", "Commission", "required");
    $this->form_validation->set_error_delimiters('', '~~');

    if($this->form_validation->run() == FALSE){

        $data["page_title"] = $this->lang->line("page_title_agents");
        $this->layout->view('administration/commissions/add', $data);
    }
    else
    {
        $levels = array(10, 7, 6, 5, 4, 3, 2);

        $id = $this->input->post('user_id');

        $user_referral = $this->commissions_model->referred_clients($id);

        $contract_id = $this->input->post('contract');

        $contract_date = date("Y-m-d");

        $contract_property = $this->input->post('property');

        $contract_total = $this->input->post('commission');

        $com_value = $levels[$level] * $contract_total;

        $sql = "INSERT INTO commissions (com_contract, com_property, com_date, com_client, com_commission, com_total_commission)

        VALUES ('$contract_id', '$contract_property', '$contract_date', '$user_referral', '$com_value', )";

        add($user_referral, $contract, $level+1);

        $this->session->set_flashdata('message', 'Commission has been is successfully created!');
        redirect('administration/commission', 'refresh');
    }
}

Any idea?
Answer: A recursive function should do this:
$levels = array(10, 7, 6, 5, 4, 3, 2);

function get_referral($user_id, $contract, $level) {
    $user_referral = "SELECT user_referredby FROM users WHERE user_id = $user_id";

    $com_value = $levels[$level] * $contract[total];

    $sql = "INSERT INTO commission ( contract_id, com_date, user_id, com_value, com_total )
            VALUES ( $contract['id'], $contract['date'], $user_referral, $com_value, $contract['total'] )";
    get_referral($user_referral, $contract, $level+1);
}

Note: This isn't valid code! Please use the system you are using to replace the SQL strings here.

Codeigniter - Logic


Is knowledge in the arts based on abductive reasoning?

Question: Is knowledge in the arts based on abductive  reasoning? In the arts esp. visual art, do we use abductive reasoning to try to come up with the best possible interpretation of a piece of visual art?
Comment: Keep in mind that there is also a background "vocabulary" to a lot of this work. Signs and symbols the artists were able to use to communicate to the viewer. Think of religion and myth. There are even modern uses of this. Sartre's implacable root in "Nausea" can be picked up by Godard's focus on the bark of a tree in one of his films, sorry I can't remember which one.  Semiotics, etc.
Answer: Do you mean : Is all knowledge in the arts based on abductive inference ? Or only that some of it is ?
Abductive inference is - what ? - something like this. B needs to be explained; if A were true then B would follow with a high degree of probability; therefore there is some reason to suppose that A is true.
Three comments :

What of presumptive inference in which an answer, X, to a problem, Y, is provisionally agreed and argument continues until a refutation of X, or other compelling reasons not to accept X, is found. This is not unlike one method of argument in the Platonic Socratic dialogues, which concern the arts as much as anything else. This does not look like abductive reasoning.
What of argument by analogy - loose analogy as so often in the arts ? This again is not abductive ?

These points only apply if - what is not clear - you mean that all knowledge in the arts is based on inductive inference. If you don't, but intend only that some is, then :

What, finally, of 'in principle' direct objections to abductive inference of the kind offered e.g. by Van Fraassen ? Fraassen uses scientific examples but if abduction is indefensible then it is indefensible in the arts too. See Stathis Psillos, 'On Van Fraassen's Critique of Abductive Reeasoning', Philosophical Quarterly, 1996, 31-47.
Answer: I would say the answer is yes. Art is, well, an art and not a science. The precision of a deductive conclusion is not possible, nor is it possible to conduct the repeated experiments that support induction.
But it is possible for the observer to assemble whatever data is available and draw an inference to the best explanation. A painter might have worked several centuries ago. Deduction and induction are out of the question. But a lot of information still exists, such as: when the painter lived, the cultural customs of the day, materials available to an artist, and the work done by other contemporary painters.
Such data data allows an observer today to form some interpretation of what the painter was likely trying to say. Scientific it is not, but abduction is the best method available and its conclusion can still be meaningful.
Comment: "allows an observer today to form some interpretation of what the painter was likely trying to say" ...this seems to imply that art interpretation is a function of attempting to abduce a message that an artist is trying to communicate with his work, which implies that all visual art reduces to messages that the artists intend to communicate using the work.  Are you sure this assumption is valid?  Could it be _countered_ by an artist for whom an anthropology project isn't necessary... say, a living person you can talk to, who simply denies that there was a specific intended message?
Comment: Hmm. I would say abduction depends on deduction and induction. We use these to arrive at the 'best' explanation. For instance, Sherlock Holmes uses deduction and induction to narrow his list of possibilities and suspects until he arrives at just one. Also,in art I suspect we arrive at the interpretation we like best, not necessarily the best one in a logical sense, There may be no 'best' one in a logical sense where artists will often prefer we find our own interpretation.


selecting resources from gui instead of using XML

Question: I'm able to select android provided colors in xml using @android:color/black etc but I'm unable to find android option in Reference Chooser GUI.Is there a way?
I remember that I found android in Reference chooser sometime back.
Answer: I don't believe there is a way to do this using the Reference Chooser GUI.
What you can do is visit the field in the xml view, type "@android:" as the value for the specific entry you wish to edit and then press CMD+SPACE on mac or CTRL+SPACE on windows to show the autocomplete options. Here you will be able to navigate the resources available to you.
Comment: yeah I'm doing the same.ty
Answer: If you want the default Android, then you can look into the Android SDK under this path:

platforms\android-<API Level>\data\res\values\colors.xml.

You can also look at this answer I gave a while back.


Nested convex optimization

Question: Suppose I have a convex optimization problem of the form $$\min_x f(x) ~~s.t.\\x\in X$$.  Say that $f(x)$ and its (sub)gradient are not given in a closed form, but are determined by solving a convex sub-problem of the form $$\min_y g(x,y)~~s.t.\\y\in Y(x)$$ where $Y(x)$ is a convex feasible region that depends on $x$.  Just to drive the point home, let's say that $g$ and its (sub)gradient are also not given in a closed form, but are determined by solving the convex sub-problem $$\min_z h(x,y,z) ~~s.t.\\z\in Z(x,y)$$, and this last sub-problem does have closed form expressions for the objective function and (sub) gradient. So, our whole problem effectively has three "levels".  What can I say about the complexity of my original problem?  How does the potential for numerical error propagate back up through the inner problems?
Answer: This is known as bilevel optimization.  My impression is that it is considerably harder than usual convex optimization, even numerically.

Nested convex optimization


Dijikstra's algorithm with "hull" value catch

Question: Whilst preparing for the CCC(Canadian Computing Competition), I encountered CCC 2015 Seniors problem 4, linked here.
Anyway, the problem describes a set of vertices(points) numbered from $1$ to $N$, and a  set of pathways $1$ to $M$, with pathway $p_i$ connecting two points
$a_i,b_i$, taking time $t_i$. The goal of the problem is to find and print out the minimum time required to get from a specific point of $a$ to point $b$, along the pathways.
This looks like a Dijkstra's algorithm implementation... however there is a catch.
For every such pathway  $p_i$ connecting two points $a_i,b_i$, not only is there a time $t_i$, there is also a hull value $k_i$. You travel by water along the pathways, and your ship has a hull $K$ to begin with. From point $a$ to point $b$, the sum of the hull values along your chosen pathway must not be greater than $K$, otherwise your ship will sink, i.e the pathway is no longer valid.
For this problem, what I first tried to do was to implement it similar to how a normal Dijikstra's algorithm would be implemented.
This passed $9/15$ test cases on the grader, which I am quite proud of for a first attempt. Time wasn't an issue as it usually was, but I am getting Wrong Answer.
I then realised that I cannot just save the minimal hull value for each vertex, as each valid path has a different hull value sum. I have to implement a sort of queue/stack like structure and distinguish between each path.
However, the second I do that, I get codes that score even fewer points than my initial attempt. Time Limit becomes an issue, and I get even more Wrong Answer test cases on the practice CCC grader.
I spent two days already on this problem, and don't seem to be making any progress.
Any help will be appreciated.
Comment: https://cs.stackexchange.com/q/118977/755
Answer: Use the product construction to build a graph on $NK$ vertices and $MK$ edges, where each vertex records both which island you are at and how much hull you have left.  Then, use Dijkstra's algorithm on that graph.  The graph can be built on the fly and does not need to be constructed explicitly.


Present tense of "unassigned"?

Question: Why is there no present tense of unassigned?  We have assign and assigned, so why is unassign not a proper word when we have unassigned?
Answer: The premise of this question is based on a couple of false assumptions.
As a verb
The present tense of the verb unassigned is unassign. It's not as common, but it's perfectly reasonable to apply the un- prefix to some verbs in order to form their opposite.
From "Assign and unassign" at Pearson:

Assign and unassign
You can unassign an assignment and later re-assign it if you want. After the assignment has been unassigned, the green check mark is removed from the Assigned column in the Homework/Test Manager, and the assignment is no longer posted for your students to see; however, results for any work done in the assignment are preserved.
You can also change the assignment status of multiple assignments at one time.
To unassign an assignment:

Go to the Homework/Test Manager.
Select Unassign from the Actions dropdown list for an assignment.
Click OK in the pop-up window when prompted to confirm. The green checkmark is removed from the Assign column for that assignment.

You can later re-assign the assignment by selecting Assign from the Actions dropdown list.

As an adjective
The present tense of verbs are not normally used adjectivally in the first place. This applies to any verb, whether it's used in the affirmative or the negative.
The following are examples of -ed verbs used adjectivally. Consider each as a complete sentence rather than just a sentence fragment:

✔ She is liked.
✔ She is disliked.
✘ She is like.
✘ She is dislike.
✔ He is supported.
✔ He is unsupported.
✘ He is support.
✘ He is unsupport.
✔ The homework is assigned.
✔ The homework is unassigned.
✘ The homework is assign.
✘ The homework is unassign.

It's not that there is no negative version of the present-tense adjectival use of assign, but that there is normally no present-tense adjectival use of any verb, assign or otherwise.

In short, unassign is a proper word. It's just that it's not appropriate in some contexts—in the same way that assign is not appropriate in some contexts.
Comment: Thanks!  This is a good answer.
Answer: There is no present tense form for the word unassigned because it is an adjective and not a verb. So we use the word unassigned to describe a noun. We would not use it as an action.
Comment: We can use unassign as a verb if we wish. It's rare, but it can be used. *I will uncheck the box and unassign the slot ...* But, your answer is otherwise correct the sense the OP is asking about is an adjective.
Comment: @DavidM I have expanded my comment into an actual answer …
Comment: @Heather, you are correct in usage, and David M is correct that I was looking for a verb.  Thanks for your help.
Comment: @DavidM You also can't use *assign* as an adjective ***either***. Saying *the project was / is assign* is ungrammatical. The entire question is based on a false premise—and this answer is also making a faulty assumption.
Comment: @JasonBassford I'm not disagreeing with you. Perhaps you can answer the question for the OP. I think that your statement is actually quite instructive. The question is based on a false assumption, therefore that's the answer.

Present tense of "unassigned"?


Securing data at rest

Question: For an API request to my application, I store the data in the request object temporarily in an XML file before it is pushed to the database. Although the XML files are stored on a secured server at a firewall-protected data center, should I look to encrypt the data in the XML files to make it more secure? What are the best practices here?
Comment: What are you defending against? If it's the entire world, your question is too broad.
Comment: Agree with @JanDoggen. In addition, what type of data is in those XML files? If it's just request data with no PII, and not high impact if the data were stolen, it may not even be worth the cost if you can protect it using access control, etc. So in order to provide a solution, three things definitely need to be known: 1) What's in the data, 2) What are the threats to protect against, 3) What is your architecture at a high-level at least.
Answer: Encryption does not produce security, it concentrates security. Namely, encryption will help in keeping data confidential from people who don't know the decryption key. Your application, though, must know that key in order to decrypt the data again before pushing it to the database.
An important first step is to define your attack model. What are the attackers trying to achieve, and what can they do ? For instance, you may use the following:

Attackers want to learn the contents of some requests. This is a problem even if the request is old.
Attackers can recover old hard disks by practicing dumpster diving.

Then, in that situation, if you write the XML requests to files on your disk (even temporarily), attackers may obtain from an old discard disk some confidential data. Encryption may help, but only if done properly and, crucially, only if the decryption key is not itself written to the same disk. Alternatively, you might want to configure a RAM-based "disk" on your system so that the XML files never reach a physical medium in the first place.
If your model is more about attacker temporarily hijacking your server through some vulnerability, then encryption won't help, because the server must know the key -- thus, it becomes known to attackers as well.

Securing data at rest


How to fix drag and drop videos from being sped up in blender?

Question: When I drag and drop a video in the video editing software, the audio is fine, but the video is sped up and I don't know how to fix it
Answer: I think that the frame rate (fps) of the project (Output Properties) is different from the frame rate that the video was shot (you can check the fps of the video in the Properties of the strip in the Source panel). Suppose, you have shot a video of 1 second at 24 fps and that your project timeline is set at 30 fps. If you drop this video in the timeline, the audio will last 1 second (or displayed as a green audio strip of 30 frames long). The video however has only 24 frames; so the blue video strip will stop at frame 24. Because these 24 frames are really 1 second of footage (and not 0.8  or 24/30 seconds as shown in the sequencer), the strip seems to be sped up.
If this is the case, you can find more info at https://vse-docs.readthedocs.io/video_editing/setup/index.html#project-settings (about the middle of the page).


Misc. file identifications and importance

Question: I see things like roidapp, .chartboost, .mobvista, .ravesocial, etc. No idea what they are but eating up storage. How do I identify them as necessary?
Comment: Those are ad activities. If you have root, you can disable those activities. I recommend you disable those activities.
Answer: These are folders apps use to store some or (less likely) all of their data. If you delete that folder, some app data associated with the folder will be gone.
In most cases you can safely delete that folder given that you uninstalled the app prior to deleting it.
The folders usually have the same name as the app they represent. The reason they have a dot at the beginning is so Android detects them as hidden and doesn't show them unless you tell it to do so.
You can just Google the folder names (without the dot) to find what app made them, what does it do and wether you want to keep it or not.


How do I fix a parasitic power drain on 2018 Mitsubishi Outlander Sport

Question: I am reaching out desperately looking for help. I purchased this vehicle in April of 2022 and have been through 5 batteries. I tried contacting the dealership and they told me that the battery wasn't in contract with my warranty plan. I have been to 3 mechanics and have been quoted anywhere from $400-$1200 for a DIAGNOSTIC ALONE. I am young, broke and trying to learn about cars but I am at a loss for what this problem is. I have been told, after testing my battery life and running codes on my car that no one can find where this power drain is coming from. I can't afford an expensive fix and I just want to try fixing this at home. I was told that it could be coming from my backup camera, my center console screen or my dash screen. Although everything seems to turn off when the car is off, I cannot find where this drain is coming from. I don't leave chargers or cords plugged in and I even have it set so that my cabin lights stay off when I open my car doors. If anyone has any insight or maybe some tips on how to disconnect my rear camera and/or my display screens (even if it's a video link for YouTube), I would greatly appreciate it. I have been searching for over a year now and I genuinely cannot afford to pay all of that money for someone to MAYBE find the drain. Also, I have very VERY limited knowledge on cars, so bare with me, I'm trying to educate myself the best I can. Thank you so much!
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: The first thing you need to do is obtain a clamp on amp meter. If you can't afford one, hopefully someone you know has one you can borrow. Without an amp meter, you won't be able to tell anything. Once you obtain the amp meter, you can put it on your battery cable and see what the amp draw on the battery is with the vehicle off. The typical draw for a vehicle with the ignition turned off should be 50-85 milliamp. That's not a lot of draw. If your current draw is in this neighborhood, then you have other issues. If it's way over this, then read on.
Next, locate your fuse boxes. You should have two of them. One under the hood (bonnet) and the other inside the passenger compartment, usually under a panel in the dash to the outside of the steering wheel. Start with the one in the engine compartment. Methodically remove a fuse and check your amp meter for a difference in draw. Continue doing this until you either find the circuit which is causing the issue, or you've gone through all the fuses. When done with the engine compartment one, do the same for the passenger compartment fuse box. One (or more) of the fuses should lead you to the circuit where the draw is located.
Once you've located the circuit, then you need to figure out what is on that circuit and which item may be causing the draw. The usual suspects for high draws are aftermarket parts. If the stereo head unit has been replaced, this is a good place to look. If the vehicle has an aftermarket amplifier added on, it could be it is "on" all the time, even when the stereo/ignition is turned off. You'll have to dive deeper at this point to actually narrow down what is causing the issue, but the circuit should give you a pretty good idea what is causing the drain.
Once you've located the drain, you'll have to figure out what you want to do about it. It could be caused by someone miswiring something. It could just be faulty equipment which needs to be replaced. That is going to be up to you.
Something you might do in the meantime is to get a battery tender (not a trickle charger) and install it on your vehicle. This will allow you to keep the battery charged while the vehicle is not in use. They are relatively cheap as you can get one for ~$20 here in the States. This isn't an "end all" solution, but should get you by until you can trace down the offending gadget causing your issues.
Comment: @Pᴀᴜʟsᴛᴇʀ2 Yeah, the trunk light was my first thought, but this vehicle has no trunk. The trick there is **not** trusting that the remote trunk release will work from inside a closed trunk, but finding someone that you trust enough to let you out of the trunk when you're ready to come out . . . assuming no newfangled "emergency trunk release." An under-hood light would be easy to spot in total darkness too, but I don't know if this vehicle has one.
Comment: Thank you so much! I ordered an amp meter and will be doing all of this this coming weekend. I'll look into getting the battery tender as well. <3 you are a LIFE SAVER, I can't thank you enough
Comment: @SavanahMorton While waiting for your ammeter to arrive, there's one source of battery drain that you can check without any tools: the light in your glove box. If you don't have ready access to an enclosed garage that's pitch dark at night, you can drive out to a dark spot in the country. I mean *dark* dark, like can't see your hand in front of your face. Pull off the road in a safe spot, turn off the engine and remove the key. Now look for light leaking from the edges of the glove box. If the light in there never turns off, you'll be able to see it in total darkness with the door closed.
Comment: @MTA - Good add. You can check the whole vehicle for things of this nature in the same manner.
Answer: I've been thinking about this subject lately, and had some ideas about how to go about troubleshooting. The clamp-on amp meter was my first thought, but I wasn't sure if they read DC current. It seems the more expensive ones might, but they might be designed for higher currents. So, I thought of a better idea, I think. I already have a multi-meter, which can measure up to 10 amps of current, connected inline rather than clamped on. So, although not nearly as easy as a clamp-on, it's not that hard to use a wire with clips on each end, and connect one end to the battery and the other end to the connector after removing it from the battery. It might even be possible to connect it before disconnection, to avoid losing the car settings. The multimeter is much cheaper than clamp-on DC amp-meters, and pretty useful to have.
If excessive current is detected, my next step would be to use the volt meter to check voltage at each fuse. Any fuse that has 12V should be removed, and the current tested through that fuse's connectors. Checking for 12v first will avoid the need to remove every fuse, since most of them are not live with the ignition off.
One question for experts... can the initial test be done using the negative terminal of the battery connection? Seems like it should be the same from my basic knowledge of electricity. If so, it would be easier to keep the system alive while disconnecting and reconnecting the terminal by clipping a wire from a car ground to the battery cable first, then connecting the meter and disconnecting that wire to get a reading.
tl;dr... instead of using a clamp-on meter that usually doesn't measure DC current, and is expensive...

Disconnect one lead to the battery;
Connect regular multimeter on DC Current function between the battery and the lead;
Measure current using multimeter. Ideally, this should be less than an amp, but it probably depends on the car. Ideally, it would be very near zero.

If the current is too high, the first line of troubleshooting would be to check for voltage at each fuse, and any fuse that has 12V, remove the fuse and check current with the multimeter at each side of the fuse connections.
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Why do we need lots of mechanics?

Question: I think every motions could be determined by Newtonian Mechanics, but why do we need rotational mechanics, or fluid mechanics?
Comment: Re *I think every motions could be determined by Newtonian Mechanics* - This question was asked and answered over 100 years ago, and the answer is no. Re *why do we need rotational mechanics, or fluid mechanics?* Because those are important phenomena.
Answer: Push a wheel, applying a force F... yes, F=ma is still valid, but you now have to consider that as the wheel rotates, different points on the wheel move at different speeds (points on the outside move faster than points near the center).
Sure, you can describe the motion of each point using linear mechanics, using just F=ma, but now each point has a different acceleration, and you don't have a nice way to describe the motion of the whole wheel. Rotational mechanics introduces angular acceleration and lets you say $\tau=m\alpha$, which describes the whole wheel very nicely.
So basically, we develop these other formulations of mechanics because they are more natural for describing certain situations. Note that "rotational mechanics" is still Newtonian mechanics - it's just not linear mechanics. Fluid mechanics is also Newtonian mechanics, just further developed so that it can better describe the motion of fluids (rather than considering the motion of every individual particle in a fluid).
Something like Lagrangian mechanics is actually a very different concept from Newtonian mechanics, although it turns out to be equivalent, and is used because it is more convenient for non-Cartesian coordinate systems.
Finally, quantum mechanics is necessary for describing quantum phenomena because there, Newtonian mechanics are simply wrong. Same goes for relativity.

Why do we need lots of mechanics?


Can use sparql for RDFa

Question: is there possibility to query content on my own site? I´ve read your comments and I know that this does not have a big sense but I only would like to simulate this proces between 2 sites and lear myself how it really works.. I want to query content form one site to another with sparql endpint but I dont know if this is possible. If you query data from dbpedia so data are structured in rdf. But on my ow site if I use rdf mappings for fields it is RDFa.. or? thanks :)
Answer: You should be able to use an online SPARQL processor, such as the one at http://sparql.org/sparql.html.
Just add the URL of your RDFa page to the FROM field, and you can query it. The response won't be as quick as if you're using a local RDF library, but it's useful for testing.
You could also use the command line tool roqet, from the rasqal library:
<code>$ roqet --exec 'SELECT * WHERE { ?s ?p ?o }' --data 'http://steve.harris.name/cv/'
</code>
Answer: Not sure I've understood your question, but...
RDFa is a way to embed RDF (meta)data into web pages. In order to query that data, you need to extract and load it into an RDF triple store that supports SPARQL queries (most triple stores do this).
If you want to query the data remotely then you need an RDF library that serves up the SPARQL endpoint via HTTP, rather than purely as a local API.
Does that help?

Can use sparql for RDFa


Wheel noise while in reverse

Question: 12 Mini Countryman AWD.
A metal on metal like grating noise developed in Right Front wheel only while in reverse, not braking and never forward.  What could it be?
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: According to a different motor vehicle type forum, your options for trouble are varied.
One suggestion is that the pads are worn unevenly, which causes unusual vibration when the movement "re-aligns" the pads. This seems to be on the low end of probability.
Another low end suggestion is that the wear indicators are contacting the disk, due to the change in angle when braking in reverse.
More helpful is the suggestion of rust on the disks, something that would require to have some time passing between parking and movement, sufficient to allow rust to form. On some vehicles (mine!) that can be as short as two days. I get forward grating sound for a stop or two after the vehicle sits.
Now to the nitty-gritty. One forum posting party discovered that he had not properly torqued his caliper bolts after performing service. If you've not performed any work on your front wheels, you may be able to disregard this suggestion.
More of a concern is the fellow who posted that he's discovered cracked rotors. Because disk brakes are so easily exposed, this should be something you can check by jacking up the vehicle and removing the wheel.
In the days of drum brakes, it was important to evenly torque the lug nuts in a star pattern to reduce/prevent distortion of the drum. It's not so much of a concern with today's disk brakes, but it's still a good habit to re-tighten the nuts in a cross-over pattern, a bit at a time until all are secure.
While you have the wheel off for visual inspection, you should move it in reverse to avoid overlooking the obvious. I can't tell you what would be obvious, as it's only obvious if you see it clearly when you look at the wheel. Something stupidly obvious would be a metal tag that floats in forward and snags in reverse, but that's pretty unlikely. Why would there be a tag near the brake assembly?
Look for something that shifts position when moving the wheel from forward direction to aft. Your post suggest that it doesn't happen when braking, which makes it more likely you should be able to see while manually rotating the wheel.
Comment: I appreciate you taking the time.

Wheel noise while in reverse


When was the last American political convention that allowed people to bring guns?

Question: There is a petition to allow guns at the Republican convention. When was the last political convention (Democrat or Republican) that allowed people to bring guns?
Comment: Depends, what level of convention?
Answer: There is no law saying that guns are barred at conventions. The reason they won't be (weren't) allowed is the Secret Service who reserves the right to restrict firearms under Federal Law 18 U.S. Code 3056. I know this doesn't directly answer the question, but it may help re-frame your research. Unless the Secret Service steps in, whether guns are allowed or not will come down to the specific
 city's gun laws.
Comment: When was the Secret Service created?
Comment: 1865 but they were chasing counterfeiters not guarding the president


How can I access additional services in my container?

Question: A decision was made by my company to containerise the entirety of a solution with multiple services into a single monolithic container (best practices aside please as I am well aware this goes against the microservice approach of 1 container = 1 service). In essence the following ports should in theory be listening for traffic:

Port 3000 (static React frontend)
Port 8081 (backend services)
Port 8545 (additional service) [can deal with this later as I feel illumination of the problem with the Port 8081 service will lead to a similar resolution for this one]

When I host this container on an Azure Web App for Containers instance the frontend service comes up on it's own, no problem, (route is /). However, the backend service is mapped to /services/* (actually :8081/services/* as above) and contains a config file the frontend needs to be truly "functional". However, this appears to be inaccessible as the web app attempts to proxy to localhost:8081/services/* in order to get it (as it is localhost WITHIN the container itself).
What it is the best approach to allow the web app to call out to the additional service(s) on these different ports?
I initially thought I could place an Azure Application Gateway in front of the web app to act as a reverse proxy and do a hostname rewrite to rewrite requests on Port 8081 to (FQDN/IP):8081, but this doesn't seem to be working correctly (no difference in error codes or visually). I also thought about placing a reverse proxy like Nginx WITHIN the container, but was interested in seeing if I could do it outside first to stop increasing the size of this already large image or if this would even be an option.
Answer: Azure Web App for Containers expose one port from your container. Azure Web App for Containers detect port 3000 first (3000<8081).
Revers proxy in container will resolve your problem. Test outside of container will not work.
For test you may be change port 3000 to 8082. Backend /services/* will available, but frontend won't.


Controlling who pushes to my github repository

Question: I setup an organization repository for a code that several of us are working on.  Currently, I only added one other owner of the repository.  It has no other members.  I want to make it so that nobody but the owners or members can push to the repository.  When I had a repository in my individual account, I had to add an ssh key in order to push to the repository; however, I did not have to do this to push to the organization repository.  How can I be sure that nobody else can push to the repo?
Answer: Apparently, push access to the repository is controlled through the individual account.  I noticed that my SSH key is still in my individual account.  When I push to the ssh link to the repo that is provided on the github repository page, the SSH key in my individual account is used.  Someone who is not a member of the repository would not have push access.  I was told by github support that trying to push through the http link would prompt the user for their github user ID and password.