• Breaking News

    Thursday, September 19, 2019

    How are object oriented programming languages implemented? Ask Programming

    How are object oriented programming languages implemented? Ask Programming


    How are object oriented programming languages implemented?

    Posted: 19 Sep 2019 04:43 PM PDT

    Object oriented programming languages like C++ and Java have various facilities for code reuse. Things like classes, inheritance, polymorphism, and function overloading. How does a compiler implement these features if it is written in a programming language that does not support object oriented programming (like plain old C)?

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

    What is a local server and why is the URL always 8080?

    Posted: 19 Sep 2019 07:04 AM PDT

    Regular Expressions to char arrays, is this ever possible?

    Posted: 19 Sep 2019 08:01 PM PDT

    For example, if I take the regex "\d", that matches any single digit. It would be super useful if there was a way to create a char array using that, just for sloppy example:

    char[] digits = regex.AllPossibleMatches("\d");

    Actual contents of digits - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};

    Is this actually a thing in any library? Would it be possible to implement into an object even?

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

    What does the second condition mean?

    Posted: 19 Sep 2019 10:58 PM PDT

    https://en.wikipedia.org/wiki/Sorting_algorithm

    second condition: The output is a permutation (a reordering, yet retaining all of the original elements) of the input.

    What does that mean exactly?

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

    What is this memory allocation strategy called?

    Posted: 19 Sep 2019 10:29 PM PDT

    Been some googling, can't quite find something that fits this methodology exactly:

    Initialization:
    * Create some memory region of size X.
    * Divide memory region into X equal parts called blocks.
    * Push the start address of each block onto a stack. (these are the current "free" blocks.)

    On allocation:
    * Pop the first "free" block off of the stack

    On deallocation:
    * Push the "Freed" block onto the stack

    Now, the semi-interesting part: obviously, an allocation must be less than the block size in order for this to work. Since for small allocations I might be wasting a bunch of space, I have multiple stacks (each holding a different block size).

    I'm sure I'm not doing anything "new" here. Does anyone know what the heck this strategy is called so I can name it accordingly?

    submitted by /u/2uantum
    [link] [comments]

    Elasticsearch LTR - understanding judgement sets.

    Posted: 19 Sep 2019 09:44 PM PDT

    Need some help understanding how to create judgement sets for a basic name search ranking. All i find online is a bunch of theory on how judgement sets work for movie name search from a public database of movies but no proper explanations on how to customize it for different use cases.

    submitted by /u/90s_george
    [link] [comments]

    When writing resumes, how do you list/judge your skills ?

    Posted: 19 Sep 2019 03:16 PM PDT

    So I'm a webdev student and I'm soon gonna have to find companies to finance my next year. I'm in the process of writing my resume but I have a hard time to find a way how to list and evaluate my proficiency in skills.

    First, my school asks me to put a star-based rating for each ability. I've read a lot of times on reddit that this wasn't really appreciated by HR but in the lack of a real alternative, I eventually decided to keep it, and stay honest to my opinion of self.

    My question is: how do you judge is worthy of being listed as "Skill", and how you eventually sort them all.

    So far, I've divided my Skills category in four parts: Back-end dev (PHP/JS/SQL), Front-end dev (JS), Front-end integration (html/css) and Software dev (C, C++, Networking apps).

    I don't know if it's the optimal design, compared to the usual "Languages/Frameworks" model that I see on a lot of resumes.

    I'm also confused about when it is justified to list certain skills: for example, I developed a few apps about networking in C++ for my personal use, is it enough to consider it as a skill ? Or should I only put things I'm really confident in ?

    Thank you in advance for your answers

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

    How to deal with a large codebase?

    Posted: 19 Sep 2019 02:47 PM PDT

    I'm given this large codebase mostly containing Python, Scala and bash scripts at my first job as a backend junior dev.

    Are there any tools I could use or is there any approach i could take to make my life a bit easier?

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

    Hybrid Mobile Application Framework Advice

    Posted: 19 Sep 2019 03:59 PM PDT

    Hi all i have a project in my mind. It should work on both Android and Ios. Application will be integrated to database, should be able to use google maps api, messaging system is a big plus.

    I developed 2 cordova based applications but i didn't like it.(Too many compatibility problems with different devices,weird behaviours,dependency to plug-ins etc.)

    I could do the same project as a web application in a week but never had a big experience in mobile platforms. So i thought i can do this in 2 months.(Learning new language or framework included) . Is there any easy to learn framework or language for fast prototyping? What about react native or flutter or the others ?

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

    How to find a file without a pair? - Efficiently

    Posted: 19 Sep 2019 03:13 PM PDT

    I copied 1800 files. Its basically same filename but 2 ext, so 900 file names with 2 extensions.

    But when I copied, only 1799 files reached the destination. Deleting and recopying is last resort as it takes time. I am hoping to file which file is missing.

    Due to bureaucratic non-sense and "security", I dont have access to the source. I think my option is write a python script to file the orphan file, a file without a matching pair. Is that a wise choice?

    My question is - "Is writing a script the easiest way to solve this issue or are there any better way that will take less effort?"

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

    Hi. I wanted to know once you are familiar with a coding language (i.e in webdev), does coding in that language become more simpler, like you have less frantic thoughts by seeing all these lines of code?

    Posted: 19 Sep 2019 02:32 PM PDT

    Currently I am very intimidated by it. Like where you can actually enter your code. I think I'm understanding tags and how to start and end them and the importance of them being closed correctly and what not to put in between them. Like there's so much characters in alphanumeric and symbols, i know having the wrong input could make things so difficult trying to fix it. Although i know there is debugging and that tells you what line the error is. but being new, all the words and the way they are written are so much intimidating because idk what they mean.

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

    find first vector element (SIMD/IGP/opencl)

    Posted: 19 Sep 2019 06:17 AM PDT

    my buffer is an array of 32 chars and i want to find the first occurence of a particular value in it.

    first step would be a 32-wide vector compare to the search value, the second step would be to find the lowest index vector element for which the comparison was a success.

    The target is a intel UHD630 IGP. there is only one target, inline assembler would not be a problem.

    For an AVX2 implementation, i use mm_movemask_epi8 and then lzcnt on the uint32_t.

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

    AI for basic poker game in python

    Posted: 19 Sep 2019 11:25 AM PDT

    Im making a basic poker game for a high school project. Im wondering what the best solution would be to add AI opponents. I have been wanting to learn machine learning for some time but i think it would be too hard for a beginner to implement it in a complex game like poker. Would coding multiple if-then statements be the best approach or are there any other ways to go about solving this problem.

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

    I fixed the zero problem, now the values are not being sorted properly

    Posted: 19 Sep 2019 10:48 AM PDT

    for(int k = 0; < array.length; k++)

    {

    val[k] = (int)(Math.random() * max);

    for(int j = 0; k < array.length - 1; k++)

    {

    if((val[k] > val[k + 1]) && (val[k + 1] != 0))

    {

    int temp = val[j];

    val[k] = val[k + 1];

    val[k + 1] = temp;

    }

    }

    }

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

    Hi. In programming, web dev and coding, there is a lot of keyboard use with typing and writing code. Does any web developers use a word expander like Instant Text to save key strokes?

    Posted: 19 Sep 2019 10:11 AM PDT

    Why does the output of this array give me 0s on half the value?

    Posted: 19 Sep 2019 09:45 AM PDT

    Heres the code, its supposed to get random values and sort them but for some reason half the values are zero

    for(int i = 0; i < array.length; i++)

    {

    val[i] = (int)(Math.random() * max);

    for(int j = 0; j < array.length - 1; j++)

    {

    if((val[j] > val[j + 1]))

    {

    int temp = val[j];

    val[j] = val[j + 1];

    val[j + 1] = temp;

    }

    }

    }

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

    New to programming, any help would do

    Posted: 19 Sep 2019 09:19 AM PDT

    So I became a freshman this month and I'm studying Multimedia Technologies. It involves programming studies with C#. My university went straight to programming instead of explaining the basics of it and I'm totally new to programming. So I want some tips from you guys, like a website or tutorials where they explain C# from very basic things like what int, string, etc. commands do and would ELI5. I got familiar with the program's environment, but I just want to learn programming the most now.

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

    What's the best way to rename variables without powerful IDE?

    Posted: 19 Sep 2019 08:36 AM PDT

    Consider the following case:

    // + 300 lines before File := "C:\Foo\bar.txt" if (fileExist(File)) { // Do something } // + 300 lines after 

    You need to rename all instances of the File variable. Quickly and safely.

    What options do you have?

    • Smart rename refactoring provided by your IDE. The main problem is that a lot of languages doesn't have such IDEs for themselves. (I know about such IDEs for Java and Python.)
    • Automatic Search-and-Replace. (Ctrl+H -> Replace all.) Dangerous.
    • Automatic Search-and-Replace + Hungarian notation or something similar, e.g. underscores:

      _File_ := "C:\Foo\bar.txt" if (fileExist(_File_)) { // Do something } 

      Still dangerous. Also, such underscores will not really work in case you have snake_case variables, i.e. something like this:

      PascalCase for string variables snake_case for ... something Ada_Case for array variables 

    So, what would you suggest?

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

    How to maintain small differences of the same code base?

    Posted: 19 Sep 2019 07:28 AM PDT

    I have a main website code base and want to add a demo version of the website. This will have small css changes, and link changes to a demo version of my database and authentication. How can I keep all the code the same except these minor changes?

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

    What is the meaning of these values in the localStorage?

    Posted: 19 Sep 2019 07:03 AM PDT

    • The website I'm at is stackoverflow.
    • I am not logged in.
    • I am thus kind of confused how are there are values saved in localStorage.
    • Additionally, I am confused because the value appears to just be a random string.

    https://snipboard.io/XQj4FL.jpg

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

    creating blockchain for my final year project

    Posted: 19 Sep 2019 06:19 AM PDT

    so i want to create a blockchain for my final year project. my question is will it cost me anything? will i be able to achieve it because i do not want to get stuck

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

    Writing user-input to local file using Electron JS + which server-side language

    Posted: 19 Sep 2019 05:45 AM PDT

    So I made a simple webapp using Electron JS. The app is a continuous display of specific information (weather, route-driving time, news headlines, etc). The app is already finished, but I wanted to create a simple method of capturing user-input to alter certain information. The information that is displayed uses various APIs and I want to be able to capture user-input to update this information. For example, I don't want the driving-time info to be static, I'd like to be able navigate to an internal LAN address, input the two locations, and have it displayed on the web-app.

    I wanted to avoid using a database, and was considering using HTML5 and localstorage, but I wasn't quite sure how to go about this. The webapp is simple, there is an index HTML page, a stylesheet and a JS file with all the functions. I'd like the user-input to be inserted into a specific place in the JS file. Is this something that can be done with PHP?

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

    Huawei MateBook D 14" for programming?

    Posted: 19 Sep 2019 02:57 AM PDT

    What do you think about a Huawei MateBook D 14"(Ryzen 5 2500U, 256 GB SSD, 8 GB RAM, Vega 8)? It is good for programming? The laptop will be mainly used for study and machine learning. I would like to add that I also have the option of connecting a 24-inch monitor to it.

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

    No comments:

    Post a Comment