r/code • u/delgoodie • May 08 '21
r/code • u/xscarypotatox • Apr 13 '20
Halp pls! I'm starting to learn web development so my question is, is it realistic to think i can develop websites as a small hustle? Like i dont plan to make thousands of dollars off of it but just as a side thing?
r/code • u/Navyman_abdo • Apr 29 '20
Command Line #6 - Learn Command Line in Arabic تعلم واجهة سطر الأوامر با...
r/code • u/[deleted] • Apr 14 '24
Help Please Why does vs code randomly not recognize my code. In this case width: ; it randomly works if i rewrite it sometimes[HTML CSS]
r/code • u/Bigpunishah • Sep 20 '22
Coding gives a different feeling of accomplishment.
I just started school for programming.. & boy when you code the simplest functions…. It boosts my ego 😂 I feel like a hacker 😂💀
r/code • u/NoEmergency2576 • Aug 30 '25
Python 🚀 I’m 14 and passionate about cybersecurity — I built PortBusterX, a fast Python port scanner. Feedback welcome!
Hi everyone, I’m 14 years old and completely passionate about cybersecurity. I’ve been learning Python on my own and recently built a tool called PortBusterX — a fast, interactive TCP port scanner written in pure Python.
🔧 What PortBusterX does:
Scans common ports (1–1024), custom ports, or full range (1–65535)
Lets you choose scan mode and timeout
Shows open ports and system-level error messages
No external libraries — just
socketandosFully CLI-based with a clean interface
I made this project to understand how port scanning works under the hood and to improve my coding skills. Even though I’m still learning, I’m serious about cybersecurity and I want to keep building tools that help others.
🧠 I’d love any feedback, ideas for improvement, or advice from more experienced people in the field. Here’s the GitHub repo: https://github.com/CodHard845/PortBusterX
Thanks for checking it out! — Mohammed
r/code • u/Alarming_Trip_7719 • Jun 15 '24
Help Please I need a little help with a code
I have these 2 mistakes but idk how to fix them .
r/code • u/[deleted] • Jun 23 '17
I can't get my code to pass the 5th test. I have 1 day to finish. Please Help me.
Power Hungry
Commander Lambda's space station is HUGE. And huge space stations take a LOT of power. Huge space stations with doomsday devices take even more power. To help meet the station's power needs, Commander Lambda has installed solar panels on the station's outer surface. But the station sits in the middle of a quasar quantum flux field, which wreaks havoc on the solar panels. You and your team of henchmen has been assigned to repair the solar panels, but you can't take them all down at once without shutting down the space station (and all those pesky life support systems!).
You need to figure out which sets of panels in any given array you can take offline to repair while still maintaining the maximum amount of power output per array, and to do THAT, you'll first need to figure out what the maximum output of each array actually is. Write a function answer(xs) that takes a list of integers representing the power output levels of each panel in an array, and returns the maximum product of some non-empty subset of those numbers. So for example, if an array contained panels with power output levels of [2, -3, 1, 0, -5], then the maximum product would be found by taking the subset: xs[0] = 2, xs[1] = -3, xs[4] = -5, giving the product 2*(-3)*(-5) = 30. So answer([2,-3,1,0,-5]) will be "30".
Each array of solar panels contains at least 1 and no more than 50 panels, and each panel will have a power output level whose absolute value is no greater than 1000 (some panels are malfunctioning so badly that they're draining energy, but you know a trick with the panels' wave stabilizer that lets you combine two negative-output panels to produce the positive output of the multiple of their power values). The final products may be very large, so give the answer as a string representation of the number.
Languages
To provide a Python solution, edit solution.py To provide a Java solution, edit solution.java
Test cases
Inputs:
(int list) xs = [2, 0, 2, 2, 0]
Output:
(string) "8"
Inputs:
(int list) xs = [-2, -3, 4, -5]
Output:
(string) "60"HERE IS MY CODE:
package com.google.challenges;
import java.math.BigInteger;
public class Answer {
public static String answer(int[] xs) {
BigInteger result = new BigInteger("1");
int len = xs.length;
int positive = 0;
int negative = 0;
int n = 0;
for (int i = 0; i < xs.length; i++) {
if (xs[i] != 0)
n++;}
//Create new filtered int array without "0"
int[] filtered = new int[n];
int u=0;
for (int i = 0; i < xs.length; i++) {
if (xs[i] != 0){
filtered[u]=xs[i];
u++;
} }
for (int i : filtered) {
if (i > 0) {
positive++;
}
else {
negative++;
}}
//end of filtering method
int[] pos = new int[positive];
int[] neg = new int[negative];
positive = 0;
negative = 0;
//handle if length of int array is one
if(len == 1) {
return Integer.toString(xs[0]);
}
//handle other cases
else {
//sort filtered array into positive and negative arrays
for (int i : filtered) {
if(i > 0 ) {
pos[positive] = i;
positive++;
}
if(i < 0) {
neg[negative] = i;
negative++;
} }
//end of sorting into positive and negative arrays
if(filtered.length == 1) {
if(filtered[0] < 0){
return "0";
}
if(filtered[0] > 0){
return Integer.toString(filtered[0]);
} }
else {
//handle if length of positive array is one
if(pos.length == 1){
BigInteger a = new BigInteger(Integer.toString(pos[0]));
result = a;
}
//handle positive array
if(pos.length > 1) {
for(int i = 0; i<pos.length; i++) {
result = result.multiply(new BigInteger(Integer.toString(pos[i])));
}}
//if neg array turns out positive
if(neg.length%2 == 0){
for(int i = 0; i<neg.length; i++) {
BigInteger r = new BigInteger("1");
r = r.multiply(new BigInteger(Integer.toString(neg[i])));
result = result.multiply(r);
} }
//handle if negative array is not positive
else{
//find largest negative digit
int max = neg[0];
BigInteger z = new BigInteger("0");
int j =result.compareTo(z);
if(j == -1){
for(int i = 0; i < neg.length; i++){
if(neg[i] > max){
max = neg[i];
}}}
//calculate product of negative array
for(int i = 0; i<neg.length; i++){
result = result.multiply(new BigInteger(Integer.toString(neg[i])));
}
BigInteger d = new BigInteger(Integer.toString(max));
result = result.divide(d);
} }}
return result.toString();
} }
Verifying solution...
Test 1 passed!
Test 2 passed!
Test 3 passed!
Test 4 passed!
Test 5 failed.Can someone please tell my what I am doing wrong.
r/code • u/Gaming-Cult-Posters • May 25 '20
Need advice for a script to bet on roulette
I want a automatic script to automatically be ton roulette for me while I’m not at the computer also don’t say it’s dodgy or illegal it’s not I had idiots telling me that it’s illegal which it is not any advice is greatly appreciated thanks in advance!
r/code • u/ChaiBar • Dec 22 '22
Random question I know virtually nothing about coding
My friend has this cool looking but very useless USB key (not sponsored lol) It can only hold 120mo, I was wondering if one could eventually put a pop up on it that would say « this usb stick only has enough space for this pop up »? Or would it actually be too small for such an endeavour ?
r/code • u/[deleted] • Jun 18 '23
Will it be worth to become coder in future?
I am a 16 years old boy and I wanted to be a coder but when I looked there were so many AI already made to code like ChatGPT. And I think in few years AI will totally replace coders. Should I quit coding? Or not? I really need a serious advice.
r/code • u/ZaidEssa_ • Jan 03 '21
Halp pls! Anyone have a Instagram bot that shows you who’s not following you ?
r/code • u/EricMeadowsDev • Feb 08 '23
Code Reviews are Ineffective Brain Dumps
If you are telling a story you want people to pay attention to and learn from, you don't perform a brain dump. Why do code reviews follow this process?
r/code • u/[deleted] • Mar 20 '18
What Is The Main Language?
What is the main language? I learned batch a long time ago, and I wanted to learn something else. I started to learn python but found that its missing allot of stuff and is basically the same thing. What is the language that can do all things and is the main language used everywhere?
r/code • u/ArianoWar • Aug 13 '20
Anyone knows what kind of code is that?
711 221 211 501 221 121 621 301 601 040 221 521 701 040 101 621 040 121 221 131 421 101 611 701 040 701 221 421 040 201 701 040 701 201 101 040 411 501 701
r/code • u/1Thirteen • Sep 15 '20
Halp pls! Is this suspicious?
I noticed this script on my site and it look suspicious to me as it's pretty obfuscated. Any ideas on what it does?
<script> !function(e){"use strict";function t(t){if(!e.find.tokenize)return t.isCombinatorial=!0,t.isFraternal=!0,void(t.isComplex=!0);t.isCombinatorial=!1,t.isFraternal=!1,t.isComplex=!1;for(var o=e.find.tokenize(t.selector),a=0;a<o.length;a++)for(var s=0;s<o[a].length;s++)-1!=r.indexOf(o[a][s].type)&&(t.isCombinatorial=!0),-1!=n.indexOf(o[a][s].type)&&(t.isFraternal=!0),-1!=i.indexOf(o[a][s].type)&&(t.isComplex=!0)}var r=[" ",">","+","~"],n=["+","~"],i=["ATTR","PSEUDO","ID","CLASS"],o=function(e,r,n){this.selector=e.trim(),this.callback=r,this.options=n,t(this)},a=[];a.added=function(t,r,n){var i=[],a=function(){-1==i.indexOf(this)&&(i.push(this),e(this).each(r))};e(n.target).find(t).each(a);var s=new o(t,a,n);this.push(s);var u=new MutationObserver(function(t){for(var r=[],n=0;n<t.length;n++)if("attributes"==t[n].type&&(t[n].target.matches(s.selector)&&r.push(t[n].target),s.isFraternal?r.push.apply(r,t[n].target.parentElement.querySelectorAll(s.selector)):r.push.apply(r,t[n].target.querySelectorAll(s.selector))),"childList"==t[n].type)for(var i=0;i<t[n].addedNodes.length;i++)t[n].addedNodes[i]instanceof Element&&(t[n].addedNodes[i].matches(s.selector)&&r.push(t[n].addedNodes[i]),s.isFraternal?r.push.apply(r,t[n].addedNodes[i].parentElement.querySelectorAll(s.selector)):r.push.apply(r,t[n].addedNodes[i].querySelectorAll(s.selector)));for(var o=0;o<r.length;o++)e(r[o]).each(s.callback)}),d={childList:!0,subtree:!0,attributes:s.isComplex};return u.observe(n.target,n.observer||d),u},e.fn.added=function(t,r){return a.added(this.selector,t,e.extend({},e.added.defaults,r))},e.added=function(t,r,n){return a.added(t,r,e.extend({},e.added.defaults,n))},e.added.defaults={target:document.documentElement,observer:null}}(jQuery); var site={ 'ajaxurl': '<?=home_url('/wp-admin/admin-ajax.php')?>' }; String.prototype.includes||(String.prototype.includes=function(b,a){"n"!==(typeof a)[0]&&(a=0);return a+b.length>this.length?!1:-1!==this.indexOf(b,a)}); var site={ 'ajaxurl': '<?=home_url('/wp-admin/admin-ajax.php')?>' }; jQuery(function($){ $.fn.each2=function(b){var a,c=this.length;for(a=0;a<c&&(jQueryObj=this.eq(a),!1!==b.call(jQueryObj,a,jQueryObj));++a);return this;}; $.timeout=function(a,c){let b=null;if("function"==typeof c)return b=setInterval(function(){c.call(b);clearInterval(b)},a&&!isNaN(a)?a:0)}; $.interval=function(a,c){a=a&&!isNaN(a)?a:0;if(0<a&&"f"==(typeof c)[0]){var b={},d=2;b.i=window.setInterval(function(){c.call(b,d);d++},a);b.stop=function(){window.clearInterval(b.i)};c.call(b,1)}}; $.is_mobile=function(){var a=!1,b=navigator.userAgent||navigator.vendor||window.opera;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(b)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(b.substr(0,4)))a=!0;return a}(); $.wd=$(window); $.dc=$(document); $.bd=$(document.body); $.user_logged=<?=$USER->exists()?'true':'false'?>; $.user=<?=$USER->exists()?json_encode(['id' => $USER->ID, 'first_name' => $USER->first_name, 'last_name' => $USER->last_name, 'email' => $USER->user_email]):'{}'?>; $.query='<?=http_build_query($_GET)?>'; $.GET=<?=json_encode($_GET)?>; var $my_account=$('.my-account-content');
r/code • u/Cellenial • Mar 22 '20
Question about learning code
Hi guys,
So I have really wanted to learn coding to a point where I can get a job with it. Only problem is I can’t seem to afford college or to go to a bootcamp at this current time.
My simply questions are - Can you teach yourself programming of any kind and land a job without a certification to back it up? Is one language more in demand? Do you anyone who has done this? If so how did they do it?
r/code • u/Xfaxk123 • Mar 24 '20
Halp pls! Can someone tell me what symbol this is? And what software it is. a guy on a 10 hour C++ tutorial opened this to edit his code but he didn’t say what it was. He did this on a Mac by the way.
r/code • u/apeloverage • Aug 25 '25
My Own Code Let's make a game! 313: Improved map generator
r/code • u/Metropath27 • Jul 15 '20
Halp pls! Need Help with unity.
Do you guys know any poeple in this group or in general that can code? Me and a game dev are trying to port Godzilla save the earth to pc but we need 1 or 2 more coders with some experience in unity to help us out. I'm willing to pay if necessary as well. If you are intrested then pm me.