• Breaking News

    Sunday, April 25, 2021

    I am a UX designer and UI developer but I don't have any idea about databases and hosting stuff. Where do I start? Ask Programming

    I am a UX designer and UI developer but I don't have any idea about databases and hosting stuff. Where do I start? Ask Programming


    I am a UX designer and UI developer but I don't have any idea about databases and hosting stuff. Where do I start?

    Posted: 25 Apr 2021 05:13 PM PDT

    Hi. I am an experienced UX designer and UI developer (all platforms). I have designed and built several websites and apps for work that consumed data via rest APIs. For the web, I would make a package and give it to the deployment teams and they would take care of publishing it.

    Now, I have an idea for a personal web project. I don't know anything beyond UI. It would require me to create a user and collect some data and store it in a database and use that data to match with another user. Something like a dating website. The data is super light and text only.

    I have purchased a domain. But I don't know what to do next.

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

    Can anyone help me do a small edit of an mozzila addon on gitlab

    Posted: 25 Apr 2021 11:59 AM PDT

    Hey ppl, i dont know shit about all of this so i need ur help.

    i have a mozzila addon and ive found the file of it on gitlab. it looks like it can be edited but ive never done such thing.

    All i need to do is change the max value of a botton size from the addon so its not limited at 128px.

    If u can help in any way id appreciate it.

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

    Google Kickstart 2020 Round A - Allocation Help (Java)

    Posted: 25 Apr 2021 09:38 PM PDT

    import java.util.Scanner; import java.util.Arrays; class Allocation{ public static void main(String args[]){ Scanner inInt = new Scanner(System.in); int T = inInt.nextInt(); for(int c=1; c<T+1; c++){ int N=inInt.nextInt(); int B=inInt.nextInt(); int[] A = new int[N]; for(int i=0; i<N; i++){ A[i] = inInt.nextInt(); } System.out.println("Case #"+c+": "+solve(N,B,A)); } } public static int solve(int N, int B, int A[]){ Arrays.sort(A); int cost=0; int numHouses = 0; for(int i=0; i<N; i++){ cost+=A[i]; if(cost<=B){ numHouses++; } else{ return numHouses; } } return numHouses; } } 

    After 27 attempts, I figured out that RE stands for Runtime Error, and now at 29 attempts, I've figured out that I don't really understand what I should be trying to fix. I've tested this program in other IDE's and it worked fine. I've also looked at other people's answers online and they looked just about the same as my answer, so can someone help me understand why Google Kickstart won't accept this code.

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

    C# and Unity Advice

    Posted: 25 Apr 2021 09:21 PM PDT

    Is declaring variables of different data types on the same line not allowed in java?

    Posted: 25 Apr 2021 09:10 PM PDT

    1)so when i write this in java,i get compilation error

    String name,int i,String type; 

    2)but when i write this:-

    String name,type; int i; 

    i am not getting any error.

    Why is this happening?

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

    Java Question

    Posted: 25 Apr 2021 08:12 PM PDT

    I hope I can post this here I'm not a programmer by any means and I had a probably really simple question that I just can't for the life of me figure out. I am currently trying to set up a minecraft server I accidently opened a java file without realizing java was not downloaded on my PC. Downloaded Java redirected that file java made a batch file using this code

    java -Xmx5120M -Xms5120M -jar server.jar nogui

    pause

    The file name for the server is server.jar just like how it is in the code but when I go to launch it I get the error message in the cmd prompt Error: Unable to access jarfile server.jar

    any ideas what to do?

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

    They call it the easiest and fastest to learn sub-branch in software, front-end. Is this true ?

    Posted: 25 Apr 2021 08:11 PM PDT

    [MIPS] How do i calculate the square root of a floating point number?

    Posted: 25 Apr 2021 08:10 PM PDT

    writing a program that takes two points and finds the distance between them, ive done all of the arithmetic besides the last part which would be the last step, finding the square root.

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

    Articles on dynamic and static typing

    Posted: 25 Apr 2021 03:28 PM PDT

    I would like to read (or watch) more about the difference of static and dynamic languages, i was thinking about productivity, safety, implementation details and history of the subject.

    PS: i did not find anything on the topic on google scholar :(

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

    How do I achieve this?

    Posted: 25 Apr 2021 07:06 PM PDT

    Hi, DISCLAIMER: I am not a programmer. I'm looking for a service (paid or not) with which I can access a server and on that server/service I can open multiple browsers (10-15) with hidden/proxied IP addresses. Please assist. Thanks!

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

    Error in launching a Java application

    Posted: 25 Apr 2021 06:24 PM PDT

    I'm working on a Java project with this setup:

    • I write the code with Eclipse on my local (Windows) machine;
    • on my local machine, I compile the code and I generate the "runnable JAR" by using an "ANT script";
    • I copy the "runnable jar" in the remote (Linux) machine (connected via SSH);
    • On remote machine, I launch the "java" command to execute the JAR in "Remote Debugger" mode, by opening a TCP/IP connection;
    • I click on the "Debug" button on Eclispe.

    Now, since I need to work with JSONs, I downloaded on my local machine the `org.json` package (json-20210307.jar) from https://jar-download.com/artifacts/org.json.

    I moved it to my project folder, and I:

    • went to: Run -> Run Configurations... -> Dependencies Tab -> Add JARs... -> Selected the JAR file to be added in "Classpath Entries"
    • Right-clicked on project folder -> Build Path -> Configure Build Path... -> Libraries -> Add JARs... -> Added the JAR file to classpath field.

    Now, if I run the code in my local (Windows) machine, by simply pressing the "Run" button, the code runs well.

    *************************

    Now I need to run the code on my remote machine.

    In order to accomplish this:

    • I copied json-20210307.jar on remote machine;
    • I added json-20210307.jar in ANT script, like this:

    <path id="ProjectName.classpath"> <pathelement location="bin"/> <pathelement location="../../../../../../Program Files/IBM/ILOG/CPLEX_Studio1261/cplex/lib/cplex.jar"/> <pathelement location="JARs/json-20210307.jar"/> </path> 
    • then, after "building" and "runnable-JAR generation" (via the ANT script) on my local machine, I copy the "runnable-JAR" into the remote machine, and I launch the Java Application, on remote machine, by using the "java" command, with the -cp option to include the path of json-20210307.jar in classpath.

    Note:-cp option has two arguments, so I separate them by the ; separator character.

    So, this is how I launch the program (in "Remote Debugger" mode):

    java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:8000 -cp /home/username/Programs/opt/ibm/ILOG/CPLEX_Studio1261/cplex/lib/cplex.jar;/home/username/projects/ProjectName/JARs/json-20210307.jar -Djava.library.path="/home/username/Programs/opt/ibm/ILOG/CPLEX_Studio1261/cplex/bin/x86-64_linux" -jar FileName.jar /home/username/projects/ProjectName/InputFile.txt 

    And this is the error I get:

    -bash: /home/username/projects/ProjectName/JARs/json-20210307.jar: cannot execute binary file: Exec format error

    Which could be the problem?

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

    Super quick question about basic terminology of numbers.

    Posted: 25 Apr 2021 01:43 PM PDT

    The number is 420.69.

    Does this number have two decimals? Does this number have five digits? This number has 3 characters to the left of the decimal place. What are those called? "This number has 3 ____"

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

    Need help finding the right algorithms for complex questions

    Posted: 25 Apr 2021 05:16 PM PDT

    I have participated in a programming contest, I got frustrated by the questions that I passed by, most questions require a lot of knowledge about algorithms and knowing the best one to solve the problem. To make it clearer, this is one question that I solved: https://imgur.com/a/8J21ooE

    My solution took 15 mins to solve the problem by calculating all the possible approaches and then picking the shortest one, because it took 15 mins, of course my solution is rejected. There is a better solution, but I don't know how or what to do. Are there any resources that cover these types of questions that require some algorithms' knowledge? I asked my doctor at university, he dodged me. Thanks for everything in advance.

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

    Looking for Tutor for Android App Dev

    Posted: 25 Apr 2021 04:43 PM PDT

    Hi is anyone familiar with Android App development with Android Studio? I'm looking for a tutor that can help me with the backend calling an API to display images on the frontend.

    Willing to pay as well.

    If anyone has any resources for tutoring sites, I'll appreciate it too!

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

    How to get a colleague to stop "fillabustering" their PR's

    Posted: 25 Apr 2021 07:31 AM PDT

    My team at work currently has an issue with one of our members. This team member has developed a habit of raising pr's of very low quality code that in some cases purposely goes against our standards. We raise comments and concerns on these Pr's quickly with ample time and detail of what rework is need to be acceptable. As commenters we make sure our comments confirm to our work standards and are explicit in what is blocking a pr with a valid reason and help for how to fix it.

    For some reason this team member has decided that he can ignore all of our comments or close them with with no follow up or with links to completly irrelevant blog posts by random authors. He out right refuses to change to make any chances to his code and will make up any excuse he can to not make changes. His code is so bad some of us have used it as training examples of what not to do. All of this is unacceptable and we have raised this with the head of development and the business, who claimed to have "had a word" with him. However he has recently learned that if he essentially filler busters the pr, I.e he can run out the clock (doing none of the required remdial work needed) as the business need us to commit his work in order to meet deadlines for clients.

    He has done this numerous times and no matter what we do or say to him (as a team) he just doesn't care. The business and my boss (head of dev) seem to have no appetite to do anything, even though it can be proved that he costs the business twice his salary in remedial work (he is well paid for a mid)

    Has anyone else had this issue with a colleague? If so how did you resolve it? At this point I am just sick of the constant fight just to get him to the bear minimum standard we accept of an apprentice, let alone a mid.

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

    Tend to all patches or work on minor and patches in parallel?

    Posted: 25 Apr 2021 01:56 PM PDT

    Working on a web application for high school/post secondary students, with my hard deadline being September, the start of the new school year. I have a bunch of features I want to have launched and battle tested by then, so lately I've been obsessed with finding ways to decrease my release cycle and increase my velocity.

    For now I've been working with a tight beta testing group, getting feedback on existing bugs and current quality of the app. So now I have a backlog full of bugs to squash and features to develop before my projected launch date; in your own work, do you always work on features and gradually handle patches as time goes on, or does development of new features stop and minor versions halt when bugs arise? My question is assuming the bug isn't crashing or severely hindering functionality, and Agile and semver are at least roughly used.

    I don't have experience working in a dev job, so everything I've learned so far is self-taught via the internet; so I'm curious about how experienced devs manage their workflow.

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

    I need help with a Project, Been Trying to Cross compile Rust Project for Weeks now

    Posted: 25 Apr 2021 12:42 PM PDT

    So Specific questions only are allowed, so I will keep this concise as possible. This is a bit of advanced dev question and I get if no one wants to spend the time to help me fix it, but I am at a loss for what to do right now.

    I am compiling the Golem Client to run natively on Pi, Golem is a decentralized marketplace allowing you to rent out compute power for a native crypto token on the Ethereum network. My hope is if I can get this running in Pi, it'd be the perfect place given the Pis power efficiency and scalability using clusters.

    This project is built up of 3 main partsgolemfactory/yagna: An open platform and marketplace for distributed computations (github.com)

    golemfactory/ya-runtime-wasi (github.com)

    both of those I've successfully compiled for aarch64 and have those binaries. My issue comes with this one -golemfactory/ya-runtime-vm: Golem runtime vm is implementation of docker-like runtime enviroment (github.com)

    Compiling for Rust using target aarch64-unknown-linux-gnu with another compiler for the c parts of the project. I think its gcc-aarch64-linux-gnu and if not its something similar. Within the project though the makefile found in ya-runtime-vm/runtime/init-container/Makefile will not compile consistently running into the issue 'unpacked_kernel/boot/vmlinuz-virt': No such file or directory was hoping that by chance someone here may be able to help me, I am following the compilation instructions found in the readme.

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

    Is there a website like JSPerf but for detecting Big O Notation (JavaScript)?

    Posted: 25 Apr 2021 11:24 AM PDT

    When jsPerf actually worked I would just paste 2 pieces of JavaScript and put them head to head to see which one executes faster.

    Is there a similar website for Big O where you can just paste some JavaScript and it will tell you it's time and space complexity in a simple to use interface?

    Obviously I can look through the code to tell myself but when you're practicing lots of DSA something like this would be pretty convenient. Plus it would be good to double check my own understanding of the complexity as well..

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

    Implementing a Reddit/Hacker News algorithm

    Posted: 25 Apr 2021 08:59 AM PDT

    Hello all!

    I've been working on an aggregator like Reddit or HN. I'm trying to figure out how to present the main page with posts. I have found articles explaining the calculation of both sites, using upvotes, age, interactions and a decay variable (gravity).

    But how do you actually implement it on the database entries? If each post is an entry and it has a score field - I would need to run the calculation on every post on the database. It seems like it would be a huge processor drain over time. In the thousands it would work, but with over a million or ten million posts? Or would I segregate posts via filtering - but wouldn't running a filter also be taxing at scale. I could also create another model and move archived posts there (after a week or so) and then append them to the results page.

    And a follow-up question for the timing of the calculation. Would it be best to run a cron job every minute to refresh scores or would it be based on some sort of interactivity. Though it seems the latter option could lead to weird stranded results being frozen if not interacted with.

    Pretty lost and could use some advice.

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

    Declaration or statement required expected

    Posted: 25 Apr 2021 07:53 AM PDT

    my code is basically a get api and it is giving error on default statement, I think it's because of brackets misplacement.

    require("dotenv").config();
    exports.foodFunction = async(req, res) => {
    const { MongoClient } = require("mongodb");
    const CONNECTION_URI = process.env.MONGODB_URI;
    const client = new MongoClient(CONNECTION_URI, {
    useNewUrlParser: true,
    });
    // initate a connection to the deployed mongodb cluster
    client.connect((err) => {
    if (err) {
    res
    .status(500)
    .send({ status: "MONGODB CONNECTION REFUSED", error: err });
    }
    const collection = client.db(process.env.DATABASE_NAME).collection("Meals");
    const { displayName } = req.body.queryResult.intent;
    const result = [];
    switch (displayName) {
    case "list-available-meals":
    const data = collection.find({});
    const meals = [{
    text: {
    text: [
    ],
    },
    }, ];
    result.push(
    data.forEach((item) => {
    const {
    name,
    description,
    price,
    availableUnits,
    image_uri,
    } = item;
    const card = {
    card: {
    title: \${name} at $${price}`, subtitle: description, imageUri: imageuri, }, }; meals.push(card); }) ); return Promise.all(result) .then(() => { const response = { fulfillmentMessages: meals, }; res.status(200).json(response); }) .catch((e) => res.status(400).send({ error: e })); case "request-meal": const { food } = req.body.queryResult.parameters; collection.findOne({ name: food }, (err, data) => { if (err) { res.status(400).send({ error: err }); } const { name, price, description, image_uri } = data; const singleCard = [{ text: { text: [`The ${name} is currently priced at $${price}.`], }, }, { card: { title: `${name} at $${price}`, subtitle: description, imageUri: image_uri, buttons: [{ text: "Pay For Meal", postback: "htts://google.com", }, ], }, }, ]; res.status(200).json(singleCard); default: break; } client.close(); }); };`

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

    How to add a new (different language) integrated terminal in Visual Studio Code?

    Posted: 25 Apr 2021 05:56 AM PDT

    I'm brand new to coding. I know a good amount of PowerShell and scripting, but now I'm trying to write a JavaScript program. I'm new to JavaScript and to Visual Studio, so I don't know my way around the program. So far, I've only used PowerShell in VS Code so the integrated terminal is a PowerShell prompt.

    I created and opened a JavaScript (.js) file and wrote some code, but I don't know how to run it? The terminal is still PowerShell and no matter what I do, I can't figure out how to change it to JavaScript. I've done some Googling and can't find anything that explains how to do it.

    I found this, but as far as I can tell, it just says how to open a new (same language) terminal. I can open terminal after terminal, but it won't let me choose a different language.

    How do I add a JavaScript terminal?

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

    Code review:

    Posted: 25 Apr 2021 02:28 AM PDT

    can anyone tell me what is wrong with the following code snippet.the code is not running.

    it is abt finding amount compounded annually**(amt=p(1+r)^n)** with the help of recursion.

    void inv() { while(true) { System.out.println("enter principal,rate and years"); Scanner sc=new Scanner(System.in); p=sc.nextFloat(); r=sc.nextInt(); n=sc.nextInt(); v=this.compute(p,r,n); System.out.println("amount"+v); System.out.println("do you want to continue"); System.out.println("press no to exit"); cont=sc.next(); if(cont.equals("no")) break; } } float compute(float p,int r,int n) { int a; float v; if(a==n) return v; else { v=p*(1+r); p=v; a++; return compute(p,r,n);} } } 

    also tell me how can i improve the code?

    p.s. pls forgive me if the code is awful😂😂😂.i am just a beginner

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

    No comments:

    Post a Comment