Web Development

Windows based Web Development
IIS – ASP.NET – Visual Studio – C#

How to Convert Julian Date to Gregorian in MS SQL

2017/09/20
By
Modified: 2017/09/16
SQL - Convert JUL to GREG

Julian date is stored in YYYDDD format, for example 12/31/99 will be stored as 99365 and 01/01/2017 will be stored as 117001. If you need to convert the date from YYYDDD to any conventional date format like dd/mm/yyyy in SQL use steps below. The idea is to convert year and date portions separately and them add them together and use CONVERT function to get any date format that you require. Here is a script that shows the conversion process step-by-step. SELECT -- Limit output for 9 rows TOP 9 -- 00 Julian date - 91244 FAEFTB, -- 01 Greg year - 1991 cast(left(CAST(FAEFTB as decimal)+1900000, 4) as char(4)) AS GREGYEAR, --…

Read more »


How to Work with MySQL – Basic Tasks

2017/09/16
By
Modified: 2017/09/10
How to Work with MySQL – Basic Tasks

This material is tested with MySQL 5.1 and 5.5 on various Windows versions. This article covers these topics: -010- MySQL Data Location -020- Shortcut to MySQL Command Shell -030- Create a New Database -035- Delete an Existing Database -040- Display a List of All DB Users -050- Display a List of All Tables -060- List All Fields in a Table -070- Free ODBC Connector is Available -080- Create a New User -085- Change User Password -090- Delete a User -100- Grant User Rights to a D/B and Show It -110- Save Database into a Dump File -120- Restore Database From a Dump File -130- Rename Database -140- Backup Database -150- Automate…

Read more »

Histiry of This Site – DomainWebCenter.com

2017/09/15
By
Modified: 2017/09/18
Site History - SunWebCenter

Welcome! This is not a typical article for reading. This is a log of important events in site development and growth.   2017 Sep 09 Sat – 18 Mon Server near crash prompted a flood of exiting changes to site design almost every day: September 09 Sat – – obtain SSL certificate from Let’s Encrypt and transition site to HTTPS protocol – create a test site SunWebCenter.com to load and test all the latest upgrades September 11 Mon – study  online video tutorial (36 min) on MH Magazine  customization September 12 Tue – Stuff preliminary selected WP theme MH Magazine and start customizing September 13 Wed – Buyer registered to buy MH Magazine Pro…

Read more »

Node.js -understanding callback when you have to wait

2017/09/12
By
Modified: 2017/09/10
Node.js -understanding callback when you have to wait

This post demonstrates: – how to write a callback function so that results from your database are returned by the time you are ready to render; – how to use multi-field LIKE syntax in a SELECT statement. The most important thing to understand in Node.js is a callback mechanism and its purpose.  It is all fine and dandy, when you just type something for the training session, or copying code from an Internet example, but things are different, when you need to write you own function that must rely on a callback function.  Here I will show no-blocking code that would process POST request, call for MySQL to execute a SELECT query and…

Read more »

PHP chokes server with TEMP files – Updated and Solved

2017/08/11
By
Modified: 2017/07/22
FastCGI Settings

I am running PHP on IIS 7.5.   This is a Windows 2012 Server.  Fresh clean install every time. The only way to access and delete these TEMP files are by using  a command prompt.  And this deletion procedure will run for several DAYS . . .   The Problem The story goes like this.  Fresh new instance of a Windows 2012 Server is great.  It runs fast and smooth.  But after 5 or 6 months MySQL service having hard times to start up.  And a little later – couldn’t start at all.  The only way I can make it run is to start it from a command prompt.  And finally the whole server just slows…

Read more »

ERROR: Unreadable CAPTCHA cookie – RESOLVED!

2017/08/07
By
Modified: 2017/06/25
WordPress -  Unreadable CAPTCHA cookie

RESOLVED!  One of the test WordPress instances had an impossible, unpleasant and not covered on Google error message.  When user is trying to register, the CAPTCHA code is displayed properly and validation is correct, but when the button Register is press, the page would display this: ERROR: Unreadable CAPTCHA cookie I have a plugin “SI CAPTCHA Anti-Spam” installed.  The error message is from this plugin. I’ve tried changing browsers, clear cache and cookies. Nothing worked.  No luck on Internet search either.  What to do? Finally I changed one of the settings on the plugin itself.  I check an option for: Use CAPTCHA without PHP session And it worked!  The error message…

Read more »

MySQL: Fantastic adventures – WordPress users and their roles

2017/08/05
By
Modified: 2017/06/25
MySQL: Fantastic adventures – WordPress users and their roles

This was exciting. After years of neglect, I have decided to examine, who is registering on my WordPress site, and what is that they are doing. I knew that most of them are just a result of robot activities, and they are just a dead weight in the database (useless users). However, what about the active users, who post in forums, and leave comments, and return regularly? Let me identify and cherish those. I knew I needed a monstrous SQL statement to link several files, and to count various record types, and sort all this in alphabetic order. So the plan was to learn the WordPress (WP) table structure, to start…

Read more »

Can I debug PHP site on IIS? – Yes

2017/08/03
By
Modified: 2017/06/25
Xdebug-PHP-Info

If you have WordPress or any other PHP site hosted on IIS you can debug it for free.  No Apache server is required. You can use NetBeans with Xdebug. This article records all the steps required to debug a PHP site on IIS.  It seems that actual WEB server used is irrelevant.  However, all steps here were tested on Windows 7 SP1 with IIS 7.5. (01) Download JAVA and IDE (Integrated Develop / Design Environment)  This is analogous to MS Visual Studio (VS).  Oracle offers a combo pack – JAVA SDK + NetBeans.  You need both.  Search for “JDK 6 Update 24 with NetBeans 6.9.1″. http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html   (02) From Xdebug download…

Read more »

Remotely Power Up or Wake Your Wired PCs Over the Internet

2017/07/26
By
Modified: 2017/06/25
Power-Up

Idea – Reduce Noise, Save on Electricity My electric company installed an electricity consumption gadget, and ability to monitor usage online. A few month into the experiment I realized, that I can easily reduce electric usage, if I turned off my server. It is been over a year since I migrated all my sites to Amazon cloud, so now my server only needs to be on, when I need it on. All the nights and 90% of all work hours it can be off.  But how to do that? I recall seeing something in BIOSes of Intel motherboards called Wake-On-LAN.  First time I saw something like this was in May of…

Read more »