-  [WT]  [PS]  [Home] [Manage]

  1.   (new thread)
  2. [ No File]
  3. (for post and file deletion)
/pr/ - Programming
  • Supported file types are: C, CSS, DOC, DOCX, GIF, H, JAVA, JPG, PDF, PNG, SVG, SWF, TXT, WEBM
  • Maximum file size allowed is 10000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 480 unique user posts. View catalog

  • Blotter updated: 2011-01-12 Show/Hide Show All

There's a new /777/ up, it's /selfhelp/ - You're Pathetic, We're Pathetic, We Can Do This! Check it out. Suggest new /777/s here.

Movies & TV 24/7 via Channel7: Web Player, .m3u file. Music via Radio7: Web Player, .m3u file.

WebM is now available sitewide! Please check this thread for more info.

C/C++/C# Interactive Learning BobLobLaw 14/07/21(Mon)02:44 No. 4529 [Reply]

File 140590344841.jpg - (4.31KB , 271x186 , images.jpg )

I just want to learn something before my class on C# this fall, but I don't want to stare at a wall of text (which I've tried to do already). Does anything exist for the three languages that's more interactive like, say, http://www.codecademy.com/?

Neckbearded Basement Dweller 14/07/21(Mon)02:48 No. 4530

search for programmr. i think you may have to pay for it after a while, but it's good.

also, my favorite band is anal cunt meets caramelized booty sweat

Neckbearded Basement Dweller 14/07/21(Mon)05:28 No. 4531

>I don't want to stare at a wall of text
Maybe you should do something else then.

Programming, a bad choice. James 14/06/16(Mon)20:28 No. 4468 [Reply]

File 140294329771.jpg - (72.97KB , 558x744 , 6386692301933492643.jpg )

So after 6 years, I've come to the realization I'm actually terrible at programming.

I find there's 3 main types of programmers:

-those who are completely unperceptive of people, takes all information into account before proceeding, always does things the right way the first time, the best programmers, they just get bored implementing.

-Then there's the walking encyclopedia peeps, analyzes data, talks out loud, easily taken advantage of, and will be fine just working..

-and then there's my type -_-, very visual, very perceptive, very fast, shoots from the hip, and doesn't even really know why shit works when it does.

The responsibility that has been given to me is nothing short of, put all the technology & processes in place to turn our company into a Corporation.. many peoples jobs depend on me, and I can't necessarily give up the highest payed job I've ever had. I don't know WTF I'm doing or what's the best most strategic way of doing this is.. Any Advice /pr/ ?

12 posts omitted. Click Reply to view.
Neckbearded Basement Dweller 14/06/29(Sun)06:05 No. 4498

lol i just spent literally 10-11 nonstop hours of sitting with a java book in front of my face. i have the drive, but its actually the amount that i can absorb that is the problem!!!

Neckbearded Basement Dweller 14/07/14(Mon)05:24 No. 4513

Yeap no OP. Firstly I firmly believe that you trying to shoehorn programmers into merely three distinct personality types is fucking stupid and shallow.

>I don't know WTF I'm doing or what's the best most strategic way of doing this is.
This is quite fine, usually. But it's your fucking attitude that makes it not fine. Don't know how something works? Well, you got it working in the first place, don't say fuck it it's done, read it again and try to learn how it works. Google anything you don't know and read about it at least once and us it as a stepping stone to learn something new, you lazy faggot. It's fine to make mistakes, especially if you know you're making them. And finding the 'best' solution to a problem *is* your job as a programmer, not something you read on the internet or recall from memory. Change your perspective and try to understand your position.

>I'm terrible at *
That's a shitty attitude to have no matter what you do.

Neckbearded Basement Dweller 14/07/15(Tue)18:23 No. 4520

Then there are the part timers/hobbyists, who have been assigned to implement something relatively simple and well contained on the basis they are the best there is available in-house.

They stampede around the existing code base like an elephant in a glass store, bash it with wildly inappropriate tools and plenty of search and replace, copy and pasting without time to fully learn the language or the framework, until they have something vaguely working done. With no understanding how much time the job should have taken, they feel their performance at least was sub par, so they hastily wrap it up omitting all code refactoring and usually the proper version management and commit procedures too.

Like so, I'm a welder and have been assigned to fix the company web page. Wont be pretty to look, when the best qualifications are like "I made a home page for my cat in 2003".

Neckbearded Basement Dweller 14/07/15(Tue)03:51 No. 4515 [Reply]

File 140538906987.png - (397.43KB , 1366x768 , 2014-07-14-165211_1366x768_scrot.png )

Hey /pr/, I was wondering if any of you could help me create my fap script in python3. What I basically want is to get a random video from the site xvideos.com, and input it in mpv, I already, can do it by putting the links in a list and inputting in a random link in mpv, but thats inefficient since one has to manually put in links in the list.

here is my code without the large list of links

seen = [] def no_repeat(l): seen.append(l) if len(sys.argv) > 1: if int(sys.argv[1]) > len(links): sys.arv[1] = len(links) if len(sys.argv) > 1: for i in range(int(sys.argv[1])): link = random.choice(links) while 1: if link in seen: link = random.choice(links) else: break no_repeat(link) link = 'mpv '+link os.system(link) else: link = 'mpv '+random.choice(links) os.system(link)

if any can help, it would be appreciated.

Neckbearded Basement Dweller 14/07/15(Tue)06:24 No. 4516

Use the [code][/code] tags. I didn't pay much attention to your code, but "seen" should be a set, not a list. Searching in a list takes O(n), whereas the search on a set should take O(log n). A set uses add to insert elements instead of append.
Also, I don't understand what exactly you want.

Neckbearded Basement Dweller 14/07/15(Tue)08:36 No. 4518

import os, sys, random def no_repeat(l): seen.append(l) if len(sys.argv) > 1: if int(sys.argv[1]) > len(links): sys.arv[1] = len(links) if len(sys.argv) > 1: for i in range(int(sys.argv[1])): link = random.choice(links) while 1: if link in seen: link = random.choice(links) else: break no_repeat(link) link = 'mpv '+link os.system(link) else: link = 'mpv '+random.choice(links) os.system(link)

What I want is to take a random video eg: a video from xvideos.com/tags/<insert tag here>. What I mean by 'take' is get the link for that video since the mpv video player can network stream videos from that site based on links.
So, based on the link xvideos.com/tags/latina,there seems to be links to videos, right? And I get the link for any of those videos eg: http://www.xvideos.com/video10095/alexis_amore_m3m_( a link in latina tag)
And then, I give this link as an argument to mpv, which will network stream the video for me.

Neckbearded Basement Dweller 14/07/15(Tue)08:44 No. 4519

I used the [code][/code] tags, I didn't know what happened, ill just post a pomf late since pomf is down now

is the matrix real neo 14/07/11(Fri)12:03 No. 4510 [Reply]

File 140507300127.jpg - (4.35KB , 160x212 , thmatrix.jpg )

are we living in an artificially simulated reality that is detached from the truth?

eep Pass-The-Cake 14/07/11(Fri)12:06 No. 4511

i am afraid that we are. i'd be okay with it as long as i can keep my memories of this life if i ever get out. i don't want to forget a certain person, or the lessons i've learned..

it's not probable, but it's very possible..

is there a real morpheus neo 14/07/11(Fri)12:29 No. 4512

someone who can point me in the right direction

Neckbearded Basement Dweller 14/07/03(Thu)08:19 No. 4504 [Reply]

File 140436836012.jpg - (49.44KB , 360x264 , bubbo2.jpg )

So, I'm bouilding a web-site, and for the navigations and other site-to-site constants I see basically two types of solutions:

1) use header and footer scripts
2) reload the frontpage and fill the content are with appropriate distination-page

I'm kind of leaning just for headers and footers, but how do they work, if I'm going to use some content management system like drupal later on?

Then again, how does the centralized solution work with search engines?

>OP-inb4 don't code anything yourself / search engine optimization is so 2007

This is not a home page level. It will be something aiming for at least for self-sustenance if not small profit.

bitcoin payments Neckbearded Basement Dweller 14/06/24(Tue)06:20 No. 4496 [Reply]

File 140358361039.png - (157.40KB , 1366x746 , 1392159329343.png )

if anybody has the slightest clue how to accept bitcoin payments through a website post all up in this thread because i need yo help

willing to pay

Neckbearded Basement Dweller 14/06/26(Thu)01:21 No. 4497


Neckbearded Basement Dweller 14/06/20(Fri)08:18 No. 4489 [Reply]

File 140324509132.jpg - (55.16KB , 402x720 , 1403150719069.jpg )

I'm trying to make an online Boggle game. I realize how new I am and potentially the years it will take to make it, but this code gives me an array of "null" text and not the array of random letters like I was hoping... What is causing this?

package Package;

public class Hello {

static final int ROWS = 5;
static final int COLS = 6;

public static void main(String[] args) {

String[][] a2 = new String[ROWS][COLS];
for (int i=0; i<a2.length; i++) {
for (int j=0; j<a2[i].length; j++) {
a2[i][j] = sup.getLetter();
Message too long. Click here to view the full text.

Neckbearded Basement Dweller 14/06/20(Fri)08:31 No. 4490

Foo, why don't you take the void out of main method in sup and create a whole new method name while you're at it, like

public static String letter;

public static String Letters() {
Random r = new Random();
int randomNumber = r.nextInt(1000);

if (randomNumber < 50) {
letter = "A";
if (randomNumber < 80) {
letter = "B";
if (randomNumber < 140) {
Message too long. Click here to view the full text.

Neckbearded Basement Dweller 14/06/20(Fri)08:40 No. 4491

Great thanks. But could you explain why my way didm't work?

C# Newbie Neckbearded Basement Dweller 14/04/21(Mon)13:11 No. 4414 [Reply]

File 139807869189.gif - (0.99MB , 265x210 , 1380917526649.gif )

New to C# and programming in general, so please explain in simple terms. I want to have the program determine whether or not the text in textbox1 is numerical or text, my best shot so far is this;

bool textornot = Int32.TryParse(textbox1.Text);
if (textornot==false)

But it still gives me error messages, I'd appreciate any explanation to why or any better method of doing this.

4 posts omitted. Click Reply to view.
Neckbearded Basement Dweller 14/06/18(Wed)06:50 No. 4482

I never programmed in C# but this is a bit of C++ that can do the job pretty well.

char * data_to_check = the data you want to check;
unsigned int i = 0;
if(data_to_check[0] == '-') i = 1;
while(data_to_check[i] != '\0'){
case '0':
case '1':
case '2':
case '3':
Message too long. Click here to view the full text.

Neckbearded Basement Dweller 14/06/19(Thu)04:38 No. 4485

Dead thread, but why not just try a regex?

Regex alpha = @"^[a-zA-Z]+$";

Regex numeric = @"^[0-9]+$";

if (alpha.IsMatch(textbox1.Text))

if (numeric.IsMatch(textbox1.Text))
Message too long. Click here to view the full text.

Growing+Man 14/06/19(Thu)11:45 No. 4486

The try parse method should be used in an if statement instead to avoid the extra conditional operation. From the if statement, you will find that the proper assignment was made and then you will have the option to execute a command accordingly or otherwise.

source code leaks Neckbearded Basement Dweller 14/06/18(Wed)05:00 No. 4477 [Reply]

Anybody follow such things?
I have collected, vmware-esx, windows kernel, symantec pc-anywhere and norton antivirus, kaspersky antivirus etc.

Does anybody else like to collect code?

Neckbearded Basement Dweller 14/06/18(Wed)06:38 No. 4481

This sounds like a good idea, but by the time I figure out an exploit or do anything with it, it has already been outdated.

Neckbearded Basement Dweller 14/06/03(Tue)07:47 No. 4464 [Reply]

File 140177442476.jpg - (125.74KB , 980x411 , part-of-sicp-cover.jpg )

Hey, /pr/, what do you think about http://bbs.progrider.org/prog/ spawned after moot killed world4ch?

Neckbearded Basement Dweller 14/06/08(Sun)18:23 No. 4466

That's been around since September last year.

It spawned because of captcha on /prog/, although I guess you could call that ``killing world4ch'' in a way.

Neckbearded Basement Dweller 14/10/26(Sun)23:33 No. 4608

did moot really think killing world4ch would stop people moving on from 4chan? hell new sites like https://dis.4ct.org/prog/ started in the wake of world4ch's death, millions of lost users over many site all because moot sucked SJW dick.

Delete post []
Report post