Thursday, March 31, 2011

Amy MacDonald

2007 This is the life
http://linkto.net/?2952626344cf0f4eeeae854.45628949
2010 A curious thing
http://linkto.net/?19645296464cf0f5026f0bb4.43062513

.NET Dynamic Reports

http://www.gotreportviewer.com/DynamicMatrix.zip
Render Report
http://weblogs.asp.net/rajbk/archive/2006/03/02/How-to-render-client-report-definition-files-_28002E00_rdlc_2900_-directly-to-the-Response-stream-without-preview.aspx

iPhone Developers::Resources

XCode under Windows
http://www.ifans.com/forums/showthread.php?t=267007
http://ipodtoucher55.blogspot.com/2010/12/installing-ios-sdk-and-xcode-on-windows.html

Tutorials
http://www.cristalab.com/tutoriales/fundamentos-de-programacion-para-iphone-c260l/
http://www.scribd.com/doc/12684298/Building-PhotoKast-Creating-an-iPhone-app-in-one-month
http://iproyectoiphone.blogspot.com/

Hello World on iPhone
http://developer.apple.com/library/ios/#documentation/IDEs/Conceptual/xcode_quick_start/000-About_Xcode/introduction.html#//apple_ref/doc/uid/TP40010575

http://developer.apple.com/library/ios/navigation/

How to connect to a MySQL database from an iPhone?
http://stackoverflow.com/questions/468618/how-to-connect-to-a-mysql-database-from-an-iphone

Mysql and Objective-C
http://www.karlkraft.com/index.php/2010/06/02/mysql-and-objective-c/

MySQL.framework for iPhone
http://www.eval-art.com/2009/06/22/mysqlframework-for-iphone/

CocoaMySQL
http://sourceforge.net/projects/cocoamysql/files/CocoaMySQL%20source/CocoaMySQL%20source%20v0.7b4%20%28BETA%29/

MySQL on MAC OS X
http://developer.apple.com/internet/opensource/osdb.html
iMy (mySQL client for iphone)
http://www.spanware.com/iphonedb/iMy/iMy.html
iAMPS (webserver on your iPhone)
http://iamps.byethost24.com/index.php?postid=15

iPhone & Web Service

How can I connect iPhone and web service and get XML data?
http://stackoverflow.com/questions/352676/how-can-i-connect-iphone-and-web-service-and-get-xml-data

iPhone Programming Tutorial – Intro to SOAP Web Services
http://www.icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/

Creating an iPhone-based Web
http://blogs.oreilly.com/iphone/2008/09/creating-an-iphone-based-web-s.html

http://es.w3support.net/index.php?db=so&id=352676

Wednesday, March 30, 2011

Disable Popup at Yahoo Messenger started

1. Login using the Yahoo messenger.
2. Go to Messenger >> Preferences >> General category.
3. Uncheck [ ] Show Yahoo! Messenger Insider.

References
[1]http://txpress.blogspot.com/2007/03/remove-yahoo-messenger-insider-popup.html

Monday, March 28, 2011

Install Java + Tomcat on Linux CentOS

I. Installing Java

#yum install jpackage-utils

#wget url/jdk-6u13-linux-i586-rpm.bin [1]

#chmod +x jdk-6u13-linux-i586-rpm.bin

#./jdk-6u13-linux-i586-rpm.bin

#java -version

II. Installing Tomcat

#wget http://apache.mirror.testserver.li/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz

#cp apache-tomcat-6.0.32.tar.gz /var/

#cd /var

#tar -zxvf apache-tomcat-6.0.32.tar.gz

# ln -s /var/apache-tomcat-6.0.32 tomcat

#/var/tomcat/bin/startup.sh

References:
[1]Java Download http://www.oracle.com/technetwork/java/javase/downloads/index.html
[2]Java + Tomcat + startup in CentOS
http://wiki.openbluedragon.org/wiki/index.php/Apache_Tomcat_on_CentOS/RedHat
[3]Java 6 + Tomcat in CentOS
http://www.satollo.net/how-to-install-tomcat-and-java-6-on-centos-5-2
[4]Java SE
http://www.oracle.com/technetwork/java/javase/downloads/index.html
[5]Tomcat (download core tar.gz)
http://tomcat.apache.org/download-60.cgi
[6]Mirror
http://apache.mirror.testserver.li/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz

CSS Templates

http://www.woothemes.com/themes/

Videos Graciosos

http://video.latam.msn.com/watch/video/gato-cansado-se-desmaya/1jb3dt5rq

http://video.latam.msn.com/watch/video/sonrie-cuando-le-dicen/1jbyn00k1

http://video.latam.msn.com/watch/video/perro-ladra-mas-bajo-a-pedido/1jb65jo8z

http://video.latam.msn.com/watch/video/precision-japonesa/1jb7ufffb

http://video.latam.msn.com/watch/video/carrera-de-31-piernas/1jb3la8c6

http://video.latam.msn.com/watch/video/gato-contra-perro-en-camara-lenta/1jbatlyp9

http://video.latam.msn.com/watch/video/la-mejor-imitadora-de-animales-del-mundo/p4fej3h3

Wednesday, March 23, 2011

Portal Cautivo

[1] pfsense http://www.pfsense.org/


http://es.wikipedia.org/wiki/Portal_cautivo

http://blyx.com/public/wireless/nocatbox/nocatbox-howto-es.pdf

Tuesday, March 22, 2011

ASP.NET MVC and HTTPS

Enable SSL or HTTPS in IIS 7

1. Open IIS from Administrative Tools.
2. Navigate to Sites>Default Web Site. Or select the web site you want to enable SSL or HTTPS.
3. In the right pane, Click Binding.
4. Default is setup Port 80. You can click Add and to HTTPS or port 443.
5. Continue the instruction to complete the settigns.


Referencias:
[1]Adding HTTPS/SSL support to ASP.NET MVC routing
http://blog.stevensanderson.com/2008/08/05/adding-httpsssl-support-to-aspnet-mvc-routing/
[2]Requiring SSL For ASP.NET MVC Controllers
http://weblogs.asp.net/dwahlin/archive/2009/08/25/requiring-ssl-for-asp-net-mvc-controllers.aspx
[3]SSL pages under ASP.NET MVC
http://stackoverflow.com/questions/156748/ssl-pages-under-asp-net-mvc
[4]http://es.wikipedia.org/wiki/Hypertext_Transfer_Protocol_Secure
[5]Enabling SSL on IIS 7.0 Using Self-Signed Certificates http://weblogs.asp.net/scottgu/archive/2007/04/06/tip-trick-enabling-ssl-on-iis7-using-self-signed-certificates.aspx
[6] Configure IIS http://learn.iis.net/page.aspx/144/how-to-set-up-ssl-on-iis-7/
[7] IIS 7 SSL Certificate Installation http://www.digicert.com/ssl-certificate-installation-microsoft-iis-7.htm
[8] Enable SSL on IIS 7 (Spanish) http://thinkingindotnet.wordpress.com/2007/04/06/trucos-habilitar-ssl-en-iis-70-usando-certificados-firmados-por-nosotros/
[9] IIS7 - How to Install GoDaddy SSL Certificate http://www.netometer.com/video/tutorials/iis7-godaddy-ssl-certificate/
[10] Self-Signed Certificates on IIS 7 – the Easy Way and the Most Effective Way http://www.robbagby.com/iis/self-signed-certificates-on-iis-7-the-easy-way-and-the-most-effective-way/

Thursday, March 17, 2011

Salesforce::Override save method of Opportunity

Apex Class
====================================================================================

public class OpportunityEditControllerExtension {

public String status;
public String getStatus() {return status;}

public opportunity oppo;
private final ApexPages.StandardController controller;

//initializes the private member variables
public OpportunityEditControllerExtension(ApexPages.StandardController stdController)
{
controller= stdController;
this.oppo= (opportunity)controller.getRecord();
}


public PageReference mysave()
{
try{
update oppo;
}
catch(DmlException ex){
ApexPages.addMessages(ex);
}
status='Updated...';
//PageReference sc = new ApexPages.StandardController(oppo).view();
//return sc;
return null;
}
}
====================================================================================

Apex Page
====================================================================================
<apex:page standardcontroller="opportunity" extensions="OpportunityEditControllerExtension" >
<apex:form >
<apex:pageblock >
<apex:pageBlockButtons >
<apex:commandbutton value="Save" action="{!mysave}" rerender="resultsPanel" status="status"/>

<apex:inputfield value="{!opportunity.name}"/>
<apex:inputfield value="{!opportunity.amount}"/>
<apex:inputfield value="{!opportunity.closedate}"/>

<apex:actionStatus id="status" startText="Fetching map..."/>
<apex:outputPanel id="resultsPanel">





Salesforce::Apex Page::Add extensions

Load another objetcts
http://stackoverflow.com/questions/3552779/salesforce-softphone-relate-call-to-records-in-two-different-objects


Adding Custom List Buttons using Standard List Controllers
http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_custom_button.htm

Tuesday, March 15, 2011

Servlet::Make PDF

http://www.geek-tutorials.com/java/itext/servlet_jsp_output_pdf.php


iText->CĆ³digos de Barra
http://www.itextpdf.com/themes/keyword.php?id=373
Other methods
http://www.bokai.com/BarcodeJSP/
http://stackoverflow.com/questions/1700597/barcode-image-generator-in-java

Salesforce::Class for Retrieve data from another URL using JSON

1) You need register url of repository.



2) Apex Class
=====================================================================================

public class JsonSecondController {
String name;
public PageReference test() {
return null;
}
public PageReference submit() {
return null;
}

public String getName() { return name;}
public void setName(String nname) { name=nname;}



public List getOptions()
{

List defaultResult= new List();
defaultResult.add(new SelectOption('','---'));

list lvalues;
try
{
String values=getJsonString('342096656648874');
lvalues=JSONObject.jsonarray ( new JSONObject.JSONTokener( values ) );
}
catch(Exception e)
{
return defaultResult;
}
return getSelectOptions(lvalues);
}


private String getJsonString(String id) {

String json;
HttpRequest req = new HttpRequest();
Http http = new Http();
req.setMethod('GET');
// generate the url for the request
String url = 'http://datarepository/page.aspx/GetIndustries/'+id;
req.setEndpoint(url);// add the endpoint to the request
req.setCompressed(true);
HTTPResponse resp = http.send(req);
json = resp.getBody().replace('\n', '');

try {
//System.debug('Respond code: ' + resp.getStatus());
return json;
} catch (JSONObject.JSONException e) {
return 'Error parsing JSON response: '+e;
}

}
private List getSelectOptions(list l)
{
List elements=new List();
for (Integer i = 0; i < l.size(); i++){
JSONObject v = l.get(i).obj;
String value=v.getValue('Value').str;
String label=v.getValue('Text').str;
elements.add(new SelectOption(value,label));
}

return elements;
}


}

=====================================================================================


2) Apex Page
=====================================================================================

<apex:page controller="JsonSecondController">
<apex:form >

<apex:selectList id="idindustry" value="{!name}" size="1">
<apex:selectOptions value="{!Options}"/>



<apex:commandButton value="Test" action="{!test}" rerender="out" status="status"/>

<apex:outputPanel id="out">
<apex:actionstatus id="status" startText="testing...">





=====================================================================================

References:

[1] JSONObject http://www.embracingthecloud.com/CommentView,guid,6ca59b34-f896-48a2-b1bf-33ffbe96b4ec.aspx
[2] http://wiki.developerforce.com/index.php/Building_Android_Applications_with_the_Force.com_REST_API
[3] JSON Validator page http://www.jsonlint.com/

Monday, March 14, 2011

JasperReport::Export to Text

CHAR_WIDTH = REPORT_WIDTH / MAX_CHAR_PER_ROW=524 / 80 = 6.55 //6
CHAR_HEIGHT = REPORT_HEIGHT / MAX_CHAR_PER_COL =524 / 44 = 11.9 //11//10


JRTextExporter exporter = new JRTextExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "c:\\textreport1.txt");
exporter.setParameter(JRTextExporterParameter.CHARACTER_WIDTH, new Integer(6));
exporter.setParameter(JRTextExporterParameter.CHARACTER_HEIGHT, new Integer(11));
exporter.exportReport();



References
[1]http://www.coderanch.com/t/62982/open-source/Jasper-Report-Text-Exporter
[2] http://www.cepeu.edu.py/LIBROS_ELECTRONICOS_3/lpcu089%20-%2001.pdf
[3] http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report

PostgreSql Date Format

If you need change date format into postgres database, need execute next commands

SET DATESTYLE TO Postgres,US;
or
SET DATESTYLE TO iso,dmy --dd/mm/yyyy

this setting apply to current session; for permanent change modify postgresq.conf, section Locale and Formatting:

datestyle = 'iso, mdy'

Now you need reestart database

#service postgresql restart


Reload config settings without restarting database
If you are making modifications to the file postgresql.conf (or similar), and you want to new settings to take effect without needing to restart the entire database, there are two ways to accomplish this.

Option 1: From the command-line shell
#su - postgres
$/usr/bin/pg_ctl reload

Option 2: Using SQL

SELECT pg_reload_conf();

Using either option will not interrupt any active queries or connections to the database.

References:
[1] SET http://www.commandprompt.com/ppbook/r28464
[2] http://heatware.net/databases/postgresql-reload-config-without-restarting/

Animation online

Sketch to animation [1] https://sketch.metademolab.com/ Animate avatar from audio recorded [1] https://new.express.adobe.com/tools/animate-f...