In this chapter, you will be learn about two common data structures that are used in the R statistical computing environment: vectors and data frames. You will also learn about particular types (or classes) of vectors, namely numeric, character, and logical vectors.
One way to think about vectors and data frames is to use the metaphor of bookcases. Vectors are single column bookcases and data frames are multi-column bookcases.6
Similar to real bookcases, the bookcases in our metaphor can be used to store things. In our metaphorical bookcases, we will store data values. Note that in the picture, the color of the bookcase is constant within each column. This indicates that, unlike real bookcases, whatever type of data we store in a column of our metaphorical bookcase will have to be homogenous. For example, we cannot store numberic values and character strings (e.g., names) within the same column without consequences.7
Vectors (the single-column bookcases in our metaphor) are perhaps the most common data structure you will encounter in R. In fact, even the data frame is composed of vectors; each column is a vector. There are many ways to create a vector in R, in fact you have already been introduced to a couple of them: seq()
and rep()
. These are useful to create sequences of values and vectors with repeated values, respectively. But what if you wanted to create the vector of the Spice Girls’ ages when the band was formed in 1994 (the values in the second column in the picture above)?
To create a vector of these ages, we can use the c()
function to input each of the five ages. Within this function, each age is separated by a comma—each input is a separate argument to the c()
function. We will also assign this to an object called age
.
# Create age vector
= c(19, 20, 18, 22, 20)
age
# View vector
age
[1] 19 20 18 22 20
Note that once we assign create age
it shows up in our global environment. In the technical language of R, each age is an element of the vector. All of the elements in the age
vector are numeric values. This is the vector’s type.8 Lastly, there are five elements in the vector.
Once you have created a numeric vector, you can compute on it. For example in the syntax below we compute the mean age, the standard deviation of the ages, and count the elements in the vector.
# Compute mean
mean(age)
[1] 19.8
# Compute standard deviation
sd(age)
[1] 1.48324
# Count elements
length(age)
[1] 5
Another common vector type you will encounter is the logical vector. Each element in a logical vector is either TRUE
or FALSE
(all uppercase letters). You could use the c()
function to create a logical vector. For example, to create the original_member
vector we could use the following syntax:
# Create vector
= c(TRUE, TRUE, FALSE, TRUE, FALSE)
original_member
# View vector
original_member
[1] TRUE TRUE FALSE TRUE FALSE
It is more common to create logical vectors through computation using logical operators. For example we might ask which elements of the age
object are greater than 20.
# Which elements of age > 20
> 20 age
[1] FALSE FALSE FALSE TRUE FALSE
The result of using the logical operator >
is a logical vector. There are several logical operators in addition to >
:
# greater than or equal to 20
>= 20 age
[1] FALSE TRUE FALSE TRUE TRUE
# less than 20
< 20 age
[1] TRUE FALSE TRUE FALSE FALSE
# less than or equal to 20
<= 20 age
[1] TRUE TRUE TRUE FALSE TRUE
# equal to 20
== 20 age
[1] FALSE TRUE FALSE FALSE TRUE
# not equal to 20
!= 20 age
[1] TRUE FALSE TRUE TRUE FALSE
Note that the logical operator for “equal to” is two equals signs. This is because =
(one equal sign) is what we use for assignment . If you wrote age=20
you would be assigning the value 20 to age
, not asking whether the elements in age
are equal to 20!
Logical elements have numeric values associated with them, namely,
FALSE
= 0; andTRUE
= 1.This means we can apply computations to a logical vector. For example, we could count the number of Spice Girls that were original members by summing the logical values in the original_members
object. (Since all FALSE
values are 0, this amounts to counting the number of TRUE
values.)
sum(original_member)
[1] 3
We could also count the number of Spice Girls who are under the age of 20.
sum(age < 20)
[1] 2
A third type of vector you will work with is a character vector. Character vectors (a.k.a., strings, literals) are vectors in which each element is a string of characters delimited by quotation marks. For example, the Spice names column is a character vector. We can again create this vector using the c()
function.
# Create vector
= c("Scary", "Sporty", "Baby", "Ginger", "Posh")
spice
# View vector
spice
[1] "Scary" "Sporty" "Baby" "Ginger" "Posh"
Many computations that worked on numeric ectors do not work on character vectors. These will often return an error or unexpected result. In the syntax below, for example, we are told that the mean()
function expects a numeric or logical vector, and since what we used was not either of those, the result returned was NA
.
# Find mean name
mean(spice)
[1] NA
Some computations work the same way.
# Count the number of elements
length(spice)
[1] 5
Data frames (the multi-column bookcases in our metaphor) are a more complex data structures than vectors. There are again, multiple ways to create a data frame in R. We will examine two methods for creating a data frame: using the data.frame()
function and importing data from a spreadsheet or CSV file.
To create a data frame from scratch, using R, we can use the data.frame()
function. Each argument to this function is a named vector that will correspond to a column within the data frame, and each argument (vector) is separated by commas. For example, to create the Spice Girls data frame from our example, we could use the following syntax:
# Create data frame
= data.frame(
spice_girls spice = c("Scary", "Sporty", "Baby", "Ginger", "Posh"),
age = c(19, 20, 18, 22, 20),
original_member = c(TRUE, TRUE, FALSE, TRUE, FALSE),
solo_nominations = c(4, 26, 14, 13, 12),
real_name = c("Mel B", "Mel C", "Emma", "Geri", "Victoria")
)
# View data frame
spice_girls
spice age original_member solo_nominations real_name
1 Scary 19 TRUE 4 Mel B
2 Sporty 20 TRUE 26 Mel C
3 Baby 18 FALSE 14 Emma
4 Ginger 22 TRUE 13 Geri
5 Posh 20 FALSE 12 Victoria
Note that we also assigned the data frame to an object called spice_girls
so we can compute on it. You will learn how to compute on data frames in the chapters Data Wrangling with dplyr and Plotting with ggplot2.
In professional practice, you will often enter data into a spreadsheet and rather than typing it into R. When you save this work, many spreadsheet programs use a proprietary format for saving the information (e.g., Excel saves as a XLSX file; Google Sheets saves as a GSHEET file). These often include extraneous information (e.g., formatting) that is irrelevant to the raw data. While R includes libraries and functions that can import data in the XLSX and GSHEETS formats, it is generally easier to save or export your data to a CSV (comma separated value) file from within your spreadsheet program prior to importing it into R.
Here are some tips for entering data into a spreadsheet:
For more tips on entering data, see Broman & Woo (2018).
Once your data are saved as a CSV file, it can be easily imported into R. To do so,
Import Dataset
button under the Environment
tab in RStudio and choose “From Text (readr).”Browse
button and navigate to where you saved your CSV file, select the file, and click “Open.”This will open a preview of your data. Check to be sure the variable names are correct and that the data looks like what you entered into your spreadsheet.
name
box to correspond to the object name you want to use in R.Import
button to import your data.After importing the data you should see the object in your global environment.
Even though you used the Import
button—a point-and-click feature in RStudio—to import the data, behind the scenes, syntax was generated that was actually used to import the data into R. When we selected “From Text (readr),” the read_csv()
function from the readr package was used to import the data. You can see the syntax generated in the Code Preview
window after you selected your CSV file.
In the first line of syntax, the readr package is loaded using the library()
function. The data is imported in the second line of syntax and assigned to an object, in this case spice_girls
. The read_csv()
function includes the path name for the CSV file on your computer.9 The View()
function in the third line of syntax simply opens the spice_girls
object in a view tab in RStudio.
It is a good idea to copy the first two lines of syntax from the Code Preview
window into your script file. It will be faster to import the data in the future by running it from a script file rather than trying to reproduce all the steps to import your data. The third line of syntax, using View()
, is not essential to importing your data, and there are better ways to actually “see” the contents of the data object.
If you are computing on a Mac, you may need to add ~/
to the beginning of the path name defined in the read_csv()
function in your script file.
There are several functions that are useful for exploring or examining a data frame. Two that I use regularly include head()
and summary()
.
# View beginning of data
head(spice_girls)
spice age original_member solo_nominations real_name
1 Scary 19 TRUE 4 Mel B
2 Sporty 20 TRUE 26 Mel C
3 Baby 18 FALSE 14 Emma
4 Ginger 22 TRUE 13 Geri
5 Posh 20 FALSE 12 Victoria
The read_csv()
function actually imports the data as a tibble. Tibbles are essentially the same data structure as data frames. The only difference is that when you use head()
(and some other functions) to examine the data object, what is printed to the screen is slightly different.10 For tibbles,
Here the size of the data object is 5 x 5
, which indicates that there are five rows (first value) and five columns (second value). We are also informed which columns are numeric, which are logical, and which are character. In addition, The summary()
function computes summary statistics for each column in the data object.
# Compute summary measures for each column
summary(spice_girls)
spice age original_member solo_nominations
Length:5 Min. :18.0 Mode :logical Min. : 4.0
Class :character 1st Qu.:19.0 FALSE:2 1st Qu.:12.0
Mode :character Median :20.0 TRUE :3 Median :13.0
Mean :19.8 Mean :13.8
3rd Qu.:20.0 3rd Qu.:14.0
Max. :22.0 Max. :26.0
real_name
Length:5
Class :character
Mode :character
Different measures are computed depending on the column type. For character columns, only the length of the column is computed. The count of TRUE and FALSE values are computed for logical columns, and several measures are computed for numeric columns.
Technically, a data frame can have a single column, but in practice most data frames you encounter will have many columns.↩
In this case, everything in the column would be turned into a character string.↩
The technical type is “double,” which is commonly referred to as numeric.↩
The argument for the read_csv()
function can also be the URL to a web-hosted CSV file.↩
For data frames only the first six rows are displayed, all the columns are printed regardless of size, and column type is not reported.↩


CSS Workshop
01 Defaults and Inheritance
Lecture
Lecture Final
02 Selectors and Cascade
Lecture
Lecture Final
Exercise
03 Box Model
Lecture
04 Resets and Normalize
Lecture
Lecture Final
05 Layout Essentials
Lecture
Exercise
Exercise Final
06 Flexbox
Lecture
Lecture Final
Exercise
Exercise Final
07 Layout Planning
Lecture
Lecture Final
Exercise
Exercise Final
08 CSS-Tricks
Grid Tiles
Triangles
Line Through Heading
Toggle
Container Queries
09 Strategy
Lecture
Exercise
Exercise Final


Syme had vanished. A morning came, and he was missing from work: a few thoughtless people commented on his absence. On the next day nobody mentioned him. On the third day Winston went into the vestibule前厅，门厅（如可放衣帽处）an entrance hall of a large building , for example where hats and coats can be left of the Records Department to look at the notice-board. One of the notices carried a printed list of the members of the Chess Committee, of whom Syme had been one. It looked almost exactly as it had looked before—nothing had been crossed out—but it was one name shorter. It was enough. Syme had ceased to exist: he had never existed.
The weather was baking hot. In the labyrinthine Ministry the windowless, air-conditioned rooms kept their normal temperature, but outside the pavements scorched烫坏，烧煳；烤焦（物体表面）to burn and slightly damage a surface by making it too hot; to be slightly burned by heat one's feet and the stench臭气；恶臭 a strong, very unpleasant smell of the Tubes at the rush hours（上下班时的）交通高峰期the time, usually twice a day, when the roads are full of traffic and trains are crowded because people are travelling to or from work was a horror. The preparations for Hate Week were in full swing正在全力进行；全面展开 “in full activity”的变体, and the staffs of all the Ministries were working overtime. Processions, meetings, military parades, lectures, waxworks, displays, film shows, telescreen programmes all had to be organized; stands had to be erected, effigies（名人、圣人或神的）雕像，塑像a statue of a famous person, a saint or a god built, slogans coined, songs written, rumours circulated, photographs faked.  Winston, in addition to his regular work, spent long periods every day in going through back files of ‘The Times' and altering and embellishing美化；装饰；布置to make sth more beautiful by adding decorations to it news items which were to be quoted in speeches. Late at night, when crowds of rowdy proles roamed the streets, the town had a curiously febrile狂热的 nervous, excited and very active air. The rocket bombs crashed oftener than ever, and sometimes in the far distance there were enormous explosions which no one could explain and about which there were wild rumours.
The new tune which was to be the theme-song of Hate Week (the Hate Song, it was called) had already been composed and was being endlessly plugged on the telescreens. It had a savage, barking rhythm which could not exactly be called music, but resembled the beating of a drum. Roared out by hundreds of voices to the tramp流浪汉；流浪乞丐a person with no home or job who travels from place to place, usually asking people in the street for food or money of marching feet, it was terrifying. The proles had taken a fancy to it, and in the midnight streets it competed with the still-popular ‘It was only a hopeless fancy'. The Parsons children played it at all hours of the night and day, unbearably, on a comb and a piece of toilet paper. Winston's evenings were fuller than ever. Squads of volunteers, organized by Parsons, were preparing the street for Hate Week, stitching banners, painting posters, erecting flagstaffs on the roofs, and perilously slinging wires across the street for the reception of streamers. Parsons boasted that Victory Mansions alone would display four hundred metres of bunting. He was in his native element and as happy as a lark百灵鸟；云雀 a small brown bird with a pleasant song. The heat and the manual work had even given him a pretext for reverting to shorts and an open shirt in the evenings. He was everywhere at once, pushing, pulling, sawing, hammering, improvising, jollying everyone along with comradely exhortations规劝;劝告 and giving out from every fold of his body what seemed an inexhaustible supply of acrid-smelling sweat.
A new poster had suddenly appeared all over London. It had no caption, and represented simply the monstrous figure of a Eurasian soldier, three or four metres high, striding forward with expressionless Mongolian face and enormous boots, a sub-machine gun pointed from his hip. From whatever angle you looked at the poster, the muzzle枪口；炮口the open end of a gun, where the bullets come out of the gun, magnified by the foreshortening(在绘画中)按远近比例缩小(图形), seemed to be pointed straight at you. The thing had been plastered on every blank space on every wall, even outnumbering the portraits of Big Brother. The proles, normally apathetic冷漠；淡漠；无动于衷showing no interest or enthusiasm about the war, were being lashed into one of their periodical frenzies of patriotism. As though to harmonize with the general mood, the rocket bombs had been killing larger numbers of people than usual. One fell on a crowded film theatre in Stepney, burying several hundred victims among the ruins. The whole population of the neighbourhood turned out for a long, trailing funeral which went on for hours and was in effect an indignation愤慨；愤怒；义愤a feeling of anger and surprise caused by sth that you think is unfair or unreasonable meeting. Another bomb fell on a piece of waste ground which was used as a playground and several dozen children were blown to pieces. There were further angry demonstrations, Goldstein was burned in effigy, hundreds of copies of the poster of the Eurasian soldier were torn down and added to the flames, and a number of shops were looted（暴乱、火灾等后）打劫，抢劫，劫掠to steal things from shops/stores or buildings after a riot , fire, etc. in the turmoil; then a rumour flew round that spies were directing the rocket bombs by means of wireless waves, and an old couple who were suspected of being of foreign extraction血统；族裔having a particular family origin had their house set on fire and perished of suffocation窒息.
In the room over Mr Charrington's shop, when they could get there, Julia and Winston lay side by side on a stripped bed under the open window, naked for the sake of coolness. The rat had never come back, but the bugs had multiplied hideously in the heat. It did not seem to matter. Dirty or clean, the room was paradise. As soon as they arrived they would sprinkle撒；洒；把…撒（或洒）在…上to shake small pieces of sth or drops of a liquid on sth everything with pepper bought on the black market, tear off their clothes, and make love with sweating bodies, then fall asleep and wake to find that the bugs had rallied and were massing for the counter-attack（战争、体育运动或争论中的）反攻，反击an attack made in response to the attack of an enemy or opponent in war, sport or an argument.
Four, five, six—seven times they met during the month of June. Winston had dropped his habit of drinking gin at all hours. He seemed to have lost the need for it. He had grown fatter, his varicose ulcer had subsided, leaving only a brown stain on the skin above his ankle, his fits突发 of coughing in the early morning had stopped. The process of life had ceased to be intolerable, he had no longer any impulse to make faces at the telescreen or shout curses at the top of his voice. Now that they had a secure hiding-place, almost a home, it did not even seem a hardship that they could only meet infrequently and for a couple of hours at a time. What mattered was that the room over the junk-shop should exist. To know that it was there, inviolate未受（或不容）侵犯的；未受（或不容）亵渎的；不容破坏的that has been, or must be, respected and cannot be attacked or destroyed, was almost the same as being in it. The room was a world, a pocket of the past where extinct animals could walk. Mr Charrington, thought Winston, was another extinct animal. He usually stopped to talk with Mr Charrington for a few minutes on his way upstairs. The old man seemed seldom or never to go out of doors, and on the other hand to have almost no customers. He led a ghostlike existence between the tiny, dark shop, and an even tinier back kitchen where he prepared his meals and which contained, among other things, an unbelievably ancient gramophone with an enormous horn. He seemed glad of the opportunity to talk.  With a sort of faded enthusiasm he would finger this scrap of rubbish or that—a china bottle-stopper瓶塞, the painted lid of a broken snuffbox, a pinchbeck locket containing a strand of some long-dead baby's hair—never asking that Winston should buy it, merely that he should admire it. To talk to him was like listening to the tinkling of a worn-out musical-box. He had dragged out from the corners of his memory some more fragments of forgotten rhymes. There was one about four and twenty blackbirds, and another about a cow with a crumpled horn, and another about the death of poor Cock Robin.  But he could never recall more than a few lines of any one rhyme.
Both of them knew—in a way, it was never out of their minds that what was now happening could not last long.  But there were also times when they had the illusion not only of safety but of permanence. So long as they were actually in this room, they both felt, no harm could come to them. Getting there was difficult and dangerous, but the room itself was sanctuary避难所；庇护所a safe place, especially one where people who are being chased or attacked can stay and be protected. It was as when Winston had gazed into the heart of the paperweight, with the feeling that it would be possible to get inside that glassy world, and that once inside it time could be arrested. Often they gave themselves up to daydreams of escape. Their luck would hold indefinitely, and they would carry on their intrigue, just like this, for the remainder of their natural lives. Or Katharine would die, and by subtle manoeuvrings手段；伎俩；花招 clever, skillful, and often dishonest ways of achieving your aims Winston and Julia would succeed in getting married.  Or they would disappear, alter themselves out of recognition, learn to speak with proletarian accents, get jobs in a factory and live out their lives undetected in a back-street. It was all nonsense, as they both knew. In reality there was no escape. Even the one plan that was practicable, suicide, they had no intention of carrying out. To hang on from day to day and from week to week, spinning out勉强再维持一段时间 a present that had no future, seemed an unconquerable instinct, just as one's lungs will always draw the next breath so long as there is air available.
Sometimes, too, they talked of engaging in active rebellion against the Party, but with no notion of how to take the first step. Even if the fabulous Brotherhood was a reality, there still remained the difficulty of finding one's way into it. He told her of the strange intimacy that existed, or seemed to exist, between himself and O'Brien, and of the impulse he sometimes felt, simply to walk into O'Brien's presence, announce that he was the enemy of the Party, and demand his help. Curiously enough, this did not strike her as an impossibly rash thing to do. She was used to judging people by their faces, and it seemed natural to her that Winston should believe O'Brien to be trustworthy on the strength of a single flash of the eyes. Moreover she took it for granted that everyone, or nearly everyone, secretly hated the Party and would break the rules if he thought it safe to do so. But she refused to believe that widespread, organized opposition existed or could exist. The tales about Goldstein and his underground army, she said, were simply a lot of rubbish which the Party had invented for its own purposes and which you had to pretend to believe in. Times beyond number, at Party rallies and spontaneous demonstrations, she had shouted at the top of her voice for the execution of people whose names she had never heard and in whose supposed crimes she had not the faintest belief. When public trials were happening she had taken her place in the detachments from the Youth League who surrounded the courts from morning to night, chanting at intervals ‘Death to the traitors!' During the Two Minutes Hate she always excelled all others in shouting insults at Goldstein. Yet she had only the dimmest idea of who Goldstein was and what doctrines he was supposed to represent. She had grown up since the Revolution and was too young to remember the ideological battles of the fifties and sixties. Such a thing as an independent political movement was outside her imagination: and in any case the Party was invincible. It would always exist, and it would always be the same. You could only rebel against it by secret disobedience or, at most, by isolated acts of violence such as killing somebody or blowing something up.
In some ways she was far more acute than Winston, and far less susceptible to Party propaganda. Once when he happened in some connexion to mention the war against Eurasia, she startled him by saying casually that in her opinion the war was not happening. The rocket bombs which fell daily on London were probably fired by the Government of Oceania itself, ‘just to keep people frightened'. This was an idea that had literally never occurred to him. She also stirred a sort of envy in him by telling him that during the Two Minutes Hate her great difficulty was to avoid bursting out laughing. But she only questioned the teachings of the Party when they in some way touched upon her own life. Often she was ready to accept the official mythology虚幻的想法；错误的观点ideas that many people think are true but that do not exist or are false, simply because the difference between truth and falsehood did not seem important to her. She believed, for instance, having learnt it at school, that the Party had invented aeroplanes. (In his own schooldays, Winston remembered, in the late fifties, it was only the helicopter that the Party claimed to have invented; a dozen years later, when Julia was at school, it was already claiming the aeroplane; one generation more, and it would be claiming the steam engine.) And when he told her that aeroplanes had been in existence before he was born and long before the Revolution, the fact struck her as totally uninteresting. After all, what did it matter who had invented aeroplanes? It was rather more of a shock to him when he discovered from some chance remark that she did not remember that Oceania, four years ago, had been at war with Eastasia and at peace with Eurasia. It was true that she regarded the whole war as a sham假象；假情假义；伪善；伪装a situation, feeling, system, etc. that is not as good or true as it seems to be: but apparently she had not even noticed that the name of the enemy had changed. ‘I thought we'd always been at war with Eurasia,' she said vaguely. It frightened him a little. The invention of aeroplanes dated from long before her birth, but the switchover in the war had happened only four years ago, well after she was grown up. He argued with her about it for perhaps a quarter of an hour. In the end he succeeded in forcing her memory back until she did dimly recall that at one time Eastasia and not Eurasia had been the enemy. But the issue still struck her as unimportant. ‘Who cares?' she said impatiently.
Sometimes he talked to her of the Records Department and the impudent forgeries that he committed there. Such things did not appear to horrify her. She did not feel the abyss深渊 a very deep wide space or hole that seems to have no bottom opening beneath her feet at the thought of lies becoming truths. He told her the story of Jones, Aaronson, and Rutherford and the momentous slip of paper which he had once held between his fingers. It did not make much impression on her. At first, indeed, she failed to grasp the point of the story.
‘Were they friends of yours?' she said.
‘No, I never knew them. They were Inner Party members. Besides, they were far older men than I was. They belonged to the old days, before the Revolution. I barely knew them by sight.'
‘Then what was there to worry about?
He tried to make her understand. ‘This was an exceptional case. It wasn't just a question of somebody being killed. Do you realize that the past, starting from yesterday, has been actually abolished? If it survives anywhere, it's in a few solid objects with no words attached to them, like that lump of glass there. Already we know almost literally nothing about the Revolution and the years before the Revolution. Every record has been destroyed or falsified, every book has been rewritten, every picture has been repainted, every statue and street and building has been renamed, every date has been altered. And that process is continuing day by day and minute by minute. History has stopped. Nothing exists except an endless present in which the Party is always right. I know, of course, that the past is falsified, but it would never be possible for me to prove it, even when I did the falsification myself. After the thing is done, no evidence ever remains. The only evidence is inside my own mind, and I don't know with any certainty that any other human being shares my memories. Just in that one instance, in my whole life, I did possess actual concrete evidence after the event—years after it.'
‘And what good was that?'
‘It was no good, because I threw it away a few minutes later. But if the same thing happened today, I should keep it.'
‘Well, I wouldn't!' said Julia. ‘I'm quite ready to take risks, but only for something worth while, not for bits of old newspaper. What could you have done with it even if you had kept it?'
‘Not much, perhaps. But it was evidence. It might have planted a few doubts here and there, supposing that I'd dared to show it to anybody. I don't imagine that we can alter anything in our own lifetime. But one can imagine little knots of resistance springing up here and there—small groups of people banding themselves together, and gradually growing, and even leaving a few records behind, so that the next generations can carry on where we leave off.'
‘I'm not interested in the next generation, dear. I'm interested in US.'
‘You're only a rebel from the waist downwards,' he told her.
She thought this brilliantly witty and flung her arms round him in delight.
In the ramifications（众多复杂而又难以预料的）结果，后果one of the large number of complicated and unexpected results that follow an action or a decision of party doctrine she had not the faintest interest. Whenever he began to talk of the principles of Ingsoc, doublethink, the mutability of the past, and the denial of objective reality, and to use Newspeak words, she became bored and confused and said that she never paid any attention to that kind of thing. One knew that it was all rubbish, so why let oneself be worried by it? She knew when to cheer and when to boo, and that was all one needed. If he persisted in talking of such subjects, she had a disconcerting habit of falling asleep. She was one of those people who can go to sleep at any hour and in any position. Talking to her, he realized how easy it was to present an appearance of orthodoxy while having no grasp whatever of what orthodoxy meant. In a way, the world-view of the Party imposed itself most successfully on people incapable of understanding it. They could be made to accept the most flagrant骇人听闻的；公然的；罪恶昭彰的shocking because it is done in a very obvious way and shows no respect for people, laws, etc. violations of reality, because they never fully grasped the enormity of what was demanded of them, and were not sufficiently interested in public events to notice what was happening. By lack of understanding they remained sane. They simply swallowed everything, and what they swallowed did them no harm, because it left no residue behind, just as a grain of corn will pass undigested through the body of a bird.


Mars Tourism Board. Welcome. We are here to help. Don't worry about a thing!
What is the primary purpose of your trip?
Business
General Tourism
Romance
Who is travelling with you? Check all that apply.
Adults
Cyborgs or Androids
Pets
Minors
Enhanced animal
Where will you stay the majority of your trip?
The Resort
at Olympus Mons
Government Facility
Mariner Lodge
at Valles Marineris
Prospecting or working claim
Northern Vistas
at Planum Boreum
Other
What activities are you interested in? Check all that apply.
Amazonis Plamitia 500 km pod racer rally
Photography
Planum Boreum snowmobile trek
Research
Water/mineral prospecting or working claim
Personal information
Preferred salutation
Mr
Ms
Mrs
Dr
Last name
Identification Number
Email
What are you?
Human
Space Alien
Android
Cyborg
Enhanced animal
Other comments/questions?
This text will be forwarded to a "customer associate" for careful analysis. We will be getting back to you.
Your Instructions are to click
Clear all data
Tell us what we need to know


Enter each element you want to insert into the binary tree separated by comma.
For example, 6,8,7 will insert a 6 then an 8 then a 7 into the binary tree
Insert:


About Me
I’m currently working to further develop my technical skills through the Year Up program at Seattle Central college where I’m enrolled in the app development and testing track. I’ve previously completed the User Experience Design certificate program at Bellevue college. I enjoy creating unique, user-minded webpages that reflect my creativity and convey a clear purpose to the audience and my goal is to find a project manager opportunity in tech to apply my skills within the greater Seattle area.


| Inhibitory in nature |
280 |
Protein translation inhibitor (2), Enzyme inhibitor (256), Protease inhibitor (13), Serine protease inhibitor (1), Tyrosinase and melanin inhibitor (3), Tyrosinase inhibitor (5) |
Animal |
| Toxic |
407 |
Toxin (37), Celiac toxic (201), Cytotoxic (169) |
Animal |
| Immune system related |
65 |
Immunomodulatory (35), Immunoregulator (10), Immunostimulating (1), Immunosuppressive (19) |
Animal |
| Opioid |
8 |
Opioid (6), Opioid agonist (1), Opioid antagonist (1) |
Animal |
| Therapeutic |
1465 |
Antiproliferative (9), Anticancer (156), Vasorelaxant (2), Antihypertensive (500), ACE-inhibitor (427), Hypotensive (5), Pore-forming (1), Antithrombotic (7), Antioxidant (227), Anti-inflammatory (13), Anti-amnestic (4), Anti-analgesic (1), Antinociceptive (3), Anxiolytic (2), Diuretic (2), Uterotonic (1), Anti-HIV (37), HIV-1-reverse-transcriptase inhibition (8), Antihyperglycemic (1), Antidiabetic (1), Hypoglycemic (1), DPP-IV inhibitor (3), Estrogen like activity (18), Phagocytosis stimulatory peptide (2), Bile acid binding inhibitor (1), Protein synthesis inhibitor (2), Cyclooxygenase inhibitor (8), HMG-CoA reductase inhibitor (3), Neurotensin inhibitor (1), Anti-allergen (11), Antimalarial (8) |
Animal |
| Plant defense response |
43 |
Alpha-amylase inhibitor (15), Defensive-proteinase inhibitor (3), Trypsin inhibitor (3), Gene expression activator (5), Gene expression stimulator (1), Antifeedant (7), Defense activator (3), Defense gene activator (6) |
Plants |
| Microbe killing |
2356 |
Antimicrobial (1393), Antiparasitic (15), Antiprotist (4), Antibacterial (323), Antiyeast (4), Antifungal (529), Antibiotic (2), Antiviral (83), Antibiofilm (3) |
Others |
| Invertebrate killing |
209 |
Anthelmintic (35), Anti-barnacle (1), Molluscicidal (6), Nematocide (56), Insecticidal (111) |
Animal |
| Miscellaneous |
231 |
Hemolytic (71), Hypocholesterolemic (2), Hypotriglyceridemic (3), Neuropeptide (92), Allergen (9), Enzymatic degradation (54) |
Animal |


Select Domain:
Select Domain
{% for o in domain_list %} {% if o %}
{{ o }}
{% endif %} {% endfor %}
Select Metrics:
None
Backwards Compatibility
Issue Closing Time
Issue Response Time
Last Discussed on Stack Overflow
Last Modification Date
Performance
Popularity
Release Frequency
Security
None
Backwards Compatibility
Issue Closing Time
Issue Response Time
Last Discussed on Stack Overflow
Last Modification Date
Performance
Popularity
Release Frequency
Security
None
Backwards Compatibility
Issue Closing Time
Issue Response Time
Last Discussed on Stack Overflow
Last Modification Date
Performance
Popularity
Release Frequency
Security
None
Backwards Compatibility
Issue Closing Time
Issue Response Time
Last Discussed on Stack Overflow
Last Modification Date
Performance
Popularity
Release Frequency
Security
APPLY
CANCEL
HISTORY
Show More
Welcome To LibEase
Choosing libraries with ease
To begin, select a domain, libraries, and metrics.
Click APPLY to generate your data visualizations!


I like to promote community learning Django Girls I am involved with Django Girls which helps girls start programming.


Deuteronomy 11:32
And ye shall observe to do all the statutes and judgments which I set before you this day.


---
layout: default
---
Service providers
| Name |
Javascript Identifier |
{% for p in site.providers %}
| {{p.name}} |
{{p.jsId}} |
{% endfor %}
We have received requests for the following providers. If you would like to contribute
code to support this provider, please re-open the issue. We'd be glad to help in any way.
- AWS R53 (DNS works. Request is to add Registrar support) (#68)
- Azure (#42)
- ClouDNS (#114)
- Digital Ocean (#125)
- Dyn (#61)
- Gandi (DNS works. Request is to add Registrar support) (#87)
- GoDaddy (#145)
- Hurricane Electric (dns.he.net) (#118)
- Linode (#121)
- OVH (#143)


PolySwarm:
Real-time threat intelligence from a crowdsourced network of security experts and antivirus companies.


top
|
up
|
prev
|
next
CharNode Class
Definition at line
116
of
BasicType.hpp
Constructors
CharNode
(
const
Span& span_,
const
boost::uuids::uuid& moduleId_)
Member Functions
void
Accept
(
Visitor
& visitor)
override
Node
*
Clone
(
CloneContext
& cloneContext)
const override
std::string
ToString
()
const override
Constructor Details
CharNode Constructor
sngcm::ast::CharNode::CharNode(
const
Span& span_,
const
boost::uuids::uuid& moduleId_)
Definition at line
176
of
BasicType.cpp
:
176
:
Node
(
NodeType
::
charNode
,
span_
,
moduleId_
)
177
{
178
}
Declaration at line
119
of
BasicType.hpp
Member Function Details
Accept Member Function
void
sngcm::ast::CharNode::Accept(
Visitor
& visitor)
override
Definition at line
186
of
BasicType.cpp
:
187
{
188
visitor
.
Visit
(
*
this
)
;
189
}
Declaration at line
121
of
BasicType.hpp
Base class overridden functions:
sngcm::ast::Node::Accept
Calls:
sngcm::ast::Visitor::Visit
Clone Member Function
Node
* sngcm::ast::CharNode::Clone(
CloneContext
& cloneContext)
const override
Definition at line
180
of
BasicType.cpp
:
181
{
182
CharNode
*
clone
=
new
CharNode
(
GetSpan
(
)
,
ModuleId
(
)
)
;
183
return
clone
;
184
}
Declaration at line
120
of
BasicType.hpp
Base class overridden functions:
sngcm::ast::Node::Clone
Calls:
sngcm::ast::Node::GetSpan
,
sngcm::ast::Node::ModuleId
ToString Member Function
std::string sngcm::ast::CharNode::ToString()
const override
Definition at line
122
of
BasicType.hpp
:
122
{
return
"char"
;
}
Base class overridden functions:
sngcm::ast::Node::ToString
top
|
up
|
prev
|
next


--- layout: compress images: - image_path: /assets/img/in/behavior.jpg title: behavior - image_path: /assets/img/in/patch.jpg title: patch - image_path: /assets/img/in/probes.jpg title: probes - image_path: /assets/img/in/shop.jpg title: shop ---


Variable Scope in Ruby
Why so Many?
June 7, 2015
There are 5 different variable types in Ruby, Let's take a look at them one at a time.
Global Variables
Global variables are just what their name suggests, global! These variables can be accessed from anywhere within a ruby program, and changed from anywhere within the program. However, this global functionality makes the use of global variables dangerous and can make debugging very difficult. This would be like... I dunno, changing the position of the Earth in the Solar System!
OK, maybe nothing quite so drastic, but you get the idea. Global variables are defined with the prefix "$", and there are actually a few default defined global variables that can help you get some information about your Ruby environment.
Class Variables
Again, this type of variable is pretty well explained by its name. These variables are defined and exist in classes. One important distinction is that class variables exist across all instances of a class, as opposed to a different type of variable that we will look at next. Class variables are defined with the prefix "@@" and must be initialized on creation of the class.
Instance Variables
Instance variables exist, you guessed it, in specific instances of a class. To compare, a class variable will stay the same across every instance of a class, but you can have the same instance variable with a different value for each different instance of the same class. These are sort of like local variables, in that they are local to one instance of their class. Instance variables are defined with the prefix "@". Dont't confuse this syntax with class variables, which begin with two at-signs.
Local Variables
These variables are pretty self-explanatory, and we use them all the time! Local variables are local to whatever construct in which they are declared. So if a variable is defined within a loop, then that variable can only be accessed inside of that loop. The same goes for methods, and any other code construct you can think of. Local variables have to have either a lowercase letter or "_" at the beginning of its name
Constants
If you have a bit of math or science under your belt, you're probably familiar with the idea of a constant, like pi for calculating dimenstions of circles or avogadro's number when performing atomic unit conversions in chemistry. However, Ruby is a little bit weird in that you can change constants. You will get some protest and warning from your interpreter, but it is possible. In Ruby, it is helpful to think of a constant as a value that should not be changed rather than cannot be changed. It is also important to note that constants are given global scope unless they are defined within a class or module, in which case they can only be accessed wthin the context of the construct in which it was defined. Constants must be named starting with a capital letter, but it is common practice to define constants using ALL_CAPS.


Class FloatTensor
Tensor of type Float.
Inheritance
Namespace: TorchSharp
Assembly: TorchSharp.dll
Syntax
public class FloatTensor : IDisposable
Remarks
Use the default constructor to create an empty tensor, or invoke one of the constructors with one (1D), two (2D), three (3D), or four parameters (4D) to x create a tensor for the desired number of dimensions.
Constructors
FloatTensor()
Creates an empty tensor.
Declaration
public FloatTensor ();
FloatTensor(Int64)
Creates a 1D tensor of the specified size.
Declaration
public FloatTensor (long size0);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size0 | Size for the first dimension. |
FloatTensor(Int64, Int64)
Creates a 2D tensor of the specified size.
Declaration
public FloatTensor (long size0, long size1);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size0 | Size for the first dimension. |
| System.Int64 | size1 | Size for the second dimension. |
FloatTensor(Int64, Int64, Int64)
Creates a 3D tensor of the specified size.
Declaration
public FloatTensor (long size0, long size1, long size2);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size0 | Size for the first dimension. |
| System.Int64 | size1 | Size for the second dimension. |
| System.Int64 | size2 | Size for the third dimension. |
FloatTensor(Int64, Int64, Int64, Int64)
Creates a 4D tensor of the specified size.
Declaration
public FloatTensor (long size0, long size1, long size2, long size3);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size0 | Size for the first dimension. |
| System.Int64 | size1 | Size for the second dimension. |
| System.Int64 | size2 | Size for the third dimension. |
| System.Int64 | size3 | Size for the fourth dimension. |
Properties
Data
Returns a pointer to the unmanaged data managed by this tensor.
Declaration
public float* Data { get; }
Property Value
| Type | Description |
|---|---|
| System.Single* | To be added. |
Dimensions
Returns the number of dimensions for this tensor
Declaration
public int Dimensions { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | To be added. |
Item(Int64)
Access to element at the specified position in the tensor
Declaration
public float this[long x0] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | x0 | Index to access. |
Property Value
| Type | Description |
|---|---|
| System.Single | To be added. |
Item(Int64, Int64)
Access to element at the specified position in the tensor
Declaration
public float this[long x0, long x1] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | x0 | Index in the first dimension to access. |
| System.Int64 | x1 | Index in the second dimension to access. |
Property Value
| Type | Description |
|---|---|
| System.Single | To be added. |
Item(Int64, Int64, Int64)
Access to element at the specified position in the tensor
Declaration
public float this[long x0, long x1, long x2] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | x0 | Index in the first dimension to access. |
| System.Int64 | x1 | Index in the second dimension to access. |
| System.Int64 | x2 | Index in the third dimension to access. |
Property Value
| Type | Description |
|---|---|
| System.Single | To be added. |
Item(Int64, Int64, Int64, Int64)
Access to element at the specified position in the tensor
Declaration
public float this[long x0, long x1, long x2, long x3] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | x0 | Index in the first dimension to access. |
| System.Int64 | x1 | Index in the second dimension to access. |
| System.Int64 | x2 | Index in the third dimension to access. |
| System.Int64 | x3 | Index in the fourth dimension to access. |
Property Value
| Type | Description |
|---|---|
| System.Single | To be added. |
Shape
Returns the tensor shape, this is an array whose size determines the number of dimensions on the tensor, and each element is the size of the dimension
Declaration
public long[] Shape { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64[] | To be added. |
Remarks
An array of size 0 is used for constants, an array of size 1 is used for single-dimension arrays, where the dimension is the value of the first element. And so on.
Storage
Returns the associated storage for this tensor
Declaration
public TorchSharp.FloatStorage Storage { get; }
Property Value
| Type | Description |
|---|---|
| FloatStorage | To be added. |
Methods
Abs(FloatTensor)
Returns a new tensor with the Abs of the elements of
Declaration
public TorchSharp.FloatTensor Abs (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Acos(FloatTensor)
Returns a new tensor with the Acos of the elements of
Declaration
public TorchSharp.FloatTensor Acos (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Add(Single)
Performs the Add operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor Add (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.Add(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
Add(FloatTensor, Single, FloatTensor)
Performs the Add operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void Add (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
Asin(FloatTensor)
Returns a new tensor with the Asin of the elements of
Declaration
public TorchSharp.FloatTensor Asin (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Atan(FloatTensor)
Returns a new tensor with the Atan of the elements of
Declaration
public TorchSharp.FloatTensor Atan (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Atan2(FloatTensor)
Returns a new tensor with the Atan2 of the elements of
Declaration
public TorchSharp.FloatTensor Atan2 (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
BitAnd(FloatTensor, Single, FloatTensor)
Performs the BitAnd operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void BitAnd (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
BitAnd(Single)
Performs the BitAnd operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor BitAnd (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.BitAnd(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
CAdd(Single, FloatTensor)
Performs the CAdd operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor CAdd (float value, TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CBitAnd(FloatTensor)
Performs an CBitAnd of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CBitAnd (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CBitOr(FloatTensor)
Performs an CBitOr of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CBitOr (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CBitXor(FloatTensor)
Performs an CBitXor of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CBitXor (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CDiv(FloatTensor)
Performs an CDiv of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CDiv (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Ceil(FloatTensor)
Returns a new tensor with the Ceil of the elements of
Declaration
public TorchSharp.FloatTensor Ceil (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CFMod(FloatTensor)
Performs an CFMod of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CFMod (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
cinv(FloatTensor)
Returns a new tensor with the cinv of the elements of
Declaration
public TorchSharp.FloatTensor cinv (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Clamp(Single)
Performs the Clamp operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor Clamp (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.Clamp(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
Clamp(FloatTensor, Single, FloatTensor)
Performs the Clamp operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void Clamp (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
Clone()
Returns a deep clone of the tensor
Declaration
public TorchSharp.FloatTensor Clone ();
Returns
| Type | Description |
|---|---|
| FloatTensor | To be added. |
CLShift(FloatTensor)
Performs an CLShift of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CLShift (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CMul(FloatTensor)
Performs an CMul of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CMul (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Cos(FloatTensor)
Returns a new tensor with the Cos of the elements of
Declaration
public TorchSharp.FloatTensor Cos (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Cosh(FloatTensor)
Returns a new tensor with the Cosh of the elements of
Declaration
public TorchSharp.FloatTensor Cosh (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CPow(FloatTensor)
Performs an CPow of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CPow (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CRemainder(FloatTensor)
Performs an CRemainder of the tensor with the provided
Declaration
public TorchSharp.FloatTensor CRemainder (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
CSub(Single, FloatTensor)
Performs the CSub operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor CSub (float value, TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Digamma(FloatTensor)
Returns a new tensor with the Digamma of the elements of
Declaration
public TorchSharp.FloatTensor Digamma (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Dispose()
Releases the tensor and its associated data.
Declaration
public void Dispose ();
Dispose(Boolean)
Implements the .NET Dispose pattern.
Declaration
protected void Dispose (bool disposing);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | To be added. |
Div(Single)
Performs the Div operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor Div (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.Div(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
Div(FloatTensor, Single, FloatTensor)
Performs the Div operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void Div (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
Dot(FloatTensor)
Returns the tensor product between this tensor and the provided one
Declaration
public double Dot (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| System.Double | The dot product |
Erf(FloatTensor)
Returns a new tensor with the Erf of the elements of
Declaration
public TorchSharp.FloatTensor Erf (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Erfc(FloatTensor)
Returns a new tensor with the Erfc of the elements of
Declaration
public TorchSharp.FloatTensor Erfc (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Erfinv(FloatTensor)
Returns a new tensor with the Erfinv of the elements of
Declaration
public TorchSharp.FloatTensor Erfinv (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Exp(FloatTensor)
Returns a new tensor with the Exp of the elements of
Declaration
public TorchSharp.FloatTensor Exp (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Expm1(FloatTensor)
Returns a new tensor with the Expm1 of the elements of
Declaration
public TorchSharp.FloatTensor Expm1 (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Fill(Single)
Fills the tensor with the specified value
Declaration
public void Fill (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Finalize()
Finalizer for ~FloatTensor
Declaration
~FloatTensor ();
Floor(FloatTensor)
Returns a new tensor with the Floor of the elements of
Declaration
public TorchSharp.FloatTensor Floor (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Fmod(Single)
Performs the Fmod operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor Fmod (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.Fmod(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
Fmod(FloatTensor, Single, FloatTensor)
Performs the Fmod operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void Fmod (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
Frac(FloatTensor)
Returns a new tensor with the Frac of the elements of
Declaration
public TorchSharp.FloatTensor Frac (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
GetTensorDimension(Int32)
Retrieves the size of the specified dimension in the tensor.
Declaration
public long GetTensorDimension (int dim);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dim | To be added. |
Returns
| Type | Description |
|---|---|
| System.Int64 | To be added. |
GetTensorStride(Int32)
Retrieves the stride of the specified dimension in the tensor.
Declaration
public long GetTensorStride (int dim);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dim | To be added. |
Returns
| Type | Description |
|---|---|
| System.Int64 | To be added. |
IndexCopy(Int32, LongTensor, FloatTensor)
Copies the elements of tensor into the original tensor by selecting the indices in the order given in index. The shape of tensor must exactly match the elements indexed or an error will be thrown.
Declaration
public void IndexCopy (int dim, TorchSharp.LongTensor index, TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dim | Dimension to select for the copy |
| LongTensor | index | Entries to copy |
| FloatTensor | src | Tensor to copy the data from. |
IndexSelect(Int32, LongTensor)
Returns a new Tensor which indexes the original Tensor along dimension dim using the entries in index. The returned Tensor has the same number of dimensions as the original Tensor. The returned Tensor does not use the same storage as the original Tensor.
Declaration
public TorchSharp.FloatTensor IndexSelect (int dim, TorchSharp.LongTensor index);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dim | Dimension to select |
| LongTensor | index | Entries to extract |
Returns
| Type | Description |
|---|---|
| FloatTensor | To be added. |
Lgamma(FloatTensor)
Returns a new tensor with the Lgamma of the elements of
Declaration
public TorchSharp.FloatTensor Lgamma (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Log(FloatTensor)
Returns a new tensor with the Log of the elements of
Declaration
public TorchSharp.FloatTensor Log (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Log10(FloatTensor)
Returns a new tensor with the Log10 of the elements of
Declaration
public TorchSharp.FloatTensor Log10 (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Log1p(FloatTensor)
Returns a new tensor with the Log1p of the elements of
Declaration
public TorchSharp.FloatTensor Log1p (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Log2(FloatTensor)
Returns a new tensor with the Log2 of the elements of
Declaration
public TorchSharp.FloatTensor Log2 (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
LShift(Single)
Performs the LShift operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor LShift (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.LShift(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
LShift(FloatTensor, Single, FloatTensor)
Performs the LShift operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void LShift (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
MaxAll()
Returns the maximum value of the elements in the tensor.
Declaration
public float MaxAll ();
Returns
| Type | Description |
|---|---|
| System.Single | The maximum value of the tensor. |
MeanAll()
Returns the mean of the elements in the tensor.
Declaration
public double MeanAll ();
Returns
| Type | Description |
|---|---|
| System.Double | The mean of the tensor. |
MedianAll()
Returns the median of the elements in the tensor.
Declaration
public float MedianAll ();
Returns
| Type | Description |
|---|---|
| System.Single | The median of the tensor. |
MinAll()
Returns the minimum value of the elements in the tensor.
Declaration
public float MinAll ();
Returns
| Type | Description |
|---|---|
| System.Single | The minimum value of the tensor. |
Mul(Single)
Performs the Mul operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor Mul (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.Mul(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
Mul(FloatTensor, Single, FloatTensor)
Performs the Mul operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void Mul (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
Narrow(Int32, Int64, Int64)
Returns a new Tensor which is a narrowed version of the current one: the dimension dim is narrowed from firstIndexto firstIndex+size-1.
Declaration
public TorchSharp.FloatTensor Narrow (int dim, long firstIndex, long size);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dim | The dimension to narrow |
| System.Int64 | firstIndex | Initial index to narrow |
| System.Int64 | size | Number of elements |
Returns
| Type | Description |
|---|---|
| FloatTensor | To be added. |
neg(FloatTensor)
Returns a new tensor with the neg of the elements of
Declaration
public TorchSharp.FloatTensor neg (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Polygamma(FloatTensor)
Returns a new tensor with the Polygamma of the elements of
Declaration
public TorchSharp.FloatTensor Polygamma (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
ProdAll()
Returns the product of the elements in the tensor.
Declaration
public double ProdAll ();
Returns
| Type | Description |
|---|---|
| System.Double | The product of the tensor. |
Random(Int64)
Populates the tensor with random values from 0 to n, using a newly initialized Random number geneator.
Declaration
public void Random (long n);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | n | The upper limit for the values to be generated |
Random(RandomGenerator, Int64)
Populates the tensor with random values from 0 to n, using the provided random source generator.
Declaration
public void Random (TorchSharp.RandomGenerator source, long n);
Parameters
| Type | Name | Description |
|---|---|---|
| RandomGenerator | source | The random generator source |
| System.Int64 | n | The upper limit for the values to be generated |
Remainder(Single)
Performs the Remainder operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor Remainder (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.Remainder(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
Remainder(FloatTensor, Single, FloatTensor)
Performs the Remainder operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void Remainder (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
Resize1d(Int64)
Resizes the tensor to be one dimensional with the specified size, the contents of the tensor after this are undetermined.
Declaration
public void Resize1d (long size);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size | The desired new size for the first dimension of the tensor. |
Resize2d(Int64, Int64)
Resizes the tensor to be two dimensional with the specified size, the contents of the tensor after this are undetermined.
Declaration
public void Resize2d (long size0, long size1);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size0 | The desired new size for the first dimension of the tensor. |
| System.Int64 | size1 | The desired new size for the second dimension of the tensor. |
Resize3d(Int64, Int64, Int64)
Resizes the tensor to be three dimensional with the specified size, the contents of the tensor after this are undetermined.
Declaration
public void Resize3d (long size0, long size1, long size2);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size0 | The desired new size for the first dimension of the tensor. |
| System.Int64 | size1 | The desired new size for the second dimension of the tensor. |
| System.Int64 | size2 | The desired new size for the third dimension of the tensor. |
Resize4d(Int64, Int64, Int64, Int64)
Resizes the tensor to be four dimensional with the specified size, the contents of the tensor after this are undetermined.
Declaration
public void Resize4d (long size0, long size1, long size2, long size3);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size0 | The desired new size for the first dimension of the tensor. |
| System.Int64 | size1 | The desired new size for the second dimension of the tensor. |
| System.Int64 | size2 | The desired new size for the third dimension of the tensor. |
| System.Int64 | size3 | The desired new size for the fourth dimension of the tensor. |
Resize5d(Int64, Int64, Int64, Int64, Int64)
Resizes the tensor to be five dimensional with the specified size, the contents of the tensor after this are undetermined.
Declaration
public void Resize5d (long size0, long size1, long size2, long size3, long size4);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | size0 | The desired new size for the first dimension of the tensor. |
| System.Int64 | size1 | The desired new size for the second dimension of the tensor. |
| System.Int64 | size2 | The desired new size for the third dimension of the tensor. |
| System.Int64 | size3 | The desired new size for the fourth dimension of the tensor. |
| System.Int64 | size4 | The desired new size for the fifth dimension of the tensor. |
ResizeAs(FloatTensor)
Resizes the tensor to match the dimensions of the specified src tensor, the contents of the tensor after this are undetermined.
Declaration
public void ResizeAs (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | The source tensor whose shape will be mirrored by this tensor. |
Round(FloatTensor)
Returns a new tensor with the Round of the elements of
Declaration
public TorchSharp.FloatTensor Round (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
RShift(Single)
Performs the RShift operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor RShift (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.RShift(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
RShift(FloatTensor, Single, FloatTensor)
Performs the RShift operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void RShift (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
Rsqrt(FloatTensor)
Returns a new tensor with the Rsqrt of the elements of
Declaration
public TorchSharp.FloatTensor Rsqrt (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Select(Int32, Int64)
Returns a new Tensor which is a tensor slice at the given index in the dimension dim.
Declaration
public TorchSharp.FloatTensor Select (int dim, long slideIndex);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dim | Dimension to select |
| System.Int64 | slideIndex | Beginning of the tensor slice |
Returns
| Type | Description |
|---|---|
| FloatTensor | To be added. |
Remarks
The returned tensor has one less dimension: the dimension dim is removed. As a result, it is not possible to select() on a 1D tensor.
Set(FloatTensor)
The tensor will use the same storage as the provided source, so any changes to that tensor are visible on this one.
Declaration
public void Set (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | The source tensor which contains the data.. |
Sigmoid(FloatTensor)
Returns a new tensor with the Sigmoid of the elements of
Declaration
public TorchSharp.FloatTensor Sigmoid (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Sin(FloatTensor)
Returns a new tensor with the Sin of the elements of
Declaration
public TorchSharp.FloatTensor Sin (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Sinh(FloatTensor)
Returns a new tensor with the Sinh of the elements of
Declaration
public TorchSharp.FloatTensor Sinh (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Sqrt(FloatTensor)
Returns a new tensor with the Sqrt of the elements of
Declaration
public TorchSharp.FloatTensor Sqrt (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Sub(Single)
Performs the Sub operation on each element of the tensor with the
Declaration
public TorchSharp.FloatTensor Sub (float value);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Remarks
If you want to avoid the allocation of a new tensor, you can use the alternative method PytorchSharp.Sub(PytorchSharp.FloatTensor, Float, PytorchSharp.Float).
Sub(FloatTensor, Single, FloatTensor)
Performs the Sub operation on each element of the source with the provided scalar. The result tensor specified as the last parameters is resized to match the source.
Declaration
public static void Sub (TorchSharp.FloatTensor source, float value, TorchSharp.FloatTensor result);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | source | Source tensor on which the operation will take place. |
| System.Single | value | The scalar value that the operation uses. |
| FloatTensor | result | The tensor where the result will be placed |
Remarks
For each element in the
SumAll()
Returns the sum of the elements in the tensor.
Declaration
public double SumAll ();
Returns
| Type | Description |
|---|---|
| System.Double | The sum of the tensor. |
Tan(FloatTensor)
Returns a new tensor with the Tan of the elements of
Declaration
public TorchSharp.FloatTensor Tan (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Tanh(FloatTensor)
Returns a new tensor with the Tanh of the elements of
Declaration
public TorchSharp.FloatTensor Tanh (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
ToString()
Returns a debuggable version of the tensor, in this case the tensor shape
Declaration
public override string ToString ();
Returns
| Type | Description |
|---|---|
| System.String | To be added. |
Transpose(Int32, Int32)
Returns a tensor where dimensions dim1 and dim2 have been swapped.
Declaration
public TorchSharp.FloatTensor Transpose (int dim1, int dim2);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dim1 | First dimension |
| System.Int32 | dim2 | Second dimension |
Returns
| Type | Description |
|---|---|
| FloatTensor | To be added. |
Trigamma(FloatTensor)
Returns a new tensor with the Trigamma of the elements of
Declaration
public TorchSharp.FloatTensor Trigamma (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Trunc(FloatTensor)
Returns a new tensor with the Trunc of the elements of
Declaration
public TorchSharp.FloatTensor Trunc (TorchSharp.FloatTensor src);
Parameters
| Type | Name | Description |
|---|---|---|
| FloatTensor | src | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | This returns a new tensor with the same shape as the tensor this operates on. |
Unfold(Int32, Int64, Int64)
Returns a tensor which contains all slices of size size in the dimension dim. Step between two slices is given by step.
Declaration
public TorchSharp.FloatTensor Unfold (int dim, long size, long step);
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | dim | To be added. |
| System.Int64 | size | To be added. |
| System.Int64 | step | To be added. |
Returns
| Type | Description |
|---|---|
| FloatTensor | To be added. |
ZeroFill()
Fills the tensor with zeros
Declaration
public void ZeroFill ();


Liann Sun (she/her)
menu
linkedin
github
email
You are
a
??
tech recruiter
networker
romantic interest
friend
internet stalker


{{title}}
This is a project that aims to improve upon the classic slider in situations where the range of data is very large. For example, the following slider has a range of 2500; try setting it to 1234. Difficult, right?
Now try doing the same with the precision slider below. Get the slider handle to roughly the desired value, then drag downwards. This will "focus" the range of the slider, making it easier to hit the correct value. (It's easier to understand if you just try it out!)
Hopefully that was a lot easier. You can also change the focus rate if you want even more precision!
You can also have a non-responsive slider. Type a value between 0 and 2500 in the input below to update the value of the slider.


Wrong Username/Password! Please try again!
login
Not registered?
Create an account
Forgot your password?


Test Post 1
Sat Jan 10 2015 18:00:00 GMT-0600 (CST)
This is test post 1.
It has a list of items:
item 1
item 2
item 3
Test Post 2


Digging up sinkholes
18 Aug 2015Detecting sinkhole server requests is something I have never been fully satisfied with, and this thread from 2013 sums up my dissatisfaction. IDS rules that alert on sinkhole servers don't provide you with enough data to make a decision on what to do next.
These IDS rules create two problems:
- You (probably) don't know what endpoint made the request
- You don't know what domain was requested
This post doesn't address the first problem. You can't get around the fact that you need some information to connect the DNS request to an endpoint. What this post addresses is the second problem.
The problem with detecting sinkhole servers
The problems listed above are best explained through a couple scenarios.
Scenario A:
- You run an IDS on the edge of the network
- You do not collect PCAP
- You see this alert: "ET TROJAN DNS Reply Sinkhole - Anubis - <IP_ADDRESS>/26"
This is the worst case scenario. The data available to you from the IDS includes connection flow data (source IP + port, destination IP + port), timestamp for when the event occurred, and metadata surrounding the alert (action, category, severity, etc). Keep in mind that the source IP address is your external DNS server. Since you don't collect PCAP, you have no hope of capturing the domain that was requested.
What this alert tells you is that some endpoint in your environment requested a domain that resolved to the Anubis sinkhole. You don't know what domain the endpoint requested or what endpoint performed the request. While you might get lucky by spending time digging through DNS server logs and attempting to match up timestamps with the alert timestamp, in my opinion this alert is a dead-end.
Scenario B:
- You run an IDS on the edge of the network
- You do collect PCAP
- You see this alert: "ET TROJAN DNS Reply Sinkhole - Anubis - <IP_ADDRESS>/26"
This is the best case scenario. You have all the data available to you from Scenario A, plus some or all of the raw packet data. You might think this is great, but, as you'll read, this still isn't ideal. Having PCAP of the session kind of solves the problem of knowing what domain was requested-- while the domain exists in PCAP, that data is not quickly accessible. You have to identify the specific session that the DNS activity occurred in (some tools can do this for you), then review the PCAP manually to identify the requested domain. Though this is the best case scenario, it still introduces a lot of unnecessary steps (identifying PCAP, retrieving PCAP, analyzing PCAP) into what should be a simple process.
Both of these scenarios relied on having additional data (DNS server logs, PCAP) to identify the domain. What if you could find the domain without needing additional data?
What if you just instantly knew what domain was requested?
You can probably tell where this is going. With enough time and effort, the best case scenario will eventually lead you to the requested domain. Wouldn't it be better if you just had the the domain without having to do any extra work and without having to rely on multiple sources of data? I wrote a Bro script that does exactly that by building upon the dns.log.
The script uses the Bro Input framework to read a file that contains a list of sinkhole server IP addresses / netblocks. Whenever Bro sees a DNS reply that contains answers, it will reference the supplied list of sinkhole servers, check for the answer in the list, and append the boolean field "sinkhole" to dns.log. (By default, this field's value is false.) Below is an example dns.log that uses the Anubis sinkhole servers:
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto trans_id query qclasqclass_name qtype qtype_name rcode rcode_name AA TC RD RA Z answers TTLs rejected sinkhole
1359930253.708622 CHTzdSTuBRxDjyX81 <IP_ADDRESS> 53 <IP_ADDRESS> 53 udp 48752 www.ald-transports-express.eu 1 C_INTERNET 1 A 0 NOERROR F F T T 0 <IP_ADDRESS> 100.000000 F T
By looking at the fields query and sinkhole, we immediately know that the request (www.ald-transports-express.eu) was answered by a sinkhole. (In this case, it's a Sality domain.)
That's it, it's that simple. If you run Bro, then you can grab the script, build a list of sinkhole servers, and start tracking sinkhole server requests with ease.


Please test database connection, it is mandatory before you can save the config.
Connection succesfully established.
Failed to establish connection with given parameters.


hackney v1.15.2 hackney_url
module to manage URLs.
Link to this section Summary
Functions
Construct an URL from a base URL, a path and a list of properties to give to the URL.
Normalizes the encoding of an URL. Use the hackney_url:pathencode/1
to encode an URL.
Normalizes the encoding of an URL.
Parse an URL and return a #hackney_url record.
Encode query properties to binary.
Encode query properties to binary. Opts are passed to urlencode/2
Decode an URL encoded binary. The second argument specifies how to handle percent characters that are not followed by two valid hex characters. Use skip
to ignore such errors, if crash
is used the function will fail with the reason badarg
.
URL encode a string binary.
URL encode a string binary. The noplus
option disables the default behaviour of quoting space characters, \s
, as +
. The upper
option overrides the default behaviour of writing hex numbers using lowecase letters to using uppercase letters instead.
Link to this section Types
Link to this section Functions
fix_path/1
idnconvert_hostname/1
make_url/3
Construct an URL from a base URL, a path and a list of properties to give to the URL.
normalize/1
normalize(URL) -> NormalizedUrl when URL :: binary() | list() | hackney_url(), NormalizedUrl :: hackney_url().
Normalizes the encoding of an URL. Use the hackney_url:pathencode/1
to encode an URL.
normalize/2
normalize(URL, Fun) -> NormalizedUrl when URL :: binary() | list() | hackney_url(), Fun :: fun(), NormalizedUrl :: hackney_url().
Normalizes the encoding of an URL.
Parse an URL and return a #hackney_url record.
Encode query properties to binary.
Encode query properties to binary. Opts are passed to urlencode/2
transport_scheme/1
unparse_url/1
Decode an URL encoded binary. The second argument specifies how to handle percent characters that are not followed by two valid hex characters. Use skip
to ignore such errors, if crash
is used the function will fail with the reason badarg
.
URL encode a string binary.
URL encode a string binary. The noplus
option disables the default behaviour of quoting space characters, \s
, as +
. The upper
option overrides the default behaviour of writing hex numbers using lowecase letters to using uppercase letters instead.


weekly picks (Aug 5 week 2019)
-
PhysRevB.100.064429 : Topological Hall effect and emergent skyrmion crystal at manganite-iridate oxide interfaces (Dagotto, PRB)
-
science.aau0968 : Skyrmion lattice with a giant topological Hall effect in a frustrated triangular-lattice magnet (Y. Tokura, Science)
-
PhysRevLett.123.097701 : Topological Phase Transition Driven by Infinitesimal Instability: Majorana Fermions in Non-Hermitian Spintronics (M. Sato, PRL)
-
1908.11126 : Superconductivity of the FeSe/SrTiO3 Interface in the View of BCS-BEC Crossover (STO, arXiv)
-
1908.11115 : Theory and simulations of critical temperatures in CrI3 and other 2D materials: Easy-axis magnetic order and easy-plane Kosterlitz-Thouless transitions (Olsen, arXiv)
-
1908.11361 : Raman response in the nematic phase of FeSe (Chubukov, arXiv)
-
1908.11354 : Spin-orbit torques in a Rashba honeycomb antiferromagnet (A. Manchon, arXiv)
-
PhysRevLett.123.096601 : Unconventional Temperature Dependence of the Anomalous Hall Effect in HgCr 2 Se 4 (EEI correction, PRL)
-
PhysRevB.100.075151 : Density-matrix renormalization group study of the linear conductance in quantum wires coupled to interacting leads or phonons (DMRG, PRB)
-
PhysRevB.100.085144 : Optical signatures of the chiral anomaly in mirror-symmetric Weyl semimetals (EA Kim, PRB)
-
1908.10476 : Nonlinear optical effects in inversion-symmetry-breaking superconductors (JE Moore, arXiv)
-
d41586-019-02518-3 : Superconductivity seen in a nickel oxide (nickel oxide, nature)
-
s41586-019-1496-5 : Superconductivity in an infinite-layer nickelate (HY Hwang, Nature)
-
1908.10946 : Similarities and differences between infinite-layer nickelates and cuprates and implications for superconductivity (M. Norman, arXiv)
-
PhysRevLett.123.097001 : Route to a Superconducting Phase above Room Temperature in Electron-Doped Hydride Compounds under High Pressure (Ma, PRL)
-
PhysRevLett.123.097002 : Majorana Multipole Response of Topological Superconductors (M. Sato, PRL)
-
PhysRevB.100.075150 : Density wave states in the presence of an external magnetic field (S. Chakravarty, PRB)
-
PhysRevB.100.075303 : Magnetic resonance induced pseudoelectric field and giant current response in axion insulators (Zang, PRB)
-
Physics.12.96 : A Prediction for ‘‘Hot’’ Superconductivity (R. Arita, Physics)
-
PhysRevB.100.060506 : Density matrix renormalization group study of superconductivity in the triangular lattice Hubbard model (EA Kim, PRB)
-
PhysRevLett.123.087203 : Gapless Kitaev Spin Liquid to Classical String Gas through Tensor Networks (HY Lee, PRL)
-
1908.08974 : Topological Kerr Effect (Paramekanti, arXiv)
-
1908.09546 : Anomalous Dispersion of LO Phonons in Oxygen-Doped La${2-x}$Sr${x}$CuO$_{4+\delta}$ (cuprate, arXiv)
-
1908.09457 : Prediction of ferroelectricity-driven Berry curvature enabling charge- and spin-controllable photocurrent in tin telluride monolayers (H. Jin, arXiv)
-
1908.09558 : Quantum bits with Josephson junctions (F. Nori, arXiv)
-
1908.08701 : Magnon Pairs and Spin-Nematic Correlation in the Spin-Seebeck Effect (Spin-Seebeck, PRL)


| Form Type |
Description |
| F-1 |
Registration statement for certain foreign private issuers |
| Form D |
an exempt offering of securities under Regulation D |
| 3 |
Initial statement of beneficial ownership (Insider transactions) |
| 4 |
Statement of changes in beneficial ownership (Insider transactions) |
| 5 |
Annual statement of changes in beneficial ownership (Insider transactions) |
| S-1 |
General form of registration statement. |
| POS AM |
Post-effective amendments to provide updated prospectus information. |
| 13D |
Notification of a holding of more than 5% of any class of a company's shares by a single investor or group working together |
| 144 |
Report of proposed sale of securities. |
| 20-F |
Registration of securities of foreign private issuers pursuant to section 12(b) or (g). |
| ARS |
Annual Report to Security Holders. |
| 6-K |
Report of foreign issuer pursuant to Rules 13a-16 and 15d-16. |
| 10-Q |
Quarterly report filed pursuant to sections 13 or 15(d). |
| 10-K |
Annual report pursuant to section 13 and 15(d). |
| 8-K |
Interim report which announces any material events or corporate changes that occur between 10-Q quarterly reports. |
| 11-K |
An annual report of employee stock purchase, savings and similar plans. |
| DEF 14-A |
Proxy Statement. Notification of shareholder votes, information about the Board of Directors, Board compensation, and Executive compensation. |


Our economy will grow by leaps and bounds once we start helping each other have access to funds. We at FinancePeer strive for the same to establish trust between people using our technology.
Our AI based technology combines the CIBIL score for each borrower along with our patent pending credit rating model to accurately convey borrower capability to the lenders.
Here is our team who will make it possible for you!
Testimonials .......


In order to have a complete immutable object, sometimes you may need to copy the mutable objects inside in your class.
Assume that Bar class is mutable and you want to make Foo class immutable. When you return the bar like this, its state can be changed. Most people makes mistake that they assume making the object final would be just enough. Final will only prevent to change the reference but the state can be changed.
class Foo {
private final Bar bar;
public Bar getBar(){
return bar;
}
}
In order to avoid this, you can return a clone object instead of the original one. But of course this means you will create another object and it is a cost.
class Foo {
private final Bar bar;
public Bar getBar(){
return new Bar(bar);
}
}
javapractices


{% extends "whitelisting/moderation.html" %} {% block nav %} UGQ Moderation | New UGQ {% endblock %} {% block unjudged_count %} {{ unjudged_count }} UGQ left to judge {% endblock %}


Enterprises collect data in a data warehouse or a distributed file system. HMIT is having a right experience to build statistical models from the raw data each time to handle a specific problem to solve. The sheer volume of data can blunt the effectiveness of that model, creating a very high “noise-to-Signal” ratio. What most organizations really want to do is transform data into information they can actually use. The Signal is that transformative item.
Signals are generated when a pattern in data is recognized and presented to someone who can use it. When a meaningful threshold is passed, an inference can be made. In some discussions, the word “events” is used in a similar way as signals.