Das JAVA-Hilfe Blog und mehr

Java, Hibernate, Spring, Closure, Vaadin, Liferay, WebServices, MySQL, Oracle, C++, Linux, Tutorials

Menu
  • Startseite
  • About

Tag: List

MySQL: List all Contraints on a Table

By PatrickO
|
21. April 2015
| Keine Kommentare
| MariaDB, MySQL

Sometimes it is useful to show all your constraints, you have set on a Table in your Database. To achive this, type the following statement SELECT DISTINCT(constraint_name) from information_schema.table_constraints where constraint_schema = “ order by constraint_name ASC; MySQL should return a list like this, depends on your constraints +————————+ | constraint_name | +————————+ | bugsnumk […]

Read More »

Posted in MariaDB, MySQL Tagged DISTINCT, List, List all Constraints, MariaDB, MySQL, Schema, Table Leave a comment

Groovy: Using head(), last(), tail() and init() Methods on Collections

By PatrickO
|
1. März 2015
| Keine Kommentare
| Groovy

Groovy gave us, since version 1.5.5 the methods head() and last(), tail() since version 1.5.6 to get the head or the last element of a Collection, with tail() you’ll get all but the head element and in version 2.4 there was a new method introduced, which is called init(), with this you get all elements […]

Read More »

Posted in Groovy Tagged 2.4.1, Collection, Dependency, example, Groovy, head(), init(), last(), List, Maven, tail() Leave a comment

Groovy: The GDK adds pop() and push() Methods to our Java Collections

By PatrickO
|
1. März 2015
| 1 Kommentar
| Groovy

With this two methods we can easily create a Stack based on a Collection, like in my following example: // let’s define a stack with some elements on it def stack = [„Anton“, „Karl“, 12, 42, 4711, „SSP“, „Tutorial“, „PatrickO’s Tutorials“, 19.23] // check the size of our stack, should be 9 assert stack.size() == […]

Read More »

Posted in Groovy Tagged Collections, GDK, great, Groovy, List, Object value), pop(), push(Object value), pushAt(int idx, Stack 1 Comment

Groovy: Sorting a List of Strings

By PatrickO
|
28. Februar 2015
| Keine Kommentare
| Groovy, Java

Today i want to show the advantages of using Groovy to sort a list of Strings alphabetically. First i want to show how to do it in Java < 8 and the Java8 Way, then i'll give an example of the Groovy way. package workingwithstrings; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; public class […]

Read More »

Posted in Groovy, Java Tagged comparator, DefaultGroovyMethods, great, Groovy, List, simple, simplify, sort, String, StringComparator Leave a comment

Java: Compare two ArrayLists and their items

By PatrickO
|
24. April 2014
| Keine Kommentare
| Java

The Domain class Location /* * Copyright 2014 Patrick Ott . * * Licensed 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law […]

Read More »

Posted in Java Tagged ArrayList, compare, equals, generics, Java, List, Location Leave a comment

Java: Create your simple own phonebook

By PatrickO
|
10. März 2014
| 1 Kommentar
| Java

This was a question on SO, so here is a first solution: The Result shoul look like this: Entry [firstName=Peter, lastName=Pan, areaCode=+49, phoneNumber=123569878] Entry [firstName=Heidi, lastName=Klum, areaCode=+49, phoneNumber=78644567] Entry [firstName=Max, lastName=Mustermann, areaCode=+49, phoneNumber=47110815] Entry [firstName=Rumpel, lastName=Stilzchen, areaCode=+49, phoneNumber=1458765] Entry [firstName=Moritz, lastName=Mustermann, areaCode=+49, phoneNumber=87652345] The Code: package de.professional_webworkx.blog.phonebook.model; public class Entry { private String firstName; private […]

Read More »

Posted in Java Tagged Eclipse, Entry, Java, List, PhoneBook, Stack 1 Comment

C++: Definition einer generischen Klasse

By PatrickO
|
31. Dezember 2013
| Keine Kommentare
| C++

Damit wir in C++ auch eine tolle Liste zur Verfügung haben, die wir für verschiedene Datentypen einsetzen können, nachfolgend eine Idee, für solche eine Liste. /* * classtemplates.cpp * * Created on: 31.12.2013 * Author: ottp */ #include #include using namespace std; template class List { public: T list[10]; void add(int idx, T t) { […]

Read More »

Posted in C++ Tagged add, C++, cpp, generische Liste, get, List Leave a comment

JavaEE: search expressions with XPath

By PatrickO
|
31. März 2013
| Keine Kommentare
| JavaEE

Try the sample code and search for the title of all books, which are listed within the books.xml file. package de.professional_webworkx.jee6.booksxpath; import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.List; import org.jdom2.xpath.*; import javax.xml.parsers.SAXParserFactory; import org.jdom2.Document; import org.jdom2.Element; import org.jdom2.JDOMException; import org.jdom2.input.SAXBuilder; public class SearchBookTitle { public static void main(String[] args) { try { // get […]

Read More »

Posted in JavaEE Tagged Element, Expression, Iterator, Java, JDOM, List, XPath Leave a comment

Neueste Beiträge

  • JBoss: Start/Stop only one Server in Cluster with JBoss CLI
  • Apache Solr: query your Solr instance via cURL
  • Oracle: Update Table with Replace Function
  • Oracle SQL: Select a Java Long and convert it to formatted date in SQL Statement
  • Pentaho DataIntegration crashes on Startup on Ubuntu 14.04

Blogroll

  • About the author

Whoxy – great Whois Api

whois api

Network Profiles


profile for Patrick at Stack Overflow, Q&A for professional and enthusiast programmers

Like me on Facebook

Neueste Kommentare

  • andrea bei JavaEE: Open Liga DB – letzte Begegnung pro Liga anzeigen
  • PatrickO bei SugarCRM: Remove Null Fields in Studio – second solution
  • arun bei SugarCRM: Remove Null Fields in Studio – second solution
  • PatrickO bei JavaFX: create a ContextMenu on a ListView
  • Walter Kehl bei JavaFX: create a ContextMenu on a ListView

Archive

  • September 2017
  • Mai 2017
  • April 2017
  • März 2017
  • Februar 2017
  • Januar 2017
  • Dezember 2016
  • September 2016
  • August 2016
  • Juni 2016
  • Mai 2016
  • April 2016
  • März 2016
  • Februar 2016
  • Januar 2016
  • Dezember 2015
  • November 2015
  • Oktober 2015
  • September 2015
  • August 2015
  • Juli 2015
  • Mai 2015
  • April 2015
  • März 2015
  • Februar 2015
  • Januar 2015
  • Dezember 2014
  • November 2014
  • Oktober 2014
  • September 2014
  • August 2014
  • Juli 2014
  • Juni 2014
  • Mai 2014
  • April 2014
  • März 2014
  • Februar 2014
  • Januar 2014
  • Dezember 2013
  • November 2013
  • Oktober 2013
  • September 2013
  • August 2013
  • Juli 2013
  • Juni 2013
  • Mai 2013
  • April 2013
  • März 2013
  • Februar 2013
  • Januar 2013
  • Dezember 2012
  • November 2012
  • Oktober 2012
  • September 2012
  • Juli 2012
  • Juni 2012
  • Mai 2012
  • April 2012
  • März 2012
  • Januar 2012
  • Dezember 2011

Kategorien

  • Alfresco
  • Allgemein
  • Android
  • AngularJS
  • Ant
  • Apache Foundation
  • Apache Traffic Server
  • Apple
  • Applicationserver
  • ArangoDB
  • Automation
  • BDD
  • Build Tools
  • C++
  • CentOS
  • Chef
  • CI-Server
  • Cisco
  • Container
  • CRM
  • Cucumber
  • Datenbanken
  • DBUnit
  • Debian
  • Docker
  • Eclipse
  • ElasticSearch
  • ExpressJS
  • GeoInfSysteme
  • Gimp
  • Grails
  • Groovy
  • Hibernate
  • IDE
  • Installation
  • JasperSoft Studio
  • Java
  • Java APIs
  • JavaEE
  • JavaFX
  • JavaScript
  • jBOSS
  • JBoss
  • Jenkins
  • JMeter
  • JMS
  • JPA
  • jQuery
  • JSON
  • Leaflet.JS
  • LibreOffice
  • Liferay
  • Linux
  • Liquibase
  • MacOS
  • MariaDB
  • Maven
  • Messaging
  • Microsoft Windows Server
  • mobile Geräte
  • MomentJS
  • Motorola XOOM
  • MySQL
  • Neo4J
  • Network
  • Nginx
  • NodeJS
  • NoSQL
  • Objektorientierte Programmierung
  • Off Topic
  • Office Tools
  • OpenLayers
  • OpenUI5
  • Oracle
  • OrientDB
  • Pentaho
  • Pentaho Report Designer
  • Pentaho Report Designer
  • Perl
  • PHP
  • PostgreSQL
  • Primefaces
  • prozedurale Programmierung
  • Puppet
  • Python
  • Raspberry Pi2
  • React
  • Reporting
  • RMI
  • Scriptsprachen
  • Search Engines
  • Security
  • Servlet
  • Software
  • Solr
  • SonarQube
  • Sortieralgorithmen
  • Spring
  • Spring MVC
  • SpringBoot
  • Stackoverflow
  • Stylesheets
  • Subversion
  • Subversion
  • SugarCRM
  • SuiteCRM
  • Swift
  • Testtools
  • Tomcat
  • Tomcat
  • Ubuntu
  • Ubuntu Server
  • Ubuntu Snappy
  • VCS
  • Velocity
  • Versioncontrol
  • VI Java Api
  • Virtualisierung
  • Webserver
  • WebServices
  • Wildfly
  • Startseite
  • About

Powered by WordPress. AwesomeOne theme by Flythemes