- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
85 Posted Topics
How do i read a txt file into a char array. what i have so far only give me blank lines String fname = "c:\\game.txt"; char data; int row = 2; int col = 4; char[] matrix = new char[row]; private void openFile() { try { FileReader reader = new … | |
We are an IT company and we constantly get asked to install new software on computers. We are looking for a way to automate the sofware install process. We want something that will let us choose which software to install and not run without any interaction. | |
I have a jpg image and when i do [CODE]<img src="images/logo.jpg" />[/CODE] it doesnt show up. if i put another jpg and call it logo.jpg it does. What could possibly be wrong with this jpg that html doesnt like it. | |
I am looking for an open source software that i can sync my documents from my Windows, Mac and Linux machine. I have alot of pics/music and docs. There are alot of services online that do it but i have to pay for it. Is there a software already designed … | |
how can i echo this code. when i echo it it prints out the html tags and <? php code ?> i want to echo the html code and interpret the php as php. [code] echo "<h2>Add Contact</h2> <form name=\"form1\" action=\"<?=$_SERVER['PHP_SELF'];?>?mode=added\" method=\"post\"> <table class=\"tableStyleClassTwo\"> <tr><td>Name:</td><td><div align=\"left\"> <input type=\"text\" name=\"name\" /> … | |
Why am i getting this error: Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /Users/Joli/Sites/TestSite/index.php on line 47 [code] $conn = mysqli_connect("localhost","sql","password","db") or die("Query died: Connect"); $checkSql="select count(id) as eCount from address"; $result = mysqli_query($conn,$checkSql); $row = mysqli_fetch_assoc($result); if($row['eCount'] == 6){ $disable = 1; } [/code] | |
I have a css that when i put my mouse over the image it displays the image bigger. the issue is that i have alot of images and when i scroll down the page the larger image displays on top and i cant see it. I want to position the … | |
what is wrong with this form????? i can see the name and email but not the msg?? [code] <?PHP echo $_POST["name"]; //works echo $_POST["msg"]; //nothing prints out ?> [/code] [code] <form method="post" action="form.php" style="margin:0; padding:0"> <b>NAME:</b><br> <input name="name" type="text" class="form" id="name"> <br> <br> <br style="line-height:8px"> <b>E-MAIL:</b><br> <input name="email" type="text" class="form"> … ![]() | |
im new to php why is this rss feed not working. all i get i a blank page. [code =php] $rss = simplexml_load_file('http://feeds.feedburner.com/linuxtoday/linux?format=xml'); foreach($rss->item as $item) { echo "<b>$item->title</b>" , "<br />",$item->description, "<br /><br />"; echo sprintf("<a href='%s' target='_blank'>Read more</a>", $item->link), "<br /><br /><br />"; } [/code] | |
im new to java script. I am trying to make a time/date function update automatically. when i view the page i get the right time, but i have to refresh the browser in order to update it. How can i do it to automatically update itself. i want the clients … | |
i have an html form with a text area. when use get or post to retrive the info the text is not correctly formatted meaning. the begining of new paragraphs are not working and indents either. it is just one big sentence. | |
i have two values in a table and instead of returning the values it returns the word "array" twice. [code] $mysql = new sqlConnection(); $query = "SELECT DISTINCT status FROM status ORDER BY status"; $result = mysql_query($query) or die('Error, query failed'); while ($row = mysql_fetch_array($result)) { echo "$row<br>"; } $mysql->close(); … | |
what is wrong with this code: when i do a $mysql = new sqlConnection("path.xml"); i get: Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "path.xml" in /Applications/MAMP/htdocs/ebenezer/scripts/sqlconn.inc on line 11 Fatal error: Call to a member function children() on a non-object in /Applications/MAMP/htdocs/ebenezer/scripts/sqlconn.inc on line 13 the … | |
How would i write a function to accept X number of parameters for ex if i want to write a function to insert into a db. i dont know how many fields i will be inserting into the table? | |
I have an html form when i submit it it goes to a php page. i want to change the action so the php execution happens on the same page. [code] <form method ="POST" action = "user.php"> <table align="right" cellpadding="10" cellspacing="0"> <tr> <td>EMail: </td> <td><input type="text" name="email" /></td> <tr> <td>First … ![]() | |
my else statement is not executing it returns a black page. [code] while($results = mysql_fetch_array($user_name)) { if ($results['email'] == $Entered_UserName && $results['password'] == $Entered_PassWord) echo 'working'; else echo 'not working'; } [/code] | |
Why doesnt this code work. I keep getting false even when i type in the correct username and password [code] $user_name = mysql_query("SELECT * FROM users WHERE username = '".$Entered_UserName ."' AND password = '".md5($Entered_PassWord) . "'"); $user_name_password = mysql_fetch_assoc($user_name); if($user_name_password === false) { echo 'false'; } else echo 'true'; … | |
I have a macbook pro running snow. I cant get it to go to sleep in 32bit when i boot it up in 64bit it goes to sleep without a problem. I reinstalled the os and now it will not go to sleep in either 32 or 64 any ideas? | |
i am writing a php program to read simplexml file. i get the following error Parse error: syntax error, unexpected T_STRING in /Applications/MAMP/htdocs/TestSite/sqlconnectstring.xml on line 1 here is the php file [code] include ('sqlconnectstring.xml'); class sqlConnection { var $server; var $user; var $pass; function __construct() { $xml = new SimpleXMLElement($xmlstr); … | |
i have a class called sqlConn.php within the same directory as hiuser.php how do i call that class. [code] include('sql_Conn.php'); $sql = new sql_Conn; [/code] does not work i get Warning: include(sql_Conn.php) [function.include]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/TestSite/hiUser.php on line 10 Warning: include() [function.include]: … | |
I have a form that get processed by a php page and depending on what the user decides it will get summited to another php form. But the [code = php]<input type="text" name="fname" value="<?php 'echo $tesing';?>"[/code] part does not work inside php. if i try the code outside it works, … | |
I am having dificulty setting up mac mail with an ms exchange server. i am able to recieve emails with no problem but i cant send. does anyone know how to setup the smtp part with an exchange server. | |
i am trying to setup mac mail to work with exchange. i am able to recieve but not send. does anyone know the correct smtp settings for an exchange server? | |
I want to incorporate a file browser into my windows app so users can select which file to copy. I am running vs2008. | |
I have a tab delimilated txt file. how can i read only the second part of the file. ex 10.0.0.0 hostname date i want to read in the hostname only what function can i use to do this? | |
I am trying to write a program that will monitor my routers and servers and notify me when they go down. I am looking for a way to ping the host and read the reply. The InetAddress.isReachable method is the only thing i could find but it uses the echo … | |
I have a file that is tab separated. i read it in as an arraylist<string> how can i print out only the second section of the file? | |
i have a 2d array. i know the position. how can i print it out. i just need to print out 1 single element not the entire array. | |
I have a 2d char array and i need to find the position of a specific char in the array. what method can i use. return Arrays.binarySearch(this.matrixCopy, "S"); does not work it keeps returning -1 when there is an S in the array. | |
i have a file with 2 int's i need to assign them to a variables. the int's are separeated by a space. what method can i use to read each int separeate and then assign it to a variable. | |
What is wrong with this code. when it do system.out.println(matrix[0][0] i should get 1 char i get the entire line. [code] int r =Integer.parseInt(line.substring(0)); int c = 10; String[][] matrix = new String[r][c]; while (line !=null) { for(int i =0; i< r; i++) { for (int j =0; j< c; … | |
what is wrong with this code. it does not read the input file correctly. private void readFile() { String fName = "c:\\game.txt"; ArrayList<ArrayList<String>> matrix = new ArrayList<ArrayList<String>>(); { try { File file = new File(fName); Scanner in = new Scanner(file); // for ( int i = 0; i < matrix.size(); … | |
why won't this work? i have a txt file that i need to read into a matrix. i want to read into a char array so i can analyze each char separate. String fname = "c:\\game.txt"; char[][] matrix = new char[4][4]; private void readFile() { try { Scanner s = … | |
Why wont this delete the files in the arraylist. i checked the arraylist and the files are there. i even added a "\\" to the files and still nothing. i dont get any errors. [code] private void fileDelte () { for (int i =0; i<Files2Delete.size(); i++) { File f = … | |
What is wrong with my code. it poulates the arraylist with only the filename "c:\testfile.txt" i need it to populate it with the contents of the file. [code] private ArrayList<String> Files2Delete = new ArrayList<String>(); private String fName = "c:\\TestFile.txt"; private void fileCollection () { Scanner in = new Scanner(fName); int … | |
I want to populate the arraylist with the contents of the file. now it reads the first line and adds it to 0 and reads the next line and again writes it to 0, so basically it keeps overwriting itself. how can i make it add to the next avail … | |
I have a txt file that contains a list of files that i need to delete. so far this is what i have. how do i add the delete statement. line.delete, sr.delete does not work. class Program { static void Main(string[] args) { StreamReader sr = new StreamReader("List.txt"); String line; … | |
for some reason my code is not going into the for loop. i completely skips it. any ideas?? [code=java] private ArrayList<Investment> investments = new ArrayList<Investment>(); public String toString() { String outPut; outPut = "Account" + " " + super.getId() + "\n"; for(int i=0; i < investments.size(); i++) { //outPut += … | |
Re: How many memory chips does it have? if it has more than 1 chip. try removing 1 and see if turns on. if not try it with the other one. that way you can check to see if one of the chips died. | |
a list in a txt file. i want to read that file into an array list. the file contains to colums separated by a tab how can i do this? | |
right now it is only reading the first line of the file and puting it into i. how can i read the next line of the file? [code] StreamReader sr = new StreamReader("c:\\iplist.txt"); String[] list = new String[45]; string S; sr = File.OpenText("c:\\iplist.txt"); S = sr.ReadLine(); while (S != null) … | |
I am new to programing. i know how to return a date [code] public Date yesterday() { if(this.day == 1) { if(this.Check("Mar", this.month)) { if (this.checkLeapYear(this.year)) { this.day = 29; this.weekDay = this.week[this.flipBack(this.week, this.weekDay)]; this.month = this.monthOfYear[this.flipBack(this.monthOfYear, this.month)]; } else { this.day = 28; this.weekDay = this.week[this.flipBack(this.week, this.weekDay)]; this.month = … | |
how can i get an array to wrap around?? ex: array String[] whatever = new String[3]; if i ask for the whatever[2] +1 I want it to give me 0 not 3 and if i ask whatever[0] - 1 i want it give me 2 | |
Is there a function that will remove the last 4 char of a string? trimend works but i have to specify which chars. what if i dont know what the chars will be. I still need to remove the last 4 chars. any ideas? | |
I have a txt file with three sections. i need to use section 1 for one function section 2 for a diffrent function and part 3 for the third function. how can i read the file from a specfied delimiter to another delimiter. so bascially i want to read what … | |
without using the windows task scheduler is there a way to automatically run a task at a certain time using c#? | |
I am new to c#. i dont want install sharpziplib in the gac. is there another way to install it. | |
i need to zip some files and folders. is there a function already done for this or how can i go about doing this? | |
Is there a function that will remove the last 4 char of a string? trimend works but i have to specify which chars. what if i dont know what the chars will be. I still need to remove the last 4 chars. any ideas? | |
I need to copy files from one directory to another on a daily basis. I want to keep one weeks worth of files. How can i read the timestamp to determine which is the oldest file so i can delete it? |
The End.