• Breaking News

    Friday, June 4, 2021

    Hackers have put up source code for Cyberpunk 2077 online for sell for $10k. What would be in that that would be actually worth paying? And who would find it valuable? Ask Programming

    Hackers have put up source code for Cyberpunk 2077 online for sell for $10k. What would be in that that would be actually worth paying? And who would find it valuable? Ask Programming


    Hackers have put up source code for Cyberpunk 2077 online for sell for $10k. What would be in that that would be actually worth paying? And who would find it valuable?

    Posted: 04 Jun 2021 08:36 PM PDT

    Connecting to a headless Raspberry Pi

    Posted: 04 Jun 2021 12:37 PM PDT

    Hi,

    I'm very new to RPi but I've been using one at work this past week. I took it home to do some programming work on it over the weekend but I'm now wondering if I'll be able to connect to it. It's headless and I need to SSH into it but I'm not sure if it will work because it won't be located at my workplace, close to the WiFi where it was set up. I don't even know if that makes any sense but I'm afraid to try if there is a possibility that I might ruin something or somehow lose the data on it. Is there any reason why I shouldn't be able to use the same hostname (IP address) as I do at work to connect to it at home?

    Thanks in advance.

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

    Why having too many methods in a class is considered bad practice, yet most libraries have classes with dozens, sometimes even hundreds of methods ?

    Posted: 04 Jun 2021 03:06 AM PDT

    Beginner SQL Select statement question

    Posted: 04 Jun 2021 06:52 PM PDT

    I am a beginner python programmer and I have been following the realPython Python contact book tutorial. In the tutorial, you create a GUI with PyQt, connect the GUI to a SQLite database, and manage the database using QSqlTableModel.

    I finished the tutorial and copy pasted the code into a new project where I changed the database to store usernames and passwords (database name is accounts). I want to implement a button that returns the username and password of the selected row in the GUI. This is my very incomplete code:

    def getAccount(self, row): # row is the selected row
    """Retrieve username and password from database."""
    usernameQuery = QSqlQuery()
    passwordQuery = QSqlQuery()
    uname = usernameQuery.exec(f"SELECT username WHERE ROW_NUMBER() = {row} FROM accounts")
    pwd = passwordQuery.exec(f"SELECT password WHERE ROW_NUMBER() = {row} FROM accounts")
    return uname, pwd

    I have two questions:

    1. How can I format the select statement properly? uname and pwd get the value FALSE meaning that the query failed
    2. How can I get the value if the query is successful?

    Sorry if these are common questions but I have not been able to understand/find the answers to these via google

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

    Is too early to learn C with just this knowledge?

    Posted: 04 Jun 2021 10:36 PM PDT

    Hello, im learning to program in C because my friend say i must learn it, but i don't know if im too early.

    I just know python, js, java, php, is too early or is fine?

    Im really liking C :(

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

    How to really remove all emojis from the text in javascript?

    Posted: 04 Jun 2021 09:15 PM PDT

    Like this🐺

    this didn't work.

    song=decodeURIComponent(song).trim().replace(/([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF]|\ud83c[\udf00-\udfff])/g, ''); song=song.replace(/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, ''); 
    submitted by /u/hwpcspr112
    [link] [comments]

    Something similar to spotify codes?

    Posted: 04 Jun 2021 09:13 PM PDT

    Basically I want to create something similar to Spotify codes i.e. making scannable images linking to unique songs. But I am facing trouble in generating unique ids for each song's name as input, since song's name can be of varying lengths and ID generated has to be unique. How do I do it?

    Does anybody has any other suggestions related to my aim of creating something similar to Spotify Codes?

    Thanks in advance.

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

    Trying to setup phpmyadmin on my Macbook localhost - stuck

    Posted: 04 Jun 2021 08:58 PM PDT

    Hi,

    I've been using these guides:

    https://tech-cookbook.com/2020/11/14/setting-up-your-local-web-server-on-macos-big-sur-11-0-1-2020-mamp-macos-apache-mysql-php/

    https://wpbeaches.com/install-apache-mysql-php-on-macos-11-big-sur-and-earlier-macos/

    to setup my localhost on my Macbook and I am stuck on phpmyadmin - namely I can't login! I'm not sure what I'm doing wrong but I have created a video to show where I am stuck - any input would be much appreciated.

    https://share.getcloudapp.com/WnuxADlm

    Thanks!

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

    Headless browser not working properly with Selenium.

    Posted: 04 Jun 2021 12:33 PM PDT

    I want to host my script on Ubuntu VPS for which I needed to make the browser headless. My program is returning nothing with headless and working perfectly fine without headless. Where am I doing the mistake?
    Here's my code. ``` import requests
    from selenium import webdriver
    from selenium.webdriver.firefox.options import Options as FirefoxOptions user_agent = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2'

    options = FirefoxOptions()
    options.add_argument(f'user-agent={user_agent}')
    options.add_argument("--headless")
    options.add_argument('window-size=1920x1080')
    driver = webdriver.Firefox(options=options)
    start_url = "https://ammoseek.com/ammo/300aac-blackout?pl=no&co=new&ca=brass"
    driver.get(start_url)
    time.sleep(10)
    text = driver.find_element_by_class_name('results-card').text
    print (text) ```

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

    Made my first app, the thought of staring another virtually causes physical pain.

    Posted: 04 Jun 2021 09:21 AM PDT

    Hopefully this post isn't too long, but I really want to ask/discuss a challenge I've been having with programming.

    A little background:

    I started learning Java about a year and a half ago. I made a couple small command line tools for work (I am a Business Analyst 3 in IT for a big company) these tools were pretty popular and eventually led to me getting promoted. Now a BA3, I kinda needed to make a name for myself so I created this extremely complicated web based application involving multiple sql database reads and updates, inserts, table creation etc, also involved me having to learn HTML, CSS, some Javascript, webserver deployment for Apache Tomcat, Weblogic management, API calls, cron scheduling and more.

    This seems to have completely burned me out. The app works great, and is getting good reception, however whenever I have an idea for another application/process improvement the idea of really getting into it completely turns me off. I feel as if I would rather do almost ANYTHING else besides start another project. I thought this would be temporary, but its been several months and I just can't seem to muster the discipline to start again.

    I feel this is mainly because I have seen how complicated programming can be and I know what lies ahead. I am in a "I know what I don't know" position and its so difficult to keep improving.

    The last app I made was also pretty much all from scratch, no really big libraries such as React or spring boot were used which I hear can cut out a lot of the little annoying parts, but I basically have to LEARN those too first in order to utilize their simplicity.

    A metaphor for where I am : I basically feel like a construction contractor, I have the know how and some basic tools, I know how to build all kinds of things, additions to a house, furniture, wiring, I can build you a shed etc, however starting a new project makes me feel like I need to build a skyscraper with the same basic tools I use for everything else...just daunting.

    Does anyone else feel this way?

    I guess my main question is, does this ever get easier? Are there methods of programming you pick up over time that can significantly cut down on the stress and complexity? Using my contractor metaphor, are there ways to basically build entire floors of the skyscraper quickly? instead of laying every brick and tile myself?

    Its a complicated issue, I know, but I could really use some encouragement, or stories from others as to how you may have experienced this, or especially, gotten past it!

    Thanks for the long ass read.

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

    I want to build an app for my website that takes input from a user and references a database for customized output.

    Posted: 04 Jun 2021 11:36 AM PDT

    I'm not sure if this is the right place to ask this question.

    I want to create essentially a quiz-type app based on a person's birth date. I want to get the user's birthday, have it reference a database for the custom output based on that birthdate, and then show the user that information.

    Example: your birthday is March 16, 1984 and that date pulls up "white daisy" from the database as your personal information and then the app shows the user "white daisy".

    I imagine this is doable, but I've got no clue what to search for in order to find the information I need to learn how to do it. Quiz generators obviously don't provide this function, which is why I'm assuming I'll need to make a custom widget.

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

    Did anyone got hired even if failed the take home test?

    Posted: 04 Jun 2021 01:19 PM PDT

    Hi there! Is it possibile to get hired from a company even if you weren't able to do your take home test? I really loved this company and I think they did liked me a lot too but I'm afraid I won't be able to pass the test. Is there any chance to get hired anyway if I was a good fit for the company but I still don't have the right skills? I'm a junior dev still.

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

    Ripple counter applications

    Posted: 04 Jun 2021 11:10 AM PDT

    Hi guys,

    So I have just been introduced to ripple counters and now have a very basic understanding of them, these counters are pretty much counting in binary using feedback and a number of flip flops.

    In the book that I'm reading, the author mentions you can use a ripple counter to get the frequency of an oscillator. You could hook up each flip flops output to lightbulbs, say we have 8 lightbulbs and an 8 bit ripple counter, we could get a stopwatch, set the bulbs to 0, start the counter and stopwatch. This will light up the bulbs counting to 256(when every single bulb is on). When all bulbs are lit stop the timer, divide the total time by 256 and this will give you x GHz of the oscillator.

    I read on a website the following "These counters are frequently used for measurement of Time, Measurement of Frequency, Measurement of Distance, Measurement of Speed, Waveform generation, Frequency Division, Digital Computers, Direct Counting etc…."

    The above is pretty much gibberish to me, how could ripple counters be used for measurement of speed and distance?

    But my main question is apart from the example I gave, what are some real applications of binary counters in computers or even micro controllers?

    Thanks

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

    Which language I should start with?

    Posted: 04 Jun 2021 06:33 AM PDT

    I have some ideas I'm invested on for couple of educational apps, mindmap-like and timelines with collapsible items and reconfigurable layouts. I want it to be cross platform (windows-android). I've met some programmers but they're too busy or they set the price too high for me.

    I dont know any language yet, Im in a formal logic course and I'm kind of an autodidact so I'm positive I'll achieve something. Which one would you recommend me to to start with considering what I'm aimed to? Thank you in advance!

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

    Understanding Large Projects

    Posted: 04 Jun 2021 09:32 AM PDT

    I've been programing for a year or two now, and right now, I'm looking to contribute to open source projects. I've found a few projects that fit my skills and experience. However, I'm struggling to understand how the large code base works. Should I be reading file by file until I understand it or should I develop a localized understanding on what I need to know to make a contribution?

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

    Need some inspiration, hints, links for IoT rule/evaluation service

    Posted: 04 Jun 2021 09:20 AM PDT

    Hi everyone,

    I want to create some kind rule/evaluation service. My goal is to provide a drag and drop builder in my frontend to users in order to concenate standard blocks like if, plus, minus... Basically some mathematical and logical operators. There will be data available in a standardized format coming from a broker or database. The result of these operations will be send out again to the broker.

    The general idea is to receive data from sensors, do some operations with this data and create an event, which should be send to a device.

    One exapmple: measure illuminance, convert to another unit, compare to treshold and switch on/off lamp.

    I would love some suggestions on how to store the concenated operations and be able to execute them based on time or event triggers. Also I want to avoid to write and compile new code at runtime to save performance and avoid a too complex solution.

    I dont worry about the frontend part so far. That should be fairly easy once I know how to persist the rules.

    Do you maybe know a library/framework with what to achive this kind of evaluation service?

    I don't expect detailed solutions. Just some links or suggestions would be awesome, because I usually create APIs and lack some knowledge in this area.

    In my backend I'm working mostly with Java and Quarkus and would prefer Java, but I can also work with Node/Typescript, Python, C# and maybe C++, if it helps with the result.

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

    Should I use Java or Python to build a “high school grades reviewer”?

    Posted: 04 Jun 2021 12:57 PM PDT

    First of all: I am totally new to programming.

    I would like to create an app, which allows you to put all of your different grades and subjects into it and the grades you want to achieve, and this program will then sort everything and show you how much you have to improve, to get to your score you want to achieve. I am struggling between if I should use Python or Java for this. Does someone has any recommendation which one is better to use for this? Thanks in advance!

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

    Is Http Tunelling really secure?

    Posted: 04 Jun 2021 08:44 AM PDT

    I plan to use a proxy to send some requests with sensitive data. I was searching on how HTTP Tunnel works and I am not 100% sure it is safe. Imagine I am using axios, and to make things work with the proxy I will be using a library called tunnel(https://www.npmjs.com/package/tunnel) and there are 2 options to create an httpsAgent: httpsOverHttp and httpsOverHttps and I am not sure if the first one is safe.

    I want to send data to https://example.com and things work just fine with httpsOverHttp but what are the implications? I can use httpsOverHttps but I would need to provide the CA of the proxy. Am I still 100% safe with httpsOverHttp? I dont want the proxy looking into my data.

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

    Books on Kotlin for Beginners

    Posted: 04 Jun 2021 11:54 AM PDT

    Hello! I'm a University student who will be looking into internships soon. I have an idea for a simple app to get started on a list of projects for my resume. Upon some research, it is best to know some Kotlin to program for Androids. I am watching YouTube videos, but would like a book for reference. Does anyone have any suggestions?

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

    Chat program sql vs nosql?

    Posted: 04 Jun 2021 09:30 AM PDT

    Hello im trying to make chat feature in project. there's no group chat. only 1:1 chat And I want to save every message in every chatroom.

    In this case what db is recommended? Sql or nosql? If nosql is recommended what nosql? Mongodb? Why??

    should I use redis too?

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

    HAML and Javascript

    Posted: 04 Jun 2021 09:14 AM PDT

    So I know I can use inline JS in a .haml file using the :javascript tag, but my question is how can I use variables from the javascript tag in the .haml?

    I have a variable in my :javascript tag that I wish to iterate that number of times to display a certain haml 'div'

    For example, if var test = 2, I wish to display a div in haml 2 times.

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

    Export Slack chat without admin rights?

    Posted: 04 Jun 2021 08:22 AM PDT

    Can you export Slack channels without admin rights? I'm wondering what other alternatives there are to the few python scripts I found

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

    How to create a simple page with search box that filters lines/text links with the associated keywords at the end of the line?

    Posted: 04 Jun 2021 07:46 AM PDT

    Basically i am trying to create a web page for my friends, no image etc, i am trying to create a simple text box at the top and below there will be text based links on each line and each line will have multiple tag words. So when you type something to that box if it matches with any tags, it hides every other lines and just show that lines and links only unless you add another keyword with a comma.

    E.g;

    [search box]

    Line 1 (this is a link), orange, blue, red (these are tags) Line 2, blue, red, pink Line 3, red, pink, purple Line 4, purple, orange, yellow

    ; [blue] (user typed it)

    Line1, orange, *blue, red* Line 2, ***blue, red, pink*

    ;

    [blue, yellow]

    Line1, orange, *blue, red* Line 2, ***blue, red, pink* Line 4, purple, orange, *yellow***

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

    No comments:

    Post a Comment