|
Seems difficult to give you a precise answer without knowing more about the database.
From my point of view, but I might be biased as I come more from a SQL background than many, I would create a SQL View, taking parameters (stored procedure) returning all ClassRooms available between 2 datetime (start and end), and I would do my select against this view.
Also, as I guess classes starts and end at a fixed hour, instead of using a whole datetime twice, I would build a fixed table with ID values, for example, from 8 to 8:45 AM = #1, from 9 to 9:45 = #2, and so on...
Just some ideas....
|
|
|
|
|
I am brainstorming ideas for an web browser WYSIWYG text editor for LED like displays. The editor will show a matrix of bulbs. As the user types, the bulbs corresponding to the keys pressed will be turned on. The editor will support backspace and most basic text editor functions. The displays are also of different sizes (pixel height, width, etc) and support different fonts.
I've seen where javascript supports key up/down events. What I am focusing on right now is the edittable pixel display.
The two ideas I have right now are
1) A table with each cell filled with an OffBulb.png. As the user types, javascript determines the appropriate cells to be changed to an OnBulb.png.
2) The server creates .png for all supported characters (~200 chars - a lot of images) and as the user types, the character pngs are layed out in the container one after the other.
Does anyone have any ideas?
The platform will be .NET either MVC or possible WebForms.
|
|
|
|
|
You mean a look-up table right? You put your 200 characters in an array of objects which each hold the name of the character and the image for the character. THAT array NEVER changes!
When the user enters the characters they want, you create an array for the user input, but don't copy the values from the 200-character array - copy the indexes. So, in memory, the message looks like this...
53 41 4c 45 20 6f 6e 20 44 56 44 73 20 54 4f 44 41 59 21 - which I would bet is exactly what the sign stores too.
So "the character pngs are layed out in the container one after the other." isn't the right way to do it - just put the reference numbers in there. Making copies of the character set is wasteful, and LED signs don't have a ton of memory - you should emulate that behavior in your web interface.
And when you're done... please fix Bubba Chino's sign... it has been flashing "LED SIGN!" for two years ever since he bought it
|
|
|
|
|
Hi Everyone,
What is the difference between DBContext class and ObjectContext ?
|
|
|
|
|
|
hello Friends
i made a asp.net page that accepted rss address. now,I want to read the content of any links that exist in rss for this action i writed follow code:
protected void Button_Rssreader_Click(object sender, EventArgs e)
{
var reader = XmlReader.Create(TextBox1.Text);
var feed = SyndicationFeed.Load(reader);
reader.Close();
string s = "";
foreach (SyndicationItem i in feed.Items)
{
s += i.Title.Text + "<br />" + i.Summary.Text + "<br/>" + i.PublishDate.ToString() + "<br />" + "<br />" + (i.Content as TextSyndicationContent).Text.Trim();
s += "<hr />";
}
Literal1.Text = s;
}
But i can just see the summary of RSS link if Delete (i.Content as TextSyndicationContent).Text.Trim()
i want to see the links of picture beside summary in the Rss link
Point : id don't want to see the link of picture that is in the XML links. really i need to read & download the Rss Links of picture to Display them beside the news (text ).
|
|
|
|
|
|
I am trying to say if a teacher is already teaching 3 classes flag it by returning a true if so, or a false if not. I have it counting the rows (or so I thought), but it is saying the way I did it is not correct. That Tables[0] is invalid.
private bool ValidateTeacher(string TeacherID, String Semester)
{
string path = Server.MapPath("eAcademy_DB.mdb");
string connectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + path;
string commandText = "SELECT COUNT(*) FROM tblClass WHERE emp_ID=? and sem_Time=?";
var ds6 = new DataSet();
using (var connection = new OleDbConnection(connectionString))
using (var command = new OleDbCommand(commandText, connection))
{
var adapter = new OleDbDataAdapter(command);
if (ds6.Tables[0].Rows.Count > 3)
{
return false;
}
else return true;
}
}
|
|
|
|
|
You have to fill the DataSet before you read from it.
adapter.Fill(ds6, "Teacher");
|
|
|
|
|
You are just creating an adapter and a dataset. You have fill the dataset using the adapter.
adapter.Fill(ds6);
or
adapter.Fill(ds6, "<Your table name>");
|
|
|
|
|
I have just started to learn C# and Asp.Net and I have a specific project in mind but I need to be able to manipulate cookies client side and I can't find good documentation for this so I decided to ask for help to get a starting point.
I want to make a desktop application that is a little to complex for my actual knowledge but I need a starting point: I need to be able to load a list of usernames and passwords and proxies and proxyuser and proxy pass. This little part of the application will use the accounts and proxies to login to a webpage using httpclient. When I send a GET request to the login page I get back a response that contain some hidden parameters that I must assign to some variables and a cookie. I don't know how to save that cookie in a location that I choose (the application folder under the "cookies" folder) with the name that I choose (the username used for login should be the name of that cookie). After I sort thru the response I have to send a POST request to the server with all the hidden parameters and the user and pass parameters and the cookie. The server will send back a response with another cookie that I want to save in the same location as the first one with the same name (overwritten ). This cookie will be used later in the program to do other actions on that server under that login. All this requests must use a certain proxy with its credentials, proxy that will change every time I use a new login.
I managed to find out how to use the HTTP Client from Asp.Net Web API to send the get req or to post but I have no idea how to get such a control over cookies that the site want to store on my computer and how to use different private proxies for each login... I did all the above using PHP and CURL and is very easy to control the cookies using cURL but I need to do it in C# and make a desktop app so ... Asp.Net Web API and HTTP Client is the key I think...
Please give me a hand to start my project and don't dismiss my question just because I'm to noob with .net or c#
Thank You!
Florin Curelaru
|
|
|
|
|
i Would like to know the code for resizing the webpage according to the screen size or the screen resolution please help me.it can either be using css, javascript or html
|
|
|
|
|
This is called "Responsive Design" meaning the web page responds to different device sizes...
Now that you know what it is called, you should be able to research the subject yourself. It is complicated, and you're going to have to make the decisions yourself about how to approach it for your situation...
https://www.google.com/?q=responsive%20web%20design[^]
|
|
|
|
|
Thank you Jasmine2501
|
|
|
|
|
"screen size" is not OK: do you expect all your users to run their web browsers maximized? I don't - and I get annoyed by some stupidly designed web pages assuming that they can use 2560 pixels wide (or sometimes even 4480 pixels, since I have two monitors). The client size of the browser is the correct value!
|
|
|
|
|
I am not looking for any browser pixels i was looking for a page which does not show much of a whitespace.......please read the post properly....
|
|
|
|
|
If you adjust for browser or, screen size, you will still need to think about printer friendly version of your web pages.
|
|
|
|
|
hi everyone,
i'm having a problem like i have gridview control with
4 columns and column1 is a text column and col2 is flag column where as col3 and col4 are item templates where a textbox is embedded in each of the item templates, col1 text and col2 values
are comming from oracle ref cursor, based on the flag condition of col2 coming from ref cursor we need to display the item template with textboxes in col3 & col4 and how to validate those boxes in item template when submitting data to the database meanwhile we need to convert the data into an xml format to store the data to the database ,if anyone who understand my problem are invited to answer.
thanks in advance,
jeeva
|
|
|
|
|
I have some data from model , in which i getting some hex values .. now i need to translate this hex values to real color.
I have try this way...
@Html.DisplayFor(modelItem=>System.Drawing.ColorTranslator.FromHtml(item.color))
But this not working.
item.Color is a value from database and it's like this #ffffff;
Any suggestions ?
Thanks for help in advance!
|
|
|
|
|
try this
<span style="display: inline-block; width: 20px; height: 20px; background-color: @item.Color"></span>
it would display like this:
Help people,so poeple can help you.
modified 29-May-13 1:54am.
|
|
|
|
|
Ali you are the King!
Thank you!
|
|
|
|
|
The king of Persia
Help people,so poeple can help you.
|
|
|
|
|
In GridView
BackColor='<# System.Drawing.Color.FromName(Eval("item_color").ToString())%>'
|
|
|
|
|
Thnxs for info how to do that in WebGrid!
|
|
|
|
|
Alem.B wrote: But this not working.
Define "not working".
The only obvious problem with your code is the inconsistent naming in your lambda expression:
modelItem => System.Drawing.ColorTranslator.FromHtml(item.color)
This should either be item => ... or ...FromHtml(modelItem.color) .
Also, is it item.color or item.Color ? In C#, the case matters.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|