• Breaking News

    Saturday, July 11, 2020

    So you can just create an object by saying Person p; in C# ? Ask Programming

    So you can just create an object by saying Person p; in C# ? Ask Programming


    So you can just create an object by saying Person p; in C# ?

    Posted: 11 Jul 2020 06:16 PM PDT

    I've only seen this type Person p = new Person(); so far

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

    How to incorporate video-editing in react-native

    Posted: 11 Jul 2020 01:12 PM PDT

    How would i go about creating video filters and video splicing for an app in react-native?

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

    New Programmer having issues with Server Error (500)

    Posted: 11 Jul 2020 06:04 PM PDT

    Hello!

    I am a very new programmer and I've been following a Mosh Python tutorial: https://www.youtube.com/watch?v=_uQrJ0TkZlc. I'm stuck on the part where you add a product. When I try to submit name, price, stock, and image url around 5:45:25 in the tutorial, I get Server Error (500).

    I know it's a small issue but I feel like it would come up again later and I can't continue the tutorial without fixing it.

    I've looked online and changed Debug to false and added 'localhost', '127.0.0.1' to allowed_hosts in settings.py. I've tried other tips that should help with getting Server Error (500) but they don't seem to work.

    I would appreciate any advice or guidance! Thanks in advance!

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

    need help with javascript

    Posted: 11 Jul 2020 07:47 AM PDT

    Hi , Im literally first time coder. Im learning javascript as my first language then building on. Basically im trying to put my JS code to the console ( inspect element), But when im doing it it doesn't show. Im using visual studio code. Here is my code :

    <!DOCTYPE html>
    <body lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Section 2: JavaScript Language Basics</title>
    </head>
    <body>
    <h1>Section 2: JavaScript Language Basics</h1>
    <script>
    console.log('Hello World');
    </script>
    </body>
    </html>

    Can any expert tell me what i done wrong . I just want to see the special 'hello world' on the console :(

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

    How can I go about saving a high scores list on a basic web server? I only have access to a cpanel.

    Posted: 11 Jul 2020 05:57 PM PDT

    Hello,

    I have created a basic tetris javascript app and I want to be able to save high scores. If I were able to use django I could do this really easily, but I have no idea how I could go about doing this with what I have available to me.

    I don't really understand how I would run a server side script and from my research, you cannot use browser javascript to save files on the server.

    If somebody could give me some guidance, really just pushing me in the right direction.. that would be great. I am familiar with python and javascript, although I cannot use django on my cpanel.

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

    Programming languages using rust's lifetime/borrow approach

    Posted: 11 Jul 2020 05:31 PM PDT

    Hey,

    does anyone know if there are other languages attempting to use rust's lifetime/borrow approach to achieve memory safety in a systems programming environment (or other approaches than gc to achieve that)?

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

    Connect Azure hosted SQL database to Android app - What's the best way?

    Posted: 11 Jul 2020 04:19 PM PDT

    Hello all!

    I'm quite new to Android development, coming from Java & C++, and I am looking to make a simple app which connects to a SQL database I am hosting on Microsoft Azure and use it to populate a list on the app, with some simple functions for adding, removing simple objects.

    My understanding of the tools I am working with:

    SQLite is the library that is used in Android to work with SQL databases, so I should be able to connect to my database on Azure using SQLite.

    I should be able to connect to the SQL database similarly to how I could open a stream from a URL in java(?)

    However after looking online I believe there may be an issue with my understanding, and perhaps the SQL database on Azure should be connected using some Azure specific library or service. All of the code I have found on StackOverflow regarding SQLite is using a local file and all of the code and documentation from Microsoft for Azure which I could find uses their Mobile services system which seems overkill for my use, as it requires me to code a backend in node or .NET.

    So in short, my question is this: Is the best way to connect to a SQL database hosted on Azure from an Android client to connect via SQLite in a way vaguely reminiscent of connecting to a URL in Java.IO?

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

    Help with css/html!

    Posted: 11 Jul 2020 12:25 PM PDT

    The issue I am having is with my drop down menu. I used an ul list and I was trying to "hide" it until the menu icon had the mouse hovering over it from which there would be the menu and box that appears. there seems to be a list that acts how I want and an entirely unformatted list that does not. I am not sure what I have done wrong... any help is appreciated.

    Here are some pictures of my issue

    I know the drop down doesn't look fantastic, this is my first website while learning html/css. I would love to animate and do some better looking builds down the road.

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

    How are bots so efficient at skimming data like game keys from sites Reddit?

    Posted: 11 Jul 2020 07:27 AM PDT

    *sites like Reddit.... whelp I'm stuck with that title forever now.

    I started teaching myself basic data collection methods with libraries like Selenium earlier this year. I had to be very careful with how often I made requests to sites' APIs or pages since I didn't want to be an asshole (and they'd temp block my IP).

    But it seems as soon as anyone pastes a key to a game on reddit, somehow they're immediately gone. Someone posted a list of keys by accident and immediately took it down, only to realize all the keys were claimed already. How are the bots so efficient at this?

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

    Which programming language and editor is this?

    Posted: 11 Jul 2020 04:12 AM PDT

    Hi, have have two images of a computer screen, and I wonder what programming language it is, and which editor they use:

    https://imgur.com/a/U75eDoH

    I hope the link works, since it's my first time linking images through imgur

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

    Help with Ruby

    Posted: 11 Jul 2020 02:26 PM PDT

    I am trying to make coordinates for a Chess board. I have an array that is the board (part of Board class), with a vertex instantiated in each spot.

    board_array = Array.new(8) { Array.new(8) { Vertex.new } }

    I then created an 8x8 array of coordinates:
    LETTERS.map { |letter| [letter].product(NUMBERS).map(&:join) }

    This outputs:

    ["A1", "A2", ... ]

    ["B1", "B2", ... ]

    all the way to H8.

    I'm now trying to figure out how to get my initialized `@coordinates` variable (part of the Vertex class) to hold one coordinate. Right now if I do:

    `@coordinates = LETTERS.map { |letter| [letter].product(NUMBERS).map(&:join) } `

    it obviously sets each `@coordinate` to ALL of the values, which is wrong. I can't find out how to map/iterate one value to each spot of `@coordinate`.

    Any suggestions/hints? I'm want to understand this and not simply copy/paste.

    Thank you.

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

    Can anyone help me add labels to this MATLAB bar chart?

    Posted: 11 Jul 2020 10:04 AM PDT

    I've written this script to generate a bar graph. I want to add a data label inside of each column (probably white font) but I'm not sure how to go about it.

    y = [9 8 7; 6.5 7.50 8; 2.5 1 4]; bar(y) XTickLabel={'Concept 1' ; 'Concept 2' ; 'Concept 3'}; XTick=[1 2 3]; set(gca, 'XTick',XTick); set(gca, 'XTickLabel', XTickLabel); set(gca, 'YGrid', 'on', 'XGrid', 'off') legend('Weight 1','Weight 2','Weight 3'); title('Title'); 

    Does anyone know how to do it?

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

    Reading data from an image (phone camera) to read water level?

    Posted: 11 Jul 2020 09:48 AM PDT

    I'm curious whether i can programmatically take an image or real time view from a phone camera and observe something like a bottle being filled with water, and be able to keep track of the water until it hits a certain desired height within the bottle.

    I've been trying to google resources related to using the camera, but i've honestly had little luck. I know Apple has AR Kit, would something like that be suitable? Though something cross platform, through something like react native would be best.

    Any assistance? Thanks!

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

    Doomed

    Posted: 11 Jul 2020 01:11 PM PDT

    Hi guys! So i just started learning java. I am having some problems understanding what is a package and why use them. I see online it is used to prevent name conflicts of classes. I dont understand this part. When i write the program i dont include same name classes, so what its use?

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

    Help with C++ Project

    Posted: 11 Jul 2020 12:53 PM PDT

    Hey guys, I'm working on my final project of a beginners c++ course. It has to be submitted tomorrow. It's very important that I pass it since it is a preparatory course for a C# course at a college. We had a few options to decide from and I decided to make a program on my own since I've been thinking of doing it since the start of the course. It's a program for practicing musical intervals. This is the working code written thus far:

    #include <iostream> using namespace std; #include <string> int main() { int randomQuestion; randomQuestion = rand() % 3 + 1; string third, fifth, seventh; switch (randomQuestion) { //New question case 1: cout << "What's the major third(3rd) of C?: "; cin >> third; while (third != "e" && third != "E") { cout << "wrong answer, please try again..."; cin >> third; } cout << "That's correct. Well done!\n\n"; return main(); //New question case 2: cout << "What's the major fifth(5th) of C?: "; cin >> fifth; while (fifth != "g" && fifth != "G") { cout << "wrong answer, please try again..."; cin >> fifth; } cout << "That's correct. Well done!\n\n"; return main(); //New question case 3: cout << "What's the major seventh(7th) of C?: "; cin >> seventh; while (seventh != "b" && seventh != "B") { cout << "wrong answer, please try again..."; cin >> seventh; } cout << "That's correct. Well done!\n\n"; return main(); } } 

    But I'd like to have the program in a function that I call from the main. The code I'm about post doesn't work, but it should give you a hint of what I want to achieve. Here it goes:

    int MajorIntervals(string third, string fifth, string seventh, KeyOfX[] ); { int randomQuestion; randomQuestion = rand() % 3 + 1; switch (randomQuestion) { //New question case 1: cout << "What's the major third(3rd) of "; cin >> third; while (third != KeyOfX[0] && third != KeyOfX[1]) { cout << "wrong answer, please try again..."; cin >> third; } cout << "That's correct. Well done!\n\n"; return MajorIntervals(); //New question case 2: cout << "What's the major fifth(5th) of C?: "; cin >> fifth; while (fifth != KeyOfX[2] && fifth != KeyOfX[3]) { cout << "wrong answer, please try again..."; cin >> fifth; } cout << "That's correct. Well done!\n\n"; return MajorIntervals(); //New question case 3: cout << "What's the major seventh(7th) of C?: "; cin >> seventh; while (seventh != KeyOfX[4] && seventh != KeyOfX[5]) { cout << "wrong answer, please try again..."; cin >> seventh; } cout << "That's correct. Well done!\n\n"; return MajorIntervals(); } } int main() { char KeyOfC[] = { 'E', 'e', 'G', 'g', 'B', 'b' }; string third, fifth, seventh; MajorIntervals(string third, string fifth, string seventh, KeyOfC[]); } 

    I'd be forever grateful for help! Thanks in advance.

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

    Feels like the better and faster I get at writing code- the longer it takes me to complete things

    Posted: 11 Jul 2020 11:42 AM PDT

    Anyone else experience this? I feel like I can type up a module pretty quickly, and can almost write code as fast as I can type in a lot of cases.. but it still feels like after 4-5 hours I've only completed 2-3 unit tests and only a few functions out of many that i'll need to write, and it winds up taking me a week or two to finish when it feels like it should take a day or two.

    Anyone else experience this?

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

    Looking for books

    Posted: 11 Jul 2020 11:18 AM PDT

    Hello, I'm currently working on getting an education so I can move into a computer related field (programming would be more of what I want but I figure IT or something like that would be a good starting point). I've been looking for books in my local community college/online but haven't been able to find anything so I figured I'd ask on here. As experts in the field are there any books you could recommend for someone trying to get their A+ certification, along with any books you'd recommend for learning new programming languages (I have a very basic understanding of Python.)?

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

    Musings on API Design

    Posted: 11 Jul 2020 11:13 AM PDT

    Interested in learning more about efficient/quality API design. How to make APIs more scalable, lightweight, etc.

    Feel free to recommend readings/guidelines/frameworks to look into.

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

    What would a program that isn't Single Sing On(SSO) look like?

    Posted: 11 Jul 2020 09:32 AM PDT

    I sell a software that was developed on in a different country. I am trying to figure out what this requirement means without bugging them on the weekend. ...

    The ability to integrate through single sign-on (SSO)

    I sell and app w/ web portals and am not technical at all.

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

    Best Android learning path for a hack like me.

    Posted: 11 Jul 2020 09:16 AM PDT

    For the last 20 years at the same place, my roles have been mostly within the realms of Sys Admin, Network Admin, process development and programming. I am self-taught in all of the above and have no problem learning something new.

    I have worked with Java prior to my current employment stint creating post-processors for CNC machines but nothing since. I considered myself an expert with VB6 and VBA and I have been developing desktop applications in C# for the last two years or so and am very comfortable with that. I also consider myself to be very proficient with T-SQL.

    I plan on building Android apps for business related functions. I mostly will be accessing database data somehow. I probably will also have the functionality where a user can attach a document to a sales order in our document archival system. The app will just basically be navigating around data from a database that resides on site and sending files.

    Based on my experience and the basic Android app architecture I described, what do you think is the best learning path and tools for me to get started?

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

    I'm a frontend developer, starting my first independent project and need help in figuring out everything I'll need to learn to execute it.

    Posted: 11 Jul 2020 06:57 AM PDT

    How do I send a picture using the least amount of cellular data?

    Posted: 11 Jul 2020 05:47 AM PDT

    In short, I have a cell plan that is 200 minutes OR 500 texts OR 500MB of data, PER MONTH and I want to send a small picture through it. This is on an ESP32, so I think I'll have more control over the cellular service, but I'm not sure. Preferably, I want to be able to send a signal from my main phone, and the cheapo takes a picture, sends it to main phone or internet and I can use it as a cheap security camera for my chickens.

    Just like, besides compressing (and lower resolution) the picture as small as I can, how can I best transmit the picture?

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

    How to print local time in C

    Posted: 10 Jul 2020 10:47 PM PDT

    I wanna ask something. Because im new in C language, How to print local time like this "05/07/2020 17:50" in cli with C language..?

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

    Does fxcop or stylecop help?

    Posted: 11 Jul 2020 04:05 AM PDT

    I have been busting my brains out, trying to check in some code. Everytime I end up with a new stylecop or fx cop issues. And the issues are not that trivial either. I am wondering if it's worth it to use it. So far out of the seven development days I have spent almost one and a half day in fixing these issues. I am starting to wonder if it's worth using these tools.

    Let me know your experiences about these tools and how helpful they are.

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

    No comments:

    Post a Comment