Questions tagged [varying]

55 questions
178
votes
5 answers

What is the difference between CHARACTER VARYING and VARCHAR in PostgreSQL?

John uses CHARACTER VARYING in the places where I use VARCHAR. I am a beginner, while he is an expert. This suggests me that there is something which I do not know. What is the difference between CHARACTER VARYING and VARCHAR in PostgreSQL?
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
31
votes
8 answers

Convert ArrayList into 2D array containing varying lengths of arrays

So I have: ArrayList> Which contains an x number of ArrayLists which contain another y number of Strings.. To demonstrate: Index 0: String 1 String 2 String 3 Index 1: String 4 Index 2: Index 3: String 5 String…
Stefan Dunn
  • 5,363
  • 7
  • 48
  • 84
12
votes
3 answers

Vagrant disable SSH Agent

Getting the following when I am trying to run Vagrant up. Have tried to re-provision etc. Even tried rolling back (in Time Machine) the user/vagrant-local directory & the vagrant-local directory where the sites all live. An error occurred in the…
MarkS
  • 129
  • 1
  • 1
  • 4
10
votes
2 answers

How does OpenGL interpolate varying variables on the fragment shader even if they are only set three times on the vertex shader?

Since vertex shader is run once per vertex (that mean in triangle 3 times), how does the varying variable gets computed for every fragment, if it's assigned (as in the example) only three times? Fragment shader: precision mediump float; varying vec4…
Vilda
  • 1,675
  • 1
  • 20
  • 50
8
votes
4 answers

Multiplying char and int together in C

Today I found the following: #include int main(){ char x = 255; int z = ((int)x)*2; printf("%d\n", z); //prints -2 return 0; } So basically I'm getting an overflow because the size limit is determined by the operands on the right side…
Martin Konecny
  • 57,827
  • 19
  • 139
  • 159
6
votes
2 answers

Passing a uniform color to a fragment shader (openGL ES 2.0)

This is a strange problem. If I try to pass a uniform color to the fragment shader, i get a compile error uniform vec4 uniformColor; void main(){ gl_FragColor = uniformColor; } But if I pass the same uniform color to the vertex shader then…
reza
  • 1,329
  • 2
  • 22
  • 37
5
votes
1 answer

Syntaxerror 'varying' in GLSL

I'm using GLFW 3 and OpenGL 4 + GLSL 4 on a MacBook Pro. I get the following syntax error, when starting my program: ERROR: 0:5: 'varying' : syntax error syntax error The shader code: #version 410 varying vec3 vertex; void main() { } Why am I…
Flupp
  • 856
  • 10
  • 24
3
votes
1 answer

R Shiny variable ordered or unordered list

I would like to use an ordered/unordered list such as the following: tags$ul( tags$li("Item 1"), tags$li("Item 2"), tags$li("Item 3"), tags$li("Item 4") ) However, I would like the number of items in the list to be dependent on some…
qanda
  • 225
  • 3
  • 12
3
votes
2 answers

First vagrant up fails

I'm trying to get vvv up and running in order to work on a wordpress site, and while following the "First Vagrant Up" instructions my installation fails. You can find the terminal output below. Just to note, the vagrant up command below is run as…
Doug Morin
  • 159
  • 2
  • 11
2
votes
1 answer

How to define a function with varying amount parameters?

I am new to proc fcmp and I want to know how to write a user-defined function with varying amount parameters, which like whichc() or coalesce(), in SAS. I will be grateful if anybody could give me some hints.
whymath
  • 1,262
  • 9
  • 16
2
votes
3 answers

how to apply varying gsub pattern (variable function) to each row of data.table in R

I've got a data.table DT with a string column and a numeric column that indicates how many words from the start of the string should be extracted. > require(data.table) > DT <- data.table(string_col = c("A BB CCC", "DD EEE FFFF GDG", "AB DFD…
Ankhnesmerira
  • 1,386
  • 15
  • 29
2
votes
1 answer

Twitter Bootstrap 3 Carousel that allows for fixed height but varying image widths?

I'm trying to figure how to adjust the Twitter Bootstrap 3 Carousel so I can have images of fixed height but varying width in a continuous stream. Right now, when I put in the images, if they're not the full width of carousel-inner, there's a space…
2
votes
1 answer

good way to store tags in relational database when there are variable numbers of tags associated with each piece of information

I want to store sentences that can be tagged with variable numbers of tags in an SQL relational database. So, I may have a sentence such as 'As the sun sets slowly in the west, we bid you a fine farewell.' tagged with the following…
d3pd
  • 7,935
  • 24
  • 76
  • 127
1
vote
1 answer

choice experiment data: mlogit exercise 3 "error in reshapelong.... 'varying arguments must be same length'

Following Exercise 3 of the mlogit package https://cran.r-project.org/web/packages/mlogit/vignettes/e3mxlogit.html, but attempting to use my own data (see below) structure(list(Choice.Set = c(4L, 5L, 7L, 8L, 10L, 12L), Alternative = c(2L, 1L, 1L,…
Chris Bova
  • 134
  • 1
  • 2
  • 9
1
vote
2 answers

Time-complexity of nested loop, with varying size

I am trying to understand the time complexity of this algorithm, anyone who can let me know of the runtime complexity descriptively not asymptotically, the code; array = [-3, 0, 1, 2, -1, 1, -2] def triplets_sum(nums): n = len(nums) lst =…
1
2 3 4