| [ Team LiB ] |
15.6 Array ObjectsNumeric provides an array type that represents a grid of items. An array object a has a specified number of dimensions, known as its rank, up to some arbitrarily high limit (normally 40, when Numeric is built with default options). A scalar (i.e., a single number) has rank 0, a vector has rank 1, a matrix has rank 2, and so forth. 15.6.1 Type CodesThe values that occupy cells in the grid of an array object, known as the elements of the array, are homogeneous, meaning they are all of the same type, and all element values are stored within one memory area. This contrasts with a list or tuple, where the items may be of different types and each is stored as a separate Python object. This means a Numeric array occupies far less memory than a Python list or tuple with the same number of items. The type of a's elements is encoded as a's type code, a one-character string, as shown in Table 15-3. Factory functions that build array instances, covered in Section 15.6.6 later in this chapter, take a typecode argument that is one of the values in Table 15-3.
Numeric supplies readable attribute names for each type code, as shown in the last column of Table 15-3. Numeric also supplies, on all platforms, the names Int0, Float0, Float8, Float16, Float64, Complex0, Complex8, Complex16, and Complex64. In each case, the name refers to the smallest type of the requested kind with at least that many bits. For example, Float8 is the smallest floating-point type of at least 8 bits (generally the same as Float32, but some platforms may provide very small floating-point types), while Complex0 is the smallest complex type. On some platforms, but not all, Numeric also supplies the names Int64, Int128, Float128, and Complex128, with similar meanings. These names are not supplied on all platforms because not all platforms provide numbers with that many bits. The next release of Numeric will also support unsigned integer types. A type code of 'O' indicates that elements are references to Python objects. In this case, elements can be of different types. This lets you use Numeric array objects as Python containers, for advanced array-processing tasks that may have nothing to do with numeric processing. When you build an array a with one of Numeric's factory functions, you can either specify a's type code explicitly or accept a default data-dependent type code. To get the type code of an array a, call a.typecode( ). a's type code determines how many bytes each element of a takes up in memory. Call a.itemsize( ) to get this information. When the type code is 'O', the item size is small (e.g., 4 bytes on a 32-bit platform), but this size accounts only for the reference held in each of a's cells. The objects indicated by the references are stored elsewhere as separate Python objects; each such object may occupy an arbitrary amount of extra memory, which is not accounted for in the item size of an array with type code 'O'. 15.6.2 Shape and IndexingEach array object a has an attribute a.shape, which is a tuple of integer values. len(a.shape) is a's rank, so for example, a one-dimensional array of numbers (also known as a vector) has rank 1, and a.shape has just one item. More generally, each item of a.shape is the length of the corresponding dimension of a. a's number of elements, known as its size, is the product of all items of a.shape. Each dimension of a is also known as an axis. Axis indices are from 0 up, as usual in Python. Negative axis indices are allowed and count from the right, so -1 is the last (rightmost) axis. Each array a is a Python sequence. Each item a[i] of a is a subarray of a, meaning it is an array with a rank one less than a's: a[i].shape= =a.shape[1:] For example, if a is a two-dimensional matrix (a is of rank 2), a[i], for any valid index i, is a one-dimensional subarray of a corresponding to a row of the matrix. When a's rank is 1 or 0, a's items are a's elements. Since a is a sequence, you can index a with normal indexing syntax to access or change a's items. Note that a's items are a's subarrays; only for an array of rank 1 or 0 are the array's items the same thing as the array's elements. You can also use a in a for loop, as for any other sequence. For example: for x in a: process(x) means the same thing as: for i in range(len(a)): x = a[i] process(x) In these examples, each item x of a in the for loop is a subarray of a. For example, if a is a two-dimensional matrix, each x in either of these loops is a one-dimensional subarray of a corresponding to a row of the matrix. You can also index a by a tuple. For example, if a's rank is at least 2, you can write a[i][j] as a[i,j] for any valid i and j, for rebinding as well as for access. Tuple indexing is faster and more convenient. You do not need to use parentheses inside the brackets in order to indicate that you are indexing a by a tuple: it suffices to write the indices one after the other, separated by commas. In other words, a[i,j] means the same thing as a[(i,j)], but the syntax without the parentheses is more natural and readable. If the result of indexing is a single number, Numeric implicitly converts the result from a rank-zero array to a scalar quantity of the appropriate Python type. In other words, as a result of such an indexing you get a number, not an array with one number in it. While this makes it convenient to pass array elements to other non-Numeric software, it also has unfortunate consequences, and this behavior will change in numarray. With the present behavior, special-casing is required. For example: a[i].shape= =a.shape[1:] does not execute correctly as Python code when a's rank is 1. In this case, a[i] is just a number, and numbers don't have a shape attribute. Thus, an AttributeError exception results. 15.6.3 StorageAn array object a is usually stored in a continuous memory area, with the elements one after the other in what is traditionally called row-major order. This means that, for example, when a's rank is 2, the elements of a's first row (a[0]) come first, immediately followed by those of a's second row (a[1]), and so on. An array can be noncontiguous when it shares some of the storage of a larger array, as covered in the following section Section 15.6.4. For example, if a's rank is 2, the slice b=a[:,0] is the first column of a, and is stored noncontiguously because it occupies some of the same storage as a. In other words, b[0] occupies the same storage as a[0,0], while b[1] occupies the same storage as a[1,0], which cannot be adjacent to the memory occupied by a[0,0] when a has more than one column. Numeric handles both contiguous and noncontiguous arrays transparently in most cases. In the rest of this chapter, I will point out the rare exceptions where a contiguous array is needed. When you want to copy a noncontiguous array b into a new contiguous array c, use method copy, covered in Section 15.6.7 later in this chapter. 15.6.4 SlicingArrays may share some or all of their data with other arrays. Numeric shares data between arrays whenever feasible. If you want Numeric to copy data, explicitly ask for a copy. Data sharing particularly applies to slices. For built-in Python lists and standard library array objects, slices are copies, but for Numeric array objects, slices share data with the array they're sliced from: from Numeric import * alist=range(10) list_slice=alist[3:7] list_slice[2]=22 print list_slice, alist # prints: [3,4,22,6] [0,1,2,3,4,5,6,7,8,9] anarray=array(alist) arr_slice=anarray[3:7] arr_slice[2]=33 print arr_slice, anarray # prints: [ 3 4 33 6] [ 0 1 2 3 4 33 6 7 8 9] Rebinding an item of list_slice does not affect the list alist that list_slice is sliced from, since for built-in lists, slicing performs a copy. However, because for Numeric arrays, slicing shares data, assigning to an item of arr_slice does affect the array object anarray that arr_slice is sliced from. This behavior may be unexpected for a beginner, but was chosen to enable high performance. <IP_ADDRESS> Slicing examplesYou can use a tuple to slice an array, just as you can to index it. For arrays, slicing and indexing blend into each other. Each item in a slicing tuple can be an integer, and the slice has one fewer axis than the array being sliced. Slicing removes the axis for which you give a number by selecting the indicated plane of the array. A slicing tuple item can also be a slice expression; the general syntax is start:stop:step, and you can omit one or more of the three parts (see Section 4.6 in Chapter 4, and function slice in Chapter 8, for details on slice semantics and defaults). Here are some example slicings: # a is [[ 0, 1, 2, 3, 4, 5], # [10,11,12,13,14,15], # [20,21,22,23,24,25], # [30,31,32,33,34,35], # [40,41,42,43,44,45], # [50,51,52,53,54,55]] a[0,2:4) # array([2,3]) a[3:,3:] # array([[33,34,35], # [43,44,45], # [53,54,55]]) a[:,4] # array([4,14,24,34,44,54]) a[2::2,::2] # array([[20,22,24], # [40,42,44]]) A slicing-tuple item can also use an ellipsis (...) to indicate that the following items in the slicing tuple apply to the last (rightmost) axes of the array you're slicing. For example, consider slicing an array b of rank 3: b.shape # (4,2,3) b[1].shape # (2,3) b[...,1].shape # (4,2) When we slice with b[1] (equivalent to indexing), we give an integer index for axis 0, and therefore we select a specific plane along b's axis 0. By selecting a specific plane, we remove that axis from the result's shape. Therefore, the result's shape is b.shape[1:]. When we slice with b[...,1], we select a specific plane along b's axis -1 (the rightmost axis of b). Again, by selecting a specific plane, we remove that axis from the result's shape. Therefore, the result's shape in this case is b.shape[:-1]. A slicing-tuple item can also be the pseudo-index NewAxis. The resulting slice has an additional axis at the point at which you use NewAxis, with a value of 1 in the corresponding item of the shape tuple. Continuing the previous example: b[NewAxis,...,NewAxis].shape # (1,4,2,3,1) Here, rather than selecting and thus removing some of b's axes, we have added two new axes, one at the start of the shape and one at the end, thanks to the ellipsis. Axis removal and addition can both occur in the same slicing. For example: b[NewAxis,:,0,:,NewAxis].shape # (1,4,3,1) Here, we both add new axes at the start and end of the shape, and select a specific index from the middle axis (axis 1) of b by giving an index for that axis. Therefore, axis 1 of b is removed from the result's shape. The colons (:) used as the second and fourth items in the slicing tuple in this example are slice expressions with both start and stop omitted, meaning that all of the corresponding axis is included in the slice. In all these examples, all slices share some or all of b's data. Slicing affects only the shape of the resulting array. No data is copied, and no operations are performed on the data. <IP_ADDRESS> Assigning to array slicesAssignment to array slices is less flexible than assignment to list slices. Normally, you can assign to an array slice only another array of the same shape as the slice. However, if the right-hand side of the assignment is not an array, Numeric implicitly creates a temporary array from it. Each element of the right-hand side is coerced to the left-hand side's type. If the right-hand side array is not the same shape as the left-hand side slice, broadcasting applies, as covered in Section 15.6.8 later in this chapter. So, for example, you can assign a scalar (a single number) to any slice of a numeric array. In this case, the right-hand side number is coerced, then broadcast (replicated) as needed to make the assignment succeed. When you assign to an array slice (or indexing) a right-hand side of a type different from that of the left-hand side, Numeric coerces the values to the left-hand side's type, for example by truncating floating-point numbers to integers. This does not apply if the right-hand side values are complex. Full coercion does not apply to in-place operators, which can only cast the right-hand side values upwards (for example, an integer right-hand side may be used for in-place operations with a floating-point left-hand side, but not vice versa), as covered in Section <IP_ADDRESS> later in this chapter. 15.6.5 Truth ValuesAlthough an array object a is a Python sequence, in recent versions of Numeric a does not follow Python's normal rule for truth values of sequences, where bool(a) depends only on len(a) and not on a's elements (i.e., the rule by which any sequence is false only when empty, otherwise it is true). Rather, a is false when a has no elements or all of a's elements are numeric 0. This lets you test for element-wise equality of arrays in the natural way: if a= =b: Without this proviso, such an if condition would be satisfied by any non-empty comparable arrays a and b. Do remember, however, that you have to be explicit when you want to test whether a has any items or whether a has any elements, as these are two different conditions: a = Numeric.array( [ [ ], [ ], [ ] ] ) if a: print 'a is true' else: print 'a is false' # prints: a is false if len(a): print 'a has some items' else: print 'a has no items' # prints: a has some items if Numeric.size(a): print 'a has some elements' else: print 'a has no elements' # prints: a has no elements In most cases, the best way to compare arrays of numbers is for approximate equality with function allclose, covered later in this chapter. 15.6.6 Factory FunctionsNumeric supplies numerous factory functions that create array objects.
Returns a new array object a. a's shape depends on data. When data is a number, a has rank 0 and a.shape is the empty tuple ( ). When data is a sequence of numbers, a has rank 1 and a.shape is the singleton tuple (len(data),). When data is a sequence of sequences of numbers, all of data's items must have the same length, a has rank 2, and a.shape is the pair (len(data),len(data[0])). This idea generalizes to any nesting level of data as a sequence of sequences, up to the arbitrarily high limit on rank mentioned earlier in this chapter. If data is nested over that limit, array raises TypeError. (This is unlikely to be a problem in practice, as an array of rank at least 40, with each axis of length at least 2, would have well over a million of millions of elements). typecode can be any of the values shown in Table 15-2 or None. When typecode is None, array chooses a default type code depending on the types of the elements of data. When any one or more elements in data are long integer values or are neither numbers nor plain strings (e.g., None or Unicode strings), the type code is PyObject. When all elements are plain strings, the type code is Character. When any one or more elements (but not all) are plain strings, all others are numbers (not long integers), and typecode is None, array raises TypeError. You must explicitly pass 'O' or PyObject as argument typecode if you want to have array build an array from some plain strings and some non-long integers. When all elements are numbers (not long integers), the default type code depends on the widest numeric type among the elements. When any of the elements is a complex, the type code is Complex. When no elements are complex but some are floating-point values, the type code is Float. When all elements are integers, the type code is Int. Function array, by default, returns an array object a that doesn't share data with others. If data is an array object, and you explicitly pass a false value for argument copy, array returns an array object a that shares data with data, if feasible. By default, an array object with a numeric type code is implicitly cast up when operated with numbers of wider numeric types. When you do not need this implicit casting, you can save some memory by explicitly passing a true value for argument savespace to the array factory function, to set the resulting array object a into space-saving mode. For example: array(range(4),typecode='b')+2.0 # array([2.,3.,4.,5.]) array(range(4),typecode='b',savespace=True)+2.0 # array([2,3,4,5]) array(range(4),typecode='b',savespace=True)+258.7 # array([2,3,4,5]) The first statement creates an array of floating-point values, as savespace is not specified and thus each element is implicitly cast up to a float when added to 2.0. The second and third statements create arrays of 8-bit integers, since savespace is specified. Therefore, instead of implicit casting up of the array's element, we get implicit casting down of the float added to each element. 258.7 is cast down to 2: the fractional part .7 is lost because of the cast to an integer, and the resulting 258 becomes 2 because, since the cast is to 8-bit integers, only the lowest 8 bits are kept. The savespace mode can be very useful for large arrays, but be careful lest you suffer unexpected loss of precision when using it.
Like array(range(start,stop,step),typecode), but faster. See built-in function range, covered in Chapter 8, for details about start, stop, and step. arrayrange allows float values for these arguments, not just int values. Be careful when exploiting this feature, since the approximations inherent in floating-point arithmetic may lead to a result with one more or fewer items than you might expect. arange is a synonym of arrayrange.
Returns a one-dimensional array a of shape (count,) with data copied from the bytes of string data. When count is None, len(data) must be a multiple of typecode's item size, and a's shape is (len(data)/a.itemsize( ),). When count is not None, len(data) must be greater than or equal to count*a.itemsize( ), and fromstring ignores data's trailing bytes, if any. Together with methods a.tostring and a.byteswapped (covered in the following section Section 15.6.7), function fromstring allows binary input/output of array objects. When you need to save arrays and later reload them, and don't need to use the saved form in non-Python programs, it's simpler and faster to use module cPickle, covered in Chapter 11. Many experienced users prefer to use a portable self-describing file format such as netCDF (see http://met-www.cit.cornell.edu/noon/ncmodule.html).
Returns a two-dimensional array a of shape (n,n). a's elements are 0, except those on the main diagonal (a[j,j] for j in range(n)), which are 1.
Returns an array a such that a.shape= =shapetuple. All of a's elements are 1.
Returns an array a such that a.shape= =shapetuple. All of a's elements are 0. Note that, by default, identity, ones, and zeros all return arrays whose type is Int. Be sure to specify explicitly a different type code, such as Float, if that is what you really want. For example, be sure to avoid the following common mistake: a = zeros(3) a[0] = 0.3 # a is array([0,0,0]) Since a is Int in this snippet, the 0.3 we assign to one of its items gets truncated to the integer 0. Instead, you typically want something closer to the following: a = zeros(3,Float) a[0] = 0.3 # a is array([0.3,0.,0.]) Here, we have explicitly specified Float as the type code for a, and therefore no truncation occurs when we assign 0.3 to one of a's items. 15.6.7 Attributes and MethodsFor most array manipulations, Numeric supplies functions you can call with array arguments. You can also use Python lists as arguments; this polymorphism offers flexibility that is not available for functionality packaged up as array attributes and methods. Each array object a also supplies some methods and attributes, for direct access to functionality that would not benefit from polymorphic possibilities.
Returns a new array b with the same shape as a. b's elements are a's elements coerced to the type indicated by typecode. b does not share a's data, even if typecode equals a.typecode( ).
Returns a new array object b with the same type code and shape as a. Each element of b is copied from the corresponding element of a, inverting the order of the bytes in the value. This swapping transforms each value from little-endian to big-endian or vice versa. Together with function fromstring and method a.tostring, this helps when you have binary data from one kind of machine and need them for the other kind (for example, Intel platforms are little-endian, while Sun platforms are big-endian).
Returns a new contiguous array object b, identical to a, but not sharing a's data.
a .flat is an attribute that contains an array with rank of one less than a and of the same size as a, sharing a's data. Indexing or slicing a.flat lets you access or change a's elements through this alternate view of a. Trying to access a.flat raises a TypeError exception if a is noncontiguous. When a is contiguous, a.flat is in row-major order. This means that, for example, when a's shape is (7,4) (i.e., a is a two-dimensional matrix with seven rows and four columns), a.flat[i] is the same as a[divmod(i,4)] for all i in range(28).
Trying to access the a.real and a.imag attributes raises a TypeError exception unless a's type code is complex. When a's type code is complex, each of a.real and a.imag is a noncontiguous array with the same shape as a and a float type code, sharing data with a. By accessing or modifying a.real or a.imag, you access or modify the real or imaginary parts of a's complex-number elements. imaginary is a synonym of imag.
Returns True if a's data occupies contiguous storage, otherwise False. This matters particularly when interfacing to C-coded extensions. a.copy( ) makes a contiguous copy of a. Noncontiguous arrays arise when slicing or transposing arrays, as well as for attributes a.real and a.imag of an array a with a complex type code.
Returns the number of bytes of memory used by each of a's elements (not by each of a's items, which are subarrays of a).
Sets or resets the space-saving mode of array a, depending on the truth value of flag. When flag is true, a.savespace(flag) sets a's space-saving mode so that a's elements are not implicitly cast up when operated with arrays of wider numeric types. For more details on this, see the discussion of savespace for function array earlier in this chapter. When flag is false, a.savespace(flag) resets a's space-saving mode so that a's elements are implicitly cast up when needed.
The a.shape attribute is a tuple with one item per axis of a, giving the length of that axis. You can assign a sequence of integers to a.shape to change the shape of a, but a's size (the total number of elements) must remain the same. When you assign to a.shape another sequence s, one of s's items can be -1, meaning that the length along that axis is whatever is needed to keep a's size unchanged. However, the product of the other items of s must evenly divide a's size, or else the reshaping raises an exception. When you need to change the total number of elements in a, call function resize (covered in Section 15.6.9 later in this chapter).
Returns True if space-saving mode is on for array a, otherwise False. See the discussion of savespace for function array earlier in this chapter.
Returns a list L equivalent to a. For example, if a.shape is (2,3) and a's type code is 'd', L is a list of two lists of three float values each. In other words, for each valid i and j, L[i][j]= =a[i,j]. Note that list(a) converts only the top-level (axis 0) of array a into a list, and thus is not equivalent to a.tolist( ) if a's rank is 2 or more. For example: a=array([[1,2,3],[4,5,6]],typecode='d') print a.shape # prints: (2,3) print a # prints: [[1. 2. 3.] # [4. 5. 6.]] print list(a) # prints: [array([1.,2.,3.]), array([4.,5.,6.])] print a.tolist( ) # prints: [[1.0,2.0,3.0],[4.0,5.0,6.0]]
Returns a binary string s whose bytes are a copy of the bytes of a's elements.
Returns the type code of a as a one-character string. 15.6.8 Operations on ArraysArithmetic operators +, -, *, /, %, and **, comparison operators >, >=, <, <=, = =, and !=, and bitwise operators &, |, ^, and ~ (all covered in Chapter 4) also apply to arrays. If both operands a and b are arrays with equal shapes and type codes, the result is a new array c with the same shape and type code. Each element of c is the result of the operator on corresponding elements of a and b (element-wise operation). Arrays do not follow sequence semantics for * (replication) and + (concatenation), but rather use * and + for element-wise arithmetic. Similarly, * does not mean matrix multiplication, but element-wise multiplication. Numeric supplies functions to perform replication, concatenation, and matrix multiplication; all operators on arrays perform element-wise operations. When the type codes of a and b differ, the narrower numeric type is converted to the wider one, like for other Python numeric operations. As usual, operations between numeric and non-numeric values are disallowed. In the case of arrays, you can inhibit casting up by setting an array into space-saving mode with method savespace. Use space-saving mode with care, since it can result in silent loss of significant data. For more details on this, see the discussion of savespace for function array earlier in this chapter. <IP_ADDRESS> BroadcastingElement-wise operations between arrays of different shapes are generally not possible: attempting such operations raises an exception. Numeric allows some such operations by broadcasting (replicating) a smaller array up to the shape of the larger one when feasible. To make broadcasting efficient, the replication is only conceptual: Numeric does not need to physically copy the data being broadcast (i.e., you need not worry that performance will be degraded because an operation involves broadcasting). The simplest case of broadcasting is when one operand, a, is a scalar (an array of rank 0), while b, the other operand, is an array. In this case, Numeric conceptually builds a temporary array t, with shape b.shape, where each element of t equals a. Numeric then performs the requested operation between t and b. In practice, therefore, when you operate an array b with a scalar a, as in a+b or b+a, the resulting array has the same shape as b, and each element is the result of applying the operator to the corresponding element of b and the single number a. More generally, broadcasting can also apply when both operands a and b are arrays. Conceptually, broadcasting works according to rather complicated general rules:
Broadcasting's rules are complicated because of their generality, but most typical applications of broadcasting are in simple cases. For example, say we compute a+b, and a.shape is (5,3) (a matrix of five rows, three columns). Further, say typical values for b.shape include ( ) (a scalar), (3,) (a one-dimensional vector with three elements), and (5,1) (a matrix with five rows, one column). In each of these cases, b is broadcast up to a temporary array t with shape (5,3) by replicating b's elements along the needed axis (both axes, when b is a scalar), and Numeric computes a+t. The simplest and most frequent case, of course, is when b.shape is (5,3), the same shape as a's. In this case, no broadcasting is needed. <IP_ADDRESS> In-place operationsArrays support in-place operations through augmented assignment operators +=, -=, and so on. The left-hand side array or slice cannot be broadcast, but the right-hand side can be. Similarly, the left-hand side cannot be cast up, but the right-hand side can be. In other words, in-place operations treat the left-hand side as rigid in both shape and type, but the right-hand side is subject to the normal, more lenient rules. 15.6.9 FunctionsNumeric defines several functions that operate on arrays, or polymorphically on Python sequences, conceptually forming temporary arrays from non-array operands.
Returns True when every element of x is close to the corresponding element of y, otherwise False. Two elements ex and ey are defined to be close if: abs(ex-ey)<atol+rtol*abs(ey) In other words, ex and ey are close if both are tiny (less than atol) or if the relative difference is small (less than rtol). allclose is generally a better way to check array equality than = =, since floating-point arithmetic requires some comparison tolerance. However, allclose is not applicable to complex arrays, only to floating-point and integer arrays. To compare two complex arrays x and y for approximate equality, you can use: allclose(x.real, y.real) and allclose(x.imag, y.imag)
argmax returns a new integer array m whose shape tuple is a.shape minus the indicated axis. Each element of m is the index of a maximal element of a along axis. argmin is similar, but indicates minimal elements rather than maximal ones.
Returns a new integer array m with the same shape as a. Each vector of m along axis is the index sequence needed to sort the corresponding axis of a. In particular, if a has rank 1, the most common case, take(a,argsort(a))= =sort(a). For example: x = [52, 115, 99, 111, 114, 101, 97, 110, 100, 55] print Numeric.argsort(x) # prints: [0 9 6 2 8 5 7 3 4 1] print Numeric.sort(x) # prints: [52 55 97 99 100 101 110 111 114 115] print Numeric.take(x, Numeric.argsort(x)) # prints: [52 55 97 99 100 101 110 111 114 115] Here, the result of Numeric.argsort(x) tells us that x's smallest element is x[0], the second smallest is x[9], the third smallest is x[6], and so on. The call to Numeric.take in the last print statement takes x's elements exactly in this order, and therefore produces the same sorted array as the call to Numeric.sort in the second print statement.
Returns a string representation s of array a, showing elements within brackets, separated by string separator. The last dimension is horizontal, the penultimate one vertical, and further dimensions are denoted by bracket nesting. If array_output is true, s starts with 'array(' and ends with ')'. s ends with ",'X')" instead if X, which is a's type code, is not Float, Complex, or Int, which lets you later use eval(s) if separator is ','. Lines longer than max_line_width (by default, 77) are broken up. precision determines how many digits are used per element (by default, 8). If suppress_small is true, very small numbers are shown as 0. You can change these defaults by binding attributes of module sys named output_line_width, float_output_precision, and float_output_suppress_small. str(a) is like array2string(a). repr(a) is like array2string(a,separator=', ',array_output=True).
Returns a's average along axis. When axis is None, returns the average of all a's elements. When weights is not None, weights must be an array with a's shape, or a one-dimensional array with the length of a's given axis, and average computes a weighted average. When returned is true, returns a pair: the first item is the average, the second item is the sum of weights (the count of values, when weights is None).
Returns an array c with the same shape as a. values is a sequence. a's elements are integers between 0, included, and len(values), excluded. Each element of c is the item of values whose index is the corresponding element of a. For example: print Numeric.choose(Numeric.identity(3),'ox') # prints: [[x o o] # [o x o] # [o o x]]
Returns an array c with the same type code and shape as a. Each element ec of c is the corresponding element ea of a, where min<=ea<=max. Where ea<min, ec is min; where ea>max, ec is max. For example: print Numeric.clip(Numeric.arange(10),2,7) # prints: [2 2 2 3 4 5 6 7 7 7]
Returns an array c with the same type code and rank as a. c includes only the elements of a for which the item of condition, corresponding along the given axis, is true. For example, compress((1,0,1),a) = = take(a,(0,2),0) since (1,0,1) has true values only at indices 0 and 2. Here's how to get only the even numbers from an array: a = Numeric.arange(10) print Numeric.compress(a%2= =0, a) # prints: [0 2 4 6 8]
arrays is a sequence of arrays, all with the same shape except possibly along the given axis. concatenate returns an array that is the concatenation of the arrays along the given axis. In particular, concatenate((s,)*n) has the same sequence replication semantics that s*n would have if s were a generic Python sequence rather than an array. For example: print Numeric.concatenate([Numeric.arange(5), Numeric.arange(3)]) # prints: [0 1 2 3 4 0 1 2]
Returns an array c with rank 1, the linear convolution of rank 1 arrays a and b. Linear convolution is defined over unbounded sequences. convolve conceptually extends a and b to infinite length by padding with 0, then clips the infinite-length result to its central part, yielding c. When mode is 2, the default, convolve clips only the padding, so c's shape is (len(a)+len(b)-1,). Otherwise, convolve clips more. Say len(a) is greater than or equal to len(b): when mode is 0, len(c) is len(a)-len(b)+1; when mode is 1, len(c) is len(a). When len(a) is less than len(b), the effect is symmetrical. For example: a = Numeric.arange(6) b = Numeric.arange(4) print Numeric.convolve(a, b) # prints: [0 0 1 4 10 16 22 22 15] print Numeric.convolve(a, b, 1) # prints: [0 1 4 10 16 22] print Numeric.convolve(a, b, 0) # prints: [4 10 16]
Like convolve(a,b[::-1],mode).
Returns the elements of a whose index along axis1 and index along axis2 differ by k. When a has rank 2, this means the main diagonal when k equals 0, subdiagonals above the main one when k is greater than 0, and subdiagonals below the main one when k is less than 0. For example: # a is [[0 1 2 3] # [4 5 6 7] # [8 9 10 11] # [12 13 14 15]] print Numeric.diagonal(a) # prints: [0 5 10 15] print Numeric.diagonal(a,1) # prints: [1 6 11] print Numeric.diagonal(a,-1) # prints: [4 9 14] As shown, diagonal(a) is the main diagonal, diagonal(a,1) the subdiagonal just above the main one, and diagonal(a,-1) the subdiagonal just below the main one.
Returns an integer array x of shape (len(shapetuple),)+shapetuple. Each element of subarray x[i] is equal to the element's i index in the subarray. For example: print Numeric.indices((2,4)) # prints: [[[0 0 0 0] # [1 1 1 1]] # [[0 1 2 3] # [0 1 2 3]]]
Returns an array m with the result of the inner product of a and b, like matrixmultiply(a,transpose(b)). a.shape[-1] must equal b.shape[-1], and m.shape is the tuple a.shape[:-1]+b.shape[0:-1:-1].
Returns an array m with a times b in the matrix-multiplication sense, rather than element-wise multiplication. a.shape[-1] must equal b.shape[0], and m.shape is the tuple a.shape[:-1]+b.shape[1:].
Returns the indices of those elements of a that are not equal to 0, like the expression: array([i for i in range(len(a)) if a[i] != 0]) a must be a sequence or one-dimensional array.
a must be a contiguous array. indices is a sequence of integers, taken as indices into a.flat. values is a sequence of values that can be converted to a's type code (if shorter than indices, values is repeated as needed). Each element of a indicated by an item in indices is replaced by the corresponding item in values. put is therefore similar to (but faster than) the loop: for i,v in zip(indices,values*len(indices)): a.flat[i]=v
a must be a contiguous array. mask is a sequence with the same length as a.flat. values is a sequence of values that can be converted to a's type code (if shorter than mask, values is repeated as needed). Each element of a corresponding to a true item in mask is replaced by the corresponding item in values. putmask is therefore similar to (but faster than) the loop: for i,v in zip(xrange(len(mask)),values*len(mask)): if mask[i]: a.flat[i]=v
Returns the rank of a, just like len(array(a,copy=False).shape).
Returns the flat form of a, just like array(a,copy=False).flat.
Returns an array with the same type code and rank as a, where each of a's elements is repeated along axis as many times as the value of the corresponding element of repeat. repeat is an integer, or an integer sequence of length a.shape[axis].
Returns an array r with shape shapetuple, sharing a's data. r=reshape(a,shapetuple) is just like r=a;r.shape=shapetuple. The product of shapetuple's items must equal the product of a.shape's, but one of shapetuple's items may be -1 to ask for adaptation of that axis's length. For example: print Numeric.reshape(range(12),(3,-1)) # prints: [[0 1 2 3] # [4 5 6 7] # [8 9 10 11]]
Returns an array r with shape shapetuple and data copied from a. If r's size is smaller than a's size, r.flat is copied from the start of ravel(a); if r's size is larger, the data in ravel(a) is replicated as many times as needed. In particular, resize(s,(n*len(s),)) has the sequence replication semantics that s*n would have if s were a generic Python sequence rather than an array. For example: print Numeric.resize(range(5),(3,4)) # prints: [[0 1 2 3] # [4 0 1 2] # [3 4 0 1]]
a must be a sorted rank 1 array. searchsorted returns an array of integers s with the same shape as values. Each element of s is the index in a where the corresponding element of values would fit in the sorted order of a. For example: print Numeric.searchsorted([0,1], [0.2,-0.3,0.5,1.3,1.0,0.0,0.3]) # prints: [1 0 1 2 1 0 1] This specific idiom returns an array with 0 in correspondence to each element x of values when x is less than or equal to 0; 1 when x is greater than 0 and less than or equal to 1; and 2 when x is greater than 1. With slight generalization, and with appropriate thresholds as the elements of sorted array a, this idiom allows very fast classification of what subrange each element x of values falls into.
Returns the shape of a, just like array(a,copy=False).shape.
When axis is None, returns the total number of elements in a. Otherwise, returns the number of elements of a along axis, like array(a,copy=False).shape[axis].
Returns an array s with the same type code and shape as a, with elements along each plane of the given axis reordered so that the plane is sorted in increasing order. For example: # x is [[0 1 2 3] # [4 0 1 2] # [3 4 0 1]] print Numeric.sort(x) # prints: [[0 1 2 3] # [0 1 2 4] # [0 1 3 4]] print Numeric.sort(x,0) # prints: [[0 0 0 1] # [3 1 1 2] # [4 4 2 3]] sort(x) returns a result where each row is sorted. sort(x,0) returns a result where each column is sorted.
Returns an array s with the same type code, rank, and size as a, sharing a's data. s's shape is the same as a, but with the lengths of axes axis1 and axis2 swapped. In other words, s=swapaxes(a,axis1,axis2) is like: swapped_shape=range(length(a.shape)) swapped_shape[axis1]=axis2 swapped_shape[axis2]=axis1 s=transpose(a,swapped_shape)
Returns an array t with the same type code and rank as a, containing the subset of a's elements that would be in a slice along axis comprising the given indices. For example, after t=take(a,(1,3)), t.shape= =(2,)+a.shape[1:], and t's elements are those in the second and fourth rows of a.
Returns the sum of a's elements along the k diagonal, like sum(diagonal(a,k)).
Returns an array t, with the same type code, rank, and size as a, sharing a's data. t's axes are permuted with respect to a's by the axis indices in sequence axes. When axes is None, t's axes invert the order of a's, as if axes were a.shape[::-1].
Returns an array w with the same shape as condition. Where an element of condition is true, the corresponding element of w is the corresponding element of x; otherwise it is the corresponding element of y. For example, clip(a,min,max) is the same as where(greater(a,max),max,where(greater(a,min),a,min)). |
| [ Team LiB ] |


All OSGi source files are copyright by OSGi, see separate copyright file. OSGi source files are individually marked as such.
Some individual bundles (SOAP, Jini, x10) which use external libraries may use different licenses. In these cases, the bundles contain the appropriate license file(s).
/* * Copyright (c) 2003-2006, KNOPFLERFISH project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * - Neither the name of the KNOPFLERFISH project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */


Basics
- This sub-site provides development teams at Rackspace with a set of design patterns, to help ensure a consistent and unified look-and-feel for all products under the Encore umbrella.
- This section of the Demo site focuses mainly on markup, CSS and design patterns. If you're curious about Encore-specific angular.js directives, find the "All Components" section in the left hand navigation.
- If you're a Rackspace team outside of Encore and need help setting up an new project from an engineering perspective, go to this Using EncoreUI In Your Own Project guide in the EncoreUI repository.
- For the most part, RackSpace developer teams will be creating mark-up using the rxPage subdirective of rxApp as a container.
- rxPage's template code contains a breadcrumb component, an attribute to pre-fill titles and subtitles and a rxNotification container so you can send page-level communication errors and validation messages in a standardized way. Check the angular.js code for controllers within Cloud Encore for implementation examples.
- The rxApp common.less file defines many base CSS rules and classes for app use. Included in this is normalize.css. This helps create a consistent starting point for styles across all browsers.
- Kevin Lamping, a developer on the EncoreUI team, wrote a document to address coding standards while writing CSS.
Typography
- ENCORE-SPECIFIC: We use Google Fonts, in particular the Roboto font. While Google Fonts are not included in the EncoreUI package, they are included if you use the encore-ui-template repository as a base.
- For developers not using encore-ui-template, read the README.md file for rxApp on fonts for more information.
Flexbox Grid
- Encore UI includes a grid system forked from Angular Material's layout module with minor usability enhancements to provide an assortment of attribute based layout options based on the flexbox layout model. Included are intuitive attribute based styles that ease the creation of responsive row and/or column based page layouts. Visit the layout section for info on how to use this attributes.
Heading/Title Styles
- Headings are sized according to their heading level (H1 larger than H2 larger than H3, etc.).
- ENCORE-SPECIFIC: For design consistency, we usually use an H3 heading for most subheaders. Other headings can be used for context.
-
WARNING:
The
title
, xl
, lg
, sm
, and xs
heading classes are deprecated and will be removed in a future release of the framework.
Markup Conversion Table
| Legacy Selector |
Current Markup |
.title.xl |
<h1> |
.title.lg |
<h2> |
.title |
<h3> |
.title.sm |
<h4> |
.title.xs |
<h5> |
| N/A |
<h6> |
- Dates in any context should be formatted this way:
Mar 2, 2015 @ 15:40 (UTC-0600)
–a three-letter capitalized month abbreviation (no period), followed by the day of the month (no leading zeroes), a comma, the four-digit year, an @
symbol, military time, and UTC in parentheses.
- The only time this formatting standard would not be used is when relative dates would be helpful to the user, such as "4 hours ago" or "1 week ago".
- It is recommended that relative dates be reserved for more informal settings like user notes or comments. Relative dates should not extend too far into the past. For instance, "1 week ago" may be helpful to the user, but "8 months ago" or "3 years ago" is better represented by the non-relative format detailed above, as it reveals more specific information about dates that provide better context and information to the user when comparing dates and times.
- The rxMetadata component provides the ability to display a list of terms with their associated descriptions. This is used throughout Encore to show metadata, especially on an individual object such as a server or a CBS volume.
- ENCORE-SPECIFIC: This is an ideal solution if you have anywhere from 5-15 definitions (3 columns of 5 definitions). (See a Server Details page or Image Details page under Accounts -> Cloud for an example.) Anything more - or anything displaying visual or image content - and you may want to consider a different design pattern. (See the "Non-Data based Tables" section in the Table page for more information.)
When There is No Data to Display
- In table cells, metadata lists, or other displays of data,
N/A
should be used as an indicator to the user that there is no relevant data to display.
- Do not use
–
, Empty
, null
, or no indicator to communicate this, as there may be situations where those are valid inputs or data to display to a user depending on the context.
- Note that a separate style exists to communicate when data isn't present due to permissions, or when an entire table is empty (see "Null Patterns" section of Tables style guide).
Lists
- Lists by default do not have styles. Add bullets/decimals to lists with the
list
class. It is also possible to build non-semantic lists using the additional item
class.
- ENCORE-SPECIFIC: Use this in conjunction with icons, colors and helper classes such as
.flush-right
to build out action menus. Look at the detail pages in Cloud Servers and view-source for additional context.
Helper Classes
- Subdued Text: The
.subdued
class is a basic color change to make text less prominent. The style persists if the class is nested in a link.
 Requires 'display' to be defined as inline-block or block.
- Hidden content
.hidden
class - Will add to hide an element but not remove it from the spacing of the page.
.visually-hidden
class - Used to hide content visually but can still be read by screen readers (i.e. removed from the page spacing)
- Clearing floats
Progress Bars
- There are two states for progress bars: active and complete. Active progress bars have animated stripes, which are provided by the class
.active
. Full progress bars do not have this class, and are solid and static in appearance.
- Several options for displaying text with a progress bar are available: no text, a percentage (not italicized), and detailed text (italicized). Showing a percent is preferred to showing nothing. However, the more specific text is the ideal state, since it reveals both numeric progress and provides context for what progress is being tracked. See demo below.


Mining Pool Admin
Set Payout Address
Manage Workers
Update Password
Sign Out
Sign In
Submit
Create Account
Submit
Update Password
Submit
Set Address
Submit
Workers
Set Min Worker Difficulty
Submit
ID
Username
Shares
Delete


Contains the result of performing Yadis discovery on a URI.
Located in /Auth/Yadis/Yadis.php (line 48)
Returns the list of service objects as described by the XRDS document, if this yadis object represents a successful Yadis discovery.
Documentation generated on Tue, 21 Apr 2009 11:31:34 -0700 by phpDocumentor 1.3.2


Subscribed : Why the Subscription Model Will Be Your Company's Future - And What to Do about It
by Tien Tzuo and Gabe Weisert
Overview -
Companies like Netflix, Spotify, and Salesforce are just the tip of the iceberg for the subscription
model. The real transformation--and the real opportunity--is just beginning. Subscription companies are growing nine
times faster than the S&P 500. Why? Because unlike product companies, subscription companies know their customers. A happy
subscriber base is the ultimate economic moat. Today's consumers prefer the advantages of access over the hassles of
maintenance, from transportation (Uber, Surf Air), to clothing (Stitch Fix, Eleven James), to razor blades and makeup (Dollar
Shave Club, Birchbox). Companies are similarly demanding easier, long-term solutions, trading their server rooms for cloud
storage solutions like Box. Simply put, the world is shifting from products to services.


{% extends 'layout.html' %} {% block pageTitle %} Find support - results {% endblock %} {% block beforeContent %} {{ breadcrumb({ href: "/new-user-landing-page", text: "Previous page" }) }} {% endblock %} {% block content %}
Below is a list of all services available for young people in Gloucestershire


'The Crown' Primer: Everything to Know Before Starting Season 3
Two years after the second season of Netflix's crown jewel series last aired, revisit what happened in the season two finale and find out what to know about the events and characters in season three.
by Jean BentleyTwo years after The Crown season two was released, the royal drama returns to Netflix for its third season with a brand new cast playing the British royal family.
The expansive and expensive show — which is estimated to have cost Netflix "upward of $150 million," per a recent New York Times report — focuses much of its third season on the monarchs finding their purpose in a rapidly modernizing world.
As a recent New York Times Magazine profile on creator Peter Morgan pointed out, the series "lifts the curtain on the whole royal enterprise. The Crown doesn’t feed public fantasy — it pours cold water on it."
While much of each season is derived from public record and meticulous research, at the end of the day it's a fiction series that takes the occasional artistic liberty — like, say, having a politician resign in 1967 instead of 1965.
"I think there’s a covenant of trust with the audience," Morgan told the Times. "They understand a lot of it is conjecture. Sometimes there are unavoidable accuracy blips — an event might not have taken place where, or even when, I imagined it did. But I’m absolutely fastidious about there being an underlying truth."
Ahead of the season's release, revisit where season two ended, learn where season three will pick up and get to know the new faces of the series with The Hollywood Reporter's handy primer.
Where the Story Left Off
At the end of season two, the marriage troubles between Queen Elizabeth and Prince Philip had come to a head, and the couple had just welcomed their fourth child, Prince Edward.
Where Season 3 Picks Up
As with seasons one and two, not much time will have passed when the season begins. Britain has elected a new prime minister, Harold Wilson, and the Queen isn't necessarily excited by the new politician she'll have to work with for the next several years. (Spoiler alert for history: They do eventually develop a working relationship.)
A major theme of the season sees the royals reflecting on their place in modern British society, and how they'll be able to serve their people in the changing '60s and '70s. Meanwhile, the marriage between Princess Margaret and Antony Armstrong-Jones is crumbling, Prince Charles is preparing for his future royal duties and falling in love and Prince Philip is thinking about how to modernize the monarchy.
 In addition to the new actors playing royal trio Queen Elizabeth, Prince Philip and Princess Margaret, Prince Charles and Princess Anne are played by older actors, as the characters are now young adults. Then there are the new political figures featured this season, including Prime Minister Harold Wilson and Lord Mountbatten.
The most notable new faces include:
Olivia Colman as Queen Elizabeth
Taking over for Claire Foy as the titular monarch is Oscar winner Colman, who will play the character from the late 1960s through the 1980s on the series, though season three will end in the late 1970s.
Helena Bonham Carter as Princess Margaret
The royal troublemaker and younger sister of the queen will now be played by the Oscar nominee, taking over for Vanessa Kirby.
Tobias Menzies as Prince Philip
TV veteran Menzies, who has had critically acclaimed turns in The Terror and Outlander in recent years (not to mention Game of Thrones), takes over for Matt Smith as the queen's husband.
Josh O'Connor as Prince Charles
The young actor (Florence Foster Jenkins) has a memorable episode that takes place during the semester he spent abroad in Wales before his investiture as the Prince of Wales.
Erin Doherty as Princess Anne
Another standout is Call the Midwife's Erin Doherty as the second-oldest royal child.
Jason Watkins as Harold Wilson
Watkins plays the two-time prime minister with whom the queen worked in the late 1960s through the mid-'70s.
Charles Dance as Lord Mountbatten
The Game of Thrones star plays the queen's cousin, who, in addition to his political dealings, plays a significant role in Charles' life.
Emerald Fennell as Camilla Parker Bowles
The Killing Eve season 2 showrunner plays Charles' first love.
Two people who won't appear: Lady Diana Spencer and Prime Minister Margaret Thatcher, who have been cast but will make their debuts in season four of the series, which is currently filming in England.
Release Date
Season three of The Crown is available to stream Sunday, Nov. 17 on Netflix.


This report aims to present a study on how machine learning techniques can be applied to such a requirement to recommend TV programs via distributed learning system that uses Spark as its computation engine. A brief description of machine learning models, their relevance and their components is discussed. These techniques are connected with various paradigms of Recommendation methods considering in detail the mathematical modelling for ALS formulation in the context of TV programs. Also a brief outline of Apache Spark is included to introduce the higher level API within the machine learning library.
View Projectmovie rating prediction system based on selected training sets provided by MovieLens. Several machine learning related algorithms – baseline predictor, KNN, Stochastic Gradient Descent, SVD, SVD++, asymmetric SVD, integrated model and NMTF are used to predict the rating from particular users for unrated movies. RMSE (Root-Mean-Square-Error) is applied as the main criteria to evaluate their performance. The simulation result shows distinct performance due to selected algorithms as well as the corresponding learning rates
View Project


Form Here
* required field
Name:
Email:
Proper format email
Website:
Proper format website
Message:
Submit


[Erowid Note: Unconfirmed Death Report. Neither this report nor any report of a death should be considered reliable without details that can be verified through hospitals, police reports, family members, or news reports. If you have information about this or other deaths directly resulting from the use of any psychoactive substance we cover, please contact sage at erowid.org.]
[Erowid Warning: Our understanding of the literature is that there is no such thing as safe use of volatile solvents, aerosols and other street inhalants : their psychoactive effects are inseparable from nerve and organ damage. We have chosen to include these reports to help document the real world use of inhalants, but their inclusion is not intended to imply that they are anything but dangerous.]
As my friend isn't here anymore to tell his tale I will tell it for him.
He was a heavy user of the stuff.  He knew the stuff is bad, and even complained that the pharmacist providing him with his fix kept stocking the cans. I told him: 'Hey, you always go there to buy it!'.
I always hated him huffing it. It was very noisy, the groaning and coughing just sounded awful. I told him so, but he ignored it. Then he came with the brilliant idea to increase his sensation even more by combining huffing with laying in a so-called sarcophagus, a foam rubber coffin-like contraption lined with black rubber and fitted with zippers to provide the 'total enclosure' he so coveted. I said to him that he shouldn't do it that way, but he did it anyway. I also said that I would not check on him, but he ignored that too.
After the loud groaning noises he quieted down, and after half an hour I checked on him nonetheless. He was breathing, like he always does when high. I left him then, and after returning some 20 minutes later I didn't hear any breathing anymore. I opened the zippers, pulled back the heavy rubber and saw him with foam coming out of his mouth. I knew he was dead. I tried to get him out, failed, and started to reanimate him while pushing aside the rubber. The air I breathed into him came out with a gurgling sound. I had tried to reanimate a dead body.
I dialled 1-1-2, the European version of 9-1-1. The ambulance was quick to arrive. I showed the body I was still reanimating. Another ambulance arrived. I was sent out of the room as the five people working moved the furniture away and extracted my dead friend from the sarcophagus. I heard the beeps of the reanimation machine. It did not give shocks so I now knew for sure he was dead. I called my girlfriend who couldn't believe it. The medic came from the room and told me he was dead. I called his Mother who wanted to drive over right away. Later I got a call from her sister in law that her brother would drive her to the house, some 600km away.
The medics left and a detective from the police took me aside and asked what had happened. I gave a true account of what he had done. He wrote everything down, like they do. I showed him the can which was put into a bag. He asked how it worked. I told him he would spray onto a towel and sniff it. He pointed at a towel on the floor but I told him it was still in the coffin. It was extracted and also put into a bag. A rookie cop also asked questions. I ignored him. I tried to call my Mom but she wasn't home. I called a colleague to ask advice. He was shocked about what happened.
Eventually workers from the morgue arrived, and tried to lift the heavy body into their coffin. They dropped the body because they were clumsy. The body was taken away and I was left alone in the house, far away from home. I watched TV all night but it didn't really register. Then I tried to sleep which of course I couldn't. Then, in the middle of the night his Mother arrived and I prepared a place to sleep for them. The next morning I got a train ticket and left.
I think he even enjoyed it. I feel like he floated away on a cloud of chloroethane. He looked peaceful when I found him, even with the froth around his mouth. They haven't released the body yet, now for four days pending autopsy, but they let his Mother wish him farewell.  She's lost everyone now.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Pirate (ARRR) is a cryptocurrency that solves the issue of financial privacy on the blockchain through forced anonymous transactions. Protect your wallet and transactions with Pirate’s completely anonymous network. With forced private transactions, your privacy cannot be compromised by another users’ activity on the network. If you wish to learn more, please join the official Pirate Discord at https://pirate.black/discord/ or message FishyGuts#5085, who will be happy to help out.
100 messages
Before 05-Dec-19 12:00 AM
CrisF22-Sep-18 11:12 AM
I'll have to look through the docs.
jl777c22-Sep-18 11:23 AM
or maybe even 10x to get to approx annual halvings
CrisF22-Sep-18 11:25 AM
I've found some info but don't have much of an idea what to do with it :/
Block halving every 77777 blocks.
aprox every 54.01180556 days
Block reward of 1 satoshi will be reached in about 5.179214231 years.
Total supply of around 40 million. Exactly to be 39,821,823.99884100 by year 2023
jl777c22-Sep-18 11:27 AM
if halving are 10x slower, it goes for 10x longer and has 10x the coins
if 5x, then 5x slower, 5x longer and 5x the coins
it seems straightforward enough
problem is that in a few years the blockreward becomes small
so at 5x, total supply gets to about 200 mil
CrisF22-Sep-18 11:29 AM
Yes, is that best adjusted through -ac_halving, -ac_decay and/or total emission.
jl777c22-Sep-18 11:30 AM
simplest is the change the halving to 5x internally
CrisF22-Sep-18 11:35 AM
Something like every 15555 blocks?(edited)
jl777c22-Sep-18 11:37 AM
5 * 77777 is not anything close to 15555
CrisF22-Sep-18 11:46 AM
Oops!
Flexatron22-Sep-18 11:48 AM
Lmao
1
1
Thanks for your work jl777
jl777c22-Sep-18 11:51 AM
latest version 5x the decay so we end up at 200 mil coin supply and closer to 10 years before there is a problem with too few coins emitted
all this assumes the hardfork can be deployed before 77777
wookie22-Sep-18 12:05 PM
Is there any way to slow down emission schedule but keep the total coin supply? For me the biggest attraction is the privacy features followed by coin supply
SHossain22-Sep-18 12:05 PM
then, we have about a month before block 77777
Don King22-Sep-18 12:06 PM
Yes, thanks for your work jl777, those numbers look good to me! I sày we pull the trigger on the hard fork to add notary t transactions to allow dPoW, and change the coin emission as jl777 suggests! Those 2 changes will make PIRATE the perfect 'offshore' coin! Who needs the Panama papers now?
Then all we need is an exchange, wonder digitalprice.io would list PIRATE doing z only tx
CrisF22-Sep-18 12:08 PM
@wookie , that's why I was asking about the other parameters.
Don King22-Sep-18 12:09 PM
I prefer to increase coin supply myself, otherwise the early miner bonus can cause problems
Put yourself in the shoes of the guys we want to join PIRATE community(edited)
SHossain22-Sep-18 12:11 PM
i wouldn't go with digitalprice.io. they charge for updating a coin daemon.
CrisF22-Sep-18 12:12 PM
It doesn't matter to me. I was just curious .
SHossain22-Sep-18 12:12 PM
we can talk to cryptopia once we are ready. we can offer them something that they can't refuse
Don King22-Sep-18 12:12 PM
200M coins just means the party gets bigger, and doesn't give too big an advantage to early adopters
SHossain22-Sep-18 12:13 PM
any exchange will enable PIRATE trading, will be the market leader
CrisF22-Sep-18 12:13 PM
The -params related to this wouldn't effect the test notarization chain would they?(edited)
Don King22-Sep-18 12:13 PM
I would love to see a komodo team start an exchange
Maybe an existing notary
SHossain22-Sep-18 12:14 PM
@Don King that's too much work to operate a CEX. we have DEX
Don King22-Sep-18 12:15 PM
Ha ha, bartercex
SHossain22-Sep-18 12:15 PM
yep
Don King22-Sep-18 12:16 PM
Could be just a bare bones pirate:kmd exchange, nothing else, just a few tx here and there
SHossain22-Sep-18 12:17 PM
i can setup notary nodes and test coin to test notarization next week or the following
Don King22-Sep-18 12:18 PM
@SHossain, sounds great!
wookie22-Sep-18 12:18 PM
@jl777c you mentioned all this assumes we are able to hardfork before block 77777. What happens if it does not?
CrisF22-Sep-18 12:18 PM
Rewards half?
jl777c22-Sep-18 12:19 PM
lets just get it done before 77777
still we need to verify notarization works
other than that, nothing else to verify and then people can update
with 1 year emission, it wont be any issue for late comers
CrisF22-Sep-18 12:19 PM
The -params related to this wouldn't effect the test notarization chain would they?
jl777c22-Sep-18 12:19 PM
i dont understand the question
scubapanda22-Sep-18 12:20 PM
A Shapeshift type service would be a good start for PIRATE:KMD pair.
SHossain22-Sep-18 12:20 PM
@CrisF it shouldn't. as jl777 mentioned, he already updated the source.
CrisF22-Sep-18 12:22 PM
To make a test chain for notarization tests, the exact -ac_halving, -ac_decay etc wouldn't effect notarizations would they? They could be changed again before hard forking PIRATE right?
@SHossain Thanks
Don King22-Sep-18 12:23 PM
@scubapanda, yes, a simple shapeshift type setup to send kmd back and forth to your offshore PIRATE treasure chest!
SHossain22-Sep-18 12:24 PM
@CrisF we will have to create new chain to test notarization. changing parameters shouldn't affect anything as long as notary nodes use the same udpated param.
CrisF22-Sep-18 12:25 PM
Thanks @SHossain ! @Alright(edited)
SHossain22-Sep-18 12:26 PM
i'll be needing couple of volunteers to mine the new test chain that we will create for notarization. CPU mining will be enough.
wookie22-Sep-18 12:27 PM
@SHossain I can volunteer my cpu.
2
CrisF22-Sep-18 12:28 PM
STAKED might be interested?
wookie22-Sep-18 12:28 PM
Can someone explain in lay man terms what the "shape shift type setup" means and does?
SHossain22-Sep-18 12:29 PM
if stakers can join, that would be nice. all they have to do is run the chain and mine. i can manage the notary nodes.
scubapanda22-Sep-18 12:39 PM
@wookie It would be a service where you would send one coin in and get the other in return. For that to work, both coins need to have a market. Or you might end up having most PIRATE but no KMD
2
xoso22-Sep-18 12:54 PM
I'm compiling params for a test chain. please wait...
I propose these params:
./komodod -ac_name=CHEEZ -ac_supply=0 -ac_reward=500000000 -ac_halving=2100000 -ac_private=1 -addnode=
SHossain22-Sep-18 01:01 PM
@xoso we have one chain already. thanks. will post that soon
xoso22-Sep-18 01:01 PM
total supply: 20,999,999.98044220
halving every 1458.333333 days
SHossain22-Sep-18 05:36 PM
@wookie@xoso we will be using this chain for private chain notarization test ./komodod -ac_name=PRIVATEER -ac_supply=0 -ac_reward=25600000000 -ac_halving=388885 -ac_private=1 -addnode=<IP_ADDRESS> -addnode=<IP_ADDRESS> &
it is CPU minable
You need komodod from jl777 branch
@CHMEX can we please have an explorer setup for this ^^ chain?
CHMEX22-Sep-18 07:15 PM
@SHossain
privateer.explorer.dexstats.info/
SHossain22-Sep-18 07:15 PM
thanks @CHMEX
CHMEX22-Sep-18 07:16 PM
np let me know if you need notaries I can set up one or two tomorrow
SHossain22-Sep-18 07:17 PM
thanks. i'm setting up 2 for now to get everything started
i'll let you know
@wookie which OS you are using?
wookie22-Sep-18 07:18 PM
windows
SHossain22-Sep-18 07:20 PM
there no binary for winodws from jl777 branch
wookie22-Sep-18 07:21 PM
sorry, that's the only cpu I have that's constantly connected(edited)
SHossain22-Sep-18 07:22 PM
no worries. thanks for your offer
wookie22-Sep-18 07:23 PM
np. I'm happy to help in any way!
wookie22-Sep-18 07:41 PM
sorry for the noob question: will the coins that are already mined still be valid after the hardfork?
jl777c22-Sep-18 07:45 PM
yes
wookie22-Sep-18 07:45 PM
thanks!
Flexatron22-Sep-18 09:45 PM
Promising.
2
Alright22-Sep-18 11:52 PM
@SHossain if you get a notary network up for that new chain, let me know and I'll try reorgs on it
we should be adding an ac_private chain to the STAKED notary network within a couple days also
Hermes23-Sep-18 12:16 AM
2
Alright23-Sep-18 12:18 AM
I don't like that this implementation for dpow gives notaries special powers
when I have time, I will test what I proposed
Hermes, add *except 64 addresses to that graphic
2
Hermes23-Sep-18 12:38 AM
1
1
Just some concepts , will try to have something more elaborate shortly
i dont think notaries being able to do transparent tx is any special powers, cant think of how they can use it to deanonymize any others, even by a little
1
CHMEX23-Sep-18 07:48 AM
If I understand it correctly the notaries only need t transactions to notarize to the notarization address, if so would it be an idea just to allow transactions to the crypto address. Or is that inpractical?
I agree if the notaries can make t transactions it does not risk the anonymity of others.
CHMEX23-Sep-18 08:02 AM
that would also mean the chain does not need to be forked when new notaries are elected.
As I see it PIRATES will not get (can't get) new features so it's a finished product.
jl777c23-Sep-18 08:29 AM
splitting into utxo, being able to receive funds, these are also needed for practical notarization
i guess one aspect is that a notary could run an exchange and accept t-deposits, but would still need to support z-withdraws
it doesnt seem like any giant advantage for a notary and I would imagine that anybody that would be running an exchange for PIRATE would be able to get their pubkey added to the exemption list
CHMEX23-Sep-18 08:33 AM
True I did not think that far that they need to split and actually have funds to notarize
jl777c23-Sep-18 08:35 AM
it would be possible to require all notaries to mine and create custom coinbase to do the splitting, but this does not seem very practical as it might soon require a z9 to ming the PIRATE treasures


Showing {{ (bugs | filterMultiple:filter).length }} of {{ bugs.length }} bugs
No bugs found.
You haven't added any bugs yet. Add one now?


Issue 35
This is the last issue of 2016. Looking back on the year, these are the most-clicked links of 2016.

- New haskell-lang.org
- Powerline-hs
- HyperHaskell: the strongly hyped Haskell interpreter
- Good way to convert between ad-hoc polymorphic functions and parametric polymorphic ones
- The unreasonable effectiveness of reasoning: eliminating bottom
- Modern function programming: part 2
- Thoughts on Haskell
- ML modules versus Haskell type classes
Many other people reflected on 2016 in Haskell this year. And the next version of GHC is closer to release!
-
The GHC team is happy to announce the second candiate of the 8.0.2 release of the Glasgow Haskell Compiler. This is the second and likely final release candidate leading up the 8.0.2 release. If all goes well we should have a final 8.0.2 release out shortly after the new year.
-
Well, 2016 … that just happened. About the only thing I can put in perspective at closing of this year is progress and innovation in Haskell ecosystem. There was a lot inspiring work and progress that pushed the state of the art forward.
-
Haskell communities and activities report
This is the 31st edition of the Haskell Communities and Activities Report. There are several interesting entries in the report, including updated tutorials and books, new user groups, interesting tools and applications.
-
Haskus system is a framework written in Haskell that can be used for system programming. The long-term aim is to provide a full Haskell user-space environment on top of the Linux kernel.
-
How to write a small, useful command line application in Haskell
We’re going to build a command line application called
teleport
, It allows people to add “warp points” to navigate the file system. The warp points support creating new warp points, deleting them, and listing them. -
Pattern synonyms allow us give names to pattern matches. It is a relatively new GHC extension which was first introduced in GHC 7.8 and further enhanced in GHC 8.0. In this post, I will show you an usage of pattern synonyms with a practical example.
-
I think the PVP is a bad policy and the Haskell community should abandon it in favor of SemVer.
Thanks for reading, and have a great new year! Let us know on Twitter if you liked this issue. Open an issue on GitHub if you think it could be better.


Weather-App
Search
Hello,
!
Today's Weather
C
|
F
  7 day Past Week Weather
Day
Description
Temperature
Precip
Wind
Humidity


Capturing VPP core dumps¶
In order to debug a crash of VPP, it is required to provide a coredump file, which allows backtracing of the VPP issue. The following items are the requirements for capturing a coredump:
1. Disable k8s Probes to Prevent k8s from Restarting the POD with a Crashed VPP¶
As described in BUG_REPORTS.md.
2. Modify VPP Startup config file¶
In /etc/vpp/contiv-vswitch.conf
, add the following lines into the unix
section:
unix {
...
coredump-size unlimited
full-coredump
}
3. Turn on Coredumps in the Vswitch Container¶
After re-deploying Contiv-VPP networking, enter bash shell in the vswitch
container (use actual name of the vswitch POD - contiv-vswitch-7whk7
in this case):
kubectl exec -it contiv-vswitch-7whk7 -n kube-system -c contiv-vswitch bash
Enable coredumps:
mkdir -p /tmp/dumps
sysctl -w debug.exception-trace=1
sysctl -w kernel.core_pattern="/tmp/dumps/%e-%t"
ulimit -c unlimited
echo 2 > /proc/sys/fs/suid_dumpable
4. Let VPP Crash¶
Now repeat the steps that lead to the VPP crash. You can also force VPP to crash at the point where it is running (e.g., if it is stuck) by using the SIGQUIT signal:
kill -3 `pidof vpp`
5. Locate and Inspect the Core File¶
The core file should appear in /tmp/dumps
in the container:
cd /tmp/dumps
ls
vpp_main-1524124440
You can try to backtrace, after installing gdb:
apt-get update && apt-get install gdb
gdb vpp vpp_main-1524124440
(gdb) bt
6. Copy the Core File Out of the Container¶
Finally, copy the core file out of the container. First, while still inside the container, pack the core file into an archive:
cd /tmp/dumps
tar cvzf vppdump.tar.gz vpp_main-1524124440
Now, on the host, determine the docker ID of the container, and then copy the file out of the host:
docker ps | grep vswitch_contiv
d7aceb2e4876 c43a70ac3d01 "/usr/bin/supervisor…" 25 minutes ago Up 25 minutes k8s_contiv-vswitch_contiv-vswitch-zqzn6_kube-system_9923952f-43a6-11e8-be84-080027de08ea_0
docker cp d7aceb2e4876:/tmp/dumps/vppdump.tar.gz .
Now you are ready to file a bug in jira.fd.io and attach the core file.


--- layout: post title: Talking about Linq2Sql and Expression Trees tonight date: '2008-04-23T10:09:00.001+01:00' tags: [linq2sql] modified_time: '2008-04-23T10:09:21.359+01:00' blogger_id: tag:blogger.com,1999:blog-4015568221071268916.post-8231884665095031049 comments: true blogger_orig_url: http://serialseb.blogspot.com/2008/04/talking-about-linq2sql-and-expression.html ---
If you're in London, why not join us tonight to celebrate Visual Studio 2008 and .net 3.5 releases at the London .net user group? We'll be discussing some of the new features in the bits, and I shall be presenting some useless code that shows integration testing and fluid database design using Linq2Sql, with some expression tree goodness.


IN A WORLD where your best friend is a bat. And then you crash into a mysterious cave.  And like, it's a metroidvania-action-platformer-puzzler-adventure-RPG-lightsourcemanagement hybrid.
Well, this... is the world of BATBARIAN!


Nutrition continues to be a much discussed topic amongst marathon runners. Questions about what to eat before, during, and after the race are commonly asked by beginners and even advanced runners. Here is a quick guide to getting your nutrition for your marathon just right.
Interestingly, the story does not start in the week before the race, like training it starts many weeks before the event! After a race it also seems to be one of the main topics, especially for runners who did not achieve their goals or had problems along the way.
Training and nutrition are the two of the most important factors determining performance on race day. Most runners spend many hours per week training, planning, and preparing their training sessions… but how much time is spent on nutrition? Often, nutrition is taken for granted and this could jeopardize all the hours and days of hard training.
Preparation starts many weeks before the event. You need to know some of the basics of the race like: what nutrition will be provided on course, where are the feed stations, and what are the weather conditions likely to be. You may not be able to influence the weather, but you can prepare for the conditions. Finding out what nutrition is going to be handed out is important too because it would be a good idea to practice with this nutrition and make sure you can tolerate it and you can adapt to it. If you can’t tolerate it, it is better to find out weeks in advance than on race day.
The first step is to figure out what nutrition works best for you. This includes not only products, but timing as well. Start doing this 10 weeks before the event, pick your long run training to practice and follow your plan, or build up to it. As mentioned above, first try using the products that will be available on the course. If those do not agree with you, start experimenting with other products.
In the the days before the race you should make sure your fuel stores (muscle glycogen) are full. In the old days, extreme carbo-loading regimes were followed with days of no carbohydrate, days of extreme carbohydrate, a depletion run a week before, etc. This practice is not necessary. Very high muscle glycogen levels can be achieved by just eating more carbohydrates.
Eating more carbohydrate does not mean overeating or eating as much as possible! It just means making sure more of your daily calories are coming from carbohydrate at the cost of some fat. It is a good idea to have the last large meal at lunch time the day before and to have a lighter meal in the evening. This is also something you should practice in the weeks before or when you have a smaller race coming up. If you frequently suffer from gastro-intestinal problems, reduce your fiber intake to a minimum the day before the race.
From a purely practical point of view, you also need to plan in advance, especially if you are travelling. Make a reservation at a place where you know the food is good. Don’t wait and make it up on the go and end up at fast food place or lining up for hours. Your legs need to work hard enough the next day.
The breakfast is important because it replenishes your liver glycogen. Carbohydrate is stored in the liver but during the night the brain uses this carbohydrate so when you wake up there is not much left. Since this will delay the point at which you bonk, it is important to eat a carbohydrate rich breakfast. Again if you suffer from gastro-intestinal problems, reduce your fiber intake
Exactly what the breakfast should consist of depends on personal preferences. Some people run really well on a couple of bagels and a coffee, other prefer oatmeal, waffles with syrup, a couple of energy bars or a small bowl or rice. Whatever you select, I would recommend that it has at least 100 grams of carbohydrate and that you use this breakfast with exactly the same timing before hard training and smaller races.
The best timing is probably 3 to 4 hours before the start. If you don’t suffer from gastrointestinal distress 2 to 3 hours before might still work. Check your urine color. If it is pretty light you are ok, if it is dark, keep drinking a little more. No need to go crazy on the fluids but you don’t want to start with dark colored urine.
The hour before is usually spent anxiously waiting. Make sure you bring a water bottle to sip and a gel to take in the 15 minutes before the race starts. Practice this several times in training. Whatever you consume in the minutes before the start will become available during the run because it takes a little time to absorb. I therefore usually calculate anything you take in this timeframe as part of your carbohydrate intake during the race.
During the race two things will be important: carbohydrate and fluids. For both it is important to take enough, but not too much. Too much fluid or carbohydrate can cause an upset stomach. Drinking large amounts of fluid that lead to weight gain is certainly not recommended and may even cause hyponatremia- a potentially health threatening condition.
The only way to really understand your sweat rate and how much drinking is required is by weighing yourself before and after training in the weeks leading up to the marathon. This way, your sweat rate can be calculated by subtracting the weight after from the weight before and adding the volume of fluids consumed. There are various sweat calculator on the internet that will help you do these calculations.
If you are running in similar condition and at a similar pace to the actual marathon, sweat rates will be similar. The cups you receive during a marathon usually contain about 150 ml (5 oz.) and you probably consume about 100 ml of that (3 oz.). To prevent dehydration, you will have to drink amounts that are similar to your sweat rate. A runner’s stomach can empty about 6 to 7 ounces (180 to 210 ml) of fluid every 15 minutes during running, representing about 24 to 28 ounces (720 to 840 ml) per hour. This, however, can be trained, practiced, and improved if needed.
Carbohydrate requirements are more straightforward. Studies seem to suggest that you can use about 60 grams of carbohydrate per hour from most carbohydrate sources. Athletes should target 30 to 60 grams per hour. An athlete finishing in the 4 to 5 hour range will be OK with being at the lower end of this. Athletes aiming for a 3 hour finish could benefit more from being at the higher end of this range. Recent studies also suggest a dose response relationship. In other words: more carbohydrate could be better for performance. But of course too much might cause gastrointestinal problems and have the opposite effect.
Carbohydrate sources
The good news is that your gut is extremely trainable and you could actually train it to tolerate these drinks, gels, bars, etc. which means you will have to use it in training regularly. So use all the products you will use in the race in training!
Also avoid experimenting on race day with new products. There is also a flipside to this coin. Those athletes who are not regularly consuming carbohydrate, are trying to lose weight, are on a high fat diet and so on, will have a diminished capacity to absorb carbohydrate and more likely to have gastrointestinal problems during exercise.
Electrolytes (sodium) may help with absorption and some sodium in your drinks or gels is therefore recommended but don’t overdo it! A marathon is too short to cause extreme sodium losses that will impact performance or health.
Many athletes use caffeine before or during a marathon to boost their performance. This practice is indeed supported by scientific evidence although there may be individual differences in tolerance and perception. It works for most but may cause negative effects for a few. Studies have demonstrated that relatively small amounts of caffeine are required to give optimal effects (3mg per kilogram body weight; 200mg for a 70kg person) and a general recommendation is not to exceed a daily intake of 400 mg caffeine from all sources. Caffeinated gels usually contain between 25 and 50mg of caffeine and an espresso 80 to 100 mg.
Although there are guidelines to recover quickly after a marathon. Does it really matter that much? Most people won’t run another marathon the next day or race again for a couple of weeks. So enjoy your achievement and indulge in moderation!


You can contact us by phone or email.
Also, you can contact us by clicking on the "Ask a question" button in the main menu.
To ask a question about a specific book, you need to click on the book of interest and click on the "Ask a question" button.
You can contact us by phone or email.
Also, you can contact us by clicking on the "Ask a question" button in the main menu.
To ask a question about a specific book, you need to click on the book of interest and click on the "Ask a question" button.


-webkit-marquee-direction
Specifies the direction of motion for a marquee box.
-webkit-marquee-direction: ahead | auto | backwards | down | forwards | left | reverse | right | up;
The marquee moves from bottom to top.
The marquee moves in the default direction.
The marquee moves from right to left.
The marquee moves from bottom to top.
The marquee moves from left to right.
The marquee moves from right to left.
The marquee moves from top to bottom.
The marquee moves from left to right.
The marquee moves from bottom to top.


Because of the constant surge, coming alongside the dock can be dangerous, so it is advisable to anchor in the lee of the seawall. Officials rarely board yachts and formalities will be completed ashore. Assab should only be considered if the winds are unfavourable. There is little protection from strong southerlies and with these winds it is best to continue to Massawa.
Report to the port Immigration office for clearance. Visas can be obtained here.
There is however an excellent, sheltered anchorage just east of Assab on the west side of Lahaleb Deset.


User
class User extends ClientBase (View source)
Represents an user on Discord.
Properties
| string | $avatar | The hash of the user's avatar. | ||
| boolean | $bot | Is the user a bot? Or are you a bot? | ||
| Client | $client | The client which initiated the instance. | from ClientBase | |
| DateTime | $createdAt | An DateTime instance of the createdTimestamp. | ||
| int | $createdTimestamp | The timestamp of when this user was created. | ||
| int | $defaultAvatar | The identifier of the default avatar for this user. | ||
| string | $discriminator | The discriminator of this user. | ||
| DMChannel|null | $dmChannel | The DM channel for this user, if it exists, or null. | ||
| string | An email address or maybe nothing at all. More likely to be nothing at all. | |||
| string | $id | The user ID. | ||
| Message|null | $lastMessage | The laste message the user sent while the client was online, or null. | ||
| string|null | $lastMessageID | The last ID of the message the user sent while the client was online, or null. | ||
| boolean|null | $mfaEnabled | Whether the user has two factor enabled on their account, or null if no information provided. | ||
| Presence|null | $presence | The presence for this user, or null. | ||
| string | $tag | Username#Discriminator. | ||
| string | $username | The username. | ||
| boolean|null | $verified | Whether the email on this account has been verified, or null if no information provided. | ||
| boolean | $webhook | Determines wether the user is a webhook or not. |
Methods
Automatically converts the User instance to a mention.
Opens a DM channel to this user. Resolves with an instance of DMChannel.
Deletes an existing DM channel to this user.
Fetches the User's connections. Requires connections scope. Resolves with a Collection of UserConnection instances, mapped by their ID.
Get the Avatar URL.
Get the default Avatar URL.
Get the URL of the displayed avatar.
Details
at line 217
__toString()
Automatically converts the User instance to a mention.
at line 129
Promise
createDM()
Opens a DM channel to this user. Resolves with an instance of DMChannel.
at line 147
Promise
deleteDM()
Deletes an existing DM channel to this user.
at line 200
Promise
fetchUserConnections()
Fetches the User's connections. Requires connections scope. Resolves with a Collection of UserConnection instances, mapped by their ID.
at line 173
string|null
getAvatarURL(int $size = 256, string $format = '')
Get the Avatar URL.
at line 163
string
getDefaultAvatarURL(int $size = 256)
Get the default Avatar URL.
at line 191
string
getDisplayAvatarURL(int $size = 256, string $format = '')
Get the URL of the displayed avatar.