Struct Location
Structure for all locations in the game.
Inherited Members
Namespace: Fibula.Common.Contracts.Structs
Assembly: Fibula.Common.Contracts.dll
Syntax
public struct Location
Properties
| Improve this Doc View SourceContainerId
Gets the id of the container that's encoded in this location.
Declaration
public byte ContainerId { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
ContainerIndex
Gets or sets the index of the container that's encoded in this location.
Declaration
public byte ContainerIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
IsUnderground
Gets a value indicating whether this location is underground.
Declaration
public bool IsUnderground { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
MaxValueIn2D
Gets the maximum value from X or Y in this location's coordinates.
Declaration
public int MaxValueIn2D { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MaxValueIn3D
Gets the maximum value from X, Y, or Z in this location's coordinates.
Declaration
public int MaxValueIn3D { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Slot
Gets the slot id encoded in this location.
Declaration
public Slot Slot { get; }
Property Value
| Type | Description |
|---|---|
| Slot |
Type
Gets this location's type.
Declaration
public LocationType Type { get; }
Property Value
| Type | Description |
|---|---|
| LocationType |
X
Gets or sets the value of this location in the X coordinate.
Declaration
public int X { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Y
Gets or sets the value of this location in the Y coordinate.
Declaration
public int Y { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Z
Gets or sets the value of this location in the Z coordinate.
Declaration
public sbyte Z { get; set; }
Property Value
| Type | Description |
|---|---|
| System.SByte |
Methods
| Improve this Doc View SourceDirectionTo(Location, Boolean)
Computes the direction in which the target
is, as seen from this location.
Declaration
public Direction DirectionTo(Location target, bool returnDiagonals = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | target | The target location. |
| System.Boolean | returnDiagonals | Optional. A value indicating whether to include diagonals as the potential answer to this query. Defaults to false. |
Returns
| Type | Description |
|---|---|
| Direction | The direction in which |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Overrides
GetOffsetBetween(Location, Location)
Computes the offset from the origin
to the target
.
Declaration
public static (long XOffset, long YOffset, int ZOffset) GetOffsetBetween(Location origin, Location target)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | origin | The origin location. |
| Location | target | The target location. |
Returns
| Type | Description |
|---|---|
| System.ValueTuple<System.Int64, System.Int64, System.Int32> | An ordered set, containing the offset bewteen locations. |
LocationAt(Direction)
Computes the Location that is in the targetDirection
, as seen from this location.
Declaration
public Location LocationAt(Direction targetDirection)
Parameters
| Type | Name | Description |
|---|---|---|
| Direction | targetDirection | The target direction. |
Returns
| Type | Description |
|---|---|
| Location | The Location which is in the |
ToString()
Gets this location's string representation: it's coordinates.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | This location's string representation. |
Overrides
Operators
| Improve this Doc View SourceAddition(Location, Location)
Adds two Location values.
Declaration
public static Location operator +(Location location1, Location location2)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | location1 | The first location. |
| Location | location2 | The second location. |
Returns
| Type | Description |
|---|---|
| Location | The result of the operation. |
Equality(Location, Location)
Checks if two Location values are considered equal.
Declaration
public static bool operator ==(Location location1, Location location2)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | location1 | The first location. |
| Location | location2 | The second location. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if they are equal, false otherwise. |
GreaterThan(Location, Location)
Checks if a Location is considered greater than Location. A Location is considered 'greater' than another when any of it's coordinates is greater than those of the other Location.
Declaration
public static bool operator>(Location location1, Location location2)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | location1 | The first location. |
| Location | location2 | The second location. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if |
Inequality(Location, Location)
Checks if two Location values are considered equal.
Declaration
public static bool operator !=(Location location1, Location location2)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | location1 | The first location. |
| Location | location2 | The second location. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if they are not equal, false otherwise. |
LessThan(Location, Location)
Checks if a Location is considered lesser than Location. A Location is considered 'lesser' than another when any of it's coordinates is less than those of the other Location.
Declaration
public static bool operator <(Location location1, Location location2)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | location1 | The first location. |
| Location | location2 | The second location. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if |
Subtraction(Location, Location)
Subtracts two Location values.
Declaration
public static Location operator -(Location location1, Location location2)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | location1 | The first location. |
| Location | location2 | The second location. |
Returns
| Type | Description |
|---|---|
| Location | The result of the operation. |


De-Modi-tisation: Netizens Mock PM Modi On 3rd Anniversary of Historic ‘#Demonetisation’ Decision
New Delhi (Sputnik): In a bid to tackle the growing corruption problem in India, the Prime Minister Narendra Modi-led Government revoked big currency notes on 8 November 2016, leaving people across the country shocked by the sudden announcement late in the evening.
Overnight, currency notes with the denominations of Rs. 1,000 ($14 approx.) and Rs.500 ($7 approx.) that comprised 86 per cent of the total currency circulation in India, were declared invalid.
Although Prime Minister Modi said the decision aimed to counter terror funding and black money in the country, for a significant amount of time, people in the country struggled with their day-to-day lives because ATMs struggled to dispense the new currency, and over-crowded banks and inadequate currency notes of smaller denominations made cash-transactions quite challenging for common people.
Friday marks the 3rd anniversary of the government’s demonetisation decision, netizens took to social media to timeline and discuss how the resolution actually impacted India's current financial situation.
While some people believe the "bold" decision displayed foresight and was for the best, others have attacked Prime Minister Modi, blaming him for the ongoing economic slump in the country.
While Modi aims to make India a $5 Trillion economy by 2025, India’s GDP growth is currently recorded as the slowest in over six years.
Hashtags on the subject including -- #BlackDay, #आओ_मोदी_चौराहे_पर, #DeMonetisationDisaster, #NotebandiSeMandiTak, #Demonetisation and #3YearsOfDeMoDisaster are trending with over 3,500, 226,000, 590,000, 245,000 and 15,000 tweet mentions respectively in India.
Citing a recent survey by citizen engagement platform LocalCircles, media reported that 66 per cent of respondents voted against demonetisation, saying it had a negative impact on the economy, labour and employment especially in unorganised sectors.
In a lighter vein, some netizens wished the new colourful Indian currency notes that came into existence post-demonetisation a #HappyBirthday.
Others made it a point to note that it was because of demonetisation that India finally moved to digital payments for day-to-day financial transactions.
From close to 1.5 million digital payment acceptance locations in 2016-17, the number of Indian merchants accepting digital payment modes has increased to over 10 million in three years, “Fintech in India - Powering mobile payments” had said earlier in August.
With a population of over 1.7 billion, there was a percentage of Indians who praised Prime Minister Modi's bold decision intended to curb the terror and black money engulfing the country.


C | |
| command [Controller] | The possible commands a user can input. |
T | |
| t [State.State] | |
| t [Objects.Tile] | |
| t [Objects.Civilization] | Tracks a civilization's total information: total number of infected people, total population, and neighboring civilizations. |
| t [Objects.Disease] | Tracks information about the disease's spread probability within a tile, between tiles, between civilizations, and chance of tile-to-tile spread. |
| tile_types [Objects.Tile] | The type of the tile |
U | |
| upgrade [Upgrade] |


Your time is valuable, if you know a shipper is slow, negotiate for a higher rate to compensate.
With downtime on the road, analyze potential backhaul so you’re not rushed to pick up a load.


|
| Local Properties | ||
| Managed Object Types | Data Object Types | All Properties | All Methods |
Properties
| Name | Type | Description |
|---|---|---|
| deploymentOption | xsd:string |
The key of the chosen deployment option. If empty, the default option is
chosen. The list of possible deployment options is returned in the result of
parseDescriptor.
|
| importOption* | xsd:string[] |
An optional argument for modifing the OVF parsing. When the server parses an OVF
descriptor a set of options can be used to modify the parsing. The argument is a list
of keywords.
To get a list of supported keywords see ovfImportOption. Unknown options will be ignored by the server. Since vSphere API 5.1 |
| locale | xsd:string |
The locale-identifier to choose from the descriptor. If empty, the
default locale on the server is used.
|
| msgBundle* | KeyValue[] |
An optional set of localization strings to be used. The server will use
these message strings to localize information in the result and in
error and warning messages.
This argument allows a client to pass messages from external
string bundles. The client is responsible for selecting the right string
bundle (based on locale) and parsing the external string bundle. The
passed in key/value pairs are looked up before any messages
included in the OVF descriptor itself.
|
| Properties inherited from DynamicData | ||
| None |
| Top of page | Local Properties | ||
| Managed Object Types | Data Object Types | All Properties | All Methods |


| 1 |
//
|
|
| 2 |
// NDAudioDownloadManager.m
|
|
| 3 |
// NDAudioPlayer
|
|
| 4 |
//
|
|
| 5 |
// Created by Drew Pitchford on 12/16/14.
|
|
| 6 |
// Copyright (c) 2014 Metova. All rights reserved.
|
|
| 7 |
//
|
|
| 8 |
|
|
| 9 |
/*
|
|
| 10 |
Copyright (c) 2015 Metova
|
|
| 11 |
|
|
| 12 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
| 13 |
of this software and associated documentation files (the "Software"), to deal
|
|
| 14 |
in the Software without restriction, including without limitation the rights
|
|
| 15 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
| 16 |
copies of the Software, and to permit persons to whom the Software is
|
|
| 17 |
furnished to do so, subject to the following conditions:
|
|
| 18 |
|
|
| 19 |
The above copyright notice and this permission notice shall be included in
|
|
| 20 |
all copies or substantial portions of the Software.
|
|
| 21 |
|
|
| 22 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
| 23 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
| 24 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
| 25 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
| 26 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
| 27 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
| 28 |
THE SOFTWARE.
|
|
| 29 |
*/
|
|
| 30 |
|
|
| 31 |
#import "NDAudioDownloadManager.h"
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
@interface NDAudioDownloadManager()
|
|
| 36 |
|
|
| 37 |
@property (strong, nonatomic) NSMutableArray *downloadQueue;
|
|
| 38 |
|
|
| 39 |
@end
|
|
| 40 |
|
|
| 41 |
@implementation NDAudioDownloadManager
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
- (id) init
|
|
| 45 |
{
|
15x |
| 46 |
self = [super init];
|
15x |
| 47 |
if(self)
|
15x |
| 48 |
{
|
15x |
| 49 |
_downloadQueue = [NSMutableArray new];
|
15x |
| 50 |
}
|
15x |
| 51 |
|
15x |
| 52 |
return self;
|
15x |
| 53 |
}
|
15x |
| 54 |
|
|
| 55 |
#pragma -mark Download File methods
|
|
| 56 |
|
|
| 57 |
// download audio file to docuements directory.
|
|
| 58 |
- (void)downloadFileFromURL:(NSURL *)url
|
|
| 59 |
withName:(NSString *)fileName
|
|
| 60 |
andExtension:(NSString *)fileExtension
|
|
| 61 |
completion:(void(^)(BOOL didDownload))completion
|
|
| 62 |
{
|
1x |
| 63 |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, (unsigned long)NULL), ^(void)
|
1x |
| 64 |
{
|
1x |
| 65 |
|
1x |
| 66 |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
1x |
| 67 |
NSString *documentsDirectory = [paths objectAtIndex:0];
|
1x |
| 68 |
NSMutableString *thisFileName = [fileName mutableCopy];
|
1x |
| 69 |
[thisFileName<EMAIL_ADDRESS>|
1x |
| 70 |
[thisFileName appendString:fileExtension];
|
1x |
| 71 |
NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory, thisFileName];
|
1x |
| 72 |
|
1x |
| 73 |
[self.downloadQueue addObject:thisFileName];
|
1x |
| 74 |
|
1x |
| 75 |
NSData *urlData = [NSData dataWithContentsOfURL:url];
|
1x |
| 76 |
[urlData writeToFile:filePath
|
1x |
| 77 |
atomically:YES];
|
1x |
| 78 |
|
1x |
| 79 |
dispatch_async(dispatch_get_main_queue(), ^{
|
! |
| 80 |
[self.downloadQueue removeObject:thisFileName];
|
! |
| 81 |
[self notifyDownloadCompleteDelegate];
|
! |
| 82 |
});
|
! |
| 83 |
});
|
1x |
| 84 |
}
|
1x |
| 85 |
|
|
| 86 |
// called to get the file from disk. prepareToPlay would need to be called on the returned object
|
|
| 87 |
// will return nil if file requested to get from disk is not on disk
|
|
| 88 |
- (NSURL *)getDownloadedFileWithName:(NSString *)fileName
|
|
| 89 |
andExtension:(NSString *)extension
|
|
| 90 |
{
|
! |
| 91 |
__block NSMutableArray *arrayOfSongs;
|
! |
| 92 |
NSURL *url;
|
! |
| 93 |
|
! |
| 94 |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
! |
| 95 |
NSString *documentsDirectory = [paths objectAtIndex:0];
|
! |
| 96 |
|
! |
| 97 |
NSMutableString *fullFileName = [fileName mutableCopy];
|
! |
| 98 |
[fullFileName<EMAIL_ADDRESS>|
! |
| 99 |
[fullFileName appendString:extension];
|
! |
| 100 |
NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory, fullFileName];
|
! |
| 101 |
|
! |
| 102 |
NSFileManager *fileManager = [NSFileManager defaultManager];
|
! |
| 103 |
if([fileManager fileExistsAtPath:filePath])
|
! |
| 104 |
{
|
! |
| 105 |
arrayOfSongs = [[NSMutableArray alloc] initWithArray:[fileManager contentsOfDirectoryAtPath:documentsDirectory error:nil]];
|
! |
| 106 |
NSArray *selectedSongs = [arrayOfSongs pathsMatchingExtensions:@[extension]];
|
! |
| 107 |
|
! |
| 108 |
NSString *selectedSongURLString;
|
! |
| 109 |
for(NSString *str in selectedSongs)
|
! |
| 110 |
{
|
! |
| 111 |
if([str isEqualToString:fullFileName])
|
! |
| 112 |
{
|
! |
| 113 |
selectedSongURLString = str;
|
! |
| 114 |
break;
|
! |
| 115 |
}
|
! |
| 116 |
}
|
! |
| 117 |
|
! |
| 118 |
NSString *selectedSound = [documentsDirectory stringByAppendingPathComponent:selectedSongURLString];
|
! |
| 119 |
url = [NSURL fileURLWithPath:selectedSound];
|
! |
| 120 |
|
! |
| 121 |
return url;
|
! |
| 122 |
}
|
! |
| 123 |
else
|
! |
| 124 |
{
|
! |
| 125 |
NSLog(@"File doesn't exist!");
|
! |
| 126 |
}
|
! |
| 127 |
|
! |
| 128 |
// return nil if the file does not exist.
|
! |
| 129 |
return url;
|
! |
| 130 |
}
|
! |
| 131 |
|
|
| 132 |
|
|
| 133 |
// get all files from the disk
|
|
| 134 |
- (NSArray *)getAllDownloadedFilesWithExtension:(NSString *)extension
|
|
| 135 |
{
|
! |
| 136 |
NSMutableArray *arrayOfFiles = [NSMutableArray new];
|
! |
| 137 |
|
! |
| 138 |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
! |
| 139 |
NSString *documentsDirectory = [paths objectAtIndex:0];
|
! |
| 140 |
|
! |
| 141 |
NSArray *filePaths = [[NSFileManager defaultManager] subpathsOfDirectoryAtPath:documentsDirectory
|
! |
| 142 |
error:nil];
|
! |
| 143 |
|
! |
| 144 |
for(NSString *path in filePaths)
|
! |
| 145 |
{
|
! |
| 146 |
if([path containsString:extension])
|
! |
| 147 |
{
|
! |
| 148 |
@try
|
! |
| 149 |
{
|
! |
| 150 |
if(![arrayOfFiles containsObject:path])
|
! |
| 151 |
[arrayOfFiles addObject:path];
|
! |
| 152 |
}
|
! |
| 153 |
@catch (NSException *exception)
|
! |
| 154 |
{
|
! |
| 155 |
NSLog(@"%@", exception);
|
! |
| 156 |
}
|
! |
| 157 |
@finally {}
|
! |
| 158 |
}
|
! |
| 159 |
}
|
! |
| 160 |
|
! |
| 161 |
return arrayOfFiles;
|
! |
| 162 |
}
|
! |
| 163 |
|
|
| 164 |
#pragma -mark file helpers
|
|
| 165 |
|
|
| 166 |
- (NSString *)removeExtensionFromFile:(NSString *)fileName
|
|
| 167 |
{
|
1x |
| 168 |
NSMutableString *dotExt =<EMAIL_ADDRESS>mutableCopy];
|
1x |
| 169 |
[dotExt appendString:[[self getExtensionFromFile:fileName] mutableCopy]];
|
1x |
| 170 |
NSString *newFilePath = [fileName stringByReplacingOccurrencesOfString:dotExt withString:@""];
|
1x |
| 171 |
|
1x |
| 172 |
return newFilePath;
|
1x |
| 173 |
}
|
1x |
| 174 |
|
|
| 175 |
- (NSString *)getExtensionFromFile:(NSString *)fileNameWithExtension
|
|
| 176 |
{
|
3x |
| 177 |
NSArray *filePathParts = [fileNameWithExtension<EMAIL_ADDRESS>|
3x |
| 178 |
NSString *ext = [filePathParts lastObject];
|
3x |
| 179 |
|
3x |
| 180 |
return ext;
|
3x |
| 181 |
}
|
3x |
| 182 |
|
|
| 183 |
- (void)deleteFileWithURL:(NSURL *)url
|
|
| 184 |
{
|
! |
| 185 |
NSError *error;
|
! |
| 186 |
|
! |
| 187 |
[[NSFileManager defaultManager] removeItemAtURL:url
|
! |
| 188 |
error:&error];
|
! |
| 189 |
|
! |
| 190 |
if(error)
|
! |
| 191 |
{
|
! |
| 192 |
NSLog(@"file not available: %@", error);
|
! |
| 193 |
}
|
! |
| 194 |
|
! |
| 195 |
}
|
! |
| 196 |
|
|
| 197 |
#pragma -mark Delegate methods
|
|
| 198 |
|
|
| 199 |
// Fires off as many times as downloadFromURL: withName: andExtension is called
|
|
| 200 |
- (void) notifyDownloadCompleteDelegate
|
|
| 201 |
{
|
1x |
| 202 |
[self.delegate NDAudioDownloadManager:self currentDownloadIsCompleteWithRemainingDownloads:[self.downloadQueue count]];
|
1x |
| 203 |
}
|
1x |
| 204 |
|
|
| 205 |
|
|
| 206 |
@end
|
|


|
Frequency-Based Measures
|
|
| The power spectrum is a basic tool of time series analysis in the frequency domain. It is defined as the square of the amplitude of the Fourier transform of the time series and estimates how the total variance of the signal (time series) is distributed in the spectrum of frequencies. Among different power spectrum estimates we use here the standard periodogram estimate. The frequency ranges from 0 to 1/2 since an implicit sampling time of one is assumed for all time series. The power spectrum is a function of frequency and thus it does not constitute a measure, but measures can be derived from this function. In some applications, such as EEG analysis, the interest is in the energy at specific frequency bands. Here up to five frequency bands can be specified. The default frequency limits for the five bands correspond to the theta (è), alpha (á), beta (â), gamma (ã) and delta (ä) bands. Also, the median frequency can be computed giving the frequency at which the energy is halved. | |
| Energy Band A (EnergyBndA) |
|
| Energy Band
A is the energy in a given frequency band. The
band is specified by the lower and upper frequency limits. The standard periodogram is called to
compute the power spectrum assuming frequency=1, so that the largest
frequency the power spectrum is computed for is 0.5. The frequency resolution is
given by the length of the time series. The energy in the given
frequency band is simply the fraction of the sum of the values of the power spectrum at the discrete frequencies within the band to the energy over the entire frequency
range. The following parameters can be specified: - lower band frequency (l) : the lower frequency limit for the frequency band. A single value for l should be given and it should hold 0 < l < 0.5. - upper band frequency (u) : the upper frequency limit for the frequency band. A single value for u should be given and it should hold l < u < 0.5. Example: If the user selects this measure by activating the check box in the beginning of the measure line and sets for lower band frequency (l) '0.003' and for the upper band frequency (u) '0.05', then Energy Band A is computed for the specified frequency interval [l, u] in the measure list the following measure name will appear (the frequency values are multiplied by 1000 and rounded) EnergyBndAl3u50 |
|
|
Energy Band B (EnergyBndB) |
|
| The same as for Energy Band A (EnergyBndA) holds for another selection of frequency band. | |
| Energy Band C (EnergyBndC) |
|
| The same as for Energy Band A (EnergyBndA) holds for another selection of frequency band. | |
| Energy Band D (EnergyBndD) |
|
| The same as for Energy Band A (EnergyBndA) holds for another selection of frequency band. | |
| Energy Band E (EnergyBndE) |
|
| The same as for Energy Band A (EnergyBndA) holds for another selection of frequency band. | |
| Median Frequency (MedianFreq) |
|
| Median Frequency is the frequency at which the energy is halved, i.e. the frequency f* for which the fraction of the sum of the values of the power spectrum at the discrete frequencies in [0,f*] to the energy over the entire frequency range is 1/2. The rest is as described for the Energy Band A (EnergyBndA). | |
| OK |
|
| By pressing this button the window of "Frequency-based Measures" will disappear and the user will be moved to the "Select / run measures" window. Any changes in the measures and parameter values will be stored. | |
| Cancel |
|
| Quit without doing anything and return to the "Select / run measures" window. Any changes in the measures and parameter values will be ignored. | |
| Help |
|
| This file will be shown |


Index
All Classes|All Packages|Constant Field Values|Serialized Form
S
- SavePrompt() - Method in class View
-
Function that inform the user that the state was Saved
- SavePrompt() - Method in interface ViewInterface
- setBall_recovery(double) - Method in class MiddlePlayer
-
Sets Ball Recovery Ability
- setClubs(List<String>) - Method in class Player
-
Sets club history of player
- setCrossingAbility(double) - Method in class WingerPlayer
-
Sets ability to cross
- setDeflectingAbility(double) - Method in class DefensePlayer
-
Sets deflecting ability
- setDexterity(double) - Method in class Player
-
Sets dexterity of player
- setElasticity(double) - Method in class GoalKeeper
-
Sets elasticity of GoalKeeper
- setFinishingAbility(double) - Method in class FrontPlayer
-
Sets finishing ability of FrontPlayer
- setGoalKick(double) - Method in class Player
-
Sets goal kick of player
- setHeadGame(double) - Method in class Player
-
Sets head game of player
- setImpulsion(double) - Method in class Player
-
Sets impulsion of player
- setMain_players(MainPlayersList) - Method in class Team
-
Sets the main players of a team
- setMpl(List<Player>) - Method in class MainPlayersList
-
Sets the main players list
- setName(String) - Method in class Player
-
Sets name of player
- setName(String) - Method in class Team
-
Sets name of the team
- setNumber(int) - Method in class Player
-
Sets number of player
- setPass(double) - Method in class Player
-
Sets pass of player
- setPlayers(List<Player>) - Method in class Team
-
Sets the players in the team
- setPlayersNames(List<String>) - Method in class Team
-
Sets the names of the player of a team
- setResistance(double) - Method in class Player
-
Sets resistance of player
- setSide(int) - Method in class Player
-
Sets side of player
- setSubstitutes(Map<Integer, Player>) - Method in class Team
-
Sets the substitute player of a team
- setVelocity(double) - Method in class Player
-
Sets velocity of player
- statesAvailable() - Method in class View
-
Function that indicates the states available where to save a state
- statesAvailable() - Method in interface ViewInterface
- step() - Method in class Game
-
Function that simulates one play of the game
- step() - Method in interface GameInterface
- storeGame(Map.Entry<Map<String, Team>, Map.Entry<List<GameHistory>, Game>>) - Method in class Controller
-
Saves a given status to file
- storeState(String, Map.Entry<Map<String, Team>, Map.Entry<List<GameHistory>, Game>>) - Static method in class LoadStore
-
Saves a game state to a file
- sub(int, int, int) - Method in class Game
-
Function that does a substitutions
- sub(int, int, int) - Method in interface GameInterface
- subs(Player, int) - Method in class MainPlayersList
-
Swaps two players
- substitutesSub(int, Player, int, Player) - Method in class Team
-
Swaps two players in substitutes list
- substitution(int, int, double) - Method in class View
-
Prints a message with the substitution
- substitution(int, int, double) - Method in interface ViewInterface
- switchPlayers(Map<Integer, Team>, int, int, int, int) - Static method in class Team
-
Switches players between two teams
All Classes|All Packages|Constant Field Values|Serialized Form


AWS::EC2::RouteTable
Creates a new route table within a VPC. After you create a new route table, you can add routes and associate the table with a subnet.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::EC2::RouteTable", "Properties" : { "VpcId" :
String
, "Tags" : [Resource Tag, ...
] } }
Properties
VpcId
-
The ID of the VPC where the route table will be created.
Example: vpc-11ad4878
Required: Yes
Type: String
Update requires: Replacement
Tags
-
An arbitrary set of tags (key–value pairs) for this route table.
Required: No
Type: Resource Tag
Update requires: No interruption.
Return Values
Ref
When you specify an AWS::EC2::RouteTable
type as an argument to the Ref
function, AWS CloudFormation returns the route table ID, such as rtb-12a34567
.
For more information about using the Ref
function, see Ref.
Examples
The following example snippet uses the VPC ID from a VPC named myVPC that was declared elsewhere in the same template.
JSON
{ "AWSTemplateFormatVersion" : "2010-09-09", "Resources" : { "myRouteTable" : { "Type" : "AWS::EC2::RouteTable", "Properties" : { "VpcId" : { "Ref" : "myVPC" }, "Tags" : [ { "Key" : "foo", "Value" : "bar" } ] } } } }
YAML
AWSTemplateFormatVersion: '2010-09-09' Resources: myRouteTable: Type: AWS::EC2::RouteTable Properties: VpcId: Ref: myVPC Tags: - Key: foo Value: bar
See Also
-
CreateRouteTable in the Amazon EC2 API Reference
-
Route Tables in the Amazon VPC User Guide
-
Using Tags in the Amazon Elastic Compute Cloud User Guide


Back to Top
Join us
Donate
Sign Up
Play Music
stop Music
See the World
140 E.14th Street | New York, NY 10003 |<PHONE_NUMBER>
Toggle navigation
See the World
Home
About
Blog
Contact
Sign Up
form
Sign up as our member and enjoy our first-hand offers!!
Username
Email Address
Password
Comfirm Password


title = "Thank You" url = "/thanks" layout = "default" is_hidden = 0 ==
For more information regarding your data please send us an email at info@digitalarabia.network


1. Introduction
1.1. Use cases
1.1.1. Web text references
The core use case for scroll to text is to allow URLs to serve as an exact text reference across the web. For example, Wikipedia references could link to the exact text they are quoting from a page. Similarly, search engines can serve URLs that direct the user to the answer they are looking for in the page rather than linking to the top of the page.1.1.2. User sharing
With scroll to text, browsers may implement an option to 'Copy URL to here' when the user opens the context menu on a text selection. The browser can then generate a URL with the text selection appropriately specified, and the recipient of the URL will have the text scrolled into view and visually indicated. Without scroll to text, if a user wants to share a passage of text from a page, they would likely just copy and paste the passage, in which case the receiver loses the context of the page.2. Description
2.1. Syntax
A text fragment directive is specified in the fragment directive (see § 2.2 The Fragment Directive) with the following format:
#:~:text=[prefix-,]textStart[,textEnd][,-suffix] context |-------match-----| context
(Square brackets indicate an optional parameter)
The text parameters are percent-decoded before matching. Dash (-), ampersand (&), and comma (,) characters in text parameters must be percent-encoded to avoid being interpreted as part of the text directive syntax.
The only required parameter is textStart. If only textStart is specified, the first instance of this exact text string is the target text.
#:~:text=an%20example%20text%20fragment
indicates that the
exact text "an example text fragment" is the target text. If the textEnd parameter is also specified, then the text directive refers to a range of text in the page. The target text range is the text range starting at the first instance of startText, until the first instance of endText that appears after startText. This is equivalent to specifying the entire text range in the startText parameter, but allows the URL to avoid being bloated with a long text directive.
#:~:text=an%20example,text%20fragment
indicates that the first
instance of "an example" until the following first instance of "text fragment"
is the target text. 2.1.1. Context Terms
The other two optional parameters are context terms. They are specified by the dash (-) character succeeding the prefix and preceding the suffix, to differentiate them from the textStart and textEnd parameters, as any combination of optional parameters may be specified.
Context terms are used to disambiguate the target text fragment. The context terms can specify the text immediately before (prefix) and immediately after (suffix) the text fragment, allowing for whitespace.
The context terms are not part of the target text fragment and must not be visually indicated or affect the scroll position.
#:~:text=this%20is-,an%20example,-text%20fragment
would match
to "an example" in "this is an example text fragment", but not match to "an
example" in "here is an example text". 2.2. The Fragment Directive
To avoid compatibility issues with usage of existing URL fragments, this spec introduces the fragment directive. The fragment directive is a portion of the URL fragment delimited by the code sequence:~:
. It is
reserved for UA instructions, such as text=, and is stripped from the URL
during loading so that author scripts can’t directly interact with it.
The fragment directive is a mechanism for URLs to specify instructions meant for the UA rather than the document. It’s meant to avoid direct interaction with author script so that future UA instructions can be added without fear of introducing breaking changes to existing content. Potential examples could be: translation-hints or enabling accessibility features.
2.2.1. Parsing the fragment directive
To the definition of Document, add:
Each document has an associated fragment directive which is either null or an ASCII string holding data used by the UA to process the resource. It is initially null.
The fragment directive delimiter is the string ":~:", that is the three consecutive code points U+003A (:), U+007E (~), U+003A (:).
Amend the create and initialize a Document object steps to parse and remove the fragment directive from the Document’s URL.
Replace steps 7 and 8 of this algorithm with:
-
Let url be null
-
If request is non-null, then set document’s URL to request’s current URL.
-
Otherwise, set url to response’s URL.
-
Let raw fragment be equal to url’s fragment.
-
Let fragment directive position be a position variable that points to the beginning of raw fragment.
-
While the string starting at position fragment directive position does not start with the fragment directive delimiter and fragment directive position does not point past the end of raw fragment:
-
Advance fragment directive position by 1.
-
-
If fragment directive position does not point past the end of raw fragment:
-
Let fragment be the substring of raw fragment ending at fragment directive position.
-
Advance fragment directive position by the length of fragment directive delimiter.
-
Let fragment directive be the substring of raw fragment starting at fragment directive position.
-
Set url’s fragment to fragment.
-
Set document’s fragment directive to fragment directive. (Note: this is stored on the document but not web-exposed)
-
-
Set document’s URL to be url.
https://example.org/#test:~:text=foo
will be parsed such that
the fragment is the string "test" and the fragment directive is the string
"text=foo". 2.2.2. Fragment directive grammar
A valid fragment directive is a sequence of characters that appears in the fragment directive that matches the production:- FragmentDirective ::=
- (TextDirective | UnknownDirective) ("&" FragmentDirective)?
- UnknownDirective ::=
- CharacterString
The text fragment directive is one such fragment directive that enables specifying a piece of text on the page, that matches the production:
- TextDirective ::=
- "text=" TextDirectiveParameters
TextDirectiveParameters ::=
(TextDirectivePrefix ",")? CharacterString ("," CharacterString)? ("," TextDirectiveSuffix)?
TextDirectivePrefix ::=
CharacterString "-"
TextDirectiveSuffix ::=
"-" CharacterString
CharacterString ::=
(ExplicitChar | PercentEncodedChar)+
ExplicitChar ::=
[a-zA-Z0-9] | "!" | "$" | "'" | "(" | ")" | "*" | "+" | "." | "/" | ":" | ";" | "=" | "?" | "@" | "_" | "~"
A ExplicitChar may be any URL code point that is not explicitly used in the TextDirective syntax, that is "&", "-", and ",", which must be percent-encoded.- PercentEncodedChar ::=
- "%" [a-zA-Z0-9]+
2.3. Security and Privacy
2.3.1. Motivation
Care must be taken when implementing text fragment directive so that it cannot be used to exfiltrate information across origins. Scripts can navigate a page to a cross-origin URL with a text fragment directive. If a malicious actor can determine that a victim page scrolled after such a navigation, they can infer the existence of any text on the page.
In addition, the user’s privacy should be ensured even from the destination origin. Although scripts on that page can already learn a lot about a user’s actions, a text fragment directive can still contain sensitive information. For this reason, this specification provides no way for a page to extract the content of the text fragment anchor. User agents must not expose this information to the page.
The following subsections restrict the feature to mitigate the expected attack vectors. In summary, the text fragment directives are invoked only on full (non-same-page) navigations that are the result of a user activation. Additionally, navigations originating from a different origin than the destination will require the navigation to take place in a "noopener" context, such that the destination page is known to be sufficiently isolated.
2.3.2. Search Timing
A naive implementation of the text search algorithm could allow information exfiltration based on runtime duration differences between a matching and non- matching query. If an attacker were to find a way to synchronously navigate to a text fragment directive-invoking URL, they would be able to determine the existence of a text snippet by measuring how long the navigation call takes.
For this reason, the implementation must ensure the runtime of § 2.4 Navigating to a Text Fragment steps does not differ based on whether a match has been successfully found.
This specification does not specify exactly how a UA achieves this as there are multiple solutions with differing tradeoffs. For example, a UA may continue to walk the tree even after a match is found in § 2.4.3 Find a target text. Alternatively, it may schedule an asynchronous task to find and set the indicated part of the document.
2.3.3. Should Allow Text Fragment
-
If is user triggered is false, return false.
-
If the Document of the latest entry in document’s browsing context's session history is equal to document, return false.
i.e. Forbidden on a same-document navigation. -
If incumbentNavigationOrigin is equal to the origin of document return true.
-
If document’s browsingContext is a top level browsing context and its group's browsing context set has length 1 return true.
i.e. Only allow navigation from a cross-process element/script if the document is loaded in a noopener context. That is, a new top level browsing context group to which the navigator does not have script access and which may be placed into a separate process. -
Otherwise, return false.
2.3.4. allowTextFragmentDirective flag
Amend the page load processing model for HTML files to insert these steps after step 1:
-
Let is user activated be true if the current navigation was triggered by user activation
-
Set document’s allowTextFragmentDirective flag to the result of running § 2.3.3 Should Allow Text Fragment with is user activated, incumbentNavigationOrigin, and document.
Amend the try to scroll to the fragment steps by replacing the steps of the task queued in step 2:
-
If document has no parser, or its parser has stopped parsing, or the user agent has reason to believe the user is no longer interested in scrolling to the fragment, then clear document’s allowTextFragmentDirective flag and abort these steps.
-
Scroll to the fragment given in document’s URL. If this does not find an indicated part of the document, then try to scroll to the fragment for document.
-
Clear document’s allowTextFragmentDirective flag
2.4. Navigating to a Text Fragment
Replace step 3.1 of the scroll to the fragment algorithm with the following:
-
Otherwise:
-
Let target, range be the Element and Range that is the indicated part of the document.
-
Replace step 3.3 of the scroll to the fragment algorithm with the following:
-
Otherwise:
-
If range is non-null:
-
Scroll range into view, with containingElement target, behavior set to "auto", block set to "center", and inline set to "nearest".
-
-
Otherwise:
-
Scroll target into view, with behavior set to "auto", block set to "start", and inline set to "nearest".
This otherwise case is the same as the current step 3.3.
-
-
Add the following steps to the beginning of the processing model for the indicated part of the document:
-
Let fragment directive string be the document’s fragment directive.
-
If document’s § 2.3.4 allowTextFragmentDirective flag is true then:
-
Let ranges be a list that is the result of § 2.4.2 Find text matches with fragment directive string.
-
If ranges is non-empty, then:
-
Let range be the first item of ranges.
The first Range in ranges is specifically scrolled into view. This Range, along with the remaining ranges should be visually indicated in a way that is not revealed to script, which is left as UA-defined behavior. -
Let node be range’s commonAncestorContainer.
-
While node’s nodeType is not ELEMENT_NODE:
-
Set node to node’s parentNode.
-
-
The indicated part of the document is node and range; return.
-
-
2.4.1. Scroll a DOMRect into view
Move the scroll an element into view algorithm’s steps 3-14 into a new algorithm scroll a DOMRect into view, with input DOMRect bounding box, ScrollIntoViewOptions dictionary options, and Element startingElement. Also move the recursive behavior described at the top of the scroll an element into view algorithm to the scroll a DOMRect into view algorithm: "run these steps for each ancestor element or viewport of startingElement that establishes a scrolling box scrolling box, in order of innermost to outermost scrolling box".
Replace steps 3-14 of the scroll an element into view algorithm with a call to scroll a DOMRect into view:
-
Perform scroll a DOMRect into view on element bounding border box with options options and startingElement element.
Define a new algorithm scroll a Range into view, with input Range range, Element containingElement, and a ScrollIntoViewOptions dictionary options:
-
Let bounding rect be the DOMRect that is the return value of invoking getBoundingClientRect() on range.
-
Perform scroll a DOMRect into view on bounding rect with options and startingElement containingElement.
2.4.2. Find text matches
-
If fragment directive input does not match the FragmentDirective production, then return an empty list.
-
Let directives be a list of strings that is the result of splitting fragment directive input on "&".
-
Let ranges be a list of Ranges that is initially empty.
-
For each string directive in directives:
-
If directive does not match the production TextDirective, then continue.
-
If the result of § 2.4.3 Find a target text on directive is non-null, then append it to ranges.
-
-
Return ranges.
2.4.3. Find a target text
To find the target text for a given string text directive input, the user agent must run these steps:
-
If text directive input does not begin with the string "text=", then return null.
-
Let raw target text be the substring of text directive input starting at index 5.
This is the remainder of the text directive input following, but not including, the "text=" prefix. -
If raw target text is the empty string, return null.
-
Let tokens be a list of strings that is the result of splitting a string on commas of raw target text.
-
Let prefix and suffix and textEnd be the empty string.
prefix, suffix, and textEnd are the optional parameters of the text directive. -
Let potential prefix be the first item of tokens.
-
If the last character of potential prefix is U+002D (-), then:
-
Set prefix to the result of removing the last character from potential prefix.
-
Remove the first item of the list tokens.
-
-
Let potential suffix be the last item of tokens.
-
If the first character of potential suffix is U+002D (-), then:
-
Set suffix to the result of removing the first character from potential suffix.
-
Remove the last item of the list tokens.
-
-
Assert: tokens has size 1 or tokens has size 2.
Once the prefix and suffix are removed from tokens, tokens may either contain one item (textStart) or two items (textStart and textEnd). -
Let textStart be the first item of tokens.
-
If tokens has size 2, then let textEnd be the last item of tokens.
The strings prefix, textStart, textEnd, and suffix now contain the text directive parameters as defined in § 2.1 Syntax. -
Let walker be a TreeWalker equal to Document.createTreeWalker().
-
Let position be a position variable that indicates a text offset in walker.currentNode.innerText.
-
If textEnd is the empty string, then:
-
Let match position be the result of § 2.4.4 Find an exact match with context with input walker walker, search position position, prefix prefix, query textStart, and suffix suffix.
-
If match position is null, then return null.
-
Let match be a Range in walker.currentNode with position match position and length equal to the length of textStart.
-
Return match.
-
-
Otherwise, let potential start position be the result of § 2.4.4 Find an exact match with context with input walker walker, start position position, prefix prefix, query textStart, and suffix null.
-
If potential start position is null, then return null.
-
Let end position be the result of § 2.4.4 Find an exact match with context with input walker walker, search position potential start position, prefix null, query textEnd, and suffix suffix.
-
If end position is null, then return null.
-
Advance end position by the length of textEnd.
-
Let match be a Range in walker.currentNode with start position potential start position and length equal to end position - start position.
-
Return match.
2.4.4. Find an exact match with context
-
While walker.currentNode is not null:
-
Assert: walker.currentNode is a text node.
-
Let text be equal to walker.currentNode.innerText.
-
While search position does not point past the end of text:
-
If prefix is not the empty string, then:
-
Advance search position to the position after the result of § 2.4.6 Find the next word bounded instance of prefix in text from search position with current locale.
-
If search position is null, then break.
-
Skip ASCII whitespace on search position.
-
If search position is at the end of text, then:
-
Perform § 2.4.5 Advance a TreeWalker to the next text node on walker.
-
If walker.currentNode is null, then return null.
-
Set text to walker.currentNode.innerText.
-
Set search position to the beginning of text.
-
Skip ASCII whitespace on search position.
-
-
If the result of § 2.4.6 Find the next word bounded instance of query in text from search position with current locale does not start at search position, then continue.
-
-
Advance search position to the position after the result of § 2.4.6 Find the next word bounded instance of query in text from search position with current locale.
If a prefix was specified, the search position is at the beginning of query and this will advance it to the end of the query to search for a potential suffix. Otherwise, this will find the next instance of query. -
If search position is null, then break.
-
Let potential match position be a position variable equal to search position minus the length of query.
-
If suffix is the empty string, then return potential match position.
-
Skip ASCII whitespace on search position.
-
If search position is at the end of text, then:
-
Let suffix_walker be a TreeWalker that is a copy of walker.
-
Perform § 2.4.5 Advance a TreeWalker to the next text node on suffix_walker.
-
If suffix_walker.currentNode is null, then return null.
-
Set text to suffix_walker.currentNode.innerText.
-
Set search position to the beginning of text.
-
Skip ASCII whitespace on search position.
-
-
If the result of § 2.4.6 Find the next word bounded instance of suffix in text from search position with current locale starts at search position, then return potential match position.
-
-
Perform § 2.4.5 Advance a TreeWalker to the next text node on walker.
-
-
Return null.
The current locale is the language of the currentNode.
2.4.5. Advance a TreeWalker to the next text node
-
While the input walker.currentNode is not null and walker.currentNode is not a text node:
-
Advance the current node by calling walker.nextNode()
-
2.4.6. Find the next word bounded instance
-
While start position does not point past the end of text:
-
Advance start position to the next instance of query in text.
-
Let range be a Range with position start position and length equal to the length of query.
-
Using locale locale, let left bound be the last word boundary in text before range.
-
Using locale locale, let right bound be the first word boundary in text after range.
Limiting matching to word boundaries is one of the mitigations to limit cross-origin information leakage. A word boundary is as defined in the Unicode text segmentation annex. The Default Word Boundary Specification defines a default set of what constitutes a word boundary, but as the specification mentions, a more sophisticated algorithm should be used based on the locale.
Dictionary-based word bounding should take specific care in locales without a word-separating character (e.g. space). In those cases, and where the alphabet contains fewer than 100 characters, the dictionary must not contain more than 20% of the alphabet as valid, one-letter words.
-
If left bound immediately precedes range and right bound immediately follows range, then return range.
-
-
Return null.
2.5. Indicating The Text Match
In addition to scrolling the text fragment into view as part of the Try To Scroll To The Fragment steps, the UA should visually indicate the matched text in some way such that the user is made aware of the text match.
The UA should provide to the user some method of dismissing the match, such that the matched text no longer appears visually indicated.
The exact appearance and mechanics of the indication are left as UA-defined. However, the UA must not use the Document’s selection to indicate the text match as doing so could allow attack vectors for content exfiltration.
The UA must not visually indicate any provided context terms.
2.6. Feature Detectability
For feature detectability, we propose adding a new FragmentDirective interface
that is exposed via window.location.fragmentDirective
if the UA
supports the feature.
interface { };
FragmentDirective
We amend The Location Interface to include a fragmentDirective
property:
interface {
Location readonly attribute FragmentDirective ; };
fragmentDirective
3. Generating Text Fragment Directives
This section contains recommendations for UAs automatically generating URLs with a text fragment directive. These recommendations aren’t normative but are provided to ensure generated URLs result in maximally stable and usable URLs.
3.1. Prefer Exact Matching To Range-based
The match text can be provided either as an exact string "text=foo%20bar%20baz" or as a range "text=foo,bar".
UAs should prefer to specify the entire string where practical. This ensures that if the destination page is removed or changed, the intended destination can still be derived from the URL itself.
The first recorded idea of using digital electronics for computing was the 1931 paper "The Use of Thyratrons for High Speed Automatic Counting of Physical Phenomena" by C. E. Wynn-Williams.
We could create a range-based match like so:
https://en.wikipedia.org/wiki/History_of_computing#:~:text=The%20first%20recorded,Williams
Or we could encode the entire sentence using an exact match term:
The range-based match is less stable, meaning that if the page is changed to include another instance of "The first recorded" somewhere earlier in the page, the link will now target an unintended text snippet.
The range-based match is also less useful semantically. If the page is changed to remove the sentence, the user won’t know what the intended target was. In the exact match case, the user can read, or the UA can surface, the text that was being searched for but not found.
Range-based matches can be helpful when the quoted text is excessively long and encoding the entire string would produce an unwieldly URL.
It is recommended that text snippets shorter than 300 characters always be encoded using an exact match. Above this limit, the UA should encode the string as a range-based match.
3.2. Use Context Only When Necessary
Context terms allow the text fragment directive to disambiguate text snippets on a page. However, their use can make the URL more brittle in some cases. Often, the desired string will start or end at an element boundary. The context will therefore exist in an adjacent element. Changes to the page structure could invalidate the text fragment directive since the context and match text may no longer appear to be adjacent.
<div class="section">HEADER</div> <div class="content">Text to quote</div>
We could craft the text fragment directive as follows:
text=HEADER-,Text%20to%20quote
However, suppose the page changes to add a "[edit]" link beside all section headers. This would now break the URL.
Where a text snippet is long enough and unique, a UA should prefer to avoid adding superfluous context terms.
It is recommended that context should be used only if one of the following is true:
- The UA determines the quoted text is ambiguous
- The quoted text contains 3 or fewer words
3.3. Determine If Fragment Id Is Needed
When the UA navigates to a URL containing a text fragment directive, it will fallback to scrolling into view a regular element-id based fragment if it exists and the text fragment isn’t found.
This can be useful to provide a fallback, in case the text in the document changes, invalidating the text fragment directive.
The earliest known tool for use in computation is the Sumerian abacus
By specifying the section that the text appears in, we ensure that, if the text is changed or removed, the user will still be pointed to the relevant section:
However, UAs should take care that the fallback element-id fragment is the correct one:
By the late 1960s, computer systems could perform symbolic algebraic manipulations
The UA should note that, even though the current URL of the page is: https://en.wikipedia.org/wiki/History_of_computing#Early_computation, using #Early_computation as a fallback is inappropriate. If the above sentence is changed or removed, the page will load in the #Early_computation section which could be quite confusing to the user.
If the UA cannot reliably determine an appropriate fragment to fallback to, it should remove the fragment id from the URL:


GIT CONNECT
Connect with other developers in your area
{{err}}
Start Now!
Log In
×
Username or email:
Password:
*Use the git account to log in


View the announcement post on Forestry.io
ubuild-jekyll
is a Jekyll theme designed to work with Forestry’s Blocks feature. This theme provides a set of page-level components and a pre-configured Forestry Blocks UI that will empower content editors to construct their own webpages.
To use the page builder, select the Page Builder template when creating a new page.


Cruel pet owner caught on CCTV repeatedly punching his dog in head in park
Robert Black was jailed for his brutal attack on one of his dogs in Newbury, Berkshire. He has also been banned from owning animals for 10 years and his dogs have been re=homed
by Matthew Dresch, https://www.mirror.co.uk/authors/matthew-dresch/A cruel man has been jailed after he was caught on camera repeatedly punching his own dog.
Evil Robert Black was seen on CCTV striking his mixed-breed pet five times as it tussled with another of his dogs in a park, before putting it on a lead and walking away.
Black, 51, was jailed for 23 weeks at Reading Magistrates' Court yesterday, after he was convicted of one count of causing unnecessary suffering to a protected animal.
Investigating officer, PC David Burleigh, based at Abingdon police station, said: "Black demonstrated significant cruelty to his dog by punching it several times in the face, with no concern for its welfare.
"This behaviour is clearly totally unacceptable for a pet owner and I am pleased that not only has he received a prison sentence for his actions, but that he has been banned from owning animals for the next 10 years.
"We take reports such as these seriously and will look to investigate and take action against anyone who carries out this type of offence."
Black, from Newbury, Berkshire, was seen attacking his dog by a member of the public, who reported the beating to police officers.
The shocking attack happened when Black was walking his dogs in Victoria Park on December 21 last year.
He was arrested soon afterwards and has now been banned from owning animals for ten years.
Both dogs have since been rehomed.
It comes after Brendan Murphy was handed a suspended prison sentence for stabbing and drowning his dog.
The 52-year-old claimed his Japanese Akita dog Tara died of natural causes and he buried the body in woodland.
But Tara’s body was found floating in a canal and chained to a breeze block, prompting the RSPCA to launch an investigation into the death of the dog.
Chester Magistrate's Court handed Murphy a ten-week prison sentence, suspended for 12 months, banned him from keeping animals for ten years and ordered him to pay £300 costs and a £115 victim surcharge.


Sheetbase file management with Drive.
Installation
Install: npm install --save @sheetbase/storage
Usage:
// 1. import module
import { StorageModule } from "@sheetbase/storage";
// 2. create an instance
export class App {
// the object
storageModule: StorageModule;
// initiate the instance
constructor() {
this.storageModule = new StorageModule(/* options */);
}
}
Options
| Name | Type | Description |
|---|---|---|
| allowTypes? | string[] |
|
| maxSize? | undefined | number |
|
| nested? | undefined | false | true |
|
| uploadFolder | string |
|
| urlBuilder? | string[] | function |
Lib
The Lib
class.
Lib properties
| Name | Type | Description |
|---|---|---|
| helperService | HelperService |
|
| optionService | OptionService |
|
| storageRoute | StorageRoute |
|
| storageService | StorageService |
Lib methods
| Function | Returns type | Description |
|---|---|---|
| registerRoutes(routeEnabling?, middlewares?) | RouterService<> |
Expose the module routes |
registerRoutes(routeEnabling?, middlewares?)
Expose the module routes
Parameters
| Param | Type | Description |
|---|---|---|
| routeEnabling | true | DisabledRoutes |
|
| middlewares | Middlewares | RouteMiddlewares |
Returns
RouterService<>
Routing
StorageModule provides REST API endpoints allowing clients to access server resources. Theses enpoints are not exposed by default, to expose the endpoints:
StorageModule.registerRoutes(routeEnabling?);
Errors
StorageModule returns these routing errors, you may use the error code to customize the message:
storage/invalid-size
: The file is too big.storage/invalid-type
: The file format is not supported.storage/invalid-upload
: Invalid upload resource.storage/no-edit
: No EDIT permission.storage/no-file
: File not found (no VIEW permission or trashed).Routes
Routes overview
| Route | Method | Disabled | Description |
|---|---|---|---|
| /storage | DELETE |
true |
delete a file |
| /storage | GET |
Get file information | |
| /storage | POST |
true |
update a file |
| /storage | PUT |
true |
upload a file / multiple files |
Routes detail
DELETE
/storage
DISABLED
delete a file
Request body
| Name | Type | Description |
|---|---|---|
| id | string |
Middleware data
| Name | Type | Description |
|---|---|---|
| auth | AuthData |
Response
void
GET
/storage
Get file information
Request query
| Name | Type | Description |
|---|---|---|
| id | string |
Middleware data
| Name | Type | Description |
|---|---|---|
| auth? | AuthData |
Response
FileInfo
POST
/storage
DISABLED
update a file
Request body
| Name | Type | Description |
|---|---|---|
| id | string |
|
| update | FileUpdateData |
Middleware data
| Name | Type | Description |
|---|---|---|
| auth | AuthData |
Response
void
PUT
/storage
DISABLED
upload a file / multiple files
Request body
| Name | Type | Description |
|---|---|---|
| file? | UploadFile |
|
| folder? | string |
|
| rename? | RenamePolicy |
|
| share? | FileSharing |
|
| files? | UploadResource[ ] |
Middleware data
| Name | Type | Description |
|---|---|---|
| auth? | AuthData |
Response
FileInfo | FileInfo[]
@sheetbase/storage is released under the MIT license.
Generated using TypeDoc


A thing to know
- Foreign students are welcomed by most countries in the world. But students get attracted by the well known universities only.
- Well known universities provide well infrasructue with good area and good studying backgrounds.
- Although well known universities provide good services have very well qualified teachers and a productive environment they are quite expensive and most students could not afford them.
- Most universities provide scholarshis to meritious students but you can never be sure with the scholarships.
- It is always better to have a backup for every students for they do not qualify in the universities of their choice or for even if they qualify may not bear economical load.
- For every students attracted to foreign land must also be able to cope up in new environment and they should also be able to accept the cultural changes.
- If you remain flexible with the sorronding and adapt according to it you are always going to enjoy the foreign land and new style of living.
Medical colleges in India.
Every Indian universities accepts foreign students for medical education.Government of India has allowed universites to intake upto 15% of total students.
- All students interested to take admission in India are required to qualify NEET examination.
- Students from India are also required to pass NEET examination to take examination in foreign universities.
- AIIMS is the most reputed institute providing medical education in India.
- Only AIIMS Delhi accepts foreign students.
- There are seven seats for foreign students in AIIMS Delhi.
AIIMS
- AIIMS stands for ALL India Institute of Medical Sciences.
- AIIMS was established in 1952 and AIIMS Delhi was the first AIiMS to be established.
- AIIMS are regsrded as the best medical colleges in India.
- At present there are 16 AIIMS college all over the country.
- 8 AIIMS colleges are in development.
- In total 1207 students are recruted by AIIMS
| Name | Location | Total students | Foreign students |
|---|---|---|---|
| AIIMS Delhi | New Delhi | 107 | 7 |
| AIIMS Bhopal | Madhya Pradesh | 100 | 0 |
| AIIMS Bhuwaneshwor | Odisha | 100 | 0 |
| AIIMS Jodhpur | Rajsthan | 100 | 0 |
| AIIMS Patna | Bihar | 100 | 0 |
| AIIMS Raipur | Chattisgadh | 100 | 0 |
| AIIMS Rishikesh | Uttrakhand | 100 | 0 |
| AIIMS Raebareli | Uttar Pradesh | 50 | 0 |
| AIIMS Nagpur | Maharastra | 100 | 0 |
| AIIMS Mangalgiri | Andhra Pradesh | 100 | 0 |
| AIIMS Gorakhpur | Uttar Pradesh | 50 | 0 |
| AIIMS Bibinagar | Telengana | 50 | 0 |
| AIIMS Bhatinda | Punjab | 50 | 0 |
| AIIMS Kalyani | West Bengal | 50 | 0 |
| AIIMS Deogarh | Jharkhand | 50 | 0 |
| AIIMS Telangana | Telengana | 54 | 0 |
| AIIMS Jammu | J&K | 50 | 0 |
Some colleges are still in phase of development and the colleges in those stages are listed below:
| S.No | Name | Location |
|---|---|---|
| 1 | AIIMS Madurai | Tamil Nadu |
| 2 | AIIMS Rajkot | Gujrat |
| 3 | AIIMS Vijaypur | J&K |
| 4 | AIIMS Awantipora | J&K |
| 5 | AIIMS Bilaspur | Himanchal Pradesh |
| 6 | AIIMS Chandsari | Assam |
| 7 | AIIMS Reari | Haryana |
| 8 | AIIMS Darbhanga | Bihar |
AIIMS Delhi
- AIIMS Delhi is the first AIIMS established.
- AIIMS Delhi has been ranked no 1 twice by NIRF (It is a institution which ranks the medical institutes all over the country)
- AIIMS Delhi has global ranking of 732 among the universities of the world
- AIIMS Delhi is ranked 1 among best medical college in South Asia and ranked 231 in world .
- AIIMS offer both undergraduate and post-graduate courses.
Location of AIIMS
AIIMS is located in Ansari Nagar New Delhi,India.
Courses covered in AIIMS
| Branch | Undergraduate | Post graduate |
|---|---|---|
| Medicine | MBBS | MD/MS/MCh |
| Dentistry | MDS/AIPGDE | |
| Nursing | B.Sc(Hons) B.Sc(Post Basic) |
M.Sc(Nursing) |
| Biotechnology | M.Biotech | |
| Paramedical | B.Sc(Hons) in Medical Technology in radiography Bachelor of Optometry MD |
Other courses offered in AIIMS are
- DM/MCh the courses is super specialization in field of medicine
- Ph.D in medicine
Are you eligible for AIIMS ?
The eligibility critria of AIIMS are:
- Students should have passd 10+2 with minimum 60% in PCB (50% for reserved candidates)
- Studentsd should have to clear AIIMS entrance test
- The age limit of candidaes is 17 years as on 31st December.
- Candidatews must be unmarried.
Required documents for admission in AIIMS
Documents required for Indian students.
- 10+2 certificate or equivalent examinations, showing the subject offered by him/her in te examination.
- School Leaving Certificate showing date of birth.
- MIgration Certificate from the University/Board.
- SC/ST Certificate issued by the competent authority.
- OBC candidates should not belong to Creamuy layer. OBC certificate must be in the prescribed format.
Information for foreign students
- Foreign candidates do not need to give AIIMS examination.
- Foreign students are send to AIIMS from these government bodies:
- Ministry of External Affairs
- Foreign students from Indian Council of Cultural Relations.
AIIMS courses
| Popular Courses | Duration | Fees(IC) |
|---|---|---|
| MBBS | 5 years 6 months | 7,640 |
| MD | 3 years | 6875 |
| MS | 3 years | 5,831 |
| MDS | 3 years | 5,831 |
| DM | 3 years | 6,875 |
| M. Ch | 3 years | 6,875 |
| Ph.D | 3 years | 5,885 |
| M.Sc | 2 years | 2,485 |
Details of all courses offerd in AiIMS in post-graduate level
- MD/MS/MDS
- Anatomy
- Biochemistry
- Biophysics
- Community Medicine
- Emergency Medicine
- Forensic Medicine
- Lab Medicine
- Microbiology
- Pediatrics
- Pallitie Medicine
- Pharmacology
- Physical Medicine & Rehabilitation
- Physiology
- Psychiatry
- Radiotherapy
- Surgery
- Transfusion Medicine
- M.Sc
- Cardiovascular Imaging and Endovascular Technologies
- Nuclear Medicine technology
- Urology technology
- Anatomy
- Biochemistry
- Biophysics
- Physiology
- Pharmacology
- Reproductive Biology and Clinical Embryology
- M.Ch
- C.T.V.S
- Neuro-Surgery
- G.I Surgury
- Pediatric Surgery
- Urology
- Minimal Access surgery and General Surgery
- Breast,Endocrine, and General Surgery
- Surgery Oncology
- Plastic and Reconstructivr Surgery
- Trauma Surgery and Critical Care
Other medical colleges in India
Post Graduate institute of Medical Education and Research(PGiMER)
- The institute is located in Chandigarh.
- PGMERoffers various UG, PG, and Doctorate level courses like B.Sc, B.Ph.T, MD, MS, MDS, DM, M.Ch, MHA, MPH, M.Sc, Fellowship PGI , Post-Doctorate Fellowship PGI, and Ph.D courses
- All the admission is done on the basis of PGIMER basis.
Christian Medical College
- Christian medical campus is established in Vellore.
- It offers courses like MBBS, B.Sc(Nursing), BPT, BPO, BOT, BASLP, MD/MS, M.CH, Diploma, DM, M.Tech, M.PhiL, MPH, MHA, M.Sc, PG Diploma, MPT, Fellowship courses
- Admission for MBBS is done by NEET
- Admission in MD/MS is done on NEET(PG>
- Admission in DM/M.Ch,PG Diploma,Fellowship and Post-Doctoral Fellowship is done by CBT score of campus.
Sanjay Gandhi Postgraduate Institute of Medical Sciences
- Sanjay Gandhi Postgraduate Institute of Medical Sciences is aprivate institute located in Lucknow.
- SGPGIMS offers B.Sc, BPT, MD, MHA, M.Sc, DM, M.Ch, Post-Doctoral Fellowship.
- Admission in MD is done on the basis of NEET PG.
- For all the courses other than Ph.D and PDC are done on the basis of entrance test.
- Ph.d PDC courses are selected by entrance and interview.
Amrita Vishwa Vidyapeetham
- Amrita Vishwa Vidyapeetham was established in Coimbatore.
- The university offers various UG, PG and doctorate level courses.
- In medical sector, it offers MBBS, MD, DM, M.CH,PG Diploma and MS courses.
- All the students are selected by NEET
- Candidates have to appear in entrance test conducted by the university to seek admission for PG Diploma
Banaras Hindu university
- BHU is located in Varanadi.
- BHU offers a variety range of courses but in medical sector it offers courses like MBBS, MD, M.Ch, MS and DM.
- Admission in all the courses are done by entrance examination conducted by the University
Kasturba Medical College
- Kasturba Medical College is situated in Manipal,Karnataka.
- It offers courses like MBBS, M.Sc, MD, MS, MCh, PhD, PG, Diploma and M.Phil.
- All the admission are done on the basis of NEET exam conducted for different levels.
Jawaharlal Institute of PostGraduate Medical Education & Research
- Jawaharlal Institute of PostGraduate Medical Education & Research(JIPMER) is an anonymous university establised in Puducherry.
- It offers MBBS, MD, MS, DM, M.Ch, Diploma, Ph.D, Fellowship, B.Sc, MSc, MPH courses.
- All the admission are conducted through NEET examination at various levels.
Institute of Liver and Billiary science
- Institute of Livver and Billiary Science(ILBS) is located in Delhi
- ILBS offers courses like DM, M.CH, DNB, Ph.D, PDCC
- Admissiom in all level except Ph.D level is conducted by entrance examinaton condcted by universiy.
- Admission in Ph.D level is conducted by the university itself followed by an interview.
King George's medical University
- King George's Medical Clollege is a state university established in lucknow.
- The university offers courses like MBBS, BDS, B.SC(Nursing), B.Opt,MD,MS,MDS,MHA,MHPEE,PG Diploma, DM, M.CH, Ph.D, M.Phil, Post-MD, Ph.D, Diploma, Fellowship, and Post-Doctoral Fellowship.
- Admission in various sector are done by NEET examination of respective level.
Other medical campuses across India
- Sri Ramachandra Institute of Higher Education and Research(SRIHER) located in Chennai
- St John's Medical College located in Bangalore
- Alligarh Muslim Ubiversity located in Aligarh
- Maulana azad medical College located in Delhi
- Jamia Hamdard University located in Delhi
- Kasturba Medical College llocated in Mengaluru
- JSS Medical College located in Mysore
- Christian Medical College located in Ludhiyana
- Vardhman Mahavir Medical College located & Safdarjung Hospital located in Delhi
- Dr. DY Patil Vidyapeth(DPU) located in Pune.
- Siksha O' Anusandhan(SOA)located in Bhuwaneswar
- SRM Institute of Science and Technology located in Chennai
- University College of Medical Science located in Delhi
- Dayanand Medical College located in Ludhiyana
- Saveetha Institute of Medical and Technical Science located in Chhennai
- Madras Medical College located in Chennai
- Lady Hardinge Medical College located in Delhi
- Mahatma gandhi Instituteof Medical Science located in Wardha
- Osmania Medical College located in Hyderabad
- Lokmanya Tilak Municipal College located in Mumbai
- Institute of Post Graduate Medical Education and Research located in Kplkata
- B.J. Medical College located Ahemdabad
- Govenment Medical College locatedin Patiala
- Bharati Vidhyapeeth Deemed University Medical College located in Sangli


* Write a function that checks to see if a number is a prime number or not. Have it return `true` if it is, or `false` if it isn't. * A Prime number is a number greater than one that can only be divided by one and itself. * [More info on Prime numbers](https://www.mathsisfun.com/prime_numbers.html)


 And knowledge of assembly is one of them. So we will make a simple assembly project. Since there are many resources about assembly, I don’t want to explain basic things like what does the mov
instruction do. Instead I will suggest you some resources and kindly ask you to study them first. After reading this blog post, - assuming I am not terrible at explaining stuff :) - you will have a basic understanding of:
rep
instructions,System Calls are used to call a kernel service from user land. The goal is to be able to switch from user mode to kernel mode, with the associated privileges.
For example, when we call printf
in C, or print
in Python, it calls the write
system call to print something to the standard output. Or when we want to open some file in C,
we call open
system call.
So we will start out program by doing a super simple ‘Hello World’ application by calling the write
system call.
The prototype of write function is like this:
ssize_t write(int fd, const void *buf, size_t count);
Making a syscall in C is super simple, you basically pass the correct arguments and call the correct function. But calling a function properly in assembly is a little bit different. We cannot call a syscall like this:
syscall write(1, buffer, 10)
Firstly, system calls are not like regular functions but we actually trigger an interrupt to make the OS take care of the system call. And secondly, write(1, buffer, 10)
like C won’t work in assembly because there is no mechanism to pass the parameters in a magical way in assembly. So we need to know how the kernel expects the parameters. The calling convention of x86_64 System V ABI is like this (these are the ones that we will use, for more detail please go to the reference):
rdi, rsi, rdx
from left to right.rsp
) needs to be 16-byte aligned at call.rax
.rbx, rsp, rbp
should be preserved. This means that they must be same before and after the function call.As I said earlier, system calls are not like regular function calls. We are requesting a service from the operating system. To make a system call, we need to provide to kernel the syscall that we want to make. Like write
or open
. And then we can make the system call. We can specify the system call by putting the number of the system call to rax
before making the system call. You can find 64-bit system call numbers of Linux in here.
As you can see, the number of write
system call is 1
. Here is an example usage of write
system call:
; export the main symbol so that `gcc` can find it
global main
section .text
main:
; write(stdout, HELLO_STR, 14)
mov rax, 1 ; Syscall number of `write`
mov rdi, 1 ; Stdout
mov rsi, HELLO_STR
mov rdx, 14 ; Length of HELLO_STR
syscall
; exit(0)
mov rax, 60 ; Syscall number of `exit`
mov rdi, 0
syscall
section .data
HELLO_STR:
db "Hello, World!", 10, 0 ; "Hello, World!" followed by a newline and the null character.
Let’s run it:
nasm -f elf64 hello_world.s && gcc hello_world.o -o hello_world
./hello_world
$ Hello, World!
DIY: Take an input from stdin by using
read
syscall and print the string that you read. Hint: You useresb
to allocate a buffer or make enough space on the stack and use the stack.
As you can see, we put 1
for write
and 60
for exit
to rax
. Is it really necessary to memorize this numbers or look at the table each time? Of course not, like in C, we will use the NASM’s preprocessor to define those numbers.
Let’s create a file named defines.s
.
%define EXIT 60
%define READ 0
%define WRITE 1
%define CLOSE 3
%define ACCEPT 43
%define SOCKET 41
%define BIND 49
%define SETSOCKOPT 54
%define LISTEN 50
%define STDOUT 1
Now we can include this file and change the syscall with the corresponding names.
%include "defines.s"
...
mov rax, WRITE
...
mov rax, EXIT
...
Other reason that we use the preprocessor is to make it super easy to write code for both OS X and Linux. There are some small differences between the OS X and Linux (of course there are huge differences but I am talking for out little program):
Let’s enhance our definitions by using the conditionals:
; Like in C, if we compile our code by defining PLATFORM_OSX, first part will be active, otherwise the `elif` part will be active.
%ifdef PLATFORM_OSX
%define SYSCALL_BASE 0x2000000
%define EXIT 1
%define READ 3
%define WRITE 4
%define CLOSE 6
%define ACCEPT 30
%define SOCKET 97
%define BIND 104
%define SETSOCKOPT 105
%define LISTEN 106
%elifdef PLATFORM_LINUX
%define SYSCALL_BASE 0
%define EXIT 60
%define READ 0
%define WRITE 1
%define CLOSE 3
%define ACCEPT 43
%define SOCKET 41
%define BIND 49
%define SETSOCKOPT 54
%define LISTEN 50
%endif
%define STDOUT 1
; We don't want to add the base number everytime we make a syscall,
; this is a nice way to prevent that.
%define SYSCALL(NUM) (SYSCALL_BASE + NUM)
And also, on OS X, the compiler expects _main
symbol to be exported. So we need to make it conditional as well.
DIY: Update
hello_world.s
to run for both OS X and Linux
Here is the final version of hello_world.s
:
%include "defines.s"
%ifdef PLATFORM_LINUX
global main
%elifdef PLATFORM_OSX
global _main
%endif
section .text
%ifdef PLATFORM_LINUX
main:
%elifdef PLATFORM_OSX
_main:
%endif
; write(stdout, HELLO_STR, 14)
mov rax, SYSCALL(WRITE)
mov rdi, STDOUT
mov rsi, HELLO_STR
mov rdx, 14
syscall
; exit(0)
mov rax, SYSCALL(EXIT)
mov rdi, 0
syscall
section .data
HELLO_STR:
db "Hello, World!", 10, 0 ; "Hello, World!" followed by a newline and the null character.
Now, we need to specify the platform on compilation, and there is a small tweak that we need to do for OS X. So let’s create a shell script to ease the build.
In build.sh
:
#!/bin/bash
FILES=(hello_world)
if [ "PLATFORM_OSX" = "$1" ]
then
FORMAT="macho64"
PLATFORM="$1"
else
FORMAT="elf64"
PLATFORM="PLATFORM_LINUX"
fi
OBJ_FILES=""
for f in ${FILES[@]}
do
echo 'Building: ' $f
nasm -d$PLATFORM -f $FORMAT $f.s
OBJ_FILES+="$f.o "
done
echo "Linking $OBJ_FILES"
if [ "PLATFORM_OSX" = "$PLATFORM" ]
then
gcc -Wl,-no_pie $OBJ_FILES -o hello_world
else
gcc $OBJ_FILES -o hello_world
fi
The script gets a platform specifier and compile each file in FILES
list for the target platform.
Let’s run it:
chmod +x build.sh
# For Linux
./build.sh PLATFORM_LINUX
# For OS X
./build.sh PLATFORM_OSX
./hello_world
To create a socket, we need to use socket
system call. Here is the prototype of socket
:
int socket(int domain, int type, int protocol);
domain
argument specifies a communication domain. Since we want to use IPv4 internet protocols, we want to use AF_INET
- which expands to 2
- for this. AF_INET
is defined in sys/socket.h
.Hint: You can print the value of things by writing a C program or use an IDE or a text editor with extension to jump to the definition of something. For example I am using neovim with coc.
type
will be SOCK_STREAM
- which expands to 1
- for a TCP connection.protocol
will be 0
since we use a single protocol.In socket.s
:
%include "defines.s"
%define AF_INET 2
%define SOCK_STREAM 1
; Export the `socket_listen` function
global socket_listen
section .text
socket_listen:
; socket(rdi: AF_INET, rsi: SOCK_STREAM, rdx: 0)
mov rax, SYSCALL(SOCKET)
mov rdi, AF_INET
mov rsi, SOCK_STREAM
mov rdx, 0
syscall
Now we can find the created socket descriptor on rax
register.
To assign an address and a port to a socket, we need to make a bind
syscall. Here is the prototype of bind
:
sockfd
is the socket’s file descriptor which returned from the socket
syscall.addr
is a pointer to the address information.addrlen
is the length of address information.Until this point, we only deal with values and not pointers. But this time the addr
parameter points to a location that stores the actual data. So we need to reserve some space for the data. If we would use C, we would probably define addr
as a local variable like this:
struct sockaddr_in addr;
// ...
bind(.., &addr, sizeof(addr));
As you might know, non-static local variables are reserved on stack. But before reserving a space for addr
on stack, we actually need to reserve a space on the stack for our function which generally called as stack frame.
Each function generally has its own stack frame. I am saying generally because some optimization might omit allocating the stack process. This stack frame is used to store our local variables and return addresses. Let’s say the main
function calls foo
function. Right after the call happens, the stack would look like this:
+------------------------+
| Lower Addresses |
+------------------------+
rsp -> | return address of main |
| some local variable |
rbp -> | |
+------------------------+
| Higher Addresses |
+------------------------+
The call
instruction pushes the return address of main
to the stack. Because think about it, how would the CPU know, which instruction to return to otherwise? The part of the stack that is between rsp
and rbp
is called a stack frame. Right after the call, the stack frame is the main
function’s stack frame. To reserve a stack frame for foo
, we do this:
rbp
. Because we need to restore it before we return from foo
. Otherwise we would lose main
function’s base of the stack.rbp
to rsp
. This would move the base of the stack frame of foo
on top of the stack frame of main
.rsp
.After doing the above steps, our stack will look like this:
+------------------------+
| Lower Addresses |
+------------------------+
rsp -> | reserved |
| reserved |
rbp -> | saved rbp |
| return address of main |
| some local variable |
+------------------------+
| Higher Addresses |
+------------------------+
And to return from the function, we will restore the caller’s stack frame not to mess things up.
rsp
to rbp
. This will make us discard all the reserved space.rbp
. By doing this, we will restore the saved rbp
and, since pop
increments rsp
we will also restore the rsp
.ret
. This will pop the return address to rip
so that the program will continue to execute the caller function.addr
On StackLet’s properly set up the stack and reserve enough space for addr
.
struct sockaddr
is a generic data structure and for IP-based communication we need to use struct sockaddr_in
. If we use C, we would use struct sockaddr_in
and case it to struct sockaddr *
when we call the bind
function. On Linux, the definition of struct sockaddr_in
is like this:
struct sockaddr_in {
short sin_family;
unsigned short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
}
If you go to the definition by yourself, you will see some fancy stuff. This is a simplified version.
sin_family
will be AF_INET
like we did before.sin_port
will be the port number in network byte-order.in_addr
is basically an unsigned long
and it will be INADDR_ANY
.sin_zero
will be bunch of zeros.In C, you can assign a variable with the equal sign and do not care about the size. But in assembly we need to put the variables in the correct place, in the correct order, in the correct size.
Since the size of the struct sockaddr
is 16 bytes, let’s start improving out function by reserving 16 bytes.
socket_listen:
; Set up the stack frame
push rbp
mov rbp, rsp
; Reserve 16 bytes on stack
sub rsp, 0x10
After that, let’s correctly fill the reserved space for address.
socket_listen:
...
mov word [rsp+0x0], AF_INET
mov word [rsp+0x2], 23569 ; port 4444 in network byte-order.
mov dword[rsp+0x4], INADDR_ANY
mov qword[rsp+0x8], 0 ; zero out `sin_zero`
There is a thing that we need to do. On OS X, the definition of struct sockaddr_in
is like this:
struct sockaddr_in {
__uint8_t sin_len;
__uint8_t sin_family;
__uint16_t sin_port;
struct in_addr sin_addr;
char sin_zero[8];
}
As you can see, now the size of sin_family
is 1 byte and a new field called sin_len
which is the size of addr
is added. So we need to use conditional assembly in here.
%ifdef PLATFORM_LINUX
mov word [rsp+0x0], AF_INET ; 2 bytes family
%elifdef PLATFORM_OSX
mov byte [rsp+0x0], 0x10 ; size of the `addr`
mov byte [rsp+0x1], AF_INET ; 1 byte family
%endif
mov word [rsp+0x2], 23569 ; port 4444 in network byte-order.
mov dword[rsp+0x4], INADDR_ANY
mov qword[rsp+0x8], 0 ; zero out `sin_zero`
Now we can call bind
.
%include "defines.s"
%define AF_INET 2
%define SOCK_STREAM 1
%define INADDR_ANY 0
global socket_listen
section .text
socket_listen:
push rbp
mov rbp, rsp
sub rsp, 0x10
; socket(rdi: AF_INET, rsi: SOCK_STREAM, rdx: 0)
mov rax, SYSCALL(SOCKET)
mov rdi, AF_INET
mov rsi, SOCK_STREAM
mov rdx, 0
syscall
%ifdef PLATFORM_LINUX
mov word [rsp+0x0], AF_INET ; 2 bytes family
%elifdef PLATFORM_OSX
mov byte [rsp+0x0], 0x10 ; size of the `addr`
mov byte [rsp+0x1], AF_INET ; 1 byte family
%endif
mov word [rsp+0x2], 23569 ; port 4444 in network byte-order.
mov dword[rsp+0x4], INADDR_ANY
mov qword[rsp+0x8], 0 ; zero out `sin_zero`
; bind(rdi: socket, rsi: addr, rdx: sizeof(addr))
mov rdi, rax
mov rax, SYSCALL(BIND)
mov rsi, rsp
mov rdx, 0x10
syscall
You might not see it at first but we have a problem in here. socket
returns the created socket descriptor in rax
and bind
returns the status code in rax
as well. So after we call bind
, we lost the returned socket descriptor. So let’s save it to rbx
before we call socket
. We are saving it to rbx
because we know that it will be preserved as it said in the calling convention.
We are expecting rbx
to remain unchanged, but also function that calls socket_listen
expects rbx
to remain unchanged. So we need to save it before we change it so that we can restore it later.
%include "defines.s"
%define AF_INET 2
%define SOCK_STREAM 1
%define INADDR_ANY 0
global socket_listen
section .text
socket_listen:
push rbp
mov rbp, rsp
push rbx ; --> NEW: save `rbx`
sub rsp, 0x10
; socket(rdi: AF_INET, rsi: SOCK_STREAM, rdx: 0)
mov rax, SYSCALL(SOCKET)
mov rdi, AF_INET
mov rsi, SOCK_STREAM
mov rdx, 0
syscall
mov rbx, rax ; --> NEW
%ifdef PLATFORM_LINUX
mov word [rsp+0x0], AF_INET ; 2 bytes family
%elifdef PLATFORM_OSX
mov byte [rsp+0x0], 0x10 ; size of the `addr`
mov byte [rsp+0x1], AF_INET ; 1 byte family
%endif
mov word [rsp+0x2], 23569 ; port 4444 in network byte-order.
mov dword[rsp+0x4], INADDR_ANY
mov qword[rsp+0x8], 0 ; zero out `sin_zero`
; bind(rdi: socket, rsi: addr, rdx: sizeof(addr))
mov rax, SYSCALL(BIND)
mov rdi, rbx ; --> NEW
mov rsi, rsp
mov rdx, 0x10
syscall
Now we need to listen
for connection on the socket. Prototype of listen
is:
int listen(int sockfd, int backlog);
sockfd
is the socket descriptor that is returned from socket
.backlog
argument defines the maximum length to which queue of pending connections for sockfd
may grow. We assign this to 5
just in case.socket_listen:
...
; listen(rdi: socket, rsi: backlog(5))
mov rax, SYSCALL(LISTEN)
mov rdi, rbx
mov rsi, 5
syscall
And we can finally restore the stack and rbx
and return.
socket_listen:
...
; Set the return value to the socket descriptor
mov rax, rbx
; Restore rbx
mov rbx, QWORD [rsp + 0x10]
; Properly return from the function
mov rsp, rbp
pop rbp
ret


FOR MORE SCROLL DOWN
My name is Dena, I studied business administration at yarmouk university. All my life i had an interest in computers, and i had a ambition to learn coding and about the software, i took alot of courses related to my field in business but this year i decided to shift my career into software development, it seems hard but i'm taking it as a challenge for me. I have an experience in HR asstisting which is somehthing that not related to software, i found it very easy but i got bored because of the job routine, and i had no motive in it. one of my biggest goals this year is to be a professional software developer. Hope i will achieve my goal in the future.
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
- business administration at yarmouk university
- HR assitant at PBRYC
- volunteer at ana-usharek& crown prince foundation


Oculus
The Oculus platform provides a wide range of capabilities able to run under the Oculus client for windows standalone and on Android with the Oculus Quest.
Requirements
To develop for the Oculus platform, you will need:
- A Windows PC, Windows 7 or greater or a Mac with 10.1 or greater (Quest/Android only)
- The Oculus client, installed and running
- An Oculus Device, Rift or Quest 1/2
- The XRTK.SDK package installed (first)
- The XRTK.Oculus package (once a Mixed Reality Scene has been setup)
Platform considerations
- Building for Oculus Quest is rather unique, if you have your Oculus Quest connected to your machine via a high speed USB3 cable and have the Oculus Client running, you can run Quest project in Windows Standalone mode directly on the Quest via Oculus Link, please see Oculus Support for further details. This will enable both controller and hands support for quick development.
- For oculus Rift, you simply need to ensure that
Oculus
is one of the configured platforms in the Unity legacy XR settings for theStandalone
platform - For Oculus Quest (on device), you will need the Android SDK/NDK installed with Unity and the
Oculus
platform configured in the Unity legacy XR settings for theAndroid
platform. You also need to include anAndroidManifest.xml
included as a Plugin in your Projects Asset folder (the XRTK provides one via theMixedRealityToolkit
menu) - For Oculus Quest (via Oculus Link), you will need the
Oculus
platform configured in the Unity legacy XR settings for the Standalone platform
Capabilities
The following capabilities are currently available for the Oculus platform
- Headset Tracking
- Oculus Touch controllers
- Oculus Hands implementation (Editor with Oculus link and On Device only)
- Oculus Native API, available via the
XRTK.Oculus.Plugins
namespace
The following capabilities are not currently available or are in development
- Oculus Boundary (System boundary enabled by default)
Quickstart
- Create a new Unity Project
- Setup the Legacy XR settings in "Edit -> Project Settings -> Player -> XR Settings" for
Oculus
to the Windows Standalone and Android platforms - Add the XRTK UPM registry to Unity by Opening the Unity Package Manager (
Window -> Package manager
), selecting theAdvanced
drop down and clicking onAdvanced Project Settings
, then Adding the following details:Name: XRTK
Scope(s): com.xrtk
- Return to the Unity Package manager and select
My Registries
in the Sources) dropdown (next to the+
symbol) - Select the
XRTK.SDK
and clickInstall
- Install the
XRTK.Oculus
platform - When prompted, install the Oculus platform configuration in to your current project
- Close the Unity Package Manager and return to your scene
- Select or create the scene you want to create Mixed Reality Content in
- Select
Mixed Reality Toolkit -> Configure
in the Unity Menu. THis will update your scene and add the MixedRealityToolkit instance. - Install an Android Manifest in to your project using
Mixed Reality Toolkit -> Tools -> Oculus -> Create Oculus Quest compatible AndroidManifest.xml
in the Editor menu - Enable the
Mock HMD
XR Loader in the XR SDK Manager
For Oculus Rift / Quest
- Ensure the Oculus client is running before playing
- If using Oculus Quest via Oculus Link, ensure your cable is connected and you have started Oculus Link on the device. (We recommend disabling the Oculus home in the Oculus Client settings for rapid development, and saving memory on your dev machine)
- If using Oculus Quest for android, ensure your cable is connected and your device is setup for
Developer mode
from the Oculus mobile application used to configure the device. ALso ensure Oculus Link is NOT running when building and deploying for Android
Raise an Information Request
If there is anything not mentioned in this document or you simply want to know more, raise an RFI (Request for Information) request here.


Welcome to GitHub Pages.
'la ilmentufa' is a syntactical and not yet semantical parser for the Lojban language.
Available versions
la camxes, a version closer to the official grammar
la maltufa, an unofficial parser to parse most part of the old corpus according to the official grammar before December 27, 2014
la camxes, an experimental unofficial grammar version
Requirements
For generating a PEGJS grammar engine from its PEG grammar file, as well as for running the IRC bot interfaces, you need to have Node.js installed on your machine.For generating PEGJS engine, you may need to get the Node.js module 'pegjs'. For running the IRC bots, you may need to get the Node.js module 'irc'.
However, as the necessary node_modules are already included in this project, I think you'll probably not have to download any of the aforementioned modules. ;)
Building a PEGJS engine
After having entered the ilmentufa directory, run the following command:$ node [builder-filename]
For example, "node camxes-builder" for building the standard grammar engine or "node camxes-exp-builder" for experimental grammar.
Now, the grammar engine should have been created/updated, and be ready for use. :)


Intranet Page
tab 1 links
tab 2 quick links
aws test
https://aws.amazon.com
git hub
https://github.com
fiddler
https://www.telerik.com/fiddler
microsoft
https://www.microsoft.com/en-us
Link 1
Link 2
Link 3


Home
Manage books
Issue a book
Add a new book
Delete a book
Edit book information
View report
existing books
issued books
View categories
Send notification
Access all members accounts
Issue a book:
Ok


Mindscaping is a journey High up in the sky
Where you look down And see
Valley of Fear, Lake of Desires, Village of Love...
All becoming so clear So small
What it is
Mapping intuitive thinking.
Mindscaping is a technique that maps our intuitive thinking, which displays cyclical patterns, and helps gain new insights about ourselves.
Cartographic Journal.
A safe place to store and visualize mindscapes captured on your journey to the inner space. A journal is keeping a habit of reflection and intuitive guidance.
Interconnected.
Grow together in your inner journey with the online community of mindscapers.
Your own your data.
Your account is only accessible by you. Your data transit is protected. Your entries are encrypted at storage in our data base.
How it Works
Step 1: Stream of Conciousness
Mindscaping is an intimate conversation with yourself. Write down anything that crosses your mind: this continuous, uninterrupted flow of thoughts, we call it the “stream of consciousness”.
Step 2: Flow of Attention
Flow is the motion of thinking. Like water flows continuously downhill due to gravity, our thinking is driven by the focus of attention. Different from water, in mindscaping, we can go back easily and see where our flow has been “physically”.
Step Three: Diagram of Perceptions
Mindscapes help you identify the relationships between your thoughts, the patterns of perceptions, where your values, and intervention can be made of your mental models.


About
ADA Qualitative is managed by a team of qualitative researchers working at The University of Queensland and The University of Sydney with a broader reference panel from The University of Melbourne, The University of Technology Sydney, The University of Western Australia and the Australian National University. The sub-archive has been developed in close consultation with the qualitative research community to ensure that the ethical, epistemological and practical issues relating to archiving and reusing qualitative data, and the needs, concerns and methodological approaches of researchers, are taken into full consideration.
The main function of ADA Qualitative is to archive digital qualitative data generated through social science research, broadly defined. What makes it distinct from other digitized, document-based holdings, such as those already established for Arts and Humanities scholars, is that it will specialize in primary data generated through the research process (i.e. through interviews, observation or focus groups) rather than existing written texts or historical records. Some of these existing texts may end up in the sub-archive but usually as part of a larger data set based on primary data collection.
As a digital archive, we are not in a position to store non-digital data such as audio and video cassettes or hand-written fieldnotes. However, advice can be provided to researchers on digitization processes.


Real estate group apologises to Grafton Street flower sellers for 'clutter' remarks
The group said it has now withdrawn its submission.
by Garreth MacNameeAN INTERNATIONAL REAL estate group has apologised to Grafton Street’s flower sellers after it made a submission to Dublin City Council (DCC) citing trading as “street clutter”.
Hines Ireland, which owns a number of properties on the shopping street in the capital, said it wanted to apologise for the confusion it had caused with its submission to DCC.
Initially, the group, which owns the buildings which house Claire’s Accessories and Fields jewellers, had written to the council and said that “street trading is inhibiting the flow of pedestrians in this core retail area as patrons of the street traders have to stop in the street to view the stalls”.
It had asked DCC to consider a “centralised and focused assembly of street traders” to “reduce street clutter”. This sparked a strong reaction from street traders, especially the iconic flower sellers who have been based on Grafton Street for generations.
The group said it has now withdrawn its submission.
In a statement today, a spokesperson for Hines said: “Hines is fully supportive of the Dublin street traders and the very positive contribution they make to the vibrancy of the city centre and in particular to the fabric of the Grafton Street area.
“We have noted statements by Grafton Street traders and the general public in recent days in support of the retention of existing stalls located at key junctures along this much-loved street.
“We acknowledge that a recent submission in respect of the future planning considerations for the street generated concern and alarm amongst the stall owners and others.
“This was never our intention. The submission was made in good faith with a view to improving the overall quality of the public experience along Grafton Street.
“In order to end any public confusion on this matter, we are happy to fully withdraw this proposal and will write to Dublin City Council today to that effect.
“We also apologise to the Grafton Street traders for generating unnecessary concern and would be very happy to work in collaboration with them and build positive relations into the future.”


Currently @Meta - Software Engineer - Boilermaker (Graduated from Purdue)
You really understand something until you really program it! - Gustavo Rodriguez-Rivera
650-304-5[4]70
xarvey1111[at]gmail[dot]com
My github
My Linkedin


Our game Puzzle Seeing is a multiplayer game where you can learn fun facts about famous landmarks by solving funny puzzles. It uses html, css, javascript, JQuery, and Google Street View API. Description: You're spawned on the spot near the famous place, and you have to be able to find the famous landmarks by the solving the puzzles the game provided for you. You have to use the arrows on Google Street View to find the exact destinations. The more puzzles, the more points you get. You can compete with friends and families to find out who has better knowledge about the world.