64,152 Solved Topics
Remove Filter ![]() | |
Hi Dw I've created a console application and now I want it to close or teminate straight when I choose exit I've tried the System.Exit(0) but it doesn't close the command screen please help me out. Thanks | |
I have a Java code block like following: Vector<NameAddress> route = dialog.getRoute(); for ( Enumeration<NameAddress> e = route.elements(); e.hasMoreElements(); ) { // some more to copy route to another Vector<> } I am trying to convert it in C# and here is my code: List<NameAddress> route = dialog.getRoute(); for ( … | |
Hello. I uhh... I just want a sample code for the Exceptions: SecurityException and StackOverflowException. I'm still new to handling exceptions. Please, just a sample code that is about those two will do. | |
So I have this piece of code in a socket server: def process(self, request, client_address): input_file = request.makefile("rb", 0) output = request.makefile('wb', 0) remote_input = input_file.readline().strip() + b"\n" self.log(remote_input) self.proc.stdin.write(remote_input) self.proc.stdin.flush() self.proc.stdout.flush() while True: line = self.proc.stdout.readline() line = line.decode() if line: line = bytes(line.rstrip() + "\n", 'utf-8') output.write(line) else: … | |
for printing php in pdf with which is advisable to use dompdf or fpdf? do i need to install a pdf reader first so for hte php code to work? i tried with fpdf but it will not work if no internet since it will download some files to open … | |
I have a mysql query that seperates an array of variables and uses each variables to compare inside the database. The query uses a OR clause and I want to make it so it can also use an AND clause. The trick is I want the left side of the … | |
Hi! I have a question about pop up windows. I am making a website for adult toys store. I need to add pop up window to the site which will ask visitor to confirm their age. If they are older than 21 thay can proceed to the site. If they … | |
The output of this snippet is 4 and 1. 4 is ok but why this 1 ???? #include<stdio.h> int main() { printf("%d %d",sizeof(NULL),sizeof("")); return 0; } | |
i need help in this program. The program question is: A function power which will calculate a number m to the power n (m^n). You will pass two parameters float & int. If the parameter n is omitted then it should taken as 2. i hope u all got the … | |
Hi, I'm just confuse about this.. I am making a form with 2 datetimepicker controls which are the Start and End date and when I click the action button it displays all the departments covered with the start-end date and it works fine but the problem is it loads all … | |
Is it possible to play or make music in Python? | |
hello , I use Tkinter , at the line : `print modelidvar ` in Interface3() function , it prints "" , nothing , without any error message , can i know why plz , here is all the code : # -*- coding: cp1252 -*- # -*- coding: cp1252 -*- … | |
Hello, I would like to learn android programming, but have no knowledge in java whatsoever. Do I need to go through a java course first before starting with android, or is there a way to start programming directly with the latter? | |
<a class="topLink" href="input_image.php"><input type="submit" name="productbaru" value="Product Baru"/></a> If I press Product Baru why they do not take me to input_image.php ? | |
Hello, I have a members area on my website. I'm trying to check if a user with a specific username and id has logged in, and then echo a string of text on page B (members area page) if its them. The user logs in on page A (login page). … | |
Hello, i got a problem with $_GET[]. please see the below code and help me. <?php if(isset($_GET['_rp'])==1) { echo '1'; } else if(isset($_GET['_rp'])==1) { echo '2'; } ?> when i'm changing the value of _rp=2 it was showing the result as '1' but not '2'. Why this was happening please … | |
Hello, How to create a body background like : [website](http://id.gateway.com/gw/en/ID/content/home) See the background seems to adapt to it's size, 1366 x 768 or 1024 x 768 or some other size the only scroll down that appears is vertical scroll. What image size picture do I have to create ? and … | |
I am trying to write a simple text file translator, will translate the text into morsecode. I need something like this to be done: for(i = 0; i < list.size(); i++) { if(list[i] == character_from_file) { translatedLine = list[i_the_second]; } } I am wondering if I can use the "list" … | |
I'm making a simple text based game in python, which works fine until I activate "debug" mode (in game, with /debug), which is supposed to change this: # # # # # # # # # # # # # . . . . . . . . . . … | |
Hi, I have never used SpinWait. I am waiting for a lockfile to be free, so we can lock the file with below code (FileShare.None) This lockfile will always be avaliable in approx. <= 50 milliseconds. I will be needed to react as fast as possible so I beleive it … | |
Good Morning, Got a question regarding using CURL to automate the submission of a form. What I'm trying to accomplish is to avoid someone submitting a paypal payment more than one time for a purchase through my shopping cart. I can do it by submitting the form to paypal and … | |
Hey all!! I am thinking of creating a website that may contain some buying/selling items, so I was wondering which framework is the best for shopping online. I have some experience with codeigniter, but I was using it for its MVC structure which organizes and uses files more efficently. Anyway … ![]() | |
Hi, I just need a little help here, I wanted to copy the rows in current form's datagridview to another form's datagridview. Here is my example rows in datagridview1 in current row ID | ProID | Name 1 | 1 | Shirt 2 | 1 | Shoes 3 | 2 … | |
Hi there, I have a question related to C++ functions. If a boolean return type function contains too many returns in it, does it cause any problem ?? In my program one of the bool function contains too many return statements, in if conditions. And interesting thing is that it … | |
Hi I have a php header file that displays a random image from a mysql table each time the page is reloaded. I have done this just using rand() in the query. But doing it like this means that the same image could come up 3,4,5 times in a row! … | |
Hi My name is C.D., I am currently taking C++ 1, I have an assignment that asks me to write a function that displays the prompt string and then reads a floating point number and then returns that number. The book gives an example of the code to use in … | |
I have a form that shows images whos paths are stored in mysql. The form has 'hide' and 'show' submit buttons for each image. Pressing the hide button should set the value of the 'status' field to 2 (hidden). But it does nothing, my queries don't seem to execute. Here … | |
Hello, I've an array with different type of values: int, null, strings, arrays. I'm trying to remove nulls and empty strings, but I want to save ints, even when it equals to zero, so I tried with `array_filter()`, by default it will remove `0`, `''` and `null`, but by applying … | |
I have been trying to start asm programming for a long time now. But having some problems. MY main system is windows so I cant use int and dont want to use the win32 api or call c functions. So I read that you get a x86 simulator. If I … | |
Hello,I have written this script to telnet from Ubuntu system to windows7 running system. This script goes fine upto login name, then it takes the password but it is not able to process the password. Although it looks as if the password has reached other side but in real it … | |
Good Afternoon. I've been sporatically researching this for weeks, but haven't been able to locate any 'CLEAR', 'PRECISE' direction on creating .csv files from a query of multiple tables. What I need to be able to do is gather the relavent information from the tables and combine it into a … | |
import turtle def f(): turtle.forward(10) def l(): turtle.left(1) def r(): turtle.right(1) def b(): turtle.back(5) turtle.onkey(f,"Up") turtle.onkey(l,"Left") turtle.onkey(r,"Right") turtle.onkey(b,"Down") turtle.showturtle() turtle.listen() while True: print, EDIT: add `turtle.showturtle()` but STILL doesn't work | |
Hi, I am making a game I added a mouselistener in my game class but when i add a mouse listener in my class to make a custom button it doesn't work, so i had to make a variables mousePressed and variables for the mouse location mX and mY but … ![]() | |
Hello, First of all some background. My friend and I are having a bit of a competition over theoretically infinite number storage. We have agreed that the first person with a working arbitrary precision integer library with the theoretical ability to store an infinitely large number (IE: if the hard … | |
Greetings fellow developers i just want to ask for help on how to slide the panel from right to left of the screen. I only know the sliding panel from left-to-right but is it possible to slide the panel from right-to-left? | |
I have the following code: const AGENT = 'User Agent'; SERVER = 'www.daniweb.com'; RESOURCE = 'api/access_token'; ID = ''; // my client id SECRET = ''; // my client secret CODE = ''; // my returned code, pasted from the browser REDIRECT_URI = ''; // my redirect uri ACCEPT: packed … | |
Im creating a form that every time you select a drop down menu option it will write the value to a text box I have the writing part working. The problem is that is writting to both text boxes when I select on dropdown and it it suppose to be … | |
Hello All, I want to have a fade in fade out animation(AJAX) on each row of the data fetched from the database.I was wondering what will be the best method to do it? I can have the data stored in a datalist but that will always render the whole data … | |
For i = 0 To DataGridView1.Rows.Count - 1 ' Dim row1 As Integer = DataGridView2.Rows(i).Cells(1).Value.ToString Dim row1 As Integer = Nothing Dim row2 As String = Nothing Dim row3 As String = Nothing Dim row4 As String = Nothing Dim row5 As String = Nothing Dim row6 As String = … | |
Hi guys, I added a extra line of code to test for records in the database and if they exist to update them before inserting them instead. For some odd reason it's not working and it simply just inserts the data causing duplicates. Any suggestions? <%@ Import Namespace="System.Data"%> <%@ Import … | |
I am currently making a subreport and I found it very tricky to do. I already created a parameter(ID) that would link Report2 to Main Report but still it doesn't work. I have two datasources: LoanerDataSet for the main report and LoansDataSet for report 2. I would like to ask … | |
Hi All, I've just started to learn C from "The C Programming Language" (Kernighan). One of the exercises asks you to write function that folds a line of text into newlines after x number of characters without splitting a word. This is my attempt so far: // fold: folds the … | |
Hi again DaniWeb, this time I'd like you to help me with the text alignment options available in a standard text editing application. My problem is, even though I got the application to successfully align the text where I want it, that if I click on every single option (Justify … | |
These are two simple programs. In first program, i used static array, while in second program i used dynamic array. Both programs do the same job i.e. initiaze the array by asking the user to enter the their test scores. The problem is: 1)i have read in many books that … | |
I am using IIS for php. I want to confirm whether it uses fastcgi or cgi I used php_sapi_name() and it gives "cgi-fcgi" I don't know what does it mean Is there any other way to find the same | |
I've been trying out python codes looking at the python tutorials at python.org. I've been getting a better idea of it now and the tutorials are very good at teaching practical programming. However, I also want to apply for Python jobs so what a little bit of theoritical information on … | |
I want to create two buttons that would pause and resume my backgroundworker but it is giving me an exception error of "Object reference not set to an instance of an object". It seems like the resetevent is not linked with my BackgroundWorker and i don't know how to link … | |
Hi all, I have this script sending an really simple html email. It works fine, but I cant seem to preserve the line breaks when sending the email to the client. Any idea how I can preserve line breaks? Thought nl2br would do the trick.. // Data der skal emailes … | |
Hi All, I need to call a function for evry 10 secs how can i achieve this in python | |
In my *Java to C#* Conversion Project, at one point I came to use java's `startsWith(string prefix, int toffset)` method. I used a substring to solve it for C#. Java Code Snippet: String str1 = "one over the coocoo's head"; String str2 = "someone"; System.out.println(str1.startsWith(str2, 4)); C# does not have … |
The End.