Can someone explain the difference between Apache and Nginx, with respect to their architecture? Ask Programming |
- Can someone explain the difference between Apache and Nginx, with respect to their architecture?
- Not getting intended output in JAVA parking ticket simulator
- Suggest Language/Framework for class project
- Planning Object-oriented designs
- (C#) How to set path for filewatcher when directory changes name
- C++ Multiple Variables used for one equation
- MATLAB nested loop issue
- (C#) When using AJAX/WebMethods, is it bad practice if you have a lot of processing in the backend but MUST use static variables?
- Show / Hide forms using Dropdown Selection (PLanguage PHP)
- How do I turn this code to add an extra dropdown menu?
- Is there a lib to write a custom DVD movie player?
- Is this a hashtag? e038b970-63d8-4779-9797-45e8a87520ac
- Does hackerrank display my test results to the public based on my email? Can I practice indefinitely without revealing every attempt? Their FAQ is unclear.
- Multi-location assignment
- Arduino: Need help with code for motor driver / linear actuator
- Good folder structure for a "large" project?
- [Android] [Kotlin] AlertDialog setButtonPositive() : problem with onClickListener
- Any good intermediate tutorials for angular.js?
Can someone explain the difference between Apache and Nginx, with respect to their architecture? Posted: 09 Feb 2018 08:48 AM PST |
Not getting intended output in JAVA parking ticket simulator Posted: 09 Feb 2018 09:35 PM PST public class ParkingTicketSimulator { public static void main(String[] args) { // Create a ParkedCar object. // The car was parked for 125 minutes. ParkedCar car = new ParkedCar("Volkswagen", "1972", "Red", "147RHZM", 125); // Create a ParkingMeter object. 60 minutes were purchased. ParkingMeter meter = new ParkingMeter(60); // Create a PoliceOfficer object. PoliceOfficer officer = new PoliceOfficer("Joe Friday", "4788"); // Let the officer patrol. ParkingTicket ticket = officer.patrol(car, meter); // Did the officer issue a ticket? if (ticket != null) System.out.println(ticket); else System.out.println("No crimes committed!"); } } public class ParkedCar { } public class ParkingMeter { private int timePurchased; } public class ParkingTicket { private ParkedCar car; private PoliceOfficer police; private final double initialTicket = 25.0, additionalTicket = 10.0; private int parkedOver; private double fineAmount = 0.0; } public class PoliceOfficer { } It outputs "ParkingTicket@6d06d69c" compiler does not show any errors [link] [comments] |
Suggest Language/Framework for class project Posted: 09 Feb 2018 12:30 PM PST I need to create a mini project for my DBMS class. The only requirement being that i have to use SQL queries. Im confused on what language to use for the application. [link] [comments] |
Planning Object-oriented designs Posted: 09 Feb 2018 12:10 PM PST I've been doing programming of some kind for a few years now (mostly just working on my own, though I recently got a related job), and I feel like I've never really gotten the hang of using objects to their full potential. My question: what process do you go through to design your classes? How do you go from "I need to make a thing that does X" to "I will have four classes, A will inherit from B... etc"? [link] [comments] |
(C#) How to set path for filewatcher when directory changes name Posted: 09 Feb 2018 02:04 PM PST What can I do so I don't have to manually change the directory name (currently 0.1.304) in fileWatcher.Path every time it changes due to software updates? [link] [comments] |
C++ Multiple Variables used for one equation Posted: 09 Feb 2018 01:47 PM PST Hello, I am trying to figure out how I can use multiple variables I have previously initialized in the same equation. For exmaple: a1 = 5; a2 = 6; a3 = 7; a4 = 8; a1+a2=x; a3+a4=y; I would like to combine the two to make one equation and just have the variables alternated out instead of having to rewrite the same equation over and over with the required variables. Thank you! [link] [comments] |
Posted: 09 Feb 2018 01:30 PM PST I am given the following problem: "The Wind Chill Factor (WCF) measures how cold it feels with a given air temperature T (in degrees Fahrenheit) and wind speed V (in miles per hour). One formula for WCF is WCF = 35.7 + 0.6T – 35.7(V0.16) + 0.43T(V0.16). Write a function called wcf to receive the temperature and wind speed as input arguments, and return the WCF. Using loops, print a table showing wind chill factors for temperatures ranging from -20 to 55 in steps of 5, and wind speeds ranging from 0 to 55 in steps of 5. Call the function to calculate each wind chill factor." From my understanding, the problem is asking for a WCF for every combination of temperature (from -20 to 55 degrees) and wind speed (from 0 to 55). This is my code, which does not seem to work according to nest loop procedure: (END OF CODE) Now, please correct me if I am wrong, but the way my code is set up, it should first make temp = -20, then proceed to make wind_speed = 0, and calculate wcf and call it wind_chill. Then, it puts -20 in the first row, first (which is variable and changes for each iteration) column of matrix m. Then, it puts 0 in the second row, first column of matrix m. Then, it puts the value of wcf in the third row, first column of matrix m. Now, it should still keep the temp as -20 but now make wind_speed equal to 5, and go through all the stuff after that, and continue this loop up to wind_speed = 55. Once these calculations have been made, it should make temp = -15 and eventually create a giant table of values. Obviously, I must be doing something wrong. For the life of me, I can't figure it out. Here is the output that I am currently getting with this code: Temp WindSpeed Wind_Chill ___ __________ __________ Not only do I not understand why it won't iterate through all the wind speeds, but why is it displaying only 55? If anything wouldn't it display only 0? Why would it be skipping straight to the end? I'm dumbfounded, so I would really appreciate some help! Thanks! [link] [comments] |
Posted: 09 Feb 2018 10:41 AM PST Reason being, when using WebMethods, the method must be static, and so every time a variable is used, it must be static as well. I got something to work, but somehow I can't help but think it is not done using best practices. I need AJAX to make an async call to the codebehind and this seems to be the only way to do it. Thoughts? Thanks in advance. [link] [comments] |
Show / Hide forms using Dropdown Selection (PLanguage PHP) Posted: 09 Feb 2018 06:05 AM PST how can i show or hide a respective form based on my dropdown selection. My dropdown is currently bind to my database "tblusertype" which shows "Administrator , Student , Teacher and Outsider as an option. I haven't tried anything to make it work. thanks in advance. below is my code in my dropdown <select class="form-control show-tick" name="dpusertype" data-live-search="true"> <option selected="selected"></option> <?php while ($row = mysqli_fetch_assoc($result)) { echo '<option value="' . $row['usertype_name'] . '">' . $row['usertype_name'] . '</option>'; } ?> </select> [link] [comments] |
How do I turn this code to add an extra dropdown menu? Posted: 09 Feb 2018 09:46 AM PST If I wanted to make news a drop down also how would I change it? many thanks! https://www.w3schools.com/css/tryit.asp?filename=trycss_dropdown_navbar [link] [comments] |
Is there a lib to write a custom DVD movie player? Posted: 09 Feb 2018 09:29 AM PST I need to write a DVD movie player with custom subtitle rendering. I figured to hook into existing video player like VLC or mplayer classic. However all those projects are very large and complex nowadays and I wonder if there is a simple alternative where I can write my own player using existing libraries. Alternatively it would also be enough to write a tool that simply extracts subtitles from a DVD Movie. Any recommendations? I am mostly using C++ but I am open for alternatives. [link] [comments] |
Is this a hashtag? e038b970-63d8-4779-9797-45e8a87520ac Posted: 09 Feb 2018 07:57 AM PST I'm trying to decifer what this code stands for. I'm in a queue to be served and wondering how far back in the line I am. I think this code indicates what number in line I am. [link] [comments] |
Posted: 09 Feb 2018 01:57 AM PST Hi, apologies if this is not the right sub (alternative suggestions welcome.) I'm going to perform a hackerrank test for a particular potential job. Before I click "go", I want to try it on my own and practice practice practice. Now-- either my practice results are entirely my own business, and I can choose when and what to display based on my own judgement... Or, I need to worry about registering at hackerrank as some alternative email address(es) that I don't share with potential employers., so that I can take tests with abandon / push myself without worrying about publishing low scores. Note: I would naturally presume the former, but that means that (outside controlled tests like this one for a particular employer) one's score is not a good reflection of native ability but could reflect the statistical spikes expected from trying a thousand times. Thanks for tips. [link] [comments] |
Posted: 09 Feb 2018 04:25 AM PST I'm not sure if I have worded the title correctly, so please bear with me while I explain and I apologize for confusions. I'm playing around with an idea and part of that is to create a post submission (the site is a social network) where the visibility of this post is defined by the poster - where the poster can select region/state/city.. I'm thinking of this from both a UI perspective and a database layout. UI: DB: Meaning, rather than have a table with a post_id and other ancillary foreign key references, one row for each city/state/region (probably, just the cities and take care of their grouping at the UI side, though that would not make for a clean segregation of duties between back and front ends). If it matters, the database I am using is Postgres 10. Has someone experienced something like this? [link] [comments] |
Arduino: Need help with code for motor driver / linear actuator Posted: 09 Feb 2018 12:52 AM PST Please help! We're not sure why but the actuator keeps stuttering. Any suggestions or resources are welcome. (skip to 25sec for stuttering) video of problem: https://streamable.com/ri5fv code: void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(2, INPUT); } void loop() { // put your main code here, to run repeatedly: analogWrite(2, analogSignal(2.3)); // float idle = analogSignal(2.5); // float maxExtendVoltage = analogSignal(0.0); // float maxRetractVoltage = analogSignal(5.0); // // // For extending // analogWrite(A0,idle); // delay(4000); //4 second delay // // for (float i = idle; i>= maxRetractVoltage; i--){ // // analogWrite(A0,analogSignal(i)); // } int analogSignal(float voltage) { int analogSignal = (voltage*1023.0)/(5.0); return analogSignal; [link] [comments] |
Good folder structure for a "large" project? Posted: 09 Feb 2018 12:22 AM PST Hello I'm currently working on an interpreter, and I already have 5K+ lines of code, and I'll end up with a lot, lot more when it's finished (probably close to 15/20k for the fully working mvp). This is my current folder structure: https://github.com/Pierre-vh/Moonshot/tree/beta Currently I plan to move the External folder to the /Moonshot/ folder and maybe rename it to "3rdparty" (is it an appropriate name?), I'll also rename my .h to .hpp. Some people also suggested me to separate my .hpp/.cpp file in /header/ and /src/ folder, however, this is the core logic of the interpreter and not meant to be a public API (I'll build an api later when the interpreter is complete), so I think the folder structure should be : Is this a correct structure? Is there anything I should take care of? Also, should I use something like Doxygen and add comments above every function of every hpp to have a more "standard" documentation? (With a automatically generated Website to navigate it as a nice Doxygen bonus) This is my first large project, and I'm very young (just turned 18) and inexperienced so I'm probably making a lot of mistakes, but I'd like to learn from them and make my project easy to read and use for contributors/potential users. Even if my project ends up going nowhere, I'd still learn a lot from sticking to coding standards. Thanks a lot! [link] [comments] |
[Android] [Kotlin] AlertDialog setButtonPositive() : problem with onClickListener Posted: 08 Feb 2018 11:08 PM PST Hello there ! I'm trying to contribute to an open-source project. There is an action that is done without asking user if he is sure so I'd like to create an AlertDialog to ask and then proceed if user said "Yes". What I made so far : My problems : Redundant SAM-constructor : What is a SAM-constructor ? Why does it happen ? I tried to move my Listener in a variable with something like this : But then I don't know, and this is my second problem, what I'm supposed to put in place of DialogInterface and Int. I looked at the documentation so I know what it is but I can't figure out what it is in my case. I'm thanksful to everyone who is willing to help me ! [link] [comments] |
Any good intermediate tutorials for angular.js? Posted: 08 Feb 2018 10:41 PM PST Everything I find is super beginner level, so I'm wondering if anybody knows of any good online resources for angular that assume some familiarity with programming in general and js. Or good books, too. I'm just trying to bone up before I start my new job a week from Monday. Thanks! [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment