Tuesday, May 03, 2011

VMWare 7.0::Snow Leopard 10.6.1-10.6.2

two comments:
first you need VMWare 7.0 and Snow Leopard iso.

second on boot: -v cpus=1 busratio=20


notes:

for active partition if not

after push F8 on boot prompt: -v -s cpus=1 busratio=20
and next you have prompt #fdisk -e /dev/rdisk0
:print --to display a list of partitions on the disk.
:flag n --n is the partition where you installed Mac OS X.


references
[1] http://cyberwarez.info/forum/showthread.php/2582692-CW-UPLOAD-MAC-OSX-Collection-2011?p=3775422&viewfull=1
[2] http://www.chw.net/foro/hackintosh-f179/887315-no-puedo-instalar-mac-os-leopard.html
[3] http://bobhood.wordpress.com/2009/06/12/installing-ideneb-1-4-under-vmware-6-5-2/
[4] http://cyberwarez.info/forum/showthread.php/2582692-CW-UPLOAD-MAC-OSX-Collection-2011?p=3775422&viewfull=1
[5] http://ayudalinux.wordpress.com/2007/02/03/instalar-macosx86-1045-sobre-vmware/
[6] OSx86 – How To install Mac OS X on VMware Server & AMD 64 http://asendure.wordpress.com/2006/10/01/osx86-how-to-install-mac-os-x-on-vmware-server-amd-64/

Friday, April 29, 2011

Linux Fonts

Step 1: Download fonts from [1]
Step 2: unzip and copy to default fonts path
$cp -r /home/user/Desktop/Downloads/fontfolder /usr/share/fonts/
Step 3: Update fonts cache
$fc-cache /usr/share/fonts/fontfolder/

Resources:

[1] fonts http://www.portalplanetasedna.com.ar/fuentes1.htm

Thursday, April 28, 2011

Ghost::How to Clone Partition from Intel to Amd processor.

boot from windows xp cdrom, and select install(F8) and next repair(After copying the installation data to the drive, you should boot once again from the cdrom - not from your harddisk)
on second boot select Repair on first screen, login and execute next commands.

cd c:\windows\system32\drivers
c:\windows\system32\drivers>del intelide.sys
c:\windows\system32\drivers>del intelppm.sys

exit and wait reboot

Note:
I try delete files after clone(using external boot cd) and reset then works fine.

References:
[1]http://www.cpuhack.com/wordpress/?p=142
[2]using register mode http://support.microsoft.com/kb/314082

ASP.NET::The timeout period

The timeout period elapsed prior to completion of the operation or the server is not responding.

try below options, set command timeout parameter to 0. It will execute till the end. By default it will timeout in 30 secs.

Using Code:

sqlCommand.CommandTimeout = 0;

Using Connection String: Check the timeout in connection string, try setting it to max...
data source="ServerName;initial catalog=DataBaseName;uid=ID;pwd=Password;Connect Timeout=120"

Using Sql Server:On the SQL Server also you can set timeout of a query. Check with SQL Server DBA's to know the Query time out set on servers.

Using IIS: On IIS also you have timeout setting. In IIS --> Website tab --> Connection time out box . Set the max timeout value (in secs) IIS should maintain idle connection .

check all these possibilities

Wednesday, April 27, 2011

OpenSUSE::Install JRE1.6

Step 1:Download JRE from [2]
#wget ....
Step 2: Executing installer
#chmod +x jre-6-linux-i586.bin
#./jre-6-linux-i586.bin
Step 3:Move directory to common
#mv jre1.6.0 /usr/lib/jvm

Step 4:Set new Java to "alternatives of java":
#update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0/bin/java" 1
Step 5:Verify version
#java -version
references:

[1] Instalar JAVA JRE 1.6.0 en Firefox http://www.ubuntu-es.org/node/33116
[2] JRE repository
EShttp://www.java.com/es/download/linux_manual.jsp
ENhttp://www.java.com/en/download/linux_manual.jsp

Monday, April 25, 2011

Web Security

Articles : How to hack a website (Basic sql injection)
http://www.ecademy.com/node.php?id=76050

references:
http://www.thc.org/thc-hydra/

Enable/Disable Firefox Cookies

on url address put about:config and search next item.
network.cookie.alwaysAcceptSessionCookies //verify value is true


References:
http://support.mozilla.com/es/kb/Habilitar%20y%20deshabilitar%20cookies

Tuesday, April 19, 2011

Spring MVC

Spring MVC Fast Tutorial (with sources for download)
http://maestric.com/doc/java/spring

Postgres::Drop connections

--List all of the open connections to a given database
select * from pg_stat_activity where datname='database';

--Drop all of the open connections to a given database:
select pg_terminate_backend(procpid) from pg_stat_activity where datname='database';
--More samples
select * from pg_stat_activity where date(backend_start)='2011-04-19';
select pg_terminate_backend(procpid) from pg_stat_activity where date(backend_start)='2011-04-19';

--One sample more specific
select * from pg_stat_activity where backend_start < '2011-05-04 10:00' and waiting=false order by backend_start desc
select pg_terminate_backend(procpid) from pg_stat_activity where backend_start < '2011-05-04 10:00' and waiting=false

select pg_terminate_backend(procpid) from pg_stat_activity where backend_start < '2011-08-05 07:00' and datname='' and waiting=false

References:
http://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL-TABLE
http://www.postgresql.org/docs/8.4/static/monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE

Friday, April 15, 2011

Default Setting of SMTP

Gmail
Outing Server:smtp.googlemail.com
port:465
Connection Security:SSL/TLS

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/

Thursday, February 17, 2011

Wireless::Proveedores de Equipos

http://www.digitalstoreperu.com/tienda/category.php?id_category=18

Precios
http://www.diazcomunicaciones.com/tienda

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/

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

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

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/

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

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/

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/

Wednesday, December 22, 2010

Wednesday, December 15, 2010

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;

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

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/

Keylogger Apps

Perfect keylogger v1.7.5
http://www.intercambiosvirtuales.org/software/blazingtools-perfect-keylogger-v1-7-5-0-espia-sin-que-se-enteren-lo-que-sucede-en-una-pc

Referencias:
[1]http://www.elhacker.net/Textos1.html

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 );
}

}
}
}

Web Capture

ScreenGrab
https://addons.mozilla.org/es-ES/firefox/addon/1146/

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

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

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

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

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));

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com