Tutorial by Examples: del

1) BASIC SIMPLE WAY Database-driven applications often need data pre-seeded into the system for testing and demo purposes. To make such data, first create the seeder class ProductTableSeeder use Faker\Factory as Faker; use App\Product; class ProductTableSeeder extends DatabaseSeeder { pub...
The delete operator deletes a property from an object. Syntax: delete object.property delete object['property'] Returns: If deletion is successful, or the property did not exist: true If the property to be deleted is an own non-configurable property (can't be deleted): false in non...
When Oracle implicitly converts from a DATE to a string or vice-versa (or when TO_CHAR() or TO_DATE() are explicitly called without a format model) the NLS_DATE_FORMAT session parameter will be used as the format model in the conversion. If the literal does not match the format model then an excepti...
To destroy, delete, or unset an array: unset array To destroy, delete, or unset a single array element: unset array[10]
Ever wanted to call a multicast delegate but you want the entire invokation list to be called even if an exception occurs in any in the chain. Then you are in luck, I have created an extension method that does just that, throwing an AggregateException only after execution of the entire list complete...
The view-model is the "VM" in MVVM. This is a class that acts as a go-between, exposes the model(s) to the user interface (view), and handling requests from the view, such as commands raised by button clicks. Here is a basic view-model: public class CustomerEditViewModel { /// <s...
The model is the first "M" in MVVM. The model is usually a class containing the data that you want to expose via some kind of user interface. Here is a very simple model class exposing a couple of properties:- public class Customer : INotifyPropertyChanged { private string _forenam...
Given a file file.txt with the following content: line 1 line 2 line 3 You can delete a line from file content with the d command. The pattern to match is surrounded with default / delimiter and the d command follows the pattern: sed '/line 2/d' file.txt The above command will output: l...
From within a generator function, the control can be delegated to another generator function using yield*. function* g1() { yield 2; yield 3; yield 4; } function* g2() { yield 1; yield* g1(); yield 5; } var it = g2(); console.log(it.next()); // 1 console.log(it.next())...
To delete persisted objects use delete(): session.delete(obj) Actual deletion from the database will happen on next flush.
You can bind to a property on a named element, but the named element must be in scope. <StackPanel> <CheckBox x:Name="MyCheckBox" IsChecked="True" /> <TextBlock Text="{Binding IsChecked, ElementName=MyCheckBox}" /> </StackPanel>
The official style guide is located on the homepage and generally goes for: readability (instead of compactness) ease of modification clean diffs This means that, for example, this: homeDirectory : String homeDirectory = "/root/files" evaluate : Boolean -> Bool evalua...
Delegates may have variant type parameters. delegate void Action<in T>(T t); // T is an input delegate T Func<out T>(); // T is an output delegate T2 Func<in T1, out T2>(); // T1 is an input, T2 is an output This follows from the Liskov Substitution Principle, w...
Shortest match: $ a='I am a string' $ echo "${a#*a}" m a string Longest match: $ echo "${a##*a}" string
Shortest match: $ a='I am a string' $ echo "${a%a*}" I am Longest match: $ echo "${a%%a*}" I
Let's start with example. Here is a very simple example HTML. Example HTML <html> <head> </head> <body> <ul> <li> <a href="some_url/">Link 1</a> </li> &l...
SP.SOD.executeOrDelayUntilScriptLoaded( function(){ deleteItem(1); }, "sp.js"); function deleteItem(id){ var clientContext = new SP.ClientContext(); var list = clientContext.get_web().get_lists().getByTitle("List Title"); var item = list.getItemById(id); it...
With ng-model you can bind a variable to any type of input field. You can display the variable using double curly braces, eg {{myAge}}. <input type="text" ng-model="myName"> <p>{{myName}}</p> As you type in the input field or change it in any way you will s...
class Skill(models.Model): name = models.CharField(max_length=50) description = models.TextField() class Developer(models.Model): name = models.CharField(max_length=50) skills = models.ManyToManyField(Skill, through='DeveloperSkill') class DeveloperSkill(models.Model): ...
Code lens is a simple way to know what happens with the code. Here you could find an image with the number of references of a method or class. If you can't see the code lens please see this question: Missing CodeLens references count in VS 2015 Community edition

Page 5 of 23