• Breaking News

    Friday, January 24, 2020

    Is it possible to "Edit" the code of FLASH games? Ask Programming

    Is it possible to "Edit" the code of FLASH games? Ask Programming


    Is it possible to "Edit" the code of FLASH games?

    Posted: 24 Jan 2020 05:59 AM PST

    Let's say I want to "edit" some things in this game - https://www.kongregate.com/games/noanoa/elona-shooter

    Would it be possible?

    After all, there are "hacked" versions of the game on some other sites, so It should be possible, right?

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

    Stumped (c++)

    Posted: 24 Jan 2020 05:18 PM PST

    This is my first assignment in my 2nd computer science class and I need some clarification.

    Program requirements:

    1)Create a 2-dimensional array, named 'testScores', that can store all data in the text file.

    2)Implement the following functions:

    a.void readTestScores(ifstream& f;int scores[][NUM_TESTS], int numStds);

    Read all test scores from the file and store in the array

    b.void displayTestScores(const int scores[][NUM_TESTS], int numStds);

    Display all test scores stored in the array. ...

    The problem is that I can't really convert the int to a const int since it's incompatible and I get a compiler error. The reason why the const is there so the array doesn't get manipulated but all we are doing in the assignment is reading data from a .txt file and storing the data in an array and using the array to solve more problems. Another requirement is that the array has to be a local variable in the main function and can't be a global variable. I need some guidance on how to tackle this problem because I can't make any sense of it.

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

    calling setBounds(...) on an Image stops it from being painted on a JFrame

    Posted: 24 Jan 2020 08:06 PM PST

    As the title says, calling setBounds on an image completely prevents it from it being drawn in the first place. (even if the constructor was called and working well before the call).

    Isolated Source code

    Main.java

    import javax.print.Doc; import javax.swing.*; import java.awt.*; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.nio.charset.StandardCharsets; import java.util.*; import java.io.*; import java.util.stream.*; import java.nio.file.*; public class Main { private static JFrame F; public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable(){ public void run(){ createGUI(); } }); } public static void createGUI(){ F = new JFrame("[Sample_Text]"); F.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); F.setLayout(null); F.setFocusable(true); //center window int width = 500, height = 500; Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); F.setBounds(((int) screenSize.getWidth() / 2) - width / 2, ((int) screenSize.getHeight() / 2) - height / 2, width, height); Pic Jenkins = new Pic(20,20,167,302); F.add(Jenkins); F.setVisible(true); //Jenkins.setBounds(600,78,167,302); //System.out.println(Jenkins.getBounds()); } } 

    And the Pic class:

    import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; import java.io.File; public class Pic extends JPanel { private BufferedImage img; public Pic( int x, int y, int width, int height){ try { img = ImageIO.read(new File("test.png")); setBounds(x,y,width,height); //System.out.println(getBounds()); }catch (Exception e){ System.out.println("Image failed to load"); } } @Override protected void paintComponent(Graphics g){ System.out.print(" painting"); super.paintComponent(g); g.drawImage(img,0,0,null); } } 

    When Run with the Jenkins.SetBounds(600,78,167,302); disabled the image is drawn onto the frame and the console outputs

    painting painting 

    However when its uncommented, the image isn't drawn at all and the console outputs nothing.

    Any Solutions?

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

    24/7 Archive.org Home Videos Feed

    Posted: 24 Jan 2020 08:03 PM PST

    I'm trying to come up with an art project where there is a 24/7 feed of home videos from Archive.org, but I have very little programming experience and don't know where to start or if it is even possible. Any tips on how to get started or what resources to look at?

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

    Is it weird that the way I take my class notes is similar on Python's writing style?

    Posted: 24 Jan 2020 07:09 PM PST

    Indentation, colons per title, and also color coding.

    When I write my notes in that way I feel more organised and I can easily know on what part my notes is ended.

    Is it just me or do some people exp it?

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

    Whats a common security "best practice" thats actually unsecure?

    Posted: 24 Jan 2020 06:34 AM PST

    Unbinding assignment value

    Posted: 24 Jan 2020 05:32 PM PST

    I tried looking up the command for unbinding a value from a variable.

    I set up a = 4 + 2, and now I want to make it blank, is there any way to do that (without restarting)?

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

    New to the CS world

    Posted: 24 Jan 2020 04:32 PM PST

    After HTML / CSS, what would be most wise to invest time into learning?

    JavaScript, or Python? I've heard both are highly functional languages. I have very, very little experience here. And I'm not sure how or where to start.

    I want to eventually learn both, but I'm trying to figure out what is worth the time? Front-End has always interested me, but I worry that it isn't as applicable/viable in the job market as back-end is?

    I know JS has back end, but I'm not sure how it compares to Python? One of my computer studies teachers is going to give us a choice to learn a programming language soon, but I'd like to see what real people with field experience say.

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

    Connecting iPad to remote mac

    Posted: 24 Jan 2020 03:44 PM PST

    Hey, so we all know this scenario; you work hard on a code project at work. You come home, spend your day doing whatever your hobby is, probably coding. All of a sudden you realize you have a solution to a problem you experienced at work, and you cannot let it go. You start obsessing over ways to perfect it and optimize it. Slowly going crazy.

    I need help as to not go crazy.

    In short; I need to deploy an app over cable from my mac at work, via my home windows machine. I can remote into it via log me in central , and i can proxy on to the same network.

    Any ideas? Is it possible? Or will I have to cave in and jump in the car?

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

    FancyUpload - Replace Flash

    Posted: 24 Jan 2020 02:41 PM PST

    I have been using FancyUpload for quite some time. It seems that I now need to replace the flash portion since Chrome will be stopping flash soon.

    I know that there are other uploaders out there, but I am hoping that there might be an easy solution for me to continue to use FancyUpload because I have a lot of backend programming that I would need to edit to use with a different uploader.

    It seems to just be a matter of replacing the .swf file(This is the Flash file extension) with a different file that doesn't require flash to be downloaded.

    Any help would be appreciated. Thank you!!!

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

    I need to find an alternative to the "vanilla" tooltips in VB.NET

    Posted: 24 Jan 2020 12:36 PM PST

    Need material for presenting my application

    Posted: 24 Jan 2020 02:41 AM PST

    Hi guys,

    I almost finished an app and I need to present it to the company. They are not familiar with tech stuff. I need guidance (tips, video, draft, anything) for making a slideshow presentation. Where should I give more attention, what shall I tell them and stuff.

    I will present the Interface and some basic functions but I don't know if that's enough. Shall I tell them the frameworks I used? Shall I tell them the advantages and disadvantages of the frameworks?

    (I use Angular/ionic frontend and django backend, and the app is actually pretty simple)

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

    A few general ABI questions

    Posted: 24 Jan 2020 12:24 PM PST

    Hi, novice programmer here trying to dabble into more reading.

    1) As I understand it, stabilizing a language's ABI restricts feature development for a language. To what extent are these restrictions? Are some categories of features definitively blocked from being created once ABI is locked in? Or can anything still be done, just doing so may be much much more difficult? If ELI5able, why?

    2) Does the weight of a language's runtime affect the above? Is it easier to add or remove runtime features once ABI is stabilized (ie adding or removing garbage collection)?

    3) Outside of portability and language interoperability, what are the pros of stabilizing ABI?

    Thanks!

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

    When using LMC (little man computer), what is instruction LDA 4 bit binary OPCODE equivalent?

    Posted: 24 Jan 2020 11:40 AM PST

    Hi all,

    I wrote a LMC program using https://peterhigginson.co.uk/lmc/ which has an accumulator, is that standard? I'm trying to write code in 16-bit strings with the first 4 bits being the opcode, but what would the op code be for LDA? I know that LDR op code is 0110, however i'm not sure if loading a register with a value is the same as loading an "accumulator"?

    Also some confusion comes from reading a book that teaches me the LMC-3 ISA as a 16 bit binary string, but most LMC's use assembly labels and mnemonics. I'm attempting a task asking me to use "available ISA's" to write a specific program, so would I write the instructions in the 16 bit binary or would labels and mnemonics an "ISA" ?

    Cheers and thank you.

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

    Is it really worth it getting a Mac?

    Posted: 24 Jan 2020 03:44 AM PST

    Hello

    I am 32 years old, I work as a Freelance Web Developer/Designer, I work with Adobe Suite, Full Stack Javascript Web Development and I also use some CMS from time to time.

    I've been using computers since the age of 6.

    My operating system usage history is:

    • MS-DOS, Windows 3.1, Windows 95, Windows Me, Windows 98 (Me sucked), Windows 2000 (My most Favorite), Windows XP, Windows Vista (for a very short period of time), Windows 7, Windows 10

    I also have some basic knowledge about Linux, the distros I have used, are:

    • Ubuntu, Fedora, Debian, Mint, Arch Linux, Manjaro with a preference on Cinammon, LXDE, Budgie desktop environments.

    I have never been a fun of the GNOME/METRO (Windows) desktop environments and that is because I want my desktop/GUI to be at a minimal size and be more detailed and having more space for my apps. I believe that GNOME and METRO UI are taking so much space

    I am a desktop user most of the time, I like to have my own space, always use 2 screens, having powerful hardware (desktop hardware will be forever more powerful than any portable device).

    However, these last years I have began using a laptop on dual-boot:

    • Windows 10
    • Ubuntu with Budgie Desktop Environment

    And the reason I switch is because both Windows 10 and Ubuntu have apps that can get my work done, for example: Graphic Design with Adobe Photoshop on Windows 10. Even if Linux provide alternative tools such as GIMP or InkSpace, nothing can replace the experience I have on Photoshop. I'm not saying that GIMP and InkSpace are not excellent tools, I just feel most comfortable with what I have experience on. (Don't consider this point of view or my thinking as a reason for not getting a Mac)

    And I have started thinking why not get a Mac?
    Mac OS is based on Unix and BSD, it has Bash, Visual Studio Code, Adobe Suite Tools and it's like I can enjoy a combo-world of Windows and Linux but I do not know, is it really worth it? I have never tried a Mac and I believe my experience on both Windows and Linux can get me through the Mac OS, but is it really worth it for buying less powerful hardware? I don't have the option for upgrades, I cannot for example replace RAM or HDD or buying a Powerful GPU for playing video games. It's a fixed piece of hardware without freedom.

    This is my own thinking and I would like hear (read) the opinions of other Developers.

    Thanks a lot!

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

    My .exe runs fine manually, but the task scheduler says it is missing files.

    Posted: 24 Jan 2020 07:23 AM PST

    What gives?
    Is it because some of the files I use are called from Appdomain.Basedirectory?

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

    Need help to choose languages/framework/libraries for a diagram editor

    Posted: 24 Jan 2020 07:12 AM PST

    Hi everyone, I'm about to start a project that includes a diagram editor to generate code to run via web app or another application. Think about a very minimalist RAD or visual programming tool. My idea is to build the editor first, saving the diagram in a XML or JSON file to later be converted to another language. And I'm kinda stuck on the editor itself, I looked up for diagramming libraries and the best I got is a bunch of JS libraries, .NET ones seems a bit expensive right now.

    Anyone had some experience or opinions on projects like this?

    Thank you all, cheers!

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

    Library and language for a dock

    Posted: 24 Jan 2020 10:27 AM PST

    Ive asked sort of this question before, but after running into issues with C++ and QT, ive decided to ask again with the intention of widening my search results.

    this is copied straight from my previous post

    Im trying to make it specifically an "install it and it works" program, so that i can avoid the fact that the other docks require massive amounts of customization to make then look and work well, i just want to write something that you install once, it replaces the regular taskbar, and it just works.

    But as im a junior, my experience with actual onscreen programs is basically NULL. We've studied ncurses but for obvious reasons that isnt going to work. Any decent API, Language, and library for this?

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

    Having trouble with dynamically allocated arrays in C++

    Posted: 24 Jan 2020 06:24 AM PST

    Hey /r/AskProgramming,

    I'm having some trouble with one part of my lab, and it has to do with dynamically allocated arrays.

    The program contains a struct gift, which contains:

    struct gift { char g_description[MAX_DESC]; double g_price; int g_units; wrapping* wrapPtr; int wrapLayers; }; 

    My issues comes about with my pointer "wrapping *wrapPtr"

    struct wrapping { char* pattern; }; 

    in my functions:

    bool wrap(gift& gifts);

    bool unwrap(gift& gifts);

    I'm supposed to take user input and dynamically allocate an array sized to "int wrapLayers" in the "wrapping *wrapPtr". I've attempted to write the wrap function, and it compiles fine but I keep getting a memory error so I assume I must be allocating the memory incorrectly.

    bool wrap(gift &gift) { if (gift.wrapLayers > 0) { cout << "Gift is already wrapped!" << endl; return false; } cout << "Enter the number of wrapping layers for the Gift: "; cin >> gift.wrapLayers; while (gift.wrapLayers < 1) { cout << "Layers at minimum must be 1, try again." << endl; cout << "Enter the number of wrapping layers for the Gift: "; cin >> gift.wrapLayers; } gift.wrapPtr = nullptr; gift.wrapPtr = new wrapping[gift.wrapLayers]; for (int i = 0; i < gift.wrapLayers; i++) { cout << "Enter wrapping pattern #" << i + 1 << ": "; cin.width(MAX_PATTERN); cin >> gift.wrapPtr[i].pattern; //why won't this work } return true; } 

    Specifically, when the program reaches the cin for the pattern input, I receive an error in istream that vs says is:

    Unhandled exception thrown: write access violation.

    _Str was 0xCEDECEDF

    Any help I can get here is much appreciated, and if any more info on my project is needed I'm happy to supply.

    Thanks so much!

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

    Having trouble with the toString method

    Posted: 24 Jan 2020 09:55 AM PST

    Hello everyone recently been trying to learn about the toString method and was wondering how exactly can you print the elements of a int array using the toString method? In this program I made so far I fill a int array with random integers and then print the contents here is what I had so far:

    update**:
    Figured out my previous problem using StringBuilder, just new problem is out is Getting weird symbols as my output now.

    import java.util.*;

    public class test1 {

    public static void main(String[] args) {

    ArrayReview[] no1 = new ArrayReview[5]; System.out.println(no1.toString()); } 

    public class ArrayReview{

    int\[\] array; ArrayReview(int len){ array = new int\[len\]; for(int i = 0; i <array.length;i++) { array\[i\] = (int)(Math.random()\*100); 

    }

     } u/Override 

    public String toString() {

     StringBuilder sb = new StringBuilder(array.length); for(int i = 0; i < array.length;i++) { sb.append(array\[i\]); } 

    return sb.toString();

     } } 

    }

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

    Platform/language for a business application

    Posted: 24 Jan 2020 09:46 AM PST

    Hi, so we're about to produce a software for a customer of ours. Their old SW is in some old version of VB and was written over 20 years ago! It's server/client based with a database(Access) executing queries to the client application. The software isn't terribly complex but it does need to suit the operation of their specific organization.

    Our core expertise tends to be C/C++/C# software written for air-gaped systems. So I am asking for cloud advise.

    Obviously since it is a fairly straight-forward application, it would be good to get it up on the cloud and remove their need to maintain on-site server and client computers(bye-bye Windows 7).

    Our customer is Canadian, has to store and maintain private information on both individuals and companies.

    What I envision for them is a secure database with an in-browser front end. I've seen the term 'serverless' thrown about lately and I'd expect that because the actual quantity of processing/queries is so small, serverless could work. We have an AWS account for some webserver stuff. Have had a Azure account for some Windows virtual machines. Not sure which direction to go for 2020.

    Thanks!

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

    How to call a multi service application

    Posted: 24 Jan 2020 09:44 AM PST

    I am creating an application with a websocket based api, a database layer and a private websocket server. How to make this on different levels? I would like the websocket to still be able to run with the database not there and handle communication through events.

    How to call this? And how to do this from a design standpoint?

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

    [JS] What to put into an array index when you want to make it "exist", but you want no value inside?

    Posted: 24 Jan 2020 08:01 AM PST

    Hello!

    I am making a multi-d array inside an object (to save as json).

    So, in order to minimize the already large chance of errors in a volatile system, it is imperative that array_length works flawlessly, and that I can fetch and display non-content, or not fetch and not display lack of content.

    So, if I have

    ID Name Surname Address Comment
    1 Steve 420, Weed St.
    2 Johnes
    3 Jerry Jerrymeier Banana
    4 Terry

    I wanna know which of these will do what I want:

    obj = { tables: { table1: { headers: [ "ID", "Name", "Surname", "Address", "Comment" ], content: [ [1,2,3,4], [Steve, , Jerry, Terry], ["", Johnes, Jerrymeier, ""], ["420, Weed St.", NULL, NULL, NULL], [undefined, undefine, "Banana", undefined] ] } } } 
    1. Which value should I use for cells where there is no content? (I guess it would matter if you wrote "", but all the indexes were integers, and you did math on them, so there's something to consider).

    2. Am I allowed to go deep, deep with arrays? Since I can't name tables dynamically, each table would be an index of an index, and in another index, there would be table content in a 2d array, so we are already 3-4 layers deep at the start. I am sure I can make it work. The question is whether you think this is good form. (I know about databases, but I want to use json for this, so let's just focus on the questions at hand)

    Thank you!

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

    What programming language would you recommend for an aspiring game devs first game?

    Posted: 24 Jan 2020 07:47 AM PST

    And what documentation/tutorials would you recommend?

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

    No comments:

    Post a Comment