What?
A quick article on how to skip rows or even specify a range to extract from the Excel file when using as the DataSource.

Why?
If you are simply using a text file as your data source, then the options in the connection manager will let you skip rows and specify column datatypes. You don't get that with Excel but you can still control the data range.

How?
My example is that I have an excel sheet where the first 10 rows are descriptions to the column, and then I have 38 columns ("A" to "AL"):

What?
A quick article on if you were given a webpage coded in HTML, what methods in AutoHotkey could you use to separate out the HTML Tables into a ListView.

Why?
I want a snippet of code that replicates any HTML table.

How?
I've been trying various ways so I'm posting them here. My opinions on them change with the weather so until I do some benchmarking I won't know which ones best:

What?
So this is an article to serve as documentation for one of the data sources available to download for FREE from this site.

Why?
It's useful to have a CSV list of all the IP ranges and their allocated country. Our use here was to create a refreshable country by IP address list that we can use when parsing our website logs to check where visitors were from.

Note: we also use and love Advanced Web Statistics (awstats) but this was so that you could have your own country lookup script.

The Download
Should contain the following:
  1. create_countriesipranges_table.sql: SQL to create a pre-populated table into a MySQL database.
  2. iana_ipv4_address_space_registry.csv: comma separated values list of all countries, regions and their respective IP ranges.
  3. ip_lookup.php: to use the database
  4. License.txt: Released under GNU/GPL
  5. ReadMe.txt
What is it?
I wanted my own IP lookup script to tell me the country that is allocated a given IP address, this is what I use.

The scripts in the folder you have downloaded are to create a lookup function using a MySQL database and a PHP script. As well as a CSV file equivalent.


How to use:

  1. Download from my site: «Download»
  2. Run the SQL script against a test database,
    1. Modify the table name to use if necessary.
    2. Uncomment the drop statement if running for the second time.
  3. Modify the PHP file to use database login credentials,
    1. $db_host = "localhost"; // Database host name
    2. $db_user = "my_database_user"; // User for database authentication
    3. $db_pass = "my_database_password"; // Password for database authentication
    4. $db_name = "my_database"; // Database name
    5. $db_table = "mytable_countryipranges";// Database table
  4. Upload the PHP file to your website
  5. Test by using a web browser to visit: http://www.mysite.com/ip_lookup.php?ipv4=123.123.123.123 where www.mysite.com is your website where you uploaded this script. // should return China

Any questions, suggestions?
We are looking to add the ability to generate this data using other sources and in time a region by IP for more accuracy.

Feel free to feedback. It's FREE to download unlike others which is probably why I made the generator in the first place but I do like to make people sign up so I can gauge the level of interest.

What?
Please note: the following article is not a solution but a page of various methods and date conversions which I try and use depending on the situation.

This is a quick article on how I got time conversion working in an SSIS package which read from a text file. Note that the example below converts a string in European Date Format (ie. "ddmmyyyy" to "dd/mm/yyyy"). Also, my data flow imports two dates one which was imported as a string (DT_WSTR) and another as a integer (DT_R8).

Why?
It took me a long time to figure this and it was only by trawling through columns that someone mentioned that maybe all the data in that column is not consistent? This made sense as I need to parse the string to extrapolate the date, month and year.

How?

What?
This is an article on how to do a restore from backup on a database but when you get the error: "... database is in use".
copyraw
-- SQL Server 2005
EXEC SP_WHO          // details on who is logged in
GO

-- SQL Server 2008
EXEC SP_WHO2         // even more details
GO

-- Run as database owner to see ALL connected processes as well.
  1.  -- SQL Server 2005 
  2.  EXEC SP_WHO          // details on who is logged in 
  3.  GO 
  4.   
  5.  -- SQL Server 2008 
  6.  EXEC SP_WHO2         // even more details 
  7.  GO 
  8.   
  9.  -- Run as database owner to see ALL connected processes as well. 


Why?
For every DBA this is a doddle and doesn't warrant its own article but for those of us who merely use SQL Server Management Studio (SSMS) and Microsoft's SQL Server 2008 R2 for development purposes, the once-in-a-blue-moon restore from backup process is quickly forgotten.

How?
You need to set the database to single-user mode.
Category: Databases :: Article: 491

Applies to:
- MS Windows 7 Enterprise


What?
So I can ping the server the Oracle 11g database sits on. I've installed the Oracle 11g client tools and can connect using sqlplus. But if I tnsping any oracle database, I get something along the lines of:
copyraw
Message 3511 not found; No message file for product=NETWORK, facility=TNSMessage
3512 not found; No message file for product=NETWORK, facility=TNSMessage 3513 n
ot found; No message file for product=NETWORK, facility=TNSMessage 3509 not foun
d; No message file for product=NETWORK, facility=TNS
  1.  Message 3511 not found; No message file for product=NETWORK, facility=TNSMessage 
  2.  3512 not found; No message file for product=NETWORK, facility=TNSMessage 3513 n 
  3.  ot found; No message file for product=NETWORK, facility=TNSMessage 3509 not foun 
  4.  d; No message file for product=NETWORK, facility=TNS 

Why?
We NEED several instances of Oracle installed as we have different products/services and these run off various instances of Oracle 9i, 10g, and 11g. This article was written for those that need to support these kind of systems and not as an invite for suggestions on how my business should be run.


How?
So there are a variety of solutions that will fix this. However we have certain restrictions in my work environment thanks partly to group policies:
Category: Oracle PL/SQL :: Article: 490

Applies to:
- Microsoft Windows 7 Enterprise
- User with Local Administrator Privileges (required for setup)


Why?
Our work has group policies and two of our programs, Visual Studio 2010 Ultimate (VS2010) and Business Intelligence Development Studio (BIDS), require elevated or administator rights/privileges when run. This is so that these programs can write back and forth to our C drive. If we don't run them as local administrators on the workstation, they error incessantly and never manage to do what you want them to do.


What?
I want to create a desktop shortcut that I can double-click and it will run the above programs in administrator mode without confirmation by the Windows operating system. At home this may not be a problem but this is intended for those in an office environment and we get prompted to login (with the same account as we're currently logged-in with???) instead of being able to just click on "Yes".


How?
The gist is that we're going to create a scheduled task (that won't be scheduled) and a shortcut to that task:

What?
We have an excel spreadsheet which reports against a mySQL database and reads time spent on projects by IT Service colleagues. The main report is a pivot table with staff members along the top, tasks down the first column, and time spent in the form of person days in the cross-join.

Why?
Currently the smallest bookable time by low-level tape monkeys and techies is 30 minutes (Managers it would appear can book whatever time, eg. 5mins). 30 minutes for us translates to 0.07 in person days (a person day being 7 hours and 24 minutes or 26640 seconds).

How?

What?
So many people asking this when the solution is a bit of aesthetic styling.
copyraw
ol{margin:4px}

-- yields
995.
996.
997.
998.
999.
000.      <-- What's going on here then?
001.
002.
  1.  ol{margin:4px} 
  2.   
  3.  -- yields 
  4.  995
  5.  996
  6.  997
  7.  998
  8.  999
  9.  000.      <-- What's going on here then? 
  10.  001
  11.  002
Or check out this screenshot of the issue:
Ordered List Issue

How?
Category: Cascading Stylesheets :: Article: 485

What?
For those of you who use Preg_Replace. Preg_replace is a function that uses regular expressions to search and replace a string.

Why?
Because my understanding with regular expressions is shady and varies from language to language, I've written this article as a quick reference point.

How?

What?
This article isn't unique as there are other tutorials out there. This is meant to detail a process to export a database using MySQL Workbench and then to import it into another database.

Why?
If you're confined to use this product then this is how to do it. Personally, even a web-based app such as PhpMyAdmin would fare better.

How?

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

time   license   find   work   zoho   value   system   form   order   date   field   files   data   table   would   version   windows   joomla   where   display   source   client   mysql   server   list   used   google   website   uploaded   following   parameter   added   code   page   name   using   create   case   report   first   database   file   note   deluge   script   creator   error   function   user   need   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.