|
Again, how do you define "video quality"?? You have yet to define this and this is your second question on the subject.
IQualProp only returns the performance properties of a video renderer. It has nothing to do with the video signal itself.
|
|
|
|
|
Thank you for the reply.
A video without any stuck that runs smoothly is quality of video for me. I want to play a video (recorded video) and check whether it runs properly without stuck. If there is any stuck in video I want to throw a error that quality of the video is not proper. Please correct me if im wrong in understanding the quality/performance of video.
IqualProp interface has a method called "get_Jitter" which will give the variation in a video. So, I was thinking this can be of help for me.
Please guide me.
|
|
|
|
|
OK. Too bad that interface has absolutely nothing to do with the quality of the video.
That interface will give the performance stats of the video renderer, not the video itself. There is also no correlation between the renderer performance and the size of the video. The values that you get are the current moment in time performance of the renderer and are also affected by the current system load. Run through the video again and you can get different numbers.
You can play a 320x200 at 30 frames a second and still get jitter, then play a 1080p video and get none. This is not an indicator of anything related to the video.
|
|
|
|
|
How can I tell the difference between source and published .NET code?
I am looking at some inherited code that I have not touched in about a year. The original designer had me first publish locally before uploading the published code to the internet server. Now I am looking a number of backed up source folders as well bas backed up published folders. I should have done a better job at naming the folders, I guess. Now I wonder: How can I tell the difference between source and published .NET code? Is there some easy way to see if some folder that contains only published code is lacking a file or xml setting?
Is the .csproj file or the .sln file part of the code pushed to the server when you publish?
|
|
|
|
|
Published code contains only the files needed for the app to run and it does not contain .csproj or .sln files.
|
|
|
|
|
Hm... Normally, the web server won't throw an exception if csproj and sln files are deployed also...
|
|
|
|
|
Well, no - but it's not automatic. (And I'd rather not do it, it's untidy and prone to error)
I'd probably include a version number and a build timestamp, as I do in my non-website code.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Yes, it wouldn't. I meant to say that when you publish your code using Visual Studio, it doesn't copy the .csproj and .sln files.
|
|
|
|
|
Xarzu wrote: Is the .csproj file or the .sln file part of the code pushed to the server when you publish?
When I deliver something to production it is
- In source control
- Labeled in source control
- Built from source control
- Delivered from that build
Other than that I either keep track of the label that went to production and when.
Or I specifically re-label using a build version number with a label that indicates a production delivery.
|
|
|
|
|
I am adapting a XAML Control to be MVVM compliant. Right now the XAML is actually not important, but there is one component that is giving me grief. The control is actually called from another view model on an event. Click here to add kind of thing. That command looks like this:
private void OnAddItem()
{
SubItemViewModel subVM = new SubItemViewModel(Key, null, false);
IDisposable ss = Observable.FromEventPattern(subVM.Save, "ExecuteEnd").Take(1).Subscribe(x => { LoadList(); });
SubControl ctrl = new SubControl();
ctrl.DataContext = subVM;
WorkspaceUserControlWindow w = new WorkspaceUserControlWindow(ctrl);
w.Title = subVM.DisplayTitle ?? Key.Value + " - Add Item";
Observable.FromEventPattern(w, "Closed").Take(1).Subscribe(x => { if (ss != null) ss.Dispose(); });
w.Show();
}
This worked fine in a non-MVVM model using a delegate command, click events, etc... Now that I have migrated the VM over to MVVM I need to understand how to publish the Save command so that the calling event can listen for the ExecuteEnd and reload the data list as shown here:
IDisposable ss= Observable.FromEventPattern(subVM.Save, "ExecuteEnd").Take(1).Subscribe(x => { LoadList(); });
I have always used relay commands within my view models as I have never needed to observe a command like this. Thoughts?
Cheers, --EA
|
|
|
|
|
Hello All,
Our main 2012 VS solution has 16 projects.
One of the project is a web site, which a web.config file defined.
I want to access this website's web.config file's applicationSettings value in another project. I added the System.Configuration to this class. And using below trying to access the value of the settings. Since this setting is defined as a string, converting it to an int. The value for the setting QuesId is 2 in the web.config file.
The code complies with no errors, but when i execute and browse the code, the value is null. any ideas??
Int32.Parse(ConfigurationManager.AppSettings["QuesId"]);
|
|
|
|
|
How are you executing the other project? If it's a class library called from within the web site, the code you've posted should work. If it's a stand-alone application, it will need its own configuration file.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: If it's a class library called from within the web site, the code you've posted should work. If it's a stand-alone application, it will need its own configuration file.
Methinks that he has a config file for the library {1}, and one for the web app{2}.
And now he has troubles accessing {1} when the library method is executed from the web app since the library will try to access {2}.
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
In the web.config file, if I use the <appsettings> then I am able to access this setting in my other C# project using, with no issues:
Int32.Parse(ConfigurationManager.AppSettings["QId"]);
But if it is defined in the <applicationsettings> part of web.config, when I try to access it in my other C# project:
Int32.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["QId"]) a null value is returned.
Is my syntax incorrect?
|
|
|
|
|
No. The problem most likely is that
Int32.Parse(ConfigurationManager.AppSettings["QId"]);
is accessing the app.config file, while
Int32.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["QId"])
is accessing the web.config.
Furthermore, if you have two configuration files, only the file of the project you build as Startup project is read by either ConfigurationManager.AppSettings or WebConfigurationManager.AppSettings .
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
Actually both settings are defined in the web.config file, but under different sections.
I am not using the app.config file in my other project.
|
|
|
|
|
Can you try to use ConfigurationManager.AppSettings instead of WebSettings?
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
|
Can you post the config file?
Clean-up crew needed, grammar spill... - Nagy Vilmos
|
|
|
|
|
I have a stored procedure that returns two result sets. How can we handle this in EF and calling this in C#? I know that this will be handled easily starting from .Net Framework 4.5. But I am using .Net Framework and EF version 4.0. Please provide any suggestions.
|
|
|
|
|
|
Hello fellow C# developers.
I am doing a little bit login system.I came to a point where I need to log my operations for every user. I made custom Log static class, because I don't need not used objects.
I have the following method in the class.
public static void Logging(string logMessage, string user)
{
using (Writer)
{
Writer.Write("\r\nLog Entry : ");
Writer.Write(
"{0} {1}\r\n user: {2}",
DateTime.Now.ToLongTimeString(),
DateTime.Now.ToLongDateString(),
user);
Writer.WriteLine(": {0}", logMessage);
Writer.WriteLine("-------------------------------");
}
}
When I use it for the first time is OK upon button click events, but when I call it again, I get an Exception. I checked it and it was "Cannot write to a closed TextWriter". So what seems to be the problem?
Isn't using opening and closing the writer, so when I open it again it would be ok?
|
|
|
|
|
A using block will dispose of the resource (in this case, closing the TextWriter ) at the end of the block. It has nothing to do with creating the resource or opening the TextWriter .
Either change your code so that it creates the TextWriter on every call, or remove the using block and find another way to close the Writer when it's no longer needed.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Guys,
I face issues in connecting to SQL Database on Server machine using C#, but am successful in creating connecting with local database in the system.
1. I enabled remote access (by making TCP protocol Enabled)
I have a server machine with SQL 2008 R2 Express Edition installed, and i have created a Database in that machine.
I cannot start "SQL Server Agent" - getting Remote Procedure Call Failed Error.
But other 2 are in running state (SQL Server (SQLEXPRESS) & SQL Server Browser)
Is that i cannot connect to this server Database using the SQL 2008 R2 Express edition ????
Do i need to have SQL Server 2008 R2 installed ??
Please assist.
|
|
|
|
|
You don't need to have SQL server installed on anything other than the server - that's the whole idea of having a server running SQL server: the other machines connect to the SQL server instance and access the DB via that.
Start by connecting to the server instance.
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file to use from your C# code.
Until you have that working, you aren't going to get anywhere!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|