Im not gonna write out the code for you, but some functions from c that you may want to look at are fopen, fclose, fgets, sscanf, strncmp.
fopen opens a file and assigns it to a file pointer (FILE *) , this can then be used by other functions. fclose is just used to clean up open files, you pass it an open FILE * and it will close it for you.
fgets will retrieve the actualy lines from your file and store them into variables...
User Profile
Collapse
-
-
Global Code Behind Files? (asp.net C#)
Hey ive got a website that ive been working on for a while that has several pages each with their own code behind file written in c#.
Right now im working on cleaning things up a little to make it easier to maintain. One of the things i would like to do, but have no idea how, is to create a global code behind file that all my aspx.cs files can access. As it stands right now ive got several functions rewritten in several of my aspx.cs... -
one of the better programs out there for beginning writing code is dev c++. Its a full blown IDE, i used it in my intro courses in my first year at university and liked it because of its simplicity. its fairly straight forward and runs on windows and linux and uses something similar to the gnu c compiler.
check it out here....Leave a comment:
-
can you be a little more specific, what is it that you wish to do?...Leave a comment:
-
hey forget what i said, i found an easier way to get it done, all i had to do was just get the grid view to add a small div tag around the words i wanted capitalized, i did this by setting the DataFormatStrin g to the string below.
DataFormatStrin g="<div style="tex t-transform:capit alize"> {0}</div>"
when the page loads, it creates something like this:
[HTML]...Leave a comment:
-
thanks very much for the help, but how would i implement this so that when the gridview is populated, that it calls these functions to format only one column?...Leave a comment:
-
because the rows are laid out in memory in row major, its quite simple to send just the individual rows. you dont need to copy anything.
try this code:
Code:#include<stdio.h> /*funct takes a 1d array as an argument and prints out its values, it needs to know the number of columns of your original array though*/ void funct(int* array, int size){ int i; printf("inside funct\n");
Leave a comment:
-
if you set phi(x) -0.1 = 0 then all youre doing is root finding right? For that you dont need to do newton-raphson (its sometimes unstable anyways), you could just use the bisection method or even go up to doing the secant method.
the wiki page for the secant method is pretty good, the same goes for bisection method.
if youre looking for speed, you should probably do the secant method, but if you just want to get it...Leave a comment:
-
GridView DataFormatString for handling strings? asp.net (C# code behind)
Hey,
does anyone know of a way (or an expression) to format strings into proper capitalization using a DataFormatStrin g in an asp:boundfield.
eg.I'm wanting to turn "john smith" into "John Smith"
thanks in adavance -
Hey im not too familiar with php or anything, but the ! is the not operator for conditional statements, as far as the * i think it might be dereferencing a member of the struct, just written unclearly.
so what i think theyre doing is just checking to see if the value that the user entered is null, and if it is then kick out of the loop.
thats my best guess anyways....Leave a comment:
-
Sorry, i should have been a little more specific, i know that in my asp.net behind code (say c#) i would just go like this in a method:
Code:Session["varName"] = "some value";
Leave a comment:
-
would you be able to give an example of how i would use ajax to set an asp.net session variable?...Leave a comment:
-
ahoyer started a topic ASP.NET (C# code behind): How to set asp.net session variables and open a windowin .NETASP.NET (C# code behind): How to set asp.net session variables and open a window
Im currently writing a small phone directory, that allows a user to search by given name, surname, address, etc. everything is implemented with asp.net (the backend is in c#).
My problem comes about when i want to pass the user entered values across to another window, that displays the results, using javascript. The easiest and most secure way for me to do this i think would be using asp.net's session variables.
I know...
No activity results to display
Show More
Leave a comment: