DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Latest Articles - DZone

article thumbnail
Using Liquibase Without a Database Connection
There are many, many different processes and requirements companies have for managing their database schemas. Some allow the application to directly manage them on startup, some require SQL scripts be executed by hand. Some have schemas that can differ across customers, some have only one database to deal with. For people who prefer to execute SQL themselves, Liquibase has always supported an “updateSQL” mode which does not update the database but instead outputs what would be run. This allows developers and DBAs to know exactly what will be ran and even make modifications as needed before actually executing the script. Before version 3.2, however, Liquibase required an active database connection for updateSQL. It used that connection to determine the SQL dialect to use and to query the DATABASECHANGELOG table to learn what changeSets have already been executed. Controlling updateSql SQL Syntax With version 3.2, Liquibase added a new “offline” mode. Instead of specifying a jdbc url such as “jdbc:mysql://localhost/lbcat” you can use “offline:mysql” or “offline:postgresql” which lets Liquibase know what dialect to use. For finer dialect control, you can specify parameters like “offline:mysql?version=3.4&caseSensitive=false Available dialect parameters: version: Standard X.Y.Z version of the database productName: String description of the database, like the JDBC driver would return catalog: String containing the name of the default top-level container ('database' in some databases 'schema' in others) caseSensitive: Boolean value specifying if the database is case sensitive or not Tracking History With CSV These parameters let Liquibase know what SQL to generate for each changeSet, but without an active database connection you cannot rely on the DATABASECHANGELOG table to track what changeSets have already been ran. Instead, offline mode uses a CSV file which mimics the structure of the DATABASECHANGELOG table. By default, Liquibase will use a file called “databasechangelog.csv” in the working directory, but it can be specified with a “changeLogFile” parameter such as “offline:mssql?changeLogFile=path/to/file.csv” It is up to you to ensure that the contents of the csv file match what is in the database. Running updateSQL automatically appends to the CSV file under the assumption that you will apply the SQL to the database. Since the csv file matches a particular database, it isn’t something you normally would store or share under version control because every database can (and probably will) be in a different state. If you do store the files in a central location, you will probably want to at least have a separate file for each database. By default, the SQL generated by updateSql in offline mode will still contain the standard DATABASECHANGELOG insert statements, so each database that you apply the SQL to will still have a correct DATABASECHANGELOG table. This means that you can switch between a direct-connection update and offline updateSQL as needed. It also means that you can also extract the current contents of the DATABASECHANGELOG table to a CSV file and use that as the file passed to the offline connection to ensure you have the right contents in the file. If you do not want the DATABASECHANGELOG table SQL included in updateSQL output, there is an “outputLiquibaseSql” parameter which can be passed in your offline url. Possible outputLiquibaseSql values: "none" will output no DATABASECHANGELOG statements "data_only" will output only INSERT INTO DATABASECHANGELOG statements "all" will output CREATE TABLE DATABASECHANGELOG if the csv file does not exist as well as INSERT statements (default value) Offline Snapshots The new 3.4.0 release of Liquibase expands offline support with a new “snapshot” parameter which can be passed to the offline url pointing to a saved database structure. Liquibase will use the snapshot anywhere it would have normally needed to read the current database state. This allows you to use preconditions and perform diff and diffChangeLog operations without an active connection and even between snapshots of the same database from different points in time. To create a snapshot of your live databases, use the “—snapshotFormat=json” parameter on the “snapshot” command. Command line example: $ liquibase --url=jdbc:mysql://localhost/lbcat snapshot --snapshotFormat=json > snapshot.json or $ liquibase --url=jdbc:mysql://localhost/lbcat –outputFile=path/to/output.json snapshot --snapshotFormat=json NOTE: currently only “json” is supported as a snapshotFormat. You can then use that file with your offline url and any snapshot operations will use it as the database state. liquibase –url=jdbc:mysql://localhost/lbcat –referenceUrl=offline:mysql?snapshot=path/to/snapshot.json diff will compare the stored snapshot with the current database state liquibase –url=offline:mysql?snapshot=path/to/snapshot.json diff –referenceUrl=offline:mysql?snapshot=path/to/older-snapshot.json diff will compare two snapshots liquibase –url=offline:mysql?snapshot=path/to/snapshot.json generateChangeLog will generate a changelog based on what is in the snapshot liquibase –url=jdbc:mysql://localhost/lbcat –referenceUrl=offline:mysql?snapshot=path/to/snapshot.json diffChangeLog will generate a changelog based on what is new in the real database compared to what is in the snapshot.
July 2, 2015
by Nathan Voxland
· 10,926 Views
article thumbnail
Webinar: Get Smart About Technical Debt
In this webinar David Norton, of Gartner Research, discusses findings on Technical Debt that estimates industry IT debt is at $500 billion—and on target to reach $1 trillion by 2015. Now that were in 2015, it's interesting to see him talk about the importance of software analysis and measurement in managing Technical Debt. He also touches on how to measure debt continuously in order to control total cost of ownership of the application life-cycle and include debt measurement in project management and prioritization. Visit here to watch the full webinar: http://goo.gl/yOJZn8
July 2, 2015
by Frances Lash
· 1,812 Views
article thumbnail
JavaFX Table Cells: Interdependence and Dynamic Editability
The standard usage of JavaFX TableView with currently available set of cell controls, with all its indisputable merits, fails to meet a fairly important requirement, which usually arises when editable fields are mutually dependent. Generally it is easy enough to change values of all dependent fields when value of some field had been changed. The real problem emerges when a cell control, which is connected with a single data field (property), should become editable or not editable (having a fixed value) depending on values of some other fields (properties) of the same record (row data object). Besides, to spare user some useless clicks and confusion, it is important to make appearance of the cell reflect at least two conditions: editable/not editable and within/outside of the selected row. To make it work, there is no need to subclass anything but table-cell controls. While it is possible to subclass TableCell and recreate all the specific cell controls, it is much easier to subclass each particular cell control, although it does lead to some minor duplication of code. To insure that all our custom cells refer to the same style definitions in a CSS stylesheet, let's share style constants in an interface: public interface IDeCell { public static final String CLASS_DE_CELL = "de-cell"; public static final String PSEUDO_CLASS_NOT_EDITABLE = "not-editable"; public static final String PSEUDO_CLASS_ROW_SELECTED = "row-selected"; } Prefix "de" stands for Dynamic Editability. We are going to prefix our custom cell extensions with "De" and refer to such cells as "de-cells". Here is source code of custom TextFieldTableCell extension: public class DeTextFieldTableCell extends TextFieldTableCell implements IDeCell { private static final PseudoClass NOT_EDITABLE_PSEUDO_CLASS = PseudoClass.getPseudoClass(PSEUDO_CLASS_NOT_EDITABLE); private static final PseudoClass ROW_SELECTED_PSEUDO_CLASS = PseudoClass.getPseudoClass(PSEUDO_CLASS_ROW_SELECTED); public BooleanProperty notEditableProperty() { return notEditable; } public final boolean isNotEditable() { return notEditableProperty().get(); } private final BooleanProperty notEditable = new SimpleBooleanProperty(this, PSEUDO_CLASS_NOT_EDITABLE, false) { @Override protected void invalidated() { pseudoClassStateChanged(NOT_EDITABLE_PSEUDO_CLASS, get()); } }; public final BooleanProperty rowSelectedProperty() { return rowSelected; } public final boolean isRowSelected() { return rowSelectedProperty().get(); } private final BooleanProperty rowSelected = new SimpleBooleanProperty(this, PSEUDO_CLASS_ROW_SELECTED, false) { @Override protected void invalidated() { pseudoClassStateChanged(ROW_SELECTED_PSEUDO_CLASS, get()); } }; public SimpleObjectProperty recordProperty() { return record; } private SimpleObjectProperty record = new SimpleObjectProperty<>(); public DeTextFieldTableCell(StringConverter converter) { super(converter); getStyleClass().add(CLASS_DE_CELL); notEditable.bind(editableProperty().not()); tableRowProperty().addListener((ov, vOld, vNew)-> { record.unbind(); rowSelected.unbind(); if (vNew != null) { record.bind(vNew.itemProperty()); rowSelectedProperty().bind(vNew.selectedProperty()); } }); } } DeTextFieldTableCell and all other de-cell controls share identical lines of code which define Boolean properties "rowSelected" and "notEditable" and respective custom CSS pseudo-classes "row-selected" and "not-editable". Additionally, de-cells expose row object (record) with "record" property. Code, which makes editability and appearance of a cell depend on values of one or more properties of the "record" has to look like this: cell.recordProperty().addListener((ov, r0, r) -> { cell.editableProperty().unbind(); if (r != null) { cell.editableProperty().bind(r.someProperty().and(r.otherProperty())); } }); Here is sample CSS for de-cells: .de-cell:filled:not-editable { -fx-background-color: #cccccc; -fx-text-fill: #0000ff; -fx-border-width: 1px 0px 0px 1px; -fx-border-color: #eeeeee } .de-cell:filled:row-selected { -fx-background-color: skyblue; -fx-text-fill: black; -fx-border-width: 1px 0px 0px 1px; -fx-border-color: #eeeeee } .de-cell:filled:not-editable:row-selected { -fx-background-color: #999999; -fx-text-fill: #0000ff } The example below is a taken (with some simplification) from the existing working application. There is a system, which allows customers to buy online prints and file downloads. All general, non-specific files, which are accessible by general customers, have preassigned General Prices: price of 1 printed copy for printable and download price for not printable ones. Besides, there are special, tailor-made files, which are not accessible by general customers and don't have General Prices. A customer can fetch products himself (with General Price only), or some products can be pushed to him by a sales manager - with General Price or (relatively reduced) Special Price. In the first case number of the printed copies to be chosen by the customer, whereas in the last case number of printed copies has to be limited by the sales manager. In case of special, tailor-made files Special Price has to be assigned. Number of copies (quantity) for the file download is always equal 1. At some point a sales manager collects all products (both general and tailor-made) to be pushed to a customer and has to edit collected entries. He/She can change any general price to a special one, allow download of a printable product, edit Special prices and printed copies (quantities). There are following dependencies: 1. General/Special choice is enabled for the general products only. 2. Print/Download choice is enabled for printable products when Special Price is selected. 3. Price is editable when Special Price is selected, otherwise it has to be equal to preassigned General Price. 4. Quantity is editable when Special Price and Print Service are selected. When Download selected quantity is fixed and equals 1, when General and Print selected quantity is null (to be chosen by customer). For example, for a sample product "*A: General Print" the only editable dynamic field is "Price Type". If a user changes Price Type to Special then Service Type, Item Price and Quantity become editable. If a user changes Service Type to Download then Quantity become not editable (and set to 1). Here is source code for data object Entry: public class Entry { private final IntegerProperty entryId = new SimpleIntegerProperty(); private final StringProperty name = new SimpleStringProperty(); private final BooleanProperty printable = new SimpleBooleanProperty(); private final BooleanProperty useGeneralPrice = new SimpleBooleanProperty(); private final BooleanProperty usePrintService = new SimpleBooleanProperty(); private final ObjectProperty generalPrice = new SimpleObjectProperty<>(); private final ObjectProperty price = new SimpleObjectProperty<>(); private final ObjectProperty quantity = new SimpleObjectProperty<>(); private final ObjectProperty totalPrice = new SimpleObjectProperty<>(); public IntegerProperty entryIdProperty() { return entryId; } public StringProperty nameProperty() { return name; } public BooleanProperty printableProperty() { return printable; } public BooleanProperty useGeneralPriceProperty() { return useGeneralPrice; } public BooleanProperty usePrintServiceProperty() { return usePrintService; } public ObjectProperty generalPriceProperty() { return generalPrice; } public ObjectProperty priceProperty() { return price; } public ObjectProperty quantityProperty() { return quantity; } public ObjectProperty totalPriceProperty() { return totalPrice; } public Entry(int aEntryId, String aName, BigDecimal aGeneralPrice, boolean aPrintable) { entryId.set(aEntryId); name.set(aName); printable.set(aPrintable); useGeneralPrice.set(aGeneralPrice != null); usePrintService.set(aPrintable); generalPrice.set(aGeneralPrice); price.set(aGeneralPrice); quantity.set((aPrintable) ? null : 1); totalPrice.bind(new ObjectBinding() { { super.bind(price, quantity); } @Override protected Number computeValue() { return (price.get() == null || quantity.get() == null) ? null : price.get().doubleValue()*quantity.get(); } }); } } Here is an excerpt from the sample app - creation of table columns with de-cells: TableColumn priceTypeCol = new TableColumn<>("Price Type"); priceTypeCol.setPrefWidth(60); priceTypeCol.setCellValueFactory(new PropertyValueFactory<>("useGeneralPrice")); priceTypeCol.setCellFactory((tableColumn) -> { DeComboBoxTableCell cell = new DeComboBoxTableCell<>( new ABooleanConverter(PRICE_TYPES[0], PRICE_TYPES[1]), true, false); cell.recordProperty().addListener((ov, vOld, vNew) -> { cell.editableProperty().unbind(); if (vNew != null) cell.editableProperty().bind(vNew.generalPriceProperty().isNotNull()); }); return cell; }); priceTypeCol.setOnEditCommit((ev) -> { Entry entry = ev.getRowValue(); Boolean value = ev.getNewValue(); entry.useGeneralPriceProperty().set(value); if (value) { entry.priceProperty().set(entry.generalPriceProperty().get()); entry.usePrintServiceProperty().set(entry.printableProperty().get()); } entry.quantityProperty().set( (value && entry.usePrintServiceProperty().get()) ? null : 1); }); //============================================================== TableColumn serviceTypeCol = new TableColumn<>("Service Type"); serviceTypeCol.setPrefWidth(60); serviceTypeCol.setCellValueFactory(new PropertyValueFactory<>("usePrintService")); serviceTypeCol.setCellFactory((tableColumn) -> { DeComboBoxTableCell cell = new DeComboBoxTableCell<>( new ABooleanConverter(SERVICE_TYPES[0], SERVICE_TYPES[1]), true, false); cell.recordProperty().addListener((ov, vOld, vNew) -> { cell.editableProperty().unbind(); if (vNew != null) { cell.editableProperty().bind(vNew.useGeneralPriceProperty().not() .and(vNew.printableProperty())); } }); return cell; }); serviceTypeCol.setOnEditCommit((ev) -> { Entry entry = ev.getRowValue(); Boolean value = ev.getNewValue(); entry.usePrintServiceProperty().set(value); entry.quantityProperty().set(1); }); //============================================================== TableColumn priceCol = new TableColumn<>("Item Price"); priceCol.setPrefWidth(50); priceCol.setCellValueFactory(new PropertyValueFactory<>("price")); priceCol.setCellFactory((tableColumn) -> { DeTextFieldTableCell cell = new DeTextFieldTableCell<>( new AMoneyConverter()); cell.setAlignment(Pos.CENTER_RIGHT); cell.recordProperty().addListener((ov, vOld, vNew) -> { cell.editableProperty().unbind(); if (vNew != null) cell.editableProperty().bind(vNew.useGeneralPriceProperty().not()); }); return cell; }); priceCol.setOnEditCommit((ev) -> { ev.getRowValue().priceProperty().set(ev.getNewValue()); }); //============================================================== TableColumn quantityCol = new TableColumn<>("Quantity"); quantityCol.setPrefWidth(40); quantityCol.setCellValueFactory(new PropertyValueFactory<>("quantity")); quantityCol.setCellFactory((tableColumn) -> { DeTextFieldTableCell cell = new DeTextFieldTableCell<>( new IntegerStringConverter()); cell.setAlignment(Pos.CENTER); cell.recordProperty().addListener((ov, vOld, vNew) -> { cell.editableProperty().unbind(); if (vNew != null) { cell.editableProperty().bind(vNew.useGeneralPriceProperty().not() .and(vNew.usePrintServiceProperty())); } }); return cell; }); priceCol.setOnEditCommit((ev) -> { ev.getRowValue().priceProperty().set(ev.getNewValue()); }); //============================================================== TableColumn totalPriceCol = new TableColumn<>("Total Price"); totalPriceCol.setPrefWidth(50); totalPriceCol.setCellValueFactory(new PropertyValueFactory<>("totalPrice")); totalPriceCol.setCellFactory((tableColumn) -> { DeTextFieldTableCell cell = new DeTextFieldTableCell<>( new AMoneyConverter()); cell.setAlignment(Pos.CENTER_RIGHT); cell.setEditable(false); return cell; }); totalPriceCol.setEditable(false); --
July 2, 2015
by Felix Golubov
· 13,092 Views
article thumbnail
Top 7 UI/UX Mobile App Design Trends To Look Out For In 2015!
Mobile phone has magnificently evolved from a simple calling device to a powerful multi-functioning tool. Today, people want to quickly do several things at a time through their smart phones even on the go, so it is important to make sure that they get a good user interface and user experience. There are many things that should be taken into account when designing a UI or UX. People like to have clear, clean and minimal interfaces because they do 80-90% of browsing and searching through their smartphones. There are many other things as well which mobile users like to have, and all these things are trending at present. Let’s now have a look at some of these UI/UX mobile app design trends that you must watch out for in 2015 and ahead: 1. Flat UI design The flat UI app design has been in for quite some time now. This app interface has much simplicity and usefulness especially for the mobile based websites. The flat design offers better usability, quick access and easy navigation for small screen devices. The concept of flat design is evolving and it now looks more awesome. New elements are being introduced such as subtle layering of colors, gradients and animation that particularly focuses on the content. 2. Full screen navigation Another mobile UI/UX trend that is on the rise is the full screen navigation, which particularly consists of a clear and large menu of actions rather than the usual title-banner-content format. Full screen navigation is really attractive for mobile users and works great with flat design as well. Example: 3. Context aware UI design The new UI/UX trend of context aware app design breaks all the rules of interface consistency. With an increased number of powerful device sensors, one can now be informed about the user’s activity, their location, situation and their environment. For example, if the user is searching for a food outlet, he can get a list of all the available hotels and restaurants in that area. Or if the user is jogging, the UI can contextually enlarge the buttons for easy access. 4. Wearable and multiple-device approach One more trend consists of app design focused for the wearable and multiple-devices users. Since last year, the growth of wearable devices has brought increased display and communication capabilities for users. So, more agile UIs are becoming important. Also, a large number of users prefer accomplishing their tasks using multiple connected devices. Therefore, mobile apps are now being built with more agile app UIs. 5. Storytelling approach Often unnoticed, the storytelling technique is an extremely effective approach for engaging potential customers with your brand. With this method, you can relate the story of your company and its products and services in order to build an emotional attachment with the customers. This new technique has been enhanced further with a range of new capabilities arising from HTML5. You can get help with dissertations here by clicking this link. 6. The clutter-free design approach Hiding the menu and other functional buttons is another UI trend that users are finding great this year in 2015. Users find it more attractive to have a clutter-free interface with minimum design elements on a small screen such as that of a mobile phone. So, now drop-down menus have been introduced for mobiles. Buttons and menus that function with device tilting and screen swipe is another smart UI trend. 7. Tiled navigation An important UI/UX mobile app design trend this year is the tiled navigation interface. This interface design is being accepted successfully by a number of great apps; it shows the app content in a “card” or tile like format that offers greater visibility for users. This tiled format is a perfect match for the responsive design methods.
July 2, 2015
by Mark Henry
· 9,707 Views
article thumbnail
Turning a Static HTML Site into a WordPress Theme: Why, How & More
With the release of version 4.1 “Dinah”, WordPress now powers over 60 million websites across the web and is being used by many well-known sites like Forbes, TechCrunch, GigaOM and CNN. Due to the rapid growth in popularity of WordPress in recent years, more and more people are now in favor of moving their static HTML sites to WordPress. Running your site on WordPress platform proves to be beneficial for you in many ways, out of which “easy content management” is the one. In this blog post, firstly I’ll make you familiar with reasons that inspire people to adopt WordPress. After that, I’ll take you through the process of converting an HTML site to WordPress. Later, I’ll be telling you what things you should do after migration. Let’s start! Why to go from Static HTML to WordPress? Below are some solid reasons why people move to WordPress: #Easy to Use: First and foremost reason, WordPress is extremely user-friendly. Anyone having adequate knowledge of computer and internet can setup and manage a WordPress site without any hassle. Regardless of who you are, a professional developer or a non-techie, you can get up and running with WordPress in just five minutes. Strictly speaking, everything from software installation to code modification to content publication is a breeze in WordPress. #SEO Friendly: WordPress is built to embrace search engine spiders and crawlers and therefore, it attracts a huge amount of organic traffic to your site. Having a clean code structure and packed with several search optimization tools, such as permalinks, blogroll and pingback, WordPress ensures your site would get higher rankings in search engine results. In addition, it allows you to take advantage of third party plug-ins for better SEO of your site. #Scalable and Flexible: As WordPress is an extremely customizable and highly expandable CMS, you’ll be able to give your site any look and functionality that you desire. It allows you to choose from a wide range of themes so that you could create any website of your taste. Also, there are a myriad of plug-ins available to let you enhance WordPress’ core functionality. Thus, the possibilities of what can be done with WordPress are endless. #Cost and Time Effective: As WordPress is open-source software, it’ll not affect your bank account unlike traditional websites do. Most of the WordPress themes and plug-ins are available to use for free. Means, you don’t need to spend a lot of time and money on a developer to have minor changes in the design and functionality of your site. With WordPress, you can do them by yourself. #Strong Community Support: WordPress is backed by a large and always growing community. So if you need any help regarding your website, there will always be someone there to assist you. There is no need to call a developer every time you want some editing in the code and content of your site. Just post your problems there and get them resolved by experts for free in minutes. #Trouble-free Upgrades: Websites built with WordPress take less time to upgrade as compared to static ones. In WordPress, using an FTP program such as FileZilla, you can take your website to a whole new level with a few mouse clicks. Unlike classic HTML websites, there is no need to mess with complex firewall settings or any other software. #Multi-User Capability: Being a multi-user capable platform, WordPress lets you control who can do what within your site. You as a site owner can assign a specific role to each of your users, allowing them to perform a set of tasks. For example, you can set up your editor with a user account where he is allowed only to add and edit content to your site. Try this with a static HTML site!! #Safe and Secure: Since its launch, WordPress has been updated more than 25 times. What do these all updates mean? Obviously, security! WordPress team is continuously working hard to make WordPress world’s most secure and reliable CMS. That’s the reason a site built with WordPress is secure enough to deal with any kind of malicious intent. How to Migrate from Static HTML Site to WordPress? If you’re ready to switch to WordPress, below are four steps following which you can move your existing HTML website to WordPress platform efficiently and effectively. #Analyze Your Existing HTML Site: This is the first and foremost step that you should follow before you’re going to convert your static HTML site to a WordPress theme. Check your site for irrelevant or outdated content and if found, clean it up. Examine the existing navigation system and think how it can be improved. Also, don’t forget to dig into hidden elements such as contact page, registration forms and email subscription etc. Doing your HTML site analysis would help you decide what content, features and functionalities should be migrated to WordPress. Consequently, you would have a clear idea about what plug-ins you need to install for getting the same functionality on WordPress platform. Remember, migration is the perfect time to assess whether the content of your site is worthy or not. #Get to Know WordPress: Once you have analyzed your static HTML site, the next step is to familiarize yourself with WordPress. This can be done by installing WordPress on a local computer or with your web hosting provider. WordPress installation is a quite easy process and therefore, I don’t think you would face any kind of trouble. Most web hosts offer one-click quick install and in case you do get stuck, please contact your web host. After finishing the installation, understand how WordPress works and try to find out which plug-ins would prove to be extremely helpful after migration process. Additionally, using “Settings” menu in the WordPress Dashboard, choose your permalink structure and disallow search engines to index your site during migration. #Do a Thorough Backup of Your HTML Site: Even if you have taken back-up of your old static site many times, you must not skip this step. I strongly recommend you to “take a complete backup of your static site once more” in order to avoid any risk of data loss while migrating. Remember, backups take very little effort and time but still are absurdly ignored. Hence as a precaution, have a tested backup saved in multiple locations (such as DVD, hard drive or hosting backup server) so that you could restore your site in case something goes wrong. As well, I suggest you not to tinker with your site in live mode even if you feel whatever you're doing is right. #Migrate to WordPress from Static HTML: Let’s come to Migration, the most juicy and vital part of the entire HTML to WordPress conversion process. May be conversion seems a bit tedious to you but actually it’s not like that. It indeed depends on your proficiency level in WordPress, HTML, PHP, CSS and JavaScript. If you have a passing familiarity with all of them, you can do conversion by yourself. Otherwise, you may need to get a professional HTML to WordPress conversion service for the same. Assuming you have sufficient coding knowledge and your site is small, the best option possible in front of you is to divide your existing HTML code into four sections (header, footer, sidebar and content) and then copy the content of each section into its respective PHP file. In case your site is large, you can take advantage of an HTML to WordPress plug-in, like HTML Import 2, to give your conversion process a boost. What to do after the migration? Once the conversion is completed, you need to do a few things to give your WordPress site the final touch. They are mentioned below: Install Necessary Plug-ins: To supercharge your brand new WordPress site with same functionalities as HTML site, install plug-ins that you found handy. Check and Fix Broken Links: Check your website for broken links (404 errors) and if found, fix them as soon as possible. You can make use of Google Webmaster Tools for this task. Set-up a Custom 404 Error Page: Add a custom 404 error page to take your visitors to important sections of your WordPress site, in case they try to access any URL that doesn't exist. Redirect Links: To inform search engines that your website’s content has been moved to a new web address, set up 301 redirects. For this purpose, you can use Simple 301 Redirect or Redirection plug-in. Enable Search Engine Indexing: Go to “Settings --> Reading” in your WordPress dashboard and check “Allow search engines to index this site” to get your site indexed by search engines. Generate and Submit XML Sitemap: To ensure your site would be included in search engine results as fast as possible, create an XML sitemap using plug-in like Google XML Sitemaps or XML Sitemaps and submit it to Google.
July 2, 2015
by Ajeet Yadav
· 10,126 Views
article thumbnail
Mobile Browser War Decoded: Opera Mini vs UC Browser vs Google Chrome
Android as known to everyone is highly customizable and configurable OS. The customization capacity of Android is what made users to switch from other operating systems to Android. Talking about the customization possibilities, there is absolutely no limit. From changing your default input device to the status bar of your Smartphone, everything can be changed. The availability of features on Android is very high and same can be seen in the case of browsers. There are numerous browsers available for Android offering different features in contrast to each other. And if you are still stuck using the default browser of your phone then you are no doubt missing a lot of things. If one talks about the Top 3 Android browsers then obviously Opera Mini, UC Browser and Google Chrome are the first three browsers which come into the thought process. But the actual question now is that which browser is the best? Every browser has its positive points and its negative points. Here is a roundup of the browsers Opera Mini, UC Browser and Google Chrome. Google Chrome Google Chrome is Google’s very own web browser. Most of us have already heard and seen enough of Google Chrome as we use it on our PCs. Also, it comes as the default browser on majority of Smartphones. Google Chrome is enriched with a lot of features, the browser sports material design and looks overall pretty when one talks about the UI. Some of the features of Google Chrome which must be noted are bandwidth compression, voice search, HTML 5, incognito mode, do not track and the list goes on. Chances are that you have it already on your phone but if you do not have then we recommend you to download it from Google Play Store. Opera Mini Opera Mini is widely popular among Smartphone users, it’s also considered as one of the fastest mobile browser. Opera Mini is capable of synchronizing data, turning off images and browsing in network affected areas. Opera Mini uses data compression to let its users with slow connection browse the web faster. Along with these things, Opera Mini sports a numerous features like capacity to save web pages for viewing later, smart page, single column view etc. Opera Mini can be downloaded and installed from Google Play Store. UC Browser UC Browser has a very decent interface and UI. Switching between windows looks really cool, customized themes are there for more personalized view. One of the main reasons why UC Browser is popular is that its known to download files faster than any other mobile browser. The download manager of UC Browser is faster and less laggy in contrast to other mobile browsers. Also, UC browser sports add-ons, speed booster and Ad Block. UC Browser is now being considered as the number 1 third party browser in the world for Smartphones, who knows you may soon get UC Browser on PC for regular usage. Wrapping It Up So, here was a roundup and a short list of features of the above mentioned browsers. Now it’s all up to you that which browser suits your need. If you have a slow internet connection and main aim is surfing then go for Opera Mini. If you are into downloading and regularly download a lot of stuff with a huge need of add-ons then you should go for UC Browser. For all other standard needs, choose Google Chrome over others. We hope that you liked the article, stay tuned to our blog for more such articles and updates.
July 2, 2015
by Aditya Dey
· 48,512 Views
article thumbnail
Emerging Niches and Technologies in Mobile App Development
If there have been wide array of successful consumer apps like Angry Bird or WhatsApp or DropBox. After years of reign in the publicity focus finally these consumer apps giants understood the importance of offering enterprise grade features. In last few years suddenly the focus shifted to enterprise mobile apps. Rapid development, tracking or monitoring apps, wearable apps, Internet of Things Apps, Geo-location technologies like iBeacon and Geofencing in business apps, the list of emerging app niches and technologies seem to be too long. Let us have a quick look at some of the most definitive app niches and technologies in recent times. Enterprise apps While smartphones and mobile devices continue to move off the shelves and millions of apps continue to make the app stores brimming with energy, activity and competition, most consumer app still fail to make a earning to survive beyond the year of their launch. This has been the sordid storyline for consumer apps for years. So, for some time the focus of developers is shifting towards enterprise apps. Moreover, now businesses are bent on going mobile and they are keen to develop apps that make their business process more productive. Although enterprise mobile apps have just started to take off this new and broad app niche already shown huge promise to take over consumer apps in just more than a year down the line. Rapid development As enterprises now focusing all out to embrace mobile apps in their business process, the new demand of enterprise grade apps made rapid development cycle obvious. When winning competition for businesses is boiling down to a fast and user focused mobile presence, fast paced development will naturally be the rule. This overwhelming demand of business apps and enterprise grade software made rapid development a criterion in the present scenario. Shortening the development lifecycle has now become the major focus for most mobile app development companies around the world. Mobile monitoring apps Wide adaptation of mobile devices and apps among all age groups and people in recent years gave rise to certain concerns. Child security concern, parental concern for negative influence on children, employer’s concern on employee productivity and information security, etc. are some of the major concerns centered on the mobile devices. IOS or Android monitoring software, child phone tracker apps, mobile spy software, text message tracking apps, are few of the app types getting increasingly popular these days to address the aforementioned concerns in family or workplace environments. Internet of Things (IOT) apps The world around us is becoming connected with the mobile devices and gadgets and devices around us are increasingly finding themselves equipped with mobile control interface. This new horizon of interconnected devices is referred as Internet of Things or IOT. Now an electric toaster can be controlled from its respective app on the mobile device. Similarly, the music system with the respective mobile app can be turned on and off, tuned in and given other commands. This new breed of apps is being called IOT apps. Wearable apps The smartphones or smart mobile devices are now playing the central role in connecting all types of wearable smart devices. Most smartwatch apps are still now in character only the extension of their mobile counterparts. But as smartwatch is slowly picking up to be the next big device platform as commonest wearable, a new breed of apps are being developed targeting smartwatch and wearable users besides offering their respective mobile apps as well. From smart jewelries to health trackers and fitness bands to optically mounted computers like Google Glass, these new wearable devices will be the target development platform for a vast majority of mobile app developers in the time to come. More user-optimized mobile UI design UI design is presently the most focus driven area for mobile app development around the world. Experiments and analysis on making UIs better and user optimized is continuing and a wide variety of new techniques and design approaches are giving birth to unprecedented level of excellence in user experience. From motivational design to flat design to and playful interfaces, we have come across quite a few dominating design trends and techniques. Geo-location technologies Contextual and user specific push notification is the new maneuver to engage users with a mobile app and to garner revenue from the process. This cannot be better done than by knowing the user location. When you know the location of a user close to your retail shop you can notify him with an offer to grab his attention and push him for a visit to your store. Thus knowing the user location translates to far better contextual and business driven messaging and notifications. Several mobile friendly Geo-location technologies like iBeacon, Geofencing, Geomagnetics, etc. are there to let you integrate location based user engagement features in your app.
July 2, 2015
by Juned Ghanchi
· 3,904 Views
article thumbnail
Captains with Benefits
When it comes to teaching or learning, video streaming is something that still frightens people away. As a matter of fact that video chats and webinars have been around for a relatively long time, however; its still hard to encourage an individual or business to take part as such. And yet the benefits of CaptainLive can be substantial in both, short as well as long term. As we have already seen the benefits of video marketing therefore, we want to encourage you to use CaptainLive in order to take advantage of your potential whether it’s hidden in you or you are well aware of it. CaptainLive was launched in early 2015 with a mission to connect people in need of knowledge and skills with Captains with Benefits that are willing to share and give their expertise and mentor skills. CaptainLive’s integrated service now allows for text, video and audio conferencing. It’s been used by a variety of individuals with different backgrounds. At CaptainLive you can schedule an online live video stream with the experts in number topics ranging from counseling up to entertainment. Captains/Experts on the site charges from $5 USD up to $150 USD, most of which offer free 5 minute sessions with no obligation to book their session thereafter. Who knows you might end up registering as Captain yourself and start a part time business of your own to help others with your skills while making a healthy stream of income for yourself, it’s surely well worth your effort.
July 1, 2015
by Peter Watson
· 898 Views
article thumbnail
How to Reset an ARM Cortex-M with Software
There are cases when I need to do a reset of the device by software. For example I have loaded the application image with the bootloader, and then I need to perform a reset of the microcontroller to do a restart. As a human user I can press the reset button on the board. But how to do this from the software and application running on the board, without user manual intervention? Or if I simply want to reset the system for whatever reason? Performing a Software System Reset with Kinetis Design Studio Using Watchdog Timeout In the past I have used the following approach for other microcontroller (e.g. the Freescale S08 and S12 devices): Setting up a watchdog timer Then when I want to do a reset, I do *not* kick (serve) the watchdog timer any more As a result, the WDT (watchdog timer) or COP (Computer operating properly) will timeout, and will reset the part That approach is working, but well is not the easiest way. Especially as on ARM Cortex-M there is a better way :-). Using ARM System Reset The ARM Cortex-M which includes the Freescale Kinetis series cores have a System Reset functionality available in the AICR (Application Interrupt and Reset Control Register): AIRCR Register (Source: ARM Infocenter) So all I need to write a 0x05FA to VECTKEY with a 1 to SYSRESETREQ :-). The easiest way is if I used the KinetisTools Processor Expert component from SourceForge (see “McuOnEclipse Releases on SourceForge“): KinetisTools Processor Expert Component This componet offers a SoftwareReset() function which I can use in my application. It is defined like this in the component: void KIN1_SoftwareReset(void) { /* Generic way to request a reset from software for ARM Cortex */ /* See https://community.freescale.com/thread/99740 To write to this register, you must write 0x5FA to the VECTKEY field, otherwise the processor ignores the write. SYSRESETREQ will cause a system reset asynchronously, so need to wait afterwards. */ #if KIN1_IS_USING_KINETIS_SDK SCB->AIRCR = (0x5FA< #else SCB_AIRCR = SCB_AIRCR_VECTKEY(0x5FA) | SCB_AIRCR_SYSRESETREQ_MASK; #endif for(;;) { /* wait until reset */ } } So all what you need is to have such a piece of code in your application to do a system reset. That component features as well an optional command line interface. That way I can reset the target with a command from the shell :-) Reset System from the Shell Summary To reset an ARM Cortex M by software, I can use the AIRCR register. Either I can do this directly, or using my KinetisTools component for Processor Expert :-).
July 1, 2015
by Erich Styger
· 7,935 Views
article thumbnail
Work at home typing
Would you like a career typing at home and make lots of money then try this website out its called www.typeathome.com you can make alot of money typing for this company the company is called type at home network. Take a look at the website and read about it.
July 1, 2015
by Maxine Burke
· 636 Views
article thumbnail
LANDESK and WinMagic Partner to Provide Enterprise-Grade Encryption Software
LANDESK One Partnership Brings WinMagic's Encryption and Intelligent Key Management Solution, SecureDoc, to LANDESK Customers LONDON - 01 July, 2015 - LANDESK today announced it has certified and is now reselling WinMagic's suite of SecureDoc products as part of its LANDESK One Partner program. The integration between LANDESK Management Suite and WinMagic SecureDoc brings the encryption status of the organisation's devices into the LANDESK management database. Given the seemingly endless news of high-profile data theft, LANDESK's relationship with WinMagic, the global innovator in key management and full disk encryption, bolsters the LANDESK security management software portfolio by allowing customers to protect data at rest. This partnership allows system administrators and security professionals to utilise a single tool for querying and reporting on encryption status alongside any other hardware or software attribute, streamlining the visibility necessary to ensure the safety and security of the organisation's assets. "The partnership between LANDESK and WinMagic allows LANDESK customers to better utilize WinMagic's world-class encryption capabilities," said Steve Workman, vice president of strategy at LANDESK. "WinMagic's SecureDoc broadens and enriches LANDESK's security portfolio, giving users the peace of mind so they can do what they do best. WinMagic's approach to full disk encryption (FDE) was a main impetus for our partnership." WinMagic's SecureDoc encrypts data on various devices, closely manages encryption keys and enables seamless user authentication and data access, so encryption does not inhibit productivity. SecureDoc protects data on the endpoint, where the data is created, regardless of the device or platform where it's accessed or saved. By deploying WinMagic's SecureDoc as LANDESK's recommended FDE vendor and integrating SecureDoc reporting into the LANDESK console, LANDESK customers receive the following: Encryption transparency. SecureDoc reports on which devices are encrypted as part of LANDESK's comprehensive compliance reporting features, aiding in regulatory compliance. A single console view. This view that encompasses all endpoint security and encryption across all devices and all operating systems. It does all of this with transparent intelligent key management, allowing users to gain deep insight into their security. FDE technology. Being application-aware, WinMagic solutions not only manage the keys but also the related policy and configuration for endpoint encryption. A predefined integration between the companies' products has been certified and is immediately available to LANDESK customers who use WinMagic. LANDESK customers who do not have WinMagic can now contact their LANDESK representative to begin evaluating how WinMagic can improve their security. "LANDESK and WinMagic agree that managing security at the endpoint is vital to protecting sensitive data and ensuring compliance, and WinMagic's offering integrates seamlessly into LANDESK's suite of solutions," said Mark Hickman, COO of WinMagic. "With this partnership, WinMagic has earned the endorsement of LANDESK, a systems and security management software company trusted by numerous companies in many industries. It's a testament to the proven and widely deployed WinMagic solution." LANDESK One Partners provide solution integrations that support the LANDESK vision of user-centered service management and help customers tackle their most pressing issues and gain maximum value from their technology investments. For more information visit: www.landesk.com/partners/landesk-one.
July 1, 2015
by Fran Cator
· 1,047 Views
article thumbnail
VoIPstudio announces free calls to UK mobiles
London, United Kingdom - July 1, 2015 Leading business telephony providers VoIPstudio today announced a breakthrough free calling plan to mobiles. Customers on the VoIPstudio unlimited plan can now call mobile phones or landlines in the UK with no connection charge and no per minute charges. VoIPstudio Marketing Manager Martin Ozarek says the new free calls to mobiles feature reflects the company's commitment to providing exceptional value for all its customers. "In the past, whenever you called someone on their mobile you always had to worry about how much it was costing," says Mr Ozarek. "We're aware that some users hesitated to make calls to mobiles because of the costs involved. We don't think that's right. "That's why we have introduced the free calls to UK mobiles for customers who are on our unlimited plan. It levels the playing field and will deliver better communications, better value and more peace of mind for our customers." The new pricing, which came into force on July 1 2015, provides free calls to UK mobiles (Vodafone, o2, Orange, T-Mobile, EE, 3 Mobile) and all UK landlines (numbers starting 01, 02 and 03). The VoIPstudio unlimited plan costs £9.99 per user per month and include free setup, 24/7 technical support, and all of the service's advanced telephony features. It also offer free inbound calls and free 0845/0560 and iNum numbers. Users on the VoIPstudio Pay As You Go plan, which costs £3.99 a month, will continue to benefit from exceptionally low charges for calling mobiles. Most calls are only 5p a minute on the Pay As You Go plan though the charges vary for specialist numbers and the connection charges can vary. A detailed breakdown of all the charges is available at: voipstudio.com/en/voip-call-rates/United+Kingdom
July 1, 2015
by Fran Cator
· 1,022 Views
article thumbnail
xMatters appoints George Biry as Channel and Alliances Director, EMEA
- Underpins Renewed Global Focus on Indirect Channel Strategy - London, UK. - Wednesday 1st July 2015 - xMatters, inc., a leader in communication-enabled business processes, has announced a key senior appointment to drive the company's EMEA channel programme, a strategy that represents the next step of the firm's expansion. George Biry joins xMatters as Director, EMEA Channels & Alliances and will be responsible for evolving the channel programme to build an even stronger partner ecosystem. He will work closely with resellers, telcos, technology partners and system integrators across EMEA. George will be responsible for leading the strategy of recruiting and managing these partners, in order to expand the firm's customer base. George brings with him more than 20 years of experience in running channel and alliance programmes in EMEA, having previously worked at Ping Identity, QLogic and McData Corp. Most recently George served as Director of Business Development EMEA at Ping, where he built a successful partner programme, including resellers, system integrators, telcos and consulting partners. Here, he led the growth of the EMEA channel share, which increased from 34% to 44% over a 9-month period. Teon Rosandic, VP, EMEA, xMatters said: "Our evolving channel strategy is important in helping us grow the company and expand our customer base even further across EMEA. We are delighted that George, with his vast industry experience and channel pedigree, is now on-board and already making this strategy a reality across the region." He continued: "With our global customer base and worldwide operations, we offer our partners an advanced SaaS communications platform that provides a competitive advantage by effectively managing their customers' communication and alerting issues." xMatters' global customers rely on its award-winning intelligent communications layer to solve two-way enterprise-wide communications and alerting challenges. The technology automatically pinpoints and alerts the required individuals, IT teams and/or external service providers needed to coordinate and collaborate to quickly produce a resolution to rectify a critical IT or business disruption. George Biry Director, EMEA Channels & Alliances said: "xMatters is growing rapidly; and a renewed global focus on the channel represents the next step of the expansion across EMEA. The company has seen huge growth, amazing customer wins and has in place a quality team that is dedicated to providing the best technology and service possible to its customers and partners."
July 1, 2015
by Fran Cator
· 1,003 Views
article thumbnail
Interoute Virtual Data Centre is the fastest transatlantic cloud service
Double the throughput and lower latency than the leading global cloud providers between the US and Europe in independent comparison research London & New York, 1 July, 2015. Interoute has today announced that its global cloud platform Interoute Virtual Data Centre (VDC), has been proven to deliver nearly double the throughput across the Atlantic than the next best cloud provider in comparison research conducted by Cloud Spectator. The research from March 2015 compared Interoute VDC with three leading cloud providers (Amazon AWS, Rackspace and Microsoft Azure), testing network throughput and latency between Europe and USA and between providers' European data centres. In all of the comparisons, Interoute VDC demonstrated the highest throughputs and lowest latencies. Cloud Spectator's full research report, and more information about Interoute VDC's performance and features, can be viewed here: http://bit.ly/1GHyzwJ Network performance is a significant factor in cloud computing for business services requiring the highest network capacity (throughput) and the shortest possible time from the server to the client (latency), to meet the needs of the businesses and their users. Innovating new applications and business services in the cloud needs network performance to match and this report shows the advantages of building the cloud into a huge global high performance network. Key research findings: Transatlantic: Interoute VDC delivered 1.1 Gbit/s throughput, which was 96% better than Amazon AWS, 141% better than Rackspace, and 195% better than Microsoft Azure. Interoute VDC had the lowest latency, between its London and New York data centres. Interoute was the only provider in the comparison with both of its transatlantic data centres located in key business cities, meaning that VDC users can access compute and storage resources, and deliver data to their customers, from two centres of European and US business activity. Within Europe: Interoute VDC achieved 1.3 Gbit/s throughput between its London and Amsterdam data centres. This was 52% better than Amazon AWS (Dublin - Frankfurt) and 73% better than Microsoft Azure (Dublin - Amsterdam) Interoute VDC achieved a latency of 6 milliseconds between London and Amsterdam, over three times better than the inter-data centre latency of the comparison providers. Matthew Finnie, CTO of Interoute, commented: "This independent report confirms and validates our networked cloud strategy. Building cloud into a world class network provides our customers with significantly better performance when compared with the traditional cloud models. Businesses looking to grow between Europe and US should definitely be looking at the importance of these network characteristics for their ability to shift workloads into the cloud. Interoute's fourteen global zones are all built into high performance network with over 300 interconnects in Europe alone. So wherever you choose to put your data and connect to us, your services are typically going to perform faster on Interoute than on many other global providers." Danny Gee, Senior Analyst, Cloud Spectator: "Users want to transfer large amounts of data between data centres quickly. Our study revealed that for a trans-Atlantic connection between cloud data centers, Interoute provided the highest throughput and lowest latency out of AWS, Rackspace and Azure. Interoute also had the higher network throughput and lowest latency in European testing compared to Azure and AWS (Rackspace was excluded, having only one location in Europe), making it a good option for users operating servers within this region. Interoute also provided the best latency, ideal for real-time communications. Users running geographically dispersed environments for such things as geo-redundancy would benefit from Interoute's high performance cloud connectivity."
July 1, 2015
by Fran Cator
· 1,232 Views
article thumbnail
Bristol Water uses Rezatec landscape intelligence to support its water catchment management programme
Harwell, Oxfordshire, 1st July 2015 - Rezatec is deploying its landscape intelligence portal platform to work with Bristol Water on a ground-breaking project designed to gain a deeper understanding of the impact changing agricultural land use and soil erosion has on water quality in its catchment area. The initiative has a particular focus on changing land use in the Blagdon Reservoir and Chew Valley Reservoir catchments. Rezatec's portal based analytics process satellite and ground data to identify changing patterns of soil erosion and agricultural intensification, which have a significant impact on the quality of the water supply. The Rezatec landscape intelligence platform performs a forty year look back and processes data from 1972 to the present day so as to identify both short and long term changes in the landscape. Landscape factors, such as agricultural practices related to specific crop types, can have a significant bearing on water treatment costs. Diffuse pollution associated with fertilisers and pesticides applied during the crop growth cycle can make its way into upstream water catchments through runoff and soil erosion, necessitating its removal downstream through expensive treatment so as to maintain the quality of the overall water supply. It is hoped that by identifying potential pollution risks before they become an issue, ongoing water treatment costs and the frequency of acute pollution events can be reduced, and requirements to invest in new water treatment infrastructure will be delayed or even avoided. Matthew Pitts, Environmental Programme Delivery Manager for Bristol Water, said: "This new and exciting way of understanding our water catchments promises to bring valuable insights into how we can enhance the environment and manage risks to water treatment and supply." He added: "Using innovative, cutting-edge landscape analytics, we're confident that we can gain a better understanding of the potential pollution risks within our catchment. This will help us to focus efforts towards achieving improved water quality in our reservoirs, bringing ecological benefits, reduced treatment costs and ultimately better value for our customers." Rezatec's Philip Briscoe commented: "From our analysis of different sources of Earth, airborne and ground data, we derive high-value data products which provide our customers with business insight on a macro and micro scale. We're delighted to be providing Bristol Water with landscape intelligence that helps them to make better business decisions to derive tangible benefits for both the company and its customers." The data products are accessible on a subscription basis to clients through Rezatec's landscape intelligence portal that allows water companies to view detailed environmental information about their catchment areas, ultimately supporting informed business decisions. Rezatec analytics help manage risk to the water supply by monitoring changes to agricultural land use and peat and soil integrity at a local and regional scale. As well as Bristol Water, Rezatec is bringing similar insights to other water companies and looks set to benefit many more in the coming months.
July 1, 2015
by Fran Cator
· 990 Views
article thumbnail
How to Access & Extract Images from Presentation Shapes inside .NET Apps
This technical tip explains how .NET developers can extract images from presentation shapes inside their .NET applications. Images are added in slide background and shapes. Sometimes, it is required to extract the images added in the presentation shapes. The images are added in IPPImageCollection inside Presentation Document Object Model (DOM). This article covers the feature of accessing the images in presentation shape, extracting them from presentation collection and saving them in a file. In Aspose.Slides for .NET, images can be added to slide shape and slide background. The images are added in IPPImageCollection of the presentation. In this example we will traverse through each shape inside every slide of presentation and see if there is any image added in slide shape. If the image will be found for any shape, we will extract that and will save it in file. The following code snippet will serve the purpose. // Code Snippet for Extracting images from presentation shapes [C# Code Sample] String path = @"D:\Aspose Data\"; //Accessing the presentation Presentation pres = new Presentation(path + "ExtractImages.pptx"); Aspose.Slides.IPPImage img = null; Aspose.Slides.IPPImage Backimg = null; int slideIndex = 0; String ImageType = ""; bool ifImageFound = false; for (int i = 0; i < pres.Slides.Count; i++) { slideIndex++; //Accessing the first slide ISlide sl = pres.Slides[i]; System.Drawing.Imaging.ImageFormat Format = System.Drawing.Imaging.ImageFormat.Jpeg; //Accessing the first slide Slide sl = pres.getSlideByPosition(i); if (sl.Background.FillFormat.FillType == FillType.Picture) { //Getting the back picture Backimg = sl.Background.FillFormat.PictureFillFormat.Picture.Image; //Setting the desired picture format ImageType = Backimg.ContentType; ImageType = ImageType.Remove(0, ImageType.IndexOf("/") + 1); Format = GetImageFormat(ImageType); String ImagePath = path + "BackImage_"; Backimg.SystemImage.Save(ImagePath + "Slide_" + slideIndex.ToString() + "." + ImageType, Format); } else { if (sl.LayoutSlide.Background.FillFormat.FillType == FillType.Picture) { //Getting the back picture Backimg = sl.LayoutSlide.Background.FillFormat.PictureFillFormat.Picture.Image; //Setting the desired picture format ImageType = Backimg.ContentType; ImageType = ImageType.Remove(0, ImageType.IndexOf("/") + 1); Format = GetImageFormat(ImageType); String ImagePath = path + "BackImage_Slide_" + i; Backimg.SystemImage.Save(ImagePath + "LayoutSlide_" + slideIndex.ToString() + "." + ImageType, Format); } } for (int j = 0; j < sl.Shapes.Count; j++) { // Accessing the shape with picture IShape sh = sl.Shapes[j]; if (sh is AutoShape) { AutoShape ashp = (AutoShape)sh; if (ashp.FillFormat.FillType == FillType.Picture) { img = ashp.FillFormat.PictureFillFormat.Picture.Image; ImageType = img.ContentType; ImageType = ImageType.Remove(0, ImageType.IndexOf("/") + 1); ifImageFound = true; } } else if (sh is PictureFrame) { IPictureFrame pf = (IPictureFrame)sh; if (pf.FillFormat.FillType == FillType.Picture) { img = pf.PictureFormat.Picture.Image; ImageType = img.ContentType; ImageType = ImageType.Remove(0, ImageType.IndexOf("/") + 1); ifImageFound = true; } } // //Setting the desired picture format if (ifImageFound) { Format = GetImageFormat(ImageType); String ImagePath = path + "Slides\\Image_"; img.SystemImage.Save(ImagePath + "Slide_" + slideIndex.ToString() + "_Shape_" + j.ToString() + "." + ImageType, Format); } ifImageFound = false; } } public static System.Drawing.Imaging.ImageFormat GetImageFormat(String ImageType) { System.Drawing.Imaging.ImageFormat Format = System.Drawing.Imaging.ImageFormat.Jpeg; switch (ImageType) { case "jpeg": Format = System.Drawing.Imaging.ImageFormat.Jpeg; break; case "emf": Format = System.Drawing.Imaging.ImageFormat.Emf; break; case "bmp": Format = System.Drawing.Imaging.ImageFormat.Bmp; break; case "png": Format = System.Drawing.Imaging.ImageFormat.Png; break; case "wmf": Format = System.Drawing.Imaging.ImageFormat.Wmf; break; case "gif": Format = System.Drawing.Imaging.ImageFormat.Gif; break; } return Format; } [VB.NET Code Sample] Dim path As String = "D:\Aspose Data\" 'Accessing the presentation Dim pres As New Presentation(path & "ExtractImages.pptx") Dim img As Aspose.Slides.IPPImage = Nothing Dim Backimg As Aspose.Slides.IPPImage = Nothing Dim slideIndex As Integer = 0 Dim ImageType As String = "" Dim ifImageFound As Boolean = False For i As Integer = 0 To pres.Slides.Count - 1 slideIndex += 1 'Accessing the first slide Dim sl As ISlide = pres.Slides(i) Dim Format As System.Drawing.Imaging.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg 'Accessing the first slide Slide sl = pres.getSlideByPosition(i); If sl.Background.FillFormat.FillType = FillType.Picture Then 'Getting the back picture Backimg = sl.Background.FillFormat.PictureFillFormat.Picture.Image 'Setting the desired picture format ImageType = Backimg.ContentType ImageType = ImageType.Remove(0, ImageType.IndexOf("/") + 1) Format = GetImageFormat(ImageType) Dim ImagePath As String = path & "BackImage_" Backimg.SystemImage.Save(ImagePath & "Slide_" & slideIndex.ToString() & "." & ImageType, Format) Else If sl.LayoutSlide.Background.FillFormat.FillType = FillType.Picture Then 'Getting the back picture Backimg = sl.LayoutSlide.Background.FillFormat.PictureFillFormat.Picture.Image 'Setting the desired picture format ImageType = Backimg.ContentType ImageType = ImageType.Remove(0, ImageType.IndexOf("/") + 1) Format = GetImageFormat(ImageType) Dim ImagePath As String = path & "BackImage_Slide_" & i Backimg.SystemImage.Save(ImagePath & "LayoutSlide_" & slideIndex.ToString() & "." & ImageType, Format) End If End If For j As Integer = 0 To sl.Shapes.Count - 1 ' Accessing the shape with picture Dim sh As IShape = sl.Shapes(j) If TypeOf sh Is AutoShape Then Dim ashp As AutoShape = CType(sh, AutoShape) If ashp.FillFormat.FillType = FillType.Picture Then img = ashp.FillFormat.PictureFillFormat.Picture.Image ImageType = img.ContentType ImageType = ImageType.Remove(0, ImageType.IndexOf("/") + 1) ifImageFound = True End If ElseIf TypeOf sh Is PictureFrame Then Dim pf As IPictureFrame = CType(sh, IPictureFrame) If pf.FillFormat.FillType = FillType.Picture Then img = pf.PictureFormat.Picture.Image ImageType = img.ContentType ImageType = ImageType.Remove(0, ImageType.IndexOf("/") + 1) ifImageFound = True End If End If ' 'Setting the desired picture format If ifImageFound Then Format = GetImageFormat(ImageType) Dim ImagePath As String = path & "Slides\Image_" img.SystemImage.Save(ImagePath & "Slide_" & slideIndex.ToString() & "_Shape_" & j.ToString() & "." & ImageType, Format) End If ifImageFound = False Next j Next i End Sub Public Shared Function GetImageFormat(ByVal ImageType As String) As System.Drawing.Imaging.ImageFormat Dim Format As System.Drawing.Imaging.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg Select Case ImageType Case "jpeg" Format = System.Drawing.Imaging.ImageFormat.Jpeg Case "emf" Format = System.Drawing.Imaging.ImageFormat.Emf Case "bmp" Format = System.Drawing.Imaging.ImageFormat.Bmp Case "png" Format = System.Drawing.Imaging.ImageFormat.Png Case "wmf" Format = System.Drawing.Imaging.ImageFormat.Wmf Case "gif" Format = System.Drawing.Imaging.ImageFormat.Gif End Select Return Format End Function
July 1, 2015
by David Zondray
· 937 Views
article thumbnail
Study explores the pros and cons of commuting life
The commute to work is something many of us still do, despite the various technical and social changes that render such daily endeavors largely redundant, the office is still the hub of working life. A recent study suggests that many employees, particularly younger ones, would forgo several hundred dollars from their salary in return for a shorter commute. Such thinking was no doubt behind the strategy of Californian company Imo to pay staff to live nearer to their office a few years ago. A recent Australian study, called Commuting Life, found however that the commute isn’t all bad, with a mixture of positive and negative aspects revealed to the authors. The pros and cons of commuting The study, which was chronicled in a dedicated website for the project, found that commuting can provide people with a degree of personal time, whether it’s to relax or dream, away from the responsibilities of working life. Of course, that isn’t to say that it’s all positive. “For a lot of people, commuting is really constraining their freedoms to do things,” the authors say. The study, which interviewed and observed Sydney based commuters, found that our daily travels to and from work change how we behave towards one another, and indeed things such as our level of tolerance, what we want from work and even our longer-term plans. “A stressful commute can change how we treat work colleagues. But it can also have negative impacts on family life, with commuters finding it difficult to relax when they return home,” the authors say. Rather depressingly, the average worker commuted for more than an hour each way, even if they lived with 10km of their office, with the record being a four hour commute from one woman in the study. Despite the apparent drudgery however, some respondents revealed that they enjoyed their commute because it afforded them some time and space to themselves, free from the stresses of both home and work. Key points Our commutes change who we are – specifically in how we behave towards others Our commutes change our relationship with cities – specifically how we access services and undertake regular activities such as shopping Our commutes are ingrained in the rest of our lives – commuting is not a freestanding activity, but is something that reflects and reverberates onto nearly every other aspect of our life in some way Commuting stress is caused by various factors – it isn’t just the time/distance that stresses us about. For instance it might be when the commute is delayed or we don’t get a seat. It is also something that both new and old commuters experience. There are various strategies to alleviate stress – these include policy based strategies such as building new roads or better trains, but also individual strategies, more flexible working options and so on. The authors hope that their study will prod employers and policy makers into looking at the commute and taking it more seriously than is currently the case. “Yes some of these commuting problems fall on state governments. But at the same time there are many other sites of responsibility – our employers and companies for example – who could offer their staff the chance to work from home,” they conclude. Original post
July 1, 2015
by Adi Gaskell
· 994 Views
article thumbnail
Writing a Download Server, Part III: Headers: Content-length and Range
Content-length response header is tremendously helpful for clients that track download progress. There are however some circumstances when obtaining precise content length is hard.
July 1, 2015
by Tomasz Nurkiewicz
· 10,751 Views · 1 Like
article thumbnail
Learning Spring-Cloud - Writing a Microservice
Continuing my Spring-Cloud learning journey, earlier I had covered how to write the infrastructure components of a typical Spring-Cloud and Netflix OSS based micro-services environment - in this specific instance two critical components, Eureka to register and discover services and Spring Cloud Configuration to maintain a centralized repository of configuration for a service. Here I will be showing how I developed two dummy micro-services, one a simple "pong" service and a "ping" service which uses the "pong" service. Sample-Pong microservice The endpoint handling the "ping" requests is a typical Spring MVC based endpoint: @RestController public class PongController { @Value("${reply.message}") private String message; @RequestMapping(value = "/message", method = RequestMethod.POST) public Resource pongMessage(@RequestBody Message input) { return new Resource<>( new MessageAcknowledgement(input.getId(), input.getPayload(), message)); } } It gets a message and responds with an acknowledgement. Here the service utilizes the Configuration server in sourcing the "reply.message" property. So how does the "pong" service find the configuration server, there are potentially two ways - directly by specifying the location of the configuration server, or by finding the Configuration server via Eureka. I am used to an approach where Eureka is considered a source of truth, so in this spirit I am using Eureka to find the Configuration server. Spring Cloud makes this entire flow very simple, all it requires is a "bootstrap.yml" property file with entries along these lines: --- spring: application: name: sample-pong cloud: config: discovery: enabled: true serviceId: SAMPLE-CONFIG eureka: instance: nonSecurePort: ${server.port:8082} client: serviceUrl: defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/ The location of Eureka is specified through the "eureka.client.serviceUrl" property and the "spring.cloud.config.discovery.enabled" is set to "true" to specify that the configuration server is discovered via the specified Eureka server. Just a note, this means that the Eureka and the Configuration server have to be completely up before trying to bring up the actual services, they are the pre-requisites and the underlying assumption is that the Infrastructure components are available at the application boot time. The Configuration server has the properties for the "sample-pong" service, this can be validated by using the Config-servers endpoint - http://localhost:8888/sample-pong/default, 8888 is the port where I had specified for the server endpoint, and should respond with a content along these lines: "name": "sample-pong", "profiles": [ "default" ], "label": "master", "propertySources": [ { "name": "classpath:/config/sample-pong.yml", "source": { "reply.message": "Pong" } } ] } As can be seen the "reply.message" property from this central configuration server will be used by the pong service as the acknowledgement message Now to set up this endpoint as a service, all that is required is a Spring-boot based entry point along these lines: @SpringBootApplication @EnableDiscoveryClient public class PongApplication { public static void main(String[] args) { SpringApplication.run(PongApplication.class, args); } } and that completes the code for the "pong" service. Sample-ping micro-service So now onto a consumer of the "pong" micro-service, very imaginatively named the "ping" micro-service. Spring-Cloud and Netflix OSS offer a lot of options to invoke endpoints on Eureka registered services, to summarize the options that I had: 1. Use raw Eureka DiscoveryClient to find the instances hosting a service and make calls using Spring's RestTemplate. 2. Use Ribbon, a client side load balancing solution which can use Eureka to find service instances 3. Use Feign, which provides a declarative way to invoke a service call. It internally uses Ribbon. I went with Feign. All that is required is an interface which shows the contract to invoke the service: package org.bk.consumer.feign; import org.bk.consumer.domain.Message; import org.bk.consumer.domain.MessageAcknowledgement; import org.springframework.cloud.netflix.feign.FeignClient; 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.ResponseBody; @FeignClient("samplepong") public interface PongClient { @RequestMapping(method = RequestMethod.POST, value = "/message", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody MessageAcknowledgement sendMessage(@RequestBody Message message); } The annotation @FeignClient("samplepong") internally points to a Ribbon "named" client called "samplepong". This means that there has to be an entry in the property files for this named client, in my case I have these entries in my application.yml file: samplepong: ribbon: DeploymentContextBasedVipAddresses: sample-pong NIWSServerListClassName: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList ReadTimeout: 5000 MaxAutoRetries: 2 The most important entry here is the "samplepong.ribbon.DeploymentContextBasedVipAddresses" which points to the "pong" services Eureka registration address using which the service instance will be discovered by Ribbon. The rest of the application is a routine Spring Boot application. I have exposed this service call behind Hystrix which guards against service call failures and essentially wraps around this FeignClient: package org.bk.consumer.service; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import org.bk.consumer.domain.Message; import org.bk.consumer.domain.MessageAcknowledgement; import org.bk.consumer.feign.PongClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; @Service("hystrixPongClient") public class HystrixWrappedPongClient implements PongClient { @Autowired @Qualifier("pongClient") private PongClient feignPongClient; @Override @HystrixCommand(fallbackMethod = "fallBackCall") public MessageAcknowledgement sendMessage(Message message) { return this.feignPongClient.sendMessage(message); } public MessageAcknowledgement fallBackCall(Message message) { MessageAcknowledgement fallback = new MessageAcknowledgement(message.getId(), message.getPayload(), "FAILED SERVICE CALL! - FALLING BACK"); return fallback; } } Boot"ing up I have dockerized my entire set-up, so the simplest way to start up the set of applications is to first build the docker images for all of the artifacts this way: mvn clean package docker:build -DskipTests and bring all of them up using the following command, the assumption being that both docker and docker-compose are available locally: docker-compose up Assuming everything comes up cleanly, Eureka should show all the registered services, at http://dockerhost:8761 url - The UI of the ping application should be available at http://dockerhost:8080 url - Additionally a Hystrix dashboard should be available to monitor the requests to the "pong" app at this url http://dockerhost:8989/hystrix/monitor?stream=http%3A%2F%2Fsampleping%3A8080%2Fhystrix.stream: References 1. The code is available at my github location - https://github.com/bijukunjummen/spring-cloud-ping-pong-sample 2. Most of the code is heavily borrowed from the spring-cloud-samples repository - https://github.com/spring-cloud-samples
July 1, 2015
by Biju Kunjummen
· 13,760 Views · 4 Likes
article thumbnail
DevOps Leadership Series: Gov Does DevOps
This past week, I had the opportunity to catch up with some more industry thought leaders at the DevOpsDays DC event in our nation’s capital. This was the first major DevOps Days event to feature a large audience of government participants. It was an awesome event and is certainly going to be on my must-attend list for next year. First off for the series, I had the chance to chat with Nathen Harvey, the Community Director at Chef. Nathen also did a great job leading the organizing committee for DevOps Days DC. In this episode of the DevOps Leadership Series, Nathen illustrates some recurrent topics he noticed at DevOpsDays DC. Nathen ensures us that government is ready for DevOps, enterprises are ready for DevOps, and small businesses and web innovators are ready for DevOps. Then he highlights how we need to create high velocity organizations that are safe, scalable, and humane for our teams. Next, I had the pleasure of catching up with Greg Elin, the Executive Director at GovReady and former Chief Data Officer at the FCC. What really stood out to Greg at the event was how many people already have their DevOps “sea legs.” He notes the number of different organizations that are comfortable with DevOps, and are familiar with its language and concepts. Finally, I caught up with Dave Johnson, Senior Technical Director at Ansible. Dave shares that “the market really is not dominated yet by any particular player in this (DevOps) space.” Dave explains when he first entered the industry he thought the IT world was dominated by open source and commercial technologies. However, when talking to the industry at large now, he found most the enterprises aren’t yet doing anything yet for automation, and most enterprises are still tackling their problems with humans. Next up in the series, you’ll hear from John Willis (Co-Author of the upcoming DevOps Cookbook) and Leon Fayer (Vice President at OmniTI). If you have missed any of the other videos from this series, you can find them here. (We’re up to 15 so far).
July 1, 2015
by Derek Weeks
· 13,509 Views
  • Previous
  • ...
  • 1475
  • 1476
  • 1477
  • 1478
  • 1479
  • 1480
  • 1481
  • 1482
  • 1483
  • 1484
  • ...
  • Next
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook
×