UnKnown Error
GazTheDestroyer
c# inotifypropertychanged string-comparison 2014-2-17 2:46:36
I was wondering about why MS decided to use strings in the design of INotifyPropertyChanged?My initial worry was the large expense of doing string comparisons on every change notification, and I was wondering whether to keep my property names short to help with the comparisons.However, given that strings are immutable in .Net, I wondered whether the runtime is intelligent enough to reuse string instances via some kind of hash table, so comparisons are effectively just a reference compare?Does an
Charles
c# autofixture test-data 2014-2-17 2:45:33
I have such a class:public class ViewModel {public IPagination<Data> List { get; set; } // interface!public SearchFilter SearchFilter { get; set; }public string Test { get; set; } }public class SearchFilter {public string Name { get; set; } }A dynamic proxy shall be created around the IPagination interface and the proxy shall be filled with test data. Now is it possible to let AutoFixture create an instance of the ViewModel type? Be aware that I only know the type at runtime (typeof(ViewMo
letiagoalves
c# sqlite windows-8 windows-store-apps sqlite-net 2014-2-17 2:36:13
I am developing a Windows Store App that uses SQLite for Windows Runtime Extension and sqlite-net library to store data in a local SQLite database. This database is created in Windows.Storage.ApplicationData.Current.LocalFolder.Path path. Everything works like it should and I guess I will not have problems when submiting.Question 1But what will happen when I change the app, submit again and the user updates it? Will database file be deleted? Will the user lost his data?Question 2Will I be able t
Otiel
c# 2014-2-17 2:23:23
I am having some trouble with assemblies and DLL’s.instrument_ is declared as an object and I’m creating an instance of “PP150” from the dll whose path is specified by path_.string className = ContineoProperties.getSingleton().getClassName(path_); assembly_ = Assembly.LoadFrom(path_); Type classType = assembly_.GetType(“Instrument.” + className); instrument_ = Activator.CreateInstance(classType);Later I to call the method isntrument_.instrumentCommand(cmd.getCommandName())The error I get is with
mini-me
c# arrays winapi struct 2014-2-17 2:22:16
How do you declare a struct in C# with a fixed sized array of another struct ? I need this declared so that it works. Or is my approach wrong if I want the bitmapinfo (-header) created ?[StructLayout(LayoutKind.Sequential)] public struct RGBQUAD {public byte b;public byte g;public byte r;public byte reserved; }[StructLayout(LayoutKind.Sequential)] public struct BITMAPINFO {public BITMAPINFOHEADER bmiHeader;[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.LPStruct, SizeConst = 1)
ashwnacharya
c# .net winapi microsoft 2014-2-17 2:18:37
What is the difference between typical Windows (WIn32? COM? Not sure what they are called.) DLLs and the DLLs that are compiled using .NET?I know they are different, but I do not know the inner workings in detail.I would love to know what the exact difference is.EDIT: Trying to add more of my doubts here:Why is it that I cannot add a reference to a Win32 DLL like I would add a reference for a .NET DLL? Also, why do we have to do a PInvoke? How do we have reflection and intellisense for .NET DLLs
Andrei
c# windows linux mono 2014-2-17 2:11:58
In what measure is developing with mono cross-platform? How do I compile for Windows (in Linux), how do I run things in Linux (because there is no .NET JIT compiler)?So what are the particularities of developing with Mono? What are the advantages over developing with Visual Studio (except cross-platform thinghie)?
user689851
c# 2014-2-17 2:09:51
i have an array of structs and i need to get the size of it in bytes in C++ i can make it using sizeof()but i need it C#thnx
ZoomIn
c# polymorphism override 2014-2-17 2:01:30
I am trying understand the need of override and virtual in C#,so I wrote the following code:using System; namespace Override {class Base {public virtual void method() {Console.WriteLine(“Base method”);}}class Derived : Base {public override void method(){Console.WriteLine(“Derived method”);}}class Program{static void Main(string[] args){Derived d = new Derived();d.method();}} }And I was expecting “Derived method” to be called and printed.Then I wrote the following code without using virtual/over
Jarvis
c# .net reflection assemblies runtime 2014-2-17 1:57:15
I’m working with a lot of 3rd party assemblies that are installed by default with the SDKs. When using Reflection however, .NET crashes with the following error “Could not load file or assembly [Name.dll]”. So I’ve found there are 3 solutions:Turn “local copy” On, which forces the compiler to copy all assemblies to the build folder (dramatically increasing the filesize) Compile directly into the 3rd party Program Files folder, letting the .NET runtime easily find the assemblies (since they’re in
teresko
jquery ajax asp.net-mvc 2014-2-17 0:46:36
I have the below code which runs when an option in the drop down list is changed:function ddlSqlList_onchange(listItemId) {$.get(‘/SqlReportList/SqlQuery’, { “listItemId”: listItemId },function (data) { alert(‘succeeded’); $(‘#tbSqlQuery’).text(data); });}”SqlReportList” is my Controller, SqlQuery is an Action and listItemId is an input parameter for that action.public string SqlQuery(string listItemId){ // code here }It works locally fine but when deployed unto our dev server, it doesn’
BenAlabaster
jquery jquery-selectors 2014-2-16 21:03:23
I’m tying to select images based on their URLs, but for some reason it’s not playing ball:Ultimately I’m after something like:var imgs = $(“img[@src=’images/object.png’]:not(:hidden)”);But even with something simple like:$(“img[@src=’images/object.png’]”);This error is thrown: “TypeError: Object doesn’t support this property or method”.If I omit the @ from the query:$(“img[src=’images/object.png’]”);I get no items returned. I’ve copied and pasted the path directly from the generated html at run
Robert Harvey
javascript jquery javascript-events firefox-addon javascript-debugger 2014-2-16 20:35:16
I’m trying to debug a webpage that makes heavy use of JavaScript events, and so I need to monitor all JavaScript events that are fired.Most of the events are bound using jQuery. Hence, it would be particularly useful if there was a way to specifically monitor only those events.
Aaron
jquery html table 2014-2-16 19:31:35
I have a table with rows basically like this.Normal Row Normal Row Normal Row Summary Row Normal Row Summary Row Normal Row Normal Row Summary RowSo basically X “normal rows”, which will always be followed by a “summary row”. The summary rows display aggregates of the data in the normal rows. I calculate the aggregates at runtime, hence the “summary rows” are naturally placed AFTER the normal rows that they aggregate.All I need to do, is move each “summary row”, above the clump of “normal rows”
afuzzyllama
jquery dojo widget on-the-fly 2014-2-16 16:43:36
I recently experimented with Dojo and figured that given a single dom node in the markup, I can construct the whole UI tree in an object oriented manner i.e., programmatically and not having to worry about escaping ids and making code like data. My question is in JQuery, is the same possible. My markup has a single root div and everything else needs to be added in response to some program event. I am hearing a lot of good things about JQuery and wondered if this was possible I could switch. Coul
Hailwood
javascript jquery dom dom-manipulation 2014-2-16 12:42:06
I know that doing multiple dom manipulations is bad as it forces multiple repaints.I.e:$(‘body’).append(‘<div />’).append(‘<div />’).append(‘<div />’).append(‘<div />’);Instead a better practise is apparently:$(‘body’).append(‘<div><div></div><div></div><div></div><div></div></div>’);but I am curious about virtual manipulationI.e:$(‘<div />’).append(‘<div />’).append(‘<div />’).append(‘<div /
NeilGhosh
jquery mobile tabs active 2014-2-16 7:23:48
I have a doubt in jquery mobile. I have set up a navigation bar. But I don’t how to keep it highlighted on selecting a particular tab. I am aware of the class ui-btn-active but don’t know how to apply it into the tab selected. Someone out there please provide a solution?
pbaris
javascript jquery html snowflake 2014-2-15 11:56:41
Here is the code that i tried for snow flakes. Everything seems ok but once the certain period of time that script get unresponsive means (It slow down the browser firefox). I am not sure why this should happen. How can i make it as responsive without cause anything to browser. Here is FIDDLEHow can i make it responsive script which doesn’t cause any.! I think I made a mistake in looping the javascript function 🙁 Any Suggestion Would Be great.ThanksJavascript:// window.setInterval(generateSno
Hooked
jquery html5 svg raphael 2014-2-15 9:41:27
I’m wanting to animate the cursive text below, from left to right.An example of want i’m trying to acheive can be found on the slaveryfootprint.org site. Select an electronic item in the link below, and watch the cables animate; http://slaveryfootprint.org/survey/#gadgetsI’m unfamiliar with SVG and SVG libraries like Raphaël js, so i’m not sure where to start. I’ve googled around, but not found a tutorial.EDIT: Find the first tag below, saved from illustrator, depicting the d first character:&
chobo2
jquery silverlight flash html5 plupload 2014-2-15 6:04:39
I am using plupload (v 1.4.3.2) and set it up a few weeks ago and everything worked. I have not touched it since then.Now it does not work. The file gets to 100% then I get this great descriptive errorIO error. Error #2038var renderImportForm = $(selectors.uploader).livequery(function (){var uploader = $(this).plupload({// General settingsruntimes: ‘html5,silverlight,flash’,url: urls.importCalendarsURL,max_file_size: ‘5mb’,max_file_count: 10, // user can add no more then 10 files at a timeunique
teresko
jquery ajax asp.net-mvc 2014-2-17 0:46:36
I have the below code which runs when an option in the drop down list is changed:function ddlSqlList_onchange(listItemId) {$.get(‘/SqlReportList/SqlQuery’, { “listItemId”: listItemId },function (data) { alert(‘succeeded’); $(‘#tbSqlQuery’).text(data); });}”SqlReportList” is my Controller, SqlQuery is an Action and listItemId is an input parameter for that action.public string SqlQuery(string listItemId){ // code here }It works locally fine but when deployed unto our dev server, it doesn’
DanScan
.net asp.net-mvc razor nuget dotnetopenauth 2014-2-17 0:27:33
My local version of my code runs just fine. But when I do a web deploy I am getting the following exception:Could not load file or assembly ‘System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)The relevant stack trace line is[FileLoadException: Could not load file or assembly ‘System.Web.WebPages.Razor, Version
Paul Mendoza
asp.net-mvc asp.net-mvc-3 2014-2-17 0:22:13
I have an ASP.NET MVC 3 website and I’m looking for a way to package up a set of views and controllers into an external DLL and hopefully use MEF (Dependency Injection) to load the correct controllers and views.Does anyone know if something like this is possible and any good links to tutorials on the subject?
user1477388
asp.net-mvc vb.net asp.net-mvc-3 2014-2-16 23:21:01
I have the following code which works:ViewBag.Resources = New SelectList(db1.Tbl_Resources, “Resource_ID”, “Resource_FirstName”)I want to not only show the first name, but also the last name so I tried this:ViewBag.Resources = New SelectList(db1.Tbl_Resources, “Resource_ID”, “Resource_FirstName” + ” ” + “Resource_LastName”)However, it didn’t work because it seems to look for a model property called “Resource_FirstNameResource_LastName.” How can I concatenate these for use in the SelectList() me
Stephen Cleary
asp.net-mvc azure wif 2014-2-16 22:19:14
I’ve got the WIF tools for VS2012RC, and I’m trying to get my ASP.NET MVC 4 project to use them. I’ve installed the NuGet package for Microsoft.IdentityModel.dll.The MVC project is part of an Azure project, but I have the MVC project selected for startup right now.Currently, I have the “Local Development Test STS” selected (with the default settings). When I execute the following code (in my HomeController Index view):<p>Authenticated: @User.Identity.IsAuthenticated</p> <p>Name
Ashok Padmanabhan
asp.net-mvc stringbuilder mvchtmlstring 2014-2-16 20:14:44
Is there an equivalent method to MvcHtmlString in .Net 3.5 and lower? I have googled and have not found an answer. I created a helper for MVC 3/.NET 4 that uses MvcHtmlString. However it only runs on .NET 4. I want to code a version of the helper so it can run on Mvc 2/.net 3.5 so i can use the helper on another project which uses this runtime. Would i just use stringbuilder and return Stringbuilder.ToString?
Pure.Krome
asp.net-mvc autoeventwireup 2014-2-16 15:25:43
when i create an aspx page, the header includes something like this:-<%@ PageLanguage=”C#” MasterPageFile=”~/Views/Shared/Site.Master” AutoEventWireup=”true” CodeBehind=”Create.aspx.cs” Inherits=”My.Mvc.Views.Blah” %>With ASP.NET MVC apps, do we:need to include this AutoEventWireUp attribute? What happens if we set this to false? what does this attribute really do? is it valid for ASP.NET MVC?thanks heaps folks!
lejon
asp.net-mvc asp.net-mvc-3 2014-2-16 14:59:14
I want a partial view that display some stuff from a website that is not under my control. The data on the website is only available through HTML, and thus I can only retrieve it by querying the web site and parsing the HTML. (The website holds a list of 50 elements, and I only want the top 10.) Now, the data from the website is not changing very frequently, so I imagine that I can retrieve the HTML on an hourly basis, and displaying a cached version on my web site.How can I accomplish this in A
Soner Gönül
c# asp.net-mvc nuget-package ormlite-servicestack 2014-2-16 14:53:20
I’m getting this error after update with NuGet from v3.9.53:”Could not load file or assembly ‘ServiceStack.Text, Version=3.9.60.0, Culture=neutral, PublicKeyToken=null’ or one of itsdependencies. The system cannot find the filespecified.”:”ServiceStack.Text, Version=3.9.60.0, Culture=neutral,PublicKeyToken=null”The thing is, the NuGet Package installed the v3.9.63.0, I’ve never installed the 3.9.60 version before.What I’ve already done:Remove the Packages and Delete the Bin files, then re-instal
Kaleb Pederson
asp.net-mvc iis-6 wix 2014-2-16 14:44:55
Here’s some considerations when installing onto IIS-6:Needs to register ASP.NET 4 (likely using aspnet_regiis.exe) Needs to allow for both ASP.NET v2 and v4 Needs to register aspnet_isapi.dll with support for wildcard mappingAnd here’s what I have so far:<iis:WebDirProperties Id=’WebDirProperties’ Script=’yes’ Read=’yesExecute=’no’ WindowsAuthentication=’yes’ AnonymousAccess=’no’ AuthenticationProviders=’NTLM,Negotiate’ /><!– SO has some good posts on selecting the website from a dropd
ElHaix
iis-7 configuration signalr 2014-2-16 16:07:39
I have a SignalR application running in production, where the enter code here Requests Current value exceeded 5000, rendering a 503 Service Unavailable error. So I updated the Aspnet.config with the following to increase the Requests Current value<?xml version=”1.0″ encoding=”UTF-8″ ?> <configuration><system.web><applicationPool maxConcurrentRequestsPerCPU=”20000″ maxConcurrentThreadsPerCPU=”20000″ requestQueueLimit=”20000″ /></system.web><runtime><legacyU
Sant14
asp.net visual-studio-2012 signalr 2014-2-11 22:09:28
I am trying to create a chat application but after successful build of the web app its catching an exception when i am passing the paramaters for chat.The exception is0x800a139e – JavaScript runtime error: SignalR: Connection must bestarted before data can be sent. Call .start() before .send()The screen shots are attached here
Tuomas Hietanen
silverlight signalr silverlight-5.0 signalr-hub 2014-2-9 16:56:25
var connection = new HubConnection(hostAddress){CookieContainer = new CookieContainer()};cookieContainer.Add(…);After updating SignalR 1.1.3 -> SignalR 2.x.x, it seems that the HubConnection class property CookieContainer doesn’t work anymore. (Tested: Microsoft.AspNet.SignalR.Client, Silverlight -version)You can add new CookieContainer and cookies as usual, but then in the runtime when you try to start the connection it just gives “this property is not implemented by this class”-exception.So
jimmy_terra
signalr 2014-2-5 21:41:51
Is there any way to do something like this in SignalR:public void CallClientMethod(string methodName, MyObject data) {var ctx = GlobalHost.ConnectionManager.GetHubContext<MyHub>();ctx.Clients.All.methodName(data);// or alternativelyctx.Clients.All.CallClientMethod(methodName, data); }The above example illustrates the intent, rather than the actual mechanism – I want to determine the method to call at runtime, rather than compile time.
Adam
c# dynamic signalr 2014-2-3 17:07:43
This question already has an answer here:Calling a function from a string in C#7 answersI was wondering if it was possible to call a function on a dynamic c# object via a string. I want to do something like this:string lMethodName = “MethodName”; dynamic lDynamicObject = GetDynamicObject(); lDynamicObject.Invoke(lMethodName, lParameters);Any thoughts or solutions would be greatly appreciated.Maybe like Servy said there’s a better way to achieve what we want through a different design. We’re usin
neo112
c# asp.net .net signalr owin 2014-1-31 1:42:36
I’m trying to get SignalR working in an MVC5 project with individual accounts. The MVC project has by default Owin 2.0.0 and all of the Owin.* components are also 2.0.0.So I used NuGet to get all the SignalR packages, it automatically resolved dependancies and downloaded v 2.0.2. The project throws an error on startup with the following message: Could not load file or assembly ‘Microsoft.Owin, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’I also tried upgrading Owin to 2
brian
signalr signalr-hub signalr.client frp 2014-1-29 10:46:10
In Signalr, is there any support for having events instead of callbacks.Let me explain before you grab your pitchforks.In following with the first example here Clients.All.addContosoChatMessageToPage(name, message);Wouldn’t call a hub proxy’s addContosoChatMessageToPage(name, message), but would dispatch a addContosoChatMessageToPage event with some extra information. (not asking that it be the same api call exactly)The reason I’m asking all of this is because This works much better alongside fu
CurlyFro
c# signalr 2014-1-26 1:33:39
my datatranshub is undefined. i’m thinking because i’m using mvc areas and my hub class sits in the area that the hub methods are not exposed correctly. do i need to manually point my hub proxy?var datatransfer = $.connection.DataTransferHub; console.log(datatransfer); $.connection.hub.start();
Phil Barresi
signalr 2014-1-21 6:52:50
I was following the SignalR documentation on Github to message a group. I join just fine with:Groups.Add(Context.ConnectionId, “foo”);But then when I try and send a message to all the users in that group with:Clients.Group(“foo”).syncShortList(id);I get an exception. I know there’s nothing wrong with ‘id’. The code will never continue after this line, so I set the debugger to catch all thrown exceptions, and found out that the second line throws the exception: ‘Microsoft.AspNet.SignalR.Hubs.Grou
Dofs
asp.net signalr 2014-1-14 17:57:24
I am trying to set SignalR up, but I keep getting the following error when adding a message:”Cannot perform runtime binding on a null reference”My ClientSide code looks like this:commentHub.addMessage = function (message) {$(‘#divMessages’).append(message); };And my serverside code looks like this:public void Send(string message) {Clients.addMessage(message); }I first open one window where the client side code is at, and then I open a new page which invokes the Send method from codebehind. To te