Daily Archives

Articles indexed Thursday June 3 2010

Page 26/111 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • How would I start to build a subscription module with Magento?

    - by user193478
    I need to create a subscription module on magento. I created a module call subscription under a custom namespace in the local folder. I have register it with magento, so, I'm good to go. I want to be able to extend core Catalog_Product and add a couple new fields that relate to subscriptions, like trial period, charge date, and other subscription attributes. I also, need to create a way to manage the users that are subscribed to these subscriptions. What would be the best approach for this?

    Read the article

  • Where can I find Python tutorials aimed at people who are already programmers?

    - by Chris R
    I'm a reasonably skilled programmer, and I'm interested in branching out into some new languages -- python, specifically -- but frankly I do NOT want to go through a tutorial that assumes I know nothing about programming. I want a tutorial -- again, preferably for python -- that assumes I'm just unfamiliar with the language itself and describes the ways I can use the language to solve problems. Does such a beast exist? I mean, other than the Python wiki?

    Read the article

  • My ifelse statement's result depends on the actions for true/false?

    - by Antal
    Currently I am building a route for a truck to drive inside my netlogo-land. When the truck is next to the shop-patch where it should deliver, the truck needs to change its actions. However my if or ifelse statement does not seem to respond well and the answer depends on the output. With some tests: turtles ifelse ((patch (first dirx) (first diry)) = one-of neighbors4) [write "11"] [write "22"] "11" turtles ifelse ((patch (first dirx) (first diry)) = one-of neighbors4) [write "111"] [write "122"] "122" turtles ifelse (patch (first dirx) (first diry)) = one-of neighbors4 [write "111"] [write "122"] "122" turtles ifelse (patch (first dirx) (first diry)) = one-of neighbors4 [write "11"] [write "12"] "12" turtles ifelse (patch (first dirx) (first diry)) = one-of neighbors4 [write "11"] [write "22"] "11" Please note that during this time I do not move my truck, I use the command center to ask these questions (from turtle truck perspective). I am very confused about this. As the only thing I change is the action (what to write). This should not impact the true/false statement itself. Does anybody have any clue what is going on here and why the ifelse responds strange?

    Read the article

  • Freeing of allocated memory in Solaris/Linux

    - by user355159
    Hi, I have written a small program and compiled it under Solaris/Linux platform to measure the performance of applying this code to my application. The program is written in such a way, initially using sbrk(0) system call, i have taken base address of the heap region. After that i have allocated an 1.5GB of memory using malloc system call, Then i used memcpy system call to copy 1.5GB of content to the allocated memory area. Then, I freed the allocated memory. After freeing, i used again sbrk(0) system call to view the heap size. This is where i little confused. In solaris, eventhough, i freed the memory allocated (of nearly 1.5GB) the heap size of the process is huge. But i run the same application in linux, after freeing, i found that the heap size of the process is equal to the size of the heap memory before allocation of 1.5GB. I know Solaris does not frees memory immediately, but i don't know how to tune the solaris kernel to immediately free the memory after free() system call. Also, please explain why the same problem does not comes under Linux? Can anyone help me out of this? Thanks, Santhosh.

    Read the article

  • Convert The Context Free Grammar to LL1 Grammar

    - by kamiar3001
    hi I want to write a program to gives grammar as input and change it to LL1. my problem is converting to LL1 I don't have any algorithm to convert. I earn grammar from some input text by a simple text analyzer but how I can change it to LL1 ? is there any algorithm that is clear to implement.

    Read the article

  • How to move/drag multiple images with CALayer???

    - by gbf.sara
    I have more than 10 images in screen and i want to move each image using CALayer concept. While am trying to move first image,its working. Even when i drag my second image also, its working. But after that when i get back to first image and when i try to move , am struck up. its not working. I dono where it went wrong. Here's ma code //Assigning Layer to UIImage// layer = [CALayer layer]; UIImage *image1 = [UIImage imageNamed:[NSString stringWithFormat:@"%@_thumb.png",[tiv imageName]]]; layer.contents = (id)image1.CGImage; layer.position=CGPointMake(200,200); layer.frame = CGRectMake(110, 180, 100, 100); [self.view.layer addSublayer:layer]; [layer needsDisplay]; [self.view.layer needsDisplay]; [layer needsLayout]; //Here i try to move my image// - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesMoved:touches withEvent:event]; NSArray *allTouches = [touches allObjects]; int count = [allTouches count]; if (count == 1) { if (CGRectContainsPoint([layer frame], [[allTouches objectAtIndex:0] locationInView:self.view])) { layer.position = [[allTouches objectAtIndex:0] locationInView:self.view]; return; } } if (count > 1) { if (CGRectContainsPoint([layer frame], [[allTouches objectAtIndex:-1] locationInView:self.view])) { layer.position = [[allTouches objectAtIndex:0] locationInView:self.view]; return; } } } Also ive planned to use single CALayer for multiple images.. When i click an image, it should be placed in that CALayer and when i click another, the same CALayer should take the latter one. So tat whenever i drag an image it should move(no matter how many images r there) . Do u think this concept will work out or is there any other idea??? My concept may seems to be a basic one. Am new to this environment n so kindly help me..

    Read the article

  • Using FFmpeg or wrapper to get mp3 from mp4 in C#

    - by Tom Allen
    I'm trying to extract an mp3 from a flash compatible mp4 file and have so far found FFMpeg and a bunch of different wrappers that all claim to be able to do the job. Ideally, I'd like to not have to rely on shelling to the FFMpeg exe, but none of the wrappers I've tried seem to work.... Has anyone got any code or advice for how to go about this? Thanks!

    Read the article

  • How to use @PersistentCapable annotation in Scala 2.8

    - by Gero
    Hi, I'm switching from Scala 2.7.7 to Scala 2.8.0RC3 and now a few of my classes don't compile anymore. The problem is in the @PersistentCapable annotation: import javax.jdo.annotations._ import java.util.Date @PersistenceCapable{identityType=IdentityType.APPLICATION} class Counter(dt: Date, cName: String, vl: int) { <.. snip ..> } This code results in the following compilation errors: [ERROR] /Users/gero/prive/kiva/kivanotify-gae/src/main/scala/net/vermaas/kivanotify/model/LoanProcessed.scala:7: error: expected start of definition [INFO] @PersistenceCapable{val identityType = IdentityType.APPLICATION} I already tried a couple of variations, did some Googling but without luck. Any ideas on how I can use the @PersistentCapable annotation with Scala 2.8.0 RC3? Thanks, Gero

    Read the article

  • Is objective C 2.0 a proper superset of C?

    - by RankWeis
    I've heard that objective-C is a proper superset of C, but is objective-C 2.0? The reason I ask is that either it isn't, or I misunderstand the phrase 'proper superset', because this code is valid C syntax: import int main () { char *nil = "hello"; printf("%s\n",nil); } But does not compile in Objective-C 2.0. Obviously, this is an easily fixable problem, but I'm writing a paper, and feel that this is something that should be pointed out.

    Read the article

  • Database related Questions

    - by alokpatil
    I am planning to make a railway reservation project... I am maintaining following tables.. trainTable (trainId,trainName,trainFrom,trainTo,trainDate,trainNoOfBoogies)...PK(trainId) Boogie (trainId,boogieId,boogieName,boogieNoOfseats)...CompositeKey(trainId,boogieId)... Seats (trainId,boogieId,seatId,seatStatus,seatType)...CompositeKey(trainId,boogieId,seatId)... user (userId,name...personal details) userBooking (userId,trainId,boogieId,seatId)...Is this good design reply me please...

    Read the article

  • weird characters in HTML email

    - by sims
    Hi stackers! I'm reading email from a maildir and some emails have weird sets of characters in them: =3D =09 I think =3D is = and =09 is a space. There are some others, but I'm not sure: =E2 =80 =93 Does anyone know what these are and what encoding issues I'm dealing with here? BTW, I tried fetching these email via POP3 and it's the same thing. The reason I'm posting this on SO is not because I'm using a regular mail client to read the data. I'm reading via PHP out of maildir files. Perhaps a regular email client would detect what encoding this is and deal with it. Thanks!

    Read the article

  • PHP: Facebook stream.publish and outdated template bundles?

    - by AFK
    Ok So I haven't tried messing with the facebook PHP API for months.. it's gross. Since template bundles are apparently now defunct, how can I publish a story into my users news feed for their friends? I've also already requested permissions. Edit: The issue seems to arise from requested permissions not being set for the user when They are granted. So far I have this $appapikey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; $appsecret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; $facebook = new Facebook($appapikey, $appsecret); $fb_user = $facebook->require_login(); try { $facebook->api_client->feed_publishUserAction(); } catch(Exception $e) { } edit: I've looked through the facebook "api documentation" multiple times it's just not clear to me. I can't tell what's actually deprecated or not. They link to tutorials 2-3 years old! if you have a problem with your iframe application reloading over and over and over try using $facebook-require_frame()

    Read the article

  • Deploying to Heroku with sensitive setting information

    - by TK
    I'm using GitHub for code and Heroku for the deployment platform for my rails app. I don't want to have sensitive data under Git. Such data include database file settings (database.yml) and some other files that have secret API keys. When I deploy to heroku, how can I deal with files that are not under revision control. When I use Capistrano, I can write some hook methods, but I don't know what to do with Heroku.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >