Search Results

Search found 1104 results on 45 pages for 'jon schneider'.

Page 10/45 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Assembly reference from ASP.NET App_Code directory

    - by Gerald Schneider
    I have trouble getting a custom ObjectDataSource for an asp:ListView control to work. I have the class for the DataSource in the App_Code directory of the web application (as required by the asp:ListView control). using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Data; using System.Data.Common; using System.Web; using System.DirectoryServices; [DataObject] public class UsersDAL { [DataObjectMethod(DataObjectMethodType.Select)] public List<User> LoadAll(int startIndex, int maxRows, string sortedBy) { List<User> users = new List<User>(); DirectoryEntry entry; return users; } } As soon as I add using System.DirectoryServices; the page crashes with this message: Compiler Error Message: CS0234: The type or namespace name 'DirectoryServices' does not exist in the namespace 'System' (are you missing an assembly reference?) Without the usage of System.DirectoryServices the page loads without problems. The reference is there, it is working in classes outside the App_Code directory.

    Read the article

  • Modelling problem - Networked devices with commands

    - by Schneider
    I encountered a head scratching modelling problem today: We are modelling a physical control system composed of Devices and NetworkDevices. Any example of a Device is a TV. An example of a NetworkDevice is an IR transceiver with Ethernet connection. As you can see, to be able to control the TV over the internet we must connect the Device to the NetworkDevice. There is a one to many relationship between Device and NetworkDevice i.e. TV only has one NetworkDevice (the IR transceiver), but the IR transceiver may control many Devices (e.g. many TVs). So far no problem. The complicated bit is that every Device has a collection of Commands. The type of the Command (e.g IrCommand, SerialCommand - N.B. not currently modelled) depends on the type of NetworkDevice that the Device is connected to. In the current legacy system the Device has a collection of generic Commands (no typing) where fields are "interpreted" depending on the NetworkDevice type. How do I go about modelling this in OOP such that: You can only ever add a Command of the appropriate type, given the NetworkDevice the Device is attached to? If I change the NetworkDevice the Commands collection changes to the appropriate type Make it so the API is simple/elegant/intuitive to use

    Read the article

  • Bi-directional view model syncing with "live" collections and properties (MVVM)

    - by Schneider
    I am getting my knickers in a twist recently about View Models (VM). Just like this guy I have come to the conclusion that the collections I need to expose on my VM typically contain a different type to the collections exposed on my business objects. Hence there must be a bi-directional mapping or transformation between these two types. (Just to complicate things, on my project this data is "Live" such that as soon as you change a property it gets transmitted to other computers) I can just about cope with that concept, using a framework like Truss, although I suspect there will be a nasty surprise somewhere within. Not only must objects be transformed but a synchronization between these two collections is required. (Just to complicate things I can think of cases where the VM collection might be a subset or union of business object collections, not simply a 1:1 synchronization). I can see how to do a one-way "live" sync, using a replicating ObservableCollection or something like CLINQ. The problem then becomes: What is the best way to create/delete items? Bi-directinal sync does not seem to be on the cards - I have found no such examples, and the only class that supports anything remotely like that is the ListCollectionView. Would bi-directional sync even be a sensible way to add back into the business object collection? All the samples I have seen never seem to tackle anything this "complex". So my question is: How do you solve this? Is there some technique to update the model collections from the VM? What is the best general approach to this?

    Read the article

  • Compilers behave differently with a null parameter of a generic method

    - by Eyal Schneider
    The following code compiles perfectly with Eclipse, but fails to compile with javac: public class HowBizarre { public static <P extends Number, T extends P> void doIt(P value) { } public static void main(String[] args) { doIt(null); } } I simplified the code, so T is not used at all now. Still, I don't see a reason for the error. For some reason javac decides that T stands for Object, and then complains that Object does not conform to the bounds of T (which is true): HowBizarre.java:6: incompatible types; inferred type argument(s) java.lang.Number,java.lang.Object do not conform to bounds of type variable (s) P,T found : <P,T>void required: void doIt(null); ^ Note that if I replace the null parameter with a non-null value, it compiles fine. Which of the compilers behaves correctly and why? Is this a bug of one of them?

    Read the article

  • Reordering methods in ComImport interfaces throws COMException (0x80041001)

    - by Ohad Schneider
    Consider the following code for COM interop with internet shortcuts: [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("CABB0DA0-DA57-11CF-9974-0020AFD79762")] public interface IUniformResourceLocatorW { void SetUrl([MarshalAs(UnmanagedType.LPWStr)] string pcszUrl, int dwInFlags); void GetUrl([MarshalAs(UnmanagedType.LPWStr)] out StringBuilder ppszUrl); void InvokeCommand(IntPtr purlici); } [ComImport] [Guid("FBF23B40-E3F0-101B-8488-00AA003E56F8")] public class InternetShortcut { } The following works as expected: var ishort = new InternetShortcut(); ((IPersistFile)ishort).Load("MyLink.url", 0); ((IUniformResourceLocatorW)ishort).GetUrl(out url); However: If I comment out IUniformResourceLocatorW.SetUrl (which I am not using), IUniformResourceLocatorW.GetUrl throws a COMException (HResult 0x80041001). If I switch between IUniformResourceLocatorW.SetUrl and IUniformResourceLocatorW.GetUrl (that is place the former below the latter) the same exception is thrown If I comment out IUniformResourceLocatorW.InvokeCommand the code runs fine. It's as if the order has to be preserved "up to" the invoked method. Is this behavior by design? documented somewhere? I'm asking because some COM interfaces are composed of many methods with possibly many supporting types and I'd rather avoid defining what I don't need if possible.

    Read the article

  • Possible to use Tables of same type in Linq to SQL?

    - by Schneider
    Lets say I've got an object model, where I have many collections of the same type. For example something like class StockMarketData { List<SummaryData> WeeklySummary; List<SummaryData> MonthlySummary; } class SummaryData { DateTime DateTime {get; set;} double Value {get; set;} } Those lists will map onto database tables. If you actually use L2S to generate a model from the database you will get something like: class StockMarketData { List<WeeklySummaryData> WeeklySummary; List<MonthlySummaryData> MonthlySummary; } Even though WeeklySummaryData and MonthlySummaryData have the same shape. Is it possible for Linq to SQL to create tables from a database of summary data, but get each table to contain the same type (such as shown in the top example).

    Read the article

  • Set Hudson build number from a script

    - by Joe Schneider
    Is there a way to set the next build number in Hudson from a script? I have the nextBuildNumber plug-in installed, and attempted to use wget with --post-data, but that page appears to require login. I have two steps of a chained build and I want to keep the build numbers in sync.

    Read the article

  • How to check WCF generated client is compatible with service at runtime

    - by Schneider
    I realise that WCF and services in general are meant to be loosely coupled. But I have a requirement that my client app can check whether an given WCF endpoint contains a service that matches its generated client code. In other words I need to check for a compatible service. Obviously I could have a method that returns a manually maintained version number, but I would prefer not to have to write my own meta data system if WCF can do something out of the box.

    Read the article

  • Javascript document.open asynchronous?

    - by Alex Schneider
    So on my site there is a Javascript function that will load a new site from the server via XMLHttpRequest. After that it replaces the current page with the new one: var post = new XMLHttpRequest(); post.open('POST', data); post.onload = function() { var do = document.open("text/html", "replace"); do.write(post.responseText); do.close(); goOn(); } function goOn() { console.log($('img:visible')); } Some could assume that after do.close() the document has changed and is ready. But it is not, e.g. if i load very much/big data/responseText the function goOn() only logs an empty result. Obviously goOn() gets in that case called before the DOM is ready to be read! Unfortunately the is no "ready" event fired after write() finished.... How can i be sure it is finished? /EDIT: goOn() logs this to Chrome Console: [prevObject: p.fn.p.init[1], context: #document, selector: "img:visible"] context: #document length: 0 prevObject: p.fn.p.init[1] selector: "img:visible" __proto__: Object[0] But if i right after that type $('img:visible') into console manually it shows me all images....

    Read the article

  • Why aren't variables declared in "try" in scope in "catch" or "finally"?

    - by Jon Schneider
    In C# and in Java (and possibly other languages as well), variables declared in a "try" block are not in scope in the corresponding "catch" or "finally" blocks. For example, the following code does not compile: try { String s = "test"; // (more code...) } catch { Console.Out.WriteLine(s); //Java fans: think "System.out.println" here instead } In this code, a compile-time error occurs on the reference to s in the catch block, because s is only in scope in the try block. (In Java, the compile error is "s cannot be resolved"; in C#, it's "The name 's' does not exist in the current context".) The general solution to this issue seems to be to instead declare variables just before the try block, instead of within the try block: String s; try { s = "test"; // (more code...) } catch { Console.Out.WriteLine(s); //Java fans: think "System.out.println" here instead } However, at least to me, (1) this feels like a clunky solution, and (2) it results in the variables having a larger scope than the programmer intended (the entire remainder of the method, instead of only in the context of the try-catch-finally). My question is, what were/are the rationale(s) behind this language design decision (in Java, in C#, and/or in any other applicable languages)?

    Read the article

  • What is the right way to pass class parameters to a method

    - by Schneider
    Let's suppose I have three classes A, B and C public class A { public int A1; public string A2; } public class B { public char B1; public double B2; public decimal B3; } public class C { public string DoSomething(A a, B b) { var a1 = a.A1; var b2 = b.B2; var b3 = b.B3; // DoSomething return string.Empty; } } If DoSomething() is using just some fields of the A and B classes, do you prefer to pass the whole object in parameters or create an intermediate class that has just the needed fields by the DoSomething method ?

    Read the article

  • Possible to use Bindings only for the SourceChanged event?

    - by Schneider
    Basically I want to use the WPF Binding framework to "observe" a property in the data context, and when that value changes to call an event handler. I do not actually want to bind it to any target. Sounds simple but from what I can see Binding is too coupled (to the visual tree and various other bits) to be able to use it flexibly. Any thoughts?

    Read the article

  • Elegant way to debug n-tier from Visual Studio

    - by Schneider
    Just wondering if there is any easy way to start a debugging session that lauches the server and the client by simply pressing F5. As it stands I have to F5 to debug the server, then find the client project and right click-Debug, which is a bit fiddly. Any tips to get this to work more smoothly?

    Read the article

  • ASP.NET mvcConf Videos Available

    - by ScottGu
    Earlier this month the ASP.NET MVC developer community held the 2nd annual mvcConf event.  This was a free, online conference focused on ASP.NET MVC – with more than 27 talks that covered a wide variety of ASP.NET MVC topics.  Almost all of the talks were presented by developers within the community, and the quality and topic diversity of the talks was fantastic. Below are links to free recordings of the talks that you can watch (and optionally download): Scott Guthrie Keynote The NuGet-y Goodness of Delivering Packages (Phil Haack) Industrial Strenght NuGet (Andy Wahrenberger) Intro to MVC 3 (John Petersen) Advanced MVC 3 (Brad Wilson) Evolving Practices in Using jQuery and Ajax in ASP.NET MVC Applications (Eric Sowell) Web Matrix (Rob Conery) Improving ASP.NET MVC Application Performance (Steven Smith) Intro to Building Twilio Apps with ASP.NET MVC (John Sheehan) The Big Comparison of ASP.NET MVC View Engines (Shay Friedman) Writing BDD-style Tests for ASP.NET MVC using MSTestContrib (Mitch Denny) BDD in ASP.NET MVC using SpecFlow, WatiN and WatiN Test Helpers (Brandon Satrom) Going Postal - Generating email with View Engines (Andrew Davey) Take some REST with WCF (Glenn Block) MVC Q&A (Jeffrey Palermo) Deploy ASP.NET MVC with No Effort (Troels Thomsen) IIS Express (Vaidy Gopalakrishnan) Putting the V in MVC (Chris Bannon) CQRS and Event Sourcing with MVC 3 (Ashic Mahtab) MVC 3 Extensibility (Roberto Hernandez) MvcScaffolding (Steve Sanderson) Real World Application Development with Mvc3 NHibernate, FluentNHibernate and Castle Windsor (Chris Canal) Building composite web applications with Open frameworks (Sebastien Lambla) Quality Driven Web Acceptance Testing (Amir Barylko) ModelBinding derived types using the DerivedTypeModelBinder in MvcContrib (Steve Hebert) Entity Framework "Code First": Domain Driven CRUD (Chris Zavaleta) Wrap Up with Jon Galloway & Javier Lozano I’d like to say a huge thank you to all of the speakers who presented, and to Javier Lozano, Eric Hexter and Jon Galloway for all their hard work in organizing the event and making it happen. Hope this helps, Scott P.S. I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

    Read the article

  • Are You Using Windows Live Mesh?

    - by Ben Griswold
    Most of the time, I’m the guy who authors the show notes for the Herding Code Podcast.  The workflow is relatively straight-forward: Jon shares the pre-production audio with me, I compete my write up and then ship the notes back to Jon for publishing with the edited audio.  All file sharing is all done with shared folders in the Windows Live Mesh. The director of my kid’s preschool was looking for a way to access her work computer from her home office.  VPN connection?  Remote desktop?  FTP?  Nope. I installed Windows Live Mesh in a matter of minutes, synchronized a number of folders and she was off and running.  (The neat thing is she’s running a PC in the office and a Mac at home.) I was using Dropbox before discovering Mesh. Dropbox is still very cool but I’m in and out of Mesh enough that it’s taken over.  Actually I still have a Dropbox folder – it’s just being synched by Mesh now. If you’re interested in giving Live Mesh a whirl, here’ are the notable links as found on the product’s site: What you need Create your mesh Sync folders Share folders Use your Live Desktop Connect to a remote computer Use a mobile phone Good luck!

    Read the article

  • So, whats the best book on C#?

    - by mbcrump
    I see this question several times a day from newbie’s to professionals. I have listed the best C# books that I have read so far.   ECMA-334 C# Language Specification. – FREE book. This is probably the best place to start. Read it backwards and forwards and you can even request a hard copy. Absolute Beginners Guide to C Sharp 2nd Edition – Used this early on and found it very useful even if its game programming. C-Sharp 2.0 - The Complete Reference, 2nd Edition (McGraw-Hill, 2006) – One of the most useful books that is always with me. It contains short example code and is very well written. Dot Net Zero - Charles Petzold  - FREE book and you should definately give it a read. C Sharp in Depth by Jon Skeet -  Probably one of the most in depth books on C Sharp and definitely not for beginners. Jon Skeet knows C# like no other. I would consider this book the Bible of C#. If you understand 50% of this book, you have a good understanding of the language.  CLR via C Sharp 3rd Edition – I just started reading this book and it is another book thats not for beginners. If you really want to understand the CLR then give this book a try. Well, thats it. I hope you enjoy the books as I have spent a lot of time researching different C# books.

    Read the article

  • php form validation with javascript

    - by Jon Hanson
    hi guys i need help trying to figure out why the alert box doesnt show up when i run this. im also new at programming. html i due just fine. im currently taking a php class, and the teacher thought it would be fun to have us create a form and validate it. my problem is i am trying to call the function which then would validate it. My problem is its not calling it, and i cant quite figure out why. please help? jons viladating <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <link rel="stylesheet" href="decor.css" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>jons viladating</title> <script type="text/javascript"> <!-- <![CDATA[ function showjonsForm() { var errors = ""; // check for any empty strings if (document.forms[0].fname.value == "") errors += "fname\n"; if (document.forms[0].lname.value == "") errors += "lName\n"; if (document.forms[0].addrs1.value == "") errors += "Address\n"; if (document.forms[0].city.value == "") errors += "City\n"; if (document.forms[0].state.value == "") errors += "State\n"; if (document.forms[0].zip.value == "") errors += "Zip\n"; if (document.forms[0].phone.value == "") errors += "Phone\n"; if (document.forms[0].email.value == "") errors += "Email\n"; if (document.forms[0].pw2.value == "") errors += "Confirm password\n"; if (document.forms[0].dob.value == "") errors += "Date of birth\n"; if (document.forms[0].sex.value == "") errors += "sex\n"; // don't need to check checkboxes if (errors != "") { //something was wrong})) alert ("Please fix these errors\n" + errors) ; return false; } var stringx; stringx = "fName:" + document.forms(0).fname.value; stringx = "lName:" + document.forms(0).lname.value; stringx += "\nAddress: " + document.forms(0).addrs1.value; stringx += "\nCity: " + document.forms(0).city.value; stringx += " \nState: " + document.forms(0).state.value; stringx += " Zip: "+ document.forms(0).zip.value; stringx += "\nPhone: " + document.forms(0).phone.value; stringx += "\nE-mail:" + document.forms(0).email.value; stringx += "\nConfirm password " + document.forms(0).pw2.value; stringx += "\nDate of birth: " + document.forms(0).dob.value; stringx += "\nSex: " + document.forms(0).sex.value; alert(stringx); return false //set to false to not submit } // ]]> --> </script> <h1>jons validations test</h1> </head> <body> <div id="rightcolumn"> <img src="hula.gif" align="right"/> </div> <text align="left"> <form name="jon" action="formoutput.php" onsubmit="return showjonsForm()" Method="post"> <fieldset style="width:250px"> <label> first name</label> <input type="text" name="fname" size="15" maxlength="22" onBlur="checkRequired( this,'fname')"/><br /> <label>last name</label> <input type="text" name="lname" size="10" maxlength="22"> <br /> </fieldset> <fieldset style="width:250px"> <label>address</label> <input type="text" name="adrs1" size="10" maxlength="30"><br /> <span class="msg_container" id="adrs2"></span><br /> <label>city</label> <input type="text" name="city" size="10" maxlength="15"><br /> <span class="msg_container" id="city"></span><br /> <label>state</label> <input type="text" name="state" size="10" maxlength="2"><br /> <span class="msg_container" id="state"></span><br /> <label>zip</label> <input type="text" name="zip" size="10" maxlength="5"><br /> </fieldset> <fieldset style="width:250px"> <label>phone</label> <input type="text" name="phone" size="10" maxlength="10"><br /> <div>please input phone number in this format 1234567892 thank you </div> <label>email</label> <input type="text" name="email" size="10" maxlength="22"><br /> <div> password must have 1 number upper case and minimum of 6 charcters</div> <label>password</label> <input type="text" name="pw2" size="10" maxlength="12"><br /> <label>select gender type</label> <select name="sex" size="1" <br /> <option>male</option> <option>female</option> <option>timelord</option> </select> <label>date of birth</label> <input type="text name="dob" size="8" maxlength="8"/> <div> would you like to know know more</div> <label> yes</label> <input type="checkbox" checked="checked" name="check" /> </fieldset> <input type="submit"/></form> </form> <div id="footer"> <img src="laps2.jpg"> <img src="orange.jpg"><img src="ok.jpg"> </div> </body> </html>

    Read the article

  • Windows Server 2008 R2 Accessing NFS share without AD or NIS

    - by Jon Rhoades
    I'm trying to mount an NFS share on our NetApp SAN on Windows 2008 R2. Using XP I have no problem mounting this share without a username/NIS/pswd file etc, but the new functionality in 2008 seems to insist on either using AD or an NIS server (to "streamline" Services for NFS MS removed user account mapping) see Technet. When I go to map the share using "map network drive" no combination of "root", no username, no password, my username works. Using the command line mount -o anon \\172... :n or mount -o -u:root \\172... :n either gives me a network error 53 or 67 error Is it possible with 2008 to mount an NFS share without AD or NIS? If so what am I doing wrong? (Security is taken care off by IP address permissions and VLANs)

    Read the article

  • Linux Server Performance Monitoring

    - by Jon
    I'm looking to monitor performance on my Linux servers (which happen to be Centos). What are the best tools for monitoring things in realtime such as: Disk Performance I/O, swapping etc.. CPU Performance Looking for low level tools, rather than web based tools such as Nagios, Ganglia etc... n.b. I'd like to know exactly what each tool does rather than just having a list of random toolnames if possible please. Why the tool is a better option than others would be good also.

    Read the article

  • Most useful AutoHotkey scripts?

    - by Jon Erickson
    What AutoHotkey scripts have you found that proved to be extremely useful? I'll share one that I am using for multiple monitors. Windows + Right: Move window from the left monitor to the right monitor #right:: WinGet, mm, MinMax, A WinRestore, A WinGetPos, X, Y,,,A WinMove, A,, X+A_ScreenWidth, Y if(mm = 1){ WinMaximize, A } return Windows + Left: Move window from the right monitor to the left monitor #left:: WinGet, mm, MinMax, A WinRestore, A WinGetPos, X, Y,,,A WinMove, A,, X-A_ScreenWidth, Y if(mm = 1){ WinMaximize, A } return

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >