Search Results

Search found 44 results on 2 pages for 'xkcd'.

Page 1/2 | 1 2  | Next Page >

  • XKCD’s Take On Password Difficult

    - by Jason Fitzpatrick
    The more difficult to crack password doesn’t have to be the most difficult to remember; XKCD humorously illustrates the power of entropy. On a more serious note, if you’re looking to increase your password strength and variety, make sure to check out our roundup of password best practices. [via XKCD] HTG Explains: What Is RSS and How Can I Benefit From Using It? HTG Explains: Why You Only Have to Wipe a Disk Once to Erase It HTG Explains: Learn How Websites Are Tracking You Online

    Read the article

  • Emacs xkcd installation needs JSON 1.4, not found in ELPA

    - by CodeKingPlusPlus
    I tried to install the xkcd emacs package (where you can view an xkcd comic in emacs) and got the following error: Need JSON 1.4, but only 1.2 is available I tried to get JSON 1.4 but I cannot find it in the package manager ELPA. It also says that I have JSON 1.3 built in and installed. A lot of things seem to not work correctly. How can I get xkcd to work inside of emacs? I use Ubuntu 12.04 and Emacs 24.3.

    Read the article

  • What does this xkcd code do?

    - by cobbal
    On the xkcd site today, the following appeared as a joke in a <script language="scheme"> tag so what does the following code do / represent? (define (eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp) (text-of-quotation exp)) ((assignment? exp) (eval-assignment exp env)) ((definition? exp) (eval-definition exp env)) ((if? exp) (eval-if exp env)) ((lambda? exp) (make-procedure (lambda-parameters exp) (lambda-body exp) env)) ((begin? exp) (eval-sequence (begin-actions exp) env)) ((cond? exp) (eval (cond->if exp) env)) ((application? exp) (apply (eval (operator exp) env) (list-of-values (operands exp) env))) (else (error "Common Lisp or Netscape Navigator 4.0+ Required" exp))))

    Read the article

  • Solving the NP-complete problem in XKCD

    - by Adam Tuttle
    The problem/comic in question: http://xkcd.com/287/ I'm not sure this is the best way to do it, but here's what I've come up with so far. I'm using CFML, but it should be readable by anyone. <cffunction name="testCombo" returntype="boolean"> <cfargument name="currentCombo" type="string" required="true" /> <cfargument name="currentTotal" type="numeric" required="true" /> <cfargument name="apps" type="array" required="true" /> <cfset var a = 0 /> <cfset var found = false /> <cfloop from="1" to="#arrayLen(arguments.apps)#" index="a"> <cfset arguments.currentCombo = listAppend(arguments.currentCombo, arguments.apps[a].name) /> <cfset arguments.currentTotal = arguments.currentTotal + arguments.apps[a].cost /> <cfif arguments.currentTotal eq 15.05> <!--- print current combo ---> <cfoutput><strong>#arguments.currentCombo# = 15.05</strong></cfoutput><br /> <cfreturn true /> <cfelseif arguments.currentTotal gt 15.05> <cfoutput>#arguments.currentCombo# > 15.05 (aborting)</cfoutput><br /> <cfreturn false /> <cfelse> <!--- less than 15.05 ---> <cfoutput>#arguments.currentCombo# < 15.05 (traversing)</cfoutput><br /> <cfset found = testCombo(arguments.currentCombo, arguments.currentTotal, arguments.apps) /> </cfif> </cfloop> </cffunction> <cfset mf = {name="Mixed Fruit", cost=2.15} /> <cfset ff = {name="French Fries", cost=2.75} /> <cfset ss = {name="side salad", cost=3.35} /> <cfset hw = {name="hot wings", cost=3.55} /> <cfset ms = {name="moz sticks", cost=4.20} /> <cfset sp = {name="sampler plate", cost=5.80} /> <cfset apps = [ mf, ff, ss, hw, ms, sp ] /> <cfloop from="1" to="6" index="b"> <cfoutput>#testCombo(apps[b].name, apps[b].cost, apps)#</cfoutput> </cfloop> The above code tells me that the only combination that adds up to $15.05 is 7 orders of Mixed Fruit, and it takes 232 executions of my testCombo function to complete. Is there a better algorithm to come to the correct solution? Did I come to the correct solution?

    Read the article

  • Implementing a hilbert map of the internet

    - by Martin
    In the XKCD comic 195 a design for a map of the internet address space is suggested using a hilbert curve so that items from a similar IPs will be clustered together. Given an IP address, how would I calculate the 2D coordinates (in the range zero to one) that this IP is located on such a map?

    Read the article

  • Why does php's file_get_contents incorrectly retrieve json files from xkcd?

    - by hally
    In writing a PHP script to download xkcd comics, i incurred errors when trying to get specific comics (as opposed to the latest one). Specifically, pointing file_get_contents at the following url: xkcd.com/$COMIC_NUM/info.0.json inexplicably retrieved the xhtml version of the comic's page on xkcd.com, and not a JSON file. However, if i request the exact same url in my browser, the correct JSON file is downloaded. I'm not sure why this is happening, but i suspect it has something to do with the request headers being sent. Please help! :S

    Read the article

  • Need help specifying a ending while condition

    - by johnthexiii
    I have written a Python script to download all of the xkcd comic images. The only problem is I can't tell it to stop when it gets to the last one... Here is what I have so far. import re, mechanize from urllib import urlretrieve from BeautifulSoup import BeautifulSoup as bs baseUrl = "http://xkcd.com/1/" #Specify the first comic page br = mechanize.Browser() #Create a browser response = br.open(baseUrl) #Create an initial response x = 1 #Assign an initial file name while (SomeCondition): soup = bs(response.get_data()) #Create an instance of bs that contains the response data img = soup.findAll('img')[1] #Get the online file path of the image localFile = "C:\\Comics\\xkcd\\" + str(x) + ".jpg" #Come up with a local file name urlretrieve(img["src"], localFile) #Download the image file response = br.follow_link(text = "Next >") #Store the response of the next button x += 1 #Increase x by 1 print "All xkcd comics downloaded" #Let the user know the images have been downloaded Initially what I had was something like while br.follow_link(text = "Next >") != br.follow_link(text = ">|"): but by doing this I actually send skip to the last page before the script has a chance to perform the intended purpose.

    Read the article

  • Should using Eval carry the same stigma as GoTo?

    - by JustSmith
    It is taught in every computer science class and written in many books that programmers should not use GoTo. There is even an xkcd comic about it. My question is have we reached a point where the same thing can be said about Eval? Where GoTo is not conductive for program flow and readability, Eval is the same for debugging, and program execution, and design. Should using Eval have the same stigma as GoTo, and same consequences as in the xkcd comic?

    Read the article

  • Using Jquery and Ajax in ASP.NET

    - by xkcd
    I am using ajax and jquery to load contents into a div. My jquery looks like this $("a.trigger").click(function() { $.ajax({ type: "POST", url: "GetStuff.aspx", data: "id=0", success: function(response){ $("#contentDiv").html(response); } }); }); In GetStuff.aspx I would like to write some asp.net html controls like private void Page_Load(object sender, System.EventArgs e) { Response.Expires = -1; Response.ContentType = "text/plain"; Response.Write("<asp:Label id=\"label1\" runat=\"server\" text=\"helloworld\"/>"); Response.End(); } However the label does not appear on the page. I tried to put the asp:Label in my aspx file like this <%@ Page Language="C#" Inherits="Untitled.GetStuff" %> <asp:Label id="label12" runat="server" text="helloworld2"/> It also does not work. How can I get asp.net html controls to show up?

    Read the article

  • Making TT-RSS cache images

    - by Piku
    Due to Google Reader's untimely demise, I've installed tiny-tiny RSS on my Linux machine under Apache 2. It's mostly a good enough replacement and I can at least go back to reading RSS feeds in my web browser at work. Can I configure or hack TT-RSS to cache all the images it finds in its feeds? There is an option when adding a feed, but it doesn't seem to actually do anything. If I view (for example) today's XKCD comic in TT-RSS it still loads the image from the XKCD website. What I want is the image to be cached in TT-RSS and served from there instead.

    Read the article

  • Why can't I download a whole image file with urllib2.urlopen()

    - by John Gann
    When I run the following code, it only seems to be downloading the first little bit of the file and then exiting. Occassionally, I will get a 10054 error, but usually it just exits without getting the whole file. My internet connection is crappy wireless, and I often get broken downloads on larger files in firefox, but my browser has no problem getting a 200k image file. I'm new to python, and programming in general, so I'm wondering what nuance I'm missing. import urllib2 xkcdpic=urllib2.urlopen("http://imgs.xkcd.com/comics/literally.png") xkcdpicfile=open("C:\\Documents and Settings\\John Gann\\Desktop\\xkcd.png","w") while 1: chunk=xkcdpic.read(4028) if chunk: print chunk xkcdpicfile.write(chunk) else: break

    Read the article

  • SQL Injection Attacks are still occurring

    - by TATWORTH
    It should be of concern to all developers that SQL Injection attacks are still occurring. Here are some resources on the subject: http://www.darkreading.com/DatabaseSecurity/util/4576/download.html (needs free registration) http://en.wikipedia.org/wiki/SQL_injection http://www.unixwiz.net/techtips/sql-injection.html http://msdn.microsoft.com/en-us/library/ms161953.aspx http://www.sitepoint.com/sql-injection-attacks-safe/ And for a funny view on it see http://xkcd.com/327/ So what are you doing to harden your applications?

    Read the article

  • How to "reverse-backport" a package available on earlier Ubuntu distribution to later Distribution?

    - by Adam Ryczkowski
    There are 4 packages I am using on 12.04 which are not available on 12.10: xkcd-browser ;-) cuttlefish bluphone xserver-xorg-input-synaptics (it allows for touchpad rotation that could go along screen rotation with randr) Is there any way of more-or-less automatic reverse-backporting? (I know, that one "solution" is to wait. But unless I know for how long I should do it, it doesn't solve anything.)

    Read the article

  • UI - How I can make users effectively read what my program says?

    - by Magnetic_dud
    I have a simple form that searches through the 2000+ issues of a 3rd party webcomic. (Easy, it's like xkcd: http://url/number That form is as easy as possible, is like this: What number do you want? User writes a number, clicks ok, and goes on the 3rd party website on a new tab Then, my form asks a question: "Did you find that issue memorable? Enter the name here, and we will add it to the "best issues" in home page" When the user will write the name of the issue, it is added to the database (pending moderation by me) So, I supposed this design is the easiest and convenient that users can find. Unfortunately, NONE of the users (maybe a 2% behaved correctly) will actually read what I asked. Some of the issues are offline, and gives a 404. On that issues users will write in the textbox a completely wrong title, and correctly capitalized! It's like if i would name http://xkcd.com/627/ as "The Great Adventures of Jack Smith" Users are from around all over the country, with different browsers, and have a different cookie. I cannot believe that my users will not read what I ask, it is a WHITE PAGE with a button that disappears when clicked and a textbox.... easier than that??? Maybe i should put a checkbox with "I acknowledge that this form is for submitting memorable issues, not for fun"? Oh, who will read that? Or maybe i could enable the textbox only if the user has effectively clicked the link?

    Read the article

  • Stop squid caching 302 and 307 with deny_info

    - by 0xception
    TLDR: 302, 307 and Error pages are being cached. Need to force a refresh of the content. Long version: I've setup a very minimal squid instance running on a gateway which shouldn't not cache ANYTHING but needs to be solely used as a domain based web filter. I'm using another application which redirects un-authenticated users to the proxy which then uses the deny_info option redirects any non-whitelisted request to the login page. After the user has authenticated the firewall rule gets placed so they no longer get sent to the proxy. The problem is that when a user hits a website (xkcd.com) they are unauthenticated so they get redirected via the firewall: iptables -A unknown-user -t nat -p tcp --dport 80 -j REDIRECT --to-port 39135 to the proxy at this point squid redirects the user to the login page using a 302 (i've also tried 307, and i've also make sure the headers are set to no-cache and/or no-store for Cache-Control and Pragma). Then when the user logs into the system they get firewall rule which no longer directs them to the squid proxy. But if they go to xkcd.com again they will have the original redirection page cached and will once again get the login page. Any idea how to force these redirects to NOT be cached by the browser? Perhaps this is a problem w/ the browsers and not squid, but not sure how to get around it. Full squid config below. # # Recommended minimum configuration: # acl manager proto cache_object acl localhost src 127.0.0.1/32 ::1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 acl localnet src 192.168.182.0/23 # RFC1918 possible internal network acl localnet src fc00::/7 # RFC 4193 local private network range acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines acl https port 443 acl http port 80 acl CONNECT method CONNECT # # Disable Cache # cache deny all via off negative_ttl 0 seconds refresh_all_ims on #error_default_language en # Allow manager access only from localhost http_access allow manager localhost http_access deny manager # Deny access to anything other then http http_access deny !http # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !https visible_hostname gate.ovatn.net # Disable memory pooling memory_pools off # Never use neigh cache objects for cgi-bin scripts hierarchy_stoplist cgi-bin ? # # URL rewrite Test Settings # #acl whitelist dstdomain "/etc/squid/domains-pre.lst" #url_rewrite_program /usr/lib/squid/redirector #url_rewrite_access allow !whitelist #url_rewrite_children 5 startup=0 idle=1 concurrency=0 #http_access allow all # # Deny Info Error Test # acl whitelist dstdomain "/etc/squid/domains-pre.lst" deny_info http://login.domain.com/ whitelist #deny_info ERR_ACCESS_DENIED whitelist http_access deny !whitelist http_access allow whitelist http_port 39135 transparent ## Debug Values access_log /var/log/squid/access-pre.log cache_log /var/log/squid/cache-pre.log # Production Values #access_log /dev/null #cache_log /dev/null # Set PID file pid_filename /var/run/gatekeeper-pre.pid SOLUTION: I believe I might have found a solution to this. After days and days trying to figure it out, only through a random stumble I found client_persistent_connections off server_persistent_connections off This did the trick. So it wasn't so much cache as it was a single persistent connection messing things up. W000T!

    Read the article

  • Coder rapidement ou écrire du code de qualité ? Les deux approches reviendraient au même, selon un célèbre développeur dessinateur

    Coder rapidement ou écrire du code de qualité ? Les deux approches reviennent au même, selon un célèbre web-bédéiste XKCD est une célèbre bande-dessinée créée et publiée par Randall Munroe, un ancien consultant à la NASA, qui la définit comme un webcomic sarcastique qui parle de romance, de maths et de langage. Une planche publiée récemment sous forme d'organigramme algorithmique n'a d'autre prétention que celle de résumer, d'une manière extrêmement pessimiste, le métier de développeur. Les développeurs seraient, selon Munroe, éternellement confronté au dilemme : coder rapidement ou coder correctement. Ceux qui prennent la décision de "coder corr...

    Read the article

  • Graphic demonstrating emphasis of front end in web apps

    - by sohail
    I remember stumbling across an amusing graphic a year or so ago which demonstrated the tiers of web development. The back-end was shown as a tiny box, but the front end was shown as a huge box crammed with lots of front-end technologies like AJAX, DHTML. This is all a vague recollection. Does anyone know where on the Intraweb this graphic might be? It was probably on a programming cartoon site, but I only view XKCD on a regular basis, and I couldn't find it on there. Although tagged as fun, my request does have a productive edge to it - it would be quite useful in driving home to my colleagues how UI top-heavy web application development has become.

    Read the article

  • HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS

    - by Jason Faulkner
    Even if you’ve only loosely followed the events of the hacker groups Anonymous and LulzSec, you’ve probably heard about web sites and services being hacked, like the infamous Sony hacks. Have you ever wondered how they do it? There are a number of tools and techniques that these groups use, and while we’re not trying to give you a manual to do this yourself, it’s useful to understand what’s going on. Two of the attacks you consistently hear about them using are “(Distributed) Denial of Service” (DDoS) and “SQL Injections” (SQLI). Here’s how they work. Image by xkcd HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS Use Your Android Phone to Comparison Shop: 4 Scanner Apps Reviewed How to Run Android Apps on Your Desktop the Easy Way

    Read the article

1 2  | Next Page >