Can any finite bit string be found in pi within a reasonable amount of time? [closed]

Expanding on my comments. There’s a very important concept here that’s called information entropy. Out of full disclosure, I’m the current world record holder of the digits of Pi at 10 trillion digits (10^13). I have approximately 10,000 copies of everyone’s social security number. However that doesn’t mean I can just hack into everyone’s accounts … Read more

How does cpu communicate with peripherals?

In older architectures, peripherals were accessed via a separate mechanism to memory access with special I/O instructions. On x86, there were (and still are!) “in” and “out” instructions for transferring bytes between the CPU and a peripheral. Peripherals were given addresses, for example 0x80 for the keyboard. Simplifying a lot, doing “in 0x80” would read … Read more

Relaying a request in asp.net (Forwarding a request)

I have an extension method on HttpResponseBase to copy an incoming request to an outgoing request. Usage: var externalRequest = (HttpWebRequest)WebRequest.Create(“http://stackoverflow.com”); this.Request.CopyTo(externalRequest); var externalResponse = (HttpWebResponse)externalRequest.GetResponse(); Source: /// <summary> /// Copies all headers and content (except the URL) from an incoming to an outgoing /// request. /// </summary> /// <param name=”source”>The request to copy from</param> … Read more

Android – getTargetFragment and setTargetFragment – What are they used for

Use case = 2 fragments hosted by the same activity. Where startActivityForResult() establishes a relationship between 2 activities, setTargetFragment() defines the caller/called relationship between 2 fragments. setTargetFragment(target) lets the “called” fragment know where to send the result. onActivityResult() is called manually in this case. public class Caller extends Fragment Fragment called = Called.newInstance() called.setTargetFragment(this) public … Read more

What is spark.driver.maxResultSize?

assuming that a worker wants to send 4G of data to the driver, then having spark.driver.maxResultSize=1G, will cause the worker to send 4 messages (instead of 1 with unlimited spark.driver.maxResultSize). No. If estimated size of the data is larger than maxResultSize given job will be aborted. The goal here is to protect your application from … Read more

Working with USB devices in .NET

I’ve tried using SharpUSBLib and it screwed up my computer (needed a system restore). Happened to a coworker on the same project too. I’ve found an alternative in LibUSBDotNet: http://sourceforge.net/projects/libusbdotnet Havn’t used it much yet but seems good and recently updated (unlike Sharp). EDIT: As of mid-February 2017, LibUSBDotNet was updated about 2 weeks ago. … Read more

Explaining why “Just add another column to the DB” is a bad idea, to non programmers [closed]

I tell them I can create a system of tables that allows each client to define their own set of custom fields, but of course that takes more time and money than “just adding a few columns”. I think you should push this option to your bosses since customizability is obviously a feature much in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)