Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

Leblanc Meneses 0

@Leblanc Meneses 0
About
Posts
29
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • PrincipalPermission
    L Leblanc Meneses 0

    I've been using PrincipalPermission for a while in wcf services. [PrincipalPermission(SecurityAction.Demand, Role = SecurityRoles.CanManageUsers)] although now i have a requirement to simplify roles by business unit. - currently aspnet_roles has fine grained can* permissions. Here is my approach and wanted to see if anyone can provide feedback, code review before i implement my suggestion. 1) aspnet_roles - business unit role 2) create permission table and Role_Permission table and User_Permission table (many to many) 3) create custom CodeAccessSecurityAttribute + that looks at new tables [CustomPermissionCheck(Security.Demand, HasPermission="can*")] first iteration i'll statically new the dependent repository.. ideally i would like an aop style attribute that has repository injected IPermissionRepository.HasPermission(...); If i approach new aop way i probably will stop inheriting from CodeAccessSecurityAttribute -- what do the security guys have to say about this? has anyone else solved this?

    WCF and WF code-review csharp asp-net wcf security

  • removing attributes out of interfaces??
    L Leblanc Meneses 0

    Hi i currently define: Model.Validation.IContactValidation public interface IContactValidation : IValidate<Contact> { ValidationResult ValidateMessage(String message); ValidationResult ValidateSubject(String subject); ValidationResult ValidateReplyEmail(String replyemail); ValidationResult ValidateName(String name); } I want to force the wcf service ModelValidation/ContactValidation/Method to implement and expose this interface. currently I want the publicly exposed wcf service to be json format. but internal network version of the service to be binary format. in some other cases with working with vendors the services need to support both json and xml format. so how can i keep this base interface clean and not have to stick concrete requirements in my interface? [WebInvoke( Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "ContactValidate/{message}")] ValidationResult ValidateMessage(string message); Seems currently i would need to manage this using msbuild and using preprocessor directives to achieve what i want. however shouldn't there be an easier way?

    WCF and WF question csharp visual-studio wcf sysadmin

  • group by [modified]
    L Leblanc Meneses 0

    I have a List<CapturedWord> CapturedWord -StartIndex -EndIndex -String I can do a group by StartIndex which gives me: startindexkey -- List<CapturedWord> startindexkey -- List<CapturedWord> startindexkey -- List<CapturedWord> var groups = (from w in words group w by w.StartIndex into g select new { StartIndex = g.Key, Words = g }).ToList(); SELECT * FROM CapturedWord AS c1 id StartIndex EndIndex Word ----------- ----------- ----------- 1 0 6 product 2 1 3 rod 4 3 6 duct 5 0 7 products 6 7 14 specific 7 11 12 if 8 15 16 at 9 15 23 attribute 10 15 24 attributes SELECT c1.StartIndex, COUNT(c1.StartIndex) as cnt FROM CapturedWord AS c1 GROUP BY c1.StartIndex StartIndex cnt ----------- ----------- 0 2 1 1 3 1 7 1 11 1 15 3 I would like instead a group by that provides these numbers and accumulated strings cnt ----------- 4 -- product, products, rod, duct 2 -- specific, if 3 -- at, attribute, attributes

    modified on Saturday, July 25, 2009 9:53 PM

    LINQ

  • getting started with ASP.NET development
    L Leblanc Meneses 0

    as much as people will point you towards asp.net mvc .. avoid it. I programmed in php using mvc style... and spent a lot of my time at sitepoint.com/forums even created master pages in php before i even knew about asp.net. after seeing the power of asp.net webforms at dev connections I quickly realized that in mvc i spent most of my time developing my own framework and less time on the actual application. asp.net webform framework is complete (managing state, name collisions, user controls, httphandlers, provider model) get a copy of: ASP.NET 3.5 Unleashed: Stephen Walther and read ch 30 and everything about custom controls. www.mixhacks.com is developed with primarily with templated custom controls. Also notice that all javascript is in header section. To handle clean url's I use apache proxy (enabled for www.robusthaven.com) you also have to replace the form tag action property to an empty string. By the way the actual asp.net project is a controller and my templated controls are the views which I bind my model to. (So there you have it.. an mvc approach which is testable without asp.net mvc.)

    The Lounge csharp html css asp-net com

  • wcf - good examples out in the wild?
    L Leblanc Meneses 0

    thanks

    WCF and WF csharp wcf question

  • wpf - nested binding expression?
    L Leblanc Meneses 0

    I have a menuitem inside GridViewColumn.HeaderTemplate that binds a CommandParameter=”{Binding RelativeSource={RelativeSource AncestorType=ContextMenu}, Path=PlacementTarget}” PlacementTarget puts me at a grid that forms the header datatemplate of my GridViewColumn. what would be the binding expression to continue this up to finally bind GridViewColumn to the commandparameter? I want to be able to walk up the dom using nested binding expression... anyone know how to do this?

    WPF wpf csharp html css wcf

  • wcf - good examples out in the wild?
    L Leblanc Meneses 0

    hey since some of you have been doing this for a while. can anyone provide links to the best articles, blogs that would be great for someone just starting out with wcf? i'm interested in turning my udpclient/tcpclient code into wcf to support other transport systems. -lm

    WCF and WF csharp wcf question

  • linq group by and custom aggregate
    L Leblanc Meneses 0

    By default, the elements in each grouping are untransformed input elements. I simply had to supply an element selector in the grouby. var grouped = from item in items orderby item.Group, item.Value group item.Value by item.Group into grp select new { Key = grp.Key, Concated = grp.Concat(",") };

    LINQ csharp linq question

  • linq group by and custom aggregate
    L Leblanc Meneses 0

    that is a solution but i rather make the linq query create an IEnumerable of strings this way i can reuse the concat aggregate on other custom objects. would you know what the linq query should change to?

    LINQ csharp linq question

  • linq group by and custom aggregate
    L Leblanc Meneses 0

    trying to create a group by string concat. here is what i have: public String Concat(IEnumerable source, String delimiter) { String s = String.Empty; foreach (String item in source) { s += item + delimiter; } return (s == String.Empty) ? String.Empty : s.Substring(0, s.Length - delimiter.Length); } public class CustomObject { public CustomObject() { } public String Group { get; set; } public String Value { get; set; } } List items = new List() { new CustomObject(){Group = "type1", Value="1"}, new CustomObject(){Group = "type1", Value="2"}, new CustomObject(){Group = "type1", Value="3"}, new CustomObject(){Group = "type1", Value="4"}, new CustomObject(){Group = "type1", Value="5"}, new CustomObject(){Group = "type2", Value="10"}, new CustomObject(){Group = "type2", Value="20"}, new CustomObject(){Group = "type2", Value="30"}, new CustomObject(){Group = "type2", Value="40"}, new CustomObject(){Group = "type2", Value="50"}, }; var grouped = from item in items orderby item.Group, item.Value group item by item.Group into grp select new { Category = grp.Key, DataValue = grp }; output results should be: type1 | 1,2,3,4,5 type2 | 10,20,30,40,50 anyone want to share how i do this.. thanks

    LINQ csharp linq question

  • linq accessing ui control values and sending results to backgroundworker [modified]
    L Leblanc Meneses 0

    I have a linq query accessing ui control values and sending results to backgroundworker. Here is the goal.

            // query accessing ui controls
            var crossjoin\_forumquestion = from businessid in new List<Int32>() { 1, 2, 3, 4, 5 } 
                                          from yearid in new List<Int32>() { }.DefaultIfEmpty() 
                                          select new { BusinessID = businessid, YearID = yearid };
    
            
            // background worker will use the results as follows and do bulk inserts in db
            crossjoin\_forumquestion.Count();
            foreach (var row in crossjoin\_forumquestion) { }
    

    if i'm going be sending data outside the scope of the function it needs to be typed so. i created CrossJoinResult class, modified var to IEnumerable<CrossJoinResult> crossjoin_forumquestion = and changed select new to select new CrossJoinResult. however it looks like dowork event is throwing exception that query is outside the ui thread. sounds like the linq query is lazy loading. I need it to be fetched before i send the IEnumerable off to my dowork. my current fix is:

            AsyncData threaddata = new AsyncData();
            threaddata.CrossJoinResult =  new List<CrossJoinResult>(crossjoin\_forumquestion);
    

    //one of the overloads of a list takes in IEnumerable which extracts the data out the linq query.
    //i would like the proper solution in telling linq to give me the result set now.

    thanks, -lm

    modified on Thursday, October 2, 2008 10:29 PM

    LINQ database csharp linq design help

  • linq cross join. if collection is empty still produce rows with that specific column null.
    L Leblanc Meneses 0

    that works .. thanks! i need to start reading a linq book.. looks very powerful for sure.

    LINQ csharp database linq help

  • linq cross join. if collection is empty still produce rows with that specific column null.
    L Leblanc Meneses 0

    need help with this query. // goal make cnt == 5; and row.YearID is null for every item var crossjoin_forumquestion = from businessid in new List<Int32>() { 1, 2, 3, 4, 5 } from yearid in new List<Int32>() { } select new { BusinessID = businessid, YearID = yearid }; Int32 cnt = 0; foreach (var row in crossjoin_forumquestion) { cnt++; } thanks, -lm

    LINQ csharp database linq help

  • gdi+ render viewport/camera perspective only
    L Leblanc Meneses 0

    done.. thanks

    C# winforms graphics performance question learning

  • gdi+ render viewport/camera perspective only
    L Leblanc Meneses 0

    anyone have links, magazine articles, book titles, or open source project references question 1: what are some algorithms available to simulate how ms word draws each page as i scroll through 1000+ page document. Assuming the whole document cannot be loaded+drawn in memory all at once. How does the buffering work? Realistically i'll be rendering a printed circuit board that might have many circles, rectangles using filled polygons. If the user zooms in, a given polygon might border the canvas and outside region. how would this partially on screen object be drawn? Should i send my canvas containing perspective+coordinate to all the objects and have the actual objects draw themselves to the canvas. Each shape will need to know how to partially render itself. are there any advanced articles in this subject? question 2: what are some algorithms for snapping to grid, when connecting components how auto route lines (shortest route + no overlapping.) thanks, -lm

    Graphics question css winforms graphics performance

  • gdi+ render viewport/camera perspective only
    L Leblanc Meneses 0

    anyone have links, magazine articles, book titles, or open source project references what are some algorithms available to simulate how ms word draws each page as i scroll through 1000+ page document. Assuming the whole document cannot be loaded+drawn in memory all at once. How does the buffering work? Suppose, I create an application that doesn't provide zoom in/out capabilities but i want to show a rectangle with a gradient for grass the size of a football field at a scale 1 to 1. thanks, -lm

    C# winforms graphics performance question learning

  • where to put the responsiblity + Scanner or Parser
    L Leblanc Meneses 0

    so how small should the scanner make the tokens? Example: i can create greedy tokens like this: DCode:= 'D'[0-9][0-9][0-9] GCode:= 'G'[0-9][0-9] MCode:= 'M'0[0-2] or specific tokens like this: GCodeG36 := 'G36' GCodeG37 := 'G37' after working some on my parser this morning i like the more specific expression better. Simplifies my parsing. my parser can just check: "is a type" matches &= scanner.Next() is DCodeD02Token vs "is a type with a value of this" matches &= scanner.Next() is DCodeToken && ((DCodeToken)scanner.Current).DCode == 2; I would like to see an example of tree analysis. might help me with my current problem of: http://www.codeplex.com/irony/Thread/View.aspx?ThreadId=35310[^]

    Algorithms question

  • where to put the responsiblity + Scanner or Parser
    L Leblanc Meneses 0

    I'm using a scanner to create my tokens and a parser to create the tokens into a meaningful AST. After a good start on my project, I noticed that if i made my scanner create generalized tokens my parser logic needed more work but if i create more specific tokens my parser logic was greatly reduced. anyone have a rule of thumb(s) when i should put the responsibility on the scanner or when it should be placed on the parser? -lm

    Algorithms question

  • is there an ultrashock.com equivalent for wpf?
    L Leblanc Meneses 0

    is there an ultrashock.com equivalent for wpf? http://www.ultrashock.com/#/assets/flash/[^] I'm currently trying to create a custom control that maybe inherits from canvas and animates any object(s) as the mouse moves towards its edges. similar to: http://www.kirupa.com/developer/mx/infinite.htm[^][^] and http://www.ultrashock.com/#/asset/40273/vertical-scroller.html[^] i'm just surprised that i haven't seen a website containing common control like these implemented in wpf already.

    WPF csharp html wpf com adobe

  • newsletter mentioning a corba open source by novel...?
    L Leblanc Meneses 0

    a couple of months ago i remember seeing somewhere in a newsletter that some large company would be releasing or did release a corba implementation for c#. ... i want to say it was novel but i can't find any google links. i would like to use wcf but my server is going to be c# and client in c++. not sure how interoperability works in wcf yet. (i'm sure none exists as an MS solution) at the end i'll probably just write the client/server manually but some code generation of corba and idl would be a nice tool. - lm

    C# csharp c++ wcf sysadmin ai-coding
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups