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 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.


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!


  • 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.


  • 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.


  • 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.


  • 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.


  • 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”:””});

    < 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=>

      Icons in Bootstrap and MDL


      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!

      Is Trump an ‘Aspiring Despot’ or a ‘Bumbling Showman’? Why Not Both?

      Author Brian Klaas warns the damage of Trump’s presidency will last a generation.

      The presidency of Donald Trump has forced the American people to confront questions most of us had never before considered possible. What happens when a president has no respect for the Constitution and the country’s democratic institutions and traditions? When a president and his allies consider themselves above the law, what is to be done? If a president creates his own version of reality by behaving like a political cult leader, what forms of resistance are effective — or even possible? Is the president of the United States a fascist and demagogue who may be under the influence of the country’s enemies?

      Too many Americans believed their country to be exceptional and unique. This blinded them to the threat to democracy embodied by Donald Trump — as well as other members of the extreme right-wing — until it was too late to stop him from stealing control. Moreover, the rise of Trump’s authoritarian movement (dishonestly operating under the mask of “populism”) has both empowered and revealed the tens of millions of Americans who have authoritarian or fascist leanings. The threat to American democracy is deep; it will take a long time to purge this civic sickness and political disease from the body politic.

      In an effort to understand the true dimensions of Trump’s rise to power as a direct threat to American democracy, I recently spoke with Brian Klaas. He is a fellow in Comparative Politics at the London School of Economics. In addition to writing columns and essays that have appeared in the Washington Post, the New York Times, the Guardian, Foreign Affairs and numerous other publications, Klaas is the author of several books. His latest, published in November, is “The Despot’s Apprentice: Donald Trump’s Attack on Democracy.”

      In our conversation, Klass explained his view that Trump is an aspiring despot whose behavior mimics other authoritarians both past and present, the role of Fox News and other elements of the right-wing media in maintaining and expanding Trump’s malignant reality and power, and the decline of the country’s prestige and influence abroad because of Trump’s regime.

      This conversation has been edited for clarity and length.

      How was Donald Trump able to win the White House?

      I think that there are people who have been legitimately disaffected by stagnant wages for 30 years and growing income inequality. That is part of the story. But that is not the main story, given the backlash against immigration as well as Obama’s presidency and what that tells us about race relations. We also cannot overlook the fact that Trump’s voters have a median household income of about $72,000 a year.

      We also have a third and often not-spoken-about trend where there simply are lots of authoritarian voters in every Western country. Effectively these are people who do not care about democratic processes or procedures; they don’t care about democratic values; they care about winning and they care about the government doing for them.

      What previously existed was a sort of unspoken agreement that elites did not encourage these people. What Trump has done that will have lasting ramifications for the United States is that he has broken that dam and brought fringe elements into the mainstream — and there are now elites who will actually cater to them. But I fear it’s going to be many years, if not decades, before the proverbial Trump genie can be put in the back in the bottle and democracy can be restored to its full and proper functioning.

      Why did the mainstream news media normalize Trump? What explains the allure of the narrative that Trump’s election was somehow about “economic anxiety” as opposed to white racism and racial backlash?

      Because it is a nice story that many of us would like to believe. White racism is central to the story of the rise of Trumpism, and for the media to tell the story about America that basically says, “This president was elected because we have racial problems,” is much harder for people to square with the country’s mythology. I also think many journalists and other observers have very little experience with authoritarianism. I think minorities also saw this coming and were much more aware of it and much more prescient in seeing how damaging Trumpism could be than white people.

      Is Trump a fascist? Why do you think so many in the mainstream media and America’s political class are afraid to describe him using that language, or at aminimumto label him an authoritarian?

      He is an aspiring despot. That distinction is important because I have studied fully authoritarian societies where there are no checks and balances, no free media, no different branches of government, and it is far worse than the United States. But in terms of tactics, there is in immense amount of evidence to support the fact that Trump is behaving like an authoritarian and that he is mainstreaming fascism. Like other despots throughout history, Trump scapegoats minorities and demonizes politically unpopular groups. Trump is racist. He uses his own racism in the service of a divide-and-rule strategy, which is one way that unpopular leaders and dictators maintain power. If you aren’t delivering for the people and you’re not doing what you said you were going to do, then you need to blame somebody else. Trump has a lot of people to blame.

      Others who want to deny that Trump is a fascist or authoritarian will object that he is too bumbling and incompetent for such strong labels to apply.

      I completely disagree. You do not have to be effective to be destructive. Most despots are bumbling. Around the world we have seen examples of how they are often comical idiots and egotistical head cases. Despots are not necessarily the smartest people.

      Trump is extremely destructive. The analogy I use is the idea that democracy is like a sand castle. It takes a long time to build and much longer to perfect. Trump is just washing it away. He is a wave and the castle is not going to be knocked down in one single tide. But the castle, and our democracy, gets eroded steadily over time. That is where we are now. How does a democracy function when a third of its people are cheering authoritarian tactics, embracing them, pushing for more candidates to mimic them, and fundamentally believe a huge number of things that are false? Because if you think about what democracy is, at its core it requires a shared reality to create consent of the governed.

      The long-term corrosion of democracy that Trump is inviting is not going to end when he leaves office. It is going to be a persistent problem where he has opened up the possibility for a much more insidious and effective successor.

      Moreover, I always thought that a Trump-like figure had the potential to break down the barriers between democracy and authoritarianism in America. The dazzling showmanship is essential. So if you imagine a genuinely scary authoritarian, a Mussolini in America type, we would actually stop that person very quickly. By comparison, Trump has this distracting quality because he’s a bumbling showman who seems harmless to some people because of those traits. This has created a creeping authoritarianism where the envelope is being pushed farther all the time.

      Another important aspect of how Trumpism and his petit-fascist movement have taken hold is that the Republican Party is largely in agreement with his agenda. Political polarization and gerrymandering have made Republicans largely immune from accountability by the American people.

      Polarization is absolutely essential as a precursor to authoritarianism because you need to have political tribalism. Republicans are afraid of their base. They are not afraid of a Democrat beating them. This is partly because of demographic clustering, but it’s also largely due to gerrymandering. And gerrymandering intensifies all of the incentives to be extreme. Consequently, if a Republican does not march in lockstep with Trump, he or she may face a primary challenger. The alternative is winning an easy election against a Democrat. On top of that you have Fox News and a broader right-wing echo chamber that are de facto outlets for Trump, akin to some type of state-sponsored media in an authoritarian or dictatorial regime.

      Is there a magic number where a certain percentage of the population has to support an authoritarian for that democracy to fully fail?

      I do not believe that there is necessarily a specific number. What is ultimately most important is the longevity of the person in power and how much of a rebuke they get from the public.

      Therefore, one of the few positive scenarios I have for looking into the future is what I label as “Trump vaccine.” This is basically the idea that because Trump embodies bumbling recklessness and impulsivity, he is a weakened form of authoritarian populist. This means there is a plausible scenario where a sufficient backlash effectively neutralizes him, yet he also exposes all the weaknesses in our democratic system. Ultimately, Trump acts like a vaccine who strengthens the immune system of American democracy.

      But I do not think that is going to happen because America is experiencing the slow decline of its democracy. You see this all the time in places like Turkey or Russia or Belarus, where a quasi-democratic system is getting hollowed out. This pattern of testing the waters is very familiar to me — it’s exactly what [Recep Tayyip] Erdogan has done in Turkey.  He just pushes the envelope every day. And the less backlash there is, the more he does it.

      How much of Trump’s strategy is intentional? Is he just a useful idiot for the Republican Party and other elements of the radical right-wing? 

      Regarding consequences, the distinction is less important. But in terms of intentionality, it is important to understand why someone does what they do. Some of the worst authoritarians in history are not necessarily strategic thinkers.

      I don’t know whether Trump has some sort of grand strategy. Frankly, I would be extremely surprised if he did because virtually nothing Trump does fits into a strategic framework. Many of his goals are being passed and advanced in spite of him, as opposed to because of him. Authoritarians don’t need to have a grand strategy. Because they are narcissists, they are often making it up as they go along.

      What roledoesthe Russia collusion scandal and Trump’s response to Robert Mueller’s investigation play in your analysis of America’s descent into authoritarianism? 

      Any democracy needs to have a functioning rule of law that is separate from politics. In authoritarian states the rule of law is a weapon that the leader uses against his enemies and to reward his friends. The people who are guilty are whoever the authoritarian leader says are guilty. We are sliding down that path before our eyes every day. Trump has threatened Hillary Clinton with jail. He has pardoned a political ally, [former Phoenix sheriff] Joe Arpaio. This is a clear signal from Trump to anybody who is involved in the Russia investigation that he will reward his allies with pardons, and if they turn, that avenue will get cut off. This is very common under authoritarian rule, where justice is dealt out based on alliances and there are investigations of opponents.

      I think the other aspect is obviously related to the notion that the president is above the law. For example, the question is absolutely settled that Donald Trump’s campaign at least attempted to collude with Russia. If they didn’t succeed, then fine. But that does not make the intent any less insidious. It is the equivalent of trying to commit a crime and failing. This is where when Trump gets cornered, if it is between him and the system, there is no question he will try to tear down the system. If politicized rule of law becomes the new normal, how do you return to normal? Trump and his allies are opening up a Pandora’s box that may serve him in the short term politically but is a massive affront to the functioning of American democracy over the long term.

      You are in London now. You have also traveled all over the world. How does America under Donald Trump look to our allies and also to our enemies?

      It is an unprecedented disaster in terms of America’s reputation in the world. He has decimated longstanding alliances and the country’s gravitas across the globe in a matter of months. A survey in June 2017 looked at the change of confidence in United States leadership between Obama and Trump. It fell 75 percent in Germany, 71 percent in South Korea, 70 percent in France, 57 percent in the United Kingdom and 54 percent in Japan. These statistics obscure the fact that the rest of the world sees the United States as a tragic joke. It is immensely embarrassing to be an American abroad. They don’t understand how this person was not absolutely demolished in the election.

      There are also long-term strategic problems that come from what Trump has done to America. People don’t understand that “America First” is actually code for America alone. The more Trump pushes for short-term transactional diplomacy that really does not advance our long-term national interests, the more U.S. power is going to decline and the 21st century is going to be dictated by China.

      Even for the people who want to have a muscular strong America in the world, Trump is an unmitigated disaster.

      What scares you about America under Donald Trump? Is there anything that gives you hope for the future?

      The scariest thing about Trump is the lack of backlash against him. This is enabling the Republican Party’s complicity with him and perhaps causing irreparable damage to American democracy. Trump could have been contained much more effectively if Republicans had stood up to him and upheld the values they professed for a long time in terms of democratic principles.

      I am hopeful because I have many friends who did not care about politics a year ago and do now. If the American people are to save democracy, they must use their voice to impact the system. We are in a critical moment where the way that citizens behave in response to Trump will dictate whether this is a break that can be repaired or the start of some very disturbing developments and the slow death of American democracy.

      The hope lies in the possibility that people stand together, and the 66 percent of the country that does not like Trump sets aside the partisan bickering and says, “We can agree that this person is not fit to be president and that the way that he is behaving is a threat to our democracy.” If this happens, then American democracy can survive and actually improve. It is the only way that Trump and what he has unleashed can potentially have a positive ending.



      Related Stories

      • Paul Krugman: The GOP Is Completely, Hopelessly Corrupt
      • Trump Judicial Nominee Withdraws After GOP Senator Publicly Humiliates Him
      • Trump Considered Rescinding His Neil Gorsuch Nomination Because He Wasn’t Sufficiently ‘Loyal’: Report

      Civilization VI

      I haven’t played Civilization VI yet. I am a fan of the series. But I have too many games and too little time, and I didn’t want to pay full price for yet another iteration of the same game. I was still waiting for the price to come down below $30 when I got the news that the full Civ 6 game has been ported to iOS. Yes, you need a newer iPad to play and it is battery-hungry, but it is the *full* Civ 6, not a toned down mobile version. That is pretty remarkable. So I downloaded the game for free, which lets you play 60 turns with the Chinese empire to see how it works. And then I balked at buying the full version for $60. I didn’t even want to pay that for the PC version, and for an iOS game that is very expensive.

      So while I was still pondering what to do, I got another piece of news: You can this month get Civilization VI (PC version) plus 2 expansions plus a collection of other games in the Humble Bundle Monthly for $12. That is basically a subscription service where you pay $12 per month to get a bundle of games every month. But if you only want Civ 6 you can of course unsubscribe after 1 month. As this is the lowest I have ever seen Civ 6 go for, I ended up buying the game that way.

      Not sure when I will get around to actually play it, I am still very busy with Zelda – Breath of the Wild. But as an opportunity to get Civ 6 cheap this is certainly worth mentioning. The offer is available until the end of the month.

      Want to switch your provider? Soon you’ll be able to do it with a single text in the UK

      • UK regulatory body Ofcom is introducing a new way to move mobile providers called “auto-switch”
      • Under the new rules, consumers will be able to switch networks with a single free text message
      • The rules will come into play in July 2019

      Switching your network carrier can be an absolute nightmare what with all the different deals, new customer bonuses, and contractual small print to consider –  and that’s before all of the “please stay with us” phone calls you have to grit your teeth through when calling your current carrier.

      Thankfully, the process has been getting easier in recent years, with improvements to number porting and simpler ways of unlocking phones. Now, in the UK at least, swapping providers is about to get even easier thanks to a new system set to be implemented by the regulatory body, Ofcom.

      Dubbed “auto-switch”, Ofcom’s new rules distill most of the arduous process into a single code that does everything for you. Said code comes directly from your current operator via an online form, a phone call, or even a quick free text message.

      Editor’s Pick

      Once you have the code, all you need to do then is head over to whichever network you want to switch to, sign up, and provide them with the code. Think of it as a Porting Authorization Code (PAC code), but for your entire account.

      Even better, once the code has been processed your old contract will terminate immediately, effectively ending any confusion or additional charges that might arise from the usual 30-day notice periods. The new system also lets you switch early by paying off your current contract when you originally request an auto-switch code.

      If any of that has confused you (I was, if only because it sounds far too good to be true), Ofcom has provided a handy cartoon that shows the entire process in four simple steps which you can see below. As a result of the changes, Ofcom says it will be saving UK consumers around £10 million each year due to the ban on notice periods.

      The sweeping changes will no doubt delight buyers, but Ofcom is fully aware that the new rules will put a lot of pressure on the current systems operators have in place. To help usher in the new age of easy-switching, Ofcom is setting a deadline of July 1st, 2019 so providers can make the necessary changes.

      What do you think of the changes? Let us know in the comments.

      Samsung Galaxy A8 and A8 Plus (2018) specs: Infinity Display and a dual selfie camera

      There’s no denying that Samsung’s S-series has boasted some of the finest flagships ever made, but sometimes there’s no match for a bonafide bargain, and that’s what the South Korean giant seems to be delivering with its newly-announced A-series phones, the Galaxy A8 (2018) and Galaxy A8 Plus (2018).

      As the new gold standard of Samsung’s mid-tier range, the Galaxy A8 and A8 Plus look to balance premium design with a steady performance all while retaining a modest price tag. On paper, this year’s A8 phones – which technically replace the Galaxy A5 and Galaxy A7, respectively – appear to deliver on all counts.

      Editor’s Pick

      This time around both the 5.6-inch A8 and the 6-inch A8 Plus sport an elongated Infinity Display with the same 18:5:9 aspect ratio found on the Galaxy S8, S8 Plus, and Note 8. Both panels are Super AMOLED displays with a 2220 x 1080 resolution.

      Despite missing out on the curved edges of its premium counterparts, the A8 and A8 Plus both pack slimline bezels, while leaving enough room for the devices’ most unique feature – a front-facing 16 MP and 8 MP dual-camera. We’ll be putting the pair’s selfie-taking credentials and much more to the test at a later date for a full review, but for now, be sure to check out the table below for all of the key specs.

        Samsung Galaxy A8 (2018) Samsung Galaxy A8 Plus (2018)
      Display 5.6-inch FHD+ Super AMOLED
      2,220 x 1,080 resolution
      441 ppi
      18:5:9 aspect ratio
      6-inch FHD+ Super AMOLED
      2,220 x 1,080 resolution
      412 ppi
      18:5:9 aspect ratio
      Processor Unspecified octa-core platform
      2.2 Ghz + 1.6 Ghz
      Unspecified octa-core platform
      2.2 Ghz + 1.6 Ghz
      RAM 4 GB 4/6 GB
      Storage 32/64 GB 32/64 GB
      MicroSD Yes, up to 256 GB Yes, up to 256 GB
      Cameras Rear camera:
      16 MP sensor with f/1.7 aperture, phase-detection auto-focus, video digital image stabilisation (VDis) technology, hyperlapse, and Food Mode

      Front camera:
      16 MP + 8 MP sensor with f/1.9 aperture and Live Focus

      Rear camera:
      16 MP sensor with f/1.7 aperture, phase-detection auto-focus video digital image stabilisation (VDis) technology, hyperlapse, and Food Mode

      Front camera:
      16 MP + 8 MP sensor with f/1.9 aperture and Live Focus

      Audio 3.5mm headphone jack
      3.5mm headphone jack
      Battery 3,000 mAh
      Fast charging
      3,500 mAh
      Fast charging
      Sensors Accelerometer Barometer
      Fingerprint sensor Gyro sensor Geomagnetic sensor Hall sensor
      Proximity sensor
      RGB light sensor
      Accelerometer Barometer
      Fingerprint sensor Gyro sensor Geomagnetic sensor Hall sensor
      Proximity sensor
      RGB light sensor
      IP rating IP68 water and dust resistance IP68 water and dust resistance
      Network TBC
      LTE Cat. 11
      LTE Cat. 11
      Connectivity Wi-Fi 802.11 a/b/g/n/ac (2.4 & 5 GHz)
      Bluetooth 5.0
      Location (GPS, Glonass, BeiDou)
      USB Type-C 2.0
      Wi-Fi 802.11 a/b/g/n/ac (2.4 & 5 GHz)
      Bluetooth 5.0
      Location (GPS, Glonass, BeiDou)
      USB Type-C 2.0
      Software Android 7.1.1 Nougat Android 7.1.1 Nougat
      Colors Black, Orchid Grey, Gold, and Blue Black, Orchid Grey, Gold, and Blue
      Dimensions and weight 149.2 x 70.6 x 8.4 mm
      172 g
      159.9 x 75.7 x 8.3 mm
      191 g

      Be sure to let us know your thoughts on the Samsung Galaxy A8 (2018) and A8 Plus (2018) specs in the comments below! Is its dual-camera for selfies and (near) bezel-less design won you over?

      Surviving Holiday Heart Attack Season: A Cardiologist’s Advice

      More people die from heart disease between December 25 and January 7 than at any other time of the year.

      It’s almost that time of year: holiday heart attack season. More people die from heart disease between December 25 and January 7 than at any other time of the year. What’s the answer? Healthier food. As a cardiologist, I’m calling on hospitals to lead by example. Historically, some hospitals have been known for serving their heart attack patients breakfasts of bacon and eggs, conveying a message to patients and families that food does not matter.

      That is all about to change. Earlier this year, the American College of Cardiology released Heart-Healthy Food Recommendations for Hospitals, which says that “hospitalization can be a ‘teachable moment’ for patients who are ready to embrace nutrition as part of the healing process.” The ACC recommends having plant-based main dishes available at every meal. It also says that processed meats—bacon, sausage, ham, hot dogs, and deli meats—should be off the menu entirely. The American Medical Association followed suit, calling for similar improvements in hospital food offerings: out with the bacon and sausage, in with the vegan choices.

      The plan could save hundreds of thousands of lives a year. A study published this year in the Journal of the American Medical Association linked not eating enough fruits, vegetables and grains to more than 150,000 cardiovascular deaths a year and too much processed meat to 60,000 deaths.

      Are you serious? you might be asking. Will hospitals really serve vegan (plant-based) meals, and will patients really eat them (and like them)? The answer is absolutely yes. A generation ago, hospitals banned cigarettes, and the grumbling from smokers ended almost immediately. It was a clear-cut message about what is healthy and what is not. It’s time to do the same with unhealthy foods.   

      The ACC and AMA recommendations also have benefits beyond heart health. A recent report from the World Cancer Research Fund and the American Institute for Cancer Research found that eating three servings of whole grains per day reduces colorectal cancer risk by 17 percent, while eating just 50 grams of processed meat per day—about the size of a hot dog or a couple of slices of bacon—increases the risk of colorectal cancer by 18 percent. 

      Other organizations, like the nonprofit Physicians Committee for Responsible Medicine, are working in hospitals to make healthful hospital food a reality. This year, the Physicians Committee successfully encouraged the University of Mississippi Medical Center and Arkansas Children’s Hospital to remove hot dogs from patient menus, and convinced others to kick out fast food restaurants. The doctors’ group also produced a Heart-Healthy Foods for Hospitals booklet, which includes delicious plant-based recipes: Apple Sweet Potato Breakfast Bake, Cheezy Potato and Veggie Breakfast Casserole, and Mexican Lasagna. It also makes hospital managers’ lives easier by providing list of contractors that provide heart-healthy foods, tips from professionals for how to successfully implement the plan, handouts for patients and cafeteria signage.

      In other words, the change could not be easier. Let’s resolve to eat healthfully, and let’s start with our hospitals. While some hospitals are starting to do this, let’s see if we can get them all to take this on in a whole-hearted approach. Instead of being the riskiest time of year, let’s work together to make the holiday season the healthiest.


      Related Stories

      • Meat-Eaters Have Significantly Higher Blood Pressure Than Vegetarians, Vegans
      • Do You Do These 5 Things With Your Cellphone That Health Officials Say You Shouldn’t?
      • Pharmaceutical Company Billionaire and Wife Found Dead in ‘Suspicious’ Circumstances

      Test Your SQL Basics – Part_2

      Conversion Functions Questions

      1. What will be the outcome of the following query?
      SELECT ROUND(144.23,-1) FROM dual;
      1. 140
      2. 144
      3. 150
      4. 100

      2. Which of the following commands is used to count the number of rows and non-NULL values in Oracle database?
      1. NOT NULL
      2. INSTR
      3. SUBSTR
      4. COUNT

      3. Which of the following statements are true regarding the single row functions?
      1. They accept only a single argument.
      2. They can be nested only to two levels.
      3. Arguments can only be column values or constants.
      4. They can return a data type value different from the one that is referenced.

      4. Which of the following type of single-row functions cannot be incorporated in Oracle DB?
      1. Character
      2. Numeric
      3. Conversion
      4. None of the above

      5. Which of the following is true for the statement given as under.
      NVL2 (arg1, arg2, arg3)
      1. Arg2 and Arg3 can have any data type
      2. Arg1 cannot have the LONG data type
      3. Oracle will convert the data type of expr2 according to Arg1
      4. If Arg2 is a NUMBER, then Oracle determines the numeric precedence, implicitly converts the other argument to that datatype, and returns that datatype.

      6. What is true about the NULLIF function in Oracle DB?
      1. NULLIF(expr1,expr2) will return expr2 if the two expressions are NOT NULL.
      2. NULLIF(expr1,expr2) will return 0 if the two expressions are NULL.
      3. NULLIF(expr1,expr2) will return NULL if the two expressions are equal.
      4. Expr1 can be NULL in NULLIF(expr1, expr2)

      7. Which of the following is not a property of functions?
      1. Perform calculations on data
      2. Convert column data types
      3. Modify individual data items
      4. None of the above

      8. What is the most appropriate about single row functions?
      1. They return no value
      2. They return one result per row and operate on all the rows of a table.
      3. They return one result per row with input arguments
      4. They return one result per set of rows and operate on multiple rows.

      9. What is the number of arguments Single Row functions accept?
      1. 0
      2. Only 1
      3. Only 2
      4. 1 or more than 1

      10. Which of the following is an exception to the return value of a DATE type single-row function?
      1. TO_DATE
      2. SYSDATE
      4. TO_NUMBER

      11. What is true about the CONCAT function in Oracle DB?
      1. It can have only characters as input.
      2. It can have only 2 input parameters.
      3. It can have 2 or more input parameters
      4. It joins values by putting a white space in between the concatenated strings by default.

      12. What is true about the SUBSTR function in Oracle DB?
      1. It extracts a string of determined length
      2. It shows the length of a string as a numeric value
      3. It finds the numeric position of a named character
      4. It trims characters from one (or both) sides from a character string

      1-A,   2-D,   3-D,   4-D,  5-D,   6-C,   7-D,   8-B,   9-D,  10-C,   11-B,  12-A

      function grpf() { var x = document.getElementById(‘myDIV1’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

      Using the Group Functions Questions

      1. Which of the following is NOT a GROUP BY function?
      1. MAX
      2. MIN
      3. NVL
      4. AVG

      2. What are the appropriate data types accepted by GROUP BY functions?
      1. Nested Tables
      2. NUMBER
      3. CLOB
      4. DATE

      3. A table T_COUNT has 12 number values as 1, 2, 3, 32, 1, 1, null, 24, 12, null, 32, null. Predict the output of the below query.
      SELECT COUNT (ALL num) FROM t_count;
      1. 12
      2. 6
      3. 9
      4. Throws exception because COUNT function doesn’t works with NULL values

      4. Which of the following is NOT a GROUP BY extensions in SQL?
      1. GROUP BY
      3. CUBE
      4. ROLLUP

      5. Which of the following statements is true about the group functions?
      1. The MIN function can be used only with numeric data.
      2. The MAX function can be used only with date values.
      3. The AVG function can be used only with numeric data.
      4. The SUM function canít be part of a nested function.

      6. Which of the following functions is used to calculate the total value stored in a specified column?
      1. COUNT
      2. ADD
      3. TOTAL
      4. SUM

      7. Which of the following functions can be used to include NULL values in calculations?
      1. SUM
      2. NVL
      3. MAX
      4. MIN

      8. Determine the correct order of execution of following clauses in a SELECT statement.
      4.GROUP BY
      6.ORDER BY
      1. 2-3-4-5-1-6
      2. 1-2-3-4-5-6
      3. 6-5-4-3-2-1
      4. 5-4-2-3-1-6

      9. What is true of using group functions on columns that contain NULL values?
      1. Group functions on columns ignore NULL values.
      2. Group functions on columns returning dates include NULL values.
      3. Group functions on columns returning numbers include NULL values.
      4. Group functions on columns cannot be accurately used on columns that contain NULL values.

      10. Which of the following statements are true?
      1. AVG and SUM can be used only with numeric data types.
      2. STDDEV and VARIANCE can be used only with numeric data types.
      3. MAX can be used with LONG data type.
      4. MAX and MIN cannot be used with LOB or LONG data types.

      11. Up to how many levels, the group functions can be nested?
      1. 1
      2. 2
      3. 3
      4. No limits

      12. Which of the following are true about the CUBE extension of GROUP BY?
      1. Enables performing multiple GROUP BY clauses with a single query.
      2. Performs aggregations for all possible combinations of columns included.
      3. Performs increasing levels of cumulative subtotals, based on the provided column list.
      4. None of the above

      1-C,   2-B,   3-C,   4-A,  5-C,   6-D,   7-B,   8-A,   9-A,  10-(A,B,D),   11-B,  12-B

      function mtqq() { var x = document.getElementById(‘myDIV2’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

      Get Data from Multiple Tables Questions

      1.Which of the following is not related to a Relational Database?
      1. Selection
      2. Projection
      3. Joining
      4. None of the above

      2.Which of following will be used to join rows with other tables if the column values fall in a range defined by inequality operators?
      1. Equijoin
      2. Simple join
      3. Non-equijoin
      4. None of the above

      3.What is true about a cartesian join of two tables in Oracle DB?
      1. It must be avoided as it is costly and non optimized
      2. It is formed when every row from one table is joined with all rows in the second table
      3. Both A and B
      4. None of the above

      4.What is the main condition for using joins between a source table and a target table in Oracle DB for getting a non-cartesian product result?
      1. There is no condition
      2. At least one of the columns in both the tables should be common.
      3. The names of the columns in both the joining tables should be the same for using joins
      4. None of the above

      5.What is true about Natural joins in Oracle DB?
      1. The column names of the source and the target tables should be identical
      2. If the column names of the source and the target tables are not same, Oracle implicitly does the needful
      3. NATURAL JOINS, USING and ON are the keywords associated with Natural Joins
      4. All of the above

      6. The database designer has named the key (unique) columns from two tables differently.While joining these tables, which among the following will be the best practice?
      1. JOIN..ON
      2. Either NATURAL JOIN or JOIN…ON clauses
      3. Both A and B
      4. None of the above

      7. What are Cartesian Joins also known as in Oracle DB?
      1. Equi-join
      2. Anti-join
      3. Cross-Join
      4. None of the above

      8.Which of the following is used to avoid the ambiguous column problem in Oracle DB?
      1. ;
      2. ,
      3. .
      4. /

      9.How many tables can be joined by using the JOINS in Oracle DB?
      1. 1
      2. 2
      3. 255
      4. No limit

      10.What is true about Non-equijoins in Oracle DB?
      1. They join based on the keyword NON-EQUI JOIN
      2. They are used using the JOIN..ON clause with “=” sign
      3. The results are obtained when the result of the inequality mentioned evaluates to true.
      4. None of the above

      11.On which of the following conditions is a row returned when an EQUI-JOIN is used to join tables?
      1. The result of the inequality match operation is true
      2. The result of the inequality match operation is 0
      3. The result of the inequality match operation is 1
      4. The result of the inequality match operation is false

      12.In what scenarios can we use Self-Joins ideally in Oracle DB?
      1. When we need to find the duplicate records in a table
      2. When we need to obtain NULL values from a table
      3. When we need to display a column of a table twice
      4. When we need to display hierarchy of relevant entities

      1-D,   2-C,   3-B,   4-B,  5-C,   6-A,   7-C,   8-C,   9-D,  10-C,   11-A,  12-D

      function sq() { var x = document.getElementById(‘myDIV3’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

      Subqueries to Solve Queries Questions

      1. Which of the following are the types of sub-queries?
      1. Ordered sub-queries
      2. Grouped sub-queries
      3. Single row sub-queries
      4. None of the above

      2.Which of the following clause is mandatorily used in a sub-query?
      1. SELECT
      2. WHERE
      3. ORDER BY
      4. GROUP BY

      3.In which of the following clauses can a sub-query be used?
      1. HAVING
      2. WHERE
      3. FROM
      4. All of the above

      4.Which of the following single-row operators can be used for writing a sub-query?
      1. >=
      2. <
      3. =
      4. All of the above

      5.What among the following is true about sub-queries?
      1. Sub-queries can be written on either side of a comparison operator
      2. Parenthesis is not mandatory for sub-queries
      3. Single-row sub-queries can use multi-row operators but vice versa is not possible
      4. All of the above

      6.What among the following is true about single-row sub-queries?
      1. They return only one row
      2. They use single-row operators
      3. Both A and B
      4. None of the above

      7.Which of the following are valid multi row operators used for sub-queries?
      1. <=
      2. ANY >=
      3. !=
      4. >=

      8.What does the ANY operator evaluates to in the above query?
      1. TRUE
      2. FALSE
      3. NULL
      4. 0

      9.What can be said about the < ANY operator in the query given above?
      1. It gives the maximum value of salary
      2. It gives the minimum value of salary
      3. It means it gives the values that are lesser than the highest
      4. None of the above

      10.What will be the outcome of the above query (the option A in the question above), if the < ALL is replaced with the >ALL?
      1. It will execute successfully giving the same result.
      2. It will throw an ORA error
      3. It will execute successfully but give the employees’ details who have salaries lesser than all the employees with job_id ‘FI_ACCOUNTANT’.
      4. None of the above

      11.What is true about sub-queries in general?
      1. Sub-queries have to be executed separately from the main queries
      2. Sub-queries can be executed at the will of the user, they are not related to the main query execution
      3. Sub-queries are equal to two sequential queries where the results of inner query are used by the main query
      4. All of the above

      12. What should be the best practice to follow when we know what values we need to pass on to the main query in Oracle queries?
      1. Using GROUP BY
      2. Using sub-queries
      3. Using HAVING
      4. None of the above

      13.What is the maximum number of nesting level allowed in an Inline View type sub-query?
      1. 255
      2. 300
      3. 216
      4. Unlimited

      1-C,   2-A,   3-D,   4-D,  5-A,   6-C,   7-B,   8-A,   9-C,  10-C,   11-C,  12-D,   13-D

      function sqq() { var x = document.getElementById(‘myDIV4’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

      Using the Set Operators Questions

      1.Which SET operator does the following figure indicate?
      Table UNION
      1. UNION
      2. UNION ALL
      3. INTERSECT
      4. MINUS

      2.Which SET operator does the following figure indicate?
      Table INTERSECT
      1. UNION
      2. UNION ALL
      3. INTERSECT
      4. MINUS

      3.What is true about the UNION ALL operator?
      1. It returns rows from the combined queries along with NULL values
      2. It returns rows for the combined queries after eliminating duplicates
      3. It returns rows for the combined queries along with duplicate values
      4. It returns rows for the combined queries ignoring the NULL values

      4.What is the precedence of the set operators UNION, UNION ALL, INTERSECT and MINUS?
      4. Equal precedence

      5.What is the order of evaluation of set operators?
      1. Left to Right
      2. Right to Left
      3. Random Evaluation
      4. Top to Bottom

      6.What among the following is true about SET operators?
      1. SET operators cannot be used in sub-queries
      2. SET operators can only be used in the WHERE clause
      3. ORDER BY can be used for all queries combined by a SET operator
      4. SET operators can be used in sub-queries

      7.What is the best way to change the precedence of SET operators given the fact that they have equal precedence?
      1. The order of usage of the SET operators can be changed to change the precedence
      2. The equal precedence cannot be changed
      3. Parenthesis can be used to change the precedence
      4. None of the above

      8.What will happen if the SELECT list of the compound queries returns both a VARCHAR2 and a NUMBER data type result?
      1. Oracle will convert them implicitly and return a VARCHAR2 data type result
      2. Oracle will convert them implicitly and return a NUMBER data type result
      3. An ORA error is thrown
      4. None of the above

      9.What is true about the UNION operator?
      1. It eliminates the duplicate values ignoring NULL values
      2. It returns duplicate values ignoring NULL values
      3. It returns duplicate values including NULL values
      4. It eliminates duplicate values and does not ignore NULL values

      10.What is true about the INTERSECT operator?
      1. The number of columns and data types of the columns in the component queries should be the same
      2. The names of the columns and data types of the columns in the component queries should be the same
      3. Both A and B
      4. None of the above

      11.What can be said about the result set if the order of the intersected tables is altered when using INTERSECT?
      1. The result is altered
      2. The result remains the same
      3. The sorting changes on alteration
      4. None of the above

      1-A,   2-C,   3-C,   4-D,  5-(A,D),   6-D,   7-C,   8-C,   9-D,  10-A,  11-B

      function condi() { var x = document.getElementById(‘myDIV5’); if ( === ‘block’) { = ‘none’; } else { = ‘block’; } }

      Learn Database Programming?