• Breaking News

    Friday, March 9, 2018

    Extra key keyboard. Ask Programming

    Extra key keyboard. Ask Programming


    Extra key keyboard.

    Posted: 09 Mar 2018 03:10 PM PST

    I've been looking to see if this is possible, but I can't find any answers or technical specifications that answer my question.

    I'm wondering if I had a keyboard with thousands of keys when I send an OS a signal (windows 10 for example) does this signal need to be from a predefined set, or can it be an arbitrary keystroke? (I send the OS "Key 1253" was pressed)

    I know this might break a lot of programs, but say my program was was built to handle that many different possible keys, could windows correctly pass the arbitrary keystroke to the program, even if it doesn't know what that key means?

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

    What are some good free tools for prototyping software design?

    Posted: 09 Mar 2018 05:37 PM PST

    Hello all :D

    I am wondering if anyone has some good tools for prototyping software design, I'm in a software engineering course right now where that's one of the primary tasks.

    I am hoping to have a tool that makes things look nice and professional while not being overwhelming.

    I also will probably gravitate to use this software in the future as well.

    Thank you ^_^

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

    [JavaScript] Need help with one line of code

    Posted: 09 Mar 2018 07:08 PM PST

    the following line counts how many vowels a word has:

    var res = word.match(/[aeiou]/gi).length; 

    The problem is, the program stops right on this line if there are no vowels in the word. Theoretically, it should be res=0 in that case. Any ideas?

    Any help would be appreciated. Thank you for reading!

    EDIT: Figured out that res will be null instead of 0. This is not helping either:

    if (res===null){ res=0; } 
    submitted by /u/notyourdaddy
    [link] [comments]

    How can I go about doing this?

    Posted: 09 Mar 2018 06:18 PM PST

    I am trying to make an app in which we can scan the barcode and it displays information about the food item. So, I found that for SuperStore (Canada) we can just type in the barcode number in the search bar(on their website) and it displays the result. I want my app to take the barcode number and search for item. How can I do this inside my app?

    EDIT: No API's are available

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

    Programming Language Selection Help Needed

    Posted: 09 Mar 2018 06:09 PM PST

    I was a computer programmer for the Air Force for more than 20 years. Then I became a teacher (not programming), and I've been doing that for the last 11 years. However, I've always had a back-of-the-mind plan to develop a "baseball manager simulation", and I want to start working on it now.

    Here's my problem...for the Air Force, I programmed in IBM 4381 Assembly and COBOL, and prior to that I initially learned how to program in Apple BASIC. So I have no useful programming languages for the type of thing I'm envisioning.

    So basically, for this baseball manager simulation, I need a large database capability (for player names, team names, locations, etc...). Graphically, it doesn't need to be tremendous...it's not going to be a first-person-player, but rather a "set your lineup and play the game" sort of a deal. So moving lineups around, making trades between teams, that sort of thing plus the ability to make selections (drafting a player, selecting a team).

    Because of my inexperience with "modern languages", I'd like some advice as to a good language to use. It doesn't necessarily need to be REALLY easy to use, because I do have the programming background and I feel confident in my abilities there. Flexibility is important though. Also, it certainly doesn't have to be free software (although of course that's not a problem if it is either).

    So...what are your thoughts?

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

    Need help with Powershell in C#

    Posted: 09 Mar 2018 05:42 PM PST

    I apologize in advance if this isn't the right place to ask.

    To help myself learn programming, I am taking a few scripts my organization uses and attempting to build out a GUI Launcher that does the same functions. I have 3 commands I want to run and have the Powershell window open so you can see the progress. The first one is an existing ps1 file which I am running as follows:

    ProcessStartInfo runner = new ProcessStartInfo("powershell") { Arguments = $@"-ExecutionPolicy Bypass -NoProfile -File ""{scriptPath}""" }; Process cmd = Process.Start(runner); 

    The code block I had for the next section is not showing a window when it executes:

    var ps = PowerShell.Create(); string[] msuFiles = Directory.GetFiles(path, "*.msu"); foreach (var item in msuFiles) { ps.AddScript($@"DISM.exe /Online /Add-Package /PackagePath:""{item}"" /NoRestart"); } string[] cabFiles = Directory.GetFiles(path, "*.cab"); foreach (var item in cabFiles) { ps.AddScript($@"DISM.exe /Online /Add-Package /PackagePath:""{item}"" /NoRestart"); } ps.Invoke(); 

    Short of rewriting the second section to execute like the first, is there a way to run all 3 commands in a single Powershell instance and have the window open so progress is visible? Thanks!

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

    Guidance for First Web Project

    Posted: 09 Mar 2018 08:48 PM PST

    I'm self-teaching my first web project ever and I need a little guidance with what I should prepare for my project. I want to run a simple chess program. I want the user to be able to drag and drop chess pieces or simply put in commands and see the data either way. Initially, I want to have an interactive half of the page be dedicated to dragging and dropping various objects with the mouse like pawns and knights. I want the other half of the web page to keep track of data from the interactive half as well as provide commands to the board if the user wants.

    I do not not know what languages or subprograms I would need to even design this type of interactivity. Any advice on starting points or resources that have done something similar to this before, would be really helpful.

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

    How to make a Select with "where" clause based on a result of a previous Select (all in one query)?

    Posted: 09 Mar 2018 03:50 PM PST

    I want to get all the rows from table "socc_shots" where "idmatch" is equal to the LAST 3 "mc_id" from table "socc_matches" where "mc_teamid= 1" order by date. How would be this query? (More info -> https://stackoverflow.com/questions/49199419/7two-tables-select-inner-join-with-order-by-and-where-and-limit-clauses/49199594#49199594)

    submitted by /u/Don-g9
    [link] [comments]

    How to deal with people who refuse to use vcs?

    Posted: 09 Mar 2018 08:57 AM PST

    I'm working for quite big company where one of critical systems is developed in-house by so called business people. And it is a mess. Testing environments are not used, because devs constantly get requests for change some things, because something must work today.

    One of the worst thing I noticed is they don't have enough time to analyse algorithms and data properly, so they fix incorrect results by correcting them in the code on production environment to fixed values taken from some Excel spreadsheets.

    This is hell, they are aware of it. Most of them is quite capable in programming, so they understand what vcs (git + gitlab in my case) is and why they need it. The problem is even if they know how to use it, they don't use it, because they are so attached to the idea of altering production environment that, I think, they see using vcs as additional burden and something that can be done later.

    I'm considering simply changing passwords to production environment and force them to do things in more safe way, but this will cause mayhem.

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

    would it be possible, through PHP, to identify a row in MySQL as having a related row in another table?

    Posted: 09 Mar 2018 10:57 AM PST

    In a more specific context Table B relates to table A through Foreign key: fk_X. Is it possible identify through a PHP function that for example queries table A but identifies that there is a related row in table B? Your suggestions on best practices are welcomed

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

    Next steps for Django app?

    Posted: 09 Mar 2018 12:11 PM PST

    I worked with a developer to get a CRUD web app up and now I'm in the phase of asking "What I don't know I don't know".

    I know I need to migrate to Postgres or MySQL. Will that be difficult? Running python 2, do I move to 3 soon?

    Thank you. (its worldpeer.com if you're curious)

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

    How to edit a corpus?

    Posted: 09 Mar 2018 11:31 AM PST

    I have the cornell movie dialogs corpus. How do I edit to add new quotes?

    submitted by /u/froggie-style-meme
    [link] [comments]

    What is the problem with my java For Loop?

    Posted: 09 Mar 2018 03:55 PM PST

    How do I get my Node.js server run permanently?

    Posted: 09 Mar 2018 11:06 AM PST

    So I'm coding a Telegram bot with Node.js and whenever I close the terminal the built-in server gets closed too hence the bot won't work. So my question is how do I keep my Node server work permanently? Is "Forever" command the answer?

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

    How long to be able to make video game

    Posted: 09 Mar 2018 02:27 PM PST

    Lol

    If I learn programming as a complete newbie and work alone how long before I could make say a decent survival type game like 7d2d standard....

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

    Sweetalert not working in echo (PHP)

    Posted: 09 Mar 2018 07:46 AM PST

    I have this classic js alert which works fine

    alert('You Added a Book!')

    but Im trying to achieve this kind of alert but its not working. (i already have the needed plugins but still its not working) swal( 'Good job!', 'You added a Book!', 'success' )

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

    How do I revert a file to not be opened with a program?

    Posted: 09 Mar 2018 10:27 AM PST

    I was going to try to edit a save file with microsoft XML editor. It crashes and some error about parsing. Checked the properties and it says the file is a save game (EMPIRE_SAVE File (.empire_save) not xml so I just stopped trying. How do I revert the file back to being the white slate and not having the "opens with" whatever program I last tried to open it with.

    Also i can open it with notepad but its like Egyptian hieroglyphics.

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

    How can I start selling a simple desktop app using the SaaS model (Software as a Service)? What should I implement and how?

    Posted: 09 Mar 2018 03:50 AM PST

    I have simple desktop app. I haven't sold software before. I want to sell it based on a monthly subscription model (similar to Adobe Cloud).

    How does one implements this selling model? I'm more interested about the nitty gritty specifics of implementing it than the overall strategy of marketing and selling.

    I'm thinking first there should be a chunk of code that will make the app stop working after a month has passed (assuming it's monthly based payment). Then there's gotta be some automated payment system and client notification in place. Probably embedded in the app? That's all I can think of.

    If anyone has any experience with this please share. Thanks!

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

    What are the prerequisites of the Effective C++ book?

    Posted: 09 Mar 2018 09:24 AM PST

    I'd like to learn C++ by reading the very popular book Effective C++.

    However, it is obviously not a book for beginners in C++. My question is, what level does the book expect from its readers? I mean, is it just for people that know C++ syntax and have programmed a few small programs in it, or is it for experienced programmers who've coded big projects in C++ for months if not years?

    I was hoping that I could e.g. read this tutorial: https://www.tutorialspoint.com/cplusplus/index.htm

    and then go on to read Effective C++. Is that possible, or does one really need to work much harder on C++ before one can read Effective C++?

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

    How to get title information from h3 tag with beautiful soup and python?

    Posted: 09 Mar 2018 09:23 AM PST

    I cant seem to get the title info I want from a variable in python. I am trying to get the title text only from the info stored in the variable dealerName so I can write it to an excel spreadsheet. any help would be appreciated it. here is a screen shot of my issue. Thanks

    https://imgur.com/a/SFwUR

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

    What does the program print out?

    Posted: 09 Mar 2018 05:08 AM PST

    What will the following program print? Explain.

    int *p, *q; p = new int; *p = 5; q = p; free (p); write (*q); *q = *q + 1; write (*p); 

    My Attempt:

    The program writes x then x + 1, where x may be 5 or some other number. It will most likely print out 5 and then 6.

    After having both p and q point to the memory location containing 5, the memory location is deallocated. This means that other processes are now allowed to write to that same memory location. q still points to this memory location but there is no guarantee that it still contains its original value of 5.

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

    Find the Most General Type of the Function

    Posted: 09 Mar 2018 04:14 AM PST

    Given the following function definition in a language with polymorphism and inferred types. Find the most general type of the function g in the following program.

    g (p, f, x) { if (p (x)) return f(x); else return x; } 

    My answer:

    The most general type must be the type of x, which is directly returned if p(x) evaluates to false. If x is not directly returned, then we have f(x) which is not unlikely to return the same type it receives, namely the type of x.


    Can anyone help me figure this one out? I'm quite unsure of my answer. What eludes me the most is the concept of general type.

    Thanks

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

    When to use char variable in c#?

    Posted: 09 Mar 2018 12:23 AM PST

    I'm currently doing a c# course from home and got the question: When do you use char instead string? So as far as i understand char is used for unicode characters so i imagine that it would be smart to use that to keep things universal? I've checked stackoverflow and the documentation but the answers kind of fly over my head.

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

    No comments:

    Post a Comment