- node is a javascript runtime that uses the v8 engine
- v8 engine is an open source js engine written in c++ that uses the javascript code and compiles in machine code, it is used inside the nodes and in thee chrome browser
- to run node file just type "node app.js" in cmd where app.js is your file name
- to exite node process use "process.exit(0);" command in cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'dart:math'; | |
import 'package:intl/intl.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// var _routes = <String, WidgetBuilder>{ | |
// AddContact.routeName: (BuildContext context) => new AddContact(title: 'Add Contact'), | |
// }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
import 'package:http/http.dart' as http; | |
void main() { | |
runApp(new MaterialApp( | |
home: new HomePage() | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
split() -> takes a delimited String and splits it up into an Array of Strings | |
join() -> concatenates a String array into single String based on a delimiter | |
--> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
<html> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
JSTL Functions have two types of tags i.e Collection Length and String Manipulation tags. | |
Every page that uses the Function tags must include this reference: | |
uri="http://java.sun.com/jsp/jstl/functions" and prefix="fn" | |
--> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
<html> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<%@ page import="java.util.*,com.jsp.tagdemo.Student" %> | |
<% | |
// just create some sample data ... normally provided by MVC | |
List<Student> data = new ArrayList<>(); | |
data.add(new Student("John", "Doe", false)); | |
data.add(new Student("Maxwell", "Johnson", false)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<%@ page import="java.util.*,com.jsp.tagdemo.Student" %> | |
<% | |
// just create some sample data ... normally provided by MVC | |
List<Student> data = new ArrayList<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jsp.tagdemo; | |
public class Student { | |
private String firstName; | |
private String lastName; | |
private boolean goldCustomer; | |
public Student(String firstName, String lastName, boolean goldCustomer) { | |
super(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
There are 5 core tags in JSP standard tag library i.e Core, Message Formatting, Functions, XML and SQL tags | |
--> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<% | |
//sample data | |
String[] cities = {"Mumbai","Delhi","Kanpur"}; | |
pageContext.setAttribute("myCities", cities); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
jsp custom tags - you can write your own custom code and use it as a tag | |
jsp standard tag library - it is creatd by oracle with common set of tags used by jsp environment | |
To use jsp cor tags copy these two files in WebContent/WEB-INF/lib folder : javax.servlet.jsp.jstl-1.2.1.jar and javax.servlet.jsp.jstl-api-1.2.1.jar | |
--> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<html> | |
<body> |
NewerOlder