124 skills found · Page 1 of 5
timtadh / Data StructuresGo datastructures.
shihuili1218 / Klein🔥 Klein is a Paxos based distributed collection tool library, including distributed ArrayList, distributed HashMap, distributed Cache, distributed Lock, etc..
caijiahao / SpringMvcPlusMongo慕课网 首页 实战 路径 猿问 手记 登录 注册 11.11 Python 手记 \ 史上最全,最详idea搭建springdata+mongoDB+maven+springmvc 史上最全,最详idea搭建springdata+mongoDB+maven+springmvc 原创 2016-10-21 10:54:297759浏览2评论 作为IT届的小弟,本篇作为本人的第一篇手记,还希望各位大牛多多指点,以下均为个人学习所得,如有错误,敬请指正。本着服务IT小白的原则,该手记比较详细。由于最近使用postgre开发大型项目,发现了关系型数据库的弊端及查询效率之慢,苦心钻研之下,对nosql的mongoDB从无知到有了初步了解。 项目环境:win10+IntelliJ IDEA2016+maven3.3.9+MongoDB 3.2+JDK1.7+spring4.1.7 推荐网站(适合学习各种知识的基础):http://www.runoob.com/ mongo安装请参考http://www.runoob.com/mongodb/mongodb-window-install.html 由于最近osChina的maven仓库挂掉,推荐大家使用阿里的镜像,速度快的飞起 maven配置:<localRepository>F:\.m2\repository</localRepository> <mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> 这里不实用idea自带maven插件,改用3.3.9 图片描述 项目结构:图片描述 这里dao与mongoDao分别为mongoDB的两种查询方式: dao为JPA的查询方式(请参考springdataJPA) mongoDao使用mongoTemplate,类似于关系型数据库使用的jdbcTemplate 不罗嗦,上代码 先看配置文件 spring-context.xm为最基本的spring配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <!--扫描service包嗲所有使用注解的类型--> <context:component-scan base-package="com.lida.mongo"/> <!-- 导入mongodb的配置文件 --> <import resource="spring-mongo.xml" /> <!-- 开启注解 --> <context:annotation-config /> </beans> spring-web.xml为springmvc的基本配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"> <!--配置springmvc--> <!--1.开启springmvc注解模式--> <!--简化配置: (1)主动注册DefaultAnnotationHandlerMapping,AnnotationMethodHandlerAdapter (2)提供一系列功能:数据绑定,数字和日期的format @NumberFormt @DataTimeFormat,xml json默认的读写支持--> <mvc:annotation-driven/> <!--servlet-mapping--> <!--2静态资源默认的servlet配置,(1)允许对静态资源的处理:js,gif (2)允许使用“/”做整体映射--> <!-- 容器默认的DefaultServletHandler处理 所有静态内容与无RequestMapping处理的URL--> <mvc:default-servlet-handler/> <!--3:配置jsp 显示viewResolver--> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> </bean> <!-- 4自动扫描且只扫描@Controller --> <context:component-scan base-package="com.lida.mongo.controller" /> <!-- 定义无需Controller的url<->view直接映射 --> <mvc:view-controller path="/" view-name="redirect:/goMongo/list"/> </beans> spring-mongo.xml为mongo配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mongo="http://www.springframework.org/schema/data/mongo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd"> <!-- 加载mongodb的属性配置文件 --> <context:property-placeholder location="classpath:mongo.properties" /> <!-- spring连接mongodb数据库的配置 --> <mongo:mongo-client replica-set="${mongo.hostport}" id="mongo"> <mongo:client-options connections-per-host="${mongo.connectionsPerHost}" threads-allowed-to-block-for-connection-multiplier="${mongo.threadsAllowedToBlockForConnectionMultiplier}" connect-timeout="${mongo.connectTimeout}" max-wait-time="${mongo.maxWaitTime}" socket-timeout="${mongo.socketTimeout}"/> </mongo:mongo-client> <!-- mongo的工厂,通过它来取得mongo实例,dbname为mongodb的数据库名,没有的话会自动创建 --> <mongo:db-factory id="mongoDbFactory" dbname="mongoLida" mongo-ref="mongo" /> <!-- 只要使用这个调用相应的方法操作 --> <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate"> <constructor-arg name="mongoDbFactory" ref="mongoDbFactory" /> </bean> <!-- mongodb bean的仓库目录,会自动扫描扩展了MongoRepository接口的接口进行注入 --> <mongo:repositories base-package="com.lida.mongo" /> </beans> mongo.properties #mongoDB连接配置 mongo.hostport=127.0.0.1:27017 mongo.connectionsPerHost=8 mongo.threadsAllowedToBlockForConnectionMultiplier=4 #连接超时时间 mongo.connectTimeout=1000 #等待时间 mongo.maxWaitTime=1500 #Socket超时时间 mongo.socketTimeout=1500 pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.liad</groupId> <artifactId>mongo</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>mongo Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <!--使用junit4,注解的方式测试--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <!--日志--> <!--日志 slf4j,log4j,logback,common-logging--> <!--slf4j是规范/接口--> <!--log4j,logback,common-logging是日志实现 本项目使用slf4j + logback --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.12</version> </dependency> <!--实现slf4j并整合--> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.1</version> </dependency> <!--数据库相关--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.22</version> <!--maven工作范围 驱动在真正工作的时候使用,故生命周期改为runtime--> <scope>runtime</scope> </dependency> <!--servlet web相关--> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> </dependency> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.5.4</version> </dependency> <!--spring--> <!--spring核心--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>4.1.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>4.1.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.1.7.RELEASE</version> </dependency> <!--spring dao--> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-mongodb</artifactId> <version>1.8.0.RELEASE</version> </dependency> <dependency> <groupId>org.mongodb</groupId> <artifactId>mongo-java-driver</artifactId> <version>3.2.2</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>4.1.7.RELEASE</version> </dependency> <!--spring web--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.1.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.1.7.RELEASE</version> </dependency> <!--spring test--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>4.1.7.RELEASE</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.2</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-framework-bom</artifactId> <version>${spring.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache-core</artifactId> <version>2.6.9</version> </dependency> </dependencies> </dependencyManagement> <build> <finalName>mongo</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> </project> 两个实体类: /** * Created by DuLida on 2016/10/20. */ public class Address { private String city; private String street; private int num; public Address() { } public Address(String city, String street, int num) { this.city = city; this.street = street; this.num = num; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } public int getNum() { return num; } public void setNum(int num) { this.num = num; } @Override public String toString() { return "Address{" + "city='" + city + '\'' + ", street='" + street + '\'' + ", num=" + num + '}'; } } /** * Created by DuLida on 2016/10/20. */ @Document(collection="person") public class Person implements Serializable { @Id private ObjectId id; private String name; private int age; private Address address; public Person() { } public Person( String name, int age, Address address) { this.name = name; this.age = age; this.address = address; } public ObjectId getId() { return id; } public void setId(ObjectId 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 Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } @Override public String toString() { return "Person{" + "id=" + id + ", name='" + name + '\'' + ", age=" + age + ", address=" + address + '}'; } } JPA的dao,注意这里只要继承MongoRepository不用写注解spring就能认识这是个Repository,MongoRepository提供了基本的增删改查,不用实现便可直接调用,例如testMongo的personDao.save(persons); public interface PersonDao extends MongoRepository<Person, ObjectId> { @Query(value = "{'age' : {'$gte' : ?0, '$lte' : ?1}, 'name':?2 }",fields="{ 'name' : 1, 'age' : 1}") List<Person> findByAge(int age1, int age2, String name); } mongoTemplate的dao /** * Created by DuLida on 2016/10/21. */ public interface PersonMongoDao { List<Person> findAll(); void insertPerson(Person user); void removePerson(String userName); void updatePerson(); List<Person> findForRequery(String userName); } @Repository("personMongoImpl") public class PersonMongoImpl implements PersonMongoDao { @Resource private MongoTemplate mongoTemplate; @Override public List<Person> findAll() { return mongoTemplate.findAll(Person.class,"person"); } @Override public void insertPerson(Person person) { mongoTemplate.insert(person,"person"); } @Override public void removePerson(String userName) { mongoTemplate.remove(Query.query(Criteria.where("name").is(userName)),"person"); } @Override public void updatePerson() { mongoTemplate.updateMulti(Query.query(Criteria.where("age").gt(3).lte(5)), Update.update("age",3),"person"); } @Override public List<Person> findForRequery(String userName) { return mongoTemplate.find(Query.query(Criteria.where("name").is(userName)),Person.class); } } JPA查询的测试类: /** * Created by DuLida on 2016/10/20. */ @RunWith(SpringJUnit4ClassRunner.class) //告诉junit spring配置文件 @ContextConfiguration({"classpath:spring/spring-context.xml","classpath:spring/spring-mongo.xml"}) public class PersonDaoTest { @Resource private PersonDao personDao; /*先往数据库中插入10个person*/ @Test public void testMongo() { List<Person> persons = new ArrayList<Person>(); for (int i = 0; i < 10; i++) { persons.add(new Person("name"+i,i,new Address("石家庄","裕华路",i))); } personDao.save(persons); } @Test public void findMongo() { System.out.println(personDao.findByAge(2,8,"name6")); } } mongoTemplate查询的测试类 /** * Created by DuLida on 2016/10/21. */ @RunWith(SpringJUnit4ClassRunner.class) //告诉junit spring配置文件 @ContextConfiguration({"classpath:spring/spring-context.xml","classpath:spring/spring-mongo.xml"}) public class MongoTemplateTest { @Resource private PersonMongoImpl personMongo; @Test public void testMongoTemplate() { //personMongo.insertPerson(new Person("wukong",24,new Address("石家庄","鑫达路",20))); //personMongo.removePerson("name3"); //personMongo.updatePerson(); //System.out.println(personMongo.findAll()); System.out.println(personMongo.findForRequery("wukong")); } } 注意测试前请先通过testMongo()向数据库中插入数据。 项目源码Git地址,仅供学习使用:https://github.com/dreamSmile/mongo.git 参考资料http://docs.spring.io/spring-data/mongodb/docs/current/reference/html/ 本文原创发布于慕课网 ,转载请注明出处,谢谢合作! 相关标签:JAVAMongoDB 时间丶思考 天才小驴 你好小Song 陈词滥调1 4 人推荐 收藏 相关阅读 JAVA第三季1-9(模拟借书系统)作业 用pkp类,players类,playgame类三步教你写扑克牌游戏 Java入门第三季习题,简易扑克牌游戏 java学习第二季哒哒租车系统 Java入门第二季第六章练习题 请登录后,发表评论 评论(Enter+Ctrl) 全部评论2条 你好小Song2F 多数据源如何配置, 比如多个mongodb数据库再加mysql 1天前回复赞同0 时间丶思考 回复 你好小Song: 41分钟前 就在加一个datasource就行啊,原来mysql的datasource怎么加,现在就怎么加上就行,加上直接用。 回复 你好小Song1F 参考一下, 学习了. 2天前回复赞同0 时间丶思考 JAVA开发工程师 情劫难逃。 3篇手记 3推荐 作者的热门手记 神奇的Canvas贝塞尔曲线画心,程序员的表白 1021浏览18推荐3评论 深入探究setTimeout 和setInterval 44浏览1推荐0评论 网站首页企业合作人才招聘联系我们合作专区关于我们讲师招募常见问题意见反馈友情链接 Copyright © 2016 imooc.com All Rights Reserved | 京ICP备 13046642号-2
harshalbenake / Hbworkspace1 100(1) Name :- accelormeterSensor Description :- Using acceloremeter sensor to print Sensor event values. (2) Name :- ActionBarDropdownNavigation Description :- Action bar with dropdown navigation type. (3) Name :- android-actionbar-master Description :- Action bar buttons like add/delete/show. (4) Name :- Android Contact ListView Description :- Fake Contact listview. (5) Name :- AndroidListViewActivity Description :- Listview by extending ListActivity. (6) Name :- android-pulltorefresh-master Description :- Pulltorefresh demo. (7) Name :- Android-PullToRefresh-master Description :- Pulltorefresh handmark demo. (8) Name :- Android-Universal-Image-Loader-master Description :- Universal Image loader. (9) Name :- AnimationAllInOne Description :- Animation like fade/zoom/rotate. (10) Name :- arrayloop Description :- Different types of loops for arraylist items. (11) Name :- autocompletetextimagedemo Description :- Autocomplete with image and text. (12) Name :- BarcodeScanner Description :- Intent for Barcord scanner from google play. (13) Name :- bluetoothtoggle Description :- Toggle on/off bluetooth. (14) Name :- buttonpressed Description :-Status of button is pressed or not. (15) Name :- call Description :- Using TelephonyManager to get device phone number. (16) Name :- calling Description :- Intent to make call to specific number. (17) Name :- cellid Description :- Get cellid to get location. (18) Name :- Compass Description :- Google Glass - compass. (19) Name :- countrycode Description :- Get country code using Locale. (20) Name :- CustomLinkyfy Description :- Using custom linkyfy for various intents. (21) Name :- customlistviewBaseAdapter Description :- Listview with custom base adapter. (22) Name :- custompopup Description :- Dialog custom popup. (23) Name :- CustomSpinner Description :- Custom spinner with default value. (24) Name :- custom-ui Description :- Social Auth – custom UI. (25) Name :- databaseFromAsset Description :- Access database from asset folder. (26) Name :- dragndrop Description :- Drag and drop image demo. (27) Name :- expandablelistview Description :- Expandable listview demo. (28) Name :- flightmode Description :- Toggle on/off flight mode. (29) Name :- FragmentsTest Description :- Simple Fragment demo. (30) Name :- gallerydemo Description :- Image Gallery demo. (31) Name :- GestureDetection Description :- Detect gestures from user. (32) Name :- google image loader api complete Description :- Google image loader. (33) Name :- gpsonoff Description :- Toggle on/off GPS. (34) Name :- gpsonofstatus Description :- Get status of GPS on/off. (35) Name :- Gridlayout Description :- Grid layout demo. (36) Name :- gridviewsimple Description :- Simple grid view. (37) Name :- gsondemo Description :- Gson demo. (38) Name :- hbcustomlibaray Description :- Custom library demo. (39) Name :- HBfragment Description :- Fragment demo with detail and list view. (40) Name :- hideappfromlauncher Description :- Hide app icon from launcher. (41) Name :- highlightedittext Description :- Highlight the selected text. (42) Name :- home pressed Description :- Detect home button press. (43) Name :- HorizontalScrollViewActivity Description :- Horizontal scroll view demo. (44) Name :- ImageGridActivity Description :- Image grid using lru cache. (45) Name :- imageloadergoogle Description :- Google Image loader for auto complete. (46) Name :- imageloaderListViewWithJSONFromURL Description :- Image loader in listview pasring. (47) Name :- InstalledAppNames Description :- Get list of installed apps. (48) Name :- itemcount Description :- Item count calculation. (49) Name :- jasondemo Description :- Jason parsing demo. (50) Name :- jasonparsedemo Description :- Various kind of object json parsing using pojo. (51) Name :- JSONExampleActivity Description :- Json parsing post. (52) Name :- Jsonparsefromtxtfile Description :- Json parsing from txt file. (53) Name :- layoutadddynamically Description :- Adding infinity layout dynamically on button press. (54) Name :- layoutweightdemo Description :- Using layout weight for UI. (55) Name :- Linkedin Description :- Linkedin integration. (56) Name :- linkedinbest Description :- Linkedin integration. (57) Name :- Listview_baseadapter_getItemViewType Description :- Listview with getitemview type for different ui view per listitem. (58) Name :- LiveWallpaper Description :- Live Wallpaper demo. (59) Name :- MyAndroidAppActivity Description :- Simple string buffer. (60) Name :- mypopup Description :- Custom dailog. (61) Name :- notification Description :- Simple notification demo. (62) Name :- Notification_count Description :- Notification Badge count. (63) Name :- Paginated ListView Demo Description :- Pagination for listview. (64) Name :- PayPalSDKExample Description :- Paypal integration. (65) Name :- PinItDemo Description :- Pint it integration. (66) Name :- progressbardemo Description :- Progressbar demo. (67) Name :- ProximatySensorDemo Description :- Using Proximaty sensor for printing values. (68) Name :- pulltorefresh and dragndrop to gridview Description :- Pulltorefresh and drag n drop to gridview. (69) Name :- readtextfile Description :- Read simple text file. (70) Name :- recentRunningBackgroundAppList Description :- Get list of apps that were running recently. (71) Name :- rfile Description :- Get id value from view using r file. (72) Name :- ribbonsample Description :- Ribbon sample demo. (73) Name :- roatation Description :- Get status of rotation on/off. (74) Name :- rotatecenter Description :- Animate image rotation at center point. (75) Name :- screenorientation Description :- Get status of screen orientation landscape/portrait. (76) Name :- SdcardFormat Description :- Format sd card. (77) Name :- selectspeed Description :- Select speed ui txtsheild. (78) Name :- sendemail Description :- Send an email using intent. (79) Name :- share-bar Description :- Social Auth – custom UI. (80) Name :- share-button Description :- Social Auth – custom UI. (81) Name :- sharemyapp Description :- Share app apk from device. (82) Name :- signature Description :- Signature using image bitmap paint. (83) Name :- SimpleListView Description :- Simple listview demo. (84) Name :- smserrors Description :- Send sms and get various exceptions. (85) Name :- socialauth-android Description :- Social Auth demo. (86) Name :- Stopwatch Description :- Google Glass - Stopwatch. (87) Name :- SwitchButton Description :- SwitchButton toggle on/off demo. (88) Name :- textlink Description :- Text as a link url. (89) Name :- Timer Description :- Google Glass - Timer. (90) Name :- toggleButton Description :- Get status Toggle button on/off. (91) Name :- triangledrawable Description :- Draw triangle using drawable xml. (92) Name :- uninstallapp Description :- Uninstall app. (93) Name :- unknownsource Description :- Toggle on/off unknown source flag. (94) Name :- videodemo Description :- Simple video view to play rstp files. (95) Name :- videoviewdemo Description :- Video view to play Youtube files. (96) Name :- ViewPagerDemo Description :- Simple viewpager demo. (97) Name :- ViewpagerInDialogPopup Description :- View pager inside Dialog pop. (98) Name :- webviewnonxss Description :- You tube video play in webview using video id. (99) Name :- webviewyoutubeapi Description :- Simple video play in webview. (100) Name :- zoomtry Description :- Zoom in and zoom out animation.
fisothemes / TwinCat Dynamic CollectionsA TwinCAT library for creating and manipulating dynamic collections of data in TwinCAT. It provides multiple data structures such as ArrayList (a dynamic array), List (a doubly linked list that is optimized for sequential access and mutation), Set, Map, Queue, Stack and more. Examples are in the project.
rick2785 / JavaCodeI specifically cover the following topics: Java primitive data types, declaration statements, expression statements, importing class libraries, excepting user input, checking for valid input, catching errors in input, math functions, if statement, relational operators, logical operators, ternary operator, switch statement, and looping. How class variables differ from local variables, Java Exception handling, the difference between run time and checked exceptions, Arrays, and UML Diagrams. Monsters gameboard, Java collection classes, Java ArrayLists, Linked Lists, manipulating Strings and StringBuilders, Polymorphism, Inheritance, Protected, Final, Instanceof, interfaces, abstract classes, abstract methods. You need interfaces and abstract classes because Java doesn't allow you to inherit from more than one other class. Java threads, Regular Expressions, Graphical User Interfaces (GUI) using Java Swing and its components, GUI Event Handling, ChangeListener, JOptionPane, combo boxes, list boxes, JLists, DefaultListModel, using JScrollpane with JList, JSpinner, JTree, Flow, Border, and Box Layout Managers. Created a calculator layout with Java Swing's GridLayout, GridBagLayout, GridBagConstraints, Font, and Insets. JLabel, JTextField, JComboBox, JSpinner, JSlider, JRadioButton, ButtonGroup, JCheckBox, JTextArea, JScrollPane, ChangeListener, pack, create and delete files and directories. How to pull lists of files from directories and manipulate them, write to and read character streams from files. PrintWriter, BufferedWriter, FileWriter, BufferedReader, FileReader, common file exceptions Binary Streams - DataOutputStream, FileOutputStream, BufferedOutputStream, all of the reading and writing primitive type methods, setup Java JDBC in Eclipse, connect to a MySQL database, query it and get the results of a query. JTables, JEditorPane Swing component. HyperlinkEvent and HyperlinkListener. Java JApplet, Java Servlets with Tomcat, GET and POST methods, Java Server Pages, parsing XML with Java, Java XPath, JDOM2 library, and 2D graphics. *Created a Java Paint Application using swing, events, mouse events, Graphics2D, ArrayList *Designed a Java Video Game like Asteroids with collision detection and shooting torpedos which also played sound in a JFrame, and removed items from the screen when they were destroyed. Rotating polygons, and Making Java Executable. Model View Controller (MVC) The Model is the class that contains the data and the methods needed to use the data. The View is the interface. The Controller coordinates interactions between the Model and View. DESIGN PATTERNS: Strategy design patternis used if you need to dynamically change an algorithm used by an object at run time. The pattern also allows you to eliminate code duplication. It separates behavior from super and subclasses. The Observer pattern is a software design pattern in which an object, called the subject (Publisher), maintains a list of its dependents, called observers (Subscribers), and notifies them automatically of any state changes, usually by calling one of their methods. The Factory design pattern is used when you want to define the class of an object at runtime. It also allows you to encapsulate object creation so that you can keep all object creation code in one place The Abstract Factory Design Pattern is like a factory, but everything is encapsulated. The Singleton pattern is used when you want to eliminate the option of instantiating more than one object. (Scrabble letters app) The Builder Design Pattern is used when you want to have many classes help in the creation of an object. By having different classes build the object you can then easily create many different types of objects without being forced to rewrite code. The Builder pattern provides a different way to make complex objects like you'd make using the Abstract Factory design pattern. The Prototype design pattern is used for creating new objects (instances) by cloning (copying) other objects. It allows for the adding of any subclass instance of a known super class at run time. It is used when there are numerous potential classes that you want to only use if needed at runtime. The major benefit of using the Prototype pattern is that it reduces the need for creating potentially unneeded subclasses. Java Reflection is an API and it's used to manipulate classes and everything in a class including fields, methods, constructors, private data, etc. (TestingReflection.java) The Decorator allows you to modify an object dynamically. You would use it when you want the capabilities of inheritance with subclasses, but you need to add functionality at run time. It is more flexible than inheritance. The Decorator Design Pattern simplifies code because you add functionality using many simple classes. Also, rather than rewrite old code you can extend it with new code and that is always good. (Pizza app) The Command design pattern allows you to store a list of commands for later use. With it you can store multiple commands in a class to use over and over. (ElectronicDevice app) The Adapter pattern is used when you want to translate one interface of a class into another interface. Allows 2 incompatible interfaces to work together. It allows the use of the available interface and the target interface. Any class can work together as long as the Adapter solves the issue that all classes must implement every method defined by the shared interface. (EnemyAttacker app) The Facade pattern basically says that you should simplify your methods so that much of what is done is in the background. In technical terms you should decouple the client from the sub components needed to perform an operation. (Bank app) The Bridge Pattern is used to decouple an abstraction from its implementation so that the two can vary independently. Progressively adding functionality while separating out major differences using abstract classes. (EntertainmentDevice app) In a Template Method pattern, you define a method (algorithm) in an abstract class. It contains both abstract methods and non-abstract methods. The subclasses that extend this abstract class then override those methods that don't make sense for them to use in the default way. (Sandwich app) The Iterator pattern provides you with a uniform way to access different collections of Objects. You can also write polymorphic code because you can refer to each collection of objects because they'll implement the same interface. (SongIterator app) The Composite design pattern is used to structure data into its individual parts as well as represent the inner workings of every part of a larger object. The composite pattern also allows you to treat both groups of parts in the same way as you treat the parts polymorphically. You can structure data, or represent the inner working of every part of a whole object individually. (SongComponent app) The flyweight design pattern is used to dramatically increase the speed of your code when you are using many similar objects. To reduce memory usage the flyweight design pattern shares Objects that are the same rather than creating new ones. (FlyWeightTest app) State Pattern allows an object to alter its behavior when its internal state changes. The object will appear to change its class. (ATMState) The Proxy design pattern limits access to just the methods you want made accessible in another class. It can be used for security reasons, because an Object is intensive to create, or is accessed from a remote location. You can think of it as a gate keeper that blocks access to another Object. (TestATMMachine) The Chain of Responsibility pattern has a group of objects that are expected to between them be able to solve a problem. If the first Object can't solve it, it passes the data to the next Object in the chain. (TestCalcChain) The Interpreter pattern is used to convert one representation of data into another. The context cantains the information that will be interpreted. The expression is an abstract class that defines all the methods needed to perform the different conversions. The terminal or concrete expressions provide specific conversions on different types of data. (MeasurementConversion) The Mediator design pattern is used to handle communication between related objects (Colleagues). All communication is handled by a Mediator Object and the Colleagues don't need to know anything about each other to work together. (TestStockMediator) The Memento design pattern provides a way to store previous states of an Object easily. It has 3 main classes: 1) Memento: The basic object that is stored in different states. 2) Originator: Sets and Gets values from the currently targeted Memento. Creates new Mementos and assigns current values to them. 3) Caretaker: Holds an ArrayList that contains all previous versions of the Memento. It can store and retrieve stored Mementos. (TestMemento) The Visitor design pattern allows you to add methods to classes of different types without much altering to those classes. You can make completely different methods depending on the class used with this pattern. (VisitorTest)
maxalmonte14 / PhpcollectionsA set of collections for PHP.
chethiya / LdsMemory limits in v8 is limited to somewhere around ~1.7GB when it comes to Object and Arrays. LargeDS (LDS) tries to overcome this barrier by making use of Typed Arrays by defining basic data structure like Hashtables and ArrayLists
ahrtr / GocontainerImplements some containers (stack, queue, priorityQueue, set, arrayList, linkedList, map and btree) in golang
zcomert / Veri Yapilari Ve AlgoritmalarVeri Yapıları ve Algoritmalar dersinin kod deposudur.
marekweb / Datastructs CArraylist and Hashtable implementation in C
KrishGaur1354 / Java Projects For BeginnersHere, I will upload my Java Projects which are Useful especially if you're a Beginner or want code just to Practice.
larrydiamond / TypescriptcollectionsframeworkTypeScript Collections Framework - a port of the Java Collections framework for use with Angular
navjindervirdee / Data StructuresEasy implementation of various Data Structures in Java language. Red-Black Tree, Splay Tree, AVLTree, PriorityQueue, Doubly-Linked-List, Stack, Queue, Array, ArrayList, Disjoint-Set,Binary-Search Tree, B-Tree.
art-w / VarrayResizable arrays with O(ᵏ√N) insertion and deletion (Tiered Vectors)
longjiazuo / Data Structure Project自己实现集合框架系列整理总结
kdgyun / Data StructureNo description available
divaibhav / ObjectOrientedProgramming Module2 Practice QuestionsThis repository contains java practice problem on Exception handling, String, StringBuilder, StringBuffer, Wrapper classes, MultiThreading, Generics, Generic Mehtods, Collection, ArrayList, and HashSet
loukaspd / LinqArraylistLinq-like functions for Java Arraylist
tsriramanamanjarry / Arraylist No description available