Search Results

Search found 5749 results on 230 pages for 'miles away'.

Page 128/230 | < Previous Page | 124 125 126 127 128 129 130 131 132 133 134 135  | Next Page >

  • Firefox why window.opener is defined even for a new tab

    - by jonny
    Hi! I am porting quite old corp application from IE to Firefox. Here is my situation. User goes away from computer for a while and his session becomes expired. When user tries to access something in popup, he is being redirected to login page (in popup window). In login page onload event popup window chain is being closed and root page refreshed (in root page tab user is redirected to login page). The guy before me wrote this like this: if window.top.opener is undefined, we're not in popup. That's why I am getting non-stoppable refresh in Firefox. Why in Firefox window.opener is still defined and points to same window, even if this is a new tab, not popup? How should I correctly determine that current window is popup?

    Read the article

  • Spring vs Hibernate

    - by Vidar
    Just trying to get my head round Spring and figuring out how I wire up an Oracle connection in xml config file, and now find out I need yet another framework! - Hibernate, this is soooo frustrating as it feels like I'm getting deeper and deeper into more and more frameworks without actually getting what I need done! I looked at Hibernate and it seems to do similar things to Spring, bearing in mind I just want to do some SQL inserts in Oracle. I am reluctant and do not have time to learn 2 frameworks - could I get away with just adopting Hibernate for the simple things I need to do?

    Read the article

  • "Temporary object" warning - is it me or the compiler?

    - by Roddy
    The following snippet gives the warning: [C++ Warning] foo.cpp(70): W8030 Temporary used for parameter '_Val' in call to 'std::vector<Base *,std::allocator<Base *> >::push_back(Base * const &)' .. on the indicated line. class Base { }; class Derived: public Base { public: Derived() // << warning disappears if constructor is removed! { }; }; std::vector<Base*> list1; list1.push_back(new Base); list1.push_back(new Derived); // << Warning on this line! Compiler is Codegear C++Builder 2007. Oddly, if the constructor for Derived is deleted, the warning goes away... Is it me or the compiler?

    Read the article

  • Is naming a software product the same as a book legally problematic?

    - by Jake Petroules
    I came up with a name for a software product I'm developing. It's composed of two common English words put together (for example, Firefox, Silverlight, etc.). I Googled the name to see if it was being used by any other software product before committing to it. After finding none, I did notice that there is a book published around 60 years ago, by that same name. Would it be legally problematic to name my software product as such, or does it being a software product vs a book make it irrelevant? PS - I know this isn't really a programming question, but naming is related to software development, isn't it? ;) PPS - How do companies like Microsoft get away with naming things "Windows" and "Office"? Or are they just legally called "Microsoft Windows" and "Microsoft Office"? Do developer names always precede software product names? Would naming a software product "Jones Office" be illegal?

    Read the article

  • Do Hibernate table classes need to be Serializable?

    - by Scott Leis
    I have inherited a Websphere Portal project that uses Hibernate 3.0 to connect to a SQL Server database. There are about 130 Hibernate table classes in this project. They all implement Serializable. None of them declare a serialVersionUID field, so the Eclipse IDE shows a warning for all of these classes. Is there any actual need for these classes to implement Serializable? If so, is there any tool to add a generated serialVersionUID field to a large number of classes at once (just to make the warnings go away) ?

    Read the article

  • Determine when using the VC90 compiler in VS2010 instead of VS2008?

    - by Dan
    Is there a (Microsoft-specific) CPP macro to determine when I'm using the VC9 compiler in Visual Studio 2010 as opposed to Visual Studio 2008? _MSC_VER returns the compiler version, so with VS2010 multi-targeting feature, I'll get the same result as with VS2008. The reason for wanting to know the difference is that I created a new VS2010 project which contains code removed from a larger project. I just left the VS2008 stuff "as is" since we're moving away from VS2008 "soon" anyway and I didn't want to go through the hassle of creating a vcproj file along with the new vcxproj. For now, I've just defined my own macro to indicate whether the code is compiled into its own DLL or not; it works just fine, but it would be nice if there were something slightly more elegant.

    Read the article

  • Best way to show a loading screen in an iPhone app?

    - by pkulak
    I'm building what is essentially a web app. Every piece of data has to be fetched from a web API. So, every UITableView that I show takes some amount of time to fill with data and I'm struggling to find a good way to show the user a loading screen. Right now I'm popping up an action sheet, but that just seems a bit wrong. Ideally, I'd popup up a blank view over the tableview with "Loading..." on it, then fade it away when the data comes in, but I can't think of a way to do that in 8 places in my app without massive code duplication.

    Read the article

  • What exactly is Two-way databinding in WPF ?

    - by blntechie
    I'm learning WPF with MVVM and for a starter, I viewed Jason Dolinger's video on MVVM . In that he mentioned, that one of the advantage of using MVVM with WPF is two-way data binding. My question is what does he mean by two-way data binding? Is that the feature of ability to 1) bind data from controls(View) to properties in VM and 2) any change in collections or properties are reflected in the view? If I'm wrong, can anyone please explain me in detail what it is and what are its advantages? This might be a very simple doubt, but I'm very new to WPF and it's terminologies and moving away from WinForms now.

    Read the article

  • Strategies for generating Zend Cache Keys

    - by emeraldjava
    ATM i'm manually generating a cache key based on the method name and parameters, then follow to the normal cache pattern. This is all done in the Controller and i'm calling a model class that 'extends Zend_Db_Table_Abstract'. public function indexAction() { $cache = Zend_Registry::get('cache'); $individualleaguekey = sprintf("getIndividualLeague_%d_%s",$leagueid,$division->code); if(!$leaguetable = $cache->load($individualleaguekey)) { $table = new Model_DbTable_Raceresult(); $leaguetable = $table->getIndividualLeague($leagueid,$division,$races); $cache->save($leaguetable, $individualleaguekey); } $this->view->leaguetable = $leaguetable; .... I want to avoid the duplication of parameters to the cache creation method and also to the model method, so i'm thinking of moving the caching logic away from my controller class and into model class packaged in './model/DbTable', but this seems incorrect since the DB model should only handle SQL operations. Any suggestions on how i can implement a clean patterned solution?

    Read the article

  • What is the cost in bytes for the overhead of a sql_variant column in SQL Server?

    - by Elan
    I have a table, which contains many columns of float data type with 15 digit precision. Each column consumes 8 bytes of storage. Most of the time the data does not require this amount of precision and could be stored as a real data type. In many cases the value can be 0, in which case I could get away with storing a single byte. My goal here is to optimize space storage requirements, which is an issue I am facing working with a SQL Express 4GB database size limit. If byte, real and float data types are stored in a sql_variant column there is obviously some overhead involved in storing these values. What is the cost of this overhead? I would then need to evaluate whether I would actually end up in significant space savings (or not) switching to using sql_variant column data types. Thanks, Elan

    Read the article

  • Create Outlines around line.

    - by Eric Muller
    Hi SO community! I am drawing graphs into a WinForms Picturebox. Now I am searching for a possibility to 'duplicate' a line (an array of points), so that the two resulting lines are positioned a fixed distance away from the original one. Like in this picture, I have the red line and want to get the black ones: I thought about just moving the line a few pixels up/right/up-right, but that leads to strange overlapping lines. Is there any other approach that does what I want? Any ideas would be greatly appreciated. Thanks!

    Read the article

  • Upsert - Efficient Update or Insert in VB.Net, SQL Server

    - by HK1
    I'm trying to understand how to streamline the process of inserting a record if none exists or updating a record if it already exists. I'm not using stored procedures, although maybe that would be the most efficient way of doing this. The actual scenario in which this is necessary is saving a user preference/setting to my SettingsUser table. In MS Access I would typically pull a DAO recordset looking for the specified setting. If the recordset comes back empty then I know I need to add a new record which I can do with the same recordset object. On the other hand, if it isn't empty, I can just update the setting's value right away. In theory, this is only two database operations. What is the recommended way of doing this in .NET?

    Read the article

  • How can I keep gnu screen from becoming unresponsive after losing my SSH connection?

    - by Mikey
    I use a VPN tunnel to connect to my work network and then SSH to connect to my work PC running cygwin. Once logged in I can attach to a screen session and everything works great. Now, after a while, I walk away from my computer and sooner or later, the VPN tunnel times out. The SSH connection on each end eventually times out and then I eventually come back to my computer to do some work. Theoretically, this should be a simple matter of just restarting the VPN, reconnecting via SSH, and then running "screen -r -d". However apparently when the sshd daemon times out on the cygwin PC, it leaves the screen session in some kind of hung state. I can reproduce a similar hung state by clicking the close box on a cygwin bash shell window while it's running a screen session. Is there any way to get the screen session to recover once this has happened, so that I don't lose anything?

    Read the article

  • Can I send a variable to paypal, and have it post it back to me when payment completes?

    - by Yegor
    Ive been using express checkout API to convert people's accounts on my site to premium accounts after paying. The only problem with it is that it doesn't send the user back to the site until they click the button to return, and it updates their permission when that happens. About 40% of the users don't seem to do that.... so their accounts never get credited after payment. Although paypal does an instant post-back upon the successful payment, I was never able to make it actually update the user's account right away, since I cant get it to send back some sort of informational that would identify the user that just completed the payment. I could only do that when you are sent back to the site, which sends the transaction ID, that I logged with a post-back. It searches for it, and grants permission if it was found int he DB. Is there a way to submit some sort of a variable to paypal, that it will then post back to me? Something like &user_id=123, which would make it very handly to update the user's permission.

    Read the article

  • JSObject-like stuff in ActionScript 3?

    - by johncch
    I would like to ask if there is a liveconnect equivalent for ActionScript 3. I understand that there is the ExternalInterface class inside AS3 but it only supports calling a method by name. The really cool thing about Java and LiveConnect is that you can do something like function jsFunc(name) = { this.name = name; this.talk = function(){ alert('hello world my name is ' + this.name); } } javaapplet.function(new jsFunc("bob")); The above approaches pseudo code since I never tested it but I've seen it in action. In AS3, while I am able to pass in an instance of JavaScript "object" into AS, it is often converted into an ActionScript Object instance which does away with all the functions as far as I'm aware. I saw an implementation of JSInterface but I don't think it does specifically that. Is there any way to make OO like javascript work with ActionScript 3?

    Read the article

  • Accessing parent 'this' inside a jQuery $.getJSON

    - by JP
    I'm going to assume that the overall structure of my code as it currently stands is 'best', otherwise this question gets too long, but if I've made any obvious mistakes (or if I've made life hard for myself) then please correct away! Using jQuery, I have a javascript 'class' set out something like this: function MyClass () { this.noise = "Woof" this.dostuff = function() { $.getJSON("http://cows.go",function(moo) { this.noise = moo.inEnglish; } } } var instance = new MyClass(); instance.doStuff() console.log(instance.noise) I'm expecting some kinda tea drinking moo in the console, but of course I'm getting an error about this.noise not being defined (because $.getJSON doesn't pass this through, right?) Any suggestions as to how to be able to affect instance.squeak for any and all instances of MyClass without interference?

    Read the article

  • How would you implement the "tell don't ask" principle in HAML?

    - by Enrique Ramírez Vélez
    Here's the thing. I have a button that, depending on the scenario, will behave, look and have different text. Here's how it, roughly, looks like at the moment: - if params[:param_A] && @statement_A %span.button.cancel_button{attribute: "value_B"} - if @statement_B = t('locale_A') - else = t('locale_B') - elsif params[:param_A] %span.button.cancel_button{attribute: "value_A"} - if @statement_B = t('locale_A') - else = t('locale_B') There's also a CSS class both buttons should have IF statement_B is true. So it is a mess. And I recently read about the "Tell, don't ask" principle which I liked very much, so I'd love to apply it here... but I'm not sure how. I know I could make a helper, but I'd like to stay away from them because reasons (I really have some valid reasons to do so, but those are beyond the scope of this question). I can resort to that as a last resource, but would rather find another solution.

    Read the article

  • jQuery Tablesorter - disabled headers show progress bar, sortEnd never triggered

    - by McGirl
    I'm combining Tablesorter's 'disable headers using options' function and the 'trigger sortStart / sortEnd' function and have run into an issue. The following code works fine for the most part, BUT: when you click on a disabled header, the progress-indicating #overlay div appears and never goes away. <script type="text/javascript" id="js"> $(document).ready(function() { // call the tablesorter plugin, the magic happens in the markup $("#projectTable").tablesorter({ // pass the headers argument and assing a object headers: { // assign the secound column (we start counting zero) 1: { // disable it by setting the property sorter to false sorter: false }, // assign the third column (we start counting zero) 2: { // disable it by setting the property sorter to false sorter: false } } }); //assign the sortStart event $("#projectTable").bind("sortStart",function() { $("#overlay").show(); }).bind("sortEnd",function() { $("#overlay").hide(); }); }); </script> Any ideas on how I could fix this so that nothing at all happens when the disabled headers are clicked? Thanks!

    Read the article

  • Is it possible to use an input within a <label> field?

    - by javanix
    I have a bunch of optional "write-in" values for a survey I'm working on. These are basically a radio button with a textbox within the answer field - the idea being that you would toggle the button and write something into the box. What I'd like to do is have the radio button toggled whenever a user clicks in the text field - this seems like a use-case that makes a lot of sense. Doing this: <input type="radio" id="radiobutton"><label for="radiobutton">Other: <input type="text" id="radiobutton_other"></label> works fine in Chrome (and I am guessing, other WebKit browsers as well), but there are weird selection issues in Firefox, so I'm assuming its a non-standard practice that I should stay away from. Is there a way to replicate this functionality without using JavaScript? I have an onclick function that will work, but we're trying to make our site usable for people who might have NoScript-type stuff running.

    Read the article

  • Is multi-level polymorphism possible in SQLAlchemy?

    - by Jace
    Is it possible to have multi-level polymorphism in SQLAlchemy? Here's an example: class Entity(Base): __tablename__ = 'entities' id = Column(Integer, primary_key=True) created_at = Column(DateTime, default=datetime.utcnow, nullable=False) entity_type = Column(Unicode(20), nullable=False) __mapper_args__ = {'polymorphic_on': entity_type} class File(Entity): __tablename__ = 'files' id = Column(None, ForeignKey('entities.id'), primary_key=True) filepath = Column(Unicode(255), nullable=False) file_type = Column(Unicode(20), nullable=False) __mapper_args__ = {'polymorphic_identity': u'file', 'polymorphic_on': file_type) class Image(File): __mapper_args__ = {'polymorphic_identity': u'image'} __tablename__ = 'images' id = Column(None, ForeignKey('files.id'), primary_key=True) width = Column(Integer) height = Column(Integer) When I call Base.metadata.create_all(), SQLAlchemy raises the following error: NotImplementedError: Can't generate DDL for the null type IntegrityError: (IntegrityError) entities.entity_type may not be NULL. This error goes away if I remove the Image model and the polymorphic_on key in File. What gives? (Edited: the exception raised was wrong.)

    Read the article

  • C++ Asymptotic Profiling

    - by Travis
    I have a performance issue where I suspect one standard C library function is taking too long and causing my entire system (suite of processes) to basically "hiccup". Sure enough if I comment out the library function call, the hiccup goes away. This prompted me to investigate what standard methods there are to prove this type of thing? What would be the best practice for testing a function to see if it causes an entire system to hang for a sec (causing other processes to be momentarily starved)? I would at least like to definitively correlate the function being called and the visible freeze. Thanks

    Read the article

  • Visual Studio 2010 "Not enough storage is available to process this command"

    - by Daniel Perez
    I'm fighting with VS 2010 and this error that seems to be very common in previous versions, but it looks like not everyone is having it in the latest version. I've got VS 2010 SP1 and I'm getting this error quite often. The problem is that it's not even enough to restart VS in order to make it go away, I usually have to restart my pc, and i'm losing a lot of time doing this (it's quite frequent) I've got Windows 7 32bits (can't upgrade to 64 bits, the company doesn't allow it), and I can't do things like creating another solution (please don't reply this :) ) I've used the command to make devenv.exe LARGEADDRESSAWARE, but the error keeps on happening My virtual memory size is set to automatic, and the weird thing is that VS doesn't even take 2gb of ram, so I don't know if the error is really because it's lacking memory, or if it's some bug in the program any ideas, things to try, something?

    Read the article

  • Magento connect stuck while installing

    - by itsandy
    Hi Everyone, I am facing this problem while installing extensions, themes basically anything from magento connect. When I enter the extension key and click install It just gets stuck and even when it says done and I try and go back on admin page it says "There are PEAR processes running. If you will close the window or navigate away from the page, installation will be interrupted. " Has anyone faced this problem. I am working on ubuntu 9.1 and having magento 1.4. Any help would be highly appreciated. Cheers

    Read the article

  • Can anyone tell me if this is possible to do in Linq?

    - by user275561
    So I have been working and trying for a couple of hours. I am creating a BubbleBreaker type of game. I Can do it using for loop or while but I am trying to also get practice in using Linq. Here is what I am trying to do in pesudo code. Each Bubble has a Column and Row Property. If The bubble subtracts one from its Column property and finds the same Color bubble, it should Select it then Subtract -1 and see if two bubbles away there is also a same color bubble. If there is then subtract -2 and so on. So What I am trying to do is var test= _theBubbles.TakeWhile((i, s) => i.BubbleColor== bubble.BubbleColor)//Then somehow tell it to do bubble.Column-s and then Subtract s from bubble.Column So the Idea is to keep looking down the column till the bubble isnt the same

    Read the article

  • window.onbeforeunload ajax request problem with Chrome

    - by lang2
    Hello, I have a web page that handles remote control of a machine through Ajax. When user navigate away from the page, I'd like to automatically disconnect from the machine. So here is the code: window.onbeforeunload = function () { bas_disconnect_only(); } The disconnection function simply send a HTTP GET request to a PHP server side script, which does the actual work of disconnecting: function bas_disconnect_only() { var xhr = bas_send_request("req=10", function() { } ); } This works fine in FireFox. But with Chrome, the ajax request is not sent at all. There is a unacceptable workaround: adding alert to the callback function: function bas_disconnect_only() { var xhr = bas_send_request("req=10", function() { alert("You're been automatically disconnected."); } ); } After adding the alert call, the request would be sent successfully. But as you can see, it's not really a work around at all. Could somebody tell me if this is achievable with Chrome? What I'm doing looks completely legit to me. Thanks,

    Read the article

< Previous Page | 124 125 126 127 128 129 130 131 132 133 134 135  | Next Page >