Latest Posts

From wisdom

Spirituality 5 0

From Hindu wisdom - The first law says: " The people you meet are the right people ". - In other words, no one enters our lives by chance; all the people we interact with are with us for a reason, to help us learn the life lessons that...

If a 3D printer leaves gaps in the plastic that it deposits, it's usually thought of as an unwanted flaw. Now, the process has been harnessed to quickly and cheaply produce pliable polymer textiles. ...

How to change key in JS object

JavaScript - jQuery - Ajax 16 1

To change a key into a JavaScript object, you need to clone the value with the new key, and then you delete the old key in the object. const order = { wine : 100, vodka : 200, beer : 300, whisky : "not in stock"...

Scientists at Australia’s RMIT have developed a tiny sponge with big potential, and say the micron-sized material can be used to convert discarded cooking oil into biodiesel in a very cost-effective manner. And the catalyst has the ability to also turn other waste products into valuable building blocks for a...

Building with mud may bring to mind a simple shelter, but Anandaloy, by German architect Anna Heringer, shows that doesn't necessarily have to be the case. The project showcases the possibilities of building with mud and bamboo, and provides an impressive new therapy center and manufacturing workshop in rural Bangladesh....

It's because the dot (.) in regex is any character, while \. is literal dot. Try the following code: $matches = null; $input = '123456...'; preg_match('/(?\d+)(?\.+)/', $input, $matches); $numbers = $matches['nums']; $periods = $matches['periods']; $nums_only = preg_replace('/[^\d]/', '', $input);...

Invert key value in js object

JavaScript - jQuery - Ajax 14 1

You have to loop the array and for each item in the array check if an array for that value exists in the accumulator or not before adding it: const data = { "first":["de"], "second":["ab","de"], "third":["de"] } let result = Object.entries(data).reduce((acc, [key, arr]) => { // for each...

A promising new study, published in the journal Nature Immunology, is describing the discovery of a novel kind of immune cell with the ability to not only prevent the progressive neurological degeneration associated with diseases such as multiple sclerosis and ALS, but which may even regenerate and repair damaged cells. ...

Water has been discovered on the sunlit surface of the moon, NASA announced, an important revelation that indicates water may be distributed across the lunar surface – and not just limited to its cold, shadowed places such as the poles. ...

Reverse the characters added in text field

JavaScript - jQuery - Ajax 12 1

Try use and study the following code: Button function backwards(inp, rev) { const backwardsInput = inp.value.split('').reverse().join(''); rev.textContent = backwardsInput; }const bkinp = document.getElementById('backwards-input'); const bkbtn = document.getElementById('backwards-button'); const revtxt = document.getElementById('backwards-container'); bkbtn.addEventListener('click', ()=>{ backwards(bkinp, revtxt)}); ...

Solar pavements for energy supply

Remarkable News 13 0

A Hungarian tech company is taking small steps with recycled plastic waste to make solar panels built into pavements to power buildings and charge electronic devices in public places. ...

The attribute disabled sets without value (without ='true' ). You need just add this attribute into the options you want disabled. for setting this attribute on JavaScript with jQuery, you need to write something like this: $('option.dis').attr('disabled'); for check option to disabled: if ($('option.dis').prop('disabled') === true)...

You need to get two random numbers: - the first to decide which group to pick, - the second to pick an item from that. We generate a random number from 1 to 100. - A number from 1 to 20 would pick a random element from the...

Although there are electric rollerblades and skateboards, sometimes people just want a temporary boost while using their existing non-electric set of wheels. That's why Veelo was invented. Created by...

Scientists in Japan have produced a plastic with the highest heat resistance ever reported, and done so by using natural materials. This biomass-derived plastic therefore promises not just greater performance in some aspects than conventional plastics, but paves the way toward greener production for the omnipresent material. ...

Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 329 on Wed Jan 22, 2020

Registered users: CommonCrawl [Bot]