Search Results

Search found 6357 results on 255 pages for 'generic relations'.

Page 162/255 | < Previous Page | 158 159 160 161 162 163 164 165 166 167 168 169  | Next Page >

  • Reporting framework for extending definition & execution to the end users (ASP.Net)

    - by Kabeer
    Hello. My application is a product which will have reporting capabilities. The product, when in production, is expected to have several ad-hoc report defined by the end users. I am looking for a platform that can be tailored to harness the business entities and extend reporting capabilities (definition & execution) to the end user. Here are some constraints: From the usability standpoint, I like what MS Access reports offer. But of course it is not suitable for the target web application. However, it certainly is a source of inspiration usability wise. Cost is a constraint. So something recommended from open source world will be appreciated. Otherwise too I'd like to know. The product in question is somewhat 'generic' in nature. Mine is a ASP.Net platform.

    Read the article

  • Does a recursive Ant task exist to recover properties from external file?

    - by Julia2020
    Hi, I ve got a problem in getting properties with ant from a properties file. With a simple target like this in my build.xml, i'd like to get at least two properties path1 and path2. I'd like to have a generic target to get this two properties.... in order to avoid modifying the build.xml (just adding a new prop) Any suggestions? Thanks in advance ! build.xml : <target name="TEST" description="test ant"> <property file="dependencies.properties"/> <svn> <export srcUrl="${path.prop}" destPath="${workspace}/rep/" /> </svn> </target> dependencies.properties : path1.prop = /path/to/src1 path2.prop = /path/to/src2

    Read the article

  • Fast 4x4 matrix multiplication in Java with NIO float buffers

    - by kayahr
    I know there are LOT of questions like that but I can't find one specific to my situation. I have 4x4 matrices implemented as NIO float buffers (These matrices are used for OpenGL). Now I want to implement a multiply method which multiplies Matrix A with Matrix B and stores the result in Matrix C. So the code may look like this: class Matrix4f { private FloatBuffer buffer = FloatBuffer.allocate(16); public Matrix4f multiply(Matrix4f matrix2, Matrix4f result) { {{{result = this * matrix2}}} <-- I need this code return result; } } What is the fastest possible code to do this multiplication? Some OpenGL implementations (Like the OpenGL ES stuff in Android) provide native code for this but others doesn't. So I want to provide a generic multiplication method for these implementations.

    Read the article

  • Create an grid array...

    - by Anicho
    Okay so I am looking to create a grided array in OGRE3D game engine but the array is generic my array skills are pretty basic and need work so I am posting this just to be sure I am doing this correctly. #define GRIDWIDTH 10 #define GRIDHEIGHT 10 int myGrid [HEIGHT][WIDTH]; int n,m; int main () { for (n=0;n<HEIGHT;n++) for (m=0;m<WIDTH;m++) { jimmy[n][m]=(n+1)*(m+1); } return 0; } I am assuming the above will return: 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 Then I can assign each point in the array to a valid node in OGRE3D to create a grid in 3D view would this work? Just need to tell me if I am doing it right or wrong dont need the ogre3d code....

    Read the article

  • Server-initiated Rendering: EJB -> FacesContext?

    - by egbokul
    I've already asked this question on the Icefaces forum, but meanwhile I realized that this is a more generic problem. I'd like to update parts of a JSF page when I get a message in my MDB. The problem is, how do I get the FacesContext from the EJB container? In the message processing function FacesContext.getCurrentInstance() returns null. I've also tried to make a JSF managed bean be a MDB, but I couldn't (it seems you can't have both in the same class?). Since I'm a beginner in the JSF world I'm kind of stuck now. Is there a way to make it work? (Glassfish v3 + Netbeans 6.8, JSF2 + Icefaces 2.0 alpha2)

    Read the article

  • C# LINQ Where Predicate Type Arguments

    - by blu
    I have an XElement with values for mock data. I have an expression to query the xml: Expression<Func<XElement, bool>> simpleXmlFunction = b => int.Parse(b.Element("FooId").Value) == 12; used in: var simpleXml = xml.Elements("Foo").Where(simpleXmlFunction).First(); The design time error is: The type arguments for method 'System.Linq.Enumerable.Where(System.Collections.Generic.IEnumerable, System.Func)' cannot be inferred from the usage. Try specifying the type arguments explicitly' The delegate supplied to Where should take in an XElement and return a bool, marking if the item matches the query, I am not sure how to add anything more to the delegate or the where clause to mark the type. Also, the parallel method for the real function against the Entity Framework does not have this issue. What is not correct with the LINQ-to-XML version?

    Read the article

  • C#: Farm out jobs to worker processes on a multi-processor machine

    - by Andrew White
    Hi there, I have a generic check that needs to be run on ca. 1000 objects. The check takes about 3 seconds. We have a server with 4 processors (and we also have other multi-processor servers in our network) so we would like to create an exe / dll to do the checking and return the results to the "master". Does anyone know of a framework for this, or how would one go about it in C#? Specifically: * What's the best way to transfer data between the master and the worker process? * How would the master ensure that always 4 processes are running at any one time and as soon as a worker process is finished start a new one. * How to register that the worker is finished and append it's results to a list? Hope it's clear enough but happy to clarify. A.

    Read the article

  • Help filtering childs

    - by lidermin
    Hello, I have this jquery code: $(".button-banc").hover(function() { $(".button-banc img") .animate({ top: "-21px" }, 200).animate({ top: "-17px" }, 200) // first jump .animate({ top: "-19px" }, 100).animate({ top: "-17px" }, 100) // second jump .animate({ top: "-18px" }, 100).animate({ top: "-17px" }, 100); // the last jump }); The effect I want is: when you pass the mouse over an image this image should jump a bit. The problem is that I got "some" images with the class "button-banc" and I want this behaive: When you pass the mouse over, "only the actual image" should jump. The problem is that with the code I posted, every image jumps. How can I achieve this, please help; I want to make a generic way, so that if I add images with the class, they also behaive like that. Thanks.

    Read the article

  • In ASP.NET MVC, why can't I inherit from "MyCustomView" without specifying the full type name?

    - by Seth Petry-Johnson
    In my MVC apps I normally declare a base view type that all of my views inherit from. I get a parser error when I specify Inherits="MyView" in my Page declaration, but not if I specify Inherits="MyApp.Web.Views.MyView". Strangely enough, it also works fine if I specify Inherits="MyView<T> (where T is any valid type). Why can I specify a strongly typed view without the full type name, but not a generic view? My base view class is declared like this: namespace MyApp.Web.Views { public class MyView : MyView<object> { } public class MyView<TModel> : ViewPage<TModel> where TModel : class { } }

    Read the article

  • Embedded web server and gui framework for .NET applications

    - by Toad
    Hi, I'm looking for a framework which allows me to manage my application through a webbased GUI (using an embedded webserver) instead of winforms. Something like this: http://www.webtoolkit.eu/wt but then for .NET In my code I should be able to instantiate classes (like buttons, forms etc), and when a user browses to a given port, the app should render it as javascript/ajax etc etc. preferably, when buttons are pushed, a notification in my code should be called. this is a less specific question than another one I posted about extjs. I hope this will attract more viewers since it is more generic Thanks. Update: cassini like solutions don't fit the bill. Since the webbrowser is embedded in my application, there is no need for ASP.NET server side scripts. I would rather have the framework, call functions inside my application when things happen on the page. onButtonClicked() for instance.

    Read the article

  • Trouble using genericra to integrate activemq and glassfish when using failover protocol

    - by Kyle
    Hi, I'm attempting to use activemq in glassfish using the genericra resource adapter provided with glassfish 2.1. I have found a few pages with helpful information including http://activemq.apache.org/sjsas-with-genericjmsra.html. I have actually had success and been able to get MDBs to use activemq as their JMS provider, but I'm running into an issue as I'm trying to do some more complicated configuration. I want to set up a master-slave configuration, which would require my clients to use a brokerURL of failover:(tcp://broker1:61616,tcp://broker2:61616). In order to do this, I set the following property when calling asadmin create-resource-adapter-config (I have to escape '=' and ':'): ConnectionFactoryProperties=brokerURL\=failover\:(tcp\://127.0.0.1\:61616,tcp://127.0.0.1\:61617) However, I am now getting a StringIndexOutOfBoundsException when my application starts up. I suspect the comma in between the two URLs is the culprit, since this works fine: brokerURL\=failover\:(tcp\://127.0.0.1\:61616) Just wondering if anyone has dealt with this issue before. Also wondering if there is a better way to integrate with glassfish than using the generic resource adapter.

    Read the article

  • Issue with maxWorkerThreads and thread count

    - by Kartik M
    I have created an ASP.NET application which creates threads in an infinite loop. I set maxWorkerThreads to 20 in processModel in machine.config. When I checked the Thread count in perfmon there was around 7000 threads created in worker process. In PageLoad() I have: using System.Threading; ... int count = 0; var threadList = new System.Collections.Generic.List<System.Threading.Thread>(); try { while (true) { Thread newThread = new Thread(ThreadStart(DummyCall), 1024); newThread.Start(); threadList.Add(newThread); count++; } } catch (Exception ex) { Response.Write(count + " : " + ex.ToString()); } Function: void DummyCall() { System.Threading.Thread.Sleep(1000000000); } How do I restrict thread creation in ASP.NET with IIS6/7?

    Read the article

  • NHibernate Validator - how to validate enum type

    - by Herr W.
    I'm using nhibernate validator in my current solution. Everythings is almost fine but... My view model has a property of type Gender (see example below) public virtual Gender Gender { get; set; } public enum Gender { Female = 1, Male = 2 } Now i like to have some validation to ensure that the gender property ist set. But neither the NotEmpty nor the NotNull Attribute fulfil the requirement. Is there a kind of a generic solution or best practice to handle enum validations. Thanks in advance.

    Read the article

  • How to extracting individual dimensions from $node->content['dimensions'] in Drupal's Ubercart?

    - by Walden
    On my Ubercart node-product.tpl.php page, I am trying to extract the individual product dimensions (height, weight, length) from the more generic: print $node->content['dimensions'] ['#value']; which returns "Dimensions: 72in. × 42in. × 30in." Using var_dump(get_defined_vars()); I'm able to see that the dimensions are being outputted independently, but can't seem to get them to print. on the page. What is the proper way to call the dimensions individually?

    Read the article

  • Reading Images only from Camera

    - by Ankit
    I wanted to read images only from the Camera folder of the device. Since the folder might be different for different devices, how can I write a simple application for it). So far I have written the following code, which does read from Camera folder, but it also reads from other places on sdcard as well. Cursor childCursor = managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, MediaStore.Images.ImageColumns._ID, null); do { ImageView image = new ImageView(); image.setImageURI(Uri.withAppendedPath(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, ""+ childCursor.getString( childCursor.getColumnIndex( MediaStore.Images.ImageColumns._ID ))); <some other code> } while (childCursor.moveToNext()); How can I create a generic app and filter on Camera Images before displaying. Any help is appreciated.

    Read the article

  • What causes a WPF ListCollectionView that uses custom sorting to re-sort its items?

    - by Drew Noakes
    Consider this code (type names genericised for the purposes of example): // Bound to ListBox.ItemsSource _items = new ObservableCollection<Item>(); // ...Items are added here ... // Specify custom IComparer for this collection view _itemsView = CollectionViewSource.GetDefaultView(_items) ((ListCollectionView)_itemsView).CustomSort = new ItemComparer(); When I set CustomSort, the collection is sorted as I expect. However I require the data to re-sort itself at runtime in response to the changing of the properties on Item. The Item class derives from INotifyPropertyChanged and I know that the property fires correctly as my data template updates the values on screen, only the sorting logic is not being called. I have also tried raising INotifyPropertyChanged.PropertyChanged passing an empty string, to see if a generic notification would cause the sorting to be initiated. No bananas. EDIT In response to Kent's suggestion I thought I'd point out that sorting the items using this has the same result, namely that the collection sorts once but does not re-sort as the data changes: _itemsView.SortDescriptions.Add( new SortDescription("PropertyName", ListSortDirection.Ascending));

    Read the article

  • How to include simple collections in ConfigurationSection

    - by mikemanne
    Is there a way for me to include a simple array of strings, or List<string> on my custom subclass of ConfigurationSection? (Or an array or generic list of simple data objects, for that matter?) I'm becoming familiar with the new (and VERY verbose) ConfigurationSection, ConfigurationElement, and ConfigurationElementCollection classes, but I'm by no means an expert yet. It seems like ConfigurationSection should handle simple collections/lists on its own, without me having to create a custom ConfigurationElementCollection subclass for each and every one. But I haven't found any reference to this ability online.

    Read the article

  • Dynamic object property populator (without reflection)

    - by grenade
    I want to populate an object's properties without using reflection in a manner similar to the DynamicBuilder on CodeProject. The CodeProject example is tailored for populating entities using a DataReader or DataRecord. I use this in several DALs to good effect. Now I want to modify it to use a dictionary or other data agnostic object so that I can use it in non DAL code --places I currently use reflection. I know almost nothing about OpCodes and IL. I just know that it works well and is faster than reflection. I have tried to modify the CodeProject example and because of my ignorance with IL, I have gotten stuck on two lines. One of them deals with dbnulls and I'm pretty sure I can just lose it, but I don't know if the lines preceding and following it are related and which of them will also need to go. The other, I think, is the one that pulled the value out of the datarecord before and now needs to pull it out of the dictionary. I think I can replace the "getValueMethod" with my "property.Value" but I'm not sure. I'm open to alternative/better ways of skinning this cat too. Here's the code so far (the commented out lines are the ones I'm stuck on): using System; using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; public class Populator<T> { private delegate T Load(Dictionary<string, object> properties); private Load _handler; private Populator() { } public T Build(Dictionary<string, object> properties) { return _handler(properties); } public static Populator<T> CreateBuilder(Dictionary<string, object> properties) { //private static readonly MethodInfo getValueMethod = typeof(IDataRecord).GetMethod("get_Item", new [] { typeof(int) }); //private static readonly MethodInfo isDBNullMethod = typeof(IDataRecord).GetMethod("IsDBNull", new [] { typeof(int) }); Populator<T> dynamicBuilder = new Populator<T>(); DynamicMethod method = new DynamicMethod("Create", typeof(T), new[] { typeof(Dictionary<string, object>) }, typeof(T), true); ILGenerator generator = method.GetILGenerator(); LocalBuilder result = generator.DeclareLocal(typeof(T)); generator.Emit(OpCodes.Newobj, typeof(T).GetConstructor(Type.EmptyTypes)); generator.Emit(OpCodes.Stloc, result); int i = 0; foreach (var property in properties) { PropertyInfo propertyInfo = typeof(T).GetProperty(property.Key, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase | BindingFlags.FlattenHierarchy | BindingFlags.Default); Label endIfLabel = generator.DefineLabel(); if (propertyInfo != null && propertyInfo.GetSetMethod() != null) { generator.Emit(OpCodes.Ldarg_0); generator.Emit(OpCodes.Ldc_I4, i); //generator.Emit(OpCodes.Callvirt, isDBNullMethod); generator.Emit(OpCodes.Brtrue, endIfLabel); generator.Emit(OpCodes.Ldloc, result); generator.Emit(OpCodes.Ldarg_0); generator.Emit(OpCodes.Ldc_I4, i); //generator.Emit(OpCodes.Callvirt, getValueMethod); generator.Emit(OpCodes.Unbox_Any, property.Value.GetType()); generator.Emit(OpCodes.Callvirt, propertyInfo.GetSetMethod()); generator.MarkLabel(endIfLabel); } i++; } generator.Emit(OpCodes.Ldloc, result); generator.Emit(OpCodes.Ret); dynamicBuilder._handler = (Load)method.CreateDelegate(typeof(Load)); return dynamicBuilder; } } EDIT: Using Marc Gravell's PropertyDescriptor implementation (with HyperDescriptor) the code is simplified a hundred-fold. I now have the following test: using System; using System.Collections.Generic; using System.ComponentModel; using Hyper.ComponentModel; namespace Test { class Person { public int Id { get; set; } public string Name { get; set; } } class Program { static void Main() { HyperTypeDescriptionProvider.Add(typeof(Person)); var properties = new Dictionary<string, object> { { "Id", 10 }, { "Name", "Fred Flintstone" } }; Person person = new Person(); DynamicUpdate(person, properties); Console.WriteLine("Id: {0}; Name: {1}", person.Id, person.Name); Console.ReadKey(); } public static void DynamicUpdate<T>(T entity, Dictionary<string, object> properties) { foreach (PropertyDescriptor propertyDescriptor in TypeDescriptor.GetProperties(typeof(T))) if (properties.ContainsKey(propertyDescriptor.Name)) propertyDescriptor.SetValue(entity, properties[propertyDescriptor.Name]); } } } Any comments on performance considerations for both TypeDescriptor.GetProperties() & PropertyDescriptor.SetValue() are welcome...

    Read the article

  • Automate refactor import/using directives, using ReSharper and Visual Studio 2010

    - by Mendy
    I want to automate the Visual Studio 2010 / Resharper 5 auto inserting import directives to put my internal namespaces into the namespace sphere. Like this: using System; using System.Collections.Generic; using System.Linq; using StructureMap; using MyProject.Core; // <--- Move inside. using MyProject.Core.Common; // <--- Move inside. namespace MyProject.DependencyResolution { using Core; using Core.Common; // <--- My internal namespaces to be here! public class DependencyRegistrar { ........... } }

    Read the article

  • ObjectDataSource Insert and Update methods error

    - by Jack
    I m developing asp.net 3.5 project. When I want to Insert with DetailsView this error occured: Error : ObjectDataSource 'ObjectDataSource2' could not find a non-generic method 'AddCity' that has parameters: CITY_NAME. <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetCityByID" UpdateMethod="UpdateCity" InsertMethod="AddCity" TypeName="NOP_CRM.Lib.nop_cities" OldValuesParameterFormatString="original_{0}"> <SelectParameters> <asp:ControlParameter ControlID="GridView1" Name="cityid" PropertyName="SelectedValue" Type="Int32" DefaultValue="1" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="CITY_NAME" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="CITY_NAME" Type="String" /> </InsertParameters> </asp:ObjectDataSource> ... public int AddCity(string cityname) { CITY_NAME = cityname; Insert(); return _CITY_ID; }

    Read the article

  • How to setup Lighttpd as a proxy for cross-site requests?

    - by NilColor
    I want to setup my lighttpd server to proxy some requests (for ex. RSS requests) to other domains so i can fetch data using javascript. For example i'd like to fetch Atmo feed from internal Redmine (say http://code.internal.acme) to developer dashboard (say http://dashboard.internal.acme). I'd like to fetch it using JavaScript but i cant use something like JSONP and i don't want to use Flash for that. Currently i have this in my lighttpd.conf proxy.server = ( "/http-bind/" => ( ( "host" => "10.0.100.52", "port" => 5280 ) ) ) This way i can connect to our internal jabber server via Javascript. But i want more generic way... Something like proxy.server = ( "/proxy/{1}" => ( ( "url" => {1} ) ) )

    Read the article

  • How To Get Type Info Without Using Generics?

    - by DaveDev
    Hi Guys I have an object obj that is passed into a helper method. public static MyTagGenerateTag<T>(this HtmlHelper htmlHelper, T obj /*, ... */) { Type t = typeof(T); foreach (PropertyInfo prop in t.GetProperties()) { object propValue = prop.GetValue(obj, null); string stringValue = propValue.ToString(); dictionary.Add(prop.Name, stringValue); } // implement GenerateTag } I've been told this is not a correct use of generics. Can somebody tell me if I can achieve the same result without specifying a generic type? If so, how? I would probably change the signature so it'd be like: public static MyTag GenerateTag(this HtmlHelper htmlHelper, object obj /*, ... */) { Type t = typeof(obj); // implement GenerateTag } but Type t = typeof(obj); is impossible. Any suggestions? Thanks Dave

    Read the article

  • How do I Moq It.IsAny for an array in the setup of a method?

    - by Graham
    I'm brand new to Moq (using v 4) and am struggling a little with the documentation. What I'm trying to do is to Moq a method that takes a byte array and returns an object. Something like: decoderMock.Setup(d => d.Decode(????).Returns(() => tagMock.Object); The ???? is where the byte[] should be, but I can't work out how to make it so that I don't care what's in the byte array, just return the mocked object I've already set up. Moq.It.IsAny expects a generic. Any help please?

    Read the article

  • How do I save a copy of the clipboard and then revert back to it?

    - by cksubs
    I'm reading words in a text box by simulating the key presses required to highligh and copy the text. When I'm done, I want the clipboard to be exactly how I found it. I was hoping I'd be able to do something like this: IDataObject clipboardBackup = Clipboard.GetDataObject(); Clipboard.Clear(); //Save other things into the clipboard here, etc// Clipboard.SetDataObject(clipboardBackup); But that doesn't seem to work. It looks like you can go the route of specifically trying for text, audio, pictures, etc. and then saving them accordingly. (I guess 'data object' is specialized like that in my example too, I was hoping it was generic.) I'd prefer not to use cases for every possible type of clipboard data, both to be more concise and to make sure I never lose the data regardless of format. Any tips for grabbing any and all of the clipboard and then restoring it?

    Read the article

  • Pure-JavaScript projects in NetBeans?

    - by Matt Zukowski
    This seems like it ought to be obvious, yet I can't figure it out. I do a lot of JavaScript coding, and I really like NetBeans. Unfortunately I can't figure out how to create a "JavaScript" project in NetBeans. If I go to File - New Project, my only options are "Java", "Ruby", and "NetBeans Modules". I don't want any of these. My project consists mostly of JavaScript, with a little bit of CSS. I ususally just end up creating a "Ruby" project, but this seems retarded, since I don't actually have any Ruby code. Why isn't there an option to create a "JavaScript" or "Web" project, or at least a "Generic" project that doesn't revolve around a specific language? Am I missing something here?

    Read the article

< Previous Page | 158 159 160 161 162 163 164 165 166 167 168 169  | Next Page >