• Breaking News

    Friday, April 20, 2018

    Holy crap, developer died! How can I get into the BitBucket?? Ask Programming

    Holy crap, developer died! How can I get into the BitBucket?? Ask Programming


    Holy crap, developer died! How can I get into the BitBucket??

    Posted: 20 Apr 2018 04:11 PM PDT

    So we were paying a developer (not local) to write some software for us. All was going fine until he disappeared. Phone went to voicemail, emails just went nowhere. Since he's in Europe it's not like we could drop by and bug him either. After a few months we find out through Facebook that the poor guy died in a motorcycle accident!

    So now we're crapping bricks because the ONLY copy (as far as anybody knows) of our source code is in BitBucket and only he was configured as a user in it. We called them up and they said the best we could do would be if we could get access to his personal emails to reset the password, which is not going to be possible.

    Any more thoughts here? We pay the bills for BitBucket and it's in our company's name, but we just don't have any administrative users on the account. Are we SOL?

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

    Good, cheap, dead-simple diagramming tool?

    Posted: 20 Apr 2018 06:15 PM PDT

    I need a tool to draw some diagrams of system architecture and the structure of specific programs. I haven't found a tool that doesn't suck for my purpose. Any recommendations?

    Requirements:

    • It's possible to share document with others to make notes on and/or edit
    • There's some basic support for nesting: I can create a container, call it "Main Service," throw a package it, call that package "databasestuff" and then throw an interface within that package. All these components should move together and so on.
    • It's possible to attach notes to things

    Nice to haves:

    • Ability to nest diagrams -- I start with an overall view of the system, click a group of services to get a detailed digram of the services that make up that group, click a service to get a digram of the modules that make it up and so on.

    Things I would like to represent:

    • Services
    • Outward-facing RESTful API exposed by said services (including list specific endpoints)
    • Modules that make up a service
    • Outward-facing interfaces within a module
    • Kafka topics, with an explanation of the events getting published to these topics
    • Relationships between these various things, ideally with some explanation of the relationship
    • [OPTIONAL] A group of related services

    Is there any diagramming tool that does this sort of thing? Am I being to picky?

    Extra bonus feature: Ability to click on a kafka topic and bring up a digram that lists schemas of the events to be published to that topic.

    Edit: I'm realizing "dead-simple" may not be an accurate description of what I want. When I titled the post my wish list was much shorter than this.

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

    How often do you go through bouts of frustration?

    Posted: 20 Apr 2018 09:53 AM PDT

    I'm in my last semester of university and have been working part time as a developer for about 5 months. Sometimes there are hours - or even days - that go by where I feel confident in my abilities and able to do the tasks given to me with little or no help. But then at the drop of a dime, I may be given a task that I have no idea what it is or how to do it. I'll feel extremely disappointed in my abilities and very frustrated that im making little or no progress on something, even after asking for help several times. This period of frustration could also last for hours/days. Although I have no type of bipolar disorder, that's how it feels to be a junior developer at times. How many years of experience do you have and how often do you go through those frustration periods? And has it been lessening as time moves on?

    submitted by /u/TDN-ThickDickNick
    [link] [comments]

    Is there an IntelliJ plugin to show formal parameters' description? (Java)

    Posted: 20 Apr 2018 03:51 PM PDT

    Need help: Custom url with data from json and custom css and js files

    Posted: 20 Apr 2018 02:09 PM PDT

    I am making a Django app which will have custom urls say localhost/my_url. In this case, I aim to fetch data from a json file named my_url.json and add custom css and js files (my_url.css and my_url.js) to the html file.

    Note "my_url" part can be anything.

    I searched the web but could not understand how to achieve this.

    Problems/ confusions I am facing: How to build the routing for this case? How to add custom css and js files from python method when routing is determined?

    I am new to Django and have been stuck in this for a week. Please help.

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

    Follow Up Boss, Deputy, and a whole lot of confusion

    Posted: 20 Apr 2018 01:37 PM PDT

    I work for a team of about 12 real estate agents. The CRM we use is Follow Up Boss. We want to find a way to set lead schedules. Example: Agent x is on a lead shift from 9am-12pm during that shifts any leads that come in get assigned to me. Follow Up Boss does not have an ability to automate that. Every time the shift changes (4 times a day) I would need to go in an switch who is on shift. Our leads come in via email, so we tried using an email parser in Zapier to send it to Deputy (the scheduling system) so it could tell Follow Up Boss that Agent X is on shift so this lead needs to be assigned to them. We are open to other programs for scheduling or whatever is needed to make it work, but we are not willing to switch our CRM from Follow Up Boss. HELP. I have been trying to figure a way to make it work for 2 weeks. Deputy also allows for us to run our own custom apps through it, but I have no idea where to even being to create said custom app.

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

    Writing a simple .NET app that runs a windows command and return result in a window

    Posted: 20 Apr 2018 06:14 AM PDT

    I have no experience with coding. I'm able to run cmd and powershell commands but the result appears in their respective window. I would like to have a super simple app with an input box and the result will appear in a popup window.

    I have already installed Visual Studio Code.

    Thanks!

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

    Aggregating Website Data

    Posted: 20 Apr 2018 08:23 AM PDT

    I have no programming experience and am looking for some insight on the possibility/legality of aggregating data from a county website. This website is for construction permit tracking and once a permit # or address is entered into a form fill on the website, individual project data is displayed for each construction project. Is there a way that this data can be exported/aggregated from the website into a database file type like excel? If so, is there any legal implications of doing this considering that all information is public information available to anyone? Let me know if any additional information is required on the website to provide feedback.

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

    Is there such a thing as objectively good code?

    Posted: 20 Apr 2018 12:23 PM PDT

    Why windows 10 is slower than win xp or 98, even though the hardware is 10 times better?

    Posted: 20 Apr 2018 02:12 PM PDT

    I'm a long time windows user (98, xp, vista, 7, 10). Recently I bought a laptop with win 10 preloaded. The laptop is idea pad 320 i3-6006U 2.00 Ghz 4 GB ram.

    My laptop is extremely slow. I'm doing essentially the same thing I've done for the past 15 or so years with this computer. That is, browsing net, watching videos, Skype and ms office. I'm finding it very difficult to understand why this new os is slower to do the same things I've done with xp or win 98. Mind that I'm running the laptop on best performance configuration,ie., no graphics features.

    What is the aim for win 10 development team? Did they not bother to give any performance boost. I'm feeling frustrated when my pc hangs when I try to call someone in Skype. I couldn't take it anymore with win 10.

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

    SFML Mandelbrot rendering issue

    Posted: 20 Apr 2018 03:21 AM PDT

    Hi, I cant seem to figure out how to render out my Mandelbrot calculations on a window.

    Here is my code...

    void compute_mandelbrot(double left, double right, double top, double bottom, double start, double end) {

    varray.clear(); sf::Vertex vertex; for (int y = start; y < end; ++y) { for (int x = 0; x < WIDTH; ++x) { // Work out the point in the complex plane that // corresponds to this pixel in the output image. complex<double> c(left + (x * (right - left) / WIDTH), top + (y * (bottom - top) / HIGHT)); // Start off z at (0, 0). complex<double> z(0.0, 0.0); // Iterate z = z^2 + c until z moves more than 2 units // away from (0, 0), or we've iterated too many times. int iterations = 0; while (abs(z) < 2.0 && iterations < MAX_ITERATIONS) { z = (z * z) + c; ++iterations; } vertex.position = sf::Vector2f(x, y); if (iterations == MAX_ITERATIONS) { // z didn't escape from the circle. // This point is in the Mandelbrot set. vertex.color = sf::Color::Green; } else { // z escaped within less than MAX_ITERATIONS // iterations. This point isn't in the set. vertex.color = sf::Color::White; } varray.append(vertex); } } 

    }

    void slicer(double left, double right, double top, double bottom, int slices) { double start = 0, end = 0; for (int i = 0; i < slices; i++) { start = i * 60; end = ((1 + i) * 60); // Start timing

     //thrd.push_back(thread(compute_mandelbrot, left, right, top, bottom, start, end)); compute_mandelbrot(left, right, top, bottom, start, end); } //for (int i = 0; i < slices; i++) //{ // thrd[i].join(); //} 

    }

    int main(int argc, char* argv[]) { sf::RenderWindow window(sf::VideoMode(800, 800), "SFML-Mandelbrot");

    while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) { window.close(); } window.clear(); slicer(-2.0, 1.0, 1.125, -1.125, 16); window.draw(varray); window.display(); } } return 0; 

    }

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

    Long running GET request results in the connection dropping

    Posted: 20 Apr 2018 08:52 AM PDT

    I'm looking for input on how I can further troubleshoot this. Issue is distance related and I don't know enough about networking and internet architecture to troubleshoot this. Any pointers on where I can start researching would be great!

    Here's the problem:

    • I have a server in Virginia running my REST client.
    • The API I'm connecting to is in Oregon (3rd party vendor, I have no control over this)
    • The GET request sent from Virginia to Oregon can take anywhere from 5-10mins before the REST client gets a response back from the API, which is usually just a 200 OK or some other HTTP response code. No body.
    • I have a separate web console that I can watch to see when the API is done doing the job it was asked to do. When the API finishes it's task, that's when it's supposed to send a 200 OK back to the REST client that's waiting.

    What's actually happening is this:

    • REST client sends the GET request, from Virginia.
    • API starts doing job specified in the GET request. Finishes in 5-10mins and I can see this from my separate web console.
    • At this point, I'd expect my REST client to have gotten a 200 OK back from the API. But I get nothing! The REST client is just waiting and keeps waiting until it hits the timeout period

    I tried different REST clients. I get the same result with Insomnia, and two simple REST apps I made in C# and Go.

    If I send the GET request somewhere closer to the API servers, like Oregon, I always get a response back.

    The 3rd party API has no way of sending callbacks and no API calls exposed that would allow me to programmatically check the status of a job that I previously sent. I know, very annoying.

    Anybody have an issue similar to this before? What are some things I can look at to try and explain this behaviour and resolve it?

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

    Optimizing an expensive PostgreSQL query

    Posted: 20 Apr 2018 08:37 AM PDT

    I'm trying to optimize some expensive queries in a financial application. This query is run to get the account balances for a user based on summing all of their transactions. The query is as follows:

    select account_id, sum(deposit) - sum(withdrawal) as balance, sum(cleared_deposit)-sum(cleared_withdrawal) as cleared_balance, sum(deposit) as o_deposit, sum(withdrawal) as o_withdrawal, sum(cleared_deposit) as c_deposit, sum(cleared_withdrawal) as c_withdrawal from ( select t.account_id, case when transaction_type > 0 then sum(amount) else 0 end as deposit, case when transaction_type = 0 then sum(amount) else 0 end as withdrawal, case when transaction_type > 0 AND cleared=1 then sum(amount) else 0 end as cleared_deposit, case when transaction_type = 0 AND cleared=1 then sum(amount) else 0 end as cleared_withdrawal from transactions_280000 as t where user_id = ###### AND parent=0 AND ccparent=0 group by transaction_type, account_id, cleared ) as t0 group by account_id; 

    What it's returning are the following:

    balance = the actual overall balance of the account (regardless of cleared status)

    cleared_balance = the balance of transactions they have marked as cleared with their bank statement

    o_deposit, o_withdrawal = overall deposits and withdrawals (for other calculations)

    c_deposit, c_withdrawal = cleared deposits and withdrawals

    These are the following columns in the sub query:

    transaction_type is an integer. 1 = deposit, 0 = withdrawal

    amount is a numeric holding the amount of the transaction

    cleared is an integer for the status of the transaction. 0=uncleared, 1=cleared

    parent, ccparent are column restrictions necessary to get the correct subset of transactions

    account_id an integer relating to an accounts table id

    Here's the explain analyze from the query:

     QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------- HashAggregate (cost=35653.36..35653.98 rows=78 width=132) (actual time=2501.877..2502.054 rows=271 loops=1) Group Key: t.account_id -> HashAggregate (cost=35652.15..35652.77 rows=78 width=18) (actual time=2500.908..2501.283 rows=523 loops=1) Group Key: t.transaction_type, t.account_id, t.cleared -> Bitmap Heap Scan on transactions_280000 t (cost=234.34..35562.92 rows=25495 width=18) (actual time=47.726..2480.269 rows=23696 loops=1) Recheck Cond: (user_id = ######) Filter: ((parent = 0) AND (ccparent = 0)) Rows Removed by Filter: 14 Heap Blocks: exact=6639 -> Bitmap Index Scan on transactions_280000_user_id_key (cost=0.00..233.07 rows=25987 width=0) (actual time=45.965..45.965 rows=23726 loops=1) Index Cond: (user_id = ######) Planning time: 0.840 ms Execution time: 2502.285 ms 

    The transactions_280000 has several million transactions in it total. The table has the following indexes:

    Indexes: "transactions_280000_unique_pkey" PRIMARY KEY, btree (id) "transactions_280000_user_ccparent_idx" btree (user_id, ccparent) WHERE ccparent > 0 "transactions_280000_user_date_idx" btree (user_id, date) "transactions_280000_user_id_key" btree (user_id) 

    The query gets extremely slow for users who have large amounts of transactions entered into their accounts. For example, the user above had over 23,000 transactions.

    Any thoughts on how to optimize this query?

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

    Tool to check "conventional commits" ?

    Posted: 20 Apr 2018 01:04 AM PDT

    Hello World,

    Is anyone aware of a cli tool to check the conformity of a commit message to the conventional commits specification ? (https://conventionalcommits.org/)

    My googling has so far been unsuccesful :)

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

    Octave Mobile Problems

    Posted: 20 Apr 2018 02:48 AM PDT

    I have Octave app form Corbin Champions and I'm doing a Coursera Octave Assignment and I keep getting sh: 1: curl: not found when submitting. Is this cURL package I need and how do I install it on android?

    I mean if I just download it how do I hook it up to the app? Is there any other sites for downloading cURL since their site is acting up.

    *Computer broke; Octave on mobile instead

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

    How fast is quicksort and quicksort3 (int sorting)

    Posted: 20 Apr 2018 06:15 AM PDT

    So, I am writing my own int sorting algorithms (in C#) and I would like some times to compare for quicksort and quicksort3. How fast (in ms if possible) are quicksort and quicksort3 when sorting:

    10 elements

    100 elements

    1,000 elements

    10,000 elements

    100,000 elements

    1,000,000 elements

    submitted by /u/Code-cube
    [link] [comments]

    Performance improvement on Linux VM(heavy multi threaded app)

    Posted: 20 Apr 2018 01:54 AM PDT

    Hi after doing some profiling on the application I get the following stack of kernel calls, being at the top of the application. The rest of the execution is really low on CPU usage (between 0.x - 2%, green zone).

    The code (C++) on Linux (VM VirtualBox) time set to hpet (can be seen in the calls) The app (5 threads) dealing with 100 TXNs /second (TCP/DB writings...) Is there a way to tune the gettimeofday or is the hypervisor of Virtual Box really bad. CPU load on htop ... is around 30-40% on the machine. (4 Cores i7 + 6GB RAM)

    Samples: 128K of event 'cpu-clock', Event count (approx.): 32221750000 Overhead Command Shared Object Symbol

    • 14.52% app [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore
      • _raw_spin_unlock_irqrestore
        • 8.82% hrtimer_start_range_ns
          • 8.79% do_nanosleep
            hrtimer_nanosleep
            compat_sys_nanosleep
            sysenter_dispatch
        • 4.22% try_to_wake_up
        • 1.06% __wake_up_sync_key
    • 13.47% app [kernel.kallsyms] [k] read_hpet
      • read_hpet
        • *12.10% __getnstimeofday64 *
          • getnstimeofday64
          • 10.28% do_gettimeofday
            compat_sys_gettimeofday
            sysenter_dispatch
          • 1.70% ktime_get_real
        • 1.36% ktime_get
    • 11.67% app [kernel.kallsyms] [k] native_sched_clock
      • native_sched_clock
        • 11.67% sched_clock
          • local_clock
          • 9.92% tcp_transmit_skb
            tcp_write_xmit
            __tcp_push_pending_frames
            tcp_push
    submitted by /u/_freak_out_
    [link] [comments]

    How to seek for help with a project that is generally easy but very...niche

    Posted: 20 Apr 2018 04:52 AM PDT

    Hi guys. I am...the biggest beginner in coding. I have seen a few tutorials but I haven't had the time to try anything yet.

    So there is something I want to code. I can honestly imagine it being fairly straight forward for veteran coders but the idea itself is very niche. I think it has a big gap in the market.

    So the problem is, how do I ask for help when I'm afraid of giving away my idea. Someone with experience could probably make it in a month and boom. I'm done for.

    A general overview is it's a text based game with a lot of Windows and a large scale "chessboard". It will also have "idle" game mechanics mixed into it. And it has to be on a multiplayer server.

    I know a general grasp on coding is essential so thats where im starting.

    But any help is appreciated.

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

    Where to start with self driving robotic car

    Posted: 20 Apr 2018 02:46 AM PDT

    So basically I've a self driving RC project which has been accepted but I haven't done any sort of programming in AI and python as both are essential for this type of project also I'm done with the hardware part now for algorithm what should I learn and what steps should I follow

    Features : 1. Start from point A and stop at B 2. Object detection like signs,people etc 3. Suggest some more..

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

    Basic Website development help

    Posted: 20 Apr 2018 02:13 AM PDT

    Well basically my friend asked me to help him in developing a one paged website for his project, i am kind of an amateur in this since i recently started learning web development. I need if possible any help or advice to make my website look better.

    PS: I'm new to Reddit so I'm not sure how things work effectively here ! Im not even sure how i can upload my html file here >.<

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

    MACHINE LEARNING RESOURCES???

    Posted: 20 Apr 2018 10:44 AM PDT

    Hey I was very interested in machine learning and believe I know the math needed and was wondering if anyone knew any text based resources

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

    Help with code

    Posted: 19 Apr 2018 10:13 PM PDT

    The problem with my this code is that it runs perfectly on dev c++ but on visual studio it gives me and are where it says "needs constant".

    include <iostream>

    include <fstream>

    include <streambuf>

    include <bitset>

    using namespace std;

    int main() {
    //Read from text files ifstream file("plaintext.txt"); ifstream key("key.txt");

    //Load text files into string string str((istreambuf_iterator<char>(file)), istreambuf_iterator<char>()); //Declare unsigned 7 bit bitset arrays bitset<7> keyVal; bitset<7> original_bits[str.size()]; bitset<7> permuted_bits[str.size()]; bitset<7> ciphertext_bits[str.size()]; //Read key from file for XOR computation key >> keyVal; //Store converted base 10 ASCII values into bitset array for(int i = 0; i < str.size(); i++) { original_bits[i] = bitset<7> ((int) str[i]); permuted_bits[i] = original_bits[i]; } //Permute plaintext bits permuted_bits[0] = original_bits[2]; permuted_bits[1] = original_bits[5]; permuted_bits[2] = original_bits[6]; permuted_bits[3] = original_bits[4]; permuted_bits[4] = original_bits[1]; permuted_bits[5] = original_bits[3]; permuted_bits[6] = original_bits[0]; //XOR Permuted bits with key to get CypherText for(int j = 0; j < str.size(); j++) { ciphertext_bits[j] = permuted_bits[j] ^= keyVal; } //Output ciphertext bits cout << "Ciphertext = " << endl; for(int k = 0; k < str.size(); k++) { cout << ciphertext_bits[k] << endl; } return 0; 

    }

    The error happens right under the dot at str.size() in

    bitset<7> original_bits[str.size()];

    bitset<7> permuted_bits[str.size()];

    bitset<7> ciphertext_bits[str.size()];

    Under the dot it says "array needs a constant" yet in the dev C++ ide it runs fine with no errors. Any help?

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

    No comments:

    Post a Comment