Programming

One of the other marooned orphans thanks to Oracle‘s decision to delay the already 1.5 year Java 8 release is the changes to the date time functions in the JDK. I know what you are thinking. That should have been fixed a decade ago...
One of the other marooned orphans thanks to Oracle‘s decision to delay the already 1.5 year Java 8 release is the changes to the date time functions in the JDK. I know what you are thinking. That should have been fixed a decade ago. In the meantime, I was constructing dates and decided to make a builder so I could chain calls like this: Date newDate = new DateBuilder().day(1).month(1).year(2013).hour(12).minutes(49).build(); Made a Gist out of it on GitHub, here. Of course there are more things that could be added to this, but it makes code easier to read.
27 minutes ago
Like most content management systems, PyroCMS uses front-end themes. Though PyroCMS themes are built a bit differently than what you might be used to from other systems, they’re still quite easy to create. They’re so easy, in...
Like most content management systems, PyroCMS uses front-end themes. Though PyroCMS themes are built a bit differently than what you might be used to from other systems, they’re still quite easy to create. They’re so easy, in fact, that very little PHP experience is required to assemble them!The Folder StructurePyroCMS themes consist of HTML, images, CSS, and JavaScript, arranged into the following supported folders: css img js views views/layouts views/partials views/modulesWhile these folders will no doubt look familiar to you, the "views" folder makes the most sense within the context of MVC. When building a theme for PyroCMS, you are really building the views (including assets) of a MVC patterned application. These views consist of a master layout file and multiple partial files (i.e. a header.html or footer.html) that shares presentation logic between different layouts. We’ll discuss this more shortly.Getting StartedTo get started building your first PyroCMS theme, create the supported folder structure in one of the two places that themes may reside within an instance of PyroCMS:addons/shared_addons/themes (for themes available to all sites) Or: addons/[site-name]/themes (for themes available to only one specific site) Once you have the base theme folder containing the supported folder structure created, the first file that you'll want to add to your theme is theme.php.addons/shared_addons/themes/[my-theme-name]/theme.php This theme.php file contains all essential details for your theme, including its name, author, version, etc. In a way, this file is similar to the comment block found at the top of a WordPress theme's style.css file. Here’s a basic example of a theme.php file for your PyroCMS theme:Please take note that this file extends a PyroCMS class, called Theme. Also, because you are declaring a PHP class in this file, you'll need to make sure that the name of the folder containing your theme is used in the class declaration. So, if the folder housing your theme is called, "foo," the class created in your theme.php should be named, Theme_Foo (instead of Theme_Custom, as shown in the example within PyroCMS' documentation).Once you have created your theme.php file, you can login to your PyroCMS control panel and view your theme listed in the Themes module. LayoutsAll layouts files for a PyroCMS theme exist in one of two locations:addons/[site-ref]/themes/[my-theme-name]/views/layouts/ Or: addons/shared_addons/themes/[my-theme-name]/views/layouts/ Every theme should have a layout file, named "default.html" in one of the locations listed above. Additional layout files are optional; I'll show you how to add more layout files in a moment. First, it’s important to review the contents of a layout file.Layout files in PyroCMS are built using HTML and a tag parser, referred to as the Lex Tag Parser. This is what a very basic PyroCMS layout file looks like: {{ template:title }} {{ template:metadata }} {{ template:title }} {{ template:body }} The special tags you see in this bit of HTML are Lex parser tags. If you've ever used Smarty templates in PHP, these may look somewhat familiar. The primary benefit to using Lex parser tags in your layout files is that you don't have to put PHP directly in your views (remember, we're using MVC), which gives you the best chance of creating PyroCMS themes that follow the don’t repeat yourself pattern.The example that I've given above is simple, of course, but Lex parser tags are quite powerful. They can loop through data, work with attributes, and more. Learn more about the Lex Parser in the PyroCMS documentation.A more complex PyroCMS layout file looks like this: {{ template:title }} {{ template:metadata }} {{ theme:favicon file="favicon.png" }} {{ theme:css file="style.css" }} {{ theme:js file="site.js" }} {{ theme:im
32 minutes ago
For this showcase we used one of the predefined HTML5 Parallax Slider designs and used four text and image elements that slide with different duration in order to create this amazing 3D depth illusion.
For this showcase we used one of the predefined HTML5 Parallax Slider designs and used four text and image elements that slide with different duration in order to create this amazing 3D depth illusion.
33 minutes ago
Parallax Sliders has been pretty popular among web designers recently. They move multiple elements at the same time but at different speed and create an astonishing 3D movement effect on the website. DMXzone's HTML5 Parallax Slider is ex...
Parallax Sliders has been pretty popular among web designers recently. They move multiple elements at the same time but at different speed and create an astonishing 3D movement effect on the website. DMXzone's HTML5 Parallax Slider is exactly what you need to divide your content into different slides and add multiple elements in each one, no matter images, text, videos or any HTML content. Check out today's showcase below and see how awesomely it looks.
34 minutes ago
Atlassian shut down JavaBlogs the original go-to blog aggregator for Java.
Atlassian shut down JavaBlogs the original go-to blog aggregator for Java.
35 minutes ago
For this post, I’m using Windows 8 WinJS as the vehicle. However, this approach is applicable by any method that implements an XMLHttpRequest. Here’s the scenario: you have an application with several images and those images ...
For this post, I’m using Windows 8 WinJS as the vehicle. However, this approach is applicable by any method that implements an XMLHttpRequest. Here’s the scenario: you have an application with several images and those images are stored on a remote server. The sources of each image is something like http://someserver.com/myimage.png. Looking at a Windows 8 store app as an example, the good news is that your page will display immediately. Your images may display immediately. Or more likely, they will begin to display after the page has loaded. You may see the images incrementally appearing. This does not make for a good user experience. The good news is that WinJS implements the Promise Pattern and XMLHttpRequest via the WinJS.xhr object. This means we can pre-fetch images and resolve them to blob URL’s and then bind our UI to the blob URL instead of the raw image url. Using a stock WinJS Navigation Project, the following code is placed in the app.addEventListener(“activated”, function (args) {} handler: var promises = []; //Load the blob for the default image in the event a specified image URL does not work. WinJS.xhr({ url: "images/no-available-image.png", responseType: "blob" }).done(function (data) { var noImageBlob = URL.createObjectURL(data.response); //The imageResults.json file is a static result from the Bing Images API. WinJS.xhr({ url: "js/imageResults.json" }).done(function (data) { var results = JSON.parse(data.responseText); //Loop through the results to create the promise array. results.d.results[0].Image.forEach(function (element, index, array) { promises[index] = WinJS.xhr({ url: element.MediaUrl, responseType: "blob" }) .then(function (e) { //When the promise executes, an imageBlob property is created //holding the image blob URL results.d.results[0].Image[index].imageBlob = URL.createObjectURL(e.response); }, function error(e) { //If an error occurs when trying to retrieve the image //the No Image BLob URL created on line 28 is used instead results.d.results[0].Image[index].imageBlob = noImageBlob; }); }); //The join method kicks off the promises handed to it. //The promises can run in any order and finish at any time. //The done event for the join method fires after all of the promises //in the promise array have been fulfilled. WinJS.Promise.join(promises).done(function (e) { //Need to create a global namespace to hold a reference //to the images array. To facilitate data binding, //the WinJS.BindingList method is invoked, passing the //image array. WinJS.Namespace.define("ImageList", { Images: new WinJS.Binding.List(results.d.results[0].Image) });; //Now that all of the pre-processing has occurred, we can now //navigate to the home page that displays the images. if (app.sessionState.history) { nav.history = app.sessionState.history; } args.setPromise(WinJS.UI.processAll().then(function () { if (nav.location) { nav.history.current.initialPlaceholder = true; return nav.navigate(nav.location, nav.state); } else { return nav.navigate(Application.navigator.home); } })); }); }); ); JavasScript, being a dynamic language, we can simply augment the object from the parsed JSON. In this example, I used a static file from the Bing Image Search API. You will have to conform the object references to the specific API you are working with. In the previous code, we wait until all of the images have been fetch. In an async world, this can be a challenge. We don’t know what order the requests will be processed. In some cases, a server status 500 could result. This approach affords us an op
about 1 hour ago
It's being reported Yahoo bought Tumblr for $1.1 billion. You may recall Instagram was profiled on HighScalability and they were also bought by Facebook for a ton of money. A coincidence? You be the judge. Just what is Yahoo buying? The...
It's being reported Yahoo bought Tumblr for $1.1 billion. You may recall Instagram was profiled on HighScalability and they were also bought by Facebook for a ton of money. A coincidence? You be the judge. Just what is Yahoo buying? The business acumen of the deal is not something I can judge, but if you are doing due diligence on the technology then Tumblr would probably get a big thumbs up. To see why, please keep on reading...
about 1 hour ago
Sponsored and paid for by CipherPoint. New Software Expands Addressable Market and Helps Organizations Identify Security and Compliance Risks CipherPoint™ announces Version 1.9 of the company's CipherPointSP software, bringing the co...
Sponsored and paid for by CipherPoint. New Software Expands Addressable Market and Helps Organizations Identify Security and Compliance Risks CipherPoint™ announces Version 1.9 of the company's CipherPointSP software, bringing the company's transparent encryption technology to users of SharePoint 2013 and to file server environments. In addition, the company released the CipherPointCS content scanner. The new CipherPoint software capabilities include: File Server Encryption: A new agent, CipherPointFS™, is available providing transparent encryption for unstructured content in file servers. This new capability builds on CipherPoint's unique offerings for encryption and key management, bringing this functionality to users of file servers. ;Support for SharePoint 2013: CipherPointSP Enterprise now includes support for SharePoint 2013 environments, in addition to the previously supported SharePoint 2007/2010. ;CipherPointCS™ content scanner: CipherPoint has released an improved version of our content scanner, CipherPointCS. The new release provides improved accuracy with respect to false positives. CipherPointCS allows SharePoint and IT security administrators to easily scan SharePoint repositories, and find sensitive and compliance regulated information such as Social Security Numbers and Credit Card data.  This collection of new capabilities greatly expands the coverage that CipherPoint provides for protecting unstructured data. CipherPoint can now encrypt and control access to data in SharePoint 2007, 2010, and 2013 sites, and in file servers. CipherPoint can also scan and find sensitive and compliance-regulated data in these environments. All of these products are available now. Contact CipherPoint for pricing. "Broadening support for unstructured data encryption to include file servers and SharePoint 2013 makes a lot of sense for Logicalis and our customers" said Patrick Simmons, Consulting Director at Logicalis. "Having a best of breed transparent encryption capability for these new platforms, plus having a content scanning product, will help us to find and secure sensitive and regulated data in customer environments." "CipherPoint's customers have asked us to extend our platform coverage to include SharePoint 2013 and file servers" said Mike Fleck, CipherPoint CEO. "In addition, we've improved our content scanner technology to include the feedback we received during the public Beta program. The combination of releases expands the ability of our customers to quickly and easily identify sensitive and regulated content in file sharing and collaboration environments like SharePoint and file servers." For more information on CipherPoint's transparent encryption solutions, please visit: https://www.cipherpoint.com/data-security/ About CipherPoint Software, Inc. CipherPoint secures sensitive and regulated content in web-based application environments including premise-based collaboration platforms such as Microsoft SharePoint, cloud, and other web-based applications.  CipherPoint's transparent data encryption technology secures content and data from the web tier, affording the highest level of threat protection to sensitive and regulated content. CipherPoint's products are easy to deploy and manage, secure, and scalable to meet the needs of large enterprises. Headquartered in Denver, Colorado, CipherPoint was founded by IT security experts with deep experience in building successful security technology companies. Customers in healthcare, financial services, manufacturing, government, and other industries, in Europe, North America, and Asia rely on CipherPoint to protect access to sensitive or regulated information in file sharing and collaboration environments like SharePoint and file servers." CipherPoint Software, Inc., 1730 Blake St., Suite 400, Denver, CO 80202 1.888.657.5355 info@cipherpoint.com. Sponsored and paid for by CipherPoint.
about 1 hour ago
Stremor, a language heuristics technology startup, has announced the availability of Liquid Helium APIs to third-party developers. Liquid Helium is a proprietary language heuristics engine that analyzes and interprets written content so ...
Stremor, a language heuristics technology startup, has announced the availability of Liquid Helium APIs to third-party developers. Liquid Helium is a proprietary language heuristics engine that analyzes and interprets written content so that it can be manipulated and used in future online media, connected devices and systems. Liquid Helium Powers the TLDR Reader. — Image Credit: iTunes TLDR Reader There are currently four Stremor Liquid Helium APIs available via Mashape, a leading cloud API platform and marketplace: Search Results – Returns summaries of pages, author’s social media links, information about the outlinks of a page, and keywords from the URL. Automated Summary and Abstract Generator – Generates instant 350 character (+/- 10%) summaries of long content from text or URLs. Summaries are returned as highly readable paragraphs with complete sentences for the best end-user experience. RSS Summary – Allows for batch processing of an entire RSS feed (up to 30 items). Each item will be fetched from the URL in the feed, summarized and returned as an RSS 2.0 feed. Content Extractor – Extracts the HTML for the main content of any page on the internet. The API strips away headers, footers, navigation, comments, and other unwanted debris, providing only the core content. Third-party developers can use the Stremor Liquid Helium APIs in many types of applications. The Summary API can automatically generate appropriate summaries of long or complex content, including content from documents such as emails, web pages, documents, and knowledge management archives. In addition, the Summary API can extract specific data from content such as phone numbers, people and places Stremor CEO Bill Irvine, explains the goal for the APIs in a quote included in the press release: “Stremor’s goal is to create a platform that comprehends language and enables developers with a suite of language analysis APIs. This first API gives well-written summaries of long or complex content, with applications well beyond Yahoo’s limited use of their Summly acquisition. Now, anyone can leverage quality summaries in their applications.” According to the press release, the four APIs just released are “the first of many” Liquid Helium APIs that Stremor will be releasing. Developers interested in using the Stremor Liquid Helium APIs can find documentation and apply for API keys at Mashape. Additional information about the Liquid Helium language heuristics engine can be found on the official Stremor website. Sponsored by
about 2 hours ago
Unable to get new digital marketing initiatives to market as fast as you would like? Tired of dealing with IT bottlenecks that prevent you from making routine site updates or launching new digital marketing campaigns quickly? Your cust...
Unable to get new digital marketing initiatives to market as fast as you would like? Tired of dealing with IT bottlenecks that prevent you from making routine site updates or launching new digital marketing campaigns quickly? Your customers have little patience for a brand that fails to meet their... [Read More]
about 2 hours ago