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

 

 


Tema destacado: Trabajando con las ramas de git (tercera parte)


  Mostrar Temas
Páginas: 1 [2] 3 4 5 6 7 8 9 10 11 12
11  Programación / Desarrollo Web / mostrar varios componentes con angular en: 29 Enero 2018, 05:08 am
Quiero mostrar 2 componentes, los componentes se llaman teken-view y label-view, entonces en mi pagina principal index.html tiene el siguiente contenido:

Código:
<script src="bundle.js"></script>

<body ng-app="app">

<teken-view></teken-view>
<label-view></label-view>
</body>
uso webpack, mi archivo webpack.config.js es:

Código:
var path = require('path');

module.exports = {
  entry: [
    './node_modules/angular/angular.min.js',
    './public/app/app.js',
    './public/label/labe.js'
  ],
  output: {
    path: path.join(__dirname + '/public'),
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
        query: {
          presets: ['es2015']
        }
      },
      {
        test: /\.css$/,
        exclude: /node_modules/,
        loader: 'style-loader!css-loader'
      }
    ]
  }
};

mi app.js

Código:
import angular from 'angular';

class AppCtrl {
  constructor() {
    this.repo_name = 'inicio de la app';
  }
}

var appView = function app() {
  return {
    templateUrl: 'app/app.html',
    controller: 'AppCtrl',
    controllerAs: 'app'
  }
};

var app = angular.module("app", []);
app.directive("tekenView", appView);
app.controller('AppCtrl', AppCtrl);
el file app.html

Código:
<div>
    <h2>Hello AngularJS!</h2>
    <div class="repo">{{app.repo_name}}</div>
</div>
ahora los archivos del otro componente: labe.js

Código:
import angular from 'angular';


class LabelCtrl {
    constructor() {
        this.repo_name = 'JALAs';
    }
}

var labelView = function app() {
    return {
        templateUrl: 'label/label.html',
        controller: 'LabelCtrl',
        controllerAs: 'app'
    }
};

var app = angular.module("label", []);
app.directive("labelView", labelView);
app.controller('LabelCtrl', LabelCtrl);
file label.html

Código:
<div>
    <h2>Segundo componente!</h2>
</div>
pero solo muestra el contenido del componente teken-view

  • Hello AngularJS!

    inicio de la app

mi codigo se encuentra en:https://github.com/x-rw/Angular-components-Express-Webpack
12  Programación / Desarrollo Web / Se puede obtener la letra de una cancion? en: 23 Enero 2018, 23:19 pm
quiero obtener la letra(en texto) de canciones, aunque no toda la letra perfecta.

como puedo obtener la letra, hay algun algoritmo?
13  Seguridad Informática / Seguridad / en realidad hackers de la deepweb puedes hackear? en: 16 Julio 2017, 00:27 am
quiero obtener un id y password de un docente de mi universidad y no se si sea posible obtenerlo, en realidad quiero obtener una cuenta de docente cualquier docente, el sitio web de mi universidad no parece ser tan seguro que digamos, esta hecho en php y como server tiene xampp, es un sistema antiguo a inicios de los 90 y fueron parchandolo poco a poco.

14  Comunicaciones / Redes / saber quien te roba el wifi, tengo la mac y esta en mi red en: 31 Octubre 2016, 17:36 pm
alguna herramienta que te muestre en un mapa quien es el que te roba el wifi?
tengo la mac de su computadora
15  Programación / Desarrollo Web / necesito ayuda con proyecto machine learning en: 29 Octubre 2016, 09:41 am
necesito ayuda para proyecto de machine learning, le pagare por sus conocimientos,
16  Programación / Desarrollo Web / cambiar el color en: 28 Octubre 2016, 00:56 am

    
Código:
chrome.browserAction.onClicked.addListener(function(tab) {
  chrome.tabs.executeScript({
    code: 'document.getElementById(textarea_simulator).style.backgroundColor="red"'
  });
});
});
//author --
17  Foros Generales / Foro Libre / alguien sabe la teoria de fft fast fourier tranformation? en: 19 Octubre 2016, 16:44 pm
fast fourier tranformation es muy interesante para la invesitgacion de proyectos pero algunas cosas no logro entender muy bien, serian muy amables de poder leer y asi entre todos entender mejor
18  Programación / Desarrollo Web / obtener captcha con curl en: 17 Octubre 2016, 19:34 pm
encontre este codigo en internet, y quiero obtener su captcha de esta pagina http://www.ruat.gob.bo/vehiculos/consultageneral/InicioBusquedaVehiculo.jsf

su captcha se genera cada ves que refresco la pagina, es posible obtenerlo?

Código
  1. <?php
  2.  
  3.    $cookie="cookie.txt";
  4.  
  5.    function open($url)
  6.    {
  7.        $ch = curl_init();
  8.  
  9.        curl_setopt($ch, CURLOPT_URL,$url);  
  10.        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2');
  11.        curl_setopt($ch, CURLOPT_HEADER, 0);
  12.        curl_setopt($ch, CURLOPT_COOKIE, 1);
  13.        curl_setopt($ch, CURLOPT_COOKIEJAR,$cookie);
  14.        curl_setopt($ch, CURLOPT_COOKIEFILE,$cookie);
  15.        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  16.        curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  17.        curl_setopt ($ch, CURLOPT_REFERER, $url);
  18.        $result = curl_exec($ch);  
  19.        curl_close($ch);
  20.  
  21.        return $result;
  22.    }
  23.  
  24.    function between($string, $start, $end)
  25.    {
  26.        $out = explode($start, $string);
  27.  
  28.        if(isset($out[1]))
  29.        {
  30.            $string = explode($end, $out[1]);
  31.            echo $string[0];
  32.            return $string[0];
  33.        }
  34.  
  35.        return '';
  36.    }
  37.  
  38.    function get_captcha()
  39.    {
  40.        $url    = 'https://academics.vit.ac.in/student/stud_login.asp';
  41.        $open   = open($url);
  42.        $code   = between($open, '<img src='https://academics.vit.ac.in/student/captcha.asp', '">');
  43.        return 'https://academics.vit.ac.in/student/captcha.asp' . $code;
  44.  
  45.    }
  46.  
  47.    function rahul()
  48.    {
  49.        $capth=htmlspecialchars($_POST['code']);
  50.  
  51.        echo $capth;
  52.  
  53.        $username="xyz";
  54.        $password="abc";
  55.        $url=url of the form in which you want to submit your data;
  56.        $cookie="cookie.txt";
  57.        $veri=$capth;
  58.  
  59.        $com="Login";
  60.  
  61.        $postdata = "regno=".$username."&passwd=".$password."&vrfcd=".$veri."&submit=".$com;
  62.  
  63.        $ch = curl_init();
  64.        curl_setopt ($ch, CURLOPT_URL, $url);
  65.        curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  66.        curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
  67.        curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
  68.        curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
  69.        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  70.        curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
  71.        curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookie);  // <-- add this line
  72.        curl_setopt ($ch, CURLOPT_REFERER, $url);
  73.  
  74.        curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
  75.        curl_setopt ($ch, CURLOPT_POST, 1);
  76.        $result = curl_exec ($ch);
  77.  
  78.        echo $result;  
  79.  
  80.        $data = curl_exec($ch);
  81.    }
  82. ?>
  83.  
  84. <html>
  85.    <body>
  86.        <form action="" method="post">
  87.            <img src="<?php echo get_captcha(); ?>" border="0" /><br />
  88.            <input type="text" name="code" value="<?= isset($_POST['code']) ? htmlspecialchars($_POST['code']) : '' ?>" /><br />
  89.            <input type="submit" name="submit" value="submit"/>
  90.        </form>
  91.  
  92.        <?php
  93.            if(isset($_POST['submit'])) {
  94.                rahul();
  95.            }
  96.        ?>
  97.    </body>
  98. </html>
19  Programación / Desarrollo Web / se puede pasar contenido de txt a .json? en: 17 Octubre 2016, 03:21 am
tengo varios archivos .txt igual a este contenido

Código:
0 69 164
0 71 117
0 73 84
0 79 80
0 82 83
0 82 115
0 83 154
0 84 48
1 69 104
1 71 100
1 73 83
1 79 82
1 82 121
1 83 117
1 84 46
2 69 204
2 71 94
2 73 85
2 79 102
2 82 88
2 82 147
2 83 87
2 84 42

lo quiero pasar a .json

se puede?  cada columna con diferentes campos en el .json
20  Programación / Desarrollo Web / enviar formulario de una web ajena desde mi formulario de mi proyecto (cURL) en: 11 Octubre 2016, 01:44 am
enviar formulario de una web ajena desde mi formulario de mi proyecto


no se como enviar datos desde mi propio formulario a la pagina ajena y una vez hacer el envio de datos en la pagina ajena, obtener el resultado de la consulta. es posible hacerlo?

creo que esto puede servir http://www.anerbarrena.com/jquery-post-5064/
Páginas: 1 [2] 3 4 5 6 7 8 9 10 11 12
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines