Questions tagged [cyclic]
119 questions
2
votes
2 answers
F(n) = F(n-1) - F(n-2)
I came across this sequence in a programming contest
F(n)= F(n-1)-F(n-2);
Given F0 and F1 find nth term
(http://codeforces.com/contest/450/problem/B) (the contest is over)
Now the solution of this problem is like this
The sequence take value f0,…

Anup
- 2,384
- 4
- 15
- 16
2
votes
3 answers
sql closed loop relations; what could go wrong?
I am working with a database with the following design. I read it is not a good practice to have closed loops in a database design, and i have more than one. But i cannot remember why. So not sure how this might affect me. Any examples how this…

naim5am
- 1,334
- 3
- 17
- 33
2
votes
2 answers
Need to disable loop for inline Fancybox gallery - loop: false and cyclic: false not working
First time posting here, so be kind. I've looked everywhere and can't find my exact issue. I've created a fancybox gallery with inline HTML. It works great on the first click-through, but when it loops back around to the first div, it starts…

user2178527
- 23
- 3
2
votes
2 answers
How does one avoid a cyclic redirect when writing a facebook application using pyfacebook and google app engine?
I'm trying to write my first application for Facebook using
python and pyfacebook hosted on Google App Engine. The problem I'm facing is
that of cyclic redirects. Firefox dies complaining "This page isn't
redirecting properly" when I visit…

yesudeep
- 325
- 4
- 13
2
votes
1 answer
Serialize cyclic object tree – StackOverflowError – custom serialization code needed
I am making an android app where I have a bidirectional cyclic object tree that I need to serialize to fill in a blob field in a Sqlite database.
But the default serialization implementation throws a StackOverflowError at me (stack trace at the…

Morten Holmgaard
- 7,484
- 8
- 63
- 85
1
vote
2 answers
Can I create a "simple" Cyclic Redundancy Check program in Python?
I am quite green in the ways of Python programming and was tasked with creating a simple program that ran a CRC check. Can anyone suggest a good start point on which modules to use/read up on? I suppose a simple program would just be doing a CRC on…

aprilia4life
- 11
- 1
- 2
1
vote
1 answer
Running a Node.js TypeScript App on Cyclic.sh from a repo subdirectory
I am trying to run a Node.js TypeScript app on Cyclic.sh from a subdirectory in the repo and I am having trouble. There is nothing in their tutorials about both TypeScript and a subdirectory, so I am looking for some guidance here. My specs:
The…

blubberbo
- 4,441
- 4
- 23
- 36
1
vote
0 answers
Can't seem to fetch the info from the data base on the deployed site
So I've just finished an app and I'm trying to put it online for the first time by myself.
Everything works fine while on localhost but with the deployed version in vercel it doesn't get the info from the data base and I get this error:
Access to…

Tiago Rato
- 11
- 2
1
vote
1 answer
How to get a predecessors/ancestor list of a node from cyclic directed graph in python?
I have a cyclic-directed graph/network which is obtained by the following dataframe:
import pandas as pd
import networkx as nx
df = pd.DataFrame({ 'from':['A', 'B', 'C','K','J','K','A'], 'to':['C', 'D','D','A','A','J','K']})
network =…

H_H
- 17
- 5
1
vote
0 answers
DFS in virtual graph with cycles
Using a function that generates a list of "adjacent" values from an input value, i.e.
Function

PNS
- 19,295
- 32
- 96
- 143
1
vote
1 answer
how to cyclic roll/shift of a pandas series
i like to rotate the row in cyclic like clock but i would like every row
will rotate differently according to the column of "n_roll"
so if i had that…

matan
- 451
- 4
- 12
1
vote
1 answer
Is there a simple way to select a loop or cycle of data in pandas/Python?
I would like to select a cycle of data in Python (in this case, pandas, but it's a flexible and recurring problem), such that the selected data circles back around to the start of the data for n of the beginning rows. I keep running into this…

lead
- 29
- 4
1
vote
1 answer
Defining cyclic/periodic boundary conditions in Pyomo constraints
I am trying to define a constraint on a Pyomo model that utilizes a cyclic condition. Below is how I think it should work (cyclic syntax from GAMS).
from __future__ import division
from pyomo.environ import *
model = ConcreteModel()
## define…

joshdr83
- 499
- 2
- 5
- 17
1
vote
1 answer
Use permutation cycles to form new arrays in python3
I have an array a = [[1,2,3,4,5,6,7,8,9,10],[4,1,6,2,3,5,8,9,7,10]], where lets say a1 = [1,2,3,4,5,6,7,8,9,10] and a2 = [4,1,6,2,3,5,8,9,7,10], from which I have constructed cyclic permutation. Note that a1 is a sorted array. For e.g in my case,…

Mass17
- 1,555
- 2
- 14
- 29
1
vote
2 answers
C++ Doubly-linked list "delete tail" function
I've already made singly-linked cyclic list, which worked fine, but in this case i'm encountering such problem, that if I want to remove tail, it will remove it, if the node was inserted as tail, but won't if it was inserted as head. I presume, the…

NoobProgrammerWannabe
- 41
- 1
- 5