- ComputerCraft | Programmable Computers for Minecraft
- → natedogith1's Content
natedogith1's Content
There have been 79 items by natedogith1 (Search limited from 10-February 22)
#202330 UrsaTech! CC, OC, peripherals, and furniture! [Now defunct]
Posted by
natedogith1
on 05 January 2015 - 11:18 AM
in
Servers
Also, I seem to be having issues with the download, (it's getting to no more than 10% (11,000 kb or so) before stopping. (I'm just downloading the files from github now...)
#196967 Pastebin command not working
Posted by
natedogith1
on 25 October 2014 - 11:49 PM
in
Ask a Pro
#196281 Filesystems
Posted by
natedogith1
on 16 October 2014 - 01:28 AM
in
Ask a Pro
#195564 multishell access
Posted by
natedogith1
on 07 October 2014 - 09:47 PM
in
Ask a Pro
#194946 Window API under CC1.58 & earlier
Posted by
natedogith1
on 02 October 2014 - 12:14 AM
in
Ask a Pro
if parent == term then error( "term is not a recommended window parent, try term.current() instead", 2 ) end
#194836 Creating A Un-Readable Executable File
Posted by
natedogith1
on 01 October 2014 - 12:13 AM
in
Ask a Pro
Also, all code is readable to a human with a decompiler and an abundance of spare time
#194407 fs.new
Posted by
natedogith1
on 25 September 2014 - 02:52 AM
in
Ask a Pro
function fs.open(path, mode) oldfs.open(path, mode) --this will cause issues end function fs.open(path, mod) return oldfs.open(path, mode) --remembering to return the stuff endAlso, you say the OS drops everything but itself, what do you mean by this?
#193666 Read-Only Tables?
Posted by
natedogith1
on 16 September 2014 - 03:46 AM
in
Ask a Pro
#193664 Read-Only Tables?
Posted by
natedogith1
on 16 September 2014 - 03:22 AM
in
Ask a Pro
function readOnly(tbl)
return setmetatable({}, __index = tbl, __newindex =
function(self,key,value)
error("not modifyable")
end,__metatable={})
end
'__index' defines where/how to look up values'__newindex' defines where/how to set values
'__metatable' prevents me from using getmetatable and modifying it that way
if you're interested in more about metatables, you might like to look at http://www.lua.org/m...manual.html#2.8
There are a few issues with this though, like the fact that 'pairs' doesn't work, though it does do a better job of read-only than the CC's OS
#193662 Too long without yielding error
Posted by
natedogith1
on 16 September 2014 - 03:10 AM
in
Ask a Pro
start computer
wait 5000 milliseconds
if (computer is still running) {
soft abort
wait 1250 milliseconds
if (computer is still running) {
hard abort
wait 1250 milliseconds
if (computer is still running) {
force kill computer
}
}
}
(when it waits, it can exit early if the computer yields)A soft abort seems to throw an error when you attempt to call a java-defined lua function (so things like turtle, term, and peripheral).
A hard abort seems to just throw an error, not really caring where in the code you are.
#193282 Logging into a website using http.post
Posted by
natedogith1
on 10 September 2014 - 03:01 AM
in
Ask a Pro
http.post("https://github.com/login","utf8="..utf8.."&authenticity_token="..authenticity_token.."&login="..username.."&password="..password)
Though if possible, you should probably try and use GitHub's api.
#193270 Logging into a website using http.post
Posted by
natedogith1
on 09 September 2014 - 11:23 PM
in
Ask a Pro
#193212 Open Peripheral Glasses Colour Codes?
Posted by
natedogith1
on 09 September 2014 - 01:02 AM
in
Ask a Pro
So yeah, the display column, just with an '0x' (for hexadecimal) instead of '#'
#193022 Decentralized Network
Posted by
natedogith1
on 04 September 2014 - 11:50 PM
in
Ask a Pro
if peripheral.find("modem") then
parallel.waitForAny(
function()
shell.run("shell")
end,
function()
shell.run("repeat")
end )
end
#192870 Script waits longer than defined in os.sleep
Posted by
natedogith1
on 03 September 2014 - 01:07 AM
in
Ask a Pro
#192869 Need a little bit help (problem with disk drives)
Posted by
natedogith1
on 03 September 2014 - 01:02 AM
in
Ask a Pro
You can't have multiple threads running at once, but lua does have something called coroutines, which can be used to implement multi-tasking (as multishell and the parallel API do). Though for your example purpose, you'd be better off just starting a timer and checking to see if the event pulled was that timer.
You can "pastebin put <filename>" to upload a file to pastebin and "pastebin get <code> <filename>" to download a file from pastebin. Though if you're in a single-player world you can just modify the files in world-save/computer/computer-id and I'm not sure entirely what you mean by more easily? You could probably create a shortcut to the folder.
#192754 Bug Reporting
Posted by
natedogith1
on 01 September 2014 - 04:51 AM
in
Ask a Pro
#192751 Multitasking
Posted by
natedogith1
on 01 September 2014 - 04:44 AM
in
Ask a Pro
Is there any reason it's implemented as such?
#192744 Multitasking
Posted by
natedogith1
on 01 September 2014 - 03:47 AM
in
Ask a Pro
#192740 Bug Reporting
Posted by
natedogith1
on 01 September 2014 - 02:06 AM
in
Ask a Pro
#192733 Bug Reporting
Posted by
natedogith1
on 01 September 2014 - 12:25 AM
in
Ask a Pro
#192731 Bug Reporting
Posted by
natedogith1
on 31 August 2014 - 11:07 PM
in
Ask a Pro
#192727 Bug Reporting
Posted by
natedogith1
on 31 August 2014 - 10:26 PM
in
Ask a Pro
#192719 Bug Reporting
Posted by
natedogith1
on 31 August 2014 - 08:49 PM
in
Ask a Pro
Hbomb_79, on 31 August 2014 - 08:43 PM, said:
Sorry, but when you say the above shouldn't be used, what else do I put there, or is it not necessary, as you can see I'm very much new to Internet Apis etc within computer craft, I've only ever done GitHub downloading, I hope I can get your code to work, just for classification, what is the auth and oauth etc...
Like you said, the first part is very insecure, I don't want people knowing my password to GitHub, whether it is a seperate account or not, it would still have push access etc...
You'd just leave that part blank, that's why it's commented out. Instead you'd just fill in the oauthToken part with the value of your token. Though according to the github api documentation, you don't actually need push access to make an issue, you only need pull access.
#192709 Bug Reporting
Posted by
natedogith1
on 31 August 2014 - 06:28 PM
in
Ask a Pro
- ComputerCraft | Programmable Computers for Minecraft
- → natedogith1's Content


