I want to create a php function that i can use to get a particular user details and display the info gotten in my ProfileActivity when a user profile is been clicked in my app. so i wrote this php code to get user details from my database but when i run the code nothing is returned in my browser. please what could be causing this? <?php require("config.php"); function getdetails($id) { $array = array(); $q = mysql_query("SELECT * FROM 'users' WHERE 'id'=".$id); while($r = mysql_fetch_assoc($q)) { $array['id'] = $r['id']; $array['name'] = $r['name']; } return $array; } function getId($name) { $q …

Member Avatar
Member Avatar
+0 forum 2

The facts: We are talking about a small company (5 persons) with many clients that making real money (we don't) . We provide our own software that has unique features against the e-commerce completion. The problem: the first glimpse of the problem arose around 2012 and made clear around 2014 with web sockets. Some clients didn't want a simple chat with their client but instead a full live eShop where they could negotiate the prices of a product or even start a discussion with a visitor. The solution would be implementing web sockets in to our framework and that worked …

Member Avatar
Member Avatar
+0 forum 3

Howdy All - I am just wondering if anyone has successfully converted a *massive* (subjectivity implied) COBOL application to another language. If so, into which language was your system converted and when was this done? What were the potholes you, no doubt, hit? Was the conversion far more expensive than anticipated? What hidden costs were exposed? Was there a performance gain/loss in the new language? Did anyone convert from COBOL to PL/SQL? to T-SQL? to Java? to C#.NET? Thanks, and have a great day!

Member Avatar
Member Avatar
+0 forum 10

How to save image from computer client to server using java?? Give me the source code..

Member Avatar
Member Avatar
-1 forum 1

I have a program that is meant to display the total, average, student name and letter grade for a student. I'm almost done writing it but I have no idea how to make it loop so it goes back to step 1 from step 4. Everything I've read on using "while" loops hasn't really been helpful to me with this particular application. import java.util.Scanner; public class Averages5 { public static void main(String[] args) { // variable declaration String name; int mark1, mark2, mark3 ; int grade = 0; int A, B, C, F; double average; // input Scanner input = …

Member Avatar
Member Avatar
+0 forum 2

Halli Hallo i hope im at the right Place. I want to get started with API-Gateway(s). Currently im running 5 Microservices written in Java (Spring-Boot) deployed via Docker. Each Microservices is protected via Keycloak. I want to use a API-Gateway so that i can combine every MS into 1 Link: * demo.com/api/ms1 * demo.com/api/ms2 * ... And more important i want to have the Authorization at one Place and not in everysingle Microservice. I found a couple of Solutions but im not sure which to use or if i maybe should write my own one? I was intrested in checking …

Member Avatar
Member Avatar
+1 forum 1

The API docs are now found at [ Java Development Kit Version 11 API Specification](https://docs.oracle.com/en/java/javase/11/docs/api/)

Member Avatar
Member Avatar
+0 forum 3

Create a class called Circle contains: Two instance variables (attributes): radius (typed double) and color (typed String). Provide a set and a get method for each instance variable. getArea(), which return the area of this instance, respectively. Create another class called Circle Test to : Create two different objects “Circle”, Call methods

Member Avatar
Member Avatar
+0 forum 1

Hello, I have a questions in TCP client to server communication: This is what is require me to do: First of all, if we run the program from multible command line or multible PC it will run the same program. ( of cource ) Second, the program should read from the .txt file and assigned each node to what node conected. ( done that ) Thired, the program should have the server and the client in the same class we could call it a Node.java for example. Fourth, when the Node.java want to send a message to other Node it …

Member Avatar
Member Avatar
+0 forum 1

hi people I am building a atm machine but havent actually coding it as yet, just the gui interface part i have done so far because i am doing something else at the moment but in between i would do someting with it. so i have put in an if and else statement. the atm should be work like this, when a person deposit any amount a pop box will tell u the money is deposit. it should also show u your current balance, bal enquiry, be able to get fast cash and able to widthdrawal right. I have started …

Member Avatar
Member Avatar
+0 forum 4

i am creating an app with android studio and i'm using mySQL.and i want to implement friends feature in my app to enable users send and recieve friend requests, i have created tables and writen the server side php code for that, i have also created an add as friend button that should do that in my app but i'm still unable to write the appropriate code for that in android.your help with this will be highly appreciated.

Member Avatar
Member Avatar
-2 forum 3

public class Gradesv2 { public static void main(String[ ] args) { //local variables int numTests = 0; //counts number of tests int testgGrades = 0; //individual test grade int totalPoints = 0; //total points for all test double average = 0.0; //average grade int test1 = 95; int test2 = 73; int test3 = 91; int test4 = 82; System.out.println(""); System.out.println("Test # 1 Test Grade: " + test1 + " Total Points: " + test1 + " = " + totalPoints + "Average Score: " + test1 = +); }//end of main method }//end of class

Member Avatar
Member Avatar
+0 forum 6

Hi, I've been doing research on a career in coding/programming and now I'm very interested and motivated to learn it. I'm a complete beginner and limited financially at present. So I'm confused as to how to go about it. I love reading a lot and sitting on my laptop, so no problem with studying. I'm the type of person that likes to learn an important big wide subject in stages. To first get a decent background and understanding of it. Then to go deeper into it. Is the following way a good way to go about it? Go through books …

Member Avatar
Member Avatar
+1 forum 3

Hello to all! I have added a jcombobox in a jpanel by dragging it from palette (Netbeans IDE). I am populating jcombobox with database without any problem. For example i have following 5 items in my jcombobox: Italy, Uganda, America, Canada, Austria When my jtable is focused and i type any key from key board e.g 'A', then the jcombobox filters perfectly and shows me the items: America, Austria. This is perfect working of jcombobox filtering i-e it filters the items on the base of first characters or alphabets from the left. But I need some advance filtering for example: …

Member Avatar
Member Avatar
+0 forum 6

Hi all, I need to read a text file (I've attached it, you can take a look), and then store all the numbers in it into a 2D array. After which, I need to parse it. I need urgent help here! ):

Member Avatar
Member Avatar
-2 forum 49

hi everyone i have not been here in a while. so here I am practicing building a forensic managment java application but the thing, i am trying to connect to the database, so, like i am importing the codes that would help connect to the database, like I mean the connection, the preparedstatement and the resultset and for some reason am getting errors, is it because that java is not finding the it or wat. the errors stating that it cannot find the symbol, I am only importing.

Member Avatar
Member Avatar
+0 forum 24

Moderators: Please dont delete this post as it is featured A part of an assignment I have due. The assignment states - A program that prints out lines of asterisks, based on the values determined by the user input. The program first asks for the minimum number of asterisks, the maximum number of asterisks, and the interval. It then prints lines of asterisks, starting with a line with the minimum number of asterisks, and ending with a line with the maximum number of asterisks. The increment of the numbers of asterisks is specified by the interval value. At the end …

Member Avatar
Member Avatar
+0 forum 6

Question from codility test Write a function: class Solution { public int solution(int[] A); } that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A. For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5. Given A = [1, 2, 3], the function should return 4. Given A = [−1, −3], the function should return 1. Write an efficient algorithm for the following assumptions: > > N is an integer within the range [1..100,000]; > each element of array A is an …

Member Avatar
Member Avatar
+0 forum 8

I've written a code that creates a Checkerboard Array application. There are no errors when I compile the code. Once I run the application, the window pops up but its just a blank white window. The code is as follows: import java.awt.*; import java.awt.event.*; public class Checkerboard extends Frame implements ActionListener { //declare variables TextField[] board = new TextField[16]; TextField fieldStart = new TextField(5); TextField fieldStop = new TextField(5); TextField fieldStep = new TextField(5); int start, stop, step; Label LabelStop = new Label("Start"); Label LabelStart = new Label("Stop"); Label LabelStep = new Label("Step"); Button goButton = new Button("Go"); Button clearButton …

Member Avatar
Member Avatar
+0 forum 3

I've just started a class to learn automation testing via Selenium. I'm using Firefox 61.0.2 (64-bit) I'm noticing a possible bug; not something major, but something that prevents efficiency: When attempting to load a saved project into the IDE via Open Project or through drag-and-drop, it does not load. Usually this requires closing/reopening the IDE and both methods to open a previous project will then load correctly. 1) My question in reference to this: has anyone experienced this, is it a known bug, and is it a good idea to simply revert to an earlier version of Firefox to remedy …

Member Avatar
Member Avatar
+0 forum 3

Hi Guys, I am looking for career advice. I am currently pursuing my associate's degree in computer science here in Texas. And I wanted to know if you guys know how people with associate's degrees get a job. As an international student, I would like one year of work before I transfer to a 4 year university to finish my bachelor's degree in software engineering or computer science. Currently I am taking my basics but I have done some programming in SQL, PHP, Java, Python, C, HTML and CSS. But I took breaks in between my learning so I am …

Member Avatar
Member Avatar
+0 forum 6

I have class with main method like: public class Main { public static void main(String[] args) { long timeCheck; long periodOfTime; ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(2); long initialDelay = 0; // the time from now to delay execution long period = 1; // the period between successive executions scheduler.scheduleAtFixedRate(new FeedReader(img, url, title, price), initialDelay, period, TimeUnit.DAYS); ... ... } } and another class with some code: public class FeedReader implements Runnable { private String img; private String url; private String title; private String price; public FeedReader(String img, String url, String title, String price) { this.img = img; this.url = url; this.title …

Member Avatar
Member Avatar
+0 forum 8

hey guys I'm new in perogramming the question is that (if your salary is 10000 after how many years will be doubled if each year increases by %5)??!!

Member Avatar
Member Avatar
+0 forum 2

Hello I am trying to create chaper links for my Vimeo videos on my site. I have managed to get a script working with direct links but cannot get it to work with a drop-down menu. Here is my code: <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.js"></script> <script src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script> <script> $(window).load(function(){ var link_1_track = 26; var link_2_track = 75; var link_3_track = 103; var link_4_track = 170; var link_5_track = 188; var link_6_track = 226; var link_7_track = 265; var link_8_track = 299; var link_9_track = 382; var link_10_track = 420; var link_11_track = 445; var link_12_track = 458; var link_13_track = 489; var link_14_track …

Member Avatar
Member Avatar
+0 forum 2

Praises be to the gods! Just when I thought all hope was lost, not just one but two proper Java questions. Maybe the road to recovery starts here?

Member Avatar
Member Avatar
+0 forum 6

Hello, I'm trying to create a program for a multiple choice test. I have 12 students, and I have the answers, all I need is to learn which student chose how many correct and wrong answers and left how many empty. All I need is something like this Students Correct Wrong Empty (0 is empty, 1 is A , 2 is B and so forth) 1 5 4 3 2 3 8 1 3 8 1 3 4 2 5 6 7 8 9 10 11 12 int[][]answers = {{3,4,2,5,0,2,1,3,2,4},{0,0,2,1,5,4,1,2,3,1},{3,3,2,5,4,1,2,5,0,3},{3,4,4,5,3,5,4,0,3,1},{3,4,2,5,4,3,1,2,3,2},{1,3,4,3,2,5,4,2,1,0},{2,0,3,4,2,0,1,5,4,2},{3,4,5,3,3,2,4,1,2,5},{3,5,3,5,1,2,3,4,5,6,0},{3,4,5,3,4,3,0,0,0,0},{3,4,5,2,1,2,3,2,5,3},{3,2,1,5,5,3,2,5,2,4}}; int[] correctA = {3,4,2,5,4,3,1,2,3,1}; int[] students = {1,2,3,4,5,6,7,8,9,10,11,12};

Member Avatar
Member Avatar
+0 forum 2

Guys, Im wondering, If I have another class with a jpanel in it... and I add this to the jPanel, this should work correct? jpanel.add(new DoughOverviewList()); jpanel.repaint(); for some reason its not showing in my jpanel, /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package doughtracker; import java.awt.Color; import java.awt.Font; import javax.swing.BorderFactory; import javax.swing.DefaultListModel; import javax.swing.JList; import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; import javax.swing.border.Border; import javax.swing.event.ListSelectionEvent; /** * * @author Acer */ public class DoughOverviewList extends JList { …

Member Avatar
Member Avatar
+0 forum 4

Hey Guys, So I have a JTextfield in the cells of 1 of the columns in my JTable I want to allow only numbers and up to one dot/period. Doesant need to contain a period. The persiod can be anywhere except at the end of the number. 1 ok .1 ok 1.1 ok 1.1.1 not ok 1. not ok This is my expression in my code Currantly it allows only numbers which is good, but it doesant allow any periods, :(... private JTextField createTextField() { JTextField field = new JTextField(); ((AbstractDocument) field.getDocument()).setDocumentFilter(new DocumentFilter() { @Override public void insertString(FilterBypass fb, int …

Member Avatar
Member Avatar
+0 forum 23

I'm trying to get a pop up as soon as a user logs in. I already have the pop up, but it keeps popping up all the results one at a time when I only need it to pop up within 15 minutes before the appointment time. How can I focus it to just do that? Here is my code: public Reminder() { String query = "SELECT contact, start FROM appointment WHERE createdBy = '" + MainApp.currentUser + "'"; try { ps = connection.prepareStatement(query); rs = ps.executeQuery(); while(rs.next()) { Timestamp tsStart = rs.getTimestamp("start"); ZoneId newZid = ZoneId.systemDefault(); ZonedDateTime newZdtStart = …

Member Avatar
Member Avatar
+0 forum 10

I am trying to display this SQL query in a table. String query = "SELECT COUNT(`appointmentId`),EXTRACT(MONTH FROM `start`) FROM `appointment` WHERE YEAR(start) = '" + year + "' GROUP BY EXTRACT(MONTH FROM `start`)"; Unfortunately I cannot alter the database. I am trying to list the total appointments per month on a table or perhaps a TextArea. Any ideas please? Thanks!

Member Avatar
Member Avatar
+0 forum 2

The End.