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

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ... 38
111  Programación / Desarrollo Web / BootStrap 3 sin Jquery [CODE] en: 19 Abril 2015, 20:34 pm
Hola a todos, quiero usar las plantillas CSS sin jquery.
Este es un ejemplo que encontre, lo estoy pasando a javascript.
Creo que ya resolvi la parte del navbar, si tienen sugerencias o detectan errores lo apreciaria mucho.

Código
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <meta charset="UTF-8">
  4. <title>Bootstrap 3 Responsive Layout Example</title>
  5. <link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.min.css">
  6. hasClass = function (el, cl) {
  7. var regex = new RegExp('(?:\\s|^)' + cl + '(?:\\s|$)');
  8. return !!el.className.match(regex);
  9. }
  10. function hideMenu(ob){
  11. var menuD = document.querySelector( ob.getAttribute('data-target') );
  12. if( hasClass(menuD, 'in') ){
  13. menuD.classList.remove('in');
  14. menuD.style.display = 'none';
  15. }
  16. }
  17. function hideSubMenu(ob){
  18. var menuD = ob.parentNode;
  19. if( hasClass(menuD, 'open') ){
  20. menuD.classList.remove('open');
  21. }
  22. }
  23. function showMenu(e){  
  24. var ob = e.target;
  25. var menuD = document.querySelector( ob.getAttribute('data-target') );
  26.  
  27. if( hasClass(menuD, 'in') ){
  28. menuD.classList.remove('in');
  29. menuD.style.display = 'none';
  30. }
  31. else {
  32. menuD.classList.add('in');
  33. menuD.style.display = 'block';
  34. }
  35. }
  36.  
  37. function showSubMenu(e){  
  38. var ob = e.target;
  39. var menuD = ob.parentNode;
  40. if( hasClass(menuD, 'open') ){
  41. menuD.classList.remove('open');
  42. }
  43. else {
  44. menuD.classList.add('open');
  45. }
  46. }
  47.  
  48. </script>
  49. </head>
  50. <nav id="myNavbar" class="navbar navbar-default navbar-inverse navbar-fixed-top" role="navigation">
  51.    <!-- Brand and toggle get grouped for better mobile display -->
  52.    <div class="container">
  53.        <div class="navbar-header">
  54.            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbarCollapse">
  55.                <span class="sr-only">Toggle navigation</span>
  56.                <span class="icon-bar"></span>
  57.                <span class="icon-bar"></span>
  58.                <span class="icon-bar"></span>
  59.            </button>
  60.            <a class="navbar-brand" href="#">Tutorial Republic</a>
  61.        </div>
  62.        <!-- Collect the nav links, forms, and other content for toggling -->
  63.        <div class="collapse navbar-collapse" id="navbarCollapse">
  64.            <ul class="nav navbar-nav">
  65.                <li class="active"><a href="http://www.tutorialrepublic.com" target="_blank">Home</a></li>
  66.                <li><a href="http://www.tutorialrepublic.com/about-us.php" target="_blank">About</a></li>
  67.                <li><a href="http://www.tutorialrepublic.com/contact-us.php" target="_blank">Contact</a></li>
  68. <li class="dropdown">
  69. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">Dropdown 1<span class="caret"></span></a>
  70.    <ul class="dropdown-menu" role="menu">
  71.  <li><a href="#">Components</a></li>
  72.  <li><a href="#">javascript</a></li>
  73. </ul>
  74. </li>
  75. <li class="dropdown">
  76. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button">Dropdown 2<span class="caret"></span></a>
  77.    <ul class="dropdown-menu" role="menu">
  78.  <li><a href="#">Action</a></li>
  79.  <li><a href="#">Another action</a></li>
  80.  <li><a href="#">Something else here</a></li>
  81.  <li class="divider"></li>
  82.  <li class="dropdown-header">Nav header</li>
  83.  <li><a href="#">Separated link</a></li>
  84.  <li><a href="#">One more separated link</a></li>
  85. </ul>
  86. </li>
  87.            </ul>
  88.        </div>
  89.    </div>
  90. </nav>
  91. <div class="container">
  92.    <div class="jumbotron">
  93.        <h1>Learn to Create Websites</h1>
  94.        <p>In today's world internet is the most popular way of connecting with the people. At <a href="http://www.tutorialrepublic.com" target="_blank">tutorialrepublic.com</a> you will learn the essential of web development technologies along with real life practice example, so that you can create your own website to connect with the people around the world.</p>
  95.        <p><a href="http://www.tutorialrepublic.com" target="_blank" class="btn btn-success btn-lg">Get started today</a></p>
  96.    </div>
  97.    <div class="row">
  98.        <div class="col-sm-6 col-md-4 col-lg-2">
  99.            <h2>HTML</h2>
  100.            <p>HTML is a markup language that is used for creating web pages. The HTML tutorial section will help you understand the basics of HTML, so that you can create your own web pages or website.</p>
  101.            <p><a href="http://www.tutorialrepublic.com/html-tutorial/" target="_blank" class="btn btn-success">Learn More &raquo;</a></p>
  102.        </div>
  103.        <div class="col-sm-6 col-md-4 col-lg-2">
  104.            <h2>CSS</h2>
  105.            <p>CSS is used for describing the presentation of web pages. The CSS tutorial section will help you learn the essentials of CSS, so that you can fine control the style and layout of your HTML document.</p>
  106.            <p><a href="http://www.tutorialrepublic.com/css-tutorial/" target="_blank" class="btn btn-success">Learn More &raquo;</a></p>
  107.        </div>
  108.        <div class="clearfix visible-sm-block"></div>
  109.        <div class="col-sm-6 col-md-4 col-lg-2">
  110.            <h2>Bootstrap</h2>
  111.            <p>Bootstrap is a powerful front-end framework for faster and easier web development. The Bootstrap tutorial section will help you learn the techniques of Bootstrap so that you can create web your own website with much less efforts.</p>
  112.            <p><a href="http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/" target="_blank" class="btn btn-success">Learn More &raquo;</a></p>
  113.        </div>
  114.        <div class="clearfix visible-md-block"></div>
  115.        <div class="col-sm-6 col-md-4 col-lg-2">
  116.            <h2>References</h2>
  117.            <p>The references section outlines all the standard HTML tags and CSS properties along with other useful references such as color names and values, symbols and character entities, web safe fonts, language codes, HTTP messages and much more.</p>
  118.            <p><a href="http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/" target="_blank" class="btn btn-success">Learn More &raquo;</a></p>
  119.        </div>
  120.        <div class="clearfix visible-sm-block"></div>
  121.        <div class="col-sm-6 col-md-4 col-lg-2">
  122.            <h2>Examples</h2>
  123.            <p>The examples section encloses an extensive collection of examples on various topic that you can try and test yourself using online HTML editor.</p>
  124.            <p><a href="http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/" target="_blank" class="btn btn-success">Learn More &raquo;</a></p>
  125.        </div>
  126.        <div class="col-sm-6 col-md-4 col-lg-2">
  127.            <h2>FAQ</h2>
  128.            <p>The collection of Frequently Asked Questions (FAQ) provides brief answers to many common questions related to web design and development.</p>
  129.            <p><a href="http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/" target="_blank" class="btn btn-success">Learn More &raquo;</a></p>
  130.        </div>
  131.    </div>
  132.    <hr>
  133.    <div class="row">
  134.        <div class="col-sm-12">
  135.            <footer>
  136.                <p>© Copyright 2013 Tutorial Republic</p>
  137.            </footer>
  138.        </div>
  139.    </div>
  140. </div>
  141. document.addEventListener('click', function(e) {
  142. var oMenu = document.getElementById('collapse');
  143. oMenu = document.querySelector('button.navbar-toggle');
  144. if(e.target == oMenu )
  145. showMenu(e);
  146. else if( hasClass(e.target, 'dropdown-toggle') )
  147. showSubMenu(e);
  148. else {
  149. hideMenu( oMenu );
  150. listaSub = document.getElementsByClassName('dropdown-toggle');
  151. for (i= 0; i < listaSub.length; i++) {
  152. hideSubMenu(listaSub[i]);
  153. }
  154. /*
  155. Array.prototype.forEach.call(listaSub, function(el) {
  156. // Do stuff with the element
  157. hideSubMenu(el);
  158. });*/
  159. }
  160. });
  161. </body>
  162. </html>                                
  163.  

saludos.
112  Sistemas Operativos / Windows / Re: [DUDA] ¿Como cambiar dirección MAC a tarjeta inalámbrica? en: 1 Abril 2015, 18:36 pm
Que raro que no te haya servido, lo he probado en win XP, 7 y 8 de 64bits sin problema, quizá te falto desactivar y activar.

Saludos.
113  Sistemas Operativos / Windows / Re: [DUDA] ¿Como cambiar dirección MAC a tarjeta inalámbrica? en: 31 Marzo 2015, 17:14 pm
En windows XP yo utilizo: etherchange www.ntsecurity.nu/downloads/etherchange.exe

El nod32 salta  :-(

seleccionas tu tarjeta y luego 1 para cambiar la MAC.





Por último desactivas y activas la conexion de tu tarjeta en conexiones red, para actualizar el cambio de MAC.

Saludos.
114  Programación / .NET (C#, VB.NET, ASP) / Re: Agregar Recurso a un archivo EXE [F1] en: 23 Marzo 2015, 17:42 pm
Gracias Elektro.
Ya probe tu ultimo codigo y funciona! asi me libro de liarme más con el formato PE
 
hice un pequeño cambio para el .net framework 2.0, ahora me agrega un recurso .resources, me toca leerlo desde el asembly  ;D gracias nuevamente

Código
  1. Public Sub addResources(ByVal pathRecurso As String, ByVal pathDll As String)
  2. Try
  3.    Dim resX As ResourceWriter
  4.    resX = new ResourceWriter(pathRecurso)
  5.    With resX
  6.        .AddResource("String Resource", "Hello World!" )
  7.    End With  
  8.    resX.Close()
  9.    ' Compile an assembly.dll that contains the ResX file as an embedded resource.
  10.    Dim codeProvider As CodeDomProvider = CodeDomProvider.CreateProvider("VB") ' or New VBCodeProvider()
  11.    Dim parameters As CompilerParameters = New CompilerParameters()
  12.    With parameters
  13.       .GenerateExecutable = False
  14.       .OutputAssembly = pathDll
  15.       .EmbeddedResources.Add(pathRecurso)
  16.    End With
  17.  
  18.   Dim results As CompilerResults = codeProvider.CompileAssemblyFromSource(parameters, "Public class ResourceClass : End Class")  
  19. msgbox("OK!")
  20. Catch ex As Exception
  21. msgbox(ex.Message)
  22.            End Try
  23. End Sub
  24.  

Una consulta sobre esta parte, entiendo que pasas los parametros de compilación, para que sirve "Public class..." o es que en este caso no es necesario?

Código
  1. Dim results As CompilerResults = codeProvider.CompileAssemblyFromSource(parameters, "Public class ResourceClass : End Class")
  2.  

Código:
Public Overridable Function CompileAssemblyFromSource ( _
options As CompilerParameters, _
ParamArray sources As String() _
) As CompilerResults

Parámetros

options
    Tipo: System.CodeDom.Compiler.CompilerParameters
    Objeto CompilerParameters que indica la configuración de compilador para esta compilación.

sources
    Tipo: System.String()
    Matriz de cadenas de código fuente que se van a compilar.



Saludos.
115  Programación / .NET (C#, VB.NET, ASP) / Re: Agregar Recurso a un archivo EXE [F1] en: 23 Marzo 2015, 16:00 pm
Hola, Eleкtro

Muchas gracias por compartir. Tu codigo anterior esta bueno pero no era lo que buscaba.
Lo último voy a probarlo si se acomoda a lo que busco.

Toda la semana he estado averiguando sobre el formato PE de .NET, escasa información, pero ya logro leer la estructura PE desde VB.Net, lo malo es que no hay punteros o por lo menos no funcionan como en C++.

Aqui un ejemplo para ilustrar mi problema, no puedo modificar los valores en memoria de "p" (Point) mediante punteros
Código
  1.   Public Sub example
  2.     Dim p As Point
  3.        p.x = 1   ' esto no puedo modificarlo mediante un puntero
  4.        p.y = 1
  5.        ' Initialize unmanged memory to hold the struct.
  6.        Dim pnt As IntPtr = Marshal.AllocHGlobal(Marshal.SizeOf(p))
  7.        Try
  8.            Dim msg As String = ""
  9.            ' Copy the struct to unmanaged memory.
  10.            Marshal.StructureToPtr(p, pnt, false)
  11.  
  12.            msg += ( "first point is " + p.x.ToString + " and " + p.y.ToString + "." & chr(10) )
  13.  
  14.            Dim anotherP As Point  ' Create another point
  15.  
  16.            ' Set this Point to the value of the
  17.            ' Point in unmanaged memory.
  18.            anotherP = Marshal.PtrToStructure(pnt,p.GetType)
  19.            anotherP.X +=  2  'modifico los valores pero en "p" no se alteran
  20.            anotherP.Y +=  2
  21.  
  22.            msg += ( "New point is " + anotherP.x.ToString + " and " + anotherP.y.ToString + "." & chr(10) )
  23.            msg += ( "first point is " + p.x.ToString + " and " + p.y.ToString + "." )
  24.            msgbox(msg)
  25.        Finally
  26.            ' Free the unmanaged memory.
  27.            Marshal.FreeHGlobal(pnt)
  28.        End Try
  29.    End Sub
  30.  

Saludos y muchas gracias.
116  Programación / .NET (C#, VB.NET, ASP) / Re: Agregar Recurso a un archivo EXE [F1] en: 16 Marzo 2015, 21:40 pm
Gracias por la info, voy a estudiarla, lo voy a hacer Vb.Net.
Luego te comento a donde llegue.

Saludos.
117  Programación / .NET (C#, VB.NET, ASP) / Re: Agregar Recurso a un archivo EXE [F1] en: 15 Marzo 2015, 17:41 pm
Gracias Eleкtro, por responder, pero el método que busco es sin el source del EXE.

Busco automatizar el proceso, es decir, crearme una aplicación que agregue recursos a un EXE .NET

Voy a averiguar sobre ILMerge, si tienes algun info?.
O sino voy a tener que meter mano al formato PE  >:(

Saludos.
118  Programación / .NET (C#, VB.NET, ASP) / Agregar Recurso a un archivo EXE [F1] en: 14 Marzo 2015, 23:59 pm
Estoy tratando de agregar un recurso a un ejecutable de vb.net, si alguien tiene info o sugerencia que compartir se lo agradeceria mucho.

No estoy intentando agregar el recurso en un proyecto, aclaro.
Según entiendo tendría que modificar el formato PE del exe, pero si hay algun otro método mejor  ;D.

Saludos.
119  Programación / Java / Re: [GPL] FXAudioPLayer en: 20 Febrero 2015, 15:04 pm
Otra vez me ganaste la idea :xD

Saludos.
120  Programación / Desarrollo Web / Re: [HTML5] Reproductor MP3 en: 18 Febrero 2015, 16:32 pm
Lo probe en firefox 14 y la interfaz se desconfigura un poco, requiere algunos cambios en Css para que sea compatible. En chrome no hay problema.

Por ahi tengo un codigo para reproducir mp3 o OGG por si el navegador no soporta mp3, lo malo es tener una copia de la musica en 2 formatos.
Usé la libreria minim.js por si te interesa

Saludos.
Páginas: 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ... 38
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines