Unable to Ping Smartphones Using Java Ask Programming |
- Unable to Ping Smartphones Using Java
- calculator regex javascript
- [C] Terminating arrays of pointers with NULL: good idea or not?
- Is there a tool that will render javascript pages after passing through a page via URL?
- Java custom Menu class
- What language facilitates quicker programming the most?
- Competitors to neo4j?
- [ Java ] I/O Objects into Binary File
- Is there anyone who speaks English and wants to learn the programming language? I want to improve my English. We can become friends and study together. I can teach you the programming language.
- I'd like to start programming robots. What to I need to get started?
- What's the idea behind incremental parsing?
- What could be the programming language(s) that is used to build Google Cloud?
- Need help understanding how to properly link an array. (C++)
- Turing machines and computability
- why are there three pips in my python script folder?
Unable to Ping Smartphones Using Java Posted: 10 Nov 2018 03:51 PM PST I'm currently making a Java application that detects when smartphones connect to our home network. I'm able to get the IP addresses of all of the "remembered" devices on the network, ping the devices currently active on the network like desktops and laptops, but when I try to ping smartphones (either from command line or from the Java application using the InetAddress's isReachable() method) the requests time out. Is this a problem with a security setting on our router? Do the phones (iPhones) themselves have security that prevents this? Is there any other Java code I can use to detect when these smartphones are or aren't active on the network? I haven't been able to find a particularly helpful answer so far in previous questions. Thank you for your help! EDIT: I've found that the smartphones will ONLY respond to a ping if they're unlocked. If anyone has suggestions on how to know if the device is still on the network or not while locked (other than setting a time threshold), I'd much appreciate it! [link] [comments] |
Posted: 10 Nov 2018 08:10 PM PST I´m using React as a framework, though I´m not really sure that matters in this scenario. My current regex still allows this: "0.55+58.8.58.5" (and the like, when it should be "0.5" or "0.5 + 1.2") and this: ".+" and "+."(and the like, specially decimals after operands and such which shouldn´t be permitted). Any idea on how to limit that? [link] [comments] |
[C] Terminating arrays of pointers with NULL: good idea or not? Posted: 10 Nov 2018 06:55 AM PST At work, I see a lot of arrays of pointers to struct terminated with NULL. I was considering using this in my own code, in which such an array is passed as a pointer to a function. This way, the function doesn't need to accept a length argument(if it doesn't need the length in O(1) time). Which is good, -but- this would make it inconsistent with other functions accepting arrays of non-pointers or functions that need to access the length in O(1) time. Do you think it's worth it to terminate an array of pointers with NULL and not have to pass a length argument? [link] [comments] |
Is there a tool that will render javascript pages after passing through a page via URL? Posted: 10 Nov 2018 01:50 PM PST Kind of like htmlpreview.github.io : http://htmlpreview.github.io/?https://www.bankofamerica.com/mortgage/mortgage-rates/ As you can see the javascript isn't rendered on that page. Thanks! [link] [comments] |
Posted: 10 Nov 2018 01:49 PM PST New here so not sure if Im doing this right. I had to create a selection menu for a Contact Directory project for school. This is the second time Ive had to create a menu for a particular project so I recycled the menu from my previous project to accommodate this Contact Directory and all went well. But I realized Im basically just listing the Objects methods for the user to select from in both scenarios so I got bored and decided to try to generalize the menu class I had to work with any directory-type class and this is what I came up with. Im fairly new to programming so Im just looking for insight as to how to improve my code or if theres a better way to do this. package menu2; import java.lang.reflect.Method; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import javax.swing.JOptionPane; public class Menu2 { /** * @param args the command line arguments * @throws java.io.IOException */ private String name; private int selection; private int count; private Class c; private String menuDisplay = " "; private Method[] methods; /** *creates menu to navigate directory list * @throws IOException */ public Menu2(Object o) throws IOException, IllegalAccessException, IllegalArgumentException, InvocationTargetException{ this.c = o.getClass(); menuView(); selection = 0; do { selection = menu(); if(selection != count) methods[selection-1].invoke(o); }while (selection != count); } /** *displays menu options * @return */ public void menuView(){ methods = c.getDeclaredMethods(); Method[] temp = new Method[methods.length]; count = 0; for (int i = 0; i < methods.length; i++) { System.out.println("public method: " + c.getSimpleName()); if(methods[i].getParameterCount()== 0 && !methods[i].getName().equalsIgnoreCase("iterator")&&!methods[i].getName().equalsIgnoreCase("tostring")){ menuDisplay += (count+1)+". "+methods[i].getName()+"\n"; temp[count] = methods[i]; count++; } } menuDisplay += count+". Quit"; methods = temp; /*Method[] x = new Method[count]; for(int i = 0; i < count;i++){ x[i] = temp[i]; } methods = x;*/ } public int menu() { String choiceStr; int choice; choiceStr = JOptionPane.showInputDialog(menuDisplay); choice = Integer.parseInt(choiceStr); return choice; } } This menu is instantiated inside of ContactDirectory constructor which is instantiated in main. Everything works it would seem but any advice, better code practice insight is welcome. [link] [comments] |
What language facilitates quicker programming the most? Posted: 10 Nov 2018 12:08 PM PST I realized today that, while programming in C certainly allows for quicker programs in terms of execution time, it takes forever to get a non-trivial project off the ground. C code is not brief; oftentimes you see a lot of boilerplate code before getting at the actual functionality of the project. So, I'm curious now. What compiled programming language out there boasts comparable performance to C as well as a higher level of abstraction? [link] [comments] |
Posted: 10 Nov 2018 03:12 PM PST What other technologies exist comparable to neo4j. Specifically looking at modelling dependencies between systems that may or may not be resilient. [link] [comments] |
[ Java ] I/O Objects into Binary File Posted: 10 Nov 2018 08:50 AM PST Hi guys, I have a stupid question. When I try to write an Object (O1) into a Binary File, Object must implements Serializable, but maybe my Object uses a third Object (O2) that doesn't implements Serializable. O2 will be written as well? [link] [comments] |
Posted: 10 Nov 2018 05:40 AM PST |
I'd like to start programming robots. What to I need to get started? Posted: 10 Nov 2018 07:36 AM PST I'm 16 and I've been programming in C++ for 2 years. I have no knowledge in any other programming languages. I've recently stumbled upon OpenCV and I became interested in robots. What exactly do I need to create a robot? I'd probably use Arduino and OpenCV (if you have any other suggestions I'd be glad to hear them), but I'm not sure what physical components are required and where can I buy them from. Any ideas? [link] [comments] |
What's the idea behind incremental parsing? Posted: 10 Nov 2018 02:33 AM PST I know basic parsing quite well, I've implemented CF parsers for programming languages before. Recently the need came to be able to parse a file that may not be syntactically correct and still produce a reasonable AST if possible. Also as the file changes character-by-character, I don't want to re-parse the whole thing, I just want to reflect on the changes. I've found out that what I need is called incremental parsing. I'd like to know what's the idea behind that? Is it a bunch of heuristics built in whatever parsing techniques I want to use? How could it still produce an AST? (Well I think it's technically a parse-tree then) Could such a thing be hand-written (reasonably)? Context: I'm building a language tool and I'd like to have better support for "as-you-type" experience. [link] [comments] |
What could be the programming language(s) that is used to build Google Cloud? Posted: 10 Nov 2018 10:00 AM PST I was wondering how did they built Google Cloud or AWS. In general i saw websites on PHP, Ruby or Python. These seems to be common but about those cloud giants? [link] [comments] |
Need help understanding how to properly link an array. (C++) Posted: 10 Nov 2018 09:28 AM PST I started with a program I had made before for class that used straight doubles, and started to move over to arrays, however i'm getting lnk errors and when I try to search them up I haven't gotten any good examples or a begging level understanding other than "NO POINTERS TO ARRAY" but, how do I send the value held in the array slots to my functions then? real begginer here, thanks. #include <iostream> #include <iomanip> using namespace std; void getScore(double&); void calcAverage(double, double, double, double, double); double findLowest(double, double, double, double, double); double findHighest(double, double, double, double, double); void valiDate(double &); int main() { } void getScore(double &x) { } void valiDate(double &x) { } void calcAverage(double A, double B, double C, double D, double E) { } double findLowest(double A, double B, double C, double D, double E) { } double findHighest(double A, double B, double C, double D, double E) { } [link] [comments] |
Turing machines and computability Posted: 09 Nov 2018 10:40 PM PST An article I just read said: "There is a common misconception that Turing machines can compute anything computable. There are classes of problems (e.g., the halting problem) that can be computable for some cases, but are not generally computable for all cases using Turing machines." I find this wording confusing, and I'm not sure what he's getting at. Can anyone shed light on it? https://medium.com/javascript-scene/the-forgotten-history-of-oop-88d71b9b2d9f [link] [comments] |
why are there three pips in my python script folder? Posted: 10 Nov 2018 01:42 AM PST why there are three pip files in my script folder and what do they even mean?
if i should get rid of some of them then how to do it? some command to uninstall or just delete it. ps: i installed pip by downloading get-pip.py and then running command "python get-pip.py", i think it installed correctly but i had an environment error
[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