Jump to content

CJPowell27

Member
  • Posts

    1,689
  • Joined

  • Last visited

Everything posted by CJPowell27

  1. The RX550/ laptop documentation states that the laptop is capable of 4k 60Hz. Would it be a tv issue from there?
  2. hey guys, I've got an HP Elitebook G6 that is outputting 1080p 60Hz video to a tv perfectly fine, but refuses to output 4k at any refresh rate. I've tried updating both the intel driver and the Radeon drivers but no luck. Is anyone aware of any other potential causes? The TV itself supports 4k 60Hz and I have an HDMI 2.0 cable.
  3. I looks like you are only trying to rotate the minutes, is that correct? Often times transform-origin has issues with being in a certain CSS style card. It is also good form to do something like -moz-transform-origin: 26px 3px; -ms-transform-origin: 26px 3px; -o-transform-origin: 26px 3px; -webkit-transform-origin: 26px 3px; transform-origin: 26px 3px; to allow for more browser compatibility.
  4. that makes so much sense, basically all the stuff in the quotes filters it so that it would only return Grace Johnson (because given criteria) as true then returns that to the outer query right? It worked
  5. Hey guys so I was given the below table layout as a practice problem. My professor wants me to use a nested query with the exists predicate to print the customer name and amount they paid, but only for the customer that paid using credit or check AND bought milk or coke. Logically I am aware that the command should be printing out Grace Johnson for the name and 11.75 as the amount. I also understand that the exists predicate should only be used to return a true or false value, so where would the correct place to use that keyword? I got it working in another way without the exists keyword using select * from customer where customerID in (select customerID from orders where ordertype='Credit' and orderID in (select orderID from items where items='Cookies' or items='Coke')); Table Layout:
  6. I found my professors archive for her 3 C++ classes. I'll send you a link in your DMs, start with 162 then 163, then 202 and look at all the lecture materials she's amassed .
  7. Good lord I was making that far too difficult for myself, I must be burnt out. Thank you so much, it worked!
  8. The second language I looked at after C++ was assembly so I know that feel, pain. only pain. If you do decide to go with either Python or C++ thenewboston on youtube puts complex concepts into simple terms that even a brand new programmer can understand. If you go with C++ let me know and I can create a google doc folder with all of my lectures from one of the most brilliant programmers/professors I've ever seen and learned from.
  9. Interesting, so it basically doesn't concatenate properly by doing something like that? If what you are saying is the case, how do you recommend I get it to function as I intended?
  10. Correct. At this point I'm not sure if it is an issue with the read statement or the long select statement with a million different quotes. I tried doing a bit of "troubleshooting" by switching psql -d "$dbname" --command "select * from cpu c inner join motherboard m on c.socket=m.socket where m.modelName="\'$var2\'" and c.modelname="\'$var1\'";"; into echo "select * from cpu c inner join motherboard m on c.socket=m.socket where m.modelName="\'$var2\'" and c.modelname="\'$var1\'";"; and it printed the command perfectly with the single quotes in the correct spot with the proper values being filled in for the variables. That's what is throwing me completely off here
  11. There's always going to be programmers to compete with. To me it is important to recognize the fact that in most cases you'll likely be doing upkeep on legacy code. Sure python is a huge language being used really often nowadays, but it doesn't really translate to many languages easily as other languages can. Python is in a league of its own with a lot of its concepts so in starting with that language you may find it difficult to apply basic programming principles to other languages.
  12. I started off with C++ programming and honestly that seems like the best place to start from my extremely biased point of view. C++ sets the standard for a lot of programming language basics without being far too complex. It also has one of the best textbooks C++ Primer Plus which is by far the best textbook with regards to programming I've ever read.
  13. Hey guys I'm trying some PSQL integration with bash but I ran into an issue with variables containing spaces between words. I am basically getting two inputs of model names for both CPUs and Motherboards, then checking to see if those model names are the same socket in the database. read -p "Enter CPU model name: " var1; read -p "Enter motherboard name: " var2; psql -d "$dbname" --command "select * from cpu c inner join motherboard m on c.socket=m.socket where m.modelName="\'$var2\'" and c.modelname="\'$var1\'";"; But if I enter something with spaces such as: Ryzen 5 3600 the spaces will overflow into other variables in the psql query line. Below is a screenshot of the error. If I enter the same thing (Ryzen 5 3600) but with dashes instead of spaces, this does not happen. Is there something I am missing with BASH user input that I would need to clear an input buffer or something? Thanks in advance for any tips
  14. MODS go ahead and delete this I did some random stuff and it worked! update tableName set initials=(select concat(substring(first_name,1,1),substring(last_name,1,1))); it's ugly but it works
  15. Hey guys I am trying to have automatically fill the a column with output from another function. So basically my table has a first name and a last name column and I am trying to fill an initials column with the first letter from each of the other two columns. So for example the following: first_name | last_name | initials John | Smith | would populate the initials column with JS. I can't think of a keyword that I have learned yet that allows me to update existing columns with output from any function that would give me the initials like concat(substring(first_name,1,1),substring(last_name,1,1);
  16. That's what my professor wanted for some reason but I suppose he would prefer it working lol. I'll implement that for the time being. Much of what I've read warns against using !feof so I'm not sure his goal.
  17. Hello everyone, I have a weird issue where my feof loop is not terminating when it should. This should be processing media from a 3 line file and runs infinitely. can anyone spot why it would be doing this? <!doctype html> <?php require('mlib_functions.php'); html_head("mlib skeleton"); require('mlib_header.php'); require('mlib_sidebar.php'); # Code for your web page follows. echo "<h2>Processing Equipment from List...</h2>"; if ($_FILES['userfile']['error'] > 0) { echo 'Problem: '; switch ($_FILES['userfile']['error']) { case 1: echo 'File exceeded upload_max_filesize'; break; case 2: echo 'File exceeded max_file_size'; break; case 3: echo 'File only partially uploaded'; break; case 4: echo 'No file uploaded'; break; } exit; } // Does the file have the right MIME type? if ($_FILES['userfile']['type'] != 'text/plain') { echo 'Problem: file is not plain text'; exit; } // put the file where we'd like it $upfile = './uploads/'.$_FILES['userfile']['name']; if (is_uploaded_file($_FILES['userfile']['tmp_name'])) { if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $upfile)) { echo 'Problem: Could not move file to destination directory'; exit; } } else { echo 'Problem: Possible file upload attack. Filename: '; echo $_FILES['userfile']['name']; exit; } echo 'File uploaded successfully<br><br>'; // display the file contents $fp = fopen($upfile, 'r'); if(!$fp) { echo "<p> I could not open $upfile right now</p>"; exit; } #Process file one line at a time while(!feof($fp,100)) { $line = fgets($fp,160); $line_array = explode(',',$line); $title1 = trim($line_array[0]); $author1 = trim($line_array[1]); $type1 = trim($line_array[2]); $description1 = trim($line_array[3]); $errors = validate_media($title1, $author1, $type1, $description1); if(empty($errors)) { #Display uploaded entries echo "Title: $title1</br>"; echo "Author: $author1 </br>"; echo "Type: $type1</br>"; echo "Description: $description1</br>"; try { $db = new PDO(DB_PATH,DB_LOGIN,DB_PW); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->exec("INSERT INTO media(title,author,description,type) VALUES('$title1','$author1','$description1','$type1');"); } catch(PDOException $e) { echo 'Exception: '.$e->getMessage(); echo "<br/>"; $db = NULL; } } else { echo "Errors found in media entry: <br/>"; echo "Title: $title1 <br/>"; echo "Type: $type1<br/>"; echo "Description: $description1 <br/>"; foreach($errors as $error) { echo $error."<br/>"; } echo "<br/>"; } } #Close the file flose($fp); require('mlib_footer.php'); ?> the relevant code in mlib_functions is
  18. Hey guys I'm getting an error when I try to press a button in my "app" that is supposed to begin running the code on another .lua file called level1.lua but it is giving these errors. the code it is referring to is But it is saying that the module is not found. Any ideas? Edit I figured that out now I have this error. I had multiple test prints and it seems to be failing somehow between the end scene:create and start of scene:show Those functions call this file
  19. feel free to buy mine so I can afford the M240i (consulted with a bunch of BMW employees and test drove one today, it swayed me from buying an M4) You get a .1 decrease in your 0-60 time in a BMW though lol
  20. Alright y'all I decided against doing any performance mods for my car, instead I'm gonna be buying an M4 within the next year hopefully . I'd like to blame BMW for making it practically impossible to cheaply add HP on a 325ci lol
  21. I'd check for a BIOS update maybe? I'm not sure that would cause something like that but it's worth a shot
  22. Wow I was way over thinking that then lol
  23. Hey guys, I've been trying to study for my midterm that is next Tuesday by doing a bunch of problems in the book and I've come across one that is completely stumping me. Basically I'm supposed to find integers that make the given wff false. I was wondering if someone could just give a hint or some method to solve this because I've tried about 50 combinations of numbers with no luck. The given wff is: {True} if x < y then y := y - x {y > 0} over the domain of integers I've basically tried to use logic to narrow it down, because the precondition does not help narrow the integers down at all; so I decided that the integers cannot be the same number because that would not satisfy the operation. I've tried using the assignment axiom to make it {y - x > 0} if x < y then y := y - x {y>0} but that didn't seem to help at all.
×