Skip to content

Instantly share code, notes, and snippets.

View danahern's full-sized avatar

Dan Ahern danahern

View GitHub Profile
The remote service appears to encrypt traffic using SSL protocol version 2.
Netscape Communications Corporation introduced SSL 2.0 with the launch of Netscape Navigator 1.0 in 1994 and it contains several well-known weaknesses. For example, SSLv2 doesn't provide any protection against man-in-the-middle attacks during the handshake, and uses the same cryptographic keys for message authentication and for encryption.
In Internet Explorer 7, the default HTTPS protocol settings are changed to disable the weaker SSLv2 protocol and to enable the stronger TLSv1 protocol. By default, IE7 users will only negotiate HTTPS connections using SSLv3 or TLSv1. Mozilla Firefox is expected to drop support for SSLv2 in its upcoming versions.
As almost all modern browsers support SSLv3, disabling support for the weaker SSL method should have minimal impact. The following browsers support SSLv3:
# Internet Explorer 5.5 or higher (PC)
# Internet Explorer 5.0 or higher (Mac)
NoMethodError occurred in common_elements#find_city_list:
"undefined method `[]' for nil:NilClass"
/var/www/motors/app/controllers/common_elements_controller.rb:35:in `find_city_list'
++++++
Request
++++++
* URL : https://motors.upillar.com/common_elements/find_city_list?model_name=dealership
* Server : motors.upillar.com
NoMethodError occurred in dealerships#import_data:
"undefined method `read' for \"\":String"
/var/www/motors/lib/dealership_import.rb:17:in `import_autos_file'
++++++
Request
++++++
* URL : http://motors.upillar.com/dealerships/import_data
* Server : motors.upillar.com
require 'net/http'
require 'uri'
require 'hpricot'
module PhoneSystem
class Phone
attr_accessor :action, :destination_number, :upbid, :published_number
attr_accessor :local_to_number, :unassigned_type, :allowed_delayed_provisions, :toll_free_if_no_match, :local_assignment_order, :local_require_rc_match
attr_accessor :local_require_npa_match, :local_distance_match, :max_numbers, :extension, :name, :allow_delayed_provisioning, :start_date, :end_date, :suspended
attr_accessor :new_number_date, :new_number, :toll_free_if_no_match, :permitted_area_codes, :prohibitied_area_codes, :prohibitied_numbers, :verify_company_name
This file has been truncated, but you can view the full file.
[{"game": {"rating": "E (Everyone)", "players": "4", "platform_id": null, "platform": "ds", "title": "1 vs. 100", "notes": "1 vs. 100 puts you in the hot seat as you play against 100 mob members! Answer the questions correctly and eliminate the mob members. If you give the wrong answer, the game is over! 1 vs. 100 for the Nintendo DS recreates the fun of the hit TV show, while", "id": 1, "publisher": "Destination Software Inc.", "game_urls": "/games/platforms/ds/1vs100"}}, {"game": {"rating": "T (Teen)", "players": "4", "platform_id": null, "platform": "ds", "title": "1701 A.D.: Dawn of Discovery", "notes": "(Also known as \"Anno 1701: Dawn of Discovery\") In Anno 1701 you can experience the adventurous world of the 18th century with up to three friends, mobile and wireless. Explore, settle and expand in a completely new world. Prove yourself as adventu", "id": 2, "publisher": "Disney Interactive Studios", "game_urls": "/games/platforms/ds/1701addawnofdiscovery"}}, {"game": {"rating": "E (Everyone)", "players
mysql> select * from listing_types;
+----+--------------------+--------+---------------+---------+--------------+----------+------------+----------------+-------------+---------------------+
| id | name | cost | picture_count | amount | listing_time | position | level | promotion_time | pillar_type | discount_percentage |
+----+--------------------+--------+---------------+---------+--------------+----------+------------+----------------+-------------+---------------------+
| 1 | Gold | 0.00 | 8 | 1 | NULL | 1 | Listing | 0 | NULL | 0 |
| 2 | Platinum | 0.00 | 20 | 1 | NULL | 2 | Listing | 0 | NULL | 0 |
| 3 | Home Page Featured | 99.00 | 20 | 1 | NULL | 3 | Listing | 0 | NULL | 0 |
| 4 | Entry Level | 250.00 |
1) We'll need 1000 fake dealerships created with 1000 fake users
Dealerships can all belong to a single corporation, or create their own corporation whichever is easier.
Tables:
dealerships
users
2) The imported dealership log for each dealership needs to be created.
Table:
imported_dealership_logs
3) Sanitized Dealership Listings should be created for the imported dealership log
When creating the sanitized listings the dealership_ fields should match up with the imported_dealership_log record.
public class BeerSong {
public static void main (String[]args){
int beerNum = 99;
String word = "bottles";
while (beerNum > 0){
if (beerNum == 1){
word = "bottle"; // singular, as in ONE bottle.
}
System.out.println(beerNum + " " + word + " of beer on the wall");
@danahern
danahern / cashier.java
Created November 12, 2008 07:48
A cash register to tell change
//http://www.developer.com/open/article.php/610011
import javax.swing.JOptionPane;
class cashier
{
private static final int penny_value = 1;
private static final int nickel_value = 5;
private static final int dime_value = 10;
private static final int quarter_value = 25;
private static final int dollar_value = 100;
import javax.swing.JOptionPane;
public class cards
{
public static void main(String[] args)
{
String input;
String typeofcard = ".......";
String valueofcard = ".....";
int picture=0;
char[] chararray = new char[5];