The best Honor 7X cases

Phone cases are about decoration, but more importantly, they’re about protecting your investment. If you drop your phone, a good phone case can be the difference between a disaster and a relief. Whenever a new phone comes out, case makers start to offer their wares as well. With the Honor 7X being a recent release, we’ll be sure to update this list as new Honor 7X cases hit the market.

There is a lot that goes into deciding on what case is right for your phone. You want to make sure your phone is protected not only from drops, but from the rigors of everyday life too. Some cases protect the phone from screen scratches as well. Whatever shape you usually find your phone in after several months, chances are, there is a case to help it NOT end up that way.

Without further ado, let’s take a look at the selection of cases we have outlined below.


KuGi Huawei Honor 7X thin wallet

Amazon

One of the more popular options of smartphone case is the wallet-case. This is a protective case that serves the extra utility of carrying around your ID, credit cards, cash, etc. Since you’re going to carry around all that stuff anyway, why not combine them all into one case, rather than separate cases for each item. The benefit is that you have less to worry about, including dropping your phone, because the case is there to protect it. Add to that the utility of standing the phone up for media consumption and you have a case that does it all.

The PU leather finish looks great too. It’s a stylish way to carry your phone with four color choices — black, blue, green, and red. The Honor 7X case will help protect your phone from damage and screen scratches, keeping it nice and cozy for as long as you own the phone.

Get it on Amazon


Yiakeng Shock Absorbing Dual Layer Protective Fit Armor Phone Cases Cover Shell

Amazon

The name is a bit of a mouthful, but this case offers a ton of protection for your Honor 7X. This case is crafted with a TPU inner sleeve and an impact-resistant hard plastic outer shell. The corners are double-thick TPU to ensure the device can survive a fall. The phone offers drop protection, scratch protection, and slip protection. The phone is set back from the front of the case just enough to prevent screen impact when dropped on the face.

This Honor 7X case is textured to provide a grippy surface. So many phones are slippery these days, so maintaining a grip can be difficult. The textured case allows for maximum gripping surface, keeping your phone secure in your hand. The built-in kickstand allows you to watch movies hands-free, making the case functional and helpful.

Get it on Amazon

KuGiPremium Flexible Soft Anti Slip TPU Honor 7X Case 

Amazon

If a hard case isn’t the right look for you, KuGi has a shock absorbing soft case that fits over the Honor 7X like a glove. The soft silicone is textured to look and feel great. The sides are engineered for maximum grip. The holes for ports are precision cut to allow for access to the cameras, fingerprint sensor, charging port, and every other opening, without having to remove the case.

A creative new TPU formula helps extend the life of the case — providing long-lasting protection for your device. The Honor 7X case also comes with a 100 percent satisfaction warranty, allowing you a full refund or a new case if you aren’t completely satisfied. This is a classic look that will offer your device maximum protection.

Get it on Amazon

KuGi ultra-thin Flexible Rubber Soft TPU Hybrid Bumper Case

Amazon

Finally, if you would prefer to show off your phone, but still have it protected, the KuGi ultra-thin Flexible clear Honor 7X case will do just that. Made from a thin, drop/shock/scratch absorbent TPU, the case will allow you to admire the phone’s craftsmanship while still enjoying the protection the case provides.

The precision cutouts give you access to all of your ports, plus keeps your camera lenses and fingerprint sensor free. The TPU material is sturdy enough to maintain these port openings without a lot of wear and tear on the case, keeping your device safe and the case itself intact. The TPU has a soft touch feeling that feels great in the hand and is very grippy to prevent drops or accidental falls.

Get it on Amazon

So, that’s our list of the best cases you can get for your Honor 7X. It’s still a new device, so there are sure to be more cases coming, and we’ll update the list as they do. But this covers a good variety of styles, from the wallet case, to the ultra-durable, to the slim and fashionable. There is surely a case on here for you.

Disclosure: E-Commerce Content is independent of editorial content and we may receive compensation in connection with your purchase of products via links on this page. This post may contain affiliate links. See our disclosure policy for more details.

How to install and configure TOMCAT server with Eclipse?

Download and Install Tomcat

For Windows
  1. Go to http://tomcat.apache.org ⇒ Under “Tomcat 8.5.{xx} Released” (where {xx} is the latest upgrade number) ⇒ Downloads ⇒ Under “8.5.{xx}” ⇒ Binary Distributions ⇒ Core ⇒ “ZIP” package (e.g., “apache-tomcat-8.5.{xx}.zip“, about 9 MB).
  2. Create your project directory, say “d:myProject” or “c:myProject“. UNZIP the downloaded file into your project directory. Tomcat will be unzipped into the directory “d:myProjectapache-tomcat-8.0.{xx}“.
  3. For ease of use, we shall shorten and rename this directory to “d:myProjecttomcat“.
Take note of Your Tomcat Installed Directory. Hereafter, I shall refer to the Tomcat installed directory as.
For Mac OS
  1. Go to http://tomcat.apache.org ⇒ Under “Tomcat 8.5.{xx} Released” (where {xx} is the latest upgrade number) ⇒ Downloads ⇒ Under “8.5.{xx}”⇒ Binary distribution ⇒ Core ⇒ “tar.gz” package (e.g., “apache-tomcat-8.0.{xx}.tar.gz“, about 9 MB).
  2. To install Tomcat:
    1. Goto “~/Downloads“, double-click the downloaded tarball (e.g., “apache-tomcat-8.0.{xx}.tar.gz“) to expand it into a folder (e.g., “apache-tomcat-8.0.{xx}“).
    2. Move the extracted folder (e.g., “apache-tomcat-8.0.{xx}“) to “/Applications“.
    3. For ease of use, we shall shorten and rename this folder to “tomcat”.
Take note of Your Tomcat Installed Directory. Hereafter, I shall refer to the Tomcat installed directory as .

For academic learning, I recommend “zip” (or “tar.gz”) version, as you could simply delete the entire directory when Tomcat is no longer needed (without running any un-installer). You are free to move or rename the Tomcat’s installed directory. You can install (unzip) multiple copies of Tomcat in the same machine. For production, it is easier to use the installer to properly configure the Tomcat.

Create an Environment Variable JAVA_HOME

(For Windows)
You need to create an environment variable called “JAVA_HOME” and set it to your JDK installed directory.
  1. First, find your JDK installed directory. The default is “c:Program FilesJavajdk1.8.0_{xx}“, where {xx} is the upgrade number. Take note of your JDK installed directory.
  2. To set the environment variable JAVA_HOME in Windows 7/8/10: Start “Control Panel” ⇒ System and Security (Optional) ⇒ System ⇒ Advanced system settings ⇒ Switch to “Advanced” tab ⇒ Environment Variables ⇒ System Variables ⇒ “New” ⇒ In “Variable Name”, enter “JAVA_HOME” ⇒ In “Variable Value”, enter your JDK installed directory as noted in Step 1.
  3. To verify, RE-START a CMD shell (restart needed to refresh the environment) and issue:
    SET JAVA_HOME
    JAVA_HOME=c:Program FilesJavajdk1.8.0_{xx}

How to configure tomcat server in Eclipse IDE?

In Eclipse IDE, go to menu Window > Preferences. Then expand the Server > Runtime Environments node in the Preferences dialog:

Click Add… to add a new server runtime environment. In the New Server Runtime Environment dialog, select Apache > Apache Tomcat v x.x  and check the option Create a new local server:

Click Next. In the next screen, click the Browse button to specify the existing installation directory of Tomcat on your computer:

Click Finish, the selected Tomcat installation is added to the list of server runtime environments, as shown below:

Click OK to close the Preferences dialog, the new server runtime is added to the Servers view:

You can now drag and drop a project into this server in order to deploy and run the project.
NOTE: If you don’t see the Servers view, you can show it by go to the menu Window > Show View > Others…, then look for Servers.

Writing First Servlet:

1. Create Dynamic Web Project

To create a Servlet we need to create a new ‘Dynamic Web project’ which can be done in three ways,

  • Right click on Project Explorer -> New -> Dynamic Web Project
  • File menu -> New -> Dynamic Web Project
  • Click on the down arrow on New icon on toolbar -> Dynamic Web Project

 Click “Next” button.Click “Next” button.

Check ‘Generate web.xml deployment descriptor’ checkbox and click “Finish” button and Eclipse IDE will generate the web project automatically as shown below

2. Create Servlet Class

Select from the menu File –> New –> Servlet.

Write “com.srccodes.example” in the ‘Java Package’ field and “HelloWorld” in the ‘Class Name’ field. Click ‘Next’ button.

We can specify deployment descriptor (web.xml) specific information in the following screen. Just keep every thing as it is for the time being. Click “Next” button.

Click ‘Next’ button.Click ‘Next’ button.
Eclipse will generate a Servlet class based on the configuration / input we provided in the previous steps.
3. Write Custom Code

Add your code inside ‘doGet’ method. ‘setContentType’ method of HttpServletResponse sets content type of the response to ‘text/html’ which is the standard MIME content type for Html pages. ‘getWriter’ method of the response object returns a PrintWriter object. This will be used to print our “Hello World!” string in the browser.
Edit the generated ‘HelloWorld.java’ as per the following code.

File: HelloWorld.java

package com.srccodes.example;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * Servlet implementation class HelloWorld
 */
@WebServlet(“/HelloWorld”)
public class HelloWorld extends HttpServlet {
    private static final long serialVersionUID = 1L;
        
    /**
     * @see HttpServlet#HttpServlet()
     */
    public HelloWorld() {
        super();
        // TODO Auto-generated constructor stub
    }
    /**
     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
     */
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType(“text/html”);
        PrintWriter printWriter  = response.getWriter();
        printWriter.println(“

Hello World!

“);

    }
    /**
     * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
     */
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // TODO Auto-generated method stub
    }
}

4. Run Your Servlet Code

Right click on the project ‘HelloWorldServlet’ and select from context menu ‘Run As’ –> ‘Run on Server’.
Select the existing tomcat server.
Click “Finish” button. HelloWorldServlet web application will be deployed in the tomcat web server.
6. Browser Output

Eclipse will open a browser and your server side code will print ‘Hello World!’ in the browser.

FCC officially repeals net neutrality rules: what now?

Huffington Post

Net neutrality is officially dead, but what does that mean for Internet users in the US and beyond? Will it ever come back? Read on to find out.

Editor’s Pick

Brief background

Unless you’ve been living under a rock for the past few months, you’ve probably heard a thing or two about net neutrality, an ongoing debate in the US. Net neutrality required service providers to treat every content equally: no throttling, blocking, or providing preferential treatment for additional fee. These rules were one of the Obama-era FCC’s signature achievements, but with Ajit Pai in charge, a former Verizon employee, and two other Republicans, the organization’s stance on net neutrality has changed drastically. The FCC wanted to get rid of net neutrality altogether and undo the classification of ISPs as Title II common carriers, and that’s precisely what they voted to do on December 14.

December 14 vote

As expected, the FCC voted 3-2 to repeal these landmark regulations just few days ago, the organization claiming that “the Internet wasn’t broken in 2015.” Pai commented, “We were not living in some digital dystopia. The main problem consumers have with the Internet is not and has never been that their Internet provider is blocking content. It’s been that they don’t have access at all.”

The two Democrat commissioners who dissented echoed the sentiments of net neutrality advocates: Jessica Rosenworcel says that the FCC’s “rash decision” gives Internet providers permission to “discriminate and manipulate your internet traffic.” Mignon Clyburn delivered a powerful and impassioned defense, claiming that the FCC’s vote was “particularly damning… for marginalized groups, like communities of color, that rely on platforms like the internet to communicate.”

Legal challenges?

Let’s first examine the legal implications, and the bottom line is that there will be lawsuits with a lot of interveners, challenging the FCC’s vote. Public interest groups like Free Press and Public Knowledge have already declared that they will challenge the repeal in court; the New York Attorney General Eric Schneiderman said he and other attorneys general from more than 15 states will file a legal challenge in the coming days.

These legal claims are likely to rely on the Administrative Procedures Act, which prohibits federal agencies from acting in a “capricious” manner, going back and forth on decisions with changes in political administration. However, as Wired points out, “As capricious as the current FCC’s about-face may seem, legal experts say the challenges won’t be a slam-dunk case. Federal agencies are allowed to change their minds about previous regulations, so long as they adequately explain their reasoning.” The onus is on the claimants to show that the FCC’s decision is a capricious one, which is going to be difficult to prove.

It’s going to be difficult to prove that the repeal was a capricious decision.

Net neutrality advocates may also point out that while the FCC claims that 7.5 million comments it received during the public review period were spam, created by bots, it is refusing to help investigations into what happened. It’s unlikely to have much weight, unfortunately.

Will average users feel the change?

Yes and no. It’s unlikely that Internet users in the US will be impacted – either positively or negatively ­– by the repeal overnight. As AT&T’s senior executive VP Bob Quinn points out, the Internet will “continue to work tomorrow just as it always has.” In fact, many service providers like AT&T, Comcast, and Verizon have promised not to block or throttle content. For now. The catch here is that their stance may change in the future, and even if it doesn’t and they continue to stay away from blocking or throttling content, they may still create fast lanes for their own services or for those who pay a premium.

Indeed, what we are likely to see in the future is an expanded form of zero-rating where service providers exempt certain streaming services from data counts. Carriers have been doing this even under net neutrality rules were (though the legal validity of this practice was called into question multiple times); without net neutrality rules, there is nothing even remotely getting in the way of these carriers from providing preferential treatment to its own streaming services.

Further, contrary to Pai’s statement that the Internet wasn’t broken even before 2015, and contrary to his supporters who claim that carriers won’t dare throttle or block content in fear of public backlash, the long-term effects of the FCC’s vote could be devastating. Comcast throttling BitTorrent connections, AT&T blocking voice-call services like Skype and FaceTime, or Netflix paying additional fees to Verizon are the sorts of behavior that we saw prior to net neutrality rules and there’s no reason why they wouldn’t return now that net neutrality rules have been repealed.

Comcast throttling BitTorrent or AT&T blocking FaceTime are the sorts of behavior that we saw prior to net neutrality rules.

Ultimately, the FCC’s decision gives significant leeway to ISPs: they may one day decide to block certain apps and websites, slow down content provided by competitors, bury relevant but unpaid search results, etc. Consumers in the US may end up having to choose Internet packages like TV channels, similar to what we see in some European countries. The most popular websites like Google, Amazon, and Netflix may one day be dispersed and inconveniently grouped into separate, overpriced packages. Want Google as well as Netflix? Pay up!

What about those outside the US?

Of course, given that the FCC is a US organization, its decision to repeal net neutrality rules won’t have a direct impact on other countries and users in other countries. However, if your country does have legislation similar to net neutrality rules, you might want to keep an eye on the political side of things. Policy decisions made in the US usually have a far-reaching indirect effect on neighboring countries, Anglophone countries, and countries that have special ties with the US.

Even if your country has made it clear that it wants to uphold net neutrality rules or the equivalent legislation, there may be financial factors to consider. If companies like Netflix or Spotify are adversely affected by the FCC’s decision in the US and are forced to pay more by ISPs, they will most likely increase monthly subscription fees for users in the US as well as for users outside the US.

What can you do?

Unfortunately, for those of you who are in support of net neutrality rules, there isn’t much to be done right now. Over the next few months, we will see legal battles between public interest groups and attorneys general and the FCC; we will see heated political debates; we will see predictions from both sides – those who are in favor and those who are not. Only time will tell if net neutrality rules were indeed preventing the arrival of cyber-dystopia or if they were simply an obstacle to corporate profit and further investment.

Installing Adobe After Effects

Adobe After Effects Installation
About Adobe After Effects :

Adobe After Effects is a digital visual effects, motion graphics, and compositing application developed by Adobe Systems and used in the post-production process of film making and television production. Among other things, After Effects can be used for keying, tracking, compositing and animation. It also functions as a very basic non-linear editor, audio editor and media transcoder.


After Effects CC (2015) system requirements :


Windows :


Intel Core2 Duo or AMD Phenom II processor with 64-bit support
Microsoft Windows 7 with Service Pack 1, Windows 8, or Windows 8.1
8 GB of RAM (16 GB recommended)
5 GB of available hard-disk space; additional free space required during installation (cannot install on removable flash storage devices)
Additional disk space for disk cache (10 GB recommended)
1280 x 1080 display
OpenGL 2.0-capable system
QuickTime 7.6.6 software required for QuickTime features
Optional: Adobe-certified GPU card for GPU-accelerated ray-traced 3D renderer
Internet connection and registration are necessary for required software activation, validation of subscriptions, and access to online services.

Mac OS :

Multicore Intel processor with 64-bit support
macOS v10.9 (Mavericks), or v10.10 (Yosemite)
8 GB of RAM (16 GB recommended)
5 GB of available hard-disk space for installation; additional free space required during installation (cannot install on a volume that uses a case-sensitive file system or on removable flash storage devices)
Additional disk space for disk cache (10 GB recommended)
1440 x 900 display
OpenGL 2.0-capable system
QuickTime 7.6.6 software required for QuickTime features
Optional: Adobe-certified GPU card for GPU-accelerated ray-traced 3D renderer
Internet connection and registration are necessary for required software activation, validation of subscriptions, and access to online services.

Installing a render-only instance of Adobe After Effects CC
Before you start:
1. If you have installed Creative Cloud applications on two computers, sign out of one of them by opening any of the applications and choosing Sign Out from the Help menu.

2. You can sign back into Creative Cloud on this computer after the render-only instances of After Effects are installed.

To install a render-only instance of After Effects CC, do the following:
1. Go to the product page to download and install After Effects CC.
2. Download Adobe After Effects CC Trial from :
    https://www.adobe.com/products/aftereffects/free-trial-download.html
3. Install as Try.
4. When the installation is complete, start After Effects.
5. Quit After Effects install Application.
6. To start the application browse to Start Menu > All Programs > Adobe After Effects CC 2015.exe
Limitations of the trial version
The trial version of After Effects includes all of the codecs that are included with the full version of After Effects. This means that you can import and export to all of the supported file formats using the trial version. 
The trial version of After Effects also includes the Keylight plug-in, mocha-AE, mocha shape, Cycore (CC) effects, and Color Finesse. 
Activate the software

A single-user retail license activation supports two computers. For example, you can install the software on a desktop computer at work and on a laptop computer at home.

For more information on product licensing and activation, go to the Adobe website.

Want to Learn Brand Marketing of your Company ?

Reimagining the Tax Code, Getting There with Grassroots Activism

Tax policy, which can be deadly dull, hasn’t inspired much enthusiasm for activist campaigns—until now. Advocates could leverage this energy to push for a progressive tax code.

The House and the Senate have reached an agreement on the final GOP tax bill and plan to vote on it sometime next week. However, there’s still aggressive mobilization against the legislation, fueled by progressive organizations like the Not One Penny and Stop the #GOPTaxScam coalitions; Indivisible; and Americans for Tax Fairness. These groups are working hard to disrupt a tax agenda that overwhelmingly favors the wealthy, even though in all likelihood the bill will pass. Tim Hogan, spokesperson for the Not One Penny campaign, says that regardless the outcome of the bill, this mobilization is a victory “in the court of public opinion.”

Indeed, Americans are strongly against the bill: a Reuters/Ipsos poll found that nearly half of Americans who are aware of the legislation oppose it. And tax policy activism—a rarely- seen phenomenon—has played a role in raising awareness. This surge in activism could lay the foundation for a popular movement, not just reject the GOP’s giveaway to the rich, but to work toward a new, more equitable tax code.

In September, before the Republican tax proposals were released, Prosperity Now and PolicyLink, two economic justice organizations, released a report entitled “Making the Connection: Bringing Tax Wonks and Grassroots Activists Together to End Inequality.” The U.S. tax code, the report found, is an extremely “powerful lever … to drive inequality.” But as much as the tax code expands the divide between rich and poor, the report argues, that there is also serious potential for the tax code, reimagined, to bridge it.

And, as the report makes clear, that’s where activists could come in.

Not One Penny, spawned from April’s Tax March and officially launched in August, is a coalition of almost 50 organizations, demanding “Not one penny in tax cuts for millionaires, billionaires, and wealthy corporations.” While the Tax March largely brought people out to protest Trump’s refusal to release his tax returns, the organizers wanted to bring attention to progressive tax policies, too. Following the initial action, Not One Penny shifted its focus. This summer, with a Republican tax proposal looming on the horizon, the group began training activists in anti-tax policy organizing.

Months later, after the release of the Trump tax plan and the eventual passage of the House and Senate proposals, demonstrations are taking place across the country to protest these trickle-down economics-oriented plans. Recently, five protestors were arrested in Maine after conducting a sit-in in Republican Senator Susan Collins’s office; Collins is a potential “no” vote when the conference bill comes back to the Senate. And in the spirit of the holiday season, New Jersey activists have confronted their Republican representatives with tax-themed Christmas carols.

As the Senate debated their tax bill, groups opposing the legislation set up a “People’s Filibuster” to protest the GOP proposal. For over 30 hours and throughout the night, different organizations “sponsored” hours, inviting activists and advocates to tell their stories. The speakers warned about the damaging effects of the House and Senate proposals on specific sectors like health care and the environment, and on certain groups such as graduate students, people with disabilities, and young families.

The “Making the Connection” report suggests that these types of protests could be leveraged to advocate for fairer tax policies, as such tactics have not frequently been utilized in tax policy advocacy. The report found that while almost 60 percent of the activists it polled had recently attended a rally or protest on an issue of public concern, just 5 percent had recently attended a rally or protest related to tax policy.

The report’s authors further explain that such low mobilization in regard to tax activism could be attributed to tax policy’s “messaging problem,” as advocates and the general public commonly think of tax policy as “complex, unapproachable, and downright boring.” Major barriers to effective progressive tax advocacy include a “knowledge deficit” concerning taxes, and a lack of a personal connection to tax policy.

But not only does the tax code work to raise revenue for the government (which everyone knows about), it also helps American households build wealth (which fewer people realize). That may be because, in our current tax code, most tax benefits are funneled toward the wealthy. According to the report, the top 1 percent of households received more federal dollars than the bottom 80 percent. The mortgage interest deduction and property tax deduction? The government spends almost double on those credits for wealthier households than it does on Section 8 housing vouchers or Homeless Assistance Grants.

This preference for the wealthy is hard to detect, since programs like the mortgage-interest deduction are hidden inside the tax code, helping create a two-tier welfare system, where means-tested welfare programs for the poor are visible and known, but welfare programs for the wealthy, like deductions for homeownership, education, and retirement, help the rich build wealth but exist as “tax credits,” not “welfare.” The rich are lauded for taking advantage of the tax system (think of Trump saying that not paying taxes “makes me smart”), but means-tested welfare recipients are seen as moochers.

In other words, our tax code—even before the GOP makes it incalculably worse—exacerbates the nation’s vast economic inequality, in which the richest 1 percent of households own 40 percent of the country’s wealth. The tax code also contributes to the racial wealth gap, where the median white family owns 12 times the wealth of the median black family.

But, it also means that the tax code could also be a major force in reducing economic inequality. To right the imbalance and “shift the benefits distributed through the tax code to working families,” the “Making the Connection” report lays out concrete steps that advocacy organizations can take to make tax policy accessible to community organizers and grassroots activists.  

This support is necessary, says Jeremie Greer, Prosperity Now’s vice president of policy and research and a coauthor of the report, “because the personal connection to [tax policy] is underneath the tax code.” Greer says that “when [people] think about taxes, they think about the annual exercise of doing their taxes,” instead of associating the tax code with programs that help them.

The tax code contains housing credits, credits for low-income working families like the Earned Income Tax Credit and the Child Tax Credit. The federal government uses that revenue to help pay for programs many communities rely on. One of the report’s survey respondents said that people often don’t realize that the EITC was the reason they received a tax refund. Another said that “many people don’t understand the connection between the taxes they pay and the roads they drive on or the schools their children attend.”

Other assistance programs outside the tax code are “very straightforward,” Greer says. Food stamps are for nutrition assistance. Housing vouchers help people with their housing. And the mortgage-interest deduction “is a wonky … and governmental way of talking about something,” he says. When talking to advocacy groups, Greer simply calls it what it is: a housing subsidy, which is one way to make tax policy clearer while helping people recognize how the tax code affects them personally.

Advocacy groups have been doing an excellent job of making the consequences of the Republican tax proposals both clear and personal. Lisa Beaudoin, executive director of ABLE New Hampshire, a disability rights organization, traveled to Washington for a recent Capitol Hill tax policy protest. She says, “Helping people understand the direct implications [that this tax bill has] in their lives … gives people something to hold onto and to fight for.”

The elimination of the individual mandate would threaten health care for millions of mostly low-income people. Multiple provisions, including the elimination of the medical expense deduction, would disproportionately hurt people with disabilities. And the reduction of the corporate tax rate is widely seen as a giveaway to wealthy Republican donors (as at least one Republican representative acknowledged).  

Anti-tax bill activism and the media coverage of the GOP bills have made an impact: Only 31 percent of Americans support the tax plan. But when the battle over the Republicans’ tax catastrophe is done, what will tax activists do then? It may be easier to advocate against polices that would be detrimental to low- and middle-income families than to campaign for fairer taxes, especially since progressive members of Congress have not put forth an omnibus proposal of their own.

Economist Gerald Friedman recently made the case at AlterNet that, “progressives should resist the temptation to simply attack the GOP giveaway to the ultra-rich; instead, they should articulate their own tax plan, one that would fund needed services, promote stable growth, and compensate the unlucky, including the victims of globalization.”

Many of Friedman’s policy proposals are not new to policymakers on the left; but they have not been bundled together in an overall progressive rewrite of the tax code. They include taxing capital income (such as profits from investments) at the same rate as income from work, and mandating new penalties on income stashed in offshore tax havens. Friedman also recommends strengthening the penalties on corporations that don’t provide benefits like health insurance and instituting a tax on carbon emissions.

The report’s policy proposals center on strengthening policies that already work, like the Earned Income Tax Credit (EITC) and housing policy. The EITC lifts millions of families out of poverty, but really only works well for custodial parents. Greer says that people without children, including younger workers and the elderly, should be able to benefit too.

One such bill introduced by two progressive Democrats, Ohio Senator Sherrod Brown and California Representative Ro Khanna, would greatly expand the EITC along Prosperity Now’s lines. The Brown-Khanna plan increases the value of the credit for working families and gives childless workers greater access to the benefit. The Center on Budget and Policy Priorities estimates that this proposal would lift the incomes of 47 million households.

By introducing such a congressional bill now, when the Republican majorities in each house have no intention of giving it a hearing, of course, is to lay the groundwork for a more progressive tax code if and when the Democrats return to power.

Another such proposal, Greer points out, would be to create a tax credit that benefits renters as well as homeowners. Support for families that rent could help move them into homeownership—a transformation that would be further incentivized if Congress permanently established a program like the First-Time Homebuyer Credit, which temporarily came about during the Great Recession.  

Progressive leaders can’t simply say “no” to the Republicans’ plan to alter the tax code, because the status quo isn’t ideal either. Instead, a new, progressive tax code could help eliminate income inequality, make the wealthy pay their fair share, and finally give low- and middle-income families the resources they need to lead lives that are economically secure. If Democrats can retake power and activists get the support they need to transform public tax discussions, the party could be prompted to adopt new policies (which would require reforming campaign finance to curtail the Democrats reliance on big money) to make a new tax code a reality.

 

Related Stories

  • Here’s What It’s Going to Take for Democrats to Take Back the House in 2018
  • The FCC Just Voted to End the Internet as We Know It—Now What?
  • Doug Jones Would Have Won by Tens of Thousands More Votes If Participation Hadn’t Been Blocked and Undermined

Comparing Bootstrap With Google’s Material Design Lite : Bootstrap – ResponSive Design

Bootstrap vs Materialize

What is Materialize and Bootstrap?


Both Google’s Materialize and Twitter’s Bootstrap are front end CSS frameworks for webpages. Both are open source. In the question“What is the best CSS framework?” Bootstrap is ranked 1st while Materialize is ranked 5th. The most important reason people chose Bootstrap is:
Bootstrap is developed to be instantly compatible with all sizes of screens, so you don’t have to worry about which device the user is accessing your site from. Yet if you prefer, you can disable responsiveness of Bootstrap.

Bootstrap:

Bootstrap is a free and open-source front-end web framework for designing websites and web applications. It contains HTML and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions. Unlike many web frameworks, it concerns itself with front-end development only.


Materialize:

Created and designed by Google, Material Design is a design language that combines the classic principles of successful design along with innovation and technology. Google’s goal is to develop a system of design that allows for a unified user experience across all their products on any platform.


Major Differences!

Philosophy

  • Bootstrap was originally built by Twitter with the purpose of making it easy to build responsive websites. It gives you a lot of components and customization options for making web apps.
  • Material Design Lite is a way for Google to spread its material design concept to the web. It gives you only the base building blocks for building material apps. The rest is up to the developer.

Development Experience

  • Bootstrap has a very detailed documentation. Development involves copy pasting from the examples and getting a usable result fast.
  • MDL is built around BEM, and components are built by combining multiple classes. This approach gives a great deal of control, but can sometimes lead to unwieldy HTML.

Components

  • In Bootstrap, almost all built-in HTML elements are styled and can fit nicely together in a layout. It gives you a great number of additional components for any type of design.
  • MDL gives you fewer components than Bootstrap, but they are all focused on building modern Material Design applications. They come with animations and beautiful default styles.

Layout

  • Bootstrap has an advanced grid system with offsets, column wrapping, hiding and reordering of columns.
  • MDL has a more primitive grid that gets the job done most of the time, but doesn’t support advanced features.

Design

  • Bootstrap gives you a passable default design which we have grown tired of by now, but there are plenty of wonderful themes to chose from.
  • MDL looks fresh and features bold colors and animations. It dictates exactly how your web app should look like and gives you a limited opportunity for customization by choosing base and accent colors.

Community

  • Bootstrap has been around for quite some time and has an enormous community, which produces themes, plugins and blog posts.
  • MDL came out only recently but has already become quite popular on GitHub. However it is still in its early days, and most of the time you are on your own.

Interest Over Time

    trends.embed.renderExploreWidget(“TIMESERIES”, {“comparisonItem”:[{“keyword”:”Bootstrap”,”geo”:””,”time”:”2004-01-01 2017-06-12″},{“keyword”:”Materialize”,”geo”:””,”time”:”2004-01-01 2017-06-12″}],”category”:0,”property”:””}, {“exploreQuery”:”date=all&q=Bootstrap,Materialize”,”guestPath”:”https://trends.google.com:443/trends/embed/”});

    < 1 > Grid 

    Grid is the most important part of the framework as it makes the webpage responsive for all devices. 
    • The Bootstrap grid splits the page into 12 equally sized columns. Depending on the viewport width, four different size classes are applied – extra small (from 0 to 768px wide), small (768px to 992px), medium (992px to 1200px), and large (1200px+).
    • MDL has a similar grid system, but it only has three sizes – phone (0 to 480px), tablet (480px to 840px) and desktop (840px+). MDL desktop has 12 columns, tablet has 8 columns and phone has only 4 columns.
    comparison between materialize and bootstrap
    Grid system in Bootstrap and MDL
    comparison between materialize and bootstrap
    Grid changes in Bootstrap 
    comparison between materialize and bootstrap
    Grid changes in MDL

      Docs: Bootstrap Grid | MDL Grid
      Learn Bootstrap’s Grid system

      < 2 > Header Navigation

      Headers in Bootstrap are called Navbars. They begin collapsed in mobile views and become horizontal when there is enough space for them. Inside, you can nest an array of different elements that can be positioned with the help of classes.

      Similarly, MDL header navigations start off collapsed behind a hamburger menu and expand with the growth of the viewport. They too have different stylings and possible positions.

      Header navigation bars in Bootstrap and MDL

      Bootstrap’s collapsible menu
      A hamburger menu in MDL

      Docs: Bootstrap Navbars | MDL Navigation

      < 3 > Footer

      Bootstrap doesn’t actually have separate footer components, while Material Design Lite has two options, a mini and a mega footer. For this example, we’ve translated the default MDL design to Bootstrap, using the grid and a bit of extra CSS.
      Footers in Bootstrap and MDL

      Bootstrap’s menu in mobile’s view

      MDL’s mini footer

       Docs: MDL Footers

      < 4 > Tabs

      Both frameworks use pretty similar syntax to create selectable tabs with different content. A number of links for swapping between the tabs, and an array of divs, selectable by id, for storing the content. They also both require JavaScript to work (Bootstrap requires jQuery as well).
      Tabs in Bootstrap and MDL
      Docs: Bootstrap Tabs | MDL Tabs

      < 5 > Buttons

      Bootstraps default buttons are rectangular and have a bunch of size options. They can have their color changed via CSS or with the modifier classes. Another unique feature to Bootstrap is the split button which is half button, half drop-down.
      MDL offers both rectangular and circular buttons. Google has a guide on how and in which situations to use the different types of buttons. All buttons in MDL support the ripple animation effect.
      Different Buttons in Bootstrap and MDL
      Docs: Bootstrap Buttons | MDL Buttons

      < 6 > Tables

      In Bootstrap responsiveness is achieved using a scrollbar at the bottom of the table. MDL hasn’t added responsiveness to their tables yet. But they added different styles to the tables to make it attractive!  
      Tables in Bootstrap and MDL
      Docs:Bootstrap Tables | MDL Tables 

      < 7 > Forms

      • Bootstrap’s forms support more types of input elements and have classes to make alignments to labels and inputs but it doesn’t have inbuilt library for validation.
      • While MDL has few input elements but the ones with material animation support to make them attractive and fun! they have pattern matching and verification as well. MDL support validation. 
      Forms in Bootstrap and MDL

      Docs: Bootstrap forms | MDL forms

      < 8 > Drop-down Menu

      • Here Bootstrap give you an advantage by making a button split which makes half f the button dropdown menu and half normal button.
      • While MDL gives smooth animation effects compared to Bootstrap’s technique! 
      JavaScript is needed in both the cases.
      Dropdown menu styles in Bootstrap and MDL
      Docs:Bootstraps Menu | MDL Menu

      < 9 > Tool-tips

      Bootstrap gives you the best experience in case of Tool-tips. It gives you the options to show the tool-tip at at top or at bottom or at right or at left or you could just popover it on click!
      MDL has gone with simple approach here. Just two options small and Large design. 
      Tool-tips in Bootstrap and MDL 

      Docs: Bootstrap’s Tool-tips | Bootstrap’s Popover | MDL Tool-tips

        < 10 > Icons
      Bootstrap comes with the Glyphicons icon font, which gives you over 250 pretty icons to choose from. They come bundled with the bootstrap CSS file and no special setup is needed.
      MDL uses a set of icons that Google released some time ago called Material Icons. This is a huge set of nearly 800 icons. They are not bundled with MDL so you need to link it in the HEAD section of your page:

      <link rel=stylesheet href=https://fonts.googleapis.com/icon?family=Material+Icons>

      Icons in Bootstrap and MDL

      Conclusion

      By all means Google’s Materialize Lite is shaping up as a good front-end framework. It makes the webpage look cooler! It is still the early days, but the fact that it is made by Google gives you confidence that it will always conform to the latest material design spec.
      if you don’t find Material Design appealing, there is Bootstrap with its large community. You can even get the best of both worlds by using one of the material themes that are available for it.
      Learn Bootstrap!

      Life is Pay2Win

      I was listening to some well-known YouTubers complaining about lootboxes in new games like Star Wars Battlefront II or Shadow of War and pointing out in painstaking detail how getting this or that bonus unbalances the game in favor of people who buy lootboxes. However they appeared to be totally okay with other people getting the exactly same bonuses by grinding the game for many, many hours. And that annoyed me. Wouldn’t we be much better off if our multiplayer PvP games would be perfectly balanced and the outcome only determined by skill? If you can get bonuses that make you much stronger than another player, why would it matter whether you got them by playing the game for endless hours or by using your credit card? It appeared to me as if some hardcore gamers are quite okay with a game being unfair, as long as that unfairness favors them and their kind.

      The only advantage playing a game for longer should be the skill you acquire by practice. Any other bonus you get from grinding is in fact a historical and economical anomaly. The practice will certainly disappear over the coming decade, because it simply isn’t in the interest of game companies to keep doing so. Companies don’t *want* players that use a lot of their bandwidth but give them no money. The only free players they want is those that they are still trying to persuade to cough up some cash.

      Fact is that life itself is Pay2Win. In a consumer society, the more money you have, the more luxury you can afford. The whole “American Dream” idea is built around the concept that money is the yardstick for success in life, and that by working hard on pursuits that actually earn you money or improve your chances to earn money later, you are leading a better life. Even the people who would like wealth to be redistributed don’t complain about the fact that more money buys you a better car or the best seats in the theater. So why exactly should video games be exempt from that?

      Games went from being fair and balanced to being unfair based on time spent. Now they are moving from there to being unfair based on money spent. People complaining about that on YouTube or various internet forums isn’t going to change that, because millions of people will buy those new games with their new unfairness. Because for millions of people the new unfairness is actually an improvement over the old unfairness. Gaming has become a mass market for the general population, and in the general population there are more people who can afford to spend $100 than there are people who can afford to spend 100 hours. Calling for that to be rolled back to the previous state of unfairness doesn’t even have the benefit of being moral, the moral situation would be games that don’t give you any advantages from neither time nor money.

      Sand in my story

      I don’t believe in black and white. 99.9% of everything is a shade of grey, and absolutes are at best naive simplifications and at worst dangerous traps. That is not a very trendy opinion. To my great despair the internet has not led to people to discuss their differences, but has isolated them into echo chambers where black and white are the only colors available. Whether it is politics, culture, or gaming, nobody wants to discuss the pros and cons of any issue any more, they just want shared outrage at whatever they believe is wrong. This is why blogging is in decline and tweeting is on top, Twitter just does outrage so much better.

      In spite of these modern trends, I’m still trying to discuss issues, especially in gaming, by looking at them from both sides. And today I would like to talk about sandboxes and linear stories in Dungeons & Dragons, especially in the official Wizards of the Coast published adventures. Now none of them are perfect sandboxes or completely linear, as neither of the extreme cases works very well in pen & paper roleplaying. But if we compare the shades of grey of today with the shades of grey from the past, the current selection of adventures since the release of 5th edition is way more on the sandbox side as adventure modules from previous editions were.

      The sandbox style has certain advantages. I believe that the best 4th edition adventure that Wizards of the Coast released for Dungeons & Dragons is Madness at Gardmore Abbey, which is more sandbox than the other 4E adventures. And so I am currently playing a 5E adaptation. However from the adventure books that WotC released in 5th edition my favorites are the Lost Mines of Phandelver from the Starter Set and Curse of Strahd, and both of these are more linear story than the others. My experience with the more sandbox adventures isn’t so good: As a player I watched a less experienced dungeon master flounder with Out of the Abyss; I spent hours to prepare Storm King’s Thunder, only to finally give up because the adventure was just too bad; and the Princes of the Apocalypse took me many hours of rewriting and changing into something a bit more linear in order to make it playable.

      Much of the problem is one of presentation. A computer has no problems running a sandbox game, because he has perfect memory. In a game of D&D the information has to go from the adventure book into the head of the dungeon master first, before it can then be told at the table to the players. Humans don’t have perfect memory, and our brains can more easily remember stories than lists of unconnected facts. Human DMs are simply better at stories than they are at sandboxes. Madness at Gardmore Abbey works because it is basically a collection of stories which can be tackled in any order you like. That freedom makes it feel like a sandbox to the players, but the story content is easy to remember for the DM. When I prepare a session for Princes of the Apocalypse, for example my players currently breaking into Rivergard Keep, the presentation of the place by location number and the bits and pieces of story being distributed all over the location descriptions makes finding the stories much harder. I need to read every location back to front, locate the story bits, then read them again to puzzle them together, and finally find where the book simply doesn’t provide much explanation or story and invent some of my own.

      I do like the fact that a place like Rivergard Keep has many different options for the players to tackle it. I’ve looked at YouTube videos of people playing that part of the adventure for inspiration, and various groups have done everything from negotiation, to charming the door guard, to infiltration by water, to frontal assault for this “dungeon”. But a better presentation of the power dynamics in that place and their likely response to attacks sure would have helped: In those YouTube videos I also saw DMs overdoing the response, ending with a near total party kill, and some improbable Deus-ex-machina intervention which saved the party but severely mauled the overall story and credibility.

      Talking of credibility, I found that many WotC adventures of the sandbox style have a serious problem with experience points and levels. Fundamentally WotC is cheating: If you add up the experience points in Princes of the Apocalypse (the only one for which I have actually done the exercise, but I’m sure the problem is the same for the others) and apply WotC’s own level by experience points table, you fall far short of the levels required in the adventure. WotC sells you an adventure that says “level 1 – 15” on the back, but doesn’t actually have enough content in it to actually get a group from level 1 to 15 if you play by their own rules. The “fix” is a so-called milestones system in which the group gains a level at the end of a dungeon in order to have enough levels to tackle the next dungeon. However such a milestones system only works really well with a linear story and order of dungeons; it falls flat in a sandbox adventure where people can do the dungeons out of order, or do them only partially at one visit to come back another time. In my own campaign I had to double the regular monster xp and hand out bonus xp for certain story achievements in order to make the level system work. If I hadn’t done that, the latter dungeons of the adventure would have become quite impossible to beat.

      Overall I believe that the focus on sandbox elements in WotC published adventures is more one of ideology or marketing than one of good game design. The result is that for many of these books as a DM you can’t just take the book and start playing. Even as an experienced dungeon master you need quite a lot of hours of preparation time to first understand all the elements in the book in spite of their chaotic presentation, and then to modify them in order to make them actually work. There is a huge gap in the offer between the very well done Starter Set adventure that can be played by a first time DM with no problem and the following books that can drive even an experienced DM to despair. For an edition which is designed to bring a lot new players and dungeon masters into the game, there really is something missing here.

      10 JavaScript Methods For DOM Manipulation for Web Developers : JavaScript

      JS logo
      To Specify the logical structure of the web pages, we web developers need to manipulate the DOM of the web page. Using this structure we could render HTML elements on the web page. 
      HTML defines the DOM structure. But in many cases we need to disturb this DOM structure to get the required output. We can JavaScript to manipulate this DOM structure.to add more functionalities to it.
      HTML DOM structure
      HTML DOM STRUCTURE
      Here are some functions using which you can manipulate the HTML DOM structure.

      < 1 > querySelectore()

      The querySelecor() methods returns the first element that matches with the mentioned name. If no match found it returns null.
      Although getElementById() is a useful method, querySelector() and querySelectorAll() methods are used to target element based on any CSS selector freely which makes it more flexible.

      Syntax:

      var ele = document.querySelector(selector);

      • ele – First matching element or null (if no element matches the selectors)
      • selector – one or more CSS selectors,  such as #fooid, .fooClassName, .Class1.Class2, or .class1, .class2

      Code Example:

      In this example, first < Div > gets selected with the querySelector() and its colour gets changed. Test the querySelector() method in the following interactive demo. Just type a selector matching the ones you can find inside the blue boxes (e.g. #three ) and click the select button. Note that if you type .block then only first element will get selected.

      See the Pen &amp;amp;amp;amp;amp;amp;amp;lt;a href=’https://codepen.io/kjuvekar/pen/MobqMP/’&amp;amp;amp;amp;amp;amp;amp;gt;MobqMP&amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;gt; by kalpesh juvekar (&amp;amp;amp;amp;amp;amp;amp;lt;a href=’https://codepen.io/kjuvekar’&amp;amp;amp;amp;amp;amp;amp;gt;@kjuvekar&amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;gt;) on &amp;amp;amp;amp;amp;amp;amp;lt;a href=’https://codepen.io’&amp;amp;amp;amp;amp;amp;amp;gt;CodePen&amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;gt;.&amp;amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;amp;gt;

      < 2 > querySelectorAll()

      Unlike querySelector() that returns only the first instance of all matching elements, querySelectorAll() returns all elements that match. those elements are returned as NodeList object that will be an empty object is no matching elements are found.

      Syntax:

      var eles = document.querySelectorAll(selector);

      • eles  – A NodeList object with all matching elements as property values. 

      Code Example:

      HTML:

      <p>paragraph one</p>
      <p>paragraph two</p>
      <div>div one</div>
      <p>paragraph three</p>
      <div>div two</div>

      JavaScript:

      var paragraphs = document.querySelectorAll(‘p‘);for(
      for(var p of paragraphs)p.style.color = ‘
      p.style.color = ‘blue‘;

       < 3 > addEventListener()

      Events refer to what happens to an HTML element, such as clicking, focusing, or loading, to which we can react with JavaScript. We can assign JS functions to listen for these events in elements and do something when the event had occurred.
      There are three ways you can assign a function to a certain event.
      If foo() is a custom function, you can register it as a click event listener (call it when the button element is clicked) in three ways:

      HTML

                 <button onclick=foo>Alert</button>

      JavaScript

                 var btn = document.querySelector(‘button‘);
                 btn.onclick=foo;

      JavaScript

                 var btn = document.querySelector(‘button‘);
                 btn.addEventListener(‘click‘, foo);

      Syntax:

      ele.removeEventListener(evtlistener, [options]);
      • evt – The targeted event. 
      • listener – Typically, a JavaScript function.
      • option – (Optional) An object with a set of Boolean properties.

      Code Example:

      Assign the foo() custom function as an event listener to any of the following events: input, click or mouseover  & trigger the chosen event in the bottom input field by hovering, clicking or typing in it. 

      See the Pen &amp;amp;amp;amp;lt;a href=’https://codepen.io/kjuvekar/pen/jwVeoo/’&amp;amp;amp;amp;gt;add event listner&amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;gt; by kalpesh juvekar (&amp;amp;amp;amp;lt;a href=’https://codepen.io/kjuvekar’&amp;amp;amp;amp;gt;@kjuvekar&amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;gt;) on &amp;amp;amp;amp;lt;a href=’https://codepen.io’&amp;amp;amp;amp;gt;CodePen&amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;gt;.&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;

      < 4 > removeEventListener()

      The removeEventListener() method detaches an event listener previously added with the addEventListener() method from the event it is listening for.

      Syntax

      ele.removeEventListener(evt, listener, [options]);

      Code Example:

      Following the Code Example we used at addEventListener(), here we remove the click event listener called foo from the <button&gt; element.

      JavaScript

      btn.removeEventListener(‘click‘,foo);

      < 5 > createElement()

      The createElement() method creates a new HTML element using the name of the HTML tag to be created, such as ‘p‘ or ‘div‘.
      You can later add this element to the web page by using different methods for DOM insertion, such as AppendChild().

      Syntax

      document.createElement(tagName);

      • tagName – The name of the HTML tag you want to create.

      Code Example:

      To create a new paragraph element:
      var pEle = document.createElement(‘p‘);

       < 6 > appendChild()

      The appendChild() method adds an element as the last child to the HTML element that invokes this method.
      The child to be inserted can be either a newly created element, or an already existing one. In the latter case, it will be moved from its previous position to the position of the last child.

      Syntax:

      ele.appendChild(childEle);

      • childEle – The HTML element added as the last child of ele.

      Code Example:

      Letters from #a to #r are the child elements of the #parent-one, #parent-two, and #parent-three id selectors.
      Check out how the appendChild() method works by typing one parent and one child selector name into the input fields below. You can choose children belonging to another parent as well.

      See the Pen &amp;lt;a href=’https://codepen.io/kjuvekar/pen/BZQvpK/’&amp;gt;appendChild()&amp;lt;/a&amp;gt; by kalpesh juvekar (&amp;lt;a href=’https://codepen.io/kjuvekar’&amp;gt;@kjuvekar&amp;lt;/a&amp;gt;) on &amp;lt;a href=’https://codepen.io’&amp;gt;CodePen&amp;lt;/a&amp;gt;.&amp;lt;br /&amp;gt;

      < 7 > removeChild() 

      The removeChild() method removes a specified child element from the HTML element that calls this method.

      Syntax:

      ele.removeChild(childEle);

      • childEle – The child element of ele.

      Code Example:

      Here we remove the <strong> element we added as a child to the <div> tag at the Code Example for the previous appendChild() method.
      div.removeChild(strong);

      < 8 > replaceChild()

      The replaceChild() method replaces a child element with another one belonging to the parent element that calls this method.

      Syntax:

      ele.replaceChild(newChildEle, oldChileEle)

      • newChildEle – Child element of ele that will replace oldChildEle.
      • oldChildEle – Child element of ele, that will be replaced by newChildEle.

      Code Example:

      Here the child element <strong> belonging to the <div> parent element is replaced with a newly created <em> tag.

      HTML

      <div>
      <strong>hello</strong>
      </div>

      JavaScript

      var em = document.createElement(‘em‘);
      var strong = document.querySelector(‘strong‘);
      var div = document.querySelector(‘div‘);
      em.textContent = ‘hi‘;
      div.replaceChild(em, strong);

      < 9 > setAttribute()

      The setAttribute() method either adds a new attribute to an HTML element, or updates the value of an attribute that already exists.

      Syntax:

      ele.setAttribute(name, value);

      • name – The name of the attribute.
      • value – The value of the attribute.

      Code Example:

      Here we add the contenteditable attribute to a <div> by making use of the setAttribute() method, which will turn its content editable.

      HTML

      <div>hello</div>

      JavaScript

      var div = document.querySelector(‘div‘);
      div.setAttribute(‘
      contenteditable‘, ”)

      < 10 > getAttribute()

      The getAttribute() method returns the value of a specified attribute belonging to a certain HTML element.

      Syntax:

      ele.getAttribute(name);

      • name – The name of the attribute.

      Code Example:

      Here we alert the value of the contenteditable attribute belonging to the <div> element with the help of the getAttribute() method.

      HTML

      <div contenteditable=true>hello</div>

      JavaScript

      var div = document.querySelector(‘div‘);

      alert(div.getAttribute(‘contenteditable‘));

      Learn Web Technology!