64,152 Solved Topics
Remove Filter ![]() | |
Hi Team, Im preparing for OCJP and in one of the sample question is below Three version of MyClass.class exist on a file system 1. /foo/bar/ 2. /foo/bar/baz 3. /foo/bar/baz/bing And the system class path includes /foo/bar/baz And this is the command invoked from /foo java -classpath /foo/bar/baz/bing:/foo/bar MyClass Which … | |
How do I find parts of a word in a string using an array for the keywords? I need to run a program on computers but exclude certin users based off of the computer name. The computers naming convention is xx-yyy-Lastname. The Lastname sometimes has the users initials added to … | |
![]() | Here is my code along with question in it. #include<stdio.h> int main(){ int i,a[2][3]={{1,2,3},{4,5,6}},*p=&a; printf("%d",p); // Printing the base value. printf("\n%d",p[4]); // Q) Does this means *(p + 4) ? printf("\n%d",p[5]); // Q) Does this means *(p + 5) ? getch(); return 0; } ![]() |
How can I dynamically allocate the size of an arry at runtime When I am doing this am getting an error.. #include<conio.h> #include<stdio.h> void main() { int n; a[n]; clrscr(); printf("Enter no of your array\n"); scanf("%d",&n); printf("Enter your array"); for(int i=0;i<n;i++) { scanf("%d",&a[i]); } for(i=0;i<n;i++) { printf("%d\n",a[i]); } } | |
Earlier I raised a question in this forum regarding the sorting of database and Reverend Jim answered me as follows. It was Ok SELECT * FROM mytable ORDER BY fieldname But then I faced another problem As I mentioned in that I wanted to sort ORDER by 'Tdate' which is … | |
Hi Champs, Im using VBA for Excel. and Im trying to use the code below to move through records and increment their values by one since they meet a certain criteria Sub promotion() Dim x As Range Dim y As Integer Sheet2.Range("c2").Activate Do While y < 1002 y = ActiveCell.Row … | |
Hi all I have a DataGridView with 2 Columns an Order column (text) and a price Column (decimal) The Datagrid contains all the orders and price for a certain customer. I'm currently adding all the prices and adding a new row to the datatable containing the total.In this row on … | |
Hello! anyone... i cant delete the sheet i have added in my excel file. i already tried below codes to delete it but it doesnt work... and i'm not getting any error which is why i dont know what is the problem.... worksheet.Delete() workbook.sheet("sheettobedeleted").delete() | |
I'm having trouble with the AND operator when I used it 3 times. If Text1.Text = "THIS" And Text2.Text = "THAT" and Text3.Text = "THOSE" then Call Display elseIf Text1.Text = "THIS" And Text2.Text = "THAT" and Text3.Text = "THOSE" then Call Display2 else MsgBox"Failed" End If It always ends … | |
Hey, I'm trying to compare dates, essentially I want to copy all files that have a date modified of 3 days older or less than 3 days old modified. So far i have the following, it did look to be working before, maybe i made some mistake below: [code] string … | |
Okay so I have an `inventory` class that accesses a static vector from my base class `MainShop`. I also have a `SwordShop` class which inherits from `MainShop`. (Both Inventory and SwordShop are derived classes). //SwordShop class void SwordShop::Shop { //I have a setter function where it takes an integer and … | |
Is there any difference between returning a pointer to a struct, and returning a struct? Aside from the derefrenceing that is done would they both be working with the same struct? Is there any copying that gets done if it is just a regular return? | |
I have read tutorials using my google-fu on how to set up Pre-Compiled Headers, and now I wanted to clear up a few questions: If all the 'to be pre-compiled' headers go in one file - "stdafx.h" then how do you say you only want 1 of those files in … | |
My issue is this: I call this method twice once inside a function and another in the HTML onclick. Reason is the DIV is part of a context menu. The first function call res is the correct variable I want. The second however changes res b/c Im forced to pass … | |
I have 2 tables in sql , one is called stock and the other stock warning the stock table has columns ' Pid, pdescr,current stock, stock warning' this shows up in datagridview 2nd table(stock warning) has columns 'pdescr, current stock' showing in datagridview in the stock table when the 'current … ![]() | |
so here's what I want to do: import module mvar = module() I've seen it done with the PyQt modules, but I don't feel like researching a complex code just to figure out a simple usage. :P anyone know how this works?? | |
I'm trying to scroll through a list of cstrings and if they end in an 's' I want to replace it with a '\0' the problem is somtimes it catches the word and corrects it for a comparison, but other times it doesn't while (ptr != NULL) { if(ptr[sizeof(ptr)] == … | |
Not sure if this is the right spot for this question but I'm here! I'm trying to make a vb script that opens large text files, one at time, searches each line for Null values (there can be many) and then replaces them with a space. My coworker put the … | |
Hello, I have a scenario where I fetch all the records from a database table using ADO.Net and I want to convert one of the column values which has either "0" or "1". If 0, then "No" should be replaced with 0 and if 1, then it should be "Yes". … | |
I have hard time understanding how does it happen. I mean how does : 6 / \ 3 8 / 2 I get that program finds the num on the left side whos equal to null so its smallest and it prints out 2. But how does it go back … | |
here is question: Write a function that accepts an array of integers and its size as arguments. The function should create a new array that is one element larger than the argument array. The first element of the new array should be set to 0. Element 0 of the argument … | |
Can someone explain this line a bit for me, I get the big picture, but the under-the-hood aspects are eluding me. testFile.getline(buffer, sizeof(buffer)); I have a char array buffer of size 80. Get line extracts a line from my testFile, and puts it into the buffer. When I "cout" the … | |
![]() | I have two questions: 1) Here is a small program showing how one can use Array name as Pointer variable. #include<stdio.h> int main(){ int a[5]={1,2,3,4,5},i=0; for(i=0; i<5; i++){ printf("\nAddress: %d\tValue: %d", a+i,*(a+i)); } getch(); return 0; } If we can use array name as pointer variable, then why separately declare … |
Hello, i want ask somthing about mysql in multi pages i hope someone help me and sorry about my English this code works good but there problem if i used it with this tybe sql = "SELECT * FROM emaillogs ORDER BY id DESC" cursor.execute(sql) results = cursor.fetchall() if page … | |
Hey Guys, could you tell me the different ways to write throw method (Exception Handling) in a program.. I mean like we can write BufferedReader in many ways (2 ways so far i've studied).. eg; 1. BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); 2. BufferedReader br; { br = new BufferedReader(new InputStreamReader(System.in)); } | |
Hi my name is Xednyc, I'm very new to C++ since this is my first year in college, I am taking an IT course. I am currently out of ideas on what program to make, anyone could suggest an interactive, fun, yet not so simple program for a newbie like … | |
![]() | Anyone help me to create one form with C# WPF which use LINQ TO SQL with SQL Server. WPF -------------------- Form has 2 textbox and 1 image in WPF txtFirstName txtLastName Image SQL Server Database -------------------- tblEmp EmpID - int Firstname - nvarchar(10) Lastname - nvarchar(10) Image - image, varcharmax … |
I'm using [Page Transitions](http://tympanus.net/Development/PageTransitions/) (get animations.css from tympanus.net) to hide/show div. How to add remove classes. I'm trying to add in-out effects with simple classes. How to *Remove class `current` from current div & add outgoing class to same div* and *add class `current` & incoming class to next div*? … | |
Hello everyone, Please can someone help me with a code to find two(2) fields at thesame time. As in with a msgbox "Enter Date" then after that "Enter Shift". Because there are two 'shifts' tied to a 'date' I will really appreciate this help. | |
class A{ Vector<String> s = new Vector<String>(); } public class Vec { public static void main(String[] args) { A a = new A(); a.s.add("String1"); a.s.add("String2"); a.s.add("String3"); a.s.add("String4"); a.s.add("String5"); Vector<A> vecA = new Vector<A>(); vecA.add(a); System.out.println("Size of vector is "+vecA.size()); // here i am getting size one a.s.clear(); a.s.add("String6"); a.s.add("String7"); a.s.add("String8"); … | |
I'm trying to parse an input file line by line. I want to grab each line one at a time, put it into a null terminated char array. I can't seem to do it. I tried something like this and just got weird ass results. int q = 0; do … | |
OK, so I've been Googling this as well as looking for previous posts. I have a .NET site that has some classic ASP still in it (who knows why or who did that). On the old server, the ASP would execute normally. On the new server, however, the ASP code … | |
I'm trying to search for a word in an array of strings, everytime it gets to the while loop it just loops infinitely. It's getting the words and comparing just that when it gets to the second else, It just takes a fat dump. Can anyone help? So damn frustrating. … | |
using API functions, can i get the text rectangule? | |
![]() | Which one of the following is the smart, efficient and safe way to declare a string array ? And if you have any other way do suggest. char a[10]={'A','B','C'}; char a[10]="ABC"; char a[]="ABC"; char *a="ABC"; Please take into consideration the memory allocation and size, memory wasted, methods of retriving data … |
![]() | Fairly easy pointer increment program is as follows. #include<stdio.h> int main(){ int i,a[10],*p=a; for (i=0; i<10; i++,p++){ printf("\nAddress of a[%d] is %d",i,p); } getch(); return 0; } Here is output: Address of a[0] is 2293488 Address of a[1] is 2293492 Address of a[2] is 2293496 Address of a[3] is 2293500 … |
![]() | The expected outcome dosent agree with result. Following is the code snippet. int a,c; a=10; c=0; c=(--a)+(--a); printf("C: %d", c); printf("\nValue of a: %d", a); I expected C to be 17 i.e (9+8), but it comes out to be 16. And a becomes 8 as expected. When expression is changed … |
Hi there I am currently teaching myself C and I have to create a program with a 2d array that receives upto 5 names and prints them out. No pointers should be used :(. So I am wondering can anybody help me with this. #include <stdio.h> int main(int argc, const … | |
write a program using function in 'cmath.h' to demonstrate the usage of 9 commnads in cmath header file . using 'loop control structures' #thanks for any help | |
I created a three layer application with BO (Business Objects), BLL (Business Logic Layer) and DAL (Data Access Layer). I had to do some unit testing using nUnit tool. I've done that like following and works perfectly: SQL Tables: USE [Projekti_TI_1] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO … | |
Alright so I'm coding a Quadratic Equation Solver to help with my Math Class. However the teacher requires each calculation to be written out. I have the solver working, however I'm not sure where to start when it comes to printing each step. I know I will need to `System.out.println()` … | |
hi I have filled my datasetfrom my sql db then used that data to show at crystal report, when i go back again to fill it with another data it show to me the old one why ? how can i solve this problem ?? Best Regards | |
Hi, I am trying to a game, and i wanted to add my images to mysql. I have managed to save and retrieve the images. I have written a code which allows me to only retrive 1 image on my jframe in a jlabel from the database, i am a … | |
hey.. Guys can you tell me by default password for this setup oracle 11g home . bcoz of when i was installed that time didn't asked any user and password information . please anyone can help me . but i'm trying deafult user those above said article system/orale and system/system … | |
if (ts1.CompareTo(DateTime.Now) == -1 && ts2.CompareTo(DateTime.Now) == -1) { MessageBox.Show("...."); } the function asks for a object, i gave an object... | |
when making a component (ocx file) of the combo box, and the wear components of the user control, then I compile it into ocx files. Once finished I include the components of it into the main program. then I do click and drag the combo box to the form, but … | |
Can anyone help me to improve my code so i can add more than image to my sql database. The code i use is below: Connection connection = null; String connectionURL = “jdbc:mysql://localhost:3306/mydb”; ResultSet rs = null; PreparedStatement psmnt = null; FileInputStream fis; try { Class.forName(“com.mysql.jdbc.Driver”);//.newInstance(); connection = DriverManager.getConnection(connectionURL, “root”, … | |
I have this <divs> that cannot read the end </divs> and when i erase the php that is in between them it works perfect.. heres the php (when i say read i mean when u click in div in notepad++ they both <div></div> highlight , is just i dont know … | |
hello daniweb friends i need help in my below calculation script all go right but just in the filed shippingtotal it display `NaN` i don't know why i tried the comment in line 27 and delete line 6 but still same. HELP PLEASE <script type="text/javascript"> function calculatePtotal() { var totalofptotal … |
The End.