[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/csp/ - Coding, Scripting, & Programming

The board dedicated to scripting.

Catalog

8chan Bitcoin address: 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C
The next generation of Infinity is here (discussion) (contribute)
A message from @CodeMonkeyZ, 2ch lead developer: "How Hiroyuki Nishimura will sell 4chan data"
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Options
dicesidesmodifier
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 5 per post.


Welcome to /csp/

File: 1425423495608.png (18.63 KB, 256x256, 1:1, python.png)

 No.13

This thread is for script sharing!
use the code tag for your scripts
I'll start.
This one lists your IP.

 function getIP() {
$.getJSON("http://api.ipify.org/?format=json",

function (data) {
document.getElementById('output').innerHTML = "Your Ip is: " + data.ip;
});
}
Post last edited at

 No.14

This one counts how many characters are typed. Uses jQuery.

 $(document).ready( function() {
document.getElementById('input').onkeydown = function () {
document.getElementById('output').innerHTML = (this.value.length);
};
});

 No.15

This one takes user input for two numbers and adds it together. Uses Python


def Add():
a = input("Enter a number")
b = input("Enter another number")
print a+b

 No.16

 
void Figure2()
{
glColor3f(0.6, 0.1, 0.1);
glLineWidth(2);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glBegin(GL_POLYGON);

glVertex3fv(&va);
glVertex3fv(&vb);
glVertex3fv(&vc);
glVertex3fv(&vd);

glEnd();

Makes a thing in OpenGL.

I need a script that renames files by removing their last char, Shell preferably, any help appreciated




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]