• Breaking News

    Friday, December 1, 2017

    Why is it so damn hard to ask a question on StackOverflow that doesn't get negative ratings? Ask Programming

    Why is it so damn hard to ask a question on StackOverflow that doesn't get negative ratings? Ask Programming


    Why is it so damn hard to ask a question on StackOverflow that doesn't get negative ratings?

    Posted: 01 Dec 2017 08:45 AM PST

    Also what are other good websites for students to ask programming questions on?

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

    When making a desktop app; is it better using a native platform like xcode or a third-party framework such as electron, regarding the fact that it will be cross-platform?

    Posted: 01 Dec 2017 08:17 PM PST

    What does this time format mean?

    Posted: 01 Dec 2017 05:42 PM PST

    I'm parsing an XML file and there's a value for 'creation-date' with a value of '2017-11-07T19:45:57Z'. What does the 'T' and the 'Z' mean in this time format?

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

    Staying On Track

    Posted: 01 Dec 2017 01:14 PM PST

    How do you stay motivated to code a little everyday and prepare for technical interviews?

    Next year I plan to find a job as a front-end web developer. I need to study up on HTML, CSS and JS and actually build an online portfolio. But, I currently have a job as a developer I don't like and have trouble keeping motivation to code after a frustrating day of work.

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

    With a link, can I target a section of a page without a target?

    Posted: 01 Dec 2017 04:44 PM PST

    If I want to target the tenth <pre> on this page https://www.cprogramming.com/tutorial/c/lesson8.html

    Can I target:

    • the tenth pre?
    • its percentage of the way down?
    • the words used in the <pre>?
    submitted by /u/albnite
    [link] [comments]

    Hi, im getting this error in my script: Unity error Error:Assets/Scripts/PlayerBehaviour.cs(39,246): error CS1525: Unexpected symbol `end-of-file' Anybody's willing to give me a hand? I am pretty sure there is a simple fix that I cannont see...

    Posted: 01 Dec 2017 04:21 PM PST

    using System.Collections; using System.Collections.Generic; using UnityEngine;

    public class PlayerBehaviour : MonoBehaviour {

    public Transform mesh; public float forceFly; private Animator animatorPlayer; private float currentTimeToAnim; private bool inAnim; // Use this for initialization void Start () { animatorPlayer = mesh.GetComponent<Animator>(); } // Update is called once per frame void Update () { if(Input.GetMouseButtonDown (0)) { animatorPlayer.SetBool ("callFly", true); inAnim = true; } if(inAnim) { currentTimeToAnim += Time.deltaTime; if(currentTimeToAnim > 0.6f) { } } 
    submitted by /u/polan31
    [link] [comments]

    Beyond confused with this error

    Posted: 01 Dec 2017 03:47 PM PST

    I'm working on an implementation for a linked list in C to be used as an object manager. As the buffer fills up we defragment it and then continue. Part of its functionality is that we need to retrieve addresses of the nodes based on their IDs (just sweep the list until you find the matching ID) and return a pointer there.

    void* retrieveObject(Ref ref) { void* location = (void*)malloc(sizeof(void*)); traverseNode = currBuffer->head; //start at top of list location = (void*)traverseNode; Boolean finished; //boolean for determining if object can still be in list if(ref < currRef) //currRef will always be the possible highest id to find //so if ref is larger it won't be found in the list { finished = false; while(traverseNode != NULL && finished == false) //while not end of list or found { if(traverseNode->id == ref) { printf("id == ref\n"); assert(location == NULL); return location; printf("after return statement\n"); } else if(traverseNode->id < ref) //if finding ids lower than ref you have not passed //where it could be so it continues the search { printf("id < ref\n"); traverseNode = traverseNode->next; //iterate location = traverseNode; } else { printf("id > ref\n"); finished = true; } } } printf("ERROR: Object with ID number %lu does not exist\n", ref); return (void*)currBuffer; } 

    traverseNode is a globally defined pointer of type Node* and not malloc-ed. When I run this, it finds the correct node with the correct ID and even has the right address. However, at the line

    return location; 

    I get the error

    main0_out(51073,0x7fff7302f000) malloc: *** error for object 0x7fb120402ff8: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Abort 

    and I have no idea what this is coming from. I got this error when I didn't have a location variable i just used

    return (void*)traverseNode; 

    What's also weird, is if I replace

    assert(location != NULL); 

    with

    assert(location == (void*)traverseNode); 

    I get a segmentation fault instead of the error before.

    I am very confused and would appreciate some guidance. I have never seen this error before and what I've learned on Google/StackOverflow has not really explained my problem.

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

    Hello, im new to programming and currently trying to learn C.

    Posted: 01 Dec 2017 11:48 AM PST

    I have alot of questions though, but i'll start with this one, how do i overwrite a random set of values in an array. For example if i have 16 values in the array but i want to randomly set 8 of those values to 0 how do i do that?

     srand(time(NULL)); int magicSquare[4][4] = { 0xF,0x4,0x8,0x3,0x1,0xA,0x6,0xD,0x2,0x9,0x5,0xE,0xE,0x7,0xB,0x0 }; int j, i; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { if (rand() % 15 < 8) { printf("%3x", magicSquare[i][j]); } else { printf("%3s", "0"); } } printf("\n"); 
    submitted by /u/sjalvmordsbenagen
    [link] [comments]

    my brother who thinks he's always right, thinks the formula n(n+1)/2 is useless. What are some applications in progrmaming of this formula that I can present to him

    Posted: 01 Dec 2017 03:28 PM PST

    The question is simply how this formula is used. For example I know it's used in gaming, but I can't say how it's used. If I tell him that it's used in gaming, it's not good enough for him because it's not a concrete example, so I might as well be bullshitting in his eyes.

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

    Making an unmanaged dll usable in a managed world -c#

    Posted: 01 Dec 2017 02:33 PM PST

    Hello there!

    I'm looking for an alternative to this: http://www.pinvoker.com

    I'm pretty green, so I only vaguely understand how it helps us. I've just been tasked with it.

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

    Codecademy

    Posted: 01 Dec 2017 09:23 AM PST

    Are Codecademy courses an accurate portrayal of what programming will be like?

    I enjoy working with the logic that accompanies going through the lessons, but everything is just handed to you which is really boring. Obviously they need to hold your hand in order to teach you the material, but I'm curious as to how close to actual programming it is.

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

    Where did Mark Zuckerberg code Facebook?

    Posted: 01 Dec 2017 12:58 PM PST

    Not it's physical location but what program. By program, I don't mean coding languages. I mean where. What program? Like did he just open notepad or word. (Sorry, don't have coding experience but I am interested).

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

    What are free web application servers / programming languages that can be used to create a website within a large company?

    Posted: 01 Dec 2017 12:50 PM PST

    What programming languages and web application servers that are out there which do not require a license if working within a large company.

    Thank you in advance.

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

    Array of ints arguments vs int arguments

    Posted: 01 Dec 2017 08:56 AM PST

    Hello! For my course I'm having trouble really understanding what this question is asking me.

    "Describe a situation where using an array of ints of size 1 as an argument would be different than using an int argument"

    Then I'm given this code...

    public static void meth1(int[] a)

    vs

    public static void meth2(int a)

    What's the difference between the two? I guess I'm having a hard time grabbing the concept of an array. Could someone please explain?

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

    Which language + software should I learn/use first?

    Posted: 01 Dec 2017 11:47 AM PST

    Leaning on majoring computer science in college and wanted to get a bit of a head start. What language should I learn? I usually see python and java. Also what program should I use?

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

    What is the difference between merge sort and quick sort? i understand how merge sort works, but i’m having a difficult time finding out how quick sort is different from merge sort.

    Posted: 01 Dec 2017 10:39 AM PST

    In Linux C my SIGUSR1 or SIGUSR2 is not being handled when I send those commands from shell to my program

    Posted: 01 Dec 2017 06:52 AM PST

    I don't know what's wrong. When I use kill command from within the program (i.e. I tell my program to send itself a signal) then it works. But from outside, when I use a shell to send kill using kill -10 -2194 (2194 is the program id which changes every time I run the program from shell), it doesn't work. I don't know what I am doing wrong. Here is the code. Ignore the commented portion.

    #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <stdbool.h> int x; //bool loop_out; #define FOREVER for(;;) /*void loop_breaker(int signo) { //loop_out = true; puts("awww"); }*/ void update_x(int signo) { if (signo == SIGUSR1) { puts("here"); if (x==0) { puts("green"); } else if (x>0) { puts("blue"); } x=1-x; } } int main(void) { //printf("To halt, kill -%d %d\n", SIGUSR1, getpid()); printf("To change value of x, kill -%d %d\n", SIGUSR1, getpid()); //loop_out = false; //x = 0; /*if (signal(SIGUSR1, loop_breaker) == SIG_ERR) { printf("can't catch SIGUSR1\n"); }*/ if (signal(SIGUSR1, update_x) == SIG_ERR) { printf("can't catch SIGUSR2\n"); } while(1) { sleep(1); } return EXIT_SUCCESS; } 
    submitted by /u/zimmer550king
    [link] [comments]

    An XML file where i have to replace attributes with data from an excel file. How can i do that?

    Posted: 01 Dec 2017 06:48 AM PST

    I have an XML file with multiple attributes. Some of these are in an excel file. How can I automate the process of getting the data from the excel file and put it in the right place in the XML? Plus, as output, i want an XML for every row in the excel file. I'm opened to everything

    Example:

    attribute name="IMPOSTA1" value="$IMPOSTA1"

    attribute name="CODIVA2" value="$CODIVA2"

    attribute name="ALIQIVA2" value="$ALIQIVA2"

    attribute name="IMPONIBILE2" value="$IMPONIBILE" Where every variable ($) is replaced from the data of the excel file

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

    Which is safer, connecting to Remote database directly from Xamarin or making APIs on back end and connect to them instead?

    Posted: 01 Dec 2017 04:40 AM PST

    Let's say I'm making an Xamarin.android (let's take it as any platform/framework). So, I have to use remote database for store and retrieve information.

    I've been making PHP based APIs on my server that interact with database. I make my application hit up those API endpoints with the data and those APIs update the information in the database.

    So, I was wondering that if I make my application directly connect to the remote MySQL, it'll be a bit faster than hitting up APIs.

    Which way would be safer? I don't want anyone to be able to intercept the data or connection details to DB for obvious reasons. What would be the safest way? Or is there any other way to get this job done?

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

    Best practice for benchmarking?

    Posted: 01 Dec 2017 02:30 AM PST

    Let's say I want to compare the execution time of some implementations in two different languages on a few different platforms. What's the right way to do so?

    I mean it's not too big a deal to print start and end times to a file for analysis from inside the implementation, or for instance to use the unix time function to to get execution times, but are there any tools out there to orchestrate a number of test runs and aggregate the results into a useful format?

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

    What's the best alternative to Visio for Ubuntu?

    Posted: 30 Nov 2017 11:02 PM PST

    No comments:

    Post a Comment