-  [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 391 unique user posts. View catalog

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

There's a new /777/ up, it's /gardening/ 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++ Input Data Neckbearded Basement Dweller 14/05/04(Sun)07:47 No. 4436 [Reply]
4436

File 139918243382.jpg - (46.20KB , 600x586 , CHILI.jpg )

I'm a newfaggot programmer more or less. I'm writing a simple guessing game. The user guesses a random number within a range. The only problem I have is accepting multiple data types. The user needs to guess an integer, but I want them to also be able to be able to submit characters such as '?' or 'EOF' into cin to do something like bring up a help menu or quit guessing. Anyone here who can/wants to teach me which method I should use to accomplish this?

I'm not sure if this is a shitpost here or not so if it is, tell me to fuck off, thanks in advance.


11 posts omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 16/06/12(Sun)00:05 No. 4913

>>4910
That's awful.

template <typename T> bool is_only_digits(const T &s){ for (auto c : s) if (!isdigit(c)) return false; return true; }


>>
Neckbearded Basement Dweller 16/06/19(Sun)00:32 No. 4917

>>4913
Could you elaborate on that function of yours? I got quite confused.


>>
Neckbearded Basement Dweller 16/06/23(Thu)22:21 No. 4918

>>4917
It accepts a sequence of some kind and returns true if isdigit() returns true for all its elements. I used ranged for to iterate over the sequence.
I was going to take std::basic_string<T>, but I figured that would have just made it more confusing.




c++ help whale 16/05/20(Fri)06:14 No. 4895 [Reply]
4895

File arraywork.txt - (816B )

ask your student write program that lists european countries and their capitals. the programs retrieves this info from input file. the data has to be stored in two dimensional array.displayed in tabular format.......




Neckbearded Basement Dweller 15/12/27(Sun)11:21 No. 4840 [Reply]
4840

File 145121168726.png - (2.05KB , 352x72 , nginx.png )

At the moment i'm setting up a Nginx server on Ubuntu operating system but I can't access it from my other computer. I've got the server connected to a switch and then my laptop connected to another port. I'm almost certain that I have the config file worked out but I can't seem to figure out where the root file is (even with extensive research on this) and how to connect from my laptop to the server to even see basic webpages that I have created


>>
Neckbearded Basement Dweller 16/01/21(Thu)00:38 No. 4849

Things to check:

- Can you ping the server computer from your laptop?
- If not, are they on the same network? Do they have the same netmask? Are they both using IPv6 (or IPv4)? Do they have conflicting IP addresses? Conflicting MAC addresses? (Unlikely.)
- Is nginx listening on port 80? If not, are you trying to access the correct port?
- Does curl's -vvv option show you more interesting debugging output?
- If you're trying to use the domain name instead of the IP, does the domain name resolve?


>>
Neckbearded Basement Dweller 16/05/14(Sat)11:06 No. 4894

OP, did you restart? :D




Should I be fucked? Neckbearded Basement Dweller 16/02/18(Thu)21:55 No. 4865 [Reply]
4865

File 145582892088.jpg - (72.49KB , 800x665 , 1332772955387.jpg )

I need to transfer a file from windows to linux and then call an operation on it. I've done socket programming in C on Linux, should I be bothered learning it for windows or is there something "off the self" I can use.


>>
Neckbearded Basement Dweller 16/02/28(Sun)11:20 No. 4869

If you don't mind using C++, you could implement both ends with boost::asio.


>>
Neckbearded Basement Dweller 16/04/29(Fri)02:17 No. 4887

You can use cygwin




Neckbearded Basement Dweller 15/02/08(Sun)05:55 No. 4686 [Reply]
4686

File 142337132284.jpg - (123.47KB , 401x299 , istock_000002301094xsmall.jpg )

How much do you earn as a programmer?


6 posts omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 16/01/08(Fri)07:15 No. 4845

65k


>>
Neckbearded Basement Dweller 16/03/24(Thu)01:18 No. 4879

98k€/110k$ last year


>>
Neckbearded Basement Dweller 16/04/18(Mon)16:05 No. 4886

just under £50k including bonus in london, first year out of uni

i think this is 10-15k above average though because i was in financial sector




Neckbearded Basement Dweller 16/04/11(Mon)02:34 No. 4882 [Reply]
4882

File 146033487549.jpg - (4.01MB , 5248x2952 , IMG_20160410_183900208.jpg )

I'm a new fag tryig to help my friend with a thing for school and we can't figure out what to do.


>>
Neckbearded Basement Dweller 16/04/11(Mon)02:35 No. 4883
4883

File 146033495475.jpg - (3.70MB , 5248x2952 , IMG_20160410_183908835.jpg )

Part 2


>>
Neckbearded Basement Dweller 16/04/12(Tue)15:20 No. 4884

puto vos


>>
Neckbearded Basement Dweller 16/04/15(Fri)08:43 No. 4885

>>4882
Write a program that writes 10 .com files that each do the same thing (print hello world). These .com files should all be different at the assembly level because the goal is polymorphism for the purposes of evading static string analysis.

Seems straightforward to me.




alexnicolay87 16/01/24(Sun)06:33 No. 4853 [Reply]

hello


1 post omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 16/01/28(Thu)05:18 No. 4857

>>4853
hello good sir


>>
Neckbearded Basement Dweller 16/02/20(Sat)14:11 No. 4867

Hi!


>>
Neckbearded Basement Dweller 16/04/01(Fri)16:29 No. 4880

Hello :))




Neckbearded Basement Dweller 16/03/11(Fri)05:42 No. 4872 [Reply]
4872

File 14576713785.png - (1.82KB , 241x209 , tri.png )

Can someone help me fix my code? I'm trying to make a triangle using 2d arrays

public class Tri {
public static void main(String [] args){

int rows;
int columns;
int i,j;

int [][] arrayNumbers = new int[5][5];

arrayNumbers[0][0] = " ";
arrayNumbers[1][0] = " ";
arrayNumbers[2][0] = "*";
arrayNumbers[3][0] = " ";
Message too long. Click here to view the full text.


2 posts omitted. Click Reply to view.
>>
Nattajerk 16/03/11(Fri)06:09 No. 4875

>>4873
i cut out some things, so it fucked up. but that 'for example' would be how you would build a multidimensional array in one line.

string [][] aStringArray = new string [2][3]{{"a","b","c"},{"a2","b2","c2"}};


attempt #2


>>
Nattajerk 16/03/11(Fri)06:16 No. 4876

>>4874
it doesnt matter, the statements are virtually the same.

either way, you're trying to store strings in an array made for ints.


>>
Neckbearded Basement Dweller 16/04/04(Mon)05:20 No. 4881

Your 'rows' and 'columns' have no values, and triangles have 3 sides, not 4.




writting program Ali 15/03/09(Mon)21:26 No. 4705 [Reply]
4705

File CENG112_Lab2.pdf - (356.25KB )

can you write this program


1 post omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 15/03/20(Fri)20:26 No. 4714

with what should one even write this with ?


>>
Person 15/04/07(Tue)10:58 No. 4723

Yep, I can. Why do you ask?


>>
Neckbearded Basement Dweller 16/03/01(Tue)09:24 No. 4870

Damn Daniel, just drop out this is trivial




Neckbearded Basement Dweller 15/11/21(Sat)08:59 No. 4824 [Reply]
4824

File 144809274334.jpg - (131.34KB , 1280x720 , shodan.jpg )

endgame: create AI. true AI. also transfer a human consciousness to a new body of some kind.

current situation: can kind of program in C++.

what do so i don't keep sucking and how to do what i wanna do?


6 posts and 1 image omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 16/01/26(Tue)09:34 No. 4855

>>4854
http://www.artificialbrains.com/spinnaker

Here's a try at simulating a Rat's brain.


>>
ZeroTheMachine 16/01/30(Sat)01:37 No. 4860

try using Lisp Actually use lisp and become familiar with it and reprogram your own lisp C++ Variant


>>
Neckbearded Basement Dweller 16/02/18(Thu)10:24 No. 4864

>>4862
"Magic" of course has several connotations. Besides "wondrous" and "mysterious", there's "unknown" and "poorly understood". It's the mark of intelligence to want to get away from ignorance and refuse to accept that anything is magical.




Delete post []
Password  
Report post
Reason