• Breaking News

    Friday, January 1, 2021

    Hi, I am a female software engineer (fresher) and I am terrfified to code. Ask Programming

    Hi, I am a female software engineer (fresher) and I am terrfified to code. Ask Programming


    Hi, I am a female software engineer (fresher) and I am terrfified to code.

    Posted: 01 Jan 2021 07:58 PM PST

    I don't know if this is the right sub to ask this question, but programming is usually a male dominated field in my community and I struggle to be confident in my works. I am afraid to ask questions, and so abandon the whole learning curve in fear of lookin and sounding stupid. But I do want to advance in my career.

    Honestly, I know the answer is to just stove away these silly emotions and start coding, because it's 2021 and blawe have moved on and nobody cares and blah blah blah, but can anyone relate to this?

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

    Advice for starting a job with little management (I want the advice)

    Posted: 01 Jan 2021 04:13 PM PST

    So I am starting a co-op term for a local company this week. I am a back end developer and from the sounds of it will be working on a very small team. I will be working alone for the most part, discussing in general what we want to do, but provided the opportunity to implement a lot of features. This is a change from other co-op positions I have had where I would be told to add a small part of a system, or fix someone's bugs... I actually get to write a decent amount of code!

    Now my questions is if anyone has worked in an environment like this or if they are industry veterans that can provide some pointers in avoiding making too many mistakes. I am definitely nervous as I have been pretty micro managed (former internship was for the feds) in previous work and really just want some advice and pointers!

    Thanks.

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

    Disabled Programmer Blog?

    Posted: 01 Jan 2021 07:55 PM PST

    Hello everyone! I'm a legally blind woman learning how to code, currently working my way through college towards an computer science degree. For a while now, I have been considering starting a blog to share the code I've written and maybe some of my experiences as a disabled female in this field. Would anyone be interested in reading/following something like that?

    I am trying to see if there would be interest in me starting a blog like this as well as advice on where to post and what content to post as I have never tried blogging before

    Thank you! :)

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

    DAE hate generating new GUIDs/UUIDs because it feels like you're "wasting" some non-renewable resource?

    Posted: 01 Jan 2021 06:46 PM PST

    Like, there are only so many GUIDs out there, and a smaller subset of those are available to any given machine generating them. So I feel like generating a new GUID is wasteful because you might eventually run out and have to start reusing them, and that could be problematic! 😛

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

    What are the documentation requirements when writing a new piece of database software?

    Posted: 01 Jan 2021 12:29 PM PST

    I am part of a team helping to design a new piece of database software for a small charity. The charity provides support to and encourages adherence among patients undergoing difficult long-term medical treatment.

    Based on meetings so far, the charity wants the software to serve as a registry of all patients, visit information, and drug compliance figures, with the ability to export data for basic statistical analysis.

    I have been asked to list all documentation requirements (e.g. user documentation and system documentation) for this new software, indicating whether it is internal or external and its intended audience. I have also been asked to include any third-party guides, user guides, etc.

    Is there a formalised list of required documentation that I should include?

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

    How to save uint32_t mask as a variable to call in the main function?

    Posted: 01 Jan 2021 10:01 PM PST

    This void inotifyFunc() contains one variable as an argument that is char *path. I want to add another variable also that should contain the address of uint32_t mask that is basically ENOENT, IN_CREATE, IN_DELETE, etc which is present in inotify_add_watch() But I don't know how to save uint32_t mask as a variable.

    My main goal is to call this function in the main function by writing a path, and one command(IN_CREATE, IN_DELETE, etc) at a time that I should assign to the path.

    I hope you understand my question.

    void inotifyFunc(char *path){ monitor.fd = inotify_init(); if(fcntl(monitor.fd, F_SETFL, O_NONBLOCK)){ perror("inotify not initialized: "); exit(0); } monitor.wd = inotify_add_watch(monitor.fd, path, ENOENT); if(monitor.wd < 0){ perror("Sorry"); exit(1); } else{ printf("Location '%s' is being monitored\n\n", path); } } 
    submitted by /u/ibilalkayy
    [link] [comments]

    Why does my queue program always print Error!?

    Posted: 01 Jan 2021 09:39 PM PST

    #include<stdio.h> #include<stdlib.h> typedef struct queue{ int value; struct queue* prev; }queue; queue* front=NULL, *back=NULL; void inqueue(int value){ queue* temp=malloc(sizeof(queue)); temp->value=value; temp->prev=back; back=temp; if(front==NULL){ front=back; } } int dequeue(){ if(front==NULL){ printf("Error"); return 0; } queue* temp=back; int i=front->value; while(temp->prev!=front&&temp!=NULL){ temp=temp->prev; } if(temp==NULL){ back=NULL; free(front); front=NULL; return i; } front=temp; temp=temp->prev; free(temp); return i; } int main(){ inqueue(2); printf("%d",dequeue()); } 
    submitted by /u/JacksonSteel
    [link] [comments]

    What backend infra is needed to support voice chat?

    Posted: 01 Jan 2021 11:33 AM PST

    If you were to build to support audio chat from any number of people, like Clubhouse or Discord's voice chat, what would you consider for the backend?

    It would be realtime only, no need to store it!

    Thank you in advance and happy new year!

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

    Deploying a server side website

    Posted: 01 Jan 2021 07:46 AM PST

    This is my first time deploying a website connected to server side and i don't know how to do it. My website includes php files connected to localhost, i tried deploying it the way i usually deploy a simple client side website but the php files doesn't work. So how do i do it? lead me reddit senseis

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

    What is the best way to position elements together?

    Posted: 01 Jan 2021 04:37 PM PST

    I'm making my first website that is somewhat similar to the style of discord's website. If you scroll down a bit, they have illustrations positioned next to their texts. I tried to recreate this using absolute positioning but then the page isn't responsive. What methods/techniques could I use while creating my page?

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

    Simple Perl/regex question

    Posted: 01 Jan 2021 02:44 PM PST

    I'm trying to modify a Perl script that controls server fans for a newer model AMD motherboard and I'm stuck on a pretty simple thing - sanitizing the output of the CPU temp reading for further use in the script.

    What I'm trying to do is use lm-sensors since that has the most accurate output for AMD cpus. This is what the sensors command outputs from the shell:

     sensors k10temp-pci-00c3 Adapter: PCI adapter Tdie: +48.4°C (high = +70.0°C) Tctl: +48.4°C 

    I want to use Tctl since that is the temp used for fan control if I'm not mistaken.

    What I need to do in the script is have it read Tctl and return the two-digit numeric value as $cpu_temp i.e. in the above it should return $cpu_temp = 48 to the script

    Here's an example of my sub - obviously my regex skills are lacking because I cannot wrap my head around what seems to be a simple thing:

    # read the Sensors value for CPU Temp to grab overall CPU temperature sub get_cpu_temp_ipmi { my $cpu_temp; my @cmd = ($sensorstool); foreach (run_command(@cmd)) { if (/^tctl:\s*(\d+)\D/i) { $cpu_temp = $1; } } dprint( 1, "CPU Temp: $cpu_temp" ); $last_cpu_temp = $cpu_temp; # note, this hasn't been cleaned. return $cpu_temp; } 

    I've tried a few different regex variations to sanitize the output but frustratingly stuck. Can anyone point out what would work?

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

    How do I get a clear kickstart in GitHub?

    Posted: 01 Jan 2021 07:59 PM PST

    I have gone in loops many times and gathered bits and pieces here and there, not satisfied though. Any resources that helped u learn?

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

    Why does my program end without letting me input commands?

    Posted: 01 Jan 2021 05:36 PM PST

    https://ibb.co/31Xpbvd

    The problem is to parse a series of commands that instruct a robot arm on how to manipulate blocks that lie on a flat table. Initially, there are n blocks on the table (numbered from 0 to n − 1) with block bi adjacent to block bi+1 for all 0 ≤ i < n − 1 as shown in the diagram below:

    https://ibb.co/WpWQBYT

    The valid commands for the robot arm that manipulates blocks are:

    • move a onto b

    where a and b are block numbers, puts block a onto block b after returning any blocks that are stacked on top of blocks a and b to their initial positions.

    • move a over b

    puts block a onto the top of the stack containing block b, after returning any blocks that are stacked on top of block a to their initial positions.

    • pile a onto b

    moves the pile of blocks consisting of block a, and any blocks that are stacked above block a, onto block b. All blocks on top of block b are moved to their initial positions prior to the pile taking place. The blocks stacked above block a retain their order when moved.

    • pile a over b

    puts the pile of blocks consisting of block a, and any blocks that are stacked above block a, onto the top of the stack containing block b. The blocks stacked above block a retain their original order when moved.

    • quit

    terminates manipulations in the block world. Any command in which a = b or in which a and b are in the same stack of blocks is an illegal command. All illegal commands should be ignored and should have no effect on the configuration of blocks.

    Input:

    https://ibb.co/pWJ9c7Q

    Output:

    https://ibb.co/Nt03mm3

    [I only type the code of the first command for now.]

    my code:

    #include<stdio.h> #include<string.h> void back(int arr[]){ } int main(){ int noi=0; printf("please input n:"); int n; scanf(" %d",&n); int arr[n][n]; //this for storing their position int i,j; for(i=0;i<n;i++){ for(j=0;j<n;j++){ arr[i][j]=-1; } arr[i][0]=i; } char str1[5],str2[5],cmd[20];//cmd is the complete line which will be spilt int s,d;//source & destination char st[2],dt[2];//char variable of int s and d char* tk;//a pointer for strtok while(1){ s=0; d=0; while(!(s>=1&&s<n&&d>=1&&d<n)){ fgets(cmd,sizeof(cmd),stdin); tk=strtok(cmd," "); if(strcmp(tk,"quit")==0){ break; }else{ strcpy(str1,tk); tk=strtok(NULL," "); strcpy(st,tk); s=atoi(st); tk=strtok(NULL," "); strcpy(str2,tk); tk=strtok(NULL," "); strcpy(dt,tk); d=atoi(dt); } } //finally doing the commands if(strcmp(str1,"move")==0){ if(strcmp(str2,"onto")==0){ //empty s for(i=0;i<n&&arr[s][i]!=-1;i++){ arr[arr[s][i]][0]=arr[s][i]; arr[s][i]=-1; } //empty d for(i=0;i<n&&arr[d][i]!=-1;i++){ arr[arr[d][i]][0]=arr[d][i]; arr[d][i]=-1; } //now move s to d i=1; while(arr[d][i]!=-1){ i++; } arr[d][i]=arr[s][0]; arr[s][0]=-1; }else if(strcmp(str2,"over")==0){ }else{ continue; } }else if(strcmp(str2,"pile")==0){ }else{ continue; } } //print results for(i=0;i<n;i++){ printf("%d:",i); for(j=0;j<n&&arr[i][j]!=-1;j++){ printf("%d ",arr[i][j]); } printf("\n"); } } 
    submitted by /u/JacksonSteel
    [link] [comments]

    Has anyone else had passively abusive experiences on Stackoverflow?

    Posted: 01 Jan 2021 05:09 PM PST

    I know this is probably a recurring topic, so apologies in advance, throwaway account.

    TLDR: ask a question, get shut down, no reasons given. Ask for clarity and help, get shut down, no help given. Want to delete my posts, mods decide even my crap answers must be taken hostage by undeleting them, after starting a meta discussion about what rights users have to delete their posts. What kind of system is this? Is this kind of behaviour common?

    So... I'm a beginner programmer with a year of intense study and yesterday I made the mistake of asking for information on Stack Overflow.

    I asked, "Is there a consensus about SVG implementation?" I write details of the research online. I specified at the end "Is there a standardised way to implement them?"

    Today I found the question closed because it was "opinion-based", and the FAQ states to ask on the meta if I don't understand why.

    I go to the meta, ask why its considered opinion when it's a yes/no question. Of course, I get downvoted on that AND my previous question. Mods telling me I asked for the best way to implement SVGs. No, I didn't! I asked if there is a consensus.

    They link to two "duplicate" questions to explain: one irrelevant, the other an unclear discussion about "where is the line with yes/no questions?". In that, nobody clearly agrees on anything. Even the accepted answer stated my question should have been edited for resubmission. I say this in comments, asking for clarification from the person who posted the link, and they delete their own comment (or another mod does) but left the "duplicate" tag...

    How is an average user even meant to find these obtuse additional opinionated rulesets hidden away? How can you tell they're even rules? That's not stated anywhere, they're undefined and subjective. How are you meant to interpret that?

    All this time I'm simply asking for clarification and nobody is giving it. Everyone is more concerned with saying "your wrong" than explaining why, or how. I was sent by the FAQ to the meta for HELP! What the hell is this?

    I finally get an answer from a user that says "Ask like this". I thank them because the methodology of asking questions is clear, but It was so pragmatic that it wasn't the question I asked. The user states they recognise that, but it's the only way to ask a question here. Wtf?

    I decide I don't want to be on such a toxic site and proceed to delete my posts and answers. I can't delete my accepted answer, so I flag a mod to delete it and they won't delete it. I edit it to say "please delete it", they lock the thread and start a whole other discussion on the meta about what rights people have to delete their own posts!

    From that thread, they check my profile for other answers I deleted (which were neither upvoted nor accepted) and start voting to undelete them! They edit out "Hope that helps" from an answer I gave previously, stating "we assume everyone is trying to be helpful here". The irony of a person stating that while editing that single phrase out of a deleted answer is astronomical.

    They're literally going to take useless answers hostage for what? Revenge because I want to leave their community? What kind of sociopathy is this? How much energy are they willing to spend not helping, correcting everything for an obtuse system that's unwelcoming to everyone except the already initiated?

    And through all this, any of the good detailed other questions I asked over the months with no answers receive no attention, guidance or help from any mods. Before this, my answers weren't worth noticing. Now that they can have control and can be passively abusive, they're gold.

    The mods literally went through numerous posts of a beginner, downvoting everything, creating a whole new question on the meta, undeleting useless answers instead of simply stating "There is no consensus for SVGs, it depends on the use case". That is a statement any mod could have made with less effort than it took to close the question.

    And I got that answer from a normal user in a comment hours after it was closed. That user knew what I asked and gave a clear answer. The whole time I had the answer. I only wanted to clarify the problem with the question so I could actually get better at asking. What a nightmare.

    Is this kind of behaviour common? Its outright abusive as far as I'm concerned.

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

    SPI Display over Bluetooth

    Posted: 01 Jan 2021 04:01 PM PST

    I want to run an SPI display from a Raspberry Pi 4 via Bluetooth. I have a way to give it a clock signal chip select, and power, but I just need to know how to send the data over Bluetooth instead of through a GPIO pin. I am using an ST7789 driver from this library.

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

    GIMP RGB C-Source array declaration

    Posted: 01 Jan 2021 11:45 AM PST

    I am experimenting with GIMPs C-Source exporting to store some small images on a microcontroller.

    This is the output file of a 8x8 pixel image and I don't understand the pixel_data array.
    When printing the values of the array in a loop they are all the right 8-bit values as they should be, but I can't understand the declaration of the array. Can somebody explain this or send me a link for more information about this topic? I am relatively new to C and have never seen this before.

    /* GIMP RGB C-Source image dump (image8.c) */ static const struct { unsigned int width; unsigned int height; unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ unsigned char pixel_data[8 * 8 * 3 + 1]; } gimp_image = { 8, 8, 3, "\377\241\230\377\345\226\223\060;\350\314Y\263\372\000\377\245\000\377\331\000\377" "\000\000\356\276\017\353\233\071\377\024\276\377\325\000q\316\000\377\000\227X\000\000\377" "\000\214\377\000I\261\000\000\377\226\002\377\000,\336\000K\366\000\000\000\000\305\313\000\000\370" "\000\000\366:\000\377\000\000\365\245s\352\000s\265\031\000\377\000\000\377\000\000\377\000\000\377" "{\000\364\003\000\351\344\216\377\000\000\362\000\323\377\000\000\377\225tF\000\254\336\000\276" "\254@\000\374\000m\303\353p\362\000\274\377\000\000\027\030\250\317\000S\321\236\241i\366" "\000\377\000\371\327\000\000\377{\207\214\\\023\377V\000\377\377[\373\000\335\377\000S\303" "\000\000\354\000\000\377\223\377\327\000\332\363\000\000", }; 

    Thank you!

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

    Predictive Text & Correcting Grammar Mistakes

    Posted: 01 Jan 2021 02:48 PM PST

    My Goal is to take the words in the dictionary & attribute them to x amount of groups. Each of the groups has its own words & sub-groups based on a shared characteristic

    The problem that I'm having is when a specific group is chosen & the contents (i.e. the other sub-groups) are chosen the output reveals poor grammar. I have to manually adjust the word so it fits correctly and this is annoying. Is there a way I can get proper grammar structure from a randomly generated combination of words? Is it possible to organize these words in a proper sentence based on "Parts of Speech" (i.e Adjectives, Adverbs, Conjunctions, Determiners, Nouns, Prepositions, Pronouns & Verbs)

    Here's an Example:

    BAD SENTENCE STRUCTURE
    Group 1 Group 3 Group 8
    I AM Extremist (noun) Annoy (verb)

    GOOD SENTENCE STRUCTURE
    Group 1 Group 3 Group 8
    I AM Extremely (adverb) Annoying (adjective)

    It seems I need to properly deconstruct the language into atomic bits first. "I AM" fulfills the "subject/noun ('I') - verb ('be')" part which would be the most simple sentence structure in English. The next nouns would usually be objects (accusative case). Freely jumbling between nouns, verbs, and adjectives may seem intuitive because English likes to recycle words without changing anything (check out Declension and Nominalization, for instance). However, they are completely different phrases in terms of grammar, so I'd first have to get the framework right (see Grammar/Theory and Constituency relation).

    Here are some videos I found that are similar but they require pre-existing text like a book.

    https://www.youtube.com/watch?v=bFrjlRDyWQM

    https://www.youtube.com/watch?v=5Vf-p7FiQqY

    Any suggestions on this ambitious project?

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

    Does @DataJpatest proves that data is inserted into database?

    Posted: 01 Jan 2021 05:39 AM PST

    I am at this stage to test SpringBoot so I am trying to use @DataJpatest to make sure that the database works. I created some fake data but I don't see it inserted.

    Db : MySQL

    With the ddl configuration, the database is created but I cannot see that the data is inserted.

    Can someone tell me how to make that happen in a SpringBoot JPA web?

    Tks.

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

    Visual Basic .Net App

    Posted: 01 Jan 2021 06:14 AM PST

    Hi guys,

    I need to create an app that uses streams to transmit files on the network using network streams. So the client can choose a fileName from a specific folder, and then download it. Can someone give me an idea of how to organize this project?

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

    Redis JSON Python. ReJSon vs Redis Python Module....

    Posted: 01 Jan 2021 02:56 AM PST

    Hi there,

    Currently working on a Python Script where I have to save some JSON to a DB. Redis seems to fit the bill perfectly except that it cannot easily store JSON. From what I understand RedisLabs have developed the RedisJSON module which when combined with a Redis DB allows for the storage of JSON.

    The docs state that any both the Python Redis and ReJSON modules may be used to interface the DB. Which is better and why. Also if I use the Redis Module as opposed to the ReJSON module then are there any special commands for working with JSON?

    An example of the data Redis would have to store:

    { "Name": "Bob", "Job": "Builder" } 

    Many thanks!

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

    How do I change the alignment of vertical text (CSS/HTML)?

    Posted: 01 Jan 2021 07:04 AM PST

    https://jsfiddle.net/824x5gjc/

    This fiddle shows that text-align doesn't seem to have any effect on vertical (writing-mode) text in CSS/HTML. vertical-align still works, though.

    I want the text in the vertical TDs to move up tight against the right border of the cell. Is there any way to achieve this?

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

    I need your advice!

    Posted: 01 Jan 2021 02:35 AM PST

    Hey guys!

    I'm finishing the 3rd year of automation engineering, hopefully I will get my bachelor degree in Semptember.

    I'm studying at politenico di Milano in Italy, with an average of the marks around 8/10; I'm realizing that I do not want to continue this faculty as the master degree, I'm more interested in computers than automation, preferring low-level programming language to high-level

    I have some questions:

    1. which are the differences between Computer Science and Computer Engineering? Which would u suggest?
    2. do you think that a "mixed" istruction is better or worse to get a job?
    3. I'm considering studying abroad ( but still in Europe), which are your considerations about it? Could you suggest me universities? (no private pls)

    Thanks :) happy new year!

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

    No comments:

    Post a Comment