• Breaking News

    Saturday, May 5, 2018

    What's the hardest error/bug you've had too solve? Ask Programming

    What's the hardest error/bug you've had too solve? Ask Programming


    What's the hardest error/bug you've had too solve?

    Posted: 05 May 2018 08:05 AM PDT

    to*

    Either in terms of time taken or complexity

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

    Embedding Spotify playlists?

    Posted: 05 May 2018 07:57 PM PDT

    I'm pretty new to cs and trying to work on a side project making a website with html/css and flask. I'm using a html form to get the results for the playlist and want to embed a different Spotify playlist for each result. Is there a more efficient way to do this instead of making a new html template for each page? Like can I just store these Spotify playlists in some folder under a certain name and reference them or do I need to hardcore them to embed them resulting in me needing like 12 ish template pages? I'm trying to learn python this summer but don't know too much, I learned a bit of flask at a hackathon a few months ago.

    Thanks for any help!

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

    Help with calling an HTML list in a JavaScript loop?

    Posted: 05 May 2018 05:30 PM PDT

    let me start with I'm quite new to this. I'm taking a JS class and part of my homework assignment is to write an ordered list in HTML and loop through the list using JS WITHOUT using inner HTML. I'm pretty stuck. I know how to write the list and I can write a for or while loop but I can't seem to connect the two without inner HTML. How should I approach this?

    submitted by /u/salad-daze
    [link] [comments]

    Anybody else find this amazing?

    Posted: 05 May 2018 05:13 PM PDT

    I'm still a CS student, and I found it interesting that even the hired professional programmers constantly Google questions. I always had it mentally pictured that the experienced experts would never do something that a NOOB would do, like googling questions, yet it's one of the "most important skills." What are your thoughts on this?

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

    Adding an external library to Eclipse C++

    Posted: 05 May 2018 05:08 PM PDT

    Hi, I'm currently working on a project for one of my classes and the microcontroller we use is made for Eclipse only. Our project involves controlling RGB LED Strips, and I'm having troubles adding the FastLED library to Eclipse (C++). How would I do this? (Step by step would be extremely helpful because I'm a noobie) Thank you.

    Library: http://fastled.io/

    Microcontroller: http://socialledge.com/sjsu/index.php/SJ_One_Board

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

    I can’t figure out how to get the right-to-left and left-to-right Unicode characters to work the way I want

    Posted: 05 May 2018 04:39 PM PDT

    Sorry if this isn't the right sub to ask this on, but I couldn't think of a better place.

    What I'm trying to do is to use the rtl (U+202E) and ltr (U+202D) Unicode modifiers to reverse some of the text.

    For example, with "test test test" I want to make it display as "test tset test", but it always ends up as "test tset tset" or "test test tset"

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

    Need help figuring out a map coloring algorithm in Java.

    Posted: 05 May 2018 09:59 AM PDT

    The Map

    I'm trying to figure out how to have the map color every island a different color.

    The map is technically a height map (it doesnt show it the picture because ive just painted everything white and blue) but every little square has a height value determined using perlin noise.

    I have tried checking if the height of the pixel one row or one column before it is below sea level and then assigning a new random color to the pixel, and if the previous pixels arent sea, it will keep the same new color.

    there were issues with that algorithm

    send help

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

    Question about .NET

    Posted: 05 May 2018 03:31 PM PDT

    Hey all,

    Wrote a program in .NET 4.6.x for office, I.T. for the client's company says that they have 4.7.x installed on their computers. I'd like them to install the older version as well so that I don't have to update the program, as portions break when using 4.7.x Do they have any legitimate concerns installing another .NET? Or like I thought can both be installed without issue? Thanks!

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

    Basic programming skills, want to contribute to projects, any way to do this?

    Posted: 05 May 2018 03:21 PM PDT

    I'd like to find projects to contribute to - any recommendations on how to do this? I'd love to get deeper into programming, as it's always been something fun for me.

    I'm thinking almost like a crowdsourced application, where certain tasks are asked for, and you can go in and contribute code towards it?

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

    How to delegate tasks?

    Posted: 05 May 2018 03:11 PM PDT

    I'm the lead in a "Startup" with my two friends. Our product is essentially just a Ruby on Rails web app. We all already are using git, but we come into trouble figuring out who should do what and who should implement what feature, or if someone is already working on a feature.

    My question is what's an effective way of distributing tasks between us?

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

    Apparently, JetBrains are sponsoring and giving free licenses to small developer communities (monthly meetups, hackathons etc). Do you know of any other companies who give away freebies to developer communities?

    Posted: 05 May 2018 03:03 PM PDT

    Selenium/chrome headless python

    Posted: 05 May 2018 02:39 PM PDT

    Hi everyone,

    i'm a student in engineering school in french and i'm starting to built something of my own but can't manage how to start.

    I want to write a program that goes on chrome (or another browser) without the image of the browser. It can go on the website I want and enter information or do action I ask him to do on his own.

    Are Selenium and Chrome headless the fastest (powerful) way to do it or are there other tools that I can use that are better?

    I will use python to do it. (or cpp i don't really know yet)

    thank you very much

    PS: hope i didn't do to much mistakes...

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

    Changing Slack bot name / image using Slash Commands?

    Posted: 05 May 2018 10:26 AM PDT

    I'm setting up a slackbot with slash commands and according to API you're able to pass username to set the username of a bot. When I try it, the name does not update. Does this not work with slash commands in the same way that it does with bots?

    from bottle import run, post, request @post('/hello') def hello(): mydict = request.forms.get('text') response = { "username": "test", "response_type": "in_channel", "text": "Greetings!" } return response 

    matt [11:00 AM] /hello

    MyBot APP [11:00 AM] Greetings!

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

    Changing an element's attribute using Tampermonkey

    Posted: 05 May 2018 09:27 AM PDT

    This is for the YouTube website. If you click the YouTube logo at the top left and click inspect and expand the tree, you will see something as follows.

    https://ibb.co/g1Mf17

    I want to select the viewBox="0 0 200 60" and change it to "0 0 0 0" which makes the logo invisible but the area remains clickable.

    I wrote the following code in Tampermonkey but it's not working.

     function invisibleYouTubeLogo () { document.getElementsByTagName("svg").setAttribute("viewBox", "0 0 0 0"); } invisibleYouTubeLogo(); 
    submitted by /u/jupiter_104
    [link] [comments]

    Apache2 Default Page

    Posted: 05 May 2018 09:17 AM PDT

    I've made a web server and I'm having issues with the default homepage.

    When I first open the site, it brings me to this page.

    Then, when I click on Wordpress, it brings me to the page I want.

    How can I make it so accessing the site automatically opens the WordPress page instead of the "Index of / " page?

    Thank you.

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

    Good languages for ciphers

    Posted: 05 May 2018 12:51 PM PDT

    As a summer project, I want to implement as many ciphers as I can find but I'm curious which language(s) would you recommend to implement this with?

    The goal here is to have a GUI where a user can select a cipher, provide the message and key, and output the encrypted message.

    My background is in Java, C#, and a little bit of Python 3.

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

    ptrace in C

    Posted: 05 May 2018 12:50 PM PDT

    Can someone explain me why I'm getting -1 here instead of the actual syscall number?

     int main(void) { pid_t child; long orig_eax; child = fork(); if (child == 0) { ptrace(PTRACE_TRACEME, 0, NULL, NULL); execl("/bin/ls", "ls", NULL); } else { wait(NULL); orig_eax = ptrace(PTRACE_PEEKUSER, child, 4 * ORIG_EAX, NULL); printf("The child made a syscall %ld\n", orig_eax); ptrace(PTRACE_CONT, child, NULL, NULL); } } 
    submitted by /u/BubbleBassOrder
    [link] [comments]

    Help with music streaming API and server side problems.

    Posted: 05 May 2018 08:57 AM PDT

    I am trying to have a music sharing place for me and my friends (we record our guitar playing stuff). what I want to do is I have a hard drive and a raspberry pi, I want to have a homemade server with database with the pi, HD set-up. I want help with what language is best suited for my problem. I was thinking mongoDB or postgres for database, python for server handling and backend for website too.

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

    Lets say i've created a very small sized program and I want to release it for downloads/distribution. What's the best place to host the file for download that will stay up forever and will be free? or at least very cheap.

    Posted: 04 May 2018 11:15 PM PDT

    Obviously i won't be expecting millions of downloads.

    It's important that the host isn't intrusive like something you'd expect of google.

    The more privacy conscious the better.

    I also thought about using torrents, but torrents will die if no one is seeding. (i realize ip is exposed on torrents)

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

    Basics of video streaming?

    Posted: 05 May 2018 07:48 AM PDT

    I want to write a video streaming application, and I want to implement the server and the client by myself. Here is the reason why I want that: I want to encrypt the video chunks that I am gonna transfer, because I need this for my project. So the flow would be something like this:

    1. get video chunk
    2. encrypt it
    3. transfer it to the client(s)
    4. decrypt on the client side
    5. play the decrypted video on the client side

    I have been looking for video streaming solutions in the days, but Im not sure yet what to use. I read that myabe I should use RTMP or RTSP protocols for the communication between the client and the server, and some other stuff. But basically I have never done such a streaming project yet, so I am a beginner in this part of the informatics.

    Can you help me out, sending any books, articles, video tutorials, or usefull libraries, that I can use to build my application? I also want to have a good understanding about the topic, so first I want to learn about the theoretic background of streaming.

    I highly prefer to use Java for the project, but I am fine with C/C++, but I can also adapt to other languages, if it is needed.

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

    Software Design Principle Readings

    Posted: 05 May 2018 01:15 AM PDT

    Hi all,

    I was wondering if you might be able to suggest some reading material to learn more about good software design principles specifically focused on writing clean, concise and enabling code.

    If it makes a difference: I mainly have been working with Go, as well as python in the past.

    ~Thanks

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

    error during compiling c program VS 2017

    Posted: 05 May 2018 04:14 AM PDT

    idk if its the right place to ask, so redirect me if im wrong!

    im using VS community 2017 , in windows 7. during installation i check "c++/cli support". I tried to run hello world program, but couldnt. this is my error:

    Severity Code Description Project File Line Suppression State Error MSB6006 "CL.exe" exited with code -1073741515. Project1 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 380

    this is after double click the error: https://pastebin.com/8sLUMdFC

    please help me.

    and btw, please dont tell me to switch to linux.

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

    C - sorting array of strings

    Posted: 05 May 2018 12:16 AM PDT

    So I'm trying to sort an array of really really big numbers which are being entered as strings, in ascending order. However I don't know exactly what to do, I've implement a basic sorting algorithm shown below:

     void sort_list (char **str_list, int l_size) { char *tmp = (char *)malloc(sizeof(char) * MAX_LEN); int i, j; int k; for (i = 0; i < l_size - 1; i++) { size_t f_size = strlen(str_list[i]); size_t s_size = strlen(str_list[i+1]); if (f_size > s_size) { strcpy(tmp, str_list[i]); strcpy(str_list[i], str_list[i+1]); strcpy(str_list[i+1], tmp); } else if (f_size == s_size) { // compare each character for (j = 0; j < f_size; j++) { int diff = str_list[i][j] - str_list[i+1][j]; if (diff > 0) { strcpy(tmp, str_list[i]); strcpy(str_list[i], str_list[i+1]); strcpy(str_list[i+1], tmp); } } } } } 

    The problem is that this only compares the first character of the string, so 378 is actually smaller than 9, I can't convert the strings to integers or longs so I really have no clue what to do here, how do I go about this?

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

    Selection fragment shader color on edge of bounds based on normals

    Posted: 04 May 2018 10:36 PM PDT

    First off, wow, what a title. Honestly didn't know what else to write though. I'll try explain what I mean now...

    I'm working on writing a fragment shader that highlights everything inside a 3D selection. It is to be used with a voxel engine and I am trying to avoid re-rendering chunks and using a shader instead.

    The problem is faces that are exactly on the edge of the selection. Hopefully this quick gif will demonstrate what I mean. I need a way to determine which faces on the edge of the selection (transparent white box) will be which color based on their normal value. As you can see in the gif the first face I highlight with the mouse should be red but it is yellow. It's easy to change this, instead of:

    if(z > edge.z): 

    we do:

    if(z >= edge.z) 

    but then the second face I highlight in the gif will change to red when it should be yellow like this.

    I can likely come up with some way to do this but it seems like it could well be a common problem I just have no idea what terms I want to search for to find an elegant solution that has already been created! I've tried just about every combo of 'edge', 'face', and 'normals' but not come up with much.

    I am using Godot 3s built in shader language but it is very similar to GLSL ES 3.0. Any advice you can offer though would be greatly appreciated! Thank you.

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

    No comments:

    Post a Comment