Search found 12 matches

by trungtan
Wed Oct 17, 2012 6:14 pm
Forum: PHP coding => General
Topic: how to generate all sub-array of an array
Replies: 1
Views: 431

how to generate all sub-array of an array

Hi everyone, I need to generate all sub-array from an array. For example: source_array = array("a", "b", "c", "d"); so the result is: array( array("a"), array("b"), array("c"), array("d"), array("a", "b"), array("a", "c"), array("a", "d"), array("b", "c"), array("b", "d"), array("c", "d"), array("a"...
by trungtan
Mon Jul 09, 2012 1:05 am
Forum: mySQL & php coding
Topic: Problem with Decaster a big data
Replies: 3
Views: 678

Re: Problem with Decaster a big data

Thanks, maybe that is the only way.
by trungtan
Sat Jul 07, 2012 7:42 pm
Forum: mySQL & php coding
Topic: Problem with Decaster a big data
Replies: 3
Views: 678

Problem with Decaster a big data

Hi everyone, I have a table Companies(id, name) which contents about 100.000 records. I want to calculate the levenshtein between each company to determine duplicate companies, so I create a new table Matrix(id1, id2, distance). My problem is the table Matrix is too big. Because it contents 100.000*...
by trungtan
Sun Jun 10, 2012 6:47 pm
Forum: PHP coding => General
Topic: how to compare two company name...?
Replies: 6
Views: 715

Re: how to compare two company name...?

Thanks ejsexton82 so much! I will try with levenshtein distance.
by trungtan
Sun Jun 03, 2012 8:30 pm
Forum: PHP coding => General
Topic: how to compare two company name...?
Replies: 6
Views: 715

Re: how to compare two company name...?

Thank you, Nullsig. In fact, my company strings have plenty of format. It content slash, dot... and more special characters... I think I should use some string cleaning algorithms first, and then I can use comparing algorithms... My result can be a rate of the same, not only return "true" or "false"...
by trungtan
Thu May 31, 2012 12:33 am
Forum: PHP coding => General
Topic: how to compare two company name...?
Replies: 6
Views: 715

how to compare two company name...?

First, I'm sorry if my question is not belong this forum. And here is my problem: For example, In my database have 100.000 rows content names of companies. Some companies are the only one company, but it had more way to call. Such as: "ABC company" vs "ABC LTD. company", they are one company, and my...
by trungtan
Wed Dec 28, 2011 12:00 am
Forum: Server installation and configuration
Topic: Old question: WAMP or XAMPP?
Replies: 0
Views: 1213

Old question: WAMP or XAMPP?

Hi all. Does anybody have a lot experiences of using WAMP or XAMPP? I need recommendation when choosing between them. I prefer Xampp with more tools than Wamp: Mercury (very usefull when send e-mail in local), Filezila, easy to configure SSL... But some source of Joomla cannot run in Xampp while it ...
by trungtan
Tue Dec 27, 2011 11:49 pm
Forum: PHP General
Topic: sending mail with images
Replies: 1
Views: 615

Re: sending mail with images

For doing that, you should use an e-mail with HTML format when using mail() function. I did it. Google to know more.
by trungtan
Tue Nov 29, 2011 5:35 pm
Forum: PHP coding => General
Topic: Get a number never duplicate on PHP server?
Replies: 7
Views: 933

Re: Get a number never duplicate on PHP server?

Thank you!

Does anyone have any solutions for me if my code run in two (or more) server?
by trungtan
Tue Nov 29, 2011 7:13 am
Forum: PHP coding => General
Topic: Get a number never duplicate on PHP server?
Replies: 7
Views: 933

Re: Get a number never duplicate on PHP server?

If server is too strong, time using for process the function microtime() can be duplicate (the different between two function isnot enough to see by microtime()). Or if server is running in due mode, two function microtime() might be process at same time so server will return same values.
by trungtan
Mon Nov 28, 2011 5:56 pm
Forum: PHP coding => General
Topic: Get a number never duplicate on PHP server?
Replies: 7
Views: 933

Re: Get a number never duplicate on PHP server?

Lastnight I've checked my solution. I found something: microtime() has included time(), so we just use microtime is enough; microtime() return a string such as "0.68753200 1322480671" with ten right numbers is second of time (change in each second). So, we needn't worry about microtime() is duplicat...
by trungtan
Mon Nov 28, 2011 4:18 am
Forum: PHP coding => General
Topic: Get a number never duplicate on PHP server?
Replies: 7
Views: 933

Get a number never duplicate on PHP server?

Hi, I need a suggestion for this: Each client have been given a number when browse to a PHP page. (That's number can be save to session.) When client submit, that number has to be saved to mysql database with UNSIGNED BIGINT datatype. The problem is how can we make sure each number in each client is...