• Breaking News

    Tuesday, June 18, 2019

    What are the best YouTube channel every programmer should follow? Ask Programming

    What are the best YouTube channel every programmer should follow? Ask Programming


    What are the best YouTube channel every programmer should follow?

    Posted: 18 Jun 2019 02:47 PM PDT

    Documentation on the __base__ attribute in Python

    Posted: 18 Jun 2019 11:02 AM PDT

    The __base__ attribute in Python works as follows:

    >>> class A: ... pass ... >>> class B(A): ... pass ... >>> B.__base__ <class '__main__.A'> >>> A.__base__ <class 'object'> 

    However I can't seem to find documentation on it anywhere; I can only seem to find documentation for __bases__. At the very least, a simple google search yields nothing.

    Does anybody know where I can find documentation on this attribute?

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

    [Serious] Reddit Bot idea, no experience programming; can anyone help?

    Posted: 18 Jun 2019 09:29 PM PDT

    Hey everyone, I have a genius idea for a Reddit bot that would make this place a much better site

    I have no idea how to code, I hadn't gotten past the first introductory assignment when I took coding in gr. 10, so if anyone here is willing to help, that'd be great

    I want to make a bot that automatically replies to comments that contain the words "ass", "butt", "anus", "asshole", and whatever else related to ass. It would have to have some other restriction in order to prevent it from replying to every single comment that says those words, as that would get way too out of control.

    I would call the bot "BraaapBot" and have it reply with the following message to users who commented any of the previously mentioned keywords:

    "BBBBBBBBBRRRRRRRRRRRAAAAAAAAAAAPPPPPPPPPPPPPPPPP snnnnniiiiiiffffffffffff...oh yes my dear....sssnnnnnnnnnnnniiiiiiiiffffffff....quite pungent indeed...is that....dare I say....sssssssnniff...eggs I smell?......sniff sniff....hmmm...yes...quite so my darling....sniff....quite pungent eggs yes very much so .....ssssssssssssssnnnnnnnnnnnnnnniiiiiiiffffff....ah yes...and also....a hint of....sniff....cheese.....quite wet my dear....sniff...but of yes...this will do nicely....sniff.....please my dear....another if you please....nice a big now.... BBBBBBRRRRRRRAAAAAAAPPPPPPPFFFFFFFFLLLLLLLLLPPPPPPPPPFFFFFF Oh yes...very good!....very sloppy and wet my dear....hmmmmm...is that a drop of nugget I see on the rim?...hmmmm.....let me.....let me just have a little taste before the sniff my darling.......hmmmmm....hmm..yes....that is a delicate bit of chocolate my dear....ah yes....let me guess...curry for dinner?....oh quite right I am....aren't I?....ok....time for sniff.....sssssnnnnnnniiiiiiiiffffffff.....hmmm...hhhmmmmm I see...yes....yes indeed as well curry......hmmm....that fragrance is quite noticeable....yes.....onion and garlic chutney I take it my dear?.....hmmmmm....yes quite..... BBBBBBRRRRRRRRPPPPPPFFFFFFFFFFFFFFFFFFFFFTTTTTTTTTTT Oh I was not expecting that…that little gust my dear….you caught me off guard…yes…so gentle it was though…hmmmm…let me taste this little one…just one small sniff…..sniff…ah….ssssssnnnnnniiiiiffffffffffff…and yet…so strong…yes…the odor….sniff sniff…hmmm….is that….sniff….hmmm….I can almost taste it my dear…..yes….just…sniff….a little whiff more if you please…..ssssssnnnnnniiiiiffffffffff…ah yes I have it now….yes quite….hhhhmmmm…delectable my dear…..quite exquisite yes…..I dare say…sniff….the most pungent one yet my dear….ssssnnnnniiiifffffffffffffffffffffff….yes…."

    Thanks for your time.

    submitted by /u/utlf-
    [link] [comments]

    Bizarre unrecognized token error, using sqldf package

    Posted: 18 Jun 2019 01:51 PM PDT

    I am trying to run the following and it is giving me an 'unrecognized token error - 4U'. When I isolate 4U, it works. What the heck guys? See below...

    test_x=sqldf("Select *, case

    + when type_welfare_benefit_code like '%4A%' then 1

    + when type_welfare_benefit_code like '%4B%' then 1

    + when type_welfare_benefit_code like '%4C%' then 1

    + when type_welfare_benefit_code like '%4D%' then 1

    + when type_welfare_benefit_code like '%4E%' then 1

    + when type_welfare_benefit_code like '%4F%' then 1

    + when type_welfare_benefit_code like '%4G%' then 1

    + when type_welfare_benefit_code like '%4H%' then 1

    + when type_welfare_benefit_code like '%4I%' then 1

    + when type_welfare_benefit_code like '%4J%' then 1

    + when type_welfare_benefit_code like '%4K%' then 1

    + when type_welfare_benefit_code like '%4L%' then 1

    + when type_welfare_benefit_code like '%4P%' then 1

    + when type_welfare_benefit_code like '%4Q%' then 1

    + when type_welfare_benefit_code like '%4R%' then 1

    + when type_welfare_benefit_code like '%4S%' then 1

    + when type_welfare_benefit_code like '%4T%' then 1

    + when type_welfare_benefit_code like '%4U%' then 1

    + else 0 end as welfare_plan_ind,

    + case

    + when type_pension_benefit_code like '%1A%' then 1

    + when type_pension_benefit_code like '%1B%' then 1

    + when type_pension_benefit_code like '%1C%' then 1

    + when type_pension_benefit_code like '%1D%' then 1

    + when type_pension_benefit_code like '%1E%' then 1

    + when type_pension_benefit_code like '%1F%' then 1

    + when type_pension_benefit_code like '%1G%' then 1

    + when type_pension_benefit_code like '%1H%' then 1

    + when type_pension_benefit_code like '%1I%' then 1

    + else 0 end as type_pension_plan_ind,

    + case

    + when type_pension_benefit_code like '%2A%' then 1

    + when type_pension_benefit_code like '%2B%' then 1

    + when type_pension_benefit_code like '%2C%' then 1

    + when type_pension_benefit_code like '%2D%' then 1

    + when type_pension_benefit_code like '%2E%' then 1

    + when type_pension_benefit_code like '%2F%' then 1

    + when type_pension_benefit_code like '%2G%' then 1

    + when type_pension_benefit_code like '%2H%' then 1

    + when type_pension_benefit_code like '%2I%' then 1

    + when type_pension_benefit_code like '%2J%' then 1

    + when type_pension_benefit_code like '%2K%' then 1

    + when type_pension_benefit_code like '%2L%' then 1

    + when type_pension_benefit_code like '%2M%' then 1

    + when type_pension_benefit_code like '%2N%' then 1

    + when type_pension_benefit_code like '%2O%' then 1

    + when type_pension_benefit_code like '%2P%' then 1

    + when type_pension_benefit_code like '%2Q%' then 1

    + when type_pension_benefit_code like '%2R%' then 1

    + when type_pension_benefit_code like '%2S%' then 1

    + else 0 end as defined_contrib_pension_ind

    + from subset_5500_17_exp")

    Error in result_create(conn@ptr, statement) : unrecognized token: "4U"

    >

    > test_x=sqldf("Select *, case

    + when type_welfare_benefit_code like '%4U%' then 1

    + else 0 end as welfare_plan_ind

    + from subset_5500_17_exp")

    >

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

    Building an Algorithm (is it easily possible) question

    Posted: 18 Jun 2019 05:35 PM PDT

    Would it be possible without leading research and development to create an algorithm with possibly AI attribute to find content through a database and online (Text based) based on an input of info from answered questions similar to 21 questions?

    Or in other words, is it fairly easy for one developer with the right skill set (not a huge team and loads of R&D) to create a program that can find content online and from a self-hosted database, and the content would be found based on a series of answers to questions (The input)? The search algorithm could also have categories and structured rules based on the answers to the questions. The answers would be picked from a list so they could be pre-programed but the variations of the content found would be limitless.

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

    Can I put on my resume I discovered & solved a major security issue?

    Posted: 17 Jun 2019 11:36 PM PDT

    I was talking to my father yesterday, debating whether I could put on my resume I discovered a security issue where a bearer token was publicly exposed calling a third-party API for customer service. Now since I'm in the financial industry, this means sensitive information is being shared over this channel such as ID card scans or scans of bank statements. Basically, you could retrieve anyone's tickets by using their e-mail ad dress and just read the conversations from there. Those conversations might have attachments.

    Can I put this on my resume or not? My father argued I might damage my company's reputation.

    I would not put it something like 'Discovered & resolved major security issue where personal information could be stolen.'

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

    Can you use Inspect/Developer tools to find exact JS script?

    Posted: 18 Jun 2019 03:39 PM PDT

    Is there a way to use the Inspect or Developer tool to see exactly what javascript code or file affects a particular element or behavior?

    Lets's say a website is using JavaScript to make a div do something weird and I wanted to see the JS code making it behave that way, is there a way for me to do that?

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

    Something a bit different. I wanna automate my room. How do I proceed?

    Posted: 18 Jun 2019 11:42 AM PDT

    So I have an ambitious project I want to turn my room into a self automated one by using an arduino or raspberry pi

    Voice commands to perform:

    • Open and close curtains (I have the curtains and I'm going to order an electronic curtain opener online but I'll need to find a way to pass it input through the arduino instead of its presumably IR remote control.

    • control the electric current that's going to the lights in my room. Which are only LEDs. .

    • control an already installed AR controlled fan on the ceiling of my room.

    I guess that's about it. What do you guys think, how should I tackle this? I have previous experience with programming and have made some projects here and there.

    What do you guys think?

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

    Getting Radio FM frequencies from Radio's Station name or Coordinates or City

    Posted: 18 Jun 2019 02:44 PM PDT

    Hello everyone,

    i searched a lot for this so i'm starting to think that there isn't a way without scraping, but i want to try here first.

    I have names of Web Radio stations and i would like to get back the FM frequencies. Eventually i can obtain the coordinates of the frontend and the City/Region/State/Country with the Google geocoding Api.

    My question is, there is any way to find a radio frequency given one or multiple of these things in input (Station name/ location)?

    Thanks in advance

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

    Poll: plain text markup styles, independent of file type

    Posted: 18 Jun 2019 12:09 PM PDT

    Poll: what do you guys use for:

    • bold
    • italics
    • verbatim text
    • code

    when a particular format (markdown, reddit, StackExchange, org-mode) is not being enforced? For instance, in emails, how do you guys do this?

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

    Need a way to automate saving an Excel file to a pdf on a schedule

    Posted: 18 Jun 2019 11:43 AM PDT

    I hope this is the right place to ask this, but I am looking for some way to automate having an excel sheet printed/saved to a pdf file on a set schedule. We have cost report sheets that we need to keep backups of at work and it gets to be a hassle to do this for a bunch of different jobs. I'm pretty good with a computer, but way out of my range of knowledge here. We are on a mix of windows 7 and 10 and using Microsoft Server (not sure what year) if that matters any.

    Any help would be appreciated.

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

    Tutorial Requests

    Posted: 18 Jun 2019 06:31 AM PDT

    I'm starting a blog on simplifying programming math and methods. Idea's I have for articles and slideshows are: Vectors, Matrices, Genetic Algorithm, Particle Swarm Optimization, Differential Evolution, Markov Chains, Any other ideas would be welcome.

    submitted by /u/Tech-Effigy
    [link] [comments]

    Unsure about what language/library to use for project, regarding drawing

    Posted: 18 Jun 2019 02:27 AM PDT

    Back in school when first learning how to program, we used to have these graphical projects where we'd have to make a square travel across the screen or something, or make a fractal pattern. I thought this could be a cool idea to pair with music. Basically my idea is to time the movement of patterns and drawings to the rhythm of a song into some kind of "music video" if that makes any sense. Kind of like a kaleidoscope paired with music. Does anyone know how best to approach this idea? In school we used Java for those graphics projects, but that feels too cumbersome for my purposes.

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

    Is there a way to quickly select and wrap text in html

    Posted: 18 Jun 2019 02:50 AM PDT

    I'm hoping to find a way to select all/most of text inside html files and wrap them inside a function (PHP's gettext()).

    I tried regex and emmet with no success. Or do I just go through all the files and just edit every text manually -_-.

    Edit: By text I mean the text that appears in the browser, not the markup.

    e.g. I would like:

    <div class="text">Text

    <p>Another Text<p>

    </div>

    to be

    <div class"text"> {{ \_i('Text') }}

    <p>{{ \_i('Another Text') }}</p>

    </div>

    Is there a way to achieve that quickly ? other than going through 150 files and change them manually?

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

    How would you mark parts of an image (Worldmap and countries to mark)?

    Posted: 17 Jun 2019 11:55 PM PDT

    Hey,
    Ive got a worldmap and I would like to mark specific countries (=polygon) on it. How do you implement something like this? Prefered in javascript

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

    Finding hidden symbols in a video

    Posted: 18 Jun 2019 03:24 AM PDT

    Is there any sort of software or way to input a symbol and have a program skim a video to find said symbol?

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

    Is it still worth it to know how to program in assembly languages?

    Posted: 18 Jun 2019 12:45 AM PDT

    On the one hand, it is intriguing to me, and it would be neat to know how to program in them. Plus it does teach you about how computers actually work in a way that most languages won't.

    But on the other hand, is it even common enough that you should care? Most common embedded systems and micro controllers work fine with C of even C++, and I don't think I've ever really encountered anything that mandates knowledge of assembly. Except when people are hacking old game consoles and creating homebrew apps.

    submitted by /u/I-Downloaded-a-Car
    [link] [comments]

    Post to rest endpoint url

    Posted: 18 Jun 2019 12:23 AM PDT

    Hello,

    This may be a very general question, but I am not able to find anything to work.

    I have been given a rest endpoint url and I have to post JSON data on it. How do I do it via jquery.. I know it's something around ajax, but any link or any example will be very helpful.

    Thanks.

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

    No comments:

    Post a Comment