Search Results

Search found 3044 results on 122 pages for 'scope'.

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

  • My Oracle 9i package won't compile, says that a user-defined function is out of scope... but it isn'

    - by bitstream
    I have an Oracle package which contains user-defined functions and procedures, including two user-defined functions which are called from SELECT and UPDATE statements. The functions in question are defined before the procedures that call them. This piece of code compiles and works fine on Oracle 10g but won't compile on 9i. The code should work as-is according to Oracle's own documentation. Any idea why it would throw this error on 9i?

    Read the article

  • Pass page scope attributes to a JSP using pagecontext.include for use in JSTL?

    - by hal10001
    We're using this JSP template solution almost verbatim at work: http://java.sun.com/developer/technicalArticles/javaserverpages/jsp_templates/ When it gets JSP pages to be included, it uses pageContext.include, which leaves us with one problem, and that is that we have a lot of scriplet code that gets initialized in the JSP itself (tag soup). My thought was to modify the template tag with an additional attribute that is a package path reference to a class with an init or execute method. That execute would get called first, and would add page context attributes before including the JSP. We would then use JSTL to access those attributes. However, I was told this wouldn't work because of how pageContext.include works, and the inability to pass through attributes scoped to the page. Is that true, and are there workarounds? I'm so-so on knowing all my scoping rules.

    Read the article

  • How do I resolve this scope issue in VB .NET?

    - by froadie
    I have a code structure something like this: For row = 1 To numRows Dim arrayIndex As Integer = 0 For column As Integer = bucketStartColumn To bucketEndColumn ' whatever code arrayIndex = arrayIndex + 1 Next Next Dim arrayIndex As Integer = 0 For column As Integer = bucketStartColumn To bucketEndColumn ' whatever code arrayIndex = arrayIndex + 1 Next Not exactly the code, so I don't really need suggestions about refactoring, but my problem is this - with this code I get a compiler error for the first Dim arrayIndex As Integer = 0 - "Variable 'arrayIndex' hides a variable in an enclosing block." As far as I can tell, arrayIndex is local to the first for loop and shouldn't exist by the time we reach the second loop. If I try to change the second declaration of arrayIndex to arrayIndex = 0, I get the error "Name 'arrayIndex' is not declared", as I expected. So is it visible, or not? Does this have something to do with the Dim keyword? Any suggestions of how to get around this, other than naming the second index variable something else?

    Read the article

  • What's the scope of a Python variable declared in an if statement?

    - by froadie
    I'm new to Python, so this is probably a simple scoping question. The following code in a Python file (module) is confusing me slightly: if __name__ == '__main__': x = 1 print x In other languages I've worked in, this code would throw an exception, as the x variable is local to the if statement and should not exist outside of it. But this code executes, and prints 1. Can anyone explain this behavior? Are all variables declared in a module global/available to the entire module?

    Read the article

  • will_paginate with named_scopes

    - by Lowgain
    I'm using will_paginate for pagination, which has been working well so far, except for this one thing. If I try to paginate a scope, for instance class User < ActiveRecord::Base named_scope :scope, lambda { etc } end User.scope.paginate({:page => params[:page], :per_page => 10}) That will tell me paginate is an undefined method. I'd rather not have to use a second solution for only this scope, is there something I can do here?

    Read the article

  • Passing arguments to scope_procedure in searchlogic

    - by Greg
    I'd like to use searchlogic's scope_procedure feature like so class MyModelObject < ActiveRecord::Base scope_procedure :my_scope_proc, lambda { |p1, p2| { :conditions => "p1 >= #{p1} AND p2 < #{p2}" }} end Then, I am doing the search: scope = MyModelObject.search(:my_scope_proc => true) scope.all The above code obviously doesn't work because I didn't pass p1 and p2 parameters to my named scope. I can't figure out how to pass parameters to the named scope.

    Read the article

  • RSpec and stubbing parameters for a named scope

    - by Andy Waite
    I'm try to write a spec for a named scope which is date dependent. The spec: it "should return 6 months of documents" do Date.stub!(:today).and_return(Date.new(2005, 03, 03)) doc_1 = Factory.create(:document, :date => '2005-01-01') Document.past_six_months.should == [doc_1] end The named scope in the Document model: named_scope :past_six_months, :conditions => ['date > ? AND date < ?', Date.today - 6.months, Date.today] The spec fails with an empty array, and the query in test.log shows why: SELECT * FROM "documents" WHERE (date > '2009-11-11' AND date < '2010-05-11') i.e. it appears to be ignoring my stubbed Date method. However, if I use a class method instead of a named scope then it passes: def self.past_six_months find(:all, :conditions => ['date > ? AND date < ?', Date.today - 6.months, Date.today]) end I would rather use the named scope approach but I don't understand why it isn't working.

    Read the article

  • using pom for test scope dependencies

    - by IttayD
    Hi, Is it possible to create a pom file so it can be used inside another pom to add test scope dependencies? So in module E's pom.xml I have: <dependencies> <dependency> <groupId>com.example</artifactId> <artifactId>D</artifactId> <type>pom</type> <scope>test</scope> </dependency> </dependencies> So that if D's pom.xml contains dependencies on artifacts A, B, C, then these artifacts are in the compilation and execution classpath of E's tests. NOTE: the reason I want such a pom, and not rely on regular dependency resolution is that I have created a tests jar using maven-jar-plugin:test-jar and using that jar as a dependency causes maven to not use its transitive dependencies. (see http://jira.codehaus.org/browse/MNG-1378) UPDATE: this does not work for me (maybe because I'm trying to use it for the test scope): http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html

    Read the article

  • How to change scope data in controller?

    - by Derooie
    I am a real newbie at angular. I created something now which will let me retrieve and add items via angular and get/put them in mongodb. I use express and mongoose in the app The question is, how can i modify the data before it reaches the DOM in the controller. In this example i have created a way to retrieve data, and i get it exactly as it is stored in mongodb. What i would like is that the field where i store 1 or 0 in the database, to be shown as text. So if mongo has a value 1 i get "the value in mongo is 1" and when the field has a value of 0 get "the value is zero". (just as an example, i like other texts, but it illustrate what i want) I post my controller, html and current output. Any help would be appreciated. Controller function getGuests($scope, $http) { $scope.formData = {}; $http.get('/api/guests') .success(function(data) { $scope.x = data; }) .error(function(data) { console.log('Error: ' + data); }); } HTML <div ng-controller="getGuests"> <div ng-repeat="guest in x"> {{ guest.voornaam }} {{ guest.aanwezig }} </div> </div> The current scope output, what i see in HTML. I like to change only the value of "aanwezig" in case the value of aanwezig is 0 or 1. firstname1 1 firstname2 0 Something else, but would be great to learn, is how i can do a specific mongodb query by the push of a button and get that result.

    Read the article

  • Apache: scope for environmental variables

    - by Anonymous
    While there's documentation available on Apache environmental variables, I can not find answer to one important question. Imagine I use rewrite rules to set environmental variable RewriteRule ... ... [E=something:1] What is the scope of "something" - global Apache server (this means "something" will be available for other request transactions), this request (means that "something" is only valid for THIS http request (and its related processing - but what's about internal redirects and other internal stuff - are they considered as THIS request, or another one?), and may be set differently within another (concurrent) request?

    Read the article

  • iPhone development: Best method to allow user to chose search scope

    - by Mark Pemburn
    Hi, I'm developing my first iPhone app and want to allow the user to select the scope of their search in a more complex way than the 'scope buttons' permit. The app is related to wines and I want to the user to be able to select the 'color' (Red, White, Blush, etc.) first, and then select the type/varietal within that category. Right now, I'm using the UISearchBar's scope buttons for the colors and tapping the button opens a view with the selection of colors. This is okay except that once the 'Red' button has been selected, I can't select it a second time to change my choice of type (e.g., change from 'Merlot' to 'Syrrah', etc.) If there's a better way to do this, I'm willing to scrap my method and start from scratch. Thanks!

    Read the article

  • How to call angular javascript directive methods from the global scope

    - by user1659278
    I have a directive like the one of the examples from AngularJS, shown below. How can I call the toggle method from the global scope? I want to be able to toggle the zippy from some legacy code. myApp.directive('zippy', function(){ return { restrict: 'E', replace: true, transclude: true, scope: { title:'bind' }, template: '<div class="zippy">' + '<div class="title">{{title}}</div>' + '<div class="body" ng-transclude></div>' + '</div>', link: function(scope, element, attrs) { var title = angular.element(element.children()[0]), opened = true; title.bind('click', toggle); function toggle() { opened = !opened; element.removeClass(opened ? 'closed' : 'opened'); element.addClass(opened ? 'opened' : 'closed'); } toggle(); } } });

    Read the article

  • Using scope, defined in parent model, inside it's child (STI pattern)

    - by Anton
    I implement a class hierarchy using STI pattern class A scope :aaa, where([someField]:[someValue]) end class B < A end The problem is that when I try to call something like: B.limit(5).aaa => SELECT "[table]".* FROM "[table]" WHERE "[table]"."type" IN ('A') AND ([someField] = [someValue]) LIMIT 5 So I am getting 5 objects of type A, which satisfies scope :aaa But I need to do the same with rows where type = "B" Is there any way to use scopes from parent, without redifinning it in childs in STI pattern? Thanks in advance EDITED I just discussed it with my frind and he showed me one important thing. A in not the root class of STI. IN fact whole hierarchy looks like class O < ActiveRecord::Base end class A < O scope ..... ..... end class B < A end maybe the reason is in hierarchy itself?...

    Read the article

  • Rails Scope for association of 0 size.

    - by MissingHandle
    I'm having trouble figuring out the scope method for all the Foos that have no Bars. That is: class Foo < ActiveRecord::Base has_may :bars end class Bar < ActiveRecord::Base belongs_to :foo end I'd like to write a scope method that returns me all the foos that have no bars. Something like: class Foo < ActiveRecord::Base has_may :bars scope :has_no_bars, includes(:bars).where("COUNT(foo.bars) = 0") end But I don't understand the appropriate syntax. Any help? Happy to use a MetaWhere solution if easier.

    Read the article

  • Why ADF Developers Should Attend ODTUG This Year

    - by shay.shmeltzer
    If you are using Oracle ADF or planning to pick it up in the next year, I would encourage you to try and attend this year's ODTUG K-Scope conference. If you are not familiar with it, ODTUG - the Oracle Development Tools User Groups - holds a yearly conference that is very technical in nature. It is not a huge conference in terms of the number of attendees, but this just means that you have more opportunities to interact with Oracle ACEs, Oracle Product Managers, and other developers. The conference is known to be a no-fluff, no-marketing, technical conference. This year however there is one key new thing that should be of interest to readers of this blog. A new track called the "Fusion Middleware" track has been formed and it has lots of sessions for any level of ADF developer. The track is run by several Oracle ACEs who are also involved in the ADF Enterprise Methodology Group. They have sessions for every level of ADF awareness - from the beginner to the expert, and you can also learn about related technologies such as WebCenter and SOA Suite. Most of the sessions are run by users who share their real world experience with the technology. And me and other PMs will also be running a few sessions and hands-on labs there. Check out the list of sessions in the Fusion Middleware track. And don't miss the Sunday symposium too.

    Read the article

  • Is my JS/Jquery methodology good?

    - by absentx
    I always struggle with which of the stack sites is best to post "questions of theory" like this, but I think programmers is the best, if not, as usual a mod will move it etc... I am seeking critique on what has become my normal methodology of writing javascript. I have become heavily reliant on the Jquery library, but I think this has helped me learn the native language better also. Anyways, please critique the following style of JS coding...buried are a lot of questions of scope, if you could point out the strengths and weaknesses of this style I would appreciate it. var critique ={ start: function(){ globalness = 'GLOBAL-GLOBAL'; //available to all critique's methods var notglobalness = 'LOCAL-LOCAL';// only available to critiques start method //am I using the "method" teminology properly here?? $('#stuff').on('click','a.closer-target',function(){ $target = $(this); if($target.hasClass('active')){ $target.removeClass('active'); } else{ $target.addClass('active'); critique.madness($target); } }) console.log(notglobalness+': at least I am useful at home'); console.log('note here that: '+notglobalness+' is no longer available after this point, lets continue on:'); critique.madness(notglobalness); }, madness: function($e){ // do a bunch of awesomeness with $e //but continue to keep it seperate because you think its best to keep things isolated. //send to the next function when complete here console.log('here is globalness, which is still available from the start method of critique!! ' + globalness); console.log('lets see if the globalness carries on to a new var object!!'); console.log('the locally isolated variable of NOTGLOBALNESS is available here because it was passed to this method, lets show it:'+$e); carryOn.start(); } } //end critique var carryOn={ start: function(){ console.log('any chance critique.globalness will work here??? lets see: ' +globalness); console.log('it absolutely does'); } } $(document).ready(critique.start);

    Read the article

  • Is my JavaScript/jQuery methodology good? [migrated]

    - by absentx
    I am seeking critique on what has become my normal methodology of writing JavaScript code. I have become heavily reliant on the jQuery library, but I think this has helped me learn the native language better also. Anyway, please critique the following style of JavaScript coding... Buried are a lot of questions of scope; if you could point out the strengths and weaknesses of this style I would appreciate it. var critique ={ start: function(){ globalness = 'GLOBAL-GLOBAL'; //Available to all critique's methods var notglobalness = 'LOCAL-LOCAL'; // Only available to critiques start method //Am I using the "method" teminology properly here?? $('#stuff').on('click','a.closer-target',function(){ $target = $(this); if($target.hasClass('active')){ $target.removeClass('active'); } else{ $target.addClass('active'); critique.madness($target); } }) console.log(notglobalness+': at least I am useful at home'); console.log('note here that: '+notglobalness+' is no longer available after this point, lets continue on:'); critique.madness(notglobalness); }, madness: function($e){ //Do a bunch of awesomeness with $e, //but continue to keep it seperate because you think its best to keep things isolated. //Send to the next function when complete here console.log('Here is globalness, which is still available from the start method of critique!! ' + globalness); console.log('Let us see if the globalness carries on to a new var object!!'); console.log('The locally isolated variable of NOTGLOBALNESS is available here, because it was passed to this method. Let us show it:'+$e); carryOn.start(); } } //end critique var carryOn={ start: function(){ console.log('any chance critique.globalness will work here??? lets see: ' +globalness); console.log('it absolutely does'); } } $(document).ready(critique.start); (I always struggle with which of the Stack Exchange sites is best to post "questions of theory" like this, but I think Programmers is the best, if not, as usual a mod will move it, etc...)

    Read the article

  • Creating an app pool a month to limit the scope of issues

    - by user39550
    I have about 360 sites running on a single app pool. Now I know we have a coding issue with one of those sites, were we have accidentally coded a memory leak. So what happens is the site runs, the memory leak starts and soon the app pool runs out of memory. Then slowly but surely, the rest of the 360 sites start going down like a domino affect. I understand that the root of the problem is some bad coding, which we'll fix, but instead of bringing down said 360 sites, I was thinking, we could create a new app-pool monthly that every site we create would go into that months app pool. First, that limit the scope of the issues to 5 - 20 sites and second if one site started having issues we wouldn't be bringing down all 360 sites. Is there any issues to this thinking, possible ramifications? Thanks in Advance! Jeremiah

    Read the article

  • How to reach a Global Scope IPv6 host?

    - by Vaibhav Bajpai
    I have setup DNS64+NAT64 on a machine with 2 interfaces: eth0: public IPv4 address (connected to outside world) eth1: global scope IPv6 address: 2001::/64 I can successfully use ping6 google.com on this machine. Now I want to connect my MacBook to this machine by making it an IPv6-only client and perform some tests, but I do not have an IPv6 address assigned on this MacBook. I'm wondering, how should I manually assign one so as to route all my IPv6 traffic (I will disable IPv4 on my MacBook) to this machine, which will be picked up by DNS64+NAT64 to be converted to IPv4 requests and sent to the outside world?

    Read the article

  • Question regarding IPv6 - Solicited-Node Address with a Link local scope

    - by Pulse
    Situation: A small LAN comprising a Windows 7 Ultimate x54 PC, 2 XP Pro x86 PCs and an Asus router.The Win 7 box has IPv6 enabled. There are no other IPv6 enabled devices on the LAN. In my firewall I see numerous requests originating from the Win 7 PC, which are for the Multicast address ff02::1:ff.... which is a Solicited-Node address query and has a scope of 2 which equates to the local link. As far as I knew local link addresses are filtered by routers, hence local link. Given that situation I'm wondering why I'm seeing these queries being generated to various addresses? Any ideas? Thanks.

    Read the article

  • Managing software projects - advice needed

    - by Callum
    I work for a large government department as part of an IT team that manages and develops websites as well as stand alone web applications. We’re running in to problems somewhere in the SDLC that don’t rear their ugly head until time and budget are starting to run out. We try to be “Agile” (software specifications are not as thorough as possible, clients have direct access to the developers any time they want) and we are also in a reasonably peculiar position in that we are not allowed to make profit from the services we provide. We only service the divisions within our government department, and can only charge for the time and effort we actually put in to a project. So if we deliver a project that we have over-quoted on, we will only invoice for the actual time spent. Our software specifications are not as thorough as they could be, but they always include at a minimum: Wireframe mockups for every form view A data dictionary of all field inputs Descriptions of any business rules that affect the system Descriptions of the outputs I’m new to software management, but I’ve overseen enough software projects now to know that as soon as users start observing demos of the system, they start making a huge amount of requests like “Can we add a few more fields to this report.. can we redesign the look of this interface.. can we send an email at this part of the workflow.. can we take this button off this view.. can we make this function redirect to a different screen.. can we change some text on this screen… can we create a special account where someone can log in and get access to X… this report takes too long to run can it be optimised.. can we remove this step in the workflow… there’s got to be a better image we can put here…” etc etc etc. Some changes are tiny and can be implemented reasonably quickly.. but there could be up to 50-100 or so of such requests during the course of the SDLC. Other change requests are what clients claim they “just assumed would be part of the system” even if not explicitly spelled out in the spec. We are having a lot of difficulty managing this process. With no experienced software project managers in our team, we need to come up with a better way to both internally identify whether work being requested is “out of spec”, and be able to communicate this to a client in such a manner that they can understand why what they are asking for is “extra” work. We need a way to track this work and be transparent with it. In the spirit of Agile development where we are not spec'ing software systems in to the ground and back again before development begins, and bearing in mind that clients have access to any developer any time they want it, I am looking for some tips and pointers from experienced software project managers on how to handle this sort of "scope creep" problem, in tracking it, being transparent with it, and communicating it to clients such that they understand it. Happy to clarify anything as needed. I really appreciate anyone who takes the time to offer some advice. Thanks.

    Read the article

  • JavaScript Variable Scope

    - by lYriCAlsSH
    What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?

    Read the article

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