Abstract classes vs. interfaces

Usar interfaces cuando se esperan cambios frecuentes en el código. Interfaces es un método más flexible que herencia para manejar opciones de comportamiento. Una clase abstracta funciona de manera similar pero además permite definir comportamientos comunes, forzando a las subclases a definir los comportamientos especializados. Una clase abstracta se parece a una interface en que ambos son una especie de contrato de como se debe comportar la clase en el mundo exterior. Resumiendo; interfaces permite a una clase tener varios padres, pero una interface no implementa ningún método, solo especifica que métodos se deben implementar.

Una clase abstracta no se puede instanciar pero puede implementar algunos métodos ( o todos). Interfaces hacen oficial la separación entre implementación y la firma de una clase, mientras que una clase abstracta permite definir comportamiento común, pero por lo mismo es más fácil romper el código en cascada al hacer un cambio. La siguiente tabla compara interfaces y clases abstractas en C#

Interface Abstract class
Una clase puede heredar múltiples interfaces. Una clase solo puede heredar de una clase abstracta.
sin implementación por defecto. Implementación por defecto.
Solo Static final constants. Constantes pueden ser estáticas y de instancia.
La interface define las características periféricas de una clase. Una clase abstracta define el comportamiento interno de una clase.
Si las implementaciones solo se parecen en la firma, entonces es mejor usar interfaces. Si las varias implementaciones usan comportamientos comunes, es mejor usar una clase abstracta.
Ejecución Lenta. Ejecución rápida.
Es necesario revisar todas las implementaciones para  agregar funcionalidad. Se puede agregar el nuevo método a la clase abstracta y todas las implementaciones lo incorporan.

http://www.javaworld.com/javaworld/javaqa/2001-04/03-qa-0420-abstract.html?page=1
http://www.codeproject.com/csharp/abstractsvsinterfaces.asp
C# Interface Based Development

Quick Response Code

QR code (abbreviated from Quick Response Code) is the trademark for a type of matrix barcode (or two-dimensional barcode) first designed for the automotive industry in Japan; a barcode is an optically machine-readable label that is attached to an item and that records information related to that item: The information encoded by a QR code may be made up of four standardized types (“modes”) of data (numeric, alphanumeric, byte / binary, Kanji) or, through supported extensions, virtually any type of data.[1]

The QR Code system has become popular outside the automotive industry due to its fast readability and greater storage capacity compared to standard UPC barcodes. Applications include product tracking, item identification, time tracking, document management, general marketing, and much more.[2]

A QR code consists of black modules (square dots) arranged in a square grid on a white background, which can be read by an imaging device (such as a camera) and processed using Reed-Solomon error correction until the image can be appropriately interpreted; data is then extracted from patterns present in both horizontal and vertical components of the image.[2]


PHP QR Code is open source (LGPL) library for generating QR Code, 2-dimensional barcode. Based on libqrencode C library, provides API for creating QR Code barcode images (PNG, JPEG thanks to GD2). Implemented purely in PHP, with no external dependencies (except GD2 if needed).

Some of library features includes:

  • Supports QR Code versions (size) 1-40
  • Numeric, Alphanumeric, 8-bit and Kanji encoding. (Kanji encoding was not fully tested, if you are japan-encoding enabled you can contribute by verifing it 🙂 )
  • Implemented purely in PHP, no external dependencies except GD2
  • Exports to PNG, JPEG images, also exports as bit-table
  • TCPDF 2-D barcode API integration
  • Easy to configure
  • Data cache for calculation speed-up
  • Provided merge tool helps deploy library as a one big dependency-less file, simple to “include and do not wory”
  • Debug data dump, error logging, time benchmarking
  • API documentation
  • Detailed examples
  • 100% Open Source, LGPL Licensed

MarkAny

MarkAny is a Korean rights management company, which has licensed Digimarc’s audio watermarking patents for combating music piracy. The most likely source is the software supplied with a Samsung MP3 player. Your PC will probably be running MAAgent.exe from C:Program FilesMarkAnyContentSafer (if it’s in a different folder, a file of the same name could be malware). You don’t need it.

It is almost certainly part of your samsung mobile phone driver package and intended to stop pirated music being downloaded by or played through the mobile phone.It came along with http://www.samsung.com/uk/support/mo…OFTWARE.MANUAL

it appears to be needed for you to use the samsung store and also does something when you conver videos to play on the mobile phone

You have 2 choices:
leave it alone or uninstall everything samsung related & don’t use of buy their products

titanium backup cloud upload fails

I’m able to backup to Google Drive and Dropbox, but it’s a bit fragile. TB coding for the syncs/backups is really not very robust. The notifications are pretty nondescript and there is no real logging. It seems to me that any glitch in the data transfers cause the syncs to exit, rather than execute any retries.
I’m having some troubles too im on TBP 5.6 and whenever i sync to either drop or drive i get “upload to google drive failed network error”. However i dont need to resume, i can continue. Im not sure if those backups are viable since it was disconnected so many times. The backups work, but the code seems to me to be not very robust. You need to watch your notifications to make sure the backup was successful, and if not, run another one manually.

It’s annoying, and I don’t think it’s going to change.

Google Drive and Dropbox give network errors when trying to upload. I bought Titanium Backup Pro specifically for cloud sync. The first time, it synced about 300 MB to my Google Drive account, but then the backup stopped. Now it doesn’t even sync that much anymore; it just fails – BOTH on Google Drive and on Box. For Google Drive it tells me there was a “Network error”, for Box it tells me: “Internal error com.android.providers.settings.apk.lzop”

Try Foldersync.

Had some issues originally syncing to the cloud where it always failed and it turned out to be Google music related. Specifically I think it was the amount of offline files it couldn’t sync or maybe it was a database, I don’t recall but basically I setup a new job to sync very little and slowly increased it until I figured out what the issue was.

Delete the backup for the apk listed in the error message, then back the app up again. That’s fixed Dropbox sync issues for me on multiple occasions.

install Apps in memory card in galaxy fame

galaxy fame S6812.

All applications are installed into device memory by default and I could not move the installed apps into memory card. And there is no option “Move to SDCard” in device application manager. I have tried with some tools (like App to Sd card) but failed.

If rooted “Folder Mount” may help and the description on google play gives quite a good explanation.

Android 4 and upwards does not really expect there to be SD cards and does not include the ability to install apps on SD (Samsung thankfully continue to provide the facility of an SDcard for data – although Nexus phones don’t)

Many apps have settings which allow data to be saved to SD card rather than “internal storage” Normally on samsungs, the internal storage is a folder called /storage/sdcard0 and the real removeable SD card is something like /storage/ExtSdCard (name from Note2)

Articles on Writing

Whenever you feel stuck with your article writing and are facing the typical writer’s block, you should go with the ‘brain dumping’ method where you write as fast as possible without thinking twice. Just write down everything that comes into your mind, and this will help the break writer’s block that you may be experiencing. As you write down this content, the spelling, grammar and punctuation will not even be considered during this process. You will be utterly astounded by all of the content that you come up with what you have put all of your article content into written format. Later on, you can use re-structure and proof read this article to make it presentable.

Continue reading “Articles on Writing”

Google Hummingbird

Google Hummingbird is a search algorithm used by Google. To celebrate their 15th birthday, on September 27, 2013 Google launched [1] a new “Hummingbird” algorithm,[2] claiming that Google search can be a more human way to interact with users and provide a more direct answer.[3]

Google started using Hummingbird about 30 August 2013,[4] it said. Google only announced the change on September 26.

 

What type of “new” search activity does Hummingbird help?

Conversational search” is one of the biggest examples Google gave. People, when speaking searches, may find it more useful to have a conversation.

I thought Google did this conversational search stuff already!

It does (see Google’s Impressive “Conversational Search” Goes Live On Chrome), but it had only been doing it really within its Knowledge Graph answers. Hummingbird is designed to apply the meaning technology to billions of pages from across the web, in addition to Knowledge Graph facts, which may bring back better results.

How do you know all this stuff?

Google shared some of it at its press event today, and then I talked with two of Google’s top search execs, Amit Singhal and Ben Gomes, after the event for more details. I also hope to do a more formal look at the changes from those conversations in the near future. But for now, hopefully you’ve found this quick FAQ based on those conversations to be helpful.

By the way, another term for the “meaning” connections that Hummingbird does is “entity search,” and we have an entire panel on that at our SMX East search marketing show in New York City, next week. The Coming “Entity Search” Revolution session is part of an entire “Semantic Search” track that also gets into ways search engines are discovering meanings behind words. Learn more about the track and the entire show on the agenda page.

Email clients

04-Apr-2012

POP3 vs IMAP – A Beginners Guide

Should you use POP3 or IMAP? It’s question we’re often asked here at Domainmonster.com, so lets discuss the two protocols and the advantages of each.

The first thing you need to do before making a decision is to understand what POP3 and IMAP are and of course the difference between the two.

What are they?

Both POP3 and IMAP are protocols that email services use to receive email, be it to an email client such as Outlook or a mobile device.

POP3 – Post Office Protocol 3 is a protocol that has been around for decades. It’s the standard way that a mail service will receive email from a mail server.

IMAP – Internet Message Access Protocol is a protocol that is much newer then POP3 and is used by mail products to view your mail as opposed to actually downloading it.

What is the difference to me?

If you decide to configure your email client or mobile device to connect to your mailbox using POP3 then what happens is that the client or device contacts the mailbox and allows them to download the contents of the Inbox to their own local storage. The mail then will only exist on that local storage and would not be available to download via another client or device. It is however worth noting at this point that a number of clients and devices do allow you to enable a setting to ‘keep a copy of the email on the server’ this would then allow them to be download via a second client if required.

When using IMAP with a client or device they will simply connect to the mailbox and display the full mailbox to you without actually downloading the content to local storage. This has the benefit of allowing you to manage your mailbox from multiple clients and devices and seeing the same content.

If you think about your mailbox as a post-box full of letters, and your mail clients and devices as postmen it can become a little easier to understand the basic fundamental differences between the two protocols.

When using POP3 a postman would visit the post-box and empty the contents and take it away with him. If a second postman then arrived he would only have access to the letters that had been placed into the post-box since the first visit.

When using IMAP a postman would visit the post-box and take a copy of the letters and take those copies away with him, then when a second postman arrived he would do the same and still be able to see all of the letters placed into the post-box.

Which one should I use?

Which protocol you decide to use depends mainly on how you will be accessing and managing your email. If you are likely to be viewing your mail from multiple locations, clients or devices then It is usually best to use IMAP. IMAP will allow you to manage your mailbox from all of these different locations and clients while the actual mailbox content remains on the provider’s mail server. If you were to do the same using POP3 with the ‘Keep a copy on the server’ setting enabled then you are in essence simply creating multiple copies of your mailbox and any management of the mail into sub folders would need to be repeated on each individual client.

If you are simply going to be using one email client and do not want to worry about reaching the mailbox size limit, due to the amount of email, then POP3 would be the way to go. This provides a simple service to allow you to download all of your mail to one location managed by you. The mailbox on the provider’s server would always be empty or close to it as a result and so you would never need to worry about reaching the limit.

ConclusionIf in doubt use IMAP, this gives you the ability to manage your mail from a client or device while still giving the peace of mind that there is a backup, on the mail provider’s server, of your mail. However if you are only accessing your mail from one place and need to keep all your mail locally, POP3 may be a better option.

Google Input Tools

Published on Apr 3, 2013

Input Tools in Gmail: http://youtu.be/UvhD-oZcGOA
Input Tools in Drive: http://youtu.be/pARKdhmY1zA
Input Tools Chrome extension: http://youtu.be/wwODzmWHX8s
How to use transliteration: http://youtu.be/jtoRNSR93_w

Published on Apr 3, 2013

Install: http://goo.gl/mYMB5
Input Tools in Gmail: http://youtu.be/UvhD-oZcGOA
Input Tools in Drive: http://youtu.be/pARKdhmY1zA
How to use transliteration: http://youtu.be/jtoRNSR93_w
How to use virtual keyboard: http://youtu.be/1k_6Pc4GzKQ