• Breaking News

    Wednesday, March 31, 2021

    Is there a way to run a lightweight version of Linux on Mac? For sandboxing purposes Ask Programming

    Is there a way to run a lightweight version of Linux on Mac? For sandboxing purposes Ask Programming


    Is there a way to run a lightweight version of Linux on Mac? For sandboxing purposes

    Posted: 30 Mar 2021 05:39 PM PDT

    Hi, so I'd like to run a simple version of Linux from my Mac to run some suspicious code on a virtual machine. It will be a one time thing and after that I will delete the Linux installation, I am aware I could do this via emulation with VirtualBox, but it feels a bit too much to have to configure it all from scratch whenever I want to test something simple, is there any way to achieve this on Mac or any third party app that would help me with it?

    I think Docker would be an option, but I am not 100% sure and also I have near to 0 experience with it, so if someone could enlighten me or point me in the right direction in case this is a viable way that would be greatly appreciated.

    Thanks!

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

    Is there like a guide on programming languages? As in what works best for what kind of project?

    Posted: 30 Mar 2021 06:42 AM PDT

    I have a somewhat solid understanding of some programming languages, but I'm having some trouble which language might be better for a type of project. As in like, is python better for a simple chess game than Java.

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

    What programming language should i learn first ?

    Posted: 30 Mar 2021 11:40 PM PDT

    I'm thinking of self learning programming languages this summer. My main purpose is to become an app, web developer.

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

    How do CI companies work?

    Posted: 31 Mar 2021 12:17 AM PDT

    Weird and random quesiton, but I'm curious about how the logistics of CI companies like Bitrise and CircleCI work. Do they have warehouses full of their own machines or do they pay AWS for it?

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

    So our school launched their student-helping-website and i inspected the code so i can talk about how bad they programmed it and i noticed this check the links in the hrefs is this normal

    Posted: 30 Mar 2021 11:39 PM PDT

    a[href^="https://www.nudeidols.com/cams/"], :root a[href^="https://www.mypornstarcams.com/landing/click/"], :root a[href^="https://www.kingsoffetish.com/tour?partner_id="], :root a[href^="https://www.iyalc.com/"], :root a[href^="https://www.goldenfrog.com/vyprvpn?offer_id="][href*="&aff_id="], :root a[href^="https://www.get-express-vpn.com/offer/"], :root a[href^="https://www.gambling-affiliation.com/cpc/"], :root a[href^="http://webgirlz.online/landing/"], :root a[href^="https://www.g4mz.com/"], :root a[href^="https://www.clicktraceclick.com/"], :root a[href^="https://www.camyou.com/?cam="][href*="&track="], :root a[href^="https://www.camsoda.com/enter.php?id="], :root a[href^="https://www.brazzersnetwork.com/landing/"], :root a[href^="https://www.bebi.com"], :root a[href^="https://www.awin1.com/cread.php?awinaffid="], :root a[href^="https://www.adskeeper.co.uk/"], :root a[href^="http://farm.plista.com/pets"], :root a[href^="https://windscribe.com/promo/"], :root a[href^="https://unreshiramor.com/"], :root a[href^="http://ad-emea.doubleclick.net/"], :root a[href^="https://understandsolar.com/signup/?lead_source="][href*="&tracking_code="], :root div[id^="tms-ad-dfp-"], :root a[href^="https://trust.zone/go/r.php?RID="], :root a[href^="https://trf.bannerator.com/"], :root a[href^="http://go.247traffic.com/"], :root a[href^="https://bestcond1tions.com/"], :root a[href^="https://trappist-1d.com/"], :root a[href^="https://traffic.bannerator.com/"], :root a[href^="https://tracking.truthfinder.com/?a="], :root #rhs_block .xpdopen > ._OKe > div > .mod > ._yYf, :root a[href^="https://tracking.gitads.io/"], :root a[href^="https://track.ultravpn.com/"], :root a[href^="https://www.adultempire.com/"][href*="?partner_id="], :root a[href^="https://track.healthtrader.com/"], :root a[href^="https://track.clickmoi.xyz/"], :root a[href^="https://control.trafficfabrik.com/"], :root a[href^="https://track.52zxzh.com/"], :root div[class^="div-gpt-ad"], :root .ra[align="right"][width="30%"], :root a[href^="https://axdsz.pro/"], :root a[href^="https://tour.mrskin.com/"], :root a[href^="https://tc.tradetracker.net/"] > img, :root a[href^="https://t.mobtya.com/"], :root a[href^="https://t.hrtyj.com/"], :root a[href^="https://t.hrtye.com/"], :root a[href^="https://syndication.optimizesrv.com/splash.php?"], :root a[href^="https://syndication.exoclick.com/splash.php?"], :root a[href^="http://connectlinking6.com/"], :root a[href^="http://cdn3.adexprts.com/"], :root a[href^="https://spygasm.com/track?"], :root div[id^="ad-div-"], :root a[href^="https://secure.eveonline.com/ft/?aid="], :root a[href^="https://secure.bstlnk.com/"], :root div[class^="kiwi-ad-wrapper"], :root a[href^="https://rev.adsession.com/"], :root [href*=".trackmstr.com"], :root a[href^="https://refpasrasw.world/"], :root a[href^="https://refpaexhil.top/"], :root a[href^="https://redirect.ero-advertising.com/"], :root AD-SLOT, :root a[href^="https://pubads.g.doubleclick.net/"], :root a[href^="https://prf.hn/click/"][href*="/camref:"], :root a[href^="https://prf.hn/click/"][href*="/adref:"], :root #rhs_block .mod > .gws-local-hotels__booking-module, :root a[href^="http://www.my-dirty-hobby.com/?sub="], :root a[href^="https://porndeals.com/?track="], :root a[href^="https://offerforge.net/"], :root div[id^="ad_head_celtra_"], :root a[href^="https://t.grtyi.com/"], :root a[href^="https://myusenet.xyz/"], :root a[href^="https://my-movie.club/"], :root a[href^="https://msecure117.com/"], :root a[href^="https://mk-cdn.net/"], :root a[href^="https://mk-ads.com/"], :root a[href^="https://misspkl.com/"], :root a[href^="https://medleyads.com/"], :root iframe[src^="https://tpc.googlesyndication.com/"], :root a[href*=".approvallamp.club/"], :root a[href^="https://landing1.brazzersnetwork.com"], :root a[href^="http://adrunnr.com/"], :root a[href^="https://landing.brazzersplus.com/"], :root a[href^="https://land.rk.com/landing/"], :root .lads[width="100%"][style="background:#FFF8DD"], :root a[href^="https://land.brazzersnetwork.com/landing/"], :root a[href^="https://juicyads.in/"], :root a[href^="https://join.virtuallust3d.com/"], :root a[href^="http://www.uniblue.com/cm/"], :root a[href^="https://join.sexworld3d.com/track/"], :root a[href^="https://join.dreamsexworld.com/"], :root a[href^="https://incisivetrk.cvtr.io/click?"], :root a[href^="https://iactrivago.ampxdirect.com/"], :root a[href^="https://iac.ampxdirect.com/"], :root div[data-ismultirow="true"][data-id^="CarouselPLA-"], :root a[href^="https://horny-pussies.com/tds"], :root a[href^="https://graizoah.com/"], :root td[valign="top"] > .mainmenu[style="padding:10px 0 0 0 !important;"], :root a[href^="http://feedads.g.doubleclick.net/"], :root a[href^="https://redsittalvetoft.pro/"], :root a[href^="https://googleads.g.doubleclick.net/pcs/click"], :root a[href^="http://cdn.adstract.com/"], :root a[href^="https://gogoman.me/"], :root div[jsdata*="CarouselPLA-"][data-id^="CarouselPLA-"], :root a[href^="https://go.trackitalltheway.com/"], :root a[href^="https://go.stripchat.com/"][href*="&campaignId="], :root a[href^="https://go.julrdr.com/"], :root a[href^="https://go.hpyrdr.com/"], :root a[href^="https://adnetwrk.com/"], :root a[href^="https://go.gldrdr.com/"], :root div[id^="mainads"], :root a[href^="https://go.currency.com/"], :root a[href^="https://track.afftck.com/"], :root a[href^="http://guideways.info/"], :root a[href^="https://go.cmrdr.com/"], :root a[href*=".inclk.com/"], :root a[href^="https://go.ad2up.com/"], :root a[href^="https://freeadult.games/"], :root a[href^="https://fonts.fontplace9.com/"], :root a[href^="http://clkmon.com/adServe/"], :root a[href^="https://flirtaescopa.com/"], :root…

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

    How are lists and dictionaries different in Python?

    Posted: 30 Mar 2021 10:38 PM PDT

    I just learned about them but it seems like they are the same just one is written with squiggly lines, the other with square brackets. Is there a different use for each, or is it just dependant on the programmer?

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

    Trying to scrape a website with Python and BeautifulSoup.

    Posted: 30 Mar 2021 06:05 PM PDT

    I've been trying to scrape https://soysuper.com/ for products under ZIP code 08041. Whenever I enter the ZIP code the request is sent to https://soysuper.com/supermarket?zipcode=08041. I visit the network tab link but it's ignoring and shows me data and products anyone can find without entering the ZIP code.

    What should I do to find the products under the ZIP 08041?

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

    Having difficulties understanding Typescript in particular the behavior of let an var in this loops

    Posted: 30 Mar 2021 12:25 PM PDT

    just started learning Typescript and I'm so confused about the let and var different scope. here are the two examples that I tried to understand. **For loop with var** for (var i = 0; i < 10; i++) { setTimeout(​ function() { console.log(i); ​ }, ​ 100 * i​ ); ​ } this one outputs 10 for 10 times in the console. so it clearly executes all the for loop before doing the function inside the for but why. why not doing the for the function inside and then going up again doing the second iteration and so on like the let loop? **For loop with let** for (let i = 0; i < 10; i++) { setTimeout(​ function() { console.log(i); ​ }, ​ 100 * i​ ); ​ } this one outputs 0123456789 and is the normal behavior of a normal for loop I'd say. **For loop with var behaving like the for loop with let** for (var i = 0; i < 10; i++) { ​ (function(i) { ​ setTimeout(​ function() { ​ console.log(i); ​ }, ​ 100 * i​ ); ​ })(i); ​ } Can someone explain me why this difference? The only thing I'm sure about it is the fact that var is global scope. why doing the same loop with for and let(see below) will output the same? for(var i=0;i<10;i++){ console.log(i); } for(let i=0;i<10;i++){ console.log(i); } If anyone can explain to me this thing it would be great. I know it's a dumb question but I don't understand why this different behavior only in certain circumstances. thanks Everyone. 
    submitted by /u/remons_00
    [link] [comments]

    Github distributes modified GPL'd files; Is all of Github GPL'd?

    Posted: 30 Mar 2021 04:06 PM PDT

    Github distributes GPL'd files with modifications (HTML, HTTP, etc.). What portion of Github software is under GPL?

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

    Looking to buy new laptop for my programmer gf any recommendations for things to look for?

    Posted: 30 Mar 2021 03:58 PM PDT

    I'm looking to surprise my gf with a new laptop, she does programming and her old laptop is on its last leg. Are there any things to keep in mind or look for when selecting one to get the job done? Any insight would be appropriated.

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

    Info on MP3 file format

    Posted: 30 Mar 2021 03:53 PM PDT

    I am considering doing MP3 for a math class project. The project would entail explaining the mathematics of MP3 compression, and ideally connecting it to the actual MP3 format (take an example WAV, go through the encoding process and explain the parts of the resulting MP3 file).

    Unfortunately, while I am comfortable with math, I know very little about digital audio and MP3. Briefly browsing the web has made me a little confused.

    submitted by /u/20nrcn0sfio
    [link] [comments]

    Random sprite generation through base assets

    Posted: 30 Mar 2021 09:42 AM PDT

    Hi everybody I'm hoping someone can point me in the right direction of where to find info on this topic.

    My goal is to generate 10,000 random unique characters using 4 categories of variables with 10 possibilities in each variable (please let me know if my math is wrong here). These characters are just going to be still 2d images, so there's no need to make multiple models for each character. for example, 10 base bodies, 10 hats, 10 shirts, 10 different facial expressions, all put together at random to make 10,000 unique characters.

    What would be the best program to do this in (free please) and/or what is a resource I can use to learn how to do this. Some basic googling and searching on YouTube didn't reveal anything to me, I'm not sure I'm searching for the right terms.

    Some more details; I myself am going to generate the 10,000 random characters, they aren't going into a game engine to be generated by a player or anything like that. I just need some jpeg files of them or whichever file type would work best for this purpose.

    I have no coding/programming knowledge

    Thank you kindly and have a good day

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

    How to read image data in JS and pre process it

    Posted: 30 Mar 2021 03:34 PM PDT

    Basically I am trying to use ONNX.js to deploy a model I trained in python to the web. I need to ask the user to upload the file and I just need to display it to the screen and also get the data of the image (the array of the image).

    I have this for my html to get an input file

    <input type="file" multiple="false" accept="image/\\\*" id="finput" onchange="app()">

    Then in my JS I have

    async function app(){

    let fileinput = document.getElementById("finput")

    //loading onnx model...

    }

    I have figured out how to display the image part using a html canvas however I am stuck on how I can:

    #1 Resize the image to meet the models input size

    #2 Get the image array so that I can actually input it into my model

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

    Race during login

    Posted: 30 Mar 2021 03:28 PM PDT

    Im curious what others do in this situation.

    - new user registers with SPA site using independent identity provider - lets says it's Google

    - user logs in for first time with identity provider, SPA redirects to home page

    - home page calls api for resources

    - api creates user and organisation data in database

    The problem is there are multiple authenticated requests hitting the api for resources and each one will try to get the user details. The first call will create the user record, but if it doenst finish fast (most of the time) then the 2nd request will also try to create the record and bang, database problems (actually its a datacontext issue with .net but you get the idea).

    Choices are :

    1) create the user and org data when the user logs in, but before the site redirects to the home page. (I have this but sometimes it I still get a database issue somehow)

    2) create the user and org data when the user registers, before they login for the first time. If they never login then we will have unused data in the db, but I can live with that.

    3) something else?

    Cheers

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

    C# trying to check whether a player is at a particular location the grid unsuccessfully

    Posted: 30 Mar 2021 03:47 AM PDT

    So, I'm trying to create a console game where I want to show the grid the player is playing on and where the player is on this grid. Since, there are multiple players, I created a list of players and created a function to check whether a player is present at a location on the grid, using a bool function "isPlayer":

    for (int i = 0; i < playerList.Count; i++)
    {
    if(x == playerList[i].getX() && y == playerList[i].getY())
    {
    return true;
    }
    else
    {
    return false;
    }
    }

    This function is used while printing the grid:

    for (int i = 0; i < x; i++)

    {

    for (int j = 0; j < y; j++)

    {

    if (isPlayer(i,j))

    {Console.Write("|P |");

    }

    else

    {

    Console.Write("| |");

    }

    }

    Console.WriteLine();

    }

    My problem is that this code only works for the first player and all subsequent players return false. What am I doing wrong and how do I fix it?

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

    Java

    Posted: 30 Mar 2021 11:23 AM PDT

    Below is a snippet of code in the Timer class of a desktop program that functions like the Android Clock. The code worked fine until I fixed an error in another class and added the playMusic method from the Alarm class. I got the error then on the line with the alarm class. I figured I needed to add another bracket, because the lambda expression now was longer than one line. I did, but i am still getting the same errors on compile. totalTime is being caught as an "Unknown class". Before it worked fine as the amount of time until the window of TimerAlert is displayed. Any help would be appreciated.

    //Button that sets the timer in motion and its code

    Button setTimer = new Button("Set Timer");gp.setConstraints(setTimer, 1,5);setTimer.setOnAction(e->{

    int hours1;

    int minutes1;

    int seconds1;

    if(Hours.getText().isEmpty()){

    hours1 = 0;}else{hours1 = Integer.parseInt(Hours.getText())* 1000 * 60 * 60;

    }

    if(Minutes.getText().isEmpty()){

    minutes1 = 0;

    }else{

    minutes1 = Integer.parseInt(Minutes.getText())*1000*60;

    }

    if(seconds.getText().isEmpty()){

    seconds1 = 0;

    }else{

    seconds1 = Integer.parseInt(Seconds.getText()) * 1000;

    }

    int totaltime = hours1 + minutes1 + seconds1;

    String Message = MessageArea.getText();

    java.util.Timer timer = new java.util.Timer();

    timer.schedule(

    new TimerTask() {

    u/Overridepublic void run() {Platform.runLater(()-> {

    TimerAlert.display(Message);

    Alarm.playMusic("//C:/users/aleka/desktop/Old-alarm-clock-sound.wav");

    });}, totaltime});});

    //The "u/" that's showing in the post should be an @ sign. It doesn't display correctly even if I delete it and rewrite it.

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

    How did you know you know enough to apply for a job ?

    Posted: 30 Mar 2021 10:14 AM PDT

    Im still student and i know a little bit of that and little bit of that i haven't decided what should i go for but im wondering how will i know i'm good enough to apply for a job ?

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

    Are neural networks ever initialised with a known but inefficient procedure and then shrunk?

    Posted: 30 Mar 2021 05:29 AM PDT

    Often we use neural networks to perform tasks with no known 'procedure'. I'm wondering about the situation where there is a known procedure, but it is inefficient, e.g. solving a Rubik's cube, or finding the best chess move.

    The challenge is to reach a substantial number of neural network layers without problems like overfitting. Usually this involves carefully adding layers to a shallow network; has anyone ever instead tried removing layers from an unreasonably deep network?

    Consider

    func perform_mutation(Object obj) { obj.mutation1(); obj.mutation2(); obj.mutation3(); obj.mutation4(); ... obj.mutationN(); return obj; } 

    where mutationX function is a fairly trivial step.

    Say I train an M layer neural network that performs mutation1(), and feed the output into an M layer neural network trained to perform mutation2 etc.

    I now have a neural network with N.M layers that performs a task (with some confidence).

    This is a stupidly large number of layers. The idea is to then remove layers one by one and retrain the network to cope with each missing layer.

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

    What's wrong with my insertion sort?

    Posted: 30 Mar 2021 12:47 AM PDT

    In the following C# insertion sort, 19 and 20 do not get replaced. Why?

    int[] arr = { 7, 3, 52, 10, 19, 20 };

    for (int i = 0; i < arr.Length - 1; i++)

    {

    int pos = i;

    for (int j = i+1; j < arr.Length; j++)

    {

    if (arr[j] < szamok2[pos])

    {

    pos = j;

    }

    int temp = arr[pos];

    arr[pos] = arr[i];

    arr[i] = temp;

    }

    }

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

    Hello! Im know nothing about scripting and coding but I want to learn does anyone suggest a video, tutorial series or website to learn?

    Posted: 30 Mar 2021 08:06 AM PDT

    Can I have a job run independently of other jobs in a GitLab pipeline?

    Posted: 30 Mar 2021 07:54 AM PDT

    I have a pipeline with three jobs -

    • preflight - check if everything is ok

    • deploy - deploy files

    • override - manual job to deploy files even if preflight isn't ok.

    The problem is that if preflight fails, I'm not able to trigger override manually. My workaround is to have override as the first job in the pipeline, which I can still run if the second job, preflight, has failed. This leads to preflight running and failing again, after override succeeds.

    Is there a way to have override completely separate from the other jobs?

    Thanks!

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

    How do i convert json data back to js object and pass it to view file ?

    Posted: 30 Mar 2021 06:19 AM PDT

    So i stored the path of images being uploaded as js object then converted it to json to storein mysql . but now when i retrieve the json object mysql parser throws an error as following :-

    SyntaxError: Unexpected token u in JSON at position 0

    What is it that i am possibly doing wrong . MY image object looks like this

    var imgs = { Img1:Img1,Img2:Img2,Img3:Img3,Img4:Img4,Img5:Img5 }

    This is what i get when i console.log the result

    images_url: '{"Img1":"./venues/1617109390848taj2.jpg","Img2":"./venues/1617109390848taj3.jpeg","Img3":"./venues/1617109390848taj4.jpg","Img4":"./venues/1617109390848taj5.jpeg","Img5":"./venues/1617109390848taj6.jpeg"}',

    images_url is the column name in table for storing the json

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

    No comments:

    Post a Comment