• Breaking News

    Monday, March 19, 2018

    (C++)So I am trying to write a program where it counts each time a character is used in a 10 letter word. For example, the word “artichokes” contains 10 unique letters, while "bejeweling" contains 8 unique letters. I am having a difficult time figuring out how to count the same letter twice. Ask Programming

    (C++)So I am trying to write a program where it counts each time a character is used in a 10 letter word. For example, the word “artichokes” contains 10 unique letters, while "bejeweling" contains 8 unique letters. I am having a difficult time figuring out how to count the same letter twice. Ask Programming


    (C++)So I am trying to write a program where it counts each time a character is used in a 10 letter word. For example, the word “artichokes” contains 10 unique letters, while "bejeweling" contains 8 unique letters. I am having a difficult time figuring out how to count the same letter twice.

    Posted: 19 Mar 2018 01:52 PM PDT

    Here is what I have for my input so far. Any tips on how to count the same letter twice would be very much appreciated!

    //The Input string input; cout << "Please type in a 10 letter word: "; cin >> input;

    //Labeling the integer int numofchar = 0; for (unsigned int i = 0; i < input.length(); i++) { if (input.at(i) == 'a') { numofchar++; } //continues A-Z } 
    submitted by /u/WarchiefWanka
    [link] [comments]

    Should programmers do a basic test on their work after it's promoted to QA?

    Posted: 19 Mar 2018 12:48 PM PDT

    So my job entails some QA work for changes(bug fixes, new functionality etc) to our software. I know the business processes, so I QA any changes to make sure that they run smoothly as if I was a user doing their day to day work. I do not know any coding.

    So today, I am testing a change where a new field was added to a PDF and the field was not displaying any data when the PDF generated. So I ask the developer, do you not test the change you made when you promote it to the QA environment. He basically said that once it is promoted to QA, it is up to me to find any issues. He determined that when this change was promoted to QA, 2 objects/functions were missed/not promoted which caused the change not to work.

    Am I wrong in thinking that they should do a basic test to make sure that the new change/feature works once it's promoted to the QA environment from their development environment?

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

    c makefile help

    Posted: 19 Mar 2018 09:15 PM PDT

    my current make file is

    CC=gcc

    CFLAGS=-Wall -g -std=c11 -c

    LDFLAGS = -shared

    BIN = ./bin/

    SRC = ./src/

    SRC1 = ./src/LinkedListAPI.c

    SRC2 = ./src/GEDCOMparser.c

    SRC_FILES = $(wildcard ./src/*.c)

    program:

    $(CC) $(CFLAGS) $(LDFLAGS) $(SRC1) -Iinclude -o $(BIN)LinkedListAPI.so $(CC) $(CFLAGS) $(LDFLAGS) $(SRC2) -Iinclude -o 

    $(BIN)GEDCOMparser.so

    list:

    $(CC) $(CFLAGS) $(LDFLAGS) $(SRC1) -Iinclude -o 

    $(BIN)LinkedListAPI.so

    parser:

    $(CC) $(CFLAGS) $(LDFLAGS) $(SRC2) -Iinclude -o 

    $(BIN)GEDCOMparser.so

    cls:

    clear 

    clean:

    rm ./bin/* 

    now this is located in a folder which contains src include and bin, what i want to do though is have the output file output too the root folder which is 1 level about but i dont know how to do this

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

    Building a live graph

    Posted: 19 Mar 2018 03:08 PM PDT

    Hey guys,

    I am currently trying to build a graph which shows the bitcoin price. The issue that I am having is that I can't figure out how exactly I will be able to plot each value for every single minute.

    I am trying to consume the Coinmarketcap API with AngularJS without the use of any backend. I am basically trying to build the graph seen here.

    Can anyone help me understand the logic behind it? The Charting library doesn't really matter.

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

    Making a Flexbox div look the same on both Firefox and Chrome

    Posted: 19 Mar 2018 04:50 PM PDT

    So for my web programming class they gave us this homework where we have to make this simple thing that's basically 1 main div containing 2 divs, one with text, one with an image and they have to be vertically aligned and have a fixed width while we can't fix their height and I read about flexbox and managed to make it exactly as it's required, but it only looks like it's supposed to in Chrome and Opera, where as I need it to work in FireFox and Edge too. My first problem was the image not loading on FireFox and Edge, but I managed to find a solution to that by making another image selector with :after/:before, but that makes the image huge which pretty much messes everything up. I did add display -webkit-box, -mox-box etc, to all my selectors but it still doesn't fix it. I pretty much ran out of ideas for things to search on google to try to fix this so any help would be appreciated.

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

    Whats a bloomfilter system of superexponential size (such as 2^(2^256))?

    Posted: 19 Mar 2018 04:10 PM PDT

    I've decided I need a sparse dimensional sparse matrix of bits of 2256 sparse dimensions and 22256 sparse bits (somewhere near a googolplex). All start as 0, and can change from 0 to 1 but cant change from 1 to 0) as an abstraction layer for database-like general-computing gpu-optimized AI and game research. An address of a bit in the bloomfilter would be a set of int256s which are all 1s and everything else is 0s in an integer of 2256 bits. Is there any system of such a bloomfilter andOr "sparse dimensional sparse matrix"? Ethereum has such a superexponential address space but is such a strict formal proof based system that you cant run anything in it at gaming-low-lag (It does 1 cycle per 15 seconds).

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

    Arduino map function for potentiometer/rgb led

    Posted: 19 Mar 2018 07:34 PM PDT

    I'm trying to scale the potentiometer to the rgb led so that it cycles through colors like in this image: http://academe.co.uk/wp-content/uploads/2012/04/Rainbow-RGB-300x223.png

    my idea was to use multiple map functions so that for potentiometer value a through b would turn the red led on, value b to c would turn green on, c to d would turn red off, and so on- should this work?

    this is my code so far: int val = analogRead(pot);

    val = map(val, 1, 171, 1, 255); analogWrite(redLed, val); val = map(val, 171, 342, 1, 255); analogWrite(greenLed, val); val = map(val, 342, 511, 255, 1); analogWrite(redLed, val); val = map(val, 511, 682, 1, 255); analogWrite(blueLed, val); val = map(val, 682, 852, 255, 1); analogWrite(greenLed, val); val = map(val, 852, 1023, 255, 1); analogWrite(blueLed, val); 

    (i'd add additional if loops for when the particular color will stay on)

    i hope this makes sense and is the right place to post this, thank you

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

    SQL help - Current student learning MySQL and have an assignment due in 3 hours.. I'm stumped. Need to pull multiple different types of data from multiple different tables.

    Posted: 19 Mar 2018 07:05 PM PDT

    First day back from Spring Break, and my prof. was nice enough to slap this on us.. I'm so lost. I have several tables that all store different bits of data:

    ATTENDEE holds ATTENDEE_ID FIRST_NAME and LAST_NAME.

    LOCATION holds LOCATION_ID, LOCATION_NAME

    EVENT holds EVENT_ID, LOCATION_ID, START_TIME, and END_TIME

    EVENT_ATTENDEE holds EVENT_ID and ATTENDEE_ID - This is where I need to search from.

    Basically, I need to look through EVENT_ATTENDEE, and find all events Attendee is attending. I can get the Event_IDs, but also need to show the Attendee first_name, last_name, location, event start, and event end somehow.. This is where I'm lost. Once I can figure out the logic for this kind of SELECT statement, I can finish the other ones on the assignment myself, as they are all pretty similar.. The issue is that my prof didn't really discuss this kind of thing, and more so "encouraged" us to figure it out.. Anyone here able to help? I could really use it.

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

    How to pull database information from a map?

    Posted: 19 Mar 2018 06:23 PM PDT

    From this map, I want to pull the information for each pinned dot.

    http://gis.odot.state.or.us/transgis/opt/

    Attributes are description, estimated(or actual) completion date, project number etc.

    How do I pull this information for each dot with a script?

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

    Imgur is blocked at work but reddit pics (i.redd.it) is not, any ideas how to program a converter where i input an imgur link and get a i.redd.it link out?

    Posted: 19 Mar 2018 09:40 AM PDT

    My programming knowledge is pretty limited, but let me know the best way i can implement this, thanks!

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

    Which technologies should I use in my web app

    Posted: 19 Mar 2018 11:06 AM PDT

    Hey guys,

    I plan to create a web app, but since I have little experience with web development I don't know which technologies / languages / frameworks etc. I should use

    Basically the two main functions that need to be supported are:

    (1) Showing/Playing files of at least the following formats with a fluid transition when changing the file to be displayed: JPG/JPEG, PNG, GIF, WEBM, MP4, AVI

    (2) Allowing a full screen mode when viewing a picture/video however I want to have UI elements accessible in the full screen mode if the user hovers over certain positions (for example most video players have a full screen mode but if you move your cursor to the bottom then the video player controls pop up)

    On top of that I want it to be cross platform, so it should be usable on at least one browser that exists for Windows, Mac and Linux. Also in the first development stages I want this web app do be launchable by the user locally since I don't plan to host a server initially, which means the app will be a fat client app and a client sided DB will be stored on the user's computer which contains user data among other things. In the later stages I might create a way for users to interact with each other over a central server, but this is not required for any of the core functionalities

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

    C# asp:button not firing client side click

    Posted: 19 Mar 2018 12:42 PM PDT

    My code is below. I'm using a telerik select and an asp:button. These are elements that I have to use. When I click on the "import" button it only fires the onClick method. I've tried several stackoverflow solutions to no avail. Any help is greatly appreciated.

    <asp:Label runat="server">1. Select the test type to be imported.</asp:Label> <br /><br /> <telerik:RadDropDownList ID="radFormTypeListSA" runat="server" CssClass="FormTypeListSAClass" OnClientItemSelected="FileTypeSelectionChanged" Width="265px" DataTextField="Name" DataValueField="Value" DropDownHeight="100" /> <br /><br /> <asp:Label runat="server">2. Select file to import.</asp:Label> <br /><br /> <telerik:RadUpload ID="radUploadSA" runat="server" OnClientFileSelected="test" ControlObjectsVisibility="ClearButtons" InputSize="50" Width="600px" AllowedFileExtensions=".txt,.dat" /> <br /><br /> <asp:Label runat="server">3. Click Import to upload the file. Note: File processing may take several minutes to complete.</asp:Label> <br /><br /> <asp:Button runat="server" id="cmdUpload1" text="Import" Enabled="false" OnClientClick="javascript: return validateImportParameters()" OnClick="cmdUpload1_Click" CssClass="FormTypeListUploadBtn" /> <br /> 

    javascript:

    <script type="text/javascript"> function validateImportParameters() { debugger; var r = confirm("You have chosen " + $('#ctl00_SheetContentPlaceHolder_radFormTypeListSA').val() + " file type and file: " + $("#ctl00_SheetContentPlaceHolder_radUploadSATextBox1").val() + ". Is this correct?"); if (r == false) { return false; } else { return true; } } </script> 
    submitted by /u/SuperVillainPresiden
    [link] [comments]

    PRINT equivalent command

    Posted: 19 Mar 2018 11:16 AM PDT

    Hi! Im doing some kind of "test" and they gave me this exercice: Give us the equivalent command on BASH for the next code line on BASIC:

    PRINT "House"

    I try with echo "House" and printf "House", but seems that im not correct, since they told me that is incorrect. Am i missing something? Theres a total equivalen command on Bash for Print?? I know that the print command on basic do things that echo doesnt do, like maths and these, but i dont know, im very lost.

    Thanks!

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

    Looking to view image with unknown header/format

    Posted: 19 Mar 2018 07:05 AM PDT

    Hey! I'm not sure if this is the correct subreddit to post to, so if there's somewhere more appropriate, please direct me to it.

    Anyway, I'm attempting to view/convert a file I'm assuming to be a texture from a PSX game. The file is in the .TIP file format, but I can't seem to find any documentation on it.

    I'm not sure how I would go about this, so any help would be appreciated.

    Link to the file: https://www.dropbox.com/s/5s987g9mr4jl6gc/PAC10.TIP?dl=0

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

    I want to find the model/function with 3 independent variables

    Posted: 19 Mar 2018 07:14 AM PDT

    Stable counting sort

    Posted: 19 Mar 2018 07:24 AM PDT

    how to change the code so that it can sort

    struct SResult sample[] = { {"A1234", 10}, {"A1239", 5}, {"A1394", 7}, {"A1434", 3}, {"A1454", 5}, {"A2884", 7}, {"A3235", 7}, {"A4334", 9}, {"A4884", 2}, {"A6934", 5}, {"A7265", 7}, {"A9559", 3} };

    void counting_sort(struct SResult scoreArr[], int N, int final[]) {

    int freq[11] = {0}, cfreq[11] = {0}; int i, curScore; //1. Compute Frquency for (i = 0; i < N; i++){ freq[ scoreArr[i].score ] ++; } //2. Compute Cumulative Frequency cfreq[0] = freq[0]; for (i = 1; i < 11; i++){ cfreq[i] = cfreq[i-1] + freq[i]; } //3. Produce Final Position for (i = 0; i < N; i++){ curScore = scoreArr[i].score; final[ cfreq[ curScore ] - 1 ] = curScore; cfreq[curScore]--; } 

    }

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

    Open Source program how do I make a login?

    Posted: 19 Mar 2018 10:35 AM PDT

    Let's say i found an open source program but i edit that program and I wanna make a login for it,how do I do that?

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

    No comments:

    Post a Comment