circular

circular dependencies between dlls with visual studio

I have a circular dependency between two functions. I would like each of these functions to reside in its own dll. Is it possible to build this with visual studio? foo(int i) { if (i > 0) bar(i -i); } -> should compile into foo.dll bar(int i) { if (i > 0) foo(i - i); } -> should compile into bar.dll I have created tw...

Circular Dependencies in Ruby

Let's say we have two classes, Foo and Foo Sub, each in a different file, foo.rb and foo_sub.rb respectively. foo.rb: require "foo_sub" class Foo def foo FooSub.SOME_CONSTANT end end foo_sub.rb: require "foo" class FooSub < Foo SOME_CONSTANT = 1 end This isn't going to work due to the circular dependency - we c...

Best way to draw icons on a pie (or circular) menu?

I am trying to figure out an algorithm to calculate where to place any number of icons for a circular menu on a device with a screen that is 240x320. The icons are 48x48 but can be scaled to any size. I would like to come up with a generic algorithm that will take any number of icons in any size and calculate the best scale for them and ...

OpenGL rotate around a spot

Hi, I'm wanting to rotate a gluSphere around a fixed point in a circular motion, like a planet going around the sun. Would it be best to use glRotatef or glTranslate? Cheers! ...

Circular Match

I have a database with three tables: userid_tbl, need_tbl, have_tbl create table userid_tbl (user_id varchar2(15) not null primary key); create table need_tbl (user_id varchar2(15) not null, have_item varchar2(100) not null, foreign key (user_id) references userid_tbl (user_id) ); create table have_tbl (user_id varchar2(15) not null,...

Circular Scroll View

Hi all, I have implemented a circular scroll view. It's working fine , but after sometimes the scroll view delegates are not getting called. I have attached the code , what is the bug in it .... // // MyScrollViewViewController.h // MyScrollView // // Created by Biranchi on 26/05/09. // Copyright PurpleTalk 2009. All rights reser...

removing a circular DB relationship

Hi, How can I get rid of a circular relationship in my db structure. I have an entity called Item. An item can have a sub item/s (circular relationship). An item can have more than one rate depending on what financial year it is(rate_per_year entity created for that purpose and a 1-m relationship). If an item has a sub item, then it ma...

Python: How to get rid of circular dependency involving decorator?

I had got a following case of circular import (here severly simplified): array2image.py conversion module: import tuti @tuti.log_exec_time # can't do that, evaluated at definition time def convert(arr): '''Convert array to image.''' return image.fromarray(arr) tuti.py test utils module: import array2image def log_exec_time...

Circular C++ Header Includes

In a project I have 2 classes: // mainw.h #include "IFr.h" ... class mainw { public: static IFr ifr; static CSize=100; ... }; // IFr.h #include "mainw.h" ... class IFr { public float[mainw::CSize]; }; But I cannot compile this code, getting an error at the static IFr ifr; line. Is this kind of cross-inclusion prohibited? ...

linkedlist which links to itself?

Hi All, Is there a name for a linked list type structure where the head and tail nodes link to each other? In such a list you can obviously iterate through it forever as it double backs on itself. Was just wondering. ...

iphone UIImageView rotation

hi, Can anyone tell me how to rotate an image in circular motion ...

Getting JSON from Jersey with circular dependencies

Hi I am writing a service that uses Jersey and JAXB. My classes are annotated with @XMLRootElement, @XMLElement, etc. I have a circular dependency between two classes, so I have annotated the circular dependent property with @XMLTransient. So when I call my service I get xml as the default, which works perfectly. However, when I try usi...

Circular buffer in JavaScript

I was wondering whether anyone has already implemented a circular buffer in JavaScript? How would you do that without having pointers? ...

C++ class, its base class and circular include includes

FILE #1 (foo.h): #ifndef FOO_H_ #define FOO_H_ #include "baseclass.h" #include "bar.h" class Bar; class Foo : public baseclass { public: bar *varBar; }; #endif FILE #2 (bar.h): #ifndef BAR_H_ #define BAR_H_ #include "foo.h" class Foo; class Bar { public: Foo *varFoo; }; #endif FILE #3 (baseclass.h): #ifndef BASECLASS_H_ #define BA...

Circular Buffer in Flash

I need to store items of varying length in a circular queue in a flash chip. Each item will have its encapsulation so I can figure out how big it is and where the next item begins. When there are enough items in the buffer, it will wrap to the beginning. What is a good way to store a circular queue in a flash chip? There is a possibi...

Circular rotating/magnifying menu with jquery

I'm trying to make a menu that contains 5 items/icons with the selected one being in the center. Clicking to the left or right of this centered icon, rotates the menu left or right, wrapping round the edges and moving whichever item was closest to the edge back in through the opposite one. Clicking on the centered item takes you to its l...

Circular Linked List in Cocoa

Is there something similar to a circular linked list available in Cocoa? I know that an NSArray is ordered - but I don't think I can use 'nextItem' or 'previousItem' - correct? Furthermore, I need the nextItem of the last item to be the first item. I could add my own nextItem and previousItem methods, but I'm surprised if Apple have...

How to create a closed (circular) ListView ?

Hi, I want to create a customized ListView (or similar) which will behave like a closed (circular) one: scrolling down - after the last item was reached the first begins (.., n-1, n, 1, 2, ..) scrolling upward - after the first item was reached the last begins (.., 2, 1, n, n-1, ..) It sounds simple conceptually but, apparently, the...

iPhone Circular Progress Indicator. CGContextRef. Draw on Demand.

Ola Folks, Once again, I want to leech experience, information and knowledge from those who have more of them than I do. Granted, I do make some effort looking for questions to answer... :) Anyway, I want to draw an image that would effectively be a circular progress indicator on a UIButton. Because the image is supposed to represent p...

Make circular joystick

How do I make a joystick like the one in i dig it, using UIImageView's that the smaller one can be used to move around, I just really would like to know how I would get the smaller UIImageView to stay inside the larger one, I just don't know how I would do this because they are both circular. I have an Image below: ...