|
|
Written by Loginworks Team
|
|
Wednesday, 18 August 2010 06:56 |
using System ; using System.Runtime ; using System.Runtime.InteropServices ;
public class InternetClass { //Creating the extern function for checking internet connection. [DllImport("wininet.dll")] private extern static bool InternetGetConnectedState(out int Description, int ReservedValue) ; |
|
Last Updated on Tuesday, 27 September 2011 12:31 |
|
|
|
Written by Loginworks Team
|
|
Friday, 13 August 2010 21:27 |
|
///<summary> /// Encrypts a file using Rijndael algorithm. ///</summary> ///<param name="inputFile"></param> ///<param name="outputFile"></param> private void EncryptFile(string inputFile, string outputFile) {
try { string password = @"myKey123"; // Your Key Here UnicodeEncoding UE = new UnicodeEncoding(); byte[] key = UE.GetBytes(password);
string cryptFile = outputFile; FileStream fsCrypt = new FileStream(cryptFile, FileMode.Create);
RijndaelManaged RMCrypto = new RijndaelManaged();
CryptoStream cs = new CryptoStream(fsCrypt, RMCrypto.CreateEncryptor(key, key), CryptoStreamMode.Write);
FileStream fsIn = new FileStream(inputFile, FileMode.Open);
int data; while ((data = fsIn.ReadByte()) != -1) cs.WriteByte((byte)data);
fsIn.Close(); cs.Close(); fsCrypt.Close(); } catch { MessageBox.Show("Encryption failed!", "Error"); } }
|
|
Last Updated on Tuesday, 27 September 2011 12:31 |
|
|
Written by Loginworks Team
|
|
Thursday, 22 July 2010 17:05 |
|
Recently a new feature was added to firefox, i got a message box asking for something, "a lazy person's response to the confirmation box was "yes". Figured out later that it has started to show a blinking cursor everytime i clicked anywhere on the browser i.e. firefox 3
Resolution:
Option 1 (easy shortcut): Press F7 (toggles this feature on-off)
|
|
Last Updated on Monday, 03 October 2011 12:25 |
|
|
Written by Loginworks Team
|
|
Monday, 28 June 2010 08:21 |
What does MIME type means for a web server?
MIME types is a way to attach an application to a file type like on a PC we associate a default program with a file extension. The same has to be done for a web server as well. The webserver sends a html header "content-type" when a file is downloaded from the server, this header is used by the browser to open that file with the default program associated with that content type on the user's machine.
How to setup the MIME type for a website (instead of the whole server):
To setup a MIME type, add the following lines to .htaccess (if file is not present create a .htaccess file in the root folder of the website and add the following lines to it):
AddType <content-type> <file extension>
Replace <content-type> with the actual content type or MIME type and <file extension> with the file extension for which the content type should be applied.
e.g. for a .JAD file we would set something like:
AddType text/vnd.sun.j2me.app-descriptor jad
for a java file, we should set:
AddType application/java-archive jar
For shockwave movie we should place:
AddType application/x-shockwave-flash swf
For CAB files (windows mobile phone OTA (over the air) installation:
AddType application/x-cab-compressed cab
Here is a list of common MIME types:
|
|
Last Updated on Tuesday, 27 September 2011 12:31 |
|
|
Written by Loginworks Team
|
|
Thursday, 24 June 2010 05:27 |
When we upgraded our joomla site to 1.5, we ran into multiple issues:
- Our template was not supported in version 1.5
- A few components were not available in 1.5 (as they have never been upgraded)
Another big challenge that we faced was 404's, why? ... SEO
The content has been migrated more or less manually, as the automated processed didn't get the job 100% done. So, our article titles changed and as they were all SEO'd so the URLs changed. Our website started throwing 404s left right and center, but there was nothing that was helping us, lot of tutorials which said about how to use error.php had all incorrect information, so after trying the easy fixes (reading and implementing) we had to go the hard way (thinking).
This is what solved our problem 100%:
The “system” template is included in the Joomla 1.5 installation. The file error.php located in <JOOMLA_ROOT>/templates/system handles display of error pages. In the beginning of this file (error.php), you should add the following code:
|
|
Last Updated on Tuesday, 27 September 2011 12:32 |
|
|
|
|
|
<< Start < Prev 1 2 3 Next > End >>
|
|
Page 1 of 3 |