3,010 Recommended Topics

Remove Filter
Member Avatar for
Member Avatar for Blink383

My problem is setting the size of the JButton. I want it to be a little button centered below the "Hello World" JLabel field (as it is now it spans the full width of the JFrame). I am unsure what is causing the setPreferredsize to be ignored. I am an …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Saboor880

Hi! I have made a POS Sotware. I have used only one JFrame as Main/Home Screen of the software and used JDialogs for all other screens. In this post I have concern with the 2 screens; Home Screen(which is a Jframe) and Sales Screen(which is a JDialog). As Home Screen …

Member Avatar for JamesCherrill
0
1K
Member Avatar for kouty

I dont understand the appearent discrepency in the treatment of the variabe x, y, and z. Why y isn't treated as x and z? #include <stdio.h> #include <string.h> int main() { char result[100] = "Philippe Dupont 30"; char x[50]; char y[50]; int z; /*We use sscanf to give a value …

Member Avatar for kouty
0
1K
Member Avatar for Princecrich

How can someone write a Php script that enable users upload image along with a short description in their member area to the database where admin can receive and treat it??? I will also like to know how history on upload can also be added after each upload to the …

Member Avatar for Dani
0
677
Member Avatar for Danny159

Hey! I have the following code for htaccess that directs /page/ to /page.php etc RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_URI} !(/$|\.) RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] #RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([a-z0-9\-]+)/?$ $1.php [NC,L,QSA] However, I want to also add /admin/page/ that …

Member Avatar for Dani
0
536
Member Avatar for optimumgiant

Anyone can fix this code. thank you, only TURBO C program #include<stdio.h> #include<string.h> #include<stdlib.h> #define true 0 #define false 1 struct product { char id[10]; char name[20]; int quantity; int numSold; float price; int discount; float sales; }; struct product prod[30]; int count = 0; FILE *f; int writefile() { …

Member Avatar for optimumgiant
0
507
Member Avatar for Saboor880

Now I am making my pos software client - server based software. I am using java derby as the database. On the local host I am running the program successfully. But on the remote server I face an exception. First I tell you, how I am connecting to the remote …

Member Avatar for JamesCherrill
0
374
Member Avatar for Dragonmh

I have been at this for weeks and I am able to get most of the errors cleared on my own. I am stuck on these errors and I am unable to find out what is really wrong and going on. I am still pretty new at this. The code …

Programming c++
Member Avatar for rproffitt
0
331
Member Avatar for lanny_1

can someone please help me with coding. I need to create a dropdown menu with the options being the category the user has inputted into a file upload page.

Member Avatar for lanny_1
0
313
Member Avatar for Cheri Anne

How do I echo selected option? <?php session_start(); if(isset($_SESSION['cherianne'])){ }else{ header("Location:login.php"); } include("../includes/header.php"); // Retrieve our critical page setter variable. $char_id = $_GET['id']; //echo "<h1>$char_id</h1>"; // set this as a default value if (!isset($char_id)) { $result = mysqli_query($con, "SELECT bid FROM cde_blog LIMIT 1"); while ($row = mysqli_fetch_array($result)) { $char_id …

0
302
Member Avatar for Joedanica

idk why my program is not working, i wanted to create a program that counts even and odd number when a user inputs number except 0. Zero is the terminator of the loop. #include <stdio.h> int main(){ int entNum, ans; int even; int odd; do{ even=0; odd=0; scanf("%d",&entNum); ans = …

Programming c++
Member Avatar for Reverend Jim
0
287
Member Avatar for m.mohamed

I am trying to create a method that will count number of zeros in a statement/numbers (numOfZero), that a string as input and returns the number of occurrence of ‘0’ in the string. And if there is no zero it should return zero. I have used String.length() and String.CharAt(int index). …

Member Avatar for rproffitt
0
212
Member Avatar for Eugene_15

hi guys, can anyone advise me how to pass ajax post, my alert message has value but i cant pass to index.php . searchresult.php <input class="lowfliter" onclick="lowprice()" type="submit" id="lprice" name="lprice" value="Lowest"> search.js function lowprice() { var lprice = document.getElementById("lprice").value; var myData = 'lprice='+lprice; jQuery.ajax({ type: "POST", // HTTP method POST …

Member Avatar for Dani
0
1K
Member Avatar for DanyOcean

Hi, I apologize if my english is bad, I need some help printing the value of a variable in the code that I show below, I'm using emu8086 and I need that this works in this code example that is the same that comes in the examples of emu8086 (PrinterDemo.asm) …

Member Avatar for Thaumtrope
1
12K
Member Avatar for SimonIoa

I have a search script that a user may search persons etc. I want to display a message if what he or types doesn't exist in the array. By default, I display some results and it displays the desired person when one writes on searchbar. but I want to show …

0
1K
Member Avatar for pelin

i am almost done with the hangman game but i just need to migrate it to graphics i know i need to use entrybox but i still dont know. [CODE]rom graphics import* from random import * MAX_BAD_GUESSES = 7 def readfile(): infile = open("wordlist.txt","r") contents = infile.read() lines = contents.split("\n") …

Member Avatar for Devarshi_1
0
628
Member Avatar for sanvith

Hi, Phrases on video is getting stacked up on each other after some iteration. Please help. Here is the link: http://responsivemts.com I have attached the screenshot for your reference. Thank you, ![Capture.JPG](/attachments/large/2/7db0d27700994ee4f0982cf8d3a54c3e.JPG) <div class="newsticker"> <ul class="newsticker-list"> <li class="newsticker-item item1"> <h1 >All Your Ad Campaign Needs in One Place</h1> </li> <li …

Member Avatar for Dani
0
432
Member Avatar for SharkJr

after i key-in the form, the function change the whole column with the same value for example if i put first name JOHN it will update whole column with JOHN <?php session_start(); require_once("connection.php"); if (isset($_POST['edit'])) { session_start(); $s=mysqli_query($con,"UPDATE user SET first_name ='" . $_POST['first_name'] . "'"); $row = mysqli_fetch_assoc($s); if …

Member Avatar for anand9796
0
416
Member Avatar for Mr. Lemic

So, with my program, I want to calculate prime numbers and would only like to see it come out with only one prime number. I tried to put it in a if statement at the end like "if (number_of_primes=number_tester) printf("%i/n", test_int)", it did not work. and at it's current state …

Programming
Member Avatar for rproffitt
0
371
Member Avatar for Barnacle

from tkinter import * import time root = Tk() root.title("Testing System") root.geometry("900x600") def main(): def tick(): time_str1= time.strftime("%H:%M:%S") clock.config(text = "Current Time:\n" + time_str1) clock.after(200, tick) def date(): date_str1 = time.strftime("%A, %d %B %Y") date2.config(text = date_str1) date2.after(200, tick) frame = Frame(root) clock = Label(frame, font = ("times", 14, "bold"), …

Member Avatar for woooee
0
337
Member Avatar for Imran_28

I want to add a function for user to change file. I am not really sure on how. I have already created a function in the end but its not getting me anywhere. This is my code: import string import re filename = "phil.txt" def countLines(): Read number of lines …

Programming python
Member Avatar for Reverend Jim
0
334
Member Avatar for Yamil_2

CREATE TABLE Peaje ( id_no_pk CHAR(2) NOT NULL, nombre VARCHAR(30) NOT NULL, localizacion VARCHAR(30) NOT NULL, dirrecion VARCHAR(50) NOT NULL, tipo CHAR(1) NOT NULL, municipio_fk CHAR(2), CONSTRAINT Peaje_id_no_pk PRIMARY KEY(id_no_pk) CONSTRAINT Peaje_municipio_fk FOREIGN KEY (municipio_fk) REFERENCES Municipio(id_no_pk)); CONSTRAINT Peaje_municipio_fk FOREIGN KEY (municipio_fk) REFERENCES Municipio(id_no_pk)) * ERROR at line 9: ORA-00907: …

Member Avatar for Reverend Jim
0
322
Member Avatar for Eugene_15

Would appreciate some kind help here as I'm experiencing some issue with regards to sorting of result from my map database. I trying to use onchange="this.form.submit() to activate my dropdown sort function, but somehow I kept getting plain text display of the sorted result. However, it would work fine if …

0
1K
Member Avatar for happygeek

Last week a group of six 'm-commerce' experts took part in a round robin discussion in Manchester, England to determine the best ways forward for developers interested in creating a serious mobile web presence yet wanting to make money through the medium of mobile advertising at the same time. Anyone …

Member Avatar for Anninflow
0
4K
Member Avatar for John_165

When posting code, I get error > begin a line with 4 spaces in a row (or one tab), preceded by a blank line. 4+ spaces or tabs may not be used anywhere else.

Member Avatar for Anninflow
0
3K
Member Avatar for SimonIoa

Hello i want to make a button that mutes and unmutes sound in html5 <video> tag. Here what i have so far. Sadly it doesnt work .ts soundOnOff() { let audio = document.getElementById('muteSound') as HTMLMediaElement audio.muted = true; } html <button onclick="enableMute()" type="button">Mute sound</button> <video id="muteSound" muted="true" playsinline autoplay loop …

Member Avatar for Anninflow
0
1K
Member Avatar for Peter_TARAS

Hello, I am learning Tkinter. As a part of the learning process I am building a Notepad clone in order to become familiar with Tkinter widgets. I am pretty close to completing it - I added about 90% functionality to the application - but I face two problems: 1) The …

Member Avatar for bevis.hobbs
0
22K
Member Avatar for naya22

I am working on a math tutoring program that asks the user for a seed value, gives them two random numbers from 1 to 500, and asks them to key in the correct answer. So far, here is my source code: [CODE] #include <iostream> #include <cstdlib> #include <time> #include <conio> …

Member Avatar for Gheorghe_1
0
2K
Member Avatar for Cpptard

In the below program i am allocating memory for pointer to pointer properly and then allocating individual pointers and setting values properly, even though i am getting the garbage value to one of the structure member, i dont understand where exactly i am going wrong. Request for any expert help. …

Programming c++
Member Avatar for Cpptard
0
643
Member Avatar for Kent_4

Private Sub delBtn_Click() rs.Open Dim list As ListItem Set list = ListView1.ListItems.Add(, CStr(rs!Project_Name)) confirm = MsgBox("Do you want to delete the Employee Record", vbYesNo + vbCritical, "Deletion Confirmation") If confirm = vbYes Then ListView1.ListItems.Remove ListView1.SelectedItem.Key 'this line gives error Dim CM As ADODB.Command Set CM = New ADODB.Command Set CM.ActiveConnection …

Member Avatar for rproffitt
0
584

The End.