Daily Archives

Articles indexed Monday June 7 2010

Page 6/113 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How do I access site.project.rails (running on host) from VMWare fusion?

    - by Johnny Mnemonic
    I have a rails app setup and running on my snow leopard MacBook - the app is being served by Passenger. As part of the setup they had me add entries for 127.0.0.1 site.project.rails in my hosts file so I could reach the site from site.project.rails I can't for the life of me figure out how to get the app show up in VMWare. I have XP setup and browse to http://site.project.rails and I can't get it to show up. I setup a basic rails app, being served at localhost:3000 by webrick, I can get that to load by visiting my hosts ip (http://192.168.1.1:3000/). I added the same hosts I added on my Mac to Windows. I also Bridged the network under settings for the VM. What am I missing?

    Read the article

  • Prevent abuse of public HTTP directory meant for images

    - by sutre
    The situation: Each user has their own public HTTP directory, meant for images only. This could easily be abused by users using it to serve large files, wasting bandwidth. The question: Is there any fairly simple way to prevent this abuse? Either by allowing the webserver to only images to be served, restricting size, or some other method.

    Read the article

  • Google Web Toolkit Asynchronous Call from a Service Implementation

    - by Thor Thurn
    I'm writing a simple Google Web Toolkit service which acts as a proxy, which will basically exist to allow the client to make a POST to a different server. The client essentially uses this service to request an HTTP call. The service has only one asynchronous method call, called ajax(), which should just forward the server response. My code for implementing the call looks like this: class ProxyServiceImpl extends RemoteServiceServlet implements ProxyService { @Override public Response ajax(String data) { RequestBuilder rb = /*make a request builder*/ RequestCallback rc = new RequestCallback() { @Override public void onResponseReceived(Response response) { /* Forward this response back to the client as the return value of the ajax method... somehow... */ } }; rb.sendRequest(data, requestCallback); return /* The response above... except I can't */; } } You can see the basic form of my problem, of course. The ajax() method is used asynchronously, but GWT decides to be smart and hide that from the dumb old developer, so they can just write normal Java code without callbacks. GWT services basically just do magic instead of accepting a callback parameter. The trouble arises, then, because GWT is hiding the callback object from me. I'm trying to make my own asynchronous call from the service implementation, but I can't, because GWT services assume that you behave synchronously in service implementations. How can I work around this and make an asynchronous call from my service method implementation?

    Read the article

  • How to share a process?

    - by rudi
    How can I snuggle into another process? Like, share another process's name? So if my application is griddemo.exe, and I want to snug into, let's say, explorer.exe, is that possible? Just read something about CreateRemoteThread() from kernel32. Is that in the right direction? Would there be security/UAC issues?

    Read the article

  • Dataset and Hierarchial Data How to Sort

    - by mdjtlj
    This is probably a dumb question, but I've hit a wall with this one at this current time. I have some data which is hierarchial in nature which is in an ADO.NEt dataset. The first field is the ID, the second is the Name, the third is the Parent ID. ID NAME Parent ID 1 Air Handling NULL 2 Compressor 1 3 Motor 4 4 Compressor 1 5 Motor 2 6 Controller 4 7 Controller 2 So the tree would look like the following: 1- Air Handling 4- Compressor 6 - Controller 3 - Motor 2- Compressor 7- Controller 5 - Motor What I'm trying to figure our is how to get the dataset in the same order that ths would be viewed in a treeview, which in this case is the levels at the appropriate levels for the nodes and then the children at the appropriate levels sorted by the name. It would be like binding this to a treeview and then simply working your way down the nodes to get the right order. Any links or direction would be greatly appreciated.

    Read the article

  • How do I access a JavaFX 1.3 static class member from Java?

    - by James
    I want to access a static JavaFX class member from Java using the Javafx reflection API. E.g. JavaFX code: var thing; class MyJavaFXClass { } Java code: private Object getThing() { FXClassType classType = FXContext.getInstance().findClass("mypackage.MyJavaFXClass"); // Get static member 'thing' from 'MyJavaFXClass' // <Insert Code Here> return thing; } What Java code do I need to access 'MyJavaFXClass.thing'? Note: I am using JavaFX 1.3 - I'm not sure if the reflection API is different here to earlier JavaFX versions.

    Read the article

  • VS2008 on Win7 64-Bit: Debugging a Windows Service

    - by Richard
    Hi all, I'm trying to debug a Windows Service using VS2008 on Win7 64-Bit. The problem I'm having is that none of my breakpoints are being hit, regardless of which build configuration I choose: x86, x64 or AnyCPU. Using "Attach to Process" after the service has started, none of the breakpoints are hit - yet the IDE doesn't inform me that they won't be hit (by making the solid red circle and outline, for instance) - it simply seems to act as if the breakpoints weren't even there. Can anyone point me in the right direction here? Thanks /Richard.

    Read the article

  • Filtering MySQL query result according to a interval of timestamp

    - by celalo
    Let's say I have a very large MySQL table with a timestamp field. So I want to filter out some of the results not to have too many rows because I am going to print them. Let's say the timestamps are increasing as the number of rows increase and they are like every one minute on average. (Does not necessarily to be exactly once every minute, ex: 2010-06-07 03:55:14, 2010-06-07 03:56:23, 2010-06-07 03:57:01, 2010-06-07 03:57:51, 2010-06-07 03:59:21 ...) As I mentioned earlier I want to filter out some of the records, I do not have specific rule to do that, but I was thinking to filter out the rows according to the timestamp interval. After I achieve filtering I want to have a result set which has a certain amount of minutes between timestamps on average (ex: 2010-06-07 03:20:14, 2010-06-07 03:29:23, 2010-06-07 03:38:01, 2010-06-07 03:49:51, 2010-06-07 03:59:21 ...) Last but not least, the operation should not take incredible amount of time, I need this functionality to be almost fast as a normal select operation. Do you have any suggestions?

    Read the article

  • How to disable automatic loading in NHibernate?

    - by Drevak
    This question might be a duplicate of this one: http://stackoverflow.com/questions/217761/nhibernate-disable-automatic-lazy-loading-of-child-records-for-one-to-many-rela I'd like to know if there is any way to tell nhibernate to do not load a child collections (best if it's with fluent Nhibernate) unless i do it manually with a query (keeping all the mappings!). The problem is that even turning off lazy loading the collections get eager-loaded automatically. I'd like that no collections are loaded unless I specify a fetchmode in my query.

    Read the article

  • Dreamweaver regular expression substitution followed by number

    - by mark
    Hi. I'm using Dreamweaver to update copyright dates across my site. I want to preserve the existing spacing (or lack thereof) between years. Examples: © 2002-2008 should update to © 2002-2009 © 2003 - 2008 should update to © 2003 - 2009 This is the regular expression I'm using to accomplish this in Dreamweaver's find & replace function Find: ©\s*(\d{4}\s*-\s*)\d{3}[^9] Replace: © $1 2009 Here's the PROBLEM: This expression works, but has that that extra space between the hyphen and 2009. If I write the replace expression without the space, as © $12009 then dreamweaver looks for the 12,009th substitution in the find expression, and, not finding one, prints $12009. Any ideas?

    Read the article

  • How to cause bindings to be updated, particularly for derived values?

    - by rrhartjr
    I'm using some CLR objects that use the INotifyPropertyChanged interface and use the PropertyChanged function to update in WPF bindings. Pretty boilerplate: protected void RaisePropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } Then the property: private double m_TotalWidgets = 0; public double TotalWidgets { get { return m_TotalWidgets; } set { m_TotalWidgets = value; RaisePropertyChanged("TotalWidgets"); } } Is there a better way to update a derived value or even the whole class? Say I had a calculated value: public double ScaledWidgets { get { return TotalWidgets * CONSTANT_FACTOR; } } I would have to fire ScaledWidget's PropertyChanged when TotalWidgets is updated, eg: set { m_TotalWidgets = value; RaisePropertyChanged("TotalWidgets"); RaisePropertyChanged("ScaledWidgets"); } Is there a better way to do this? Is it possible "invalidate" the whole object, especially if there are a lot of derived values? I think it would be kind of lame to fire 100 PropertyChanged events.

    Read the article

  • Where can I find old versions of linksys router firmware?

    - by Doug T.
    Hello everyone, I've had a headache of a weekend after upgrading to the latest firmware for my wrt54g. Suffice it to say I'm not satisfied with the latest version. Now I'm looking around for the previous version of the firmware out there on the interwebs and am having trouble. I noticed that linksys at one point had an ftp site: ftp://ftp.linksys.com. There you could find old firmware for your device. It now appears defunct. Does anyone know where I could find old firmware versions for my wrt54g router?

    Read the article

  • Printing to different printers using mozilla.

    - by Nick-ACNB
    I am currently creating a web application that will be deployed in an intranet environment. I chose firefox to be the browser that will run it. However, in the application I am building, I need to be able to print to different printers quickly since they use different paper size depending on what client is coming. To avoid many time-wasting mistakes that could occur, for instance someone choosing the wrong printer and wasting paper. Also, the time used to find the right printer for the job and then pressing print is considered too long in the current context. Is there any solution to this problem? I understand the potential security flaw behind this, but please be aware that this is solely an intranet project and that I can reduce the browser's security to the lowest since they don't access internet. I know there could be something doable behind IE (ActiveX or VBScript) but I am using firefox. Also, I guess there could also be something rather tricky that when you press print on the browser, it saves what needs to be printed to a DB and then there is an exe app that runs and fetch that DB every set ammount of time and print to the right printer. Any suggestion would be greatly appreciated. I doubt I am the only one to ever face this issue! :) Thank you very much.

    Read the article

  • deriving activity diagram-based GUIs and CRUD them with a DB?

    - by Xin Tanaka
    i received a big book full of processes. i was thinking about the end user (they will be lawyers) and decided the best GUI would be showing activity diagrams or business processes. It reminded me Quickbooks and how non-accountants can successfully use it and understand accounting processes. i began doing research before sending my project to a bunch of programmers: is there some open source solution? can i use MS Visio libraries? which UML tool is programable? what about Eclipse and its modeling tools? etc etc the key points here are: relationships between events, artifacts, actors, etc should be stored in a database. processes or steps in a process should be easily modified by updating the database do this sounds too crazy? (should I explain a bit more why it must be programmed this way?)

    Read the article

  • Which is clearer form: if(!value) or if(flag == value) ?

    - by CodexArcanum
    I understand this is a subjective question, so I apologize if it needs to be closed, but I feel like it comes up often enough for me to wonder if there is a general preference for one form over the other. Obviously, the best answer is "refactor the code so you don't need to test for falsehood" but sometimes there's no easy way to do so and the "else" branch is simply to continue processing. So when you must have an "if not false" construct, which is the preferred standard: The not operator if(!value) Or the test for false if(value == false)

    Read the article

  • I need to debug my BrowserHelperObject (BHO) (in C++ with Visual Studio 2008) after a internet explo

    - by BHOdevelopper
    Hi, here is the situation, i'm developping a Browser Helper Object (BHO) in C++ with Visual Studio 2008, and i learned that the memory wasn't managed the same way in Debug mode than in Release mode. So when i run my BHO in debug mode, internet explorer 8 works just fine and i got no erros at all, the browser stays alive forever, but as soon as i compile it in release mode, i got no errors, no message, nothing, but after 5 minutes i can see through the task manager that internet explorer instances are just eating memory and then the browser just stop responding every time. Please, I really need some hint on how to get a feedback on what could be the error. I heard that, often it was happening because of memory mismanagement. I need a software that just grab a memory dump or something when iexplorer crashes to help me find the problem. Any help is appreciated, I'll be looking for responses every single days, thank you.

    Read the article

  • GWT as offline app, to be deployed onto an iPad

    - by Maroloccio
    I often use GWT for web UIs. I have heard of it being used a fair bit in conjunction with Gears for offline solutions (probably nowadays HTML5 "offline storage" is all the rage) and I'd like to experiment with building a GUI in GWT and use it on my iPad. Tips/tutorials on how to deploy it onto the device to act as much as possible like a resident "App"? This is just a curiosity/experiment to fill a week-end... (I can "free" the iPad for the experiment if need be yet I am sure a lot can be done without doing so...)

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >