Posts Tagged array

C++ Program Input 10 Positive Numbers In Array Find Average

The overall 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 result.

Specific requirements:

The application shall:

1. Allow users to enter 10 numbers (positive)

2. Store the numbers in an array

3. The data type used to store the numbers should be double or float.

4. Create and use a function to calculate the average of the numbers in the array

5. Output the average

Deliverables:

1. Source code file for the project (dot-cpp).

2. Well-written word document describing:

a) Your overall design, including either a pseudocode or flow chart description.

b) Your test plan, including test data and results

c) Your approach, lessons learned, design strengths, limitations and suggestions for future improvement and

alternative approaches

Format:

Documentation format and length:

The word documentation describing and reflecting on your design and approach should be written using Microsoft Word and be no more than 5 pages in length and no less than 2 pages. The font size should be 12 point. The page margins should be 1 inch. The paragraphs should be with double line spacing. All figures, tables, equations and referenced should be properly labeled and formatted using APA style.

Code format:

Header comment block,
Appropriate comments within the code
Appropriate variable and function names, and
Correct indentation.

Tags: , , , , , , , , , , , , , , , ,

C++ Program Input 10 Positive Numbers In Array Find Average

The overall 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 result.

Specific requirements:

The application shall:

1. Allow users to enter 10 numbers (positive)

2. Store the numbers in an array

3. The data type used to store the numbers should be double or float.

4. Create and use a function to calculate the average of the numbers in the array

5. Output the average

Deliverables:

1. Source code file for the project (dot-cpp).

2. Well-written word document describing:

a) Your overall design, including either a pseudocode or flow chart description.

b) Your test plan, including test data and results

c) Your approach, lessons learned, design strengths, limitations and suggestions for future improvement and

alternative approaches

Format:

Documentation format and length:

The word documentation describing and reflecting on your design and approach should be written using Microsoft Word and be no more than 5 pages in length and no less than 2 pages. The font size should be 12 point. The page margins should be 1 inch. The paragraphs should be with double line spacing. All figures, tables, equations and referenced should be properly labeled and formatted using APA style.

Code format:

Header comment block,
Appropriate comments within the code
Appropriate variable and function names, and
Correct indentation.

Tags: , , , , , , , , , , , , , , , ,

C++ Program Input 10 Positive Numbers In Array Find Average

The overall 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 result.

Specific requirements:

The application shall:

1. Allow users to enter 10 numbers (positive)

2. Store the numbers in an array

3. The data type used to store the numbers should be double or float.

4. Create and use a function to calculate the average of the numbers in the array

5. Output the average

Deliverables:

1. Source code file for the project (dot-cpp).

2. Well-written word document describing:

a) Your overall design, including either a pseudocode or flow chart description.

b) Your test plan, including test data and results

c) Your approach, lessons learned, design strengths, limitations and suggestions for future improvement and

alternative approaches

Format:

Documentation format and length:

The word documentation describing and reflecting on your design and approach should be written using Microsoft Word and be no more than 5 pages in length and no less than 2 pages. The font size should be 12 point. The page margins should be 1 inch. The paragraphs should be with double line spacing. All figures, tables, equations and referenced should be properly labeled and formatted using APA style.

Code format:

Header comment block,
Appropriate comments within the code
Appropriate variable and function names, and
Correct indentation.

Tags: , , , , , , , , , , , , , , , ,

Webstore Startpage

Write custom classes for existing webstore to create an array to display 5 each random products for items flaged popular, featured, new , and sale.

Write HTML to display products in above created array and link to the rest of the products in each group(arrays already working for indiviual pages) and incorporate a space on top for a xfade2.js based slideshow..

Tags: , , , , ,

PHP Keyword Tag List

This project is to write a PHP script I could do myself but Im busy on another project and I need it fast.

I have a list of keywords and key phrases (one, two or 3 word phrases).

I have an article say 500 words.

I need a script that loops through the array of keywords and checks for the number of occurrences of each in the text. It then returns an array of say the 5 key phrases that occur most frequently.

Thats it, simple.

Id like the script to use regex and will reject anything that splits the article into tokens, creates an array and compares the article array with the keyword array.

I need this done fast.

Tags: , , , , , ,

Array_Merge Bug Fix

Quick bug fix for an issue that arose in one file when upgrading to php5. Bug is as follows:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/blah/public_html/p/include/Admin.php on line 3697
Cant update Members: INSERT INTO Members SET full_name=?,street=?,city=?,state=?,zip=?,country=?,email=?,password=?,affiliate_id=?,phone=?,site_url=?,ebay_id=?,unsubscribed=?,paid_till=NOW(),disabled=0,created=NOW(),usage_type=developer, license_key=? ,subscription_plan_id=? [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ?,street=?,city=?,state=?,zip=?,country=?,email=?,password=?,affiliate_id=?,phon at line 1]"

Tags: , , , , , ,

Linux – C Language – Software RAID Status/information

The C program needs to determine whether a give Linux system has software raid configured. If software raid is configured the program needs to collect the relevant information for a given software RAID array.

The relevant information can be found here: https://raid.wiki.kernel.org/index.php/Mdstat

The C program will be used as a library and needs to return the following software RAID information (structure):

– array name, array state, raid level, list of component devices and their role (including any failed), number of blocks, chunk size, number of devices in array, number of devices in use, bitmap of devices/device state, any in progress operation (i.e. recovery) and its associated percentage

Tags: , , , , , ,

File Upload And Data Entry To Web From Web (curl Knowledge)

Actually project is pretty simple and you can use any programming language to do but it should be run on the client computer because of the possibilty of high bandwith needs. And using curl library while doing this will be great.

1- when program opened, it should be ask for a username and password with simple gui, info should be checked on a php page and after getting ok message from php page start work

2- user will enter a code which points a page from my web server and program will get info from that page looking like this:

a- )
<step no="1" name="loggining">
<request>
<post value>?user=username&pass=mypassword&rememberme=1</post value>
<post adress>http://www.mywebsite.com/login.php</post adress>
<cookie>somecookie.txt</cookie>
<validate>You logged in succesfully</validate>
<browser>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13</browser>
</request>
</step>

it means program will submit a post request to http://www.mywebsite.com/login.php with acting like mozilla browser and save or store the cookie to where the exe file is. After post request, it will check the result with some kind of preg_match or regexp function is there appear a message for seeing we done its right or web server available. If it doesnt validate program should be stop and it should say same error message like this "step 1 validation failed". after it finished here comes to step 2:

b- ) <step no="2" name="checking">
<request>
<browser>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13</browser>
<cookie>somecookie.txt</cookie>
<get adress>http://www.mywebsite.com/data.php?type=1&someother=stuff</get adress>
<validate>some utf-8 fonts şğüçiuÜ</validate>
</request>
</step>

after we logged in we used same cookie file as you can see and validated some other stuff. then lets check step three this one is little tricky:

c- ) <step no="3" name="getting id">
<regexp source="step 2">
<variable = "$id">#pictures&id=(.*?)"#sm"</variable>
</regexp>
</step>

what we trying do here is; geting a value from output of step 2, which is gonna be necesseary for step 4 and we named is as "id". and finally we are closing an end:

d- ) <step no="4" name="uploading image 1">
<request>
<post array="subaction">add</post array>
<post array="action">pictures</post array>
<post array="id">$id</post array>
<post array="image">http://www.mywebsite.com/images/someimage.jpg</post array>
<post adress>http://www.mywebsite.com/imageupload.php</post adress>
<cookie>somecookie.txt</cookie>
<validate>Image added successfly</validate>
<browser>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13</browser>
</request>
</step>

In final step our program is downloaded an image from our web server and uploaded it without any error message.

3-) So, while program doing this in background, there is a proccess box while showing a loading gif like this http://www.scu.socialworld.com/Themes/Beta/images/ajax.gif and appearing messages in steps like "loggining", "uploading image 1" according to the status of process.

number of steps can be more or less

thats all i guess. by the way i should see a working or promising demo example of compiled program before paying. so please dont expect any payment without any work.

Tags: , , , , , ,

Php/mysql/jquery/javascript Slideshow

I need a rotating image gallery built upon this script:

http://bit.ly/5rFlNS

the modifications that i will be needing are fairly simple, or so i have been told.

heres what i need done:

the current script rotates through images in an array, that are stored in a folder.
What i need it to do is loop through an array for one hour, then switch to another folder and loop through that array for an hour, and be able to repeat this process.

basically, I need one ten image slideshow to loop for an hour, then at the end of the hour switch to the next folder.

I would prefer to have this project completed as simply as possible, as there will be modifications to it later as the project progresses.

That being said, if you believe it will be easier to use a series of folders, versus a php/mysql app, it really doesnt make any difference, as this will be a demo for an investor.

I am really interested in getting an admin panel, with which i can add images and descriptions into a form versus having to edit the code manually, and for this im sure a database would be ideal.

i would love to see this done in cakephp, simply because i am learning it myself, and it would be nice to learn from this project.

if you are a creative programmer, and have a better solution for what im needing, i am open for suggestions!

thanks

Tags: , , , , , ,

View Refresh On Modal Close / Panels / VIEWS / AUTOMODAL

Hi,

What I have
– a view on a panel page is listing some nodes (see screenshot 01)
– The "edit" and "delete" link should appear in a modal. Im using http://drupal.org/project/automodal for that.

What I need
– the/a certain view on the parent page should be refreshed after closing the modal.

You should alter the automodal function for this refresh in a small module. (Have a look at automodal.js)
Maybe with a NEW setting "refresh view". Or/AND you ajaxyfy the form in some other way, in oder to use the http://drupal.org/project/ajax_views_refresh…. module.

PSEUDO CODE for automodal

function automodal_addons_automodal_alter(&$settings, $selector) {
if ($selector == .automodal-delete) {
$settings[automodalReload] = TRUE;
$settings[width] = 700;
$settings[refresh view] = array(
viewname: myview,
display-id: view-pane-2,
);
}}

function automodal_addons_init() {
automodal_add(.views-field-delete-node a, array(
width => 300, [refresh view] = array(
viewname: myview,
display-id: view-pane-2,
);));
automodal_add(.views-field-edit-node a, array(width => 300));
}

Have a look on the exposed filter function with ajax of views.
HINT?
http://drupal.org/node/947530

Tags: , , , , , , , , , , , , , , , ,

ASP VB Update Pages With New Design

I have four pages in ASP VB – I have new page designs for these pages written in htlm and css
I need the design changing over to new pages – so the code will need to be copied over and all form fields, display items made to work.

There is some new code to add – I want to add a Recently Viewed Products recordset to 2 of the pages – I think the way to do this is to use a cookie array – so code needed to add ProductID to cookie array, code to remove ProductID from cookie array and and code to display cookie array.

I need doing within very quickly

Any questions please ask

Tags: , , , , , , , , , , , , , , , ,

PHP Data Exporter (Arrays To CSV, Excel, PDF, HTML)

We need someone who can create a PHP Class for us, which included the functionality to export PHP Arrays to different data formats.

These formats should include:

– XLS Excel (who could use http://www.phpexcel.net for this)
– CSV
– PDF
– XML
– HTML

Pseudo Code-Example:

$DataArray = array(); // Array with Data inside

$data = new DataExport($DataArray); // Create ans instance of the to-be created Class
$xlsFile = $data->toXLS($options); // Export the array to Excel file.
$pdf = $data->toPDF($options); // Export as PDF

Options: Here you can optionally define if the resulting table is horizontally or vertically aligned.

Tags: , , , , , , , , , , , , , , , ,

Mysql Insert Error

Hi all,
i am trying to insert html data into database but giving error
Error No.: 1064 Error in insert query.You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

note : i already tried
// $value = addslashes($value);
// $value= addcslashes( $value, %_);
// $value= str_replace(array(, "", "n", "r", "", ", "x1a"), array(, , n, r, "", ", Z), $value);
$str .= " ".$key." = ".mysql_real_escape_string($value).",";
but did not work

easy work 😀
happy bidding

Tags: , , , , , , , , , , , , , , , ,

Php Fsockopen Conversion To Curl

Need the following code converted to php curl

$fp = fsockopen($shout_caster_ip, $shout_caster_port, $errno, $errstr, 5);

if(!$fp)

{

$state = "Down";

}

else

{

fputs($fp,"GET /index.html HTTP/1.0rnUser-Agent: XML Getter (Mozilla Compatible)rnrn");

$page = "";

while(!feof($fp))

{

$page .= fgets($fp, 1000);

}

$page = ereg_replace(".*Server Status:", "", $page); //extract data

$page = ereg_replace("</b></td></tr></table><br>.*", "", $page); //extract data

$page_array = preg_split(~(</?[^>]+>)~ , $page, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

if(count( $page_array ) > 10)

{

for( $i = 0; $i < count( $page_array ); $i++ )

{

$state = "Up";

if($page_array[$i] == "Stream Status: ")

{

$bitrate = ereg_replace(" kbps.*", "", ereg_replace(".*at ", "", $page_array[$i+6]));

$currentlisteners = ereg_replace("of.*", "", $page_array[$i+8]);

$maxlisteners = ereg_replace(" listeners.*", "", ereg_replace(".*of", "", $page_array[$i+8]));

}

if($page_array[$i] == "Listener Peak: ")

{

$peaklisteners = strip_tags($page_array[$i+6]);

}

if($page_array[$i] == "Content Type: ")

{

$mimetype = strip_tags($page_array[$i+6]);

}

if($page_array[$i] == "Stream Genre: ")

{

$stream_genre = strip_tags($page_array[$i+6]);

}

if($page_array[$i] == "Current Song: ")

{

$currentsong = strip_tags($page_array[$i+6]);

}

}

}

else

{

$state = "Down";

}

}

fclose($fp);

Tags: , , , , , , , , , , , , , , , ,

Store Dataset In DB, Fetch Data From API, Generate URL

I need a php based server-side solution to where i can POST an array of IDs. (this will be done by a desktop-application)

– The server should store the array in a MySQL-database and attach a unique ID to the set.
– Than it should respond to my POST with a short url (like: www.MyServer.com/XYZ123).

If the short URL i requested:
– The Server should ask a freely available API for the data-set to each ID (maybe cache it)
– And generate a list-view of all the information

Tags: , , , , , , , , , , , , , , , ,

Joomla, Virtuemart Site BROKEN, Help Needed ASAP

I need a help with a small Joomla website, with Zencart already installed.
The website is currently down with a php error message.
—-
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/corpinc/public_html/libraries/loader.php on line 139

Fatal error: Class JRequest not found in /home/corpinc/public_html/libraries/joomla/import.php on line 33
==============

The focus of the project is to troubleshoot and resolve the issue on the site.
Joomla 1.5 and ZenCart are already installed and ready to go on server.

I would like to have this project completed ASAP, as this was a live site
Thanks to all bidders.
Len

Tags: , , , , , , , , , , , , , , , ,

Restore A Zencart Store Currently Down

My site was attacked by a malicious entity in my Virtual Private Server ( VPS) and damaged some of the current tables in mysql needed for my Zen cart website.

I need a Zen cart expert who can provide an immediate fix to my store to put it back online.

This is the current Output that you will get if you go to my URL.:

1146 Table reycamp_slzcart.rc_configuration doesnt exist
At:

Array
(
[0] => Array
(
[file] => /home/reycamp/public_html/includes/application_top.php
[line] => 96
[function] => execute
[class] => queryfactory
[type] => ->
[args] => Array
(
[0] => select configuration_key as cfgkey, configuration_value as cfgvalue
from rc_configuration
[1] =>
[2] => 1
[3] => 150
)

)

[1] => Array
(
[file] => /home/reycamp/public_html/index.php
[line] => 23
[args] => Array
(
[0] => /home/reycamp/public_html/includes/application_top.php
)

[function] => require
)

)

Query:

select configuration_key as cfgkey, configuration_value as cfgvalue
from rc_configuration

Also The programmer who I choose for this project need to provide a security locks to my VPS to avoid this to happen again, also provide a script to backup my data every day or week at the latest.

My budget for this project is $30 Please consider when bidding.

Best regards.

I will provide URL on PM.

Tags: , , , , , , , , , , , , , , , ,

JavaScript Forms

Hello everyone,

I am looking for a developer specifically for JavaScript for an entry level basic script.
I need someone who can write English well because the script need to be commented extensively.

This is what I need.

1). I need an HTML select list that populates dynamically.
Meaning the list will have a single default value but will get all other values dynamically.

2). The list will get its value via radio buttons. Example: There will be four radio buttons. When one is clicked it will automatically populate the HTML select list. Example: If I clicked radio button 1, it will pull data from an array and populate the HTML select list.

3). There will be several arrays. Example: Artist(array of artist) Movies(array of movies) Songs(array of songs) and Cities(array of cities). Each radio button will be labeled Artist, Movies, Songs and Cities.
So when a user click on the artist radio button, it will populate the HTML list with the list of artist and so on.

4). Finally, there will also be a second form, but this form will only contained one textfield, when a user click on a radio button, say city, some text will display in the text field of the form. Example: You selected city, and so on.

This is a simple script but I need it very well commented and all the variables given good names, no a, k b yy, these are confusing when you want to learn or understand a code.

Thanks people!

AMP

Tags: , , , , , , , , , , , , , , , ,

PHP Array Formatting To HTML (reposted)

This is a very simple job, I have an API returning a complex array and I need someone to pick up the result and format it into proper HTML data in a php loop.

Please see the attached file for the array returned and please note that I need to have access to all data as variables so I can display it in HTML. Max budget $50, 100% escrow and release on completion of work.

Tags: , , , , , , , , , , , , , , ,

Facebook Event Creation

Looking for an experienced facebook app developer to develop a backend php program that creates an event on facebook page wall.
The event details are configurable in the program.

$Title = "Event1";
$Description = "My part Desc";
$Location = "my home";
$Start_time = "2010-09-04T15:39:00";
$End_time = "2010-09-04T17:39:00";
$Photo = "http://www.example.com/file/event.jpg";

$facebook_page_id = "***********";

This article might help
http://developers.facebook.com/docs/reference/rest/events.create

In facebook_connect.php file..

public function publishEvent($name, $location, $photo, $start, $end) {
$eventInfo = array(
name => $name,
start_time=> $start,
end_time=> $end,
location=> $location,
privacy_type => OPEN,
page_id => DEFAULT_PAGE
);
try {
$params = array();
$params[method] = events.create;
$params[access_token] = DEFAULT_ACCESS_TOKEN;
$params[event_info] = json_encode($eventInfo);
$eventId = $this->fb->api($params);
if (!empty($eventId)) {
$this->publishEventPhoto($name, $photo, $eventId);
}
} catch (FacebookApiException $e) {
echo $e->getMessage();
error_log($e);
}
}

public function publishEventPhoto($message, $url, $eventId) {
$image = array(
href => FB_URL,
media => array(array(
type => image,
src => $url,
href => $url
))
);
try {
$this->fb->api(array(
method => stream.publish,
access_token => DEFAULT_ACCESS_TOKEN,
message=> $message,
attachment => json_encode($image),
target_id => $eventId
));
} catch (FacebookApiException $e) {
error_log($e);
}
}

Tags: , , , , , , , , , , , , , , , ,

XML To Array – FOR Baribuet

This is a project just for baribuet.

PHP function that turns XML structure into the PHP array structure — as described.

Tags: , , , , , , , , , , , , , ,

Homework Help

Write a C#.NET Windows Application program (call it Lab7) that contains a form named NamesList. The form should have one ListBox, one TextBox, and six Buttons. The ListBox will hold names entered by the user. The user will enter names in the TextBox so they can be added to the ListBox. The first Button will add the names to the ListBox. The second Button will call a method to load the names in an array, sort them, and add the sorted names back into the ListBox. The third Button will call a method to load the names stored in the ListBox, reverse their order, and add them back into the ListBox. The fourth Button will call a method to load the values into an array, search for a name the user enters in the TextBox, and output a message (using a MessageBox) that indicates whether or not the name was found. The fifth Button will clear the ListBox. The sixth Button will close the application.

In addition, please provide proper documentation:

(1) Comments within the code.

(2) Use of proper naming conventions for the declared variables and all controls referenced in the code.

(3) A TOE Chart.

(4) Pseudocode for all Buttons.

(5) Pseudocode for the LoadArray method that will accept an empty array passed to it from a Button Click procedure, load the array with the names in the listbox, and return the populated array.

Need in less than 24 hours, perfer to be written using Visual C# 2008, no 2010 please.

Tags: , , , , , , , , , , , , , , , ,

Modify Existing IPhone Project

I have an iPhone app that I have created and sharing with my friends. One view in the app contains two independent labels that contain the number 20. When a corresponding button is pressed, the number is incremented or decremented by a specific amount. These decrements/increments are held in a NSMutableArray, added to the Value of the label to display the current life Total.

What I need is someone skilled enough to modify the programming. What I would like is the following ammendments to the code:
– When the button is pressed, a timer is initiated for a countdown of 2 seconds.
– If any of the buttons are pressed within that two seconds, it adds or decreases the portion of the NSMutableArray
– After two seconds, if a button is pressed it would add a new element to the array and the timer would start again.
– I would like the changes that are made in this array to show in a corresponding UITableView that updates after the button presses.
– If someone selects a row in the table, they can edit that value in the Array and the table will change corresponding to this. Again, after 2 seconds, if a button is pressed there would need to be a new element added to the array.

This functionality would need to be duplicated for another set of buttons, label, and UITableView.

Are you up for the challenge?

Tags: , , , , , , , , , , , , , , , ,

Fix Php/MySQL Error "unknown Column ‘Array’ In Field List"

I had some edits done to an ecommerce backend to allow the selection of multiple items from a list, however the provider (off here) has left a problem, Ive not been able to contact them and need this fixed as soon as possible.

More details and full access to the chosen provider.

Immediate start needed.

$30 max spend.

Tags: , , , , , , , , , , , , , , , ,

Betfair SOAP API WSDL C#

Please read the following description carefully. I am able to code this myself but because of limited time we are looking for an experienced programmer to outsource.

Basically we already have the program that reads the streaming data and shows it in a GUI. For my work we need these modules:

1) A module/class to write data to SQL DB (This process is activated by a button).
2) A module/class to do some predefined (quite simple) calculations on an array of data
3) A module/class read an array from a SQL (Will be provided) and carry out some simple arithmetics between array elements.
4) A module/class to check some conditions (quite simple) and place orders using API fuctions.

You will have to understand asynchronous SOAP and C# (Windows forms) and the code needs to be fully commented.

A more detailed description is available to experienced bidders. I have a clear idea of what I need so it will be easy for somebody who knows what he/she is doing. Please write dear josh at the beginning of your message if you have read the above description and understood the project.

Tags: , , , , , , , , , , , , , , , ,