Archive

Posts Tagged ‘loc’

Mysql Item Report On 4 Tables 2

June 22nd, 2011 Comments off

Four Tables. Will require addition and subtracting. See attached 4 tables.

Main table = Item_List.
Table = Item Adjustment
Table = Item Received
Table = Item Sold

12 Columns

From TABLE Item_List : ItemId, ItemNum, Cost, SalesPrice, Notes.

From TABLE Item Adjustment: Adj_Loc, Adj_Q.

From TABLE Item Received: Rec_Loc, Rec_Q.

From TABLE Item Sold: Sold_Loc, Sold_Q.

The col Current will = Adj_Q + Rec_Q – Sold_Q = Current_Q

All math based on the total sum for each location in TABLES Adj+Rec-Sold and showing all Item_List.ItemID’s

Structure Example:

ItemId | ItemNum | Adj_Loc | Adj_Q | Rec_Loc | Rec_Q | Sold_Loc | Sold_Q | Current | Cost | SalesPrice | Notes

Categories: Math, MySQL, Report, SQL, Tables Tags: , , , , , ,

Mysql Item Report Base On 4 Tables

May 28th, 2011 Comments off

Four Tables. Will require addition and subtracting. See attached 4 tables.

Main table = Item_List.
Table = Item Adjustment
Table = Item Received
Table = Item Sold

12 Columns

From TABLE Item_List : ItemId, ItemNum, Cost, SalesPrice, Notes.

From TABLE Item Adjustment: Adj_Loc, Adj_Q.

From TABLE Item Received: Rec_Loc, Rec_Q.

From TABLE Item Sold: Sold_Loc, Sold_Q.

The col Current will = Adj_Q + Rec_Q – Sold_Q = Current_Q

All math based on the total sum for each location in TABLES Adj+Rec-Sold and showing all Item_List.ItemID’s

Structure Example:

ItemId | ItemNum | Adj_Loc | Adj_Q | Rec_Loc | Rec_Q | Sold_Loc | Sold_Q | Current | Cost | SalesPrice | Notes

Categories: Math, MySQL, Report, SQL, Tables Tags: , , , , , ,

Convert 2 Actionscript Functions To Php

May 3rd, 2011 Comments off

I want these 2 AS3 function converted into PHP. It must have exactly the same results (same signature and nonce). The signature function uses AS3Crypto with SHA1.

for information:
param1 = the data to encrypt
param2 = secret key
param3 = token key

public function signature(param1:String, param2:String, param3:String = “”) : String
{
var token:* = param2 + “&” + param3;
var _loc_5:* = Crypto.getHMAC(“sha1″);
var _loc_6:* = Hex.toArray(Hex.fromString(token));
var _loc_7:* = Hex.toArray(Hex.fromString(param1));
var _loc_8:* = _loc_5.compute(_loc_6, _loc_7);
var _loc_9:* = Base64.encodeByteArray(_loc_8);
return Base64.encodeByteArray(_loc_8);
}

public static function OAuthNonce() : String
{
var _loc_1:* = new Date();
var _loc_2:* = new Date(_loc_1.getUTCFullYear() + 1970, _loc_1.getUTCMonth(), _loc_1.getUTCDate(), _loc_1.getUTCHours(), _loc_1.getUTCMinutes(), _loc_1.getUTCSeconds(), _loc_1.getUTCMilliseconds());
return (_loc_2.getTime() * 10000).toString();
}

Sitemap From Flatfile Db

October 20th, 2009 Comments off

Hi, thanks for looking at my project. I need a PHP script which will read a tab-delineated text flatfile and generate an XML sitemap, formatted for Google Video. All needed specifications are included here.

The source database is a text file, in which records are separated by a carriage return and fields are separated by tabs.

Here is the guide to the fields:
http://www.autopages.com/track/mapping.txt

This is what we need the result file to look like (## numbers below correspond to the field number of the source record … so for example, ##2## would be the text from field 2 of the record):

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″
xmlns:video=”http://www.google.com/schemas/sitemap-video/1.1″>
<url>
<loc>http://www.autopages.com/videolistings/##9##.html</loc>
<video:video>
<video:content_loc>http://www.autopages.com/mp4/##9##.mp4</video:content_loc>
<video:thumbnail_loc>http://www.autopages.com/listingthumbnails/##18##**see note**</video:thumbnail_loc>
<video:title>##2## ##3## ##4## in ##8##, ##15##</video:title>
<video:description>For more info on this vehicle, call us at ##7##.
See the full listing at http://www.AutoPages.com/##32##. ##5##. $##6##.</video:description>
<video:tag>##3##</video:tag>
<video:tag>##4##</video:tag>
<video:tag>##8##</video:tag>
<video:category>Autos for Sale</video:category>
<video:family_friendly>yes</video:family_friendly>
<video:duration>60</video:duration>
</video:video>
</url>
</urlset>

So, here is an example source record:

v 2008 Jeep Wrangler X 4×4 Loaded with options. Ask for ford used sales when you call. we have been in business since 1938. great financing rates available! Power door locks, power windows, alloy wheels, cruise control, rear defroster, console, cd player, am/fm radio, bucket seats, cloth seats, warranty, a/c. Stop by before it’s gone. 24941 1-800-784-1334 Tacoma twf_W5805 F W5805 TWF Titus Will Ford 3606 S Sprague Avenue WA 98409 fordusedATtituswill.com http://www.autobase.com/photos/00640/0432/04326449_001.jpg http://www.autobase.com/photos/00640/0432/04326449_001.jpg http://www.autobase.com/photos/00640/0432/04326449_004.jpg http://www.autobase.com/photos/00640/0432/04326449_004.jpg http://www.autobase.com/photos/00640/0432/04326449_003.jpg http://www.autobase.com/photos/00640/0432/04326449_003.jpg http://www.autobase.com/photos/00640/0432/04326449_006.jpg http://www.autobase.com/photos/00640/0432/04326449_006.jpg http://www.autobase.com/photos/00640/0432/04326449_007.jpg http://www.autobase.com/photos/00640/0432/04326449_007.jpg http://www.autobase.com/photos/00640/0432/04326449_002.jpg http://www.autobase.com/photos/00640/0432/04326449_002.jpg http://www.autobase.com/photos/00640/0432/04326449_005.jpg http://www.autobase.com/photos/00640/0432/04326449_005.jpg 83149 http://www.autobase.com/photos/00640/0432/04326449_008.jpg

And that record would look like this in the destination XML file:

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″
xmlns:video=”http://www.google.com/schemas/sitemap-video/1.1″>
<url>
<loc>http://www.autopages.com/videolistings/twf_W5805.html</loc>
<video:video>
<video:content_loc>http://www.autopages.com/mp4/twf_W5805.mp4</video:content_loc>
<video:thumbnail_loc>http://www.autopages.com/listingthumbnails/04326449_001.jpg</video:thumbnail_loc>
<video:title>2008 Jeep Wrangler X in Tacoma, WA</video:title>
<video:description>For more info on this vehicle, call us at 1-800-784-1334.
See the full listing at http://www.AutoPages.com/83149. Loaded with options. Ask for ford used sales when you call. we have been in business since 1938. great financing rates available! Power door locks, power windows, alloy wheels, cruise control, rear defroster, console, cd player, am/fm radio, bucket seats, cloth seats, warranty, a/c. Stop by before it’s gone. $24,941.</video:description>
<video:tag>Jeep</video:tag>
<video:tag>Wrangler X</video:tag>
<video:tag>Tacoma</video:tag>
<video:category>Autos for Sale</video:category>
<video:family_friendly>yes</video:family_friendly>
<video:duration>60</video:duration>
</video:video>
</url>
</urlset>

Beyond this simple mapping, there are only a few added functions the script needs to have:

1.) It should skip all records in the source database which do not have “F” in field 10.

2.) The script should have an “exclude” array in its settings area. (i.e., “$exclude = array(“ASF”,”CPK”,”KOR”,”BTT”,”BTA”,”BTN”,”RTH”,”RLP”,”RLC”,”RLV”,”AAP”,”GIL”,”LMM”,”AOT”,”PSU”);”
Any record whose field 12 contains one of the values in this array should be skipped.

3.) For the “<video:thumbnail_loc>” value, the script should write “http://www.autopages.com/listingthumbnails/” followed by the FILENAME of the URL in record field 18. In other words, if record field 18 contains, for example: “http://www.autobase.com/photos/00640/0432/04326449_001.jpg”, the script should replace the URL with the one autopages.com on above and append the filename (04326449_001.jpg) to it.

So, as you can see above, the resulting line should be:
<video:thumbnail_loc>http://www.autopages.com/listingthumbnails/04326449_001.jpg</video:thumbnail_loc>

The result XML file created by this script will be checked for validation.

That’s it! Please let me know if you have any questions and I look forward to working with you.

Categories: PHP Tags: , , , , , ,

Swoopo.ca Api For Blackberry

August 27th, 2009 Comments off

The API will work as if/seem to be/work through the BB browser (i.e. Curve 8330 OS 4.5). (will take suggestion for other methods i.e. firefox/IE plugin)

Login to the website as a user/account holder. Monitor and keep track of credits. (other info as future project)

The API will (for now) only monitor one auction at a time.

The main function will take a URL/Action ID and monitor the auction during the last minute and subsequent last minutes. The API will monitor the bidders, current price, time remaining etc. Calculate a “likelihood of completion” (LOC)as a percentage (%) based on the activity. i.e. lots of bidders over a short period of time equaling a low “LOC”, etc.

During periods of high LOC, randomly through out, periodically while monitoring the API will bid on the auction item.

The API will not use the bidbutler system.

The interface will be simple, showing relevant auction information. Allow the user to bid independently. Allow the LOC bidding system to be turned on and off while still performing the monitoring and updating the interface as normal.

An alert will be generated when the auction is less than one minute and “LOC” is ligh(configurable)

Functionality will be added/removed as the working software is being tested. Programmer will be responsible for bug fixes in a timely (short) manner for a period of six months. Subsequent changes to the software will be offered to the programmer to have first and only bid as long as there is a good working relationship.

The software and source will be owned by me, will not be made available or resold for any platform. After completion and final payment and with each subsequent version of the software there will be supplied a numbered and dated compilable source code.

Thank you for taking the time to consider this task.

Extract Listing – Google Maps

July 10th, 2009 Comments off

I need someone to collect/extract data from GOOGLE Maps search engine for placement in an KML template.

Information to be extracted and placed in the “description” portion of the kml in the following format:
Listing name <br>
Address Line 1 <br>
City <br>
State (optional) <br>
Zip Code <br>
Phone (optional) <br>
Description (optional) <br>
WWW (website if any) <br>

Geocode expressed normally inside KML.

Steps to be followed:

1. Gather listings from GOOGLE Maps search engine.
2. Check if data extracted is valid (by cross checking).
3. Remove duplicate entries.
4. Submit file in provided kml template
5. Script to be provided to buyer

I have provided a list of the categories and links to the first page of the results of the needed listings. While this could be done Data Entry I feel a script could be written to extract this data quite easily.

List of needed categories and expected number of leads to be found in each kml file. Each category should have it’s own kml template file following the fields listed above.

All entries should allow the city to be a variable entered upon executing the script. For the examples below, I used “Santa Rosa” but the scripts should be made such that the city entered separately.

**********
category: “parks” loc: santa rosa (expected results 100-2000)
http://maps.google.com/maps?f=q&hl=en&geocode=&q=category:+%22parks%22+loc:+santa+rosa&sll=48.149328,11.575462&sspn=0.128275,0.247192&ie=UTF8&t=h&z=13

**********
category: “playgrounds” loc: santa rosa (expected results 100-2000)
http://maps.google.com/maps?f=q&hl=en&geocode=&q=category:+%22playgrounds%22+loc:+santa+rosa

**********
category: “kid friendly museums” loc: santa rosa (expected results 2,322)
http://maps.google.com/maps?f=q&hl=en&geocode=&q=category:+%22museums+kid%22+loc:+santa+rosa
**********
category: “kids restaurants” loc: santa rosa (expected results 100-2000)
http://maps.google.com/maps?f=q&hl=en&geocode=&q=kids,+restaurants+santa+rosa
**********
indoor play areas santa rosa (expected results 20-2000)
http://maps.google.com/maps?f=q&hl=en&geocode=&q=indoor,+playarea+santa+rosa

Payment only at completion of the project.

Search Results Into Exel

April 11th, 2009 Comments off

Whe need someone who can get several searchresults from a few websites and put them in exel format for printing labels.

All information about companyname and addres are displayed in the searchresults on the website.
This information needs to be spitted by company and set into exel for printing labels.
Because of the same search must be done with about 4 different websites, whe need all duplicated to be deleted from the list.

Whe need the results found at the following urls:
http://www.uw-adres.nl/search/1?trefwoord=autohandel&amp;bedrijfsnaam=&amp;plaats=&amp;x=0&amp;y=0 (834 results)
http://www.uw-adres.nl/search/1?trefwoord=autobedrijf&amp;bedrijfsnaam=&amp;plaats=&amp;x=0&amp;y=0 (4386 results)
http://www.detelefoongids.nl/bg/nl-nederland/kw-autohandel/1/ (6260 reslults)
http://www.detelefoongids.nl/bg/nl-nederland/w-autobedrijf/1/ (4852 results)

http://www.ilocal.nl/WebSearchServlet?tid=NewSearch&amp;ips=10&amp;iv1=1&amp;loc=1&amp;irs=&amp;isf=priority&amp;iqk2=not+member&amp;iqf2=groupListing&amp;iv11=&amp;partnerid=35&amp;iqk1=autohandel&amp;iqk3=&amp;point=&amp;sort=distance%3Aasc&amp;searchbutton.x=0&amp;searchbutton.y=0 (16131 results)

http://www.ilocal.nl/WebSearchServlet?tid=NewSearch&amp;ips=10&amp;iv1=1&amp;loc=1&amp;irs=&amp;isf=priority&amp;iqk2=not+member&amp;iqf2=groupListing&amp;iv11=&amp;partnerid=35&amp;iqk1=autobedrijf&amp;iqk3=&amp;point=&amp;sort=distance%3Aasc&amp;searchbutton.x=0&amp;searchbutton.y=0 (17827 results)

http://www.ilocal.nl/WebSearchServlet?tid=NewSearch&amp;ips=10&amp;iv1=1&amp;loc=1&amp;irs=&amp;isf=priority&amp;iqk2=not+member&amp;iqf2=groupListing&amp;iv11=&amp;partnerid=35&amp;iqk1=autodealer&amp;iqk3=&amp;point=&amp;sort=distance%3Aasc&amp;searchbutton.x=0&amp;searchbutton.y=0 (16014 results)

Some results will be displayed on more then 1 website, so whe need it to be filterd to be sure whe have all the results found on all different websites, but that there will be no duplicates.

Bear