UdeF
UdeF
Reputation Top 1%
UdeF bob
24 Snippets  (29th place)
Published
4 Channels
Created
5 Channels
Following
4758 points  (23rd place)
Reputation
Top 5% Publisher
Junior Code Generator
Serious Code Generator
Senior Code Generator
Senior Publisher
Junior Topic Creator
Junior Topic Hub
Serious Topic Hub
Junior Trend Maker
Junior Popular Coder
Serious Popular Coder
Senior Popular Coder
Master Popular Coder
Junior Autobiographer
Senior Autobiographer
Master Autobiographer

Recent Snippets See all snippets by UdeF

public by UdeF  3920  0  4  4

AngularJS - filter model

<!doctype html>
<html ng-app>
  <head>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
    <script>
        function UsersCtrl($scope) {
            $scope.users = [
                { name: "Camila Gilson" },
                { name: "Chloe Creighton" },
                { name: "Zoey White" },
                { name: "Claire Campbell" },
                { name: "Kylie Smith" },
                { name: "Charlotte Gilson" }
            ];
            
            $scope.title = 'User list';
        }
    </script>
  </head>
  <body>
    <div ng-controller="UsersCtrl">
        <h1>{{title}}</h1>
        Search: <input ng-model="search">
        <ul>
            <li ng-repeat="user in users | filter:search">
                {{user.name | uppercase}}
            </li>
        </ul>
    </div>
  </body>
</html>
;

public by UdeF  2319  1  5  0

AngularJS - ng-model

<!doctype html>
<html ng-app>
  <head>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
  </head>
  <body>
    <div>
      <label>Name:</label>
      <input ng-model="yourName" type="text" placeholder="Enter a name here">
      <hr>
      <h1>Hello {{yourName}}!</h1>
    </div>
  </body>
</html>                        
;

public by UdeF  2441  1  5  0

AngularJS - ng-repeat

<!doctype html>
<html ng-app>
  <head>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
    <script>
        function UsersCtrl($scope) {
            $scope.users = [{name: "Jonh", age: 21}, 
                            {name: "Alice", age: 29}];
        }
    </script>
  </head>
  <body>
    <div ng-controller="UsersCtrl">
        <ul>
            <li ng-repeat="user in users">
                Name: {{user.name}}, {{user.age}} years old.
            </li>
        </ul>
    </div>
  </body>
</html>            
;

public by UdeF  2110  0  5  0

Regex - Wörter am Ende eines Textes finden

Mit diesem RegEx Beispiel können Wörter am Ende eines Textes emittelt werden.
<?php
$pattern	= '!\b(Wort)$!';
$subject	= 'Wir Suchen ein Wort';
if (preg_match('!\b(Wort)$!' , $subject)){ echo "OK, $subject passt";
} else {
echo "Fehler, $subject passt nicht";
}
?>
;

public by UdeF  1979  0  5  0

Regex - Wörter am Anfang eines Textes finden

Mit diesem RegEx Beispiel können Wörter am Anfang eines Textes emittelt werden.
<?php
$pattern	= '!^(Wort)\b!';
$subject	= 'Wort am Anfang des Textes suchen';
if (preg_match('!^(Wort)\b!' , $subject)){ echo "OK, $subject passt";
} else {
echo "Fehler, $subject passt nicht";
}
?>    
;