• Breaking News

    Wednesday, February 28, 2018

    What is considered knowing a language? Ask Programming

    What is considered knowing a language? Ask Programming


    What is considered knowing a language?

    Posted: 28 Feb 2018 01:30 PM PST

    Hey,

    I am a high school student and I am doing classes in Computer Science as well as self studying learning other languages.

    What would be considered "knowing a language, framework, etc" (Able to put on a resume perhaps). I have developed websites that use SQL, NodeJS, and things like AngularJs. But I personally wouldn't say that I know SQL or Javascript.

    If there is a better subreddit for this question, please let me know.

    Thank you in advanced!

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

    Python - I would like to remove a digit after the 3rd comma in each line of a file

    Posted: 28 Feb 2018 06:02 PM PST

    I have a file that has multiple lines, all comma delimited.

    Example:

    "1234",SR1,F,8,12345,12334

    "1",FR8,R,7,1245,13644

    In these two lines I would like to remove the digit after the 3rd comma.

    Result:

    "1234,SR1,F,,12345,12334

    "1",FR8,R,,1245,13644

    It will always be 1 digit after the 3rd comma but the digit will be different.

    I found some python scripts where you can remove all letters after a certain symbol, unfortunately that wont help me here. Hoping someone can help me out.

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

    What type of language to learn for this project?

    Posted: 28 Feb 2018 07:00 PM PST

    I want to build a simple shipping schedule for my work. Right now I do all the scheduling inside Excel, which works OK but I would like something a little more solid. All of my data is constant I just change a few dates here and there. I think this would be a good project to start toying around with programming.

    Any direction is greatly appreciated.

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

    How to work in group projects?

    Posted: 28 Feb 2018 12:07 PM PST

    I think I'm just overthinking this, but how do you work in group projects? There's always someone who dominates or takes charge of the projects I'm in (not necessarily in a negative way), and I feel so awkward because it feels like I'm not doing enough.

    I always hear the "okay I'll do this task and finish this for us" from the person who dominates the group. I always thought tasks can be split up and the group works on them together, but I always end up with people who want to do most of the work. I guess it's better than someone who doesn't do the work at all, but I don't know how to address this. I want to be able to do my part too, but I don't want to cause conflict.

    I always end up just being the person who doesn't contribute any thoughts, but just does the mindless work that's easy to do. I don't feel like I've earned my grade in those situations.

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

    What is your go-to action for checking if a library is mature and/or suitable for your needs? A review/rating system for modules of sort?

    Posted: 28 Feb 2018 10:14 PM PST

    Language and platform agnostic

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

    Help getting a circle draw program to run

    Posted: 28 Feb 2018 10:12 PM PST

    import processing.core.PApplet;

    public class DrawingThings extends PApplet { float[] xCoords; float[] yCoords;

    public void setup() { size(600, 600); xCoords = new float[50] yCoords = new float[50] for (int loc = 0, loc < 50; loc++) { xCoords[loc] = (float)(Math.random()*600); yCoords[loc] = (float)(Math.random()*600); } } public void draw() { background(220); ellipse(xCoords[0], yCoords[0], 100, 100); ellipse(xCoords[1], yCoords[1], 100, 100); ellipse(xCoords[2], yCoords[2], 100, 100); } 

    }

    submitted by /u/QxUAS_op3-3
    [link] [comments]

    How to removeBack from a doubly linked list?

    Posted: 28 Feb 2018 05:59 PM PST

    It tell's me I dereference a NULL pointer. I have marked where the error occurs. https://pastebin.com/3tNP4Q2T

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

    What are some use cases to choose .NET core?

    Posted: 28 Feb 2018 09:26 PM PST

    Is it like choosing between Java or C#, or is it more than that?

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

    How can I automatically install drivers for my device? (Xbox360 wireless adapter)

    Posted: 28 Feb 2018 05:32 PM PST

    So every time I plug in my X360 wireless adapter I have to go into device manager and manually install the drivers. Would there be a simple to do this by running some sort of program or batch?

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

    How to do higher order function questions

    Posted: 28 Feb 2018 08:29 PM PST

    I am currently learning how to do higher order functions. As much as I can understand the pattern without any issues, I am stuck on writing the pattern out into code. Please take a look at the question provided and let me know what is the proper way to tackle such a question. I'm also not shamelessly asking for answers just so I can submit an assignment, this is all self-revision with answers provided, I just can't understand the solution.

    So for instance, we have an alternating series.

    t11(n) = 1 - 2 + 3 - 4 + 5 - 6 ... n #11 just means alternating 1 each, 1 positive and 1 negative. t21(n) = 1 + 2 - 3 + 4 + 5 - 6 ... n # Hope you get the idea, this is another example to clear things up. 

    So my question is, how do I start on such a question. I have listed down the cases, and I also have the format of the higher order function given in the question.

    def make_t(i,j): return make_f(A,B,C) 

    In case you guys were wondering,

    A = lambda n,x: n-x+1 B = i C = j 

    If you got through the long wall of text, thanks and I'll appreciate any help that you guys might provide!

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

    Why is this line of code returning a " 1.#INF0000 " value?

    Posted: 28 Feb 2018 01:27 PM PST

    Hi , this line of code (it's in the Sin function ) sin= pow((double) -1,cnt+1) * (/top/ pow((double)x,2cnt-1) / /bottom/ Factorial(2cnt-1) ); is giving me me a 1.#INF00 value , i think it's because of the Factorial function but i have no idea , i'm sending the rest of the code

     #include <stdio.h> #include <stdlib.h> #include <math.h> int x,n; long double Sin(int x, int n); int Factorial(int x); int main() { printf("Value of x and n \n"); scanf("%d %d",&x,&n); printf("%Ld",Sin(x,n)); } long double Sin(int x, int n) { int cnt,tmp; long double sin=0; long double safe=0; for(cnt=1;cnt<=n;cnt++) { sin= pow((double) -1,cnt+1) * (/*top*/ pow((double)x,2*cnt-1) / /*bottom*/ Factorial(2*cnt-1) ); safe+=sin; } return safe; } int Factorial(int x) { int cnt; int resul=x; if(x<0) return -1; else { for(cnt=x-1;cnt!=1;cnt--) { resul*=cnt; } return resul; } } 
    submitted by /u/Gaybob_FaggotPants
    [link] [comments]

    Incrementing a for loop by a variable c#

    Posted: 28 Feb 2018 03:01 PM PST

    i am trying to increment a for loop using a variable, this is how my code looks

    for (int i = 0; i <= phrase.Length; a + i) //where a is a variable for the length of another variable // i get error code cs0201

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

    Simple Regular Expression Groups

    Posted: 28 Feb 2018 02:55 PM PST

    Hi everyone,

    I'm still pretty new to Python programing and Regular Expressions and I've exhausted my efforts Googling a solution for this. I have line of text that looks like:

    string string string 35 65 83 string string string 

    I want to extract each pair of numbers out individually in my script and assign them to a variable. I used:

    (\d\d) (\d\d) (\d\d) 

    This created 3 groups, but I can't seem to 'select' a group using \0, \1, or \2 appended to it. I can't seem to find what I'm missing.

    Many thanks for your help!

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

    I don't want to be a JS / Web Dev forever... where do I go from here?

    Posted: 28 Feb 2018 08:03 AM PST

    I'm currently a Javascript engineer, working right now on a React Native application (which has been awesome!).

    Working with React Native has taught me quite a lot about the mobile development field, but I'm not exactly thrilled with the prospect of learning Swift (because it's proprietary) or Java (because it's... Java?) as my next career step.

    I'm interested in Go and / or Rust, but I genuinely have no idea what they are really even used for - so I don't know if they are worth learning for my goals. All I really know is that I want to move beyond web applications in the traditional sense, I'm not really interested in spending my career doing front-end JS development or writing REST servers for companies, I'm much more interested in software architecture, hardware performance, and cutting-edge tech.

    I know there is a plethora of information out there, but that's almost exactly why I'm asking you guys: option paralysis. Please feel free to share your thoughts, berate me for hating on Java (sorryyyy), or whatever. :-)

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

    Xcode c++ error please help!

    Posted: 28 Feb 2018 09:41 AM PST

    Whenever I try to compile my program this error keeps on appearing! duplicate symbol _main in: /Users/ab/Library/Developer/Xcode/DerivedData/c++-amltsymzbtqelvcmmcopfgrmzhlk/Build/Intermediates.noindex/c++.build/Debug/c++.build/Objects-normal/x86_64/distance.o /Users/ab/Library/Developer/Xcode/DerivedData/c++-amltsymzbtqelvcmmcopfgrmzhlk/Build/Intermediates.noindex/c++.build/Debug/c++.build/Objects-normal/x86_64/calculater.o ld: 1 duplicate symbol for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I've tried everything please help! This is my code

    include <iostream>

    include <cmath>

    using namespace std; int main() { int x1,x2,y1,y2,p1,p2; double distance,s1,s2; cout<<"inter x1"; cin>>x1; cout<<"inter x2"; cin>>x2; cout<<"inter y1"; cin>>y1; cout<<"inter y2"; cin>>y2; p1=x2-x1; p2=y2-y1; s1=pow(p1,2); s2=pow(p2,2); distance=sqrt(s1+s2); cout<<"the distance is"<<distance; }

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

    Selenium/Python Jquery popup

    Posted: 28 Feb 2018 11:51 AM PST

    I am trying to click "OK" on my localhost for a popup window that is generated with Jquery. I tried switching to the window that didn't work

    handleName = driver.window_handles

    driver.switch_to.window(handleName)

    then I also tried doing a javascript popup but its a Jquery so it wouldn't work

    alert = browser.switch_to_alert()

    alert.accept()

    browser.close()

    what are my other options?

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

    Javascript Navigator Object Help?

    Posted: 28 Feb 2018 03:36 PM PST

    What does the code below do: navigator.getMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia;

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

    [SQL] Can you help me Optimize this horrifying SQL query?

    Posted: 28 Feb 2018 10:41 AM PST

    Hey guys I've wrote this horrible really long SQL query that was meant to rid a lot of work that we were doing in PHP and remove Thousands of smaller queries in a for loop. I would love to see if anyone could help me optimize the code a or maybe even do it an entirely different way who knows.

    Anyways here is a link to the Gist

    Keep in mind the tasks table contains 1 million + Data all the other tables are relatively small I'm pretty sure all the fields I'm joining on are either PK's or indexed ASC

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

    I want to understand how .cc, makefile, .h all integrate, namespaces integrate to form a project in cpp projects on github

    Posted: 28 Feb 2018 08:52 AM PST

    I am currently coding in cpp and I want to upload my coding practice in a way that looks like a project. Right now my codes just look like .cpp files with no structure in them.I want them to look something like this. Can someone point me to the tutorials on this and the basic structure which goes inside developing software on cpp.

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

    Are there no other easy to use languages on Windows?

    Posted: 28 Feb 2018 06:17 AM PST

    I don't know much about the Windows ecosystem but sometimes I have to do some scripting on Windows. Last time was 2 years ago.

    This time I need to monitor a CIFS share from a Windows client's perspective so it can't run from a Linux client as it normally would.

    And of course I went to powershell first and foremost.

    Are there no other languages that you can easily get started with on Windows?

    That require minimal bootstrap and are relatively modern for making both CIFS operations and HTTP requests? And be able to run in Task Scheduler, I guess this should work for most languages since you'd just call the interpreter from Task Scheduler.

    First one that comes to mind is Python of course.

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

    APIs -- what is your go to techniques to search for an api that fits your needs?

    Posted: 28 Feb 2018 09:57 AM PST

    I'm specifically looking for an api that let's a user access information about discovered planets.

    I'm fairly new to using APIs and I realized I have no idea where to start looking besides maybe googling NASA APIs.

    My question is: what are your go to techniques for finding an API that falls in line with your idea?

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

    Please help me with my first program using WebGL!

    Posted: 28 Feb 2018 05:11 AM PST

    So I have a project for school which requires we create a 3d scene with 10+ objects, all performing various transformations of my choice. The project requires I use WebGL, and it is written in Javascript. The scene needs to include animation, lighting, textures, and frame buffers. I was following a youtube tutorial I found and have gotten up to the point of being able to create a rotating cube that has a texture applied to it to make it look like a crate. I have added a couple of buttons to add some extra functionality, but am at a point where I can't figure out how to add another object and was wondering if someone might take a look.

    Youtube tutorial I was following: https://www.youtube.com/user/IntroTutorials1/playlists

    (the WebGL one)

    Link to the GitHub with this project: https://github.com/darobbins85/CMSC405-Computer-Graphics/tree/master/CMSC%20405/Project%204

    I appreciate any guidance that can be provided!

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

    If I have an image that is one solid CMYK value color, is there any way I can automate pulling out the RGB and HEX value of that image?

    Posted: 28 Feb 2018 08:19 AM PST

    I'm looking to automate retrieving the RGB and HEX values of specific CMYK colors. The idea would be to create files that act as swatches of CMYK values, and put them through some sort of automated process to pull out the RGB and HEX values. From there I'm open to how that information is gathered and stored (e.g a text file, filename, etc.)

    I'm not looking for an online cmyk to rgb converter that I have to enter values for every color. I'm hoping for a (in the long run) easier/smoother solution.

    Does something like this exist? Is this possible? How would I go about this?

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

    [QUESTION] I want to create a Minecraft mapmaking program with the features described in this post. Where do I start?

    Posted: 28 Feb 2018 06:58 AM PST

    Worldpainter is a program that allows you to custom sculpt a Minecraft world, using brushes that are basically heightmaps of mountains and hills and such. What I want to do is create a Worldpainter that randomly generates the terrain, for the lazies out there. Unfortunately, it has been years since I have written in Java, and I don't know where to start or what language to use.

    I will describe the features I want to add to this program and then if you know what programming language I should learn to create it, please tell me! I know it's not as simple as flipping through a book and then slapping some code into a document, but I am willing to work on this project for a long time. Without further ado, here are the features that I would like to add.

    You would choose how many blocks wide the map would be, 3000x4000, 8000x8000, etc.

    The program would allow you to create a map, like Inkarnate. You could randomly generate it or sculpt it yourself.

    Once you've created the map for the layout of the land, you would partition off certain parts of it to be different biomes. Desert biome, mesa biome, swamp biome, etc.

    You would place down mountain icons, and adjust certain sliders to indicate how rough/large/wide/tall the mountains would be. The same thing for mesas, plateaus, canyons, etc. There would be options to add rivers going down the mountain from a spring.

    You would be able to draw rivers and they would generate smoothly through the terrain, as long as you aren't going over a mountain or something.

    You would be able to adjust the terrain generation in the separate biome partitions. You could have two plains biomes, but one is filled with rough hills, and the other is smooth.

    The desert biomes would have dunes, the mesa biome would have the option of placing your own mesas or placing them manually, the swamp biome would have swampland, etc. In the desert biome you would have sand blocks, and in the swamp biome you would have mycelium/dirt.

    The ability to create custom biomes, and set the terrain generation and what block they are.q

    You would be able to create ground cover layers, with different minecraft plants. So you could create a swamp brush layer and then place it all over the swamp biome, and it would have ferns and flowers.

    You could create lakes.

    You could create forests with different types of randomly generated trees. Birch, dark oak, pine, etc. Just brush the terrain with the forest brush, and when generated, there will be a forest there.,

    The ability to import schematics, and add them to a ground cover layer. This would allow the user to use custom trees instead of randomly generated ones.

    The ability to have rocks randomly generate places in the terrain.

    The ability to paint blocks onto the land, for making roads and such.

    A brush that you can paint onto the map, and wherever you paint it, a cave is generated. There would be different types of caves, such as caverns, cave systems, narrow tunnels, etc.

    A 3D render window so that you can see what your terrain looks like before you export it to Minecraft.

    The ability to save unfinished projects.

    The ability to export the map into Minecraft. You could populate it with ores or choose to just have the underneath filled with just stone.

    The ability to export the map as a black and white heightmap.

    Basically, I want it to be Inkarnate but you can export the maps you make into Minecraft as good-looking highly-customizable terrain. I realize this is an ambitious project, but I really want to create this, not just for my own use, but for the MC building community.

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

    Newbie question on creating a simple script/macro

    Posted: 27 Feb 2018 10:11 PM PST

    Hi all! I don't know anything about programming past the most introductory level, so apologies if this is very basic or not the right place to ask. What I'm looking to create is a program/script/macro (I'll use the word "program" for now) that follows some basic logic to accomplish the following for me:

    First, I want to press a button, refresh a page/doc, or otherwise provide a singular input that lets it know that I'm ready for it to do its thing.

    Next, The program chooses a number between 1 and 4. If the number is 1, 2, or 3, it displays a single message. If the number is 4, the program instead looks at a list of text items that I have (which is currently 100 in quantity, but may end up being as large as 10,000 in the future), chooses one item at random, and displays it instead of the standard "1, 2, or 3" message.

    And that's about it! Like I said, super simple. I'm currently storing my 100-10,000 variables in a column in an Excel document. I am at least comfortable enough with Excel to navigate its menus and perform simple functions like "add all of the numbers in column X and output the sum in cell YZ", if that helps.

    Of course I'm not expecting anyone to create this for me, but if you can tell me where to look or what to search for, I'd greatly appreciate it. And for fun, feel free to take a guess at what I'm using this program for. :)

    Thanks!

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

    No comments:

    Post a Comment