• Breaking News

    Tuesday, April 2, 2019

    Good programming blogs I can get in to? Ask Programming

    Good programming blogs I can get in to? Ask Programming


    Good programming blogs I can get in to?

    Posted: 02 Apr 2019 05:53 PM PDT

    Ive been wanting to get into reading some programming blogs. I am just getting into it so preferably something lighter.

    Topics I am interested: Software Engineering, iOS Dev, Python. Would love to find these blogs but other topics are welcome too. Thank you

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

    How would one go about creating a virtual replica of a place?

    Posted: 02 Apr 2019 09:04 PM PDT

    Feedback on failed technical test

    Posted: 02 Apr 2019 08:02 PM PDT

    [Serious] What are your thoughts on the idea that programming/coding is just one of those things you had to get into as a kid, otherwise if you try to learn it as an adult, you won't be that good at it?

    Posted: 02 Apr 2019 07:35 PM PDT

    I'm asking this from a devil's advocate position, don't worry. I don't actually think this and believe it's complete bs. But I will say that at my university, not only have a lot of the CS and Physics majors been coding since they were kids, they have this complex where if you don't understand something about the code you're writing or a program they wrote, they'd rather laugh at you in a condescending way than explain what's going on. And sadly, it's quite a lot of them.

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

    Send string though bluetooth (C#)

    Posted: 02 Apr 2019 08:21 AM PDT

    I am trying to receive data sent from my phone though bluetooth in a C# program. this is what i have so far: https://gyazo.com/df5610e21d88c03adb02c5c98fb1e891 I have an error on this line: btClient.Connect(btEndpoint); and it says: System.Net.Sockets.SocketException HResult=0x80004005 Message=The requested address is not valid in its context 4827EA454BF7:000000000000000000000000500b34fb im assuming this is something to do with the guid but I have no idea. Help is appreciated.

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

    Getting 102 errors when I add a class as a friend class in a nested class with Visual Studio 2019

    Posted: 02 Apr 2019 09:55 PM PDT

    This class

    template <class T> class Iterator { private: Node<T>* v; Iterator(Node<T>* u) { v = u; } public: T& operator*(); bool operator==(const Iterator& p) const; bool operator!=(const Iterator& p) const; Iterator& operator++(); Iterator& operator--(); }; 

    is a nested class of this class

    Template <class T> class List : public Node<T> { public: List<T>(); ~List<T>(); Node<T>* Get(int index); void InsertHead(const T& Data); void InsertTail(const T& Data); void Insert(int index, const T& Data); int search(T Data); void RemoveHead(); void RemoveTail(); void Remove(int index); void print(); virtual bool isEmpty(); virtual bool isFull(); Iterator<T> begin() const; Iterator<T> end() const; protected: Node<T>* head; Node<T>* tail; int size; }; 

    when I add friend class List to the end of the Iterator class, I get 102 errors such as

    Severity Code Description Project File Line Suppression State

    Error C2182 'List': illegal use of type 'void' 261

    Is my code just plain wrong? or is it a bug

    I'd past the entire source but its really long.

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

    Trying to round a string that has a comma in it [python]

    Posted: 02 Apr 2019 09:37 PM PDT

    I am making a price ticker for reddit. Everything is working fine, but the API that it derives the price from has 4 decimal places, and a comma in it dividing the thousands.

    I am just trying to figure out how to round the number to either 2 decimals, or a whole number. So far I have tried the round() function, which does not work because of the comma. I was able to remove the comma, but it still won't let me use the round function.

    def main(self): req = requests.get('https://api.coindesk.com/v1/bpi/currentprice.json') req = req.json() dollar = '1 BTC = $' + req['bpi']['USD']['rate'].replace(',' , '') 

    Any ideas?

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

    I have a usecase that I can't think me way out of.

    Posted: 02 Apr 2019 08:59 PM PDT

    So we're using selenium to scrape data from an our extjs webapp. This app uses tables all over in different ways but since it's extjs they all follow the same rules. Like the CSS classes to define it, the fact that extjs only renders what the user can see plus a few rows for scrolling, the weird way it renders tables that are grouped (the group and the first member of that group are one sub table, each additional row in the table are new subtables) like I said lots of shared idiosyncrasies.

    So we wrote table parser in selenium to handle this stuff. And if every cell has text are parser works fine. I don't care if it's a date or zipcode were fine with a list of strings. The problem are cells that are specific to one table to another. In table X cell 5 in each row is a image of a check box for booleans. Cell 4 in table Y uses background color to convey a status. And neither have the same ammount of cells. So depending on the grid and cell were looking at we have to get different data, text, image name, background color. So if it's an green colored cell we'll parse the background color to a sting hex string for that entry in the list of values. if it's a checked box we'll put the string true in that field.

    I don't want to write the same parser many times when the only thing that is different from one table to another are how we get the text for that field.

    So do I make the table parser an abstract class and simply override the get row method for each type of table parser?

    How do I define this object? If it were a list of lists the first entry would be the header list of values, the remaining items would be each list of parsed strings. im also not sure if I like the idea of a list of lists of strings. I guess it could be a list of maps. Im not sure if that's any better.

    I dont know why I can't think my way through this. Any help would be appreciated as long as it's not the kind like "stop using extjs" or "buy tool Y" stuff like that. I don't have a any control of that stuff. Im just a worker bee.

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

    Why do some languages (Java) not allow for arrays to change sizes, while others can?

    Posted: 02 Apr 2019 08:08 PM PDT

    My understanding is: Java does not allow for arrays to change size, you have to declare the size beforehand. This allocates a certain amount of memory for that array, and that memory is sequential, so expanding the array would be impossible because it's likely the next memory "cell" is used.

    But, why do other languages allow that array to change sizes? Why can other languages have arrays that go from 1 element to 100 elements back to 1 element? How are other languages arrays fundamentally different to be able to be resizeable?

    Also, follow up question would be which one is better for efficiency, if there is a "better" one?

    Thanks!

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

    [C++] '+' operator overload problem

    Posted: 02 Apr 2019 06:19 PM PDT

    EDIT: So I know when it broke. When I created a deep copy constructor which has nothing to do with this! The two lists I am trying to add are being created from scratch and have not been copied from something else so I am not sure how the copy constructor is affecting this!

    EDIT2: So it's fixed. The issue was in my copy constructor. I don't know what the issue was but I did it an another way and it works now.

    So my '+' operator overloading function was working absolutely fine until it broke for reasons beyond my comprehension. Although I'm a newbie, I think I did it the right way considering it was working at a point and it wasn't touched!

    So it's a free function(not in the List class) and what it does is not important...

    List operator+(List const &a, List const &b) { //some irrlevant code here; cout << finalList; // Overloaded output operator shows that finalList is exactly what I want it to be! return finalList; // I return the same list but the program crashes when I try to add two lists via '+' } 

    So the problem I am guessing is in the return. When I try to List1+List2 in main(), it just crashes. Was working fine earlier.

    Any ideas what the problem is? Thank you for reading!

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

    What are the basics for a javascript interview?

    Posted: 02 Apr 2019 10:09 AM PDT

    So I'm interviewing for entry level UI role. The interview is on javacript. I'm fairly experienced in interviewing for entry level ish roles, but I've never used javascript specifically on an interview. I know other languages well, but javascript is not really my strong suit, although I've done a couple projects on React/javacript/etc, javascript still remains somewhat of a mystery.

    I'd like to know what are the basics I should know going into the interview? The gotchas? What are the important things from the basics - midlevel knowledge? Any help would be appreciated.

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

    Scheduling assignment briefing help

    Posted: 02 Apr 2019 03:54 PM PDT

    Hi, so I've got a scheduling assignment whereby I need to implement a process scheduler. However, I'm not sure if its just me but I seriously can't get my head around the brief. Here's the brief:

    A company has developed an operating system that uses a multi-priority level queues strategy to schedule processes and use the Shortest Job first strategy to schedule processes inside each queue. However, the performance of the systems using this OS deteriorates dramatically when the number of high priority tasks increases. That means processes with low or mild priority do not get a chance to be executed. Also, as a system frequently receives more processes with small burst time, processes who need long burst time suffer from CPU starvation/long waiting time.

    So, in order to improve the performance of the system, you have been asked to analyse and improve the process scheduler in this OS. To do so, you need to propose a strategy/an algorithm that can avoid starvation situation for mild and low priority processes in multi-priority level queues strategy as well as long waiting time for the large processes in each queue.

    So what I've gathered is I need to create a process scheduler and I'm guessing use a multi-priority level queue (already confused as not learnt this and hardly anything on it online, so assumed a multilevel feedback queue??) Which uses a SJF strategy ( second confusion, how do I implement 2 scheduling strategies as one program??) Then I assume I alter it to remove the starvation problem.

    Any help or guidance would be extremely grateful!!

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

    Python Beginner

    Posted: 02 Apr 2019 03:09 PM PDT

    What would be the preferred method to effectively learn python whether it be books or a website. I want to focus mainly on how to become a pentester and/or a hacker. Any advice on that is also helpful.

    Many thanks :)

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

    Matching

    Posted: 02 Apr 2019 07:38 AM PDT

    Hey I was just wondering if someone here could point me in the right direction. I'm looking to implement a way to make an appropriate set of matches based on weights. So for example

     x1 x2 x3 y1 85 65 20 y2 70 30 20 y3 15 20 70 

    Which would produce pairs: (x2, y1), (x1, y2), (x3, y3)

    So the y values are in competition. The respective pairs aren't matched with simply the highest value. The matches produced are the best fit accross all matches. If anyone gets my drift? Not looking for code specifics just what kind of strategy to move forward with this.

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

    I’m having trouble understanding pointers in my computer science class. Is it vital to become familiar with pointers or should I not worry about it too much?

    Posted: 02 Apr 2019 01:16 PM PDT

    Programs/Creating a programs to analyze lyrics

    Posted: 02 Apr 2019 09:32 AM PDT

    I'm a senior in Communications in college and I think for my final project I want to analyze different eras of music using lyrics and instrumental credentials. What kind of software is there to do this or what can I do to create something that does this?

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

    Dialogflow SDK

    Posted: 02 Apr 2019 04:48 AM PDT

    Is it possible to program a custom dashboard that displays dialogflow using sdk that shows things that can be edited and saved without the existing design and dialogflow branding?

    Thank You so much.

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

    [C#] how do I prevent a user from entering string spaces?

    Posted: 02 Apr 2019 04:31 AM PDT

    this is what I have:

     if (userVar == " ") { Console.WriteLine("stop"); } 

    ok but that only handles it for one spacing. what if the user presses 2 spaces, 3 spaces, 100 spaces in the console, how do I make an if statement for all of those?

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

    List of topics in programming in order to create apps

    Posted: 02 Apr 2019 04:16 AM PDT

    What are basic and experianced level topics in programming to be familiar with in order to be able creating apps smoothly and independently as well as complete (be prepared for any basic needs, except specialistic requirements)?

    LIST:

    I think that good programmer that want to be able to make a great application independently or supervision the work of other programmers at bigger projects would be need to know in details or not, but the topics like:

    - programming language

    - UI framework (in general, because there is plenty of ways and technologies to create GUIs)

    - IDE

    - 3rd party available libraries

    - design patterns, antipatterns

    - unit testing

    - some security concepts, cryptography

    - something about networks (protocols, ip, layers, something more?)

    - databases

    - regex

    - working methodologies like agile (I do not like this actually)

    - ... what more?

    I ask you what other concepts / issues / tools etc I should know about or learn. And for what spent most focus at?

    WHY I ASK:

    I am around commercially 2.5 years experianced developer in .NET, I am mainly focused on backend, but I do know XAML and WPF so I can make (maybe not so pretty) but full apps alone. In the close future I would like also to be able to produce smartphone (probably via Xamarin) and web applications (probably via ASP.NET CORE 2, eventually ASP.NET CORE 2 MVC). I think to go for Microsoft developer certification, one by one.

    I have a lot of ideas that I want to produce as an applications, but I have a problem. Some time ago I started some interesting projects, some I have finished and at some I have got stucked at one moment. It gave me experiance that I needed to start working commercially, but as I remember I did lots of things wrong and it had to be rewrited to go further sometimes, and in general I had weak basics, so to produce an app it took me a lot of time. Part of this was so specialistic knowledge which I would never be full with, but part of this was because of lack of basic knowledge.

    So I decided to stop doing projects of my ideas for some time and learn basics well, so after time I would be able to produce applications faster and with better architecture in mind, so it would not stop me after some time and I would be able to make realisation of my ideas fast and smooth as I can (accepting specialistic problems). Then I spent too much time on learning too many things I guess. Now I would like to set some borders for the next year of learning and then come back to producing my ideas as the applications and rewrite my old apps.

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

    How to do Git & Docker tagging from a Jenkins multibranch pipeline

    Posted: 02 Apr 2019 02:15 AM PDT

    I have a Jenkinsfile (multi-branch pipeline) that's supposed to run every time somebody commits something to any branch in Jenkins.

    My idea is that it triggers a build and every time the tests pass, it will tag the git repository and docker image with a new tag.

    Currently every build, builds a Docker image called application:latest. It would be nice to implement some tagging system in both the Git repository and the Docker images.

    So that my Github repo has 0.0.1, 0.0.2, 0.0.3 as tags. And that the Docker image is also pushed as application:0.0.1 to the Docker hub. Then also the latest tagged build, should not just be called application:0.0.3, but also application:latest.

    Any ideas how I can implement such a system with Jenkins in Github?

    This is my current Jenkinsfile:

    pipeline { agent any options { buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10')) } environment { DOCKER_CREDS = credentials('dockeruser-dockerhub-password') } stages { stage('Git clone') { /* This is needed for local development, because Jenkins uses locally pasted pipeline code in a textarea box and doesn't know where the Git repo is. This also means we have no multibranch, but that's no problem for local development. */ steps { git url: 'https://github.com/gituser/denpal', branch: 'feature/Jenkinsfile' } } stage('Docker login') { steps { sh """ docker login --username dockeruser --password $DOCKER_CREDS """ } } stage('Docker-compose') { steps { sh ''' docker-compose config -q COMPOSE_PROJECT_NAME=denpal docker-compose down COMPOSE_PROJECT_NAME=denpal docker-compose up -d --build "$@" ''' } } stage('Docker push images') { steps { sh """ docker tag denpal:latest dockername/denpal:latest docker push dockername/denpal:latest docker tag denpal_nginx:latest dockername/denpal_nginx:latest docker push dockername/denpal_nginx:latest docker tag denpal_php:latest dockername/denpal_php:latest docker push dockername/denpal_php:latest """ } } stage('Verification tests') { steps { sh """ docker-compose exec -T cli drush status """ /* make this work, syntax error, """-issue? if [ $? -eq 0 ]; then echo "OK!" else echo "FAIL" fi */ } } } } 
    submitted by /u/ujjain
    [link] [comments]

    [Visual Basic] [DataGridView] My datagridview doesn't show any rows unless highlighted. How do I fix this?

    Posted: 01 Apr 2019 09:53 PM PDT

    In Visual Studio 2015, I have a DataGridView displaying rows that come from a database. They show perfectly, except that you can't see any of the rows unless you highlight the fields. What's going on? I've checked the settings and saw that the table's font is good.

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

    No comments:

    Post a Comment