Questions tagged [cyclic]

119 questions
1
vote
3 answers

Cyclic Inheritance Of Interfaces

I understand why cyclic inheritance of classes is not allowed in Java but I did not understand why cyclic inheritance of interfaces is not allowed. To illustrate: interface Foo extends Bar {/*methods and constants*/} interface Bar extends Foo…
Haggra
  • 3,539
  • 2
  • 20
  • 28
1
vote
1 answer

Generate all permutations of cyclic shift of length K in a list of length N efficiently

How can I generate all permutations of cyclic shifts of length k in a list of length n. Here shift is cyclic and right. Notice that: if K==1 , there's no shift. Hence, no permutation of those 0 shifts. if K==2 , this is equivalent to swapping the…
isopropylcyanide
  • 423
  • 4
  • 16
1
vote
0 answers

Haskell cyclic structure

I have two definitions of ones/0, both resulting in an infinite list of ones: ones = 1 : ones ones = repeat 1 repeat::a->[a] repeat x = x : repeat x I'm being told that the first one is a cyclic structure, while the second one is not. Is that…
Marcin
  • 380
  • 3
  • 20
1
vote
1 answer

Create cyclic textview

I spill a lot of data into TextView and after sometime the first messages are less interesting. Therefore I want to limit max lines to 40 and do the TextView Cyclic, then the 41 line will write at the first line in the 'TextView' I know I can limit…
AsfK
  • 3,328
  • 4
  • 36
  • 73
1
vote
2 answers

Procedure to check if list is cyclic (Scheme)

Is there a built-in procedure to check if a list is cyclic in Scheme (R5RS)? And when is a list cyclic (per definition)? I have tried to find some procedure that checks this, and how it is implemented, but I haven't been able to find one.
user16655
  • 1,901
  • 6
  • 36
  • 60
1
vote
2 answers

Finding an element in a cyclic group of prime order

How do I check if an element a belongs to a specific cyclic group G of prime order, given the generator? Right now i simply generate all the elements in the group, save them into a container and check if the element is in it. This is the code im…
Martin Andersson
  • 1,801
  • 4
  • 21
  • 25
1
vote
2 answers

In Python, construct cyclic subgroup from generator

Using addition in Z modulo 12, (a.k.a the integers mod 12, a.k.a 0 thru 11): 1 generates [0,1,2,3,4,5,6,7,8,9,10,11] (starting at 0 and repeatedly adding 1; 11+1 takes us back to 0) In the same way: 2 generates [0,2,4,6,8,10] 3 generates [0 3 6…
P i
  • 29,020
  • 36
  • 159
  • 267
1
vote
1 answer

Counting cyclic shifts of a string

I need to write a function that will return the number of possible different cyclic shifts of an input string. Could you please give me some tips on where should I start in order to create an efficient (in terms of time complexity) algorithm? Should…
syntagma
  • 23,346
  • 16
  • 78
  • 134
1
vote
1 answer

MPI output write 2d block cyclic distribution in C using some of MPI_File_write

I have problems with writing 2d block cyclic distributed array in file. I've tried this things: rc=MPI_File_open(MPI_COMM_WORLD, rez, MPI_MODE_WRONLY, MPI_INFO_NULL, &cFile); if(rc){printf("Failed to open file! Error: %d \n",…
1
vote
4 answers

Table design for cyclic dates

In my application users should be able to define dates when they are available. Ie. user joe may define he's available: - at every monday, wednesday and sunday between 15:00 and 17:00 from 1.09.2009 to 15.11.2009. - at 2.09.2009 between 12:00 and…
mlomnicki
  • 167
  • 1
  • 10
0
votes
1 answer

Cyclic error: no response from server on port

So I've been trying to solve this issue for hours and am totally lost. I'm using express in my node server and it contains the line app.listen(3000, ()=> { console.log("listening...") }) its working all fine in my environment and whenever I call…
0
votes
0 answers

MongoDB connection error: MongoNetworkError: when hosted on cyclic

I have a NodeJs API hosted on cyclic. Everything worked fine earlier but I exhausted my free tier API request and my app was suspended, then had to upgrade. Since then I have been having this error MongoDB connection error: MongoNetworkError:…
ccurves
  • 633
  • 2
  • 9
  • 18
0
votes
0 answers

Using multer library in backend and hosting it to cyclic.sh gives EROFS error

I have used multer in my project to get audio files from the frontend application and store that audio file inside uploads folder present in the root directory of my Node.js application. After hosting the server in cyclic.sh it's giving me error I…
Yash Kumar
  • 31
  • 8
0
votes
0 answers

CORS issue from Cyclic API

I'm a beginner in JS and webdev spent the last days trying to figure out a CORS issue. I want to fetch poems from my database that is connected with an API through Cyclic.sh https://send4t-github-io.vercel.app/poems.html async function getPoems() { …
erw
  • 1
0
votes
0 answers

No feature to install packages using cyclic.sh

I have been developing a telegram bot using telethon in cyclic.sh . I do not find any feature to use pip or terminal. Please help me. I need to install telethon, tqdm I checked everywhere for the method but I was unable to find.