Tutorial by Examples: sin

using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Xml; using System.Xml.Linq; using ApplicationDataServices.SBEntityBox; namespace ApplicationManagementLayer.Affiliate { public cl...
Once you've connected to your mailbox, you'll want to take a look inside. The first useful command is imap_list. The first parameter is the resource you acquired from imap_open, the second is your mailbox string and the third is a fuzzy search string (* is used to match any pattern). $folders = ima...
You can return a list of all the messages in a mailbox using imap_headers. <?php $headers = imap_headers($mailbox); The result is an array of strings with the following pattern: [FLAG] [MESSAGE-ID])[DD-MM-YYY] [FROM ADDRESS] [SUBJECT TRUNCATED TO 25 CHAR] ([SIZE] chars) Here's a sample o...
Passing ByRef or ByVal indicates whether the actual value of an argument is passed to the CalledProcedure by the CallingProcedure, or whether a reference (called a pointer in some other languages) is passed to the CalledProcedure. If an argument is passed ByRef, the memory address of the argument i...
Objective-C First add the Social Framework to the XCode project. Import the #import "Social/Social.h" class to the required ViewController Twitter with text, image and link //- - To Share text on twitter - - if([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) ...
// myString is "hi" NSMutableString *reversedString = [NSMutableString string]; NSInteger charIndex = [myString length]; while (charIndex > 0) { charIndex--; NSRange subStrRange = NSMakeRange(charIndex, 1); [reversedString appendString:[myString substringWithRange:subS...
Typically, packages consist of one or more modules. As packages grow, it may be useful to organize the main module of the package into smaller modules. A common idiom is to define those modules as submodules of the main module: module RootModule module SubModule1 ... end module SubModul...
Download the .jar file from vaadin add-ons And put it in the lib folder of WEB-INF then right click on the .jar file and click on to Build Path --> Add To Build Path
In C, all arguments are passed to functions by value, including structs. For small structs, this is a good thing as it means there is no overhead from accessing the data through a pointer. However, it also makes it very easy to accidentally pass a huge struct resulting in poor performance, particula...
An example of a constraint as expressed in the C standard is having two variables of the same name declared in a scope1), for example: void foo(int bar) { int var; double var; } This code breaches the constraint and must produce a diagnostic message at compile time. This is very usef...
We have a DataListComponent that shows a data we pull from a service. DataListComponent also has a PagerComponent as it's child. PagerComponent creates page number list based on total number of pages it gets from the DataListComponent. PagerComponent also lets the DataListComponent know when user c...
A palindrome is a word that can be read both ways, like 'kayak'. This example will show how to find if a given word is a palindrome using Python3. First, we need to turn a string into a stack (we will use arrays as stacks). str = "string" stk = [c for c in str] #this makes an array: [&...
Viewchild offers one way interaction from parent to child. There is no feedback or output from child when ViewChild is used. We have a DataListComponent that shows some information. DataListComponent has PagerComponent as it's child. When user makes a search on DataListComponent, it gets a data fro...
If you're Using VueJS2 and like to use JSX along with it. In this case,to use the slot, the solution with example is below.We have to use this.$slots.default It's almost like this.props.children in React JS. Component.js : export default { render(h) { //eslint-disable-line return ( ...
An easy way to get an input from a user is by using the prompt() method. Syntax prompt(text, [default]); text: The text displayed in the prompt box. default: A default value for the input field (optional). Examples var age = prompt("How old are you?"); console.log(age); // Pri...
Assuming a default server running on localhost with the default port, the command to connect to that Redis server would be: $redis = new Redis(); $redis->connect('127.0.0.1', 6379);
The Redis PHP module gives access to the same commands as the Redis CLI client so it is quite straightforward to use. The syntax is as follow: // Creates two new keys: $redis->set('mykey-1', 123); $redis->set('mykey-2', 'abcd'); // Gets one key (prints '123') var_dump($redis->get('m...
This is an example of using until/retries/delay to implement an alive check for a webapp that is starting up. It assumes that there will be some period of time (up to 3 minutes) where the webapp is refusing socket connections. After that, it checks the /alive page for the word "OK". It als...
XML <House> <LivingRoom> <plant name="rose"/> </LivingRoom> <TerraceGarden> <plant name="passion fruit"/> <plant name="lily"/> <plant name="golden duranta"/> ...
Add arbitrary paths to the Maya Python environment in the userSetup.py file. userSetup.py is a Python file (not a module) which gets automatically executed on Maya startup. userSetup.py can live in a number of locations, depending on the os and environment variables. When Maya starts, it will exe...

Page 119 of 161