• Breaking News

    Monday, May 3, 2021

    Absurd Question -- Do programmers actually write programs for a specific kind of RAM? Ask Programming

    Absurd Question -- Do programmers actually write programs for a specific kind of RAM? Ask Programming


    Absurd Question -- Do programmers actually write programs for a specific kind of RAM?

    Posted: 03 May 2021 07:35 PM PDT

    This question is making me feel really stupid because I should know better. However, this came from on high at my job and I just need a sanity check.

    I've been upgrading computers at work by installing more RAM. Mostly, they're 4 channel systems and so I've been installing them 4x4GB = 16GB DDR3.

    Now, here's the thing. I was approached by someone high up who said that I had to install 3 specific systems as 2x8GB and I had to use these exact modules because the programmers had specifically wrote the code for these modules and for 2x8GB.

    I'm highly skeptical of this. Like, whatever, I'll do what they pay me to do but is this really a thing? Does anyone have a particular application they can cite where this would be important? Furthermore, how?

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

    What datatype should be used for storing an expression? EX: (A | B) & ((D & E & F) | (D & E & G))

    Posted: 03 May 2021 11:40 AM PDT

    Here is something more similar to the real example, but its actually a bit more complicated than this.

    EX: (A | B) & ((D & E & F) | (D & E & G)| (G & (H & J) | (K & L & M)))

    Then using a dictionary I will replace the values for A-M with Sometimes, Always, Never, and evaluate based on our truthtable.

    The issue comes in with order of operations. Having the (( really complicates an otherwise easy split() or regex.

    How is this typically handled? Any links also appreciated.

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

    How do you pull yourself out of "the zone" when you've been coding for too long and need to move on to other stuff?

    Posted: 03 May 2021 01:37 PM PDT

    I haven't been diagnosed with ADD yet but when I start coding, I am at great risk of getting so sucked in that I will lose a day over it, especially if I fall down a rabbit hole of bugs. I have forgotten to eat meals, forgotten obligations with people, etc. If I have to stop to go meet up with someone, I'll be unable to focus on the social interaction because my brain will be on a loop trying to figure out the next steps in my project or how to fix the errors I'm getting.

    What helps you to snap yourself out of coding? How do you convince yourself "that's enough work for today, I can work on these steps tomorrow", and then mentally move on to the rest of the day?

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

    What do you like about Scala ?

    Posted: 03 May 2021 10:19 PM PDT

    I'm pondering whether I should learn Scala. I'd like to learn some functional programming but failed before with Caml and I'd like to succeed this time. My primary language is Java, I did some Cpp and the obligatory TS/JS so, everything in the "C family".

    The thing is, the first post I read on the Scala sub was a metoo outing of a prominent Scala figure. Its stupid but it kinda made me reconsider...

    Anyway, I'm liking what I see in the doc so far but I struggle to understand the typical use case of the language.

    So what do you like about it ? What do you use it for ? Why do you use it over Java or another functional language ?

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

    Can’t ssh in to a server with IDE?

    Posted: 03 May 2021 09:55 PM PDT

    Flatiron School vs Fullstack Academy/Grace Hopper Academy -- help?!

    Posted: 03 May 2021 12:42 PM PDT

    Hi everyone! I am new to coding and have been studying Javascript on my own and have been accepted to both Flatiron school and Fullstack academy/Grace Hopper, and I was having trouble deciding which one to commit to for the upcoming cohort.

    Some potentially useful information about them/me:

    Flatiron has granted me a 3k scholarship and is beginner friendly, but I am not so sure about the courses themselves and outcomes. Admission process was relatively easy in my experience.

    Fullstack(Grace Hopper specifically) has a scholarship available for 1k which I have yet to apply for (but no big deal either way). They are not as beginner friendly and I had to pass an admissions technical interview before getting accepted. Their courses seem more fast paced from what I've heard but the outcomes are supposedly top notch because they keep up to date with more relevant material.

    I am not working at the moment and have time to dedicate to either of these, and they both seem great. Both of these programs would be remotely completed from online now as well due to the pandemic. Has anyone here been to either of these bootcamps and which one would you recommend and why? Are the Flatiron courses easy to understand in comparison to the fast pace of Fullstack, or is it worthwhile to just put the extra hours in for Fullstack? I need help!

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

    Why do you sometimes need to use word "function" in ReactJS and sometimes not?

    Posted: 03 May 2021 05:36 PM PDT

    Open Source Help Needed!!

    Posted: 03 May 2021 05:04 PM PDT

    Hi everyone,

    We are a team of graduate students at UCSD working on a combined Open Source analysis tool that would make the process of scanning large banks of OS code for security vulnerabilities and license compliance issues.

    We have a starting point, but are looking for help with our next steps. We have built a short anonymous survey of 16 questions (less than 10 minutes). Any help would be greatly appreciated. Thanks!

    The link to the survey is below:

    https://ucsd.co1.qualtrics.com/jfe/form/SV_6eUZXbkJsoQ7cOO

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

    Curl gives response but python script does not give response neither terminates. Help

    Posted: 03 May 2021 11:04 AM PDT

    My curl url is as follows:-

    curl 'https://www.nseindia.com/api/historical/cm/equity?symbol=COALINDIA&series=\[%22EQ%22\]&from=03-05-2020&to=03-05-2021&csv=true' \ -H 'authority: www.nseindia.com' \ -H 'accept: /' \ -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36' \ -H 'x-requested-with: XMLHttpRequest' \ -H 'sec-gpc: 1' \ -H 'sec-fetch-site: same-origin' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-dest: empty' \ -H 'referer: https://www.nseindia.com/get-quotes/equity?symbol=COALINDIA' \ -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \ -H 'cookie: ak_bmsc=2D5CCD6F330B77016DD02ADFD8BADB8A58DDD69E733C0000451A9060B2DF0E5C~pllIy1yQvFABwPqSfaqwV4quP8uVOfZBlZe9dhyP7+7vCW/YfXy32hQoUm4wxCSxUjj8K67PiZM+8wE7cp0WV5i3oFyw7HRmcg22nLtNY4Wb4xn0qLv0kcirhiGKsq4IO94j8oYTZIzN227I73UKWQBrCSiGOka/toHASjz/R10sX3nxqvmMSBlWvuuHkgKOzrkdvHP1YoLPMw3Cn6OyE/Z2G3oc+mg+DXe8eX1j8b9Hc=; nseQuoteSymbols=[{"symbol":"COALINDIA","identifier":null,"type":"equity"}]; nsit=X5ZCfROTTuLVwZzLBn7OOtf0; AKA_A2=A; bm_mi=6CE0B82205ACE5A1F72250ACDDFF563E~LZ4/HQ257rSMBPCrxy0uSDvrSxj4hHpLQqc8R5JZOzUZYo1OqZg5Q/GOt88XNtMbsWM8bB22vtCXzvksGwPcC/bH2nPFEZr0ci6spQ4GOpCa/TM7soc02HVf0tyDTkmg/ZdLZlWzond4r0vn+QpSB7f3fiVza1Gdx9OaFL1i3rvqe1OKmFONreHEue20PL0hlREVWeLcFM/5DxKArPwzCSopPp62Eea1510iivl7GmY=; nseappid=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhcGkubnNlIiwiYXVkIjoiYXBpLm5zZSIsImlhdCI6MTYyMDA2MTQ5OSwiZXhwIjoxNjIwMDY1MDk5fQ.YBTQ0MqRayD3QBM3V6zUt5zbRRICkbIhWWNedkDYrdU; bm_sv=C49B743B48F174C77F3DDAD188AA6D87~bm5TD36snlaRLx9M5CS+FOUicUcbVV3OIKjZU2WLwd1PtHYUum7hnBfYeUCDv+5Xdb9ADklnmm1cwZGJJbiBstcA6c5vju53C7aTFBorl8SJZjBN/4ku61oz0ncrQYCaSxkFGkRRY9VMWm6SpQwHXfMsUzc/Qk7301zs7KZuGCY=' \ --compressed

    This gives me a response (as follows):

    "Date ","series ","OPEN ","HIGH ","LOW ","PREV. CLOSE ","ltp ","close ","vwap ","52W H","52W L ","VOLUME ","VALUE ","No of trades " "03-May-2021","EQ","133.00","133.45","131.20","133.05","132.20","132.20","132.21","163.00","109.55",10262391,"1,356,811,541.80",59409

    But , the python alternative of this command does not give me any response. Neither does it terminate. It is stuck at the requests.get() call. My python script is as follows.

    import requests

    headers = { 'authority': 'www.nseindia.com', 'accept': '/', 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36', 'x-requested-with': 'XMLHttpRequest', 'sec-gpc': '1', 'sec-fetch-site': 'same-origin', 'sec-fetch-mode': 'cors', 'sec-fetch-dest': 'empty', 'referer': 'https://www.nseindia.com/get-quotes/equity?symbol=COALINDIA', 'accept-language': 'en-GB,en-US;q=0.9,en;q=0.8','cookie':'ak_bmsc=2D5CCD6F330B77016DD02ADFD8BADB8A58DDD69E733C0000451A9060B2DF0E5C~pllIy1yQvFABwPqSfaqwV4quP8uVOfZBlZe9dhyP7+7vCW/YfXy32hQoUm4wxCSxUjj8K67PiZM+8wE7cp0WV5i3oFyw7HRmcg22nLtNY4Wb4xn0qLv0kcirhiGKsq4IO94j8oYTZIzN227I73UKWQBrCSiGOka/toHASjz/R10sX3nxqvmMSBlWvuuHkgKOzrkdvHP1YoLPMw3Cn6OyE/Z2G3oc+mg+DXe8eX1j8b9Hc=; nseQuoteSymbols=[{"symbol":"COALINDIA","identifier":null,"type":"equity"}]; nsit=X5ZCfROTTuLVwZzLBn7OOtf0; AKA_A2=A; bm_mi=6CE0B82205ACE5A1F72250ACDDFF563E~LZ4/HQ257rSMBPCrxy0uSDvrSxj4hHpLQqc8R5JZOzUZYo1OqZg5Q/GOt88XNtMbsWM8bB22vtCXzvksGwPcC/bH2nPFEZr0ci6spQ4GOpCa/TM7soc02HVf0tyDTkmg/ZdLZlWzond4r0vn+QpSB7f3fiVza1Gdx9OaFL1i3rvqe1OKmFONreHEue20PL0hlREVWeLcFM/5DxKArPwzCSopPp62Eea1510iivl7GmY=; nseappid=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhcGkubnNlIiwiYXVkIjoiYXBpLm5zZSIsImlhdCI6MTYyMDA2MTQ5OSwiZXhwIjoxNjIwMDY1MDk5fQ.YBTQ0MqRayD3QBM3V6zUt5zbRRICkbIhWWNedkDYrdU; bm_sv=C49B743B48F174C77F3DDAD188AA6D87~bm5TD36snlaRLx9M5CS+FOUicUcbVV3OIKjZU2WLwd1PtHYUum7hnBfYeUCDv+5Xdb9ADklnmm1cwZGJJbiBstcA6c5vju53C7aTFBorl8SJZjBN/4ku61oz0ncrQYCaSxkFGkRRY9VMWm6SpQwHXfMsUzc/Qk7301zs7KZuGCY=',}

    params = ( ('symbol', 'COALINDIA'), ('series', '/["EQ"/]'), ('from', '30-04-2021'), ('to', '03-05-2021'), ('csv', 'true'), )

    response = requests.get('https://www.nseindia.com/api/historical/cm/equity', headers=headers, params=params)

    I am using python 3.9 and urllib3 underneath.

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

    Help me!

    Posted: 03 May 2021 01:51 AM PDT

    I am in senior years of our school and I started learning to program 3 weeks ago. By now I've learned about the fundamentals of C (like loops, arrays, pointers, etc) by watching youtube videos. What are the topics that I should learn now? and where can I learn them? Please suggest me some good free resources.

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

    Failure to create CEF browser

    Posted: 03 May 2021 10:30 AM PDT

    My app is failing to run the BrowserComponent everytime I try to call it inside codename one. It gives me an error of failure to create CEF browser. Everything beside that is running just fine. I uninstalled and installed CEF as instructed in this link Codename One CEF Support I tried to fix my problem as I found it inside Known Issues from the previous link

    I did as instructed and tried to fix the LD_LIBRARY_PATH

    here is the output of my terminal after I did so :

    [kagha@archbios ~]$ whereis java java /usr/bin/java /usr/share/java /usr/lib/jvm/java-8-jdk/bin/java [kagha@archbios ~]$ echo $JAVA_HOME /usr/lib/jvm/java-8-jdk [kagha@archbios ~]$ echo $LD_LIBRARY_PATH /usr/lib/jvm/java-8-jdk/lib/amd64 [kagha@archbios ~]$ find /usr/lib/jvm/java-8-jdk/ | grep "libawt.so" /usr/lib/jvm/java-8-jdk/jre/lib/amd64/libawt.so 

    but the problem is still there I am using the OS Arch Linux with Kernel version 5.10.32-1-lts and Apache netbeans 12.1 as an IDE

    The code I am trying to run

    Form hi = new Form("Browser", new BorderLayout()); BrowserComponent browser = new BrowserComponent(); browser.setURL("https://www.codenameone.com/"); hi.add(BorderLayout.CENTER, browser); 

    Here is the full error in the console:

    [AWT-EventQueue-0] 0:0:0,284 - Attempting to create browser component java.lang.UnsatisfiedLinkError: /home/kagha/.codenameone/cef/lib/linux64/libjcef.so: libjawt.so: cannot open shared object file: No such file or directory [EDT] 0:0:0,326 - Exception: java.lang.UnsatisfiedLinkError - /home/kagha/.codenameone/cef/lib/linux64/libjcef.so: libjawt.so: cannot open shared object file: No such file or directory [EDT] 0:0:0,327 - Exception: java.lang.RuntimeException - Failed to create CEF browser at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1830) at java.lang.Runtime.loadLibrary0(Runtime.java:871) at java.lang.System.loadLibrary(System.java:1122) at org.cef.SystemBootstrap$1.loadLibrary(SystemBootstrap.java:24) at org.cef.SystemBootstrap.loadLibrary(SystemBootstrap.java:36) at org.cef.CefApp.startup(CefApp.java:536) . . . 

    I will appreciate any help and provide more information if needed, thanks in advance

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

    Zoom Bot

    Posted: 03 May 2021 02:49 PM PDT

    Hi guys, i am pretty much new to programming, i have been involved with competitive programming questions but haven't developed anything. I wanted to make a Bot which joins a Zoom Meeting, logs the Names of all the attendees in a Excel file, along with their joining time. How should i start. I know the basics of Python.

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

    I'm struggling to find a programming path

    Posted: 03 May 2021 07:05 AM PDT

    Hello guys, I recently got into programming because I wanted to do something computer-related and that could help people, bring my ideas to life, etc.

    The problem is that, although I'm trying to learn python right now, I'm not sure if I want to be an app (android) developer or a website developer. I want to get into a field where the possibilities are pretty much infinite and could let me work from home as a freelancer (at least at the beginning) . I think ( idk if it's true ) that web development is more limited and that mobile app programming is harder to get a job as a freelancer, feel free to correct me.

    Also, I don't have a degree if it matters :)

    submitted by /u/Under-The-Fridge
    [link] [comments]

    Related to Graphs

    Posted: 03 May 2021 10:41 AM PDT

    I have this project where I have to store graphs on external memory and access the graphs from fpga, so my question is how to store the weighted directed graph and access it? If someone know how to you can dm me also...

    Thanks

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

    What are virtual environments, and why do I need to use when coding in Python?

    Posted: 03 May 2021 02:17 PM PDT

    I'm sorry if this is something obivous, but I still don't understand what are virtual environments. I've received advice to use different virtual environments when coding in Python, as you can have code developed in different versions of Python on your computer, and a virtual environment should help it.

    What is being created when I create a virtual environment? And why isn't this the default for Python?

    Also, is there a guide to correctly create Venvs? I've tried a few but made a mess

    Thank you!

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

    I have to convert a piece of Python code to C which uses a lot of libraries. How can I do this?

    Posted: 03 May 2021 01:49 PM PDT

    I have a piece of Python code which successfully uses the Roe method for shock tube analysis in fluid dynamics. However, I need to convert it into C, which does not have all the libraries of Python as a lower level language. All I need is for it to give outputs as a list which can then be plotted using Python. The code block is posted below.

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

    I Want To Draw Matrices On The Terminal With Python

    Posted: 03 May 2021 01:26 PM PDT

    Hello people! As some of you may know, Python writes matrices as row vectors on the terminal and this is really problematic if you want to examine some aspects of the matrix (like symmetricity/ the indexes that violate symmetricity). Therefore, I want to draw matrices on the terminal the way that I would draw them on a piece of paper. How can I do this easily?

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

    Is Brackets less popluar than before? If yes then why

    Posted: 03 May 2021 12:56 PM PDT

    I'm on my old pc and I found a copy of Brackets. So I just started using it for WordPress plugin development. On my main machine I use VS Code, Sublime and Intellij. I don't remember why I stopped using Brackets, seems like a fine editor to me.

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

    How do I learn programming languages?

    Posted: 03 May 2021 03:12 AM PDT

    I'm aware of most of the programming languages but I wanna master a specific one (C#) and I want to know if there is a specific method to learn these languages?

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

    If you could make your own Programming Language, what would you name it and what features would you like to adopt?

    Posted: 03 May 2021 04:58 AM PDT

    I'm gonna named it "Crock" because C rocks or perhaps "NuClear" like a new C. Definitely, it will sounds like rock solid C as in Cyclone, Swift or Zig. It will be free and open-source. I'm gonna adapt the concise and readable Golang syntax. It will compile down to machine code of targeted machine architecture. It is embedable and also a system programming. It can transpile to Javascript and ANSI C since there are plenty of C compilers available in different computer architectures. It will also borrow the safeness of Rust and the performant in numerical and technical computing of Julia. It should have REPL like that of Python. It will have all the tooling and batteries included. It will have plenty of free tutoring resources and materials. It should have it's own IDE and GUI builder like that of Visual C# or Delphi. Wooah!! Too much to ask for, isn't it ;)

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

    Twitter API - Official Source Question

    Posted: 03 May 2021 08:17 AM PDT

    For the tweet object from the twitter API, does anyone know if they list what the "Official" sources are?

    do they all start with "Twitter for ..."?

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

    [Python] Bypassing Hyperlinks Reading Through Webpages

    Posted: 03 May 2021 07:44 AM PDT

    Right now I am working on a code that will basically resemble that of a news homepage. I am looking at Yahoo News, COVID-19 section currently. Basically, I am grabbing the headline, date published, and I want to grab the first 3 paragraphs of the news story. Right now I can pretty much grab everything, but anytime I hit code that hyperlinks it skips the rest of the paragraph, including the text that is hyperlinked. What can I change to my code to bypass the hyperlink code and still include the text it is connected to? Here is what I have so far.

    import requests, re yahoo = requests.get('https://news.yahoo.com/coronavirus').text links = re.findall(r'href="([\w\-/\.]+?\.html)"', yahoo) article_links = [] for i in range(len(links)): article = requests.get('https://news.yahoo.com' + links[i]).text article_links.append(article) articles = [] def get_news(): for i in range(len(article_links)): title = re.findall(r'(?<="headline":")([^\"]*)', article_links[i]) print(title) date = re.findall(r'(?<="datePublished":")([^T]*)', article_links[i]) print(date) text = re.findall(r'(?<=><p>)([^\<]*)', article_links[i]) print(text) 

    and here is the link to the current page I am working with. https://news.yahoo.com/india-smashes-global-case-record-133253134.html

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

    Having a .env file point to a parent .env file.

    Posted: 03 May 2021 07:27 AM PDT

    So let's say I have a folder structure

    - main.ts - .env - someproject - frontend - frontend.ts - .env 

    Is there a way to have the lower .env file just read from the parent.env files when I run frontend.ts from its folder?

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

    Which graphics library should I use for basic 2D projects in Python/C++?

    Posted: 03 May 2021 06:34 AM PDT

    I am familiar with Python and PyGame and so now that I am learning C++, I want to use it to make games. I know that there are many graphics libraries like SFML and SDL, but which one should I use?

    I create a lot of 2D games in PyGame and they are pretty simple. My main objective is to find out which graphics library is best for me. For example, OpenGL is just too complex for making simple 2D games. It will take much more time to create the same game in OpenGL than in PyGame because you have to do many more complex things.

    And one more thing that there are also many game engines for C++, so should I consider using them as well? So finally, should I stick with PyGame or should I use a C++ library? If so, then please recommend me a good C++ graphics library that fits my need.

    Thanks

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

    No comments:

    Post a Comment