• Breaking News

    Thursday, February 1, 2018

    How do you secure your hosting from huge traffic and DDOS? Ask Programming

    How do you secure your hosting from huge traffic and DDOS? Ask Programming


    How do you secure your hosting from huge traffic and DDOS?

    Posted: 01 Feb 2018 07:24 PM PST

    I'm single fighter trying to create a eCommerce site with limited budget that will hosted on linode or vultr VPS. I learn from big company they use load balancing server with many ip/box or cloudflare to secure their site from DDOS. What do you think guys if you have limited money to start your business which one should i use or what is the best way to do this in cheaper price?

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

    How often is it okay to use Google?

    Posted: 01 Feb 2018 01:20 PM PST

    I've been a software developer for around 2, 1/2 years now (a year in Java) and the rest in PHP. I use a range of languages and I often find myself searching things online which I feel like I should know. Examples for the past week below:

    How to send a a file to an API using PHP

    How to get directory path of a file in PHP

    Best encryption for speed in PHP

    How to download a file from server using PHP

    I do feel as if I've now learned the above and that I understand but it sometimes feels that I'm asking very basic questions. Should I be focusing more on attempting problems on my own first?

    I've also tried reading man pages and docs in depth recently to get a clearer picture

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

    Can trying to run a .exe break eclipse?

    Posted: 01 Feb 2018 09:20 PM PST

    I just wrote a very simple program in eclipse. It compiled and worked just fine. I decided to try to run the .exe just to see what would happen and I got a bunch of errors. No big deal. I go back to eclipse and now I've got a bunch of errors. Eclipse crashes from "starter.exe." Simple pre-written hello world program is full of errors. "Make.exe" cannot be found.

    The only thing I did is try to run the .exe. Didn't think it would harm anything.

    I've done this before and the only way I could fix it was with a clean install of windows. I googled the "Error. Program "Make" not found in PATH." and spent hours upon hours doing all sorts of things with no luck.

    Any help would be appreciated.

    more details

    • Win 10 Pro
    • Latest version of Eclipse c++
    • JRE 9.0.4
    • Using MinGW for compiler
    submitted by /u/Miranda_That_Ghost
    [link] [comments]

    [Java] How to understand what's going on 'under the hood'?

    Posted: 01 Feb 2018 07:51 PM PST

    I've recently finished an awesome tutorial for Spring (John P. is the fucking best!) and it left this weird taste in my mouth. Even though I understand how to wire all this weird stuff together and host a website on a server and connect stuff to a database, I have absolutely no idea how all this works and why. It starts at "simple stuff" like the DI. There's some application context now that is able to control everything for me? Create classes and inject them at runtime? Is that so? Yes? No? Maybe? I have absolutely no way of knowing what is happening (and unfortunately it feels like that doesn't even matter). Instead I'm reading Stacktraces with hundreds of lines of red ink and then changing weird parameters in even weirder xml files using random namespaces...

    I guess it comes down to... "How would I do it myself?" If nothing else, is there at least some good way to understand the JVM or the bytecode any better? Any "lowest Java level" projects or books you can recommend? I'd like to be able to inject stuff myself or maybe create a white canvas on the screen myself without a simple JavaFx oneliner.

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

    Question about operator overloading in C++

    Posted: 01 Feb 2018 07:48 PM PST

    For one of my assignments, we're essentially designing a custom string class, and we're working on concatenating two different objects together, so we have to overload the + operator. I'm not trying to get help on my assignment, but I'm trying to understand how exactly the + operator works.

    This is how he has our method set up (which we are not allowed to alter, we can only add the actual code to perform the operation):

    DynamicString DynamicString::operator+(const DynamicString& other) const{ return *this; } 

    Then in our test cases, the first one is listed as:

    DynamicString s10 = s1+s2; 

    Where previously in the program, s1 is established as an empty string and s2 contains the characters "abc". In the DynamicString class that my instructor defined, he also defined a char pointer named 'cstr', which we've been using to dynamically allocate character arrays to store the characters.

    So my question is this - when I'm working with the code in the method, which object am I working with exactly? To my understanding, it would be the object s1, because the + operator is called directly after that. So whenever I use code with the 'cstr' pointer, I'm working with object s1. And whenever I do anything with 'other', I'm working with object s2. But if that's the case, and we have to return using *this (which again, to my understanding means that we return the object that was called. In essence, we would be returning s1), then do whatever changes are made get stored within s1? And how are the contents of s1 then stored within s10?

    Any insight that anyone can offer would be most appreciated. And if there's anything that I need to clear up, please let me know!

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

    Help with a problem, I'm completely stumped!

    Posted: 01 Feb 2018 07:44 PM PST

    Assume that x is a variable that has been declared as a double and been given a value.

    Write an expression to compute the quartic root of x. The quartic root of a number is the square root of its square root.

    EXAMPLES: For example, the quartic root of 16.0 is 2.0 because: the square root of 16.0 is 4.0 and the square root of 4.0 is 2.0. Another example: the quartic root of 81.0 is 3.0 because the square root of 81.0 is 9.0 and the square root of 9.0 is 3.0. Thus, to find the quartic root of a number you take the square root of the number and then take the square root of that.

    In this exercise you must find the quartic root of x in a single expression-- you must not write any statements. Also, you may only use the sqrt() function-- no other functions.

    (HINT: you will need to call the sqrt() function twice-- and you will need to pass the return value of one of those calls as argument to the other call. AND REMEMBER: write an expression, not a statement.)

    -I have tried answering this question 37 times, and honestly can't figure it out. It's the last question on my HW assignment, any help would be appreciated

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

    BluetoothLE issues with different androids

    Posted: 01 Feb 2018 07:23 PM PST

    I have two bluetooth devices that I connect to with my android app using BluetoothLE. I can connect to one of the devices on any type of phone I try however the second device is unable to connect to LG and Motorola phones across the board. The manufacturer of the devices says that Android 7 changed some bluetoothLE protocols? I'm not entirely sure I understand what could be causing this. I was hoping that someone would know

    1) what the issue is 2) any possible workarounds to get these devices connecting to LG and Motorola phones

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

    stumped by seg fault core dump

    Posted: 01 Feb 2018 06:59 PM PST

    I'm writing an image resizing program where I have to find the lowest cost vertical seem through an image and one of the tests for the processing of the image has a rotate left function that crashes everything with the seg fault. (oddly enough this doesnt happen on my friends mac while I'm using visual studio). for context, here is the relevant code:
      rotate func in processing.cpp (given in the proj, not changed)
     
    <{
    void rotate_left(Image* img) {

    // for convenience int width = Image_width(img); int height = Image_height(img);

    // auxiliary image to temporarily store rotated image Image *aux = new Image;

    Image_init(aux, height, width); // width and height switched

    // iterate through pixels and place each where it goes in temp for (int r = 0; r < height; ++r) { for (int c = 0; c < width; ++c) { Image_set_pixel(aux, width - 1 - c, r, Image_get_pixel(img, r, c)); } }

    // Copy data back into original img = *aux; delete aux; }>
      image init func in image.cpp:   < / void Image_init(Image
    img, int width, int height) {

    //Matrix red, green, blue; //Matrix_init(&red, width, height); //Matrix_init(&green, width, height); //Matrix_init(&blue, width, height); //Image init = {width,height, red, green, blue}; //*img = init; img->width = width; img->red_channel.width = width; img->green_channel.width = width; img->blue_channel.width = width; img->height = height; img->red_channel.height = height; img->green_channel.height = height; img->blue_channel.height = height; 

    }>
     
    the matrix init function:
     
    </ void Matrix_init(Matrix* mat, int width, int height) {

    mat->width = width; mat->height = height; 

    }>

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

    [C]Make a screaming button

    Posted: 01 Feb 2018 05:08 PM PST

    I told my friends that I needed something to make so I could practice programming in C, and one of them requested that I make a button that screams when you click on it. I don't really know how to make this so if someone could help that would be great.

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

    Connecting a Go server to a MySQL database

    Posted: 01 Feb 2018 01:05 PM PST

    So I'm trying to connect a server written in Go to a MySQL database, both of which are running in docker containers. My Go server is mapped to port 8080 and my database is mapped to port 3306. The server will serve the webpage when I connect with chrome and I can connect with the database through MySQL workbench. The issue is that the Server will not connect to the database. I'm using these lines of code to connect:

    db, err = sql.Open("mysql", "goadddb:goapppassword@/goappdb") if err!=nil{ log.Fatal("could not connect to server: ", err.Error) } 

    The code executes without any error, but when I run

    err := db.Ping() if err!=nil{ log.Fatal("ping failed: ", err.Error) } 

    The ping fails and the server stops running.

    If you need me to post any other details let me know.

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

    How do developers practically work/debug when a project takes many minutes to compile?

    Posted: 01 Feb 2018 09:13 AM PST

    I have a very minimal knowledge of C/C++.

    I'm installing an IDE called Codelite on Arch and the particular Arch package builds it from source, compiling every cpp file.

    Codelite, being a pretty big project, takes quite long to compile. It has been around 7-ish minutes and it is 40% done.

    What I'm wondering is how this would work when you're a developer of a project this size.

    If you make a tiny little tweak to a button, of course you wouldn't want to wait so many minutes for it to recompile again.

    I'm guessing that it would only compile .o files for .cpp files that actually are changed. Is this a feature of GCC/Clang/etc or do I need a separate utility to create a similar setup to this, where only changed files are recompiled?

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

    Need help with some Beginner-level Java

    Posted: 01 Feb 2018 04:36 PM PST

    This is for an assignment (Not sure if this is allowed or not), But I need to calculate and display the monthly bill for a customer who has the choice between 3 different data plans:

    Silver​: $15.99 a month; 3 GB's a month are included; $5 per each additional 1GB.

    Gold​: $29.99 a month; 6 GB's a month are included; $3 per each additional 1 GB.

    Platinum​: $39.99 a month; unlimited data usage.

    Here is what I have so far but I'm getting stuck on how to calculate the additional data charges as well as adding that to the total bill price.

    import java.util.Scanner; public class DataAssignment { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("What is your Data Plan? "); String plan = in.next(); //Customer enters plan double price = 0; System.out.println("How much Data Have you used? "); int data = in.nextInt(); //Customer enters data in.close(); if (plan.equalsIgnoreCase("Silver")){ price = 15.99; } else if (plan.equalsIgnoreCase("Gold")){ price = 29.99; } else if (plan.equalsIgnoreCase("Platinum")){ price = 39.99; } System.out.println("Monthly Bill is: " + price); 

    } }

    Any help would be appreciated. Thank you (:

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

    Could anyone explain how to create an object(enemy in 2d game) in the Unity 5 moving from left to right and disappearing after crossing the screen?

    Posted: 01 Feb 2018 04:28 PM PST

    Hello Could anyone explain how to create an object(enemy in 2d game) in the Unity 5 moving from left to right and disappearing after crossing the screen? Something like a bird flying over the map. I created an asteroid falling from top to bottom and disappearing after crossing the map, but I can't do the same for the object from left to right. I'll be grateful if someone could explain this step by step with the script.

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

    Can I still play my game?

    Posted: 01 Feb 2018 04:23 PM PST

    I have a game that I love called Ravenmark Mercenaries, it's an app on my iPhone. About a year ago the game makers shut the servers down. I still have all 500 mb of the game dl on my phone though, but there is no way to login. Can I still play somehow? It is primarily a multiplayer game so can I still play with friends via some weird software workaround? Willing to try anything really.

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

    [C++] Difference between | and || between ios modes in an ofstream constructor

    Posted: 01 Feb 2018 03:42 PM PST

    Hello. I have been writing a program that manipulates objects in a binary file and was discovering that I got different behavior on my write operations when using a single bar | vs a double bar || between the ios modes. For example

    ofstream myStream("Targetfile.dat, ios::binary|ios::out);

    vs

    ofstream myStream("Targetfile.dat, ios::binary||ios::out);

    If anyone can explain this I would appreciate it

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

    How much to charge for first program?

    Posted: 01 Feb 2018 08:37 AM PST

    I am a college compsci student. I work independently for a real estate investor of sorts, a property flipper. A lot of the work is just re formatting people to contact, names, numbers, etc. so my boss basically has said that if I make him code that automates part of the job, which I have already deemed is a do-able project, he will pay me. I just have no idea what an asking price should be.

    The main issue, I will be working on the program continuously after I have a working version. Considering this, how exactly should I charge him? I don't want to charge him a flat fee once it is working, because I will continue working on it after that so I want to make sure I get paid appropriately and you can't predict how much extra will go into it. Yet, charging hourly or continuously seems like overkill and just creates different problems, I would rather have a lump sum.

    Can I get some advice?

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

    Sent from r/findareddit... I want to automate building a playlist on YouTube

    Posted: 01 Feb 2018 01:37 PM PST

    I have a text document of 800+ songs. I have added the word "Topic" to the end of each song title because I want the video added to the playlist to be the automatically-YouTube-generated "Topic"-version of the song (that is usually the unedited, uncensored album version of the song) That "topic" detail is relevant later.

    So each line looks like "Song Artist · 1979 Topic"

    I want something to go through the list, copy each line, paste it in the YouTube search bar, select the first result, and add it to a playlist, and then move on the the next line in the list, 820 times.

    I have tried two macro recording extensions in Chrome (DejaClick and iMacros) but neither seem to be able to handle this. I have also tried playlist-converter-dot-net and roll-dot-io. Those both populate the list with (often low-quality, crapy-sounding 320p) music videos, not the "Topic" version of the song I want.

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

    What exactly is the point of source control binding in Visual Studio?

    Posted: 01 Feb 2018 01:04 PM PST

    For all intents and purposes, a solution bound to a tfs server works the same as with no binding. Other than not being able to check in and out from the solution explorer, what exactly is the point of binding?

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

    Where to learn about app creation?

    Posted: 01 Feb 2018 12:29 PM PST

    Continue with free teaching, or do this bootcamp to test my skills?

    Posted: 01 Feb 2018 08:35 AM PST

    I need some advice and input friends.

    I used freecodecamp for awhile. I've done everything I can possibly do on the site (I loved every minute of it). I also used sites like Udemy, Khan Academy, Udacity, apps that teach you skills, and I've learned a lot. EVERYTHING and ANYTHING i could find to learn more. Keep in mind, this is over the last couple years. I just kept finding more things to learn for free, read more books, bought books that teach me more, etc.

    I literally am obsessed with learning more about programming and coding. I get off my 9-5 job, and go home and work on my side projects. I love learning more languages and challenging myself. I've been designing websites and apps since I was probably 15/16 (Obviously very basic at first) and kept up with it until now (I'm 22). I haven't lost interest in it in the slightest.

    I had the intention of going to law school, so I got my BS in Psychology and BA in Philosophy. And then I had the epiphany: I hate this, and I love technology and coding. Why would I spend more money on a law degree I hate? I have minimal debt from my undergrad degree and I'd like to keep it that way.

    A local college that is well known offers a 'coding boot camp' (I know, cue the 'uggggggh'), and while I feel confident in my skills, I feel like this crash course might be good to test myself and see how I keep up while building my portfolio more and offer me more networking opportunities. They offer career services as well as three job fairs. Their graduates have been hired to nearby software and tech firms, and I've been in contact with all of them asking them questions about the program. In order to be considered for the course, I had to complete 3 coding-based tests to see where my 'starting point' was, and I excelled in all of them. Each student in this camp has an 'advisor' who is a grad student at the school in software engineering or something related, and they're available for me 24/7 to help me with my projects. It's a six month evening course that goes over things that I'm already proficient in, but also does projects in languages that I'm not super-powerful in.

    Until now, coding and development/design was a hobby for me - I did freelance work for many local companies and bosses of mine. I'd like to make the moves to make this a career. I updated websites for churches, organizations, etc. I enjoyed it, charged them little if anything, and it got me more experience and hands-on work. This helped me beef up my portfolio as well (the site is under construction right now as I'm updating it with a few new projects I have finished or else I'd link it.)

    I guess my question is should i even bother with the camp, or just continue using free resources to build my portfolio? I'm able to afford the camp, and I think it would be nice to be around like-minded people in a school-like environment, but I'm wary about it because if it's not necessary and I've already done so well using the free sites, I'd like to save my $8,000 and six months to work on a few more projects. So if I don't utilize this camp, what other resources should I check into other than the ones I've done before?

    I'm stuck, ANY input is helpful.

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

    Can someone give me a terminal walkthrough

    Posted: 01 Feb 2018 11:47 AM PST

    Hello everyone.

    Basically, I am playing fortnite on my Mac. I looked up ways to increase the performance and decrease the lag, and I was told that giving the FortniteClient-Mac-Shipping.app file priority would be a great trick.

    I did some research and I found that you can do this through a number of ways, but the apparent easiest way was by using the nice and renice terminal commands.

    I have experience in using terminal but I want to make sure that I do this right and so I was hoping that someone could give me a step by step on what to do and how to sod this correctly. I am not trying to break my Mac.

    Thanks guys!

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

    [Workspace] What do you use for an adjustable multi-monitor setup?

    Posted: 01 Feb 2018 11:16 AM PST

    Hi All,

    This is a developer workspace setup question. I've recently bought an adjustable "standing desk" setup for my office. I am a developer and I generally spend all day sitting which results in back-pain, leg soreness, etc.

    I have a 3 monitor setup (suspended on a rudimentary monitor tree). I would like to be able to sit or stand throughout the day however, my current monitor tree is a HUGE hassle to adjust (You need several different allen wrenches every time).

    My question is: Does anyone have a good suggestion for an easily adjustable monitor tree that supports more than 2 monitors?

    I am currently looking into the FreedomArm by ErgoTech. Any feedback is appreciated! Thanks!

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

    [Unit Testing] What would be a good naming convention for overloaded method tests?

    Posted: 01 Feb 2018 11:01 AM PST

    Hi there. I'm writing tests for an overloaded method, and I'm having a hard time coming up with a good name for the actual test.

    Let's say I have the following method (this is C# with xUnit):

    myMethod(string foo) { // some code } myMethod(string foo, string bar) { // some other code } 

    and let's say one test is as follows:

    [Fact(DisplayName = myMethod with valid foo should doSomething)] public void MyMethod_ValidFoo_ShouldDoSomething() { // test code } 

    How should I name other tests that test that same method but with overload?

    I thought on public void MyMethodOverload_ValidFoo_ShouldDoSomething() but that won't help if the method can be overloaded with more than one extra parameter.

    Another idea I had was like this public void MyMethodFoo_ValidFoo_ShouldDoSomething() for the first test, and public void MyMethodFooBar_ValidFoo_ShouldDoSomething() (and include that on the Display Name as well). Does it make any sense?

    Any tip or suggestion will be greatly appreciated!

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

    Adding NMEA library to Code Blocks

    Posted: 01 Feb 2018 10:14 AM PST

    I downloaded this library to use with my GNSS module and trying to add it to Code Blocks. It is not going so well.

    I tried following the provided instructions with no avail. I also tried manually dropping it into the MinGW include folder and linking it through the compiler settings. Still no luck. All the src files in the NMEA library are .h or .c. When I tried to link it on Code Blocks, all the available options are .h or .lib.

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

    Web Developer looking to do something on my free time that is different enough to be a potential career change.

    Posted: 01 Feb 2018 10:02 AM PST

    Hello,

    I'm a Web Developer that's been programming and developing both back- and frontend applications for the last 7 years. I'm not looking to do something new, something exciting that's different from Web Development.

    Could be really anything from games, crypto, apps... Whatever really. But I really want it to be a career possibility. I want to learn something new, I want to read new books and really get into something new and exciting. And since this is and will be a hobby of mine, it needs to be something manageable.

    Do you guys have any suggestions?

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

    No comments:

    Post a Comment