189 Posted Topics
So i want to hodl my mouse and by moving the mouse i want my vector to rotate around, which of the built in events should i use? i tryed mousedown event but that s not what i m looking for obviously.Maybe i should combine two mouse events instead? | |
int main(int argc, char** argv) { FILE *f; char string[100]; int counter=0; f=fopen("New Text Document.txt","r"); if (f==NULL) { printf("error"); } while(!feof(f)) { fscanf(f,"%c",&string); } fclose(f); for(int i=0;i<100;i++) { if (string[i]=='a') /*doesnt work, why?*/ { counter++; } } printf("\n the number of vowels a is : %d",counter); getch(); return 0; } … | |
Re: why don t you use empty string instead of null?, and your method will always return null since is not return a variable state. | |
Re: didnt you do that on your second post to this thread? Please provide new code if you ve changed your previouse code a be more specific, another thing that i can see in your code is that you re are reaching number 12 with the second dice, shouldn it be … | |
Re: Please post some code, it s really hard to think without seeing the actual code | |
As it is said in the title i can not get the keyword string. I finally found a version of C for windows 8 but now i can t get the most important thing types int, double char,bool ect... work perfectly and always show as a keyword but somehow i … | |
Re: In your last method calcComissions, you are using an array and you re not specifying on wich index of the array comissions the calculation that you re doing should go to, also you should check your index variable, you will get an error since it s not a public variable. | |
I would really appreciate some help here and some serious answers. I work at a coffe shop and an man came up to me if i could charge his iphone (his battery was a 0%). He looked suspicious, i ve never seen him around the community. At first i was … | |
Is there any option which i can activate when using ECLIPSE so that when i m typing S... for String or i.. for int etc... to automaticly give me suggestions that i want a int if the first letter is i or i want a String if the first letter … | |
Re: The best thing to do in my opinion is to draw vertical columns , put the two players on the x coordinate and above each column the numbers of times they won, so try to increase a block(draw block like a square whic will acutally make a column at some … | |
Re: your while loop will run forever i don see any break inside, sorry i didnte see that you are still in the proccess of coding till you reach number 7 but still you should redesign you code structure since you have a local variable which is unreachable in the if … | |
Re: I m not sure what you want but first of all PROPERTY AutoSize does not exist (using 2012 VS).However there is a property called MultiLine and if you set it to true your text(string) will go down after it reaches the border of the textbox, it will go in the … | |
Re: Please read this and you will understand everything best example on the internet [Image bits](http://www.thewonderoflight.com/articles/bits-bytes/) | |
Re: [Click Here](http://htmlagilitypack.codeplex.com) have a look at this link, download the stuff, if you can t solve the problem using this by yourself i ll help you out. | |
Re: Why don t you use the streamreader class instead and i think at line 5 you want to do this textBox1.Text = textBox1.Text+line; but please give some more detalis cause i m not sure what you want exactly | |
Just wondering how popular is Daniweb compared to other forums (if i may ask the question in this way)? If I type in google search anything that has to do with programming the first genereated result will be stackoverflow, i mean daniweb has a much more better design and organization … ![]() | |
Re: The error is most definity the nullexcepction error, but i think that you should post some code.. | |
Re: line 6 you should poot bool as well | |
Re: do you really have to use regex for this? | |
Re: hmm,could you please post some code so that we can see what s going on? | |
Re: i don t know if it s too early in the morning but i really don t understand what you want. Can you please be more specific | |
I ll give my best for this post not to be too long. I would like to make a program for my colleagues, students so they can check their results when they finish there task or if they want to check results first and then give it a try (doesn … | |
The title says it all. What do you suggest? | |
Re: Well suppose that you ve added images to the Resources and you have them already in your Listbox. You can do this by writting the folowing code: List<Image> list; public Form1() { InitializeComponent(); list = new List<Image>(); list.Add(Properties.Resources.image1name); list.Add(Properties.Resources.image2name); list.Add(Properties.Resources.image3name); //and so on... } private void Form1_Load(object sender, EventArgs e) … | |
I would like to know if there is a class wich generates RANDOM words which have sense(are in use in the daily language in englis). I am making a project where uppon a given random generated word i would like to collect letters for that given word so once i … | |
Re: There are really numerous way on how you can do this. But there is a good article on CodeProject and it helped me a lot. [Click Here](http://www.codeproject.com/Articles/17193/Upload-Images-Using-C-JavaScript-and-ASP-NET-2-0-C) | |
I was wondering is there any way to put my e.Graphics.DrawString() method into a variable(object) so that i can do some actions aftewards. The thing is that I ve got my words falling and rotating on the form. I ve also got a object wich is a Image which moves … | |
I have a method which does something. However to do the desired thing i must call the CreateGraphics method. I Created a new class (added a new class) and now inside my method i can t call this method. What am i missing? I can call the CreateGraphics method inside … | |
Re: Visual c# 2010 (http://www.microsoft.com/visualstudio/eng/downloads) | |
for (;n!=0;n/=10) { do something till n==0; } Is this something like a while loop or do while loop or some kind of imitation? | |
Re: If you could put you option array declaration and curly brackets of the for loop to know where it ends and the User_Answer and Correct_Answer arrays and it would be good to put the code for the last if statement, if checked then what. | |
Hi guys. for several weeks i can t make my mind whether to go and learn php or should i stick with my C# knowledge and learn ASP.net. I ve started to programming in C# 2 years ago, learned sql and databases and learned html css when i was still … | |
The thing that i don t understand here is how can you put a FUNCTION that hasn t yet evaluated into a integer(will evaluate later but at the moment of the recursion it hasn t) into a int variable? Once n equals 0 the int smallResult will get populated but … | |
Re: I was a little bit curious and i really wanted to do this since i haven t been using the streamreader and streamwritter classes for quite a time. Here is the code that solves your problem but only for 3 characters numbers if for example you had more you would … | |
Re: A pixel is the smallest thing that a image contains it can be a dot, square, line ect... If you want to read pixels from a image you ve got several methods in the bitmap class. I suggest you to use 2 for loops and go through each pixel (image … | |
Re: I m really curious about this one. I ve tested your code but declared processPads outside the the timer method. By doing that you don t get the problem and you can work with your notepads but you get another error wich is unusual. | |
Re: I suggest you to try with this [Click Here](http://thenewboston.org/list.php?cat=15) and this [Click Here](http://www.youtube.com/user/kudvenkat) Ofcourse you ll always run into some kind of trouble which you will have to google to find the solution to it and you ll have to combine your knowledge with the thing you found on the … | |
I was just wondering not just concerning this piece of code but in some other code as well how can i avoid --> if (j!=array.Length-1) and put something else maybe something in the for loop? LINE6 for (int i = 0; i < array.Length; i++) { for (j=counter; j < … | |
public void RotateImage(Graphics paper,string theString) { try { using (paper) { paper.RotateTransform(angle); angle++; sz = paper.MeasureString(theString, this.Font); paper.DrawString(theString, new Font("Arial", 24), Brushes.Black, -(sz.Width / 2), -(sz.Height / 2)); paper.Dispose(); } } catch (Exception e) { MessageBox.Show(e.ToString()); } i get an error saying parameter is not valid, but only if i … | |
private void Form1_Paint(object sender, PaintEventArgs e) { String theString = "A"; SizeF sz = e.Graphics.VisibleClipBounds.Size; e.Graphics.TranslateTransform(sz.Width / 2 ,sz.Height / 2); e.Graphics.RotateTransform(angle); angle++; sz = e.Graphics.MeasureString(theString, this.Font); e.Graphics.DrawString(theString, this.Font, Brushes.Black,-(sz.Width/2),-(sz.Height/2)); } I dont understand the last part with the DrawString(). The 2 last arguments of the method specify the location … | |
Re: Well I have used this as well but i quit it in the early stage. I don t have a particular reason for quitting but i just did. If you could specify a little bit more the problem maybe i could help you. | |
The title says it all. I switched to Opera for some reason but i m trying to paste some code from vs2012 to this area overhere and I m unable to do that. Any ideas? Should I enable something in my settings? I m having the latest version. I assume … | |
Bassically I want my letter to rotate clockwise but not all over the form, I want it to rotate in one place. private void Form1_Paint(object sender, PaintEventArgs e) { RotateImage(e.Graphics); . } string a = "A"; float d= 15f; Font stringFont = new Font("Arial", 16); private SizeF stringSize(Graphics paper1) { … | |
Re: ddanbe said everything, just put your messagebox at line 39 to line 38 so it doesnt show two times when the letter is guessed. Just an advice if you want to put on line 29 instead of if(char.IsWhiteSpace(myguess)) to if (txtMessage.Text==" " || String.IsNullOrEmpty(txtMessage.Text)) and replace line 22 to line … | |
1.code -------------------------------------------------------------------------------------------------------------------- static void Main(string[] args) { SqlConnection sc = new SqlConnection("Data Source=pc3490ierf43;Initial Catalog=Persons;Integrated Security=True"); sc.Open(); SqlCommand command=new SqlCommand("Select Name from Persontable",sc); SqlDataReader reader= command.ExecuteReader(); while (reader.Read()) { Console.WriteLine("{0}", reader.GetString(0)); } Console.ReadLine(); } --------------------------------------------------------------------------------------------------------------------- ** 2.code** static void Main(string[] args) { using (SqlConnection sc = new SqlConnection("Data Source=pc3490ierf43;Initial Catalog=Persons;Integrated Security=True")) … | |
Is it posible to install and deploy my c# apllication on my phone (name in the title)? | |
Hi there. I ve got a problem with my drop down menu, i ve centered a border on my page and when i hover over the <li> of my <ul> a drop down menu appears but it appears behind the border that i ve inserted. My question is do i … | |
Re: [Xamarin](http://xamarin.com/), i ve used this, not using it anymore so i don t know what s going on really, neverthless i think that this is what you re looking for. |
The End.