Search Results

Search found 8 results on 1 pages for 'borovsky'.

Page 1/1 | 1 

  • Use JTS topology in JavaFx

    - by borovsky
    I have some polygon in jts topology library. if I want to draw on javafx pane I do: Polygon poly=new Polygon();//javafx //g is geometry of jts for (Coordinate coord : g.getCoordinates()) { poly.getPoints().addAll(coord.x, coord.y); } and got extra four edges that are not expected: but the same data look good in test builder: what is wrong? order of traversing the geometry? any ideas?

    Read the article

  • Using Interfaces in action signature

    - by Dmitry Borovsky
    Hello, I want to use interface in Action signature. So I've tried make own ModelBinder by deriving DefaultModelBinder: public class InterfaceBinder<T> : DefaultModelBinder where T: new() { protected override object CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) { return base.CreateModel(controllerContext, bindingContext, typeof(T)); } } public interface IFoo { string Data { get; set; } } public class Foo: IFoo /*other interfaces*/ { /* a lot of */ public string Data { get; set; } } public class MegaController: Controller { public ActionResult Process( [ModelBinder(typeof(InterfaceBinder))]IFoo foo){/bla-bla-bla/} } But it doesn't work. Does anybody have idea how release this behaviour? And yes, I know that I can make my own implementation of IModelBinder, but I'm looking for easier way.

    Read the article

  • SQL Server Cursor data as result of stored procedure

    - by Dmitry Borovsky
    Hello, I have a stored procedure DECLARE cursor FOR SELECT [FooData] From [FooTable]; OPEN cursor ; FETCH NEXT FROM cursor INTO @CurrFooData; WHILE @@FETCH_STATUS = 0 BEGIN SELECT @CurrFooData AS FooData; INSERT INTO Bar (BarData) VALUES(@CurrFooData); FETCH NEXT FROM cursor INTO @CurrFooData; END; CLOSE cursor DEALLOCATE cursor But in result I have a lot of tables, not one. How can I return one table with 'FooData' column and all '@CurrFooData' rows?

    Read the article

  • Using Interfaces in an action signature of ASP.NET MVC controller

    - by Dmitry Borovsky
    Hello, I want to use interface in Action signature. So I've tried make own ModelBinder by deriving DefaultModelBinder: public class InterfaceBinder<T> : DefaultModelBinder where T: new() { protected override object CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) { return base.CreateModel(controllerContext, bindingContext, typeof(T)); } } public interface IFoo { string Data { get; set; } } public class Foo: IFoo /*other interfaces*/ { /* a lot of other methods and properties*/ public Bar Data{get;set;} string IFoo.Data { get{return Data.ToString()}; set{Data = new Bar(value)}; } } public class MegaController: Controller { public ActionResult Process([ModelBinder(typeof(InterfaceBinder<Foo>))]IFoo foo){/*bla-bla-bla*/} } But it doesn't work. Does anybody have idea how release this behaviour? And yes, I know that I can make my own implementation of IModelBinder, but I'm looking for easier way.

    Read the article

  • MS SQL Cursor data as result of stored procedure

    - by Dmitry Borovsky
    Hello, I have some stored procedure DECLARE cursor FOR SELECT [FooData] From [FooTable]; OPEN cursor ; FETCH NEXT FROM cursor INTO @CurrFooData; WHILE @@FETCH_STATUS = 0 BEGIN SELECT @CurrFooData AS FooData; INSERT INTO Bar (BarData) VALUES(@CurrFooData); FETCH NEXT FROM cursor INTO @CurrFooData; END; CLOSE OldestFeeds DEALLOCATE OldestFeeds But in result I have a lot of tables, not one. How can I return one table with 'FooData' column and all '@CurrFooData' rows?

    Read the article

  • Problem with HiddenFor helper

    - by Dmitry Borovsky
    Hello. Model: public sealed class Model { public string Value { get; set; } } Controller: [HandleError] public class HomeController : Controller { [HttpGet] public ActionResult Index() { return View(new Model { Value = "+" } ); } [HttpPost] public ActionResult Index(Model model) { model.Value += "1"; return View(model); } } View: <%using (Html.BeginForm()){%> <%: Model.Value %> <%: Html.HiddenFor(model => model.Value) %> <input type="submit" value="ok"/> <%}%> Every time I submitted form result is <form action="/" method="post">+1 <input id="Value" name="Value" type="hidden" value="+"> <input type="submit" value="ok"> </form> It means that HiddenFor helper doesn't use real value of Model.Value but uses passed to controller one. Is it bug in MVC framework? Does anyone know workaround?

    Read the article

1