Skip to main content
Commonmark migration
Source Link

MATL, 15 14 bytes

One byte saved thanks to Kevin Cruijssen's suggestion

'http://to.'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

###Explanation

Explanation

'http://to.' % Push this string Xi % Return contents of that URL as a string. If there is no Internet % connection this gives an error, with no output on STDOUT 

MATL, 15 14 bytes

One byte saved thanks to Kevin Cruijssen's suggestion

'http://to.'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

###Explanation

'http://to.' % Push this string Xi % Return contents of that URL as a string. If there is no Internet % connection this gives an error, with no output on STDOUT 

MATL, 15 14 bytes

One byte saved thanks to Kevin Cruijssen's suggestion

'http://to.'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

Explanation

'http://to.' % Push this string Xi % Return contents of that URL as a string. If there is no Internet % connection this gives an error, with no output on STDOUT 
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

MATL, 15 14 bytes

One byte saved thanks to Kevin CruijssenKevin Cruijssen's suggestion

'http://to.'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

###Explanation

'http://to.' % Push this string Xi % Return contents of that URL as a string. If there is no Internet % connection this gives an error, with no output on STDOUT 

MATL, 15 14 bytes

One byte saved thanks to Kevin Cruijssen's suggestion

'http://to.'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

###Explanation

'http://to.' % Push this string Xi % Return contents of that URL as a string. If there is no Internet % connection this gives an error, with no output on STDOUT 

MATL, 15 14 bytes

One byte saved thanks to Kevin Cruijssen's suggestion

'http://to.'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

###Explanation

'http://to.' % Push this string Xi % Return contents of that URL as a string. If there is no Internet % connection this gives an error, with no output on STDOUT 
added 133 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

MATL, 1515 14 bytes

One byte saved thanks to Kevin Cruijssen's suggestion

'http://gto.gl'Xi'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

###Explanation

'http://gto.gl'' % Push this string Xi  % Return contents of that URL as a string. If there is   no Internet  % no% connection this errorsgives an error, with no output on STDOUT 

MATL, 15 bytes

'http://g.gl'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

###Explanation

'http://g.gl' % Push this string Xi  % Return contents of that URL as a string. If there is   % no connection this errors with no output on STDOUT 

MATL, 15 14 bytes

One byte saved thanks to Kevin Cruijssen's suggestion

'http://to.'Xi 

Output is through STDOUT. This displays a non-empty string containing non-zero chars (which is truthy) if there is an Internet connection; and displays nothing (which is falsy) if there's no connection.

This can't be tested online because the Xi is not allowed in the online interpreters.

###Explanation

'http://to.' % Push this string Xi % Return contents of that URL as a string. If there is no Internet  % connection this gives an error, with no output on STDOUT 
added 91 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading