Tutorial by Examples: del

When performance is a concern, invoking a method via reflection (i.e. via the MethodInfo.Invoke method) is not ideal. However, it is relatively straightforward to obtain a more performant strongly-typed delegate using the Delegate.CreateDelegate function. The performance penalty for using reflecti...
MySQL allows to specify from which table the matching rows must be deleted -- remove only the employees DELETE e FROM Employees e JOIN Department d ON e.department_id = d.department_id WHERE d.name = 'Sales' -- remove employees and department DELETE e, d FROM Emp...
public static void delete (String urlString, String contentType) throws IOException { HttpURLConnection connection = null; try { URL url = new URL(urlString); connection = (HttpURLConnection) url.openConnection(); connection.setDoInpu...
If we have a Model as following, from django.db import models from django.contrib.auth.models import User class UserModuleProfile(models.Model): user = models.OneToOneField(User) expired = models.DateTimeField() admin = models.BooleanField(default=False) employee_id = models...
DocumentDB supports deleting JSON documents using the DeleteDocumentAsync method of the DocumentClient class. await client.DeleteDocumentAsync(UriFactory.CreateDocumentUri(databaseName, collectionName, documentName));
Deleting a database will remove the database and all children resources (collections, documents, etc.). await this.client.DeleteDatabaseAsync(UriFactory.CreateDatabaseUri(databaseName));
Given the text file employee.txt 1|Arthur Dent 2|Marvin 3|Zaphod Beeblebrox $ mysqlimport --fields-terminated-by='|' mycompany employee.txt
This example is useful for windows-like endings: $ mysqlimport --lines-terminated-by='\r\n' mycompany employee.txt
> let m = Map.fromList [("Alex", 31), ("Bob", 99)] fromList [("Alex",31),("Bob",99)] > Map.delete "Bob" m fromList [("Alex",31)]
Delegates are types that represent a reference to a method. They are used for passing methods as arguments to other methods. Delegates can hold static methods, instance methods, anonymous methods, or lambda expressions. class DelegateExample { public void Run() { //using class ...
var client = new AmazonDynamoDBClient(); Table booksTable = Table.LoadTable(client, "Books"); // Store item Document book = new Document(); book["Title"] = "Cryptonomicon"; book["Id"] = 42; book["Authors"] = new List<string> { "Ne...
This example consists of two parts: first, we must define our Book type; second, we use it with DynamoDBContext. [DynamoDBTable("Books")] class Book { [DynamoDBHashKey] public int Id { get; set; } public string Title { get; set; } public List<string> Authors { ...
To use SQL syntax with model, that would transfer result to proper instantions, you should use directly one of Phalcon\Mvc\Model\Resultset classes: $users = new \Application\Models\Users(); // bitwise operation on `flag` field $sql = 'SELECT * FROM phorum.users WHERE (15 & (1 <&...
let's generate a DataFrame first: df = pd.DataFrame(np.arange(10).reshape(5,2), columns=list('ab')) print(df) # Output: # a b # 0 0 1 # 1 2 3 # 2 4 5 # 3 6 7 # 4 8 9 drop rows with indexes: 0 and 4 using drop([...], inplace=True) method: df.drop([0,4], inplace=True) ...
DELETE FROM [dbo].[Customers] WHERE CustomerName = 'Gorge'; INSERT INTO [dbo].[Customers] ([CustomerName]) VALUES ('George') SELECT * FROM [dbo].[Customers] Results CustomerIDCustomerName10001Jerry10003George
To delete a file (if you have required permissions) is as simple as: File.Delete(path); However many things may go wrong: You do not have required permissions (UnauthorizedAccessException is thrown). File may be in use by someone else (IOException is thrown). File cannot be deleted because ...
This command has several related yet distinct forms. del v If v is a variable, the command del v removes the variable from its scope. For example: x = 5 print(x) # out: 5 del x print(x) # NameError: name 'f' is not defined Note that del is a binding occurence, which means that unless expl...
You can concatenate strings separated by delimiter using the string_agg() function. If your individuals table is: NameAgeCountryAllie15USAAmanda14USAAlana20Russia You could write SELECT ... GROUP BY statement to get names from each country: SELECT string_agg(name, ', ') AS names, country FROM ...
The time for Scheduler Tasks are measured in Ticks. Under normal conditions, there are 20 ticks per second. Tasks scheduled with .scheduleSyncDelayedTask will be run on the Main Thread Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { @Override public void run() { ...
To round out simple examples of CRUD operations, we present the following examples. Always use great care in deleting documents. (: When we know the URI, we can delete it very easily :) let $uri := "/stuff/mysimpledocument.xml" return xdmp:document-delete($uri) or simplified: xdmp:d...

Page 13 of 23