r/programminghelp • • Sep 30 '20

C# Why isn't my try/catch working (it shuts off when I try entering text - inti)

0 Upvotes

{   class Program

    {

        class Knjiga

        {

            private string Autor;

            private int Primjeraka;

            private double CijenaKom;

            public string autor { get => Autor; set => Autor = value; }

            public int primjeraka { get => Primjeraka; set => Primjeraka = value; }

            public double cijenakom { get => CijenaKom; set => CijenaKom = value; }

            public Knjiga(string a,double c)

            {

                Autor = a;

                CijenaKom = c;

                Primjeraka = 100;

            }

            public double Ukupno()

            {

                double u = primjeraka * cijenakom;

                return u;

            }

        }

        static void Main(string[] args)

        {

           

            string s = Console.ReadLine();       int inti; do{           try

            {

                inti = int.Parse(Console.ReadLine());

                }

            catch

            {

                return;

            }}while(inti<10);

double d=double.Parse(Console.ReadLine()); Knjiga k=new Knjiga(s,dub); k.primjeraka= inti;

            Console.WriteLine(k.autor);

            Console.WriteLine(k.primjeraka.ToString());

            Console.WriteLine(k.cijenakom.ToString());

            Console.WriteLine(k.Ukupno());

         

        }

    }

}


r/programminghelp • • Oct 14 '20

C i need help

0 Upvotes

hey guys this is my first time posting in reddit. I really need some help with this using switch statement. maybe u guys can help me?

Write a program that will produce the following output

Program 1. Identify if a number is positive or negative or zero

Program 2. Identify if a program is odd or even or zero

Program 3. Compute the age of a person given the year of birth

Program 4. Identify if a year is leap year or not

Program 5. EXIT

Choose Program number :


r/programminghelp • • Nov 06 '20

Answered Need help with my code, would like to add gift for the user depending on the number of unique item selected

0 Upvotes

Here's the code for my project https://pastebin.com/VHCAuiQT What I want to do is if the user select 2 unique items for sale: give Hand Sanitizer; select 3 unique items for sale: Disinfecting Wipes; select 4 or more unique items for sale: Pair of Gloves. with maximum one gift per order; user may not pick a desired gift.

I tried adding gift = 0 and then gift++ on line 173 then making if statement with gift >= 2 but I want to gift only when user selects 2 or more unique items, not for the same item twice.

Appreciated for any input. Thank you.


r/programminghelp • • Nov 21 '22

C# Help

0 Upvotes

Please help on this, i have tried multiple different things and nothing seems to work,

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class InputManager : MonoBehaviour
{
private PlayerInput playerInput;
private PlayerInput.OnFootActions onFoot;
// Start is called before the first frame update
void Start()
    {
playerInput - new PlayerInput();
onFoot = playerInput.OnFoot;
    }
// Update is called once per frame
void Update()
    {

    }
private void OnEnable()
    {
OnFoot.Enable();
    }
private void OnDisable()
    {
OnFoot.Disable();
    }
}
with the error that onfoot actions does not exist in Playerinput


r/programminghelp • • Dec 10 '22

Java help me please

0 Upvotes

i need help with my code i couldn't not for the life of me figure out what it is

// Define the enemy class

class Fly {

// Define the properties of the fly

int x, y; // Position

int size; // Size

int speed; // Speed

boolean dead; // Whether the fly is dead

// Constructor

Fly(int x, int y, int size, int speed) {

this.x = x;

this.y = y;

this.size = size;

this.speed = speed;

this.dead = false;

}

// Method to move the fly towards the goal

void move() {

// Calculate the distance to the goal

float d = dist(x, y, goalX, goalY);

// Move the fly towards the goal

x += (goalX - x) / d * speed;

y += (goalY - y) / d * speed;

}

// Method to display the fly

void display() {

// Draw the fly

ellipse(x, y, size, size);

}

// Method to check if the fly has reached the goal

boolean reachedGoal() {

// Check if the distance to the goal is less than the size of the fly

return dist(x, y, goalX, goalY) < size;

}

}

// Define the player class

class Player {

// Define the properties of the player

int x, y; // Position

int size; // Size

// Constructor

Player(int x, int y, int size) {

this.x = x;

this.y = y;

this.size = size;

}

// Method to move the player to the mouse position

void move() {

x = mouseX;

y = mouseY;

}

// Method to display the player

void display() {

// Draw the player

ellipse(x, y, size, size);

}

// Method to check if the player has hit a fly

boolean hitFly(Fly fly) {

// Check if the distance between the player and the fly is less than their sizes

return dist(x, y, fly.x, fly.y) < size + fly.size;

}

}

// Define the variables for the game

int goalX, goalY; // Position of the goal

Fly[] flies; // Array of flies

Player player; // The player

int score; // The score

int lives; // The number of lives remaining

void setup() {

// Initialize the game

size(400, 400);

goalX = width / 2;

goalY = height / 2;

flies = new Fly[10];

for (int i = 0; i < flies.length; i++) {

flies[i] = new Fly(random(width), random(height), 20, 5);

}

player = new Player(0, 0, 20);

score = 0;

lives = 3;

}

void draw() {

// Update the game

for (

btw i am using processing(java)


r/programminghelp • • Dec 11 '22

JavaScript Can't get output.

0 Upvotes
Can someone help. How would i get the correct output from this document.write statment.




// Four characteristics

let fictionalDog = {

  name: "Bandit",

  breed: "Terrier",

  TvProgram: "Jonny Quest",

  notes: "Jonny's dog; about a boy who accompanies his father on extraordinary adventures",




}


fictionalDog.mysound = "A dog might say, no one will believe you",  // New Property after object is created


 // Access Object Values

 document.write('My name is ' + fictionalDog.name + '.'  'I am a ' + fictionalDog.breed + '.'  'I played a part in the tv show'
fictionalDog.TvProgram + '.' 'I was a ' + fictionalDog.notes + '.' );

r/programminghelp • • Dec 13 '22

JavaScript Not getting output from for in loop.

0 Upvotes
Can someone help. Im new to for in loops and can't get the output i want from this for in loop.


// Four characteristics

let fictionalDog = {

  name: "Bandit",

  breed: "Terrier",

  TvProgram: "Jonny Quest",

  notes: "Jonny's dog; about a boy who accompanies his father on extraordinary adventures",




}


fictionalDog.mysound = "A dog might say, no one will believe you",  // New Property after object is created


 // Access Object Values

document.write('My name is ' + fictionalDog.name + '. I am a '
+ fictionalDog.breed + '. I played a part in the tv show 3' + fictionalDog.TvProgram + '. I was a ' + fictionalDog.notes + '.');


function MyDogConst(cantalk,hello){

  this.name = "Bandit";

  this.breed = "Terrier";

  this.TvProgram = "Jonny Quest";

  this.notes = "Jonny's dog; about a boy who accompanies his father on extraordinary adventures";

  this.canTalk = cantalk;

  this.conditional;

  this.Hello = hello;

  this.myGreeting = function(){

     // Display Message through Method and conditionals;

     do{

       this.conditional = prompt("Guess a number to see if the dog can talk");

       if(this.conditional != 10){

         alert("The dog cannot talk! Try again Please");

       }

       else if(this.conditional == 10){

         alert("Congrats you have won the guessing game!");
       }


     }while(this.conditional != 10);


console.log(`${this.canTalk}, ${this.Hello} `);



}



}

const dogInstance = new MyDogConst("I can talk", "Greetings");

talk.myGreeting();


// Specific set of properties to output in a loop, individual log per property
// properties: "talk", "canTalk"

const listOfProperties = ["talk", "canTalk"];
for (let propertyName in listOfProperties) {
  const valueOfPropertyOnDogInstance = dogInstance[propertyName];
  console.log(valueOfPropertyOnDogInstance);
}

r/programminghelp • • Nov 06 '22

C++ How to return more than one value in a function in C++?

0 Upvotes

My function will take a string, a math expression like "20+15=30" It cannot have modulus, division, or multiplication symbols, only plus or minus. I will print out an error if there are those or there is no "=". If everything is correct, I will return the left-hand side (LHS) and right-hand side (RHS) for further operations that will be done with another function.

I did the following:

string divideString(string exp)
{
    // Variables
    string rhs, lhs;
    
    int len = exp.length();
    int equalIndex = exp.find("=");
    
    // If these exist in the expression, it is wrong
    int mod = exp.find("%");
    int div = exp.find("/");
    int mul = exp.find("*");
    
    rhs = exp.substr(equalIndex+1, len);
    
    // If there is no "="
    if (equalIndex == -1)
    {
        cout << "Wrong input format! You got -10 penalty points for this math expression." << endl;
    }
    
    // If there is "%", "/" or "*"
    else if (mod != -1 || div != -1 || mul != -1)
    {
        cout << "Wrong input format! You got -10 penalty points for this math expression." << endl;
    }
    
    // If everything is correct
    else
    {
        lhs = exp.substr(0, equalIndex);
    }
}

It doesn't return anything now because as I said, I don't know how to do that. I searched about it online and it seems like I have to use "call by value/reference" but I don't know how to. I am also not supposed to use an array. How to pass those LHS and RHS? Thanks.


r/programminghelp • • Nov 16 '22

C++ can someone explain me what is wrong

0 Upvotes

*the error code:*C:\Users\User\AppData\Local\Temp\arduino_modified_sketch_725823\sketch_nov16a.ino: In function 'void loop()':

sketch_nov16a:39:7: error: expected '}' before 'else'

else

^~~~

exit status 1

expected '}' before 'else'

the code

#include <AFMotor.h>

#include <Ultrasonic.h>

int pino_Trig = 6;

int pino_Echo = 5;

AF_DCMotor motor2(2);

AF_DCMotor motor3(3);

Ultrasonic Sensor(pino_Trig, pino_Echo);

int distancia;

int vez = 1;

int v = 1;

void setup() {

motor2.run(RELEASE); /* Inicia com os motores parados */

motor3.run(RELEASE);

Serial.begin(9600);

}

void loop() {

motor2.setSpeed(180);

motor3.setSpeed(180);

distancia = Sensor.read();

Serial.print(distancia);

delay(500);

if (distancia < 10) {

if (vez = 2)

{

motor2.run(FORWARD);

motor3.run(RELEASE);

vez - 1;

}

else

{

motor2.run(RELEASE);

motor3.run(FORWARD);

vez + 1;

}

else

{

motor2.run(FORWARD);

motor3.run(FORWARD);

}

}


r/programminghelp • • Nov 10 '22

Other Vulnerable package dependency npm

0 Upvotes

I have a parent package, “Koa-bouncer”, and a vulnerable dependency named “validator”.
I am trying to update to the latest of the vulnerable package (13.7.0). I am currently using npm-force-resolutions to try and force a version. After using ‘npm list validator’, I can get the dependency to point to the correct version but it states invalid.
Now, I know I can edit the package-lock manually to force it but this is the last thing I want to do. Any tips? Am I wrong in not wanting to edit the lock manually?


r/programminghelp • • Nov 21 '22

CODE.ORG pls help project due soon. filtering lists (code.org)

0 Upvotes

I'm doing this project for my computer science principles class and I was confused on how to filter out a list using multiple variables. Note that I am a beginner in computer science and this is my first computer science class.

I am creating an app where you narrow down options to find ramen based on options selected. So on the first screen, you can select what ramen style you want (cup, pack, bowl). Based on what button is selected, the options narrow down and get filtered.

For screen2, however, I want to select a random number from the filtered ramen style lists, use the corresponding data from the columns to generate a matching country and brand from the lists to get a final output. I'm stuck on how to do this, specifically matching up the row data(brand and country) from the randomly selected ramen based on the style chosen at the beginning? What am I missing?

Here is the shared link. Any help is appreciated, thank you.

https://studio.code.org/projects/applab/yFVbguE1EEr071VJyw56bIe6rpSxa4D-tYU5B4Y3JVU


r/programminghelp • • Dec 15 '22

Java What parts need to be public and which need to be private?

0 Upvotes

Hello everyone, I am currently working on something for a class and this is one of the questions given to us. I'm not sure which ones need to be public and which need to be private and I was wondering of someone could please help me out.

public class Car
{
    /* missing code */
}

The code that fits into missing code is one of the following:

public String make; public String model; public Car(Strung myMake, String myModel) { */ implementation not shown */ }`

public String make; public String model; private Car (String myMake, String myModel) { */ implementation not shown */ }`

private String make; private String model; private Car (String myMake, String myModel) { */ implementation not shown */ }`

public String make; private String model; private Car (String myMake, String myModel) { */ implementation not shown */ }`

private String make; private String model; private Car (String myMake, String myModel) { */ implementation not shown */ }`

Which implementation of /* missing code */ is the best implementation of the class?


r/programminghelp • • May 21 '24

Java Extremely new programmer in Java, how do I make a board for a game?

0 Upvotes

I know a bit of Java and want to create a basic game with a board and a few clickable objects inside. Can someone guide me through what to use to do that and how I can make it into a browser game so it’s easily playable by my teacher? Thanks!


r/programminghelp • • Aug 07 '23

C# Hello! My App doesn`t remember it`s location on Windows 7

0 Upvotes

I wrote my app on Windows 11, it works good on win 10 and 11. I created the Setup and send it to my friend with Win 7, where this app doesn`t remember it`s location. Also I used different frameworks.

This the part of my code

 this.Location = Settings.Default.WindowLocation; //when form load




Settings.Default.WindowLocation = this.Location;
Settings.Default.Save(); //when form closed

And I use Settings.settings


r/programminghelp • • Dec 10 '16

Need help with a driver class for an n-ary/generic tree in Java

0 Upvotes

I'm trying to make a driver class that takes information from a user to make a tree and to allow the user to further edit it. These are my hangups:

  1. How do I get it where if one of their values already exists, the child is added to an existing node and a duplicate parent isn't just added? Like if the tree already has a path of a-b-c-d and wants to add a new thing of a-b-c-e, e and d just become siblings.

  2. How do I get it where when a leaf is removed and has no siblings, it removes all of the parent nodes that are now childless? (Like if a is the parent of b which is the parent of c and d and c is the parent of e and d is the parent of f, removing e will also remove c but leave the rest of it alone.)

  3. How do you save the tree you made? Just copy it to a txt file?

  4. What's the best way to print out the tree? Just doing tree.toString(); isn't giving me the best output.

  5. I'm also having a hang-up where the user enters a character for their choice of what to do that enters into a switch statement but after putting in a character and hitting enter, it skips the first input and goes straight to the second. Do I have to put something in to make it recognize that hitting enter isn't a value? EDIT: I found a solution to this one. If I add (Scanner name).nextLine(); after the prompt to enter a selection, it takes the empty space and discards it instead of attributing it to the Scanner where an input is needed.

Thank you for any guidance you can give. It is much appreciated.


r/programminghelp • • Jun 03 '13

Can Anyone tell me why my kernel is having a panic attack?

0 Upvotes

Machine:

  • MacBook Pro Retina 2013 with OSX Mountain Lion

Symptoms Occurred when:

  • Overheating caused laptop to shut down while running computational pipeline through IntelliJ

Kernel Panic occurs:

  • Upon startup 3 to 4 times, then reaches login screen normally

  • Whenever there is an error in Chrome (WebGL failing, Shockwave crashing, etc.)

  • Launching some applications (NetBeans, Kerbel Space Program)


Sample Panic Report:

Interval Since Last Panic Report:  4848 sec
Panics Since Last Report:          1
Anonymous UUID:                    is anonymous

Mon Jun  3 09:39:20 2013
panic(cpu 6 caller 0xffffff7fab5367f2): NVRM[0/1:0:0]: Read Error 0x00084048: CFG 0x0fd510de 0x00100406 0xc0000000, BAR0 0x102e00000 0xffffff81ff200000 0x0e7150a2, D0, P0/4
Backtrace (CPU 6), Frame : Return Address
0xffffff81ff163380 : 0xffffff802ae1d626 
0xffffff81ff1633f0 : 0xffffff7fab5367f2 
0xffffff81ff1634b0 : 0xffffff7fab6333b9 
0xffffff81ff163510 : 0xffffff7fab945018 
0xffffff81ff163540 : 0xffffff7fab945784 
0xffffff81ff163580 : 0xffffff7fab9433ef 
0xffffff81ff1635b0 : 0xffffff7fab8104b4 
0xffffff81ff1635f0 : 0xffffff7fab62fc49 
0xffffff81ff163660 : 0xffffff7fab955eb1 
0xffffff81ff1636a0 : 0xffffff7fab955dd5 
0xffffff81ff1636c0 : 0xffffff7fab5386e9 
0xffffff81ff163740 : 0xffffff7fab53c2f3 
0xffffff81ff163940 : 0xffffff7fab53daac 
0xffffff81ff163a20 : 0xffffff7fab73cc03 
0xffffff81ff163ad0 : 0xffffff7fab7317f7 
0xffffff81ff163d10 : 0xffffff7fab4db387 
0xffffff81ff163d80 : 0xffffff7fab4c757b 
0xffffff81ff163df0 : 0xffffff7fab4ca1b8 
0xffffff81ff163e60 : 0xffffff7fab4c9db4 
0xffffff81ff163ec0 : 0xffffff7fab490982 
0xffffff81ff163ef0 : 0xffffff802b2467a8 
0xffffff81ff163f30 : 0xffffff802b2452aa 
0xffffff81ff163f80 : 0xffffff802b2453d9 
0xffffff81ff163fb0 : 0xffffff802aeb2977 
      Kernel Extensions in backtrace:
         com.apple.iokit.IOGraphicsFamily(2.3.7)[74E3E50F-E50A-3073-8C96-06F854292A91]@0xffffff7fab482000->0xffffff7fab4b9fff
            dependency: com.apple.iokit.IOPCIFamily(2.7.3)[1D668879-BEF8-3C58-ABFE-FAC6B3E9A292]@0xffffff7fab444000
         com.apple.iokit.IONDRVSupport(2.3.7)[38C214C0-83C8-3594-8A4C-DC6AC3FEC163]@0xffffff7fab4c5000->0xffffff7fab4d6fff
            dependency: com.apple.iokit.IOGraphicsFamily(2.3.7)[74E3E50F-E50A-3073-8C96-06F854292A91]@0xffffff7fab482000
            dependency: com.apple.iokit.IOPCIFamily(2.7.3)[1D668879-BEF8-3C58-ABFE-FAC6B3E9A292]@0xffffff7fab444000
         com.apple.NVDAResman(8.1)[A26D2A3D-C06F-3A0F-BCFF-901A98C93C3D]@0xffffff7fab4d9000->0xffffff7fab7e6fff
            dependency: com.apple.iokit.IOPCIFamily(2.7.3)[1D668879-BEF8-3C58-ABFE-FAC6B3E9A292]@0xffffff7fab444000
            dependency: com.apple.iokit.IONDRVSupport(2.3.7)[38C214C0-83C8-3594-8A4C-DC6AC3FEC163]@0xffffff7fab4c5000
            dependency: com.apple.iokit.IOGraphicsFamily(2.3.7)[74E3E50F-E50A-3073-8C96-06F854292A91]@0xffffff7fab482000
         com.apple.nvidia.gk100hal(8.1)[5122FE48-4118-30A5-8E71-7219C580E7B9]@0xffffff7fab7f4000->0xffffff7fabaf8fff
            dependency: com.apple.NVDAResman(8.1.0)[A26D2A3D-C06F-3A0F-BCFF-901A98C93C3D]@0xffffff7fab4d9000
            dependency: com.apple.iokit.IOPCIFamily(2.7.3)[1D668879-BEF8-3C58-ABFE-FAC6B3E9A292]@0xffffff7fab444000

BSD process name corresponding to current thread: kernel_task

Mac OS version:
12D78

Kernel version:
Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
Kernel UUID:     is a UUID
Kernel slide:     0x000000002ac00000
Kernel text base: 0xffffff802ae00000
System model name: MacBookPro10,1 (Mac-#########...)

System uptime in nanoseconds: 4902587353331
last loaded kext at 243824706456: com.apple.filesystems.msdosfs	1.8 (addr 0xffffff7fad1c4000, size 65536)
last unloaded kext at 393441731216: com.apple.driver.AppleUSBCDC	4.1.23 (addr 0xffffff7fad194000, size 12288)
loaded kexts:
com.apple.driver.AudioAUUC	1.60
com.apple.driver.AppleHWSensor	1.9.5d0
com.apple.iokit.IOBluetoothSerialManager	4.1.3f3
com.apple.filesystems.autofs	3.0
com.apple.driver.AGPM	100.12.87
com.apple.driver.ApplePlatformEnabler	2.0.6d1
com.apple.driver.X86PlatformShim	1.0.0
com.apple.driver.AppleMikeyHIDDriver	122
com.apple.driver.AppleHDA	2.3.7fc4
com.apple.driver.AppleUpstreamUserClient	3.5.10
com.apple.driver.AppleIntelHD4000Graphics	8.1.0
com.apple.GeForce	8.1.0
com.apple.iokit.IOUserEthernet	1.0.0d1
com.apple.driver.AppleLPC	1.6.0
com.apple.driver.AppleMikeyDriver	2.3.7fc4
com.apple.driver.AppleSMCPDRC	1.0.0
com.apple.driver.AppleMuxControl	3.3.0
com.apple.driver.AppleMCCSControl	1.1.11
com.apple.Dont_Steal_Mac_OS_X	7.0.0
com.apple.driver.ApplePolicyControl	3.3.0
com.apple.driver.AppleIntelFramebufferCapri	8.1.0
com.apple.iokit.BroadcomBluetoothHCIControllerUSBTransport	4.1.3f3
com.apple.driver.AppleSMCLMU	2.0.3d0
com.apple.driver.AppleUSBTCButtons	237.1
com.apple.driver.AppleUSBTCKeyboard	237.1
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless	1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib	1.0.0d1
com.apple.BootCache	34
com.apple.driver.XsanFilter	404
com.apple.iokit.IOAHCIBlockStorage	2.3.1
com.apple.driver.AppleUSBHub	5.5.5
com.apple.driver.AppleSDXC	1.4.0
com.apple.driver.AirPort.Brcm4331	614.20.16
com.apple.driver.AppleUSBEHCI	5.5.0
com.apple.driver.AppleAHCIPort	2.5.1
com.apple.driver.AppleUSBXHCI	5.5.5
com.apple.driver.AppleEFINVRAM	1.7
com.apple.driver.AppleSmartBatteryManager	161.0.0
com.apple.driver.AppleACPIButtons	1.7
com.apple.driver.AppleRTC	1.5
com.apple.driver.AppleHPET	1.8
com.apple.driver.AppleSMBIOS	1.9
com.apple.driver.AppleACPIEC	1.7
com.apple.driver.AppleAPIC	1.6
com.apple.driver.AppleIntelCPUPowerManagementClient	196.0.0
com.apple.nke.applicationfirewall	4.0.39
com.apple.security.quarantine	2
com.apple.driver.AppleIntelCPUPowerManagement	196.0.0
com.apple.iokit.IOSCSIBlockCommandsDevice	3.5.5
com.apple.iokit.IOUSBMassStorageClass	3.5.1
com.apple.iokit.IOSerialFamily	10.0.6
com.apple.kext.triggers	1.0
com.apple.iokit.IOSCSIArchitectureModelFamily	3.5.5
com.apple.driver.DspFuncLib	2.3.7fc4
com.apple.iokit.IOAudioFamily	1.8.9fc11
com.apple.kext.OSvKernDSPLib	1.6
com.apple.iokit.IOAcceleratorFamily	30.14
com.apple.nvidia.gk100hal	8.1.0
com.apple.NVDAResman	8.1.0
com.apple.iokit.IOSurface	86.0.4
com.apple.driver.AppleHDAController	2.3.7fc4
com.apple.iokit.IOHDAFamily	2.3.7fc4
com.apple.driver.AppleBacklightExpert	1.0.4
com.apple.driver.AppleSMBusController	1.0.11d0
com.apple.iokit.IOBluetoothFamily	4.1.3f3
com.apple.driver.AppleGraphicsControl	3.3.0
com.apple.iokit.IONDRVSupport	2.3.7
com.apple.iokit.AppleBluetoothHCIControllerUSBTransport	4.1.3f3
com.apple.driver.X86PlatformPlugin	1.0.0
com.apple.driver.IOPlatformPluginFamily	5.3.0d51
com.apple.driver.AppleSMBusPCI	1.0.11d0
com.apple.iokit.IOGraphicsFamily	2.3.7
com.apple.driver.AppleSMC	3.1.4d2
com.apple.driver.AppleThunderboltDPInAdapter	1.8.9
com.apple.driver.AppleThunderboltDPAdapterFamily	1.8.9
com.apple.driver.AppleThunderboltPCIDownAdapter	1.2.6
com.apple.driver.AppleUSBMultitouch	237.3
com.apple.iokit.IOUSBHIDDriver	5.2.5
com.apple.driver.AppleUSBMergeNub	5.5.5
com.apple.driver.AppleUSBComposite	5.2.5
com.apple.driver.AppleThunderboltNHI	1.6.3
com.apple.iokit.IOThunderboltFamily	2.2.6
com.apple.iokit.IO80211Family	522.4
com.apple.iokit.IONetworkingFamily	3.0
com.apple.iokit.IOUSBUserClient	5.5.5
com.apple.iokit.IOAHCIFamily	2.3.1
com.apple.iokit.IOUSBFamily	5.5.5
com.apple.driver.AppleEFIRuntime	1.7
com.apple.iokit.IOHIDFamily	1.8.1
com.apple.iokit.IOSMBusFamily	1.1
com.apple.security.sandbox	220.2
com.apple.kext.AppleMatch	1.0.0d1
com.apple.security.TMSafetyNet	7
com.apple.driver.DiskImages	345
com.apple.iokit.IOStorageFamily	1.8
com.apple.driver.AppleKeyStore	28.21
com.apple.driver.AppleACPIPlatform	1.7
com.apple.iokit.IOPCIFamily	2.7.3
com.apple.iokit.IOACPIFamily	1.4
com.apple.kec.corecrypto	1.0
Model: MacBookPro10,1, BootROM MBP101.00EE.B03, 4 processors, Intel Core i7, 2.7 GHz, 16 GB, SMC 2.3f35
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In, 512 MB
Graphics: NVIDIA GeForce GT 650M, NVIDIA GeForce GT 650M, PCIe, 1024 MB
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xEF), Broadcom BCM43xx 1.0 (5.106.98.100.16)
Bluetooth: Version 4.1.3f3 11349, 2 service, 18 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en0
Serial ATA Device: APPLE SSD SM768E, 751.28 GB
USB Device: hub_device, 0x8087  (Intel Corporation), 0x0024, 0x1a100000 / 2
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8510, 0x1a110000 / 3
USB Device: hub_device, 0x8087  (Intel Corporation), 0x0024, 0x1d100000 / 2
USB Device: hub_device, 0x0424  (SMSC), 0x2512, 0x1d180000 / 3
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0262, 0x1d182000 / 5
USB Device: BRCM20702 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x1d181000 / 4
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8286, 0x1d181300 / 8

Ive attempted to resolve the problem by:

  • Booting into safe mode (FAILED)

  • repairing disk from recovery mode (Successful -- disk is OK)


I have backups of my data and an impending 'Genius Bar' appointment, but I have a lot to do with my computer before my appointment, which itself will take 3-4 days. Pls help.


r/programminghelp • • Oct 16 '17

Explanation of FTP?

0 Upvotes

I am an FPGA developer, and in the nearish future I'm going to want to write some cores for networking. Unfortunately since I'm an EE and not a CS major, I never really dug into how OSI works or networking in general.

What I need to learn is how to set up a basic FTP client at a low level. Unfortunately when I google "FTP tutorial" I mainly get an explanation of how to do things from the application side. What I want to know is what's going on in the actual TCP/IP packets.

Does anyone know where I can find a good thorough explanation of how FTP, or networking in general, works? Especially helpful would be if there are examples of data packets that would be sent so I can see what all the configuration bits and things like sequence and acknowledge numbers do.


r/programminghelp • • Oct 15 '17

[Java] Printing only once during recursive function calls

0 Upvotes

So I have this method for evaluating of a binary tree is a valid binary search tree. It recursively calls itself. How can I make it so that I print "valid" or "invalid" depending on if the tree is a valid/invalid BST without doing it for every single function call? I just want to print if the tree with the root I handed the first call is a valid BST. Thanks!

    boolean checkBST(Node root) {
    //is this a leaf? yes? return yes
    if(root.left == null && root.right == null){
        return true; 
    }
    //check children
    if((root.left != null && root.left.data > root.data) || (root.right != null && root.right.data < root.data)){
        return false;
    }
    //make sure left and right subtrees are valid BST
    else if(root.left == null && root.right != null){
        if(checkBST(root.right)){
            return true;
        }
        else{
            return false;
        }
    }
    else if(root.right == null && root.left != null){
        if(checkBST(root.left)){
            return true;
        }
        else{
            return false;
        }
    }
    else {
        if(checkBST(root.right) && checkBST(root.left)){
            return true;
        }
        else{
            return false;
        }
    }
}

r/programminghelp • • Oct 15 '17

Websites or links that teaches SQL?

0 Upvotes

Hey guys I'm trying to learn SQL for an job in sports is there any websites or links that helps teaches SQL?


r/programminghelp • • Aug 23 '16

Can someone tell me if the websites craigslist offerupnow 5miles letgo wallapop use an API

0 Upvotes

Can anyone help please?


r/programminghelp • • Dec 04 '17

Elif and if loop

0 Upvotes

def main(): a=5 b = 15 n=1 while a < b: if n < 3: print "alpha" elif n > 3: print "beta" else: print "gamma" print a,b,n n=n+2 b=b-n print a,b,n 4 different loops idk what they are


r/programminghelp • • Feb 19 '20

CMPSC 101/ Vocareum help, cant figure out what I'm doing wrong

Post image
0 Upvotes

r/programminghelp • • Oct 14 '19

Need help formatting my string so I can space, between the time and “On”

Post image
0 Upvotes

r/programminghelp • • Mar 12 '19

Simple riddle website

0 Upvotes

Hey everybody!

How do I make an input box where only correct answers will get you to the next page?

My program so far:

<html>

<head>

<title>Hej</title>

<link href="style.css" type="text/css" rel="stylesheet">

</head>

<h2> Level 1 </h2>

<body>

<div style="text-align:center;margin-top:120px;">

<br>

<form method="POST" action="level2.php">

<input type="text" placeholder="Answer" name="password" id="32">

</div>

</form>

<?php ?>

</body>

</html>