diff --git a/JavaEE_2020/Creating_doc_Javascript_file/CreatingInserting a document in collection using javascript file.pptx b/JavaEE_2020/Creating_doc_Javascript_file/CreatingInserting a document in collection using javascript file.pptx new file mode 100644 index 00000000..0c5f7a10 Binary files /dev/null and b/JavaEE_2020/Creating_doc_Javascript_file/CreatingInserting a document in collection using javascript file.pptx differ diff --git a/Later/Java_Later/MongoDB/66/studentsInfo.js b/JavaEE_2020/Creating_doc_Javascript_file/studentsInfo.js similarity index 100% rename from Later/Java_Later/MongoDB/66/studentsInfo.js rename to JavaEE_2020/Creating_doc_Javascript_file/studentsInfo.js diff --git a/JavaEE_2020/Data_Modeling_Introduction/Data Modeling Introduction.pptx b/JavaEE_2020/Data_Modeling_Introduction/Data Modeling Introduction.pptx new file mode 100644 index 00000000..531b1e5c Binary files /dev/null and b/JavaEE_2020/Data_Modeling_Introduction/Data Modeling Introduction.pptx differ diff --git a/Later/Java_Later/MongoDB_2/74/Data Modelling in MongoDB.pptx b/JavaEE_2020/Data_Modelling_in_MongoDB/Data Modelling in MongoDB.pptx similarity index 58% rename from Later/Java_Later/MongoDB_2/74/Data Modelling in MongoDB.pptx rename to JavaEE_2020/Data_Modelling_in_MongoDB/Data Modelling in MongoDB.pptx index 596d3ede..428a3371 100644 Binary files a/Later/Java_Later/MongoDB_2/74/Data Modelling in MongoDB.pptx and b/JavaEE_2020/Data_Modelling_in_MongoDB/Data Modelling in MongoDB.pptx differ diff --git a/Later/Java_Later/WebService/5/Difference between SOAP v1.1 and SOAP.pptx b/JavaEE_2020/Difference_between_SOAP/Difference between SOAP v1.1 and SOAP.pptx similarity index 91% rename from Later/Java_Later/WebService/5/Difference between SOAP v1.1 and SOAP.pptx rename to JavaEE_2020/Difference_between_SOAP/Difference between SOAP v1.1 and SOAP.pptx index 69bd2891..496a3625 100644 Binary files a/Later/Java_Later/WebService/5/Difference between SOAP v1.1 and SOAP.pptx and b/JavaEE_2020/Difference_between_SOAP/Difference between SOAP v1.1 and SOAP.pptx differ diff --git a/Later/Java_Later/WebService/2/How Web Services Work.pptx b/JavaEE_2020/How_Web_Services_Work/How Web Services Work.pptx similarity index 78% rename from Later/Java_Later/WebService/2/How Web Services Work.pptx rename to JavaEE_2020/How_Web_Services_Work/How Web Services Work.pptx index 79a9d850..0b8ec682 100644 Binary files a/Later/Java_Later/WebService/2/How Web Services Work.pptx and b/JavaEE_2020/How_Web_Services_Work/How Web Services Work.pptx differ diff --git a/JavaEE_2020/Inserting_Array_Javascript_file/Inserting Array of Documents.pptx b/JavaEE_2020/Inserting_Array_Javascript_file/Inserting Array of Documents.pptx new file mode 100644 index 00000000..1d09c7e6 Binary files /dev/null and b/JavaEE_2020/Inserting_Array_Javascript_file/Inserting Array of Documents.pptx differ diff --git a/Later/Java_Later/MongoDB/67/studentsInfoArray.js b/JavaEE_2020/Inserting_Array_Javascript_file/studentsInfoArray.js similarity index 100% rename from Later/Java_Later/MongoDB/67/studentsInfoArray.js rename to JavaEE_2020/Inserting_Array_Javascript_file/studentsInfoArray.js diff --git a/Later/Java_Later/Java_Networking/1/Java_Networking_Intro.pptx b/JavaEE_2020/Java_Networking_Intro/Java_Networking_Intro.pptx similarity index 81% rename from Later/Java_Later/Java_Networking/1/Java_Networking_Intro.pptx rename to JavaEE_2020/Java_Networking_Intro/Java_Networking_Intro.pptx index dc80570c..3d189e2f 100644 Binary files a/Later/Java_Later/Java_Networking/1/Java_Networking_Intro.pptx and b/JavaEE_2020/Java_Networking_Intro/Java_Networking_Intro.pptx differ diff --git a/Later/Java_Later/Java_Networking/2/Java Networking Terminology.pptx b/JavaEE_2020/Java_Networking_Terminology/Java Networking Terminology.pptx similarity index 71% rename from Later/Java_Later/Java_Networking/2/Java Networking Terminology.pptx rename to JavaEE_2020/Java_Networking_Terminology/Java Networking Terminology.pptx index 303fb892..48309545 100644 Binary files a/Later/Java_Later/Java_Networking/2/Java Networking Terminology.pptx and b/JavaEE_2020/Java_Networking_Terminology/Java Networking Terminology.pptx differ diff --git a/JavaEE_2020/Java_Socket_Programming/Java Socket Programming.pptx b/JavaEE_2020/Java_Socket_Programming/Java Socket Programming.pptx new file mode 100644 index 00000000..aedc79e1 Binary files /dev/null and b/JavaEE_2020/Java_Socket_Programming/Java Socket Programming.pptx differ diff --git a/Later/Java_Later/Java_Networking/4/SocketDemo/.classpath b/JavaEE_2020/Java_Socket_Programming/SocketClientDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Networking/4/SocketDemo/.classpath rename to JavaEE_2020/Java_Socket_Programming/SocketClientDemo/.classpath diff --git a/Later/Java_Later/Java_Networking/4/SocketDemo/.project b/JavaEE_2020/Java_Socket_Programming/SocketClientDemo/.project similarity index 91% rename from Later/Java_Later/Java_Networking/4/SocketDemo/.project rename to JavaEE_2020/Java_Socket_Programming/SocketClientDemo/.project index 7161aeb6..09f2196b 100644 --- a/Later/Java_Later/Java_Networking/4/SocketDemo/.project +++ b/JavaEE_2020/Java_Socket_Programming/SocketClientDemo/.project @@ -1,6 +1,6 @@ - SocketDemo + SocketClientDemo diff --git a/Later/Java_Later/Java_Networking/4/SocketDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/Java_Socket_Programming/SocketClientDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Networking/4/SocketDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/Java_Socket_Programming/SocketClientDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Networking/4/SocketDemo/bin/Client.class b/JavaEE_2020/Java_Socket_Programming/SocketClientDemo/bin/Client.class similarity index 100% rename from Later/Java_Later/Java_Networking/4/SocketDemo/bin/Client.class rename to JavaEE_2020/Java_Socket_Programming/SocketClientDemo/bin/Client.class diff --git a/Later/Java_Later/Java_Networking/4/SocketDemo/src/Client.java b/JavaEE_2020/Java_Socket_Programming/SocketClientDemo/src/Client.java similarity index 100% rename from Later/Java_Later/Java_Networking/4/SocketDemo/src/Client.java rename to JavaEE_2020/Java_Socket_Programming/SocketClientDemo/src/Client.java diff --git a/Later/Java_Later/Java_Networking/5/SocketDemo/.classpath b/JavaEE_2020/Java_Socket_Programming/SocketServerDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Networking/5/SocketDemo/.classpath rename to JavaEE_2020/Java_Socket_Programming/SocketServerDemo/.classpath diff --git a/Later/Java_Later/Java_Networking/5/SocketDemo/.project b/JavaEE_2020/Java_Socket_Programming/SocketServerDemo/.project similarity index 91% rename from Later/Java_Later/Java_Networking/5/SocketDemo/.project rename to JavaEE_2020/Java_Socket_Programming/SocketServerDemo/.project index 7161aeb6..08bff196 100644 --- a/Later/Java_Later/Java_Networking/5/SocketDemo/.project +++ b/JavaEE_2020/Java_Socket_Programming/SocketServerDemo/.project @@ -1,6 +1,6 @@ - SocketDemo + SocketServerDemo diff --git a/Later/Java_Later/Java_Networking/5/SocketDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/Java_Socket_Programming/SocketServerDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Networking/5/SocketDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/Java_Socket_Programming/SocketServerDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Networking/4/SocketDemo/bin/Server.class b/JavaEE_2020/Java_Socket_Programming/SocketServerDemo/bin/Server.class similarity index 66% rename from Later/Java_Later/Java_Networking/4/SocketDemo/bin/Server.class rename to JavaEE_2020/Java_Socket_Programming/SocketServerDemo/bin/Server.class index 363e9cdb..3266f11e 100644 Binary files a/Later/Java_Later/Java_Networking/4/SocketDemo/bin/Server.class and b/JavaEE_2020/Java_Socket_Programming/SocketServerDemo/bin/Server.class differ diff --git a/Later/Java_Later/Java_Networking/4/SocketDemo/src/Server.java b/JavaEE_2020/Java_Socket_Programming/SocketServerDemo/src/Server.java similarity index 57% rename from Later/Java_Later/Java_Networking/4/SocketDemo/src/Server.java rename to JavaEE_2020/Java_Socket_Programming/SocketServerDemo/src/Server.java index 9677728f..32d0dbd7 100644 --- a/Later/Java_Later/Java_Networking/4/SocketDemo/src/Server.java +++ b/JavaEE_2020/Java_Socket_Programming/SocketServerDemo/src/Server.java @@ -15,21 +15,21 @@ public static void main(String[] args) * Creates a server socket, bound to the specified port. */ serverSocket = new ServerSocket(6666); - System.out.println( - "Server is Waiting for client request... "); + System.out.println("Server is Waiting for client request... "); - /* - * Listens for a connection to be made to this socket and - * accepts it. The method blocks until a connection is - * made. - */ - Socket s = serverSocket.accept(); - DataInputStream dis = new DataInputStream( - s.getInputStream()); - String str = (String) dis.readUTF(); - System.out.println( - "Server received message from by client is = " - + str); + while (true) + { + + /* + * Listens for a connection to be made to this socket + * and accepts it. The method blocks until a + * connection is made. + */ + Socket s = serverSocket.accept(); + DataInputStream dis = new DataInputStream(s.getInputStream()); + String str = (String) dis.readUTF(); + System.out.println("Server received message from by client is = " + str); + } } catch (Exception exe) { diff --git a/JavaEE_2020/Java_Socket_Programming_chat/Java Socket Programming_chat.pptx b/JavaEE_2020/Java_Socket_Programming_chat/Java Socket Programming_chat.pptx new file mode 100644 index 00000000..0a2b11eb Binary files /dev/null and b/JavaEE_2020/Java_Socket_Programming_chat/Java Socket Programming_chat.pptx differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/.classpath b/JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/.classpath rename to JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/.classpath diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/.project b/JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/.project similarity index 91% rename from Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/.project rename to JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/.project index 941bf265..09f2196b 100644 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/.project +++ b/JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/.project @@ -1,6 +1,6 @@ - LocaleDemo + SocketClientDemo diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Networking/5/SocketDemo/bin/Client.class b/JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/bin/Client.class similarity index 56% rename from Later/Java_Later/Java_Networking/5/SocketDemo/bin/Client.class rename to JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/bin/Client.class index 616931bd..d7e86aff 100644 Binary files a/Later/Java_Later/Java_Networking/5/SocketDemo/bin/Client.class and b/JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/bin/Client.class differ diff --git a/Later/Java_Later/Java_Networking/5/SocketDemo/src/Client.java b/JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/src/Client.java similarity index 99% rename from Later/Java_Later/Java_Networking/5/SocketDemo/src/Client.java rename to JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/src/Client.java index 0076c54d..94bd9668 100644 --- a/Later/Java_Later/Java_Networking/5/SocketDemo/src/Client.java +++ b/JavaEE_2020/Java_Socket_Programming_chat/SocketClientDemo/src/Client.java @@ -22,13 +22,14 @@ public static void main(String[] args) * specified port number at the specified IP address. */ socket = new Socket("localhost", 6666); + din = new DataInputStream(socket.getInputStream()); /* * returns the OutputStream attached with this socket. */ OutputStream outputStream = socket.getOutputStream(); dout = new DataOutputStream(outputStream); - din = new DataInputStream(socket.getInputStream()); + br = new BufferedReader(new InputStreamReader(System.in)); String strFromServer = "", strToClient = ""; diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/.classpath b/JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/.classpath rename to JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/.classpath diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/.project b/JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/.project similarity index 91% rename from Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/.project rename to JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/.project index 941bf265..08bff196 100644 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/.project +++ b/JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/.project @@ -1,6 +1,6 @@ - LocaleDemo + SocketServerDemo diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Networking/5/SocketDemo/bin/Server.class b/JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/bin/Server.class similarity index 52% rename from Later/Java_Later/Java_Networking/5/SocketDemo/bin/Server.class rename to JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/bin/Server.class index 161a6326..29bece36 100644 Binary files a/Later/Java_Later/Java_Networking/5/SocketDemo/bin/Server.class and b/JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/bin/Server.class differ diff --git a/Later/Java_Later/Java_Networking/5/SocketDemo/src/Server.java b/JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/src/Server.java similarity index 91% rename from Later/Java_Later/Java_Networking/5/SocketDemo/src/Server.java rename to JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/src/Server.java index f1a69ddf..6f9c12f4 100644 --- a/Later/Java_Later/Java_Networking/5/SocketDemo/src/Server.java +++ b/JavaEE_2020/Java_Socket_Programming_chat/SocketServerDemo/src/Server.java @@ -22,8 +22,7 @@ public static void main(String[] args) * Creates a server socket, bound to the specified port. */ serverSocket = new ServerSocket(6666); - System.out.println( - "Server is Waiting for client request... "); + System.out.println("Server is Waiting for client request... "); /* * Listens for a connection to be made to this socket and @@ -31,11 +30,11 @@ public static void main(String[] args) * made. */ Socket socket = serverSocket.accept(); - DataInputStream dis = new DataInputStream( - socket.getInputStream()); + din = new DataInputStream(socket.getInputStream()); + OutputStream outputStream = socket.getOutputStream(); dout = new DataOutputStream(outputStream); - din = new DataInputStream(socket.getInputStream()); + br = new BufferedReader(new InputStreamReader(System.in)); String strFromClient = "", strToClient = ""; diff --git a/JavaEE_2020/ModelTree_Structures_Child_References/Model Tree Structures with Child References.pptx b/JavaEE_2020/ModelTree_Structures_Child_References/Model Tree Structures with Child References.pptx new file mode 100644 index 00000000..366bd9ab Binary files /dev/null and b/JavaEE_2020/ModelTree_Structures_Child_References/Model Tree Structures with Child References.pptx differ diff --git a/JavaEE_2020/ModelTree_Structures_Child_References/MongoDB Command.txt b/JavaEE_2020/ModelTree_Structures_Child_References/MongoDB Command.txt new file mode 100644 index 00000000..a0351188 --- /dev/null +++ b/JavaEE_2020/ModelTree_Structures_Child_References/MongoDB Command.txt @@ -0,0 +1,12 @@ +db.categories.insertMany( [ + { _id: "MongoDB", children: [] }, + { _id: "dbm", children: [] }, + { _id: "Databases", children: [ "MongoDB", "dbm" ] }, + { _id: "Languages", children: [] }, + { _id: "Programming", children: [ "Databases", "Languages" ] }, + { _id: "Books", children: [ "Programming" ] } +] ) + +db.categories.findOne( { _id: "Databases" } ).children +db.categories.find( { children: "MongoDB" } ) +db.categories.createIndex( { children: 1 } ) diff --git a/JavaEE_2020/Model_One_to_Many/Model One-to-Many Relationships.pptx b/JavaEE_2020/Model_One_to_Many/Model One-to-Many Relationships.pptx new file mode 100644 index 00000000..ffcd5f53 Binary files /dev/null and b/JavaEE_2020/Model_One_to_Many/Model One-to-Many Relationships.pptx differ diff --git a/JavaEE_2020/Model_One_to_Many_Ref/Model One-to-Many Relationships.pptx b/JavaEE_2020/Model_One_to_Many_Ref/Model One-to-Many Relationships.pptx new file mode 100644 index 00000000..ef11adb7 Binary files /dev/null and b/JavaEE_2020/Model_One_to_Many_Ref/Model One-to-Many Relationships.pptx differ diff --git a/JavaEE_2020/Model_One_to_One/Model One-to-One Relationships.pptx b/JavaEE_2020/Model_One_to_One/Model One-to-One Relationships.pptx new file mode 100644 index 00000000..af509852 Binary files /dev/null and b/JavaEE_2020/Model_One_to_One/Model One-to-One Relationships.pptx differ diff --git a/JavaEE_2020/Model_Tree_Parent_References/Model Tree Structures with Parent References.pptx b/JavaEE_2020/Model_Tree_Parent_References/Model Tree Structures with Parent References.pptx new file mode 100644 index 00000000..6f308999 Binary files /dev/null and b/JavaEE_2020/Model_Tree_Parent_References/Model Tree Structures with Parent References.pptx differ diff --git a/JavaEE_2020/Model_Tree_Parent_References/MongoDB Command.txt b/JavaEE_2020/Model_Tree_Parent_References/MongoDB Command.txt new file mode 100644 index 00000000..70610afd --- /dev/null +++ b/JavaEE_2020/Model_Tree_Parent_References/MongoDB Command.txt @@ -0,0 +1,12 @@ +db.categories.insertMany( [ + { _id: "MongoDB", parent: "Databases" }, + { _id: "dbm", parent: "Databases" }, + { _id: "Databases", parent: "Programming" }, + { _id: "Languages", parent: "Programming" }, + { _id: "Programming", parent: "Books" }, + { _id: "Books", parent: null } +] ) + +db.categories.findOne( { _id: "MongoDB" } ).parent +db.categories.createIndex( { parent: 1 } ) +db.categories.find( { parent: "Databases" } ) diff --git a/JavaEE_2020/MongoDB_DataModelDesign/Data Model Design.pptx b/JavaEE_2020/MongoDB_DataModelDesign/Data Model Design.pptx new file mode 100644 index 00000000..9d230d1e Binary files /dev/null and b/JavaEE_2020/MongoDB_DataModelDesign/Data Model Design.pptx differ diff --git a/JavaEE_2020/MongoDB_Deleting_documents/Deleting documents.pptx b/JavaEE_2020/MongoDB_Deleting_documents/Deleting documents.pptx new file mode 100644 index 00000000..e1e58955 Binary files /dev/null and b/JavaEE_2020/MongoDB_Deleting_documents/Deleting documents.pptx differ diff --git a/JavaEE_2020/MongoDB_Deleting_documents/MongoDB Commands.txt b/JavaEE_2020/MongoDB_Deleting_documents/MongoDB Commands.txt new file mode 100644 index 00000000..acec7840 --- /dev/null +++ b/JavaEE_2020/MongoDB_Deleting_documents/MongoDB Commands.txt @@ -0,0 +1,4 @@ +db.studentInfo.remove({"name.firstName":"Arun"},1) +db.studentInfo.remove({"name.firstName":"Arun"}) +db.studentInfo.remove({"subjects":"Journalist"}) +db.studentInfo.remove({}) diff --git a/JavaEE_2020/MongoDB_Updating_Documents_Student/MongoDB Commands.txt b/JavaEE_2020/MongoDB_Updating_Documents_Student/MongoDB Commands.txt new file mode 100644 index 00000000..b31ea6a3 --- /dev/null +++ b/JavaEE_2020/MongoDB_Updating_Documents_Student/MongoDB Commands.txt @@ -0,0 +1,3 @@ +db.studentInfo.update({"name.firstName":"Arun"},{$set:{"age" : 16}}) +db.studentInfo.update({"name.firstName":"Raj"},{$set:{"age" : 30}},{upsert:true}) +db.studentInfo.update({"name.firstName":"Arun"},{$set:{"subjects.1" : "Science"}}) \ No newline at end of file diff --git a/JavaEE_2020/MongoDB_Updating_Documents_Student/Updating Documents.pptx b/JavaEE_2020/MongoDB_Updating_Documents_Student/Updating Documents.pptx new file mode 100644 index 00000000..4e15fada Binary files /dev/null and b/JavaEE_2020/MongoDB_Updating_Documents_Student/Updating Documents.pptx differ diff --git a/JavaEE_2020/MongoDB_distinct_count/MongoDB Commands.txt b/JavaEE_2020/MongoDB_distinct_count/MongoDB Commands.txt new file mode 100644 index 00000000..35d79ab8 --- /dev/null +++ b/JavaEE_2020/MongoDB_distinct_count/MongoDB Commands.txt @@ -0,0 +1,3 @@ +db.studentInfo.distinct("subjects") +db.studentInfo.count() +db.studentInfo.find({"subjects":"Maths"}).count() \ No newline at end of file diff --git a/JavaEE_2020/MongoDB_distinct_count/Using distinct() and count().pptx b/JavaEE_2020/MongoDB_distinct_count/Using distinct() and count().pptx new file mode 100644 index 00000000..4ef5477c Binary files /dev/null and b/JavaEE_2020/MongoDB_distinct_count/Using distinct() and count().pptx differ diff --git a/JavaEE_2020/Query_Operators_Array_get/MongoDB Commands.txt b/JavaEE_2020/Query_Operators_Array_get/MongoDB Commands.txt new file mode 100644 index 00000000..691eef5a --- /dev/null +++ b/JavaEE_2020/Query_Operators_Array_get/MongoDB Commands.txt @@ -0,0 +1,4 @@ +db.studentInfo.find({"subjects":{$in:["Chemistry"]}}) +db.studentInfo.find({"subjects":{$nin:["Chemistry"]}}) +db.studentInfo.find({"subjects":{$exists:true, $in:["Chemistry"]}}) +db.studentInfo.find({"subjects":{$exists:false, $nin:["Chemistry"]}}) \ No newline at end of file diff --git a/JavaEE_2020/Query_Operators_Array_get/Query Operators.pptx b/JavaEE_2020/Query_Operators_Array_get/Query Operators.pptx new file mode 100644 index 00000000..7ba14eac Binary files /dev/null and b/JavaEE_2020/Query_Operators_Array_get/Query Operators.pptx differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/.classpath b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/.classpath rename to JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/.classpath diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/.project b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/.project similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/.project rename to JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/.project diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/bin/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/bin/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/bin/MessageBundle_en_US.properties diff --git a/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties new file mode 100644 index 00000000..89b464a4 --- /dev/null +++ b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties @@ -0,0 +1 @@ +greeting=Salut comment allez-vous? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/ResourceBundleDemo.class b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/bin/ResourceBundleDemo.class similarity index 89% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/ResourceBundleDemo.class rename to JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/bin/ResourceBundleDemo.class index 63ed3aee..f4392ac6 100644 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/ResourceBundleDemo.class and b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/bin/ResourceBundleDemo.class differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/src/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/src/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/src/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/src/MessageBundle_en_US.properties diff --git a/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/src/MessageBundle_fr_FR.properties b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/src/MessageBundle_fr_FR.properties new file mode 100644 index 00000000..89b464a4 --- /dev/null +++ b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/src/MessageBundle_fr_FR.properties @@ -0,0 +1 @@ +greeting=Salut comment allez-vous? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/ResourceBundleDemo.java b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/src/ResourceBundleDemo.java similarity index 83% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/ResourceBundleDemo.java rename to JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/src/ResourceBundleDemo.java index c72ca3da..e32e530a 100644 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/ResourceBundleDemo.java +++ b/JavaEE_2020/ResourceBundleDemo_Read/ResourceBundleDemo/src/ResourceBundleDemo.java @@ -32,15 +32,14 @@ public static void main(String[] args) System.out.println("Default Locale = " + Locale.getDefault()); ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle"); - System.out.println("Message in " + Locale.US + " = " - + bundle.getString("greeting")); - + System.out.println("Message in " + Locale.US + " = " + bundle.getString("greeting")); + Locale.setDefault(new Locale("fr", "FR")); System.out.println("Default Locale = " + Locale.getDefault()); bundle = ResourceBundle.getBundle("MessageBundle"); - System.out.println("Message in " + Locale.getDefault() + " = " - + bundle.getString("greeting")); + System.out.println( + "Message in " + Locale.getDefault() + " = " + bundle.getString("greeting")); } diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/.classpath b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/.classpath rename to JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/.classpath diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/.project b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/.project similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/.project rename to JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/.project diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/bin/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/bin/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/bin/MessageBundle_en_US.properties diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/bin/ResourceBundleDemo.class b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/bin/ResourceBundleDemo.class similarity index 93% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/bin/ResourceBundleDemo.class rename to JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/bin/ResourceBundleDemo.class index a29ea38a..3d4cb68b 100644 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/bin/ResourceBundleDemo.class and b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/bin/ResourceBundleDemo.class differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/src/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/src/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/src/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/src/MessageBundle_en_US.properties diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/src/ResourceBundleDemo.java b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/src/ResourceBundleDemo.java similarity index 90% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/src/ResourceBundleDemo.java rename to JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/src/ResourceBundleDemo.java index e7bcbcd4..1aa51e0b 100644 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/src/ResourceBundleDemo.java +++ b/JavaEE_2020/ResourceBundleDemo_containsKey/ResourceBundleDemo/src/ResourceBundleDemo.java @@ -22,7 +22,7 @@ public static void main(String[] args) * or its parent bundles; false otherwise. * */ - boolean result = bundle.containsKey("greeting"); + boolean result = bundle.containsKey("greeting_lll"); System.out.println(result); } diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/.classpath b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/.classpath rename to JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/.classpath diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/.project b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/.project similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/.project rename to JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/.project diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/bin/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/bin/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/bin/MessageBundle_en_US.properties diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/bin/ResourceBundleDemo.class b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/bin/ResourceBundleDemo.class similarity index 87% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/bin/ResourceBundleDemo.class rename to JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/bin/ResourceBundleDemo.class index e21d7cfa..97a7c59f 100644 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/bin/ResourceBundleDemo.class and b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/bin/ResourceBundleDemo.class differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/src/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/src/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/src/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/src/MessageBundle_en_US.properties diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/src/ResourceBundleDemo.java b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/src/ResourceBundleDemo.java similarity index 77% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/src/ResourceBundleDemo.java rename to JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/src/ResourceBundleDemo.java index 1bd8948c..0467fe7e 100644 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/src/ResourceBundleDemo.java +++ b/JavaEE_2020/ResourceBundleDemo_getString/ResourceBundleDemo/src/ResourceBundleDemo.java @@ -17,14 +17,14 @@ public static void main(String[] args) * an Enumeration of the keys contained in this ResourceBundle * and its parent bundles. */ - Enumeration enumeration = bundle.getKeys(); + Enumeration enumerationOfKeys = bundle.getKeys(); /* * Print all the keys and corresponding values */ - while (enumeration.hasMoreElements()) + while (enumerationOfKeys.hasMoreElements()) { - String key = enumeration.nextElement(); + String key = enumerationOfKeys.nextElement(); String value = bundle.getString(key); System.out.println(key+" = "+value); } diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/.classpath b/JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/.classpath rename to JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/.classpath diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/.project b/JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/.project similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/.project rename to JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/.project diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/bin/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/bin/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/bin/MessageBundle_en_US.properties diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/bin/ResourceBundleDemo.class b/JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/bin/ResourceBundleDemo.class similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/bin/ResourceBundleDemo.class rename to JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/bin/ResourceBundleDemo.class diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/src/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/src/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/src/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/src/MessageBundle_en_US.properties diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/src/ResourceBundleDemo.java b/JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/src/ResourceBundleDemo.java similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/src/ResourceBundleDemo.java rename to JavaEE_2020/ResourceBundleDemo_getkeys/ResourceBundleDemo/src/ResourceBundleDemo.java diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/.classpath b/JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/.classpath rename to JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/.classpath diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/.project b/JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/.project similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/.project rename to JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/.project diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/bin/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/bin/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/bin/MessageBundle_en_US.properties diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/bin/ResourceBundleDemo.class b/JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/bin/ResourceBundleDemo.class similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/bin/ResourceBundleDemo.class rename to JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/bin/ResourceBundleDemo.class diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/src/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/src/MessageBundle_en_US.properties similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/src/MessageBundle_en_US.properties rename to JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/src/MessageBundle_en_US.properties diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/src/ResourceBundleDemo.java b/JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/src/ResourceBundleDemo.java similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/src/ResourceBundleDemo.java rename to JavaEE_2020/ResourceBundleDemo_keySet/ResourceBundleDemo/src/ResourceBundleDemo.java diff --git a/JavaEE_2020/ResourceBundle_Intro/ResourceBundle.pptx b/JavaEE_2020/ResourceBundle_Intro/ResourceBundle.pptx new file mode 100644 index 00000000..e5f8e96d Binary files /dev/null and b/JavaEE_2020/ResourceBundle_Intro/ResourceBundle.pptx differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/.classpath b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/.classpath similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/.classpath rename to JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/.classpath diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/.project b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/.project similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/.project rename to JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/.project diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/.settings/org.eclipse.jdt.core.prefs rename to JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/bin/InternationalizationDemo.class b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/InternationalizationDemo.class similarity index 83% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/bin/InternationalizationDemo.class rename to JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/InternationalizationDemo.class index 1cabe36e..cdc73d81 100644 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/bin/InternationalizationDemo.class and b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/InternationalizationDemo.class differ diff --git a/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/MessageBundle_en_US.properties new file mode 100644 index 00000000..0d09548a --- /dev/null +++ b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/MessageBundle_en_US.properties @@ -0,0 +1 @@ +Greeting = Hi, how are you? \ No newline at end of file diff --git a/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties new file mode 100644 index 00000000..247172f3 --- /dev/null +++ b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties @@ -0,0 +1 @@ +Greeting = Salut comment ca va? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/src/InternationalizationDemo.java b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/InternationalizationDemo.java similarity index 85% rename from Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/src/InternationalizationDemo.java rename to JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/InternationalizationDemo.java index 24c617e6..94eff96c 100644 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/src/InternationalizationDemo.java +++ b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/InternationalizationDemo.java @@ -43,26 +43,21 @@ public static void main(String[] args) * a resource bundle for the given base name and locale * */ - ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle", - Locale.US); + ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle", Locale.US); - System.out.println("Message in " + Locale.US + " = " - + bundle.getString("greeting")); + System.out.println("Message in " + Locale.US + " = " + bundle.getString("Greeting")); } else if (countryCode.equals("FR") && languageCode.equals("fr")) { - ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle", - Locale.US); + ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle",Locale.US); Locale.setDefault(new Locale("fr", "FR")); bundle = ResourceBundle.getBundle("MessageBundle"); - System.out.println("Message in " + Locale.getDefault() + " = " - + bundle.getString("greeting")); + System.out.println("Message in " + Locale.getDefault() + " = " + bundle.getString("Greeting")); } else { - System.out.println( - "Please enter proper countryCode and languageCode."); + System.out.println( "Please enter proper countryCode and languageCode."); } } diff --git a/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/MessageBundle_en_US.properties b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/MessageBundle_en_US.properties new file mode 100644 index 00000000..0d09548a --- /dev/null +++ b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/MessageBundle_en_US.properties @@ -0,0 +1 @@ +Greeting = Hi, how are you? \ No newline at end of file diff --git a/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/MessageBundle_fr_FR.properties b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/MessageBundle_fr_FR.properties new file mode 100644 index 00000000..247172f3 --- /dev/null +++ b/JavaEE_2020/ResourceBundle_Intro/ResourceBundleDemo/src/MessageBundle_fr_FR.properties @@ -0,0 +1 @@ +Greeting = Salut comment ca va? \ No newline at end of file diff --git a/JavaEE_2020/Understanding_Impact_Indexes/MongoDB Commands.txt b/JavaEE_2020/Understanding_Impact_Indexes/MongoDB Commands.txt new file mode 100644 index 00000000..3c012e39 --- /dev/null +++ b/JavaEE_2020/Understanding_Impact_Indexes/MongoDB Commands.txt @@ -0,0 +1,5 @@ +db.employee.find({ "EmployeeName" : "Joe"}).explain(1) + +db.employee.createIndex({ EmployeeName : 1}) + +db.employee.dropIndexes() \ No newline at end of file diff --git a/JavaEE_2020/Understanding_Impact_Indexes/Understanding Impact of Indexes.pptx b/JavaEE_2020/Understanding_Impact_Indexes/Understanding Impact of Indexes.pptx new file mode 100644 index 00000000..5839191a Binary files /dev/null and b/JavaEE_2020/Understanding_Impact_Indexes/Understanding Impact of Indexes.pptx differ diff --git a/JavaEE_2020/Understanding_Impact_Indexes_time/MongoDB Commands.txt b/JavaEE_2020/Understanding_Impact_Indexes_time/MongoDB Commands.txt new file mode 100644 index 00000000..3c012e39 --- /dev/null +++ b/JavaEE_2020/Understanding_Impact_Indexes_time/MongoDB Commands.txt @@ -0,0 +1,5 @@ +db.employee.find({ "EmployeeName" : "Joe"}).explain(1) + +db.employee.createIndex({ EmployeeName : 1}) + +db.employee.dropIndexes() \ No newline at end of file diff --git a/JavaEE_2020/Understanding_Impact_Indexes_time/Understanding Impact of Indexes.pptx b/JavaEE_2020/Understanding_Impact_Indexes_time/Understanding Impact of Indexes.pptx new file mode 100644 index 00000000..8ba1e021 Binary files /dev/null and b/JavaEE_2020/Understanding_Impact_Indexes_time/Understanding Impact of Indexes.pptx differ diff --git a/Later/Java_Later/WebService/3/What is WSDL and UDDI.pptx b/JavaEE_2020/WSDL_UDDI/What is WSDL and UDDI.pptx similarity index 92% rename from Later/Java_Later/WebService/3/What is WSDL and UDDI.pptx rename to JavaEE_2020/WSDL_UDDI/What is WSDL and UDDI.pptx index f0cd4ae1..2cfc5c74 100644 Binary files a/Later/Java_Later/WebService/3/What is WSDL and UDDI.pptx and b/JavaEE_2020/WSDL_UDDI/What is WSDL and UDDI.pptx differ diff --git a/Later/Java_Later/WebService/6/What are REST WebServices_1 .pptx b/JavaEE_2020/What_REST_WebServices_1/What are REST WebServices_1.pptx similarity index 91% rename from Later/Java_Later/WebService/6/What are REST WebServices_1 .pptx rename to JavaEE_2020/What_REST_WebServices_1/What are REST WebServices_1.pptx index 8e9823d6..1f58d7cf 100644 Binary files a/Later/Java_Later/WebService/6/What are REST WebServices_1 .pptx and b/JavaEE_2020/What_REST_WebServices_1/What are REST WebServices_1.pptx differ diff --git a/Later/Java_Later/WebService/4/What are SOAP Web Services.pptx b/JavaEE_2020/What_are_SOAP_WebServices/What are SOAP Web Services.pptx similarity index 95% rename from Later/Java_Later/WebService/4/What are SOAP Web Services.pptx rename to JavaEE_2020/What_are_SOAP_WebServices/What are SOAP Web Services.pptx index e0377c0f..6df63432 100644 Binary files a/Later/Java_Later/WebService/4/What are SOAP Web Services.pptx and b/JavaEE_2020/What_are_SOAP_WebServices/What are SOAP Web Services.pptx differ diff --git a/Later/Java_Later/WebService/1/What is a Web Service.pptx b/JavaEE_2020/What_is_WebService/What is a Web Service.pptx similarity index 92% rename from Later/Java_Later/WebService/1/What is a Web Service.pptx rename to JavaEE_2020/What_is_WebService/What is a Web Service.pptx index d7c0e459..d75c96f7 100644 Binary files a/Later/Java_Later/WebService/1/What is a Web Service.pptx and b/JavaEE_2020/What_is_WebService/What is a Web Service.pptx differ diff --git a/Later/Java_Later/Java_Networking/1/What is networking.pptx b/JavaEE_2020/What_is_networking/What is networking.pptx similarity index 71% rename from Later/Java_Later/Java_Networking/1/What is networking.pptx rename to JavaEE_2020/What_is_networking/What is networking.pptx index 186b5a74..53eb3dc9 100644 Binary files a/Later/Java_Later/Java_Networking/1/What is networking.pptx and b/JavaEE_2020/What_is_networking/What is networking.pptx differ diff --git a/Later/Java_Later/Java_Networking/1/What is networking_V2.pptx b/JavaEE_2020/What_is_networking_V2/What is networking_V2.pptx similarity index 82% rename from Later/Java_Later/Java_Networking/1/What is networking_V2.pptx rename to JavaEE_2020/What_is_networking_V2/What is networking_V2.pptx index 472f0b0e..435e6293 100644 Binary files a/Later/Java_Later/Java_Networking/1/What is networking_V2.pptx and b/JavaEE_2020/What_is_networking_V2/What is networking_V2.pptx differ diff --git a/Later/Java_Later/Java_Networking/1/What is networking_V3.pptx b/JavaEE_2020/What_is_networking_V3/What is networking_V3.pptx similarity index 80% rename from Later/Java_Later/Java_Networking/1/What is networking_V3.pptx rename to JavaEE_2020/What_is_networking_V3/What is networking_V3.pptx index 48f4933f..7280355c 100644 Binary files a/Later/Java_Later/Java_Networking/1/What is networking_V3.pptx and b/JavaEE_2020/What_is_networking_V3/What is networking_V3.pptx differ diff --git a/Later/Java_Later/Java_Networking/1/What is networking_V4.pptx b/JavaEE_2020/What_is_networking_V4/What is networking_V4.pptx similarity index 74% rename from Later/Java_Later/Java_Networking/1/What is networking_V4.pptx rename to JavaEE_2020/What_is_networking_V4/What is networking_V4.pptx index 46603a0c..8b863f1a 100644 Binary files a/Later/Java_Later/Java_Networking/1/What is networking_V4.pptx and b/JavaEE_2020/What_is_networking_V4/What is networking_V4.pptx differ diff --git a/Later/Java_Later/Java_Networking/3/Java Socket Programming.pptx b/Later/Java_Later/Java_Networking/3/Java Socket Programming.pptx deleted file mode 100644 index 199529f6..00000000 Binary files a/Later/Java_Later/Java_Networking/3/Java Socket Programming.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Networking/4/Java Socket Programming Example.pptx b/Later/Java_Later/Java_Networking/4/Java Socket Programming Example.pptx deleted file mode 100644 index ff8713eb..00000000 Binary files a/Later/Java_Later/Java_Networking/4/Java Socket Programming Example.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/I18N with Currency.pptx b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/I18N with Currency.pptx deleted file mode 100644 index ff1e8234..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/I18N with Currency.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/.project deleted file mode 100644 index 49550d20..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - InternalizationCurrencyDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/bin/InternalizationNumberDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/bin/InternalizationNumberDemo.class deleted file mode 100644 index 338c3af1..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/bin/InternalizationNumberDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/src/InternalizationCurrencyDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/src/InternalizationCurrencyDemo.java deleted file mode 100644 index 25579a4f..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Currency/InternalizationCurrencyDemo/src/InternalizationCurrencyDemo.java +++ /dev/null @@ -1,38 +0,0 @@ -import java.text.NumberFormat; -import java.util.Locale; - -/** - * - * Internationalizing Currency (I18N with Currency) - * - */ -public class InternalizationCurrencyDemo -{ - - public static void main(String[] args) - { - displayCurrency(Locale.US); - displayCurrency(Locale.CHINA); - displayCurrency(Locale.FRANCE); - } - - static void displayCurrency(Locale locale) - { - double dbl = 2000.909; - /* - * Returns a currency format for the specified locale. - * - * Parameters: - * - * inLocale - the desired locale - * - * Returns: - * - * the NumberFormat instance for currency formatting - */ - NumberFormat formatter = NumberFormat.getCurrencyInstance(locale); - String currency = formatter.format(dbl); - System.out.println(currency + " for the locale " + locale); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/I18N with Date.pptx b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/I18N with Date.pptx deleted file mode 100644 index 559c2ed2..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/I18N with Date.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/.project deleted file mode 100644 index 71b746aa..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - InternationalizationDateDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/bin/InternationalizationDateDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/bin/InternationalizationDateDemo.class deleted file mode 100644 index 7109e2d0..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/bin/InternationalizationDateDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/src/InternationalizationDateDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/src/InternationalizationDateDemo.java deleted file mode 100644 index 694ae464..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Date/InternationalizationDateDemo/src/InternationalizationDateDemo.java +++ /dev/null @@ -1,45 +0,0 @@ -import java.text.DateFormat; -import java.util.Date; -import java.util.Locale; - -/** - * - * Internationalizing Date (I18N with Date). - * - */ -public class InternationalizationDateDemo -{ - - public static void main(String[] args) - { - displayDate(Locale.US); - displayDate(Locale.FRANCE); - displayDate(Locale.CHINA); - } - - public static void displayDate(Locale locale) - { - /* - * Gets the date formatter with the given formatting style for - * the given locale. - * - * Parameters: - * - * style - the given formatting style. For example, SHORT for - * "M/d/yy" in the US locale. - * - * aLocale - the given locale. Returns: a date formatter. - */ - DateFormat formatter = DateFormat.getDateInstance(DateFormat.DEFAULT, - locale); - Date currentDate = new Date(); - - /* - * Formats a Date into a date/time string. - * - */ - String date = formatter.format(currentDate); - System.out.println("Date value in " + locale + " locale = " + date); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/I18N with DateTime.pptx b/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/I18N with DateTime.pptx deleted file mode 100644 index 7b38dc00..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/I18N with DateTime.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/.project deleted file mode 100644 index 71b746aa..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - InternationalizationDateDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/bin/InternationalizationDateTimeDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/bin/InternationalizationDateTimeDemo.class deleted file mode 100644 index e2f543c8..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/bin/InternationalizationDateTimeDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/src/InternationalizationDateTimeDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/src/InternationalizationDateTimeDemo.java deleted file mode 100644 index 1093db31..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with DateTime/InternationalizationDateDemo/src/InternationalizationDateTimeDemo.java +++ /dev/null @@ -1,46 +0,0 @@ -import java.text.DateFormat; -import java.util.Date; -import java.util.Locale; - -/** - * - * Internationalizing DateTime (I18N with DateTime) - * - */ -public class InternationalizationDateTimeDemo -{ - - public static void main(String[] args) - { - displayDateTime(Locale.US); - displayDateTime(Locale.CHINA); - displayDateTime(Locale.FRANCE); - } - - public static void displayDateTime(Locale locale) - { - /* - * Gets the date/time formatter with the given formatting - * styles for the given locale. - * - * Parameters: - * - * dateStyle - the given date formatting style. - * - * timeStyle - the given time formatting style. - * - * aLocale - the given locale. Returns: a date/time formatter. - */ - DateFormat formatter = DateFormat.getDateTimeInstance( - DateFormat.DEFAULT, DateFormat.DEFAULT, locale); - Date date = new Date(); - - /* - * Formats a Date into a date/time string. - * - */ - String strDate = formatter.format(date); - System.out.println("Time value in " + locale + " locale = " + strDate); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/I18N with Number.pptx b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/I18N with Number.pptx deleted file mode 100644 index 5b5ed959..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/I18N with Number.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/.project deleted file mode 100644 index 5e4637bf..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - InternalizationNumberDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/bin/InternalizationNumberDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/bin/InternalizationNumberDemo.class deleted file mode 100644 index 9c944a3d..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/bin/InternalizationNumberDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/src/InternalizationNumberDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/src/InternalizationNumberDemo.java deleted file mode 100644 index f28b3ee3..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Number/InternalizationNumberDemo/src/InternalizationNumberDemo.java +++ /dev/null @@ -1,38 +0,0 @@ -import java.text.NumberFormat; -import java.util.Locale; - -/** - * - * Internationalizing Number (I18N with Number) - * - */ -public class InternalizationNumberDemo -{ - - public static void main(String[] args) - { - displayNumber(Locale.US); - displayNumber(Locale.CHINA); - displayNumber(Locale.FRANCE); - } - - static void displayNumber(Locale locale) - { - double dbl = 10000.909; - /* - * Returns a general-purpose number format for the specified - * locale. - * - * Parameters: - * - * inLocale - the desired locale - * - * Returns: the NumberFormat instance for general-purpose - * number formatting - */ - NumberFormat formatter = NumberFormat.getNumberInstance(locale); - String number = formatter.format(dbl); - System.out.println(number + " for the locale " + locale); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/I18N with Time.pptx b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/I18N with Time.pptx deleted file mode 100644 index f7dfb436..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/I18N with Time.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/.project deleted file mode 100644 index 71b746aa..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - InternationalizationDateDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/bin/InternationalizationTimeDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/bin/InternationalizationTimeDemo.class deleted file mode 100644 index 267a1b47..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/bin/InternationalizationTimeDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/src/InternationalizationTimeDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/src/InternationalizationTimeDemo.java deleted file mode 100644 index 877346ac..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/I18N with Time/InternationalizationDateDemo/src/InternationalizationTimeDemo.java +++ /dev/null @@ -1,45 +0,0 @@ -import java.text.DateFormat; -import java.util.Date; -import java.util.Locale; - -/** - * - * Internationalizing Time (I18N with Time) - * - */ -public class InternationalizationTimeDemo -{ - - public static void main(String[] args) - { - displayTime(Locale.US); - displayTime(Locale.CHINA); - displayTime(Locale.FRANCE); - } - - public static void displayTime(Locale locale) - { - /* - * Gets the time formatter with the given formatting style for - * the given locale. - * - * Parameters: - * - * style - the given formatting style. For example, SHORT for - * "h:mm a" in the US locale. - * - * aLocale - the given locale. Returns: a time formatter. - */ - DateFormat formatter = DateFormat.getTimeInstance(DateFormat.DEFAULT, - locale); - Date date = new Date(); - - /* - * Formats a Date into a date/time string. - * - */ - String strDate = formatter.format(date); - System.out.println("Time value in " + locale + " locale = " + strDate); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/1/Internationalization_in_java.pptx b/Later/Java_Later/Java_Util_package/Internationalization/Locale/1/Internationalization_in_java.pptx deleted file mode 100644 index ee9e7c43..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/1/Internationalization_in_java.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/10/Codes in Locale.pptx b/Later/Java_Later/Java_Util_package/Internationalization/Locale/10/Codes in Locale.pptx deleted file mode 100644 index 8c621769..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/10/Codes in Locale.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/bin/LocaleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/bin/LocaleDemo.class deleted file mode 100644 index a482a20a..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/bin/LocaleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/src/LocaleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/src/LocaleDemo.java deleted file mode 100644 index 0d2f91ce..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/11/LocaleDemo/src/LocaleDemo.java +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo -{ - - public static void main(String[] args) - { - - /* - * Returns: An array of ISO 3166 two-letter country codes. - */ - String[] countryCodeArray = Locale.getISOCountries(); - - for (String countryCode : countryCodeArray) - { - - Locale obj = new Locale("", countryCode); - - System.out.println("Country Code = " + obj.getCountry() - + ", Country Name = " + obj.getDisplayCountry()); - - } - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/bin/LocaleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/bin/LocaleDemo.class deleted file mode 100644 index f55c45d9..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/bin/LocaleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/src/LocaleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/src/LocaleDemo.java deleted file mode 100644 index 0fc8d86b..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/12/LocaleDemo/src/LocaleDemo.java +++ /dev/null @@ -1,29 +0,0 @@ -import java.util.Locale; - -/** - * - * Get a list of countries, and display the country name in FRENCH. - * - */ -public class LocaleDemo -{ - - public static void main(String[] args) - { - - String[] locales = Locale.getISOCountries(); - - for (String countryCode : locales) - { - - Locale obj = new Locale("", countryCode); - - System.out.println( - "Country Code = " + obj.getCountry() + ", Country Name = " - + obj.getDisplayCountry(Locale.FRENCH)); - - } - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/bin/LocaleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/bin/LocaleDemo.class deleted file mode 100644 index 80b83ad3..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/bin/LocaleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/src/LocaleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/src/LocaleDemo.java deleted file mode 100644 index 3a469d6d..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/13/LocaleDemo/src/LocaleDemo.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.util.Locale; - -/** - * - * Display the country name in own country’s languages. - * - */ -public class LocaleDemo -{ - - public static void main(String[] args) - { - - String[] locales = Locale.getISOCountries(); - - for (String countryCode : locales) - { - - Locale obj = new Locale("", countryCode); - - System.out.println("Country Code = " + obj.getCountry() - + ", Country Name = " + obj.getDisplayCountry()); - - } - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/bin/LocaleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/bin/LocaleDemo.class deleted file mode 100644 index e8c851fd..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/bin/LocaleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/src/LocaleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/src/LocaleDemo.java deleted file mode 100644 index e27f5ba3..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/LocaleDemo/src/LocaleDemo.java +++ /dev/null @@ -1,21 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo -{ - - public static void main(String[] args) - { - /* - * Useful constant for country. - */ - Locale usLocale = Locale.US; - System.out.println(usLocale); - - Locale frenchLocale = Locale.FRENCH; - System.out.println(frenchLocale); - - Locale chineseLocale = Locale.CHINESE; - System.out.println(chineseLocale); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/Locale_fields.pptx b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/Locale_fields.pptx deleted file mode 100644 index 4b8edc67..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2.1/Locale_fields.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/Locale.pptx b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/Locale.pptx deleted file mode 100644 index 63768bc6..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/Locale.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/bin/LocaleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/bin/LocaleDemo.class deleted file mode 100644 index dd7387e1..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/bin/LocaleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/src/LocaleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/src/LocaleDemo.java deleted file mode 100644 index 1599fd2a..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/2/LocaleDemo/src/LocaleDemo.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo -{ - - public static void main(String[] args) - { - - /* - * Returns: - * - * the default locale for this instance of the Java Virtual - * Machine - */ - Locale locale = Locale.getDefault(); - System.out.println("locale = " + locale); - - System.out.println("DisplayCountry = " + locale.getDisplayCountry()); - System.out.println("DisplayLanguage = " + locale.getDisplayLanguage()); - System.out.println("DisplayName = " + locale.getDisplayName()); - System.out.println("ISO3Country = " + locale.getISO3Country()); - System.out.println("ISO3Language = " + locale.getISO3Language()); - System.out.println("Language = " + locale.getLanguage()); - System.out.println("Country = " + locale.getCountry()); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/bin/LocaleDemo1.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/bin/LocaleDemo1.class deleted file mode 100644 index bb911f34..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/bin/LocaleDemo1.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/bin/LocaleDemo2.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/bin/LocaleDemo2.class deleted file mode 100644 index 01e7477d..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/bin/LocaleDemo2.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/src/LocaleDemo1.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/src/LocaleDemo1.java deleted file mode 100644 index f23a4f8e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/src/LocaleDemo1.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo1 -{ - - public static void main(String[] args) - { - - /* - * Construct a locale from a language code. This constructor - * normalizes the language value to lowercase. - * - * Parameters: - * - * language - An ISO 639 alpha-2 or alpha-3 language code, or - * a language subtag up to 8 characters in length. See the - * Locale class description about valid language values. - * - */ - Locale enLocale = new Locale("en"); - System.out.println(enLocale); - - Locale frLocale = new Locale("fr"); - System.out.println(frLocale); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/src/LocaleDemo2.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/src/LocaleDemo2.java deleted file mode 100644 index 54f000d3..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/3/LocaleDemo/src/LocaleDemo2.java +++ /dev/null @@ -1,33 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo2 -{ - - public static void main(String[] args) - { - - /* - * Construct a locale from language and country. This - * constructor normalizes the language value to lowercase and - * the country value to uppercase. - * - * Parameters: - * - * language - An ISO 639 alpha-2 or alpha-3 language code, or - * a language subtag up to 8 characters in length. See the - * Locale class description about valid language values. - * - * country - An ISO 3166 alpha-2 country code or a UN M.49 - * numeric-3 area code. See the Locale class description about - * valid country values. - * - */ - Locale enLocale = new Locale("en", "US"); - System.out.println(enLocale); - - Locale frLocale = new Locale("fr", "FR"); - System.out.println(frLocale); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo1.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo1.class deleted file mode 100644 index bbee4a01..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo1.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo2.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo2.class deleted file mode 100644 index 10f5fd61..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo2.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo3.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo3.class deleted file mode 100644 index 4364739b..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/bin/LocaleDemo3.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo1.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo1.java deleted file mode 100644 index b5a2e48e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo1.java +++ /dev/null @@ -1,23 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo1 -{ - - public static void main(String[] args) - { - /* - * Returns: - * - * An array of installed locales. - */ - - Locale[] localeArray = Locale.getAvailableLocales(); - - for (Locale locale : localeArray) - { - System.out.println(locale); - } - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo2.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo2.java deleted file mode 100644 index 7b2dd53a..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo2.java +++ /dev/null @@ -1,22 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo2 -{ - - public static void main(String[] args) - { - /* - * Returns: - * - * An array of ISO 3166 two-letter country codes. - */ - String[] countryCodeArray = Locale.getISOCountries(); - - for (String country : countryCodeArray) - { - System.out.println(country); - } - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo3.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo3.java deleted file mode 100644 index 55692975..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/4/LocaleDemo/src/LocaleDemo3.java +++ /dev/null @@ -1,22 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo3 -{ - - public static void main(String[] args) - { - - /* - * Returns: - * - * An array of ISO 639 two-letter language codes. - */ - String[] languageCodeArray = Locale.getISOLanguages(); - - for (String language : languageCodeArray) - { - System.out.println(language); - } - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo1.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo1.class deleted file mode 100644 index 2c890ce0..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo1.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo2.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo2.class deleted file mode 100644 index 10f5fd61..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo2.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo3.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo3.class deleted file mode 100644 index 4364739b..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/bin/LocaleDemo3.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/src/LocaleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/src/LocaleDemo.java deleted file mode 100644 index 722a82ed..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/5/LocaleDemo/src/LocaleDemo.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo -{ - - public static void main(String[] args) - { - Locale locale = Locale.getDefault(); - - System.out.println("Locale = " + locale); - - Locale frLocale = new Locale("fr", "FR"); - - /* - * Parameters: - * - * newLocale - the new default locale - * - */ - Locale.setDefault(frLocale); - - locale = Locale.getDefault(); - - System.out.println("Locale = " + locale); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/bin/LocaleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/bin/LocaleDemo.class deleted file mode 100644 index 34a53d77..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/bin/LocaleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/src/LocaleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/src/LocaleDemo.java deleted file mode 100644 index 62012c4e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/6/LocaleDemo/src/LocaleDemo.java +++ /dev/null @@ -1,32 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo -{ - - public static void main(String[] args) - { - Locale locale = new Locale("en", "US", "WIN"); - - System.out.println("Locale = " + locale); - - /* - * Returns: - * - * The variant code, or the empty string if none is defined. - * - */ - String variant = locale.getVariant(); - System.out.println("variant = " + variant); - - /* - * Returns: - * - * The name of the display variant code appropriate to the - * locale. - */ - String displayVariant = locale.getDisplayVariant(); - System.out.println("displayVariant = " + displayVariant); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo1.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo1.class deleted file mode 100644 index 8b4d0af2..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo1.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo2.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo2.class deleted file mode 100644 index 45f7b46b..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo2.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo3.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo3.class deleted file mode 100644 index 1f24fd63..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/bin/LocaleDemo3.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo1.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo1.java deleted file mode 100644 index 616e0c58..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo1.java +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo1 -{ - - public static void main(String[] args) - { - Locale locale = new Locale("en", "US"); - - String displayName = locale.getDisplayCountry(); - System.out.println("Display Country = " + displayName); - - Locale frLocale = new Locale("fr", "FR"); - - /* - * Parameters: - * - * inLocale - The locale for which to retrieve the display - * country. - * - * Returns: - * - * The name of the country appropriate to the given locale. - */ - displayName = locale.getDisplayCountry(frLocale); - System.out.println("Display Country = " + displayName); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo2.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo2.java deleted file mode 100644 index c09b8665..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo2.java +++ /dev/null @@ -1,32 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo2 -{ - - public static void main(String[] args) - { - Locale locale = new Locale("en", "US"); - - String displayName = locale.getDisplayLanguage(); - System.out.println("Display Language = " + displayName); - - Locale frLocale = new Locale("fr", "FR"); - - /* - * Parameters: - * - * inLocale - The locale for which to retrieve the display - * language. - * - * Returns: - * - * The name of the display language appropriate to the given - * locale. - * - */ - displayName = locale.getDisplayLanguage(frLocale); - System.out.println("Display Language = " + displayName); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo3.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo3.java deleted file mode 100644 index 02d502e1..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/7/LocaleDemo/src/LocaleDemo3.java +++ /dev/null @@ -1,32 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo3 -{ - - public static void main(String[] args) - { - Locale locale = new Locale("en", "US"); - - String displayName = locale.getDisplayName(); - System.out.println("Display Name = " + displayName); - - Locale frLocale = new Locale("fr", "FR"); - - /* - * Parameters: - * - * inLocale - The locale for which to retrieve the display - * name. - * - * Returns: - * - * The name of the locale appropriate to display. - * - * - */ - displayName = locale.getDisplayName(frLocale); - System.out.println("Display Name = " + displayName); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/bin/LocaleDemo1.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/bin/LocaleDemo1.class deleted file mode 100644 index aee0c911..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/bin/LocaleDemo1.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/src/LocaleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/src/LocaleDemo.java deleted file mode 100644 index a2708e8d..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/8/LocaleDemo/src/LocaleDemo.java +++ /dev/null @@ -1,32 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo1 -{ - - public static void main(String[] args) - { - Locale locale = new Locale("en", "US", "WIN"); - - String displayVariant = locale.getDisplayVariant(); - System.out.println("Display Variant = " + displayVariant); - - Locale frLocale = new Locale("fr", "FR"); - - /* - * Parameters: - * - * inLocale - The locale for which to retrieve the display - * variant code. - * - * Returns: - * - * The name of the display variant code appropriate to the - * given locale. - * - */ - displayVariant = locale.getDisplayVariant(frLocale); - System.out.println("Display Variant = " + displayVariant); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.project deleted file mode 100644 index 941bf265..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - LocaleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo1.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo1.class deleted file mode 100644 index 0685db04..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo1.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo2.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo2.class deleted file mode 100644 index cdaad9bc..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo2.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo3.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo3.class deleted file mode 100644 index 6f7a5075..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo3.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo4.class b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo4.class deleted file mode 100644 index 6840d9a2..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/bin/LocaleDemo4.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo1.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo1.java deleted file mode 100644 index d099883e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo1.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo1 -{ - - public static void main(String[] args) - { - - /* - * Creates Locale objects for the English language in the - * United States. - */ - Locale usLocale = new Locale.Builder().setLanguage("en").setRegion("US") - .build(); - - System.out.println(usLocale); - - /* - * Creates Locale objects for the English language in the - * Great Britain: - */ - Locale gbLocale = new Locale.Builder().setLanguage("en").setRegion("GB") - .build(); - - System.out.println(gbLocale); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo2.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo2.java deleted file mode 100644 index 0acc74dc..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo2.java +++ /dev/null @@ -1,16 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo2 -{ - - public static void main(String[] args) - { - - Locale usLocale = new Locale("en", "US"); - System.out.println(usLocale); - - Locale frLocale = new Locale("fr", "FR"); - System.out.println(frLocale); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo3.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo3.java deleted file mode 100644 index 6e384532..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo3.java +++ /dev/null @@ -1,15 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo3 -{ - - public static void main(String[] args) - { - Locale usLocale = Locale.forLanguageTag("en-US"); - System.out.println(usLocale); - - Locale frLocale = Locale.forLanguageTag("fr_FR"); - System.out.println(frLocale); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo4.java b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo4.java deleted file mode 100644 index 58eac1aa..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/LocaleDemo/src/LocaleDemo4.java +++ /dev/null @@ -1,15 +0,0 @@ -import java.util.Locale; - -public class LocaleDemo4 -{ - - public static void main(String[] args) - { - Locale japanLocale = Locale.JAPAN; - System.out.println(japanLocale); - - Locale canadaFrenchLocale = Locale.CANADA_FRENCH; - System.out.println(canadaFrenchLocale); - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/Locale_Creation.pptx b/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/Locale_Creation.pptx deleted file mode 100644 index fdd959a7..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/Locale/9/Locale_Creation.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundle.pptx b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundle.pptx deleted file mode 100644 index 9bf1ceee..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundle.pptx and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties deleted file mode 100644 index 51b9052e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties +++ /dev/null @@ -1 +0,0 @@ -greeting=Halo, apa kabar? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/src/MessageBundle_fr_FR.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/src/MessageBundle_fr_FR.properties deleted file mode 100644 index 51b9052e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/1/ResourceBundleDemo/src/MessageBundle_fr_FR.properties +++ /dev/null @@ -1 +0,0 @@ -greeting=Halo, apa kabar? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/bin/MessageBundle.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/bin/MessageBundle.class deleted file mode 100644 index 17cedc43..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/bin/MessageBundle.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/bin/ResourceBundleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/bin/ResourceBundleDemo.class deleted file mode 100644 index aaa80290..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/bin/ResourceBundleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/src/MessageBundle.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/src/MessageBundle.java deleted file mode 100644 index 62316f2e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/src/MessageBundle.java +++ /dev/null @@ -1,43 +0,0 @@ -import java.util.Enumeration; -import java.util.ResourceBundle; -import java.util.StringTokenizer; - -public class MessageBundle extends ResourceBundle -{ - private String keys = "Hello Goodbye"; - - /* - * Gets an object for the given key from this resource bundle. - * Returns null if this resource bundle does not contain an object - * for the given key. - * - * Parameters: - * - * key - the key for the desired object - * - * Returns: the object for the given key, or null - * - */ - @Override - public Object handleGetObject(String key) - { - if (key.equals("Hello")) - { - return "Hello Peter"; - } - if (key.equals("Goodbye")) - { - return "Goodbye Steve"; - } - - return null; - } - - @Override - public Enumeration getKeys() - { - StringTokenizer keyTokenizer = new StringTokenizer(keys); - - return keyTokenizer; - } -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/src/ResourceBundleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/src/ResourceBundleDemo.java deleted file mode 100644 index b8e896e1..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/10/ResourceBundleDemo/src/ResourceBundleDemo.java +++ /dev/null @@ -1,29 +0,0 @@ -import java.util.Enumeration; -import java.util.ResourceBundle; - -public class ResourceBundleDemo -{ - - public static void main(String[] args) - { - - ResourceBundle rb = ResourceBundle.getBundle("MessageBundle"); - - System.out.println(rb.getString("Hello")); - System.out.println(rb.getString("Goodbye")); - - Enumeration enumeration = rb.getKeys(); - - /* - * Print all the keys and corresponding values - */ - while (enumeration.hasMoreElements()) - { - Object key = enumeration.nextElement(); - Object value = rb.getObject(key.toString()); - System.out.println(key+" = "+value); - } - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/MessageBundle_en_US.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/MessageBundle_en_US.class deleted file mode 100644 index 52a977d1..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/MessageBundle_en_US.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/MessageBundle_fr_FR.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/MessageBundle_fr_FR.class deleted file mode 100644 index bb781e63..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/MessageBundle_fr_FR.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/ResourceBundleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/ResourceBundleDemo.class deleted file mode 100644 index 3a05fd47..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/bin/ResourceBundleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/MessageBundle_en_US.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/MessageBundle_en_US.java deleted file mode 100644 index 7eb3bb96..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/MessageBundle_en_US.java +++ /dev/null @@ -1,43 +0,0 @@ -import java.util.Enumeration; -import java.util.ResourceBundle; -import java.util.StringTokenizer; - -public class MessageBundle_en_US extends ResourceBundle -{ - private String keys = "Hello Goodbye"; - - /* - * Gets an object for the given key from this resource bundle. - * Returns null if this resource bundle does not contain an object - * for the given key. - * - * Parameters: - * - * key - the key for the desired object - * - * Returns: the object for the given key, or null - * - */ - @Override - public Object handleGetObject(String key) - { - if (key.equals("Hello")) - { - return "Hello Peter"; - } - if (key.equals("Goodbye")) - { - return "Goodbye Steve"; - } - - return null; - } - - @Override - public Enumeration getKeys() - { - StringTokenizer keyTokenizer = new StringTokenizer(keys); - - return keyTokenizer; - } -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/MessageBundle_fr_FR.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/MessageBundle_fr_FR.java deleted file mode 100644 index fa2ea0af..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/MessageBundle_fr_FR.java +++ /dev/null @@ -1,43 +0,0 @@ -import java.util.Enumeration; -import java.util.ResourceBundle; -import java.util.StringTokenizer; - -public class MessageBundle_fr_FR extends ResourceBundle -{ - private String keys = "Hello Goodbye"; - - /* - * Gets an object for the given key from this resource bundle. - * Returns null if this resource bundle does not contain an object - * for the given key. - * - * Parameters: - * - * key - the key for the desired object - * - * Returns: the object for the given key, or null - * - */ - @Override - public Object handleGetObject(String key) - { - if (key.equals("Hello")) - { - return "Bonjour Peter"; - } - if (key.equals("Goodbye")) - { - return "Au revoir Steve"; - } - - return null; - } - - @Override - public Enumeration getKeys() - { - StringTokenizer keyTokenizer = new StringTokenizer(keys); - - return keyTokenizer; - } -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/ResourceBundleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/ResourceBundleDemo.java deleted file mode 100644 index a53b28a6..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/11/ResourceBundleDemo/src/ResourceBundleDemo.java +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.Locale; -import java.util.ResourceBundle; - -public class ResourceBundleDemo -{ - - public static void main(String[] args) - { - - Locale usLocale = new Locale("en", "US"); - ResourceBundle rb = ResourceBundle.getBundle("MessageBundle", usLocale); - - System.out.println(rb.getString("Hello")); - System.out.println(rb.getString("Goodbye")); - - Locale frenchLocale = new Locale("fr", "FR"); - rb = ResourceBundle.getBundle("MessageBundle", frenchLocale); - - System.out.println(); - - System.out.println(rb.getString("Hello")); - System.out.println(rb.getString("Goodbye")); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/MessageBundle_en_US.properties deleted file mode 100644 index f5504d58..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/MessageBundle_en_US.properties +++ /dev/null @@ -1 +0,0 @@ -greeting=Hello, how are you? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties deleted file mode 100644 index 51b9052e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties +++ /dev/null @@ -1 +0,0 @@ -greeting=Halo, apa kabar? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/MessageBundle_en_US.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/MessageBundle_en_US.properties deleted file mode 100644 index f5504d58..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/MessageBundle_en_US.properties +++ /dev/null @@ -1 +0,0 @@ -greeting=Hello, how are you? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/MessageBundle_fr_FR.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/MessageBundle_fr_FR.properties deleted file mode 100644 index 51b9052e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/2/ResourceBundleDemo/src/MessageBundle_fr_FR.properties +++ /dev/null @@ -1 +0,0 @@ -greeting=Halo, apa kabar? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/3/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/4/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.project deleted file mode 100644 index 1b5459b9..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - ResourceBundleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/5/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.project deleted file mode 100644 index 1b5459b9..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - ResourceBundleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/6/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.project deleted file mode 100644 index 1b5459b9..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - ResourceBundleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/bin/MessageBundle_en_US.properties deleted file mode 100644 index 3d808db8..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/bin/MessageBundle_en_US.properties +++ /dev/null @@ -1,3 +0,0 @@ -greeting=Hello, how are you? -welcome=Welcome to India -meeting=Meeting with Peter \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/bin/ResourceBundleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/bin/ResourceBundleDemo.class deleted file mode 100644 index 42f18fcc..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/bin/ResourceBundleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/src/MessageBundle_en_US.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/src/MessageBundle_en_US.properties deleted file mode 100644 index 3d808db8..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/src/MessageBundle_en_US.properties +++ /dev/null @@ -1,3 +0,0 @@ -greeting=Hello, how are you? -welcome=Welcome to India -meeting=Meeting with Peter \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/src/ResourceBundleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/src/ResourceBundleDemo.java deleted file mode 100644 index 6a08679e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/7/ResourceBundleDemo/src/ResourceBundleDemo.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.util.Locale; -import java.util.ResourceBundle; - -public class ResourceBundleDemo -{ - - public static void main(String[] args) - { - - ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle"); - - /* - * Returns the locale of this resource bundle. This method can - * be used after a call to getBundle() to determine whether - * the resource bundle returned really corresponds to the - * requested locale or is a fallback. - * - * Returns: - * - * the locale of this resource bundle - * - */ - Locale locale = bundle.getLocale(); - System.out.println(locale); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.project deleted file mode 100644 index 1b5459b9..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - ResourceBundleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/bin/MessageBundle_en_US.properties deleted file mode 100644 index 3d808db8..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/bin/MessageBundle_en_US.properties +++ /dev/null @@ -1,3 +0,0 @@ -greeting=Hello, how are you? -welcome=Welcome to India -meeting=Meeting with Peter \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/bin/ResourceBundleDemo.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/bin/ResourceBundleDemo.class deleted file mode 100644 index 1a224c94..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/bin/ResourceBundleDemo.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/src/MessageBundle_en_US.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/src/MessageBundle_en_US.properties deleted file mode 100644 index 3d808db8..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/src/MessageBundle_en_US.properties +++ /dev/null @@ -1,3 +0,0 @@ -greeting=Hello, how are you? -welcome=Welcome to India -meeting=Meeting with Peter \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/src/ResourceBundleDemo.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/src/ResourceBundleDemo.java deleted file mode 100644 index 78086b9e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/8/ResourceBundleDemo/src/ResourceBundleDemo.java +++ /dev/null @@ -1,21 +0,0 @@ -import java.util.Locale; -import java.util.ResourceBundle; - -public class ResourceBundleDemo -{ - - public static void main(String[] args) - { - - ClassLoader cl = ClassLoader.getSystemClassLoader(); - - ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle", - Locale.US, cl); - - String value = bundle.getString("greeting"); - - System.out.println("Message in " + Locale.getDefault() + " = " + value); - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.classpath b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.classpath deleted file mode 100644 index fceb4801..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.project b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.project deleted file mode 100644 index 1b5459b9..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - ResourceBundleDemo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 3a215370..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/MessageBundle_en_US.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/MessageBundle_en_US.properties deleted file mode 100644 index 3d808db8..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/MessageBundle_en_US.properties +++ /dev/null @@ -1,3 +0,0 @@ -greeting=Hello, how are you? -welcome=Welcome to India -meeting=Meeting with Peter \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties deleted file mode 100644 index 51b9052e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/MessageBundle_fr_FR.properties +++ /dev/null @@ -1 +0,0 @@ -greeting=Halo, apa kabar? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo1.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo1.class deleted file mode 100644 index 37470ba8..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo1.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo2.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo2.class deleted file mode 100644 index e2e1443f..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo2.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo3.class b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo3.class deleted file mode 100644 index e62b4d49..00000000 Binary files a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/bin/ResourceBundleDemo3.class and /dev/null differ diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/MessageBundle_en_US.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/MessageBundle_en_US.properties deleted file mode 100644 index 3d808db8..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/MessageBundle_en_US.properties +++ /dev/null @@ -1,3 +0,0 @@ -greeting=Hello, how are you? -welcome=Welcome to India -meeting=Meeting with Peter \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/MessageBundle_fr_FR.properties b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/MessageBundle_fr_FR.properties deleted file mode 100644 index 51b9052e..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/MessageBundle_fr_FR.properties +++ /dev/null @@ -1 +0,0 @@ -greeting=Halo, apa kabar? \ No newline at end of file diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo1.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo1.java deleted file mode 100644 index 98a4761b..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo1.java +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.Locale; -import java.util.ResourceBundle; -import java.util.ResourceBundle.Control; - -public class ResourceBundleDemo1 -{ - - public static void main(String[] args) - { - - /* - * create a new ResourceBundle.Control with default format - */ - ResourceBundle.Control rbc = ResourceBundle.Control - .getControl(Control.FORMAT_DEFAULT); - - /* - * Returns a resource bundle using the specified base name, - * the default locale and the specified control - */ - ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle", rbc); - - String value = bundle.getString("greeting"); - - System.out.println("Message in " + Locale.getDefault() + " = " + value); - - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo2.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo2.java deleted file mode 100644 index 70323881..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo2.java +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.Locale; -import java.util.ResourceBundle; -import java.util.ResourceBundle.Control; - -public class ResourceBundleDemo2 -{ - - public static void main(String[] args) - { - - /* - * create a new ResourceBundle.Control with default format - */ - ResourceBundle.Control rbc = ResourceBundle.Control - .getControl(Control.FORMAT_DEFAULT); - - /* - * Returns a resource bundle using the specified base name, - * the target locale and the specified control - */ - ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle",Locale.FRANCE, rbc); - - String value = bundle.getString("greeting"); - - System.out.println("Message in " + Locale.getDefault() + " = " + value); - - - } - -} diff --git a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo3.java b/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo3.java deleted file mode 100644 index 3c91c464..00000000 --- a/Later/Java_Later/Java_Util_package/Internationalization/ResourceBundle/9/ResourceBundleDemo/src/ResourceBundleDemo3.java +++ /dev/null @@ -1,32 +0,0 @@ -import java.util.Locale; -import java.util.ResourceBundle; -import java.util.ResourceBundle.Control; - -public class ResourceBundleDemo3 -{ - - public static void main(String[] args) - { - - /* - * create a new ResourceBundle.Control with default format - */ - ResourceBundle.Control rbc = ResourceBundle.Control - .getControl(Control.FORMAT_DEFAULT); - - ClassLoader cl = ClassLoader.getSystemClassLoader(); - - /* - * Returns a resource bundle using the specified base name, - * target locale, class loader and control - */ - ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle", - Locale.US, cl, rbc); - - String value = bundle.getString("greeting"); - - System.out.println("Message in " + Locale.getDefault() + " = " + value); - - } - -} diff --git a/Later/Java_Later/MongoDB/1/MongoDB_Intro.pptx b/Later/Java_Later/MongoDB/1/MongoDB_Intro.pptx deleted file mode 100644 index 7b341f72..00000000 Binary files a/Later/Java_Later/MongoDB/1/MongoDB_Intro.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/10/NoSQL.pptx b/Later/Java_Later/MongoDB/10/NoSQL.pptx deleted file mode 100644 index 5cb8a442..00000000 Binary files a/Later/Java_Later/MongoDB/10/NoSQL.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/11/Install MongoDB On Windows_zip.pptx b/Later/Java_Later/MongoDB/11/Install MongoDB On Windows_zip.pptx deleted file mode 100644 index f5b2d153..00000000 Binary files a/Later/Java_Later/MongoDB/11/Install MongoDB On Windows_zip.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/12/Install MongoDB On Windows_zip_dbpath_change.pptx b/Later/Java_Later/MongoDB/12/Install MongoDB On Windows_zip_dbpath_change.pptx deleted file mode 100644 index f5b2d153..00000000 Binary files a/Later/Java_Later/MongoDB/12/Install MongoDB On Windows_zip_dbpath_change.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/13/Install MongoDB On Windows_msi.pptx b/Later/Java_Later/MongoDB/13/Install MongoDB On Windows_msi.pptx deleted file mode 100644 index 6e676282..00000000 Binary files a/Later/Java_Later/MongoDB/13/Install MongoDB On Windows_msi.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/14/robomongo.pptx b/Later/Java_Later/MongoDB/14/robomongo.pptx deleted file mode 100644 index 5126791d..00000000 Binary files a/Later/Java_Later/MongoDB/14/robomongo.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/15/Mongo Management Studio.pptx b/Later/Java_Later/MongoDB/15/Mongo Management Studio.pptx deleted file mode 100644 index 5126791d..00000000 Binary files a/Later/Java_Later/MongoDB/15/Mongo Management Studio.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/16/MongoDB - Data Modelling.pptx b/Later/Java_Later/MongoDB/16/MongoDB - Data Modelling.pptx deleted file mode 100644 index 3836dd93..00000000 Binary files a/Later/Java_Later/MongoDB/16/MongoDB - Data Modelling.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/17/MongoDB - Create Database.pptx b/Later/Java_Later/MongoDB/17/MongoDB - Create Database.pptx deleted file mode 100644 index d839bb80..00000000 Binary files a/Later/Java_Later/MongoDB/17/MongoDB - Create Database.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/18/MongoDB - Drop Database.pptx b/Later/Java_Later/MongoDB/18/MongoDB - Drop Database.pptx deleted file mode 100644 index 4b44ab79..00000000 Binary files a/Later/Java_Later/MongoDB/18/MongoDB - Drop Database.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/19/MongoDB - Create Collection.pptx b/Later/Java_Later/MongoDB/19/MongoDB - Create Collection.pptx deleted file mode 100644 index a41a9d78..00000000 Binary files a/Later/Java_Later/MongoDB/19/MongoDB - Create Collection.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/2/MongoDB_Overview.pptx b/Later/Java_Later/MongoDB/2/MongoDB_Overview.pptx deleted file mode 100644 index a8aa761c..00000000 Binary files a/Later/Java_Later/MongoDB/2/MongoDB_Overview.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/20/MongoDB - Drop Collection.pptx b/Later/Java_Later/MongoDB/20/MongoDB - Drop Collection.pptx deleted file mode 100644 index 45840fbd..00000000 Binary files a/Later/Java_Later/MongoDB/20/MongoDB - Drop Collection.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/21/MongoDB - Insert Document.pptx b/Later/Java_Later/MongoDB/21/MongoDB - Insert Document.pptx deleted file mode 100644 index 50186e23..00000000 Binary files a/Later/Java_Later/MongoDB/21/MongoDB - Insert Document.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/22/MongoDB - Insert Document_save.pptx b/Later/Java_Later/MongoDB/22/MongoDB - Insert Document_save.pptx deleted file mode 100644 index 707de211..00000000 Binary files a/Later/Java_Later/MongoDB/22/MongoDB - Insert Document_save.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/23/MongoDB - Insert Document_update.pptx b/Later/Java_Later/MongoDB/23/MongoDB - Insert Document_update.pptx deleted file mode 100644 index 08e5ed2c..00000000 Binary files a/Later/Java_Later/MongoDB/23/MongoDB - Insert Document_update.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/24/MongoDB - Update Document.pptx b/Later/Java_Later/MongoDB/24/MongoDB - Update Document.pptx deleted file mode 100644 index 298746f8..00000000 Binary files a/Later/Java_Later/MongoDB/24/MongoDB - Update Document.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/25/MongoDB - Query Document_find.pptx b/Later/Java_Later/MongoDB/25/MongoDB - Query Document_find.pptx deleted file mode 100644 index a9c7f38a..00000000 Binary files a/Later/Java_Later/MongoDB/25/MongoDB - Query Document_find.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/26/MongoDB - Query Document_find_where.pptx b/Later/Java_Later/MongoDB/26/MongoDB - Query Document_find_where.pptx deleted file mode 100644 index a8dca2b8..00000000 Binary files a/Later/Java_Later/MongoDB/26/MongoDB - Query Document_find_where.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/27/MongoDB - Query Document_find_where.pptx b/Later/Java_Later/MongoDB/27/MongoDB - Query Document_find_where.pptx deleted file mode 100644 index 28bc3c8d..00000000 Binary files a/Later/Java_Later/MongoDB/27/MongoDB - Query Document_find_where.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/28/MongoDB - Query Document_find_where.pptx b/Later/Java_Later/MongoDB/28/MongoDB - Query Document_find_where.pptx deleted file mode 100644 index 798ca2a6..00000000 Binary files a/Later/Java_Later/MongoDB/28/MongoDB - Query Document_find_where.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/29/MongoDB - Query Document_find_where.pptx b/Later/Java_Later/MongoDB/29/MongoDB - Query Document_find_where.pptx deleted file mode 100644 index 133df614..00000000 Binary files a/Later/Java_Later/MongoDB/29/MongoDB - Query Document_find_where.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/3/MongoDB_id.pptx b/Later/Java_Later/MongoDB/3/MongoDB_id.pptx deleted file mode 100644 index d7ec5ab2..00000000 Binary files a/Later/Java_Later/MongoDB/3/MongoDB_id.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/30/MongoDB - Query Document_find_And.pptx b/Later/Java_Later/MongoDB/30/MongoDB - Query Document_find_And.pptx deleted file mode 100644 index b8ea26a8..00000000 Binary files a/Later/Java_Later/MongoDB/30/MongoDB - Query Document_find_And.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/31/MongoDB - Query Document_find_OR.pptx b/Later/Java_Later/MongoDB/31/MongoDB - Query Document_find_OR.pptx deleted file mode 100644 index ebe8619b..00000000 Binary files a/Later/Java_Later/MongoDB/31/MongoDB - Query Document_find_OR.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/32/MongoDB - Query Document_find_AND_OR.pptx b/Later/Java_Later/MongoDB/32/MongoDB - Query Document_find_AND_OR.pptx deleted file mode 100644 index 56b7de74..00000000 Binary files a/Later/Java_Later/MongoDB/32/MongoDB - Query Document_find_AND_OR.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/33/MongoDB - Delete Document.pptx b/Later/Java_Later/MongoDB/33/MongoDB - Delete Document.pptx deleted file mode 100644 index a5881f85..00000000 Binary files a/Later/Java_Later/MongoDB/33/MongoDB - Delete Document.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/34/MongoDB - Projection.pptx b/Later/Java_Later/MongoDB/34/MongoDB - Projection.pptx deleted file mode 100644 index 8b7a1485..00000000 Binary files a/Later/Java_Later/MongoDB/34/MongoDB - Projection.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/35/MongoDB - Limit Records.pptx b/Later/Java_Later/MongoDB/35/MongoDB - Limit Records.pptx deleted file mode 100644 index dc9bb97e..00000000 Binary files a/Later/Java_Later/MongoDB/35/MongoDB - Limit Records.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/36/MongoDB - Skip Records.pptx b/Later/Java_Later/MongoDB/36/MongoDB - Skip Records.pptx deleted file mode 100644 index 04401350..00000000 Binary files a/Later/Java_Later/MongoDB/36/MongoDB - Skip Records.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/37/MongoDB - Sort Records.pptx b/Later/Java_Later/MongoDB/37/MongoDB - Sort Records.pptx deleted file mode 100644 index 4f53c713..00000000 Binary files a/Later/Java_Later/MongoDB/37/MongoDB - Sort Records.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/38/MongoDB - Aggregation_sum.pptx b/Later/Java_Later/MongoDB/38/MongoDB - Aggregation_sum.pptx deleted file mode 100644 index bf3d3b63..00000000 Binary files a/Later/Java_Later/MongoDB/38/MongoDB - Aggregation_sum.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/39/MongoDB - Aggregation_avg.pptx b/Later/Java_Later/MongoDB/39/MongoDB - Aggregation_avg.pptx deleted file mode 100644 index 2afb9c1b..00000000 Binary files a/Later/Java_Later/MongoDB/39/MongoDB - Aggregation_avg.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/4/Mapping Relational Databases to MongoDB.pptx b/Later/Java_Later/MongoDB/4/Mapping Relational Databases to MongoDB.pptx deleted file mode 100644 index 572e2186..00000000 Binary files a/Later/Java_Later/MongoDB/4/Mapping Relational Databases to MongoDB.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/40/MongoDB - Aggregation_min.pptx b/Later/Java_Later/MongoDB/40/MongoDB - Aggregation_min.pptx deleted file mode 100644 index 746bce1b..00000000 Binary files a/Later/Java_Later/MongoDB/40/MongoDB - Aggregation_min.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/41/MongoDB - Aggregation_first.pptx b/Later/Java_Later/MongoDB/41/MongoDB - Aggregation_first.pptx deleted file mode 100644 index 5ecb8228..00000000 Binary files a/Later/Java_Later/MongoDB/41/MongoDB - Aggregation_first.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/42/Introduction to NoSQL Databases.pptx b/Later/Java_Later/MongoDB/42/Introduction to NoSQL Databases.pptx deleted file mode 100644 index 5a50c90e..00000000 Binary files a/Later/Java_Later/MongoDB/42/Introduction to NoSQL Databases.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/43/Introduction to MongoDB.pptx b/Later/Java_Later/MongoDB/43/Introduction to MongoDB.pptx deleted file mode 100644 index dbfae619..00000000 Binary files a/Later/Java_Later/MongoDB/43/Introduction to MongoDB.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/44/MongoDB Indexing.pptx b/Later/Java_Later/MongoDB/44/MongoDB Indexing.pptx deleted file mode 100644 index f5700eda..00000000 Binary files a/Later/Java_Later/MongoDB/44/MongoDB Indexing.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/45/What is NoSQL.pptx b/Later/Java_Later/MongoDB/45/What is NoSQL.pptx deleted file mode 100644 index be5d1dfc..00000000 Binary files a/Later/Java_Later/MongoDB/45/What is NoSQL.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/46/How to Create Database & Collection in MongoDB.pptx b/Later/Java_Later/MongoDB/46/How to Create Database & Collection in MongoDB.pptx deleted file mode 100644 index 6f35427e..00000000 Binary files a/Later/Java_Later/MongoDB/46/How to Create Database & Collection in MongoDB.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/47/Add MongoDB Array using insert() with Example.pptx b/Later/Java_Later/MongoDB/47/Add MongoDB Array using insert() with Example.pptx deleted file mode 100644 index 4288ba9d..00000000 Binary files a/Later/Java_Later/MongoDB/47/Add MongoDB Array using insert() with Example.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/47/MongoDB Commands.txt b/Later/Java_Later/MongoDB/47/MongoDB Commands.txt deleted file mode 100644 index 28b3996c..00000000 --- a/Later/Java_Later/MongoDB/47/MongoDB Commands.txt +++ /dev/null @@ -1,22 +0,0 @@ -var myEmployee= - [ - { - "Employeeid" : 1, - "EmployeeName" : "Smith" - }, - { - "Employeeid" : 2, - "EmployeeName" : "Mohan" - }, - { - "Employeeid" : 3, - "EmployeeName" : "Joe" - }, - ]; -db.employee.insert(myEmployee); - --------------------------------------- - -db.Employee.find().forEach(printjson) - -------------------------------------- \ No newline at end of file diff --git a/Later/Java_Later/MongoDB/48/MongoDB Commands.txt b/Later/Java_Later/MongoDB/48/MongoDB Commands.txt deleted file mode 100644 index 829b5f73..00000000 --- a/Later/Java_Later/MongoDB/48/MongoDB Commands.txt +++ /dev/null @@ -1,3 +0,0 @@ -db.Employee.insert({"EmployeeName" : "Smith","age":NumberInt(30)}) - -db.Employee.insert({_id:NumberInt(10), "EmployeeName" : "Smith","age":NumberInt(30)}) \ No newline at end of file diff --git a/Later/Java_Later/MongoDB/48/Mongodb Primary Key.pptx b/Later/Java_Later/MongoDB/48/Mongodb Primary Key.pptx deleted file mode 100644 index f5121658..00000000 Binary files a/Later/Java_Later/MongoDB/48/Mongodb Primary Key.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/49/Studio 3T.pptx b/Later/Java_Later/MongoDB/49/Studio 3T.pptx deleted file mode 100644 index f5121658..00000000 Binary files a/Later/Java_Later/MongoDB/49/Studio 3T.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/5/Mapping Relational Databases to MongoDB.pptx b/Later/Java_Later/MongoDB/5/Mapping Relational Databases to MongoDB.pptx deleted file mode 100644 index 799820b1..00000000 Binary files a/Later/Java_Later/MongoDB/5/Mapping Relational Databases to MongoDB.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/50/MongoDB Commands.txt b/Later/Java_Later/MongoDB/50/MongoDB Commands.txt deleted file mode 100644 index cacdd352..00000000 --- a/Later/Java_Later/MongoDB/50/MongoDB Commands.txt +++ /dev/null @@ -1,5 +0,0 @@ -var myEmployee = db.Employee.find({ }); -while(myEmployee.hasNext()) -{ - print(tojson(myEmployee.next())); -} \ No newline at end of file diff --git a/Later/Java_Later/MongoDB/50/What is Cursor in MongoDb.pptx b/Later/Java_Later/MongoDB/50/What is Cursor in MongoDb.pptx deleted file mode 100644 index e34c25b1..00000000 Binary files a/Later/Java_Later/MongoDB/50/What is Cursor in MongoDb.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/51/MongoDB Commands.txt b/Later/Java_Later/MongoDB/51/MongoDB Commands.txt deleted file mode 100644 index 53b79222..00000000 --- a/Later/Java_Later/MongoDB/51/MongoDB Commands.txt +++ /dev/null @@ -1,3 +0,0 @@ -db.Employee.find({EmployeeName : "Smith"}) - -db.Employee.find({Employeeid : {$gt:2}}).forEach(printjson); diff --git a/Later/Java_Later/MongoDB/51/MongoDB Query Document using find() with Example.pptx b/Later/Java_Later/MongoDB/51/MongoDB Query Document using find() with Example.pptx deleted file mode 100644 index e0ba4c01..00000000 Binary files a/Later/Java_Later/MongoDB/51/MongoDB Query Document using find() with Example.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/52/MongoDB order with Sort() & Limit() Query with Examples.pptx b/Later/Java_Later/MongoDB/52/MongoDB order with Sort() & Limit() Query with Examples.pptx deleted file mode 100644 index 79d84b42..00000000 Binary files a/Later/Java_Later/MongoDB/52/MongoDB order with Sort() & Limit() Query with Examples.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/53/MongoDB Count() Function with Examples.pptx b/Later/Java_Later/MongoDB/53/MongoDB Count() Function with Examples.pptx deleted file mode 100644 index 7609b6b9..00000000 Binary files a/Later/Java_Later/MongoDB/53/MongoDB Count() Function with Examples.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/54/MongoDB Remove() Function with Examples.pptx b/Later/Java_Later/MongoDB/54/MongoDB Remove() Function with Examples.pptx deleted file mode 100644 index 550d2d30..00000000 Binary files a/Later/Java_Later/MongoDB/54/MongoDB Remove() Function with Examples.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/55/MongoDB Update() Document with Example.pptx b/Later/Java_Later/MongoDB/55/MongoDB Update() Document with Example.pptx deleted file mode 100644 index 75b25de5..00000000 Binary files a/Later/Java_Later/MongoDB/55/MongoDB Update() Document with Example.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/56/MongoDB Indexing Tutorial - createIndex(), dropindex() Example.pptx b/Later/Java_Later/MongoDB/56/MongoDB Indexing Tutorial - createIndex(), dropindex() Example.pptx deleted file mode 100644 index c736701f..00000000 Binary files a/Later/Java_Later/MongoDB/56/MongoDB Indexing Tutorial - createIndex(), dropindex() Example.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/57/MongoDB - Indexing.pptx b/Later/Java_Later/MongoDB/57/MongoDB - Indexing.pptx deleted file mode 100644 index 13d45253..00000000 Binary files a/Later/Java_Later/MongoDB/57/MongoDB - Indexing.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/58/MongoDB Regular Expression (Regex) with Examples.pptx b/Later/Java_Later/MongoDB/58/MongoDB Regular Expression (Regex) with Examples.pptx deleted file mode 100644 index 13837adb..00000000 Binary files a/Later/Java_Later/MongoDB/58/MongoDB Regular Expression (Regex) with Examples.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/59/MongoDB Regular Expression (Regex) with Examples.pptx b/Later/Java_Later/MongoDB/59/MongoDB Regular Expression (Regex) with Examples.pptx deleted file mode 100644 index 81125d60..00000000 Binary files a/Later/Java_Later/MongoDB/59/MongoDB Regular Expression (Regex) with Examples.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/6/SQL vs NoSQL Database.pptx b/Later/Java_Later/MongoDB/6/SQL vs NoSQL Database.pptx deleted file mode 100644 index d4bb36f9..00000000 Binary files a/Later/Java_Later/MongoDB/6/SQL vs NoSQL Database.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/60/MongoDB Regular Expression (Regex) with Examples.pptx b/Later/Java_Later/MongoDB/60/MongoDB Regular Expression (Regex) with Examples.pptx deleted file mode 100644 index 60f9671d..00000000 Binary files a/Later/Java_Later/MongoDB/60/MongoDB Regular Expression (Regex) with Examples.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/61/Fetching last 'n' documents from a collection.pptx b/Later/Java_Later/MongoDB/61/Fetching last 'n' documents from a collection.pptx deleted file mode 100644 index 5036be00..00000000 Binary files a/Later/Java_Later/MongoDB/61/Fetching last 'n' documents from a collection.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/61/MongoDB Commands.txt b/Later/Java_Later/MongoDB/61/MongoDB Commands.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/Later/Java_Later/MongoDB/62/How to Create User & add Role in MongoDB.pptx b/Later/Java_Later/MongoDB/62/How to Create User & add Role in MongoDB.pptx deleted file mode 100644 index a73527d7..00000000 Binary files a/Later/Java_Later/MongoDB/62/How to Create User & add Role in MongoDB.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/62/MongoDB Commands.txt b/Later/Java_Later/MongoDB/62/MongoDB Commands.txt deleted file mode 100644 index 08d7ace5..00000000 --- a/Later/Java_Later/MongoDB/62/MongoDB Commands.txt +++ /dev/null @@ -1,10 +0,0 @@ -db.createUser -( - { - user: "Peter", - pwd: "password", - - roles:[{role: "userAdminAnyDatabase" , db:"admin"}] - - } -) \ No newline at end of file diff --git a/Later/Java_Later/MongoDB/63/NoSQL Database.pptx b/Later/Java_Later/MongoDB/63/NoSQL Database.pptx deleted file mode 100644 index a0b101d4..00000000 Binary files a/Later/Java_Later/MongoDB/63/NoSQL Database.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/64/Difference between MongoDB RDBMS.pptx b/Later/Java_Later/MongoDB/64/Difference between MongoDB RDBMS.pptx deleted file mode 100644 index e9b1de2e..00000000 Binary files a/Later/Java_Later/MongoDB/64/Difference between MongoDB RDBMS.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/65/Configuring MongoDB server with configuration file.pptx b/Later/Java_Later/MongoDB/65/Configuring MongoDB server with configuration file.pptx deleted file mode 100644 index 73344f55..00000000 Binary files a/Later/Java_Later/MongoDB/65/Configuring MongoDB server with configuration file.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/66/CreatingInserting a document in collection using javascript file.pptx b/Later/Java_Later/MongoDB/66/CreatingInserting a document in collection using javascript file.pptx deleted file mode 100644 index 8b878c07..00000000 Binary files a/Later/Java_Later/MongoDB/66/CreatingInserting a document in collection using javascript file.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/67/Inserting Array of Documents.pptx b/Later/Java_Later/MongoDB/67/Inserting Array of Documents.pptx deleted file mode 100644 index b7337514..00000000 Binary files a/Later/Java_Later/MongoDB/67/Inserting Array of Documents.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/68/Other Query Operators.pptx b/Later/Java_Later/MongoDB/68/Other Query Operators.pptx deleted file mode 100644 index 6932c0cf..00000000 Binary files a/Later/Java_Later/MongoDB/68/Other Query Operators.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/69/Updating Documents.pptx b/Later/Java_Later/MongoDB/69/Updating Documents.pptx deleted file mode 100644 index 22a93d10..00000000 Binary files a/Later/Java_Later/MongoDB/69/Updating Documents.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/7/SQL vs NoSQL Database.pptx b/Later/Java_Later/MongoDB/7/SQL vs NoSQL Database.pptx deleted file mode 100644 index 58ed922a..00000000 Binary files a/Later/Java_Later/MongoDB/7/SQL vs NoSQL Database.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/70/Deleting documents.pptx b/Later/Java_Later/MongoDB/70/Deleting documents.pptx deleted file mode 100644 index 1a17173b..00000000 Binary files a/Later/Java_Later/MongoDB/70/Deleting documents.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/8/Difference between MongoDB & RDBMS.pptx b/Later/Java_Later/MongoDB/8/Difference between MongoDB & RDBMS.pptx deleted file mode 100644 index 853bdb3d..00000000 Binary files a/Later/Java_Later/MongoDB/8/Difference between MongoDB & RDBMS.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB/9/MongoDB advantages over RDBMS.pptx b/Later/Java_Later/MongoDB/9/MongoDB advantages over RDBMS.pptx deleted file mode 100644 index efd5c502..00000000 Binary files a/Later/Java_Later/MongoDB/9/MongoDB advantages over RDBMS.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB_2/100/Election for Primary Replica Set Elections.pptx b/Later/Java_Later/MongoDB_2/100/Election for Primary Replica Set Elections.pptx new file mode 100644 index 00000000..ee8206be Binary files /dev/null and b/Later/Java_Later/MongoDB_2/100/Election for Primary Replica Set Elections.pptx differ diff --git a/Later/Java_Later/MongoDB_2/101/Voting And Non-voting Members.pptx b/Later/Java_Later/MongoDB_2/101/Voting And Non-voting Members.pptx new file mode 100644 index 00000000..abfbd6cb Binary files /dev/null and b/Later/Java_Later/MongoDB_2/101/Voting And Non-voting Members.pptx differ diff --git a/Later/Java_Later/MongoDB_2/102/Replica Set Setpup.pptx b/Later/Java_Later/MongoDB_2/102/Replica Set Setpup.pptx new file mode 100644 index 00000000..5416a09f Binary files /dev/null and b/Later/Java_Later/MongoDB_2/102/Replica Set Setpup.pptx differ diff --git a/Later/Java_Later/MongoDB_2/71/Understanding Impact of Indexes.pptx b/Later/Java_Later/MongoDB_2/71/Understanding Impact of Indexes.pptx deleted file mode 100644 index ec6ae5c1..00000000 Binary files a/Later/Java_Later/MongoDB_2/71/Understanding Impact of Indexes.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB_2/72/ObjectId getTimeStamp.pptx b/Later/Java_Later/MongoDB_2/72/ObjectId getTimeStamp.pptx deleted file mode 100644 index c28316cb..00000000 Binary files a/Later/Java_Later/MongoDB_2/72/ObjectId getTimeStamp.pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB_2/73/Using distinct() and count().pptx b/Later/Java_Later/MongoDB_2/73/Using distinct() and count().pptx deleted file mode 100644 index 71069511..00000000 Binary files a/Later/Java_Later/MongoDB_2/73/Using distinct() and count().pptx and /dev/null differ diff --git a/Later/Java_Later/MongoDB_2/80/Model Tree Structures with Parent References.pptx b/Later/Java_Later/MongoDB_2/80/Model Tree Structures with Parent References.pptx new file mode 100644 index 00000000..c81d5252 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/80/Model Tree Structures with Parent References.pptx differ diff --git a/Later/Java_Later/MongoDB_2/81/Model Tree Structures with Child References.pptx b/Later/Java_Later/MongoDB_2/81/Model Tree Structures with Child References.pptx new file mode 100644 index 00000000..d1e3da7f Binary files /dev/null and b/Later/Java_Later/MongoDB_2/81/Model Tree Structures with Child References.pptx differ diff --git a/Later/Java_Later/MongoDB_2/82/Model Tree Structures with an Array of Ancestors.pptx b/Later/Java_Later/MongoDB_2/82/Model Tree Structures with an Array of Ancestors.pptx new file mode 100644 index 00000000..37ae9583 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/82/Model Tree Structures with an Array of Ancestors.pptx differ diff --git a/Later/Java_Later/MongoDB_2/82/MongoDB Commands.txt b/Later/Java_Later/MongoDB_2/82/MongoDB Commands.txt new file mode 100644 index 00000000..2035346c --- /dev/null +++ b/Later/Java_Later/MongoDB_2/82/MongoDB Commands.txt @@ -0,0 +1,12 @@ +db.categories.insertMany( [ + { _id: "MongoDB", ancestors: [ "Books", "Programming", "Databases" ], parent: "Databases" }, + { _id: "dbm", ancestors: [ "Books", "Programming", "Databases" ], parent: "Databases" }, + { _id: "Databases", ancestors: [ "Books", "Programming" ], parent: "Programming" }, + { _id: "Languages", ancestors: [ "Books", "Programming" ], parent: "Programming" }, + { _id: "Programming", ancestors: [ "Books" ], parent: "Books" }, + { _id: "Books", ancestors: [ ], parent: null } +] ) + +db.categories.findOne( { _id: "MongoDB" } ).ancestors +db.categories.createIndex( { ancestors: 1 } ) +db.categories.find( { ancestors: "Programming" } ) \ No newline at end of file diff --git a/Later/Java_Later/MongoDB_2/83/One-To-One Relationship.pptx b/Later/Java_Later/MongoDB_2/83/One-To-One Relationship.pptx new file mode 100644 index 00000000..15302915 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/83/One-To-One Relationship.pptx differ diff --git a/Later/Java_Later/MongoDB_2/84/One-To-many Relationship.pptx b/Later/Java_Later/MongoDB_2/84/One-To-many Relationship.pptx new file mode 100644 index 00000000..9f334304 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/84/One-To-many Relationship.pptx differ diff --git a/Later/Java_Later/MongoDB_2/85/many-To-many Relationship.pptx b/Later/Java_Later/MongoDB_2/85/many-To-many Relationship.pptx new file mode 100644 index 00000000..e7b34ff8 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/85/many-To-many Relationship.pptx differ diff --git a/Later/Java_Later/MongoDB_2/86/How to Create User & add Role root in MongoDB.pptx b/Later/Java_Later/MongoDB_2/86/How to Create User & add Role root in MongoDB.pptx new file mode 100644 index 00000000..57e46848 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/86/How to Create User & add Role root in MongoDB.pptx differ diff --git a/Later/Java_Later/MongoDB_2/86/MongoDB Commands.txt b/Later/Java_Later/MongoDB_2/86/MongoDB Commands.txt new file mode 100644 index 00000000..f561c53a --- /dev/null +++ b/Later/Java_Later/MongoDB_2/86/MongoDB Commands.txt @@ -0,0 +1,2 @@ +db.getUsers() +db.createUser({ user: "peter", pwd: "password", roles:[{role: "root" , db:"admin"}]}) \ No newline at end of file diff --git a/Later/Java_Later/MongoDB_2/87/How to Create User & add Role in MongoDB.pptx b/Later/Java_Later/MongoDB_2/87/How to Create User & add Role in MongoDB.pptx new file mode 100644 index 00000000..8d2a6af9 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/87/How to Create User & add Role in MongoDB.pptx differ diff --git a/Later/Java_Later/MongoDB_2/87/MongoDB Commands.txt b/Later/Java_Later/MongoDB_2/87/MongoDB Commands.txt new file mode 100644 index 00000000..f4cd9f6b --- /dev/null +++ b/Later/Java_Later/MongoDB_2/87/MongoDB Commands.txt @@ -0,0 +1,5 @@ +db.getUsers() +db.createUser({ user: "peter", pwd: "password", roles:[{role: "userAdminAnyDatabase" , db:"admin"}]}) +db.grantRolesToUser("peter", [ { role: "readWriteAnyDatabase", db: "admin" } ]) +db.auth("peter","password") +db.dropAllUsers() diff --git a/Later/Java_Later/MongoDB_2/88/MongoDB Commands.txt b/Later/Java_Later/MongoDB_2/88/MongoDB Commands.txt new file mode 100644 index 00000000..49535791 --- /dev/null +++ b/Later/Java_Later/MongoDB_2/88/MongoDB Commands.txt @@ -0,0 +1,5 @@ +db.getUsers() +db.createUser({ user: "peter", pwd: "password", roles:[{role: "userAdmin" , db:"bookdb"}]}) +db.grantRolesToUser("peter", [ { role: "readWrite", db: "bookdb" } ]) +db.auth("peter","password") +db.dropAllUsers() diff --git a/Later/Java_Later/MongoDB_2/88/MongoDB Create User for Single Database.pptx b/Later/Java_Later/MongoDB_2/88/MongoDB Create User for Single Database.pptx new file mode 100644 index 00000000..1389dcb5 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/88/MongoDB Create User for Single Database.pptx differ diff --git a/Later/Java_Later/MongoDB_2/89/MongoDB Commands.txt b/Later/Java_Later/MongoDB_2/89/MongoDB Commands.txt new file mode 100644 index 00000000..498be117 --- /dev/null +++ b/Later/Java_Later/MongoDB_2/89/MongoDB Commands.txt @@ -0,0 +1,4 @@ +db.getUsers() +db.createUser({ user: "peter", pwd: "password", roles:[{role: "userAdmin" , db:"bookdb"},{ role: "readWrite", db: "bookdb" }]}) +db.auth("peter","password") +db.dropAllUsers() diff --git a/Later/Java_Later/MongoDB_2/89/MongoDB Create User and multiple roles for Single Database.pptx b/Later/Java_Later/MongoDB_2/89/MongoDB Create User and multiple roles for Single Database.pptx new file mode 100644 index 00000000..65b1f6d5 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/89/MongoDB Create User and multiple roles for Single Database.pptx differ diff --git a/Later/Java_Later/MongoDB_2/90/MongoDB Commands.txt b/Later/Java_Later/MongoDB_2/90/MongoDB Commands.txt new file mode 100644 index 00000000..b2380081 --- /dev/null +++ b/Later/Java_Later/MongoDB_2/90/MongoDB Commands.txt @@ -0,0 +1,7 @@ +db.getUsers() +db.createUser({ user: "peter", pwd: "password", roles:[{role: "userAdmin" , db:"bookdb"}]}) +db.createUser({ user: "ram", pwd: "welcome", roles:[{role: "userAdmin" , db:"bookdb"}]}) +db.createUser({ user: "dave", pwd: "pass", roles:[{role: "userAdmin" , db:"bookdb"}]}) +db.dropUser("peter") +db.dropAllUsers() +db.auth("peter","password") diff --git a/Later/Java_Later/MongoDB_2/90/MongoDB Drop User.pptx b/Later/Java_Later/MongoDB_2/90/MongoDB Drop User.pptx new file mode 100644 index 00000000..f7d02ee2 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/90/MongoDB Drop User.pptx differ diff --git a/Later/Java_Later/MongoDB_2/90/~$MongoDB Create User and multiple roles for Single Database.pptx b/Later/Java_Later/MongoDB_2/90/~$MongoDB Create User and multiple roles for Single Database.pptx new file mode 100644 index 00000000..0bdfebaf Binary files /dev/null and b/Later/Java_Later/MongoDB_2/90/~$MongoDB Create User and multiple roles for Single Database.pptx differ diff --git a/Later/Java_Later/MongoDB_2/91/MongoDB built-in-roles.pptx b/Later/Java_Later/MongoDB_2/91/MongoDB built-in-roles.pptx new file mode 100644 index 00000000..1b1301f6 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/91/MongoDB built-in-roles.pptx differ diff --git a/Later/Java_Later/MongoDB_2/91/~$MongoDB Create User and multiple roles for Single Database.pptx b/Later/Java_Later/MongoDB_2/91/~$MongoDB Create User and multiple roles for Single Database.pptx new file mode 100644 index 00000000..0bdfebaf Binary files /dev/null and b/Later/Java_Later/MongoDB_2/91/~$MongoDB Create User and multiple roles for Single Database.pptx differ diff --git a/Later/Java_Later/MongoDB_2/92/MongoDB natural Operator.pptx b/Later/Java_Later/MongoDB_2/92/MongoDB natural Operator.pptx new file mode 100644 index 00000000..7f5ced2e Binary files /dev/null and b/Later/Java_Later/MongoDB_2/92/MongoDB natural Operator.pptx differ diff --git a/Later/Java_Later/MongoDB_2/92/~$MongoDB Create User and multiple roles for Single Database.pptx b/Later/Java_Later/MongoDB_2/92/~$MongoDB Create User and multiple roles for Single Database.pptx new file mode 100644 index 00000000..0bdfebaf Binary files /dev/null and b/Later/Java_Later/MongoDB_2/92/~$MongoDB Create User and multiple roles for Single Database.pptx differ diff --git a/Later/Java_Later/MongoDB_2/93/MongoDB explain() method parameter options.pptx b/Later/Java_Later/MongoDB_2/93/MongoDB explain() method parameter options.pptx new file mode 100644 index 00000000..c3db3d1f Binary files /dev/null and b/Later/Java_Later/MongoDB_2/93/MongoDB explain() method parameter options.pptx differ diff --git a/Later/Java_Later/MongoDB_2/93/~$MongoDB Create User and multiple roles for Single Database.pptx b/Later/Java_Later/MongoDB_2/93/~$MongoDB Create User and multiple roles for Single Database.pptx new file mode 100644 index 00000000..0bdfebaf Binary files /dev/null and b/Later/Java_Later/MongoDB_2/93/~$MongoDB Create User and multiple roles for Single Database.pptx differ diff --git a/Later/Java_Later/MongoDB_2/94/MongoDB Group by using Reduce Function.pptx b/Later/Java_Later/MongoDB_2/94/MongoDB Group by using Reduce Function.pptx new file mode 100644 index 00000000..a53dcbfd Binary files /dev/null and b/Later/Java_Later/MongoDB_2/94/MongoDB Group by using Reduce Function.pptx differ diff --git a/Later/Java_Later/MongoDB_2/95/MongoDB Map-Reduce.pptx b/Later/Java_Later/MongoDB_2/95/MongoDB Map-Reduce.pptx new file mode 100644 index 00000000..5dbf3687 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/95/MongoDB Map-Reduce.pptx differ diff --git a/Later/Java_Later/MongoDB_2/96/MongoDB Namespace.pptx b/Later/Java_Later/MongoDB_2/96/MongoDB Namespace.pptx new file mode 100644 index 00000000..cbb73961 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/96/MongoDB Namespace.pptx differ diff --git a/Later/Java_Later/MongoDB_2/97/What is Replication.pptx b/Later/Java_Later/MongoDB_2/97/What is Replication.pptx new file mode 100644 index 00000000..95b8962b Binary files /dev/null and b/Later/Java_Later/MongoDB_2/97/What is Replication.pptx differ diff --git a/Later/Java_Later/MongoDB_2/98/Understanding Replication Architecture.pptx b/Later/Java_Later/MongoDB_2/98/Understanding Replication Architecture.pptx new file mode 100644 index 00000000..433f2e6f Binary files /dev/null and b/Later/Java_Later/MongoDB_2/98/Understanding Replication Architecture.pptx differ diff --git a/Later/Java_Later/MongoDB_2/99/Understanding Arbiter and Heartbeat.pptx b/Later/Java_Later/MongoDB_2/99/Understanding Arbiter and Heartbeat.pptx new file mode 100644 index 00000000..3b841d97 Binary files /dev/null and b/Later/Java_Later/MongoDB_2/99/Understanding Arbiter and Heartbeat.pptx differ diff --git a/Later/Java_Later/MongoDB/Pending.txt b/Later/Java_Later/MongoDB_2/Pending.txt similarity index 100% rename from Later/Java_Later/MongoDB/Pending.txt rename to Later/Java_Later/MongoDB_2/Pending.txt diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..6225485f --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,23 @@ +package com.ram.controller; + +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import com.ram.model.Employee; + +@RestController +public class EmployeeController +{ + @RequestMapping(value = "/employee/{employeeId}", method = RequestMethod.GET) + public Employee getEmployee(@PathVariable int employeeId) + { + Employee employee = new Employee(); + employee.setId(employeeId); + employee.setName("Peter"); + employee.setAge(34); + employee.setSalary(30000); + return employee; + } +} diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/model/Employee.java b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/model/Employee.java new file mode 100644 index 00000000..dcff9632 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/java/com/ram/model/Employee.java @@ -0,0 +1,57 @@ +package com.ram.model; + +public class Employee +{ + private int id; + private String name; + private int age; + private int salary; + + public int getId() + { + return id; + } + + public void setId(int id) + { + this.id = id; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public int getAge() + { + return age; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getSalary() + { + return salary; + } + + public void setSalary(int salary) + { + this.salary = salary; + } + + @Override + public String toString() + { + return "Employee [id=" + id + ", name=" + name + ", age=" + age + ", salary=" + salary + + "]"; + } + +} diff --git a/Later/Java_Later/MongoDB/52/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/52/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.1/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.1/SpringBoot_Returning Java Object as Return.pptx b/Later/Java_Later/RESTFul_Spring/4.1/SpringBoot_Returning Java Object as Return.pptx new file mode 100644 index 00000000..8ef90619 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.1/SpringBoot_Returning Java Object as Return.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..c360f6aa --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,17 @@ +package com.ram.controller; + +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class EmployeeController +{ + @RequestMapping(value = "/employee/{employeeId}", method = RequestMethod.GET) + public String getEmployee(@PathVariable int employeeId) + { + + return "getEmployee method called with employeeId=" + employeeId; + } +} diff --git a/Later/Java_Later/MongoDB/53/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/53/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.2/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.2/SpringBoot_Reading Path Variables with.pptx b/Later/Java_Later/RESTFul_Spring/4.2/SpringBoot_Reading Path Variables with.pptx new file mode 100644 index 00000000..34545283 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.2/SpringBoot_Reading Path Variables with.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..6c1ca31b --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,27 @@ +package com.ram.controller; + +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class EmployeeController +{ + + @RequestMapping(value = "/employee", method = RequestMethod.GET) + public String getEmployees(@RequestParam(value = "page") int pageValue, + @RequestParam(value = "limit") int limitValue) + { + + return "getEmployees method was called with page=" + pageValue + " ,and limit=" + limitValue; + } + + @RequestMapping(value = "/employee/{employeeId}", method = RequestMethod.GET) + public String getEmployee(@PathVariable int employeeId) + { + + return "getEmployee method called with employeeId=" + employeeId; + } +} diff --git a/Later/Java_Later/MongoDB/54/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/54/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.3/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.3/SpringBoot_Reading Query String Request Parameters.pptx b/Later/Java_Later/RESTFul_Spring/4.3/SpringBoot_Reading Query String Request Parameters.pptx new file mode 100644 index 00000000..31648b8b Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.3/SpringBoot_Reading Query String Request Parameters.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..a84c2b25 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,29 @@ +package com.ram.controller; + +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class EmployeeController +{ + + @RequestMapping(value = "/employee", method = RequestMethod.GET) + public String getEmployees(@RequestParam(value = "page", defaultValue = "1") int pageValue, + @RequestParam(value = "limit", defaultValue = "20") int limitValue, + @RequestParam(value = "sort", required = true) String sortValue) + { + + return "getEmployees method was called with page=" + pageValue + " ,limit=" + limitValue + + " ,sort=" + sortValue; + } + + @RequestMapping(value = "/employee/{employeeId}", method = RequestMethod.GET) + public String getEmployee(@PathVariable int employeeId) + { + + return "getEmployee method called with employeeId=" + employeeId; + } +} diff --git a/Later/Java_Later/MongoDB/55/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/55/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.4/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.4/SpringBoot_Making Parameters Optional or Required.pptx b/Later/Java_Later/RESTFul_Spring/4.4/SpringBoot_Making Parameters Optional or Required.pptx new file mode 100644 index 00000000..e196716c Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.4/SpringBoot_Making Parameters Optional or Required.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..357c0c9c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,42 @@ +package com.ram.controller; + +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/employee") +public class EmployeeController +{ + + @GetMapping + public String getEmployee() + { + + return "Get Employee was called."; + } + + @PostMapping + public String createEmployee() + { + + return "Create Employee was called."; + } + + @PutMapping + public String updateEmployee() + { + + return "Update Employee was called."; + } + + @DeleteMapping + public String deleteEmployee() + { + + return "Delete Employee was called."; + } +} diff --git a/Later/Java_Later/MongoDB/56/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/56/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/4.5/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/4.5/SpringBoot_Adding Methods to Handle POST.pptx b/Later/Java_Later/RESTFul_Spring/4.5/SpringBoot_Adding Methods to Handle POST.pptx new file mode 100644 index 00000000..89af9aaf Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/4.5/SpringBoot_Adding Methods to Handle POST.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..2a78543d --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,26 @@ +package com.ram.controller; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import com.ram.model.Employee; + +@RestController +public class EmployeeController +{ + @RequestMapping(value = "/employee/{employeeId}", + method = RequestMethod.GET, + produces = { MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE }) + public Employee getEmployee(@PathVariable int employeeId) + { + Employee employee = new Employee(); + employee.setId(employeeId); + employee.setName("Peter"); + employee.setAge(34); + employee.setSalary(30000); + return employee; + } +} diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/model/Employee.java b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/model/Employee.java new file mode 100644 index 00000000..dcff9632 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/java/com/ram/model/Employee.java @@ -0,0 +1,57 @@ +package com.ram.model; + +public class Employee +{ + private int id; + private String name; + private int age; + private int salary; + + public int getId() + { + return id; + } + + public void setId(int id) + { + this.id = id; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public int getAge() + { + return age; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getSalary() + { + return salary; + } + + public void setSalary(int salary) + { + this.salary = salary; + } + + @Override + public String toString() + { + return "Employee [id=" + id + ", name=" + name + ", age=" + age + ", salary=" + salary + + "]"; + } + +} diff --git a/Later/Java_Later/MongoDB/57/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/57/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/5/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/5/SpringBoot_WebService_XML_JSON.pptx b/Later/Java_Later/RESTFul_Spring/5/SpringBoot_WebService_XML_JSON.pptx new file mode 100644 index 00000000..6923a7c5 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/5/SpringBoot_WebService_XML_JSON.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..1c8941bc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,35 @@ +package com.ram.controller; + +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import com.ram.model.Employee; + +@RestController +public class EmployeeController +{ + @RequestMapping(value = "/employee/{employeeId}", + method = RequestMethod.GET, + produces = { MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE }) + public ResponseEntity getEmployee(@PathVariable int employeeId) + { + if (employeeId < 10) + { + Employee employee = new Employee(); + employee.setId(employeeId); + employee.setName("Peter"); + employee.setAge(34); + employee.setSalary(30000); + return new ResponseEntity(employee, HttpStatus.OK); + } + else + { + return new ResponseEntity(HttpStatus.BAD_REQUEST); + } + } +} diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/model/Employee.java b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/model/Employee.java new file mode 100644 index 00000000..dcff9632 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/java/com/ram/model/Employee.java @@ -0,0 +1,57 @@ +package com.ram.model; + +public class Employee +{ + private int id; + private String name; + private int age; + private int salary; + + public int getId() + { + return id; + } + + public void setId(int id) + { + this.id = id; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public int getAge() + { + return age; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getSalary() + { + return salary; + } + + public void setSalary(int salary) + { + this.salary = salary; + } + + @Override + public String toString() + { + return "Employee [id=" + id + ", name=" + name + ", age=" + age + ", salary=" + salary + + "]"; + } + +} diff --git a/Later/Java_Later/MongoDB/58/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/58/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/6/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/6/SpringBoot_SetResponse_StatusCode.pptx b/Later/Java_Later/RESTFul_Spring/6/SpringBoot_SetResponse_StatusCode.pptx new file mode 100644 index 00000000..b332e322 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/6/SpringBoot_SetResponse_StatusCode.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/7/Reading HTTP POST Request Body.pptx b/Later/Java_Later/RESTFul_Spring/7/Reading HTTP POST Request Body.pptx new file mode 100644 index 00000000..a704ef92 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/7/Reading HTTP POST Request Body.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..812892a3 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,28 @@ +package com.ram.controller; + +import java.util.Random; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import com.ram.model.Employee; + +@RestController +public class EmployeeController +{ + + @RequestMapping(value = "/employee", + method = RequestMethod.POST, + produces = { MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE }, + consumes = { MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE }) + public Employee createEmployee(@RequestBody Employee employee) + { + System.out.println("employee = "+employee); + employee.setId(new Random().nextInt()); + return employee; + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/model/Employee.java b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/model/Employee.java new file mode 100644 index 00000000..dcff9632 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/java/com/ram/model/Employee.java @@ -0,0 +1,57 @@ +package com.ram.model; + +public class Employee +{ + private int id; + private String name; + private int age; + private int salary; + + public int getId() + { + return id; + } + + public void setId(int id) + { + this.id = id; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public int getAge() + { + return age; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getSalary() + { + return salary; + } + + public void setSalary(int salary) + { + this.salary = salary; + } + + @Override + public String toString() + { + return "Employee [id=" + id + ", name=" + name + ", age=" + age + ", salary=" + salary + + "]"; + } + +} diff --git a/Later/Java_Later/MongoDB/59/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/59/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/7/json.txt b/Later/Java_Later/RESTFul_Spring/7/json.txt new file mode 100644 index 00000000..c957bfe1 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/7/json.txt @@ -0,0 +1,5 @@ +{ + "name":"Peter", + "age":25, + "salary":30000 +} \ No newline at end of file diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.gitignore b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.gitignore new file mode 100644 index 00000000..153c9335 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.gitignore @@ -0,0 +1,29 @@ +HELP.md +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ + +### VS Code ### +.vscode/ diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..72308aa4 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,114 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.util.Properties; + +public class MavenWrapperDownloader { + + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if(mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if(mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: : " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if(!outputFile.getParentFile().exists()) { + if(!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..01e67997 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..cd0d451c --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/mvnw b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/mvnw new file mode 100644 index 00000000..8b9da3b8 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/mvnw.cmd b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/mvnw.cmd new file mode 100644 index 00000000..fef5a8f7 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/pom.xml b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/pom.xml new file mode 100644 index 00000000..16c6fb18 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.1.4.RELEASE + + + com.ram + SpringBootDemo + 0.0.1-SNAPSHOT + SpringBootDemo + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-web + + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/Application.java b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/Application.java new file mode 100644 index 00000000..ab2c8102 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/Application.java @@ -0,0 +1,15 @@ +package com.ram; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application +{ + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java new file mode 100644 index 00000000..5f1b3baa --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/controller/EmployeeController.java @@ -0,0 +1,30 @@ +package com.ram.controller; + +import java.util.Random; + +import javax.validation.Valid; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import com.ram.model.Employee; + +@RestController +public class EmployeeController +{ + + @RequestMapping(value = "/employee", + method = RequestMethod.POST, + produces = { MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE }, + consumes = { MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE }) + public Employee createEmployee(@Valid @RequestBody Employee employee) + { + System.out.println("employee = "+employee); + employee.setId(new Random().nextInt()); + return employee; + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/model/Employee.java b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/model/Employee.java new file mode 100644 index 00000000..9ea309db --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/java/com/ram/model/Employee.java @@ -0,0 +1,82 @@ +package com.ram.model; + +import javax.validation.constraints.Email; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +public class Employee +{ + private int id; + + @NotNull(message = "name cannot be null") + @Size(min = 4, max = 8, message = "name must be minimum 4 characters and maximum 8 characters") + private String name; + + @NotNull(message = "email cannot be null") + @Email + private String email; + + @NotNull(message = "age cannot be null") + private int age; + + @NotNull(message = "salary cannot be null") + private int salary; + + public int getId() + { + return id; + } + + public void setId(int id) + { + this.id = id; + } + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public String getEmail() + { + return email; + } + + public void setEmail(String email) + { + this.email = email; + } + + public int getAge() + { + return age; + } + + public void setAge(int age) + { + this.age = age; + } + + public int getSalary() + { + return salary; + } + + public void setSalary(int salary) + { + this.salary = salary; + } + + @Override + public String toString() + { + return "Employee [id=" + id + ", name=" + name + ", email=" + email + ", age=" + age + + ", salary=" + salary + "]"; + } + +} diff --git a/Later/Java_Later/MongoDB/60/MongoDB Commands.txt b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/resources/application.properties similarity index 100% rename from Later/Java_Later/MongoDB/60/MongoDB Commands.txt rename to Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/main/resources/application.properties diff --git a/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java new file mode 100644 index 00000000..f0cc4dfc --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/SpringBootDemo/src/test/java/com/example/Helloworld/HelloworldApplicationTests.java @@ -0,0 +1,16 @@ +package com.example.Helloworld; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class HelloworldApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/Later/Java_Later/RESTFul_Spring/8/Validating HTTP POST Request Body.pptx b/Later/Java_Later/RESTFul_Spring/8/Validating HTTP POST Request Body.pptx new file mode 100644 index 00000000..eaba82a3 Binary files /dev/null and b/Later/Java_Later/RESTFul_Spring/8/Validating HTTP POST Request Body.pptx differ diff --git a/Later/Java_Later/RESTFul_Spring/8/json.txt b/Later/Java_Later/RESTFul_Spring/8/json.txt new file mode 100644 index 00000000..a206cb12 --- /dev/null +++ b/Later/Java_Later/RESTFul_Spring/8/json.txt @@ -0,0 +1,6 @@ +{ + "name":"Peter", + "email":"Peter@yahoo.com", + "age":25, + "salary":30000 +} \ No newline at end of file diff --git a/Later/Java_Later/SQL/1/SQL_Intro.pptx b/Later/Java_Later/SQL/1/SQL_Intro.pptx deleted file mode 100644 index 5f21ccd9..00000000 Binary files a/Later/Java_Later/SQL/1/SQL_Intro.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/1/employee.sql b/Later/Java_Later/SQL/1/employee.sql deleted file mode 100644 index 97a96664..00000000 --- a/Later/Java_Later/SQL/1/employee.sql +++ /dev/null @@ -1,44 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `city` varchar(100) DEFAULT NULL, - `country` varchar(100) DEFAULT NULL, - PRIMARY KEY (`ID`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`ID`,`NAME`,`AGE`,`SALARY`,`city`,`country`) values (1,'Peter',32,20000,'Bangalore','India'),(2,'John',39,30000,'Chennai','India'),(3,'Dave',40,50000,'Austin','USA'),(4,'Arun',56,30000,'Chicago','USA'),(5,'Raj',45,1000,'Las Vegas','USA'),(6,'Julia',46,80000,'Atlanta','USA'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/10/SQL Combining AND, OR and NOT.pptx b/Later/Java_Later/SQL/10/SQL Combining AND, OR and NOT.pptx deleted file mode 100644 index 5e5720c8..00000000 Binary files a/Later/Java_Later/SQL/10/SQL Combining AND, OR and NOT.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/11/SQL ORDER BY Keyword.pptx b/Later/Java_Later/SQL/11/SQL ORDER BY Keyword.pptx deleted file mode 100644 index 2327cb5d..00000000 Binary files a/Later/Java_Later/SQL/11/SQL ORDER BY Keyword.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/12/SQL INSERT INTO Statement.pptx b/Later/Java_Later/SQL/12/SQL INSERT INTO Statement.pptx deleted file mode 100644 index 1d8d14db..00000000 Binary files a/Later/Java_Later/SQL/12/SQL INSERT INTO Statement.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/13/SQL NULL Values.pptx b/Later/Java_Later/SQL/13/SQL NULL Values.pptx deleted file mode 100644 index 5eab6a97..00000000 Binary files a/Later/Java_Later/SQL/13/SQL NULL Values.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/14/The SQL UPDATE Statement.pptx b/Later/Java_Later/SQL/14/The SQL UPDATE Statement.pptx deleted file mode 100644 index 1f78de43..00000000 Binary files a/Later/Java_Later/SQL/14/The SQL UPDATE Statement.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/15/SQL DELETE Statement.pptx b/Later/Java_Later/SQL/15/SQL DELETE Statement.pptx deleted file mode 100644 index 62740d5e..00000000 Binary files a/Later/Java_Later/SQL/15/SQL DELETE Statement.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/16/The SQL SELECT TOP Clause.pptx b/Later/Java_Later/SQL/16/The SQL SELECT TOP Clause.pptx deleted file mode 100644 index 00bac7df..00000000 Binary files a/Later/Java_Later/SQL/16/The SQL SELECT TOP Clause.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/17/SQL MIN() and MAX() Functions.pptx b/Later/Java_Later/SQL/17/SQL MIN() and MAX() Functions.pptx deleted file mode 100644 index bd50f18d..00000000 Binary files a/Later/Java_Later/SQL/17/SQL MIN() and MAX() Functions.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/18/SQL COUNT(), AVG() and SUM() Functions.pptx b/Later/Java_Later/SQL/18/SQL COUNT(), AVG() and SUM() Functions.pptx deleted file mode 100644 index 366e7356..00000000 Binary files a/Later/Java_Later/SQL/18/SQL COUNT(), AVG() and SUM() Functions.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/19/SQL LIKE Operator.pptx b/Later/Java_Later/SQL/19/SQL LIKE Operator.pptx deleted file mode 100644 index 63f59d65..00000000 Binary files a/Later/Java_Later/SQL/19/SQL LIKE Operator.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/19/employee.sql b/Later/Java_Later/SQL/19/employee.sql deleted file mode 100644 index 273875f8..00000000 --- a/Later/Java_Later/SQL/19/employee.sql +++ /dev/null @@ -1,44 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `city` varchar(100) DEFAULT NULL, - `country` varchar(100) DEFAULT NULL, - PRIMARY KEY (`ID`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`ID`,`NAME`,`AGE`,`SALARY`,`city`,`country`) values (1,'Peter',32,20000,'Tokyo','Japan'),(2,'John',39,30000,'Chennai','India'),(3,'Dave',40,6000,'Austin','USA'),(4,'Arun',56,6000,'Chicago','USA'),(5,'Raj',45,6000,'Las Vegas','USA'),(6,'Julia',46,6000,'Atlanta','USA'),(7,'Jack',65,70000,'Bangalore','India'),(8,'Rocky',55,80000,'Bangalore','India'),(9,'Raj',67,NULL,NULL,'India'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/2/RDBMS.pptx b/Later/Java_Later/SQL/2/RDBMS.pptx deleted file mode 100644 index 4d96ad95..00000000 Binary files a/Later/Java_Later/SQL/2/RDBMS.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/20/The SQL IN Operator.pptx b/Later/Java_Later/SQL/20/The SQL IN Operator.pptx deleted file mode 100644 index b4d88ada..00000000 Binary files a/Later/Java_Later/SQL/20/The SQL IN Operator.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/21/The SQL BETWEEN Operator.pptx b/Later/Java_Later/SQL/21/The SQL BETWEEN Operator.pptx deleted file mode 100644 index b7d9dcf2..00000000 Binary files a/Later/Java_Later/SQL/21/The SQL BETWEEN Operator.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/21/employee.sql b/Later/Java_Later/SQL/21/employee.sql deleted file mode 100644 index c71311d0..00000000 --- a/Later/Java_Later/SQL/21/employee.sql +++ /dev/null @@ -1,45 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `city` varchar(100) DEFAULT NULL, - `country` varchar(100) DEFAULT NULL, - `Created_date` date DEFAULT NULL, - PRIMARY KEY (`ID`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`ID`,`NAME`,`AGE`,`SALARY`,`city`,`country`,`Created_date`) values (1,'Peter',32,20000,'Tokyo','Japan','2019-09-02'),(2,'John',39,30000,'Chennai','India','2019-09-11'),(3,'Dave',40,6000,'Austin','USA','2019-09-08'),(4,'Arun',56,6000,'Chicago','USA','2019-09-25'),(5,'Raj',45,6000,'Las Vegas','USA','2019-08-07'),(6,'Julia',46,6000,'Atlanta','USA','2019-09-17'),(7,'Jack',65,70000,'Bangalore','India','2019-07-15'),(8,'Rocky',55,80000,'Kerala','India','2019-09-11'),(9,'Raj',67,NULL,NULL,'India','2019-08-20'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/22/SQL Aliases.pptx b/Later/Java_Later/SQL/22/SQL Aliases.pptx deleted file mode 100644 index 1e9e818d..00000000 Binary files a/Later/Java_Later/SQL/22/SQL Aliases.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/23_later/SQL Aliases Table.pptx b/Later/Java_Later/SQL/23_later/SQL Aliases Table.pptx deleted file mode 100644 index 4861bda6..00000000 Binary files a/Later/Java_Later/SQL/23_later/SQL Aliases Table.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/24/SQL GROUP BY Statement.pptx b/Later/Java_Later/SQL/24/SQL GROUP BY Statement.pptx deleted file mode 100644 index 5115391b..00000000 Binary files a/Later/Java_Later/SQL/24/SQL GROUP BY Statement.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/25/SQL HAVING Clause.pptx b/Later/Java_Later/SQL/25/SQL HAVING Clause.pptx deleted file mode 100644 index f95e6fba..00000000 Binary files a/Later/Java_Later/SQL/25/SQL HAVING Clause.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/26/One to Many Relationship.pptx b/Later/Java_Later/SQL/26/One to Many Relationship.pptx deleted file mode 100644 index 1246ced0..00000000 Binary files a/Later/Java_Later/SQL/26/One to Many Relationship.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/26/employee.sql b/Later/Java_Later/SQL/26/employee.sql deleted file mode 100644 index 60427f87..00000000 --- a/Later/Java_Later/SQL/26/employee.sql +++ /dev/null @@ -1,68 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `address` */ - -DROP TABLE IF EXISTS `address`; - -CREATE TABLE `address` ( - `ADDRESS_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_ID` int(10) unsigned NOT NULL, - `STREET_NAME` varchar(100) NOT NULL, - `CITY` varchar(100) NOT NULL, - `COUNTRY` varchar(100) NOT NULL, - `ZIPCODE` varchar(100) NOT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`ADDRESS_ID`), - KEY `EMPLOYEE_ADDRESS_LINK` (`EMPLOYEE_ID`), - CONSTRAINT `EMPLOYEE_ADDRESS_LINK` FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES `employee` (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; - -/*Data for the table `address` */ - -LOCK TABLES `address` WRITE; - -insert into `address`(`ADDRESS_ID`,`EMPLOYEE_ID`,`STREET_NAME`,`CITY`,`COUNTRY`,`ZIPCODE`,`CREATED_DATE`) values (1,1,'18,Dark Street','Chennai','India','680009','2019-09-10'),(2,1,'90,West Street','Bangalore','India','655556','2019-09-18'),(3,2,'898,East Street','Bangalore','India','565565','2019-09-14'),(4,2,'676,North Street','Chennai','India','767676','2019-09-18'),(5,2,'434,Good Street','Kerala','India','656565','2019-09-16'); - -UNLOCK TABLES; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `EMPLOYEE_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`EMPLOYEE_ID`,`EMPLOYEE_NAME`,`AGE`,`SALARY`,`CREATED_DATE`) values (1,'Peter',32,7000,'2019-09-03'),(2,'Dave',34,8000,'2019-09-04'),(3,'John',45,10000,'2019-09-24'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/27/SQL JOIN.pptx b/Later/Java_Later/SQL/27/SQL JOIN.pptx deleted file mode 100644 index 0864b63b..00000000 Binary files a/Later/Java_Later/SQL/27/SQL JOIN.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/27/employee.sql b/Later/Java_Later/SQL/27/employee.sql deleted file mode 100644 index 60427f87..00000000 --- a/Later/Java_Later/SQL/27/employee.sql +++ /dev/null @@ -1,68 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `address` */ - -DROP TABLE IF EXISTS `address`; - -CREATE TABLE `address` ( - `ADDRESS_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_ID` int(10) unsigned NOT NULL, - `STREET_NAME` varchar(100) NOT NULL, - `CITY` varchar(100) NOT NULL, - `COUNTRY` varchar(100) NOT NULL, - `ZIPCODE` varchar(100) NOT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`ADDRESS_ID`), - KEY `EMPLOYEE_ADDRESS_LINK` (`EMPLOYEE_ID`), - CONSTRAINT `EMPLOYEE_ADDRESS_LINK` FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES `employee` (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; - -/*Data for the table `address` */ - -LOCK TABLES `address` WRITE; - -insert into `address`(`ADDRESS_ID`,`EMPLOYEE_ID`,`STREET_NAME`,`CITY`,`COUNTRY`,`ZIPCODE`,`CREATED_DATE`) values (1,1,'18,Dark Street','Chennai','India','680009','2019-09-10'),(2,1,'90,West Street','Bangalore','India','655556','2019-09-18'),(3,2,'898,East Street','Bangalore','India','565565','2019-09-14'),(4,2,'676,North Street','Chennai','India','767676','2019-09-18'),(5,2,'434,Good Street','Kerala','India','656565','2019-09-16'); - -UNLOCK TABLES; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `EMPLOYEE_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`EMPLOYEE_ID`,`EMPLOYEE_NAME`,`AGE`,`SALARY`,`CREATED_DATE`) values (1,'Peter',32,7000,'2019-09-03'),(2,'Dave',34,8000,'2019-09-04'),(3,'John',45,10000,'2019-09-24'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/28/Different Types of SQL JOINs.pptx b/Later/Java_Later/SQL/28/Different Types of SQL JOINs.pptx deleted file mode 100644 index 946f9d43..00000000 Binary files a/Later/Java_Later/SQL/28/Different Types of SQL JOINs.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/29/SQL INNER JOIN.pptx b/Later/Java_Later/SQL/29/SQL INNER JOIN.pptx deleted file mode 100644 index eec166bd..00000000 Binary files a/Later/Java_Later/SQL/29/SQL INNER JOIN.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/29/employee.sql b/Later/Java_Later/SQL/29/employee.sql deleted file mode 100644 index 60427f87..00000000 --- a/Later/Java_Later/SQL/29/employee.sql +++ /dev/null @@ -1,68 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `address` */ - -DROP TABLE IF EXISTS `address`; - -CREATE TABLE `address` ( - `ADDRESS_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_ID` int(10) unsigned NOT NULL, - `STREET_NAME` varchar(100) NOT NULL, - `CITY` varchar(100) NOT NULL, - `COUNTRY` varchar(100) NOT NULL, - `ZIPCODE` varchar(100) NOT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`ADDRESS_ID`), - KEY `EMPLOYEE_ADDRESS_LINK` (`EMPLOYEE_ID`), - CONSTRAINT `EMPLOYEE_ADDRESS_LINK` FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES `employee` (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; - -/*Data for the table `address` */ - -LOCK TABLES `address` WRITE; - -insert into `address`(`ADDRESS_ID`,`EMPLOYEE_ID`,`STREET_NAME`,`CITY`,`COUNTRY`,`ZIPCODE`,`CREATED_DATE`) values (1,1,'18,Dark Street','Chennai','India','680009','2019-09-10'),(2,1,'90,West Street','Bangalore','India','655556','2019-09-18'),(3,2,'898,East Street','Bangalore','India','565565','2019-09-14'),(4,2,'676,North Street','Chennai','India','767676','2019-09-18'),(5,2,'434,Good Street','Kerala','India','656565','2019-09-16'); - -UNLOCK TABLES; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `EMPLOYEE_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`EMPLOYEE_ID`,`EMPLOYEE_NAME`,`AGE`,`SALARY`,`CREATED_DATE`) values (1,'Peter',32,7000,'2019-09-03'),(2,'Dave',34,8000,'2019-09-04'),(3,'John',45,10000,'2019-09-24'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/3/Database Tables.pptx b/Later/Java_Later/SQL/3/Database Tables.pptx deleted file mode 100644 index eaf11329..00000000 Binary files a/Later/Java_Later/SQL/3/Database Tables.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/30/SQL LEFT JOIN.pptx b/Later/Java_Later/SQL/30/SQL LEFT JOIN.pptx deleted file mode 100644 index 9550ac74..00000000 Binary files a/Later/Java_Later/SQL/30/SQL LEFT JOIN.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/30/employee.sql b/Later/Java_Later/SQL/30/employee.sql deleted file mode 100644 index 60427f87..00000000 --- a/Later/Java_Later/SQL/30/employee.sql +++ /dev/null @@ -1,68 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `address` */ - -DROP TABLE IF EXISTS `address`; - -CREATE TABLE `address` ( - `ADDRESS_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_ID` int(10) unsigned NOT NULL, - `STREET_NAME` varchar(100) NOT NULL, - `CITY` varchar(100) NOT NULL, - `COUNTRY` varchar(100) NOT NULL, - `ZIPCODE` varchar(100) NOT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`ADDRESS_ID`), - KEY `EMPLOYEE_ADDRESS_LINK` (`EMPLOYEE_ID`), - CONSTRAINT `EMPLOYEE_ADDRESS_LINK` FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES `employee` (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; - -/*Data for the table `address` */ - -LOCK TABLES `address` WRITE; - -insert into `address`(`ADDRESS_ID`,`EMPLOYEE_ID`,`STREET_NAME`,`CITY`,`COUNTRY`,`ZIPCODE`,`CREATED_DATE`) values (1,1,'18,Dark Street','Chennai','India','680009','2019-09-10'),(2,1,'90,West Street','Bangalore','India','655556','2019-09-18'),(3,2,'898,East Street','Bangalore','India','565565','2019-09-14'),(4,2,'676,North Street','Chennai','India','767676','2019-09-18'),(5,2,'434,Good Street','Kerala','India','656565','2019-09-16'); - -UNLOCK TABLES; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `EMPLOYEE_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`EMPLOYEE_ID`,`EMPLOYEE_NAME`,`AGE`,`SALARY`,`CREATED_DATE`) values (1,'Peter',32,7000,'2019-09-03'),(2,'Dave',34,8000,'2019-09-04'),(3,'John',45,10000,'2019-09-24'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/31/SQL RIGHT JOIN.pptx b/Later/Java_Later/SQL/31/SQL RIGHT JOIN.pptx deleted file mode 100644 index cdea8b87..00000000 Binary files a/Later/Java_Later/SQL/31/SQL RIGHT JOIN.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/31/employee.sql b/Later/Java_Later/SQL/31/employee.sql deleted file mode 100644 index 60427f87..00000000 --- a/Later/Java_Later/SQL/31/employee.sql +++ /dev/null @@ -1,68 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `address` */ - -DROP TABLE IF EXISTS `address`; - -CREATE TABLE `address` ( - `ADDRESS_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_ID` int(10) unsigned NOT NULL, - `STREET_NAME` varchar(100) NOT NULL, - `CITY` varchar(100) NOT NULL, - `COUNTRY` varchar(100) NOT NULL, - `ZIPCODE` varchar(100) NOT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`ADDRESS_ID`), - KEY `EMPLOYEE_ADDRESS_LINK` (`EMPLOYEE_ID`), - CONSTRAINT `EMPLOYEE_ADDRESS_LINK` FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES `employee` (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; - -/*Data for the table `address` */ - -LOCK TABLES `address` WRITE; - -insert into `address`(`ADDRESS_ID`,`EMPLOYEE_ID`,`STREET_NAME`,`CITY`,`COUNTRY`,`ZIPCODE`,`CREATED_DATE`) values (1,1,'18,Dark Street','Chennai','India','680009','2019-09-10'),(2,1,'90,West Street','Bangalore','India','655556','2019-09-18'),(3,2,'898,East Street','Bangalore','India','565565','2019-09-14'),(4,2,'676,North Street','Chennai','India','767676','2019-09-18'),(5,2,'434,Good Street','Kerala','India','656565','2019-09-16'); - -UNLOCK TABLES; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `EMPLOYEE_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`EMPLOYEE_ID`,`EMPLOYEE_NAME`,`AGE`,`SALARY`,`CREATED_DATE`) values (1,'Peter',32,7000,'2019-09-03'),(2,'Dave',34,8000,'2019-09-04'),(3,'John',45,10000,'2019-09-24'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/32/SQL FULL OUTER JOIN.pptx b/Later/Java_Later/SQL/32/SQL FULL OUTER JOIN.pptx deleted file mode 100644 index 8781f449..00000000 Binary files a/Later/Java_Later/SQL/32/SQL FULL OUTER JOIN.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/33/SQL UNION.pptx b/Later/Java_Later/SQL/33/SQL UNION.pptx deleted file mode 100644 index a3036984..00000000 Binary files a/Later/Java_Later/SQL/33/SQL UNION.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/33/employee.sql b/Later/Java_Later/SQL/33/employee.sql deleted file mode 100644 index 52030832..00000000 --- a/Later/Java_Later/SQL/33/employee.sql +++ /dev/null @@ -1,70 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `address` */ - -DROP TABLE IF EXISTS `address`; - -CREATE TABLE `address` ( - `ADDRESS_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_ID` int(10) unsigned NOT NULL, - `STREET_NAME` varchar(100) NOT NULL, - `CITY` varchar(100) NOT NULL, - `COUNTRY` varchar(100) NOT NULL, - `ZIPCODE` varchar(100) NOT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`ADDRESS_ID`), - KEY `EMPLOYEE_ADDRESS_LINK` (`EMPLOYEE_ID`), - CONSTRAINT `EMPLOYEE_ADDRESS_LINK` FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES `employee` (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; - -/*Data for the table `address` */ - -LOCK TABLES `address` WRITE; - -insert into `address`(`ADDRESS_ID`,`EMPLOYEE_ID`,`STREET_NAME`,`CITY`,`COUNTRY`,`ZIPCODE`,`CREATED_DATE`) values (1,1,'18,Dark Street','Chennai','India','680009','2019-09-10'),(2,1,'90,West Street','Bangalore','India','655556','2019-09-18'),(3,2,'898,East Street','Bangalore','India','565565','2019-09-14'),(4,2,'676,North Street','Chennai','India','767676','2019-09-18'),(5,2,'434,Good Street','Kerala','India','656565','2019-09-16'),(6,2,'888,JP Street','Tokyo','Japan','898989','2019-09-16'); - -UNLOCK TABLES; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `EMPLOYEE_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `CITY` varchar(100) DEFAULT NULL, - `COUNTRY` varchar(100) DEFAULT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`EMPLOYEE_ID`,`EMPLOYEE_NAME`,`AGE`,`SALARY`,`CITY`,`COUNTRY`,`CREATED_DATE`) values (1,'Peter',32,7000,'Chennai','India','2019-09-03'),(2,'Dave',34,8000,'Bangalore','India','2019-09-04'),(3,'John',45,10000,'Chennai','India','2019-09-24'),(4,'Ajay',32,7000,'Kerala','India','2019-09-18'),(5,'Vijay',45,8888,'Tokyo','Japan','2019-09-30'),(6,'Arun',56,7777,'Kyoto ','Japan','2019-09-16'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/34/SQL Comments.pptx b/Later/Java_Later/SQL/34/SQL Comments.pptx deleted file mode 100644 index 256fc638..00000000 Binary files a/Later/Java_Later/SQL/34/SQL Comments.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/35/SQL CASE.pptx b/Later/Java_Later/SQL/35/SQL CASE.pptx deleted file mode 100644 index 9a90fa10..00000000 Binary files a/Later/Java_Later/SQL/35/SQL CASE.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/35/employee.sql b/Later/Java_Later/SQL/35/employee.sql deleted file mode 100644 index 89199d85..00000000 --- a/Later/Java_Later/SQL/35/employee.sql +++ /dev/null @@ -1,22 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB -********************************************************************* -*/ -/*!40101 SET NAMES utf8 */; - -create table `employee` ( - `EMPLOYEE_ID` int (10), - `EMPLOYEE_NAME` varchar (300), - `AGE` int (10), - `SALARY` int (10), - `CITY` varchar (300), - `COUNTRY` varchar (300), - `CREATED_DATE` date -); -insert into `employee` (`EMPLOYEE_ID`, `EMPLOYEE_NAME`, `AGE`, `SALARY`, `CITY`, `COUNTRY`, `CREATED_DATE`) values('1','Peter','32','7000','Chennai','India','2019-09-03'); -insert into `employee` (`EMPLOYEE_ID`, `EMPLOYEE_NAME`, `AGE`, `SALARY`, `CITY`, `COUNTRY`, `CREATED_DATE`) values('2','Dave','34','8000','Bangalore','India','2019-09-04'); -insert into `employee` (`EMPLOYEE_ID`, `EMPLOYEE_NAME`, `AGE`, `SALARY`, `CITY`, `COUNTRY`, `CREATED_DATE`) values('3','John','45','10000','Chennai','India','2019-09-24'); -insert into `employee` (`EMPLOYEE_ID`, `EMPLOYEE_NAME`, `AGE`, `SALARY`, `CITY`, `COUNTRY`, `CREATED_DATE`) values('4','Ajay','32','7000','Kerala','India','2019-09-18'); -insert into `employee` (`EMPLOYEE_ID`, `EMPLOYEE_NAME`, `AGE`, `SALARY`, `CITY`, `COUNTRY`, `CREATED_DATE`) values('5','Vijay','40','8888','Tokyo','Japan','2019-09-30'); -insert into `employee` (`EMPLOYEE_ID`, `EMPLOYEE_NAME`, `AGE`, `SALARY`, `CITY`, `COUNTRY`, `CREATED_DATE`) values('6','Arun','56','7777','Kyoto ','Japan','2019-09-16'); diff --git a/Later/Java_Later/SQL/36/SQL EXISTS.pptx b/Later/Java_Later/SQL/36/SQL EXISTS.pptx deleted file mode 100644 index fe8a8fcc..00000000 Binary files a/Later/Java_Later/SQL/36/SQL EXISTS.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/36/employee.sql b/Later/Java_Later/SQL/36/employee.sql deleted file mode 100644 index 276dfc7e..00000000 --- a/Later/Java_Later/SQL/36/employee.sql +++ /dev/null @@ -1,68 +0,0 @@ -/* -SQLyog Ultimate v11.11 (32 bit) -MySQL - 5.5.5-10.1.24-MariaDB : Database - org_db -********************************************************************* -*/ - -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -CREATE DATABASE /*!32312 IF NOT EXISTS*/`org_db` /*!40100 DEFAULT CHARACTER SET utf8 */; - -USE `org_db`; - -/*Table structure for table `address` */ - -DROP TABLE IF EXISTS `address`; - -CREATE TABLE `address` ( - `ADDRESS_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_ID` int(10) unsigned NOT NULL, - `STREET_NAME` varchar(100) NOT NULL, - `CITY` varchar(100) NOT NULL, - `COUNTRY` varchar(100) NOT NULL, - `ZIPCODE` varchar(100) NOT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`ADDRESS_ID`), - KEY `EMPLOYEE_ADDRESS_LINK` (`EMPLOYEE_ID`), - CONSTRAINT `EMPLOYEE_ADDRESS_LINK` FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES `employee` (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; - -/*Data for the table `address` */ - -LOCK TABLES `address` WRITE; - -insert into `address`(`ADDRESS_ID`,`EMPLOYEE_ID`,`STREET_NAME`,`CITY`,`COUNTRY`,`ZIPCODE`,`CREATED_DATE`) values (1,1,'18,Dark Street','Chennai','India','680009','2019-09-10'),(2,1,'90,West Street','Bangalore','India','655556','2019-09-18'),(3,2,'898,East Street','Bangalore','India','565565','2019-09-14'),(4,2,'676,North Street','Chennai','India','767676','2019-09-18'),(5,2,'434,Good Street','Kerala','India','656565','2019-09-16'),(6,2,'888,JP Street','Tokyo','Japan','898989','2019-09-16'); - -UNLOCK TABLES; - -/*Table structure for table `employee` */ - -DROP TABLE IF EXISTS `employee`; - -CREATE TABLE `employee` ( - `EMPLOYEE_ID` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EMPLOYEE_NAME` varchar(100) NOT NULL, - `AGE` int(10) NOT NULL, - `SALARY` int(10) DEFAULT NULL, - `CREATED_DATE` date DEFAULT NULL, - PRIMARY KEY (`EMPLOYEE_ID`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; - -/*Data for the table `employee` */ - -LOCK TABLES `employee` WRITE; - -insert into `employee`(`EMPLOYEE_ID`,`EMPLOYEE_NAME`,`AGE`,`SALARY`,`CREATED_DATE`) values (1,'Peter',32,7000,'2019-09-03'),(2,'Dave',34,8000,'2019-09-04'),(3,'John',45,10000,'2019-09-24'),(4,'Ajay',32,7000,'2019-09-18'),(5,'Vijay',40,8888,'2019-09-30'),(6,'Arun',56,7777,'2019-09-16'); - -UNLOCK TABLES; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/Later/Java_Later/SQL/37/NULL Functions.pptx b/Later/Java_Later/SQL/37/NULL Functions.pptx deleted file mode 100644 index 5b331bc3..00000000 Binary files a/Later/Java_Later/SQL/37/NULL Functions.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/38/SQL ANY.pptx b/Later/Java_Later/SQL/38/SQL ANY.pptx deleted file mode 100644 index 74b5d1ae..00000000 Binary files a/Later/Java_Later/SQL/38/SQL ANY.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/39/SQL ALL.pptx b/Later/Java_Later/SQL/39/SQL ALL.pptx deleted file mode 100644 index 830607b4..00000000 Binary files a/Later/Java_Later/SQL/39/SQL ALL.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/4/SQL SELECT.pptx b/Later/Java_Later/SQL/4/SQL SELECT.pptx deleted file mode 100644 index e2637486..00000000 Binary files a/Later/Java_Later/SQL/4/SQL SELECT.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/40/CREATE TABLE ... SELECT Syntax.pptx b/Later/Java_Later/SQL/40/CREATE TABLE ... SELECT Syntax.pptx deleted file mode 100644 index 78001ae1..00000000 Binary files a/Later/Java_Later/SQL/40/CREATE TABLE ... SELECT Syntax.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/41/SQL INSERT INTO SELECT Statement.pptx b/Later/Java_Later/SQL/41/SQL INSERT INTO SELECT Statement.pptx deleted file mode 100644 index 99649f5f..00000000 Binary files a/Later/Java_Later/SQL/41/SQL INSERT INTO SELECT Statement.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/42/SQL Stored Procedures.pptx b/Later/Java_Later/SQL/42/SQL Stored Procedures.pptx deleted file mode 100644 index c2c9e6a9..00000000 Binary files a/Later/Java_Later/SQL/42/SQL Stored Procedures.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/43/SQL CREATE DATABASE Statement.pptx b/Later/Java_Later/SQL/43/SQL CREATE DATABASE Statement.pptx deleted file mode 100644 index b61ecdaa..00000000 Binary files a/Later/Java_Later/SQL/43/SQL CREATE DATABASE Statement.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/44/DROP DATABASE.pptx b/Later/Java_Later/SQL/44/DROP DATABASE.pptx deleted file mode 100644 index ebb573ce..00000000 Binary files a/Later/Java_Later/SQL/44/DROP DATABASE.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/45/SQL CREATE TABLE.pptx b/Later/Java_Later/SQL/45/SQL CREATE TABLE.pptx deleted file mode 100644 index dedbd3be..00000000 Binary files a/Later/Java_Later/SQL/45/SQL CREATE TABLE.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/46/SQL Drop TABLE.pptx b/Later/Java_Later/SQL/46/SQL Drop TABLE.pptx deleted file mode 100644 index 28481714..00000000 Binary files a/Later/Java_Later/SQL/46/SQL Drop TABLE.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/47/ALTER TABLE Statement.pptx b/Later/Java_Later/SQL/47/ALTER TABLE Statement.pptx deleted file mode 100644 index 2213d605..00000000 Binary files a/Later/Java_Later/SQL/47/ALTER TABLE Statement.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/48/SQL Constraints.pptx b/Later/Java_Later/SQL/48/SQL Constraints.pptx deleted file mode 100644 index acbadc43..00000000 Binary files a/Later/Java_Later/SQL/48/SQL Constraints.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/49/SQL NOT NULL.pptx b/Later/Java_Later/SQL/49/SQL NOT NULL.pptx deleted file mode 100644 index a6cf02fa..00000000 Binary files a/Later/Java_Later/SQL/49/SQL NOT NULL.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/5/SELECT DISTINCT Examples.pptx b/Later/Java_Later/SQL/5/SELECT DISTINCT Examples.pptx deleted file mode 100644 index 48eba165..00000000 Binary files a/Later/Java_Later/SQL/5/SELECT DISTINCT Examples.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/50/SQL UNIQUE Constraint.pptx b/Later/Java_Later/SQL/50/SQL UNIQUE Constraint.pptx deleted file mode 100644 index 880c1f2e..00000000 Binary files a/Later/Java_Later/SQL/50/SQL UNIQUE Constraint.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/51/SQL PRIMARY KEY Constraint.pptx b/Later/Java_Later/SQL/51/SQL PRIMARY KEY Constraint.pptx deleted file mode 100644 index a43b1e50..00000000 Binary files a/Later/Java_Later/SQL/51/SQL PRIMARY KEY Constraint.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/52/SQL FOREIGN KEY Constraint.pptx b/Later/Java_Later/SQL/52/SQL FOREIGN KEY Constraint.pptx deleted file mode 100644 index 81478c2d..00000000 Binary files a/Later/Java_Later/SQL/52/SQL FOREIGN KEY Constraint.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/53/SQL CHECK Constraint.pptx b/Later/Java_Later/SQL/53/SQL CHECK Constraint.pptx deleted file mode 100644 index efd3ea49..00000000 Binary files a/Later/Java_Later/SQL/53/SQL CHECK Constraint.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/54/SQL DEFAULT Constraint.pptx b/Later/Java_Later/SQL/54/SQL DEFAULT Constraint.pptx deleted file mode 100644 index 5cc02685..00000000 Binary files a/Later/Java_Later/SQL/54/SQL DEFAULT Constraint.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/55/SQL CREATE INDEX.pptx b/Later/Java_Later/SQL/55/SQL CREATE INDEX.pptx deleted file mode 100644 index ead48803..00000000 Binary files a/Later/Java_Later/SQL/55/SQL CREATE INDEX.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/56/SQL AUTO INCREMENT.pptx b/Later/Java_Later/SQL/56/SQL AUTO INCREMENT.pptx deleted file mode 100644 index b16e685c..00000000 Binary files a/Later/Java_Later/SQL/56/SQL AUTO INCREMENT.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/57/SQL Dates.pptx b/Later/Java_Later/SQL/57/SQL Dates.pptx deleted file mode 100644 index d314f891..00000000 Binary files a/Later/Java_Later/SQL/57/SQL Dates.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/58/SQL Views.pptx b/Later/Java_Later/SQL/58/SQL Views.pptx deleted file mode 100644 index 4534079f..00000000 Binary files a/Later/Java_Later/SQL/58/SQL Views.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/59/SQL Injection.pptx b/Later/Java_Later/SQL/59/SQL Injection.pptx deleted file mode 100644 index 87c8ad04..00000000 Binary files a/Later/Java_Later/SQL/59/SQL Injection.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/6/SQL WHERE Clause.pptx b/Later/Java_Later/SQL/6/SQL WHERE Clause.pptx deleted file mode 100644 index 621e4fee..00000000 Binary files a/Later/Java_Later/SQL/6/SQL WHERE Clause.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/60/SQL Hosting.pptx b/Later/Java_Later/SQL/60/SQL Hosting.pptx deleted file mode 100644 index 7e647cb2..00000000 Binary files a/Later/Java_Later/SQL/60/SQL Hosting.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/7/SQL AND Operator.pptx b/Later/Java_Later/SQL/7/SQL AND Operator.pptx deleted file mode 100644 index 6f7f9b2c..00000000 Binary files a/Later/Java_Later/SQL/7/SQL AND Operator.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/8/SQL OR Operator.pptx b/Later/Java_Later/SQL/8/SQL OR Operator.pptx deleted file mode 100644 index 14b1d419..00000000 Binary files a/Later/Java_Later/SQL/8/SQL OR Operator.pptx and /dev/null differ diff --git a/Later/Java_Later/SQL/9/SQL NOT Operator.pptx b/Later/Java_Later/SQL/9/SQL NOT Operator.pptx deleted file mode 100644 index 2a61f5c8..00000000 Binary files a/Later/Java_Later/SQL/9/SQL NOT Operator.pptx and /dev/null differ diff --git a/Later/Java_Later/pending.txt b/Later/Java_Later/pending.txt new file mode 100644 index 00000000..b8733ef3 --- /dev/null +++ b/Later/Java_Later/pending.txt @@ -0,0 +1 @@ +https://www.appsdeveloperblog.com/tag/rest-assured/ \ No newline at end of file