Binpress components 2013-05-14T20:12:08+00:00 Zend_Feed_Writer http://www.binpress.com Binpress contact@binpress.com http://www.binpress.com <![CDATA[What word 4 Pics Starterkit for Android - Java | Android | Games & Entertainment]]> 2013-05-14T20:12:08+00:00 2013-05-14T20:12:08+00:00 http://www.binpress.com/app/what-word-4-pics-starterkit-for-android/1436 TedraSoft noreply@binpress.com http://www.binpress.comdev/profile/14695 An Android starterkit for building a word guessing puzzle game based on shown images. Add new levels and replace assets with little effort.What Word 4 Pics is a classic puzzle game where you have to find the word which best represents the four displayed images. This starerkit provides a working app which can be published with only replacing the assets with ones you own. Click on the demo button to see a published Google Play app which uses the source provided here. Features: Easy to expand with new levels. Every level has the options to remove up to 3 incorrect letter or display one correct letter by spending some coins Integrated with the RevMob Mobile ad network <![CDATA[Mother Generating Processes M.G.P - Java | Spring | System & Frameworks]]> 2013-04-11T14:40:39+00:00 2013-04-11T14:40:39+00:00 http://www.binpress.com/app/mother-generating-processes-mgp/1392 home noreply@binpress.com http://www.binpress.comdev/profile/9413 An automated program that launches automatically several samples of processes in more than one JVM and without human intervention. With M.G.P you can save yourself from the agony of waiting to start a computer program of some private or public business that you are operating.From the Various business requirements we face in building our programs, there are some needs to achieve. For example: 1) executing processes exactly at a specific date and time chosen by the user. 2) executing independents and parallels processes. 3) executing dependents processes of previous ones. 4) executing processes by order of completion. 5) continuing or quitting the program after a failure in the last executing process. 6) stopping a process after a failure. 7) dropping human intervention from the whole procedure. &quot;Mother Generating Processes&quot; or M.G.P shows an efficient simulation in which it accomplishes each of these needs by using Spring batch, an open source framework, for process running and also by using at runtime the execution method of processes each on a separate JVM. There are other components that offer similar solutions. Quartz is one of them. It utilizes Thread pool which is managed by a JVM, an Operating System and a CPU. Thread pool could cause problems like data corruption, bad performance, Dead-locks and others knowing that it preceded the Java platform. On the other hand, creating more than one JVM will save us from these high risks caused from the overload of threads. Also, having separate JVM&rsquo;s is easier when it comes to ending or killing a specific JVM without affecting the others. From a Software component view, M.G.P can be considered as a package that contains 6 Java classes represented by 1 main process, and 5 others automatically generated, each referenced by its own application context. This is the simulation I applied to clearly cover the most important scenarios that could be faced when dealing with scheduled jobs. This way other simulations could be applied by simply developing as many processes needed that will execute programs or even act as main processes for generating others and so on. Let us see more explanation in the Program documentation. <![CDATA[SuggestionList - Java]]> 2012-10-07T13:21:00+00:00 2012-10-07T13:21:00+00:00 http://www.binpress.com/app/suggestionlist/1159 Ng Jackie noreply@binpress.com http://www.binpress.comdev/profile/10689 A pluggable drop-down suggestion list primarily built for Swing text fields.SuggestionList is a drop-down list that filters a list of suggestions according to the content typed by the user. The suggestion list is attached to an instance of JTextField to serve to auto-complete a user's keystrokes. When more content than the specified minimum prefix length is typed, a popup is activated to display a list of candidate values on the bottom left of the text field. A separate model, SuggestionListModel, maintains the the source of data that supplies the suggestion list with its displayed contents. It is relatively easy to deploy the SuggestionList in your Swing applications. All you need to do is to merely provide a data source and bind the suggestion list to a JTextField. The API, in turn, automatically provides the UI logic implementations and integrates the component without the developer's intervention. In addition, the API features a number of methods to configure and customize the component for more specific purposes. Also, the library is Javadoc'ed, providing usage explanations to aid the developer. <![CDATA[Lucene full-text search Framework for Android - Java | System & Frameworks]]> 2012-09-24T14:30:54+00:00 2012-09-24T14:30:54+00:00 http://www.binpress.com/app/lucene-fulltext-search-framework-for-android/1147 TedraSoft noreply@binpress.com http://www.binpress.comdev/profile/14695 Lucene full-text search Framework for Android offers a rapid way to integrate and manage full text search in Android by using the best open source full-featured text search engine library – Lucene.Lucene full-text search Framework for Android offers a rapid way to integrate and manage full text search in Android by using the best open source full-featured text search engine library – Lucene. Features: Select which folders to index See processing status for indexed folders and files Schedule indexing activities in order to run these operations when phone is less used Fully functional for text files Search example provided Supports use of wildcards and fuzzy search How does it work? User selects a list of folders to index and schedule indexing (or uses default 00:30). When indexing occurs, application checks if any of the indexed files were removed from disk or updated, if any folders were removed from indexed folders list then removes associated indexed files from Lucene index, takes every folder selected for indexing and recursively process every subfolder and file in it. Files are processed by extracting text content and adding it to Lucene index. All info about indexed files and folders are kept in two tables in database. Remember that while choosing whole folders to index is better for user experience and this is the current approach it is also very simple to index simple files. Additional help info can be found in application’s manual (html file). What components does the Framework contain? The Framework contains a series of Android activities and support classes. You can use them together or individually. FullTextActivity – administration activity providing a point of access to Framework functionalities. From this activity you can access indexed files list, indexed folders list to add or remove folders, search for words in current indexed files, change schedule for indexing. Indexing occurs once a day. AlarmReceiver is started at scheduled time and IntentServiceIndex contains all the logic for processing folders and files for indexing. TextFileIndexer provides all the methods for using Lucene engine. The Framework indexes every file by extracting it’s text and adding a Lucene document with Field "contents” to the Lucene index. As it is the Framework indexes text files (it will search only in text files content). For the rest of files types you need to write your own text extractors. Some text extractors were written for : doc, docx, xls, xlsx, ppt, pptx, xml, pdf - but these are not included in the package (might be released as an addon). Of course, you can use TextFileIndexer independently of the scheduling part. FilesIndexedActivity contains the code for displaying a paginated statistic on all files already indexed. This info is kept in database ( see classes in com.tedrasoft.fulltextsearch.database and com.tedrasoft.fulltextsearch.model packages) FoldersIndexedActivity contains the code for displaying a paginated statistic on all folders selected for indexing. This info is kept in database ( see classes in com.tedrasoft.fulltextsearch.database and com.tedrasoft.fulltextsearch.model packages). AddFolderActivity is a folder selection component used to add new folders to indexed folders list SearchResultsActivity shows how a search on Lucene index can be handled and displays the results. Files found can be opened with default applications. <![CDATA[FileSelector for Android - Java | Android | User Interface]]> 2012-09-17T21:18:22+00:00 2012-09-17T21:18:22+00:00 http://www.binpress.com/app/fileselector-for-android/1136 TedraSoft noreply@binpress.com http://www.binpress.comdev/profile/14695 File \ Folder Selection component for Android projectsGeneral Info Many android projects require user to select one ore more files from the device. FileSelector is a simple and easy to integrate in your project allowing single or multiple selection of files and folders. Features: single activity (SelectFileActivity) which receives a starting folder in intent data and returns selection array in result. easy to configure single or multiple selection very simple integration (just copy a few lines of code as presented in instructions. <![CDATA[RadioStreams SDK for Android - Java | Android | System & Frameworks]]> 2012-06-11T05:58:40+00:00 2012-06-11T05:58:40+00:00 http://www.binpress.com/app/radiostreams-sdk-for-android/964 Mos IT Ltd. noreply@binpress.com http://www.binpress.comdev/profile/8699 The RadioStreams SDK is a radio streaming component for Android developers which simplifies the application development process while creating a radio/audio streaming app. Supports mp3, aac, aac+ and wma audio streams over http and mms protocols. Radio Streaming Framework for Android Software Developers. The RadioStreams SDK is a radio streaming component for Android developers which simplifies the application development process while creating a radio/audio streaming app. Can be integrated easily. Features Http and Mms protocols supported. Mp3, AAC, AAC+ and Wma audio streams supported. Parsing shoutcast & Icecast metadata. Works on Edge, 3G and WiFi. Simple integration. Contains full working sample. Disclaimer: RadioStreams SDK can play all WMA version 9 streams but most version 10 streams not supported. Disclaimer #2: Use of this software may require the payment of patent royalties. <![CDATA[Text Undo Manager - Java | System & Frameworks]]> 2012-05-31T03:17:17+00:00 2012-05-31T03:17:17+00:00 http://www.binpress.com/app/text-undo-manager/943 Ng Jackie noreply@binpress.com http://www.binpress.comdev/profile/10689 Flexible, concrete and natural undo-and-redo mechanism for your Swing text components.TextUndoManager is a library that provides natural undo-and-redo functionality for your Swing text components such as JTextField, JTextArea and JTextPane. It undoes blocks of character-based edits as a single edit unit at a time using a set of algorithms. The library comes with a number of useful functions that allow you to configure the undo-and-redo features. You can easily create a ready-to-use undo-and-redo mechanism for your text components with just a few lines of code and there's no further implementation work required on the developer's side. For the convenience of developers, the library package is fully Javadoc'ed. <![CDATA[HistogramData - Java | Performance]]> 2011-12-17T22:11:19+00:00 2011-12-17T22:11:19+00:00 http://www.binpress.com/app/histogramdata/663 Ralph Chapin noreply@binpress.com http://www.binpress.comdev/profile/510 Heavy duty storage and powerful algorithms for resource histograms and similar uses.This component handles and manipulates the data used to generate histograms and data charts for project management and ERP software, in order to provide high-performance, real-time display and manipulation of histograms. It tracks levels (such as resource usage rates, money spent, and available machines) over time, stores the data and provides an extensive set of methods to manipulate it. In the fields of Project Management (PM), Project Portfolio Management (PPM), Enterprise Resource Planning (ERP), etc., such data is usually stored in arrays where each element represents a fixed time period (hour, day, week). Memory and calculation time are wasted because each array element usually has the same value as all the elements near it. HistogramData replaces those arrays with a binary tree structure that is much faster and uses much less memory. There are many cases where this is useful or even critical: A value changes over time, and is stored as a set of levels, each with a start and end time. Levels do not normally change over brief time periods. The levels must be condensed, summarized, or otherwise processed to produce human-readable histogram charts. Multiple sets of levels (histograms) interact. HistogramData has tools to add these histograms together, subtract one from another, compare them, move them around in time, and do a lot else also. Expanding on these points with an example from Project Management: Consider the need to track available welders for a construction project, both for reporting purposes and to see what work can be done and when. On Monday there might be 5 available, on Tuesday 10, and on Wednesday 7. This information can be handled by a 3-element array. But if 3 extra welders are available for a couple of hours on Tuesday, the array must be in hours instead of days. Even assuming only 8 hours in a day, the array needs 24 elements. Further, the project may run for a year, so we need still more elements--2000 of them, actually--all with a value of zero. If work may be done outside regular hours, we need to triple the number of elements to handle evenings and nights. If we schedule in half-hour increments, we can double the number again. (If scheduling in minutes, multiply by 60.) All this wastes memory. Worse, the calculations must work through thousands of array elements, almost all with the same value. Histogram data stores this example's data simply and efficiently as five levels: 5 on Monday; 10, 13, and 10 on Tuesday; and 7 on Wednesday. The histogram of available welders would be created by adding together the availability histogram for each welder. When a welder is assigned to a task, those hours would be subtracted from this availability. A task will have requirements for welders (and other types of workers also) that look like availabilities, but that move in time depending on when the it starts. All in all, minor changes to data--task starts, worker availability, etc.--can result in major changes in many resource histograms. HistogramData's speed, efficiency, and powerful methods let all this work be done in an interactive system without making the user wait. Features Beyond Project Management: Generally useful features. Tracks availabilities, usages, requirements, etc. of individual people, groups of people, machines, materials, and money over time. Uses sparse-array techniques so that long periods at a constant level (such as zero or one) do not use up memory or calculation time while still allowing minute-by-minute level changes. Summarizes or condenses intricate usage-level patterns for use in histogram displays. Adds histogram data together to produce a new summary histogram. Subtracts one histogram from another to show how much of the resource is left--and when it is left--after some is used on a particular job. Compares one histogram with either a constant level or another histogram to let you know if you have too much or too little--and when you have too much or too little. For Project Management: Features most likely to be of interest to people doing Project Management. Distinguishes between null levels and zero levels. This allows the data to be treated as a pattern--a simple set of working periods--or the TimePeriods interface referred to in the ResourceTable documentation below. Imposes TimePeriods patterns on histogram data. Take a histogram with 8 hours at level 4 followed by 8 hours at level 5. Impose an 8-hour-a-day pattern on it. The result is a histogram with a level of 4 from 9:00AM to 5:00PM on the first day, a level of 5 on the same period the second day, and a null level in between (from 5:00PM to 9:00AM). Uses work calendars. (These are mostly-cyclical patterns used extensively in Project Management systems to specify work weeks, work hours, holidays, vacations, etc.) HistogramData, as written, uses 4 byte integers for time. This allows a 4000 year time span, where the level can change from minute to minute. These numbers are used extensively in calculations, and using an "int" rather than a "long" or "double" saves space and speeds processing. 8 byte integers are used for the levels themselves. These numbers are used in calculations much less than the dates, so performance is not such a problem. While in most cases the numbers are small, often being one or zero (or null), they can represent materials or money. (With money accountants get very concerned if a multi-billion dollar amount is off by a penny, so floating point numbers cannot be used.) Changing types for times and levels to optimize HistogramData for non-resource-management uses, would be a simple job, but might take a little bit of time. Summary Condenses and combines resource histogram data for display and compares data to spot opportunities and problems. Stores the data in ways that use minimal memory and enable fast calculations. Scales up effortlessly for large histograms, large numbers of histograms, and extensive interactions between histograms. HistogramData was originally written to handle Resource Management for a Project Management system (rather like Microsoft Project). It is fully Javadoc'ed. It includes the SortedList component (which is also sold separately). Three programs are included: one simple usage example (also shown below) and two complex examples/tests. Author's Note I spent over twenty years working in Project Management algorithms. Resource histograms presented unending problems. I spent most of those twenty years thinking about a solution. When I found myself with time to start from first principles and do it right I wrote ResourceTable, the core class in HistogramData. Certainly any Project Management system needs this class, or one like it. I think it must be useful in many other fields as well, and I hope my Project Management examples and terminology explain rather than obscure the fundamental ideas and capabilities. --Ralph Chapin <![CDATA[aFileChooser - Java | Android | System & Frameworks]]> 2011-11-26T22:24:15+00:00 2011-11-26T22:24:15+00:00 http://www.binpress.com/app/afilechooser/647 Paul Burke noreply@binpress.com http://www.binpress.comdev/profile/6213 Android library that provides a file explorer to let users select files on "external" storage.(Complete rewrite 11/2012) Android developers often desire a way to present a user with a method of selecting a file from "external" storage. Android's Intent system gives developers the ability to implicitly hook into other app's components, but if the user doesn't have a file explorer installed, the developer must instruct them to install one, or build one, themselves. aFileChooser is an Android Library Project that simplifies this process. Features: Provides a built-in file explorer Streamlines the Intent.ACTION_GET_CONTENT Intent calling process Easily convert a URI into s java File object Determine MIME data types Follows Android conventions (Fragments, Loaders) and is extremely simple to implement Instructions Full installation instructions can be found at GitHub. <![CDATA[AsyncMvp - Java | Android | System & Frameworks]]> 2011-11-21T08:18:49+00:00 2011-11-21T08:18:49+00:00 http://www.binpress.com/app/asyncmvp/640 Yaroslav Sivokhin noreply@binpress.com http://www.binpress.comdev/profile/6216 Asynchronous message-based module system base on an MVP templateAndroid AsyncMvp framework helps to create module system base on MVP template and message-based architecture. Framework includes core module and helping modules: Saving user preferences Exchanging information with client server on HTTP 2-level cache Quick identification of a user's location You can find source and example also on Github <![CDATA[SortedList - Java | Performance]]> 2011-08-16T15:03:33+00:00 2011-08-16T15:03:33+00:00 http://www.binpress.com/app/sortedlist/548 Ralph Chapin noreply@binpress.com http://www.binpress.comdev/profile/510 Is your Java project getting lost in giant lists? This high performance threaded binary tree is the answer.Provides fast random and sequential access to vast sorted lists. Creates and maintains them with unmatched ease, speed and flexibility. Simultaneously provides the benefits of a binary tree and a linked list. You can find an entry with a keyed, binary-style search, then move sequentially in either direction (or both directions) from that point. You can do adds and removes at any point. Finds entries rapidly by key. Can find the highest value less than a key or the lowest value greater than a key. You can use multiple keys if they produce the same sort order. You can find a row by index number and then find a row by name with no need to resort the list or do other real work. Given any entry, you can always get the next and previous entries. Removes and updates can be done freely with no need for an iterator or a keyed find. Great for use with the rows in JTable's and JList's. A SortedList entry can be part of another structure. It can be located through that structure and either removed directly from the SortedList or used to view the SortedList sequentially in either direction (or both directions). Sequential searches are fast in both directions. Given attendance numbers at a theater, sorted by date, you can quickly determine the start and end of an attendance dip. (Find a date in the dip and scan in both directions for the first entries with normal attendance.) Excellent for sparse array storage. If theater attendance numbers (above) are stored by 100's and attendance is steady, each entry can store a whole string of days with the same number (between 200 and 300, say). One sequential step can move ahead 50 days instead of just one. (This feature is apt to be more important for engineering and scientific applications.) Works fine with small lists too. A million SortedLists with 10 entries each use no more memory than 10 SortedLists with a million entries each. So there are no awkward moments when a 10-entry list gets an unexpected 999,990 new rows, and no wasted memory when a million-entry list loses 999,990 rows. All source code is thoroughly Javadoc'ed. Huge Display Table Performance A simple use for SortedList is holding data for display tables. It can do quick finds on indexes and do rapid sequential updates to reset the index numbers when adds and deletes are done. The following indicates the typical performance: Times were obtained on an ancient machine. Your results will be better. java.util.TreeMap is used for comparison. One million rows of random data, sorted on the way in, were added to a list, then numbered. The result was a displayable list. Next 10 rows were added in the middle and all the index numbers in the second half of the list upped by 10. The list was again displayable, but with 10 rows out of sort order. Then everything was resorted and the list completely renumbered. It was again displayable. Finally, 100,000 random finds were done against the list. (Sample source code for an actual JTable application is included below.) Times in Seconds SortedList TreeMap Fill the table, sort, and number: 34.840 38.505 Add 10 rows and adjust 500,000 indexes: 0.140 0.421 Resort mostly ordered table: 0.922 18.246 Renumber table: 0.270 2.344 Find 100000 random indexes: 1.052 0.620 This shows that SortedList can both add a row to a large list and resort the list fast enough that a user will not notice a delay--with a million rows on a P4, 1.0 GHz, 512MB Dell. Note the time to renumber the table. The ability of a threaded binary tree to blast through a list sequentially lets it do other time critical work as well.. Notes on java.util.TreeMap: Two TreeMap instances were needed, one to handle the row sort and one to handle the index sort; it was rather more complicated to use than Sorted List. SortedList, aside from being easier, sorts ordered data much faster. It also is much faster with sequential updates. (But TreeMap does do faster finds.) Notes on java.util.ArrayList:: In my test ArrayList was by far and away the winner in everything but the sorts. (It was not worth showing the numbers.) However, large arrays can cause memory fragmentation if you repeatedly allocate and deallocate space for them. And ArrayList will allocate space on its own initiative, and most sorts will too. If you use arrays and are continually creating and disposing of display tables (with lots of rows) you are likely to have your system hang, use a lot more memory than necessary, and even produce out-of-memory exceptions. Worse, this behavior will be annoyingly random. Usage case: Histograms The toughest job for SortedList was histograms. These were not pretty displays; they were used for tracking work loads. The minimum time span was a minute, and the time span of a histogram could be years. There were a lot of these histograms, and they added to be added, subtracted, multiplied, divided, merged, aligned, summarized, synchronized, pattern-matched, etc., etc., etc. SortedList allowed me to merge many minutes into one entry, which as few levels lasted only one minute, most lasted hours or days, and some lasted years saved immense amounts of space while still allowing detail where it was needed. I could jump to the relevant date in a list and then work sequentially, rearranging the levels as I went. (This rearranging meant removing some entries, changing the time span on others, adding to entries, and changing the levels on almost all of them.) Usage case: Tracking List Selections Using SortedList on this problem was overkill, but I have had similar big problems where SortedList was the only thing that could do the job. The critical feature in all cases was the ability to have two sort keys (which both resulted in the same sort) and to be able to do finds based on either with no cost for the switch. I tracked row selections in a JTable by storing each continuous set of selected rows in a SortedList entry which comprised a starting row and the number of rows selected--plus the starting row number counting only selected rows. If rows 3, 6, 7, 8, 9, 12, 13, and 17 were selected, the list would look like this: row # sel # count 3 0 1 6 1 4 12 5 2 17 7 1 Note that while the two start row numbers could be wildly different, they would always sort the entries in the same order. A find on a normal row number could quickly gives the selected row number. Likewise, a find on a selected row number quickly gives the normal row number. A <= find on row 10 gives the second entry, which indicates (6 + 4 - 1 < 10) that row 10 is not selected. A <= find on selected row 6 gives the third entry, which indicates (12 + 6 - 5 = 13) it is the 13th row in the list. TTreeMap SortedList uses internal linkage, which helps performance and makes everything simpler. However, it also means that entries in a SortedList must extend SortedListNode. Objects that cannot cannot be used in a SortedList. Also, objects already in one such list cannot be used in another. The TTreeMap class solves this problem. It uses SortedList to create a java.util.Map implementation that works almost as well as a SortedList. The disadvantage of TTreeMap is that it does require an iterator to traverse the list. The advantage is that this iterator is a full-feature java.util.ListIterator, allowing movement in either direction. Also, TTreeMap allows adds and deletes while the ListIterator is in use. (Some care must be used not to delete the iterator's current entry.) Performance SortedList uses carefully worked out algorithms to keep its binary tree balanced and efficient. Adds (for data in random order) and deletes are marginally slower than with an ordinary binary tree, such as Java.util.TreeMap, simply due to the additional pointers for for the threads--which provide dramatically better sequential access. Adds where the data is already sorted, almost sorted, or sorted in reverse order are very fast. The table in the "Huge Display Table" section shows this. Two sample programs are included as an example of a java.util.TableModel implementation, one using SortedList and the other TTreeMap. Three test/timing programs are also included. SortedList is not thread-safe, but can be used in a read-only manner across multiple threads. <![CDATA[Observer3D - Java | User Interface]]> 2011-07-14T16:09:32+00:00 2011-07-14T16:09:32+00:00 http://www.binpress.com/app/observer3d/524 Ralph Chapin noreply@binpress.com http://www.binpress.comdev/profile/510 Use the mouse to move over Java 3D landscapes.Observer3D moves the view over terrain in Java 3D 1.5.2 based on mouse movements. It is designed for use with open ground (as opposed to deep space, air, underwater, caverns, and other indoor spaces). It was written originally for a fast-paced game, and so had to be highly responsive and intuitive to enable the user to focus on and control the action. (In other words, it had to let the player focus on the action rather than on the view controls.) It replaced com.sun.j3d.utils.behaviors.vp.OrbitBehavior when the user was working with a landscape and its contents. It extends javax.media.j3d.Behavior. The viewing angle is limited to a 90 degree vertical rotation, from horizontal to straight down. The view's vertical position is always positive (above ground). A left button drag moves the view left and right and forward and back. A right button drag moves the view up, down, left, and right on a hemisphere around the point on the ground being observed. A left button drag with the control key pressed swivels the view up, down, left, and right without moving the viewer. The mouse wheel zooms in and out. With the control key down, it takes the view straight up and down without changing the view angles. The result is highly intuitive motion and a stable view. A listener class is provided with mouse actions to allow the code using Observer3D to react to clicks and mouse movement. A method is provided to identify objects in the scene that have been clicked on or that the mouse is hovering over. There is also a method to locate the ground that is visible in the 3D view. A sample program is included with the source code that demonstrates mouse clicks, labels on objects the mouse is hovering over, and pop-up menus. It has a 2D map with the area visible in the 3D view outlined in orange. It also demonstrates the ease of maneuvering over the terrain. (This example would be a quick way for a beginner to get started with 3D programming, but be sure to get hold of Java 3D 1.5.2 first.) Observer3D requires Java 3D, version 1.5.2. It is thread safe. It is fully Javadoc'ed.