Search Results

Search found 9701 results on 389 pages for 'cross platform'.

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

  • C#/.NET Little Wonders &ndash; Cross Calling Constructors

    - by James Michael Hare
    Just a small post today, it’s the final iteration before our release and things are crazy here!  This is another little tidbit that I love using, and it should be fairly common knowledge, yet I’ve noticed many times that less experienced developers tend to have redundant constructor code when they overload their constructors. The Problem – repetitive code is less maintainable Let’s say you were designing a messaging system, and so you want to create a class to represent the properties for a Receiver, so perhaps you design a ReceiverProperties class to represent this collection of properties. Perhaps, you decide to make ReceiverProperties immutable, and so you have several constructors that you can use for alternative construction: 1: // Constructs a set of receiver properties. 2: public ReceiverProperties(ReceiverType receiverType, string source, bool isDurable, bool isBuffered) 3: { 4: ReceiverType = receiverType; 5: Source = source; 6: IsDurable = isDurable; 7: IsBuffered = isBuffered; 8: } 9: 10: // Constructs a set of receiver properties with buffering on by default. 11: public ReceiverProperties(ReceiverType receiverType, string source, bool isDurable) 12: { 13: ReceiverType = receiverType; 14: Source = source; 15: IsDurable = isDurable; 16: IsBuffered = true; 17: } 18:  19: // Constructs a set of receiver properties with buffering on and durability off. 20: public ReceiverProperties(ReceiverType receiverType, string source) 21: { 22: ReceiverType = receiverType; 23: Source = source; 24: IsDurable = false; 25: IsBuffered = true; 26: } Note: keep in mind this is just a simple example for illustration, and in same cases default parameters can also help clean this up, but they have issues of their own. While strictly speaking, there is nothing wrong with this code, logically, it suffers from maintainability flaws.  Consider what happens if you add a new property to the class?  You have to remember to guarantee that it is set appropriately in every constructor call. This can cause subtle bugs and becomes even uglier when the constructors do more complex logic, error handling, or there are numerous potential overloads (especially if you can’t easily see them all on one screen’s height). The Solution – cross-calling constructors I’d wager nearly everyone knows how to call your base class’s constructor, but you can also cross-call to one of the constructors in the same class by using the this keyword in the same way you use base to call a base constructor. 1: // Constructs a set of receiver properties. 2: public ReceiverProperties(ReceiverType receiverType, string source, bool isDurable, bool isBuffered) 3: { 4: ReceiverType = receiverType; 5: Source = source; 6: IsDurable = isDurable; 7: IsBuffered = isBuffered; 8: } 9: 10: // Constructs a set of receiver properties with buffering on by default. 11: public ReceiverProperties(ReceiverType receiverType, string source, bool isDurable) 12: : this(receiverType, source, isDurable, true) 13: { 14: } 15:  16: // Constructs a set of receiver properties with buffering on and durability off. 17: public ReceiverProperties(ReceiverType receiverType, string source) 18: : this(receiverType, source, false, true) 19: { 20: } Notice, there is much less code.  In addition, the code you have has no repetitive logic.  You can define the main constructor that takes all arguments, and the remaining constructors with defaults simply cross-call the main constructor, passing in the defaults. Yes, in some cases default parameters can ease some of this for you, but default parameters only work for compile-time constants (null, string and number literals).  For example, if you were creating a TradingDataAdapter that relied on an implementation of ITradingDao which is the data access object to retreive records from the database, you might want two constructors: one that takes an ITradingDao reference, and a default constructor which constructs a specific ITradingDao for ease of use: 1: public TradingDataAdapter(ITradingDao dao) 2: { 3: _tradingDao = dao; 4:  5: // other constructor logic 6: } 7:  8: public TradingDataAdapter() 9: { 10: _tradingDao = new SqlTradingDao(); 11:  12: // same constructor logic as above 13: }   As you can see, this isn’t something we can solve with a default parameter, but we could with cross-calling constructors: 1: public TradingDataAdapter(ITradingDao dao) 2: { 3: _tradingDao = dao; 4:  5: // other constructor logic 6: } 7:  8: public TradingDataAdapter() 9: : this(new SqlTradingDao()) 10: { 11: }   So in cases like this where you have constructors with non compiler-time constant defaults, default parameters can’t help you and cross-calling constructors is one of your best options. Summary When you have just one constructor doing the job of initializing the class, you can consolidate all your logic and error-handling in one place, thus ensuring that your behavior will be consistent across the constructor calls. This makes the code more maintainable and even easier to read.  There will be some cases where cross-calling constructors may be sub-optimal or not possible (if, for example, the overloaded constructors take completely different types and are not just “defaulting” behaviors). You can also use default parameters, of course, but default parameter behavior in a class hierarchy can be problematic (default values are not inherited and in fact can differ) so sometimes multiple constructors are actually preferable. Regardless of why you may need to have multiple constructors, consider cross-calling where you can to reduce redundant logic and clean up the code.   Technorati Tags: C#,.NET,Little Wonders

    Read the article

  • Preferred way to do locales in the Haskell Platform

    - by user355466
    The Haskell platform includes two obsolete libraries, old-time and old-locale. For old-time, it also includes the preferred alternative (namely time), but I can't figure out what the recommended alternative for old-locale is. Is this simply a shortcoming of the Platform as of now (version 2010.1.0.0), or something I've overlooked?

    Read the article

  • Making a program platform independent

    - by Thilanka
    Hi, I'm working with an OCR project which is developed using Visual C++ on .net framework. But since the .net is platform dependent I want to make this project platform independent and make it supports to multiple operating systems. So can some one give me a hint to how to do it. Thanks.

    Read the article

  • Run WordPress & Other Web Apps with Windows Web Platform

    - by Matthew Guay
    Would you like to run WordPress or other web apps on your PC so you can easily test and design websites?  Here we’ll look at how you can get the latest web apps on your computer in only a few quick steps. Many web apps today, such as WordPress, MediaWiki, and more, are open source and can be run for free from any computer with even a simple local web server.  They are often very difficult to install on your computer, since they require a number of dependencies such as PHP and MySQL.  Microsoft has worked to make this easier, releasing the Windows Web Platform Installer.  This lets you install many popular web apps and free tools in Windows with only a few clicks. Here we’re going to look at how to install WordPress and the free Visual Web Developer 2010 Express to edit web code with the Web Platform Installer.  But, if you’d rather install a different web app or tool, feel free to choose those as the installations are generally similar. Getting Started Head over to Microsoft’s Web development site and download the Web Platform Installer (link below).  This will download very quick, as it is just a small loader.  When you run this loader, it will download the Web Platform Installer files.  The Web Platform Installer works on XP, Vista, and Windows 7, as well as the related versions of Windows Server. After a couple moments, the Web Platform Installer will open and load information about the latest web offerings.    Now you can choose what you want to install.  You can quickly select the recommended products for several categories such as Web Server, Database, and more. Alternately, click Customize under the category and select exactly what you want to install.  Note that items already installed on your computer will be grayed out. We wanted to install Visual Web Developer 2010 Express, so select Customize under Tools, and select Visual Web Developer 2010 Express. Or, for more preset choices, select Options on the bottom of the window. You can choose to add Multimedia, Developer, and Enterprise tools to the lists, or add a new preset list from a feed. Choose Specific Web apps to Install We wanted to install WordPress, so instead of choosing a preset, select the Web Applications tab on the left.  Now you can choose from a variety of apps based on category, or you can view them all together in an A to Z, Most Popular, or Highest Rating list. Click the checkbox beside the app you want to install to select it, or click the “i” for more information. Here’s the More Information pane for WordPress.  If you’re ready to install it, click the checkbox. Now you can go back and add more web apps or tools to the install list if you like.  The Web Platform Installer will automatically find and select prerequisite apps such as MySQL, so you won’t need to worry about finding them. Once you’ve selected everything you want to install, click the Install button on the bottom of the window. The Web Platform Installer will now show you everything that’s selected, including components that it automatically selected.  Notice we only chose to install WordPress and Visual Web Developer 2010 Express, but it also has selected MySQL and PHP automatically.  Click I Accept to proceed. Enter an administrator password for MySQL before the setup begins. Now the Web Platform Installer will take over, automatically downloading, installing, and configuring all of your web apps.  It will also activate optional Windows components that may be needed on your computer.  This may take several minutes, depending on the components you selected and your internet speed.   Setting up Your Test Site Once the installation is finished, you’ll be asked to enter some information about your site.  You can simply accept the defaults or enter your own choices, and then click Continue. Now you’ll need to enter some information for your web apps.  When installing WordPress, you’ll need to choose a database and enter administrative usernames and passwords.  You may also be asked to enter extra information for additional security, but for a local-only test site this isn’t necessary.  Click Continue when you’re finished. You’ll need to wait a few more moments as it complete the setup of your web apps.  The good thing is, once it’s finished, they’ll be ready to go with only minimal configuration. And you’re finished!  The installer will let you know everything it installed, and if there were any problems.  In our test, Visual Web Developer 2010 Express failed to install successfully.  Often the problems may be with the download, so click Finish and then reselect the apps that didn’t install and run the installer again. Now you’re ready to run WordPress from your PC.  Click the Launch WordPress link or enter http://localhost:80/wordpress in your browser to get started. You’ll only have a little more setup to do on WordPress to get it running.  Once you’ve opened your WordPress page in your browser, enter a name for your blog and your email address, and click Install WordPress.   After a few seconds, you should see a Success! page with your username and a temporary password.  Copy the password, and then click Log In. Enter admin as the Username and paste the random generated password, and click Log In. WordPress will remind you to change the default password.  Click the Yes, Take me to my profile page link to do this. Enter something easier for you to remember, and click Update Profile. Now you’re ready to enjoy your new WordPress install on Windows.  You can add plugins and themes, and everything else you’d do with a normal WordPress site.  Here’s the dashboard running from localhost. And here’s the default blog running. Setting up Visual Web Developer 2010 Express As mentioned before, Visual Web Developer 2010 Express didn’t install correctly on our first try, but the second time it installed seamlessly.  Once it’s installed, launch it from your start menu as normal.  It may take a few minutes to load on the first run as it is finishing up setup. You may notice that the splash screen displayed while the program is loading says For Evaluation Purposes Only.  This is because you still need to register the program. You have 30 days to register the program, but let’s go ahead and do it to get this step out of the way.  Click Help in the menu bar, and select Register Product. Click Obtain a registration key online in the popup window. You’ll need to sign in with your Windows Live ID, and then fill out a quick form. When you’re done, copy the registration key displayed and paste it into the registration dialog in Visual Web Developer.   Now you’ve got a registered, free web development program with full standards compliance and IntelliSense to help you work smarter and faster.  And it works great with your local web apps, so you can create, tweak, and then deploy, all from your desktop with this simple installer! Install More Apps You can always run the Web Platform Installer again in the future and add more apps if you’d like.  The install adds a link to the Installer in the Start menu; just run it and repeat the steps above with your new selections. Also, from the installer, you can cleanup the setup files downloaded during the installation if you want.  Click the Options link in the bottom of the window, and then scroll down and select Delete installer cache folder. Uninstalling the apps is not as easy, unfortunately.  If you wish to uninstall the Web Platform Installer and everything you installed with it, you’ll need to uninstall each item individually.  One easy way to see what was all installed together is to sort the entries in Uninstall Programs by date.  In our case, we also installed some other applications on the same day, but it’s easier to see what was installed together. Or if you are not a fan of using Programs and Features to uninstall them, try out a program like Revo Uninstaller Pro. Conclusion Whether you’re a full-time web developer or just enjoy testing out the latest web apps, the Web Platform Installer makes it quick and easy to get your computer loaded up with the latest bits.  In fact, it’s easier to install these tools with all their dependencies than it is to install many standard boxed programs. If you’d like to take your web server anywhere you go and not have it confined to your desktop, then check out our article on how to Turn Your Flashdrive into a Portable Webserver. Link Download the Microsoft Web Platform Installer Similar Articles Productive Geek Tips Linux QuickTip: Downloading and Un-tarring in One StepQuick Tip: Set a Future Date for a Post in WordPressHow-To Geek SoftwareAdd Social Bookmarking (Digg This!) Links to your Wordpress BlogHow-To Geek Software: WordPress Comment Moderation Notifier TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Snagit 10 Windows Media Player Glass Icons (icons we like) How to Forecast Weather, without Gadgets Outlook Tools, one stop tweaking for any Outlook version Zoofs, find the most popular tweeted YouTube videos Video preview of new Windows Live Essentials 21 Cursor Packs for XP, Vista & 7

    Read the article

  • ScriptResource.axd Access is denied. Cross-Domain iFrame

    - by EtienneT
    We have a web page containing an iframe containing a page sharing an authentification cookie with it's parent page. For example the iframe page is on the domain foo.domain.com and the page containing the iframe is on foo2.domain.com. Both share a cookie from domain.com. Authentification works great, but the problem is with ASP.NET in IE7, we always get a javascript error: Access is denied. ScriptResource.axd We are using ASP.NET 3.5, we use Ajax Control Toolkit also (latest version 3.0.30930.0). The problem doesn't occur for IE8. No problem in Firefox and Chrome also. Anyone encountered this problem before?

    Read the article

  • Cross-platform DirectShow alternatives for real life graph

    - by Ole Jak
    Today I have such graph. I run it on windows I need some easy crossplatform DirectShow like alternative where to reconstruct such graph will not be a hard task. Where can I get such alternative? *(and If you can presenta way to reconstruct such graph in It It would be grate!) BTW: By crossplatform I mean Linux Mac and Windows compatible, By using SampleGrabber I ment I need to be able to get data from that step of graph from my programm and I use VirtualCamera from here soundmorning.com/download.php

    Read the article

  • Building Cross Platform app - recommendation

    - by Ben
    Hi, I need to build a fairly simple app but it needs to work on both PC and Mac. It also needs to be redistributable on a disc or usb drive as a standalone desktop app. Initially I thought AIR would be perfect for this (it ticks all the API requirements), but the difficulty is making it distributable, as the app would require the AIR runtime to be installed to run. I came across Shu Player as an option as it seems to be able to package the AIR runtime with the app and do a (silent?) install. However this seems to break the T&C from Adobe (as outlined here) so I'm not sure about the legality. Another option could be Zinc but I haven't tested it so I'm not sure how well it'll fit the bill. What would you recommend or suggest I check out? Any suggestion much appreciated EDIT: There's a few more discussions on mono usage (though no real conclusion): Here and Here EDIT2: Titanium could also fit the bill maybe, will check it out. Any more comments from anyone? Ben

    Read the article

  • Creating cross platform applications

    - by Anant
    I have a fair bit of knowledge of Java and C#.NET (prefer C#). What should I use to create small applications that will work well in Windows, Mac and Linux? Speed will probably not be the main concern (small applications; using Sockets etc).

    Read the article

  • Best Cross Platform Networking Framework For iPhone Dev

    - by Carmen
    I am looking to write a client/server application that will run on both iPhone, OS X and Windows. What are the best solutions for networking that will work on all 3 platforms? I have looked into Qt and it doesn't look like it has support for iPhone. I have also looked at boost, and that looks like it can be compiled for the iPhone. However I was hoping for a somewhat higher level framework like what Qt has to offer.

    Read the article

  • Cross domain cookie tracking

    - by Jon
    Hi, The company I work for has four domains and I'm trying to set up the cookies, so one cookie can be generated and tracked across all the domains. From reading various posts on here I thought it was possible. I've set up a sub domain on one site, to serve a cookie and 1*1 pixel image to all four sites. But I can't get this working on the other sites. If anyone can clarify that: Its possible? If I'm missing something obvious or a link to a good example? I'm trying to do this server side with PHP. Thanks

    Read the article

  • Jquery getJSON Not Working Cross Site

    - by CJ
    I have a piece of javascript that grabs JSON data. When executed locally everything seems to work fine. However, when I try accessing it from a different site, it doesn't work. Here's the script. $(function(){ var aT = new AjaxTest(); aT.getJson(); }); var AjaxTest = function() { this.ajaxUrl = "http://mydeveloperpage.com/sandbox/ajax_json_test/client_reciever.php"; this.getJson = function(){ $.getJSON(this.ajaxUrl, function(data){ $.each(data, function(i, piece){ alert(piece); }); }); } } You can find a copy of the exact same file at "http://mydeveloperpage.com/sandbox/ajax_json_test/". Any help would be greatly appreciated. Thanks!

    Read the article

  • Whats up with cross site Scripting (getJSON) and flickr example

    - by Bernhard
    In past i had read the documentation about getJSON and there is an example with a flickr photo api. (the example with the [pussy]cats :-)). No I ask myself why is it possible, to access flickr directly with this example. Ive tried this by store this code on my local machine - it works but if I use a local copy of jquery i just get an error in firebug like this $ is not defined myurl/test.html Line 11 Does anybody of you have a solution for this paradox thing? This is the documentation url HTTP:api.jquery.com/jQuery.getJSON/ The example isn´t also not working if I store the HTTP:code.jquery.com/jquery-latest.js in my local jquery file. I also dont understand why the request isnt´s visible in Firebug Console Thank you in advance Bernhard

    Read the article

  • Qt Program depoly to multi platform, how?

    - by coderex
    Hi, Am new in Qt Programming and i would like to develop a program which i want to run in Windows, Linux(ubuntu), and Mac. I heard that Qt support mutli-platform application development, but my Question is that, would any Qt library need to run these appilication in Ubuntu after i depolyed or compiled. Or

    Read the article

  • XML cross-browser support

    - by 1anthony1
    I need help getting the file to run in Firefox: I have tried adapting scripts so that my file runs in both IE and Firefox but so far it still only works in IE. (The file can be tested at http://www.eyle.org/crosstest.html - simply type the word Mike in the text box using IE (doesn't work in Firefox).The HTML document is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> var xmlDoc; //loads xml using either IE or firefox function loadXmlDoc() { //test for IE if(window.ActiveXObject) { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.load("books2.xml"); } //test for Firefox else if(document.implementation && document.implementation.createDocument) { xmlDoc = document.implementation.createDocument("","",null); xmlDoc.load("books2.xml"); } //if neither else {document.write("xml file did not load");} } //window.onload = loadXmlDoc(); var subject; //getDetails adds value of txtField to var subject in outputgroup(subject) function getDetails() { //either this or window.onload = loadXmlDoc is needed loadXmlDoc(); var subject = document.getElementById("txtField1").value; function outputgroup(subject) { var xslt = new ActiveXObject("Msxml2.XSLTemplate"); var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument"); var xslProc; xslDoc.async = false; xslDoc.resolveExternals = false; xslDoc.load("contains3books.xsl"); xslt.stylesheet = xslDoc; xslProc = xslt.createProcessor(); xslProc.input = xmlDoc; xslProc.addParameter("subj", subject); xslProc.transform(); document.write(xslProc.output); } outputgroup(subject); } </script> </head> <body> <input type="text" id="txtField1"> <input type="submit" onClick="getDetails(); return false"> </body> </html> The file includes books2.xml and contains3books.xsl (I have put the code for these files at ...ww.eyle.org/books2.xml ...ww.eyle.org/contains3books.xsl) (NB: replace ...ww. with http: // www)

    Read the article

  • Cross-Page communication in firefox extension

    - by OzBarry
    I have two tabs that my extension uses and I wanted to pass events back and forth between them. I've already developed a Google Chrome extension that does this via the background page api, but there doesn't seem to be an equivalent in firefox. I thought message-manager in the firefox extension docs would do the trick, but the documentation on the object is quite poor. I'd be just as happy with using one of the tabs to control the other if I can't directly import the ideas of a background page from google chrome api. Any help/guidance would be great.

    Read the article

  • C# COM Cross Thread problem

    - by user364676
    Hi, we're developing a software to control a scientific measuring device. it provides a COM-Interface defines serveral functions to set measurement parameters and fires an event when it measured data. in order to test our software, i'm implementing a simulation of that device. the com-object runs a loop which periodically fires the event. another loop in the client app should now setup up the com-simulator using the given functions. i created a class for measuring parameters which will be instanciated when setting up a new measurement. // COM-Object public class MeasurementParams { public double Param1; public double Param2; } public class COM_Sim : ICOMDevice { public MeasurementParams newMeasurement; IClient client; public int NewMeasurement() { newMeasurment = new MeasurementParam(); } public int SetParam1(double val) { // why is newMeasurement null when method is called from client loop newMeasurement.Param1 = val; } void loop() { while(true) { // fire event client.HandleEvent; } } } public class Client : IClient { ICOMDevice server; public int HandleEvent() { // handle this event server.NewMeasurement(); server.SetParam1(0.0); } void loop() { while(true) { // do some stuff... server.NewMeasurement(); server.SetParam1(0.0); } } } both of the loops run in independent threads. when server.NewMeasurement() is called, the object on the server is set to a new instance. but in the next function, the object is null again. do the same when handling the server-event, it works perfectly, because the method runs in the servers thread. how to make it work from client-thread as well. as the client is meant to be working with the real device, i cannot modify the interfaces given by the manufactor. also i need to setup measurements independent from the event-handler, which will be fired not regulary. i assume this problem related to multithreaded-COM behavior but i found nothing on this topic.

    Read the article

  • Cross-browser padding/margins

    - by Lucifer
    Hi All, I was wondering if you could give me some helpful hints on how to correct this issue? I have a main menu on my site, the code for it is as follows: li:hover { background-color: #222222; padding-top: 8px; padding-bottom: 9px; } And here's a demo of what it actually looks like: The problem is that when I hover over a menu option (li), the background appears, but it overflows to the outside of the menu's background, and makes it look really dodgy/crap/cheap/yuck! Note that (obviously) when I change the padding to make it display correctly in these browsers, it appears too small in height in IE! So I'm screwed either way. How can I make little imperfections like this look the same in all browsers? Update: HTML (The menu): <ul class="menu"> <li class="currentPage" href="index.php"><a>Home</a></li> <li><a href="services.php">Services</a></li> <li><a href="support.php">Support</a></li> <li><a href="contact.php">Contact Us</a></li> <li><a href="myaccount/" class="myaccount">My Account</a></li> </ul> The CSS: .menu { margin-top: 5px; margin-right: 5px; width: 345px; float: right; } li { font-size: 9pt; color: whitesmoke; padding-left: 6px; padding-right: 8px; display: inline; list-style: none; } li:hover { background-color: #222222; padding-top: 8px; padding-bottom: 9px; }

    Read the article

  • Cross developping targetting both Java Swing and GWT

    - by WizardOfOdds
    Does anyone know of any tool that can facilitate/ease porting of an app to both Java Swing and GWT? I've got a few "screens" that makes complete sense to have both in a desktop app and in a browser and I was wondering if there was some kind of common API that could be targetted that would facilitate creating these two different "views" (see my comment)?

    Read the article

  • ASP.Net Cross Page Posting

    - by John
    Currently I have two pages: The first page contains an input form, and the 2nd page generates an excel document. The input form's button posts to this 2nd page. What I'd like to do is add a second button which also posts to the 2nd page; however, I'll need requests created from this new button to act differently, which brings me to my question: Is there a way I can tell, from the 2nd page, which button was pressed to submit the request? The main reason I'm asking is I'd like to re-use the 2nd page's logic in parsing the information from the first page if possible; I'd rather not have to copy it to a new page and have the new button post to that. Thanks!

    Read the article

  • Simple cross platform GUI app

    - by Joe Cannatti
    I would like to know if there is any way that I could build a very simple GUI app (it doesn't even have to look good) that will run on a fresh install of Windows Vista and OS X with no other installations needed by the user. I would perfer not to use Java (just out of personal programming preference). I will use it though, if it is the only way. Specically, I am wondering if I can write a swing app with Scala or Groovy and run in on windows without them having to install anything. Sorry if this is a silly question, I am a Obj-C developer by trade.

    Read the article

  • Cross-platform and language (de)serialization

    - by fwgx
    I'm looking for a way to serialize a bunch of C++ structs in the most convenient way so that the serialization is portable across C++ and Java (at a minimum) and across 32bit/64bit, big/little endian platforms. The structures to be serialized just contain data, i.e. they're pure data objects with no state or behavior. The idea being that we serialize the structs into an octet blob that we can store in a database "generically" and be read out later on. Thus avoiding changing the database whenever a struct changes and also avoiding assigning each data member to a field - i.e. we only want one table to hold everything "generically" as a binary blob. This should make less work for developers and require less changes when structures change. I've looked at boost.serialize but don't think there's a way to enable compatibility with Java. And likewise for inheriting Serializable in Java. If there is a way to do it by starting with an IDL file that would be best as we already have IDL files that describe the structures. Cheers in advance!

    Read the article

  • Cross-Domain iframe communication

    - by Chris
    I have an iframe being created on a page, and the page's domain is being explicitly set to 'xyz.com' but the iframe's domain is defaulting to 'dev.xyz.com', which is the actual domain i'm developing for. The problem is, when I try to access that iframe via iframe.contentWindow.document, it fails due to the difference in domain. I've tried setting the iframe's src to a file with document.domain = 'xyz.com' but that doesn't seem to be doing the trick... Any ideas?

    Read the article

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