|
My point is that ASCII is really just a set of integers and not very useful without context.
|
|
|
|
|
I've a little project to organize my Library but I'm struggling to create a folder with a bunch of playlists within it. I've stripped it right down to the bare bones for here. I know that I can do this:
iTunesApp myTunes = new iTunesApp();
iTunesLib.IITPlaylist test1 = myTunes.CreateFolderInSource("test1", myTunes.LibrarySource); or this
iTunesLib.IITPlaylist test2= myTunes.CreateFolder("test2");
and I can see that I have two options to add a playlist:
iTunesLib.IITPlaylist tempPlaylist = default(iTunesLib.IITPlaylist);
tempPlaylist = myTunes.CreatePlaylist("testP1"); or
tempPlaylist = myTunes.CreatePlaylistInSource("testP2",myTunes.LibrarySource);
but all I end up with is a an empty folder and a playlist sat in the main Library (ie in the section headed 'PLAYLISTS'). Has anyone got any suggestions please? It's not really C# specific but as I'm writing it in C#, and as it's one of the larger discussion areas, I thought I'd post it here
|
|
|
|
|
there are a grid view and sqldata sourceid in my code defined previously.
can i use it for any sql query? or i have to create some another???
|
|
|
|
|
it all depends on your needs ....
for example:
If you have a query like this in your SqldDataSource to display the data to the Gridview :
select * from TableMasterCity then you can use it to Bind dropdownlist or other control.
it all depends on the manufacture of the SQL query that you created and the need for its control.
|
|
|
|
|
i need to call like
select * from temp c1,c2,c3 where c1='17/nov/2011'
is there any restriction to use specific data type??means when we create a grid view or sql data id we have to define data type of columns or not?
|
|
|
|
|
I think,if you want show all colums in GridView,
you can define columns or not..both it's yes can...
If you dont want define columns in gridview,you can set Autogeneratecolumns=true in Properties Gridview ,and result will show data column c1,c2,c3..
If you set Autogeneratecolumns=false,you must define columns in gridview..
|
|
|
|
|
if for Gridview and SqlDataSource, I guess you do not need to define its data type colum can, ...
|
|
|
|
|
|
i am trying to design a circular track bar as like media player but instead of media player track bar it would rotate bar(clockwise as well as anticlockwise)and calculate the angle (i.e. how much degree rotated)and display that angle in text box.so, how can i do this in .net???????????????
|
|
|
|
|
|
Hi everyone
I gonna use of this this code but it does'nt work
SecureString securePwd = new SecureString();
Process.Start("Notepad.exe", "TEST", securePwd, "WORKGROUP");
I fill this code with my username(TEST) and I dont use of password in my computer for the last parameter Im using of WORKGROUP for domain
but it donest work it shows "Logon failure: unknown user name or bad password"
|
|
|
|
|
messages wrote: "Logon failure: unknown user name or bad password"
I would check to make sure the username or password is correct for the work group
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
|
have you tried to run Notepad like this
process.start("Notepad.exe");
does that work?
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
yes it works and also it works like this process.start("Notepad.exe","c:\\text.txt");
|
|
|
|
|
Hi Folks,
I Need to print a Binary TREE like so:
10
/ \
5 15
/ / \
2 14 17
I have the code to add to the tree and that all works ok and i have a method to print out the full tree starting at the root, then all the left nodes then the right nodes:
public void ShowTree(Node T)
{
if (T != null)
{
Console.Write(T.DATA+ "\n");
ShowTree(T.LEFT);
ShowTree(T.RIGHT);
}
}
I have tried something like this:
private static void ShowTree(Node tp, int spaces)
{
int i = 0;
if (tp != null)
{
ShowTree(tp.left, spaces + 3);
for (i = 0; i < spaces; i++)
{
Console.Write(" ");
}
Console.WriteLine(tp.data);
ShowTree(tp.right, spaces + 3);
}
}
And a few other approaches but i cannot get it to do as i want. Any suggestions on how i can do this?
|
|
|
|
|
The secret to drawing a binary tree is to start with the leaves.
A depth-first search will go through the leaves in order from left to right. Increment each leaf's X coordinate to allow space for the previous leaf. The Y coordinate comes from the depth of the leaf's level.
When the coordinates have been assigned to all of an interior node's sons, you can use them to position the interior node in the middle, above its sons.
When all nodes have coordinates, just cycle through them and draw them.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
|
|
|
|
|
Wow, couldn't have said it better myself!
Thanks Alan!
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:38am.
|
|
|
|
|
I created a text file using StreamWriter in a Form Application.
I can't put a code to show the lines from a text file in a listbox.
How to fix this problem.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace AplikacioniStudentet
{
public partial class FormaStudentet : Form
{
public FormaStudentet()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void textBoxID_TextChanged(object sender, EventArgs e)
{
string pathi = "Studentet.txt";
using (FileStream fs = new FileStream(pathi, FileMode.Create))
{
using (StreamWriter sw = new StreamWriter(fs))
{
foreach (string line in textBoxID.Lines)
sw.Write(line + sw.NewLine);
sw.Close();
}
}
}
private void button1_Click(object sender, EventArgs e)
{
string pathi = "Studentet.txt";
using (FileStream fs = new FileStream(pathi, FileMode.Create))
{
using (StreamWriter sw = new StreamWriter(fs))
{
sw.WriteLine(textBoxID.Text + " " + textBoxEmri.Text + " " + textBoxMbiemri.Text + " ");
sw.Flush();
sw.Close();
}
}
}
private void textBoxEmri_TextChanged(object sender, EventArgs e)
{
string pathi = "Studentet.txt";
using (FileStream fs = new FileStream(pathi, FileMode.Create))
{
using (StreamWriter sw = new StreamWriter(fs))
{
foreach (string line in textBoxEmri.Lines)
sw.Write(line + sw.NewLine);
sw.Close();
}
}
}
private void textBoxMbiemri_TextChanged(object sender, EventArgs e)
{
string pathi = "Studentet.txt";
using (FileStream fs = new FileStream(pathi, FileMode.Create))
{
using (StreamWriter sw = new StreamWriter(fs))
{
foreach (string line in textBoxMbiemri.Lines)
sw.Write(line + sw.NewLine);
sw.Close();
}
}
}
private void listBoxStudentat_SelectedIndexChanged(object sender, EventArgs e)
{
ListBox lb = new ListBox();
System.IO.StreamReader sr = new System.IO.StreamReader("Studentet.txt");
while (!sr.EndOfStream)
{
lb.Items.Add(sr.ReadLine());
}
sr.Close();
}
}
}
|
|
|
|
|
You have created a new ListBox in the listBoxStudentat_SelectedIndexChanged method, but at the end of the routine you have let it get lost. You need to create a ListBox on your form and add the items to that. Are you sure you want to add items just at the point that the ListBox selection changes?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Yes, I want that my listbox has to show every line from text file, and also, I don't want that to get lost.
|
|
|
|
|
Then you need to initialise it at the beginning of your program, not in the event handler for selection change. Just read the file and add each item from the file into the listbox that is on your form, don't create a new one that is not connected to anything.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
So you are saying that I nedd to create a text file only once, and after that i can manipulate with file details in my form calling them.
Am I right or...
|
|
|
|
|
dr_iton wrote: So you are saying that I nedd to create a text file only once, No, I did not discuss creating a file, I was explaining how to fill your ListBox .
dr_iton wrote: and after that i can manipulate with file details in my form calling them. Sorry, I have no idea what that is referring to.
Your application should be something like:
- During initialisation read your text file and build the
ListBox from its contents. - As information is added or changed in the application you may make changes to the
ListBox . - At program termination you should save the items from the
ListBox if it has been modified. - Other processing as required.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I got the point now.
If I can not post a solution tonight because I'll be busy, tomorrow I'll tell you if I solved my problem.
Once again thank you for your reply.
Cheers.
|
|
|
|