Tutorial by Examples: c

Set dict = CreateObject("Scripting.Dictionary") Tools> References> Microsoft Scripting Runtime Associated DLL: ScrRun.dll Source: Windows OS Scripting.Dictionary object MSDN-Dictionary Object
public static class MyHelpers { public static MvcHtmlString MyCustomDiv(this HtmlHelper htmlHelper, string text, object htmlAttributes = null) { var mainTag = new TagBuilder("div"); mainTag.MergeAttributtes(htmlAttributes); mainTag.AddCssClas...
Let's create a small piece of code that throws an exception: private void button1_Click(object sender, EventArgs e) { string msg = null; msg.ToCharArray(); } If we execute this, we get the following Exception and stack trace: System.NullReferenceException: "Object reference not...
Set createInternetExplorerObject = CreateObject("InternetExplorer.Application") Tools> References> Microsoft Internet Controls Associated DLL: ieframe.dll Source: Internet Explorer Browser MSDN-InternetExplorer object Controls an instance of Windows Internet Explorer through...
Django Model Form with Django Class Based view is a classic way of building pages to do create/update operations in django application quickly. Within the form we can put methods to execute tasks. Its a cleaner way to put tasks in forms rather than putting in views/models. To give an example using ...
Built-in forms are great but sometimes there is a need to customize them, adding new fields or simply changing CSS attributes. This example is applicable to several use cases but here it is presented regarding PasswordChangeForm and its use in a Bootstrap website. The solution is to create another...
The connection between the widget and the scrollbar goes both ways. The scrollbar needs to be expanded vertically so that it has the same height as the widget. text = tk.Text(parent) text.pack(side="left") scroll_y = tk.Scrollbar(parent, orient="vertical", command=text.yview...
The principle is essentially the same as for the Text widget, but a Grid layout is used to put the scrollbars around the widget. canvas = tk.Canvas(parent, width=150, height=150) canvas.create_oval(10, 10, 20, 20, fill="red") canvas.create_oval(200, 200, 220, 220, fill="blue")...
Ubuntu: $ cat /proc/cpuinfo Sample Output: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz stepping : 11 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings ...
Follow following steps to try out a sample application on AWS ECS service as a proof of concept. Login to AWS management console and go to AWS service catalog - > Compute - > Ec2 Create a VM(EC2 instance) using amazon linux 64 bit OS, this we will use to configure docker, git, AWS ECS agen...
GameScene code example: import SpriteKit protocol GameViewControllerDelegate: class { func callMethod(inputProperty:String) } class GameScene: SKScene { weak var gameViewControllerDelegate:GameViewControllerDelegate? override func didMove(to view: SKView) { gameViewContro...
Navigate to phpMyAdmin by URL http://your_ip/phpmyadmin or http://localhost/phpmyadmin Login using username root and root password. Click on Databases tab. Enter database name, select collation (you may leave it to default) and click create. Click on Privileges tab and select "Add user a...
Source Link Open the Terminal and write the following commands. 1-Update and upgrade package your system ubuntu: sudo su sudo apt-get -y update sudo apt-get -y upgrade sudo apt-get -y dist-upgrade sudo apt-get -y autoremove 2-Installing Dependenices: sudo apt-get install libopencv...
GraphicsContext provides a set of methods to draw and fill geometric shapes. Typically, these methods need coordinates to be passed as their parameters, either directly or in a form of an array of double values. The coordinates are always relative to the Canvas, whose origin is at the top left corne...
Online demo is here: http://ext4all.com/post/extjs-4-mvc-application-architecture.html Define a model: // /scripts/app/model/User.js Ext.define('AM.model.User', { extend: 'Ext.data.Model', fields: ['id', 'name', 'email'] }); Define a store with proxy: // /scripts/app/store/Users.js...
$ grep root /etc/passwd root:x:0:0:root:/root:/bin/bash operator:x:11:0:operator:/root:/sbin/nologin
From the tool-bar open the Java Perspective. Create a new Java project Right-click into the Package Explorer, and from the menu select New -> Java Project In the upcoming dialog enter a project name, then click Finish. Now you have the new project in your workspace. Create a new Java ...
In Python 3.6, PEP 487 added the __init_subclass__ special method, which simplifies and extends class customization without using metaclasses. Consequently, this feature allows for creating simple plugins. Here we demonstrate this feature by modifying a prior example: Python 3.x3.6 class Base: ...
Sub TransposeRangeValues() Dim TmpArray() As Variant, FromRange as Range, ToRange as Range set FromRange = Sheets("Sheet1").Range("a1:a12") 'Worksheets(1).Range("a1:p1") set ToRange = ThisWorkbook.Sheets("Sheet1").Range("a1")...

Page 697 of 826