Search Results

Search found 2521 results on 101 pages for 'typed constants'.

Page 25/101 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • sqlite - Foreign keys in VS2008 Designer

    - by rene marxis
    Hello I'm starting over to use strong typed datasets in VS 2008 with sqlite and running into a problem. I have some tables that have foreign keys allready defined in the database. I can see those in the Server-Explorer. Now i create a new strong typed Dataset with the designer and add only one table from that realtion to the dataset. Then i like to add the second one and i get an error message "Unexpected error ... Source: Microsoft.VSDesigner; ErrorCode:-1" No Additional Info. The error does not occure if i add both tables at the same time (say i drag them from the serverexplorer). Is there any way to add subsequent tables to an dataset that are in relation(s) to alreay added once? Many thanks _rene

    Read the article

  • How to use JSF h:messages better?

    - by gurupriyan.e
    My Objective is to use h:messages to convey user - error and confirmation messages.The CSS styles to show these two different messages are different, In fact I would like to use an image beside the confirmation message. for Eg: <tr> <td><img/></td><td><h:msg></td> </td>. So I tried to add messages to the Faces Context based on 2 different client ids <tr> <td height="5"> <h:messages style="color:darkred" id="error_message" /> </td> </tr> <tr> <td width="89%" class="InfoMsg" align="center"> <h:messages id="confirm_message" /> </td> </tr> and in the java layer FacesMessage facesMessage = new FacesMessage(Constants.saveMessageConfirm); FacesContext.getCurrentInstance().addMessage(Constants.STATIC_CONFIRM_MSG_CLIENT_ID, facesMessage); But, even if i add messages to client Id confirm_message - and only to confirm_message - and not to error_message - The message is shown twice in 2 different styles (refer the HTML above) 2 Questions : 1) What is the problem here? 2) If I want to show the image inside a td in the second tr and conditionaly show that second tr when confirm messages are present - what is the best way? Thanks,

    Read the article

  • How to bind data in silverlight? In case I don't know which columns would be retrieved from database

    - by kwon
    I am trying to bind data from database to datagrid in silverlight. When I get typed data from DB, it is no problem since I use List<'EntityObject' collection object for example. However, sometimes I need data which I won't be able to know how many and what columns will be generated in design time. In this case, I cannot use typed collection like List<'EntityObject'. In addition, it is not able to use DataSet in silverlight. So, in this case and situation, how to solve this kind of problem? Thanks in advance Kwon

    Read the article

  • Recognizing the source of Facebook application user

    - by Joel
    Hello, When serving an iframe application in Facebook, is there anyway I can know when a user visits my site through Facebook as an application or if he reached the site directly (typed my domain URL in the browser)? I know I can check if the user has a cookie (named "u") which tells me that the user used facebook to get an access_token. However, if the user visited the application one minute ago and got the access_token cookie, but then typed the URL in the browser, checking for the existence of the cookie will return TRUE, although the visitor arrived to the site directly. Thanks, Joel

    Read the article

  • Using static variables for Strings

    - by Vivart
    below content is taken from Best practice: Writing efficient code but i didn't understand why private static String x = "example"; faster than private static final String x ="example"; Can anybody explain this. Using static variables for Strings When you define static fields (also called class fields) of type String, you can increase application speed by using static variables (not final) instead of constants (final). The opposite is true for primitive data types, such as int. For example, you might create a String object as follows: private static final String x = "example"; For this static constant (denoted by the final keyword), each time that you use the constant, a temporary String instance is created. The compiler eliminates "x" and replaces it with the string "example" in the bytecode, so that the BlackBerry® Java® Virtual Machine performs a hash table lookup each time that you reference "x". In contrast, for a static variable (no final keyword), the String is created once. The BlackBerry JVM performs the hash table lookup only when it initializes "x", so access is faster. private static String x = "example"; You can use public constants (that is, final fields), but you must mark variables as private.

    Read the article

  • Best way to carry & modify a variable through various instances and functions?

    - by bobsoap
    I'm looking for the "best practice" way to achieve a message / notification system. I'm using an OOP-based approach for the script and would like to do something along the lines of this: if(!$something) $messages->add('Something doesn\'t exist!'); The add() method in the messages class looks somewhat like this: class messages { public function add($new) { $messages = $THIS_IS_WHAT_IM_LOOKING_FOR; //array $messages[] = $new; $THIS_IS_WHAT_IM_LOOKING_FOR = $messages; } } In the end, there is a method in which reads out $messages and returns every message as nicely formatted HTML. So the questions is - what type of variable should I be using for $THIS_IS_WHAT_IM_LOOKING_FOR? I don't want to make this use the database. Querying the db every time just for some messages that occur at runtime and disappear after 5 seconds just seems like overkill. Using global constants for this is apparently worst practice, since constants are not meant to be variables that change over time. I don't even know if it would work. I don't want to always pass in and return the existing $messages array through the method every time I want to add a new message. I even tried using a session var for this, but that is obviously not suited for this purpose at all (it will always be 1 pageload too late). Any suggestions? Thanks!

    Read the article

  • Creating serializeable unique compile-time identifiers for arbitrary UDT's.

    - by Endiannes
    I would like a generic way to create unique compile-time identifiers for any C++ user defined types. for example: unique_id<my_type>::value == 0 // true unique_id<other_type>::value == 1 // true I've managed to implement something like this using preprocessor meta programming, the problem is, serialization is not consistent. For instance if the class template unique_id is instantiated with other_type first, then any serialization in previous revisions of my program will be invalidated. I've searched for solutions to this problem, and found several ways to implement this with non-consistent serialization if the unique values are compile-time constants. If RTTI or similar methods, like boost::sp_typeinfo are used, then the unique values are obviously not compile-time constants and extra overhead is present. An ad-hoc solution to this problem would be, instantiating all of the unique_id's in a separate header in the correct order, but this causes additional maintenance and boilerplate code, which is not different than using an enum unique_id{my_type, other_type};. A good solution to this problem would be using user-defined literals, unfortunately, as far as I know, no compiler supports them at this moment. The syntax would be 'my_type'_id; 'other_type'_id; with udl's. I'm hoping somebody knows a trick that allows implementing serialize-able unique identifiers in C++ with the current standard (C++03/C++0x), I would be happy if it works with the latest stable MSVC and GNU-G++ compilers, although I expect if there is a solution, it's not portable.

    Read the article

  • ReportViewer with DataSets

    - by bearrito
    I have a question about the following architecture. I am importing my business objects into my client using WCF. Due to the complexity of the business objects ( nested hierarchies ) I want to flatten out my business objects into a dataset/datatable. There are many more tutorials and how-to on successfully using datatables in a report than with a business object so I am pretty attached to this idea. My question is what sort of DataSet should I use? Strongly typed or not? If strongly typed how do I import my business objects into the Datatables?

    Read the article

  • C# Type comparison

    - by Sean.C
    This has me pooped, is there any reason the following: public abstract class aExtension { public abstract bool LoadExtension(Constants c); // method required in inherit public abstract string AppliesToModule // property required in inherit { get; } public abstract string ExtensionName // property required in inherit { get; } public abstract string ExtensionDescription // property required in inherit { get; } } public class UK : aExtension { public override bool LoadExtension(Constants c) { return true; } public override string AppliesToModule { get { return "string"; } } public override string ExtensionName { get { return "string"; } } public override string ExtensionDescription { get { return "string"; } } } would return false for the following expressions: bool a = t.IsAssignableFrom(aExtension)); bool b = t.BaseType.IsAssignableFrom(aExtension)); bool c = typeof(aExtension).IsAssignableFrom(t); bool d = typeof(aExtension).IsAssignableFrom(t.BaseType); bool e = typeof(aExtension).IsSubclassOf(t); bool f = typeof(aExtension).IsSubclassOf(t.BaseType); bool g = t.IsSubclassOf(typeof(aExtension)); bool h = t.BaseType.IsSubclassOf(typeof(LBT.AdMeter.aExtension)); bool i = t.BaseType.Equals(typeof(aExtension)); bool j = typeof(aExtension).Equals(t.BaseType); T is the reflected Type from the calss UK. Stange thing is i do the exact same thing just on an external assembly in the same application and it works as expected...

    Read the article

  • ActionScript Parameter Filtering

    - by TheDarkIn1978
    i'm setting up a custom class that accepts some Number parameters, but i need to limit those parameters and would like to know the best way of doing so. currently, i'm simply calling if statements, and throwing an error if the number is above or below what's accepted. for example, there is a parameter that accepts and angle, but only between 0 and 90. in the case i've typed it as a uint so now i only have to check to see if it's above 90. there's also a parameter Number typed parameter that only accepts values between the range of 0.0 and 1.0. is my method of using if statements and throwing erros the usual way of filtering parameters?

    Read the article

  • Python server open all ports

    - by user1670178
    I am trying to open all ports using this code, why can I not create a loop to perform this function? http://www.kellbot.com/2010/02/tutorial-writing-a-tcp-server-in-python/ #!/usr/bin/python # This is server.py file ##server.py from socket import * #import the socket library n=1025 while n<1050: ##let's set up some constants HOST = '' #we are the host PORT = n #arbitrary port not currently in use ADDR = (HOST,PORT) #we need a tuple for the address BUFSIZE = 4096 #reasonably sized buffer for data ## now we create a new socket object (serv) ## see the python docs for more information on the socket types/flags serv = socket( AF_INET,SOCK_STREAM) ##bind our socket to the address serv.bind((ADDR)) #the double parens are to create a tuple with one element serv.listen(5) #5 is the maximum number of queued connections we'll allow serv = socket( AF_INET,SOCK_STREAM) ##bind our socket to the address serv.bind((ADDR)) #the double parens are to create a tuple with one element serv.listen(5) #5 is the maximum number of queued connections we'll allow print 'listening...' n=n+1 conn,addr = serv.accept() #accept the connection print '...connected!' conn.send('TEST') conn.close() How do I make this work so that I can specify input range and have the server open all ports up to 65535? #!/usr/bin/python # This is server.py file from socket import * #import the socket library startingPort=input("\nPlease enter starting port: ") startingPort=int(startingPort) #print startingPort def connection(): ## let's set up some constants HOST = '' #we are the host PORT = startingPort #arbitrary port not currently in use ADDR = (HOST,PORT) #we need a tuple for the address BUFSIZE = 4096 #reasonably sized buffer for data def socketObject(): ## now we create a new socket object (serv) serv = socket( AF_INET,SOCK_STREAM) def bind(): ## bind our socket to the address serv = socket( AF_INET,SOCK_STREAM) serv.bind((ADDR)) #the double parens are to create a tuple with one element serv.listen(5) #5 is the maximum number of queued connections we'll allow serv = socket( AF_INET,SOCK_STREAM) print 'listening...' def accept(): conn,addr = serv.accept() #accept the connection print '...connected!' conn.send('TEST') def close(): conn.close() ## Main while startingPort<65535: connection() socketObject() bind() accept() startingPort=startingPort+1

    Read the article

  • Ninject: Singleton binding syntax?

    - by Rosarch
    I'm using Ninject 2.0 for the .Net 3.5 framework. I'm having difficulty with singleton binding. I have a class UserInputReader which implements IInputReader. I only want one instance of this class to ever be created. public class MasterEngineModule : NinjectModule { public override void Load() { // using this line and not the other two makes it work //Bind<IInputReader>().ToMethod(context => new UserInputReader(Constants.DEFAULT_KEY_MAPPING)); Bind<IInputReader>().To<UserInputReader>(); Bind<UserInputReader>().ToSelf().InSingletonScope(); } } static void Main(string[] args) { IKernel ninject = new StandardKernel(new MasterEngineModule()); MasterEngine game = ninject.Get<MasterEngine>(); game.Run(); } public sealed class UserInputReader : IInputReader { public static readonly IInputReader Instance = new UserInputReader(Constants.DEFAULT_KEY_MAPPING); // ... public UserInputReader(IDictionary<ActionInputType, Keys> keyMapping) { this.keyMapping = keyMapping; } } If I make that constructor private, it breaks. What am I doing wrong here?

    Read the article

  • Microsoft F#

    - by Aamir Hasan
    F# brings you type safe, succinct, efficient and expressive functional programming language on the .NET platform. It is a simple and pragmatic language, and has particular strengths in data-oriented programming, parallel I/O programming, parallel CPU programming, scripting and algorithmic development. F# cannot solve any problem C# could. F# is a functional language, statically typed. F# is a functional language that supports O-O-Programming References:http://msdn.microsoft.com/en-us/fsharp/cc835246.aspx http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/

    Read the article

  • Chunking a List - .NET vs Python

    - by Abhijeet Patel
    Chunking a List As I mentioned last time, I'm knee deep in python these days. I come from a statically typed background so it's definitely a mental adjustment. List comprehensions is BIG in Python and having worked with a few of them I can see why. Let's say we need to chunk a list into sublists of a specified size. Here is how we'd do it in C#  static class Extensions   {       public static IEnumerable<List<T>> Chunk<T>(this List<T> l, int chunkSize)       {           if (chunkSize <0)           {               throw new ArgumentException("chunkSize cannot be negative", "chunkSize");           }           for (int i = 0; i < l.Count; i += chunkSize)           {               yield return new List<T>(l.Skip(i).Take(chunkSize));           }       }    }    static void Main(string[] args)  {           var l = new List<string> { "a", "b", "c", "d", "e", "f","g" };             foreach (var list in l.Chunk(7))           {               string str = list.Aggregate((s1, s2) => s1 + "," + s2);               Console.WriteLine(str);           }   }   A little wordy but still pretty concise thanks to LINQ.We skip the iteration number plus chunkSize elements and yield out a new List of chunkSize elements on each iteration. The python implementation is a bit more terse. def chunkIterable(iter, chunkSize):      '''Chunks an iterable         object into a list of the specified chunkSize     '''        assert hasattr(iter, "__iter__"), "iter is not an iterable"      for i in xrange(0, len(iter), chunkSize):          yield iter[i:i + chunkSize]    if __name__ == '__main__':      l = ['a', 'b', 'c', 'd', 'e', 'f']      generator = chunkIterable(l,2)      try:          while(1):              print generator.next()      except StopIteration:          pass   xrange generates elements in the specified range taking in a seed and returning a generator. which can be used in a for loop(much like using a C# iterator in a foreach loop) Since chunkIterable has a yield statement, it turns this method into a generator as well. iter[i:i + chunkSize] essentially slices the list based on the current iteration index and chunksize and creates a new list that we yield out to the caller one at a time. A generator much like an iterator is a state machine and each subsequent call to it remembers the state at which the last call left off and resumes execution from that point. The caveat to keep in mind is that since variables are not explicitly typed we need to ensure that the object passed in is iterable using hasattr(iter, "__iter__").This way we can perform chunking on any object which is an "iterable", very similar to accepting an IEnumerable in the .NET land

    Read the article

  • Dynamic Code for type casting Generic Types 'generically' in C#

    - by Rick Strahl
    C# is a strongly typed language and while that's a fundamental feature of the language there are more and more situations where dynamic types make a lot of sense. I've written quite a bit about how I use dynamic for creating new type extensions: Dynamic Types and DynamicObject References in C# Creating a dynamic, extensible C# Expando Object Creating a dynamic DataReader for dynamic Property Access Today I want to point out an example of a much simpler usage for dynamic that I use occasionally to get around potential static typing issues in C# code especially those concerning generic types. TypeCasting Generics Generic types have been around since .NET 2.0 I've run into a number of situations in the past - especially with generic types that don't implement specific interfaces that can be cast to - where I've been unable to properly cast an object when it's passed to a method or assigned to a property. Granted often this can be a sign of bad design, but in at least some situations the code that needs to be integrated is not under my control so I have to make due with what's available or the parent object is too complex or intermingled to be easily refactored to a new usage scenario. Here's an example that I ran into in my own RazorHosting library - so I have really no excuse, but I also don't see another clean way around it in this case. A Generic Example Imagine I've implemented a generic type like this: public class RazorEngine<TBaseTemplateType> where TBaseTemplateType : RazorTemplateBase, new() You can now happily instantiate new generic versions of this type with custom template bases or even a non-generic version which is implemented like this: public class RazorEngine : RazorEngine<RazorTemplateBase> { public RazorEngine() : base() { } } To instantiate one: var engine = new RazorEngine<MyCustomRazorTemplate>(); Now imagine that the template class receives a reference to the engine when it's instantiated. This code is fired as part of the Engine pipeline when it gets ready to execute the template. It instantiates the template and assigns itself to the template: var template = new TBaseTemplateType() { Engine = this } The problem here is that possibly many variations of RazorEngine<T> can be passed. I can have RazorTemplateBase, RazorFolderHostTemplateBase, CustomRazorTemplateBase etc. as generic parameters and the Engine property has to reflect that somehow. So, how would I cast that? My first inclination was to use an interface on the engine class and then cast to the interface.  Generally that works, but unfortunately here the engine class is generic and has a few members that require the template type in the member signatures. So while I certainly can implement an interface: public interface IRazorEngine<TBaseTemplateType> it doesn't really help for passing this generically templated object to the template class - I still can't cast it if multiple differently typed versions of the generic type could be passed. I have the exact same issue in that I can't specify a 'generic' generic parameter, since there's no underlying base type that's common. In light of this I decided on using object and the following syntax for the property (and the same would be true for a method parameter): public class RazorTemplateBase :MarshalByRefObject,IDisposable { public object Engine {get;set; } } Now because the Engine property is a non-typed object, when I need to do something with this value, I still have no way to cast it explicitly. What I really would need is: public RazorEngine<> Engine { get; set; } but that's not possible. Dynamic to the Rescue Luckily with the dynamic type this sort of thing can be mitigated fairly easily. For example here's a method that uses the Engine property and uses the well known class interface by simply casting the plain object reference to dynamic and then firing away on the properties and methods of the base template class that are common to all templates:/// <summary> /// Allows rendering a dynamic template from a string template /// passing in a model. This is like rendering a partial /// but providing the input as a /// </summary> public virtual string RenderTemplate(string template,object model) { if (template == null) return string.Empty; // if there's no template markup if(!template.Contains("@")) return template; // use dynamic to get around generic type casting dynamic engine = Engine; string result = engine.RenderTemplate(template, model); if (result == null) throw new ApplicationException("RenderTemplate failed: " + engine.ErrorMessage); return result; } Prior to .NET 4.0  I would have had to use Reflection for this sort of thing which would have a been a heck of a lot more verbose, but dynamic makes this so much easier and cleaner and in this case at least the overhead is negliable since it's a single dynamic operation on an otherwise very complex operation call. Dynamic as  a Bailout Sometimes this sort of thing often reeks of a design flaw, and I agree that in hindsight this could have been designed differently. But as is often the case this particular scenario wasn't planned for originally and removing the generic signatures from the base type would break a ton of other code in the framework. Given the existing fairly complex engine design, refactoring an interface to remove generic types just to make this particular code work would have been overkill. Instead dynamic provides a nice and simple and relatively clean solution. Now if there were many other places where this occurs I would probably consider reworking the code to make this cleaner but given this isolated instance and relatively low profile operation use of dynamic seems a valid choice for me. This solution really works anywhere where you might end up with an inheritance structure that doesn't have a common base or interface that is sufficient. In the example above I know what I'm getting but there's no common base type that I can cast to. All that said, it's a good idea to think about use of dynamic before you rush in. In many situations there are alternatives that can still work with static typing. Dynamic definitely has some overhead compared to direct static access of objects, so if possible we should definitely stick to static typing. In the example above the application already uses dynamics extensively for dynamic page page templating and passing models around so introducing dynamics here has very little additional overhead. The operation itself also fires of a fairly resource heavy operation where the overhead of a couple of dynamic member accesses are not a performance issue. So, what's your experience with dynamic as a bailout mechanism? © Rick Strahl, West Wind Technologies, 2005-2012Posted in CSharp   Tweet !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

    Read the article

  • shotwell 0.12 shared library error

    - by blade19899
    i installed shotwell 0.12 like so via its official ppa sudo add-apt-repository ppa:yorba/ppa sudo apt-get update sudo apt-get install shotwell and when i tried to run it via dash it didn't start. i then typed in the gnome-terminal "shotwell" I then got this error error while loading shared libraries: libgexiv2.so.0: cannot open shared object file: No such file or directory my question is how to get shotwell 0.12 up and running in ubuntu 11.10 amd64

    Read the article

  • How to customize the renders in prefuse. Problem in customize images in prefuse layout

    - by user324926
    HI all, I have written a java application to show the images in different layouts. I am able to show it different layout correctly but some times the images are overlapped. Can you please help me, how to solve this problem. My code is given below `import javax.swing.JFrame; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; import java.util.; import java.io.; import java.awt.Font; import prefuse.Constants; import prefuse.Display; import prefuse.Visualization; import prefuse.action.ActionList; import prefuse.action.RepaintAction; import prefuse.action.assignment.ColorAction; import prefuse.action.assignment.FontAction; import prefuse.action.assignment.DataColorAction; import prefuse.action.layout.graph.ForceDirectedLayout; import prefuse.action.layout.graph.; import prefuse.action.layout.; import prefuse.activity.Activity; import prefuse.controls.DragControl; import prefuse.controls.PanControl; import prefuse.controls.ZoomControl; import prefuse.data.Graph; import prefuse.data.io.DataIOException; import prefuse.data.io.GraphMLReader; import prefuse.render.DefaultRendererFactory; import prefuse.render.LabelRenderer; import prefuse.util.ColorLib; import prefuse.visual.VisualItem; import prefuse.visual.*; import prefuse.util.FontLib; import prefuse.action.assignment.DataSizeAction; import prefuse.data.*; import prefuse.render.ImageFactory; public class LayoutExample { public static void main(String[] argv) throws Exception { Graph graph = null; try { graph = new GraphMLReader().readGraph("/graphs.xml"); } catch ( DataIOException e ) { e.printStackTrace(); System.err.println("Error loading graph. Exiting..."); System.exit(1); } ImageFactory imageFactory = new ImageFactory(100,100); try { //load images and construct imageFactory. String images[] = new String[3]; images[0] = "data/images/switch.png"; images[1] = "data/images/ip_network.png"; images[2] = "data/images/router.png"; String[] names = new String[] {"Switch","Network","Router"}; BufferedImage img = null; for(int i=0; i < images.length ; i++) { try { img = ImageIO.read(new File(images[i])); imageFactory.addImage(names[i],img); } catch (IOException e){ } } } catch(Exception exp) { } Visualization vis = new Visualization(); vis.add("graph", graph); LabelRenderer nodeRenderer = new LabelRenderer("name", "type"); nodeRenderer.setVerticalAlignment(Constants.BOTTOM); nodeRenderer.setHorizontalPadding(0); nodeRenderer.setVerticalPadding(0); nodeRenderer.setImagePosition(Constants.TOP); nodeRenderer.setMaxImageDimensions(100,100); DefaultRendererFactory drf = new DefaultRendererFactory(); drf.setDefaultRenderer(nodeRenderer); vis.setRendererFactory(drf); ColorAction nText = new ColorAction("graph.nodes", VisualItem.TEXTCOLOR); nText.setDefaultColor(ColorLib.gray(100)); ColorAction nEdges = new ColorAction("graph.edges", VisualItem.STROKECOLOR); nEdges.setDefaultColor(ColorLib.gray(100)); // bundle the color actions ActionList draw = new ActionList(); //MAD - changing the size of the nodes dependent on the weight of the people final DataSizeAction dsa = new DataSizeAction("graph.nodes","size"); draw.add(dsa); draw.add(nText); draw.add(new FontAction("graph.nodes", FontLib.getFont("Tahoma",Font.BOLD, 12))); draw.add(nEdges); vis.putAction("draw", draw); ActionList layout = new ActionList(Activity.DEFAULT_STEP_TIME); BalloonTreeLayout balloonlayout = new BalloonTreeLayout("graph",50); layout.add(balloonlayout); Display d = new Display(vis); vis.putAction("layout", layout); // start up the animated layout vis.run("draw"); vis.run("layout"); d.addControlListener(new DragControl()); // pan with left-click drag on background d.addControlListener(new PanControl()); // zoom with right-click drag d.addControlListener(new ZoomControl()); // -- 6. launch the visualization ------------------------------------- // create a new window to hold the visualization JFrame frame = new JFrame("prefuse example"); // ensure application exits when window is closed frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(d); frame.pack(); // layout components in window frame.setVisible(true); // show the window } } ` Can anyone please let me know how to customize the image sizes / renders insuch way that images won't overlapped. Thanks R.Ravikumar

    Read the article

  • APPLY LATE BINDING IN .NET 4.0 AND DIFFERENTIATE IT WITH VAR KEYWORD

    Latebinding is a common term among VB6.0 programmers. C# was always strongly typed. But in 3.x version they introducded var keyword which suporting dynamic binding. But not late binding. After 4.0 relese they came up with dynamic keyword. This fully supporting late binding. Below explaining the difference between var and dynamics. Also a simple example saying where we can use dynamics in C#

    Read the article

  • Stairway to XML: Level 8 - Deleting Data from an XML Instance

    in order to use the modify() method to delete data from typed and untyped XML instances, you must pass an XML DML expression as an argument to the method. That expression must include the delete keyword, along with an XQuery expression that defines the XML component to be deleted. Robert makes it seem simple, as usual. The best way to version control T-SQLSSMS plug-in SQL Source Control connects SVN, TFS, Git, Hg and all others to SQL Server. Learn more.

    Read the article

  • How to get SRGP working?

    - by Bo Tian
    I'm running 64-bit Ubuntu 10.10, and I'm trying to make SRGP work. SRGP is an old graphics package that accompanies the book "Computer Graphics" by Foley, van Dam, et al. I have installed libx11-dev, but I still can't get through make. I get the error "cannot find -lsrgp" when I typed make PROG=show_pattern. Full compilation messages are here http://pastebin.com/CWuw4xte What do I have to do to get it working?

    Read the article

  • Data Holder Framework

    - by csharp-source.net
    Data Holder is an open source .net object/relational mapper written in c#. It provides typed data ecapsulation and database persistence for .net applications. It also contains a wizzard for generating the data objects and persistance c# code. Right now it has persistence implementation only for MSQL 2000/2005.

    Read the article

  • dist-update kernel failed?

    - by AlbertK
    I run: sudo apt-get update sudo apt-get dist-upgrade , and the linux kernel seemed to be updated to 3.2.0-31-generic successfully. However, after I rebooted, I typed: uname -a , it showed : Linux Albert-PC 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux Does that means the kernel wasn't being updated? I didn't encounter any error or warning messages during the upgrade or dist-upgrade. Thanks for any help

    Read the article

  • Justification for learning/implementing newer Microsoft technologies

    - by Darren
    I work at a large healthcare organization as a mid-level software developer. I have over 10 years experience in the IT industry using Microsoft technologies (ASP.NET & SQL Server). When I go to conferences, code camps, .net user group meetings, I hear of all kinds of new tools and technologies: MVC, LINQ, Entity Framework, WCF Web Services, etc. I guess you could say I'm in my comfort zone using the same old stuff from asp.net 2.0. I use typed datasets for my data access layer. I use web forms and feature rich server controls with master pages. I know how to use plain old SQL and create queries in my typed datasets to get at data my applications need. Throughout my career, I'm always sensitive to not become obsolete with my skill set. What I currently use works fine and my development time is fast. But I'm concerned that if I were to be laid off, I would be asked in interviews how many MVC apps I've written. Or how I am with LINQ or WCF web services. I know that it doesn't matter how many conferences, books, or videos I watch on some new technology...I have to implement/use it or it simply won't sink in. Also, managers who interview don't care how much someone reads up on something, only real use and experience with a technology. I have a new project to write. I've gone to my manager and have asked for additional time for the project for learning/implementing technology I may not be familiar with. Our organization encourages its employees to "learn and grow" and to continue are education. But I always get resistance when I ask for more time to ramp up on something new to implement. My manager is asking for concrete business reasons for implementing these new technologies. I don't have business reasons. My reasons are because I don't want to become obsolete. I could say it would make the project more maintainable in the future by other developers since at some point people could stop using these older technologies, but that' about all I can think of. Does Linq/Entity Framework/MCV apps perform better? So much so that the customers (users in departments I'm creating this app for) need? I doubt it. I'm interested in you guy's thoughts on this. Do many of you have similar plights with trying to use newer upcoming technologies? I doubt I'm on the bleeding edge of technology, either. Are there "business reasons" that you would bring to light for using these technologies? Thanks in advance! Sorry for the long wall of text.

    Read the article

  • Stairway to XML: Level 7 - Updating Data in an XML Instance

    You need to provide the necessary keywords and define the XQuery and value expressions in your XML DML expression in order to use the modify() method to update element and attribute values in either typed or untyped XML instances in an XML column. Robert Sheldon explains how. "It really helped us isolate where we were experiencing a bottleneck"- John Q Martin, SQL Server DBA. Get started with SQL Monitor today to solve tricky performance problems - download a free trial

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >