Questions tagged [zigzag]

The term "zigzag", in graphic design, describes a line composed of small lines in which any pattern of two small lines have the same length and form equal angles relative to any other patterns in the zigzag. The term also is the name of an encoding system for integers.

Zigzag offers an attractive and mention-able separators in some design approaches. The first Zigzag widely drawn was made by ancient Egyptian in hieroglyph writings.

zigzag example which depicts water.

From "Signed Types" on Encoding - Protocol Buffers - Google Code:

ZigZag encoding maps signed integers to unsigned integers so that numbers with a small absolute value (for instance, -1) have a small varint encoded value too. It does this in a way that "zig-zags" back and forth through the positive and negative integers, so that -1 is encoded as 1, 1 is encoded as 2, -2 is encoded as 3, and so on

55 questions
50
votes
10 answers

Zig-zag scan an N x N array

I have a simple array. The array length always has a square root of an integer. So 16, 25, 36 etc. $array = array('1', '2', '3', '4' ... '25'); What I do, is arrange the array with HTML so that it looks like a block with even sides. What I want to…
Matt
  • 1,139
  • 1
  • 11
  • 28
15
votes
4 answers

CSS Zigzag Border with a Textured Background

I've been working on a header with a zigzag border. One way to do this is to use images to make the zigzag effect. (1) Is there any way to create a practical cross-browser zigzag border in CSS without the use of images? I am also trying to put a…
ambiguousmouse
  • 1,983
  • 3
  • 22
  • 27
7
votes
3 answers

Android Zig-Zag layout

I'm in need of creating a receipt layout in Android. The idea is very simple, a rectangle layout with a zigzag top. Even, i have tried dashed line but nothing working.
young_08
  • 1,196
  • 2
  • 13
  • 35
3
votes
0 answers

How can I draw a zigzag underline on a specific text of an EditText, similar to a spell-check underline?

Description: I want to be able to draw a zigzag line span on a text with a given start and end position of an EditText in Android. I have tried using a custom ReplacementSpan class to draw the zigzag line, but when I try to modify the underlined…
Abdo21
  • 498
  • 4
  • 14
3
votes
2 answers

How to make one row from zig zag data in excel

I recently encountered a problem while establishing data structure in Excel. The format that I need to handle is having the forms below. 1 3 5 7 9 2 4 6 8 10 The data is taking up two rows moving up and down. I would like to…
Soonk
  • 332
  • 2
  • 14
2
votes
0 answers

How to add Zigzag line or layer between two images in android?

I am working on Merging or Collage types frames in android and I have Zigzag view between them, How could I get Zigzag pattern between the images. Here is an example, What I required: Note: Here are two images, they should scale, rotate or touched.
2
votes
2 answers

Algorithm to concatenate a list of strings in zig-zag fashion

I have the following problem : From a list of strings, i have to take the first letters from all the strings, after (from back to front), i have to take the second letters, after the third letters from front to end and so on. Example input :…
2
votes
1 answer

Zigzag array in ANSI C

I'm just a beginner and I'm trying to figure out how to create two-dimensional array, filled with numbers diagonally like in JPEG zigzag ordering: https://en.wikipedia.org/wiki/File:JPEG_ZigZag.svg I figured out how to get the upper-left…
Piotr
  • 47
  • 6
2
votes
2 answers

cumulative sum to zigzag indicator

The following code provides example data: library(TTR) set.seed(15) r <- rnorm(1000, 0, .01) P_1 <- 100 P <- P_1*cumprod(1+r) zz <- ZigZag(P, change = 5, percent = TRUE) set.seed(15) volume <- round(runif(1000, 50, 550), digits = 0) data <-…
Hakki
  • 1,440
  • 12
  • 26
2
votes
1 answer

Android bottom zig-zag shape

I need to achieve below attached image programatically, is there any way? I know how to draw rectangle in layer-list but for the particular zig-zag texture in bottom I don't have any idea Please help me to achieve this shape Thanks in advance
Madhu
  • 1,780
  • 23
  • 47
2
votes
1 answer

What's tight time complexity of this algorithm for Binary Tree Zigzag Level Order Traversal?

Binary Tree Zigzag Level Order Traversal Given a binary tree, return the zigzag level order traversal of its nodes' values. (i.e.from left to right, then right to left for the next level andalternate between). For example: Given binary tree…
Zhaonan
  • 939
  • 1
  • 11
  • 20
2
votes
4 answers

How to traverse a 2D array in zigzag order

We have an int 2D array as follow: int matrix[4][4] = {{1,2,3,4} {5,6,7,8} {9,10,11,12} {13,14,15,16}}; By convention if we wants to print out the array by order we can: for (int x=0; x<4; x++) { for (int y=0; y<4; y++) { …
user3437460
  • 17,253
  • 15
  • 58
  • 106
2
votes
2 answers

Minimum edit distance of zig zag string

I have string like this xxoxxooo and I wanna edit it to this form xoxoxoxo, my question is how to find minimum number of swaps and I can only swap 2 neighbours as swap. I thought about going through the string and finding the closest redundant x and…
c0ntrol
  • 908
  • 2
  • 9
  • 14
1
vote
1 answer

Zig Zag cocatenation print issue

I am trying to solve the GeeksForGeeks problem Concatenation of Zig-Zag String in n Rows: Given a string and number of rows ‘n’. Print the string formed by concatenating n rows when the input string is written in row-wise Zig-Zag fashion. Example…
1
vote
0 answers

Pine Script \ Simplify Logic For Detecting Pivots

The goal of these questions is to find out solutions for the two points of improvements described below Indicator Objective Get the pivot lines, considering a sequences of bull bars, identify the low and high before it makes a correction (when a bar…
Cássio
  • 149
  • 2
  • 10
1
2 3 4