2,986 Recommended Topics

Remove Filter
Member Avatar for
Member Avatar for clementer

Check 4th element of an arraylist and compare it to an element. example: 1,1,2,4,1,2,3,4,1,2,5,1. so the 4th elements would be 4,4,1 and i want to compare that those numbers are the same as 4. I was thinking an if statemet would work. any recomendations?

Programming java
Member Avatar for clementer
1
38
Member Avatar for rosh988

<?php $firstname = $_POST{'firstname'}; $username = $_POST{'username'}; $emailaddress = $_POST{'emailaddress'}; $password = $_POST{'password'}; $contact = $_POST{'contact'}; //Database connection $conn =new mysqli('localhost','root','','registration'); if ($conn->connect_error) { die('connection failed : '.$conn->connect_error) }else{ $stmt = $conn->prepare("insert into users(firstname, username, emailaddress, password, contact) vlaues (?, ?, ?, ?, ?)") $stmt-> bind param("ssssi",$firstname, $username, $emailaddress, $password, …

Programming database mssql mysql php sql
Member Avatar for Dani
1
35
Member Avatar for GFXtm

I have the following table: my_contacts which contains the following columns: [CODE]contact_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, frist_name VARCHAR(20), interest VARCHAR(20)[/CODE] [CODE]-----------+-----------+---------- contact_id | fisrt_name | interest + ---------------------------------- 1 | smith | swim + 2 | mark | dance + ----------------------------------[/CODE] I need to move the interests column …

Member Avatar for Asish_2
0
2K
Member Avatar for Abhirami_1

Create a c++ program that reads a CSV file and prints the rows at even positions. For example, if the CSV file has 10 rows, print rows 2, 4,6, 8 and 10

Programming c++
Member Avatar for rproffitt
0
384
Member Avatar for Sathyaprakash

I have added a custom code to validate the phone numbers to be 10 digits on checkout fields. Here is the code add_action('woocommerce_checkout_process', 'phone_number_validation'); function phone_number_validation() { global $woocommerce; if ( ! (preg_match('/^[0-9]{10}$/D', $_POST['billing_phone'] ))){ wc_add_notice( "Incorrect Phone Number! Please enter valid 10 digits phone number" ,'error' ); } } …

Member Avatar for Dani
0
258
Member Avatar for ChrisJ

Is it possible to add scrolling text across the page/video-camera-screen? On an html page, it uses this code: accept="video/*" in this context: <input type="file" name="fileToUpload" id="fileToUpload" accept="video/*" capture="user" onchange="submitForm();"> and when you view the page via mobile, and tap the page, your video camera screen appears. I'm looking to see …

Member Avatar for rproffitt
0
175
Member Avatar for ytgaamer

I am making a tic tac toe game, and have completed it. Now I am trying to implement a library to my code and I chose ncurses, because it seems easier to add and will allow me to change the color of the input for the game. However, I can't …

Member Avatar for rproffitt
0
146
Member Avatar for clementer

I have an ArrayList of 750 elements I would like to divide that ArrayList into 150 subarraylists so 5 elements to each subarraylist. I have this code but it not working while (scanner.hasNextLine()) { String t = scanner.nextLine(); String[] ar = t.split(","); for (int i = 0; i < ar.length; …

Programming java
Member Avatar for rproffitt
0
112
Member Avatar for Claire_6

Hi! I need help with my assignment. I need to convert this one to C language. I've already changed the cout to prinf, but somehow it doesn't run. Help please. #include <stdio.h> int main(){ int order,no_deals; cout<<"Grocery"<<endl; cout<<endl; cout<<"(1) Eggs 6 pesos only."<<endl; cout<<"(2) 1 kl Rice 60 pesos only."<<endl; …

Member Avatar for rproffitt
0
97
Member Avatar for Hugo Edson

I wrote this line of code: database = {"host":host, "user":user, "password":password, "db":db, "charser":charset, "cursorclass":cursorclass} and i'm receiving this: {'host': '35.234.92.142', 'user': "b'freedbtech_'", 'password': "b''", 'db': "b'freedbtech_cursopython'", 'charset': 'utf8mb4', 'cursorclass': "<class 'pymysql.cursors.'>} i need to remove those "b's" and " ' " in the strings, but i don't know how to …

Programming database mysql python
Member Avatar for rproffitt
0
95
Member Avatar for Aldrich_2

I have a variable called **arrayForStudents**. it has 5 columns you can see how should it be applied from line 51 to line 63 code block but I am getting trouble how should I add the value as simple as interting values in the database. I need help using System; …

Member Avatar for rproffitt
0
89
Member Avatar for hennel

Good day I am trying to get a total of two numbers. The first number I need to get form my page (the number changes every few seconds (crypto clicker) Second number must be 35 This is the code I got after search, but do not know how to get …

Member Avatar for hennel
0
87
Member Avatar for Donnolic

I have a VB.net project that queries my online database directly. Now I want to use API instead of direct connection. Please I have never done such before and all materials I got online are not learning friendly and some that are friendly didn't have relation with database. And secondly, …

Member Avatar for Dani
0
84
Member Avatar for apu_923

Hello every one I'm new here I need your help I'm newbie in PHP and littlebit understand on the PHP so I need your help I'm going to make a page of user account setting in which user upload his/her image update his/her name email and also change his password. …

Member Avatar for Dani
0
73
Member Avatar for ALI_418

A balanced tree is one of the data access techniques in a database. How does it work? How data can be inserted in. How data can be deleted from it; how data can be updated? And how data can be reviewed? By giving an example explain all of them. Your …

Member Avatar for rproffitt
0
72
Member Avatar for clementer

How do I compare 3 Arraylist with each other and find the small, medium and large elements. I was thinking something like this but its not working. ArrayList<interger> a = new ArrayList<ArrayList<interger> >(); a.add(1); a.add(2); a.add(7); ArrayList<interger> b =new ArrayList<ArrayList<interger> >(); b.add(8); b.add(9); b.add(1); ArrayList<interger> c = new ArrayList<ArrayList<interger> >(); …

Programming java
Member Avatar for Husoski
0
52
Member Avatar for Deekshitha
Member Avatar for Dan_860

I am having trouble appending an arraylist to an existing textfile, it appends but in the process clears all of the existing data inside of the file. Please can you help :) many thanks in advance Scanner myScanner = new Scanner (System.in); ArrayList<Books> details = new ArrayList<Books>(); int ISBN; String …

Member Avatar for rproffitt
0
45
Member Avatar for Idestruction

Hello all! I am trying to complete a lab assignment for my computer systems class and we have to use the printf function to print changing register values (increment eax from 1 to 10, decrement ebx from 10 to 1). Here is my code: [CODE]; Purpose: To print data to …

Member Avatar for John_310
0
22K
Member Avatar for kww228

I am trying to get my program to do a simple math problem of A*B+C*D given a set of test numbers. I have the code written out, but after I input numbers for A and B it goes into an infinite loop. My code is this: [CODE]ORG 100 Load A …

Member Avatar for Mariam_16
1
4K
Member Avatar for Komlika_1

Consider the following database Room (room_no,room_name,room_type,charges) Guest(Guest_code, Gname,city) The relationship is as follows: Room-Guest: one-to-one. room_type can have values as either ‘AC’ or ‘NonAC’. Q 2) A Create the above database in PostGreSQL and insert sufficient records.

Member Avatar for john_111
1
2K
Member Avatar for SylveeAshley

I am writing a program that calculates the volume of a cylinder when you input the diameter and height, using the formula 1/4*height*3.14*diameter^2 However the issue is, whenever I do that, the volume always comes out to be 0 when I run the program. #include<iostream> using namespace std; int main() …

Programming c c++ java javascript
Member Avatar for Husoski
1
182
Member Avatar for david_206

Hi everyone. I wana ask to the experianced person that is it possible to make the exact replica of a website's android app ? I mean of I have a site related to novel or books can I make its exact android app? Which later can be published to Play …

Member Avatar for Dani
1
56
Member Avatar for Yogendra_2
Member Avatar for Bhoot

i am developing a visual studio solution that contains two projects. Each project has its own namespace : Project1 : namespace MainProject.Project1 Project2 : namespace MainProject.Project2 My problem is that i cannot access 2nd project's namespace in the 1st project and vice versa. I tried to add the namespace through …

Member Avatar for V._549
0
11K
Member Avatar for collin_ola

Hi, Could somebody provide me with an example of how to display data (some text) in a combobox? Thanks Collin

Member Avatar for Muskan_9
0
8K
Member Avatar for Debby0424

Hello All, I am submitting a inventory program that I need some help with. I had to create a product class that holds the item number, the name of the product, the number of units in stock, and the price of each unit. Then I needed to create a java …

Member Avatar for Batha
0
7K
Member Avatar for TheMightySpud

Hi all, I'm getting a strange error every time I try to send a score update using an rpc using Photon Unity Networking (And Unity3d). Here is the Error. RPC method 'RPC_SendScore(String, Single)' found 2x on object with PhotonView 1201. Only one component should implement it.Return type must be void …

Member Avatar for rproffitt
0
1K
Member Avatar for daledan

help!!!... i have homework to create a simple address book in Visual C++ it should Add, Delete, Modify, Display A Record using classes/class, file handling & structure... It would be a big favor doing it..

Member Avatar for Mian_13
0
738
Member Avatar for paul1145

In Visual Studio 2015, VB, in Windows 10, I have a small program where I use the arp -a command to pick up the mac and I/P addresses of connected devices on my lan. From everything I've read (and tried), the answer somehow comes back to DNS.getHostEntry which throws a …

Programming vb.net
Member Avatar for paul1145
0
349

The End.