• Breaking News

    Friday, January 22, 2021

    Forgot user and password for old Kali Linux laptop Ask Programming

    Forgot user and password for old Kali Linux laptop Ask Programming


    Forgot user and password for old Kali Linux laptop

    Posted: 22 Jan 2021 07:44 PM PST

    I've tried many different methods, including the solution seen in https://www.youtube.com/watch?v=Qij5Uw2VpWE&ab_channel=VinSpeirops, but for some reason after the first step (adding bin/bash), my keyboard does not work on the next screen. I'm not sure what else to try, and I have no particular files I would like to keep on this system, so wiping and reinstalling would be a welcome solution but I am not sure how to do that without the username and password. Any help would be welcome!

    submitted by /u/TrentonNYC
    [link] [comments]

    Should I just take this job while we're under this economy, or should I keep self-learning and looking?

    Posted: 22 Jan 2021 10:55 AM PST

    So I graduated in March 2020, and since then I've been reviewing HTML/CSS/JS, currently teaching myself React, and I'm looking to learn how to build something full stack with MERN as well. While going through tutorials I'm making projects on the side to add to my resume (no internships), and I'm already applying to frontend jobs, though with not much luck so far, probably because of having only an ok grasp of HTML/CSS/JS and not much else at the moment perhaps?

    I'm currently living at home with the parents, and they're starting to get impatient with me not landing a job yet. They know the former supervisor from my last job personally, from which I quit to pursue my CompSci degree, and he has offered to take me on as his assistant at the same company but out of state. My reservation is that the company deals with legacy VB programs, which isn't in line with the technologies I want to learn and work with in the future. However my parents would prefer me to take the position for now, because who knows when I would be able to land a decent position in the current economy.

    Perhaps I can just work on continuing learning in the weekends if I work there. But I'm just worried that taking the position would push back when I would get to where I want to be. Personally I would rather keep self learning, building projects, updating my resume, and keep looking for and applying to dev positions. So my question is, if you were in my shoes, would you take the job?

    submitted by /u/hotfuzzyslippers
    [link] [comments]

    Why use an interface as a type?

    Posted: 22 Jan 2021 12:44 PM PST

    Working on Amazon AWS S3 with the AWS SDK.

    The official AWS docs show an example of creating a Client like this:

    IAmazonS3 Client = new AmazonS3Client(...

    Why are they using an interface as a type reference? I changed it to this, and it works exactly the same:

    AmazonS3Client Client = new AmazonS3Client(...

    This isn't strictly an AWS question. It's just a general OOP question (unless Amazon does this for some specific AWS reason).

    submitted by /u/bzeurunkl
    [link] [comments]

    Starting Point of any application??

    Posted: 22 Jan 2021 09:54 PM PST

    Hi, I have decided to build an app. Since it's my first building one I have no idea where to start. I searched a lot for resources but most of them are about basics of programming or basics of app development. None of the them helps me figure out how to plan and execute the whole exercise. So my question is what are the starting steps of developing an app? Is it coding the main logic, or the front end first, or the database first??

    submitted by /u/BakedBooker
    [link] [comments]

    Does manipulating a string take o(n) memory and time minimum?

    Posted: 22 Jan 2021 06:40 PM PST

    given the python line

    s = s[0:3] + s[4:len(s)]

    does each character for 0 to 2 and 4 to n need to be read/copied to another memory location or can the hardware copy a whole block of memory location at once?

    is the same true for an array of integers ? (I'd assume bcos string is char array right? )

    submitted by /u/recursion_dating
    [link] [comments]

    Programming Python on an iPad

    Posted: 22 Jan 2021 09:10 AM PST

    Hi

    I was wondering if there is a way or an app I can use to program Python on my iPad Air?

    I usually use PyCharm and Git for version control. Any iPad IDE's that make it possible to use Git and at the same time has an integrated Python environment where I can add packages and test my programs?

    Basically, the following on an iPad:

    • A Python IDE and/or editor
    • A source code management system (Git)
    • A runtime environment or terminal emulator

    So far my Google searches for the things mentioned have been unsuccessful. But seeing how the programming environment is changing at a fast pace and how the iPad Air support magic keyboard for a more laptop-like experience, I was thinking there might be something new I have missed.

    submitted by /u/EsportsAnalyst
    [link] [comments]

    Is there any 'host yourself' peer programming option similar to LiveShare?

    Posted: 22 Jan 2021 04:30 PM PST

    I'm in a segregated environment where we have no access to the general internet (such as Microsoft) and so can't use options like Visual Studio Live Share. Are there any you can host yourself that do an equivalent job whilst working remotely in Visual Studio Code?

    I'm specifically looking for something that mirrors files / edits / terminal in VS: Code with other people.

    submitted by /u/codefined
    [link] [comments]

    Ambiguous Identifiers

    Posted: 22 Jan 2021 02:35 PM PST

    At my first "real" programming job, I was tasked with learning one particular corner of the codebase. As I read the code, I kept getting more confused, because there were so many "temp" variables.

    There were functions with "temp" in their name, multiple "temp" objects being combined and processed, and passed to other places, and I was thinking "shouldn't temporary objects just be used ... temporarily? Why is there so much heavy processing and passing-around of temporaries?"

    Eventually, I came to realize that they were not "temporary" objects, they were "templates" — in the sense of skeleton structures to be filled in with details based on various criteria. Incidentally, this was C++, and this had nothing to do with its notion of "templates," but that might be why the word "template" was not used (reserved keyword).

    It wasn't the first time I hit that sort of naming confusion, but it was definitely a poignant one.

    Soon after, I started keeping a list of such cases, and I added to it over the years as I encountered more.

    So, here's my list — do you have any to add?

    Almost all of these are based on real code and/or documentation that I encountered, and caused some confusion for me. I try to avoid them where possible in my own code, unless their meaning is very clear from context.

    (alphabetical)

    • auth - author, authentication, authorization
    • cat - concatenate, category
    • cnt - count, container
    • col - column, color
    • comm - command, communications, common
    • comp - compress(ed), compare
    • const - constant, constraint
    • coord - coordinate (eg: x,y position), coordination
    • cur - cursor, current
    • dec - decision, decimal, decrement
    • def - default, definition
    • desc - description, descending
    • dev - development, device
    • dir - directory, direction
    • disp - display, disposition, dispersion, disposition
    • dist - distance, distribution, distributed, distribute, distributor
    • dof - depth of field, degrees of freedom
    • eng - engineering, english ('eng' can mean 'engineering notation' AKA 'scientific notation')
    • ext, x - external, extended, expanded, extra
    • generation - which generation something is vs. the act of producing something
    • h - horizontal, height
    • if - as in "if/else", interface
    • int - integer, interrupt, interior, internal
    • lint - static analysis, "license interface"
    • mem - memory, member
    • minute - a unit of time, or very small
    • min - minute (time), minimum
    • mod - modification, module, modulus
    • mtx - mutex, matrix
    • opt - optional, optimization, optimally
    • order - the ordering (asc/desc), or something that is bought
    • org - organization, original
    • orig - original, origin
    • path - for a filesystem, or in space (eg: bezier curve)
    • perf - performance, but could be the actor kind or the computing kind
    • perm - permanent, permission
    • post - a prefix meaning "after", or an HTTP verb. Eg: "post_init" in a web context.
    • pred - prediction, predicate
    • proj - thing-to-work-on vs. projection
    • present - (adj.) existing, or (verb) display to someone
    • prop - property, a stage-item, something that supports something else
    • pub - public, publish
    • ref - reference, refresh
    • reg - region, registry, register, regular
    • req, reqs - request, requirement
    • ret - return, reticle
    • rgn - region, re-generate
    • set - to apply a value, or a math object / data structure
    • sub - subscriber, subtract, subtype, sub-part
    • temp - temporary, template, temperature
    • trans - transition, translate, transform, transfer
    • var - variant, variable, varargs
    • ver - version, verified
    • xact - exact, transact(ion)
    • x (as abbreviation) - Rx (receive), Tx (transmit), frx (framework), etc.
    submitted by /u/turtle_dragonfly
    [link] [comments]

    Could really use some help with a legacy C# program after moving to a new machine

    Posted: 22 Jan 2021 02:44 PM PST

    So we copied the program over to a new machine (went from 2008 R2 to 2012 R2) and the program no longer runs. I know it has something to do with an encrypted connection string that I assume is invalid since we're using it on a new VM. The error is this:

    Unhandled Exception: System.Configuration.ConfigurationErrorsException: Failed to decrypt using provider 'Program'. Error message from the provider: Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B) (C:\path\to\program.exe.Config line 7) ---> System.Runtime.InteropServices.COMException: Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B) 

    I just need to know how to generate a new config xml file with the right cypher. The config file is an xml file that looks like this inside:

     <connectionStrings configProtectionProvider="DataProtectionConfigurationProvider"> <EncryptedData> <CipherData> <CipherValue>BLAHBLAHBLAH</CipherValue> </CipherData> </EncryptedData> </connectionStrings> 

    Any thoughts on where to get started? I have the code for the original program but its been 20 years since I did any C# programming.

    submitted by /u/benutne
    [link] [comments]

    Should you get paid more for more languages used?

    Posted: 22 Jan 2021 05:19 PM PST

    Let's say a job requires C++ and Python on their description.

    A few months later they give you a task that requires another programming language such as JavaScript.

    Would this warrant asking for more pay since more languages/value is being used?

    Thanks

    submitted by /u/The_Alpacas
    [link] [comments]

    Are programming books actually worth it?

    Posted: 22 Jan 2021 05:14 PM PST

    It just seems kinda pointless with all the free online resources

    submitted by /u/greywolf_18
    [link] [comments]

    HTML uncaught typerror

    Posted: 22 Jan 2021 04:41 PM PST

    I need to link my javascript to HTML. The code works but every time I open it on my computer it doesn't work. While I'm able to plug it online and it works

    HTML

    <!-- Motocross image base64 -->

    <template>data:image/png;base64,iVBORw0KGgoAAAANSUhE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F5jvrzLmlpH3/bWI3QPxfibEymg2k/kLGmgFj+yZMV8AAAAASUVORK5CYII</template>

    JAVASCRIPT

    var c = document.createElement("canvas");

    var ctx = c.getContext("2d");

    c.width = 720;

    c.height = 480;

    document.body.appendChild(c);

    var perm = [];

    while (perm.length < 255){

    while(perm.includes(val = Math.floor(Math.random()*255)));

    perm.push(val);

    }

    var lerp = (a,b,t) => a + (b-a) * (1-Math.cos(t*Math.PI))/2;

    var noise = x=>{

    x = x * 0.01 % 254;

    return lerp(perm[Math.floor(x)], perm[Math.ceil(x)], x - Math.floor(x));

    }

    var Player = function(){

    this.x = c.width/2;

    this.y = 0;

    this.ySpeed = 0;

    this.rot = 0;

    this.rSpeed = 0;

    this.img = new Image();

    this.img.src = document.getElementsByTagName("template")[0].innerHTML;

    this.draw = function(){

    var p1 = c.height - noise(t + this.x) * 0.25;

    var p2 = c.height - noise(t+5 + this.x) * 0.25;

    var grounded = 0;

    if(p1-12 > this.y){

    this.ySpeed += 0.1;

    }else{

    this.ySpeed -= this.y - (p1-12);

    this.y = p1 - 12;

    grounded = 1;

    }

    var angle = Math.atan2((p2-12) - this.y, (this.x+5) - this.x);

    this.y += this.ySpeed;

    if(!playing || grounded && Math.abs(this.rot) > Math.PI * 0.5){

    playing = false;

    this.rSpeed = 5;

    k.ArrowUp = 1;

    this.x -= speed * 5;

    }

    if(grounded && playing){

    this.rot -= (this.rot - angle) * 0.65;

    this.rSpeed = this.rSpeed - (angle - this.rot);

    }

    this.rSpeed += (k.ArrowLeft - k.ArrowRight) * 0.05;

    this.rot -= this.rSpeed * 0.1;

    if(this.rot > Math.PI) this.rot = -Math.PI;

    if(this.rot < -Math.PI) this.rot = Math.PI;

    ctx.save();

    ctx.translate(this.x, this.y - 3);

    ctx.rotate(this.rot);

    ctx.drawImage(this.img, -15, -15, 30, 30);

    ctx.restore();

    }

    }

    var player = new Player();

    var t = 0;

    var speed = 0;

    var playing = true;

    var k = {ArrowUp:0, ArrowDown:0, ArrowLeft:0, ArrowRight:0};

    function loop(){

    speed -= (speed - (k.ArrowUp - k.ArrowDown)) * 0.01;

    t += 10 * speed;

    ctx.fillStyle = "#19f";

    ctx.fillRect(0,0,c.width, c.height);

    ctx.fillStyle = "rgba(0,0,0,0.25)";

    ctx.beginPath();

    ctx.moveTo(0, c.height);

    for (let i = 0; i < c.width; i++)

    ctx.lineTo(i, c.height*0.8 - noise(t + i*5) * 0.25);

    ctx.lineTo(c.width, c.height);

    ctx.fill();

    ctx.fillStyle = "#444";

    ctx.beginPath();

    ctx.moveTo(0, c.height);

    for (let i = 0; i < c.width; i++)

    ctx.lineTo(i, c.height - noise(t + i) * 0.25);

    ctx.lineTo(c.width, c.height);

    ctx.fill();

    player.draw();

    if(player.x < 0)

    restart();

    requestAnimationFrame(loop);

    }

    onkeydown = d=> k[d.key] = 1;

    onkeyup = d=> k[d.key] = 0;

    function restart(){

    player = new Player();

    t = 0;

    speed = 0;

    playing = true;

    k = {ArrowUp:0, ArrowDown:0, ArrowLeft:0, ArrowRight:0};

    }

    loop();

    var instructions = document.createElement("div");

    instructions.innerHTML += "[up] [down] = accelerate <br> [Left] [Rigth] = rotate";

    document.body.appendChild(instructions);

    submitted by /u/Clapya100
    [link] [comments]

    I know how to programa but i don t know what can i do

    Posted: 22 Jan 2021 04:27 PM PST

    I learned how to program in school and how to program web sites in mvc.net whit html and css but i don t know what can i do or what should i do like.

    what can a person who knows how to program do that is not resolving some logic problems or making a boring web site?

    submitted by /u/mercado1304
    [link] [comments]

    What's the standard way to track changes to a database structure?

    Posted: 22 Jan 2021 01:51 AM PST

    (Using the term "database structure" to mean the names, datatypes and semantics of tables, columns, constraints, etc. Normally one would use the term "database schema", but I'm avoiding it as it could be confused with DBMS schemas as in "create schema X".)

    So, the database of a project changes over time, even if it's already in production, for a several different reasons, but mostly 2 of them:

    • New features require new tables or new columns
    • As a side effect of the previous, some tables or columns become obsolete, so at a later point you realize you don't need them anymore and it becomes technical debt that eventually has to be addressed.

    During my experience I've seen two ways of managing this:

    1. Always have an up-to-date SQL script with CREATE TABLE statements. When ran on an empty database, this script should create everything that's needed to get your application running (including base data e.g. for menu options that depend on the DB contents, but no user-supplied data). Save this script to version control system (SVN, Git or whatever).

    Pros: Easy to compare to previous versions and see what has changed. Easy to set up a new test environment. Compatible with CASE tools that automatically generate the database from a diagram.

    Cons: hard to deploy to production while preserving data.

    1. Every time you make a change, write it as an ALTER TABLE statement. Append it to an SQL file that you use to change the database.

    Pros and cons: exactly the opposite as above.

    Questions:

    • What's the standard/common practice in the industry? (if there is one!)
    • Can you suggest other ways to do it?

    I realize this is an open-ended question and answers are very arguable. Let's keep the discussion civil (I know, unusual on reddit, but definitely feasible!), no one is really better than the others, there are always pros and cons.

    submitted by /u/logperf
    [link] [comments]

    Game engine like LWJGL but in C/C++

    Posted: 22 Jan 2021 12:43 AM PST

    Basically the title.

    submitted by /u/ProjektRequiem
    [link] [comments]

    Please how can I handle multiple rooms with over a million users with socket.io?

    Posted: 22 Jan 2021 06:11 AM PST

    I'm trying to build an application like slack, I want to add socket.io for messaging real-time but I want to understand how slack/microsoft teams handle having millions of channels and users so I can know how best to integrate this.

    submitted by /u/Cavdy
    [link] [comments]

    Small Program HELP request, will pay $20 (AutoHotKey???)

    Posted: 22 Jan 2021 12:54 PM PST

    I'm looking to use MIDI from a drum controller to trigger a left mouse click. I am not familiar with code and cannot understand how to do this. It seems AutoHotKey might be possible to make this work? But if someone has a better idea let me know. If someone could just give me the exact script I could paste into whatever program and run I'll send $20, would appreciate it, thanks.

    I'm connecting a Roland TD-4 drum set via midi to a Rock Band MIDI Pro Adapter for Wii, then to my cpu via usb

    submitted by /u/TimboTurnbomb
    [link] [comments]

    What are the most common challenges you face everyday?

    Posted: 22 Jan 2021 12:24 PM PST

    Working from home since the pandemic started has become part of our daily challenge as IT Professionals.

    What else?

    submitted by /u/mcmNewNick
    [link] [comments]

    I want to make my code come to life

    Posted: 22 Jan 2021 12:16 PM PST

    Ok so I'm actually very new to coding. I have started on multiple C# projects. One simple one I recreated was Rock,Paper, Scissors game. I changed it up by adding a second player or a CPU as different options. But I want to make it live. I want to create actual hand gestures and put color to it. What should be my next move ?

    submitted by /u/Moe-t
    [link] [comments]

    Running a web scraper automatically once a day

    Posted: 22 Jan 2021 06:13 AM PST

    I've just spent an hour going through stack overflow and I'm confused why this questions hasn't been answered yet.

    I have made a web scraper (with selenium) in python that uses a web driver file (C:\Program Files (x86)\chromedriver.exe), and I am trying to upload this function somewhere so that it runs once a day automatically. I've found out that because of the web driver file this isn't possible to do in google cloud functions.

    What other options are there? Preferably the most simple way since I am a beginner.

    If it makes any difference, I am using Windows 10.

    Any help will be greatly appreciated, thank you!

    submitted by /u/rosspaa
    [link] [comments]

    python

    Posted: 22 Jan 2021 04:21 AM PST

    i can't install pyHook on my pc I already downloaded it but when I type "pip install C:\\user\download\pyHook-1.5.1-cp37-cp37m-win32.whll" it says it doesn't exist

    submitted by /u/Mysterious-Shallot
    [link] [comments]

    Best way for self learning into job security and education?

    Posted: 22 Jan 2021 11:52 AM PST

    I come from the service industry. Got hurt at work, and I see that programming is a safe career. My furthest experience with programming is getting broadcom wifi to work with linux by searching for solutions. What should I start learning to get an entry level job that will support myself and the cost of a CS degree?

    submitted by /u/ThrowRA73000
    [link] [comments]

    Question about Oral Language

    Posted: 22 Jan 2021 10:12 AM PST

    (Not talking about scripting, referring to oral language),
    I currently only speak English, and wish to become a successful computer programmer when I get older. For this profession, if I had to choose 1 other oral language to learn, what would you recommend?

    I have heard that there are a lot of Russian programmers, but Im not going on this rumor alone lol

    submitted by /u/Odd_Avocado_5578
    [link] [comments]

    Audio codec conversion batch file, searching in multiple directories?

    Posted: 22 Jan 2021 09:57 AM PST

    Hi all, I have this batch file that I use with ffmpeg to convert any sort of codec. currently it creates two folders where you place the initial files, and it outputs the new files.

    Right now it can't search through folder structures, and all the original files must be directly in the root folder (in this case, mp3). Is there some way I can indicate that it needs to look through all the folders under the root directory? I've tried for %%a in ("mp3\*\*.mp3") and "opus\*\%%~na.opus" but that didn't work. Here's the full batch file

    :: ffmpeg script for converting mp3 to opus IF NOT EXIST mp3\NUL mkdir mp3 IF NOT EXIST opus\NUL mkdir opus for %%a in ("mp3\*.mp3") do ffmpeg -y -i "%%a" -vn -c:a libopus -b:a 96k "opus\%%~na.opus" @echo off pause 
    submitted by /u/GalacticArachnids
    [link] [comments]

    No comments:

    Post a Comment