• Breaking News

    Monday, January 13, 2020

    Does await on a call to an async method mean the same as a call to a synchornous method? Ask Programming

    Does await on a call to an async method mean the same as a call to a synchornous method? Ask Programming


    Does await on a call to an async method mean the same as a call to a synchornous method?

    Posted: 13 Jan 2020 08:20 PM PST

    What to do if technical debt is so big that an application becomes impossible to maintain?

    Posted: 13 Jan 2020 08:51 AM PST

    I'm not sure where to start, but the title is pretty self-explanatory. At work we have a very dirty Ruby on Rails monolith, almost everything in it done badly. I'm not going to go into details, but the app was built as if the causes in this article https://en.wikipedia.org/wiki/Technical_debt were used as a guidebook.

    Now it comes to the point of no return, we simply can't implement new features and can't develop the app further. We estimated the rework process and concluded that it will take not less than a year. And of course we discussed different solutions, like third-party apps integration instead of parts of our logic, still it is a year or more. We tried to decouple parts from the app to rework them separately, but it turned out impossible to do, because wherever we try to start refactoring it pulls the rest of the app.

    The question is, has anyone had the same problem? And what do you recommend to do? (killing myself is not an option btw, yet I perfectly understand that as a part of our team I must be executed for this atrocity) Probably it would be best just to freeze this app as it is and do not touch it anymore, continuing to develop new features as separate apps? Or maybe there is another solution. Thank you in advance.

    PS we have only 2 developers for this task ^_^

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

    HTML boostrap element alignment help

    Posted: 13 Jan 2020 05:57 PM PST

    Okay so I have a project I'm working on that has a 3x3 setup of boxes which I did by a simple div class of col-md-4.

    I have text inside of each box that I want to put in specific places, for example, I have an Item number that I want to put in the top right corner of each box but I'm a little uncertain of how to achieve this.

    Here is the code for each one of my "boxes", any help or feedback is appreciated, thank you!

     <div class="col-md-4" id="item"> <div class="row "> <div class="col-md-3 offset-md-3"> <p id="item-number">1</p> </div> <div class="col-md-5"> <p id="item-name">Snickers</p> </div> <div class="col-md-5"> <p id="item-price">1.85$</p> </div> <div class="col-md-5"> <p id="item-quanity">Quanity Left:9</p> </div> </div> </div> 

    Here is an editing view of what I am looking for. https://imgur.com/a/sfT6UYx

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

    Would you recommend vscode or xcode for a person new to programming?

    Posted: 13 Jan 2020 07:10 AM PST

    Any better design pattern for flowchart?

    Posted: 13 Jan 2020 09:29 PM PST

    Hi everyone, I'm sort of new to databases and Im Always getting confused with sql and nosql terms. What's the difference between them and what kind of projects would be good to be done with each of them?

    Posted: 13 Jan 2020 09:21 PM PST

    React Native the best way to go?

    Posted: 13 Jan 2020 07:50 PM PST

    We are small business owners that need some advice and guidance.

    We cheaped out in building an app (Apple/Android) that was outsourced and had a backend of our Wordpress website, built on Xamarin. Some important features are deliverability of push notifications, subscription in-app purchases and user database. It was supposed to be done in 3 months but the main functions are still not working great 2 years later, it was hard to find new developers to fix the bugs and it just felt like a mess. I felt it was time to move away from Wordpress and plugins.

    We want to have another go and rebuild the app, outside of Wordpress. If we want to look to the future if we ever want to expand and grow. This time it's with someone local and x3 the cost. The new frontend will be built using React Native Expo, the backend using Laravel and a custom admin panel using ReactJS.

    Not being devs, we would like to know if this is the best software/framework to build on? We have been told it has the biggest community and stays up to date with any updates Apple/Android require. Will we have trouble finding a programmer to change things up in a few years? Since the admin panel will be custom made, will that make it difficult for a new developer to take over if ever that happens? Are solutions for bugs easy to find? Should we consider a different framework?

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

    Searching for a new Personal Project!

    Posted: 13 Jan 2020 04:04 PM PST

    I am currently a Junior at Gonzaga University majoring in CS. They are offering a new course next semester that i am enrolled in that allows students to basically do a personal study. The class is completely self taught and we are supposed to check in every week with our progress. The idea is that we will teach ourselves something new that we can add as a Personal Project to our resume!

    I am here to ask for some of your ideas of personal projects i could embark on! I am already able to develop websites and apps! I suppose i am open to anything but i do need to be able to learn it and complete it in about 4 months time. I also would like it to be something impressive to employers and fun/useful for myself!

    Thanks!!

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

    How can I use Python to automate a Facebook search feature that uses javascript? (I think)

    Posted: 13 Jan 2020 07:48 PM PST

    I have a list of names and I would like to get a list of every user who is in a facebook group by iteratively inputting a name in the "Find A Member" section and seeing if it returns a result.
    Here's an example group: www.facebook.com/groups/NYCESN/members
    Where names that match the query are dynamically displayed.
    This is for a private, non-commercial, non-spam, one off purpose. I just need to block some people so I can advertise a room.

    I know BeautifulSoup but I'm not quite sure how to deal with the sophistication of FB…

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

    Can you describe your ideal search engine for me? I plan on making a search engine, and I would appreciate ideas to implement.

    Posted: 13 Jan 2020 07:32 PM PST

    This is a list that I have compiled of things I am planning on implementing.

    1. Data Encryption
    2. Privacy
    3. Built-In AntiVirus
    4. Easy to Use
    5. Customizable Toolbar (Calculator, Measurement Converter, Zoom, Bookmarks & Favorites, Erase Search History, Etc.)
    6. HTML, JavaScript, & CSS editor

    Above all else privacy and protection are crucial to me, secondly ease of use, backed by a few utilities to make life a bit easier. How about for you?

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

    Why do developers often recommend beginners to download and use homebrew?

    Posted: 13 Jan 2020 06:36 AM PST

    Currently, I'm trying to download python on my macbook. The instructions on https://docs.python-guide.org/starting/install3/osx/ say to install homebrew as a package manager.

    But why do I need this package manager and what exactly are the packages that it manages?

    Thanks for the help.

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

    What game engine should I use with C++?

    Posted: 13 Jan 2020 08:02 AM PST

    There's a couple games I would like to make. I'm pretty new to game development, and I do know to try some simple games before I do the other two. One will be a sandbox game, and one will be a dungeon crawling game with a quiz aspect. I want them to be free to play, and light weight. I would like them to be playable on as many platforms as possible, with Windows and Fedora being the minimal. My desktop is Windows, I do have a laptop I can convert to Fedora if needed.

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

    Why does master contain the files I created in another branch?

    Posted: 13 Jan 2020 01:40 PM PST

    So at my job we create branches to work on features, then merge it into the master branch later, much like other companies probably.

    Anyways, I created my branch "based off" the master branch, which is a feature in Azure DevOps that lets me copy all the stuff from master into master2 to start, then I used Visual Studio to "checkout" into master2, which I think just moved me to the master2 branch???

    I created a new folder and then checked back into master, but the folder I just made was in master!

    My plan was to checkout into master2, make all my changes, create a pull request, then merge everything into master, but now it looks like all my changes will be made directly to master???? Maybe I'm interpreting git checkout, or VS's version of git checkout wrong?

    (I'm just switching between branches using the bottom right dropdown menu with the branches then it displays a message saying "checking out master2 started...")

    Can anyone help me figuring out what's going on? Thanks!

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

    Can't make sense of a compile error - trying to use libpng in Visual C++

    Posted: 13 Jan 2020 01:18 PM PST

    I'm writing a command line project in Visual C++ which makes of libpng (which makes use of zlib). I'm statically linking, and as far as I can tell I've successfully built libpng16.lib and zlib.lib (both built by the project file that comes with libpng.

    I've added all the relevant directories and the two .lib files to my project (via #pragma comment(lib,), and I've added include "png.h" to my code.

    When I try to compile it, however, Visual C++ complains because there are some warnings from deflate.c (part of zlib), and these warnings are being treated as an error and so the build fails:

    1>c:\projects\zlib\deflate.c(2102): error C2220: warning treated as error - no 'executable' file generated 1>c:\projects\zlib\deflate.c(2102): warning C5045: Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified 1>c:\projects\zlib\deflate.c(2102) : note: index 'dist' range checked by comparison on this line 1>c:\projects\zlib\deflate.c(2102) : note: feeds memory load on this line 1>c:\projects\zlib\deflate.c(1867): warning C5045: Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified 1>c:\projects\zlib\deflate.c(1867) : note: index 'dist' range checked by comparison on this line 1>c:\projects\zlib\deflate.c(1867) : note: feeds memory load on this line 1>c:\projects\zlib\deflate.c(1992): warning C5045: Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified 1>c:\projects\zlib\deflate.c(1992) : note: index 'dist' range checked by comparison on this line 1>c:\projects\zlib\deflate.c(1992) : note: feeds memory load on this line 

    The thing is that I can't for the life of me work out where deflate.c is being added to my project. It doesn't seem to be referenced via png.h, which is the only thing I'm including from libpng.

    The recommended fix seems to be to disable the particular warning, but I've tried that (via #pragma and via the Property Pages) and it doesn't work. The warnings still occur and the error still causes the build to fail.

    I have to admit that I don't fully understand libraries and linking. Is it possible that these warnings/errors are somehow coming from zlib.lib? I see no such errors when I build it.


    Edit: looks like disabling the warning while building zlib.lib - even though the warning doesn't come up during build - got rid of the error when compiling the main project. So zlib.lib contains info that can point to deflate.c and cause errors? I thought .lib was fully compiled. Have I misunderstood? Although the problem seems to be fixed I'd love an explanation from someone who knows what's going on.

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

    For you, what are some of the hardest and most complex but at the same time efficient techniques that a full stack software developer is capable of perform and why?

    Posted: 13 Jan 2020 01:02 PM PST

    Is it a matter of style, or it is a matter of effectivity?

    submitted by /u/aroba-
    [link] [comments]

    Nightmare-inducing webpack problem

    Posted: 13 Jan 2020 11:50 AM PST

    This is a typescript project, and I'm using webpack to compile it it into a file. It compiles without issue, except warning me the file is large. When I open up the site in localhost, I keep getting unexpected token '<'. I've seen quite a few solutions online, but none seem to work, or they just don't apply to this case.

    ``` const path = require('path');

    module.exports = { cache: false, devtool: 'inline-source-map',

    entry: path.resolve(__dirname, './src/index.tsx'),

    output: { filename: 'bundle.js', path: path.resolve(__dirname, './dist/scripts') },

    resolve: { extensions: ['.ts', '.tsx', '.js', '.jsx'] },

    module: { rules: [ { test: /.(js|jsx)$/, exclude: /nodemodules/, use: [ { loader: 'babel-loader', options: { presets: ['@babel/preset-env', '@babel/preset-react'] } } ] }, { test: /.ts$/, exclude: /node_modules/, use: [ { loader: 'ts-loader', options: { configFile: path.resolve(dirname, './tsconfig.json') } } ] }, { test: /.tsx$/, exclude: /node_modules/, use: [ { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript' ] } }, { loader: 'ts-loader', options: { configFile: path.resolve(_dirname, './tsconfig.json') } } ] } ] } }; ```

    submitted by /u/kazy-kode
    [link] [comments]

    How do you auto-launch a web app on Android?

    Posted: 13 Jan 2020 08:04 AM PST

    So I'm building a receipt scanning printing app for a customer, and I have it mostly working the issue is I want it to startup automatically so users in commercial setting don't need to find the app icon and just turn on the device and go.. Can this be done.. I know in Windows you have a startup folder where you can put apps you want to run automatically...

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

    How can i programm an instagram bot

    Posted: 13 Jan 2020 11:49 AM PST

    I want to programm an instagram bot to comment in a specific post over and over again every like 6 minutes or so, with different comments and tagging different people, doing this with my different accounts in the same post, would be this possible, if so whats the best way to do it, thanks

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

    Excel Pandas and Hyperlink issue

    Posted: 13 Jan 2020 11:45 AM PST

    Below is the code that I'm working with:

    import pandas as pd
    df = pd.read_excel('//user/My Documents/file.xlsx')
    df['Report Link'] = r'\\user\Logs' + df['Report Link']
    df.to_excel('file.xlsx')

    My main purpose is to copy over a big excel sheet that has a bunch of hyperlinks to network locations for files

    when running the program - i get no errors and it looks right. When i go to click on the hyperlink in the new file it says Cannot open the specified file

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

    Is it good idea to maintain so many data structure on single machine?

    Posted: 13 Jan 2020 11:12 AM PST

    I'm trying to implement distributed web crawler just for fun, then I start reading about component called frontier that have two parts frontend and backend, in backend should have queue for each host name then I started wondering if this was the best solution (and if queue with single node is overhead regarding the memory) or should I store them as records on disk I'm using java

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

    Is it possible to make a virtual mous/keyboard?

    Posted: 13 Jan 2020 11:08 AM PST

    have one question is there a way to make a PC stand out (keyboard and mouse)

    Example pc 1 this one does not have mouse and keyboard

    pc 2. this one has mouse and keyboard. can this for example a usb cable be a fake / virtual mouse / keyboard?

    for remote control of pc 1?

    the example is just one example and explain what i am wondering;)

    submitted by /u/espen-norway
    [link] [comments]

    How should I keep my thread synchronised in this case? (C++, Windows)

    Posted: 13 Jan 2020 05:59 AM PST

    I've got a slow process that operates on a big 2D array of data. I can multithread it, but it's a bit complicated because on each row, you can only go as far as the previous row has completed, if you see what I mean.

    So if the first thread has finished 10 pixels on row 0, the second thread is safe to complete the first 10 pixels on row 1, but then it will have to stop and make sure that the first thread has finished more pixels before it continues.

    What I'm trying to work out is how to keep threads synchronised so that I can allocate the first X rows to X threads. There's a fair amount of state to keep track of per row, so I don't really want to have to split the rows into chunks and thread each chunk (which would be another way of doing it).

    Would something as simple as checking the previous thread's current x value be a sensible thing to do? Or would the waiting thread become unnecessarily busy and CPU-spinning if it does something dumb like while (previous_thread->x <= x);, and/or would it cause concurrency or speed problems if it's constantly accessing the variable like that?

    I've only just started learning about mutexes, locks, and condition variables, but they seem like overkill (I don't want to have keep locking/unlock or notifying every time a pixel is finished).

    Is there a particular pattern or principle I should be applying in a case like this?

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

    I need to find a software that allows me to match border patterns, or at least lets me code a tool to do that (visual explanation included)

    Posted: 13 Jan 2020 03:41 AM PST

    For a study on historical urban development, I need a tool that allows me to find specific patterns in property maps. But due to my lack of programming knowledge I'm not sure where to look for one and what terms to use to find it (I've had no luck googling). So I'll explain it visually.

    I need to find specific patterns of connections in complex grids. To start, the data I have tells me that the following border pattern between properties exists:

    https://i.imgur.com/S5r6oLM.png

    That is, I know that property A borders B, C, D and E to the East, and F to the South; that B, C, D, and E each border each other to the North and South; and that E also borders F to the West.

    But I don't actually know the size of each property and their borders. So in reality, the pattern may look like this:

    https://i.imgur.com/e5jv2po.png

    Or this:

    https://i.imgur.com/sePBR2O.png

    Etc.

    Now, I need to find the location of these properties on an old map. Imagine that it's this one, and that I've traced the property lines in svg:

    https://i.imgur.com/GNfQWql.jpg

    Ideally, the tool would identify the following pattern as compatible with my own, and produce a match (apologies for the jpeg):

    https://i.imgur.com/R3TvOft.jpg

    And voilà, I've found the location of these houses from the limited data I had.

    Any ideas on what software I could use to do this, even if it involves some coding?

    Thanks.

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

    Quick script/library for clicking through a site and submitting a form multiple times?

    Posted: 13 Jan 2020 03:19 AM PST

    Lets say I have an array of IDs that I need to manually go to a website, click a few things throughout the website, enter an ID, submit the form, and repeat. I was wondering if there was a library I use in Python or JavaScript that would allow me to do this? Even for a single ID, and we can assume that the Array or single ID will be hard coded. Currently I am using Puppeteer, but this seems to be quite slow especially if there are multiple steps.

    Thank you!

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

    No comments:

    Post a Comment