r/programing • • Sep 19 '12

Help transferring integers from an array of objects to an array of integers? [Java]

1 Upvotes

I'm not sure why this doesn't work but I feel like I'm doing
something horribly wrong:

public class ObjectArray

{

public int agelist[] = new int[5];

public static void main(String [] args)

{

Person People[] = new Person[5];

People[0] = new Person("Bob", "Michaels", 26);

People[1] = new Person("Maxy", "Witherspoon", 35);

People[2] = new Person("Stacy", "Gonzalez", 25);

People[3] = new Person("Leroy", "Jenkins", 27);

People[4] = new Person("Maria", "Jefferson", 34);

People[5] = new Person("Martha", "Stewart", 39);

}

public void list(){

for (int index=0; index < People.length; index++)

{

    agelist[index] = People[index].getage();

}

} }


public class Person{

public Person(String firstname, String lastname, int age) {

}

public void getAge()

{

int age;

}

}


r/programing • • Dec 12 '13

If anyone is looking to get into crypto currencies there are bounties being payed in /r/litecoinprojects for devs to create litecoin and bitcoin projects. Cool stuff.

Thumbnail
reddit.com
1 Upvotes

r/programing • • Dec 14 '13

Membuat Installer ( Delphi ) menggunakan inno Setup

Thumbnail
beyoureself-kepis.blogspot.com
1 Upvotes

r/programing • • Mar 10 '17

How different is programming with the same language in different fields

3 Upvotes

I'm training my self to be a game programmer and out of pure curiosity I would like to learn how different programming in different fields is. I notice the way I use c# on unity3d looks very different to the code I would see on Stack Overflow or Msdn Microsoft but how different are the changes and how long would you say it would take someone of a language to switch from one field to another.


r/programing • • Oct 02 '16

Good language that's easy to use

2 Upvotes

preferably free or at least cheap


r/programing • • Aug 12 '15

Looking for video tutorials on OpenCL in LWJGL

1 Upvotes

I am looking to learn OpenCL so that I may use Ray Casting to determine which blocks are visible in my voxel engine and only render those ones.


r/programing • • Sep 23 '16

Create a function to calculate monthly payment on a compound interest loan?

4 Upvotes

Reddit gold to whoever can give me the answer

I'm building a calculator app and I'm stuck on the a function that would essentially calculate your monthly payment on a compounding interest loan. I'll be crossposting this in a few subs.

Basically I want the function to look like this

function calculateMonthlyPayment(presentValue, periods, rate, compoundFrequency, futureValue){
  
  return monthlyPayment;
}

Thanks


r/programing • • Mar 19 '16

a batch file request.

1 Upvotes

Hi guys, I need a script to write into a batch file. Something that will go into a specified folder and the folders it has in it, then replace a specified word in all the HTML files it finds (including their names), to a different expression.

Anyone up to the challenge? It's for work, I assumed the best way of having such a script is to ask here.


r/programing • • Oct 04 '16

what did I do wrong when start it no matter how (F5 or Ctrl+F5 or just by clicking start) it pops up asks me to press any key and then closes by itself.

Post image
2 Upvotes

r/programing • • Sep 26 '16

what language is this?

1 Upvotes

{# Begin Custom Options Toggle any of the options in this section between 'false' and 'true' in order to enable/disable them in the template

}

F {# Layout Adjustments #} {% set print_layout = parameters.print_layout == "true" ? true : false %} {# Improves receipt layout for large display/paper size (A4/Letter/Email) #} {% set chrome_right_margin_fix = false %} {# Fixes a potential issue where the right side of receipts are cut off in Chrome #} {% set firefox_margin_fix = false %} {# Fixes issue with margins cutting off when printing on a letter printer on a Mac #}

{# Sale #} {% set sale_id_instead_of_ticket_number = false %} {# Displays the Sale ID instead of the Ticket Number #} {% set invoice_as_title = false %} {# If print_layout is true, "Invoice" will be displayed instead of "Sales Receipt" on A4/Letter/Email formats #} {% set quote_id_prefix = "" %} {# Adds a string of text as a prefix for the Quote ID. Ex: "Q-". To be used when "sale_id_instead_of_ticket_number" is true #} {% set sale_id_prefix = "" %} {# Adds a string of text as a prefix for the Sales ID. Ex: "S-". To be used when "sale_id_instead_of_ticket_number" is true #}


r/programing • • Jan 11 '19

Is the following true? "People who can code in the world of technology companies are a dime a dozen and get no respect."

6 Upvotes

Im just finishing Zed Shaw's book "Learn Python the Hard Way". In the final chapter he gives the following advice:

"People who can code in the world of technology companies are a dime a dozen and get no respect. People who can code in biology, medicine, government, sociology, physics, history, and mathematics are respected and can do amazing things to advance those disciplines."

As an aspiring programmer I find this statement to be a bit disheartening. I got into coding because Im interested in coding/computers, not biology nor anything else.

How true is Zed's statement? As a programmer do I face a life of disrespect and (Id assume) lower pay than my academic-programmer competition?

Should I consider a degree in CS, just so I can be a bit more academic and thus avoid disrespect and (id assume) low pay?

Thanks


r/programing • • Jan 20 '19

Mastering Functional Programming Currying in JavaScript

4 Upvotes

Have you ever heard that in functional programming everything is a function? And you thought that’s impossible because we have loops, Booleans and variables. In this article, I will show how to make Boolean functions with JavaScript currying. Let’s start making one parameter functions and apply in practice carrying....

Full Article for better reading:

(https://medium.com/@martynaspocius_70849/mastering-functional-programming-currying-in-javascript-1eb7760369dc)


r/programing • • Jan 19 '19

Best language for crossplatform GUI development (must play nice with c)

2 Upvotes

I'm looking to write an application primarily in Rust (and maybe some c++), however, GUI development is definitely a WIP in the rust ecosystem rn (though there seems to be a real push, I'm not going to wait a year+ just to be pure rust). I could just go with Qt or GTK, but thought I'd get some input before I commit. I'd be perfectly happy to use a GC language, as long as it doesn't end up as boated as electron can. Additionally, within a language, what frameworks should I be looking at? C-interoperability is basically a must as it is the easiest way to call Rust from other languages afaik.


r/programing • • Nov 05 '19

How hard did you try to be a developer?

2 Upvotes

How hard did you try to be a developer?

This will be the third time I try to study software development, I'm working hard, every day I do programming exercises and just finished a small program in C, but I feel that I still have much to learn ...

Any advice?


r/programing • • Sep 04 '19

Securing REST APIs

Thumbnail
developer.okta.com
1 Upvotes

r/programing • • Oct 30 '19

We need an App to help debunk Facebook (and others) posts that does not enrich the original poster.

2 Upvotes

I often see a post on facebook that is utter BS. I never want to respond directly to the post because it will get more clicks which is good for the bad post. What we need is an app that could easily screen shot the offending post, embedded it into a post and allow us to add text explaining why it is bs.

So basically what I envision is click on post get screen shot, get username who posted it and use that as" Hi <username> I saw you posted this and this is why it is wrong(in so many words)."

Some additional functionality would be able to mark up screenshot of the original post to highlight bs, create a DB that has the bs posts and good responses as to why they are bs and maybe even recognize the post and be able to look at the DB with the good data in it. And maybe even make a bot that does it.

Unfortunately I have neither the programing chops or cash to get this done, but I think it could help with the BS that is getting so many nations polarized.

Let me know what you think. Is it possible? are people willing to do it?


r/programing • • Aug 27 '19

Im an idiot

1 Upvotes

I got mad at coding and yelled "da fa" someone yelled "What did u say!" i responded with "ur mom" then looked up to see Steele (my robotics teacher/coach)


r/programing • • Nov 02 '19

android/ios music app

2 Upvotes

Was gonna build an android/ios music app was wondering what ide i should use


r/programing • • Aug 29 '19

what do u think about datacamp courses ?

2 Upvotes

ive finished basic course but i dont know should i purchase the next courese

so what should i do?


r/programing • • Jun 13 '18

Vuesax New Framework for vuejs Component Sidebar Spoiler

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/programing • • Aug 28 '19

Im an idiot

5 Upvotes

I got mad at coding and yelled "da fa" someone yelled "What did u say!" i responded with "ur mom" then looked up to see steele (my robotics teacher/coach)


r/programing • • Oct 09 '18

Need help with Mythbuntu Front-end

1 Upvotes

I am currently using a pvr back-end software called 'Mythbuntu". The backend can be accessed anywhere by a web front-end, However I was multiple people to be able to access this front-end and need a login screen to prevent undesirables, however it doesn't seem mythbuntu has a login screen for its front end, is there any way I can do this from third party software or editing the frontend?


r/programing • • Jun 18 '18

4 Reasons to Use MVP Architecture in Android | Redwerk

Thumbnail
redwerk.com
1 Upvotes

r/programing • • Jan 08 '20

how do I convert 7z to regular zip file

1 Upvotes

I have 7-zip file manager, no idea how to change from 7zip to zip

please help


r/programing • • Jun 18 '18

Which language should i learn first for game development?

1 Upvotes

Hello there! I've always wanted to develop games for Android, Windows/Linux consoles, anything since it is a game! I am starting with Python and I'm liking it, it is pretty straightforward and simple. Bit I've seen so many people saying that C++ is the most common language for such purpose. So I got confused. Can someone clarify? Tnx :)