Is being thankful for Jesus' death biblical?

Question: Are there any examples in the Bible of people being thankful that Jesus died, or promoting the practice of thanking God/Jesus for Jesus' death? I'm asking specifically about his death, not life or resurrection.
Answer: Yes, but it's not for the death per se, as though the death has its intrinsic value, but for the meaning of Jesus's death, the immensity of WHO died and for what Jesus's death effected in us:

Death as expression of the love that Jesus has shown us, by giving up his life for his friend (John 15:13-14)

Death as the eternal Passover Lamb that God has provided to become the means for taking away the sins of the world (John 1:29)

Death as God's declaring the end of the power of sin's control over us by sending His Son Jesus to become the humanity's representative through incarnation (Rom 8:3)

Death (and the attendant suffering) showing that God is truly with us in solidarity with our suffering instead of watching us suffer from a distance.

Etc.

As for examples in the Bible of people being thankful of Jesus's death in the meaning explained above, we can cite

Paul, in many places of his letters, such as Eph 1:6-7, where although the word "thanksgiving" or "gratitude" doesn't appear in the pericope (Eph 1:3-8), it's very clear from the text that he is thankful.  Eph 1:6-7:

6 So we praise God for the glorious grace he has poured out on us who belong to his dear Son. 7 He is so rich in kindness and grace that he purchased our freedom with the blood of his Son and forgave our sins.

The author of Hebrews, asking us to respond with acts of love and good works (Heb 10:24) in response to our being sprinkled (purified) with Christ's blood (Heb 10:22).  Later in the book, Heb 13:15-16, the preacher invites us to offer "sacrifice of praise to God" (which implicitly include thanksgiving) for Jesus's blood sanctifying us (Heb 13:12), which Christians incorporate in the celebration of the Lord's supper.
Comment: The reference to John 15:13-14 says it all. The manner of Christ's death is the proof of his love and offer of friendship. Friendship with God is the most precious commodity in the universe and its offer the thing most to be grateful for.
Comment: In effect, we are thankful to Jesus for offering himself, while feeling guilty about the necessity. Would that be a fair comment?
Comment: @StephenDisraeli I think we should feel guilty for our sins and in response to the grace received, we unite ourselves with Christ in his death by also offering our lives to those we love (including enemies!) as a sacrifice for God.  That way, we move on from guilt to love.  I got your point about guilty about the necessity since that's the predominant undercurrent (although may not be intentional) of how Christ's death is preached from the evangelical pulpits.
Comment: @StephenDisraeli But I have since emphasized **incarnation** as necessity because our broken desires that lead to sin in the first place need to be healed. We are not just made righteous but also made into conformity with the image of Christ (theosis).  Death on the cross doesn't only justify, we also drink his blood to get his life flowing in our new life (sanctification). Thinking of Jesus' death as healing agent by a long-suffering shepherd will then dampen the guilt aspect just like we are more thankful of our parents's patience than feeling guilty, although they did suffer for us.
Answer: The memorial of the Lord's supper, instituted by Jesus himself and proscribed by the apostle Paul is a remembrance, perpetually, until Christ returns.

23For I have received of the Lord that which also I delivered unto you, That the Lord Jesus the same night in which he was betrayed took bread: 24And when he had given thanks, he brake it, and said, Take, eat: this is my body, which is broken for you: this do in remembrance of me. 25After the same manner also he took the cup, when he had supped, saying, This cup is the new testament in my blood: this do ye, as oft as ye drink it, in remembrance of me. 26For as often as ye eat this bread, and drink this cup, ye do shew the Lord's death till he come. [1 Corinthians 11 KJV]

'Ye do shew the Lord's death (specifically) till he come'.
The remembrance and the 'shewing' of the death of the Lord Jesus is surely a matter of thanksgiving.
Answer: Is being thankful for Jesus' death biblical?
The short answer is yes.
One of the popular verses people like to quote is John 3:16. "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life." Let us always be aware that St. Paul reminds us to give thanks to God for everything in our lives. This should include Jesus' Passion and Death on the Cross. The gift of Jesus' death on the Cross opened heaven for humanity. He took our place and gave us eternal life life. He freely died for our salvation; how can we not be give thanks to God the Father for such a gift. "In every thing give thanks: for this is the will of God in Christ Jesus concerning you." (1 Thessalonians 5:18)
Jesus himself gave us the example to follow on the night before his Passion. Now if Jesus commanded us to commemorate the Last Supper in thanksgiving; should we not also give thanks for his Passion and Death?

18 For I tell you that from now on I will not drink of the fruit of the vine until the kingdom of God comes." 19 And he took bread, and when he had given thanks, he broke it and gave it to them, saying, "This is my body, which is given for you. Do this in remembrance of me." 20 And likewise the cup after they had eaten, saying, "This cup that is poured out for you is the new covenant in my blood. - Luke 22:18-20

Let us there give Thanks to God with tearful joy in Christ's triumph over sin and opening heaven for a humanity with a fallen nature.

Feeling and expressing appreciation is good for us. Like any wise father, God wants us to learn to be thankful for all the gifts He has given us (James 1:17). It is in our best interest to be reminded that everything we have is a gift from Him. Without gratitude, we become arrogant and self-centered. We begin to believe that we have achieved everything on our own. Thankfulness keeps our hearts in right relationship to the Giver of all good gifts. - Why is giving thanks to God important?

Here is one prayer of thanksgiving for Jesus dying for us, I found online:

"Dear Jesus, Thank You for dying on the cross for our sins so that we may live. Thank You for Your love and Your provisions, and for the call You have placed on our lives. Thank You for planting a seed within us, so that the desire to know You more, and the desire to follow You, will grow deep. We worship, and praise You. Holy Spirit, We thank You for fighting our battles, You are amazing in all wisdom, knowledge and understanding. We ask for all of You. May we walk with You and speak Your words constantly knowing it's not us but You within us. Be with us and guide us through this day, we thank You Father, Son and Holy Spirit. Amen" - Strong Women For Christ


SWF file smaller than the PNG's within it?

Question: I don't understand how this is possible. I made this banner based on the design of another one. I've been struggling getting decent quality. I notice the quality is pretty good in the one I'm copying. I decompiled and saw that the images alone are 125kb. This is bizarre because the total size of the swf is only 45kb. What the hell is going on here?
Comment: One thing to keep in mind is that when an image is in a container format such as SWF, the container can do other things besides compression. One potential file size optimization strategy is to throw away the file headers and only store the channel data. Because the header is often a fixed minimum size, plus room to expand based upon need, on smaller files this might give one the impression that the file size has changed dramatically.
Comment: A second thing to consider is that what people consider file formats (PNG, JPG) are file STORAGE formats. In a container format like SWF, it may be stored in an arbitray, non-standard manner and only becomes a PNG etc when exported.
Comment: While this is an interesting question, it's really about file compression and/or the makeup of SWF files, so I'm not sure it belongs here.
Comment: I'd say this is on–topic: for a graphic designer it is crucial to have a good-looking design, and file compression in the design workflow is commonplace in digital media—especially for the web.
Answer: It seems that if the source PNG file is too big (and in this case, even 25 kB seems to be "too big"), Flash decides to use JPG compression on the imported file by default.
The default amount of JPG compression is defined under Publish Settings… → Flash → Images and Sounds.
The compression can be overridden by–object basis through the Library window to either different amount of JPG compression or to lossless PNG/GIF "compression":

Choose the bitmap file you want to edit from the Library
Right click → choose Properties…
Click OK

If you want to preview the results, click Update and review the results

Note that the original PNG is 25 kB and Flash reports its lossless file size as 135.6 kB; it may be the case that Flash will base its calculation to a redrawn bitmap.

This might answer your question — or not. I noticed that a SWF file containing just the PNG image (25 kB) results in a file size of 16 kB. (For what it's worth, a SWF file containing the same PNG image, this time compressed with 97 JPG compression, results in a file size of 20 kB (well, the increase was expected))
So Flash does some abracadabra in between of which I currently have no idea; but changing the default compression to your liking might solve the crippled image quality of your SWF output.
Comment: Fantastic. Problem solved. The whole reason I was using PNG was for it transparency. I had seen the bitmap properties dialog but assumed if I converted to jpg I would lose the transparency given jpg doesn't support it BUT apparently flash will actually preserver it by (i'm assuming) making anything that has color info a jpg and leaving everything else in the image that's transparent a png or gif. Thanks for all the replies!


Solving linear system with matrix multiplication

Question: When solving a linear system $Ax=b$ where $A=B^TCB$ do I need to form $A$ explicitly by two matrix-matrix multiplications or is there another more simple way?
$C$ is a NxN matrix and not always symmetric. $B$ is NxM and not symmetric.
Comment: Not if you use an iterative method like conjugate gradients or (since your matrix is not symmetric) GMRES.
Answer: The beauty of iterative methods is that all they require you to do is matrix-vector multiplications. In your case, the product of your matrix $A$ with a vector $y$ can be written as $z=Ay = (B^TCB)y= B^T(C(By))$ which shows that all you need is three matrix-vector products but no matrix-matrix products.
If $C$ happens to be symmetric and positive semi-definite, then so is $A$ and you can use the Conjugate Gradients method. Otherwise you probably want to think about GMRES, another iterative method.
Comment: @vydesaster It "works" regardless of the dimensions.  But if M is much smaller than N, you might be better off doing the matrix-matrix multiplication.
Comment: @vydesaster It works because matrix-matrix multiplication is an associative operation. $z = Ay = (B^TCB) y =  B^T C (By) = B^T (C v) = B^T w$ where I've defined $v := By$ and $w := Cw$. As an exercise, you should (1) check that the dimensions for the matrix-vector products all match up and (2) tally up all the floating point ops and convince yourself that iterating is computationally cheaper than forming $A$ explicitly (this should be the case for large $M \ge N$).
Comment: Does this really work if matrix $B$ is NxM and not NxN? The matrix multiplication shrinks the system from NxN to MxM.
Comment: Just for my understanding. How does it work? I always thought that the dimensions must match for a matrix-vector multiplication. Is there some trick or something?
Comment: Thanks for this detailed answer. Now I got it and it seems to work.


How much could a biologist tell about an unknown creature from just a tooth?

Question: If a biologist were to find a single tooth from an alien or fantasy beast, what could they figure out from that tooth? Would it be possible to get any idea of what the animal may look like?
Comment: (a) What technology is enjoyed by the biologist? Current day? Near/far future? (b) How long between the last living moment of the tooth and when the biologist begins to examine it? (Less will be gained from a petrified tooth than an extracted-an-hour-ago tooth.) (c) How far from the "terrestrial norm" is the creature in question? Is it from a completely alien biome, or is is terrestrial but fictional?
Comment: You need something similar but more complete to make inferences from. Or a cloning machine that works with the "genetic code" of said creature.
Answer: It depends on the tooth. For mammals, it is possible to get a pretty good idea of what the organism is like based on the tooth. The shape of the tooth indicates dietary habits, and it is possible to do further isotope studies to get an idea of what it eats and whether it is semi-aquatic (caveat: these types of studies require additional teeth of other species of known habits to perform as a control group). Additionally, because similar mammals have similar teeth, it is possible to identify an isolated tooth to belonging to a specific family or even genus or species of mammal. Most species of fossil mammal are named from isolated teeth.
However, this is only because mammalian teeth are abnormally complex, and we have a good idea of what teeth look like in each group of mammals. With reptiles, which have much simpler teeth, it is usually possible to tell carnivores from herbivores (but not always), but it is not always possible to get a precise identification due to their usually simpler shape. Crocodile and spinosaur teeth have been mixed up, as have terrestrial crocodile, dinosaur, and rauisuchian teeth. Other teeth can be pretty distinctive, modern amphibians have very distinctive teeth and almost everything we know about fossil sharks (including taxonomy) comes from teeth.
Again, this is all dependent on people having some idea of what teeth look like in general. If there is no good analogue at all, people will be completely lost as to what the tooth belongs to without more complete remains. Helicoprion, plagiaulacoid teeth in multituberculates, and the taxonomy of gondwanatheres are all good examples of scientists being stumped due to their being no good living animals to compare these things do.
In your case if it's something like a dragon, people might be able to tell carnivores from herbivores because the physical properties of meat and vegetation select for similar shapes to process these materials, pointy or blade-like structures for carnivores and flat, ridged, or grinding structures for herbivores (except when they don't, as some herbivores retain pointy teeth for fighting and some predatory omnivores will have grinding teeth). If it's an alien with a completely unfamiliar ecosystem and anatomy, people will likely be at a loss.
tl;dr: Yes, if they have some background in the biology of the area and what the creature is can easily be determined based on comparisons with other fauna. If its completely unknown, the best you might be able to get is someone saying "that isn't from anything that is supposed to be around here".
Comment: Assuming its a a truly alien creature you would still get. Rough size, basis of diet, whether it has a skeleton, some limited information about its biochemistry.  Physics and chemical constraints are the same everywhere.


iPhone contacts aren't syncing to iCloud

Question: Contacts on my iPhone 4 are not syncing to iCloud even though it is set as on. It is a new phone, and the contacts synced when I first set up iCloud, but not since. I have tried "backup now" and new notes appeared, but no new contacts.
Comment: Which iPhone are you using? When you say they're not syncing, are the contacts you want to sync already on iCloud and you're trying to get them onto your iPhone, or are they already on your phone and you're trying to get them onto iCloud?
Comment: It is an iPhone 4, the contacts I've added on the phone are not syncing to iCloud.
Comment: Go to System Preferences > iCloud, turn off Contacts, wait 15 minutes and turn it back on. Does that help?
Answer: This is what worked for me after speaking with a very helpful Apple senior tech agent:
Open Settings> Mail, Contacts, Calendars> Contacts – Default Account = must contain a check next to iCloud.That's it! Now all future contacts created on your iPhone (on your iPad, do the same as above), will also appear in iCloud and Outlook (if you've also set up Outlook).
If you have contacts that are already only on your iPhone/iPad then you'll want to: Open Phone> Contacts> Groups (top left corner)> Hide All Contacts (top left corner). Then select/Checkmark all email accounts/accounts you see listed and make sure that iCloud it NOT check marked here while you're fishing for all those rogue contacts. Click done and what will then be displayed, are contacts that you saved somewhere other than iCloud. Then recreate these contacts you see, one by one, by going into iCloud.com, your other iDevice or Outlook on your desktop and create them as new contacts. For best results I recommend that you DO NOT press save for the new contact until you FIRST press delete* on the non-iCloud contact you are about to make a copy of. Of course press delete only after you've copied all of the contact data.

To delete a contact on your iPhone/iPad: Contacts> select the contact> tap Edit (top right corner)> Scroll to the bottom and select Delete Contact.
Comment: This is what helped me. Fortunately I had only 5-6 such contacts that needed to be recreated.
Comment: This will be a huge pain to re-enter all of these, but this will solve it once and for all.  thank you!
Comment: Yes I had to call Applecare and get second line support to find this)
Comment: Reentry is not necessarily needed - look at what the default account was - they will have been synced from there. Then yous that e.g. outlook in this cas and export from there to icloud
Answer: If you have more than one account with contacts, make sure your contacts are saved to your iCoud account and not any other (Settings -> Mail, Contacts, Calendar -> Contacts -> Default Account -> iCloud (or what ever you've named it). I use Gmail as main account, and therefore new contacts aren't added to my iCloud by default.
If you've done that and it still doesn't work, remove your iCloud account from you settings (Settings -> Mail, Contacts, Calendar -> iCloud (or what ever you've named it) -> Delete Account). Restart your phone and add it again and restart it once again.
Your contacts, notes, events etc will NOT be deleted from your iCloud account, but any data NOT synced WILL (does not affect other account of course)!

Edit: 2017-01-18 ~ With the advent of all the feature rich apps on your phone, you're likely to find that other apps besides the Contacts configured ones have access to add/modify your contacts, such as Facebook. This is why sometimes you have the same person show up multiple times on your phone, and not on your computer or other devices.
Answer: I suggest you to try to reset your iCloud Documents.

Go to http://www.iCloud.com, sign in with your Apple ID. Click on
your name at upper-right corner > account settings Click Reset
Documents & Data Confirm reset
(this will not erase anything, I just did it and it worked fine)
Restart your devices

See also : http://support.apple.com/kb/HT5824
Answer:
Got to Settings
Go to iCloud
Slide Contacts option to Off (You'll get a warning, make sure you choose to save the Contacts on your phone)
Close out of Settings
Wait 5 minutes or so
Go back to Settings / iCloud
Slide Contacts option to On (You'll get a message asking to merge Contacts, say yes)
Go to Settings / iCloud / Storage & Backup
Select Back Up Now
Comment: Simple and perfecet
Comment: And it does not work and actually guarantees that it does not work (if you have a sync to a service in the alphabet before icloud) It will set the default to the first in the list
Answer: I think most of the problem has to do with the fact that contacts can be saved in different groups.  If, by default, your iphone doesn't save contacts into your iCloud group it will not sync with Contacts on your Mac.  Therefore you need to configure your iPhone to save your new contacts to iCloud rather than another group (like Exchange).  Alternatively, you can configure Contacts to also sync with whatever alternative group is on your iPhone.
Answer: It seems the default account under settings->contacts->Default account must be the iCloud account for the new contact to become an "icloud" contact. I cannot find a way to change group for an exisiting contact.
If the default acct as in my case was an exchange account it wont sync to icloud.
Answer: I have an iPhone 5S and logged into icloud.com (via Windows) and couldn't see my updates from my phone. To resolve this, within icloud.com I selected icloud settings from the top right menu and Advanced > Data Security and select Sign out of all browsers. Once I logged back in online and on my phone the updates appeared. Genuis ;-) !!!
Answer: If all of these answers aren't working for you, perhaps the contacts you've been wanting to transfer to your mac aren't in your iCloud account in the first place. https://discussions.apple.com/thread/3515161 this thread fixed my problem, for my contacts were actually stored on the Hotmail-server.
Comment: Welcome to Ask Different!  We're trying to find the best answers and those answers will provide info as to why they're the best. Explain why you think the link you provided will answer the question.  Links can change and become outdated so we prefer the answers to stand alone and to not just be a link.  See [answer] on how to provide a quality answer. - From Review


Old phone continuity tester

Question: An old man I used to work with had a set. Two old handsets with two conductors coming from them. It had a 9v power supply, I believe. We used it to trace existing interlock wires, hundreds in one conduit. Just hook one lead from each phone to a common wire, usually the ground, and try the others till I heard the ol man whistling. How can I make a set of these. Other designs require the base or four conductors. Thx
Answer: You basically want to make a line tracer.  You don't need a phone at the other end, just something that injects a signal.  This is what the old man did manually by whistling.  You can do it yourself by hooking a signal generator to one of the wires at one end, then probing around at the other end to find that wire.
One thing to keep in mind is that the signal will capacitively couple between wires in a bundle, more so the longer the cable is.  To get around this, use a low frequency, like 500 Hz, and have the receiver present a significant load, like 50 Ω.  The receiver can be as simple as a powered PC speaker with 50 Ω accross the input.  There will be a strong difference between the volume you get from the wire that has signal injected on it, and the others that don't.
Comment: We were able to communicate with each other which is what I need since we can't use phones or two way radios.

Old phone continuity tester


How do congressional investigation committees maintain continuity after losing committee members?

Question: Are there congressional rules on how to replace committee members who lose their congressional status? Is there precedent, and what was the impact/effect on the ongoing investigation, and the outcome of the investigation?
Comment: I think I found the rule - essentially there is no specific rule to ensure, and maintain the continuity of the investigation, the winning party makes the call, either to disband the committee or continue on.
Comment: Surely there are rules for filling committee vacancies; that should be fairly common.  The impact on the investigation will be that the new committee member has some catch-up work to do in reviewing the evidence already collected by the committee.  This seems a fairly trivial answer to a fairly trivial question, so I can't help thinking that you have something more substantial in mind.  Can you elaborate?  Why do you think this would pose any noteworthy problems, or what noteworthy impact might be at issue here?
Comment: @phoog The selection of committee members is along party lines, a purely political matter, the name of the game may not change, but the direction and outcome may change following the turnover of members. The catchup is easy, but maintaining consistency in members' will and thoughts is highly questionable. You know well that a highly divided bill is less likely to pass if the advocating party has lost the election, then how about the congressional investigation?
Comment: If you're talking about the committee's continuation into a new Congress, that is, after there's been an election, that's an entirely different matter.  As far as I understand it, the entire membership of each committee has to be reappointed at the beginning of each Congress; of course it makes sense to reappoint incumbent members for the sake of consistency, but it does require affirmative reappointment.  An _ad hoc_ committee such as an investigative committee probably requires reauthorization by the new Congress; if the house changes hands, the committee might well simply cease to exist.
Comment: If you're interested in the January 6th investigation, see https://january6th.house.gov/about.  More generally, the house rules.
Comment: A quick scan of the rules suggests that I'm wrong about select committees automatically requiring reauthorization: https://rules.house.gov/rules-house-representatives
Answer: Q: How do congressional investigation committees maintain continuity after losing committee members?
Standing committees may, and select committees often, conduct investigations.
In the case of the House, the authority for standing committees to conduct investigations in Rule XI 1(b)(1):

Each committee may conduct at any time such investigations and studies as it considers necessary or appropriate in the exercise of its responsibilities under rule X.

In the case of the Senate, investigations by standing committees may be conducted under Rule XXVI 1:

Each [standing] committee may make investigations into any matter within its jurisdiction, ...

Filling vacancies.
For standing committees in both the House and Senate, both committee assignments and vacancies are filled by a resolution (H.Res.xxx or S.Res.xxx, respectively), as a standard practice.
In the case of select committees, the rules are contained in the resolution.
For the House,

H.Res.503 - Establishing the Select Committee to Investigate the January 6th Attack on the United States Capitol.

...
(c) Vacancies.—Any vacancy in the Select Committee shall be filled in the same manner as the original appointment.

H.Res.567 - Providing for the Establishment of the Select Committee on the Events Surrounding the 2012 Terrorist Attack in Benghazi.

...
(c) Any vacancy in the Select Committee shall be filled in the same manner as the original appointment.

For the Senate, the authority to fill vacancies is implied rather than stated,

S.Res.82 - A resolution to establish a Select Committee on POW/MIA Affairs.

The select committee shall be composed of ten members, who shall be evenly divided between the two major political parties and shall be appointed by the President pro tempore of the Senate upon recommendations of the majority and minority leaders of the Senate after consultation with their chairman and ranking minority member. Five of the members appointed under this subsection shall be appointed by the President pro tempore of the Senate upon the recommendation of the majority leader of the Senate and five shall be appointed by the President pro tempore of the Senate upon the recommendation of the minority leader of the Senate.

Q: Is there precedent, and what was the impact/effect on the ongoing investigation, and the outcome of the investigation?
While there may be precedent, I am not aware of one; this is because modern investigative select committees are short-lived and the replacement of vacancies during standing committee investigations are not distinguishable from other replacements.

[I have taken this question out of sequence, because there is an example of how replacement for a vacancy works.]
Q: Are there congressional rules on how to replace committee members who lose their congressional status?
On February 4, 2021, Marjorie Taylor Greene (R-GA 14) was removed from all committee assignments, including Budget and Education and Labor. On February 15, 2021 Trent Kelly was elected to the House Committee on the Budget. On April 14, 2021 Julia Letlow was elected to the House Committee on Education and Labor and the House Committee on Agriculture. Kelley had been on Agriculture, previously.
[Note: The term 'elected' used here means the same as appointed by leadership. It's a Congress thing!]


Direction of friction while walking on ground

Question: Consider a man walking on a rough ground towards the east. If this was the case, the friction should have acted towards the opposite direction, i.e., west. Instead in real life, in the same case, the friction acts in the same direction as that of motion, i.e., east. How?
Comment: The friction of what, on what?
Answer: There are two frictional forces acting. You exert a frictional force on the ground, and the ground exerts an equal and opposite frictional force on you.
The frictional force that the ground exerts on you points east so it accelerates you eastwards. That's why you move east.
The frictional force you apply to the ground points west so in principle it accelerates the whole Earth westwards, though in practice the mass of the Earth is so large that any acceleration you impart to it is immeasurably small.
Answer: I am guessing that you're thinking that the friction by the ground should oppose the motion of the object moving on it, in our case the walking man.
But friction is what exists between surfaces, not objects, and in our case the two surfaces between which friction is acting are the man's feet/footwear and the ground.
Try walking right now (slowly), and observe what your feet are doing as you move forward. When you step forward, you swing your leg ahead and place your foot on the ground, and using it as a pivot you move your body ahead. In this action of moving ahead, you're also pushing the ground behind you(something that you cannot do on a slippery surface).
Therefore, the surface in question that is in contact with the ground actually wants to move backwards, which is obviously counteracted by the friction from the ground as a resistance to the relative motion of the surfaces.
So when moving east, the surfaces of the feet have the tendency of moving west(backwards) when in contact with the ground, which is opposed by the friction from the ground acting towards east, with the help of which we anchor our feet and continue walking.


Should peanut shells be composted?

Question: I have read that one shouldn't compost nuts or peanut butter because of their high oil and fat content. I am wondering if the same thing goes for peanut shells? I have a lot of peanut shells and I hope I can compost with them rather than throw them away.
Answer: Yes, peanut shells are a fine high-carbon addition to your compost pile. Adding peanut shells to your compost will probably tend to dry it out, so make sure you either add water or use enough high-moisture ingredients (e.g. most kitchen scraps or coffee grounds). Also, if you're lacking in high-nitrogen ingredients, then they will take longer to compost.
Answer: Yes, peanut shells can be compostable, but be sure that there is no salt on them. Often peanut shells have been salted, and these should not be added to compost because the salt will stay in the soil and damage plants.
Comment: +1  Like most things, a salted peanut isn't going to harm it (as a few salted potato chips aren't) but don't go adding a whole bag of them!
Comment: You can of course, rinse the salt off first.
Answer: Yes, peanut hulls compost well, but if you have quite a lot, I know from experience they work great as mulch.  I live in "Peanut Country" so peanut hulls are available here and they work great!!
Answer: I have been trying to make a compost with peanut shells. I bought 60 kgs grounded peanut shell and mix it with 500 kg cow manure and 25 kgs ammonium nitrate.I used the ammonium nitrate to make the composting process faster. I covered the mixture with plastic tent to make it hotter. I have mixed them 50 days ago and will wait almost 3 months more. I will test the the manure mixture on tomatos in two groups with peanut and witout peanut mixture. then I will compare the results on leaves color and harvest.
P.S : the inadeuqate cosposted peanut shells can cause fungus. compost the peanut as long as you can

Should peanut shells be composted?


Pulp error +self.path

Question: I am using python to read data from a .xlsm excel file.  I have two files that are nearly identical and are saved in the same directory.  When I give the python program one excel sheet, it correctly reads the data and solves the problem.  However, with the other excel sheet I get the following error.
(I blocked out my name with ####)
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    solve("updated_excel.xlsm")
  File "C:\Documents and Settings\#####\My Documents\GlockNew.py", line 111, in solve
    prob.solve()
  File "C:\Python27\lib\site-packages\pulp-1.5.4-py2.7.egg\pulp\pulp.py", line 1614, in solve
    status = solver.actualSolve(self, **kwargs)
  File "C:\Python27\lib\site-packages\pulp-1.5.4-py2.7.egg\pulp\solvers.py", line 1276, in actualSolve
    return self.solve_CBC(lp, **kwargs)
  File "C:\Python27\lib\site-packages\pulp-1.5.4-py2.7.egg\pulp\solvers.py", line 1343, in solve_CBC
    raise PulpSolverError, "Pulp: Error while executing "+self.path
PulpSolverError: Pulp: Error while executing C:\Python27\lib\site-packages\pulp-1.5.4-py2.7.egg\pulp\solverdir\cbc.exe

I don't know what ""Pulp: Error while executing "+self.path" means, but both files are stored in the same directory, and the problem only appears once I try to solve the problem.  Does anyone have an idea as to what can possible trigger such an error?
EDIT
After further debugging, I have found that the error lies in the solve_CBC method in the COIN_CMD class.  The error occurs here:
if not os.path.exists(tmpSol):
    raise PulpSolverError, "Pulp: Error while executing "+self.path

When I run the solver for both excel sheets, they have the same value for tmpSol: 4528-pulp.sol
However, when I run it for one excel sheet os.path.exists(tmpSol) returns true, and for the other it returns false.  How can that be- tmpSol has the same value both times?
Answer: The name is created using the process id, if you have some sort of batch job that launches both solver applications from one process then they will have the same name.
Answer: I experienced the same issue when launching multiple instances of the LPSolver class. The issue is caused by the following lines of code within the solvers.py file of pulp:
pid = os.getpid()
tmpLp = os.path.join(self.tmpDir, "%d-pulp.lp" % pid)
tmpMps = os.path.join(self.tmpDir, "%d-pulp.mps" % pid)
tmpSol = os.path.join(self.tmpDir, "%d-pulp.sol" % pid)

which appears in every solver. The problem is that these paths are deleted later on, but may coincide for different instances of the LPSolver class (as the variable pid is not unique).
The solution is to get a unique path for each instance of LPSolver, using, for example, the current time. Replacing the above lines by the following four will do the trick.
currentTime = time()
tmpLp = os.path.join(self.tmpDir, "%f3-pulp.lp" % currentTime)
tmpMps = os.path.join(self.tmpDir, "%f3-pulp.mps" % currentTime)
tmpSol = os.path.join(self.tmpDir, "%f3-pulp.sol" % currentTime)

Don't forget to
from time import time

Cheers,
Tim

Pulp error +self.path


Mapping to a JSON method with url-pattern

Question: I'm creating a Spring MVC application that will have a controller with 'RequestMapping'-annotated methods, including a JSON method. It currently has static content that resides in webapps/static, and the app itself resides in webapps/myapp. I assume that Catalina's default servlet is handling the static content, and my *.htm url-pattern in web.xml is returning the request for my JSP page, but I haven't been able to get the JSON method to be called. How do I write the url-pattern in the servlet mapping to do so? Using /* has not worked; it prevents the app from being accessed at all. Is there anything else to be aware of?
Answer: I've learned of the default url-pattern, '/', which appears to be a match for my JSON request.


Turning off HP Folio 9470 touchpad

Question: I am trying to find out if there is a hot key to turn off the touchpad when using an external mouse.  In windows I just double tap in the upper left hand corner and it disables the touchpad.  Makes it nice when typing a long document or using an external mouse.
Answer: You can use Touchpad Indicator to assign a hotkey to enable and disable touchpad.
You can install Touchpad Indicator by downloading this installation package. If there is some dependency issue, you can install python-pyudev as
  sudo apt-get install python-pyudev

Or,
You can install it via ppa as follows.
  sudo add-apt-repository ppa:atareao/atareao
  sudo apt-get update
  sudo apt-get install touchpad-indicator

Turning off HP Folio 9470 touchpad


Installed .pcf fonts not available

Question: I'm trying to install the font from http://font.gohu.eu/ on 12.04.  It recommends the pcf font but when I install it, I do not see it in any applications (gvim, gnome-terminal, gnome-tweak-tool).  I tried the ttf as well but it still didn't work.  I haven't had problems with this font installing before.
Answer: How are you attempting to install it? Did you double click the TTF, then "Install Font"? If so, did it seem to install without issue? Can you find the font in any of the folders where fonts are usually placed? (See "Fonts" on the Ubuntu Wiki). If you can't find the font there, try moving it there manually.
Comment: I double clicked and installed both the pcf and ttf.  There were no errors during the install and the files did appear in ~/.fonts.  I tried doing a fc-cache from the command line and it did parse ~/.fonts but said that no fonts where found there.
Answer: You should have a look at this, it should work with other pcf fonts too.
You'll probably just have to open a Text Editor, put in he following content
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <selectfont>
  <acceptfont>
   <pattern>
    <patelt name="family"><string>Gohufont</string></patelt>
   </pattern>
  </acceptfont>
 </selectfont>
</fontconfig>

save it as .fonts.conf in your home directory and run fc-cache -fv once.
Update: For me, it only worked, when using fc-cache -fv with sudo.

Installed .pcf fonts not available


Open Source libraries for PDF to image conversion

Question:
Possible Duplicate:
Export PDF pages to a series of images in Java

Please suggest some good java libraries which can be used for a PDF file to image conversion.
I tried using PDFBox: http://pdfbox.apache.org/ but after conversion to image most of my text from the pdf file was garbled in the image. It read a 'T' as a 'Y' a 'C' as a '#' and so on.
Following is the code snippet I used for the same:
<code>PDDocument document = null;
document = PDDocument.load( pdfFile );
List  pages = document.getDocumentCatalog().getAllPages();
for( int i=startPage-1; i<endPage && i<pages.size(); i++ )
{
  try
  {
    PDPage page = (PDPage)pages.get( i );
    BufferedImage  image = page.convertToImage();
  }
}
document.close();
</code>
I guess it is some issue that they have with rendering fonts.
In case u think I might have missed something out while using PDFBox please let me know.
Please suggest any other alternatives as well.
I have tried using jPedal: http://www.jpedal.org/ which works out fine but its not free so please suggest about all good alternatives on this.
Answer: Try icePDF


Hard attention loss function

Question: I am referring to paper: Show, Attend and Tell: Neural Image Caption
Generation with Visual Attention (page 4). I wished to know, why we look to maximize the lower bound of the log likelihood probability $log p(y|a)$ and not itself. I agree that we sample images for the $t_{th}$ word stochastically, but I don't get the complete reasoning as to why we do this...
Answer: Because $\log p(y|a) = \log \sum_s p(s|a)p(y|s,a)$ is computationally infeasible to compute. The hard attention attention $s$ is a discrete random variable which can take on $T^L$ values, where $T$ is the number of words and $L$ is the number possible of attention locations. Therefore the sum cannot be realistically computed, and variational lower bound is used instead.
Comment: Thanks for the reply! One more question: Then why do we maximize log p(y|a) for soft attention (in the paper, the authors didn't write that they use the same lower bound technique for soft attention case and have instead showed only the log p(y|a) likelihood to be optimized.)
Comment: @kg__ in the soft attention case the $s$ are a deterministic function of $a$, and not a random variable conditioned on $a$, so there is no need to marginalize it out, so there is no intractable sum.

Hard attention loss function


Can Unity reprogram Touchpad mouse click 2 to a keyboard key?

Question: My laptop touchpad has left button (for mouse click 1), a right button (for mouse click 3). To get mouse click 2 you must simultaneously press the left and right buttons.  Will Unity let me reprogram this action to. say, Alt-Z (or some other key combination)?
Answer: This is probably not suited as a feature for Unity - it's more related to configuring the underlying X11 input devices. I'm not sure how to do it, but I am certain there is some X11 feature that lets you do this, an there probably is no nice GUI for it so I hope you don't mind text config files or scripts :-)
It seems someone on stackoverflow already have solves this problem maybe... https://stackoverflow.com/questions/294177/is-it-possible-to-map-a-key-press-to-simulate-middle-click-in-xwindows


Blender model deforms too much in unreal

Question: Alright so I created a mesh in blender (okay, i threw some crappy sculpt onto the UE manni, and drew over it)
I keep getting 2 problems.
Finger tips just go where ever they want.... Seems weird as they are weighted exactly to that section... And my character pulls his back through himself.
On these photos the left shoulder is set to ONLY be weighted to shoulder. And the right fades out into 1/2 across back. Results arent very different.
I also tried weighting back to the spine_03 that is right there but that REALLY pulled it making it pass the neck and everything.
Can anyone give some insight on how to straighten that out?

My FBX i made in blender is here:
https://drive.google.com/open?id=1-V...wbODXgvo79ds9h
Answer: Going in and setting all the weights to a much smoother rate of change, and removing some from the auto weight option cleaned this up.


Which are main purposes of bipolar transistors?

Question: In school, we learned a lot about transistors but I still don't get its point. I understand gain and amplification of voltage or current or both, but I don't get it how can it be used for example as a switch. I really want to understand transistors because of their widely use. At least someone recommend any good book about transistors.
Comment: Your question is to broad for this site and product recommendations (the book) are off topic. There is a vast amount of information and tutorials available on the web. Do some more study on basic circuits trying to understand how they work and come back with a specific question on a point that requires clarification. Include links and schematics in your question.
Comment: Speaking about switch applications you must know that, in principle, the term "switch" can mean (a) analog switch (like a relais, not possible with BJT`s) or (b) voltage switch (between two fixed voltage levels, high/low).
Comment: @LuKa: Can you edit your post to explain what you _do_ understand about using the transistor as a switch and where you get lost?
Comment: @LvW: about that voltage switch, in school we learned about circuit that works as a switch with transistor and relay, and I never understood purpose of BJT in that circuit. Can you maybe explain?
Comment: As I have mentioned, the bipolar transistor (other than a FET) cannot be used as an "analog switch" (relay). Speaking about swiching applications of BJT`s we mean Hi-Low switches.
Answer:
I don't get it how can it be used for example as a switch

You need to think about the voltage "lost" from collector and emitter when connected to a load: -

Take the magenta curve - base current is 62 uA and, if the collector current was (say) 10 mA the volt drop across collector and emitter is about 200 mV.
You might say "that's not much of a switch" and you'd be somewhat correct. A BJT is an imperfect switch but, if you want to control a load resistor of 1 kohm on a 10 V supply, then using a BJT will allow 9.8 volts (in this example) to be supplied to the load.
So, you could force more base current in and you would get a smaller volt drop for the same load current. Some transistors will allow over 50 mA base current and can control over an amp with a small volt drop. Darlington transistors "lose" about 0.7 volts but can control tens of amps typically.
So, a BJT is imperfect as a closed contact but, it's pretty good as an open contact i.e. it can switch the load off with only the odd micro-amp still flowing. If you can live with 200 mV "lost" then it's a switch!
Maybe this website will help a bit more.
If you really want a better switch then use a MOSFET - good MOSFETs these days are capable of dropping only a few milli-volts with a 10 amp load.


How to turn off url aliases on dev site?

Question: I'm using path auto to automatically generate url aliases. On my dev site it would be convenient to use standard node/123 urls.
Is there a way to do that? Just turning off pathauto and path won't do the trick
Comment: or just set the aliases to include the nid, eg, node/123 aliases to foo/123 and then your mouse overs will give you the nid you are looking for
Comment: unless I am once again missing the point, node/# will work regardless of whether an alias is set
Comment: yes, it will work but I would like to have node/# be used for links on the dev site so I can quickly mouse over the links and see the node ids
Comment: if you are creating them with `l()` you should be able to set the alias option to TRUE, and then the alias won't be looked up and will leave the node/# in place...
Comment: of course, d'oh! this sets up a different code base for your development system unless you have a admin setting / variable you can access to toggle this
Answer: I think the problem is that the <code>{url_alias}</code> still has the aliases in it.
My suggestion would be to take a backup, then delete a few manually from "admin/build/path" (Drupal 6) or "admin/config/search/path" (Drupal 7), and then try the "node/nid" paths for the entries you deleted.  Then, take another backup :) and either delete them via the Delete aliases tab.


Characteristic zero and characteristic $p$ in algebraic geometry

Question: Are there  non-trivial (i.e. excluding concepts that can be defined only for $p>0$) statements in algebraic geometry that hold for all fields of characteristic $p$ for all prime $p$ but are known to be false in characteristic zero?
Comment: You should be more specific to avoid trivial answers, like the "theorem" stating that "not all morphisms are separable".
Comment: I agree this should be made more specific to exclude trivial examples, e.g. "there exist non-smooth Fermat hypersurfacees".
Comment: How about the rationality of the zeta function?
Answer: Here are two examples.
The moduli space of dimension $g$ principally polarized abelian varieties $A_g$ contains complete codimension $g$ subvarieties in any positive characteristic $p$ (for instance, the locus of abelian varieties with no nontrivial $p$-torsion points), but not in characteristic $0$ (by Keel and Sadun arXiv:math/0204229).
The other example is also a resul of Keel (arXiv:math/9901149). It states that a nef and big line bundle $L$ on a projective variety over a field of positive characteristic is semi-ample if and only if its restriction to the exceptional locus (i.e. the union of subvarieties $Z$ such that $L|_Z$ is not big) is semi-ample. This criterion is not true in characteristic $0$.
Comment: what is the policy regarding deleting things? sometimes it makes subsequent comments confusing I reckon.
Comment: @Wilberd Yes it is. In a deleted comment, Artie was wondering whether it was true over any field of positive characteristic or only over $\overline{F}_p$. My comment above was answering this question.
Comment: No : it is true as it stands.  However, over $\overline{F}_p$, it is possible to deduce a statement that is very easy to apply in practice. You need only to check that the restriction of $L$ to the exceptional locus is numerically trivial (because, over $\overline{F}_p$ it implies that it is torsion, hence semi-ample).
Comment: (deleted a mistaken comment)
Comment: @Olivier Is it true as it stands that it is not true?
Comment: Yes, sorry for the mess. I deleted my first comment in an attempt to avoid clutter, but the result was the opposite.
Answer: One other example: in characteristic $p>0$ there exist non trivial embeddings of the affine line $\mathbb{A}^1$ into the affine plane $\mathbb{A}^2$  (i.e. embeddings that are not equal to the composition of $x\mapsto (x,0)$ with an automorphism of $\mathbb{A}^2$). For example,
$x\mapsto (x^{p^2},x^{p^2+p}+x)$
is an embbeding because $k[x^{p^2},x^{p^2+p}+x]=k[x]$ (take $f=x^{p^2}$ and $g=x^{p^2+p}+x$, then $g^p-f^{p+1}=x^p$). It is not trivial because the degree of one component does not divide the other one.
In characteristic zero, there is no non-trivial embedding of $\mathbb{A}^1$ into $\mathbb{A}^2$. This is the famous Abhyankar-Moh theorem (Abhyankar, S.; Moh, T. T., Embeddings of the line in the plane. J. Reine Angew. Math. 276 (1975), 148–166.)
Answer: Perhaps this is an example of the contrapositive of a statement in char 0 that fails in all positive characteristics.  The affine line has nontrivial \'etale covers over every field of positive characteristic, yet it is algebraically simply connected in characteristic $0$.
Comment: In the same spirit: Kedlaya proved in 2004 that over any field $k$ of positive characteristic, any geometrically reduced purely $n$-dimensional projective variety is a finite cover of $\mathbb P^n_k$, étale away from a hyperplane. This is false in characteristic $0$ because the affine space is simply connected.
Comment: In fact, in positive characteristic, any irreducible affine variety of positive dimension has non-trivial étale cover. See http://mathoverflow.net/questions/16047/
Answer: Tamagawa has shown that a smooth curve (of genus $\neq 1$) over $\bar{\mathbb{F}}_p$ is determined by its profinite $\pi_1$ up to finite indeterminacy, that is,  that the map
$$\pi_1: M_{g,n}(\bar{\mathbb{F}}_p )\longrightarrow \mbox{Profinite groups up to isomorphism}$$
is finite-to-one. This is clearly false over, say, $\bar{\mathbb{Q}}$. It's not correct to conclude therefore that there are just fewer curves in characteristic $p$, in some sense. The truth is that  $\pi_1$ simply retains more geometric information.
Answer: Here is a paper by Rachel Pries and Katherine Stevenson that addresses the question:
http://www.math.colostate.edu/~pries/Preprints/11dgroupreportv036.pdf
Full reference: Pries, R. and Stevenson, K. "A survey of Galois theory of curves in characteristic p" , Fields Institute Communications 60 , American Mathematical Society, Providence RI, (2011), 169-191.
I am not well-versed in this area, but I found this paper quite readable. Some of the examples in the paper (particularly the first half of the paper) have been brought up in answers already in this thread.
Answer: The stack $\overline{\mathcal{M}}_{g,n}$ of Deligne-Mumford stable curves and its coarse moduli space $\overline{M}_{g,n}$ are defined over $\mathbb{Z}$. Therefore they are defined over any commutative ring and in any characteristic.
Let $\pi:\mathcal{U}\rightarrow\overline{\mathcal{M}}_{g,n}$ be the universal curve, $\omega_{\pi}$ the relative dualizing sheaf and $\Sigma$ the union of the sections of $\pi$. Then $\mathcal{L}:=\pi_{*}\omega_{\pi}(\Sigma)$ is a line bundle on $\overline{\mathcal{M}}_{g,n}$.
If $p:\overline{\mathcal{M}}_{g,n}\rightarrow\overline{M}_{g,n}$ is the coarse moduli space then $p_{*}\mathcal{L}$ is semi-ample in positive characteristic but this fails in characteristic zero.
See http://arxiv.org/abs/math/9901149.


Is there any way to organize my videos/music files to folders?

Question: I tried to copy many video files to my Windows Phone 8 device in different folders. But, when I open Music + Videos app it is showing all the videos in one list. Is there any way see it in group based upon the folder it is put up. If any other app available to achieve this, that is also fine.
Comment: No, I don't think it's possible - have you tried Playlists? [I commented on a similar question also](http://windowsphone.stackexchange.com/questions/2176/video-folders-moved-from-windows-8-to-windows-phone-8-with-explorer). Basically, the phone reads all files and folder then displays a flat alphabetical jump-list of Artists, Songs, Albums, etc.
Comment: Seems to be a duplicate. Does the other question not answer yours?
Answer: To be able to explain what is happening, allow me to go in to a little bit of background as to how Windows Phone handles media files.
When you drag and drop files from your computer on to the phone, while it may appear that you are creating an identical structure on your phone, there is in fact more processing taking place in the background. When you connect your phone to the computer, it is not mounted as simple external storage. It is instead mounted as an MTP device.
When you move a bunch of files on to the phone, for each file, the phone automatically creates a metadata file in a hidden folder.
When you try to view/play the media files on your phone, the phone actually looks for the metadata files that link to the actual media files. The metadata files have no directory structure and hence you see your media appear as one long list.
Rather than going around messing with any of this, I reckon your best bet is to use Playlists (as suggested by @NeilTurner).
Comment: I think playlist is the only option left for me. But, I don't understand why they are making it so complicated with these metadata and all these stuffs. Ya it is good to show in one list, there is one way to see all your videos in a shot. But, in parallel can't they show up a UI to show the plane folder structure as well. That makes things easy as you copy in files from computer most of the time.
Comment: You can add your feedback here (official Windows Phone forum): http://windowsphone.uservoice.com
Comment: thanks for the feedback link. I just voted for a file manager, that can solve this. :)


Grails data binding with one-to-many relationship - link back to parent is lost

Question: In a Grails 2.2.2 application, I have a one-to-many relationship that looks something like this:
Parent:
class Client {
    ...
    String name
    static hasMany = [modelFieldInstances: ModelFieldInstance]
    ...
}

Child:
class ModelFieldInstance {
    ...
    String name
    String value
    static belongsTo = [client: Client]
    ...
}

I'm trying to create a data importer so that users can import a spreadsheet or csv containing their client records. To do this, I inspected the parameters that grails scaffolding uses when it creates a new Client instance in the save method of the standard scaffolding controller.
The problem is that when I try to create and save a new Client instance with my importer, the child ModelFieldInstances are saved without their reference to the parent Client (the Client and the ModelFieldInstances all get persisted though).
In my importer, I'm doing the data binding like this:
Client client = new Client()
client.modelFieldInstances = ListUtils.lazyList(new ArrayList(), {new ModelFieldInstance()} as org.apache.commons.collections.Factory)
client.properties = properties
...
client.save()

I think the only real difference between how the Grails scaffolding controller works and how my importer works is that in my importer I'm initially setting the modelFieldInstances collection as a LazyList. However, before I added the LazyList assignment the data binding was blowing with an error like this:
Invalid property 'modelFieldInstances[31]' of bean class [com.myapp.Client]: Illegal attempt to get property 'modelFieldInstances' threw exception; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'modelFieldInstances[31]' of bean class [com.myapp.Client]: Cannot get element with index 31 from Set of size 0, accessed using property path 'modelFieldInstances[31]'**

So, I guess the question is, why doesn't the data binding work in my data importer when I can see that it does work in the scaffolding controller for a given properties map.
Answer: As a sort of work around, I implemented a method that iterates over all the items in the modelFieldInstances collection and manually assigns the parent (client) to each one. This seems to work fine, however I'm still unsure as to why grails data binding doesn't do this for me. I wonder if there's some magic happening in GrailsParameterMap...


Is it illegal to sell exploits for my university's course registration?

Question: My university(and many others in my country - South Korea) takes course registration online. The thing is, the competition to get good classes is extreme, and it's on a first come first served basis. Good ones fill up within 1~2 seconds.
There's a javascript console exploit I have found out(for non-IT experts, this is just client side. That is, I am not "hacking" nor doing anything destructive) that allows me to register for all 7~8 classes in less than 1 second. This is basically undetectable from the school's server admin. There would be 0 problems for me using this method personally.
Now the problem is that I want to sell this method. I'm thinking about selling it like a "private hack" that isn't really an illegal hack but an exploit to 15 people for $150 each. It won't be a malware nor any form of software. It will just be some lines of code for people to put in chrome's console. This will most definitely stir up the hornet's nest, and it will probably be on the radar of my school.
Would there be a way for my university to prosecute me or penalize me for this?
Comment: "... nor any form of software. It will just be some lines of code for people to put in chrome's console." This is definitely software. poorly packaged perhaps, but software.
Answer: I think that you are misunderstanding the definition of "hacking" under South Korean law:

According to the legal provisions of South Korea, hacking means an act that unauthorized or authorized people use to abuse their authority to break into an information network by using an information processing device such as a computer. Any person that violates this could be sentenced to less than three years' imprisonment or a fine of 30 million won or less.

The fact that your code is purely client side is irrelevant - you are abusing your authority (given by the web browser) to break into an information network - the fact that you are adding information rather than stealing it is irrelevant.
I don't know if the university can prosecute or penalize you for this but the government sure can.
Comment: But note that part you quotes says "to break into". In this case he isn't breaking into anything. If I understand correctly, he's just using automated methods to speed up the registration process, gaining an advantage over everyone else. (PS: I didn't downvote).
Comment: @reed he put data in and got data out in an unauthorised way - that's "breaking in"
Comment: Well, I disagree. It sounds like he isn't gaining access to any protected data, he's just registering for courses using tricks to be faster. The process seems similar to cheating in a game, IMO.
Comment: What he is doing is both unauthorised and and an abuse of the authority he has @reed


Where do phone numbers belong in a database model?

Question: Given a schema for a DVD rental store, should customers' phone numbers belong to the addresses table, or the users table, and why? Are there any benefits associated with one approach or the other?
Comment: "traditional" compared to what? Also, this question is impossible to answer without an actual schema. And in the real world, a land line is associated with an address, but a mobile phone is associated with a user.
Comment: Concur with Greg: depends on the actual context.
Comment: @Gred and @Mitch, I did my best to clarify the question a little bit. The schema is for a web application that handles DVD rentals. Customers addresses and other personal details are stored in the database. The service is by mail.
Answer: Why do you even have an addresses table (unless you want more than one address for a given customer)?
You primary "client" is a customer. You don't rent DVDs to an address, you rent them to a person. You can't take a block of land to court when the occupant runs off with your prized "Free Willy" collectors edition trilogy.
In a world where a person only lived at one place, the address would be part of the customer table (and so would the phone in a one-phone-per-customer scenario).
If you want multiple addresses, that's fine, have a separate addresses table tying those addresses back to the customer.
But you should probably also have a similar setup for phones. Either allow up to N phone numbers per customer (with N columns) in the customers table, or (much better) have a separate phones table allowing any number of phone numbers per customer.
Something like:
customers:
    cust_id
    cust_stuff
addresses:
    cust_id references customers(cust_id)
    addr_seq_num
    addr_stuff
phones:
    cust_id references customers(cust_id)
    phon_seq_num
    phon_stuff

Answer: There's no one correct answer to this, except to say "it depends".
It really depends on what you're modelling with your database schema.  Does a phone number logically belong to a user, or an address that could potentially be shared by multiple users?
Example - a mobile phone number might be tied to a particular person, and so be part of the users table.  A land-line number might be tied to a particular location or residence, and so be part of the address.
Comment: @paxdiablo - well that depends on whether you classify "that depends" as an answer, or a vague equivocation  ;-)
Answer: Basic cases of information modeling :
Case A.  Each customer can have more than one phone number.
In this case, phone number belongs in a separate table.
Case A1. It is not the case that a customer is required to have a phone number.  i.e. the "relationship" is 1-1 to 0-n (i.e. assuming all phone number must always "be for" some customer).  Nothing to do.
Case A2. It is the case that each customer is indeed required to have a phone number.  You can model this as a relationship that is 1-1 to 1-n, but the "1" of the 1-n part is very hard to enforce in SQL systems (and in the cheapest of them, probably just impossible).  That does not mean that you shouldn't be documenting the business rule properly as it is.
Case B.  Each customer has AT MOST one phone number.
Case B1.  Each customer is required to have a phone number.  This means that each customer always has exactly one phone number.  Phone number is best put in the customer table.  (Note that "to have a phone number" means "to have a phone number THAT IS KNOWN TO THE STORE in question !)
Case B2.  It is not required for a customer to have a phone number.  In formal relational theory, it is required that you define a separate table which will hold only the known phone numbers.  In informal modeling techniques such as ER and UML, you can model this as an "optional attribute".  In SQL systems, many would define a nullable attribute for this.
As for "phone numbers 'belonging' to addresses" : is there any kind of "connection" between phone numbers and addresses that is relevant to your business ?  I mean, let's say some customer has two addresses and two phone numbers.  Is it important to know which of those two phone numbers belongs to which one of those two addresses ?  What address would a cellphone number 'belong to' ?
Answer: Just an assumption about your site/app, but usually I'd say "Addresses", because user information tends to be info that you pull out frequently to run the site (ID, username, visits etc) whereas phone number may not be?
Answer: What do you mean by "traditional?" Since a user can have an arbitrarily large number of contact phone numbers (home, work, personal mobile, work mobile, fax, etc.), it seems like there should be a separate phone numbers table, each row of which includes a number and a value that says what type of number it is.
Answer: Contact information is notoriously difficult to model in a relational schema. In order to keep your sanity, I would advise that you make a minimum number of assuptions with respect to phone numbers. Allowing multiple phone numbers for one customer/account is good; beyond that it's hard to apply rules to phone numbers.
There is one well known exception: many pizza delivery shops use phone numbers as primary keys for customers. This works because in general there is one phone associated with the place to which one delivers pizza. On the other hand, many people no longer have land lines, so perhaps even that system is breaking down. In any case, I don't think this applies to DVD rental.
Answer: More than one customer may have the same phone number: perhaps multiple people from the same building buy from you.
What happens when you update the phone number for one customer; should it update that number for the other people that supposedly share that number?

Yes if the address for both parties is still the same (but that might actually break some privacy laws).
No if there are now two different addresses.


How to create partitions for using Linux from Scratch

Question: I am creating my OS using Linux from Scratch. I have installed Puppy Linux on my current hard disk (A). I want to create LFS on second drive (B). Can someone brief me a little on how partitioning has to be done as I am not completely able to understand the manual. I am a little confused as many types of partitions have been mentioned there. Do I have to create partitions mentioned in article 2.4.1 (root,swap and grub bios) or those mentioned in 126.96.36.199 (/boot, /home, /usr, /tmp and /usr/src) or both.
Comment: Hello and welcome to the U&L stack exchange site! Please review the [Help Center](https://unix.stackexchange.com/help) to get information on how to best post to this site. To get to your question, [please edit it to include additional context.](https://unix.stackexchange.com/posts/482765/edit)  What do you mean when you say you are confused? What step specifically are you having an issue with?
Comment: It is not clear what you are saying about your current state; Are you saying "I have installed another Gnu/Linux on to my hard-disk, now I am trying to install Linux from Scratch as a 2nd Gnu/Linux."
Answer: /
The root directory is the top of the hierarchy, the point where the primary filesystem is mounted and from which all other filesystems stem. All files and directories appear under the root directory /, even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system. Therefore, certain directories under / are not candidates for separate partitions.
The / partition or root partition is necessary and it is the most important. The other partitions can be replaced by it.
Warning: Directories essential for booting (except for /boot) must be on the same partition as / or mounted in early userspace by the initramfs.
/boot
The /boot directory contains the kernel and ramdisk images as well as the bootloader configuration file and bootloader stages. It also stores data that is used before the kernel begins executing user-space programs. /boot is not required for normal system operation, but only during boot and kernel upgrades (when regenerating the initial ramdisk).
A separate /boot partition is only needed if your boot loader cannot access your root filesystem. For example, if the boot loader does not have a filesystem driver for it, or if / is on software RAID, a encrypted volume or a LVM volume.
If booting using UEFI boot loaders that do not have drivers for other file systems it is recommended to mount EFI system partition to /boot.
A suggested size for /boot is 200 MiB unless you are using EFI system partition as /boot, in which case 550 MiB is recommended.
/home
The /home directory contains user-specific configuration files, caches, application data and media files.
Separating out /home allows / to be re-partitioned separately.
Swap
A swap partition provides memory that can be used as virtual RAM. A swap file should be considered too, as they do not have any performance overhead compared to a partition but are much easier to resize as needed. A swap partition can potentially be shared between operating systems, but not if hibernation is used.
For a detailed explanation of partitioning look here:
https://wiki.archlinux.org/index.php/Partitioning
Answer: It can be all the same device, or separate.
You can put the new OS into just one partition: no need for /boot (in the old days PCs could not boot to large partitions, so one would need a small partition for boot). Other partitions are for experts only (do it if you have a reason).
You may want a separate partition for /home, this separates the OS for your files. This makes upgrading to a new OS easier, as you can keep the /home partition.
Consider also
Consider installing into Virtual-box, it slower for gaming (you won't notice much for other use cases). However is is much easier as you can not break your current OS and you can run both OSs at the same time.


Can I key in the amount I want a layer to be moved in Photoshop?

Question: I know I'm able to Cmd/Ctrl+T a layer in Photoshop CC and drag the layer and it will say how many pixels it's moved in a specific direction. But is there a way to just type the pixel distance into a directional moving area, similar to the behavior in Sketch?
Comment: Hi Colin, welcome to GDSE and thanks for your question. If you want to know more about the site, please see the [help] or ping one of us in the [chat] once your reputation is sufficient (20). Keep contributing and enjoy the site!
Answer:
Be sure to have Window > Options ticked;
Select your layer;
Hit Cmd/ Ctrl+T ot choose Edit > Free Transform;
Enter your desired coordinates into the X and Y fields in the Option bar.

Note that you can enter the specific coordinates of the reference point, the highlighted square in the diagram to the far left. You can change the reference point by clicking one of the other 8 squares.
Also note that you can do basic math in these fields. So if you want to move the layer by, say, 80 pixels, you can just type +80 px after the existing value. You can even key in other measurements and Photoshop will convert, like 233px + 2". You can use +, -, * and / for addition, subtraction, multiplication and division, respectively.


Half screen in android whatsapp camera while scanning QR code

Question: I have still the same problem, my internet is working perfectly. I use idea 3g network for Xperia U running on Android 4.0.4. I cannot scan the barcode because of whatsapp camera is open in 1/4 of the screen.
Answer: I had the same problem, but as mentioned here, basically You just have to move the phone a little to the left or bottom (depending on how you're scanning the code - portrait or landscape).
Hope it works for you too.
Edit: by the way, I have the same smartphone.
Edit 2: I could not make a video because the screen looks completely black, instead of 3/4 of it ¬¬ (ironically, taking a screenshot of the desktop shows 100% of the screen xD). Anyway, what I do is this:

Open whatsapp and go to the Whatsapp Web option.
On portrait mode (vertically), center the QR code on the screen (the 1/4 that you see). The idea is to center it like You would without 3/4 of black screen ¬¬.
Move the phone to the left until I see only half of the squares on the top left and top right corners of the QR code. That's when the code gets scanned.

Hope it helps :)
Comment: I have done that too but still i have got  the same problem. Can you make some small video on that??
Comment: @HarshitChampaneri, were you able to solve the problem? I've edited my answer (in case you didn't see it).


Attach an already existing article(or even a solution) to a case in Salesforce

Question: During the process of closing an open case, instead of creating a new article and attaching it to a case. I want to attach an already existing article/or solution. I went through the http://help.salesforce.com/HTViewHelpDoc?id=console2_find_articles.htm&language=en_US link. But I am not getting options to attach an article to a Case by searching on it.
Answer: When you look at a case, you should be able to see a Solutions section (subject to page layout for the case - if you don't see it, you will need to add it to the page layout for the case).
The solutions section has a "View Suggested Solutions" button which tries to match the case contents up with an existing solution. It also has a search box to allow you to search for keywords in existing solutions, which is more commonly how we use it. This provides a list of solutions, and clicking Select at the left of the appropriate solution will associate it with the case.


almost everywhere Vs. almost sure

Question: I'm reading a book about measure theory and probability (first chapter of Durret's  Probability book), and it's starting to switch between the terms "a.e." and "a.s." in different contexts. I'm becoming confused about their meanings. What's the difference between almost everywhere and almost sure?
Comment: a.e. is used for general measure spaces, while a.s. is used for probabilistic spaces. There is no important difference between both concepts (for example, measurable functions are named random variables when the measure space is a probabilistic space).
Comment: a.e. can be used a.e. This in contrast with a.s. which is only used in the context of probability measures. In principle you could use a.e. there too, but a.s. a.e. is replaced there by a.s.
Answer: In a probability space (equipped with a probability $P$), we say that an event $\omega$ occurs almost surely if $P(\omega)=1$. On the other hand, on a measure space equipped with a measure $\mu$, we say that a property $\mathcal{P}$ is satisfied almost everywhere if the set where $\mathcal{P}$ is not satisfied has measure zero. Note that "a.s." is equivalent to "a.e." in probability spaces, since if $\omega$ occurs almost surely, then the probability that $\omega$ does not occur is zero. However, in the case of general measure spaces $X$ we cannot say that a property is satisfied almost everywhere if it is satisfied in a set of measure $\mu(X)$ (which would correspond to an event having probability $1$), since in many cases this measure is infinite. This is why in the case of measure spaces we formulate the definition of "almost everywhere" in terms of complements of sets.
Comment: $\{x: x \in (-\infty, 0)\cup (1, +\infty)\}$ is a.s. in $\mathbb{R}$ but not a.e. in $\mathbb{R}$, $\mathbb{R}$ is equipped with Borel sets and Lebesgue measure. Is this right?
Answer: When we say that something happens "almost everywhere", we mean to say that:

This something can happen or fail to happen in any point in a given measure space; and
The set of points in which it fails to happen is a set of measure zero.

Notice that there's no notion of probability when talking about "almost everywhere".
Now, when we say that something happens "almost surely", we mean to say that:

This something is the result of a random experiment. It can happen or fail to happen, and the result of this experiment (success ofr failure) is a random variable; and
The probability of this something failing to happen is zero.
Answer: From Wiki
Almost surely
In probability theory, one says that an event happens almost surely (sometimes abbreviated as a.s.) if it happens with probability one. In other words, the set of possible exceptions may be non-empty, but it has probability.
this means almost surely comes from probability trials (stochastic trials),
From Wolfram mathworld
Almost Everywhere
A property of X is said to hold almost everywhere if the set of points in X where this property fails is contained in a set that has measure zero.
From this book
<code>"Essentials of Probability Theory for Statisticians"
</code>
Par Michael A. Proschan,Pamela A. Shaw
page 102
Almost surely  for random variable, (probability)
Almost everywhere for the sequance of functions, (measure)

almost everywhere Vs. almost sure


While using DC 12V power supply, if I connect only positive line to my electronic board and dont connect negative, what actually happens?

Question: While using dc 12 power supply, If i connect only positive line to my electronic board and do not connect negative ,what actually happens ?
Answer: Nothing. You need a closed circuit with a voltage difference for electrical current to flow.
Comment: It's amazing how similar are the answer and I swear I didn't copy!
Answer: Whilst I agree with the other answers, I will point-out one exception. If your electronic board has outputs (or inputs) which are connected to another board which is connected to the negative terminal of your power supply, you might damage your electronic board. This is because current can find a path from the power supply positive to the negative terminal via the signal paths which were not intended to carry supply current.

EDIT
I will add one more note of caution. When I first learned the fact that electricity required a closed path to flow, I figured that I could unwire a 240V mains plug without switching it off first.  I thought "If I only touch one terminal no current will flow, right?".
Wrong. I was young and thought I was clever.
I can still remember my sense of disbelief as I was thrown across the room. I had of course failed to understand that the human body, and the ground on which it stands will also conduct current, especially where high voltages are present.
Comment: Oscilloscope probes might create another path that closes the supply circuit, given both the supply has an output connected to protective earth (PE) and the scope is a class I type of equipment. Nasty effects may happen. (Analogy, stolen from NPR's car talk, www.cartalk.com: If you need a long jump start cable and have only one pair of cables, you can connect both cables together, connect both batteries' + terminals with the extended cable and park the cars so that the bumpers touch and create the - connection. Works with old cars only because you need metal bumpers.)
Comment: I think that the OP is far from using instruments and/or multiple boards :)
Comment: @zebonaut - I have blown-up line drivers in the past by connecting a 'scope probe after my power negative had fallen off :(
Comment: You've really traveled across a room without touching the ground? :D
Comment: @clabacchio - Oh yes :{}
Answer: "The sound of one hand clapping".
This is usually intended as a joke answer when given BUT in this case there is some useful analogy.
Ask yourself: If you clap your hands together but only use one hand, what actually happens?
___-
"Not connecting" one lead is the same as having a switch in that lead.
Ask yourself:  If you have a circuit with a switch in the circuit and you turn off the switch (create an open circuit) what actually happens?
Answer: Charge is conserved. It cannot appear or disappear, which is why there can be no current in a disconnected wire. There will still be a 12 V voltage drop over the source, but since there is no current, it will not supply any power to the circuit. It is equivalent to hooking up 0 V source to the circuit, obviously doing nothing, and a -12 V terminal at the other end, which is disconnected, therefore also doing nothing.
Comment: If one touches an object which has a negative charge to one end of a copper wire whose other end is disconnected, some electrons will flow through all parts of the wire except the very end (more electrons will flow through the part near the charge source).  The number of electrons which will flow into the wire is tiny compared to the number that could flow through the wire continually if there were a closed circuit, but that doesn't mean that most of the wire wouldn't, briefly, have a small amount of current flowing through it.
Comment: Absolutely right. Moreover, even after the negative charge has redistributed itself, there will be still be microscopic currents everywhere in the material as charged particles are kept in motion by a non-zero thermal energy. We could go even deeper and discuss these motions based on quantum physics. That would hardly be circuit level anymore though.


Kali install no operating system issue

Question: I was wanting to get into Kali Linux but after installing it on my empty laptop it says there is no operating system after rebooting. I used a USB (used rufus) to install. Any help would be great!
Answer: I have figured it out. While trying to use the boot repair tool I found a folder in the UEFI boot order called EFI with GRUB in it. It now boots into Kali

Kali install no operating system issue


What is the average size of an HTTP request/response header?

Question: I am working with an embedded platform that has 16MB of RAM only. And I need to deep packet filter HTTP streams. To prevent a Denial of Service attack on the device I'd like some statistical averages regarding HTTP stream sizes, specifically the HTTP header in particular.
Answer: From Google's SPDY research project whitepaper

Uncompressed request and response headers. Request headers today vary in size from ~200 bytes to over 2KB.  As applications use more cookies and user agents expand features, typical header sizes of 700-800 bytes is common.
Answer: The HTTP HEAD response from www.google.com is 823 bytes, as checked just now. This is without any authentication. About half of that is the Set-Cookie header. An easy way to check is the curl command.
Answer: I don't have any statistics to back this up (what does it mean to take a statistical average of HTTP header sizes? average over what?), but from anecdotal experience a typical HTTP header is 0.5KB and might go up to 1K or 2K (depending on cookie size, etc.). You could theoretically get HTTP headers up to 4K or 8K but that is fairly rare.
Answer: The size might vary based on what is presented by the web application, also we need to consider that a 200KB web page is not likely to be a solid 200KB. More likely it is 20KB of HTML, 30KB of Javascript/CSS and 150KB in 10 x 15KB images for a total of 12 requests perhaps. So the average request/response pair would NOT be 200KB but rather 17KB.
You welcome to check this tool for a basic idea : http://smallseotools.com/website-page-size-checker/


Firewall blocking SSH/SFTP connections. How to cheat it?

Question: Hi folks (sorry for the bad english)
I'm a college student, and I live in the student's house of my university.
I study computer science, and there we have the right to a space in a nfs server to store some files. This server assembles folders via an LDAP authentication in an ssh/sftp server that has external access, that is, I can access my stuff out of unviversity by a terminal or at Nautilus (using sftp).
Anyway, the only problem is that the network managers that control the student's house network blocked in firewall the port to ssh/sftp (22, I believe), and I just cannot access my files from the house. I have sent a few emails requesting the release of the port for this purpose. But always they say they will forward my request, lalalala spade and nothing happens, everything ends in feijoada. (kidding)
I'm Debian user for already some time (3 years :D) and I have this question for you guys: what alternatives I have to circumvent this lock?
Pointing out that:
1. I dont have another internet acess point to create a VPN;
2. I have no money to pay a third-party VPN (i'm a student, lol)
3. It's been so long that this disregard occurs, causing problems to my graduation, that I already want to break the blockade to play Dota 2 xD ( I need to relax too :) )
What can I do?
Answer: Can you get someone in the CS faculty to run an ssh server on port 80 or port 443 for you?  If so, you could connect via that.
Port 80 may be blocked or transparently proxied by your college gateway, but port 443 probably won't be (as that would interfere with https connections to banks or whatever)


send a transaction in blockchain

Question: When a transaction is transmitted on the blockchain, where does it go exactly?
where is the transaction pool, where is it saved?
How do the miners know that a new transaction is launched on the blockchain network?
Cordially
Answer:
When a transaction is transmitted on the blockchain, where does it go exactly?

The pending transactions reside in the txpool of Ethereum, you can browse it here: https://etherscan.io/txsPending
Miners monitor the txpool for new transactions to validate, usually opting to validate transactions with the higher gas prices compared to lower gas prices.
Comment: the other node of ethereum have also  access  to the memool because it 's public ??
Comment: The transaction pool data is public information, yes.
Comment: @KhYa I adjusted my use of the word "mempool" to "txpool" or "transaction pool" as it seems like more appropriate terminology.
Answer: When you create a transaction this means that you either created a contract or sending ether to some other EOA or interacting with a pre-existing contract.
The transaction you send should contain some important properties/features such as to what address, gas limit, etc these data are available here.
As a matter of fact, your wallet will sign this contract using cryptographic rules outlined on the Ethereum yellow paper. Then, only the RLP-encode of your transaction is transmitted to one of the nodes on the Ethereum blockchain. Accordingly the RLP-encoded transaction will be transmitted between different nodes (Ethereum clients) on the network. It will be stored on the mempool of each node, where it depends on the node administrator who will priortise your transaction depending on the gas you are willing to pay. Then, depending on the miner's luck in producing the nonce of the block, he will receive an ether if he was able to record your transaction on the Ethereum decentralized database.
The transaction you see in the pending transaction pool is accessible to all nodes but some nodes get these transactions before other nodes and hence they start working on finding the nonce of the block before other nodes. These nodes save these pending transactions on their localized mempool (memory pool)
I suggest you read the Mastering Ethereum book to get more guidance as your question does not have a straight forward answer.

send a transaction in blockchain


Can I install a new hob, or will I need a larger circuit?

Question: I want to swap a ceramic hob for another model.
My current set is: oven and a hob rated at 2075+6000=8075W in total ,they go through a 32Amp Circuit breaker, the oven is plugged to the wall, the hob is hard wired.
The new hob is 6500W, 2075+6500=8575W this should be fine considering circuit diversity. Is this a straight job (wire the new hob) or should I get an electrician to actually upgrade the circuit breaker?
Comment: 8575 watts at 220 volts is 38.9 amperes. More than a 32 amp breaker.
Comment: Not familiar with foreign codes, but the US NEC requires (in a footnote to a table, no less) that the amperage ratings of the hob and oven be summed and used as the branch-circuit load for the case where a single hob and up to 2 ovens are tapped from a single branch circuit.
Answer: Straight up. If you only work on the cooktop and do not go into the wall circuits, fair game.
Comment: Ta, I can't up-vote since I'm not registered, but.. Up-vote


Why is deconvolution used in telescopes, CT scans and seismographs?

Question: Can you explain to someone with no mathematical background why is deconvolution used in telescopes, CT scans and seismographs? How do you explain that the same technique can be used for different things. The distortions in telescopes, CT scans and seismographs are all different from each other.
Answer: As long as the "distortion" is caused by a linear system, its effect can be modeled by a convolution operation with some "filter". The filter is different for different applications and perhaps even different scenarios and is usually measured / estimated before the deconvolution operation.
The deconvolution itself attempts to recover the original signal given the measured output which is the convolution of a signal with a filter (essentially the signal was filtered and we use the result to try and recover the original signal before filtering).


Would a place of business be gifted along with the territory it's in?

Question: So early in my chronicle I mentioned that a certain local bar (which is a 90% outside bar and very dog friendly) is a werewolf hangout. When the group decided they were going to all play werewolf (instead of the crazy multi game we were playing) they also decided that they had been gifted said bar when they got the territory. None of the players have taken any dots in resources, or anything else. Is there anything in the books that would suggest this level of gift with territory?
Answer: In the words of my current Storyteller, running a WtF game... "Hahaha! No."
To elaborate, there are circumstances that would allow someone to own said bar, but most of those circumstances would require spending merit dots or something along those lines at the very least.  One possible circumstance is having it granted due to connections, but again that should be reflected in some sort of dot purchase somewhere or at the very least with some heavy RP.   Even if the People who had the territory previously (assuming there were Werewolves in charge of it prior to your players obtaining it) did have some sort of influence or even ownership over the bar, it should not be granted to the players from the get-go without some sort of investment.  If say the bar's owner has some sort of agreement with the People, then this agreement should be reforged via RP early on.  If the players are desiring direct ownership over the bar, they need to purchase it off the last owner or have some way of owning it reflected on their character sheets.
Even the local spirits might take severe offense to a pack of Uratha running the bar.  They have made it their home long before these mangy mutts did, why should they let them stay?  Even if they do earn the ownership of the bar through point purchases or through roleplay, make them earn the right to be there with the Spirits.  After all, it's the task of the Forsaken to parlay with or dominate Spirits in an effort to maintain the balance.
Should the players get too wrapped up in owning this bar (whether or not they come up with a way to reflect it on their collective character sheets), there are many people and creatures that might not agree with this.  To quote my Storyteller again, "I take your nice things!"  Even for casual players who are not interested in the dark and horrifying world the World of Darkness presents, a good lesson to teach them is that the World of Darkness is NOT a nice place.  You CAN die, and in fact, the mood of a Werewolf game is that you WILL die.  When a wolf gets old and slow (or just plain stupid or unlucky), and can no longer protect its territory and provide for its pack, it will die.  It is not a question of 'if', it is a question of 'when'.  Uratha who become too attached to something are more likely to lose it, be it their lives, their friends, their family, their home, their hangout, their possessions, or even their packmates.  The World of Darkness is not kind, and everyone is out to kill the People.
A side note regarding overriding players and exerting "Rule 0" in a game.  It's much more entertaining to let them think they've won and later take their nice things.  Plus it makes them re-evaluate how important the nice things were to them, and potentially teach them a valuable lesson about protecting their nice things or not getting too attached to them.   They might also (if they're smart) realize it's the GM/Storyteller's subtle way of saying "No".  In the end, if it isn't reflected on the sheet, you don't even have to feel guilty about taking it away from them.  Employing Rule 0 should really only be reserved for when it has reached the point where no amount of in-game maneuvering will get the point across.
Comment: hmm... gives me an idea, yeah they gave it to you, because it's burning money, and about to be foreclosed on, enjoy your debt... they're already going to have to deal with spirit problems, because I made them run off to New Mexico. So things weren't gonna be pretty when they got back.
Answer: The Territories book exactly answers your question.
You can "purchase" area advantages with merit dots. These territory advantages then offer bonuses to skills or discounts to purchasing skills, like a gym giving a 1xp discount to purchasing dots in strength, brawl or weaponry.
Answer: No,
just as the don't own the Hairdresser or the corner store in the territory.
However, if the players want to play a game about owning a bar,
and you are happy to tell a story about a pack of werewolves who own a bar,
then go for it.
Give them a bar, they own it. Why not?
You don't need mechanics to signify owning a business
You might like to tie there resource merit dots to the current success of the bar.
 Eg if it gets shut down for a week they might be temporarily reduced to 0 resources
Owning a bar throws up tons of sweet plot hooks.
Everything from the mob wants protection money,
to the cops finding a patron dead outside,
to a wandering Uratha heard about the place and decided to drop in.
What ever you decide, you should make it really clear with the players,
As soon as possible (idealy before they finish char-genning),
While the WoD might not be a nice place,
your game table is.
Work with your players, don't let them labour under a misapprehension that won't be fun for anyone.
As an aside, if all your players have 0 dots of resources,
you are in for a interesting time, whether or not they own a bar.
You might want to do something about that, because if you don't the characters are very poor. (Though werewolves can handle that better than most.)
See this question for what people can do with 0 resources.
You might wish to either encourage them to redistribute there starting dots,
or give them each a dot of resources for free (Its not unfair if you give it to everyone.)
Or let them be super poor,
but again, make sure they understand this.
They can be super poor bar-owners, if everyone thinks that would be fun.
Infact reality tells us that most new bar owners go broke very quickly.
Answer: Probably Not
I'm not a huge WoD gamer, and my primary experience is with VtM, but the way that territory works doesn't imply that you literally own everything in the territory. Even a hangout isn't necessarily "yours". You might have some say over who gets to go there (for instance, vampires consider territory to be theirs and claim feeding rights on its inhabitants), at least within the werewolf community, but you'd be unlikely to get the literal ownership of any of the properties, even if they are owned by a community member.
If nothing else, you're the GM (right?), and you should feel comfortable in your prerogative to say "Actually, they didn't give you the bar."–this is one of those classic cases where players decide to believe something without any justification, and you can call them out on it.
Comment: Oh, and even if the rules suggest that they might get it, feel free to override them. You're the final arbitrator on this subject, and if the players jump to conclusions before the judgment is in that's too bad for them.
Comment: yeah I know I get final say, I'm just trying to find out if anything might suggest this. I'm pretty sure not.
Comment: At least if it's the same as in Vampire the Masquerade, then no. Though some of that is dependent on the masquerade, the fact of the matter is that the supernatural community and the business community don't really interact, and it's generally in the best interest of both parties for this not to happen: supernatural drama tends to get in the way of business.