This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculates the monthly savings required to accumulate the retirement corpus. | |
* @param {number} currentAge - The current age. | |
* @param {number} retirementAge - The desired retirement age. | |
* @param {number} lifeExpectancy - The expected life expectancy. | |
* @param {number} monthlyIncome - The monthly income required in retirement. | |
* @param {number} inflationRate - The expected inflation rate. | |
* @param {number} preRetirementReturn - The expected return on investment before retirement. | |
* @param {number} postRetirementReturn - The expected return on investment after retirement. | |
* @param {boolean} hasExistingSavings - Whether or not you have any existing savings or investment for retirement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculates the future value of an investment based on periodic, constant payments and a constant interest rate. | |
* @param {number} rate - The interest rate per period. | |
* @param {number} nper - The total number of payment periods. | |
* @param {number} pv - The present value, or the lump-sum amount that a series of future payments is worth now. | |
* @returns {number} The future value of the investment. | |
*/ | |
const FV = (rate, nper, pv) => { | |
const decimalRate = rate / 100; // Convert the percentage rate to a decimal. | |
const futureValue = -pv * (Math.pow((1 + decimalRate), nper)); // Calculate the future value using the formula. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async registerSettings(settings: Record<string, SettingItem>) { | |
const settingsPromises = []; | |
for (const [key, setting] of Object.entries(settings)) { | |
const internalSettingItem: InternalSettingItem = { | |
key: key, | |
value: setting.value, | |
type: setting.type, | |
public: setting.public, | |
label: () => setting.label, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ShowSingleCountry = ({ country }) => { | |
const [weather, setWeather] = useState({}); | |
useEffect(() => { | |
const api_url = `http://api.weatherstack.com/current?access_key=${process.env.REACT_APP_W_API_KEY}&query=${country.name}`; | |
const fetchWeather = async () => { | |
const res = await Axios.get(api_url); | |
setWeather(res.data); | |
}; | |
fetchWeather(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.env | |
node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paste This Code Into Your Css Template....... | |
@import url(http://networking.yu.tl/files/jjcmsv-2015.css); | |
@import url(http://flambon.xtgem.com/fmb/simple_v1-5.css); | |