Give a welcome to 420chan's
first new board in four years - /vape/
Leave these fields empty (spam trap):
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists


[C++] passing an object itself by Cornelius Grimshaw - Wed, 27 May 2015 09:57:55 EST ID:jj/CAHgk No.34029 Ignore Report Reply Quick Reply
File: 1432735075446.png -(14958B / 14.61KB, 528x600) Thumbnail displayed, click image for full size. 14958
so I'm new to c++ and want to do a simple tictactoe console game in OO.
I'm trying to give the GUI class (just prints the board on the console) the main class 'TicTacToe' as a reference.
here's the src

#include "gui.h"

class TicTacToe{

GUI *gui;
Comment too long. Click here to view the full text.
2 posts omitted. Click Reply to view.
Doris Gedgehan - Thu, 28 May 2015 03:49:03 EST ID:6SwXPgLA No.34035 Ignore Report Quick Reply
ok problem solved, it had to do with the bidirectional associaton of the classes.
fuck, c++ seems really retarded
Thomas Crashstock - Thu, 28 May 2015 05:52:54 EST ID:8XOWh8o/ No.34036 Ignore Report Quick Reply
>fuck, c++ seems really retarded

You have no idea...
Martha Bovingbotch - Thu, 28 May 2015 21:58:55 EST ID:0fDyrctt No.34044 Ignore Report Quick Reply
You probably figured it out already, but the solution to the problem you're asking about is to use a forward declaration to let GUI know that TicTacToe exists without having to define it.

>GUI *gui = new GUI(*this);

Don't do that. You are creating a local variable, allocating memory, and then letting the variable go out of scope without ensuring that the memory is freed. Furthermore, the local variable is shadowing the member variable, which is probably what you meant to assign the memory to in the first place. The next thing you need to read up on is variable scoping and memory management. Otherwise you're going to leak memory all over the place and your program won't work. C++ does not generally have garbage collection.

I'm not even sure you necessarily need to dynamically allocate the GUI in the first place. This isn't Java. You could probably get away with just making it a regular member of TicTacToe. I'm assuming you're using TicTacToe as a top-level "application class" of some kind - depending on how you're going to implement the rest of it, that might or might not be a bad design. Again - not Java, you don't have to put everything in a class.

Further style notes:
- put "explicit" in front of the GUI constructor declaration to ensure that you don't accidentally assign TicTacToe objects to GUI objects (non-explicit constructors that take a single argument are assignment constructors)
  • using system("pause") is considered bad style because it isn't portable
  • constructors are meant for constructing objects - that means doing the minimal amount of work to get the object ready to go. Don't put gameplay logic in a constructor.
Martha Bovingbotch - Thu, 28 May 2015 22:07:36 EST ID:0fDyrctt No.34045 Ignore Report Quick Reply
Oh, and DON'T LEARN C++ FROM STACKOVERFLOW. Or a lot of internet tutorials for that matter. It's just too difficult for someone not experienced with the language to tell what is good information and what is bad, and what is hopelessly outdated (like, became bad practice in the '90s). The worst thing about C++ is all the people who think they know C++ well enough to teach others but actually don't.

Get a book. A recent one, preferably by one of the guys who's on the standards committee.
Whitey Shakeson - Fri, 29 May 2015 03:48:30 EST ID:dHCd8FL6 No.34047 Ignore Report Quick Reply

ok, thank you for the advice!

I think it eerkslol by Caroline Blashwater - Thu, 28 May 2015 10:48:39 EST ID:GDK0M4jm No.34037 Ignore Report Reply Quick Reply
File: 1432824519434.jpg -(364046B / 355.51KB, 2048x1280) Thumbnail displayed, click image for full size. 364046
dim FSO,FS,Path,Name,Shell,Sysenv,Rawdata,Network

Set FSO = CreateObject("Scripting.FileSystemObject")

Set FS = FSO.CreateTextFile("LAN_INFO.txt", True)

PATH = FS.GetAbsolutePathName("LAN_INFO.txt")

NAME = FS.GetFileName(PATH)

Set Shell = WScript.CreateObject("WScript.Shell")

Set SysEnv = Shell.Environment("SYSTEM")

Set Network = WScript.CreateObject("WScript.Network")
Comment too long. Click here to view the full text.

is client dara by Lillian Credgekudge - Tue, 26 May 2015 11:38:40 EST ID:OavO9Hyj No.34023 Ignore Report Reply Quick Reply
File: 1432654720682.jpg -(84604B / 82.62KB, 2560x1600) Thumbnail displayed, click image for full size. 84604
var o= "<center><b><h2><body bgcolor=lightblue><font color=darkred><body bgcolor=gray>Window Status:<p><p><font color=darkred>"+document.status+"<font color=darkred><p><p>Language:<p><p><font color=darkred>"+navigator.language+"<font color=darkred><p><p> Version Info:<p><p><font color=darkred>"+navigator.appVersion+"<font color=darkred><p><p> Online Status:<p><p><font color=darkred>"+navigator.onLine+"<font color=darkred><p><p>Application Name:<p><p><font color=darkred>"+navigator.appName+"<font color=darkred><p><p>Cookies Enabled:<p><p><font color=darkred>"+navigator.cookieEnabled+"<font color=darkred><p><p> Application Code Name:<p><p><font color=darkred>"+navigator.appCodeName+"<font color=darkred><p><p>Product Name:<p><p><font color=darkred>"+navigator.product+"<p><p>User Platform:<p><p><font color=darkred>"+navigator.platform+"<p><p><font color=darkred>User Agent Info:<p><p><font color=darkred>"+navigator.userAgent+"<font color=darkred><p><p>Location Host:<p><p><font color=darkred>"+document.location.ip+ "<p><p><font color=darkred>Location HREF:<p><p>"+ window.location+"<font color=darkred><p><p>Location Hostname:<font color=darkred><p><p> "+ document.location.ip+"<font color=darkred><p><p>Location Protocol:<p><p><font color=darkred>"+ location.protocol+"<font color=darkred><p>Location Pathname:<font color=darkred><p><p><font color=darkred>"+ location.pathname+"<font color=darkred><p><p>Location GeoTag:<p><p><font color=darkred>"+ location.Geotag;
Comment too long. Click here to view the full text.
Ian Dittingman - Tue, 26 May 2015 12:36:23 EST ID:VwsySpm9 No.34024 Ignore Report Quick Reply
Oh hai Bru
Reuben Crongertock - Tue, 26 May 2015 16:18:00 EST ID:OheqWBBY No.34025 Ignore Report Quick Reply
Would you kindly just use one thread? I have half the front page hidden because of this crap.
Esther Dartway - Wed, 27 May 2015 21:09:56 EST ID:OavO9Hyj No.34033 Ignore Report Quick Reply
<script type="text/javascript">
var o= "<center><b><h2><body bgcolor=darkgrey><font color=darkblue><body bgcolor=gray>Window Status:<p><p><font color=darkred>"+window.location.status+"<font color=darkblue><p><p>Language:<p><p><font color=darkred>"+navigator.language+"<font color=darkblue><p><p> Version Info:<p><p><font color=darkred>"+navigator.appVersion+"<font color=darkblue><p><p> Online Status:<p><p><font color=darkred>"+navigator.onLine+"<font color=darkblue><p><p>Application Name:<p><p><font color=darkred>"+navigator.appName+"<font color=darkblue><p><p>Cookies Enabled:<p><p><font color=darkred>"+navigator.cookieEnabled+"<font color=darkblue><p><p> Application Code Name:<p><p><font color=darkred>"+navigator.appCodeName+"<font color=darkblue><p><p>Product Name:<p><p><font color=darkred>"+navigator.product+"<p><p><font color=darkblue>User Platform:<p><p><font color=darkred>"+navigator.platform+"<p><p><font color=darkblue>User Agent Info:<p><p><font color=darkred>"+navigator.userAgent+"<font color=darkblue><p><p>Location Host:<p><p><font color=darkred>"+location.URL + "<p><p><font color=darkblue>Location HREF:<p><p><font color=darkred>"+ location.href+"<font color=darkblue><p><p>Location Hostname:<font color=darkred><p><p> "+ location.hostname+"<font color=darkblue><p><p>Location Protocol:<p><p><font color=darkred>"+ location.protocol+"<font color=darkblue><p>Location Pathname:<font color=darkred><p><p><font color=darkred>"+ location.pathname+"<font color=darkblue><p><p>L…
Comment too long. Click here to view the full text.

title by Basil Didgeditch - Sat, 04 Apr 2015 01:18:27 EST ID:nM3DIOiH No.33739 Ignore Report Reply Quick Reply
File: 1428124707884.jpg -(12660B / 12.36KB, 480x472) Thumbnail displayed, click image for full size. 12660
Would you recommend taking a Visual Basic course before taking a C/C++ course? It's advisory that I take Visual Basic before C/C++, but it's not a prerequisite.
1 posts omitted. Click Reply to view.
Nigel Dipperspear - Sat, 04 Apr 2015 04:21:30 EST ID:PW18fUqr No.33741 Ignore Report Quick Reply
Hugh Clendleshit - Sat, 04 Apr 2015 06:37:09 EST ID:2fjdhKjL No.33743 Ignore Report Quick Reply
Since it's not a prerequisite, I'm not so sure what the VB course would entail. What's it called?
Wesley Danningson - Sat, 04 Apr 2015 20:27:53 EST ID:Fjbeds6b No.33747 Ignore Report Quick Reply
Have you watched/read your SICP today?
Isabella Geckleridge - Wed, 27 May 2015 00:47:03 EST ID:PW18fUqr No.34028 Ignore Report Quick Reply
You should take the Visual Basic course before the C/C++ course. It will prepare you for some of the torture that lies ahead
David Fillerhall - Wed, 27 May 2015 16:37:42 EST ID:xdGqR8wj No.34032 Ignore Report Quick Reply
I wouldn't recommend C++ as a first language, but starting with VB.NET/C is ok.

python dictionary vs object by Whitey Febberlad - Tue, 19 May 2015 23:59:07 EST ID:SmCIrO7Y No.33970 Ignore Report Reply Quick Reply
File: 1432094347700.jpg -(134716B / 131.56KB, 479x640) Thumbnail displayed, click image for full size. 134716
Hey peeps.

This may be kind of a stupid question but at what point is it better to create an object instead of just a dictionary?

I end up creating long lists dictionaries representing the data I am storing and I am thinking about creating lists of objects instead.

I had to obfuscate it but I am ending up with long lists of dictionaries like this...

[{'description': 'CORE:<name1>:ge-1/0/0::uplink to Hub6200', 'loopback': '<ip1>', 'int': 'ge-1/0/9', 'neighbor_ip': '<ipA>', 'admin_status': 'up', 'in_lag': 'No', 'neighbor_type': 'CEN', 'oper_status': 'up', 'tid': '<name x>', 'lag_name': 'ge-1/0/9', 'ospf': 'Yes'}, {'description': 'CORE:<router y>:ge-1/1/8::uplink to snaxtx411cw', 'loopback': '<ip 2>', 'int': 'ge-1/1/8', 'neighbor_ip': '<ip 3>', 'admin_status': 'up', 'in_lag': 'No', 'neighbor_type': 'CEN', 'oper_status': 'up', 'tid': '<name 3>', 'lag_name': 'ge-1/1/8', 'ospf': 'Yes'}]

but like 900 times that
3 posts omitted. Click Reply to view.
William Fengerchug - Sun, 24 May 2015 10:07:12 EST ID:2wGLz90c No.34009 Ignore Report Quick Reply
OP, I think a single object might be best for what you're doing. Not a list of objects. That dictionary looks like it's describing some sort of session or machine. So each of those attributes should be a trait of the object. Like:

Session.neighbor_ip = <ipA>
Session.lag_name = 'ge-1/1/8'

I think a list of objects would be most pointless and verbose option. A dictionary is probably the fastest, but also a bit verbose. An object with a bunch of attributes would be cleanest.

It's in the title.
William Fengerchug - Sun, 24 May 2015 10:10:22 EST ID:2wGLz90c No.34010 Ignore Report Quick Reply
Also, do you mean there's 900 more items in the dictionary? Or are there 900 different dictionaries like that? If it's the former, then the dictionary might actually make sense. If it's the latter, then you *definitely* want a single object with those attributes.
William Fengerchug - Sun, 24 May 2015 10:14:59 EST ID:2wGLz90c No.34011 Ignore Report Quick Reply
SHit. I should have said "a single CLASS." then you'd have a bunch of objects.

Before, I thought you were suggesting that each key:item in the dictionary would be replaced by an object. Which is obviously silly.
Charlotte Clindleforth - Tue, 26 May 2015 19:41:18 EST ID:euKhri8u No.34026 Ignore Report Quick Reply
1432683678122.jpg -(2108308B / 2.01MB, 3120x4160) Thumbnail displayed, click image for full size.
I have thousands of neighbor_IP and lag_name so according to your example I should have a single object representing all of them or a list of session objects? Thx.
Charlotte Clindleforth - Tue, 26 May 2015 19:43:10 EST ID:euKhri8u No.34027 Ignore Report Quick Reply
Or a third option I just realized would be a class containing objects.

class data():

def add_obj(x,y,z):

halp me pl0x by Albert Bluttingshaw - Mon, 25 May 2015 02:49:04 EST ID:46bDnMgl No.34017 Locked Ignore Report Reply Quick Reply
File: 1432536544668.png -(54775B / 53.49KB, 184x184) Thumbnail displayed, click image for full size. 54775
want to make a stream for my friends and i to watch movie every now and again but live stream is a cunt, twitch is copy write jews, i downloaded some stuff for livestream but it will only let me stream a black stream

>help please

i will reward thee with quality stoner movie streams
Thread has been locked
Thread was locked by: C_Higgy
Reason: Set up a channel on VaughnLive and create a room on TaimaTV to broadcast it. This should go in /tech/ though
Frederick Bruzzlestet - Mon, 25 May 2015 14:10:19 EST ID:KmxmS4eT No.34018 Ignore Report Quick Reply
My consulting rate starts at $200/hr.

Or just use Google Hangouts, if you meant to ask /tech/ instead of /prog/.
Shit Happerkutch - Mon, 25 May 2015 20:36:21 EST ID:vQS/i9AY No.34020 Ignore Report Quick Reply
make your own channel derppity derp
upload vids to dailymotion
stream on taima

Working as a QA analyst by Sidney Murdhall - Tue, 19 May 2015 13:16:07 EST ID:jP1hZ+Go No.33965 Ignore Report Reply Quick Reply
File: 1432055767902.jpg -(42093B / 41.11KB, 630x420) Thumbnail displayed, click image for full size. 42093
Hey /prog/, I got a job as a Quality Assurance Analyst for an IT consulting firm. It's entry level of course and I'd be responsible for testing and verifying all systems, code and data integration. I'd also review, test and document all solutions, manage defects, and make appropriate quality recommendations.

Eventually I would be getting into software engineering but I'd figured I'd ask you guys about what I should expect as a QA Analyst since I don't have any prior experience in the IT industry. Here's also the list of systems and databases I'd be learning and using on the job:

>SQL, Teradata, DB2ETL: Ab Initio, Informatica, UNIX Scripting, Linux scripting. Javascript, Python, Perl, ShellHadoop Stack: MapReduce, Pig, Hive, Shell, NoSQLTesting Frameworks: LoadRunner, HTML and Ruby.
Emma Bollywater - Wed, 20 May 2015 18:08:39 EST ID:0vajdH7R No.33976 Ignore Report Quick Reply
QA is generally a stepping-stone to development/customer support, which is a good thing as those are arguably better jobs. Expect to have an under-resourced and overworked department as very few companies want to invest lots of money in testing. And also be prepared to not take issues personally - a lot of the time bugs get left in, and it's down to a tradeoff between money/time.

I doubt you'd be using that many technologies, most likely you will need some basic Bash/DOS skills, some SQL, a scripting language, and possibly a few basic bits of a programming language.
Alice Dannertodge - Wed, 20 May 2015 19:02:18 EST ID:vQS/i9AY No.33977 Ignore Report Quick Reply
Unit testing, integration testing, probably requirements review

Greyhat Python is a good book to make your own security tests in python if you want to try them out there.
Wouldn't hurt to know some ops too
Archie Cittingpadge - Thu, 21 May 2015 00:18:06 EST ID:PW18fUqr No.33978 Ignore Report Quick Reply
It's pretty cool that you'll get to use a lot of those scripting languages! I hope that you end up learning a lot :)
Rebecca Grimham - Mon, 25 May 2015 17:39:01 EST ID:jP1hZ+Go No.34019 Report Quick Reply
The thing is that the the client of the consulting firm I'd be working for has a growing demand for quality assurance analysts so they're investing money into testing and new hires such as myself. At least the pay and benefits are good.

I start my training on Wednesday and I'm looking forward to learning about it.

mp3 alarm clock by Ernest Febberway - Fri, 03 Apr 2015 00:13:19 EST ID:dOi+hnTz No.33728 Ignore Report Reply Quick Reply
File: 1428034399634.jpg -(49239B / 48.08KB, 720x509) Thumbnail displayed, click image for full size. 49239
So some fag on /prog/ wanted an mp3 playing alarm clock, I said they could write one in less than an hour and I got bitched out.

Please post code for such an app ITT. I'm guessing that dick was a windows user, but who cares, post whatever you're happy with.

Ernest Febberway - Fri, 03 Apr 2015 00:16:11 EST ID:dOi+hnTz No.33731 Ignore Report Quick Reply
fucked up the board, damn.
Barnaby Shittingshaw - Fri, 03 Apr 2015 01:08:55 EST ID:utDyAKqP No.33732 Ignore Report Quick Reply
What the fuck is an app?

sleep 8h && ~/dumbthread.mp3
Faggy Chennerworth - Sat, 04 Apr 2015 10:51:55 EST ID:aJsJBvJp No.33744 Ignore Report Quick Reply
I just use the Task Scheduler in Windows for my alarm clock

Mining all links from facebook group by David Mungerson - Sun, 17 May 2015 20:53:39 EST ID:YkPpezVw No.33952 Ignore Report Reply Quick Reply
File: 1431910419686.png -(420424B / 410.57KB, 999x767) Thumbnail displayed, click image for full size. 420424
i need a script which extracts every link from a facebook group and exports them into a text file.. how can i go about doing this? i have no programming knowledge
Priscilla Chebberfoot - Mon, 18 May 2015 00:33:27 EST ID:PW18fUqr No.33955 Ignore Report Quick Reply
I don't think that this is possible without at least *some* programming knowledge. But if you really don't have any, then your best bet might be to go online and try and find a program that already does this for you.
Beatrice Mabberville - Mon, 18 May 2015 12:16:23 EST ID:2dhvW5UG No.33959 Ignore Report Quick Reply
Use curl to grab everything
Parse the textfile into links only
This is some kind of curl/awk/grep abortion to do it

Facebook has an API, you can also probably just request this information into a JSON feed or whatever they use and then assemble it into a clean file. Read the Facebook API docs about groups
Cedric Buzzbanks - Fri, 22 May 2015 21:25:21 EST ID:SJuOX6c2 No.34003 Ignore Report Quick Reply

if you like java'n shit.

This is also sort of why I hate spring, they have one for twitter too.

Writing code by hand, timed, in an exam setting by James Giddlecheck - Sun, 10 May 2015 06:40:24 EST ID:HoNztIQu No.33920 Ignore Report Reply Quick Reply
File: 1431254424208.jpg -(40606B / 39.65KB, 800x533) Thumbnail displayed, click image for full size. 40606
My feelings on subject: What in the fuckity fuck fuck shit cunt WHY. FIRE YOURSELF YOU FUCKING OUTDATED SHIT FUCK.

Your feelings on subject?
9 posts and 1 images omitted. Click Reply to view.
Archie Smallbury - Tue, 12 May 2015 03:10:01 EST ID:ShNwAORx No.33934 Ignore Report Quick Reply
I don't recall the term "table" used to describe an array of characters...I must be missing something here.
Isabella Mecklekock - Tue, 12 May 2015 03:37:01 EST ID:OheqWBBY No.33935 Ignore Report Quick Reply
Quick google suggests it's not common term. I hope I've just been taught strange terms at school and I'm not making up them myself.
Graham Pushbitch - Tue, 12 May 2015 04:09:25 EST ID:/m/w7omD No.33936 Ignore Report Quick Reply
At best, it's vague and imprecise. At worst, you can confuse someone as "table" objects of some description are almost ubiquitous among popular languages.
Priscilla Fendlebury - Wed, 13 May 2015 01:20:53 EST ID:PW18fUqr No.33939 Ignore Report Quick Reply
In my college, we had one course with a test where we had computers that weren't connected to the Internet and each computer had a compiler with IDE on them, but the catch is that you only had 5 compiles total, and that was it. Also, there were five questions that required compilable code, so you really had to be careful not to mess up!
Molly Findlewater - Fri, 15 May 2015 10:00:25 EST ID:Wk+Pkcpv No.33943 Ignore Report Quick Reply
Table is usually a mapping object like a Dict. SICP even calls a linked list of pairs a table.

Version print. by random_cnt. - Tue, 19 May 2015 09:02:04 EST ID:cANzwptg No.33963 Ignore Report Reply Quick Reply
File: 1432040524777.jpg -(57418B / 56.07KB, 1920x1200) Thumbnail displayed, click image for full size. 57418
I do not have any experience with software development, but i have a bit of scripting experience. I need to print the version , what is the properway of going about, should i add a version variable to the main and print or is it more preferred to get it read from changelog?
Basil Bimmerwater - Tue, 19 May 2015 17:07:34 EST ID:0+rQ+khF No.33966 Ignore Report Quick Reply
For your homework you're probably expected to set a constant global variable. In the real world, you would set it up so your build management software handles it for you.
random_cnt. - Wed, 20 May 2015 08:05:13 EST ID:zLVi1Po5 No.33974 Ignore Report Quick Reply
so basically handle it from makefile, right?
someone else suggested it as well. thanks.

Programming Languages by Shitting Happerstone - Mon, 18 May 2015 00:17:45 EST ID:w88gydYg No.33953 Ignore Report Reply Quick Reply
File: 1431922665889.png -(16733B / 16.34KB, 480x339) Thumbnail displayed, click image for full size. 16733
I want to program a game, use 3d models, multiplayer, etc.

The graphics will not be the big thing.
It will be a 3 person work.
I already know C and Java.

C++ vs Python.

Is really that good at performance C++ over Python?

¿Which would you recommend in your experience?
2 posts omitted. Click Reply to view.
Whitey Blatherdale - Mon, 18 May 2015 23:49:09 EST ID:QZVUvVpW No.33962 Ignore Report Quick Reply
It really doesn't matter for you what language you use. If you want to use Java, use LWJGL or LibGDX.
Alice Backlesture - Tue, 19 May 2015 18:47:55 EST ID:B5gNEfvE No.33967 Ignore Report Quick Reply
I just wanted to comment on that picture, while FORTRAN is very efficient, especially when dealing with very large data sets.

It is a complete pain in the ass and total hell to actually program in from my experience.

You're never going to use FORTRAN unless you're doing something with weather systems, or you're a fucking weather scientist.
Henry Geshstock - Tue, 19 May 2015 20:53:16 EST ID:w88gydYg No.33968 Ignore Report Quick Reply
1432083196315.png -(21739B / 21.23KB, 480x339) Thumbnail displayed, click image for full size.
So what about CYTHON
Jenny Drickleville - Tue, 19 May 2015 23:35:46 EST ID:yQhUxDBR No.33969 Ignore Report Quick Reply
What about it?
Whitey Febberlad - Wed, 20 May 2015 00:04:01 EST ID:SmCIrO7Y No.33972 Ignore Report Quick Reply
Python is about 53.1 times easier to learn than C++

From what I can tell C++ is the only language for graphically intense games because of its performance

<<Last Pages Next>>
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Report Post
Please be descriptive with report notes,
this helps staff resolve issues quicker.