Workshop

Magento Url "http://localhost:8080/magento/" is not accessible

I got this error message. Magento Url "http://localhost:8080/magento/" is not accessible

A quick google on this one brought the answer in this link:

http://www.magentocommerce.com/boards/viewthread/8785/

The answer is to make a subtle change on line 139.

Hi, to install 1.0.19870.1, please edit app/code/core/Mage/Install/Model/Installer/Config.php on line 139, replace:

From
$client = new Varien_Http_Client($url. $prefix);
to

$client = new Varien_Http_Client($url.'index.php/' . $prefix)

More details at the link.

XAMPP: cannot load php extension

Here is what happened to me: I am trying to install magento on my local xampp, and I run into a screen that tells me that I must load curl and mcrypt. No biggie. I look for the php folder, locate the php.ini and uncomment the two lines. I restart apache. I start the installation process again, and guess what? Nothing. I ran into the same problem. I restart again. The same issue.

Time to google this one. I tried several tries until I hit this page:

http://www.zen-cart.com/forum/showthread.php?t=75924

In the thread I learned that the php.ini that xampp uses is not located in c:\xampp\php, but in C:\xampp\apache\bin

Of course it works right after that. :)

Ruby on Rails Checkbox Fields

How to insert checkboxes into a Ruby on Rails(RoR) view form so that it properly checks the box if the record The solution:
<p><label for="rules_set_commerce_allowed">Commerce allowed</label><br/>
<%= check_box ("rules_set", "commerce_allowed") %>

Before I found this solution, I had figured out this other solution, following some hints found in some site which I can no longer find. It does it job, but it is not as easy as the one above, which is more correct.

< input type="checkbox" id="rules_set_commerce_allowed" name="rules_set[commerce_allowed]" value="2"
<%=  @rules_set.commerce_allowed  == true  ? ck = "checked" : ck = "" %> />

C Programming Language, Exercise 1-4

Have I said that, until further notice, they have all been compiled using the cygwin? I love the command line...

/* print Celsius - Fahrenheit table
  for celsius = 0, 20, ..., 300; floating-point version*/

main()
{
	float fahr, celsius;
	int lower, upper, step;

	lower = -10; 	/* lower limit of temperature table */
	upper = 150;  	/* upper limit */
	step = 10;   	/* step size */

	celsius = lower;
	printf("Cel   Fahr\n");
	printf("----------\n");
	while (celsius <= upper){
		fahr = (celsius * (9.0/5.0)) + 32.0;
		printf("%3.0f %6.1f\n", celsius, fahr);
		celsius = celsius + step;
	}
}

C Programming Language, Exercises 1-3

Exercise 1-3. Modify the temperature conversion program to print a heading above the table.


#include 

/* print Fahrenheit-Celsius table
  for fahr = 0, 20, ..., 300; floating-point version*/

main()
{
	float fahr, celsius;
	int lower, upper, step;

	lower = 0; 	/* lower limit of temperature table */
	upper = 300;  	/* upper limit */
	step = 20;   	/* step size */

	fahr = lower;
	printf("Fahr  Cel\n");
	printf("----------\n");
	while (fahr <= upper){
		celsius = (5.0/9.0) * (fahr-32.0);
		printf("%3.0f %6.1f\n", fahr, celsius);
		fahr = fahr + step;
	}
}


C Programming Language, Exercises 1-1 and 1-2

This is the first exercise of "The C Programming Language" by Kerningham and Ritchie. I will see how many of these I can do and record here. It is probably the most famous one.

Exercise 1-1 Run the "Hello World" program on your system. Experiment with leaving out parts of the program, to see what error messages you get.


#include 

main()
{
	printf("Hello, world\n");
}

Exercise 1-2 Experiment to find out what happens when printf's argument string contains \c, wher c is some character not listed above.

Answer: I get a warning on my compiler, telling me that there is an unknown escape sequence \c, where c is a character not listed above.

Lottery Probability Simulator

Check your luck on winning the lottery!

Could you win the lottery?

According to the DC lottery site, to hit the jackpot, there is a 1:146,107,962 chance of hitting the jackpot. That is 146 million, 107 thousand and 962 against 1. That is huge.

Most people don't fully understand how many tries it takes to win the lottery with those odds. Fortunately, I have created this little online application that will let you try as many times as you want so that you will get an idea. You can try many, many times. Good luck!

Enter 5 lucky numbers between 1 and 55, and a power ball number between 1 and 42. Separate numbers using spaces:

Result:

No luck. You lost.
Try again!

You won! You would have won the lottery!
Unfortunately you already used your luck up by testing your chances here. :(

A simple Javascript command-line web interface

Console



Provided by www.hugoestrada.net, 2007.

Binary, Hex, and Octal Numbers Drilling Machine

Base Conversion Driller


Drill to master the subject or to prepare
for tests.

Select on which bases you want to drill:

Convert:  To: 

Number: 

Answer: 

Correct:   Attempted:   

 

Provided by www.hugoestrada.net, 2007.

Syndicate content