mercredi 24 août 2016

passing url parameters in angular

I'm trying to pass some url parameter between view to get the detail of a particular user but i'm finding it hard to do

.controller('profile_detail_ctrl',['$scope','$http','$state',function($scope,$http,$state){
$http.get('http://localhost/myapp/app_ion/templates/profile/profile.php?profile_id='+$scope.profile_detail).success(function(data){
       $scope.profile_detail=data;
       $scope.profile_id=$state.params.profile_id;

   });

Centered (h&v) 16:9 iframe that uses as much screen estate as possible but refrains from being cropped anywhere

Requirements:

HTML:

<div class="container">
    <iframe></iframe>
</div>

CSS:

.container {
   width:90vw;
   height:50vh;
}

Now if I resize the browser (vertically OR horizontally) the video should not be cropped and no scrollbars should appear.

How to achieve this?

static html page in CakePHP

I have a static html page in cakePHP application which I want to link in my route.php file. $routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'index']); It uses the controller file and adds header, footer, css, JS, etc to the index.ctp but how can I have the page as it is without adding code or using any controller? (like linking to static html page).

Work with content wrapped with Scrolloverflow.js + Fullpage.js

I use Fullpage.js together with Scrolloverflow plugin for my template:

$('#fullpage').fullpage({
    scrollOverflow: true,
    afterRender: function() {
        $("nav").on("click", "a", function() {
            ...
        }
    }
});

On the official website they say that I need to use delegation in order to work with content wrapped by the Scrolloverflow plugin. However, it doesn't seem to work in my case, because the click event doesn't work in my example. Any ideas?

How can i use idUser in a password_resets (laravel 5.2)

I want to use the table password_resets that I obtained with the comand php artisan make:auth, but this table use the "email" and this is not right because if my users change their email in their profile then is a problem to identify them, i want to use the "idUser" in the table "password_resets" instead of "email".

Where can i change this in the code????

Gulp: How do I read file content into a variable?

I have a gulp task that needs to read a file into a variable, and then use its content as input for a different function that runs on the files in the pipe. How do I do that?

Example psuedo-psuedo-code

gulp.task('doSometing', function() {
  var fileContent=getFileContent("path/to/file.something"); //How?

  return gulp.src(dirs.src + '/templates/*.html')
    .pipe(myFunction(fileContent))
    .pipe(gulp.dest('destination/path));
});

Unable to load dynamic library php_pdo_oci.dll%1 is not a valid win32 application - phpstorm

I'm trying to load the phppdo_oci.dll lib to interact with my oracle database on my website, but I can't load it because of this error:

A PHP Error was encountered

Severity: Core Warning

Message: PHP Startup: Unable to load dynamic library 'C:phpextphp_pdo_oci.dll' - %1 n�est pas une application Win32 valide.

Filename: Unknown

Line Number: 0

Backtrace:

I'm using phpstorm and php 5.6.22