• Viernes 19 de Abril de 2024, 00:04

Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Mensajes - janus.ast

Páginas: [1]
1
JavaScript / proplema con imagenes
« en: Lunes 8 de Junio de 2009, 20:03 »
problemas con javascript y php

<script src="DV.js" type="text/javascript">

</script>

<script type="text/javascript">
var grande = '<img src="img/Grandes/<?php echo $row_Recordset3['grande']; ?>" width="239" height="463" border="0" alt="">'
var grande1 = '<img src="img/Grandes/<?php echo $row_Recordset1['grande']; ?>" width="239" height="463" border="0" alt="">'
</script>

<img src="img/Peques/<?php echo $row_Recordset1['peque']; ?>" width="200" height="215" href="#" onClick="dv.showDV(grande1); return false"/a>
estees mi codigo  y va perfecto simpre y cuando cuando solo quede una imagen pero cuando quiero mostrar mas registros y mas imagenes   no me funciona y no entiendo el por que
<?php do { ?>
                  <img src="img/Peques/<?php echo $row_Recordset1['peque']; ?>" width="200" height="215" href="#" onClick="dv.showDV(grande1); return false"/a>
                  <?php } while ($row_Recordset3 = mysql_fetch_assoc($Recordset3)); ?>

pero no llama al javascript ayuda please

2
VB .NET / cambiar codigo
« en: Miércoles 18 de Febrero de 2009, 09:07 »
cambiar codigo SUM(CASE WHEN Column2 = 'Some Other Value' THEN Column1 ELSE 0 END) as FieldNeeded2 a vb.net

3
VB .NET / Texbox Con Angulo
« en: Domingo 22 de Abril de 2007, 01:08 »
:whistling: hola miren estoy haciendo una aplicacion de punto de venta y manejo  una forma de una caja de registradora en perpectiva he tratado de programar la textbox de tal manera que en lugar dev verse vertical se viera vertical pero con sierto angulo quiero saber si se puede :lightsabre:  :kicking:

4
VB .NET / Validar Multiplos De 100
« en: Lunes 16 de Abril de 2007, 23:20 »
;)  ;) hola antes que todo quiero comentar que apenas empieso a utilisar .net y no soy muy bueno  quisiera que me dijieran como valido numeros multiplos de 1000
mi logica seria dividir dentro de un arreglo de tipo string caracter por caracter del numero y despues leer los ultipos 3 digitos y validarlos siempre y cuando sean ceros se oye muy facil lo se hacer en builder pero no puedo aqui ayuda

5
C++ Builder / Ampliar Imagen Detro De Ejecuicion
« en: Sábado 24 de Marzo de 2007, 19:09 »
nesecito que en el momento que se desplase el raton  dentro de una imagen  se amplie como un vector de imagen diganme si se puede por favor
 :lightsabre:  :smartass:

6
C++ Builder / Jfcontrols
« en: Lunes 26 de Febrero de 2007, 22:54 »
de casualidad alguno de ustedes tiene los componntes jfcontrol que no sean los trial o diganme como hacerlos full

7
C++ Builder / Alininar Texto En Un Tmemo1
« en: Jueves 18 de Enero de 2007, 17:48 »
HOLA ESTOY REALIZANDO UNA APLIACION CON UN TMEMO Y NESECITO QUE LAS LINEAS QUE INSERTO TENGAN UN FORMAT DE 5 CARACTES POR COLUMNA COMO LE PUEDO HACER  :lightsabre:

8
C++ Builder / Stringgrid1
« en: Lunes 15 de Enero de 2007, 19:14 »
HOLA MIREN TENGO QUE ACER UN PUNTO DE VENTA Y LA VERDAD ES QUE YA CASI LO TERMINO SOLAMENTE QUE NESECITO REMOVER UNA FILA DE StringGrid1
USE LA PROPIEDAD ONSELECTCELL NO TENGO PROBLEMA PERO QUIERO LLAMAR LA PROPIEDA DESDE UN BOTON ME PUEDEN AYUDAR; :lightsabre:

9
C++ Builder / Re: Timedate.cpl
« en: Viernes 12 de Enero de 2007, 17:29 »
gracias por la ayuda

10
C++ Builder / Timedate.cpl
« en: Viernes 12 de Enero de 2007, 07:12 »
quisiera saber si se puede ejecutar el timedate.cpl desde builder ya que no puedo con el

WinExec ni con  ShellExecute(NULL,"OPEN","c:\WINDOWS\system32\timedate.cpl",NULL,NULL,SW_SHOWDEFAULT)

11
C++ Builder / Reloj De Windows
« en: Viernes 12 de Enero de 2007, 00:43 »
alguien me puede decir con que funcion o como puedo mandar llamar la ventana del reloj de windows xp

12
C++ Builder / Duda Png
« en: Martes 2 de Enero de 2007, 18:48 »
hola primero que todo hola buscando por la red encontre una libreria que supuestamente permite usar los png quisiera saber si alguien la tiene me dijiera como instalarla pues no lo he logrado ademas tambien quisiera saber si la version 2006  de builder soporta png  :hola:

13
Java / Insertar Filas
« en: Jueves 21 de Diciembre de 2006, 17:33 »
nesecito insertar fila po fila de una base de datos ayudenme me urge

14
Java / Base De Datos
« en: Miércoles 20 de Diciembre de 2006, 20:17 »
hola a todos estoy haciendo un gestor de tienda la verdad es que soy nuevo con la programacion en java todo va muy bien pero tengo un problema quiero que dentro de la ventana ventas solo agregue la fila o el registro que nesecito no que se vea toda la bd

15
C++ Builder / Re: Traer Una Imagen De Una Base De Datos A Un Dbimage
« en: Lunes 31 de Julio de 2006, 17:34 »
yo tambien lo quiero mi correo es quique.ast@gmail.com

16
C++ Builder / Re: Numeros A Letras
« en: Sábado 22 de Julio de 2006, 00:48 »
este solo cambia enteros ayuda por favor

17
C++ Builder / Re: Numeros A Letras
« en: Sábado 22 de Julio de 2006, 00:19 »
------------------------------------------
AnsiString Basic(int num);
AnsiString Num2Txt(double numero);

//funciona exportar
extern "C" __declspec(dllexport)AnsiString NumToTxt(double numero);

int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
{
        return 1;
}
//---------------------------------------------------------------------------
AnsiString NumToTxt(double numero){
return Num2Txt(numero);
}
//-----------------
AnsiString Basic(int num){
AnsiString texto,numero;
AnsiString unidades[10],decenas[9],centenas[3];
AnsiString miles,millones[2],odecena[10];
int i,j,l;
char N[80];

unidades[0]="cero";
unidades[1]="uno";
unidades[2]="dos";
unidades[3]="tres";
unidades[4]="cuatro";
unidades[5]="cinco";
unidades[6]="seis";
unidades[7]="siete";
unidades[8]="ocho";
unidades[9]="nueve";

decenas[0]="diez";
decenas[1]="veinte";
decenas[2]="treinta";
decenas[3]="cuarenta";
decenas[4]="cincuenta";
decenas[5]="sesenta";
decenas[6]="setenta";
decenas[7]="ochenta";
decenas[8]="noventa";

centenas[0]="cien";
centenas[1]="ciento";
centenas[2]="cientos";
miles="mil";

millones[0]="millon";
millones[1]="millones";

odecena[0]="once";
odecena[1]="doce";
odecena[2]="trece";
odecena[3]="catorce";
odecena[4]="quince";
odecena[5]="dieciseis";
odecena[6]="diecisiete";
odecena[7]="dieciocho";
odecena[8]="diecinueve";
odecena[9]="veinti";

numero=IntToStr(num);
//longitud del numero
l=strlen(numero.c_str());
strcpy(N,strrev(numero.c_str()));

for(i=l-1;i>=0;i--){

        //traduce centenas
        if(i==2){
                j=N-48;
                if(j!=1&&j!=5&&j!=7&&j!=9)
                        texto=unidades[j]+" ";
                if(j!=1&&j!=5&&j!=7&&j!=9)
                        texto+=centenas[2]+" ";
                else{
                        switch(j){
                                case 5: texto+="quinientos "; break;
                                case 7: texto+="setecientos "; break;
                                case 9: texto+="novecientos "; break;
                                case 1: if((N[j-1]-48)!=0)
                                                texto+=centenas[1]+" ";
                                        else
                                                texto+=centenas[0];
                        }
                }
        }

        //traduce decenas
        if(i==1){
                j=N-48;
                if(j>2){
                        if((N[i-1]-48)!=0)
                                texto+=decenas[j-1]+ " y ";
                        else
                                texto+=decenas[j-1];
                }else{
                         if(j==0) continue;
                         if((N[i-1]-48)==0){
                                texto+=decenas[j-1];
                         }else{
                                if(j==2){
                                        texto+=odecena[9];
                                }else{
                                        AnsiString Temp;
                                        int t;
                                        Temp=j;
                                        Temp+=N[i-1]-48;
                                        t=StrToInt(Temp);
                                        switch(t){
                                                case 11: texto+="once"; break;
                                                case 12: texto+="doce"; break;
                                                case 13: texto+="trece"; break;
                                                case 14: texto+="catorce"; break;
                                                case 15: texto+="quince"; break;
                                                case 16: texto+="diesiseis"; break;
                                                case 17: texto+="diesisiete"; break;
                                                case 18: texto+="diesiocho"; break;
                                                case 19: texto+="diesinueve"; break;
                                        }
                                        break;
                                }
                         }
                }
        }

        //traduce unidades
        if(i==0){
                j=N-48;
                if(j!=0)
                        texto+=unidades[j];
        }
}
return texto;
}
//---------------------------------------------------------------------------

AnsiString Num2Txt(double numero){
AnsiString temp,texto;
int num[6];
int l,i;

temp=FloatToStr(numero);
l=strlen(temp.c_str());

// traduce numero menores a 1000
if(l<=3)
        texto=Basic(numero);

//traduce numero mayores a 1000 y menores a un millon
if(l>3&&l<=6){
       i=l-2;
       num[0]=StrToInt(temp.SubString(i,3));
       num[1]=StrToInt(temp.SubString(0,l-3));
       if(num[1]>1)
               texto=Basic(num[1])+ " mil ";
       else
                texto="mil ";
       texto+=Basic(num[0]);
}

//traduce numeros mayores a un millon y menores a mil millones
if(l>6&&l<=9){
       i=l-2;
       num[0]=StrToInt(temp.SubString(i,3));
       i=l-5;
       num[1]=StrToInt(temp.SubString(i,3));
       num[2]=StrToInt(temp.SubString(0,l-6));
       if(num[2]>1)
               texto=Basic(num[2])+" millones ";
       else
                texto="un millon ";
       if(num[1]!=0)
               texto+=Basic(num[1]) +" mil ";
       texto+=Basic(num[0]);
}

//traduce numeros mayores a mil millones y menores a un billon
if(l>9&&l<=12){
       i=l-2;
       num[0]=StrToInt(temp.SubString(i,3));
       i=l-5;
       num[1]=StrToInt(temp.SubString(i,3));
       i=l-8;
       num[2]=StrToInt(temp.SubString(i,3));
       num[3]=StrToInt(temp.SubString(0,l-9));
       if(num[3]!=0)
               texto=Basic(num[3]) +" mil ";
       if(num[2]>1)
               texto+=Basic(num[2])+" millones ";
       else
                texto="un millon ";
       if(num[1]!=0)
               texto+=Basic(num[1]) +" mil ";
       texto+=Basic(num[0]);
}

//regresa la cadena
return texto;
} :lightsabre:  :kicking:  :smartass:  :comp:

18
C++ Builder / Numeros A Letras
« en: Sábado 22 de Julio de 2006, 00:16 »
este codigo encontre cambia numeros enteros a letras pero necesito implementarlo para que cambia numero flotante  a letras con dos decimales
ayuda

19
C++ Builder / Re: Econvert
« en: Viernes 21 de Julio de 2006, 18:25 »
este es el codigo el error lo marca donde calcula el label 9  y label 10


//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "main.h"
//The ZiC
// 2002
// Ejemplo de como carga la DLL NumToTxt.dll
// zic_98@hotmail.com
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
i=0;j=0,k=0;
Label1->Caption=0;
Label6->Caption=0;
Tabla2->Cells[0][0]=0;
Tabla2->Cells[1][0]=0;

}
//-----------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
j=j+1;
for(i=0;i<j;i++) {
if(Tabla2->Cells[0]==0 && Tabla2->Cells[1]==0) {
        ShowMessage("Introduce  Datos Correctos");}
else{
Label1->Caption=FormatFloat("#.#####",Label1->Caption.ToDouble()+(Tabla2->Cells[0].ToDouble()*Tabla2->Cells[1].ToDouble()));
Tabla2->Cells[2]=FormatFloat("#.#####",Tabla2->Cells[0].ToDouble()*Tabla2->Cells[1].ToDouble());
     }            }
{
Label9->Caption=FormatFloat("#.#####",Label1->Caption.ToDouble()* (0.15));
Label10->Caption=FormatFloat("#.#####",Label1->Caption.ToDouble()+Label9->Caption.ToDouble());
Edit1->Text=Label10->Caption;

typedef AnsiString(*funcion)(double);
funcion Num2Txt;

//carga de la dll dinamicamente
HINSTANCE dllinstance=LoadLibrary("NumToTxt.dll");
if(dllinstance==NULL) ShowMessage("Error al cargar la dll");

//busqueda de la direccion de la funcion
Num2Txt=(funcion)GetProcAddress(dllinstance,"_NumToTxt");
if(Num2Txt==NULL)
        ShowMessage("Error en la funcion");
else
        Edit2->Text=Num2Txt(StrToInt64(Edit1->Text));
FreeLibrary("NumToTxt.dll");



TStringList *Ar = new TStringList();

Ar->Clear();


Ar->Add(Edit17->Text);
Ar->Add(Edit16->Text);
Ar->Add(Edit18->Text + Edit19->Text + Edit20->Text +"   "+ Edit21->Text+ "   "+ Edit22->Text);


Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");

for(i=0;i<j;i++){

Ar->Add("          " + Tabla2->Cells[0]+"       "+ Tabla1->Cells[0] +"       "+ Tabla2->Cells[1]+"       " + Tabla2->Cells[2]);

                    }

Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");

                    Ar->Add("                                                         "+ Label1->Caption);
                    Ar->Add("                                                         "+ Label9->Caption);
                    Ar->Add("                                                         "+ Label10->Caption);
                    Ar->Add("                      "   +  Edit2->Text);

Ar->SaveToFile("archivo.txt");
delete Ar;

}
Label6->Caption=Label1->Caption;
Label1->Caption=0;
j=j-1;








}
//---------------------------------------------------------------------------


void __fastcall TForm1::DBGrid1CellClick(TColumn *Column)
{
Edit16->Text=(tbClientes->FieldByName("RFC")->AsString);
Edit17->Text=(tbClientes->FieldByName("NOMBRE O RAZON SOCIAL")->AsString);
Edit18->Text=(tbClientes->FieldByName("CALLE")->AsString);
Edit19->Text=(tbClientes->FieldByName("COLONIA")->AsString);
Edit20->Text=(tbClientes->FieldByName("CODIGO POSTAL")->AsString);
Edit21->Text=(tbClientes->FieldByName("CUIDAD")->AsString);
Edit22->Text=(tbClientes->FieldByName("ESTADO")->AsString);
Button5->Enabled=true;

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button5Click(TObject *Sender)
{

if( Tabla2->Cells[0]==0 && Tabla2->Cells[1]==0) {
                    Tabla2->Cells[0][j]=0;
                    Tabla2->Cells[1][j]=0;
 }
if( RadioButton2->Checked==true)
{

j++;
Tabla1->RowCount=j+1;
Tabla2->RowCount=j+1;
Button1->Enabled=true;
Tabla2->Cells[0][j]=0;
Tabla2->Cells[1][j]=0;
RadioButton2->Checked=true;
      }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{
j=j+1;
for(i=0;i<j;i++) {
if(Tabla2->Cells[0]==0 && Tabla2->Cells[1]==0) {
        ShowMessage("Introduce Datos");}
else{
Label1->Caption=Label1->Caption.ToDouble()+(Tabla2->Cells[0].ToDouble()*Tabla2->Cells[1].ToDouble());
Tabla2->Cells[2]=Tabla2->Cells[0].ToDouble()*Tabla2->Cells[1].ToDouble();
     }            }
{


TStringList *Ar = new TStringList();

Ar->Clear();


Ar->Add(Edit17->Text);
Ar->Add(Edit16->Text);
Ar->Add(Edit18->Text + Edit19->Text + Edit20->Text +"   "+ Edit21->Text+ "   "+ Edit22->Text);


Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");

for(i=0;i<j;i++){

Ar->Add("          " + Tabla2->Cells[0]+"       "+ Tabla1->Cells[0] +"       "+ Tabla2->Cells[1]+"       " + Tabla2->Cells[2]);

                    }

Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");
Ar->Add("  ");

                    Ar->Add("                                                                    "  + Label1->Caption);

Ar->SaveToFile("archivo.txt");
delete Ar;

}
Label6->Caption=Label1->Caption;
Label1->Caption=0;
j=j-1;


}
//---------------------------------------------------------------------------

void __fastcall TForm1::Tabla2GetEditMask(TObject *Sender, int ACol,
      int ARow, AnsiString &Value)
{
if( Tabla2->Col == 0 )
Value = "00000000";
if( Tabla2->Col == 1 )
Value = "00000000";
       
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Tabla2DrawCell(TObject *Sender, int ACol, int ARow,
      TRect &Rect, TGridDrawState State)
{
{
  {
if( ((TStringGrid *)Sender)->Focused( ) != true ){
if( ((TStringGrid *)Sender)->Row == ARow && ((TStringGrid *)Sender)->Col == ACol ){
((TStringGrid *)Sender)->Canvas->Brush->Color = ((TStringGrid *)Sender)->Color;
((TStringGrid *)Sender)->Canvas->FillRect( Rect );
((TStringGrid *)Sender)->Canvas->Font->Color = ((TStringGrid *)Sender)->Font->Color;
((TStringGrid *)Sender)->Canvas->TextOut( Rect.Left + 2, Rect.Top + 2, ((TStringGrid *)Sender)->Cells[ACol][ARow] );
}
}
}



}
       
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Tabla2KeyPress(TObject *Sender, char &Key)
{
{
{
    if((Key < '0' || Key > '9')&& Key != *"\b")
     Key=0;
}
 }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Tabla1GetEditMask(TObject *Sender, int ACol,
      int ARow, AnsiString &Value)
{
{
if( Tabla1->Col == 0 )
Value = "a a a a a a a a a a a a a a a a a a a a ";
}

}
//---------------------------------------------------------------------------

20
C++ Builder / Econvert
« en: Viernes 21 de Julio de 2006, 18:05 »
Por que me sale este erro dentro de mi programa EconvertError with Message cualquier numero con decimales is not avalid integer value ayuda por favor

Páginas: [1]