How to get rid of the dotted border around a link when it has been clicked.
a {
outline: 0;
}
How to get rid of the dotted border around a link when it has been clicked.
a {
outline: 0;
}
On web forms the browser stores previously typed in data and if you start typing in the same data a dropdown list appears below with these options. Sometimes this can be annoying and gets in the way when you use the form regularly with unique data each time. To turn this function off on selected form elements use the following code:
<input type="text" value="test text" autocomplete="off" />
Use the attribute in the input element autocomplete with the value off to stop the drop down list appearing.
Using the HTML IF condition to load in the appropriate CSS for the client’s browser. Importantly the conditional comment only work for Internet Explorer, but can be used to detect the different versions. This is very useful because all of the IE browsers render CSS and HTML differently, which is why it can be so challenging make a site work the same across browsers. Read more
To get MySQL variables in c# to work you must put this text at the end of your connection string “Allow User Variables=True“. The reason this is turned off in the first place is because when c# parameters are used, they are identified by an ‘@‘ sign which conflicts with MySQL variables. But now you can use the ‘?‘ question mark to add parameters to the query string using the method AddWithValue(“?param”, paramVar);.
mysqlCommand.Parameters.AddWithValue("@lastestUrl", lastModified);
I recently found myself in a situation where I had to get data from MySQL database which had identical date-times but had text data in another column to uniquely identify a record. So I could use the combination to identify a unique record the problem was when appending a file with new records which had half of the records with the exact same date-times.
I constructed a query with some help to get the rest of the records from the last entry in the file. This is done by:
You can use the query below for any instance where one column has exactly the same numbers which you need to order by with another uniquely identifiable column, so you know where you should start pulling from.
A clever use of SQL variables and sub queries.
Select x.column c
FROM (select @rownum:=@rownum+1 as rownum, a.column
FROM table a, (SELECT @rownum:=0) r
WHERE a.datetime >= '2010-08-02 12:53:12' ORDER BY a.date ASC) x
where x.rownum > (Select x.rownum FROM
(select @rownum:=@rownum+1 as rownum, a.text
FROM table a, (SELECT @rownum:=0) r
WHERE a.datetime >= '2010-08-02 12:53:12' ORDER BY a.date ASC) x
where x.text = 'unique-descriptive-text');
Web performance is commonly overlooked especially when an e-business is just starting as they are trying to get up and running as quickly as possible. This is understandable but with a little forethought and planning at the start they could avoid complications developing at the time they update their site. The main motivation behind website performance is Read more
How the INSERT IGNORE works in MySQL: If a record exists in the table it will be ignored else a new row will be inserted. It works in the same way as INSERT IF NOT EXISTS. If the record has a slight difference then a new record will be added creating a duplicate record. Also if your table has a unique key of some kind an error will occur and the insert will be aborted.
To avoid duplications a better method is REPLACE INTO which replaces any data in any field that is not up to date. This prevents any duplicate records from appearing in the database. This overwrites the current records but if you don’t want this you are better off implementing some sort of version control. For instance when an article is edited, the updated version is inserted as a new record. Then you just use a date time stamp to identify the latest version. This does mean when there are a lot of edits the database will increase in size very quickly but its really easy to write a function that deletes old records.
Both INSERT IGNORE and REPLACE use the insert … values or insert … set syntax.
The idea here is to be able to update your website or a client’s website quickly, efficiently and effectively without having to mess around with HTML code and CSS but with free web editing software. Lets say you lack the technical know how or the budget does not allow for the purchase of a good hosting package to install a Content Management System to update the site. If this is the case a good option is to look for a free web editor that can do the simple job of maintaining the web content. Read more