Archive

Posts Tagged ‘int’

Php Functionality Gd Lib Optical Character Recognition

September 13th, 2011 Comments off

I need a php class with the next functionality:

The class should be able to get these parameters (by POST) for imagecopy GD lib’s function (resource $dst_im , resource $src_im , int $dst_x , int $dst_y , int $src_x , int $src_y , int $src_w , int $src_h) and a parameter with URL for imagegrabscreen – GD lib’s function.
After that the class should use “Optical character recognition” class (for example the free Andrey Kucherenko’s php OCR class. http://www.phpclasses.org/package/2874-PHP-Recognize-text-objects-in-graphical-images.html) and regular expressions in order to get the needed strings The output data will be stored in the mysql db. I will provide the structure of the db.

Categories: OCR, PHP Tags: , , , , , ,

Modules Of A Php+mssql Webpage 2

June 30th, 2011 Comments off

We will write the plain PHP version of one of our executable PC software. The database is MSSQL. This is a big software, so we will go step by step. In this very first step we need only 3 pages;

1. The login page.
2. The CHECKS control page.

The database structure is below. We need a detailed search/list option (we need to add criteria for at least 14-15 fields)

User will be able to add and edit data.

3. The CASH_PAYMENTS control page

Completely same designed as CHECKS control page, and the db structure is below.

Both tables are linked to another tables but you dont need to edit any other table for this moment.

All the database and hosting information will be delivered to you. The database is ready, you dont need to create or add data to start. The graphical design will be also delivered as JPG files. (graphical design is very very simple, while to functionnality is more important)

While this will be a modular software (some part will be written by ourselves), some more details needed;

1. There will be a “user_info” table and all the table fields order and column widths will be read from there. It means that you will read the columns orders and widths from the database.

2. You need to use some already defined functions for
OpenConn() : Open Connection
CloseConn() : Close Connection
ms_exec(): mssql_query for executing SQL statements.

3. The most important thing is that, in the list panel, you need to read data with ajax.load, so we can cancel the search criteria and update/change it. It means that we will always have 2 divs; one to search, second to list. The edit/update/addnew windows would be popup windows, as usual.

4. The page should run correctly on different PC browsers as IE, Firefox and Chrome.

5. This is the start of the project, so the code need to be clean, and “readable”, because we will add more modules using the same CSS and functions.

CREATE TABLE [dbo].[CHECKS](
[CHECK_ID] [int] NOT NULL,
[BOOK_NO_YEAR] [int] NULL,
[BOOK_NO_MONTH] [int] NULL,
[BOOK_NO_ID] [int] NULL,
[CHECK_TYPE_NO] [int] NULL,
[DATE_OF_GET] [smalldatetime] NULL,
[CUSTOMER_NO] [int] NULL,
[KESIDE] [nvarchar](50) NULL,
[CHECK_NO] [nvarchar](50) NULL,
[BANK] [nvarchar](50) NULL,
[BRANCH] [nvarchar](50) NULL,
[ACCOUNT] [nvarchar](50) NULL,
[DATE_INFO] [smalldatetime] NULL,
[DATE_OF_COLLECT] [smalldatetime] NULL,
[AMOUNT] [float] NULL,
[PRICE_UNIT_NO] [int] NULL,
[MAIN_AMOUNT] [float] NULL,
[SPECIAL_RATE] [float] NULL,
[ENDORSEMENT] [nvarchar](50) NULL,
[CHECK_STATUS_NO] [int] NULL,
[CLEARED] [int] NULL,
[TRANSFERRED_CUSTOMER_NO] [int] NULL,
[TRANSFERRED_LOC] [nvarchar](100) NULL,
[PROTESTED_CHECK] [int] NULL,
[TRANSFERRED_DATE] [smalldatetime] NULL,
[NOTES] [nvarchar](4000) NULL,
[VERGI_NO] [nvarchar](50) NULL

CREATE TABLE [dbo].[CASH_PAYMENTS](
[CASH_PAYMENT_ID] [int] NULL,
[DATE_INFO] [smalldatetime] NULL,
[CUSTOMER_NO] [int] NULL,
[AMOUNT] [float] NULL,
[MAIN_AMOUNT] [float] NULL,
[SPECIAL_RATE] [float] NULL,
[PRICE_UNIT_NO] [int] NULL,
[CLEARED] [int] NULL,
[PROTESTED_CHECK] [int] NULL,
[NOTES] [nvarchar](4000) NULL
) ON [PRIMARY]
GO

Php Graphics Manipulation – Follow Up

June 27th, 2011 Comments off

Summary:
Since this can require multiple clicks and renders on each layer, I am thinking the most efficient way would be through flash. Feel free to make other suggestions if suitable and please mention the word cartoon in your quote.

An image is built up through the user selecting various items (see attached layout) and uploading a photo of their face which shows through a blank area in the layers (they are transparent png files).

In the example attached, the user would first upload their image (this is a preset stage)… then the image on the left would display the first layer which is just the gown & board. Then the user would click on a wig… it would appear in the image… they can keep clicking on wigs until they are happy… then they click next.. then they select from “what are you holding?” etc….

The layers and available items within those layers are database driven (mysql) – details below.

Once the building process is complete – the positional parameters need to be passed to a script we already have for rendering the images.

Details:
Process is as follows (database details are below):
Default to project id 1 unless a parameter is passed to script
Display page as in attached JPG:
The image displayed initially is from project.p_image
The steps on the right… 1) is upload image… then 2) is the first “layer” record… 3) is the second… etc…

So… each image step as follows:
User can click on an thumb in the step
The preview image on the left will show the image up to this point
The user can then click a different icon from the same layer and the preview image will change
EXAMPLE: WIG stage, they can click the red wig… the image on the left shows the red wig, they then click the blue wig, the red wig is replaced in the image by the blue… and so on until they select NEXT or PREVIOUS

Once the user clicks the NEXT button they will proceed to the next step

When a user clicks on a THUMB or the current stage is skipable, the NEXT buttons will appear, otherwise they will disappear or be greyed.
When the user is past step 1, a Previous Step button will appear
If l_allow_skip is true, display the SKIP icon and allow NEXT without selecting/processing an image on that layer

At the last stage – generate the images

Now go to new screen… displaying the result image on the left (can make it a little bigger than the working image)
Display download link (for low res image)
Display email this to your friends box… with from email / from name / to emails / to names

OTHER NOTES
————–
CONVERT CODE TO USE IMAGE MAGIK or whatever it was called!

Your page will have CSS or include files so I can easily include header and footer HTML (sidebar will be in same include as footer).
Note… the step is only displayed where interaction is required.. so for example, if there is only 1 layer_image record and l_skip_allowed=false, just add the layer at the correct sequence without interaction (bear in mind that back will have to go back to the previous interactive step).
The current step is highlighted so it is clear which step the user is on.
Please add a configuration variable [render_at_each_stage]… if set… you should render down to a flat image after each NEXT button… I think we will probably need this for performance. Obviously BACK will be simpler if you retain the layers… but will be memory intensive so…
Add special admin option which allows user positioning of every layer and stores the X/Y co-ords in l_pos_x/y
(Graphics in /images folder at replacetheface.co.uk)

DATABASE SCHEMA
—————-
layer:
`l_id` int(13) [unique id]
`p_id` int(13) [link to project]
`l_seq` int(4) [display and process the layers in this order]
`l_name` varchar(128) [unused]
`l_prompt` varchar(255) [Displays as box heading]
`l_type` enum ‘image’ -> [use layer_image table for list of images for this layer],’text’ -> [simple text layer],’upload’-> manipulate uploaded face image here – I think its probably better to upload the image first… and just resize/move it at this step
`l_pos_type` enum ‘user’ -> [place at l_pos_x/y and user can move this] ‘preset’ -> [ place at l_pos_x/y and user may not move ]
`l_pos_x` int(9)
`l_pos_y` int(9)
`l_allow_skip` smallint(1) [if true display SKIP icon and allow user to skip this layer]

layer_image:
`li_id` int(13) [unique id]
`l_id` int(13) [link to layer]
`li_seq` int(5) [display image icons in this order]
`li_thumb` varchar(64) [this is the thumb image to display]
`li_image` varchar(64) [the actual image which is used for building the result]

project:
`p_id` int(13) [unique id]
`p_name` varchar(128)
`p_thumb` varchar(64)
`p_image` varchar(64) [This is the image you should display before the user clicks on the first layer]
`p_edit_percent` int(3) [Use this as the percent size you will display the image when editing]

Modules Of A Php+mssql Webpage

June 20th, 2011 Comments off

We will write the plain PHP version of one of our executable PC software. The database is MSSQL. This is a big software, so we will go step by step. In this very first step we need only 3 pages;

1. The login page.
2. The CHECKS control page.

The database structure is below. We need a detailed search/list option (we need to add criteria for at least 14-15 fields)

User will be able to add and edit data.

3. The CASH_PAYMENTS control page

Completely same designed as CHECKS control page, and the db structure is below.

Both tables are linked to another tables but you dont need to edit any other table for this moment.

All the database and hosting information will be delivered to you. The database is ready, you dont need to create or add data to start. The graphical design will be also delivered as JPG files. (graphical design is very very simple, while to functionnality is more important)

While this will be a modular software (some part will be written by ourselves), some more details needed;

1. There will be a “user_info” table and all the table fields order and column widths will be read from there. It means that you will read the columns orders and widths from the database.

2. You need to use some already defined functions for
OpenConn() : Open Connection
CloseConn() : Close Connection
ms_exec(): mssql_query for executing SQL statements.

3. The most important thing is that, in the list panel, you need to read data with ajax.load, so we can cancel the search criteria and update/change it. It means that we will always have 2 divs; one to search, second to list. The edit/update/addnew windows would be popup windows, as usual.

4. The page should run correctly on different PC browsers as IE, Firefox and Chrome.

5. This is the start of the project, so the code need to be clean, and “readable”, because we will add more modules using the same CSS and functions.

CREATE TABLE [dbo].[CHECKS](
[CHECK_ID] [int] NOT NULL,
[BOOK_NO_YEAR] [int] NULL,
[BOOK_NO_MONTH] [int] NULL,
[BOOK_NO_ID] [int] NULL,
[CHECK_TYPE_NO] [int] NULL,
[DATE_OF_GET] [smalldatetime] NULL,
[CUSTOMER_NO] [int] NULL,
[KESIDE] [nvarchar](50) NULL,
[CHECK_NO] [nvarchar](50) NULL,
[BANK] [nvarchar](50) NULL,
[BRANCH] [nvarchar](50) NULL,
[ACCOUNT] [nvarchar](50) NULL,
[DATE_INFO] [smalldatetime] NULL,
[DATE_OF_COLLECT] [smalldatetime] NULL,
[AMOUNT] [float] NULL,
[PRICE_UNIT_NO] [int] NULL,
[MAIN_AMOUNT] [float] NULL,
[SPECIAL_RATE] [float] NULL,
[ENDORSEMENT] [nvarchar](50) NULL,
[CHECK_STATUS_NO] [int] NULL,
[CLEARED] [int] NULL,
[TRANSFERRED_CUSTOMER_NO] [int] NULL,
[TRANSFERRED_LOC] [nvarchar](100) NULL,
[PROTESTED_CHECK] [int] NULL,
[TRANSFERRED_DATE] [smalldatetime] NULL,
[NOTES] [nvarchar](4000) NULL,
[VERGI_NO] [nvarchar](50) NULL

CREATE TABLE [dbo].[CASH_PAYMENTS](
[CASH_PAYMENT_ID] [int] NULL,
[DATE_INFO] [smalldatetime] NULL,
[CUSTOMER_NO] [int] NULL,
[AMOUNT] [float] NULL,
[MAIN_AMOUNT] [float] NULL,
[SPECIAL_RATE] [float] NULL,
[PRICE_UNIT_NO] [int] NULL,
[CLEARED] [int] NULL,
[PROTESTED_CHECK] [int] NULL,
[NOTES] [nvarchar](4000) NULL
) ON [PRIMARY]
GO

The Racingdata Class

June 4th, 2011 Comments off

Almost done. just need to add last few things. would like it to print in nice neat columns.

1. Create a new project, which consists of one class: the RacingData class.
2. The class should have data members that are used to represent the name of the player, the score achieved, and the time (in both minutes and seconds) taken to achieve this score. The functions in the class should perform the following:

set the name, score, and time
return this same data
print this data
3. Add a default constructor and a constructor with parameters.

1. The class should have an additional function that overloads the + operator, such that when used to add two objects, it will add the scores of each object as well as the time to achieve these scores. It will not check that the names are the same. The result of adding two RacingData objects together should be another RacingData object with combined data. Write the complete implementation for this function.

1. Construct a main method so that it can test the class. This is to be done by creating six objects that are to represent two players, each playing three games.

2. Using the OVERLOADED + OPERATOR, find the average score and time for each player, and print out which performer had the lowest total time and which performer had the highest total score.

#include <iostream>
#include <string>

using namespace std;

int patrickAvg;
int gordonAvg;
int partickTotal;
int gordonTotal;
void racerAverages(int minutes, int seconds, int seconds_sum, int minutes_avg, int seconds_avg);

class RacingData
{
public:
RacingData(string,int,int,int); //constructor with parameters
RacingData(); // default constructor
RacingData operator+(const RacingData& a); // overloaded operator +
void printRacingData(); //displays race results
int score, minutes, seconds;
string racerName;
};

RacingData::RacingData()
{
racerName = ” “;
score = 0;//sets score to 0
minutes = 0;//sets minutes to 0
seconds = 0;//sets seconds to 0

}

RacingData RacingData::operator+(const RacingData& a)//Operator + for the class RacingData
{
RacingData res = RacingData();

if (racerName == a.racerName)// copy name but only if both names are identical
{
res.racerName = racerName;
}

res.score = score + a.score; // add up all data
res.minutes = minutes + a.minutes; // add up all data

if (seconds == 0)
{
res.seconds = seconds + a.seconds;
cout << “0″ << endl;
}

if (res.seconds >= 60)//seconds can not be more than 60
{
res.minutes += res.seconds / 60;
res.seconds = res.seconds % 60;

}

return res;
}

RacingData::RacingData(string new_racerName, int new_score, int new_minutes, int new_seconds)
{
racerName = new_racerName;
score = new_score;
minutes = new_minutes;
seconds = new_seconds;
}

void RacingData::printRacingData()
{
cout << racerName << ” ” << score << ” ” << minutes << “:” << seconds << “n”;
}

void racerAverages(int minutes, int seconds, int seconds_sum, int minutes_avg, int seconds_avg)//averages racers time
{
seconds_sum = minutes * 60 + seconds;
minutes_avg = seconds_avg / 60;
seconds_avg = seconds_sum / 3 % 60;

}

int main()
{
RacingData patrickRace1(“Danica Patrick”, 185, 11, 20);//preset data for racers with score, minuts and seconds entered
RacingData patrickRace2(“Danica Patrick”, 103, 11, 30);//preset data for racers with score, minuts and seconds entered
RacingData patrickRace3(“Danica Patrick “, 73, 12 ,40);//preset data for racers with score, minuts and seconds entered
RacingData gordonRace1(“Jeff Gordon “, 155, 10, 10);//preset data for racers with score, minuts and seconds entered
RacingData gordonRace2(“Jeff Gordon “, 127, 11, 15);//preset data for racers with score, minuts and seconds entered
RacingData gordonRace3(“Jeff Gordon “, 34, 12, 35);//preset data for racers with score, minuts and seconds entered

cout << “Race Results Score: Time:n”;
cout << ‘n’;
patrickRace1.printRacingData();//prints Patrick race 1

patrickRace2.printRacingData();//prints Patrick race 2

patrickRace3.printRacingData();//prints Patrick race 3
cout << ‘n’;
gordonRace1.printRacingData();//prints Gordon race 1

gordonRace2.printRacingData();//prints Gordon race 2

gordonRace3.printRacingData();//prints Gordon race 3
cout << ‘n’;

cout << “Total Scores: Score: Time: n”;
cout << ‘n’;
RacingData patrickTotal = patrickRace1 + patrickRace2 + patrickRace3;//adds Patrick races 1-3 for total
RacingData gordonTotal = gordonRace1 + gordonRace2 + gordonRace3;//adds Gordon races 1-3 for total
cout << “Danica Patrick”, patrickTotal.printRacingData();//prints Patrick totals
cout << “Jeff Gordon “, gordonTotal.printRacingData();//prints Gordon totals

return 0;
}

Categories: C/C++ Tags: , , , , , ,

An Event Class With Time And Date Objects

May 21st, 2011 Comments off

I need this by sunday 5/22/11 at noon if possible.

1. Create a project which consists of three classes: an Event class, a Time class, and a Date class.
2. The Event class should have data members that are objects of the Time and Date class.

STEP 2: the Event and Time Classes

1. the code for the Event and Time classes should include all necessary function and constructor implementation code.

STEP 3: Design a Date Class

1. Design a Date class that has three data members to represent the year, month, and day.
2. Date-class member functions should be able to

set the date,
return the date,
print the date, and
add a default constructor and a constructor with parameters.
STEP 4: Construct Main Method

1. Construct the main method so that it can test the member functions of each of the classes by creating an Event object and then performing the necessary operations to test all possible behavior.

This is what i have so far.

#include <iostream>
#include <string>

using namespace std;

class Time
{
//this is a simple time class to demonstrate the use of one
//object within another class (composition)

public:
void setTime(int, int);
void getTime(int&, int&);
void printTime() const;
void incrementMin();
void incrementHrs();
Time(int, int); // constructor with parameters
Time(); // the default constructor

private:
int hour;
int minute;
};

class Event
{
publilc:
void setEventData(string eventName, int hour, int minute, int month, int day, int year);
// this is the prototype of the function to set the data for
// the event
void printEventData() const;
Event(string eventName = 1, int day = 1, int year = 1900);
// Constructor

private:
string eventName;
Time eventTime; // the event object is composed of a time object
dateType eventDay //and a date object

};

Categories: Programming Tags: , , , , , ,

Dll Export Info

May 14th, 2011 Comments off

Hi,

I wish to know the variables output from a DLL File… I do not need the source code or the DLL decompiled, I just need to know the output of the following;
int ValueGet00(int a0, int a1, int a2, int a3, int a4, string a5);
int ValueGet01(int a0, int a1, int a2, int a3, int a4);
int ValueGetSet(int a0, int a1, int a2, int a3);

I will provide the DLL upon acceptance of bid.

Paypal Int. 4

February 17th, 2010 Comments off

Hello,

I need to integrate paypal payments pro into my website using the paypal apis. Should be fairly simple if you are familiar with paypal.

The site charges users a monthly fee for access. It is like how salesforce.com works

Categories: Programming Tags: , ,

Paypal Int. 3

January 13th, 2010 Comments off

Hello,

I need to integrate paypal payments pro into my website using the paypal apis. Should be fairly simple if you are familiar with paypal. It should accept paypal as well as credit card payments through my website.

will be the same of this project http://www.scriptlance.com/projects/1260316479.shtml

but that project I did 3 sites, for this project I only need one done.

Categories: Programming Tags: , , ,

Paypal Int. 3

January 11th, 2010 Comments off

Hello,

I need to integrate paypal payments pro into my website using the paypal apis. Should be fairly simple if you are familiar with paypal. It should accept paypal as well as credit card payments through my website.

will be the same of this project http://www.scriptlance.com/projects/1260316479.shtml

but that project I did 3 sites, for this project I only need one done.

Categories: Programming Tags: , , ,

Paypal Int. 2

January 11th, 2010 Comments off

Hello,

I need to integrate paypal payments pro into my website using the paypal apis. Should be fairly simple if you are familiar with paypal. It should accept paypal as well as credit card payments through my website.

will be the same of this project http://www.scriptlance.com/projects/1260316479.shtml

but that project I did 3 sites, for this project I only need one done.

Categories: Programming Tags: , , ,

Paypal Int.

January 6th, 2010 Comments off

Hello,

I need to integrate paypal payments pro into my website using the paypal apis. Should be fairly simple if you are familiar with paypal. It should accept paypal as well as credit card payments through my website.

will be the same of this project http://www.scriptlance.com/projects/1260316479.shtml

but that project I did 3 sites, for this project I only need one done.

Categories: Programming Tags: , , ,

Java Program: Simple File Sort

December 8th, 2009 Comments off

Overview
An input file will be provided. The application should generate the appropriate output in a new file(s). Please create is as project that I can load into eclipse.

Please provide me with an executable. After testing from my end, payment will be made for source code.

Input file
Type: CSV
Format: Field 1, Field 2, Field 3, Field 4
Int. int, string, int

Field 1 can be anywhere between 1 and 10 digits. If is greater than 10 digits, display error and quit.
Field two will be 11 digits. Run check to see that it is exactly 11 digits, otherwise, display error and quit.

Output
File name will be a Field 3

Categories: Java Tags: , , , , , ,

C++ Api Hook Project

December 5th, 2009 Comments off

Hi!
I need help for my programmer in my company.
He work on Library.dll. It is a pure C++ hook library for Windows, which using easyhook.codeplex.com library for monitoring websites history.
That need:
1. Download easyhook
2. Create pure C++ win32 library project in Visual C++ 2008.
3. Create 2 export functions:

def file:
LIBRARY “Library”
EXPORTS
Start
Stop

Library.h:
#ifdef LIBRARY_EXPORTS
#define LIBRARY_API __declspec(dllexport)
#else
#define LIBRARY_API __declspec(dllimport)
#endif

LIBRARY_API int Start(void);
LIBRARY_API int Stop(void);

Library.cpp:
extern HINSTANCE hInstance;

#pragma data_seg(“Shared”)
HHOOK g_hHook = NULL;
#pragma data_seg()
#pragma comment(linker, “/section:Shared,rws”)

static
LRESULT
CALLBACK
HookProc(
int nCode,
WPARAM wParam,
LPARAM lParam
)
{
return CallNextHookEx(g_hHook, nCode, wParam, lParam);
}

LIBRARY_API int Start(void)
{
PleaseStop = FALSE;
g_hHook = SetWindowsHookEx(WH_GETMESSAGE, HookProc, hInstance, 0);

if (g_hHook == 0)
return GetLastError();

return 0;
}

LIBRARY_API int Stop(void)
{
if (!UnhookWindowsHookEx(g_hHook))
{
Sleep(1000);
if (!UnhookWindowsHookEx(g_hHook))
{
Sleep(1000);
UnhookWindowsHookEx(g_hHook);
}
}

PleaseStop = TRUE;
return 0;
}

3. Add 3 API loging functions with easyhook help:

// ExtTextOutW
DWORD ACLEntriesTimedExtTextOutW[1] = { (DWORD)-1 };
HOOK_TRACE_INFO g_hTimedExtTextOutWHook = {NULL};
BOOL WINAPI TimedExtTextOutW( __in HDC hdc, __in int x, __in int y, __in UINT options, __in_opt CONST RECT * lprect, __in_ecount(c) LPCWSTR lpString, __in UINT c, __in_ecount_opt(c) CONST INT * lpDx)
{
///store all text in log file
//…
return ExtTextOutW(hdc, x, y, options, lprect, lpString, c, lpDx);
}

// TextOutW
DWORD ACLEntriesTimedTextOutW[1] = { (DWORD)-1 };
HOOK_TRACE_INFO g_hTimedTextOutWHook = {NULL};
BOOL WINAPI TimedTextOutW( __in HDC hdc, __in int x, __in int y, __in_ecount(c) LPCWSTR lpString, __in int c)
{
///store all text in log file
//…
return TextOutW(hdc, x, y, lpString, c);
}

// getaddrinfo
DWORD ACLEntriesTimedgetaddrinfo[1] = { (DWORD)-1 };
HOOK_TRACE_INFO g_hTimedgetaddrinfoHook = {NULL};
INT
WSAAPI
Timedgetaddrinfo(
__in_opt PCSTR pNodeName,
__in_opt PCSTR pServiceName,
__in_opt const ADDRINFOA * pHints,
__deref_out PADDRINFOA * ppResult
)
{
//store all websites to log fil
//
//….
return getaddrinfo(
pNodeName,
pServiceName,
pHints,
ppResult);

}

4. Add initialization with easyhook:
//
// DllMain
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:

//
// for hook
//
hInstance = hModule;
//
// EasyHook
//
if (LhInstallHook(
GetProcAddress(GetModuleHandleW(Gdi32), “ExtTextOutW”),
TimedExtTextOutW,
NULL,
&g_hTimedExtTextOutWHook) != 0)
return FALSE;

if (LhInstallHook( GetProcAddress(GetModuleHandleW(Gdi32), “TextOutW”),
TimedTextOutW,
NULL,
&g_hTimedTextOutWHook) != 0)
return FALSE;

if (LhInstallHook(GetProcAddress(GetModuleHandleW(Ws2_32), “getaddrinfo”), Timedgetaddrinfo, NULL, &g_hTimedgetaddrinfoHook) != 0)
return FALSE;

if (LhSetExclusiveACL(ACLEntriesTimedExtTextOutW, 1, &g_hTimedExtTextOutWHook) != 0)
return FALSE;

if (LhSetExclusiveACL(ACLEntriesTimedTextOutW, 1, &g_hTimedTextOutWHook) != 0)
return FALSE;

if (LhSetExclusiveACL(ACLEntriesTimedgetaddrinfo, 1, &g_hTimedgetaddrinfoHook) != 0)
return FALSE;
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
LhUninstallAllHooks();
LhWaitForPendingRemovals();
break;
}
return TRUE;
}

5. Compile for me dll. So, run this dll:
“rundll32.exe Library.dll Start”

6. I need all text which is draw in web page of Internet Explorer window. I need all web servers, which is typed in adress line of Internet Explorer (history). All data need store in txt file. For expample in C:log.txt

7. This difficalt for my programmers: I need like getaddrinfo logging for Mozilla Firefox last version with easyhook help.

8. This difficalt for my programmers: I need Like ExtTextOut and TextOut logging for another browsers. For Mozilla Firefox, Google Chrome, Opera last versions.

So I need:
pure C++ dll project without .NET framework, You can use ATL;
all web servers logging for Mozilla Firefox;
all web pages text logging for 4 browsers;
with easyhook help.

please setup 2 price (for 7 and for 8 sections).
thanks

Categories: C/C++ Tags: , , , , , ,

Syntax Analyzer-parser / Java

November 30th, 2009 Comments off

Dear Java coder,

This is a practical work from university. In a few words, I need a simple/primitive syntax analyzer and parser.

In detail:

I have a Lexical analyzer (scanner) already coded (!) that reads a file with a custom syntax written (accordingly to the BNF that is written too!). It simply understands what symbols like

Categories: Java Tags: , , , , , ,

Emailing WordPress Plugin

October 31st, 2009 Comments off

This will be an evolving project will develop into a larger plugin.

At present this is the first part of the project to develop a php script that will take data from a form created with the cform plugin… using the “Send form data to an alternative page” option. Process the data as follow.

The form in cforms will have the following fields – Name, Email Address, postcode and hidden fields of county,supplier types, success-url.

The script will take these details a create an email to the email address with details of suppliers of a particular type from the specified county. It also redirects to the success-url or displays an error.

There is no requirement for database entry. The database will be created with mysqladmin initially.

The databases will be as follows

County – id (unique int), countyname (text)

SupplierType – id (unique int), SupplierType(text)

Suppliers – id (unique int), County (linked to county id), SupplierType (int linked to SupplierType, CompanyName (text), ContactName(text), Telephone(text), Address1 (text), Address 2 (text), Address 3 (text), area(text),postcode(text), email(text), website(text).

Website Clone W/ Joomla Int.

October 28th, 2009 Comments off

I would like to create a clone of the functionality on the attached website: http://www.21-15-9.com

It should be a very simple feat. Please create an account and fully investigate the system.

We have a joomla website and I would like for this to integrate with the USER table at the very least. If possible, I would like to integrate it fully into the site.

We are using Joomla with Jomsocial as the community piece.

This site SHOULD be fairly simple to build if the approved developer goes through the existing site carefully and UNDERSTANDS what we are after here. It is basically a BLOG with specific forms instead of blank entries.

We want a CLONE of this site integrated into our Joomla site.

This is the fourth attempt at getting a competent developer who understands English and FITNESS well enough to get this right.

Thank you.

Wp Plugin/ Mysql/php Amends

October 2nd, 2009 Comments off

$sSql = “CREATE TABLE `” . $tblOrders . “` (
`id` bigint(20) NOT NULL auto_increment,
`user_id` int(11) unsigned default NULL,
`branch_id` int(11) unsigned default NULL,
`team_id` int(10) unsigned default NULL,
`account_number` varchar(255) default NULL,
`account_name` varchar(255) default NULL,
`invoice_number` varchar(255) default NULL,
`create_time` int(11) default NULL,
`approved` tinyint(1) unsigned NOT NULL default ’0′,
PRIMARY KEY(`id`))”;

$sSql = “CREATE TABLE `” . $tblOrderDetail . “` (
`order_id` bigint(20) unsigned default NULL,
`product_id` int(10) unsigned default NULL,
`quantity` int(11) unsigned NOT NULL default ’0′,
`value` int(11) unsigned NOT NULL default ’0′ )”;

$sSql = “CREATE TABLE `” . $tblProducts . “` (
`id` int(11) unsigned NOT NULL auto_increment,
`cat_id` int(11) unsigned default NULL,
`name` varchar(255) NOT NULL default ”,
`distributer_code` varchar(255) default NULL,
`point` int(11) unsigned NOT NULL default ’0′,
PRIMARY KEY(`id`))”;

We have a php/mysql wordpress plugin which records orders, details of the order based on a list of products. See table definitions below.

I need to add to the plugin the ability to add a code like
[ADDORDER 2]
To a page which does the following.

Note: All the pages with this code on will only be displayed to logged in users. (Hopefully!)
Also the 2 in the shortcode above is a product id from the product table.

1. Check is the user logged in – if not logged in there is nothing to do.
2. do the following meta data
global $wpdb, $current_user;
$userId = $current_user->ID;
$branchId = get_usermeta( $userId, ‘branch_id’ );
$teamId = intval( get_usermeta( $userId, ‘team_id’ ) );

3. Get product id from code (2 in the example)

4. Check if there is already an order with this product in the order details. If so then nothing to do.

5. Create an order with account number 999999, account name ‘Bonus’, invoice_number 999999 time now and approved 1

6. create the order details for this order using the product id, quantity of 1 and value 1

You need to use wpdb-> wordpress php code. There is plenty of example code in the plugin.

I will give you FTP access to the wordpress blog and a wordpress admin login

Simple enough WordPress php/mysql change.

Sc++ Array Programming Project

August 22nd, 2009 Comments off

purpose of the program is to allow users to input a list of positive numbers into an array, find the average of the numbers in the array and output the results.

void inputmod (int values [], int &count)

{
count = 0;
do
cout << endl <<”Enter value ” << count <<
endl << “CTRL Z to stop” << endl << “>> ” ;
while (cin >> values [count++]);
count–;
cout << “INPUT ECHO” << endl << “count = “<< count << endl;
outputmod (values, count);
}

void outputmod (int values [], int count)

{
int i, j;

for (i = 0; i < count; i += 5)
{
for (j = i; ((j < i+5)

Website Cloning + Payment Int.

August 13th, 2009 Comments off

Hello fellow coders

I need this website to be cloned ( with brand new design) and a payment integration thats all.

Its a very very simple concept.

Must done:

Clone 100 % add a whole new look! ( CSS) + Integrate a payment system ( NOT PAYPAL) it’s a creditcard payment system.

You must be proficient with php css.

You must be able to communicate with msn during projects. Excellent english skills required.

here is the page sockrush(dot)com to clone. Since its not a HUGE HUGE work dont go nuts with biddings!!

I will provide a png image for the design ( no PSD) must be designed from png file!

Important:

The completed website with all required Data entry, must be loaded onto my hosting site and shown working without your logo or links, ready for business with all instructions and must be Safe, secure, hacker proof and bugs free. No signature / copyright notice, like made by, coded by , designed or any other signatures on the site is NOT ACCEPTED!!! No signatures at all. and must be open-source! Code will be controlled for bugs etc!

Support Terms:
-Must provide free support bug correction for agreed time from the date of delivery.

Payment 100 % escrow!

Thanks

Website Cloning + Payment Int.

August 12th, 2009 Comments off

Hello fellow coders

I need this website to be cloned ( with brand new design) and a payment integration thats all.

Its a very very simple concept.

Must done:

Clone 100 % add a whole new look! + Integrate a payment system ( NOT PAYPAL) it’s a creditcard payment system.

You must be proficient with php css.

You must be able to communicate with msn during projects. Excellent english skills required.

here is the page sockrush(dot)com to clone. Since its not a HUGE HUGE work dont go nuts with biddings!!

Important:
The completed website with all required Data entry, must be loaded onto my hosting site and shown working without your logo or links, ready for business with all instructions and must be Safe, secure, hacker proof and bugs free. No signature / copyright notice, like made by, coded by , designed or any other signatures on the site is NOT ACCEPTED!!! No signatures at all.

Support Terms:
-Must provide free support bug correction for agreed time from the date of delivery.

Thanks

Swfaddress/deeplinking Int.

August 4th, 2009 Comments off

I have built a website with dynamic page handling and the page name is already dynamically passed to a flash function, so integration should be rather simple. However, no matter what I try, SWFAddress simply doesn’t want to respond or work.

This project shouldn’t take very long for someone with experience with deeplinking in flash. I am a programmer as well, so I am willing to work with you on this. But I need this to get done ASAP.

Amazon Devpay Int. Template

July 25th, 2009 Comments off

[This can be in JAVA or RUBY, but must mix with my PHP]

I’m in a bind and I need just a little coding to get to the next step in my project.

I’m trying to connect with DevPay from Amazon Web Services. If you know about it, cool, if not, here’s their documentation (or what appears to be a good place) for Java:

http://developer.amazonwebservices.com/connect/entry.jspa?externalID=770&categoryID=192

Basically DevPay is a system where customers sign up for online services (hosting etc) using Amazon’s services, controlled by my server & site.

I need the following code that can be easily plug-and-play with my PHP code:

1. “Activation” which basically gets the UserID from Amazon’s servers when a customer signs up.
2. “Upload” files
3. “Download” files (both viewable on a browser and for download, but I think it’s one in the same)
4. “Delete” files

All in all it’s actually REALLY easy, but I jsut don’t know the first thing about Java. The code should provide the UserID as a variable I can use in PHP, and should also include a method of getting PHP variables into the java code.

Please let me know in your response/bid if you’ve worked with Amazon Web Services before. [PS - I really hate getting canned bids from companies telling me they can do this and that and then asking what the project is about. I prefer to hire a SINGLE PROGRAMMER.]

Employee

July 24th, 2009 Comments off

Write a class Employee with the following specifications:

Fields:

Name – Name of employee
Id – Employee id
Salary – Employee salary
Age – Employee age
Position – Employee title

Methods:

1. getFedTax() – Returns (int) federal tax withheld. Computed as follows:
multiply (salary – 800) by 17%.
2. getSsTax(rate) – returns (int) social security tax withheld, rate% of salary;
rate is int.
3. getHealthFee(rate) – returns(int) health coverage employee contribution,
rate% of salary; rate is int.
4. getInsurance() – returns (int) employee contribution for insurance coverage.
Amount of deduction is computed as follows:
If the employee is under 40 rate is 3% of salary, if the employee is between
40 and 50 rate is 4% of salary, and if the employee is between 50 and 60
rate is 5% of salary. If the employee is above 60 the rate is 6% of salary.
5. getNetPay() -returns (double) the net pay for the employee after deducting
from salary, the deductions: ss(1), health(3), fed_tax() and insurance.

Write an appropriate main class with a main() method to create two employee objects,
and print information.

Movie

July 24th, 2009 Comments off

A class, Movie has the following features:

Fields:

String title;
String kind; // Drama, comedy, family, ..
String actor;
String actress;
int ticketPrice;

Methods:

void display()
Displays all field values- title, kind, actor and actress.

int totalTicketPrice(int num)
Computes the total ticket price for num, tickets.

The Movie class has already been written, compiled, and put into the fileMovie.class, download the file to your machine and save it to a folder in the classpath. Write a MovieMain class and create an object of the Movie class. Use the methods to
print results. Give your own values. Don’t write your own Movie class, you must use the given Movie class

Amazon Devpay Int. Template

July 9th, 2009 Comments off

I would like to implement future projects using Amazon DevPay, but need an easy-to-reuse template built in PHP to connect with DevPay.

Two steps:

1. Customer signup on DevPay, which transmits customer data (including unique ID) to my server. I would like code that is easily used in many situations that would allow me to use the data sent in a DB for customer ID.

2. Connecting to DevPay using customer information to properly charge customers for their files. Upload, Download & Delete functions required. Code that I can embed in my current scripts is what I need.

I currently use Amazon S3, and DevPay is very similar but requires a few extra steps, of which there is no PHP documentation, although they say it can be done using PHP.

Again, I’m not looking for a “finished product”, but rather snippets of code that can be universally used in multiple projects, simply for connecting and using DevPay.

Mov To 3gp Converter In Ffmpeg

July 7th, 2009 Comments off

We need some c code written to convert a .mov video file to a .3gp video file using h263 or h264 codec. The code must be written in c (not c++) and can link to the LGPL ffmpeg libraries (not the GPL licensed libraries). The code must include one function:

int convertFile(char *inputPath, char *outputPath,int width, int height, long bitrate);

inputPath is the path to the input .mov file. outputPath is the path to the output .3gp file. Width and height are the pixel dimensions of the output .3gp file while bitrate is the bitrate of the output file. The function will return 0 if no error or non-zero if error. The width and height parameters must be able to support custom dimensions such as 480×320(landscape), 320×480(portrait), 240×160, 160×240, 120×80, 80×120, etc without rotating the image. While supporting these custom dimension, the video must fill the entire frame without letterboxing. Sample .mov files can be obtainted at http://public.me.com/tipirneni

The project should be delivered as either an xcode or visual c++ project.

Viruemart Customization

June 17th, 2009 Comments off

Sheet music and CD store implementation in VirtueMart

General description:
Customize Virtuemart to sell sheet music and CD’s.

The process will be done in several steps, and the first step is described here. If you do a good job on the first step you will get the next ones.

The first step is to add support for names and roles connected to products.

When you sell sheet music and CD’s the customers need to be able to search for people connected to the products. Artists, composers, arrangers etc. A typical store that utilizes this is Amazone.com.

Database modifications:
We need two new tables: vm_roles and vm_prod_roles.

The People table
Since VirtueMart already have a people-table with relevant fields I’d like to use that unless the programmer can come up with a good argument to use a separate table. Relevant VirtueMart table is vm_user_info.
Only one field must be added: roles YES or NO. Only people with YES here shows up in the product-people list.

The Role Table
Contains info about the possible roles that a person can have in a product.
Table name: vm_roles
Field name Type Comment
role_id Int(11) Auto_increment Unique nr
role_type Text 255 composer, arranger, artist etc
role_short Text 10 Abbr to be used in lists (Ex Comp for composer, Arr for arranger etc)
role_sort_order int Sort order in lists
Role_placement Text Where should the text appear in layout and whether to display Last name, First Name, or Company fields

The People/Product/Role Table
One person can have multiple roles in a product (For example he can be both composer AND artist on the same CD). We need a table to define his role(s) in the specific product.
Table name: vm_prod_roles
Field name Type Comment
prod_role_id Int(11) Auto_increment Unique nr
product_id Int(11) Linked to product
user_id Int(11) Linked to user
role_id Int(11) Linked to role

Modifications to layout
Shop side
1. Include results from the people database in the free text search. Search the first and last name.
2. Include product categories in search.
3. Create two new Browse pages with and without product thumbnails. See attached file for details.
4. Ajax drilldown search system on top of the product listing. See attached file for details.
5. Allow the roles to be visible on all lists in the store through out the check out system, invoices etc. This is to identify products with similar names but different arrangers etc.

6. Add the roles to the

Collection Classes

June 14th, 2009 Comments off

I am looking for help with an Assignment I am working on. Let me know if you can help.

Problem Description:

Create a DOS console application that keeps track of a list of names. Your program should be able to add a name, remove a name at the current position, to concatenate two name lists, to retrieve a name from the list, and to print out the whole list of names in the list.

Implementation requirement:

You are going to use two classes to implement this assignment: TestStringArraySeq, StringArraySeq. The TestStringArraySeq is the application driver class and contains the main() method. The StringArraySeq is the worker class. You have to use sequence collection data structure to implement this worker class. The storage data structure for the collection class should be array. In this class, you need to implement the following methods:

StringArraySeq
public StringArraySeq ()
This constructor takes no argument. It initializes the instance variable manyItems to 0; initializes the instance variable currentIndex to 0, and allocates 10 cells for the arrary data.

StringArraySeq
public StringArraySeq (int initialCapacity)
This constructor takes one argument. It first checks to see whether the parameter is positive. If it is negative, the an exception is thrown. It then initializes the instance variable manyItems to 0; initializes the instance variable currentIndex to 0, and allocates initialCapacity number of cells for arrary data.

getManyItems
public int getManyItems ()
This simple method returns the value of instance variable manyItems. Setters and getters are used to enforce information hiding.

setManyItems
public void setManyItems (int m)
This simple method sets the instance variable manyItems to the value passed in.

getCurrentIndex
public int getCurrentIndex ()
This simple method returns the value of instance variable currentIndex.

setCurrentIndex
public void setCurrentIndex (int c)
This simple method sets the instance variable currentIndex to the value passed in.

addAfter
public void addAfter(String element)
addAfter places a new element after the current element. If there is no current element, then the addAfter method places the new element at the end of the sequence. In all cases, when the method finishes, the new element will be the current element.

start
public void start()
this sequence help method sets the current element at the front of the sequence.

isCurrent
public boolean isCurrent()
this is an accessor method used to determine whether this sequence has a current element. It should be called before calling the method getCurrent.

ensureCapacity
public void ensureCapacity(int minimumCapacity)
this help method changes the capacity of the sequence to the minimumCapacity. This method is only needed if the sequence is implemented using array.

toString
public String toString()
This method returns all a String with the names in the sequence class. Each name appears on a separate line.

getCurrent
public String getCurrent()
this is an accessor method used to retrieve the value of current element.

advance
public void advance()
this sequence help method moves forward so that the current element is now the next element in the sequence. Before calling this method, you should call isCurrent() method to make sure that there is a current element. If the current element is the last element, then after calling this method there will be no current element. Otherwise, the new element is the element immediately after the original current element.

removeCurrent
public void removeCurrent()
removeCurrent removes the current element from a sequence. Before invoking this method, you should call isCurrent() to make sure that there is a current element. When this method is called, if the current element is the final element, then after the removal there is no longer a current element; otherwise, the new current element is the one that used to be after the removed element.

concatenation
public static StringArraySeq concatenation(StringArraySeq s1, StringArraySeq s2)
concatenation method creates a new sequence that contains all the elements from the first sequence followed by another. The resulting sequence has no current element. The concatenation is somewhat similar to the union of two bags. This method is implemented with static method. As a general rule, the methods that operate on two collections are usually implemented as static methods. This is because of the reason that static methods are able to handle parameters that are null.

clone
public Object clone()
the clone method returns a copy of this sequence. The return object should have separate memory space. Subsequent changes to the copy will not affect the original, nor vice versa. The return value should be typecast to a StringArraySeq before it is used. Since the current element is not specified, you can set currentIndex of the returned object to any value.

getString
public static String getString(StringArraySeq s, String target)
This method returns the first occurrence of the target string in the sequence class. If there is not such a string, the method returns null. To implement this method, you must use the following methods: start(), isCurrent(), advance(), and getCurrent(). If the target is fund, you should set the currentIndex to the position where the target is; do nothing to the currentIndex otherwise.
Note: you can learn how regular methods use static methods from this.

removeString
public boolean removeString(String target)
This method removes the target string from the sequence class if it exists (first occurrence). The method returns true when the operation is successful and returns false if the operation fails. If the removal is successful, the following element is set to be the current element. If there was no following element, then there is now no current element.
Note: suggest to use getString(), removeCurrent() methods.

You can reference all the methods in the bag collection class and the supplement note 3. Most of the methods of the bag class and of the sequence class are almost identical, but you need to be careful for those that are different.
I suggest you to use the following class instance variables for the sequence class:
data

Categories: Java Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Large Integer

May 31st, 2009 Comments off

The Problem

The unsigned int type in C requires 4 bytes of memory storage. With 4 bytes we can store integers as large as 232-1; but what if we need bigger integers, for example ones having hundreds of digits? If we want to do arithmetic with such very large numbers we cannot simply use the unsigned data type. One way of dealing with this is to use a different storage structure for integers, such as an array of digits. We can represent an integer as an array of digits, where each digit is stored in a different array index. Since the integers are allowed to be as large as we like, a dynamically-sized array will prevent the possibility of overflows in representation. However we need new functions to add, subtract, compare, read and write these very large integers.

Write a program that will manipulate such arbitrarily large integers. Each integer should be represented as an array of digits, where the least significant digit is stored in index 0. Your program should we able to read in a string of digits and create a struct that stores the big integer.

Your program should store each decimal digit (0-9) in a separate array element. In order to perform addition and subtraction more easily, it is better to store the digits in the array in the reverse order. For instance, the value 1234567890 would be stored as:

index 0 1 2 3 4 5 6 7 8 9
array 0 9 8 7 6 5 4 3 2 1

Note: Although this seems counter-intuitive, it makes the code slightly easier, because in all standard mathematical operations, we start with the least significant digits. It also makes sense that the digit at the place 10i is stored in index i.

Your program should include the following functions:

Five Questions Linked List -c

May 26th, 2009 Comments off

1.Write a function last that expects a pointer to the first node in a linked list and returns a pointer to the last node in the linked list or NULL if the list is empty.

2.Write a function append that expects two pointers to the first nodes in two linked lists and returns a pointer to a linked list consisting of the first liked list followed by the second.

3.Write a function reverse that expects a pointer to the first node in a linked list and returns a pointer to a linked list that is the reverse of the original linked list.Do not allocate any new nodes;change pointers.

4.In the program below change the the last node in the linked list points back to the first.You now have a circular linked list.Write a function that prints each node in a circular linked list exactly once,starting at any node in the list.
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;

typedef struct elephant
{
chat name[10];
struct elephant* next;
}
ELEPHANT;
void print_elephants(const ELEPHANT* ptr);
main()
{
ELEPHANT elephant1,elephant2,elephatn3,*start;

strcpy(elephant1.name,”Edna”);
strcpy(elephant2.name,”Elmer”);
strcpy(elephant3.name,”Eloise”);

elephant1.next=&amp;elephant2;
elephant2.next=&amp;elephant3;
elephant3.next=NULL;

start =&amp;elephant1;
print_elephants(start);
return EXIT_SUCCESS;
}
void print_elephants(const ELEPHANT* ptr)
{
int count =1;
printf(“nnn”);
while(ptr!= NULL)
{
printf(“nElephant number %d is %s.”,count++,ptr-&gt; name);
ptr=ptr-&gt;next;
}
}

5.Illustrate how delete_nth_node works for linked list shown below

#include &lt;stdlib.h&gt;
#include “structure.h”
NODE* find_nth_node(NODE* ptr,int n);
NODE* delete_nth_node(NODE* ptr,int n,int* success_flag)
{
NODE *pred,*old;
if(n==1)
{
if(ptr==NULL)
{
*success_flag=0;
return ptr;
}
old=ptr;
ptr=ptr-&gt;next;
}
else
{
pred=find_nth_node(ptr,n-1);
if(pred==NULL || ored-&gt;next ==NULL)
{
*success_flag=0;
return ptr;
}
old=pred-&gt;next;
pred-&gt;next = old -&gt;next;
}
free(old);
*success_flag=1;
return ptr;
}

Small Drag&drop Script For Bg

May 24th, 2009 Comments off

This is a small Script for a new browsergame:

We need a simple php script using jquery or mootools (you choose) for this simple task:

A USER has serveral entrys in as MYSQL DB. Each Entry (Item) has its own picture from a fixed set of Images on a webserver.

MYSQL Table: USER:
USERNAME, USERID

MYSQL Table: ITEMS
ITEMID (Int), PictureFileName (Char 50), TYPE(1-9,Int), SORT (Char4)

Type is a value from 1 to 9
Sort is by default a text (ie. A001, B001, B002 aso.)

MYSQL Table: USER -&gt; USERITEMS (1:N)

ITEM: UserID (-&gt;USER), ID (Int, AutoId), ITEMID (Int,-&gt;ITEMS),

After adding (manually at this step) you need to create a webpage (only functional, div fixed, no background aso.) with 2 lists:

Left list is a fixed list WEAR with 9 slots (free positions).

MYSQL Table: USER -&gt; CHARITEMS

CHARITEMS: USERID (USER), TYPE (9 fixed items), ITEMID (Int, from USERITEMS)

Right list is a list of User ITEMS.

THE MAIN TASK:
The USER will drag from the right list to the left list, dropping only on the proper type slot(1-9). Not droppable on wrong Type!

Ajax request will be fired, then the left list will update without used items in right list, and right list will be filled with the new (dropped) item on the right place(1-9).

You will need to program in PHP, Javascript and MYSQL.

First you create the necessary MYSQL tables and Querys.
Then you create a PHP Script to first display the right list and the left list.
Then you create the Website with jquery or mootools to enable drag &amp; drop.
Then you create a small javascript to update with ajax, after drag &amp; drop with an event.
For Testing use a small set of icons or pictures not greater than 50×50 pixels. You can use any Images.

Delivery the Images, PHP script, MYSQL SQL Code and the .JS Javascript. I’ll be testing the source and then release the payment.

You will be using PHP5, MYSQL5, latest jquery or mootools.

A1equipment Int

May 4th, 2009 Comments off

I need the following done for this company:

1: Oscmax template design and implementation

2: Once you have a template for oscmax I need the same template modified to fit my ebay store and auction listings and implemented

3. Once you have the auction listing template ready I need a Windows based software that will generate the HTML code for eBay auction template.

The theme for this company is commercial cooking equipment for restaurants, supermarkets, and bakery’s.

My sale representatives have no knowledge of HTML this is why I need part 3 done. The software should have individual text boxes for each of the following fields: Title, Model, Weight, Length, Width, Height, Ship From, Description, Sales Rep Name, Sales Rep Phone#, Sales Rep Email. This will be explained in more detail once the winner of this project is announced. All I want my employees to have to do is enter all of this information and then hit a generate button which will render the HTML code that they will then paste into the description of the auction listing. This HTML code will have the template that you created in this project.

I also want the software to be able to load pictures to my server and once it has been uploaded the software should generate the HTML code of its location within the template. This doesn’t have to be done on the spot it can be done once the employee hits generate. The location of the picture in the template and on my server will be determined later.

A1equipment Int Llc

May 4th, 2009 Comments off

I need the following done for this company:

1: Oscmax template design and implementation

2: Once you have a template for oscmax I need the same template modified to fit my ebay store and auction listings and implemented

3. Once you have the auction listing template ready I need a Windows based software that will generate the HTML code for eBay auction template.

The theme for this company is commercial cooking equipment for restaurants, supermarkets, and bakery’s.

My sale representatives have no knowledge of HTML this is why I need part 3 done. The software should have individual text boxes for each of the following fields: Title, Model, Weight, Length, Width, Height, Ship From, Description, Sales Rep Name, Sales Rep Phone#, Sales Rep Email. This will be explained in more detail once the winner of this project is announced. All I want my employees to have to do is enter all of this information and then hit a generate button which will render the HTML code that they will then paste into the description of the auction listing. This HTML code will have the template that you created in this project.

I also want the software to be able to load pictures to my server and once it has been uploaded the software should generate the HTML code of its location within the template. This doesn’t have to be done on the spot it can be done once the employee hits generate. The location of the picture in the template and on my server will be determined later.

Text Messaging Censoring

April 26th, 2009 Comments off

Objective
To give students practice at writing a program using strings.

The Problem
Many people, after a late night, for whatever reason, tend to send emails or text messages that they shouldn

Categories: C/C++ Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

List Structure

April 14th, 2009 Comments off

List structure exercise 1

Categories: C/C++ Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

C# Autologin To Retrieve Gps

April 5th, 2009 Comments off

Summary:
A C# class with a public function that when called, logs into Sprint Family Locator Plans’s website and returns GPS coordinates

for the requested individual.

Requirements:
* Deliverable is a C# class compatible with Visual Studio 2008.
* Public function should look like this:
SFLGPSData SFL.GetGPSData( String LoginPhoneNumber, String Password, String PhoneNumberToLocate, int RetryNum, int RetryPauseSeconds );

String LoginPhoneNumber:
This is the phone number that is to be used as the login name.

String Password:
The password

String PhoneNumberToLocate:
The phone number of the phone to get location information for. After logging in

int RetryNum:
Amount of times that a retry should be attempted if there is a problem

int RetryPauseSeconds:
Amount of seconds to pause before retrying

Return Value:
public class SFLGPSData
{
Double Longitude;
Double Latitude;
String AddressLine1;
String AddressLine2;
String City;
String State;
String Zip;
}

Other Information:
* Sprint Family Locator Login Page:
http://sfl.sprintpcs.com/finder-sprint-family/signIn.htm

* A screenshot is attached illustrating how Sprint Family Locator works after login in and how the required data can be parsed

from the page.

C Lemonade Stand

April 5th, 2009 Comments off

Here is what needs to be done. I have the skeleton code too which i have included right after the instructions. This program must compile in Dev C++ and it needs to be in the format in the instructions.

Objectives
1. Review use of if statements and loops.
2. Learn how to write functions given specifications.
3. Learn how to use pass by reference variables.
4. Learn how to put together a useful program given a skeleton of that program and the
functions and their specifications necessary in the implementation.

Problem: Lemonade Stand
Last summer your friend has a lemonade stand and made lots of money. You want to do the same! You have plenty of time to plan, so you thought you would be pre
pared when summer came around by writing a program to simulate your lemonade stand. The basic idea behind the simulation is as follows:

1) You will simulate 10 days of running the lemonade stand.
2) In the beginning the user gets a $20.00 loan to run the lemonade stand.
3) Before each day, the user gets an opportunity to buy bags of lemons and sugar.
4) At the beginning of each day the user receive a weather report.
5) Based on that, the user is asked to price a cup of lemonade for that day.
6) Then, the days sales are simulated. (Part of this is written for you.)
7) Afterwards, the user is prompted with a status report of how much money they have left and how many bags of lemons and sugar they have left.

What you have to do
A skeleton of the solution for this assignment is posted on WebCourses and the course web page. Please use this skeleton. You must fill in the seven functions that are left for you to fill in, as well as write the remainder of main so the program works as described above. After you write each function, you should test it before moving on. How to do this will be covered in class. Then, write your main, calling the necessary functions from it to achieve the desired functionality. main can work without declaring any new variables than the ones already declared. But, you may declare new ones if you wish.

Perhaps the biggest problem you will have will be not knowing when to make function calls. The goal of having these functions is to make the coding process more manageable. In particular, it is possible that a function might “do” something complicated, but that just really means that function makes calls to other functions that carry out a majority of that work already. In essence, if you write a function A to do a task, then don’t write out the code that also does that task in another function B. Instead call the function A from the body of function B.

References
Textbook: Chapters 9, 10, 11 Notes: Lectures 13, 14, 15, 17

Output Sample
Two full output samples of the program running will be provided on Webcourses and the course web page in the files lemonade.out and lemonade2.out.

Deliverables
You must submit your solution to the problem, lemonade.c, over WebCourses.

Restrictions
Although you may use other compilers, your program must compile and run using DevC++. Please use DevC++ to develop your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include ample comments throughout your code describing the major steps in solving the problem.

Grading Details
Your program will be graded upon the following criteria:

1) Your correctness
2) Your programming style and use of white space. (Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor you could get 10% or 15% deducted from your grade.)
3) Compatibility to DevC++. (If your program does not compile in this environment, you will get a sizable deduction from your grade, likely to be over 50%)

The code Skeleton:

#include &amp;amp;lt;stdio.h&amp;amp;gt;
#include &amp;amp;lt;stdlib.h&amp;amp;gt;
#include &amp;amp;lt;time.h&amp;amp;gt;

// Symbolic constants to be used.

// Prices of bags of sugar and lemon, respectively.
#define PRICE_LEMON 3.50
#define PRICE_SUGAR 2.00

// Fraction of a bag of lemons and sugar used on a single cup of lemonade.
#define LEMON_PER_CUP 0.03
#define SUGAR_PER_CUP 0.04

// The initial loan the user is given to start their lemonade stand.
#define START_MONEY 20.00

// Using symbolic constants for true and false.
#define FALSE 0
#define TRUE 1

void buy_lemons(double *pLemons, double *pMoney);
void buy_sugar(double *pSugar, double *pMoney);
int weather();
int num_cups_sold(int weather, int cost);
void status_report(double cash, double num_lemons, double num_sugar, int day);
int max_sell(double num_lemons, double num_sugar);
int get_cost();
void sell_cups(double *pMoney, double *pLemons, double *pSugar);
void end_message(double money);

int main() {

int num_day, ans;
double money = START_MONEY, num_lemons = 0, num_sugar = 0;

srand(time(0));

printf(“Welcome to the Game of Lemonade!nn”);
printf(“You start the game with $%.2lf and no supplies!n”, START_MONEY);

// Loop through each day. Ask the user if they want to buy lemons. If so,
// carry out the transaction. Then ask them if they want to buy sugar.
// If so, do this transaction as well. Then, let them sell lemonade for
// the day. Finally, print a status report after they’ve sold lemonade
// at the end of the day.
for (num_day = 1; num_day &amp;amp;lt;= 10; num_day++) {

}

// Print out whether or not they have lost money, broke even or gained
// money.

return 0;
}

// Pre-conditions: pLemons and pMoney are pointers to variables that store
// the user’s number of bags of lemons left and amount of
// money left.
// Post-condition: The user is given the opportunity to buy lemons. If
// successful, the number of bags of lemons and the amount
// of money the user has are adjusted accordingly.
//
// What to do in this function: If the user doesn’t have enough money to
// even buy one bag of lemons, tell them so and return. Otherwise, ask
// the user how many bags of lemons they want to buy. If they answer less
// than one, tell them they must get more and reprompt them. If they
// answer more than they can buy, tell them they don’t have that much
// money and reprompt them. Continue prompting them until they answer with
// a valid value. Then process the transaction.

void buy_lemons(double *pLemons, double *pMoney) {

}

// Pre-conditions: pSugar and pMoney are pointers to variables that store
// the user’s number of bags of lemons left and amount of
// money left.
// Post-condition: The user is given the opportunity to buy sugar. If
// successful, the number of bags of sugar and the amount
// of money the user has are adjusted accordingly.
//
// What to do in this function: If the user doesn’t have enough money to
// even buy one bag of sugar, tell them so and return. Otherwise, ask
// the user how many bags of sugar they want to buy. If they answer less
// than one, tell them they must get more and reprompt them. If they
// answer more than they can buy, tell them they don’t have that much
// money and reprompt them. Continue prompting them until they answer with
// a valid value. Then process the transaction.

void buy_sugar(double *pSugar, double *pMoney) {

}

// Pre-condition: None
// Post-condition: The weather report for the day is printed and the
// corresponding weather status in between 1 and 5,
// inclusive, is returned.
int weather() {

// Get the weather status value.
int retval = rand()%5 + 1;

printf(“nHere is today’s weather forecast:n”);

// Print out the appropriate forecast for that status.n”);
if (retval == 1)
printf(“It is cloudy with a high chance of rain.n”);
else if (retval == 2)
printf(“It is partly cloudy and windy.n”);
else if (retval == 3)
printf(“It is partly sunny with low humidity.n”);
else if (retval == 4)
printf(“It is warm and sunny with medium winds.n”);
else
printf(“It’s a perfect beach day. Sunny and hot!n”);

return retval; // Return this status value.
}

// Pre-condition: weather is an integer in between 1 and 5, inclusive,
// standing for the weather status for the day. cost is
// the cost of a cup of lemonade in cents for that day.
// Post-condition: The number of cups of lemonade for that day is returned.
int num_cups_sold(int weather, int cost) {

int optimal_price, max_cups;
double max_income;

// Calculate a maximum revenue for the day.
max_income = 5 + 3*weather;
optimal_price = 15 + 5*weather;
max_income = max_income – fabs(optimal_price – cost)/1.5;

// If it’s lower than 5 dollars, reset it to 5 dollars.
if (max_income &amp;amp;lt; 5)
max_income = 5;

// From this, determine the maximum number of cups that could be sold.
max_cups = (int)(max_income/((double)cost/100));

// Return a random number from 0 to this maximum.
return rand()%(max_cups+1);

}

// Pre-condition: cash is the amount of cash the user has, num_lemons is
// the number of bags of lemons the user has left, num_sugar
// is the number of bags of sugar the user has left, and day
// is which day of the game just finished.
// Post-condition: A status report with the four values passed in is nicely
// displayed for the user.
//
// What to do with this function: This is fairly self-explanatory from the
// pre and post conditions. Look to the sample given in the assignment for
// the format.
void status_report(double cash, double num_lemons, double num_sugar, int day) {

}

// Pre-condition: pMoney, pLemons and pSugar are pointers to the variables
// storing the user’s amount of cash, number of bags of
// lemons and number of bags of sugar.
// Post-condition: A day’s transactions will take place and the amount of
// money, the number of bags of lemons and sugar will be
// adjusted accordingly.
//
// What to do with this function: First prompt the user with the weather
// report. Then, ask the user for how much they want to sell a cup of
// lemonade. Determine the number of cups that actually get sold for the
// day by determining how many cups the user COULD sell based on the
// availability of supplies and how many cups they COULD sell based on the
// weather. Print out how many cups of lemonade they ended up selling.
// Then adjust the amount of money they have, as well as the number of bags
// of lemons and sugar.

void sell_cups(double *pMoney, double *pLemons, double *pSugar) {

}

// Pre-condition: num_lemons is the number of bags of lemons the user has,
// and num_sugar is the number of bags of sugar they have.
// Post-condition: The function returns the maximum number of cups of
// lemonade the user can sell based on available supplies.
//
// What to do with this function: Calculate how many full cups of lemonade
// you can supply with sugar. Do the same calculation for lemons. Then,
// return the smaller of these two values.

int max_sell(double num_lemons, double num_sugar) {

}

// Pre-condition: None.
// Post-condition: Returns the number of cents the user will sell a cup of
// lemonade for, for that day.
//
// What to do with this function: Prompt the user to enter how much they
// want to charge for a cup of lemonade. If they don’t enter a positive
// integer, reprompt them until they do. Then return this value.

int get_cost() {

}

// Pre-condition: money is the amount of money the user has left at the end
// of the 10 days of running their Lemonade Stand.
// Post-condition: The user’s overall loss or profit is printed out.

// What to do with this function: See if what they have left is less than
// what they started with. If so, print out how much the lost. If it’s equal
// just print out a message saying that they broke even. Otherwise, print
// out how much profit they made!

void end_message(double money) {

}

Categories: C/C++ Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Lemonade Stand

April 3rd, 2009 Comments off

Here is what needs to be done. I have the skeleton code too which i have included right after the instructions. This program must compile in Dev C++ and it needs to be in the format in the instructions.

Objectives
1. Review use of if statements and loops.
2. Learn how to write functions given specifications.
3. Learn how to use pass by reference variables.
4. Learn how to put together a useful program given a skeleton of that program and the
functions and their specifications necessary in the implementation.

Problem: Lemonade Stand
Last summer your friend has a lemonade stand and made lots of money. You want to do the same! You have plenty of time to plan, so you thought you would be pre
pared when summer came around by writing a program to simulate your lemonade stand. The basic idea behind the simulation is as follows:

1) You will simulate 10 days of running the lemonade stand.
2) In the beginning the user gets a $20.00 loan to run the lemonade stand.
3) Before each day, the user gets an opportunity to buy bags of lemons and sugar.
4) At the beginning of each day the user receive a weather report.
5) Based on that, the user is asked to price a cup of lemonade for that day.
6) Then, the days sales are simulated. (Part of this is written for you.)
7) Afterwards, the user is prompted with a status report of how much money they have left and how many bags of lemons and sugar they have left.

What you have to do
A skeleton of the solution for this assignment is posted on WebCourses and the course web page. Please use this skeleton. You must fill in the seven functions that are left for you to fill in, as well as write the remainder of main so the program works as described above. After you write each function, you should test it before moving on. How to do this will be covered in class. Then, write your main, calling the necessary functions from it to achieve the desired functionality. main can work without declaring any new variables than the ones already declared. But, you may declare new ones if you wish.

Perhaps the biggest problem you will have will be not knowing when to make function calls. The goal of having these functions is to make the coding process more manageable. In particular, it is possible that a function might “do” something complicated, but that just really means that function makes calls to other functions that carry out a majority of that work already. In essence, if you write a function A to do a task, then don’t write out the code that also does that task in another function B. Instead call the function A from the body of function B.

References
Textbook: Chapters 9, 10, 11 Notes: Lectures 13, 14, 15, 17

Output Sample
Two full output samples of the program running will be provided on Webcourses and the course web page in the files lemonade.out and lemonade2.out.

Deliverables
You must submit your solution to the problem, lemonade.c, over WebCourses.

Restrictions
Although you may use other compilers, your program must compile and run using DevC++. Please use DevC++ to develop your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include ample comments throughout your code describing the major steps in solving the problem.

Grading Details
Your program will be graded upon the following criteria:

1) Your correctness
2) Your programming style and use of white space. (Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor you could get 10% or 15% deducted from your grade.)
3) Compatibility to DevC++. (If your program does not compile in this environment, you will get a sizable deduction from your grade, likely to be over 50%)

The code Skeleton:

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;time.h&gt;

// Symbolic constants to be used.

// Prices of bags of sugar and lemon, respectively.
#define PRICE_LEMON 3.50
#define PRICE_SUGAR 2.00

// Fraction of a bag of lemons and sugar used on a single cup of lemonade.
#define LEMON_PER_CUP 0.03
#define SUGAR_PER_CUP 0.04

// The initial loan the user is given to start their lemonade stand.
#define START_MONEY 20.00

// Using symbolic constants for true and false.
#define FALSE 0
#define TRUE 1

void buy_lemons(double *pLemons, double *pMoney);
void buy_sugar(double *pSugar, double *pMoney);
int weather();
int num_cups_sold(int weather, int cost);
void status_report(double cash, double num_lemons, double num_sugar, int day);
int max_sell(double num_lemons, double num_sugar);
int get_cost();
void sell_cups(double *pMoney, double *pLemons, double *pSugar);
void end_message(double money);

int main() {

int num_day, ans;
double money = START_MONEY, num_lemons = 0, num_sugar = 0;

srand(time(0));

printf(“Welcome to the Game of Lemonade!nn”);
printf(“You start the game with $%.2lf and no supplies!n”, START_MONEY);

// Loop through each day. Ask the user if they want to buy lemons. If so,
// carry out the transaction. Then ask them if they want to buy sugar.
// If so, do this transaction as well. Then, let them sell lemonade for
// the day. Finally, print a status report after they’ve sold lemonade
// at the end of the day.
for (num_day = 1; num_day &lt;= 10; num_day++) {

}

// Print out whether or not they have lost money, broke even or gained
// money.

return 0;
}

// Pre-conditions: pLemons and pMoney are pointers to variables that store
// the user’s number of bags of lemons left and amount of
// money left.
// Post-condition: The user is given the opportunity to buy lemons. If
// successful, the number of bags of lemons and the amount
// of money the user has are adjusted accordingly.
//
// What to do in this function: If the user doesn’t have enough money to
// even buy one bag of lemons, tell them so and return. Otherwise, ask
// the user how many bags of lemons they want to buy. If they answer less
// than one, tell them they must get more and reprompt them. If they
// answer more than they can buy, tell them they don’t have that much
// money and reprompt them. Continue prompting them until they answer with
// a valid value. Then process the transaction.

void buy_lemons(double *pLemons, double *pMoney) {

}

// Pre-conditions: pSugar and pMoney are pointers to variables that store
// the user’s number of bags of lemons left and amount of
// money left.
// Post-condition: The user is given the opportunity to buy sugar. If
// successful, the number of bags of sugar and the amount
// of money the user has are adjusted accordingly.
//
// What to do in this function: If the user doesn’t have enough money to
// even buy one bag of sugar, tell them so and return. Otherwise, ask
// the user how many bags of sugar they want to buy. If they answer less
// than one, tell them they must get more and reprompt them. If they
// answer more than they can buy, tell them they don’t have that much
// money and reprompt them. Continue prompting them until they answer with
// a valid value. Then process the transaction.

void buy_sugar(double *pSugar, double *pMoney) {

}

// Pre-condition: None
// Post-condition: The weather report for the day is printed and the
// corresponding weather status in between 1 and 5,
// inclusive, is returned.
int weather() {

// Get the weather status value.
int retval = rand()%5 + 1;

printf(“nHere is today’s weather forecast:n”);

// Print out the appropriate forecast for that status.n”);
if (retval == 1)
printf(“It is cloudy with a high chance of rain.n”);
else if (retval == 2)
printf(“It is partly cloudy and windy.n”);
else if (retval == 3)
printf(“It is partly sunny with low humidity.n”);
else if (retval == 4)
printf(“It is warm and sunny with medium winds.n”);
else
printf(“It’s a perfect beach day. Sunny and hot!n”);

return retval; // Return this status value.
}

// Pre-condition: weather is an integer in between 1 and 5, inclusive,
// standing for the weather status for the day. cost is
// the cost of a cup of lemonade in cents for that day.
// Post-condition: The number of cups of lemonade for that day is returned.
int num_cups_sold(int weather, int cost) {

int optimal_price, max_cups;
double max_income;

// Calculate a maximum revenue for the day.
max_income = 5 + 3*weather;
optimal_price = 15 + 5*weather;
max_income = max_income – fabs(optimal_price – cost)/1.5;

// If it’s lower than 5 dollars, reset it to 5 dollars.
if (max_income &lt; 5)
max_income = 5;

// From this, determine the maximum number of cups that could be sold.
max_cups = (int)(max_income/((double)cost/100));

// Return a random number from 0 to this maximum.
return rand()%(max_cups+1);

}

// Pre-condition: cash is the amount of cash the user has, num_lemons is
// the number of bags of lemons the user has left, num_sugar
// is the number of bags of sugar the user has left, and day
// is which day of the game just finished.
// Post-condition: A status report with the four values passed in is nicely
// displayed for the user.
//
// What to do with this function: This is fairly self-explanatory from the
// pre and post conditions. Look to the sample given in the assignment for
// the format.
void status_report(double cash, double num_lemons, double num_sugar, int day) {

}

// Pre-condition: pMoney, pLemons and pSugar are pointers to the variables
// storing the user’s amount of cash, number of bags of
// lemons and number of bags of sugar.
// Post-condition: A day’s transactions will take place and the amount of
// money, the number of bags of lemons and sugar will be
// adjusted accordingly.
//
// What to do with this function: First prompt the user with the weather
// report. Then, ask the user for how much they want to sell a cup of
// lemonade. Determine the number of cups that actually get sold for the
// day by determining how many cups the user COULD sell based on the
// availability of supplies and how many cups they COULD sell based on the
// weather. Print out how many cups of lemonade they ended up selling.
// Then adjust the amount of money they have, as well as the number of bags
// of lemons and sugar.

void sell_cups(double *pMoney, double *pLemons, double *pSugar) {

}

// Pre-condition: num_lemons is the number of bags of lemons the user has,
// and num_sugar is the number of bags of sugar they have.
// Post-condition: The function returns the maximum number of cups of
// lemonade the user can sell based on available supplies.
//
// What to do with this function: Calculate how many full cups of lemonade
// you can supply with sugar. Do the same calculation for lemons. Then,
// return the smaller of these two values.

int max_sell(double num_lemons, double num_sugar) {

}

// Pre-condition: None.
// Post-condition: Returns the number of cents the user will sell a cup of
// lemonade for, for that day.
//
// What to do with this function: Prompt the user to enter how much they
// want to charge for a cup of lemonade. If they don’t enter a positive
// integer, reprompt them until they do. Then return this value.

int get_cost() {

}

// Pre-condition: money is the amount of money the user has left at the end
// of the 10 days of running their Lemonade Stand.
// Post-condition: The user’s overall loss or profit is printed out.

// What to do with this function: See if what they have left is less than
// what they started with. If so, print out how much the lost. If it’s equal
// just print out a message saying that they broke even. Otherwise, print
// out how much profit they made!

void end_message(double money) {

}

Categories: C/C++ Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

List Structure

April 3rd, 2009 Comments off

List structure exercise 1

Categories: C/C++ Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Bear