|
Dave Kreskowiak wrote: post the RELEVENT code snippets, not your entire frickin' project. I'm not in the mood to read that massive amount of code
I second that, as I'm never in the mood to read the irrelevant code.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Pick one place to post a question and stick with it.
|
|
|
|
|
|
S. Karthik - Hosur wrote: how to call the values from the databases
"Attribute values" or "Tupel values" would do. What's up with the code that you posted?
Bastard Programmer from Hell
|
|
|
|
|
Hi, anyone knows a .NET component/library that can provide me certain informations about media files:
For video I would need :
- codec name
- Image size (resolution)
- duration
- format
- frame rate
- aspect ratio
- bit rate
Audio :
- duration
- codec name
- sampling rate
- channel no
- bit rate
Thank you in advance!
|
|
|
|
|
Actually im getting error when the below code is executed from unit test project...
where import is an xml file in the below code..
XmlTextReader importReader= new XmlTextReader(System.Web.Hosting.HostingEnvironment.MapPath("~/Content/Importcontent/import"));
the above code is present in one of the methods in different project(class library) which is used in test method in the unit test project
where as the above path is present in web project.
and the value of the
System.Web.Hosting.HostingEnvironment.MapPath("~/Content/Importcontent/import")
is null..ie unable to get the complete path of the file i guess bcos the hostingenvironment is not running(web project)
The above code is working fine when running from the webproject ie it returns the exact path.
whereas returning null value when running from test project.
please let me know how to fetch the file path(where file is present in web project) when running from test project.
|
|
|
|
|
You shouldn't be trying to read files out of your live project in the unit tests. That's, well, not a unit test
|
|
|
|
|
Hi,
if you have a file to read in Unit test then you need your file in OUT folder. You need to add those files as DeploymentItem list(.testsettings file >> deployment submenu). you can add Deployment item from testsetting file or by adding class decoration.
like,
[DeploymentItem("Content/Importcontent/import")]
after doing one of the above procedure, you can access your file. one more important note : make sure your file property "Copy To Output directory" = Copy Always
Thanks
-Amit
|
|
|
|
|
How to get the all unauthorized installed applications in my pc using c#.
|
|
|
|
|
Don't post this everywhere - you have already posted it in QA, so the scattergun approach is not going to endear you to anyone.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Sorry...,Actually i need help on this question.
|
|
|
|
|
Hi you can go to this page:
"www.blog.pythonlibrari.org/2010/03/03/finding-installed-software-using-python/"
my Email is
sina_rahimzadeh97@yahoo.com
|
|
|
|
|
I would recommend NOT posting your email address in a public forum unless you want to receive a lot of spam!
If the OP wants to email you he can do so via the link at the bottom of your post without the need to reveal your email address publicly.
|
|
|
|
|
The OP asked in a C# forum, not a python one.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Authorized by whom? And when?
Rethink the question.
Bastard Programmer from Hell
|
|
|
|
|
I picked up a book on Entity Framework. So far it seems very similar to Linq to SQL. Am I missing something? Is there a compelling reason to use EF over Linq to SQL?
If it's not broken, fix it until it is
|
|
|
|
|
LINQ to SQL was good for one to one mapping.
Entity Framework is good for mapping against multiple tables.
Entity Framework vs LINQ to SQL[^] is a good blog read.
|
|
|
|
|
EF is a full entity mapping framework, like NHibernate – it links a database model (with many tables, relationships etc) and a memory model (with many classes, links etc). It is a level of abstraction above direct access technologies like Linq.
You should use it if you want a mostly transparent mapping between database and in-memory code objects. You shouldn't if you prefer to have direct control over when you interact with the database and how. It can also be a bit of a pain setting up EF on an existing database if that database doesn't fit what you want as data objects exactly.
|
|
|
|
|
Hi,
MCTS Self-Paced Training Kit (Exam 70-516): Accessing Data with Microsoft .NET Framework 4 ebook is very useful to learn about EntityFramework specially chapter 6.
hope you like this book
Thanks
-Amit
|
|
|
|
|
Hi,
Everything I've googled says this should work, but I get "invalid namespace" and was wondering if someone can help me get a baseline going so that I can build off of that?
I have the necessary references/includes, I just cannot get this to work for the life of me. Thanks for reading.
string cServername = "[server]";
System.Management.ConnectionOptions objconn = new System.Management.ConnectionOptions();
objconn.Impersonation = System.Management.ImpersonationLevel.Impersonate;
objconn.EnablePrivileges = true;
objconn.Username = "[user]";
objconn.Password = "[pass]";
objconn.Authority = "ntlmdomain:[domain]";
System.Management.ManagementScope exmangescope = new System.Management.ManagementScope(@"\\" + cServername + @"\root\MicrosoftExchangeV2", objconn);
System.Management.ObjectQuery objquery = new System.Management.ObjectQuery("SELECT * FROM Exchange_Mailbox");
System.Management.ManagementObjectSearcher objsearch = new System.Management.ManagementObjectSearcher(exmangescope, objquery);
System.Management.ManagementObjectCollection queryCollection1 = objsearch.Get();
string strDisplay;
foreach (System.Management.ManagementObject instmailbox in queryCollection1)
{
strDisplay = instmailbox["MailboxDisplayName"].ToString() + " " + instmailbox["size"].ToString();
System.Console.WriteLine(strDisplay);
}
|
|
|
|
|
It's simple, really. The namespace you're specifing doesn't exist on the target machine.
Use this[^] to show you what namespaces are on the target machine.
|
|
|
|
|
Thanks for that Dave, here is the output:
PS C:\Users\> gwmi -namespace "root" -class "__Namespace" | Select Name
Name
----
subscription
DEFAULT
QuestSoftware
MicrosoftDfs
CIMV2
Cli
Nap
MicrosoftIISv2
MicrosoftActiveDirectory
SECURITY
SmsDm
snmp
RSOP
ccm
WMI
IntelNCS2
directory
Policy
Hardware
ServiceModel
Microsoft
aspnet
I guess Exchange doesn't have database entries? If that turns out to be the case, what is the next best way to get individual user mailbox statistics?
|
|
|
|
|
That depends on the version of Exchange you're talking about.
|
|
|
|
|
Good point , 2007 sp3
|
|
|
|
|