• Breaking News

    Sunday, June 20, 2021

    How to use software that requires to be installed from a CD without actually installing them? Ask Programming

    How to use software that requires to be installed from a CD without actually installing them? Ask Programming


    How to use software that requires to be installed from a CD without actually installing them?

    Posted: 20 Jun 2021 07:55 PM PDT

    Hello.

    Recently my new gaming laptop has arrived and it doesn't contain a disk reader. On the other hand, my old laptop does contain and I was able to install this software. However, I tried transferring this software using a USB, but when I tried running it on the new laptop, it says:

    " This program installation has failed. Please un-install then re-install the software"

    I assumed it needs to be installed from the disk directly into the laptop, but as I mentioned, I don't own a disk reader.

    Keep in mind that the software is installed on my old laptop and my brother's laptop as well.

    Is there any way I can run the software without actually installing it?

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

    Efficient method to write to fairly large json file in nodejs

    Posted: 20 Jun 2021 12:15 PM PDT

    there is an object array of objects that is fairly large. after JSON.stringify and writing to a file it is about 50MB in size

    example fs.writeFile(`${DATA_PATH}/file.json`, JSON.stringify(objArray, 0, 4), 'utf8', (err)=>{ if(err) console.log(err) else console.log('File saved'); })

    if I update an object in the json array, how do I better write and replace that object in the JSON file other than saving the entire json collection to the file every time?
    also do i reload (require('file.json')) the file everytime it changed? is it possible without restarting the server or nodemon?

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

    What's the difference between JS and TS? Other than strictly typed.

    Posted: 20 Jun 2021 09:13 PM PDT

    I'm always fascinated by TS. I developed a few projects in React with TS. But nothing changed other than state and props became strictly typed. And a few lines of code changed, I had to pass some required params, cast them, and few tweaks, but no major changes. I was convinced I'm done.

    But someone recently told me no, there is more to TS? Can you guys tell me more? And pros and cons of moving to TS from JS.

    I must say that making my project strictly typed helped me a lot, detecting the source of the bug and managing and scaling (that I didn't do, someone else did).

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

    I'm fairly new at HTML and I'm trying to modify some code to include a search bar but I can't get it to define the input?

    Posted: 20 Jun 2021 01:05 PM PDT

    I have been using the code that I found on w3schools:

    https://www.w3schools.com/howto/howto_js_portfolio_filter.asp

    This has been a great way for me to start off experimenting. I've been trying to replace the buttons with a search bar instead.

    Where it for instance says:

    <button class="btn" onclick="filterSelection('nature')"> Nature</button> 

    I would like to have a search bar where I type "nature" and then get the exact same filtering result. Something like this:

    <input type="search" onkeyup="filterSelection(searchInput)"> 

    And then for the Javascript part I tried to define a variable something like this:

    searchInput = document.querySelector('input[type="search"]'); 

    But I will admit Javascript is a bit too high level for me at the moment, but I'm trying to learn. My idea was basically that as you type in the search bar, the input is stored in "searchInput" and then in the html part, it will then be used as the term for the filtering. I noticed by hardcoding what I want to type such as:

    <input type="search" onkeyup="filterSelection('nature')"> 

    It works as intended by taking advantage of the filterSelection function from the website. I just want it to be more dynamic with the input of the search bar instead.

    I'm not sure though if I'm a little way over my head or if it's something small I'm missing...

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

    My Mac terminal prints ‘?’ Instead of unusual achii characters because it does not have the proper font installed. How do I install the font I need?

    Posted: 20 Jun 2021 08:11 PM PDT

    I'm trying to print achii character 177 to the terminal but cannot.

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

    In python’s “curses,” every time I try to use window.inch([3,3]) it says “inch requires 0 to 2 arguments.” Isn’t that one argument?

    Posted: 20 Jun 2021 07:47 PM PDT

    I'm trying to print the character on the screen at location [3,3] utilizing chr(window.inch([y,x])).

    I haven't been able to find a solution anywhere online

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

    Feature/construct not implemented in Java, C++, PHP or cumbersome

    Posted: 20 Jun 2021 03:47 PM PDT

    Hello! A CompSci student and I need to make a presentation about a feature or construct that is not implemented in Java, C++, PHP or if it is, it is cumbersome to use.

    I'm having troubles finding any so could you let me know what would you recommend as my topic of choice?

    Highly appreciated!

    submitted by /u/Individual-Ad-5023
    [link] [comments]

    can't download Netcat because it's blocked by windows defender? Is it a bad program?

    Posted: 20 Jun 2021 06:07 PM PDT

    I am doing something wrong while I memoize the solution using dictionaries, in Python3 for the coin change problem.

    Posted: 20 Jun 2021 08:33 AM PDT

    I have got the algorithm right, the recursive solution to the program is working just fine.

    def coinChange(coins :list, target :int, dp :dict[int, int]): if target in dp: return dp[target] if target == 0: return [] if target < 0: return None bestans = None for c in coins: output = coinChange(coins, target - c, dp) if output is not None: output.append(c) if bestans is None: bestans = output else: if len(output) < len(bestans): bestans = output print('bestans outside the loop for the target {} is {}'.format(target, bestans)) dp[target] = bestans return bestans x = [1, 2, 3, 4] target = 6 dp = {} print(coinChange(x, target, dp)) print(dp) 

    I am running the print statement just before I memoize this to check what is being added to the dictionary, it is printing the right things, I am sharing the output here. But what is being saved in the dictionary is different.

    bestans outside the loop for the target 1 is [1] bestans outside the loop for the target 2 is [2] bestans outside the loop for the target 3 is [3] bestans outside the loop for the target 4 is [4] bestans outside the loop for the target 5 is [4, 1] bestans outside the loop for the target 6 is [4, 1, 1, 2] [4, 1, 1, 2] {1: [1, 1, 2, 3, 4], 2: [2, 1, 2, 3, 4], 3: [3, 1, 2, 3], 4: [4, 1, 1, 2], 5: [4, 1, 1, 2], 6: [4, 1, 1, 2]} 

    I have a feeling I am making some mistake with the dictionary. Thanks for the help in advance.

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

    Matrix multiplication for 3D graphics problem

    Posted: 20 Jun 2021 03:43 PM PDT

    Hi everyone,

    this may not be very programming-related, but I couldn't think of a better place to ask this question. I need to create a transform matrix that takes into account scaling, rotation and translation. Right now I am creating it like this: create and identity matrix, multiply it by a "scaling matrix", multiply it by the three rotation matrices (along x, y, z), multiply it by a "translation matrix". The issue I am facing is that the order in wich those transformations happen isn't the way I am expecting it to be (scale first, then rotate, then translate). The model seems to be rotated first and then scaled; also the translation values get altered after the last multiplication.

    Matrix and vector multiplication is implemented in the way described here: https://open.gl/transformations

    One other thing that is really confusing is the location of the translation values in the matrix. Some put them in the right-most column of the matrix, others put them in the bottom row. What's the difference?

    I am sorry if this isn't clear enough, but it's hard to ask a good question when you don't really understand what is going on :)

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

    Best way to automate tedious and repetitive tasks at work?

    Posted: 20 Jun 2021 03:41 PM PDT

    For example, releasing a new software version takes many steps that I want to autome. Some of them may require using a browser because there's no API available. I've thought about using selenium but not really sure.

    Any ideas?

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

    2d array

    Posted: 20 Jun 2021 03:28 PM PDT

     #include <stdio.h> int main (void) { char checker_board [30] [30]; int result = 1; int test_case = 0; scanf("%d\n", &test_case); for (int i = 0; i < test_case; i++ ) { int num_white = 0, num_black = 0; int count_w_row = 0, count_b_row = 0; for (int j = 0; j < test_case; j++) { scanf("%c", &checker_board[i][j]); if (checker_board [i][j] == 'W' ) { num_white++; count_w_row++; count_b_row = 0; } else if (checker_board[i][j] == 'B') { num_black++; count_b_row++; count_w_row = 0; } else if (checker_board[i][j] == '\n') { } printf("count_w_row %d", count_w_row); printf("count_b_row %d", count_b_row); if (count_w_row >= 3 || count_b_row >= 3) { result = 0; } printf("%d\n", result); } printf("total_b_row %d\n", num_black); printf("total_w_row %d\n", num_white); if (num_white != num_black){ result = 0; } printf("\n"); } } 

    in that i got some problem with that 2D array. when i insert those W's & B's linear then i got no problem, but when i insert '\n', then i got some problem with code, i count some garbage values. i am wondering how can i insert 4*4 chars in that program?

    submitted by /u/rahli-dati
    [link] [comments]

    Bluetooth Speaker with a song queue from different devices.

    Posted: 20 Jun 2021 01:34 PM PDT

    Hello, first of all 2 disclaimers:

    1st. English is not my first language. If some of the things I write are confusing or just wrong, sorry. I'll try to answer questions if there are any.

    2nd. I don't know alot about coding and stuff, so I don't really know where to post this. If I posted this in a wrong subreddit pls let me know and I'll delete it.

    So, recently I've been at the river with my friends. We often listen to music on our Bluetooth speaker while we're swimming. That was the moment where I wondered if you could have a Bluetooth speaker where multiple devices could connect and put their songs into a playlist for the speaker. I know that i can connect multiple devices to my speaker, but when someone wants to play a song its a little choppy and it doesn't flow into the next song as nicely as a playlist could.

    So to summarize, im asking if it's possible to have like an app where everyone who's connected to the Bluetooth speaker could queue up their songs and the speaker would then choose which device it needs to playback from.

    Thank you all in advance, im always happy to answer questions and explain if some things are confusing.

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

    How come major companies with top developers put out unfinished or mediocre products?

    Posted: 20 Jun 2021 11:56 AM PDT

    I'm a new programmer, if you know why, could you explain why this is? I always had this question on my mind and I stumbled upon a Microsoft thread regarding how messy Windows 10 is and how Microsoft hasn't put out the updates it promised. How is a trillion dollar company like this? I stumble upon so many things even in major companies, a recent one is the updated Spotify desktop app where they changed the UI, and now album arts are lower resolution for some reason. This is just mind-blowing to me. I'm a beginner and I could've fixed this already. It's been a month and it's still there, it's not a feature, it's a very obvious bug!!

    These apps feel like they've been written by complete beginners. How come these companies aren't hiring good programmers? I'm not talking about underdelivering but doing mediocre work when you have the greatest devs under your belt.

    Am I missing something? It's really bugging me.

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

    Starting an education in August, looking for hardware recommendations

    Posted: 20 Jun 2021 10:06 AM PDT

    I hope this is allowed, if not, terribly sorry!

    My question is as follows: I am a 24yr old starting an ICT (software enigneer related, not hardware) major. Looking for a good laptop. I was already looking at MSI or Asus, but I don't know what it needs and what drivers would be best. Can anyone inform me what would be best to buy? Maybe some product recommendations in the direction I was looking at?

    Thanks so much in advance!

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

    Merge sort visualisation using recursion and Promises

    Posted: 20 Jun 2021 08:40 AM PDT

    Hi everyone,

    I've written a merge sort visualisation in p5.js which shows the steps of merge sort. This works fine as a sequential visualisation, but I'd quite like to show this as a true representation, where you can see each part of the array being sorted at the same time (with multiple sections being visualised sorting at the same time, to truly reflect the recursion). The code itself is relatively simple:

     // Split the array recursively let mid = Math.floor((right + left) / 2); if (right - left < 1) { return; } // My attempt to visualise this properly await Promise.all([mergeSortSlice(array, left, mid), mergeSortSlice(array, mid + 1, right)]); // THIS WORKS, but only for sequential sorting // await mergeSortSlice(array, left, mid); // await mergeSortSlice(array, mid + 1, right) // Putting sleep(200) here also works, but doesn't show the steps of the sort as they are happening, just the result of each stage of the sort. leftCounter = 0; rightCounter = 0; l = left; r = mid + 1; valuesStartIndex = l; let leftArray = array.slice(left, r); let rightArray = array.slice(r, right + 1); while (rightCounter < rightArray.length && leftCounter < leftArray.length) { if (leftArray[leftCounter] < rightArray[rightCounter]) { array.splice(l + rightCounter, 1); array.splice(valuesStartIndex, 0, leftArray[leftCounter]); l++; leftCounter++; valuesStartIndex++; await sleep(200); } else { array.splice(r, 1); array.splice(valuesStartIndex, 0, rightArray[rightCounter]); r++; rightCounter++; valuesStartIndex++; await sleep(200); } } 

    The problem with using

    Promise.all 

    is that the split parts of the array are getting mixed up, I believe due to the recursion? This is resulting in the array not getting sorted properly.

    My timeout function:

    async function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } 

    The setup function and draw loop:

    let values = [50, 10, 80, 56, 30, 25, 15] function setup() { createCanvas(600, 190); frameRate(60); mergeSort(values) } function draw() { rectWidth = 10; background(23); stroke(0); fill(255); for (let i = 0; i < values.length; i++) { rect(i * rectWidth, height - values[i], rectWidth, values[i]); } } 

    The combination of async functions and recursion makes it difficult for me to come up with a solution for this. Any help/advice would be much appreciated, as I've been stuck on this for hours now! I'd really like to avoid having to rewrite my algorithm completely, if at all possible.

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

    Resource for multi domain DB design

    Posted: 20 Jun 2021 08:30 AM PDT

    I am trying to accumulate more knowledge on DB design and the best practices.

    Is there any good resource for designing e-commerce platform, school management, etc.

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

    Can I separate out the composed schema and reference it in OpenAPI?

    Posted: 20 Jun 2021 10:58 AM PDT

    Looking for a file manager api that tells me list of files changed

    Posted: 20 Jun 2021 07:03 AM PDT

    I cannot find a good file manager that monitors a directory recursively i set

    it needs to return the list of files minus subdirectories, and also the filepaths and filenames which were moved, created, removed, renamed at any time

    the option to run as a daemon process is needed, so it doesnt require the application to be running to continue monitoring the filesystem directory. no frontend required

    related fs.watch or https://github.com/paulmillr/chokidar

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

    Which operating system would be more suitable for programming?

    Posted: 20 Jun 2021 05:38 AM PDT

    Hey,

    I'm about to start university and so I want to get a laptop.

    Originally I was going to buy a MacBook Pro or a MacBook Air, but since part of my studies will be programming-heavy and I wanted to learn programming, a friend recommended that I forgo a macOS system and buy a Windows laptop.

    In our conversation, my friend mentioned something about an ARM architecture, which apparently refers to computer processors, being built into new MacBooks.

    Unfortunately, I am not familiar with technology and my horizon is very limited. So I wanted to ask in this thread if anyone can give me some advice regarding my plan to buy a MacBook for studying and explain what this ARM architecture is all about. What would be the limitations in programming due to this architecture?

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

    Server sizing LAMP

    Posted: 20 Jun 2021 05:33 AM PDT

    Hi all I'm writing a LAMP mysql PHP app. I'm wondering how you estimate performance accurately. I'll have up to 700 users on a system. I'm trying to determine how big a VM or physical server I will need . What recommended tools, docs or resources are out there to do this estimation. Thanks P

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

    letter chooser thing

    Posted: 20 Jun 2021 05:08 AM PDT

    how can i get rid of that letter chooser thing on the "i"?

    https://imgur.com/a/DTxdX9D

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

    C# Simple MVC Controller Interfaces Question

    Posted: 20 Jun 2021 03:36 AM PDT

    Hi

    I have a very simple Pacman Game in C#. I have a Splash Windows Form Class and a Game Windows Form Class. Additional to that, I have a Controller Class.

    The Controller Class accepts the Splash and Game Form as parameter in the Constructor. I made a View Interface which the Splash and Game Form inherit from. This works great, but has the disadvantage that e.g. the Splash Form now needs to implement methods which the Splash Form doesn't need.

    Is there a better method for that?

    To express my Problem, I e.g. have a `SetSplashTimer` Method in the Interface which just the Game Form needs:

     public interface IView { void SetSplashTimer(bool status); } 

    In the Game Form I have implemented the Method and added some Code:

     public void SetSplashTimer(bool status) { tmrSplash.Enabled = status; } 

    But in the Splash Form I'm also required to implement it even though I don't need it there:

     public void SetSplashTimer(bool status) { throw new NotImplementedException(); } 
    submitted by /u/berkutta
    [link] [comments]

    Mixed hardware/software systems

    Posted: 20 Jun 2021 02:59 AM PDT

    Do you guys know any development environments available for co-desing meaning where u can program the hardware and software at the same time?

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

    No comments:

    Post a Comment