• Breaking News

    Sunday, December 10, 2017

    Can someone explain to me how programs/games coded in Java are run on a platform such as Windows as an .exe as opposed to a .class Ask Programming

    Can someone explain to me how programs/games coded in Java are run on a platform such as Windows as an .exe as opposed to a .class Ask Programming


    Can someone explain to me how programs/games coded in Java are run on a platform such as Windows as an .exe as opposed to a .class

    Posted: 10 Dec 2017 06:54 PM PST

    Example: Minecraft

    I understand how Java is different from other platform-based languages by being compiled into a bytecode and then ran on a JVM, what I don't understand is how programs written in Java are ran in a native OS like Windows as something other than a .class file

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

    Do you have an OpenMP project?

    Posted: 10 Dec 2017 09:56 PM PST

    Guys, I have an assignment if you can help me out. I basically need to talk about

     

    • 1) the parallel aspects (directives used for synchronisation)

    • 2) distributed aspects (running on a cluster with at least 2 nodes)

    • 3) output of the concurrent processes (the interleaving of processes)

     

    I need to write around 300 words on the 3 points above, specifically on a program built with OpenMP and MPI. So if any of you guys did a not too complex OpenMP & MPI project and you can share the source code with me (preferably in a private link), I would really appreciate it. I'd be able to discuss the 3 aspects above myself, I just need the code. Thanks a lot, really appreciate it!

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

    Help with Game Engine Design

    Posted: 10 Dec 2017 08:41 PM PST

    As the title says, I'd like assistance with coding a game engine. I've got a decent knowledge of C++, but I'm honestly not sure where to start. If anyone could link to a tutorial, or source code I could analyze just to get me started I would greatly appreciate it!

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

    What's the advantage of a CA like DigiCert over Let's Encrypt?

    Posted: 10 Dec 2017 08:12 PM PST

    Recently used Let's Encrypt enabled https on my personal site and it was super easy. Looking around, it seems like plenty of larger sites/ projects use a CA like DigiCert or Comodo. What's the difference?

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

    Is there a specific syntax to follow when making a monitor in Linux C?

    Posted: 10 Dec 2017 08:10 PM PST

    I basically implemented a monitor as a header and source file. The header file is the monitor interface with all the function names defined and some constants defined as well. Then, in the source file, I define these functions in more detail. Then, I simply include the monitor header file in my main.c and work with it. Is this a proper way to implement a monitor or am I missing something?

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

    What is the efficient way given a logfile of comma separated list of userid,productid how to return the userid who has seen the most number of unique products?

    Posted: 10 Dec 2017 02:03 PM PST

    Given a logfile of comma separated list of userid,productid, how to return the userid who has seen the most number of unique products?

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

    Completely clueless about programming need help!!!

    Posted: 10 Dec 2017 04:15 PM PST

    I honestly don't know anything about programming (This might be the wrong reddit for all I know) so I really need help with it. It's a multi-part riddle, and I've been able to solve all of the other questions (They aren't coding/math related), but since I know nothing about programming, I'm completely stumped! Please help me! D=

    Here's the question A 0x00../ |47564| |63278| |38560|

    INSTRUCTIONS: A' {SYNONYM: CURSE} to UNIVERSITY CODE CUT END SHOR-

    If anyone knows the answer, please send help! _^ Thanks xoxo

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

    [JavaScript] How can I call upon a selected button in a 2d array?

    Posted: 10 Dec 2017 07:35 PM PST

    I am currently working on a project and I have been stuck for a few days. In the project, I have a class that creates the button and in a different class, the buttons are made into a 2d array. Ive been trying to make a button listener that will do something to the selected button (for example, change the color) but I can not figure out how to call the button that was pushed from the 2d array?

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

    [JavaFX/Servlet] WebView/WebEngine won't display Servlet page

    Posted: 10 Dec 2017 07:32 PM PST

    I am trying to load a website running on localhost with apache into a WebView module in a JavaFX window. It will display all types of web pages unless they are in a servlet. I can display my servlet index page using a blank file path, and I can display other html files and change between them by loading new pages into the webEngine, however as soon as I try to load a servlet page, it does nothing. It reaches print statements I put in the servlet files, but it won't actually display anything differently. It works perfectly in Chrome, however not in my JavaFX app.

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

    Help creating web form to add user submitted data to URL

    Posted: 10 Dec 2017 02:48 PM PST

    Hi all. Thanks for the help. I am struggling with a quick web form I need to get completed. I just need to have users enter their email address and order number in two seperate text entry boxes with a submit button that once clicked goes to a url that requires the email address and order number to be added to the url along with a verification code. I have tried some javascript and just some basic html web form stuff. Anyone have any ideas? I know this cant be as hard as i'm making it. Thanks all!

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

    Can anyone tell me what kind of project this is?

    Posted: 10 Dec 2017 04:12 PM PST

    Hey, so I've just been sent a project to practice on. Within the project folder, there are a series of sub-folders titled "BusinessEntities"(home to a number of .cs files, including interfaces), "BusinessLayer" (home to a model and a model interface), and "DataAccessLayer" (home to DataLayer and IDataLayer). This is a Windows Forms application in the Modern Metro UI style. I was just wondering if, based on the files shown, if anyone could tell me what design pattern this project is based on?

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

    [VB] image keeps deleting before adding new one?!@

    Posted: 10 Dec 2017 03:35 PM PST

    Hi guys I got to work on my project balloon game where you click falling picture boxes... and when I try adding new picture boxes upon each timer tick, it deletes the previous one and I've no clue as to why?

    code:

    Private Sub tmrSpawn_Tick(sender As Object, e As EventArgs) Handles tmrSpawn.Tick

     NewBalloon.Image = Image.FromFile("C:\Users\Reece\Desktop\School Work Year 12\VB Projects\PopGame.vb\balloon.png") NewBalloon.Location = New Point(((400 - 1 + 1) * Rnd() + 1), 0) NewBalloon.Size = New Size(35, 15) NewBalloon.BackColor = Color.Transparent NewBalloon.SizeMode = PictureBoxSizeMode.StretchImage Controls.Add(NewBalloon) End Sub 
    submitted by /u/Saradomian
    [link] [comments]

    [HTML] Can anyone help me with this problem?

    Posted: 10 Dec 2017 11:43 AM PST

    I'm doing an exercise and trying to get this page

    https://codepen.io/mto213/pen/pdYOzP/

    to look like this example

    https://codepen.io/freeCodeCamp/full/NNvBQW

    but I'm having trouble making the grey and white boxes the proper size and also moving the text towards the center without actually formatting it to be centered. Does anyone know what I'm doing wrong? Thanks.

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

    Which is the better design, mutable vs immutable, if they were the same speed?

    Posted: 10 Dec 2017 04:01 AM PST

    In practice, immutable is slower cuz of jumping around in memory and fork-edits have log instead of constant cost. But what if speed was not the issue or they were somehow made equal speed? Which would be the better design? Which would you use more of, and why?

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

    [Java] How does my server find out whether a client has diconnected?

    Posted: 10 Dec 2017 09:54 AM PST

    I'm currently programming a desktop web app and a server in Java.
    The server keeps a list of currently connected clients that can be displayed to all connected clients.

    I'm wondering how the server can detect whether one of the clients disconnected. Currently, the client sends a logout message to the server when they close the window or press the logout button.

    However, there can be crashes on the client side or unexpected disconnects. How will my server know about those and remove the client from the list?

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

    What is THE book to learn C# from if you are NOT a programmer?

    Posted: 10 Dec 2017 12:52 PM PST

    I want to learn C#. I am in Academia, have scripted a bit in R, but am not a programmer and do not understand programming concepts (object-oriented programming? whaaat?).

    The book should be a modern, self-contained and comprehensive, *to-the-point (!) book aimed at beginners (meaning it shouldn't just teach the syntax, but actual programming concepts and how to apply them in C#).

    And please do not recommend Head First C#. These types of books are written for people who cannot read without being enthralled by fancy pictures and drawings, and further do not meet the "to-the-point" condition above (i.e., variable declaration is first defined on page 60!!).

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

    Trying to play video in edge but will not load

    Posted: 10 Dec 2017 04:06 PM PST

    Trying to play this video in edge but will not load. Mp4 works in every browser except edge. Video will play if you put the path in the address line. What should I change in the path to make the video play in edge? my edge version is 40.15063.674.0

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

    Looking for advice on general software design/ how not to get stuck in a rut

    Posted: 10 Dec 2017 11:55 AM PST

    I think my problem is strange, and unusual. In summary:

    I don't really know how to design programs, OOP orotherwise. I think, with the way I was taught OOP, I took it too literally. I struggle to think of any way to structure my objects other than a 1-1 mapping with the real world, or the GUI or similar. I never really got how to use objects to ensure proper separation of concerns.

    Because of this, I tend to get stuck in a rut. My brain goes round and round in circles either because I can tell my idea is wrong or it isn't but I'm doubting myself. An hour or so of this can leave me pretty much incapable of writing anything and I have to take a break.

    I'm really asking if anyone has had similar experiences and if there are any resources I should use when learning how to design large-scale solutions to problems.

    Thanks.

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

    MSVCR100 API?

    Posted: 10 Dec 2017 11:49 AM PST

    Hi, I've been working through some reversing of windows binaries and would like to be able to consult library APIs. For example, I'm examining:

    PUSH EDX PUSH 8 PUSH 1 PUSH Chapter3.00C0D9D8 CALL DWORD PTR DS:[<&MSVCR100.fread>] 

    I'd like to be able to lookup the signature of fread(). I figured this one out by debugging, but its slow and painful. I've done some googling and its very frustrating. I see its MSFT's implementation of Visual C++. I can't find the docs on their site.....

    Thanks

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

    C - Finding three numbers to add to a target value using concurrent threads

    Posted: 10 Dec 2017 11:35 AM PST

    I'm doing a C project where I have to read 10000 lines of arbitrary integers from a text file into an array and find three integers that add to a target value. It then prints out the time taken to find the values.

    For example - if my target is 233, the three numbers could be 81/102/50. That is if those numbers are found in the text file.

    I created three nested for loops to find every combination of the 10000 integers. It took me about 5 minutes, without any use of threads.

    My project involves implementing concurrent threads and I am having trouble figuring out a faster method to find the numbers.

    I thought about splitting the array in half, where one thread finds a combination from 0-5000 and the other 5000-10000 but I realized it wouldn't work since the three numbers could be in either half. Any ideas?

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

    I'm curious, how does a website load a file from my computer and use it?

    Posted: 10 Dec 2017 01:14 AM PST

    I was watching a movie earlier that needed subtitles, I downloaded a srt file and then uploaded it to the chrome tab...

    I'm just wondering how that works, for whatever reason it's eating me up wondering the mechanics behind this.

    Apologies if this is outside the purview of this sub.

    Thanks friends!

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

    help me finding the complexity of this code for GCD, Euclid's Algorithm

    Posted: 10 Dec 2017 06:47 AM PST

    code Link : https://pastebin.com/PMM3Sih1.

    I am not able to find/understand the complexities of the gcd methods written in this code:.

    according to me : for the gcd method it should be : k + k + k + K + .... + how many time ( time in which gcd(a,b) -> gcd (a, a) >> BUT HOW WOULD I FOUND THAT).

    IMAGE LINK OF MY APPROACH: https://ibb.co/nfSknw.

    the complexity of the gcd_better() method is O(Log min(a, b)) but how??

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

    (Programming style) Filling a data tree programmatically

    Posted: 10 Dec 2017 06:06 AM PST

    Defining a tree structure directly in a markup language, such as XML or HTML, is simple and visually comprehensible:

    <container> <letters> <a> <pronunciation></pronunciation> </a> <b> <pronunciation></pronunciation> </b> ... </letters> <people> <friends> <alice> <outofideas></outofideas> </alice> <bob></bob> </friends> <others> <todo></todo> </others> </people> </container> 

    However, when I need to create that tree imperatively, I end up with a wall of messy and unreadable code:

    // simplified pseudocode letters = new node; for (i in alphabet) { i.add(pronounce(i)); letters.add(i); } alice = new node; alice.add(new node); friends = new node; friends.add(alice); friends.add(new node); others = new node; others.add(new node); people = new node; people.add(friends); people.add(others); container = new node; container.add(letters); container.add(people); 

    The most obvious solution is blindly restoring indentation, but that would make the code confusing and (as I understand) is very bad style. Also, I could write functions for creating similar nodes or just large chunks of the tree; however, that still wouldn't help with parts of the tree which are pretty random (in real life, most of the tree).

    How should I write this sequential code, so that it is still understandable after I've forgotten how it works?

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

    Does anyone know a good way to write TI-BASIC for TI-89 on PC and compile for calc instead of writing on the calculator?

    Posted: 09 Dec 2017 10:15 PM PST

    Need help with VBScript; trying to automate task with IE interaction [x-post from /learnprogramming]

    Posted: 09 Dec 2017 11:33 PM PST

    The goal I'm trying to achieve here is to be able to run this script, and have it open up the pdf of the latest NOTAMs from an airport (NOTAMs are notices to pilots, and need to be briefed before they fly - so it's a pretty repetitive task). Ultimately, I'm copying the NOTAMs from the pdf into a ppt slide, so if it's possible to have it automatically update the ppt slide too that would be amazing. But for my purposes, just getting the pdf is a huge help.

    What follows is a frankensteined block of code from examples I found online. When I run it on my home computer (Windows 7, IE 11), it seems to work ok. But when I run it at work (Windows 10, IE 11), it opens up to the correct NOTAMs page, but runs into a bug before it downloads the pdf. I get a "The object invoked has disconnected from its clients" in reference to the Loop While line.

    I'm not a programmer by trade, so I know this is probably disgusting, but any help/tips/advice is greatly appreciated.

    Call Main Function Main Set IE = WScript.CreateObject("InternetExplorer.Application", "IE") Set x = CreateObject("wscript.shell") IE.Visible = True IE.Navigate "https://www.notams.faa.gov/dinsQueryWeb/queryRetrievalMapAction.do?reportType=Report&retrieveLocId=kord&actionType=notamRetrievalByICAOs&submit=View+NOTAMs" Wait IE IE.Navigate "https://www.notams.faa.gov/dinsQueryWeb/saveNotamAsPDF?locidStr=KORD&save" Wait IE x.AppActivate "Defense Internet NOTAM Service - Internet Explorer" x.SendKeys "{TAB}" Wait IE x.SendKeys "{ENTER}" x.AppActivate "Defense Internet NOTAM Service - Internet Explorer" x.SendKeys "%{F4}" End Function Sub Wait(IE) Do WScript.Sleep 500 Loop While IE.ReadyState < 4 And IE.Busy End Sub 
    submitted by /u/Metal_Lamb
    [link] [comments]

    No comments:

    Post a Comment