FacebookCredits - add credits to test users - java

I'm looking for another answer than the one stated here. I want to see the credits "transfered" in my app. Insights but with test users transactions, in order to ensure that callback has no mistakes. I'm afraid it can't be done, but if someone has another option, that could be helpful as well.

Your only options are to use testers, and live with the fact that their transactions won't appear in the payout reports, or use real credits and real money

Related

I am creating UML for an information system which is needed to help deal with the editing of the magazine

I have been tasked to create one use case to cover the main functionality of the scenario below. So far the use case which I have come up with is create magazine issue and the actor is the Editor. However, I'm not sure about the part where the editor edits the advertisement and sends it to the processing centre and how to include that in the use case. Any advice on how I can go about doing correctly would be helpful or any improvements which can be made would be appreciated. I have attached what I have done so far as well as the case study.
This is the case study which I am creating the UML for
Use case created so far
There is much more process and behaviour described in the scenario text than is logical to represent in one Use Case. To me, this would be more usefully described as using many Use Cases and several actors.
Do you have a specific flow within the scenario that you want to model? For example, placing an advert, moderating an advert, sending to the print shop? All of these could be Use Cases on their own. You would do well weed out and narrow down more exactly. Remember that a Use Case needs to deliver something business-useful to the User or a Business that they represent and needs to have a clear and unambiguous objective.

how to get the Fee Amount for paypal

I am currently looking at a system that implements the PayPal api. As a part of this I need to get the feeAmt() which is the fee that is paid to paypal for processing the payment.
From the documentation that I have looked at it appears that I have to implement the getExpressCheckoutDetailsReq() method in order to get the information that I want however no matter what I have tried I am struggling to do this. I should also let you know that I am currently developing my application using Java so using this is going to be best.
If any more explanation is needed please don't hesitate to ask and I will do my best to amend the post :)
GetExpressCheckoutDetails does not include the fee because at that point no payment has been made yet. That's the 2nd of 3 calls for Express Checkout, and until the final call is made there is no fee.
The fee amount would actually come in that final call's response: DoExpressCheckoutPayment. It will come in the PAYMENTINFO_n_FEEAMT parameter, where n is the number of the payment (0,1,2,etc.) Most likely it'll be 0 unless you're working with parallel payments.
Alternatively, you can use Instant Payment Notification (IPN) to get details about transactions, including the fee, in real-time when transactions are completed on your PayPal account.
Yet another option would be to use the GetTransactionDetails API to pull data for an individual transaction which would include the fee in a FEEAMT parameter. Maybe that's the one you were initially thinking of..??

Object Oriented Approach for a Supermarket Simulator

I have been learning java and data structures in java lately. I am dealing with this problem , this would be the first sort of real program i will be coding up . Up to this point i have only wrote code for short algorithms and data structures. So i was kind of looking for guidance on how i can approach this step by step. I am not looking for any code as i don't learn by looking at other peoples codes rather i needed guidance in how i should approach such a problem ..ex. do i first determine which classes i need etc? So after surveying the problem i realize this problem can be made as detailed or complicated as we like but i am trying to keep it simple do the basic that is required. So the following is what i have gathered so far.
I need a Customer class that will include name, age, number of grocery items bought, and method for determining which queue to join(join the shortest queue).
I need a several Customer queues that are associated with "checkers" who take random time to process each customer.
I would need a supermarket class where all the interaction between the customer, the queue and the checker would take place.
I am confused as i don't know where to start at the moment and also right now i don't have a clear idea on how everything will come together. I would really appreciate if someone can provide me step by step guidance as to what i should do in which order. By doing so it will help me in the future when i write more code for other object oriented languages.
I highly appreciate all inputs and apologize if have asked anything inappropriate.
In general, you need a main loop that repeats over and over and handles input and all entities you have (customers, groceries, etc.)
Since you want the supermarket class to manage your program, I would start with that.
You will then realize that you need a customer in your supermarket.
So create that class when you need it.
Then you will realize you need groceries.
So create that class when you need it.
Then you will realize you need to create the instances for these classes.
That would happen inside the supermarket in your case.
So far, nothing has been made 'viewable' and no interaction with the program is possible.
It creates customers themselves. Adds groceries to them (e.g. in an ArrayList property of the customer).
Then you will realize you need Ques.
So create them.
Time for each customer could depend on the number of items times a random factor.
Now you have your supermarket running. You should add debug logging that you can maybe turn off so you see what's happening.
Now, if you want, you can create something where you can view the supermarket's statistics or however you want to visualize.
Then, create the input for the user. Remember that you are running an infinite loop. You can ask for user input on each iteration. When input is present, react accordingly.
Now: fix bugs, add features, test, fix bugs, add features, test, ...
I hope this is a high-level overview that will help you get started.
Don't be afraid that your classes are to simple at the start. You can always add functionality to them at a later stage when the rough program is running.

Scheduling timetable algorithm

I was wondering if anyone could please point me the right direction on how to approach the scheduling problem.
I have a teacher/student timetable problem, where I have teachers that teach certain subject at certain times and students that have preferences as of which class they want to take an when. The goal is to create a timetable not necessarily optimal solution.
I looked around here and there is a great number of discussions here on this website on this topic and the ones that I found go from super general to excessively difficult and I am currently unable to understand which programming/logic concepts to use to at least conceptualize the program work-flow.
Could anyone that dealt with similar problems explain how these types of problems are dealt with. I do not need the code (although pseudo-code would be awesome), but some guidelines ie step#1 - do this, step#2 - do that, step#3 - do etc....
Also, are there any libraries that are available that can do scheduling with preferences effectively and that have fairly straightforward inputs?
Many thanks!!
here is the outline of a problem that I have.
Let's say I have a group of salespeople:
The goal is to create a schedule that pairs buyer and seller subject to time availability and preferences.
This is a course time-tabling problem, right?
Can I accomplish with Drool Planner?
Take a look at the curriculum course scheduling problem which schedules lectures of teacher and students into timeslots and rooms. Take a look at my open source implementation in Java or just download and run the example.
I 've configured the construction heuristic First Fit Decreasing with the metaheuristic Tabu Search. I tried other configurations too, see my benchmarker config.
First you should make a list of resources for your problem. Then you should write down the constraints and set up a mathematical model. Finally you can use some optimization tool to generate solutions.
Of course this is not as easy as it seems to be. This page may give you some insight about possible solutions.
Matlab has a Global Optimization toolbox which lets you do genetic algorithm optimization with a very simple, point-and-click GUI that has helpful documentation. From what wikipedia says, your problem is just the kind to solve with a GA.
If you don't have access to the toolbox, you should be able to find genetic algorithm libraries for java, or worst comes to worst you can write your own. It won't be as extensive and it will take some work, but it shouldn't be terribly hard to make a simple one.

Automated method of verifying backlinks / URLs?

Does anyone have suggestions on automated ways to verify that backlinks are valid? I realize there are many criteria for determining this so I am open to all sorts of suggestions.
A few example criteria would be backlinks coming from specific domains, hosts, etc. but what about criteria that is not so easy to determine such as age of the link, subject matter of the site where the link originates, etc.
P.S., Although the above is a general question, I'm specifically looking for how to do this in Java.
I would suggest you ask the generic question on Programmers because determining what is a "good" backlink is not specific to any language.
If you have the criteria, try implementing them for yourself first and then ask a specific question if you don't come along.
The java.net.URL Class handles addresses well you can get the domain and other stuff nicely from there.

Categories