Monday, March 28, 2011
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
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
Saturday, March 26, 2011
Friday, March 25, 2011
Web Designes::Best Samples
Star Girls
Olivia Munn
http://www.perfectpeople.net/photo-picture-image/132277/olivia-munn.htm
http://ricasgarcia.deviantart.com/art/Olivia-Munn-179616076
http://www.1920x1200.net/tag/1280x800/page/21/
http://www.1920x1200.net/2010/08/26/olivia-munn-7/
Travieza
http://www.8thos.com/threads/olivia-munn.1766/
http://bolichodogremio.blogspot.com.br/2009/09/olivia-munn-iron-man-2.html
Sasha Grey
http://efersoto.blogspot.com/2010/12/oda-al-universo-de-una-dama.html
Denise Milani
http://www.theplace2.ru/photos/gallery.php?id=2537&page=3
Asiatics
http://zengallery.blogspot.com.br/
Latinas
Azalia Alfaro
http://www.dogguie.com/dogguie-lectores-la-bella-y-sensual-azalia/
http://www.facebook.com/profile.php?id=100001438061662
India
http://www.hotbollywoodwomen.com/2010/08/vidya-balan-beautiful-face.html
http://www.hotbollywoodwomen.com/2009/10/bollywood-actress-best-butt-competition.html
http://indianpicwallpaper.blogspot.com/2010/06/kareena-kapoor-beautiful-style.html
http://www.perfectpeople.net/photo-picture-image/132277/olivia-munn.htm
http://ricasgarcia.deviantart.com/art/Olivia-Munn-179616076
http://www.1920x1200.net/tag/1280x800/page/21/
http://www.1920x1200.net/2010/08/26/olivia-munn-7/
Travieza
http://www.8thos.com/threads/olivia-munn.1766/
http://bolichodogremio.blogspot.com.br/2009/09/olivia-munn-iron-man-2.html
Sasha Grey
http://efersoto.blogspot.com/2010/12/oda-al-universo-de-una-dama.html
Denise Milani
http://www.theplace2.ru/photos/gallery.php?id=2537&page=3
Asiatics
http://zengallery.blogspot.com.br/
Latinas
Azalia Alfaro
http://www.dogguie.com/dogguie-lectores-la-bella-y-sensual-azalia/
http://www.facebook.com/profile.php?id=100001438061662
India
http://www.hotbollywoodwomen.com/2010/08/vidya-balan-beautiful-face.html
http://www.hotbollywoodwomen.com/2009/10/bollywood-actress-best-butt-competition.html
http://indianpicwallpaper.blogspot.com/2010/06/kareena-kapoor-beautiful-style.html
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
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/
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">
====================================================================================
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
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
Salesforce::Class for Retrieve data from another URL using JSON
1) You need register url of repository.
2) Apex Class
=====================================================================================
=====================================================================================
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/
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 ListgetOptions()
{
ListdefaultResult= new List ();
defaultResult.add(new SelectOption('','---'));
listlvalues;
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 ListgetSelectOptions(list l)
{
Listelements=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
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/
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/
Friday, March 11, 2011
Salesforce::ApexPage::Retrieve remote data
Http Request
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_httprequest.htm
Xml DOM
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_xml_dom_xmlnode.htm
Test Methods and Apex Callouts
http://wiki.developerforce.com/index.php/An_Introduction_to_Apex_Code_Test_Methods
references
[1] On Line Json Viewer http://jsonviewer.stack.hu/
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_httprequest.htm
Xml DOM
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_xml_dom_xmlnode.htm
Test Methods and Apex Callouts
http://wiki.developerforce.com/index.php/An_Introduction_to_Apex_Code_Test_Methods
references
[1] On Line Json Viewer http://jsonviewer.stack.hu/
Thursday, March 10, 2011
AFPs y EsSalud
Averigüe si está afiliado al Sistema Privado de Pensiones (SPP)
http://www.sbs.gob.pe/0/modulos/JER/JER_Interna.aspx?ARE=0&PFL=1&JER=250
https://www2.sbs.gob.pe/afiliados/paginas/Consulta.aspx
EsSalud
http://ww4.essalud.gob.pe:7777/acredita/
https://dondemeatiendo.essalud.gob.pe
Reniec (Número y Nombre solamente)
https://portaladminusuarios.reniec.gob.pe/validacionweb/index.html
Sunat (padron_reducido_ruc.zip) ~ 280M
https://www.sunat.gob.pe/descargaPRR/mrc137_padron_reducido.html
Monday, March 07, 2011
Saturday, March 05, 2011
Postgres Backup CentOS
#su postgres
$ pg_dump -Ft mydb > db.tar
$ pg_restore -d newdb db.tar
References:
[1]http://linux.die.net/man/1/pg_dump
[2]http://linux.die.net/man/1/pg_restore
$ pg_dump -Ft mydb > db.tar
$ pg_restore -d newdb db.tar
References:
[1]http://linux.die.net/man/1/pg_dump
[2]http://linux.die.net/man/1/pg_restore
Tuesday, March 01, 2011
Como importar::referencias
Averiguar subpartida nacional (partida arancelaria)
http://www.siicex.gob.pe/siicex/portal5ES.asp?_page_=234.00000
http://www.aduanet.gob.pe/itarancel/arancelS01Alias
Luego en la misma pagina
http://www.aduanet.gob.pe/itarancel/arancelS01Alias
ingresar el codigo y saldrán los aranceles a pagar
mas referencias:
http://www.pymex.pe/emprendedores/tramites/4857-importacion-definitiva-aduanera.html
http://soloempresas.ning.com/profiles/blogs/despacho-simplificado-de?xg_source=activity
http://www.siicex.gob.pe/siicex/portal5ES.asp?_page_=234.00000
http://www.aduanet.gob.pe/itarancel/arancelS01Alias
Luego en la misma pagina
http://www.aduanet.gob.pe/itarancel/arancelS01Alias
ingresar el codigo y saldrán los aranceles a pagar
mas referencias:
http://www.pymex.pe/emprendedores/tramites/4857-importacion-definitiva-aduanera.html
http://soloempresas.ning.com/profiles/blogs/despacho-simplificado-de?xg_source=activity
Saturday, February 26, 2011
Friday, February 25, 2011
Thursday, February 24, 2011
Tuesday, February 22, 2011
Monday, February 21, 2011
Salesforce::ApexPage::Retrieve data from cross domain
Calling a REST Web Service (JSON) with Apex
http://blog.jeffdouglas.com/2010/01/06/calling-a-json-rest-web-service-with-apex/
Related:
[1] Passing parameters to VFP
http://www.forcetree.com/2009/06/passing-parameters-to-visualforce-page.html
http://blog.jeffdouglas.com/2010/01/06/calling-a-json-rest-web-service-with-apex/
Related:
[1] Passing parameters to VFP
http://www.forcetree.com/2009/06/passing-parameters-to-visualforce-page.html
Friday, February 18, 2011
Thursday, February 17, 2011
Wireless Metrics
dBm is defined as power ratio in decibel (dB) referenced to one milliwatt (mW). It is an abbreviation for dB with respect to 1 mW and the "m" in dBm stands for milliwatt.
dBm is different from dB. dBm represents absolute power, whereas dB is a ratio of two values and is used to represent gain or attenuation. For example, 3 dBm means 2 mW, and 3 dB means a gain of 2. Similarly, -3 dBm means 0.5 mW, whereas -3 dB means attenuation of 2.
The formula to calculate dBm from mW is:
dBm = 10 log10( P )
1mW
Table of dBm and mW
http://www.guatewireless.org/internetworking/redes/wireless/tabla-de-relacion-entre-dbm-y-potencia-de-transmision-wlan/
dBm is different from dB. dBm represents absolute power, whereas dB is a ratio of two values and is used to represent gain or attenuation. For example, 3 dBm means 2 mW, and 3 dB means a gain of 2. Similarly, -3 dBm means 0.5 mW, whereas -3 dB means attenuation of 2.
The formula to calculate dBm from mW is:
dBm = 10 log10( P )
1mW
Table of dBm and mW
http://www.guatewireless.org/internetworking/redes/wireless/tabla-de-relacion-entre-dbm-y-potencia-de-transmision-wlan/
Wednesday, February 16, 2011
Salesforce Apexpages jQuery
References:
[1]
http://code.google.com/apis/libraries/devguide.html
[2] jQuery UI for Salesforce
http://www.titaniainc.com/ui-enhancements/jquery-enhanced-components-release/
[3] Dependent Multilevel Selectlists
http://blog.jeffdouglas.com/2008/11/25/dependent-multilevel-selectlists/
[4] Salesforce Form Validation Enhanced
http://th3silverlining.com/2010/03/02/visualforce-form-validation-enhanced/
[5] Make select list with ApexClass
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_selectList.htm
[1]
http://code.google.com/apis/libraries/devguide.html
[2] jQuery UI for Salesforce
http://www.titaniainc.com/ui-enhancements/jquery-enhanced-components-release/
[3] Dependent Multilevel Selectlists
http://blog.jeffdouglas.com/2008/11/25/dependent-multilevel-selectlists/
[4] Salesforce Form Validation Enhanced
http://th3silverlining.com/2010/03/02/visualforce-form-validation-enhanced/
[5] Make select list with ApexClass
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_selectList.htm
Salesforce Apexpages Styles
Debugging Visualforce Pages with custom Styles for UI compatibility
http://www.forcetree.com/2010_06_01_archive.html
http://www.forcetree.com/2010_06_01_archive.html
Tuesday, February 15, 2011
Monday, February 14, 2011
jQuery multiselect widget
Wednesday, February 09, 2011
Salesforce Work with Opportunities
Editing Multiple Records Using a Visualforce List Controller
http://developer.force.com/cookbook/recipe/editing-multiple-records-using-a-visualforce-list-controller
http://developer.force.com/cookbook/recipe/editing-multiple-records-using-a-visualforce-list-controller
WPA-PSK tips
Manual seguridad alta con configuración WPA-PSK
http://www.seguridadwireless.net/hwagm/wpa.html
http://www.seguridadwireless.net/hwagm/wpa.html
Friday, February 04, 2011
Postgres Auditory
Trace connections
select * from pg_stat_activity;
select client_addr,count(*) from pg_stat_activity group by client_addr;
select datname,client_addr,count(*) from pg_stat_activity group by datname,client_addr;
Test times of count(*)
EXPLAIN ANALYZE SELECT COUNT(*) FROM remitos;
Obtain rows(tuples) info
select * from pg_class where relname = 'remitos' and relkind = 'r';
select * from pg_stat_all_tables where relname = 'remitos';
and look at the n_tup_ins, n_tup_del, ...
references:
http://www.postgresonline.com/journal/archives/134-Terminating-Annoying-Back-Ends.html
select * from pg_stat_activity;
select client_addr,count(*) from pg_stat_activity group by client_addr;
select datname,client_addr,count(*) from pg_stat_activity group by datname,client_addr;
Test times of count(*)
EXPLAIN ANALYZE SELECT COUNT(*) FROM remitos;
Obtain rows(tuples) info
select * from pg_class where relname = 'remitos' and relkind = 'r';
select * from pg_stat_all_tables where relname = 'remitos';
and look at the n_tup_ins, n_tup_del, ...
references:
http://www.postgresonline.com/journal/archives/134-Terminating-Annoying-Back-Ends.html
Thursday, February 03, 2011
Salesforce Test Visual Apex Pages
1) Page.existingPageName
2) PageReference pageRef = new PageReference('partialURL');
PageReference pageRef = new PageReference('/apex/HelloWorld');
3) PageReference pageRef = new PageReference('fullURL');
PageReference pageRef = new PageReference('http://www.google.com');
4) PageReference pageRef = ApexPages.currentPage();
Executing page:
https://c.na7.visual.force.com/apex/SecondAccount
References
Displaying JIRA related information in Salesforce.com
http://www.customware.net/repository/pages/viewpage.action?pageId=62455956
2) PageReference pageRef = new PageReference('partialURL');
PageReference pageRef = new PageReference('/apex/HelloWorld');
3) PageReference pageRef = new PageReference('fullURL');
PageReference pageRef = new PageReference('http://www.google.com');
4) PageReference pageRef = ApexPages.currentPage();
Executing page:
https://c.na7.visual.force.com/apex/SecondAccount
References
Displaying JIRA related information in Salesforce.com
http://www.customware.net/repository/pages/viewpage.action?pageId=62455956
Wednesday, February 02, 2011
Wireless Punto a Punto :: Requisitos x distancia
Enlace punto a punto(requisitos x distancias):
Enlace 3Km entre 02 locales:
02 Antenas Hyperlink de 15 dBi (U$ 73 c/u)
02 AP(AccessPoint) TRENDnet de 54 Mbps (U$ 107 c/u)
02 pigtail de 60 cm (U$ 25 c/u)
Puede lograr enlaces de hasta 7Km usando AP(TRENDnet , DLINK , LINKsys , Edimax)
Enlace 8Km:
02 Antenas Hyperlink de 24 dBi (U$ 107 c/u)
02 AccessPoint(AP) Trendnet de 54 Mbps (U$ 110 c/u)
02 pigtail de 2 metros (U$ 34 c/u)
Enlace 1Km:
02 Antena Hyperlink Flat Panel de 14 dBi (U$ 45 c/u)
02 AP TP-LINK 54 Mbps (U$ 79 c/u)
02 Pigtail de 60 cm. (U$ 22 c/u)
Referencias
http://www.ds3comunicaciones.com/
http://www.opcionweb.com/index.php/2008/03/04/tipos-de-antenas-wifi/
Enlace 3Km entre 02 locales:
02 Antenas Hyperlink de 15 dBi (U$ 73 c/u)
02 AP(AccessPoint) TRENDnet de 54 Mbps (U$ 107 c/u)
02 pigtail de 60 cm (U$ 25 c/u)
Puede lograr enlaces de hasta 7Km usando AP(TRENDnet , DLINK , LINKsys , Edimax)
Enlace 8Km:
02 Antenas Hyperlink de 24 dBi (U$ 107 c/u)
02 AccessPoint(AP) Trendnet de 54 Mbps (U$ 110 c/u)
02 pigtail de 2 metros (U$ 34 c/u)
Enlace 1Km:
02 Antena Hyperlink Flat Panel de 14 dBi (U$ 45 c/u)
02 AP TP-LINK 54 Mbps (U$ 79 c/u)
02 Pigtail de 60 cm. (U$ 22 c/u)
Referencias
http://www.ds3comunicaciones.com/
http://www.opcionweb.com/index.php/2008/03/04/tipos-de-antenas-wifi/
Tuesday, February 01, 2011
Adobe Acrobat Reader Resources
Adobe Acrobat 8 Pro Español Completo
http://alvareitor.programasfull.com/adobe-acrobat-pro-8-espanol-descargar.html
Adobe Acrobat 8 Professional Multi 5 Español
http://www.gratisprogramas.org/descargar/adobe-acrobat-8-professional-multi-5-espanol-mu-full-iso/
Adobe Acrobat Pro X v10.0 MultiLenguaje No Español
http://www.taringa.net/posts/downloads/7987279/Adobe-Acrobat-Pro-X-v10_0-MultiLenguaje-No-Espanol.html
http://alvareitor.programasfull.com/adobe-acrobat-pro-8-espanol-descargar.html
Adobe Acrobat 8 Professional Multi 5 Español
http://www.gratisprogramas.org/descargar/adobe-acrobat-8-professional-multi-5-espanol-mu-full-iso/
Adobe Acrobat Pro X v10.0 MultiLenguaje No Español
http://www.taringa.net/posts/downloads/7987279/Adobe-Acrobat-Pro-X-v10_0-MultiLenguaje-No-Espanol.html
Friday, January 28, 2011
Thursday, January 27, 2011
Url Test Security
Sucuri Security Scanner
http://sitecheck.sucuri.net/scanner/
http://www.avgthreatlabs.com/sitereports
http://onlinelinkscan.com/
http://www.mywot.com/es (reputacion)
http://www.stopbadware.org/home/reportsearch (Indica quien te puso en la lista negra)
http://wepawet.cs.ucsb.edu
http://sitecheck.sucuri.net/scanner/
http://www.avgthreatlabs.com/sitereports
http://onlinelinkscan.com/
http://www.mywot.com/es (reputacion)
http://www.stopbadware.org/home/reportsearch (Indica quien te puso en la lista negra)
http://wepawet.cs.ucsb.edu
Labels:
Security,
Web Tools,
Web.Developer
Monday, January 24, 2011
Thursday, January 20, 2011
Saturday, January 15, 2011
Thursday, January 13, 2011
Reciclar encendedores
http://www.dogguie.com/reciclando-viejos-encendedores-desechables/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+dogguie+%28Dogguie%3A+curiosidades%2C+rarezas+y+humor%29
Monday, January 10, 2011
Funny links II
Transformers
http://www.dogguie.com/transformers-hechos-con-chatarra/
http://dailyartcocktail.com/what-happens-when-cartoons-meet-art/?utm_source=wahoha.com&utm_medium=referral&utm_campaign=wahoha
http://www.usfunny.info/2011/01/indecent-behavior-of-couples-in-street.html
http://www.antaresonline.com/2011/01/07/the-best-butt-on-the-web/
http://www.sharenator.com/Wind_versus_Miniskirts/#/wind_vs_miniskirt3-13.html
http://www.dogguie.com/transformers-hechos-con-chatarra/
http://dailyartcocktail.com/what-happens-when-cartoons-meet-art/?utm_source=wahoha.com&utm_medium=referral&utm_campaign=wahoha
http://www.usfunny.info/2011/01/indecent-behavior-of-couples-in-street.html
http://www.antaresonline.com/2011/01/07/the-best-butt-on-the-web/
http://www.sharenator.com/Wind_versus_Miniskirts/#/wind_vs_miniskirt3-13.html
Friday, January 07, 2011
Wednesday, December 29, 2010
Postgres CentOS iptables
# iptables -F
# iptables -L
# service iptables save
# service iptables restart
# iptables -L
references:
[1] http://www.cyberciti.biz/faq/turn-on-turn-off-firewall-in-linux/
# iptables -L
# service iptables save
# service iptables restart
# iptables -L
references:
[1] http://www.cyberciti.biz/faq/turn-on-turn-off-firewall-in-linux/
Labels:
Linux,
Linux.Developer,
Postgres
Tuesday, December 28, 2010
Postgres CentOS
Install PostgreSql Server
Login as the root user and enter the command:
# yum install postgresql postgresql-server
Start Postgresql
Type the following two command:
# chkconfig postgresql on
# service postgresql start
Connect to Postgresql Server
Connect to server using
# su - postgres
Connect using psql command line tool:
$ psql -d template1 -U postgres
Open TCP port 5432
Finally make sure iptables allows remote access to Postgresql database server:
Open /etc/sysconfig/iptables file:
# vi /etc/sysconfig/iptables
Append following line before COMMIT line to open port 5432:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
Save and close the file. Restart the firewall:
# service iptables restart
wget http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm
rpm -Uhv pgdg-centos-8.4-2.noarch.rpm
if don't work see url: http://yum.pgsqlrpms.org/reporpms/8.4
Adds
======
#su postgres
psql -d template1 -U postgres (enter the template1 service database)
alter user postgres with password 'postgres_password'; (run query to change the password)
/sbin/service postgresql restart
nmap -P0 -p 5432 192.168.1.2 (if don't have nmap --> #yum install nmap)
Here are the important lines from pg_hba.conf:
Some where you will have a file called postgresql.conf
#listen_addresses = 'localhost' --> '*' and uncomment
References:
[0]http://www.ixavi.com/2010/01/instalar-postgresql-8-3-en-centos-desde-yum/
[1]http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html
[2]http://www.cyberciti.biz/faq/howto-add-postgresql-user-account/
[3]http://www.postgresql.org/docs/7.4/interactive/sql-alteruser.html
[4] http://www.cyberciti.biz/faq/howto-add-postgresql-user-account/
Login as the root user and enter the command:
# yum install postgresql postgresql-server
Start Postgresql
Type the following two command:
# chkconfig postgresql on
# service postgresql start
Connect to Postgresql Server
Connect to server using
# su - postgres
Connect using psql command line tool:
$ psql -d template1 -U postgres
Open TCP port 5432
Finally make sure iptables allows remote access to Postgresql database server:
Open /etc/sysconfig/iptables file:
# vi /etc/sysconfig/iptables
Append following line before COMMIT line to open port 5432:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
Save and close the file. Restart the firewall:
# service iptables restart
wget http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm
rpm -Uhv pgdg-centos-8.4-2.noarch.rpm
if don't work see url: http://yum.pgsqlrpms.org/reporpms/8.4
Adds
======
#su postgres
psql -d template1 -U postgres (enter the template1 service database)
alter user postgres with password 'postgres_password'; (run query to change the password)
/sbin/service postgresql restart
nmap -P0 -p 5432 192.168.1.2 (if don't have nmap --> #yum install nmap)
Here are the important lines from pg_hba.conf:
Some where you will have a file called postgresql.conf
#listen_addresses = 'localhost' --> '*' and uncomment
References:
[0]http://www.ixavi.com/2010/01/instalar-postgresql-8-3-en-centos-desde-yum/
[1]http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html
[2]http://www.cyberciti.biz/faq/howto-add-postgresql-user-account/
[3]http://www.postgresql.org/docs/7.4/interactive/sql-alteruser.html
[4] http://www.cyberciti.biz/faq/howto-add-postgresql-user-account/
Wednesday, December 22, 2010
Thursday, December 16, 2010
Face detection
Source code repository for face detection
http://en.pudn.com/search_db.asp?keyword=face
http://en.pudn.com/search_db.asp?keyword=face
Wednesday, December 15, 2010
ASP.NET C# Upload from URL
using System.Net;
WebClient wc = new WebClient();
wc.DownloadFile("http://sourcefile.ext", "drive:\\path\\targetfile.ext");
References:
[1] http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=115
WebClient wc = new WebClient();
wc.DownloadFile("http://sourcefile.ext", "drive:\\path\\targetfile.ext");
References:
[1] http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=115
Labels:
ASP.NET MVC,
C#,
Windows.Developer
Monday, December 13, 2010
FATAL: sorry, too many clients already
Edit postgresql.conf,then on next lines increment values
max_connections = 8
shared_buffers = 16
queries for diagnostic current sessions.
1) Select * from pg_stat_activity;
2) Select count(*) as cnt, usename, current_query FROM pg_stat_activity Group by usename,current_query Order by cnt DESC;
max_connections = 8
shared_buffers = 16
queries for diagnostic current sessions.
1) Select * from pg_stat_activity;
2) Select count(*) as cnt, usename, current_query FROM pg_stat_activity Group by usename,current_query Order by cnt DESC;
Indice de masa corportal
Indice de masa corporal
http://www.buenasalud.com/tools/bmicalc.cfm
Otro medidor gráfico
http://www.bmivisualizer.com
Pruebas:
[1]
http://www.bmivisualizer.com/body_masses/generate_bmi?utf8=%E2%9C%93&locale=en&body_mass[unit_measurment]=M&body_mass[gender]=Male&body_mass[age]=35&body_mass[height]=1.66&body_mass[feet]=&body_mass[inches]=&body_mass[weight]=76&commit=Calculate+BMI
http://www.buenasalud.com/tools/bmicalc.cfm
Otro medidor gráfico
http://www.bmivisualizer.com
Pruebas:
[1]
http://www.bmivisualizer.com/body_masses/generate_bmi?utf8=%E2%9C%93&locale=en&body_mass[unit_measurment]=M&body_mass[gender]=Male&body_mass[age]=35&body_mass[height]=1.66&body_mass[feet]=&body_mass[inches]=&body_mass[weight]=76&commit=Calculate+BMI
Thursday, December 09, 2010
Condorito
http://issuu.com/ericm814/docs/v2/condorito_n1-1955
http://www.mcanime.net/foro/viewtopic.php?t=80082
http://www.atp.com.ar/post/Comics_%2F_Anime/76634/Coleccion_Condorito_completa__parte_1.html
http://www.atp.com.ar/post/Comics_%2F_Anime/76635/Coleccion_Condorito_completa__parte_2.html
http://www.atp.com.ar/post/Comics_%2F_Anime/76636/Coleccion_Condorito_completa__parte_3.html
http://www.mcanime.net/foro/viewtopic.php?t=80082
http://www.atp.com.ar/post/Comics_%2F_Anime/76634/Coleccion_Condorito_completa__parte_1.html
http://www.atp.com.ar/post/Comics_%2F_Anime/76635/Coleccion_Condorito_completa__parte_2.html
http://www.atp.com.ar/post/Comics_%2F_Anime/76636/Coleccion_Condorito_completa__parte_3.html
Disable Yahoo Messenger Adds
First mode(Execute regedit)
[HKEY_CURRENT_USER\Software\Yahoo\pager\Locale]
Enable Messenger Ad = 0
restart yahoo messenger
Second mode
on file C:\WINDOWS\system32\drivers\etc\hosts
add next line
127.0.0.1 insider.msg.yahoo.com
[HKEY_CURRENT_USER\Software\Yahoo\pager\Locale]
Enable Messenger Ad = 0
restart yahoo messenger
Second mode
on file C:\WINDOWS\system32\drivers\etc\hosts
add next line
127.0.0.1 insider.msg.yahoo.com
Friday, December 03, 2010
Jasper Report Netbeans todo lo necesario
http://www.blogger.com/home?pli=1
Lo unico que hay que saber aparte de descargar el software es crear una Libreria y agregar los .jar necesario ubicados en la carpeta de instalación:
[1] C:\Archivos de programa\JasperSoft\iReport-2.0.2\lib o
[2] C:\Archivos de programa\JasperSoft\iReport-3.7.6\ireport\modules\ext
Tutoriales
http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
http://mundobyte.wordpress.com/2008/01/06/creacion-de-reportes-en-java-parte-iii/
http://javatutoriales.blogspot.com/2009/02/creacion-de-reportes-con-jasperrepots-y.html
http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/samples.html
Recursos:
[1] jasper software http://sourceforge.net/projects/jasperreports
[2] ireport software http://sourceforge.net/projects/ireport/files/iReport%20%28classic%29/
Lo unico que hay que saber aparte de descargar el software es crear una Libreria y agregar los .jar necesario ubicados en la carpeta de instalación:
[1] C:\Archivos de programa\JasperSoft\iReport-2.0.2\lib o
[2] C:\Archivos de programa\JasperSoft\iReport-3.7.6\ireport\modules\ext
Tutoriales
http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
http://mundobyte.wordpress.com/2008/01/06/creacion-de-reportes-en-java-parte-iii/
http://javatutoriales.blogspot.com/2009/02/creacion-de-reportes-con-jasperrepots-y.html
http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/samples.html
Recursos:
[1] jasper software http://sourceforge.net/projects/jasperreports
[2] ireport software http://sourceforge.net/projects/ireport/files/iReport%20%28classic%29/
Thursday, December 02, 2010
SQL Server Analysis Service
Working with Microsoft Analysis Services (SSAS) / MSOLAP / MDX Queries
http://developer.klipfolio.com/developer/cookbook_item/item-64
Running the Analysis Services Deployment Wizard
http://msdn.microsoft.com/en-us/library/ms174817.aspx
Building a SQL Server Analysis Services .ASDatabase file from a Visual Studio SSAS Project
http://agilebi.com/ddarden/2009/05/31/building-a-sql-server-analysis-services-asdatabase-file-from-a-as-project/
Resources
[1] http://sqlsrvanalysissrvcs.codeplex.com/
[2] SQL Server software
http://www.todotegusta.com/2010/05/microsoft-sql-server-2008-r2-standard-edition-x86-y-x64/
http://developer.klipfolio.com/developer/cookbook_item/item-64
Running the Analysis Services Deployment Wizard
http://msdn.microsoft.com/en-us/library/ms174817.aspx
Building a SQL Server Analysis Services .ASDatabase file from a Visual Studio SSAS Project
http://agilebi.com/ddarden/2009/05/31/building-a-sql-server-analysis-services-asdatabase-file-from-a-as-project/
Resources
[1] http://sqlsrvanalysissrvcs.codeplex.com/
[2] SQL Server software
http://www.todotegusta.com/2010/05/microsoft-sql-server-2008-r2-standard-edition-x86-y-x64/
Wednesday, December 01, 2010
Data Mining with C#
Data Mining with C# and ADO.NET
http://www.devsource.com/c/a/Languages/Data-Mining-with-C-and-ADONET/
Data Mining SDK
http://datamining.codeplex.com/
http://www.sqldev.org/sql-server-analysis-services/c-using-adomd-to-connect-to-olap-cube-10707.shtml
Another plataform
http://www.cs.waikato.ac.nz/ml/weka/
Other references:
Spanish
http://bernardorobelo.blogspot.com/2010/02/modelos-y-ejemplos-de-data-mining.html
http://alejandroesteban.wordpress.com/
http://www.devsource.com/c/a/Languages/Data-Mining-with-C-and-ADONET/
Data Mining SDK
http://datamining.codeplex.com/
http://www.sqldev.org/sql-server-analysis-services/c-using-adomd-to-connect-to-olap-cube-10707.shtml
Another plataform
http://www.cs.waikato.ac.nz/ml/weka/
Other references:
Spanish
http://bernardorobelo.blogspot.com/2010/02/modelos-y-ejemplos-de-data-mining.html
http://alejandroesteban.wordpress.com/
Wednesday, November 24, 2010
C# Smtp Client using gmail account
using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Mail;
using System.Net;
namespace SmtpMail
{
class Program
{
static void Main(string[] args)
{
try
{
var client = new SmtpClient("smtp.gmail.com", 587)
{
Credentials = new NetworkCredential("compelligencelocal@gmail.com", "xxxxx"),
EnableSsl = true
};
client.Send("myusername@gmail.com", "manager_27@hotmail.com", "test", "testbody");
Console.WriteLine("Sent");
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine( ex.Message );
}
}
}
}
Monday, November 22, 2010
Sunday, November 14, 2010
un-install GRUB from MBR to restore Windows/DOS
HOWTO: How to erase, un-install GRUB from MBR to restore Windows/DOS bootloader
http://linux.koolsolutions.com/2009/06/08/howto-how-to-erase-un-install-grub-from-mbr-to-restore-windowsdos-bootloader/
How to uninstall GRUB
http://www.cyberciti.biz/faq/linux-how-to-uninstall-grub/
Making MBR Backup
mke2fs /dev/fd0 (formating)
dd if=/dev/hda of=/dev/fd0 bs=512 count=1 (dump to floppy)
dd if=/dev/fd0 of=/dev/hda bs=512 count=1 (dump from floppy)
/dev/fd0, replacemente with file or path
hda, sda o SCSI
resources:
[1]Download optional or missing files for Easy Recovery
http://www.easydesksoftware.com/optional.htm
http://linux.koolsolutions.com/2009/06/08/howto-how-to-erase-un-install-grub-from-mbr-to-restore-windowsdos-bootloader/
How to uninstall GRUB
http://www.cyberciti.biz/faq/linux-how-to-uninstall-grub/
Making MBR Backup
mke2fs /dev/fd0 (formating)
dd if=/dev/hda of=/dev/fd0 bs=512 count=1 (dump to floppy)
dd if=/dev/fd0 of=/dev/hda bs=512 count=1 (dump from floppy)
/dev/fd0, replacemente with file or path
hda, sda o SCSI
resources:
[1]Download optional or missing files for Easy Recovery
http://www.easydesksoftware.com/optional.htm
Saturday, November 13, 2010
Keylogger source code
Visual C++
https://github.com/ajayrandhawa/Keylogger/blob/master/Sourcecode.cpp
C#
http://sourceforge.net/projects/superkeylogger/
http://www.elguille.info/colabora/NET2006/drosa_KeyLogger.htm
http://www.c-sharpcorner.com/UploadFile/grusso/KeyLoggerAplicationinCSharp11252005000941AM/KeyLoggerAplicationinCSharp.aspx
resources:
[1] http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/ed63b033-663a-4a20-80a5-a732d31e9486
https://github.com/ajayrandhawa/Keylogger/blob/master/Sourcecode.cpp
C#
http://sourceforge.net/projects/superkeylogger/
http://www.elguille.info/colabora/NET2006/drosa_KeyLogger.htm
http://www.c-sharpcorner.com/UploadFile/grusso/KeyLoggerAplicationinCSharp11252005000941AM/KeyLoggerAplicationinCSharp.aspx
resources:
[1] http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/ed63b033-663a-4a20-80a5-a732d31e9486
Friday, November 12, 2010
Postgres DEBUG
Errors and Messages
RAISE level 'format' [, expression [, ...]];
levels-> DEBUG, LOG, INFO, NOTICE, WARNING, and EXCEPTION(raises an error).
format-> string, % is replaced by the next optional argument's string representation.
usages:
RAISE NOTICE 'Calling cs_create_job(%)', v_job_id;
--This example replace % with v_job_id
RAISE EXCEPTION 'Nonexistent ID --> %', user_id;
--This example will abort the transaction with the given error message:
references:
[1] http://www.postgresql.org/docs/8.1/static/plpgsql-errors-and-messages.html
RAISE level 'format' [, expression [, ...]];
levels-> DEBUG, LOG, INFO, NOTICE, WARNING, and EXCEPTION(raises an error).
format-> string, % is replaced by the next optional argument's string representation.
usages:
RAISE NOTICE 'Calling cs_create_job(%)', v_job_id;
--This example replace % with v_job_id
RAISE EXCEPTION 'Nonexistent ID --> %', user_id;
--This example will abort the transaction with the given error message:
references:
[1] http://www.postgresql.org/docs/8.1/static/plpgsql-errors-and-messages.html
Labels:
J2EE,
Java,
Linux.Developer,
Postgres,
Windows.Developer
Wednesday, November 10, 2010
NHibernate works without mapping
ISQLQuery query = Session.CreateSQLQuery("SELECT p.*, c.* FROM Product p Left JOIN Product_CustomField c on p.ProductId=c.ProductId");
query.SetResultTransformer(NHibernate.Transform.Transformers.AliasToBean(typeof(Product)));
IList resultList = query.List();
Notes:
Add CusTomField1..5 into Product Class,not need declared in .hbm.xml
Combine with ScalarFields
public class SqlRepository {
...
public IList ListEmployees() {
using (ISession session = _sessionBuilder.GetSession()) {
return session
.CreateSQLQuery(@"
SELECT No_ AS EmployeeNumber, [E-mail Login] AS Username
FROM Employees")
.AddScalar("EmployeeNumber", NHibernateUtil.String)
.AddScalar("Username", NHibernateUtil.String)
.SetResultTransformer(Transformers.AliasToBean())
.List();
}
}
}
Add nHibernate mapping at run time
ISessionFactory sf = new Configuration()
.AddFile("Product.hbm.xml")
.AddFile("Category.hbm.xml")
References:
[1] http://docs.jboss.org/hibernate/core/3.3/reference/en/html/querysql.html
[2] Store procedure http://www.martinwilley.com/net/code/nhibernate/sql.html
[3] Reduced wiring code needed for native sql http://swik.net/Hibernate/Hibernate+GroupBlog/Hibernate+3.1:+Reduced+wiring+code+needed+for+native+sql
[4] AddJoin http://es.efreedom.com/Question/1-1132059/NHibernate-problema-de-AddEntity-y-AddJoin
[5] Native SQL http://knol.google.com/k/fabio-maulo/nhibernate-chapter-14-native-sql/1nr4enxv3dpeq/17#
[6]Fluent NHibernate http://wiki.fluentnhibernate.org/Auto_mapping
[7]Dynamically load .hbm.xml http://www.codeguru.com/forum/showthread.php?t=474322
query.SetResultTransformer(NHibernate.Transform.Transformers.AliasToBean(typeof(Product)));
IList
Notes:
Add CusTomField1..5 into Product Class,not need declared in .hbm.xml
Combine with ScalarFields
public class SqlRepository {
...
public IList
using (ISession session = _sessionBuilder.GetSession()) {
return session
.CreateSQLQuery(@"
SELECT No_ AS EmployeeNumber, [E-mail Login] AS Username
FROM Employees")
.AddScalar("EmployeeNumber", NHibernateUtil.String)
.AddScalar("Username", NHibernateUtil.String)
.SetResultTransformer(Transformers.AliasToBean
.List
}
}
}
Add nHibernate mapping at run time
ISessionFactory sf = new Configuration()
.AddFile("Product.hbm.xml")
.AddFile("Category.hbm.xml")
References:
[1] http://docs.jboss.org/hibernate/core/3.3/reference/en/html/querysql.html
[2] Store procedure http://www.martinwilley.com/net/code/nhibernate/sql.html
[3] Reduced wiring code needed for native sql http://swik.net/Hibernate/Hibernate+GroupBlog/Hibernate+3.1:+Reduced+wiring+code+needed+for+native+sql
[4] AddJoin http://es.efreedom.com/Question/1-1132059/NHibernate-problema-de-AddEntity-y-AddJoin
[5] Native SQL http://knol.google.com/k/fabio-maulo/nhibernate-chapter-14-native-sql/1nr4enxv3dpeq/17#
[6]Fluent NHibernate http://wiki.fluentnhibernate.org/Auto_mapping
[7]Dynamically load .hbm.xml http://www.codeguru.com/forum/showthread.php?t=474322
Sunday, November 07, 2010
How to get Machine Remote Client information
Access to the network host mac address,CPU access to suppliers,...
http://www.hackchina.com/en/cont/82131
Three ways to get your MAC address.
http://www.codeguru.com/Cpp/I-N/network/networkinformation/article.php/c5451
Enterprise Logging for Distributed J2EE Applications
http://javaboutique.internet.com/tutorials/logging/index4.html
How do I get MAC address of a host? (JAVA)
http://www.kodejava.org/examples/250.html
Extract network card address(JAVA)
http://www.rgagnon.com/javadetails/java-0369.html
References:
http://mindprod.com/project/macaddress.html
http://www.hackchina.com/en/cont/82131
Three ways to get your MAC address.
http://www.codeguru.com/Cpp/I-N/network/networkinformation/article.php/c5451
Enterprise Logging for Distributed J2EE Applications
http://javaboutique.internet.com/tutorials/logging/index4.html
How do I get MAC address of a host? (JAVA)
http://www.kodejava.org/examples/250.html
Extract network card address(JAVA)
http://www.rgagnon.com/javadetails/java-0369.html
References:
http://mindprod.com/project/macaddress.html
Wednesday, November 03, 2010
Cubecart:: Deprecated: Function eregi() is deprecated in
The latest versions of PHP 5 have deprecated a few functions, for turn off those messages as seen in CubeCart.
Edit /includes/ini.inc.php
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED));
Edit /includes/ini.inc.php
error_reporting(E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED));
Wednesday, October 27, 2010
Postgres configuration
classical paths
# vi /etc/postgresql/8.2/main/postgresql.conf
# vi /var/lib/pgsql/data/postgresql.conf
# vi /opt/Postgres/8.4/data/postgresql.conf
Enable Network:
listen_addresses = 'localhost' to listen_addresses = '*'
You must also have appropriate entries in pg_hba.conf for hosts and
authentication type. You could use something like:
#TYPE DATABASE USER ADDRESS METHOD
local all all password
host all all 127.0.0.1/32 password
host all all 192.168.1.0/24 password
Next line allow all ips
host all all 0.0.0.0/0 md5
# vi /etc/postgresql/8.2/main/postgresql.conf
# vi /var/lib/pgsql/data/postgresql.conf
# vi /opt/Postgres/8.4/data/postgresql.conf
Enable Network:
listen_addresses = 'localhost' to listen_addresses = '*'
You must also have appropriate entries in pg_hba.conf for hosts and
authentication type. You could use something like:
#TYPE DATABASE USER ADDRESS METHOD
local all all password
host all all 127.0.0.1/32 password
host all all 192.168.1.0/24 password
Next line allow all ips
host all all 0.0.0.0/0 md5
Sunday, October 24, 2010
Yast Accessing package management failed (opensuse)
Look in /var/run/ for stale yast.pid or zypp.pid.
ls /var/run
less /var/run/zypp.pid or yast.pid
kill #
ls /var/run
less /var/run/zypp.pid or yast.pid
kill #
Subversion (svn)
Delete parts of subversion history
http://robmayhew.com/delete-parts-of-subversion-history/
Subversion Commands and Scripts
http://www.yolinux.com/TUTORIALS/Subversion.html
Delete Subversion revision
http://www.eiben.weite-welt.com/2008/01/delete_subversion_revision/
How do I change the default author for accessing a local SVN repository?
http://stackoverflow.com/questions/45624/how-do-i-change-the-default-author-for-accessing-a-local-svn-repository
http://robmayhew.com/delete-parts-of-subversion-history/
Subversion Commands and Scripts
http://www.yolinux.com/TUTORIALS/Subversion.html
Delete Subversion revision
http://www.eiben.weite-welt.com/2008/01/delete_subversion_revision/
How do I change the default author for accessing a local SVN repository?
http://stackoverflow.com/questions/45624/how-do-i-change-the-default-author-for-accessing-a-local-svn-repository
Thursday, October 21, 2010
Postgres save images
CREATE TABLE images (name text, img bytea);
File file = new File("image.gif");
FileInputStream fis = new FileInputStream(file);
PreparedStatement ps = conn.prepareStatement("INSERT INTO images VALUES (?, ?)");
ps.setString(1, file.getName());
ps.setBinaryStream(2, fis, file.length());
ps.executeUpdate();
ps.close();
fis.close();
setBinaryStream(), transfers a set number of bytes from a stream.
setBytes(), use this method if the contents of the image was already in a byte[].
Retrieving image
PreparedStatement ps = conn.prepareStatement("SELECT img FROM images WHERE name=?");
ps.setString(1, "image.gif");
ResultSet rs = ps.executeQuery();
if(rs.next()) {
byte[] imgBytes = rs.getBytes(1);
}
rs.close();
}
ps.close();
You could have used a InputStream object instead.
Alternatively you could be storing a very large file and want to use the LargeObject API to store the file:
CREATE TABLE imagesLO (imgname text, imgOID OID);
To insert an image, you would use:
conn.setAutoCommit(false); // All LargeObject API calls must be within a transaction
LargeObjectManager lobj = ((org.postgresql.PGConnection)conn).getLargeObjectAPI();
//create a new large object
int oid = lobj.create(LargeObjectManager.READ | LargeObjectManager.WRITE);
//open the large object for write
LargeObject obj = lobj.open(oid, LargeObjectManager.WRITE);
// Now open the file
File file = new File("image.gif");
FileInputStream fis = new FileInputStream(file);
// copy the data from the file to the large object
byte buf[] = new byte[2048];
int s, tl = 0;
while ((s = fis.read(buf, 0, 2048)) > 0)
{
obj.write(buf, 0, s);
tl += s;
}
obj.close();
//Now insert the row into imagesLO
PreparedStatement ps = conn.prepareStatement("INSERT INTO imagesLO VALUES (?, ?)");
ps.setString(1, file.getName());
ps.setInt(2, oid);
ps.executeUpdate();
ps.close();
fis.close();
Retrieving the image from the Large Object:
conn.setAutoCommit(false);
// Get the Large Object Manager to perform operations with
LargeObjectManager lobj = ((org.postgresql.PGConnection)conn).getLargeObjectAPI();
PreparedStatement ps = con.prepareStatement("SELECT imgOID FROM imagesLO WHERE imgname=?");
ps.setString(1, "image.gif");
ResultSet rs = ps.executeQuery();
if (rs.next())
{
int oid = rs.getInt(1);//open the large object for reading
LargeObject obj = lobj.open(oid, LargeObjectManager.READ);
//read the data
byte buf[] = new byte[obj.size()];
obj.read(buf, 0, obj.size());
//do something with the data read here
obj.close();
}
rs.close();
}
ps.close();
JSP Pagination mySQL Postgres
Postgres
select * from ubigeos order by nombre limit 10 offset 0
mySql
select * from ubigeos order by nombre limit 0 , 10
References:
[1] http://www.easywayserver.com/blog/jsp-pagination/
[2] http://www.todoexpertos.com/categorias/tecnologia-e-internet/programacion/java/respuestas/889187/paginacion-con-jsp
select * from ubigeos order by nombre limit 10 offset 0
mySql
select * from ubigeos order by nombre limit 0 , 10
References:
[1] http://www.easywayserver.com/blog/jsp-pagination/
[2] http://www.todoexpertos.com/categorias/tecnologia-e-internet/programacion/java/respuestas/889187/paginacion-con-jsp
Wednesday, October 20, 2010
JavaScript event.keyCode problem
Thursday, October 14, 2010
haar cascading
http://www-personal.umich.edu/~shameem/haarcascade_eye.html
http://note.sonots.com/SciSoftware/haartraining.html
http://note.sonots.com/SciSoftware/haartraining.html
tomcat & servlet resource
Tomcat::configuration of system properties from webapp
SystemPropertiesListener.java
import java.util.Enumeration;
import javax.servlet.*;
public class SystemPropertiesListener implements
javax.servlet.ServletContextListener {
private ServletContext context = null;
public void contextInitialized(ServletContextEvent event) {
context = event.getServletContext();
Enumeration params = context.getInitParameterNames();
while (params.hasMoreElements()) {
String param = (String) params.nextElement();
String value = context.getInitParameter(param);
if (param.startsWith("prefix.")) {
System.setProperty(param, value);
}
}
}
public void contextDestroyed(ServletContextEvent event) {
}
}
web.xml
Resources
[1] http://stackoverflow.com/questions/372686/how-can-i-specify-system-properties-in-tomcat-configuration-on-startup
[2] http://stackoverflow.com/questions/558502/how-a-servlet-can-get-the-absolute-path-to-a-file-outside-of-the-servlet
[3] http://stackoverflow.com/questions/2194930/tomcat-how-can-i-place-parameters-in-web-xml-and-fetch-them-in-my-application
SystemPropertiesListener.java
import java.util.Enumeration;
import javax.servlet.*;
public class SystemPropertiesListener implements
javax.servlet.ServletContextListener {
private ServletContext context = null;
public void contextInitialized(ServletContextEvent event) {
context = event.getServletContext();
Enumeration
while (params.hasMoreElements()) {
String param = (String) params.nextElement();
String value = context.getInitParameter(param);
if (param.startsWith("prefix.")) {
System.setProperty(param, value);
}
}
}
public void contextDestroyed(ServletContextEvent event) {
}
}
web.xml
<context-param>
<param-name>prefix.property</param-name>
<param-value>value</param-value>
<param-type>java.lang.String</param-type>
</context-param>
<listener>
<listener-class>servletUtils.SystemPropertiesHelper</listener-class>
</listener>
Resources
[1] http://stackoverflow.com/questions/372686/how-can-i-specify-system-properties-in-tomcat-configuration-on-startup
[2] http://stackoverflow.com/questions/558502/how-a-servlet-can-get-the-absolute-path-to-a-file-outside-of-the-servlet
[3] http://stackoverflow.com/questions/2194930/tomcat-how-can-i-place-parameters-in-web-xml-and-fetch-them-in-my-application
Wednesday, October 13, 2010
Jasper Report
Ejemplo básico(src)
http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
Resources
http://abeishbabu.blogspot.com/2009/06/printing-txt-file-directly-to-printer.html
http://www.thatsjava.com/java-core-apis/46844/
http://java.itags.org/java-core-apis/46844/
http://jasperetl.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=34840
http://forums.java.net/jive/message.jspa?messageID=227537
http://www.coderanch.com/t/62982/open-source/Jasper-Report-Text-Exporter
http://helptodeveloper.blogspot.com/2010/02/exporting-jasper-reports-with-save-as.html
http://chuwiki.chuidiang.org/index.php?title=Ejemplo_b%C3%A1sico_con_Jasper_Report
Resources
http://abeishbabu.blogspot.com/2009/06/printing-txt-file-directly-to-printer.html
http://www.thatsjava.com/java-core-apis/46844/
http://java.itags.org/java-core-apis/46844/
http://jasperetl.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=34840
http://forums.java.net/jive/message.jspa?messageID=227537
http://www.coderanch.com/t/62982/open-source/Jasper-Report-Text-Exporter
http://helptodeveloper.blogspot.com/2010/02/exporting-jasper-reports-with-save-as.html
Tuesday, October 12, 2010
Friday, October 08, 2010
Web Service tools for Social Networks
Engine for Java Web service
http://enunciate.codehaus.org/
Social Networks Api
hi5
http://api.hi5.com/
Facebook
http://developers.facebook.com/docs/reference/javascript/
http://enunciate.codehaus.org/
Social Networks Api
hi5
http://api.hi5.com/
http://developers.facebook.com/docs/reference/javascript/
Thursday, October 07, 2010
Wednesday, October 06, 2010
Sunday, October 03, 2010
JNLP vs ClickOnce
Java Web Start (Jnlp) Tutorial
http://www.mkyong.com/java/java-web-start-jnlp-tutorial-unofficial-guide/
Walkthrough: Manually Deploying a ClickOnce Application
http://msdn.microsoft.com/en-us/library/xc3tc5xx
http://www.mkyong.com/java/java-web-start-jnlp-tutorial-unofficial-guide/
Walkthrough: Manually Deploying a ClickOnce Application
http://msdn.microsoft.com/en-us/library/xc3tc5xx
Wednesday, September 29, 2010
Salesforce Customize Content
Tabbed Accounts
http://wiki.developerforce.com/index.php/Tabbed_Accounts_in_30_seconds
Custom button
http://cathylopez.com/2010/02/22/invoke-apex-from-custom-button-using-visualforce-page/
Advanced component
http://www.tehnrd.com/super-cool-advanced-lookup-component/
Redirecting Users to Different Visualforce Pages
http://jeffdonthemic.wordpress.com/2008/11/14/redirecting-users-to-different-visualforce-pages/
Record Type Redirect to VisualForce Page Using Button Override
http://www.forcetips.com/2010/05/record-type-redirect-to-visualforce-page-using-button-override/
http://wiki.developerforce.com/index.php/Tabbed_Accounts_in_30_seconds
Custom button
http://cathylopez.com/2010/02/22/invoke-apex-from-custom-button-using-visualforce-page/
Advanced component
http://www.tehnrd.com/super-cool-advanced-lookup-component/
Redirecting Users to Different Visualforce Pages
http://jeffdonthemic.wordpress.com/2008/11/14/redirecting-users-to-different-visualforce-pages/
Record Type Redirect to VisualForce Page Using Button Override
http://www.forcetips.com/2010/05/record-type-redirect-to-visualforce-page-using-button-override/
Friday, September 24, 2010
Windows XP Inicio rápido
Si no se puede restaurar en la barra la sección de inicio rápido, ejecuta las siguientes lineas:
1) Inicio, Ejecutar regsvr32 /i shell32.dll
2) Inicio, Ejecutar regsvr32 /i browseui.dll
Restaurar Mostrar Escritorio
Abrir la carpeta C:\Documents and Settings\[USER]\Datos de programa\Microsoft\Internet Explorer\Quick Launch.
-------------Desktop.scf--------------
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop
--------------------------------------
1) Inicio, Ejecutar regsvr32 /i shell32.dll
2) Inicio, Ejecutar regsvr32 /i browseui.dll
Restaurar Mostrar Escritorio
Abrir la carpeta C:\Documents and Settings\[USER]\Datos de programa\Microsoft\Internet Explorer\Quick Launch.
-------------Desktop.scf--------------
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop
--------------------------------------
Thursday, September 23, 2010
Wednesday, September 22, 2010
Spring.NET NHibernate Dynamic ConnectionString
Configuration cfg = new
Configuration().Configure("hibernate.cfg.xml");
cfg.SetProperty("connection.connection_string", "Data
Source=MI_BASE;User ID=ID_USUARIO; Password=PASS_USUARIO");
References
[1] The Spring.NET Framework
http://www.springframework.net/doc-latest/reference/html/index.html
[2] http://gist.github.com/432083 (src-best)
[3] Changing your connection string at runtime with Spring.Net (src)
http://blog.bennymichielsen.be/2009/03/24/changing-your-connection-string-at-runtime-with-spring-net/
[4]How to change a connection string at runtime? (src)
http://forum.springframework.net/showthread.php?t=3390&page=3
[5] Authentication, Impersonation, and Dynamic NHibernate Connection Strings
http://jasondentler.com/blog/2009/11/authentication-impersonation-and-dynamic-nhibernate-connection-strings/
[6] Setting and retrieving the database connectionstring in nHibernate
http://codebetter.com/blogs/peter.van.ooijen/archive/2008/03/07/setting-and-retrieving-the-database-connectionstring-in-nhibernate.aspx
Configuration().Configure("hibernate.cfg.xml");
cfg.SetProperty("connection.connection_string", "Data
Source=MI_BASE;User ID=ID_USUARIO; Password=PASS_USUARIO");
References
[1] The Spring.NET Framework
http://www.springframework.net/doc-latest/reference/html/index.html
[2] http://gist.github.com/432083 (src-best)
[3] Changing your connection string at runtime with Spring.Net (src)
http://blog.bennymichielsen.be/2009/03/24/changing-your-connection-string-at-runtime-with-spring-net/
[4]How to change a connection string at runtime? (src)
http://forum.springframework.net/showthread.php?t=3390&page=3
[5] Authentication, Impersonation, and Dynamic NHibernate Connection Strings
http://jasondentler.com/blog/2009/11/authentication-impersonation-and-dynamic-nhibernate-connection-strings/
[6] Setting and retrieving the database connectionstring in nHibernate
http://codebetter.com/blogs/peter.van.ooijen/archive/2008/03/07/setting-and-retrieving-the-database-connectionstring-in-nhibernate.aspx
Monday, September 20, 2010
CMS Drupal Themes (Temas)
theme developer module for drupal
http://drupal.org/node/209561
Make drupal them step by step
http://www.inmensia.com/articulos/drupal/temas.html
http://drupal.org/node/209561
Make drupal them step by step
http://www.inmensia.com/articulos/drupal/temas.html
Friday, September 17, 2010
Wednesday, September 15, 2010
Sunday, September 12, 2010
VB6 C#.NET Interop
[1] Using .NET Controls in VB6 http://www.codeproject.com/KB/vb-interop/UsingDotNETControlsInVB6.aspx
[2] Interop Forms Toolkit 2.0 Tutorial http://www.codeproject.com/KB/vb-interop/VB6InteropToolkit2.aspx
[3] InteropForms ToolKit - Visual Studio 2008 http://blogs.msdn.com/b/vbteam/archive/2008/03/05/interopforms-toolkit-visual-studio-2008-edition.aspx
[2] Interop Forms Toolkit 2.0 Tutorial http://www.codeproject.com/KB/vb-interop/VB6InteropToolkit2.aspx
[3] InteropForms ToolKit - Visual Studio 2008 http://blogs.msdn.com/b/vbteam/archive/2008/03/05/interopforms-toolkit-visual-studio-2008-edition.aspx
Subscribe to:
Posts (Atom)
-
Resources: [1] Hela https://ome.grc.nia.nih.gov/iicbu2008/hela/index.html
-
en inglés se llama “A potentially dangerous Request.Form value was detected from the client”. varias páginas indican dos cosas: 1. agrega...
-
mas plugins http://devsnippets.com/reviews/using-jquery-to-style-design-elements-20-impressive-plugins.html http://www.extjs.com/deploy/dev/...
Facturador Sunat SEE SFS (Linux)
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -jar ./facturadorApp-2.1.jar server prod.yaml References: [1] Make temp certificate for test...