Search Results

Search found 2456 results on 99 pages for 'frameworks'.

Page 85/99 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • Flex-built SWF's no longer work, error 2048, 2046, 2032

    - by Kevin
    I'm really confused about this problem, and I'm pretty new to Flex. Basically, anything I try to build with mxmlc fails to run now, giving me the above three errors depending on what I do. It was working 30 minutes ago, I've been spending that time trying to figure out what has changed. I redownloaded the Flex SDK, cleared my assetcache, have cleared Firefox's cache. (I'm using Linux.) Even if I compile with -static-link-runtime-shared-libraries=false, since it seems like #2048 is a RSL problem, it still refuses to run. Another strange thing, if I keep <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url> <rsl-url>textLayout_1.0.0.595.swz</rsl-url> in my flex-config file, then firebug tells me that my swf file is trying to access a copy of that in the app's folder, giving error 2032. And if I stick the one I have in frameworks/rsls/ then it gives me error 2046. I don't know how it could not be properly signed, unless Adobe magically changed a signature and didn't update their flex SDK. Any help will be appreciated.

    Read the article

  • iPhone universal app. MoviePlayer.framwork problem.

    - by e40pud
    I have application based on 3.0 iPhone OS SDK One of tasks is playing video (I use MPMoviePlayerController for this task) Now I try to make universal app working on both 3.0 and 3.2 OS I did all steps described in apple documentation: Upgrade Current Target for iPad; make run-time checking for symbols using [[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] function. But when I start my application on device - iPhone with OS 3.1.3 my apllication is crashes with next log: Tue May 25 18:00:28 unknown SpringBoard[24] <Notice>: MultitouchHID(208b30) uilock state: 1 -> 0 Tue May 25 18:00:29 unknown SpringBoard[24] <Notice>: MultitouchHID(292580) device bootloaded Tue May 25 18:00:34 unknown UIKitApplication:...[0xaa0f][1517] <Notice>: dyld: Symbol not found: _MPMoviePlayerWillEnterFullscreenNotification Tue May 25 18:00:34 unknown UIKitApplication:...[0xaa0f][1517] <Notice>: Referenced from: /var/mobile/Applications/876EA35E-5756-436B-A9E2-5481D4D62050/....app/... Tue May 25 18:00:34 unknown UIKitApplication:...[0xaa0f][1517] <Notice>: Expected in: /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer Tue May 25 18:00:35 unknown kernel[0] <Debug>: launchd[1517] Builtin profile: container (seatbelt) Tue May 25 18:00:35 unknown kernel[0] <Debug>: launchd[1517] Container: /private/var/mobile/Applications/876EA35E-5756-436B-A9E2-5481D4D62050 (seatbelt) Tue May 25 18:00:35 unknown ReportCrash[1518] <Notice>: Formulating crash report for process cnetmobile[1517] Tue May 25 18:00:36 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:...[0xaa0f]) Job appears to have crashed: Trace/BPT trap Tue May 25 18:00:36 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:...[0xaa0f]) Throttling respawn: Will start in 2147483646 seconds Tue May 25 18:00:36 unknown SpringBoard[24] <Warning>: Application '...' exited abnormally with signal 5: Trace/BPT trap Tue May 25 18:00:36 unknown ReportCrash[1518] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/..._2010-05-25-180034_...-iPhone.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0 Tue May 25 18:01:36 unknown SpringBoard[24] <Notice>: MultitouchHID(208b30) uilock state: 0 -> 1 As you can see the error is "Symbol not found: _MPMoviePlayerWillEnterFullscreenNotification". This symbol is notification available in MediaPlayer.framework starting from iPhone OS 3.2 So, what am I doing wrong? What I should do to have universal application working correct on OS 3.2 (with new available functionality) and older OSes (with their functionality)?

    Read the article

  • What's the fastest way to get CRUD over CGI on a database handle in Perl?

    - by mithaldu
    TL;DR: Want to write CGI::CRUD::Simple (a minimalist interface module for CGI::CRUD), but I want to check first if i overlooked a module that already does that. I usually work with applications that don't have the niceties of having frameworks and such already in place. However, a while ago i found myself in a situation where i was asking myself: "Self, i have a DBI database handle and a CGI query object, isn't there a module somewhere that can use this to give me some CRUD so i can move on and work on other things instead of spending hours writing an interface?" A quick survey on CPAN gave me: CGI::Crud Catalyst::Plugin::CRUD Gantry::Plugins::CRUD Jifty::View::Declare::CRUD CatalystX::CRUD Catalyst::Controller::CRUD CatalystX::CRUD::REST Catalyst::Enzyme Now, I didn't go particularly in-depth when looking at these modules, but, safe the first one, they all seem to require the presence of some sort of framework. Please tell me if i was wrong and i can just plug any of those into a barebones CGI script. CGI::CRUD seemed to do exactly what i wanted, although it did insist on being used through a rather old and C-like script that must be acquired on a different site and then prodded in various ways and manners to produce something useful. I went with that and found that it works pretty neat and that it should be rather easy to write a simple and easy-to-use module that provides a very basic [dbh, cgi IN]-[html OUT] interface to it. However, as my previous survey was rather short and i may have been hasty in dismissing modules or missed others, i find myself wondering whether that would only be duplication of work already done. As such i ponder the question in the title. PS: I tend to be too short in some of my explanations and make too many assumptions that others think about things similarly as me, resulting in leaving out critical details. If you find yourself wondering just what exactly I am thinking about when i say CRUD, please poke me in comments and I'll amend the question.

    Read the article

  • SHLoadImageFile(L"\\Program Files\\TrainingApp\\background.png"); whats that L in the argument for?

    - by ashishsony
    Hi, ive been working on c++ on linux for the past 2 years,and switched to windows c++ programming recently. can anyone tell me what that L is there in the argument of the function: SHLoadImageFile(L"\\Program Files\\TrainingApp\\background.png"); and on viewing certain sample code in MSVS C++ i came across hundereds of typedefs like.. LPARAM// typedef LONG_PTR LPARAM... here LONG_PTR is again typedef as __w64 long WPARAM// typedef UINT_PTR WPARAM... so there is a lot of chained typedefs.. I never saw this much of typedef chaining on c++ programming on linux using gcc.. what i want to say is that it just creates more confusion in this way for windows application programming.. while ive seen application programming on linux using frameworks like Qt.. there such things are rarely used.. so is there specific purpose in typedefining again and again on MSVSC++?? for eg.. there are typdefs like typedef int BOOL; whats the use of this when normal bool is available already..?? there are hundred other cases ive come across where just to decide what data type to use becomes so difficult.. it becomes difficult to understand a pre written code in this fashion too.. Thanks.

    Read the article

  • Installing Mercurial on Mac OS X 10.6 Snow Leopard

    - by Matthew Rankin
    Installing Mercurial on Mac OS X 10.6 Snow Leopard I installed Mercurial 1.3.1 on Mac OS X 10.6 Snow Leopard from source using the following: cd ~/src curl -O http://mercurial.selenic.com/release/mercurial-1.3.1.tar.gz tar xzvf mercurial-1.3.1.tar.gz cd mercurial-1.3.1 make ALL sudo make install This installs the site-packages files for Mercurial in /usr/local/lib/python2.6/site-packages/. I know that installing Mercurial from the Mac Disk Image will install the files into /Library/Python/2.6/site-packages/, which is the site-packages directory for the Mac OS X default Python install. I have Python 2.6.2+ installed as a Framework with its site-packages directory in: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages With Mercurial installed this way, I have to issue: PYTHONPATH=/usr/local/lib/python2.6/site-packages:"${PYTHONPATH}" in order to get Mercurial to work. Questions How can I install Mercurial from source with the site-packages in a different directory? Is there an advantage or disadvantage to having the site-packages in the current location? Would it be better in one of the Python site-package directories that already exist? Do I need to be concerned about virtualenv working correctly since I have modified PYTHONPATH (or any other conflicts for that matter)? Reasons for Installing from Source Dan Benjamin of Hivelogic provides the benefits of and instructions for installing Mercurial from source in his article Installing Mercurial on Snow Leopard.

    Read the article

  • MXML composite canvas component initialization error

    - by mkorpela
    I'm getting an odd error from my composite canvas component: An ActionScript error has occurred: Error: null at mx.core::Container/initialize()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2560] at -REMOVED THIS FOR STACK OVERFLOW-.view::EditableCanvas/initialize()[.../view/EditableCanvas .... It seems to be related to the fact that my composite component has a child and I'm trying to add one in the place I'm using the component. So how can I do this correctly? Component code looks like this (EditableCanvas.mxml): <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="{init()}"> <mx:Script> <![CDATA[ private var _editable:Boolean; public function set editable(edit:Boolean):void { _editable = edit; } private function init():void { if(_editable){ addEventListener(MouseEvent.MOUSE_OVER, showEdit); addEventListener(MouseEvent.MOUSE_OUT, hideEdit); } } private function showEdit(event:Event):void { editTextImage.visible = true; } private function hideEdit(event:Event):void { editTextImage.visible = false; } ]]> </mx:Script> <mx:Image id="editTextImage" source="@Embed('/../assets/icons/small/process.png')" click="{dispatchEvent(EditPoiEvent.text())}" visible="false"/> </mx:Canvas> The code that is using the code looks like this: <view:EditableCanvas width="290" height="120" backgroundColor="#FFFFFF" horizontalScrollPolicy="off" borderStyle="solid" cornerRadius="3" editable="{_editable}"> <mx:Text id="textContentBox" width="270" fontFamily="nautics" fontSize="12" text="{_text}"/> </view:EditableCanvas>

    Read the article

  • Seperation of game- and rendering logic

    - by Qua
    What is the best way to seperate rendering code from the actually game engine/logic code? And is it even a good idea to seperate those? Let's assume we have a game object called Knight. The Knight has to be rendered on the screen for the user to see. We're now left with two choices. Either we give the Knight a Render/Draw method that we can call, or we create a renderer class that takes care of rendering all knights. In the scenario where the two is seperated the Knight should the knight still contain all the information needed to render him, or should this be seperated as well? In the last project we created we decided to let all the information required to render an object be stored inside the object itself, but we had a seperate component to actually read those informations and render the objects. The object would contain information such as size, rotation, scale, and which animation was currently playing and based on this the renderer object would compose the screen. Frameworks such as XNA seem to think joining the object and rendering is a good idea, but we're afraid to get tied up to a specific rendering framework, whereas building a seperate rendering component gives us more freedom to change framework at any given time.

    Read the article

  • Why is the Clojure Hello World program so slow compared to Java and Python?

    - by viksit
    Hi all, I'm reading "Programming Clojure" and I was comparing some languages I use for some simple code. I noticed that the clojure implementations were the slowest in each case. For instance, Python - hello.py def hello_world(name): print "Hello, %s" % name hello_world("world") and result, $ time python hello.py Hello, world real 0m0.027s user 0m0.013s sys 0m0.014s Java - hello.java import java.io.*; public class hello { public static void hello_world(String name) { System.out.println("Hello, " + name); } public static void main(String[] args) { hello_world("world"); } } and result, $ time java hello Hello, world real 0m0.324s user 0m0.296s sys 0m0.065s and finally, Clojure - hellofun.clj (defn hello-world [username] (println (format "Hello, %s" username))) (hello-world "world") and results, $ time clj hellofun.clj Hello, world real 0m1.418s user 0m1.649s sys 0m0.154s Thats a whole, garangutan 1.4 seconds! Does anyone have pointers on what the cause of this could be? Is Clojure really that slow, or are there JVM tricks et al that need to be used in order to speed up execution? More importantly - isn't this huge difference in performance going to be an issue at some point? (I mean, lets say I was using Clojure for a production system - the gain I get in using lisp seems completely offset by the performance issues I can see here). The machine used here is a 2007 Macbook Pro running Snow Leopard, a 2.16Ghz Intel C2D and 2G DDR2 SDRAM. BTW, the clj script I'm using is from here and looks like, #!/bin/bash JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java CLJ_DIR=/opt/jars CLOJURE=$CLJ_DIR/clojure.jar CONTRIB=$CLJ_DIR/clojure-contrib.jar JLINE=$CLJ_DIR/jline-0.9.94.jar CP=$PWD:$CLOJURE:$JLINE:$CONTRIB # Add extra jars as specified by `.clojure` file if [ -f .clojure ] then CP=$CP:`cat .clojure` fi if [ -z "$1" ]; then $JAVA -server -cp $CP \ jline.ConsoleRunner clojure.lang.Repl else scriptname=$1 $JAVA -server -cp $CP clojure.main $scriptname -- $* fi

    Read the article

  • What is the right way to make a new XMLHttpRequest from an RJS response in Ruby on Rails?

    - by Yuri Baranov
    I'm trying to come closer to a solution for the problem of my previous question. The scheme I would like to try is following: User requests an action from RoR controller. Action makes some database queries, makes some calculations, sets some session variable(s) and returns some RJS code as the response. This code could either update a progress bar and make another ajax request. display the final result (e.g. a chart grahic) if all the processing is finished The browser evaluates the javascript representation of the RJS. It may make another (recursive? Is recursion allowed at all?) request, or just display the result for the user. So, my question this time is: how can I embed a XMLHttpRequest call into rjs code properly? Some things I'd like to know are: Should I create a new thread to avoid stack overflow. What rails helpers (if any) should I use? Have anybody ever done something similar before on Rails or with other frameworks? Is my idea sane?

    Read the article

  • JVM terminates when launching eclipse with J2SE 6.0 on mac os x (need J2SE 6.0 for Oracle enterprise

    - by rooban bajwa
    I know my issue has party been addressed at this link http://stackoverflow.com/questions/245803/jvm-terminates-when-launching-eclipse-mat-on-mac-os-with-j2se-60 but it was a year+ ago.. plus the link that's provided in there http://landonf.bikemonkey.org/static/soylatte/ does not seem to be alive (i mean the download section on that link no longer provide the 32-bit port of j2se 6.0 for mac osx 10.5) I am trying to run eclipse 3.5 on mac OSX 10.5. It works fine with J2SE 5.0. But when I installed the Oracle enterprise pack for eclipse - it requires to start eclipse with J2SE 6.0 JVM otherwise it will get disabled. Here's the exact message I get from it - "You are running Eclipse on Java VM version: 1.5.0_22 Oracle Enterprise Pack for Eclipse requires Java version 6 or higher. Click next to configure a compatible Java VM." It asks me to point to J2SE 6.0 JVM, when I do that (i.e point it to "/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home") , it asks to restart eclipse , when I do that, eclipse just bombs .. with JVM terminated error .. SO I need to start eclipse with J2SE 6.0 JVM but eclipse needs carbon which is only available in 32 bits and hence I cann't start eclipse with J2SE 6.0 JVM which is only available in 64bit mode from mac. And the site providing 32 bit port of J2SE 6.0 JVM does not seem to be active anymore.. Can someone help me on this issue, Thanks in advance,

    Read the article

  • purpose of 3rd party mvc ?

    - by Honey
    ive seen many third party mvcs or frameworks such as codeignitor , cakephp, and so on. what i want to know is what are their purposes? ive created my own framework call it an mvc or framework (in my opinion their all the same). in my framework i have all the classes in one folder called classes and all functions in another. its all organized and when a new project comes in i am able to complete it fast. i have looked at the applications that i mentioned and it seems to have huge articles and tutorials to study. what is the purpose? why not study the main language such as php, javascript/ajax or jquery, and so on then build something that you know the ins and outs of so that any project comes your way you know what to do. ive known some people who use cakephp and for every project they get stuck and need to figure out what to do. another guy i knew worked with joomla and every basic company website that came his way he would reverse engineer joomla to make it work with the site. are people using these applications because they lack knowledge in the languages? or sometimes have no choice but to make a site while lacking language and put something together.

    Read the article

  • PHP get "Application Root" in Xampp on Windows correctly

    - by Michael Mao
    Hi all: I found this thread on StackOverflow about how to get the "Application Root" from inside my web app. However, most of the approaches suggested in that thread can hardly be applied to my Xampp on Windows. Say, I've got a "common.php" which stays inside my web app's app directory: / /app/common.php /protected/index.php In my common.php, what I've got is like this: define('DOCROOT', $_SERVER['DOCUMENT_ROOT']); define('ABSPATH', dirname(__FILE__)); define('COMMONSCRIPT', $_SERVER['PHP_SELF']); After I required the common.php inside the /protected/index.php, I found this: C:/xampp/htdocs //<== echo DOCROOT; C:\xampp\htdocs\comic\app //<== echo ABSPATH /comic/protected/index.php //<== echo COMMONSCRIPT So the most troublesome part is the path delimiters are not universal, plus, it seems all superglobals from the $_SERVER[] asso array, such as $_SERVER['PHP_SELF'], are relative to the "caller" script, not the "callee" script. It seems that I can only rely on dirname(__FILE__) to make sure this always returns an absolute path to the common.php file. I can certainly parse the returning values from DOCROOT and ABSPATH and then calculate the correct "application root". For instance, I can compare the parts after htdocs and substitute all backslashes with slashes to get a unix-like path I wonder is this the right way to handle this? What if I deploy my web app on a LAMP environment? would this environment-dependent approach bomb me out? I have used some PHP frameworks such as CakePHP and CodeIgniter, to be frank, They just work on either LAMP or WAMP, but I am not sure how they approached such a elegant solution. Many thanks in advance for all the hints and suggestions.

    Read the article

  • Why use SQL database?

    - by martinthenext
    I'm not quite sure stackoverflow is a place for such a general question, but let's give it a try. Being exposed to the need of storing application data somewhere, I've always used MySQL or sqlite, just because it's always done like that. As it seems like the whole world is using these databases, most of all software products, frameworks, etc. It is rather hard for a beginning developer like me to ask a question - why? Ok, say we have some object-oriented logic in our application, and objects are related to each other somehow. We need to map this logic to the storage logic, so we need relations between database objects too. This leads us to using relational database and I'm ok with that - to put it simple, our database rows sometimes will need to have references to other tables' rows. But why do use SQL language for interaction with such a database? SQL query is a text message. I can understand this is cool for actually understanding what it does, but isn't it silly to use text table and column names for a part of application that no one ever seen after deploynment? If you had to write a data storage from scratch, you would have never used this kind of solution. Personally, I would have used some 'compiled db query' bytecode, that would be assembled once inside a client application and passed to the database. And it surely would name tables and colons by id numbers, not ascii-strings. In the case of changes in table structure those byte queries could be recompiled according to new db schema, stored in XML or something like that. What are the problems of my idea? Is there any reason for me not to write it myself and to use SQL database instead?

    Read the article

  • Considerations when architecting an extensible application using MEF

    - by Dan Bryant
    I've begun experimenting with dependency injection (in particular, MEF) for one of my projects, which has a number of different extensibility points. I'm starting to get a feel for what I can do with MEF, but I'd like to hear from others who have more experience with the technology. A few specific cases: My main use case at the moment is exposing various singleton-like services that my extensions make use of. My Framework assembly exposes service interfaces and my Engine assembly contains concrete implementations. This works well, but I may not want to allow all of my extensions to have access to all of my services. Is there a good way within MEF to limit which particular imports I allow a newly instantiated extension to resolve? This particular application has extension objects that I repeatedly instantiate. I can import multiple types of Controllers and Machines, which are instantiated in different combinations for a Project. I couldn't find a good way to do this with MEF, so I'm doing my own type discovery and instantiation. Is there a good way to do this within MEF or other DI frameworks? I welcome input on any other things to watch out for or surprising capabilities you've discovered that have changed the way you architect.

    Read the article

  • How to mock the Request.ServerVariables using MOQ for ASP.NET MVC?

    - by melaos
    hi guys, i'm just learning to put in unit testing for my asp.net mvc when i came to learn about the mock and the different frameworks there is out there now. after checking SO, i found that MOQ seems to be the easiest to pick up. as of now i'm stuck trying to mock the Request.ServerVariables, as after reading this post, i've learned that it's better to abstract them into property. as such: /// <summary> /// Return the server port /// </summary> protected string ServerPort { get { return Request.ServerVariables.Get("SERVER_PORT"); } } But i'm having a hard time learning how to properly mock this. I have a home controller ActionResult function which grabs the user server information and proceed to create a form to grab the user's information. i tried to use hanselman's mvcmockhelpers class but i'm not sure how to use it. this is what i have so far... [Test] public void Create_Redirects_To_ProductAdded_On_Success() { FakeViewEngine engine = new FakeViewEngine(); HomeController controller = new HomeController(); controller.ViewEngine = engine; MvcMockHelpers.SetFakeControllerContext(controller); controller.Create(); var results = controller.Create(); var typedResults = results as RedirectToRouteResult; Assert.AreEqual("", typedResults.RouteValues["action"], "Wrong action"); Assert.AreEqual("", typedResults.RouteValues["controller"], "Wrong controller"); } Questions: As of now i'm still getting null exception error when i'm running the test. So what am i missing here? And if i use the mvcmockhelpers class, how can i still call the request.verifyall function to ensure all the mocking are properly setup?

    Read the article

  • rapid application developement tools for very basic GUI apps

    - by Jurij
    I know there are many RAD platforms out there. Infact there are so many that I'm having a hard time finding out which one fits me best. What I want is a RAD tool that would allow me to define a database data model (make DB tables) and then create (view and edit) forms for the various tables. Data input, updating and various queries should be easy and GUI should generate automatically. I'd like to add some additional functionality by coding (such as various complex calculations on the data). I'm a programmer so I'm willing to learn to use a more complete, full-blown RAD solution if you can point me to it (NetBeans and RubyOnRails being the two such frameworks that I'd would probably be high on the list). I'm currently doing Windows Forms logistics apps in .NET. I've actually developed a very crude and basic version of what I need, but I just know that there are solutions out there that are much better and I'd benefit by knowing how to use them. So in short, the basic requirements: * database based data storage (SQLite if possible) * very automated GUI creation * desktop based (as in: not a web app) * extendable by coding * used for creating simple data entry, view & query apps. So basically something like Oracle Forms or DotNetMushroom Rapid Application Developer. But for .NET and SQLite if possible.

    Read the article

  • img onload doesn't work well in IE7

    - by rmeador
    I have an img tag in my webapp that uses the onload handler to resize the image: <img onLoad="SizeImage(this);" src="foo" > This works fine in Firefox 3, but fails in IE7 because the image object being passed to the SizeImage() function has a width and height of 0 for some reason -- maybe IE calls the function before it finishes loading?. In researching this, I have discovered that other people have had this same problem with IE. I have also discovered that this isn't valid HTML 4. This is our doctype, so I don't know if it's valid or not: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Is there a reasonable solution for resizing an image as it is loaded, preferably one that is standards-compliant? The image is being used for the user to upload a photo of themselves, which can be nearly any size, and we want to display it at a maximum of 150x150. If your solution is to resize the image server-side on upload, I know that is the correct solution, but I am forbidden from implementing it :( It must be done client side, and it must be done on display. Thanks. Edit: Due to the structure of our app, it is impractical (bordering on impossible) to run this script in the document's onload. I can only reasonably edit the image tag and the code near it (for instance I could add a <script> right below it). Also, we already have Prototype and EXT JS libraries... management would prefer to not have to add another (some answers have suggested jQuery). If this can be solved using those frameworks, that would be great. Edit 2: Unfortunately, we must support Firefox 3, IE 6 and IE 7. It is desirable to support all Webkit-based browsers as well, but as our site doesn't currently support them, we can tolerate solutions that only work in the Big 3.

    Read the article

  • How can I place validating constraints on my method input parameters?

    - by rcampbell
    Here is the typical way of accomplishing this goal: public void myContractualMethod(final String x, final Set<String> y) { if ((x == null) || (x.isEmpty())) { throw new IllegalArgumentException("x cannot be null or empty"); } if (y == null) { throw new IllegalArgumentException("y cannot be null"); } // Now I can actually start writing purposeful // code to accomplish the goal of this method I think this solution is ugly. Your methods quickly fill up with boilerplate code checking the valid input parameters contract, obscuring the heart of the method. Here's what I'd like to have: public void myContractualMethod(@NotNull @NotEmpty final String x, @NotNull final Set<String> y) { // Now I have a clean method body that isn't obscured by // contract checking If those annotations look like JSR 303/Bean Validation Spec, it's because I borrowed them. Unfortunitely they don't seem to work this way; they are intended for annotating instance variables, then running the object through a validator. Which of the many Java design-by-contract frameworks provide the closest functionality to my "like to have" example? The exceptions that get thrown should be runtime exceptions (like IllegalArgumentExceptions) so encapsulation isn't broken.

    Read the article

  • I'v installed NetBeans 6.8 on my MacOS X MacBook and the logs say it cannot be run, any ideas?

    - by codezealot
    I've installed NetBeans 6.8 on my MacBook, and the installation results indicated success. However, every single time I attempt to run the application is shuts down. I monitored the process and noticed the following entries in the console that imply the application cannot be found? 3/19/10 10:20:20 PM [0x0-0x22022].org.netbeans.ide.baseide.200912041610[22168] /Applications/NetBeans/NetBeans 6.8.app/Contents/MacOS/netbeans: line 57: dirname: command not found 3/19/10 10:20:20 PM [0x0-0x22022].org.netbeans.ide.baseide.200912041610[22168] Cannot read cluster file: /../etc/netbeans.clusters 3/19/10 10:20:20 PM com.apple.launchd.peruser.501[77] ([0x0-0x22022].org.netbeans.ide.baseide.200912041610[22168]) Exited with exit code: 1 I started researching how to set the default JDK for use by NetBeans, and found repeated use of the following command line entry; netbeans --jdkhome /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home -- from http://wiki.netbeans.org/JDKVersionAndMacOS When I attempt the command line above, I receive "netbeans command not found". So do I ... 1.) Need to create a command called "netbeans" that points to my install location for NetBeans 6.8? If so how do I do that? 2.) How do I get to the netbeans.conf file for NetBeans 6.8, does one even exist for it? It gets even more interesting, the above happens with Eclipse as well. Yippie.

    Read the article

  • Unable to display Google Map through API in Flex SDK

    - by Spero.ShiroPetto
    Hello, I am using the mxmlc to compile the examples from google to get started in using Google Maps API in Flex 4. But after compiling the swf file the map does not load. I've registered for an API key Downloaded and included the Maps SDK in the xml config file used at compile time C:\sdk\flex4\frameworks\flex-config.xml <external-library-path> <path-element>libs/google/maps/lib/map_flex_1_18.swc</path-element> </external-library-path> Foo.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" key="{KEY}"/> <mx:Script> <![CDATA[ import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType; private function onMapReady(event:Event):void { this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE); } ]]> </mx:Script> </mx:Application> Any tips on where to go from here? I can compile a basic flex project without problem and displays the components I put in so i'd imagine it's something to do with the API Key? Thanks for the help

    Read the article

  • iPhone: Proper use of View and View Controller

    - by Joel
    I've recently been doing a lot of Objective-C programming, and just got back into doing more iPhone development. I've done a lot of programming using MVC in other languages/frameworks, but I just want to make sure I'm using MVC properly in my iPhone Development. I created a new iPhone Utility Application, which creates two views: MainView and FlipsideView. Both have a controller (FlipsideViewController and MainViewController) and XIB file of their own. What I've been doing is putting the IBOutlet UIControl myControl variables in my MainView.h or FlipsideView.h files and then tying the controls in Interface Builder to those variables. Then I put any IBAction SomeAction myAction methods in the MainViewController.h and FlipsideViewController.h files and tying the events to those methods in Interface Builder. This seems to be conceptually correct, but seems to cause problems. Say I have a button that when clicked it changes a label's text. So the Controller doesn't have a clue of what the variable name of the label is in the OnTouchUp event handler for my button. So I make a @property for it. But since the MainViewController.view property isn't of type MyView, I get warnings or errors whenever I try to access those properties from the view controller. I am doing this correctly? Is there a better way to do this? If this is correct, how do I properly work with those variables without getting warnings or errors? Thanks

    Read the article

  • Error // Usage: rails new APP_PATH [options] // when running 'rails server'

    - by madphill
    Background info: I'm using GIT to get a repository of a project with Ruby files in it. The project lives in my SITES folder under home directory on my Mac. I have Ruby: 1.8.7 I have just upgraded Rails to: 3.0.3 All I am trying to accomplish is to be able to render localhost.com:3000 in my browser of the GIT project i've already downloaded so I can work on it locally. I ran the command 'rails server' and was returned the message below:: Usage: rails new APP_PATH [options] Options: [--skip-gemfile] # Don't create a Gemfile -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) # Default: sqlite3 -O, [--skip-active-record] # Skip Active Record files -J, [--skip-prototype] # Skip Prototype files -T, [--skip-test-unit] # Skip Test::Unit files [--dev] # Setup the application with Gemfile pointing to your Rails checkout -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -G, [--skip-git] # Skip Git ignores and keeps -b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL) [--edge] # Setup the application with Gemfile pointing to Rails repository Runtime options: -f, [--force] # Overwrite files that already exist -s, [--skip] # Skip files that already exist -p, [--pretend] # Run but do not make any changes -q, [--quiet] # Supress status output Rails options: -h, [--help] # Show this help message and quit -v, [--version] # Show Rails version number and quit Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog. See the README in the newly created application to get going.

    Read the article

  • Unit tests and Test Runner problems under .Net 4.0

    - by Brett Rigby
    Hi there, We're trying to migrate a .Net 3.5 solution into .Net 4.0, but are experiencing complications with the testing frameworks that can operate using an assembly that is built using version 4.0 of the .Net Framework. Previously, we used NUnit 2.4.3.0 and NCover 1.5.8.0 within our NAnt scripts, but NUnit 2.4.3.0 doesn't like .Net 4.0 projects. So, we upgraded to a newer version of the NUnit framework within the test project itself, but then found that NCover 1.5.8.0 doesn't support this version of NUnit. We get errors in the code saying words to the effect of the assembly was built using a newer version of the .Net Framework than is currently in use, as it's using .Net Framework 2.0 to run the tools. We then tried using Gallio's Icarus test runner GUI, but found that this and MbUnit only support up to version 3.5 of the .Net Frameword and the result is "the tests will be ignored". In terms of the coverage side of things (for reporting into CruiseControl.net), we have found that PartCover is a good candidate for substituting-out NCover, (as the newer version of NCover is quite dear, and PartCover is free), but this is a few steps down the line yet, as we can't get the test runners to work first!! Can any shed any light on a testnig framework that will run under .Net 4.0 in the same way as I've described above? If not, I fear we may have to revert back to using .Net 3.5 until the manufacturers of the tooling that we're currently using have a chance to upgrade to .Net 4.0. Thanks.

    Read the article

  • mod_cgi , mod_fastcgi, mod_scgi , mod_wsgi, mod_python, FLUP. I don't know how many more. what is mo

    - by claws
    I recently learnt Python. I liked it. I just wanted to use it for web development. This thought caused all the troubles. But I like these troubles :) Coming from PHP world where there is only one way standardized. I expected the same and searched for python & apache. http://stackoverflow.com/questions/449055/setting-up-python-on-windows-apache says Stay away from mod_python. One common misleading idea is that mod_python is like mod_php, but for python. That is not true. So what is equivalent of mod_php in python? I need little clarification on this one http://stackoverflow.com/questions/219110/how-python-web-frameworks-wsgi-and-cgi-fit-together CGI, FastCGI and SCGI are language agnostic. You can write CGI scripts in Perl, Python, C, bash, or even Assembly :). So, I guess mod_cgi , mod_fastcgi, mod_scgi are their corresponding apache modules. Right? WSGI is some kind of optimized/improved inshort an efficient version specifically designed for python language only. In order to use this mod_wsgi is a way to go. right? This leaves out mod_python. What is it then? Apache - mod_fastcgi - FLUP (via CGI protocol) - Django (via WSGI protocol) Flup is another way to run with wsgi for any webserver that can speak FCGI, SCGI or AJP What is FLUP? What is AJP? How did Django come in the picture? These questions raise quetions about PHP. How is it actually running? What technology is it using? mod_php & mod_python what are the differences? In future if I want to use Perl or Java then again will I have to get confused? Kindly can someone explain things clearly and give a Complete Picture.

    Read the article

  • Are there any prototype-based languages with a whole development cycle?

    - by Kaveh Shahbazian
    Are there any real-world prototype-based programming languages with a whole development cycle? "A whole development cycle" like Ruby and Python: web frameworks, scripting/interacting with the system, tools for debugging, profiling, etc. Thank you A brief note on PBPLs: (let's call these languages PBPL : prototype-based programming language) There are some PBPLs out there. Some are being widely used like JavaScript (which Node.js may bring it into the field - or may not!). One other language is ActionScript which is also a PBPL but tightly bound to Flash VM (is it correct to say so?). From less known ones I can speak of Lua which has a strong reputation in game development (mostly spread by WOW) but never took off as a full language. Lua has a table concept which can provide you some sort of prototype based programming facility. There is also JScript (Windows scripting tool) which is already pointless by the newcomer PowerShell (I have used JScript to manipulate IIS but I never understood what is JScript!). Others can be named like io (indeed very very neat, you will fall in love with it; absolutely impossible to use) and REBOL (What is this all about? A proprietary scripting tool? You must be kidding!) and newLISP (Which is actually a full language, but no one ever heard about it). For sure there are much more to list here but either I do not remember or I did not understood them as a real world thing, like Self).

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >