turbopowerdmaxsteel
Members-
Content Count
460 -
Joined
-
Last visited
Everything posted by turbopowerdmaxsteel
-
You can only use the rand function to generate a random number. However, this number can be used to call any of those functions randomly. This can be easily accomplished using a switch - case statement. switch(rand(1, 3)){ case 1: sheild(); break; case 2: sword(); break; case 3: helmet(); break;}
-
How To Do Internal Redirects?
turbopowerdmaxsteel replied to turbopowerdmaxsteel's topic in Websites and Web Designing
NC stands for no-case which means the regular expression will not be case-sensitive. L stands for last-rule which implies that re-writing should stop here and no more rules should be applied. -
How To Do Internal Redirects?
turbopowerdmaxsteel replied to turbopowerdmaxsteel's topic in Websites and Web Designing
I have managed to get the ModRewrite working. Suppose your old RAR file is located at http://forums.xisto.com/no_longer_exists/ and the new file is located at http://forums.xisto.com/no_longer_exists/. Create the .htaccess file in the downloads directory with the following code:- RewriteEngine OnRewriteCond %{THE_REQUEST} yccbotmaker1\.1\.rar [NC]RewriteRule .* /downloads/yccbotmaker1.2.rar [L] My problem was that the page I was re-directing from had a query string at (http://forums.xisto.com/no_longer_exists/) and the REQUEST_URI server variable would only contain upto /products/buy/[/b[, so the regular expressions never matched. After some googling, I found out that THE_REQUEST server variable contains the exact file path specified in the HTTP request by the browser. -
I have a Buy Now page for one of my existing softwares located at http://forums.xisto.com/no_longer_exists/. The page is generated based on a query from the database which includes product name/price. One of my products will now support different versions which will vary in costs. I want to redirect the visitor to an internal page like http://forums.xisto.com/no_longer_exists/ when they visit the former link. But, I want the URL displayed on the Browser to be http://forums.xisto.com/no_longer_exists/. I know this is called internal redirect and can be done through mod_rewrite, but I am at a loss on how to do it. Please help.
-
I have had my share of IRQL_NOT_LESS_OR_EQUAL stop messages as well. After complete dis-assembling and part by part assembling, I could pin-point the culprit to be the newly installed memory module. I was aware of the incompatibility of modules with different clock frequencies, so I bought one that matched the existing one. Yet both of them would just not work together. The Stop error used to show up after 4-5 minutes of strenuous activity such as file compression. Although, games didn't trigger this.Both of those RAM chips worked fine when used alone, but together they just seemed incompatible. Surprisingly, the chips are working fine when used in single channel mode.
-
Consider this forum itself. In basic terms it could be understood as people writing topics and replying to them as posts. These topics and posts can be viewed by anyone connected to the web. For this, all these information need to be stored somewhere. If you are aware of HTML you could say that the posts are stored in HTML files which are then sent back to browsers so people can see them. An HTML page, however consists of markup tags along with text. All these buttons, labels, tables, etc will have to be duplicated in each of the pages created and for something as big as the Xisto, it would waste tons of Bytes. So, what do you do? We could avoid repetition by storing the unique contents only, in our case, the content of the post, time of posting, name of the poster, etc. While files can be used for this storage, a database comprising of tables is a much better solution. This allows data to be stored in a unit which is much more logical, thus easy to add, retrieve, modify or delete. If you are aware of a Data Base Management System such as M$ SQL or Oracle, you are ready to go with MySQL. You would also need to have some knowledge of a server side scripting language that supports MySQL. At Xisto we use PHP (I am not aware of any other language either). You can find an excellent tutorial for MySQL at http://www.tizag.com/mysqlTutorial/
-
Thats is just the way Microsoft softwares are built, each new version gets more powerful, user-friendly and bulky. Just take a look at the minimum disk space requirements of their most popular software - Windows. Windows 3.1: 15 MB Windows 95: 55 MB (266% More) Windows 98: 225 MB (309% More) Windows ME: 400 MB 77% Windows XP: 1500 GB 275% Windows Vista: 15000 GB 900% That gives a growth percentage of 266% for Windows 95, 309% for Windows 98, 77% for Windows ME (98 of the new Millenium?), 275% for XP and a massive 900% for Vista. To the elusive computer user, these hardware requirements are not that big of an issue because endless chains of upgradation go hand in hand with Computers. You do have a point though; why waste so much disk space on something as trivial as word processing? The new Office has been aimed at being even more user-friendly, something which it definitely does by employing the cool Ribbon controls. The Ribbon controls along with the new design is what will be most noticed, but surely there are a lot of embedded features that have been creeping up on the disk space. One might wonder though, whether Microsoft is deliberately increasing the system requirements so that it's Hardware compatriots, most notably Intel get more sales. Edit I almost forgot while typing this, Welcome back to the forum, KDEWolf.
-
While History.back should do it, on some ocasions the values of Textarea controls get reset. You can use cookies to save those data. When the user is re-directed back to the original page, load the contents from the cookies.Say you have a form (form.php) with two fields Name & Message & the form submits the data to your submit.php file. This file should validate the data and on error store the data as cookies to the browser along with a status flag that denotes whether the action was completed successfully or not. Now, when the user clicks on the Back button, user is re-directed to the form.php file which checks the value of the status flag and loads the contents from the cookies accordingly.Cookies could be avoided by using a different mechanism. The submit.php file should output the page with Back button as form. This form would contain the previously typed messages as hidden fields. On submit via HTTP POST (when user clicks on BACK button), these contents would be supplied to form.php which would load the values into the fields.
-
You need to generate non-repeating Random numbers. I made a class for the same which can generate non-repeating Random numbers within a specified range or select a non-repeating Random number from a supplied list of numbers. The numbers will be repeated after a complete cycle finishes and all the numbers have been generated once. You can find the VB.NET code at http://forums.xisto.com/no_longer_exists/ You could modify the code a bit to directly select one of your words stored as string types. Public Class RandomNumber Dim WordDomain As New ArrayList ' The Words to be generated Dim Words As New ArrayList ' The Words waiting to be generated Sub New(ByVal ParamArray Words() As String) ' Words in a Param Array Dim Word As String For Each Word In Words WordDomain.Add(Word) Next AddItems() End Sub Sub New(ByVal Words() As String) ' Words in a String Array Dim Word As String For Each Word In Words WordDomain.Add(Word) Next AddItems() End Sub Private Sub AddItems() Words.Clear() ' Insert All Words Into the Array Dim I As Integer For I = 0 To WordDomain.Count - 1 Words.Add(WordDomain(I)) Next End Sub Public Function GetRandomWord() As String If Words.Count = 0 Then ' Re-add the Items, when all the words have been generated. AddItems() End If ' Return a Random Item and Remove it from the List Dim Ch As Integer ' Using Timer as the seed for the Random Number Generation Randomize(Microsoft.VisualBasic.Timer) ' Random Number is generated within the range. Ch = 0 + CInt(Rnd() * (Words.Count - 1)) Dim Word As String = Words(Ch) Words.RemoveAt(Ch) Return Word End FunctionEnd Class The above code generates Random words based on a supplied list using a String array or as a ParamArray.
-
On my old PC back at home, the monitor had a similar problem. After prolonged inactivity, the monitor would just not power on. It used to work only after repeated power cable connects/disconnects. And this happened more during winter. (I guess the circuits were freezed or something) The mechanic was able to fix it by replacing some minor chip. The monitor is not one of those PC components that you have to keep upgrading. So, you should definitely get it fixed by a mechanic.
-
Thanx, lee. That glitch is exactly what I was trying to solve. I found a solution to the problem which requires the usage of SendMessage API. First we create a property which is used to obtain the current position of the scrollbar just before the text is to be updated. Then I used the technique that you mentioned and subclassed the RichTextBox to prevent the paint messages from being processed. Lastly, the property was used to restore the position of the scrollbar. The code can be found at http://forums.codeguru.com/showthread.php?281765-Disable-Scroll-in-RichTextBox
-
I am working on a Syntax Highlighter for the latest version of Pika Bot (built in C# .NET) wherein the responses can be saved to a human friendly format. Example:- /*Comment gfhfghfg*/Condition _Condition1u : BuddyComesOnline{ BotGroup == "_ssi"; BuddyName == "*"; StatusType == "Idle"; ForSeconds == "60";}/*Comment asdasd*/Effect _Effect1 : MessageBox{ Title = "Pika Bot"; Message = "sdfsfsfsf"; Icon = "Asterisk";}/*ghjgj*/Integer _Variable1 = "0";/*asdas*/Trigger _Trigger1 : ON{ Conditions { _Condition1u; } Effects { _Effect1; }}Bot _Bot2{ ID = "asdasd"; Password = "ĹžĹâşĹžĹĂ´ĂâşĹžĹâşĹž"; Encrypt = "True";}/*asdasdas*/Bot _Bot1{ ID = "sdasd"; Password = "asdasda"; Encrypt = "False";}/*asdasda*/BotGroup _BotGroup1{ _Bot2}BotGroup _ssi{ _Bot1} The syntax highligher does some basic coloring of the keywords namely: Condition, Effect, Integer, String, Trigger, Bot and BotGroup, string constants, comments and Condition/Effect Types such as BuddyComesOnline and MessageBox. I learnt that there are two ways to go about doing this. One is to use the SelectionStart, SelectionLength, SelectionColor properties provided by the RichTextBox control and second to modify the RTF code directly. The first process is rather slow and is marred by flickers, so I chose the second option. Even though its much faster there is one problem that I can't get through. Loading the entire RTF code causes the scroll position to be modified. The control only provides the ScrollToCaret() method which I am unable to use to restore the previous scroll position. Is there any way to make a RichTextBox control scroll to a specific position? I have attached the sample application which does the highlighting. It requires .NET Framework 2.0 or higher.
-
Blu-ray Wins The High-def Dvd Race
turbopowerdmaxsteel replied to jimmy89's topic in Websites and Web Designing
The progress in Optical storage devices has been phenomenal. Blu Ray Discs are to DVDs what DVDs where to CDs with a storage capacity of roughly 25 GB per layer. Once they become cheap and mainstream form of Optical discs, I will purchase a compatible drive. -
How To Host An External Subdomain?
turbopowerdmaxsteel replied to TavoxPeru's topic in Web Hosting Support
Say your external sub-domain is abc.xyz.com. This domain actually maps to some sub-domain on your Xisto account like tavox.astahost.com/sub/forum/. Any URL such as abc.xyz.com/posting.php will be actually tavox.astahost.com/sub/forum/posting.php The thing that you need in this case is an external re-direct, if I am not mistaken. I came across one such discussion at http://forums.xisto.com/no_longer_exists/ However, I couldn't put into work. You should give it a try. Another thing that could be done is that a PHP page in your external domain could forward the HTTP requests to the actual pages. Using .htaccess file any URLs for the site, such as abc.xyz.com/posting.php could be redirected to abc.xyz.com/index.php. This page would open a connection and get the actual contents from the url, say, tavox.astahost.com/sub/forum/posting.php and display the results to the browser. This should only be done as the last resort as the bandwidth usage becomes double and you'll also have to handle cookies. -
Use $_POST outside of the double quotes. if ($_GET['recover'] == 'answer') mysql_query("update users set userpass=" . $_POST['pass'] . "where email=" . $_POST['email']) or die(mysql_error());
-
email is the name of the field in the form, correct? Depending on the HTTP method of submission you are using for the form, you can retrieve the values as:-$_GET['email'] for GET method$_POST['email'] for POST method
-
Can Anyone Help Me Detecting 503 Errors In Php Progs ?
turbopowerdmaxsteel replied to Sten's topic in Programming
Use the error_reporting() function to set the error_reporting directive as follows:- Disable: error_reporting(0); Enable: error_reporting(1); Use this before the block you want to disable error reporting. You should however turn it back on, otherwise all errors will go undetected. <?phperror_reporting(0); // Disable Error Reporting$online = file_get_contents("http://www.habbo.com/habbo_count_xml.action; or die(" 0");error_reporting(1); // Turn it back on$onlinee = trim(strip_tags($online));echo $online;?> -
While there are simpler methods to send email notifications via SMS, I am having to use quite a few of redirects. My mobile service provider (Reliance) does not allow SMS to be sent from the Internet using the standard (CountryCode)+MobileNumber@yourserviceprovider.netI want to receive notifications for my GMail account. So here's what I did:-1. Setup E-Mail forwarding to my Yahoo! account.2. Use a custom version of Pika Bot to set up a Trigger which calls a method of an external assembly along with the Mobile number and the message (Mail from Mail From: %LastMailFrom% <%LastEMail%> %LastEMailSubject%").3. The target assembly uses web requests to send the SMS through a Way2SMS account (only for India).Although the process works and I receive the SMS pretty quickly, my Yahoo! account @ Pika Bot needs to be logged in. I was wondering if it is possible to do an HTTP request (open a PHP file) as soon as an E-Mail arrives to one of my domain email accounts. The PHP file would do the job of the external assembly and send the SMS through Way2SMS. But is it possible to trap an incomming E-Mail event?
-
Full Disk Usage Warning In Cpanel
turbopowerdmaxsteel replied to turbopowerdmaxsteel's topic in Web Hosting Support
Whatever the problem was its not there anymore as the disk space is now being properly reported (140 MB). Sten, I think you'll find the missing space recovered as well. -
Full Disk Usage Warning In Cpanel
turbopowerdmaxsteel replied to turbopowerdmaxsteel's topic in Web Hosting Support
I am using Disk Usage Viewer. However, the total used space comes to around ~157MB while the General account information in the CPanel shows 414.45 MBs in use.