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
0
votes
0 answers

Outside Bar Calculations

Does anyone know how to track which event (high or low) came first on an outside bar (high > high1 and low < low1)? For instance, if there are 4 lower lows in a row and the new bar breaks the previous low first, the lower low counter would be…
aamizi
  • 1
  • 1
0
votes
0 answers

Pine Script in TradingView. Adding HH/LL and LH/LL on default ZigZag indicator

Here is the default ZigZag indicator in PineScript TradingView. It displays the price, volume, and price difference of each pivot point. Is there a way to display "HH" or "LH" if the current top pivot point is higher/lower than the previous top…
ironail
  • 1
  • 1
0
votes
1 answer

Is there a way to create a background with a zig-zag effect on the top, left, bottom, and right side of a body?

I have tried creating multiple containers, then rotating them from 360 to 270, to make them go around the page, but it has not worked. CSS: .zigzag-section:after{ content:''; position:absolute; width:100%; height:40px; top:100vh; …
0
votes
1 answer

PineScript - zigzag trend change counter

I've made an indicator that is similiar to zigzag. I want to write a formula that will count number of up trends or number of trend changes (from up to down and from down to up). I have problem with it, because my variable is still setting to 0.…
Jan Poker
  • 1
  • 1
0
votes
1 answer

ZigZag Tree Traversal

Given a Binary Tree. Find the Zig-Zag Level Order Traversal of the Binary Tree. Your Task: You don't need to read input or print anything. Your task is to complete the function zigZagTraversal() which takes the root node of the Binary Tree as its…
0
votes
2 answers

Longest zig-zag subsequence in a string

How can I optimize the below code that I have written for this problem? Can I get some suggestions? Given an array of integer elements, find the length of the longest subsequence such that all elements are alternating. If a sequence {x1, x2, .. xn}…
0
votes
0 answers

Is this possible?pivothigh and pivotlow connection

I want to write a code about Zig Zag by connect pivot highs and lows.In common cases it shall be high to low connection.Some is low to low twice.But I found it show high to high several times and missing lows. // This source code is subject to the…
David Liao
  • 61
  • 1
  • 7
0
votes
1 answer

zigzag pattern in matrix of questions

I am working on a survey data. It asks several matrix questions about level of satisfaction of respondents about several items. Below is an example. q1: how much satisfied are you with the item A? "very satisfied" "somewhat satisfied" somewhat…
0
votes
3 answers

Convert 8x8 Matrix into flatten vector using zigzag scan

So I need to convert an opencv mat that is 8x8 into a flattened vector using a zig zag scan as shown in this image. I understand what it is supposed to be doing and I think I have gotten the first half implementation down but I am receiving an…
kiotzu
  • 17
  • 5
0
votes
1 answer

I am trying zig zag traversal of a binary tree. it's not printing 5 of the last branch,why?

There is no indentation problem in the code class Node: def __init__(self,key): self.data=key self.left=None self.right=None def zig_zag(root): if not root: return s=[] l=1 …
0
votes
2 answers

Printing numbers in zigzag order in 2 D array

#include int main(){ int i,j; int flag = 0; int x [3][3] = {{1,2,3},{4,5,6},{7,8,9}}; for (i = 0;i<3;i++){ if (flag ==1){ for (j=2;j<0;j--){ printf(" %d",x[i][j]); } …
0
votes
1 answer

How make zigzag line, vertical Not horizontal with css

How make ZigZag line, vertical Not horizontal with css I try, but I can't
0
votes
0 answers

Matlab Image processing, zigzag array to image

My function read image -> convert to ycbcrI -> DCT -> Quantization -> Final image by using zigzag.I have a problem with last action - save data to image. I would like use a Out variable to save as image. How to do that ? imwrite dosen't work…
Rarez
  • 129
  • 2
  • 11
0
votes
2 answers

CSS3 How are zigzagged borders made?

I have been seeing a lot of new websites that have a zigzagged border in between an image and a div. When you open the image in a new tab the zigzag is not there, so it was created either with CSS3 or HTML5. Does anyone know how it is done? Here are…
byrass
  • 360
  • 2
  • 12
0
votes
1 answer

Jpeg Compression fundamentals

I was reading Jpeg compression but I have some problem understanding the basics ! pls see this schema http://www.cs.cf.ac.uk/Dave/Multimedia/Topic5.fig_29.gif My problem is in the last steps,consider we have a 16*16 pixel gray image ,so we have 4…
Amir
  • 155
  • 3
  • 16