Tutorial by Examples: di

Get all files in Directory var FileSearchRes = Directory.GetFiles(@Path, "*.*", SearchOption.AllDirectories); Returns an array of FileInfo, representing all the files in the specified directory. Get Files with specific extension var FileSearchRes = Directory.GetFiles(@Path, "*...
By going to Settings >> Keymap A window will popup showing All the Editor Actions with the their name and shortcuts. Some of the Editor Actions do not have shortcuts. So right click on that and add a new shortcut to that. Check the image below
Having more than one element with the same ID is a hard to troubleshoot problem. The HTML parser will usually try to render the page in any case. Usually no error occurs. But the pace could end up in a mis-behaving web page. In this example: <div id="aDiv">a</div> <div id...
Pressing C-h a will run the emacs function apropos-command which makes emacs prompt for words (or a regexp) to search for. It will then show a buffer containing a list of names and descriptions related to that topic, including key bindings for each of the functions available via keystrokes. Pressin...
C-h k runs the function describe-key, which looks up the function mapped to the key strokes provided, and presents a description of the function which will be run when these keys are pressed. C-h c runs the function describe-key-briefly, which only displays the function name mapped to given key seq...
By default Code First includes in model Types defined as a DbSet property in context class. Reference types included in entity types even if they are defined in different assembly. Derived classes even if only the base class is defined as DbSet property Here is an example, that we are only...
<?php $to = '[email protected]'; $subject = 'Sending an HTML email using mail() in PHP'; $message = '<html><body><p><b>This paragraph is bold.</b></p><p><i>This text is italic.</i></p></body></html>'; $headers =...
# Deny access to a directory from the IP 255.0.0.0 <Directory /path/to/directory> order allow,deny deny from 255.0.0.0 allow from all </Directory> # Deny access to a file from the IP 255.0.0.0 <FilesMatch "^\.ht"> order allow,deny deny fro...
Here is a quick reference for advanced insertion, formatting, and filtering commands/shortcuts. Command/ShortcutResultg + ? + mPerform rot13 encoding, on movement mn + ctrl + a+n to number under cursorn + ctrl + x-n to number under cursorg + q+ mFormat lines of movement m to fixed width:rce wCenter...
When your app crashes, Xcode will enter the debugger and show you more information about the crash: The most important parts are: The red arrow The red arrow displays which line of code crashed & why it crashed. The debugger console Many crashes log more information to the debugger consol...
It is common for company to set up it's own nuget server for distribution of packages across different teams. Go to Solution Explorer and click Right Mouse button then choose Manage NuGet Packages for Solution In window that opens click on Settings Click on + in top right corner the...
def to_flare_json(df, filename): """Convert dataframe into nested JSON as in flare files used for D3.js""" flare = dict() d = {"name":"flare", "children": []} for index, row in df.iterrows(): parent = row[...
Basic Text Email <?php $mail = new PHPMailer(); $mail->From = "[email protected]"; $mail->FromName = "Full Name"; $mail->addReplyTo("[email protected]", "Reply Address"); $mail->Subject = "Subject Text"; $mail->Body ...
<?php $to = '[email protected]'; $subject = 'Email Subject'; $message = 'This is the email message body'; $attachment = '/path/to/your/file.pdf'; $content = file_get_contents($attachment); /* Attachment content transferred in Base64 encoding MUST be split into chunk...
<?php $mail = new PHPMailer(); $mail->From = "[email protected]"; $mail->FromName = "Full Name"; $mail->addReplyTo("[email protected]", "Reply Address"); $mail->addAddress("[email protected]", "Recepient Name&quot...
<?php $mail = new PHPMailer(); $mail->From = "[email protected]"; $mail->FromName = "Full Name"; $mail->addReplyTo("[email protected]", "Reply Address"); $mail->Subject = "Subject Text"; $mail->Body = "This is...
Basic Text Email <?php $sendgrid = new SendGrid("YOUR_SENDGRID_API_KEY"); $email = new SendGrid\Email(); $email->addTo("[email protected]") ->setFrom("[email protected]") ->setSubject("Subject Text") ->setTex...
<?php $sendgrid = new SendGrid("YOUR_SENDGRID_API_KEY"); $email = new SendGrid\Email(); $email->addTo("[email protected]") ->setFrom("[email protected]") ->setSubject("Subject Text") ->setText("This is a ...
Find files larger than 15MB: find -type f -size +15M Find files less than 12KB: find -type f -size -12k Find files exactly of 12KB size: find -type f -size 12k Or find -type f -size 12288c Or find -type f -size 24b Or find -type f -size 24 General format: find [options] -siz...
When using vim from the command line, you can suspend vim and get back to your prompt, without actually quitting vim. Hence you will later be able to get back your vim session from the same prompt. When in Normal mode (if not, press esc to get there), issue either of these commands: :stenter :s...

Page 82 of 164