driverdave

u/driverdave


r/leetcode•

I've never taken a coding test, and I'm trying to figure out the spirit of the question here, want to make sure I'm doing this correctly.

Here is an example question: Given an integer array nums sorted in non-decreasing order*, remove the duplicates* in-place such that each unique element appears only once*. The* relative order of the elements should be kept the same*. Then return the number of unique elements in nums. Consider the number of unique elements of nums to be k, to get accepted, you need to do the following things:*

  • *Change the array nums such that the first k elements of nums contain the
2114


r/MTB•

Been riding for around 30 years, but this has come up a couple of times recently, so I wanted to know what people think.

When 2 people are riding in the same direction, is the slower rider obligated to stop (or otherwise change how they are riding) to let a faster rider pass?

I've always worked under car rules, in that the slower rider is under no obligation to to anything, and the faster rider needs to wait for a spot to safely pass. It's nice if the slower rider pulls over, or otherwise allows the faster rider to pass, but the slow rider is not obligated to do anything.

I'll usually say "mind if I get by you on the left" when there is a good spot to pass. If I get by, great. If not, I r

733


r/hackintosh•

Considering a build and have a few questions that will determine the build I go for.

Machine will run Sierra and be used for coding (usually one VM), web surfing, no gaming.

Hardware would be 4 GHZ Core i7-6700K, 16 to 32 GB RAM, 1 internal SSD drive. For WiFi I'll be following this thread: https://www.tonymacx86.com/threads/...ini-cards-pcie-and-mini-pcie-adapters.147734/

Would like analog audio, WiFi, sleep/wake, handoff, continuity, iMessage and FaceTime. Don't care about watching DRM video from iTunes or digital audio.

Can I run a 4K monitor (with all OS X scaling and resolution options) @ 60HZ using onboard video of a Core i7-6700K? If not, what is the least powerful/best supported

21


r/htpc•

looking to recommend a windows box for a non tech friend to buy that will run kodi well.

looking to go as low end and inexpensive as possible while still playing video smoothly. will be streaming, 720 or 1080 works, no need for 4K.

was going to recommend the hp stream mini, but it looks like it's been discontinued.

any thoughts?

631

r/mysql•

i've been searching for something that will connect to 2 different MySQL databases, compare their structures, and spit out SQL that will bring one of the databases up to date with the other one.

i've been using this https://code.google.com/p/sql-dump-schema-diff/ and it's almost there, only it ignores indexes, which we need.

looked at red gate software, but i need this to run on linux and be scriptable, not sure if red gate provides those CLI tools.

any suggestions?

611

r/Westfalia•

http://www.thesamba.com/vw/classifieds/detail.php?id=1647328

Thinking about buying my first westy. Any thoughts or recommendations on making an offer on this 84 westy with a Subaru conversion?

$20,000 seems a bit high to me. My thoughts are the westy is worth around $8,000 to $9,000 and the subaru conversion adds around the same amount of value. So i'm thinking about offering $17,000. Am i in the right ballpark?

I'm mechanically competent, but there is no way i could do a subaru engine conversion myself, nor would i want to buy a van with a WBX, hunt down an EJ22, and hire a garage to do a conversion.

Really want an engine other than the WBX.

33

r/MTB•

i have a 2012 Trek Superfly 100 AL Elite, and i have some sticky black sludge buildup on my left stanchion. i'm guessing i need to change the oil, and i figured i'd change the seals while i'm at it.

my front shock is a Fox EVO Float 29 RL 100mm

i'm looking to pull my lowers, change the seals, and replace the oil. no other service.

one thing i can't seem to find anywhere is my stanchion size. 32mm, 36mm and 40mm seem to be my options. does anyone know where i can look this up, or know what size my fork is?

for pulling my lowers & changing the oil, is this the guide i need to follow? http://service.foxracingshox.com/consumers/Content/Service/Forks/FLOAT/FLOAT_RL.htm

do i need to mess

813

r/PHP•

i have this class setup for mysql queries

[code] class Database { private static $instance; // stores the MySQLi instance

private function __construct() { } // block directly instantiating

private function __clone() { } // block cloning of the object

public static function call($config = NULL)
{
	// create the instance if it does not exist
	if(!isset(self::$instance))
	{
		$user = "";
		$database = "";
		$host = "";
		$password = "";
		
		self::$instance = new MySQLi($host, $user, $password, $database);
		
		if(self::$instance->connect_error)
		{
			throw new Exception("MySQL connection failed: ".self::$instance->connect_error);
		}
	}
	// return the instanc
08