199,114 Archived Topics
Remove Filter ![]() | |
Hello everyone! I'm have a text file's contents, its output in the browser and a php file (which I'm including below.) What I need to do is search for a specific line in the text file and delete it. The problem is that the end result will have a text … | |
hi, i have created a solution project in Visual Studio. The solution project contains an ASP.net application project and several class library projects. now one of my class library is accessible by other projects by adding class library dll in it. now i want to hide my one of class … | |
With both subs you must enter the values as you would write them into a sql string i.e. 'mustsurroundstrings' I'm rather new at VB.Net and SQL but these work for me and are seem pretty efficient. If anyone has a way to improve on them or finds a flaw in … | |
Hello people, First of all, i'm not an experienced ASP coder at all, i usually do php/java so i'm still kinda puzzled by this language. For my current project, i need to update a piece of an intranet, written completely in ASP. since it can't be reached from my position, … | |
I am trying to use a modulo to make all even numbers replaced with a star and all odds replaced with a percent sign... this is my code: <?php $x=0; $min=900; $max=2000; // initialize array of random values $random_array = array(); // initialize temporary array for sorting $temp_array = array(); … | |
![]() | hi, My question is about the const keyword. union emp { char name[]; int age; float salary; }; const union emp e1; int main() { strcpy(e1.name,"H"); printf("%s",e1.name); e1.age=45; printf("%d",e1.age); printf("%f\n",e1.salary); return 0; } I know this code has error which is that "cannot modify constant objects". But Can anyone tell … ![]() |
![]() | hi, int a[][2]={1,2,3,4}; int *p[]={(int*)a,(int*)a+1, (int*)a+2}; for(i=0;i<2;i++) for(j=0;j<2;j++) printf("%d ",*(*(p+i)+j)); Firstly, This is part of any code. And i want to ask that in *p[] definition, why it is written (int*) with every element since a is already an pointer. Secondly, when I am accessing *(*(p+1)+1) element in loop, then … ![]() |
How come I cant find this anywhere???? I've tried everything but posting here. Please help. I've got VS 2010 Ultimate...Sigh. I even tried it at work. | |
Dear DANIWEB community members, I have a question about sorting a label, and I've tried so hard in figureing it out but I realized that I am doing something wrong but not sure what... What I am doing is sorting the numbers, which is created by the loop, that populate … | |
Hi all, When i try to decrypt my password which is stored in binary(16),null datatype in DB, it gives me error like 'Invalid length for a Base-64 char array.'. i try the below code from one of the asp.net forum. public string DecryptPassowrd(object obj) { string password = obj.ToString(); System.Text.UTF8Encoding … | |
When i run a single number (1-9), it'll output as ONEONE or TWOTWO, etc.. As well with numbers 11-19, they'll show up as ONEELEVEN or TWOTWELVE, etc. 20-100 outputs fine whereas 101 becomes ONE HUNDRED TEN ONE ONE, etc.I have no idea what I've done any help would be greatly … | |
i'm using 4 pictureboxes and 1 textbox in one particular application. when i click on picturebox1 i need a certain value to be fed as input to the textbox, simillarly for the other pictureboxes too. how can it be done ? | |
I wanted to write a simple program that uses classes but I've been running into errors. Anyone have a clue as to what is wrong with my code because I can't seem to figure it out. #include <iostream> #include <iomanip> #include <cmath> using namespace std; class cone{ private: double radius; … | |
Id like to know, if say i have a data grid that is connected to a sql database, it displays the table columns once a user enters a search. eg;(in your sql table colnm names are member_name,m_address). Now instead of display those names from the sql, can it display your … | |
**I have this page which upload an image. It works fine in one server that runs Windows Server 2003 / IIS6 but the same page runing on another server with Windows Server 2008 / IIS7 gives the following error message. Both servers are running Framework 4.0** Parameter is not valid. … | |
Eventually i want to load names from a database to textboxes which are created at runtime. Thought i'd try just getting names into a listbox first though as i'm new to using databases in vb and for some reason nothings getting added to the listbox Heres the code iv'e got … | |
Hello Daniweb! I have a .txt file on a URL and I'm able to read its contents and display them however and wherever I want in my applet without any issues with this simple code: URL url = new URL("http://blabla.com/something.txt"); BufferedReader input = new BufferedReader(new InputStreamReader(url.openStream())); String str; Boolean continueLoop … | |
Hello Everyone, I am trying to pull some info from a MySQL database. The problem is that, for every four rows that are fetched, I need to add a div tage before and after, so here is an example of what I want: This is the static way I have … | |
Hi, i have a dropdown list where i have 3 options like <tr> <td><?php echo $entry_shippingtype; ?></td> <td><select name="type"> <option value="free">Free Shipping</option> <option value="flat">Flat Rate Shipping</option> <option value="weight">Weight Based Shipping</option> </select></td> </tr> <tr> <td><?php echo $entry_shippingamount; ?></td> <td><input type="text" name="shippingamount" value="<?php echo $shippingamount; ?>" /></td> </tr> When i select free … | |
hey can anyone help me with the decrypt part...cant seem to get it to work.... #include <iostream> using namespace std; unsigned char s[256]; unsigned int i, j; void swap(unsigned char *s, unsigned int i, unsigned int j) { unsigned char temp = s[i]; s[i] = s[j]; s[j] = temp; } … | |
| |
hi, i am looking at using a html5 script that helps draw on a canvas, how can i then save this to my database in a blob to then be shown again on the page at a later date? the code is: function RoSave(frm) { var strImageData = canvas.toDataURL(); $.ajax({ … | |
I am writing a VB app that provides the user with a menu of reports written in Crystal Reports 4.6. When the user selects a report, it is shown in the Crystal Reports preview window from where it can be printed to the selected printer. My problem is that the … | |
Hi, I am trying to write a macro in Excel 2003 that will sort some data and delete the unwanted rows. Basically, starting on line 3, in columns C to L, if the charater strings "N" or "NI" DO NOT appear, I want to delete the row. The number of … ![]() | |
How to define multiple characters using macros?? I want to declare all the hexadecimal digits under a name "hexa". Does anyone know it how to do that?? The below code is wrong! Any suggestions to make it correct?? #define hexa 'A','B','C','D','E','F','0','1','2','3','4','5','6','7','8','9' #include<stdio.h> int main() { char a; printf("Enter a character= … | |
Yea, i've made a lot of threads xD well, im learning and im doing things for different projects. Is there a shorter way to change the backcolor of the textboxes instead of doing this: Private Sub TextBox1_GotFocus(sender As Object, e As EventArgs) Handles TextBox1.GotFocus Me.TextBox1.BackColor = Color.FromArgb(65, 65, 65) End … | |
I AM INTERESTED TO FIND OUT IF PHP CAN BE USED TO SET UP A POS SYSTEM? IF POSSIBLE, HOW? | |
I have this rather large form that I need to grab all the user input from and email it. My problem is there are a mixture of normal feilds and then parts of the form are set up in tables. I'm not sure how to go about naming each of … ![]() | |
Hi, I'm new to php and i'm trying to build simple database and I having a problem with getting id value with $_GET here is snippet of my code: $id = (int)$_GET['id']; echo $id; if(isset($_POST['upd'])){ $sql = "UPDATE dvds SET title = ?, folder = ?, spot = ? WHERE … | |
Hi, i have a question about php functions when using arrays. I have the following task to do: 1.Create a Php array $months which contains the months of the year, “January”, “February”, “March”, … “December”. 2.Create a Php function called echoArray() which accepts an array as a parameter and uses … | |
Suppose I have this textfile A: League 1: a = 123456, b = england a = 234564, b = brazil a = 939311, b = germany ... League 2: a= 213213, b = italy ... ... League 500: a = 74778, b = denmark ... ----------------------------------------------------- Now, I have another … | |
I have searched everywhere for this, but I'm really not certain we would all describe the symptoms the same way. It is most bizarre. I set a random hash string (doesn't mater how - I don't believe - but I will post code below), store it in a hidden form … | |
I'm writing a program in MARS that encrypts/decrypts a string with a simple addition/subtraction method to each character according to a 4 digit key such as '2848.' I'm now trying to navigate through each character in a string and just increase the decimal count by 1 just to test it … | |
![]() | OK so I made a website http://www.thecodinguys.net now code is displayed in <table class="code"> my friend said I should use <pre> because pre is for code/preformatted text. Now I use a CMS and the data is stored in a table. The content is stored in a column call pText. Is … |
I'm trying to write a simple particle system I use Python ,OpenGL and numpy libraries (on win7) this is the code I use to draw a single particle def draw(self, mode): glLoadIdentity() ## convert normal point to opengl point trns = self.__trans_to_opengl(self.trans) glTranslatef(trns[0], -trns[1], 0.0) ## this is the vertex … | |
Why the program is running without line 14? #include<stdio.h> #include<iostream> //#include<conio.h> //#include<math.h> #define FOR(i,a,b) for(int i=a;i<b;i++) using namespace std; int main() { int a[]={1,2,3,4,5,6,7,8,9,10}; int *b; //b=(int *) malloc(sizeof(a)); b=a; //cout<<b; FOR(i,0,10) cout<<b[i]<<" "; //cout<<sizeof(b); //getch(); return 0; } | |
Hey ya'll I was looking for some guidance. I'm building a "workout generator" for fun and got stuck. I want my program pick a random assortment of exercises and write them to a new file. What is the best way to randomly pick strings from a list of exercises; jump … | |
I have this code and when ever i try to put in the value 'e' it doesnt want to take it, the program freses. #include <iostream> #include <string> #include <fstream> using namespace std; int encrypt(); int decrypt(); int phi, M, n, e, d, C, N, D, answer, p, q, s; … | |
Hello all, I recently started working with java, and I have been in the process of creating a new game for use on Android operating systems. I have at least 90 percent of the game fully conceptulized and at least 30 percent of it already in actual code. However I … | |
Why can't I use inline functions with my setter method in c++. Here is the code: Main.cpp #include <iostream> #include "Employee.h" using namespace std; int main() { Employee h; h.setAge(30); h.setSalary(70000); h.setyearsOfService(5); h.printAllInfo(); return 0; } Employee.h #ifndef EMPLOYEE_H #define EMPLOYEE_H class Employee { public: inline int getAge(); int setAge(int … | |
i am using the following code to get the latitude and longitude values of a particular area. public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); List<Address> foundGeocode = null; /* find the addresses by using getFromLocationName() method with the given address*/ try { foundGeocode … | |
echo "<td><a href='delete.php?user_id=".$row['user_id']"' onclick='return confirm("Do you want to delete?")' >DELETE</a></td>"; I am not being able to correct it... ![]() | |
![]() | hello, I am learning C from past 1 year, Now, I want to improve my coding skills by learning techniques like dynamic programming, backtracking and all that stuff. Can u please tell me or give me links from where i can learn, practise and improve these skills ? please help … ![]() |
I am writing a chatbot and it's database is going to be contained in a .txt file. Now i have this code: #include <iostream> #include <string> #include <fstream> using namespace std; int main() { string line; string uinput, resp; char key = line[0]; ifstream file("t.txt"); cout<<": "; getline(cin, line); while(getline(file, … | |
#include<iostream> using namespace std; const int STACK_SIZE = 100; class stack { private: int count; // number of items in the stack int data[STACK_SIZE]; public: stack(); ~stack(); void push(const int item); // push an item on the stack int pop(void); // pop item off the stack }; stack::stack() // constructor … | |
hi i am developing an android application on platform 2.1 im presently working on two classes: Dbhelper.java RssActivity.java I have made a students table, its schema is created but my problem is values are not being inserted into it. There are two textbox: one for Name and other for entering … | |
HI everyone ,In this semester i have a course on data structure , My teacher is going to recomend us C# or C++ for implementing structures . i have good skills on c language and java but dont know C# and i hate c++(however i have learnt some bit of … | |
what kind of concepts must be taken up for mini projects by students,especially for their first project...??please reply... | |
If I write a C++ program and compile it into an executable file AND, don't have to install the program, will I have trouble running that C++ written program on other platforms? Do portability issues accross different platforms only arise when I have to install the program? I'm currently breezing … | |
I have created a screen capture of the current screen ,but i want to capture the entire html page as image can any body help me. Here is the code of screen capture.. import java.io.*; import java.awt.*; import java.awt.image.*; import javax.imageio.*; class A { public static void main(String[] ar) throws … |
The End.