elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado:


  Mostrar Mensajes
Páginas: [1] 2 3
1  Programación / Desarrollo Web / Ayuda con CakePHP en: 28 Octubre 2011, 16:49 pm
Saludos mi problema es que no me esta reconociendo mi aplicación... estoy haciendo un videotutorial de youtube... para aprender este frame... pero me he atorado en algo.. ya instale y ya tengo mi localhost (wamp)...

Tengo mi controlador:

Citar
tareas_controller.php:

<?php
class TareasController extends AppController{
var $name ='Tareas';

function index(){
$this->set('tareas', $this->Tarea->find('all'));
}

}
?>

Tengo mi modelo:
Citar
tarea.php:

<?php
class Tarea extends AppModel {
var $name ='Tarea';
}
?>

Tengo mi vista (con error):
Citar
index.ctp:

<h2>Tareas</h2>
<?php if (empty($tareas)): ?>
No hay tareas en esta lista
<?php else: ?>
<table>
<tr>
<th>Titulo</th>
<th>Estatus</th>
<th>Creado</th>
<th>Modificado</th>
<th>Acciones</th>
</tr>
<?php foreach($tareas as $tarea): ?>
<tr>
<td>
<?php echo $tarea['Tarea']['titulo'] ?>
</td>
<td>
<?php
if ($tarea['Tarea']['hecha']) echo "Hecha";
else echo "Pendiente";
?>
</td>
<td>
<?php echo $tarea ['Tarea']['creado'] ?>
</td>
<td>
<?php echo $tarea ['Tarea']['modificado'] ?>
</td>
<td>
<!-- acciones en las tareas seran añadidas mas tarde -->
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif: ?>
<?php echo $html->link('Agregar Tarea', array('action'=>'add')); ?>

y cuando abro mi http://localhost/listatareas/tareas/index
me sale este error:

Citar

y mis carpetas las tengo bien distribuidas:

Citar
2  Programación / Desarrollo Web / Problema con mi ligthbox en: 23 Octubre 2011, 19:44 pm
Primero buenas tardes/noches/dias a todos :)... estoy intentando hacer este efecto:

http://www.lokeshdhakar.com/projects/lightbox2/

pero... u.u

Segun hice todas las indicaciones que me van diciendo en el lightbox, pero una mis imagenes se van para atras... cuando descomento esta etiqueta comentada "hasta el final claro":
<!--<div id="Layer1"><img src="FondoIndex.png" alt="1007x649" width="1007"

y cuando la comento le doy clic en la imagen y solamente me abre otra ventana donde esta la imagen... que si tengo bien acomodadas mis carpetas? si.. estan todas en una sola carpeta... "Pruebas: las imagenes del final de este post."

Espero que me puedan a ayudar a solucionar mi problema :(...

Citar
Código
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <title>Documento sin t&iacute;tulo</title>
  5. <style type="text/css">
  6. <!--
  7. #Layer1 {
  8. position:absolute;
  9. left:0px;
  10. top:0px;
  11. width:44px;
  12. height:24px;
  13. z-index:1;
  14. }
  15. #Layer2 {
  16. position:absolute;
  17. left:139px;
  18. top:73px;
  19. width:218px;
  20. height:32px;
  21. z-index:2;
  22. }
  23. .Estilo1 {color: #FFFFFF}
  24. #Layer5 { position:absolute;
  25. left:724px;
  26. top:534px;
  27. width:75px;
  28. height:30px;
  29. z-index:16;
  30. }
  31. #Layer3 {
  32. position:absolute;
  33. left:147px;
  34. top:162px;
  35. width:590px;
  36. height:64px;
  37. z-index:17;
  38. }
  39. -->
  40. </style>
  41. <script type="text/javascript">
  42. <!--
  43. function MM_swapImgRestore() { //v3.0
  44.  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  45. }
  46.  
  47. function MM_preloadImages() { //v3.0
  48.  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  49.    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  50.    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  51. }
  52.  
  53. function MM_findObj(n, d) { //v4.01
  54.  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  55.    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  56.  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  57.  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  58.  if(!x && d.getElementById) x=d.getElementById(n); return x;
  59. }
  60.  
  61. function MM_swapImage() { //v3.0
  62.  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  63.   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  64. }
  65.  
  66.  
  67.  
  68. <style type="text/css">
  69. <!--
  70. #Layer4 {
  71. position:absolute;
  72. left:170px;
  73. top:463px;
  74. width:439px;
  75. height:63px;
  76. z-index:18;
  77. }
  78.  
  79. -->
  80. </style>
  81. //-->
  82. <script type="text/javascript" src="js/prototype.js"></script>
  83. <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
  84. <script type="text/javascript" src="js/lightbox.js"></script>
  85.  
  86. </script>
  87.  
  88. <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
  89. </head>
  90.  
  91.  
  92. <body onload="MM_preloadImages('Button1.png')" link="#FFFFFF" vlink="#FFFFFF" alink="#00CCFF">
  93.  
  94. <!--<div id="Layer1"><img src="FondoIndex.png" alt="1007x649" width="1007" height="649" longdesc="BackGroundIndex" /></div>
  95. <div id="Layer2">
  96.  <h1 align="center" class="Estilo1">&iquest;Que es el Cyberpunk?</h1>
  97. </div>
  98. <div id="Layer5"><a href="Index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','Button1.png',1)"><img src="Button2.png" alt="ButtonAtras" name="Image2" width="150" height="25" border="0" id="Image2" /></a></div>
  99. <div id="Layer3">
  100.  <p class="Estilo1"> El termino Cyberpunk fue originalmente acu&ntilde;ado por Bruce Bethke como titulo de una relato corto, publicado en 1983. </p>
  101.  <p class="Estilo1">El<em> cyberpunk</em> es un subg&eacute;nero que toma su nombre de la combinaci&oacute;n de <em>cibern&eacute;tica</em> y <em>punk</em>,   con lo cual podr&iacute;a definirse como un mix de ciencia avanzada,   tecnolog&iacute;as de la informaci&oacute;n y cibern&eacute;tica, a lo que a&ntilde;adir&iacute;amos un   grado de desintegraci&oacute;n o cambio radical en el orden social.</p>
  102.  <p class="Estilo1"> Seg&uacute;n <em>Lawrence Person</em>, <em>los</em> <em>cyberpunk</em>s <em>son   seres marginados, alejados, solitarios, que viven al margen de la   sociedad, generalmente en futuros dist&oacute;picos donde la vida diaria es   impactada por el r&aacute;pido cambio tecnol&oacute;gico, una atm&oacute;sfera de informaci&oacute;n   computarizada ubicua y la modificaci&oacute;n invasiva del cuerpo humano</em>.   </p>
  103.  </div>-->
  104.  
  105.  <!--¡Imagenes! con framework-->
  106. <div id="Layer4"><a href="Cyber1.jpg" rel="lightbox[roadtrip]"><img src="Cyber1.jpg" width="75" height="95" longdesc="Image#1" /></a>
  107.  
  108. <a href="Cyber2.jpg" rel="lightbox[roadtrip]"><img src="Cyber2.jpg" width="75" height="95"longdesc="Image#2" /></a>
  109.  
  110. <a href="Cyber3.jpg" rel="lightbox[roadtrip]"><img src="Cyber3.jpg" width="75" height="95" longdesc="Image#3" /></a></div>
  111.  
  112. </body>
  113. </html>
  114.  


Citar
3  Programación / Desarrollo Web / Re: Problemas con las entradas de mi blog en: 2 Octubre 2011, 21:45 pm
¿Si fueras burrito rebusnaras mas? debes editar las opciones en configuración del blog, ve a la opción formato y hay editas, muy simple...

De ninguna de las 2 maneras logre corregir :/
4  Programación / Programación General / Dudas con mi Micro Z80 en: 29 Septiembre 2011, 07:23 am
Disculpen me estoy basando de este libro para hacer mi I.S.A. del micro Z80: www.zilog.com/docs/z80/um0080.pdf
Tengo este codigo inicial, para poder empezar a programar mis instrucciones:

Obviamente lo estoy haciendo en pascal, tengo muchas malas espinas, siento que me falta algo o siento que estoy mal en algo, espero me puedan decir, que me falta para poder empezar a programar mis instrucciones...

Y si de paso tienen algun material que me pueda facilitar el programado de mi I.S.A. micro se los agradeceria.

Citar
Código
  1. {$inline on}
  2. {$define DEBUG}
  3.  
  4. program emulador8080;
  5.  
  6. {$ifdef DEBUG}
  7. uses
  8.  crt    //Necesaria para el procedimiento clrscr
  9.  ;
  10. {$endif}
  11.  
  12. const
  13.  MAXMEM = $FFFF;
  14.  MAXPUERTOS= $FF;
  15.  VECTOR_RESET = $0000;
  16.  
  17. type
  18.  TDirMem = 0..MAXMEM;
  19.  TDirPuertos = 0..MAXPUERTOS;
  20.  
  21.  TMemoria = array[TDirMem] of byte;
  22.  TPuertos = array[TDirPuertos] of byte;
  23.  
  24.  TPSW = record
  25.    S,    
  26.    Z,
  27.    H, {Half Carry}
  28.    P, {Parity/Overflow}
  29.    N, {Add/Substract}
  30.    C {Carry} : boolean;
  31.  end;
  32.  
  33. var
  34.  Mem : TMemoria;
  35.  Puertos : TPuertos;
  36.  PSW : TPSW;
  37.  {General Purpose Register}
  38.  {Main Register Set}
  39.  A,
  40.  B,C,
  41.  D,E,
  42.  H,L,    
  43.  {Alternate Register Set}
  44.  A1,
  45.  B1,C1,
  46.  D1,E1,
  47.  H1,L1    : byte;
  48.  {Special Purpose Register}
  49.  IX,IY,SP,PC: word;
  50.  {I= Interruptor, R= Refresh}
  51.  I,R    : byte;
  52.  
  53.  INTE  : boolean;
  54.  Halt  : boolean;  
  55.  
  56. {=============================================================================
  57.  Interfaz de control del Emulador =============================================================================}
  58.  
  59. {$IFDEF DEBUG}
  60.  
  61. function Desensamblado(I: byte): string;
  62.  function NombreRegistro(r : byte): string; inline;
  63.  var
  64.    op  : string;
  65.  begin
  66.    case r of
  67.    0: op := 'B';
  68.    1: op := 'C';
  69.    2: op := 'D';
  70.    3: op := 'E';
  71.    4: op := 'H';
  72.    5: op := 'L';
  73.    6: op := '[HL]';
  74.    7: op := 'A';
  75.    end;
  76.    NombreRegistro := op;
  77.  end;
  78.  
  79. begin
  80.    case I of        {Decodify}
  81.    $00:  Desensamblado := 'NOP';        {Execute}
  82.  end;
  83. end;
  84.  
  85. procedure Interfaz_CargarContenidoMemoria;
  86. var
  87.  F : file of byte;
  88.  Nombre : string;
  89.  i     : word;
  90.  b     : byte;
  91. begin
  92.  write('Nombre del archivo: '); readln(Nombre);
  93.  assign(F, Nombre);
  94.  system.reset(F);
  95.  i := 0;
  96.  while not eof(F) do
  97.  begin
  98.    read(F,b);
  99.    Mem[i] := b;
  100.    i := i + 1;
  101.  end;
  102.  close(F);
  103. end;
  104.  
  105. procedure Interfaz_GuardarContenidoMemoria;
  106. var
  107.  F : file of byte;
  108.  Nombre : string;
  109.  i     : word;
  110. begin
  111.  write('Nombre del archivo: '); readln(Nombre);
  112.  assign(F, Nombre);
  113.  system.rewrite(F);
  114.  for i := 0 to MAXMEM do
  115.    write(F,Mem[i]);
  116.  close(F);
  117. end;
  118.  
  119. procedure Interfaz_Desplegar;
  120.  procedure DesplegarPSW;
  121.  begin
  122.    with PSW do
  123.    begin
  124.      if S then write('S(X)') else write('S( )');
  125.      if Z  then write(' Z(X)') else write(' Z( )');
  126.      if H  then write(' H(X)') else write(' H( )');
  127.      if P  then write(' P(X)') else write(' P( )');
  128.      if N  then write(' N(X)') else write(' N( )');
  129.      if C  then writeln(' C(X)') else writeln(' C( )');
  130.    end;
  131.  end;
  132. var
  133.  S,s2 : char;
  134.  valor : byte;
  135.  valor16 : word;
  136. begin
  137.  clrscr;
  138.  DesplegarPSW;
  139.  writeln('A= ', A);
  140.  write('B= ', B);    writeln(' C= ', C);
  141.  write('D= ', D);    writeln(' E= ', E);
  142.  write('H= ', H);    writeln(' L= ', L);
  143.  writeln('IX= ', IX);
  144.  writeln('IY= ', IY);
  145.  writeln('SP= ', SP);
  146.  writeln('PC= ', PC);
  147.  write('I= ', I); writeln(' : ', Desensamblado(i));
  148.  write('Q=salir, [ABCDEHL]=regs, F=PSW, M=mem, X=IX, Y=IY, P=PC, S=SP, R=leer, W=escribir, ENTER=continuar: ');
  149.  readln(S);
  150.  S := upcase(S);
  151.  case S of
  152.  'Q': Halt := true;
  153.  'A': begin
  154.          write('A= '); readln(valor);
  155.          A := valor;
  156.       end;
  157.  'B': begin
  158.          write('B= '); readln(valor);
  159.          B := valor;
  160.       end;
  161.  'C': begin
  162.          write('C= '); readln(valor);
  163.          C := valor;
  164.       end;
  165.  'D': begin
  166.          write('D= '); readln(valor);
  167.          D := valor;
  168.       end;
  169.  'E': begin
  170.          write('E= '); readln(valor);
  171.          E := valor;
  172.       end;
  173.  'F': begin
  174.          write('Bandera [SZHPNC]'); readln(S2);
  175.          S2 := upcase(S2);
  176.          case S2 of
  177.          'S':    PSW.S  := not PSW.S;
  178.          'Z':    PSW.Z  := not PSW.Z;
  179.          'H':    PSW.H  := not PSW.H;
  180.          'P':    PSW.P  := not PSW.P;
  181.          'N':    PSW.N  := not PSW.N;
  182.          'C':  PSW.C  := not PSW.C;
  183.          end;
  184.       end;
  185.  'H': begin
  186.          write('H= '); readln(valor);
  187.          H := valor;
  188.       end;
  189.  'L': begin
  190.          write('L= '); readln(valor);
  191.          L := valor;
  192.       end;
  193.  'P': begin
  194.          write('PC= '); readln(valor16);
  195.          PC := valor16;
  196.       end;
  197.  'S': begin
  198.          write('SP= '); readln(valor16);
  199.          SP := valor16;
  200.       end;
  201.  'M': begin
  202.          write('Dir= '); readln(valor16);
  203.          write('valor= '); readln(valor);
  204.          Mem[valor16] := valor;
  205.       end;
  206.  'R': Interfaz_CargarContenidoMemoria;
  207.  'X': begin
  208.          write('IX= '); readln(valor16);
  209.          IX := valor16;
  210.       end;
  211.  'Y': begin
  212.          write('IY= '); readln(valor16);
  213.          IY := valor16;
  214.       end;
  215.  'W': Interfaz_GuardarContenidoMemoria;
  216.  end;
  217. end;
  218.  
  219. {$ENDIF}
  220.  
  221. {=============================================================================
  222.  Funciones relativas al PSW  =============================================================================}
  223.  
  224. function PSW_ParidadPar: boolean; inline;
  225. var
  226.  conta : byte;    //Número de 1's presentes en A
  227.  i     : byte;
  228. begin
  229.  conta := 0;
  230.  for i := 0 to 7 do
  231.    conta := conta + (A shr i) and $01;
  232.  PSW_ParidadPar := (conta mod 2) = 0;
  233. end;
  234.  
  235. procedure PSW_ActualizarLogico(temp  : byte); inline;
  236. begin
  237.  with PSW do
  238.  begin
  239.    S  := (temp and $80) = $80;    
  240.    Z  := temp = $00;    
  241.    H := false;
  242.    P  := PSW_ParidadPar;    
  243.    C  := false;
  244.  end;
  245. end;
  246.  
  247. procedure PSW_ActualizarAritmetico(r1, r2 : byte; temp : word); inline;
  248. begin
  249.  with PSW do
  250.  begin
  251.    S  := (temp and $80) = $80;
  252.    Z  := temp = $00;
  253.    PSW.H := ((temp xor r1 xor r2) and $10) = $10;
  254.    P  := PSW_ParidadPar;
  255.    PSW.C  := temp > 255;
  256.  end;
  257. end;
  258.  
  259. {=============================================================================
  260.  Funciones relativas a la ALU  =============================================================================}
  261.  
  262. function ALU_add(r1, r2, Cin : byte): byte; inline; {ADD}
  263. var
  264.  temp : word;
  265. begin
  266.  temp   := r1 + r2 + Cin;
  267.  PSW_ActualizarAritmetico(r1, r2, temp);
  268.  ALU_add := temp;
  269. end;
  270.  
  271. function ALU_sub(r1, r2, Bin : byte): byte; inline; {Subtract}
  272. var
  273.  temp : word;
  274. begin
  275.  temp   := r1 - r2 - Bin;
  276.  PSW_ActualizarAritmetico(r1, r2, temp);
  277.  ALU_sub := temp;
  278. end;
  279.  
  280.  
  281. function ALU_and(r1, r2 : byte): byte; inline;  {Logical AND}
  282. var
  283.  temp : byte;
  284. begin
  285.  temp := r1 and r2;
  286.  PSW_ActualizarLogico(temp);
  287.  ALU_and := temp;
  288. end;
  289.  
  290. function ALU_or(r1, r2 : byte): byte; inline; {Logical OR}
  291. var
  292.  temp : byte;
  293. begin
  294.  temp := r1 or r2;
  295.  PSW_ActualizarLogico(temp);
  296.  ALU_or := temp;
  297. end;
  298.  
  299. function ALU_xor(r1, r2 : byte): byte; inline; {Logical Exclusive OR}
  300. var
  301.  temp : byte;
  302. begin
  303.  temp := r1 xor r2;
  304.  PSW_ActualizarLogico(temp);
  305.  ALU_xor := temp;
  306. end;
  307.  
  308. function ALU_bcd(r : byte): byte; inline;
  309. var
  310. temp:byte;
  311. begin
  312.  temp:=(r and $0f);
  313.  ALU_bcd:=((r shr 4)*16)+temp;
  314. end;
  315.  
  316. {=============================================================================
  317.  Funciones relativas a la Unidad de Control =============================================================================}
  318.  
  319. procedure CPU_VerificarInterrupciones;
  320. begin
  321. end;
  322.  
  323. procedure CPU_Reset;
  324. begin
  325.  A := $00;
  326.  B := $00;    C := $00;
  327.  D := $00;    E := $00;
  328.  H := $00;    L := $00;
  329.  with PSW do
  330.  begin
  331.    S := false;    
  332.    Z := true;
  333.    H := false;    
  334.    P  := false;    //NOTA : Checar      
  335.    C := false;
  336.  end;
  337.  SP := MAXMEM;
  338.  PC := VECTOR_RESET;
  339.  Halt := false;
  340.  INTE := true; {NOTA: Los estudiante deben verificar esto.}
  341. end;
  342.  
  343. {=============================================================================
  344.  Funciones relativas a la Memoria =============================================================================}
  345.  
  346. function Memoria_Leer(d : word): byte; inline;
  347. begin
  348.  Memoria_Leer := Mem[d];
  349. end;
  350.  
  351. procedure Memoria_Escribir(d : word; b : byte); inline;
  352. begin
  353.  Mem[d] := b;
  354. end;
  355.  
  356. function Memoria_DecodificarDirecto: word; inline;
  357. begin
  358.  Memoria_DecodificarDirecto := (Memoria_Leer(PC+2) shl 8) or Memoria_Leer(PC+1);
  359. end;
  360.  
  361. function Memoria_LeerInmediato: byte; inline;
  362. begin
  363.  Memoria_LeerInmediato := Memoria_Leer(PC+1);
  364. end;
  365.  
  366. function Memoria_LeerDirecto: byte; inline;
  367. begin
  368.  Memoria_LeerDirecto := Memoria_Leer( Memoria_DecodificarDirecto );
  369. end;
  370.  
  371. procedure Memoria_EscribirDirecto(v : byte);
  372. begin
  373.  Memoria_Escribir( Memoria_DecodificarDirecto, v );
  374. end;
  375.  
  376. function Memoria_LeerPila: word; inline;
  377. var
  378.  alto, bajo : byte;
  379. begin
  380.  bajo := Memoria_Leer(SP);
  381.  SP := SP + 1;
  382.  alto := Memoria_Leer(SP);
  383.  SP := SP + 1;
  384.  Memoria_LeerPila := (alto shl 8) or bajo;
  385. end;
  386.  
  387. procedure Memoria_EscribirPila(v : word);
  388. begin
  389.  SP := SP - 2;
  390.  Memoria_Escribir(SP, v and $00FF);
  391.  Memoria_Escribir(SP+1, (v shr 8) and $00FF);
  392. end;
  393.  
  394. {=============================================================================
  395.  Funciones relativas a los Registros
  396.  =============================================================================}
  397.  
  398. procedure Registros_Escribir(r : byte; v : byte);
  399. begin
  400.  case r of
  401.  $00: B := v;
  402.  $01: C := v;
  403.  $02: D := v;
  404.  $03: E := v;
  405.  $04: H := v;
  406.  $05: L := v;
  407.  $06: Mem[(H shl 8) or L] := v;
  408.  $07: A := v;
  409.  end;
  410. end;
  411.  
  412. function Registros_Leer(r : byte): byte; inline;
  413. var
  414.  op  : byte;
  415. begin
  416.  case r of
  417.  0: op := B;
  418.  1: op := C;
  419.  2: op := D;
  420.  3: op := E;
  421.  4: op := H;
  422.  5: op := L;
  423.  6: op := Mem[(H shl 8) or L];
  424.  7: op := A;
  425.  end;
  426.  Registros_Leer := op;
  427. end;
  428.  
  429. function Registros_LeerPar(I : byte): word; inline;
  430. var
  431.  r : byte;
  432.  temp : word;
  433. begin
  434.  r := (I and $30) shr 4;
  435.  case r of
  436.  $00: temp := (B shl 8) or C;
  437.  $01: temp := (D shl 8) or E;
  438.  $02: temp := (H shl 8) or L;
  439.  $03: temp := SP;
  440.  end;
  441.  Registros_LeerPar := temp;
  442. end;
  443.  
  444. procedure Registros_EscribirPar(I: byte; v : word);
  445. var
  446.  r : byte;
  447. begin
  448.  r := (I and $30) shr 4;
  449.  case r of
  450.  $00: begin
  451.        B := (v and $FF00) shr 8;
  452.        C := (v and $00FF);
  453.      end;
  454.  $01: begin
  455.        D := (v and $FF00) shr 8;
  456.        E := (v and $00FF);
  457.      end;
  458.  
  459.  $02: begin
  460.        H := (v and $FF00) shr 8;
  461.        L := (v and $00FF);
  462.      end;
  463.  
  464.  $03: SP := v;
  465.  end;
  466. end;
  467.  
  468. procedure IXIY(Registro : boolean);
  469. var
  470. Reg: word;
  471. begin
  472.      if Registro= true then
  473.      Reg:=IX
  474.      else Reg:=IY;
  475.    PC:=PC+1;
  476.    I:=Mem[PC];
  477. end;
  478.  
  479. {=============================================================================
  480.  Instrucciones del Procesador  Z80 =============================================================================}
  481.  
  482. procedure InstruccionDesconocida( ByteCode : byte);
  483. begin
  484.  writeln(stderr, 'Instrucción desconocida: ', ByteCode);
  485.  PC := PC + 1;
  486. end;
  487.  
  488. procedure NOP;
  489. begin
  490.  PC := PC + 1;
  491. end;
  492.  
  493. {=============================================================================
  494.  R U T I N A   P R I N C I P A L   D E L   E M U L A D O R  
  495.  =============================================================================}
  496. begin
  497.  {Arranque de la máquina (RESET)}
  498.  CPU_Reset;
  499.  {Ciclo de Instrucción}
  500.  repeat
  501.    I := Mem[PC];    {Fetch}
  502.    case I of        {Decodify}
  503.    $00:  NOP;        {Execute}
  504.    else
  505.      InstruccionDesconocida(I);
  506.    end;
  507.    if INTE then
  508.      CPU_VerificarInterrupciones;
  509. {$ifdef DEBUG}
  510.    Interfaz_Desplegar;
  511. {$endif}
  512.  until Halt;
  513. end.
  514.  
5  Programación / Desarrollo Web / Problemas con las entradas de mi blog en: 29 Septiembre 2011, 00:10 am
Se supone que en mi blog estE: www.editado.blogspot.com
tengo puesto que me salgan 5 entradas pero me sale solo una entrada...

Ya me he ido a Diseño > Entradas del Blog > Editar >(Opciones de la página principal)
Número de entradas en la página principal.

Y le cambio el numero a 5 y en el combobox ya prove con las 2 opciones: Dias de entrada y entradas, y mis demas opciones las tengo asi como se daran cuenta en mi imagen:

Citar
6  Programación / .NET (C#, VB.NET, ASP) / Re: Problemas con mi combobox en VB 2010 en: 24 Septiembre 2011, 22:22 pm
Creen que podrian ayudarme mas... "para no tener que crear temas nuevos..."

Tengo el boton de Editar...

"connection must be valid and open" me sale ese error...
con el siguiente codigo en el boton Editar :S:

Citar
txt_apellido.Enabled = True
        txt_nombre.Enabled = True
        txt_telefono.Enabled = True

        'Dim cmd As MySqlCommand
        Dim lectura As MySqlDataReader
        Dim cmd As MySqlCommand = New MySqlCommand("Select *  from usuarios where id=" & cmb_id.Text.ToString)
        Try
            cmd.Connection = conexion.Mysqlcon

            lectura = cmd.ExecuteReader
            lectura.Read()

            conexion.iniciar()
            conexion.Mysqlcon.Open()
            cmd = New MySqlCommand("UPDATE usuarios SET nombre= '" + txt_nombre.Text + "',apellido='" + txt_apellido.Text + "', telefono='" + txt_telefono.Text + "' WHERE id=" & cmd.ToString)
            MsgBox(cmd)
            cmd.ExecuteNonQuery()
            MsgBox("Se ha Actualizado satisfactoriamente", MsgBoxStyle.Information)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

Saben porque me sale ese error? :S
7  Programación / .NET (C#, VB.NET, ASP) / Re: Problemas con mi combobox en VB 2010 en: 24 Septiembre 2011, 22:01 pm
Bueno tambien veo que ahi pones

da.Fill(ds)

intenta poniendo antes de eso
ds = new DataSet()
da.Fill(ds)

Bueno talvez te funcione algo asi me sucedia a mi antes, pero lo arreglue algo asi, no recuerdo bien jeje

:O bendito seas .mokk! gracias :) me funciono :)
8  Programación / .NET (C#, VB.NET, ASP) / Re: Problemas con mi combobox en VB 2010 en: 24 Septiembre 2011, 21:48 pm
lo que pasa es que vos estas relacionando el combo con un origen de datos, en este caso es un datatable con registros, para usar el clear() debes cargar los items recorriendo el datatable e insertando los registros con Combo.Items.Add, pero para cuando tenes relacionado un datatable creeria que con hacer Combo1.Datasource = Nothing se te limpia el combo.

saludos.

lo intento hacer con el
cmb_id.DataSource = Nothing
antes de llamarlo igual no me hace nada :/

me pasa lo mismo...
:(
9  Programación / .NET (C#, VB.NET, ASP) / Re: Problemas con mi combobox en VB 2010 en: 24 Septiembre 2011, 21:43 pm
Código:
cmb_id.Items.Clear()

Gracias rudy pero mi problema creo que va mas alla que solo un .clear() :(...
ve lo que me sale man :/

Citar

y lo intento hacer con el
cmb_id.DataSource = Nothing
antes de llamarlo igual no me hace nada :/
10  Programación / .NET (C#, VB.NET, ASP) / Problemas con mi combobox en VB 2010 en: 24 Septiembre 2011, 20:57 pm
Saludos, mi problema es con mi combobox... lo cargo con este codigo en el FORM_LOAD:


Citar
Sub combollenado()
        conexion.iniciar()
        conexion.Mysqlcon.Open()
        'cmb_id.Items.Clear()
        'cmb_id.DataSource = Nothing
        cmd = New MySqlCommand("select id from usuarios", conexion.Mysqlcon)
        da = New MySqlDataAdapter(cmd)
        da.Fill(ds)
        cmb_id.DataSource = ds.Tables(0)
        cmb_id.DisplayMember = ds.Tables(0).Columns(0).Caption.ToString
        conexion.Mysqlcon.Close()
    End Sub

Me lo llena bien

Citar

Y cuando le doy clic en el boton guardar
Me sale de la siguiente manera:

Citar

Alguien podria ayudarme porfavor.... :(
Páginas: [1] 2 3
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines