![]()
![]()
A good and bad way to lurk![]()
![]()
![]()
In a previous blog, I said I was already into PHP when there were only three books on the subject at Borders Bookstore. That was in 1999. I also like to have coffee at the cafe, so I would go there a lot more than usual, more than once a week, just to have coffee.
The business and leadership books were usually next to the computer books, and I also read business and leadership books, so I was there a lot.
When I was just starting PHP, I would “lurk” in the computer book section, observe what other people pick up, and if I thought it was related to the PHP or MySQL problem I had, I would approach them to ask if they can solve my problem.
I don’t know when, but I remember talking to a guy who owned a website. He said he did not know anything about websites, but his site was a job site, but only for the sports field. He charged job seekers who wanted to be in the sports field a fee just to see what job opportunities are out there, and paid a few people to post what job openings got faxed to him by the sports-related companies. That was an idea, but my point is, it doesn’t hurt to talk to people.
Well, there’s another “lurker” that I noticed at the business and leadership section.
What he did, on the other hand, was, whenever, a person approached the business section, he did his opening line, which I noticed was almost constant, and then ask the guy or girl questions, and then he did his spiel to recruit them for his multi-level marketing company.
He got nods a few times, and phone numbers. However, about a couple of months later, I noticed him getting escorted out of the store more than once.
I figured he came back for more recruits and the staff at Borders finally recognized him. Some people obviously did not appreciate what he was up to. 
![]()
Val Zubiri![]()
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
How I have been Learning a Computer Language Lately ![]()
This is a long introduction for a really short tip. lol. ![]()
I am not going to tell you what I have been trying to grasp lately. However, I can tell you I have been learning it faster than ever.
In 1999, I switched from a Macintosh to a PC. It was not because I didn’t like the Macintosh anymore, I just wanted to have a PC for a change.
I am an artist, and I had paid close to $300 to get to an art expo’s opening night. I also decided to rent a tuxedo, but I knew people can be in casual clothes, I didn’t care, I was weird and I still am.
I also just recently registered www.valzubiri.com, and I wanted to make a fast website, to match the personalized pens I had ordered, and the business cards I just recently had printed.
So everything was fast, and haphazzard, but I was satisfied.
Then I discovered PHP.
The server had PHP and CGI as part of the features. I went to the bookstore, and at that time, PHP actually only had 3 titles. I eventually bought all three.
I basically slowly collected books on PHP and became familiar with what pages I should look up to program what I needed.
Getting my art online was my interest, which made me willingly learn PHP, HTML and others.![]()
Through the years, I learned PHP as needed, but that was slow learning.
![]()
![]()
![]()
Here’s the next thing I did, which is so much more accelerated.![]()
![]()
![]()
![]()
Just buy a book you can handle. Start with the first chapter.
Read fast, or don’t even read much, but go to the codes. Go to one topic with a set of codes, and type it on the recommended software (like Notepad). Compile it, and notice the errors and what you might have missed typing.
Then type it again, and try to understand what it is all about and see if new errors occur. Then type it again from memory and see if you got it right.
Then move to the next set of instructions and do the same thing over again.
You might wonder how fast you might be able to progress doing this.
At one time, I went to buy a simple book, brought my laptop to a coffee shop, got coffee and typed and began to understand and remember 5 out of 15 chapters in about 7 hours.
It’s not just a matter of understanding what’s going on. It’s also a matter of knowing the syntax, typing away really fast, and following a general convention that other programmers would understand, in case someone else needs to take over what you have been doing - that’s in a job situation.
Val Zubiri![]()
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
RSS feeds scare me![]()
I think the moment people realize they have too many to read, they begin to read less. As far as my own blogs are concerned, I prefer just showing up on the search engines and be read as needed. I also prefer to read blogs as I see them on search engines.
I think not everything I say in my own blogs are important enough for the same person to keep reading.
![]()
Val Zubiri
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
My FAST way to enter massive amounts of array data on MySQL tables using PHP, InDesign, Excel, Frontpage, Dreamweaver and Notepad
I’m sure this is for the novice, because people who work with PHP, MySQL and others eventually find ways to enter data formatted as arrays in a really fast manner. This is my way that does the job.
Let’s say you need to make a MySQL table that has a lot of information, like from old database files, or the entire County, City, State, Zip code, Longitude, Lattitude of the United States.
For PHP and MySQL, the data needs to be in this form
"insert into nameoftable (first_name, job, city) values ('Stan','doctor','Chicago'), ('Charlie','engineer','New York'), ('Alfonso','consultant','Miami')";
It looks confusing, but using tabs, the statements looks better…
"insert into nameoftable (first_name, job, city) values
('Stan','doctor','Chicago'),
('Charlie','engineer','New York'),
('Alfonso','consultant','Miami')
";
If you have thousands of imported data, or even hundreds, this could take weeks to format and check.
I use old versions of Microsoft Excel, Adobe InDesign and Notepad or Frontpage.
First, select all of your data and paste it to Excel. See if the carriage returns and the tabs are there. The data should be in many rows and many columns. If they are just in one long row, then try pasting the data in InDesign.
In InDesign, see if the data appears as if they have been separated by tabs, or commas, and hopefully, in separate lines.
Before you can assign the single quotation marks ('), the commas (,) and the parentheses - ( ) , you need to clean your data first.
How I do this really fast
1. In InDesign, make each line the row of entries for the MySQL table. Use the Enter button to assign new lines to your information. Don’t worry if you miss an entry or make a mistake. Just do this as fast as you need to so.
2. Tab to separate the data, if the tabs are not there. If your information is separated by commas, then don’t do this step. Don’t worry about the spaces in between the data. You will clean it up later
3. Clean up the possible spaces between tabs and new lines using Search and Replace. The good thing about InDesign is that you can search for tabs using “^t". So to search for the extra space before a tab,
type in ” ^t” in the search box, and
type in “^t” in the replace box.
Click Replace All. Do this several times, until all of them are gone. You may have had something like
” ^t” - several spaces before the tab,
so keep clicking until a message that says nothing more was found appears. Then do the same thing with spaces after the tabs by
searching for “^t ” and
replacing it with “^t".
4. Do the same thing with the paragraphs. Clean up the possible spaces before and after paragraphs by
searching for ” ^p” and
replacing it with “^p".
Then do it again with “^p ” and
replacing it with “^p”
5. Make sure you save your work once in a while. Your computer could crash or freeze anytime with all this search and replace procedures.
6. Everything still looks jumbled up, so what you now need to do, is to see if they are tabbed correctly. Copy all, or a manageable amount and paste them on an Excel table. If you missed a tab or carriage return, you will spot it here. Make the necessary corrections.
7. Use Excel to rearrange your columns or take information off, or insert new columns with additional information, like if you want to put a “paid, unpaid” column, etc. Or if you want to just sort the rows according to last name, or city or whatever, of if you want to sort and separate the data to be put in different tables.
8. Copy and paste the data back to Indesign. Now you need to replace the tabs and carriage returns, but you’re still not safe. Save the data.
9. Look for single quotes first. If they are there, they will confuse PHP. You need to replace “‘” with “\’". However, don’t fully trust this yet… Look for a symbol that is not in the data. For example, look for an exclamation point “!". If your data has none, then search and replace your single quotes with five or more exclamation points - “!!!!!!!!". Save the data.
10. Search and replace tabs. Search for “^t” and replace them with something like “#######, %%%%%%%” - several sharp symbols - a comma - a space - several percentage symbols. Save the data.
11. Search and replace the new paragraph lines or returns. Search for “^p” and replace them with “&&&&&&&&&
,^p(++++++++” - several ampersands - a closing parenthesis - a comma - ^p - an opening parenthesis and several pluses. Save the data.
12. Make a new file on Frontpage, Dreamweaver or Notepad. In Frontpage, click the HTML tab, and erase all the HTML code. In Dreamweaver, click the Code button, and erase all the HTML code. Copy and paste the data. The drawback about Notepad is that it can be limited in what it can take, and cut off your data, so make sure that the last line on Notepad is the last line you have on the InDesign file.
13. Replace the “!!!!!!!!” in (8) above, with “\’". Replace the “#######” in (9) above with “‘", and do the same thing with “%%%%%%%", “&&&&&&&&", and “++++++++", replacing them with “‘".
14. The reason we are not doing (12) above in Indesign is that InDesign will give you opening and closing single quotes, not the vertical, simple single quotes (I don’t know what you call them).
15. Look at the last line, and take out the comma if there is one. Now you have formatted data that you can enter into your MySQL table.
16. This is a really fast tutorial. Sorry for grammar mistakes or inexact commands for the programs I mentioned, but you get the gist. You may need to look at (12). Depending on how you set up your MySQL, you might want to put in a different unicode for the “‘".
Val Zubiri
Programming by Val Zubiri
Art by Val Zubiri
Arts Global Impact.org / Original Art and Art Books for Collectors for sale
Chicago Art Movement.com
Get a Massage Contact and Shop using your mobile phone
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | Current | > >> | ||||
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||