Search Results

Search found 224 results on 9 pages for 'credits'.

Page 1/9 | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Facebook Payments & Credits vs. Real-World & Charities

    - by Adam Tannon
    I am having a difficult time understanding Facebook's internal "e-commerce microcosm" and what it allows Facebook App developers to do (and what it restricts them from doing). Two use cases: I'm an e-com retailer selling clothes and coffee mugs (real-world goods) on my website; I want to write a Facebook App that allows Facebook users to buy my real-world goods from inside of Facebook using real money ($ USD) I'm highschool student trying to raise money for my senior class trip and want to build a Facebook App that allows Facebook users to donate to our class using real money ($ USD) Are these two scenarios possible? If not, why (what Facebook policies prohibit me from doing so)? If so, what APIs do I use: Payments or Credits? And how (specifically) would it work? Do Facebook Users have to first buy "credits" (which are mapped to $ USD values under the hood) and pay/donate with credits, or can they whip out their credit card and pay/donate right through my Facebook App? I think that last question really summarizes my confusion: can Facebook users enter their credit card info directly into Facebook Apps, or do you have to go through Payments/Credits APIs as a "middleman"?

    Read the article

  • Image libraries sites to download pro images with no credits expiration policy

    - by Marco Demaio
    I found professional image libraries sites like http://www.istockphoto.com or http://www.dreamstime.com are quite useful to add some cool images to a website either when filling its contents or when designing its graphic layout. Unfortunately both of the site I listed above use credits plans that expires after 12 months: you buy credits (using real bucks) and then you can download images, but if you don't use all the credits within 1 year, thay suck them out from your virtual wallet (I think it's really unfair, but too bad for you, that's their policy). Do you know about other good image libraries sites (from your real life experience) that use credits to download images, but thay don't expire after 12 months? Obviously I won't ignore your suggestions about any other image libraries sites.

    Read the article

  • software attribution / design credits

    - by Smith
    We just completed developing a web app for a client. And like i usually do, i added developed by "My Company" at the footer at a very small insignificat size. I sent the client an Eend user license stating some of the following in summary you can't resell, redistribute, etc without our notice ... you can remove the attribution or design credits the client got back to me and complained, telling me now that he was also developing for someone, and that 'I can't add my attribution' without his/her consent, but? Although i sign a NDA with in summary states that i cannot disclose the software to anyone else There was no agreement before the project that am not to add design credits or attribution i know every software i install have that, and so is every products from companies, mostly technological products. how does this work (adding design credits) What do you think?

    Read the article

  • how many times can i buy swtor credits with Extra 100% Bonus in Father’s Day at swtor2credits?

    - by user46860
    When you buy swtor credits, the most important factor must be the price of swtor credits! how can you get the cheap swtor credits? Big surprise for you: For such a special festival - Father’s Day, swtor2credits made a super promotion for all of the swtor players, in the only three days promotion time, you can buy 1600 credits with only $5.04, buy 2000 credits with only $6.30, and 3000k Credits just only need $9.44. The detail time is June 16 to June 18, 2014, 02:00-03:00 a.m. GMT! swtor2credits have been selling at a big loss with so much cheap swtor credits, this is mean 50% off for your order! that is really a crazy super promotion! So may you can not use the 8% disount code and getting double swtor credits at the same time! Everyone has only one chance to get double swtor credits at swtor2credits during our promotion.As long as your order has used extra discount code or voucher, you lose the chance to get exclusive 100% bonus. don't miss the time to buy such cheap swtor credits, like swtor2credits facebook give you more surprise, From May 29, 2014 to June 12.2014.GMT, you can gain Free Cash Coupon, Up to $16 Giveaways for Swtor Credits if you like swtor2credits facebook! http://www.swtor2credits.com/

    Read the article

  • who can tell me the rules of extra 100% bonus for swtor credits in swtor2credits?

    - by user46860
    During Father's Day, you can buy swtor credits with 50% OFF! swtor2credits.com offer swtor players with extra 100% bonus for swtor credits, when you spend the same money as before, you can get double swtor credits! Rules for extra 100% bonus for swtor credits. 1. From June 16 to June 18, 2014, 02:00-03:00 a.m. GMT, is the ONLY valid time for getting double swtor credits at swtor2credits. 2. The total sum of your order is valued $10 at most. Beyond this money, please apply discount code you know to save extra money. 3. Everyone has only one chance to get double swtor credits at swtor2credits during our promotion. 4. As long as your order has used extra discount code or voucher, you lose the chance to get exclusive 100% bonus. Please read these activities rules carefully, and don't miss the time! Like Swtor2credits Facebook to Gain Free Cash Coupon, Up to $16 Giveaways for Swtor Credits! 1. Share our facebook posts in your timeline. 2. Leave your preciously constructive suggestion on our facebook page. 3. Share your amazing swtor gaming screenshots on our page. Time: May 29, 2014 to June 12.2014.GMT. https://www.facebook.com/pages/swtor2creditscom/493389160685307 Cheap swtor credits in swtor2credits.com.

    Read the article

  • Automating the insertion of credits in video files on Mac OS X

    - by Roberto Aloi
    I have a bunch of video files (mp4). I need to insert some title information at the beginning and some credits at the end. I'm currently using iMovie. Since the title could be extracted from the filename and the credits are always the same, I'm wondering how could I make all this process as automatic as possible. I was thinking about Automator, but I'm open to any other solution. iMovie is the preferred tool so far, but I could use anything else (as far as it doesn't require additional licensing/cost). Any idea?

    Read the article

  • Is listing developer's full names in splash screen or about box still a widely spread and desirable practice?

    - by Pierre 303
    Just like in the closing credits of movies, some software vendors list the full names of the team that worked on the piece of software you are using. They are usually displayed in the splash screen (Photoshop) ... or in the about box (Traktor). In the demoscene, it is a mandatory practice, like in the movie industry. How do you see that in your own software? Is there any reason why not doing it? Is there any reason encouraging companies to do it?

    Read the article

  • What is ethical/unethical while seeking help on the web with programming assignments?

    - by HelpNeeder
    I have used the web and Stack Overflow extensively during the past month or so in creating my final project for my C# class. I have used so much code that I didn't write myself that I feel I am being unethical by not giving proper credit to the people who helped me; or the websites that have provided excellent examples. Is it unethical to publish work which was created by me, even though its hardest problems were solved by other people? Should I credit these people for helping me with my assignment? Or the web sites which provided examples?

    Read the article

  • jQuery Validation Plugin: Packer undefined error?

    - by Rosarch
    I'm using the jQuery validation plugin from bassistance.de. It works fine. From <head>: <script type="text/javascript" src="/static/JQuery.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.validate.pack.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.validate.additional-methods.js"></script> At first, this was the only validation code I had, and it worked: $("form").validate(); $("#form-username").rules("add", { required: true, email: true, }); It was validating this HTML: <form id="form-username-form" action="api/user_of_email" method="get"> <p> <label for="form-username">Email:</label> <input type="text" name="email" id="form-username" /> <input type="submit" value="Submit" id="form-submit" /> </p> </form> Great, everything works. But then I add this JS: $("#form-choose-options input[type='text']").rules("add", { number: true, }); to validate this markup: <form id="form-choose-options" action="api/set_options" method="get"> <p> <label for="form-min-credits">Min credits per term:</label><input type="text" name="min_credits" id="form-min-credits" /> <br /> <label for="form-optimal-credits">Optimal credits per term:</label><input type="text" name="optimal_credits" id="form-optimal-credits" /> <br /> <label for="form-max-credits">Max credits per term:</label><input type="text" name="max_credits" id="form-max-credits" /> <br /> <label for="form-low-GPA">Lowest acceptable GPA:</label><input type="text" name="low_GPA" id="form-low-GPA" /> <br /> <label for="form-high-GPA">Highest realistic GPA:</label><input type="text" name="high_GPA" id="form-high-GPA" /> <br /> <input type="hidden" class="user-pk" name="pk"/> <input type="submit" value="Submit" /> </p> </form> This causes a javascript error on document load: $.data(f.form, "validator") is undefined The error is from the packer function. What am I doing wrong?

    Read the article

  • Changing enum in a different class for screen

    - by user2434321
    I'm trying to make a start menu for my game and my code uses Enum's to moniter the screen state. Now i want to change the screenstate declared in the main class, in my Background class Screen screen = new Screen(); is declared in the Game1 class Background(ref screen); This is in the update method for the Background Class KeyboardState keystate = Keyboard.GetState(); switch (screen) { case Screen.Start: if (isPressed && keystate.IsKeyUp(Keys.Up) && keystate.IsKeyUp(Keys.Down) && keystate.IsKeyUp(Keys.Enter)) { isPressed = false; } if (keystate.IsKeyDown(Keys.Down) && isPressed != true) { if (menuState == MenuState.Options) menuState = MenuState.Credits; if (menuState == MenuState.Play) menuState = MenuState.Options; isPressed = true; } if (keystate.IsKeyDown(Keys.Up) && isPressed != true) { if (menuState == MenuState.Options) menuState = MenuState.Play; if (menuState == MenuState.Credits) menuState = MenuState.Options; isPressed = true; } switch (menuState) { case MenuState.Play: arrowRect.X = 450; arrowRect.Y = 220; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Play; break; case MenuState.Options: arrowRect.X = 419; arrowRect.Y = 340; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Options; break; case MenuState.Credits: arrowRect.X = 425; arrowRect.Y = 460; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Credits; break; } break; } } For some reason when I play this and I hit the enter button the Background class's screen is changed but the main class's screen isn't how can i change this? EDIT 1* class Background { private Texture2D background; private Rectangle backgroundRect; private Texture2D arrow; private Rectangle arrowRect; private Screen screen; private MenuState menuState; private bool isPressed = false; public Screen getScreenState(ref Screen screen) { this.screen = screen; return this.screen; } public Background(ref Screen screen) { this.screen = screen; } public void Update() { KeyboardState keystate = Keyboard.GetState(); switch (screen) { case Screen.Start: if (isPressed && keystate.IsKeyUp(Keys.Up) && keystate.IsKeyUp(Keys.Down) && keystate.IsKeyUp(Keys.Enter)) { isPressed = false; } if (keystate.IsKeyDown(Keys.Down) && isPressed != true) { if (menuState == MenuState.Options) menuState = MenuState.Credits; if (menuState == MenuState.Play) menuState = MenuState.Options; isPressed = true; } if (keystate.IsKeyDown(Keys.Up) && isPressed != true) { if (menuState == MenuState.Options) menuState = MenuState.Play; if (menuState == MenuState.Credits) menuState = MenuState.Options; isPressed = true; } switch (menuState) { case MenuState.Play: arrowRect.X = 450; arrowRect.Y = 220; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Play; break; case MenuState.Options: arrowRect.X = 419; arrowRect.Y = 340; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Options; break; case MenuState.Credits: arrowRect.X = 425; arrowRect.Y = 460; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Credits; break; } break; case Screen.Pause: break; case Screen.Over: break; } } public void LoadStartContent(ContentManager Content, GraphicsDeviceManager graphics) { background = Content.Load<Texture2D>("startBackground"); arrow = Content.Load<Texture2D>("arrow"); backgroundRect = new Rectangle(0, 0, graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height); arrowRect = new Rectangle(450, 225, arrow.Width, arrow.Height); screen = Screen.Start; } public void LoadPlayContent(ContentManager Content, GraphicsDeviceManager graphics) { background = Content.Load<Texture2D>("Background"); backgroundRect = new Rectangle(0, 0, graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height); screen = Screen.Play; } public void LoadOverContent(ContentManager Content, GraphicsDeviceManager graphics) { } public void Draw(SpriteBatch spritebatch) { if (screen == Screen.Start) { spritebatch.Draw(background, backgroundRect, Color.White); spritebatch.Draw(arrow, arrowRect, Color.White); } else spritebatch.Draw(background, backgroundRect, Color.White); } } Thats my background class!

    Read the article

  • Anyone got a nifty credit expiry algorithm?

    - by garethkeenan
    Our website uses a credit system to allow users to purchase inexpensive digital goods (eg. photos). We use credits, rather than asking the user to pay for items individually, because the items are cheap and we are trying to keep our credit-card/PayPal overhead low. Because we aren't a bank, we have to expire credits after a certain amount of time. We expire deposit credits after a year, but other types of credits (bonuses, prizes, refunds) may have a different shelf-life. When a buyer buys an item, we spend the credit that is going to expire first. Our current system keeps track of every deposit by storing the original value and the remainder to be spent. We keep a list of all purchases as well, of course. I am currently moving to a system which is much more like a traditional double-entry accounting system. A deposit will create a ledger item, increasing the user's 'spending' account balance. Every purchase will also create a ledger item, decreasing the user's 'spending' account balance. The new system has running balances, while the old system does not, which greatly improves our ability to find problems and do reconciliations. We do not want to use the old system of keeping a 'remainder' value attached to each deposit record because it is inefficient to replay a user's activities to calculate what the remainder of each deposit is over time (for the user's statement). So, after all of this verbose introduction, my question is "Does anyone else out there have a similar system of expiring credits?" If you could describe how you calculate expired credits it would be a great help. If all expired credits had the exact same shelf life, we would be able to calculate the expired amount using: Total Deposits - Total Spending - Deposits Not Due To Expire = Amount to Expire However, because deposits can have different shelf lives, this formula does not work because more than one deposit can be partially spent at any given time.

    Read the article

  • Cleaning up PHP Code

    - by Michael
    Hi, I've noticed I am a very sloppy coder and do things out of the ordinary. Can you take a look at my code and give me some tips on how to code more efficiently? What can I do to improve? session_start(); /check if the token is correct/ if ($_SESSION['token'] == $_GET['custom1']){ /*connect to db*/ mysql_connect('localhost','x','x') or die(mysql_error()); mysql_select_db('x'); /*get data*/ $orderid = mysql_real_escape_string($_GET['order_id']); $amount = mysql_real_escape_string($_GET['amount']); $product = mysql_real_escape_string($_GET['product1Name']); $cc = mysql_real_escape_string($_GET['Credit_Card_Number']); $length = strlen($cc); $last = 4; $start = $length - $last; $last4 = substr($cc, $start, $last); $ipaddress = mysql_real_escape_string($_GET['ipAddress']); $accountid = $_SESSION['user_id']; $credits = mysql_real_escape_string($_GET['custom3']); /*insert history into db*/ mysql_query("INSERT into billinghistory (orderid, price, description, credits, last4, orderip, accountid) VALUES ('$orderid', '$amount', '$product', '$credits', '$last4', '$ipaddress', '$accountid')"); /*add the credits to the users account*/ mysql_query("UPDATE accounts SET credits = credits + $credits WHERE user_id = '$accountid'"); /*redirect is successful*/ header("location: index.php?x=1"); }else{ /*something messed up*/ header("location: error.php"); }

    Read the article

  • Simple LINQ Aggregate Query

    - by Steven
    What is the vb.net equivalent of the following psuedo-code using LINQ? select min(credits) minCredits, max(credits) maxCredits, min(dollars) minDollars, max(dollars) maxDollars from players minCredits_lbl.Text = minCredits ... maxDollars_lbl.Text = maxDollars I have the following, but I can't figure out how to get any further. Dim query = From row in myDataSet.Tables("Players") _ Select credits = row("credits"), dollars = row("dollars")

    Read the article

  • InApp Purchase supported content types

    - by Chandan Shetty SP
    In InApp purchase guide i saw these are the supported content types - Digital Books,Virtual poker chips current games, In-game tool or accessory, etc... And non-supported - Physical books, Virtual poker chips for other games, In-game credits for virtual goods, etc... I didn't understand "In-game credits for virtual goods" what is this? In my game i am using some credits to skip certain levels, if credits are not available user can buy credits through inApp purchase then he can skip level... Is it valid supported content type for In-App purchase?

    Read the article

  • Fix: Azure Disabled over 49 cents? Beware of using a Java Virtual Machine on Microsoft Azure

    - by Ken Cox [MVP]
    I love my MSDN Azure account. I can spin up a demo/dev app or VM in seconds. In fact, it is so easy to create a virtual machine that Azure shut down my whole account! Last night I spun up a Java Virtual Machine to play with some Android stuff. My mistake was that I didn’t read the Virtual Machine pricing warning: “I have a MSDN Azure Benefit subscription. Can I use my monthly Azure credits to purchase Oracle software?” “No, Azure credits in our MSDN offers are not applicable to Oracle software. In order to purchase Oracle software in the MSDN Azure Benefit subscription, customers need to turn off their {0} spending limit and pay at the regular pay-as-you-go rate. Otherwise, Oracle usage will hit the {1} spending limit and the subscription will be immediately disabled.”  Immediately disabled? Yup. Everything connected to the subscription was shut off, deallocated, rendered useless - even the free Web sites and the free Sendgrid email service.  The fix? I had to remove the spending limit from my account so I could pay $0.49 (49 cents) for the JVM usage. I still had $134.10 in credits remaining for regular usage with 6 days left in the billing month.  Now the restoration/clean-up begins… figuring out how to get the web sites and services back online.  To me, the preferable way would be for Azure to warn me when setting up a JVM that I had no way of paying for the service. In the alternative, shut down just the offending services – the ones that can’t be covered by the regular credits. What a mess.

    Read the article

  • C++ scoping error

    - by Pat Murray
    I have the following code: #include "Student.h" #include "SortedList.h" using namespace std; int main() { // points to the sorted list object SortedList *list = new SortedList; //This is line 17 // array to hold 100 student objects Student create[100]; int num = 100000; // holds different ID numbers // fills an array with 100 students of various ID numbers for (Student &x : create) { x = new Student(num); num += 100; } // insert all students into the sorted list for (Student &x : create) list->insert(&x); delete list; return 0; } And I keep getting the compile time error: main.cpp: In function ‘int main()’: main.cpp:17: error: ‘SortedList’ was not declared in this scope main.cpp:17: error: ‘list’ was not declared in this scope main.cpp:17: error: expected type-specifier before ‘SortedList’ main.cpp:17: error: expected `;' before ‘SortedList’ main.cpp:20: error: ‘Student’ was not declared in this scope main.cpp:20: error: expected primary-expression before ‘]’ token main.cpp:20: error: expected `;' before ‘create’ main.cpp:25: error: expected `;' before ‘x’ main.cpp:31: error: expected primary-expression before ‘for’ main.cpp:31: error: expected `;' before ‘for’ main.cpp:31: error: expected primary-expression before ‘for’ main.cpp:31: error: expected `)' before ‘for’ main.cpp:31: error: expected `;' before ‘x’ main.cpp:34: error: type ‘<type error>’ argument given to ‘delete’, expected pointer main.cpp:35: error: expected primary-expression before ‘return’ main.cpp:35: error: expected `)' before ‘return’ My Student.cpp and SortedList.cpp files compile just fine. They both also include .h files. I just do not understand why I get an error on that line. It seems to be a small issue though. Any insight would be appreciated. UPDATE1: I originally had .h files included, but i changed it when trying to figure out the cause of the error. The error remains with the .h files included though. UPDATE2: SortedList.h #ifndef SORTEDLIST_H #define SORTEDLIST_H #include "Student.h" /* * SortedList class * * A SortedList is an ordered collection of Students. The Students are ordered * from lowest numbered student ID to highest numbered student ID. */ class SortedList { public: SortedList(); // Constructs an empty list. SortedList(const SortedList & l); // Constructs a copy of the given student object ~SortedList(); // Destructs the sorted list object const SortedList & operator=(const SortedList & l); // Defines the assignment operator between two sorted list objects bool insert(Student *s); // If a student with the same ID is not already in the list, inserts // the given student into the list in the appropriate place and returns // true. If there is already a student in the list with the same ID // then the list is not changed and false is returned. Student *find(int studentID); // Searches the list for a student with the given student ID. If the // student is found, it is returned; if it is not found, NULL is returned. Student *remove(int studentID); // Searches the list for a student with the given student ID. If the // student is found, the student is removed from the list and returned; // if no student is found with the given ID, NULL is returned. // Note that the Student is NOT deleted - it is returned - however, // the removed list node should be deleted. void print() const; // Prints out the list of students to standard output. The students are // printed in order of student ID (from smallest to largest), one per line private: // Since Listnodes will only be used within the SortedList class, // we make it private. struct Listnode { Student *student; Listnode *next; }; Listnode *head; // pointer to first node in the list static void freeList(Listnode *L); // Traverses throught the linked list and deallocates each node static Listnode *copyList(Listnode *L); // Returns a pointer to the first node within a particular list }; #endif #ifndef STUDENT_H #define STUDENT_H Student.h #ifndef STUDENT_H #define STUDENT_H /* * Student class * * A Student object contains a student ID, the number of credits, and an * overall GPA. */ class Student { public: Student(); // Constructs a default student with an ID of 0, 0 credits, and 0.0 GPA. Student(int ID); // Constructs a student with the given ID, 0 credits, and 0.0 GPA. Student(int ID, int cr, double grPtAv); // Constructs a student with the given ID, number of credits, and GPA.\ Student(const Student & s); // Constructs a copy of another student object ~Student(); // Destructs a student object const Student & operator=(const Student & rhs); // Defines the assignment operator between two student objects // Accessors int getID() const; // returns the student ID int getCredits() const; // returns the number of credits double getGPA() const; // returns the GPA // Other methods void update(char grade, int cr); // Updates the total credits and overall GPA to take into account the // additions of the given letter grade in a course with the given number // of credits. The update is done by first converting the letter grade // into a numeric value (A = 4.0, B = 3.0, etc.). The new GPA is // calculated using the formula: // // (oldGPA * old_total_credits) + (numeric_grade * cr) // newGPA = --------------------------------------------------- // old_total_credits + cr // // Finally, the total credits is updated (to old_total_credits + cr) void print() const; // Prints out the student to standard output in the format: // ID,credits,GPA // Note: the end-of-line is NOT printed after the student information private: int studentID; int credits; double GPA; }; #endif

    Read the article

  • Help replace this SQL cursor with better code

    - by user318573
    Can anyone give me a hand improving the performance of this cursor logic from SQL 2000. It runs great in SQl2005 and SQL2008, but takes at least 20 minutes to run in SQL 2000. BTW, I would never choose to use a cursor, and I didn't write this code, just trying to get it to run faster. Upgrading this client to 2005/2008 is not an option in the immediate future. ------------------------------------------------------------------------------- ------- Rollup totals in the chart of accounts hierarchy ------------------------------------------------------------------------------- DECLARE @B_SubTotalAccountID int, @B_Debits money, @B_Credits money, @B_YTDDebits money, @B_YTDCredits money DECLARE Bal CURSOR FAST_FORWARD FOR SELECT SubTotalAccountID, Debits, Credits, YTDDebits, YTDCredits FROM xxx WHERE AccountType = 0 AND SubTotalAccountID Is Not Null and (abs(credits)+abs(debits)+abs(ytdcredits)+abs(ytddebits)<>0) OPEN Bal FETCH NEXT FROM Bal INTO @B_SubTotalAccountID, @B_Debits, @B_Credits, @B_YTDDebits, @B_YTDCredits --For Each Active Account WHILE @@FETCH_STATUS = 0 BEGIN --Loop Until end of subtotal chain is reached WHILE @B_SubTotalAccountID Is Not Null BEGIN UPDATE xxx2 SET Debits = Debits + @B_Debits, Credits = Credits + @B_Credits, YTDDebits = YTDDebits + @B_YTDDebits, YTDCredits = YTDCredits + @B_YTDCredits WHERE GLAccountID = @B_SubTotalAccountID SET @B_SubTotalAccountID = (SELECT SubTotalAccountID FROM xxx2 WHERE GLAccountID = @B_SubTotalAccountID) END FETCH NEXT FROM Bal INTO @B_SubTotalAccountID, @B_Debits, @B_Credits, @B_YTDDebits, @B_YTDCredits END CLOSE Bal DEALLOCATE Bal

    Read the article

  • Complex SQL query with group by and two rows in one

    - by Ricket
    Okay, I need help. I'm usually pretty good at SQL queries but this one baffles me. By the way, this is not a homework assignment, it's a real situation in an Access database and I've written the requirements below myself. Here is my table layout. It's in Access 2007 if that matters; I'm writing the query using SQL. Id (primary key) PersonID (foreign key) EventDate NumberOfCredits SuperCredits (boolean) There are events that people go to. They can earn normal credits, or super credits, or both at one event. The SuperCredits column is true if the row represents a number of super credits earned at the event, or false if it represents normal credits. So for example, if there is an event which person 174 attends, and they earn 3 normal credits and 1 super credit at the event, the following two rows would be added to the table: ID PersonID EventDate NumberOfCredits SuperCredits 1 174 1/1/2010 3 false 2 174 1/1/2010 1 true It is also possible that the person could have done two separate things at the event, so there might be more than two columns for one event, and it might look like this: ID PersonID EventDate NumberOfCredits SuperCredits 1 174 1/1/2010 1 false 2 174 1/1/2010 2 false 3 174 1/1/2010 1 true Now we want to print out a report. Here will be the columns of the report: PersonID LastEventDate NumberOfNormalCredits NumberOfSuperCredits The report will have one row per person. The row will show the latest event that the person attended, and the normal and super credits that the person earned at that event. What I am asking of you is to write, or help me write, the SQL query to SELECT the data and GROUP BY and SUM() and whatnot. Or, let me know if this is for some reason not possible, and how to organize my data to make it possible. This is extremely confusing and I understand if you do not take the time to puzzle through it. I've tried to simplify it as much as possible, but definitely ask any questions if you give it a shot and need clarification. I'll be trying to figure it out but I'm having a real hard time with it, this is grouping beyond my experience...

    Read the article

  • Database design for credit based purchases

    - by FreshCode
    I need an elegant way to implement credit-based purchases for an online store with a small variety of products which can be purchased using virtual credit or real currency. Alternatively, products could only be priced in credits. Previous work I have implemented credit-based purchasing before using different product types (eg. Credit, Voucher or Music) with post-order processing to assign purchased credit to users in the form of real currency, which could subsequently be used to discount future orders' charge totals. This worked fairly well as a makeshift solution, but did not succeed in disconnecting the virtual currency from the real currency, which is what I'd like to do, since spending credits is psychologically easier for customers than spending real currency. Design I need guidance on designing the database correctly with support for the simultaneous bulk purchase of credits at a discount along with real currency products. Alternatively, should all products be priced in credits and only credit have a real currency value? Existing Database Design Partial Products table: ProductId Title Type UnitPrice SalePrice Partial Orders table: OrderId UserId (related to Users table, not shown) Status Value Total Partial OrderItems table (similar to CartItems table): OrderItemId OrderId (related to Orders table) ProductId (related to Products table) Quantity UnitPrice SalePrice Prospective UserCredits table: CreditId UserId (related to Users table, not shown) Value (+/- value. Summed over time to determine saldo.) Date I'm using ASP.NET MVC and LINQ-to-SQL on a SQL Server database.

    Read the article

  • Linq-to-SQL: How to shape the data with group by?

    - by Cheeso
    I have an example database, it contains tables for Movies, People and Credits. The Movie table contains a Title and an Id. The People table contains a Name and an Id. The Credits table relates Movies to the People that worked on those Movies, in a particular role. The table looks like this: CREATE TABLE [dbo].[Credits] ( [Id] [int] IDENTITY (1, 1) NOT NULL PRIMARY KEY, [PersonId] [int] NOT NULL FOREIGN KEY REFERENCES People(Id), [MovieId] [int] NOT NULL FOREIGN KEY REFERENCES Movies(Id), [Role] [char] (1) NULL In this simple example, the [Role] column is a single character, by my convention either 'A' to indicate the person was an actor on that particular movie, or 'D' for director. I'd like to perform a query on a particular person that returns the person's name, plus a list of all the movies the person has worked on, and the roles in those movies. If I were to serialize it to json, it might look like this: { "name" : "Clint Eastwood", "movies" : [ { "title": "Unforgiven", "roles": ["actor", "director"] }, { "title": "Sands of Iwo Jima", "roles": ["director"] }, { "title": "Dirty Harry", "roles": ["actor"] }, ... ] } How can I write a LINQ-to-SQL query that shapes the output like that? I'm having trouble doing it efficiently. if I use this query: int personId = 10007; var persons = from p in db.People where p.Id == personId select new { name = p.Name, movies = (from m in db.Movies join c in db.Credits on m.Id equals c.MovieId where (c.PersonId == personId) select new { title = m.Title, role = (c.Role=="D"?"director":"actor") }) }; I get something like this: { "name" : "Clint Eastwood", "movies" : [ { "title": "Unforgiven", "role": "actor" }, { "title": "Unforgiven", "role": "director" }, { "title": "Sands of Iwo Jima", "role": "director" }, { "title": "Dirty Harry", "role": "actor" }, ... ] } ...but as you can see there's a duplicate of each movie for which Eastwood played multiple roles. How can I shape the output the way I want?

    Read the article

  • Javascript: Uncaught exception: "too few args"

    - by Rosarch
    I think I must be making some really stupid mistake. I'm using the latest version of jQuery to write an AJAX app. function refreshGPAForTerm(term) { var meta_data = term.children('.' + TERM_META_DATA_CLASS); meta_data.children('.' + MEDIAN_GPA_CLASS).fadeOut('slow').remove(); meta_data.append(_getMedianGPAElem(term.data('GPA'))).hide().fadeIn('slow'); } function moveToTerm(original_course, helper, term) { var cloned_course = original_course.clone(true); term.data('credits', term.data('credits') + cloned_course.data('credits')); term.data('median_GPA', term.data('median_GPA') + cloned_course.data('credits') * cloned_course.data('GPA')); // error here refreshGPAForTerm(term); refreshCreditForTerm(term); original_course.addClass('already-scheduled'); original_course.draggable('disable'); cloned_course.appendTo(term).hide().fadeIn('slow').draggable(); } When refreshGPAForTerm(term) is called, Firebug displays: "Uncaught exception - Too few arguments". Stepping through in a debugger, the code then goes into jQuery. Why is this happening? What am I doing wrong?

    Read the article

  • Anyone know of a command-line torrent client to run on a server?

    - by DJTripleThreat
    I have an account with a torrent site that gives and takes credits when you upload/download respectively. My ideal setup to keep my credits going would be some kind of media box that keeps and manages my music and videos etc. Ideally, I'd like this to be a headless box that I could just telnet into and have it run torrents that way. This server would be running ubuntu server by the way.

    Read the article

  • SQL Outer joins

    - by dsquaredtech
    Three tables courses,registration,students columns in students firstname,lastname,studentid,major,admitdate,graddate,gender,dob columns in registration courseid,studentid columns in courses coursenumber,coursename,credits select statement I need to modify select lastname as 'Last Name',sum(credits) as 'Credits Registered For' from students as s inner join registration as r on s.studentid = r.studentid inner join courses as c on c.coursenumber = c.courseid group by last name; the question on the lab is... Modify the previous query to show all students, even if they have not registered for a class. You should have 14 rows. Students who are not registered will show NULL in output. I know this requires outer join of some sort but I'm not fully grasping these joins i've read multiple posts on here and other sites but can't seem figure it out.

    Read the article

  • A few things I learned regarding Azure billing policies

    - by Vincent Grondin
    An hour of small computing time: 0,12$ per hour A Gig of storage in the cloud: 0,15$ per hour 1 Gig of relational database using Azure SQL: 9,99$  per month A Visual Studio Professional with MSDN Premium account: 2500$ per year Winning an MSDN Professional account that comes preloaded with 750 free hours of Azure per month:  PRICELESS !!!      But was it really free???? Hmmm… Let’s see.....   Here's a few things I learned regarding Azure billing policies when I attended a promotional training at Microsoft last week...   1)  An instance deployed in the cloud really means whatever you upload in there... it doesn't matter if it's in STAGING OR PRODUCTION!!!!   Your MSDN account comes with 750 free hours of small computing time per month which should be enough hours per month for one instance of one application deployed in the cloud...  So we're cool, the application you run in the cloud doesn't cost you a penny....  BUT the one that's in staging is still consuming time!!!   So if you don’t want to end up having to pay 42$ at the end of the month on your credit card like this happened to a friend of mine, DELETE them staging applications once you’ve put them in production! This also applies to the instance count you can modify in the configuration file… So stop and think before you decide you want to spawn 50 of those hello world apps  .     2) If you have an MSDN account, then you have the promotional 750 hours of Azure credits per month and can use the Azure credits to explore the Cloud! But be aware, this promotion ends in 8 months (maybe more like 7 now) and then you will most likely go back to the standard 250 hours of Azure credits. If you do not delete your applications by then, you’ll get billed for the extra hours, believe me…   There is a switch that you can toggle and which will STOP your automatic enrollment after the promotion and prevent you from renewing the Azure Account automatically. Yes the default setting is to automatically renew your account and remember, you entered your credit card information in the registration process so, yes, you WILL be billed…  Go disable that ASAP    Log into your account, go to “Windows Azure Platform” then click the “Subscriptions” tab and on the right side, you’ll see a drop down with different “Actions” into it… Choose “Opt out of auto renew” and, NOW you’re safe…   Still, this is a great offer by Microsoft and I think everyone that has a chance should play a bit with Azure to get to know this technology a bit more...     Happy Cloud Computing All

    Read the article

1 2 3 4 5 6 7 8 9  | Next Page >