i have a .csv file contain some name as below: William Shakespeare charlie chaplin david Copperfield and i'm supposed to write a java program that will turn the input above into the output below: WS cc dC but i still couldn't get the output that i want, i wanna ask is there anything wrong with my code below? import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.*; import java.io.*; public class tryname { public static void main(String[] args) { tryname obj = new tryname(); obj.run(); } public void run() { BufferedReader reader = null; char tempname; //int point =0; …

Member Avatar
Member Avatar
+0 forum 15

so, im trying to make a simple funtion to see if there is a file in a folder. been looking everywhere but havent found one that worked out. annnnnnnnnnnnnd code snippet: ` WIN32_FIND_DATA FindFileData; HANDLE hFind; hFind = FindFirstFile(_T"C:\\Dev-Cpp\\notes", &FindFileData); if (hFind == INVALID_HANDLE_VALUE) { cout << "No File found\n"; } else { cout << "Guess I found a File\n"; } well, the function comes up with no errors but if the file is empty it says that it found a file. can someone tell me what am i not seeing?

Member Avatar
Member Avatar
+0 forum 7

I don't know what's wrong but the succeeding strings are not properly read by fgets. else { initArray(word1); //first string fgets(word1, 29, fileIn); printf("word1: %s\n", word1); len = strlen(word1); if(word1[len-1] == '\n') word1[len-1] = '\0'; while(!feof(fileIn)) { //succeeding strings in next line initArray(word1); fgets(word1, 30, fileIn); printf("word1: %s\n", word1); len = strlen(word1); if(word1[len-1] == '\n') word1[strlen(word1)-1] = '\0'; fgetc(fileIn); } fclose(fileIn); } } texts: ABCD asnjf fkj read: ABCD snjf kj Can you give me an idea what's wrong?

Member Avatar
Member Avatar
+0 forum 4

Name your favorite christmas carol. Mine is the First Noel

Member Avatar
Member Avatar
+0 forum 1

Good morning community, Can someone help me with the IndexOf method to reverse the name: Don Paul to Paul, D

Member Avatar
Member Avatar
+0 forum 4

Hello community My name is Hadi and I'm a (newbie) freelance web developer and designer. Just joined the group to share experiance with other developers and designers and belive that we all have greate ideas to be reality.

Member Avatar
Member Avatar
+0 forum 5

Hi I want to know how to know if user is running the program for first time? I have a .txt file which will be loaded on start, but it is the first time and there is no such file. If anybody contributes, I will be happy Thanks in advance Yuvjeeth

Member Avatar
Member Avatar
+0 forum 6

> hey guys,.how to get all word in first index in array below and index 2 futhermore get last word,.. $arr = array( array( '3'=>'repsol kawasaki honda ktm', '4'=>'kawasaki honda ktm bmw', '5'=>'honda ktm bmw ducati', '6'=>'ktm bmw ducati yamaha') , array( '13'=>'sdad dasda sdadad dasdads', '14'=>'dasda dasdad sdasdas asdas', '15'=>'dasd adasd asdasd sada', '16'=>'dasd asdasd asdaads asdas'), ); hope yield: Array ( [0] => Array ( [0] => repsol kawasaki honda ktm [1] => bmw [2] => ducati [3] => yamaha ) [1] => Array ( [13] => sdad dasda sdadad dasdads [14] => asdas [15] => sada [16] …

Member Avatar
Member Avatar
+0 forum 1

My son is very interested in developing a video game. He is only 10, but I want to encourage his interest and was wondering where is the best place for a 10 year old to start? learning language? understanding computer programing? as you can tell, I am not knowledable in such things in fact he knows more than I do.

Member Avatar
Member Avatar
+0 forum 10

I am making a mysql query that gathers comments for a user, it works properly, I connect to the database and recieve the comments for a user, but it is not showing the first comment for the user. Here is the code function comments(){ //connect to db connect_db_members(); //start query global $number; $query = "SELECT * FROM comments WHERE commentie='$number' ORDER BY id DESC"; //run query $results = mysql_query($query); //check if there are no comments if(mysql_fetch_array($results) == ""){ echo '<div class="comments_about_wrapper"> <div class="comment_text_wrapper"> <div class="comment_text" ><p style="font-size:29px;">You have no comments</p> </div> </div> </div>'; } else {while($row = mysql_fetch_array($results)){ echo '<div …

Member Avatar
Member Avatar
+0 forum 4

hi everyone. I want to delay the click event in a vsFlexgrid so that the double click event will run 1st. I used a timer for the delay in the click event and managed to get the value of the double click speed in the windows library for the timer interval. however i still cant make it work the way I want to. Its still running the click event rather than running the double click event 1st. hope you can enlighten me with this. here's my code. ''General Declaration Declare Function GetDoubleClickTime Lib "user32" () As Long ''Form Declaration Private …

Member Avatar
Member Avatar
+0 forum 5

>hi guys, how to get first and last (key and value) array multidimesional below? $data1 = array( array( '0'=>array( '7'=>'chelsea', '8'=>'everton', '9'=>'villa', '10'=>'liverpool' ), array( '23'=>'milan', '24'=>'inter', '25'=>'juventus', ), ), '1'=>array( array( '53'=>'madrid', '54'=>'barcelona', '55'=>'altetico', '56'=>'everton', ), array( '243'=>'milan', '244'=>'inter', '245'=>'juventus', ), ), '2'=>array( array( '523'=>'madrid', '524'=>'barcelona', '525'=>'altetico', '526'=>'everton', ), array( '223'=>'milan', '224'=>'inter', '225'=>'juventus', ), ) ); i want yield like this: Array ( [0] => Array ( [0] => Array ( [7] => chelsea [10] => liverpool ) [1] => Array ( [23] => milan [25] => juventus ) ) [1] => Array ( [0] => Array ( [53] …

Member Avatar
Member Avatar
+0 forum 2

i am making a project in vb.net and i have a bio data form in it i have 2 textbox in it, TextBox1 is for Name and the Textbox2 is for father's name . i want to make the first letters of Name in textBox1 as Capital(eg: Pratik Shukla) in both the TextBox .on focus lost

Member Avatar
Member Avatar
+0 forum 3

I need some serious assistence with finding the solution to this problem, it has plagued me for some time now and im just not getting the big picture. I need to move the elements in a 2d array according to the user input, but the way i have figured out is too difficult and could probably be much easier, but i havent found much on it so bare with me. Secondly I need to figure out a breadth first algorithm to find the number of moves it will take for the user to get to the solution state, this is …

Member Avatar
Member Avatar
+0 forum 1

> hey guys, how to get all word in first index in array below and next index get last word in array 2 D??,.. example: $arr = array( array( '7'=>'repsol kawasaki honda ktm', '8'=>'kawasaki honda ktm bmw', '9'=>'honda ktm bmw ducati', '10'=>'ktm bmw ducati yamaha' ) , array( '23'=>'lamborghi ferarri mercedes hyundai', '24'=>'ferarri mercedes hyundai toyota', '25'=>'mercedes hyundai toyota nissan', '26'=>'hyundai toyota nissan renault' ), ); I want yield like this: Array ( [0] => Array ( [7] => repsol kawasaki honda ktm [8] => bmw [9] => ducati [10] => yamaha ) [1] => Array ( [23] => lamborghi …

Member Avatar
Member Avatar
+0 forum 3

Hai friends,I was developing a code for linked list operations. But while doing deletion, if we give a position except 1, the particular node will be deleted. But if i give position as 1, the node will not be deleted. Please help. I'm posting the code below #include <iostream.h> #include <conio.h> #include <process.h> #include <alloc.h> struct node { int info; struct node *link; }*start=NULL; void push(); void display(); void sort(); void delnode(int); void search(int value) { int pos=0; struct node *_node; _node=start; if(_node==NULL) { cout<<"NULL"; return; } while(_node!=NULL) { cout<<_node->info<<"->"; _node=_node->link; } cout<<"NULL"; _node=start; // for searching while(_node!=NULL) { if(_node->info …

Member Avatar
Member Avatar
+0 forum 3

to input an unsigned integer and reverse the first and last nibble of the number

Member Avatar
Member Avatar
+0 forum 16

I am creating a responsive design for the first time, i have all the media queries in and i am linking to a separate mobile style sheet, i have been using this for testing the site, [Click Here](http://www.studiopress.com/responsive/) and it shows up fine on the iphone and smaller Smartphone test. You can use this link [Click Here](http://stmatthias.dnsalias.com/) if you want to test it. My problem is that when i try to look at it on a real iphone (my iphone 2g) it just doesn’t display, and when i tried to look at it on my small screen Samsung galaxy in …

Member Avatar
Member Avatar
+0 forum 3

The End.