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!

      Working with Microsoft SQL Server


      MS SQL Server


      What is SQL Server Management Studio?

      SQL Server Management Studio (SSMS) is the main administration console for SQL Server.


      SSMS enables you to create database objects (such as databases, tables, stored procedures, views etc), view the data within your database, configure user accounts, perform backups, replication, transfer data between databases, and more.

      Fig 3 : SSMS Console Window


      User Login :


      When creating a new user login, the administrator can assign that login to any number of roles and schemas. This will depend on what that particular login is entitled to.


      Create a New Login

      Step 1 :  Using SQL Server Management Studio, expand the Security option (at the
      server level, not at the database level) and right click n Logins.

      Step 2 :  Click on New Login.

      Step 3 :   Complete the login properties in the General tab by providing a name for the login, choosing the Authentication method (providing a password if you choose SQL Server authentication), and selecting the database to use as a default.

      Step 4 :   Click the Server Roles tab if you need to apply any server-wide security privileges.


      Step 5 :
      Click the User Mapping tab to specify which databases this user account is allowed to    access. By default, the login will be assigned to the Public role, which provides the login with basic access.
       If the login needs more access in one or more databases, it can be assigned to  another role with greater privileges. In this case, select Task Tracker database  and  db_owner role for that database.
      Step 6 :  Click OK to create the login.


      NOTE :
      These roles are database roles and are different to the server roles in the previous tab. Server roles are for administering the SQL Server. Database roles are more limited. They are created within each database and specify what the login can do within that particular database.




      Fig : Server Roles

      Server Roles :


      When we created a SQL Server login, we had the option of assigning the login one or more server roles. Server roles (not to be confused with database roles) are available to manage permissions on a server.


      View the server roles in SSMS, from the Object Explorer, expand the Security folder







      Database :

      A database is a collection of information that is organized so that it can be easily accessed, managed and updated.
      Creating a database can be done by running a SQL script or by “point and click”. 


      System Databases

      When you install SQL Server, the following four databases are created.
      1.master
      This database stores system level information such as user accounts, configuration settings, and info on all other databases.
      2.model
      This database is used as a template for all other databases that are created.
      3.msdb
      The msdb database is used by the SQL Server Agent for configuring alerts and scheduled jobs etc
      4.tempdb


      This one holds all temporary tables, temporary stored procedures, and any other temporary storage requirements generated by SQL Server.  


      Create Database :

      Fig 4 : Create DB 
      The following steps demonstrate how to create a database in SQL Server 2014 using SQL Server Management Studio.

      Step 1 : From the Object Explorer, right click on the Databases folder/icon and select New Database

      Step 2 : 
      Name your database and click OK:


      Database with the Given Name will be created.

      NOTE :
      The new database is based on the Model database (System Database).
      It already contains system functions, system views, system stored procedures, and (hidden) system tables. These are system objects which provide information about the database.


      Create Table :

      Fig 5 : Create Table
      Steps to create a table in a database using SQL Server Management Studio (SSMS).

      Step 1 :   Ensuring you have the correct database expanded (in our case, the TaskTracker database), right click on the Tables icon and select Table

      Step 2 :   A new table will open in Design view. Fill in Column_name, Datatype & if(Null) checkbox for making column .
        ( for more options such as PRIMARY KEY, is Identity, etc. right click on left pane of  required tuple to add property )

      Step 3 :   Save the table by selecting File > Save able_1 or by right-clicking on the Table’s  tab and selecting. 
      Save Table_1  from the contextual menu:  





      Insert Data :
      There are many ways of getting data into your database. 



      1.Manually: Type data directly into your table rows.


      2.Copy/Paste: Similar to the previous option, but this one is where you copy data from another source, then paste it into a table in your database.

      3.Import: You can use the Import and Export Wizard to import data from another source.

      4.SQL Scripts: You can run a SQL script that contains all data to insert.

      5.Application/Website: Users update the database via an application or website.





      1. Manually


      We can use the Edit Top 200 Rows option to manually type data directly into the table rows. Manually entering data is OK if you only have a little bit of data to enter.


      Steps :
      1. In the Object Explorer, right click on the table you wish to open, and select Edit Top 200 Rows:
      2.You can now start entering the data directly into your table.


      2. Copy/Paste


      You could use a similar method to the above by copying from another datasource and pasting into your database table. This is OK for a small number of records but not for a lot of records.


      Steps :

      1. Select all required records from the datasource

      2. In the destination database (i.e. the one you want to populate with data), right-click on the destination table and select Edit Top 200 Rows. 

      3. Select an empty row by right-clicking in the left-most column (it’s more of a button to the left of your left-most column that allows you to select the whole row) and select Paste from the contextual menu:


      3 (a). Import 
      You can import data from another datasource. The end result is similar to the copy/paste method (i.e. data is copied across to the destination database), but importing the data is more flexible and could be more suitable on many occasions.

      Steps :
      To import data, right-click on the database and select Tasks > Import Data… and follow the Wizard from there.

      The SQL Server Import and Export Wizard can copy data to and from any data source for which a managed .NET Framework data provider or a native OLE DB provider is available. These include:
      •SQL Server
      •Flat files
      •Microsoft Office Access
      •Microsoft Office Excel


      Start the SQL Server Import and Export Wizard to import data from an Excel worksheet to a SQL Server database. Click Next to bypass the welcome screen. On the Choose a Data Source page (Figure 8), configure the following:

      Fig 6: Import Wizard


      Step 1 : (Data Source)
      Choose Microsoft Excel from the drop-down menu.

      Step 2 : (Excel File Path )
      Specify the path of the Excel file from which you are importing data.

      Step 3: (Excel Version)
      Choose the Excel version where you created the Excel.

      Click Next to go to the Choose a Destination page (Figure 9), and configure the following:



      Step 4 : (Data Source)
      Choose SQL Server Native Client 11.0 from the drop-down menu.

      Step 5 : (Server Name )
      Fig 7 : Import Wizard Client

      Type the name of the destination database’s SQL Server instance.

      Step 6 : (Authentication)
      Choose the appropriate authentication mode for the data destination connection.

      Step 7 : (Database )
      Choose which database to copy the data into.








      Fig 8 : Finish Import

      Step 8 :
      Click the Next button to go to the Save and Run Package page. Here, select the Run immediately option and click the Next button. 

      This takes you to the Complete the Wizard page where you can view the choices you made.

      Click Finish to run the package.




      3 (b). Exporting data  (from a SQL Server DB to a Microsoft Excel worksheet) :

      To export data, start the SQL Server Import and Export Wizard. Then, click the Next button to bypass the Welcome Screen. On the Choose a Data Source page configure the following:

      Step 1 : (Data Source )
      Fig 9 : Export Wizard

       Choose SQL Server Native Client 11. from the drop-downmenu.

      Step 2 : ( Server Name)
      Type the name of the SQL Server instance that contains the source data.

      Step 3 : (Authentication)
      Choose authentication mode for the data source connection.

      Step 4 : (Database)
       Choose the database that contains the source data.
      Click Next to go to the Choose a Destination page (Figure 2). On this page, configure the following:





      Fig 10 : Export Wizard Target

      Step 5 : (Destination)
      Choose Microsoft Excel from the drop-down menu.

      Step 6: (Excel File Path)
      Type in the Microsoft Excel worksheet operating system path.

      Step 7 : (Excel Version)
      Select the version of the Microsoft Excel worksheet.





      Step 8:
      Fig 11 : Finish Export 

      Click the Next button to go to Review Data Type Mapping page. 

      This is where you’ll see how different data types are mapped between the source and the destination and how any conversions issues will be handled.

      Follow the wizard ahead.




      4. SQL Scripts :
      In many cases, you will find it more efficient to run a SQL script that contains the data you need to insert. You can use the SQL INSERT statement to insert just the data you specify in the statement.

      Eg :
      USE [Database_Name] 
      GO
      INSERT INTO Table_Name (column_name1,column_name2,column_name3) VALUES (‘val1’, ‘val2’, ‘val3’)
      5. Application / Website


      Server databases are the backend data storage for a front-end application. Users of the application are responsible for adding data to the database (as well as editing it). 
      The Difference between these scripts and above scripts is, these scripts are dynamic. i.e Parameters are passed dynamically to the database.

      T-SQL Scripts :

      1. Create Database :
      Creates a user defined database which can hold n number of user defined tables.

      Syntax :
      Create database

      Query :
      CREATE DATABASE SCTPL


      2. Create Table :
      Creates a user defined table which can hold n number of column with their respective constraints defined by user.

      Syntax :
      USE [DatabaseName]
      GO
      CREATE TABLE table_name
      (
      column_name1 Datatype,
      column_name2 Datatype,
      column_name3 Datatype
      )

      Query :
      USE [SCTPL]
      GO
      CREATE TABLE Testdb
      (
      PrimaryID  int PRIMARY KEY IDENTITY,
      Year  varchar(255)
      )

      3. Drop Table :
      The SQL Server DROP TABLE statement is used to remove a table definition and all data, indexes, triggers, constraints, and permission specifications for that table.

      Syntax :
      USE [Database_Name]
      GO
      DROP TABLE table_name

      Query :
      USE [SCTPL]
      GO
      DROP TABLETEST


      4. Insert Into :

      The SQL Server INSERT INTO statement is used to add new rows of data to a table in the database.

      Syntax :
      USE [Database_Name]
      GO
      INSERT INTO Table_Name (column_name1,column_name2,column_name3) VALUES(‘val1’, ‘val2’, ‘val3’)

      Query :
      USE [Database_Name]
      GO
      INSERT INTO Table_Name (Year, Country, Location)
      VALUES (‘1996′,’Nigeria’,’Akwa Ibom’)
      4. Select :
      SQL Server SELECT statement is used to fetch the data from a database table which returns data in the form of result table. These result tables are called result-sets.
      Syntax :
      /*For selecting all entries*/
      USE [Database_Name]
      GO
      SELECT * FROM TEST
      /*For selecting Specific entries*/
      USE [Database_Name]
      GO

      SELECT column_name1, column_name2 FROM Table_name


      Query :
      /*For selecting all entries*/
      USE [Database_Name]
      GO
      SELECT * FROM TEST
      /*For selecting Specific entries*/
      USE [SUVEN]
      GO
      SELECT Year, Country FROM TEST
      5. Update :
      The SQL Server UPDATE Query is used to modify the existing records in a table.
      You can use WHERE clause with UPDATE query to update selected rows otherwise all the rows would be affected.

      Syntax :
      /* Type 1 */
      Use [Database_Name]
      GO
      UPDATE table_name SET column1 = value1, column2 = value2…., columnN = value WHERE [condition]
      /* Type 2 */
      USE [Database_Name]
      GO
      UPDATE TABLE_NAME
      SET COLUMN_NAME = ‘val1′, Column_name =val


      Query :
      /* Type 1 */
      USE [SUVEN]
      GO
      UPDATE TEST
      SET Location = ‘RenamedColumn Akwa-Ibom
      WHERE Location = ‘Akwa Ibom
      /* Type 2 */
      UPDATE CUSTOMERS SET ADDRESS = Pune‘, SALARY = 1000.00



      6. Delete :
      The SQL Server DELETE Query is used to delete the existing records from a table.
      You have to use WHERE clause with DELETE query to delete selected rows, otherwise all the records would be deleted.

      Syntax :
      /*For selecting specific entries*/
      USE [Database_Name]
      GO
      DELETE FROM table_name WHERE [condition]
      /*For selecting all entries*/
      DELETE FROM column_name

      Query :
      /*For selecting specific entries*/
      USE [SUVEN]
      GO
      DELETE FROM TEST
      WHERE SALARY = 1000
      /*For selecting all entries*/
      DELETE FROM Location



      Clauses

      1. WHERE Clause:

      The MS SQL Server WHERE clause is used to specify a condition while fetching the
      data from single table or joining with multiple tables.

      If the given condition is satisfied, only then it returns a specific value from the table. You will have to use WHERE clause to filter the records and fetch only necessary records.
      The WHERE clause is not only used in SELECT statement, but it is also used in

      UPDATE, DELETE statement, etc.


      Syntax :
      SELECT column1, column2, columnN FROM table_name WHERE [condition]

      Query:
      SELECT name FROM Stud WHERE id=1


      2. LIKE  Clause:

      The MS SQL Server LIKE clause is used to compare a value to similar values using wildcard operators. There are two wildcards used in conjunction with the LIKE operator 
      1. The percent sign (%)
      2. The underscore (_)
      The percent sign represents zero, one, or multiple characters. 
      The underscore represents a single number or character. The symbols can be used in combinations.

      Syntax:


      /* Type 1 */
      SELECT *column-list FROM table_name WHERE column LIKE ‘%XXXX%’
      /* Type 2 */
      SELECT *column-list FROM table_name WHERE column LIKE ‘_XXXX_’

      Query:

      /* Type 1 */
      SELECT name from Stud
      WHERE sid LIKE ‘200%’
      (Finds any values that start with 200)
      /* Type 2 */
      SELECT name from Stud
      WHERE SALARYLIKE ‘_00_’
      Finds any values that have 00 in the second and third positions & is of four characters. 


      3. ORDER BY


      The MS SQL Server ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns. Some database sort query results in ascending order by default.


      Syntax :

      Use DatabaseName
      Go
      SELECT columnlist FROM table_name [WHERE condition] [ORDER BY column1, column2, .. columnN] [ASC | DESC]

      Query :

      /*TYPE 1*/
      Use SUVEN
      Go
      SELECT * FROM Stud ORDER BY NAME

      /*TYPE 2*/

      SELECT * FROM Stud ORDER BY NAME DES

      4. GROUP BY Clause :

      The SQL Server GROUP BY clause is used in collaboration with the SELECT statement to arrange identical data into groups.

      The GROUP BY clause follows the WHERE clause in a SELECT statement and precedes the ORDER BY clause.

      Syntax :

      UseSUVEN
      Go

      SELECT column1, column2 FROM table_name WHERE [ conditions ] GROUP BY column1, column2 ORDER BY column1, column2

      Query: 

      UseSUVEN
      Go
      SELECT NAME, SUM(SALARY) as [sum of salary] FROM Stud GROUP BY NAME

      6. DISTINCT

      The MS SQL Server DISTINCT keyword is used in conjunction with SELECT statement to eliminate all the duplicate records and fetching only unique records.


      There may be a situation when you have multiple duplicate records in a table. While fetching such records, it makes more sense to fetch only unique records instead of fetching duplicate records.


      Syntax :

      Use Suven
      Go

      SELECT DISTINCTcolumn1, column2,…..columnN FROM table_nameWHERE [condition]

      Query :
      Use SUVEN
      Go
      SELECT DISTINCT SALARY FROM CUSTOMERS ORDER BY SALARY 


      Joins :

      The MS SQL Server Joins clause is used to combine records from two or more tables in a database. A JOIN is a means for combining fields from two tables by using values common to each.

      MS SQL Server Join Types −

      There are different types of joins available in MS SQL Server −

      INNER JOIN         −  Returns rows when there is a match in both tables.

      LEFT JOIN            −  Returns all rows from the left table, even if there are no matches in the  
                                        right table.

      RIGHT JOIN         −  Returns all rows from the right table, even if there are no matches in the 
                                        left  table.

      FULL JOIN            −  Returns rows when there is a match in one of the tables.

      SELF JOIN             − This is used to join a table to itself as if the table were two tables, 
                                       temporarily renaming at least one table in the MS SQL Server statement.

      CARTESIAN JOIN − Returns the Cartesian product of the sets of records from the two or 
                                        more joined tables.

      NOTE :

      The join is performed in the WHERE clause. Several operators can be used to join tables, such as =, <, >, <>, <=, >=, !=, BETWEEN, LIKE, and NOT; they can all be used to join tables. However, the most common operator is the equal symbol.


      Query Designer :

      The query designer is a graphical user interface that assists in building queries for your SQL Server database. This can be particularly useful when building complex queries that involves many tables, views etc.

      The Query Designer can also be beneficial for those who are learning how to write SQL. By using the Query Designer to generate the SQL, you can study the SQL and learn the syntax as you go.

      Step 1 :  Open a new query by clicking New Query on the toolbar


      Step 2 :  Open the Query Designer by selecting Query > Design Query in Editor. from the top menu:

      Step 3 : Select the tables you want to run the query against (in this case, we will add both tables), click Add, and close the box by clicking Close:


      Step 4 :  
      Select the column/s you want to display in your query by checking the checkbox next to the column name. In the middle pane, you can deselect an Output checkbox to hide that field from being displayed when the query is run (but the field will still be involved in the query).

       Add a value under Filter to narrow the results down to only those you’re interested in (in this example, it is creating a WHERE clause to select only those records with a StatusId of “1” – which is “To Do”):

      Step 5 :
      Click OK once you’re happy with your query. Query will be automatically  Generated by query designer. Execute it using f5 key.


      Views :

      In SQL Server, a view is a pre-written query that is stored on the database. A view consists of a SELECT statement, and when you run the view, you see the results of it like you would when opening a table. 

      Some people like to think of a view as a virtual table. This is because a view can pull together data from multiple tables, as well as aggregate data, and present it as though it is a single table.
      Syntax :

      CREATE VIEW ViewName AS
      SELECT …

      Query :

      CREATE VIEW ToDoList AS
      SELECT  Tasks.TaskName, Tasks.Description
      FROM  Status INNER JOIN
      Tasks ON
      Status.StatusId = Tasks.StatusId
      WHERE  (Status.StatusId = 1)
      NOTE : Tasks & Status are two different Tables in a single database.


      To execute a View  : 

      Syntax : select * from View_name


      NOTE :
      The view will return upto date data. If the data in the table changes, the results of the view will change too. So if you were to add a new task with a status of “To Do”, next time you run the view, it will include the new record in the result set.


      Stored Procedures :

      A stored procedure will typically contain some business logic. For example, a stored procedure can accept parameters that are passed to it and test against those parameters using IF statements. Eg, if the parameter is one value, do this, if it’s another value, do that.

      Benefits of Stored Procedures :

      1. Modular programming
      You can write a stored procedure once, then call it again and again, from different parts of an application (and even from multiple applications).

      2. Performance
      Stored procedures provide faster code execution and reduce network traffic.

      3. Security
      Users can execute a stored procedure without needing to execute any of the statements directly. Therefore, a stored procedure can provide advanced database functionality for users who wouldn’t normally have access to these tasks, but this functionality is made available in a tightly controlled way.

      Create a Stored Procedure :

      To create a stored procedure, you need to use the CREATE PROCEDURE statement, followed by the code that makes up the stored procedure. If your stored procedure is going to accept parameters, they need to be included after the name.

      Syntax :

      CREATE PROCEDURE myStoredProcedure AS
      OR
      CREATE PROCEDURE myStoredProcedure @{Parameter Name} {data type} AS

      Query :

      CREATE PROCEDURE
      LatestTasks @Count int
      AS
      SET ROWCOUNT @Count
      SELECT TaskName AS LatestTasks, DateCreated
      FROM Tasks

      ORDER BY DateCreated DESC


      Execute a Stored Procedure

      1. T-Sql Script :

      Now that you’ve created your stored procedure, any time you want to execute it, you need to call it using either EXECUTE or EXEC. If the stored procedure requires parameters you provide those after the procedure name. 


      Syntax :
      EXECUTE LatestTasks
      EXEC LatestTasks
      OR
      EXEC LatestTasks @Count = 5





      2. Using The GUI

      Step 1 : Using the Object Explorer, navigate to the stored procedure.

      Step 2 : Right click on the stored procedure and select Execute Stored Procedure.

      Step 3 : A dialog will appear. Enter your parameter values.

      Step 4 : Click OK. SQL Server will generate the SQL code and execute the stored 




      System Stored Procedures :

      SQL Server includes a large number of system stored procedures to assist in database administration tasks. Many of the tasks you can perform via the GUI can be done via a system stored procedure. For example, some of the things you can do with system stored procedures include:
      • Configure security accounts
      • Set up linked servers
      • Create a database maintenance plan
      • Create full text search catalogs
      • Add remote login
      • Configure replication
      • Set up scheduled jobs
      • and much more…
      NOTE :
      System Stored Procedure has a prefix sp_ as naming convention.
      It is a good idea to develop a consistent naming convention for your stored procedures, like usp_,  select_ , etc.

      The Stolen Honduran Election: Only The People Can Save Themselves

      Current President Juan Orlando Hernández has destroyed whatever minimal legitimacy the state institutions once had.

      ‘The people are calling it a fraudulent and stolen election’, said Dr. Luther Castillo Harry, when I asked him about the late November election in Honduras. Castillo Harry, who was the National Commissioner of Ministry of Health in the Honduras, looks despairingly at his native country. The institutions in his country have succumbed to bribery and coercion. He nods his head in pain, thinking about how a combination of the oligarchy and the United States has suffocated Honduras.

      The current president – Juan Orlando Hernández – has destroyed whatever minimal legitimacy the state institutions once had. In 2012, as the head of the Honduran Congress, Hernández sacked four of the five Supreme Court justices and put in their place those loyal to him. This Court, friendly to Hernández then suggested that the term limits on presidential power were ‘inapplicable’ to him. He could run for re-election in November 2017. When it became clear that he was not winning the popular vote, the Supreme Electoral Tribunal (TSE) shut down its system. Thirty-six hours later, when the vote count appeared, Hernández was in the lead. He has now been declared the winner.

      Castillo Harry’s despondency is not without basis. Things are so bad that even the Organization of American States (OAS), normally quite happy to toe the US line, has been outspoken in its condemnation of the stolen election. The OAS asked Dr. Irfan Nooruddin of Georgetown University to look at the TSE data and at the dramatic vote swing that occurred over the thirty-six hour period of silence. His report – published on 17 December – shows that there are glaring irregularities in the process. ‘The pattern of votes,’ Dr. Nooruddin writes, ‘is suspicious.’ He shows that the irregularities cannot be explained ‘as pure chance.’ This is out-and-out rigging.

      Based on Dr. Nooruddin’s report, the OAS Secretary General – Luis Almagro – offered a most detailed denunciation of the election. It is worth reading in full, ‘Deliberate human intrusions in the computer system, intentional elimination of digital traces, the impossibility of knowing the number of opportunities in which the system was violated, pouches of votes open or lacking votes, the extreme statistical improbability with respect to participation levels within the same department, recently printed ballots and additional irregularities, added to the narrow difference of votes between the two most voted candidates, make it impossible to determine with the necessary certainty the winner.’ This is as close to an invalidation of an election as one could get.

      The person who ‘lost’ the stolen election – Salvador Nasralla – of La Alianza de Oposición contra la Dictadura, the opposition front, has called for a re-election. This is just what the OAS has also demanded – ‘a new call for general elections.’

      Hernández is not keen to call a new election. He has tried to use the full force of the military and police establishment to crush any protest. Hundreds of people have been injured and tens of them killed. The numbers rise with each hour. Castillo Harry says that the same kind of repression used in the 1980s is now visible. In fact, Hernández’s advisor for security comes from the CIA created death squad, Battalion 316. Sections of the security forces loyal to Hernández have been entering people’s homes at night, arresting them, disappearing them. ‘We have a large group of missing comrades,’ says Castillo Harry. They ‘have been captured and disappeared and are not yet reported as missing.’

      But matters are not entirely grave. Castillo Harry points to the sections of the security forces that have refused to comply with the President’s orders. Four hundred members of the elite COBRAS special unit of the police returned to their barracks. They would not fire on their fellow Hondurans. Castillo Harry says that the President personally called the barracks to urge them on. He promised higher salaries and better benefits for the military if they too did his bidding. That there have been these some ‘human rights mutinies’ suggests that there is a fracture in the repressive forces. There is hope here.

      The United States has fully backed Hernández in his campaign for re-election. Professor Dana Frank of the University of California (Santa Cruz) and a close observer of Honduras told me that Trump’s Chief of Staff John Kelley was close to Hernández when Kelly ran the US Southern Command. He called Hernández a ‘good guy,’ a ‘great friend’ and said that Hernández was doing a ‘magnificent job.’ Stolen election or not, Frank says, ‘Everyone knows that the US wants Hernández in power no matter what.’

      The US has an airbase – Palmerola (Soto Cano) Air Base – in Comayagua, fifty miles northwest of the capital Tegucigalpa. This is one of the few major US military bases in Latin America. It was set-up in 1983 for the US to support its contra allies in Nicaragua and its allies in the Honduran military. It is said in Honduras that the US actively participated in the coup against President Zelaya in 2009 because his agenda included the closure of this base. It should be pointed out that the US has directly intervened in the Honduras several times to protect its interests – in 1903, 1907, 1911, 1912, 1919, 1920, 1924 and 1925. Since the 1980s, however, it has relied on friendly people in the Honduran military and in the Honduran oligarchy to do its bidding. No wonder then that the US is keen to keep the oligarchy in power rather than allow left-leaning Nasralla and his popular alliance to take office.

      Castillo Harry is on tour of the United States to speak out about the stolen election. He is being joined by mayors of several cities in Honduras, including Mayor Jose Arnold Avelar Hernandez, who is a leading member of La Alianza de Oposición contra la Dictadura. They would like the people of the United States to ensure that the Trump administration not be allowed to validate the stolen election. Heide Fulton, the top US diplomat in Honduras, said that the US ‘is ready to work with whomever is the winner.’ The problem is that in a stolen election, the winner did not necessarily win.

      Dario Euraque, who was in the cabinet of the deposed government of Zelaya, told me that there is ‘extreme anger, sadness and hope’ in the country. Hope comes from the ‘mobilizations and creativity of the people despite the repression and isolation.’ These protests are indeed continuing. Frank agrees, ‘The current protests build on deep, brave commitments on the part of ordinary Hondurans.’ Castillo Harry says that these protests are ‘in the hands of the community based organizations.’ This element, he says, did not exist so robustly in 2009 to defend the government against the coup. Today, he says, there are more than 134 places around the country held by the resistance – with young people in the lead. Almost all those who have been killed are young activists.

      ‘Only the people save the people,’ Castillo Harry says, repeating a slogan that has appeared in the protests. The walls of cities and towns in Honduras have been painted with the orchid, the national flower. Until 1969, the national flower of Honduras was the rose, although the rose is not native to the country. The orchid however is native to Honduras. There is a poetic sense that this protest is of people who want to take their country back. The stolen election is perhaps the last straw.

       

      Related Stories

      • The Smart Weapons Fallacy: Civilian Casualties From ‘Precision’ Air Strikes in Iraq and Syria
      • Give Your Values This Holiday Season: Buy Mexican
      • Communists Sweep the Nepali Elections, a Blow to The Establishment Parties

      The ultra popular Arena of Valor finally launches in North and South America

      • Arena of Valor, a game with over 80 million players in China, launches in North and South America today.
      • The game is a MOBA and pits teams of five against each other.
      • There will be eSports leagues and competitions for the game.

      One of the most popular games in the world is finally launching in the Americas. Arena of Valor is a MOBA from Tencent Gaming that has been all the rage in China. It has 200 million registered players with over 80 million daily active users— all using their mobile devices to play the game.

      Arena of Valor, or Honor of Kings as its known in native China, pits teams of five heroes against each other in a bid to take over each others’ bases. If the game reminds you of League of Legends, you’re onto something. Arena of Valor is developed by Tencent Games, who owns Riot Gaming— the makers of League of Legends.

      See also

      The game is making some changes as it crosses the pond. It’s dropping the Chinese-specific parts of the game for more Western aspects. The in-game heroes are now more appealing to Western audiences instead of the original Chinese versions. Additionally, Facebook is used to log in, rather than WeChat. These changes are in an effort to appeal to a wider audience— something that other Chinese games in the past have failed to do. 

      To hype the title, Tencent is creating an eSports league for competitive play. It is also partnering with streamers on Twitch to promote it. eSports has exploded around the world where Twitch streams can top a million viewers for popular competitions. Tencent hopes to tap into that trend and show audiences that eSports can be mobile games too.

      See also: PC smash hit PlayerUnknown’s Battlegrounds coming to mobile 

      This isn’t the first launch outside of China for Valor. The game is available in Europe and has accumulated about 2 million downloads since August. If you’re in North or South America and interested in trying the game out for yourself, you can hit the button below to download it. 

      get it from google play

      Robert Reich: A Guide to Why the Trump-Republican Tax Plan Is a Disgrace (for When you Confront Your Republican Uncle Bob During the Holidays)

      Shame on Trump and the Republicans who have lied to the pubic about its consequences.

      Here are the 3 main Republican arguments in favor of the Republican tax plan, followed by the truth.

      1. It will make American corporations competitive with foreign corporations, which are taxed at a lower rate.

      Rubbish.

      (1) American corporations now pay an effective rate (after taking deductions and tax credits) that’s just about the same as most foreign based corporations pay.

      (2) Most of these other countries also impose a “Value Added Tax” on top of the corporate tax.

      (3) When we cut our corporate rate from 35% to 20%, other nations will cut their corporate rates in order to be competitive with us – so we gain nothing anyway.

      (4) Most big American corporations who benefit most from the Republican tax plan aren’t even “American.” Over 35 percent of their shareholders are foreign (which means that by cutting corporate taxes we’re giving a big tax cut to those foreign shareholders). 20 percent of their employees are foreign, while many Americans work for foreign-based corporations.

      (5) The “competitiveness” of America depends on American workers, not on “American” corporations. But this tax plan will make it harder to finance public investments in education, health, and infrastructure, on which the future competitiveness of American workers depends.

      (6) American corporations already have more money than they know what to do with. Their profits are at record levels. They’re using them to buy back their shares of stock, and raise executive pay. That’s what they’ll do with the additional $1 trillion they’ll receive in this tax cut.

      ***

      2. With the tax cut, big corporations and the rich will invest and create more jobs.

      Baloney.

      (1) Job creation doesn’t trickle down. After Ronald Reagan and George W. Bush cut taxes on the top, few jobs and little growth resulted. America cut taxes on corporations in 2004 in an attempt to get them to bring their profits home from abroad, and what happened? They didn’t invest. They just bought up more shares of their own stock, and increased executive pay.

      (2) Companies expand and create jobs when there’s more demand for their goods and services. That demand comes from customers who have the money to buy what companies sell. Those customers are primarily the middle class and poor, who spend far more of their incomes than the rich. But this tax bill mostly benefits the rich.

      (3) At a time when the richest 1 percent already have 40 percent of all the wealth in the country, it’s immoral to give them even more – especially when financed partly by 13 million low-income Americans who will lose their health coverage as a result of this tax plan (according to the Congressional Budget Office), and by subsequent cuts in safety-net programs necessitated by increasing the deficit by $1.5 trillion.

      ***

      3. It will give small businesses an incentive to invest and create more jobs.

      Untrue.

      (1) At least 85 percent of small businesses earn so little they already pay the lowest corporate tax rate, which this plan doesn’t change.

      (2) In fact, because the tax plan bestows much larger rewards on big businesses, they’ll have more ability to use predatory tactics to squeeze small firms and force them out of business.

      ***

      Don’t let your Uncle Bob be fooled: Republicans are voting for this because their wealthy patrons demand it. Their tax plan will weaken our economy for years – reducing demand, widening inequality, and increasing the national debt by at least $1.5 trillion over the next decade.

      Shame on the greedy Republican backers who have engineered this. Shame on Trump and the Republicans who have lied to the pubic about its consequences.

       

       

      Related Stories

      • As L.A. Burns, Republicans Vote for a Tax Hike on the Victims
      • Unbelievable Censorship: Trump Bans CDC from Using These 7 Words
      • Franken and Moore Lesson: ‘When It Comes to Sex Scandals, the Politicians… Most Guilty and Least Repentant Are The Ones Who Survive’

      What are Injection attacks : SQL Injection over MySQL

      What is SQL Injection?

      sqlinjection

      SQL Injection is an injection attack wherein an attacker can execute malicious SQL statements that control a web application’s database server. Since an SQL Injection vulnerability could possibly affect any website or web application that makes use of an SQL-based database, the vulnerability is one of the oldest, most prevalent and most dangerous of web application vulnerabilities. SQL Injection can also be used to add, modify and delete records in a database, affecting data integrity. SQL Injection can provide an attacker with unauthorized access to sensitive data including, customer data, personally identifiable information (PII), trade secrets, intellectual property and other sensitive information.

      Types of SQL Injection Attacks

      • Code injection:- Adding more SQL statements to an SQL statement in an attempt to obtain access rights or some sensitive information is termed as code injection. This is type of SQL injection attack take advantage of some kind of bug that appears in the computer system due to invalid data processing.
      • Function call injection:- In this attacker inserts a call. The attacker may also get permission for making system calls through function call injection.
      • SQL Manipulation:- If an application directly passes login credentials database, its prone to an SQL injection attack through SQL manipulation for e.g. We can take addition of a certain condition to the WHERE CLAUSE in an SQL query. This may skip the authentication procedure, and thus may give access to all activities that user can perform.

      SQL Injection Implementation

      Lets see how SQL Injection is performed  with following example
      Consider following SQL Statement

      $username=$_POST["username"];
      statement = "SELECT * FROM users WHERE name = '" + $userName + "';"

      In above Statement user input is not filtered for escape characters and it directly passed into an SQL statement. This SQL statement display records of specified username from users table. However if usename variable is crafted in a specific way by an attacker, the SQL statement may do more than the code author intended.
      For Example
      If usename is set as $username=’ OR ‘1’=’1 then the Above SQL statement become

      SELECT * FROM users WHERE name = '' OR '1'='1';

      If  this SQL statement is used in authentication procedure then it will return data of every users rather than one specific user as code intended because ‘1’=’1′ is always true.

      Preventing SQL Injection

      Above example is Incorrectly filtered escape characters SQL Injection attack. We can handle all escape characters smartly in scripting languages. The MySQL provides the function called mysql_real_escape_string() to escape input characters that are special MySQL Keywords

      $username = mysql_real_escape_string($_POST['username']);  
      statement = "SELECT * FROM users WHERE name = '" + $userName + "';"

      There are other functions for many database types in PHP such as pg_escape_string() for PostgreSQL. The function addslashes(string $str) works for escaping characters, and is used especially for querying on databases that do not have escaping functions in PHP. It returns a string with backslashes before characters that need to be quoted in database queries, etc.

      Risk associated with SQL injection attacks

      Privilege Escalation performance:- A malicious person can take advantage of the flaws pre

      sent in a database by upgrading the access levels of an individual who is not authorised for higher level roles.
      Remote commands execution:- SQL injection attacks can be used to execute commands remoter the attackers may execute arbitrary commands on a database.
      Authentication bypass:- manipulation of SQL statements may result in by passing the authentication process thereby providing the attacker with access to database.
      Database Fingerprint:- Determining the type of database being used at backend may help attacker in quenching database specific attacks through SQL injection, the attackers may determine database that an organization user.
      Denial of services in an SQL injection attack, the database service can be flooded with requested by attacker. There’re, it would state rejecting the requests of segments users.

      Want to Learn Database Programming?

      There Is No Constitutional Right to Education. That Needs To Change.

      Legal scholar Derek Black argues that the 14th Amendment should have included a right to education.

      Public school funding has shrunk over the past decade. School discipline rates reached historic highs. Large achievement gaps persist. And the overall performance of our nation’s students falls well below our international peers.

      These bleak numbers beg the question: Don’t students have a constitutional right to something better? Many Americans assume that federal law protects the right to education. Why wouldn’t it? All 50 state constitutions provide for education. The same is true in 170 other countries. Yet, the word “education” does not appear in the United States Constitution, and federal courts have rejected the idea that education is important enough that it should be protected anyway.

      After two decades of failed lawsuits in the 1970s and ‘80s, advocates all but gave up on the federal courts. It seemed the only solution was to amend the Constitution itself. But that, of course, is no small undertaking. So in recent decades, the debate over the right to education has mostly been academic.

      The summer of 2016 marked a surprising turning point. Two independent groups – Public Counsel and Students Matter – filed lawsuits in Michigan and Connecticut. They argue that federal law requires those states to provide better educational opportunities for students. In May 2017, the Southern Poverty Law Center filed a similar suit in Mississippi.

      At first glance, the cases looked like long shots. However, my researchshows that these lawsuits, particularly in Mississippi, may be onto something remarkable. I found that the events leading up to the 14th Amendment – which explicitly created rights of citizenship, equal protection and due process – reveal an intent to make education a guarantee of citizenship. Without extending education to former slaves and poor whites, the nation could not become a true democracy.

      Why a federal right to education matters

      Even today, a federal constitutional right to education remains necessary to ensure all children get a fair shot in life. While students have a state constitutional right to education, state courts have been ineffective in protecting those rights.

      Without a federal check, education policy tends to reflect politics more than an effort to deliver quality education. In many instances, states have done more to cut taxes than to support needy students.

      And a federal right is necessary to prevent random variances between states. For instance, New York spends US$18,100 per pupil, while Idaho spends $5,800. New York is wealthier than Idaho, and its costs are of course higher, but New York still spends a larger percentage on education than Idaho. In other words, geography and wealth are important factors in school funding, but so is the effort a state is willing to make to support education.

      And many states are exerting less and less effort. Recent data show that 31 states spend less on education now than before the recession – as much as 23 percent less.

      States often makes things worse by dividing their funds unequally among school districts. In Pennsylvania, the poorest districts have 33 percent lessper pupil than wealthy districts. Half of the states follow a similar, although less extreme, pattern.

      Studies indicate these inequities deprive students of the basic resources they need, particularly quality teachers. Reviewing decades of data, a 2014 study found that a 20 percent increase in school funding, when maintained, results in low-income students completing nearly a year of additional education. This additional education wipes out the graduation gap between low- and middle-income students. A Kansas legislative study showed that “a 1 percent increase in student performance was associated with a .83 percent increase in spending.”

      These findings are just detailed examples of the scholarly consensus: Money matters for educational outcomes.

      The new lawsuits

      While normally the refuge for civil rights claims, federal courts have refused to address these educational inequalities.  In 1973, the Supreme Court explicitly rejected education as a fundamental right. Later cases asked the court to recognize some narrower right in education, but the court again refused.

      After a long hiatus, new lawsuits are now offering new theories in federal court. In Michigan, plaintiffs argue that if schools do not ensure students’ literacy, students will be consigned to a permanent underclass. In Connecticut, plaintiffs emphasize that a right to a “minimally adequate education” is strongly suggested in the Supreme Court’s past decisions. In Mississippi, plaintiffs argue that Congress required Mississippi to guarantee education as a condition of its readmission to the Union after the Civil War.

      While none of the lawsuits explicitly state it, all three hinge on the notion that education is a basic right of citizenship in a democratic society. Convincing a court, however, requires more than general appeals to the value of education in a democratic society. It requires hard evidence. Key parts of that evidence can be found in the history of the 14th Amendment itself.

      The original intent to ensure education

      Immediately after the Civil War, Congress needed to transform the slave-holding South into a working democracy and ensure that both freedmen and poor whites could fully participate in it. High illiteracy rates posed a serious barrier. This led Congress to demand that all states guarantee a right to education.

      In 1868, two of our nation’s most significant events were occurring: the readmission of southern states to the Union and the ratification of the 14th Amendment. While numerous scholars have examined this history, few, if any, have closely examined the role of public education. The most startling thing is how much persuasive evidence is in plain view. Scholars just haven’t asked the right questions: Did Congress demand that southern states provide public education, and, if so, did that have any effect on the rights guaranteed by the 14th Amendment? The answers are yes.

      As I describe in the Constitutional Compromise to Guarantee Education, Congress placed two major conditions on southern states’ readmission to the Union: Southern states had to adopt the 14th Amendment and rewrite their state constitutions to conform to a republican form of government. In rewriting their constitutions, Congress expected states to guarantee education. Anything short was unacceptable.

      Southern states got the message. By 1868, nine of 10 southern states seeking admission had guaranteed education in their constitutions. Those that were slow or reluctant were the last to be readmitted.

      The last three states – Virginia, Mississippi and Texas – saw Congress explicitly condition their readmission on providing education.

      The intersection of southern readmissions, rewriting state constitutions and the ratification of the 14th Amendment helps to define the meaning of the 14th Amendment itself. By the time the 14th Amendment was ratified in 1868, state constitutional law and congressional demands had cemented education as a central pillar of citizenship. In other words, for those who passed the 14th Amendment, the explicit right of citizenship in the 14th Amendment included an implicit right to education.

      The reasoning of both Congress and the state conventions was clear: “Education is the surest guarantee of the … preservation of the great principles of republican liberty.”

      The rest is history. Our country went from one in which fewer than half of states guaranteed education prior to the war to one in which all 50 state constitutions guarantee education today.

      The new cases before the federal courts offer an opportunity to finish the work first started during Reconstruction – to ensure that all citizens receive an education that equips them to participate in democracy. The nation has made important progress toward that goal, but I would argue so much more work remains. The time is now for federal courts to finally confirm that the United States Constitution does, in fact, guarantee students the right to quality education.

      The Case For Giving Free Massages to the Homeless

      Holistic health and pursuit of happiness should be available to all, especially those in poverty and struggling.

      If ever there was an age of anxiety, it is now. We all seem pushed to the limits at work, personal debt is rising, and the housing market is shrinking, while the world around us seems to be going politically and ecologically out of control. This anxiety is a stress factory that spawns mental, physical and behavioral diseases that, as we know, cost a fortune to contain, let alone fix. On its own, work-related stress accounts for $300 billion dollars a year. 

      Many of us are taking an alternative route to deal with this toxic stress. We run to Whole Foods to get the organic kale, we take a yoga or meditation class, get on a massage table, or receive acupuncture or reiki. We can relieve stress by going to a tai chi or a qi gong class, or we do the latest thing and take a “forest bath” by going for a walk in the woods. We see how these things change not only the quality of our lives, but also our health, as measured by blood pressure, stress hormones, immune response and number of doctor visits. 

      So, are these things luxuries for the middle class or are they life-changing and money-saving medical interventions? It may sound comical in an age where the battle lines are being drawn around whether low income people should receive healthcare at all, to suggest that they should be getting acupuncture or a free massage, but why not? Since these interventions are proven to work, they could be used on a routine basis to reduce hospital visits, relapse to drug use, and maybe even recidivism to incarceration.

      Gandhi once said that poverty is violence, and today 40% of New Yorkers live below the poverty line. This violence is generated by homelessness, by the criminalization of poverty, and the soul-crushing trauma of racism. Can holistic interventions be a significant help in stemming this tidal wave of misery?

      We work together at New York Harm Reduction Educators, a social welfare program in East Harlem that does just this. Do tough guys enjoy yoga and acupuncture? Yes they do. Are they interested in following a guided meditation, actively participating in a drum circle, an art group or a walk in the woods? Yes again.  We have seen people locked into a cycle of drugs and incarceration start to turn a corner in their lives. We see those at the margins of our society actually finding room to breathe, room to move, cry, laugh, be human. We see destructive behavior change – this with a very limited budget and space.

      The challenge is to make the things that we know work for us and the ones we love available to our neighbors. Mindfulness, meditation, and yoga have already been used in prisons and jails and rehabs to great effect and at little cost – but what about when people hit the streets? There is absolutely no reason to withdraw the stress-reduction just at the moment that stress increases exponentially.

      At NYHRE we have found a template for continued destressing that can be duplicated and improved upon throughout the city and in fact the country. This is a case where doing the right thing is doing the practical thing – by opening the space that we have found effective in our own lives and making it available for our less fortunate neighbors we can practice compassion and practicality. In an era when poverty is punishment, the pursuit of happiness should be open to everyone.

       

      Related Stories

      • THC Could Keep HIV Patients Mentally Sharp
      • So… What Is Trump Doing About the Opioid Crisis?
      • Looking Back: The Biggest Domestic Drug Policy Stories of the Past 20 Years

      If We Don’t Address Poverty, We Are Going to Lose Our Country

      If we are to save the soul of this country from the poverty that is killing us, we must act, we must agitate, we must cause some righteous trouble.

      In March of 1968, as part of a tour of US cities to shine a light on poverty and drum up support for the recently-launched Poor People’s Campaign, the Rev Dr Martin Luther King Jr visited the northwest Mississippi town of Marks. He saw a teacher feeding schoolchildren a meager lunch of a slice of apple and crackers, and started crying.

      Earlier this month, officials from the United Nations embarked on a similar trip across the US, and what they observed was a crisis of systemic poverty that Dr King would have recognized 50 years ago: diseases like hookworm, caused by open sewage, in Butler County, Alabama, and breathtaking levels of homelessness in Los Angeles’ Skid Row, home to 55,000 people.

      “I think it’s very uncommon in the first world,” UN special rapporteur Philip Alston said. “This is not a sight that one normally sees. I’d have to say that I haven’t seen this.”

      The morally troubling conditions Dr King witnessed across the country cemented his call, along with leaders in the labor movement, tenant unions, farm workers, Native American elders and grassroots organizers, for a campaign to foster a revolution of values in America.

      Half a century later, the conditions that motivated the 1968 Poor People’s Campaign have only worsened, making the need for a new moral movement more urgent than ever. Compared to 1968, 60% more Americans are living below the official poverty line today – a total of 41 million people. The gap between our government’s discretionary spending on the military versus anti-poverty programs has grown from two-to-one at the height of the Vietnam war to four-to-one today.

      That’s why, this month, poor and disenfranchised people along with clergy and moral leaders nationwide launched the Poor People’s Campaign: a National Call for Moral Revival, to challenge the enmeshed evils of systemic racism, poverty, the war economy, ecological devastation, and our distorted national morality.

      The observations by the United Nations published this week are an urgent alarm bell for the moral emergency facing the country. As King did 50 years ago and Alston did earlier this month, we will travel the country to make sure the poor are not ignored. But it is not enough to bear witness. If we are to save the soul of this country from the poverty that is killing us, we must act, we must agitate, we must cause some righteous trouble.

      The Poor People’s Campaign: A National Call for Moral Revival, which will be highlighted by 40 days of direct action and nonviolent civil disobedience this spring, is not a commemoration. It’s an acknowledgment that, 50 years later, there is still so much work to do to foster a revolution of values in America.

      There’s a strange irony in America when it comes to poverty. The states with the highest poverty rates are in the south. And those same states have the highest rates of voter suppression of black people. Through this racialized voter suppression, politicians who support policies that hurt the poor get elected. While a larger percentage of black people are living in poverty, in raw numbers, there are actually more white than black people below the poverty line.

      So-called white evangelicals are omnipresent in the poorest areas of our country, and they say the least about systemic poverty, which is the foremost issue in authentic Christian religious theology. After our denominations splintered over the moral question of slavery and the nation stood on the brink of civil war, Frederick Douglas said“Between the christianity of this land and the christianity of Christ, I recognize the widest possible difference.”

      Sadly, his observations ring true today.

      These so-called evangelicals should listen to Pope Francis, who called poverty a “scandal.” He said, “In a world where there is so much wealth, so many resources to feed everyone, it is unfathomable that there are so many hungry children, that there are so many children without an education, so many poor persons. Poverty today is a cry. We all have to think if we can become a little poorer, all of us have to do this. How can I become a little poorer in order to be more like Jesus, who was the poor Teacher?”

      The most radical, progressive shifts in our country’s history occurred when concerned citizens across racial lines come together. This was the case after the civil war, during the civil rights movement and today, in the Moral Mondays Movement and the Fight for $15.

      The Poor People’s Campaign: A National Call for Moral Revival will unite Americans across all races, creeds, religions, classes and other divides – because it’s going to take all of us to revive the soul of our nation.

       

       

      Related Stories

      • Incentive for Terrorism: America Has Taken Nearly 70% of the World’s Wealth Gains Since 2012
      • ‘All Eyes on U.S.’ as Honduran Election Panel Declares Incumbent President Hernández Election Winner
      • New Wall Street Journal Report Might Totally Destroy Republicans’ Favorite Anti-FBI Talking Point

      Elemental Evil: Sessions 16

      In the previous session the group had after much hesitation entered Scarlet Moon Hall, the last of the four haunted keeps. They had killed the guards on the middle floor where they had come in and thrown the bodies down the big hole in the middle of the floor into a pile of rubbish burning there. But there were still two floors above them, and they suspected the leader of the fire cult to be on the top floor.

      So they fought their way up to the next level. However that level was a trap: The floor appeared solid, but the middle was weakened and ready to break. With the druid in bear form and the cleric both standing on that part on the floor, it broke after 3 rounds of combat. That landed the druid and the cleric downstairs in the burning rubbish, where 5 magmins attacked them. Meanwhile the others had killed all the guards and progressed to the top floor. There Elizar, the keep leader, had cast a wall of fire across the room, which gave him time for an incantation to wake up the fire elemental outside the tower in the burning wicker giant. The elemental then came into the tower at the bottom, where the druid and cleric were. Between the boss and the elemental and already weakened from the fight against the guards, this was a rather tough fight. But the group won, looted the boss, and escaped the way they came before the rest of the camp arrived.

      As this had been their strategy in the previous towers, kill the boss, grab his key, and escape, they never got the chance to interrogate any cultists on what all this was about. That was a bit of a problem, as they now had the 4 elemental keys to open the magical portals to the temple of elemental evil, but no clue what was in there or even why they should go there. So this time I had put a letter on the boss explaining the situation. Sometimes you just can’t be subtle as a DM. The letter told them that the 4 prophets of elemental evil were in competition, each trying to be the first to summon his prince of elemental evil. For that they needed to sow elemental chaos, which gave them the energy for the summoning. According to the letter the prophetess of elemental air was ahead in that game (I made that up because the air temple is the lowest level one).

      Then in another not-so-subtle move I reminded the group that they had a friendly NPC junior cultist in the air keep. So they went there and got more information about the layout of the temple of elemental evil: A square of 4 elemental temples at the first level below ground, then the fane of the eye connecting everything, and then on the lowest level the 4 elemental nodes from which the princes would be summoned. Well, they got the message and now went into the air temple, but not before the group cleric cut the friendly NPCs throat and turned her into a zombie with his animate dead spell. From the entry point there was a long tunnel leading to a big cave with an old dwarven city, with a step pyramid in the middle. That was now the Temple of Howling Hatred.

      While the sorceress didn’t have much opportunity to use her new fireball spell against the fire-resistant or immune fire cultists previously, she now could use that spell. So the first three rooms went: Door open, fireball, cultists mostly dead, wipe up the rest. As the third of the rooms was smaller than the other two, I used an old rule which I had in mind from previous editions, that the fireball had a fixed volume and would blow beyond his 20 feet radius sphere when cast into a too small room. That burned two of the group members. My bad, that rule doesn’t exist any more in 5th edition, so I had to apologize later and say that in future that wouldn’t happen any more. Oh, and lightning bolts don’t bounce of wall any more either.

      Reaching the pyramid they noticed a mage on a wyvern on top, who promptly attacked them. That ended up being the second ultra-hard fight of the session. The mage used a lightning bolt to good effect, then turned invisible, and then used another lightning bolt on several group members. They managed to kill both the mage and the wyvern but then retreated due to being heavily wounded and out of resources. At that point we ended the session.

      We will play more sessions, but probably not until the end of the campaign book. I told my players that I would like to stop being the DM later this year, and that somebody else should take over. I had somewhat run out of enthusiasm for this campaign, and after over 6 years as DM of that group I think I deserve a break. The next DM will take some months to prepare his campaign, and he is planning to let everybody keep their characters. So I’ll make a character of their level and join the group.