Search Results

Search found 2870 results on 115 pages for 'james outer'.

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

  • No_data_found exception is progating in outer block also?

    - by Vineet
    In my code i am entering the salary which is not available in employees table and then again inserting duplicate employee_id in primary key column of employee table in exception block where i am handling no data found exception but i do not why 'No data found exception in the end also? OUTPUT coming: Enter some other sal ORA-01400: cannot insert NULL into ("SCOTT"."EMPLOYEES"."LAST_NAME") ORA-01403: no data found --This should not come according to logic This is the code DECLARE v_sal number:=&p_sal; v_num number; BEGIN BEGIN select salary INTO v_num from employees where salary=v_sal; EXCEPTION WHEN no_data_found THEN DBMS_OUTPUT.PUT_LINE('Enter some other sal'); INSERT INTO employees (employee_id)values(100) ; END; EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE(sqlerrm); END;

    Read the article

  • LEFT OUTER JOIN in NHibernate with SQL semantics

    - by Yuval
    Hi, Is it possible to use HQL/ICritera to produce a query with the same semantics as the following SQL query: select table1.A, table2.B, count(*) from table1 left join (select table2.parent_id, table2.B from table2 where table2.C = 'Some value') as table2 on table2.parent_id = table1.id group by table1.A, table2.B order by table1.A In particular, what I'd like is to receive rows (that is, objects) from table1 that have no matching rows in table2. However, I only get the rows from table1 that have matches in table2. Is this the meaning of 'LEFT JOIN' in HQL? And if so, how can I get it to join on a subquery? Tnx.

    Read the article

  • Javascript: variable in outer function not changed by inner function

    - by Weng-Lock Mok
    I am having a small issue with what I believe is probably my misunderstanding of Javascript closures. I have this piece of code -- getStdOpts: function(tbl, filt) { var vals = new Array(); this.srvs.getStdOptions( { tbl: tbl }, { 'ok': function(rsp) { for (var i in rsp) { vals.push({ value: rsp[i].id, text: rsp[i].descr }); } } } ); return vals; } In essence, although the inner function inside the getStdOptions call ('ok': function...) pushes new values into the vals array, when accessed from outside the call, the vals array is empty. When accessed from within the inner function, vals contains all the elements as expected. Would really appreciate any help I can get on this matter.

    Read the article

  • If Inner Join can be thought of as Cross Join but filtering out the records satisfying the condition

    - by Jian Lin
    If an Inner Join can be thought of as a cross join and then getting the records that satisfy the condition, then a LEFT OUTER JOIN can be thought of as that, plus ONE record on the left table that doesn't satisfy the condition. In other words, it is not a cross join that "goes easy" on the left records (even when the condition is not satisfied), because then the left record can appear many times (as many as how many records there are in the right table). So the LEFT OUTER JOIN is the Cross JOIN with the records satisfying the condition, plus ONE record from the LEFT TABLE that doesn't satisfy the condition.

    Read the article

  • Linq to Entity Left Outer Join

    - by radman
    Hi All, I have an Entity model with Invoices, AffiliateCommissions and AffiliateCommissionPayments. Invoice to AffiliateCommission is a one to many, AffiliateCommission to AffiliateCommissionPayment is also a one to many I am trying to make a query that will return All Invoices that HAVE a commission but not necessarily have a related commissionPayment. I want to show the invoices with commissions whether they have a commission payment or not. Query looks something like: using (var context = new MyEntitities()) { var invoices = from i in context.Invoices from ac in i.AffiliateCommissions join acp in context.AffiliateCommissionPayments on ac.affiliateCommissionID equals acp.AffiliateCommission.affiliateCommissionID where ac.Affiliate.affiliateID == affiliateID select new { companyName = i.User.companyName, userName = i.User.fullName, email = i.User.emailAddress, invoiceEndDate = i.invoicedUntilDate, invoiceNumber = i.invoiceNumber, invoiceAmount = i.netAmount, commissionAmount = ac.amount, datePaid = acp.paymentDate, checkNumber = acp.checkNumber }; return invoices.ToList(); } This query above only returns items with an AffiliateCommissionPayment.

    Read the article

  • Javascript Reference Outer Object From Inner Object

    - by Akidi
    Okay, I see a few references given for Java, but not javascript ( which hopefully you know is completely different ). So here's the code specific : function Sandbox() { var args = Array.prototype.slice.call(arguments) , callback = args.pop() , modules = (args[0] && typeof args[0] === 'string' ? args : args[0]) , i; if (!(this instanceof Sandbox)) { return new Sandbox(modules, callback); } if (!modules || modules[0] === '*') { modules = []; for (i in Sandbox.modules) { if (Sandbox.modules.hasOwnProperty(i)) { modules.push(i); } } } for (i = 0; i < modules.length; i++) { Sandbox.modules[modules[i]](this); } this.core = { 'exp': { 'classParser': function (name) { return (new RegExp("(^| )" + name + "( |$)")); }, 'getParser': /^(#|\.)?([\w\-]+)$/ }, 'typeOf': typeOf, 'hasOwnProperty': function (obj, prop) { return obj.hasOwnProperty(prop); }, 'forEach': function (arr, fn, scope) { scope = scope || config.win; for (var i = 0, j = arr.length; i < j; i++) { fn.call(scope, arr[i], i, arr); } } }; this.config = { 'win' : win, 'doc' : doc }; callback(this); } How do I access this.config.win from within this.core.forEach? Or is this not possible?

    Read the article

  • Spacing from outer space

    - by meo
    I just wonder where is this space between the end of the image and the end of the li's are coming from: http://bluesys.ch/lussy/ its just a simple UL li img code: div#slider { border: 5px solid #fff; } div#slider ul li { border-bottom: 1px solid pink; } div#slider ul li img { border-bottom: 1px solid green; margin: 0; } note that all margins and paddings are set to 0 by my reset.css can someone help me out? I colored the borders that you can see the spacing i speak of. I use firefox.

    Read the article

  • private class calling a method from its outer class

    - by oxinabox.ucc.asn.au
    Ok, so I have a class for a "Advanced Data Structure" (in this case a kinda tree) SO I implimented a Iterator as a private class with in it. So the iterator needs to implement a remove function to remove the last retuirned element. now my ADT already impliments a remove function, and in this case there is very little (thinking about it, i think nothing) to be gain by implimenting a different remove function for the iterator. so how do I go about calling the remove from my ADT sketch of my struture: public class ADT { ... private class ADT_Iterator impliments java.util.Itorator{ ... public void remove(){ //where I want to call the ADT's remove function from } ... public void remove( Object paramFoo ) { ... } ... } So just calling remove(FooInstance) won't work (will it?) and this.remove(FooInstance) is the same thing. what do i call? (and changign the name of the ADT's remove function is not an option, as that AD T has to meet an Interace wich I am note at liberty to change) I could make both of them call a removeHelper functon, I guess...

    Read the article

  • mysql filtering result using left outer join

    - by user288178
    my query: SELECT content.*, activity_log.content_id FROM content LEFT JOIN activity_log ON content.id = activity_log.content_id AND sess_id = '$sess_id' WHERE activity_log.content_id IS NULL AND visibility = $visibility AND content.reported < ".REPORTED_LIMIT." AND content.file_ready = 1 LIMIT 1 The purpose of that query is to get 1 row from the content table that has not been viewed by the user (identified by session_id), but it still returns contents that have been viewed. What is wrong? ( I have checked the table making sure that the content_ids are there) Note: I think this is more efficient than using subqueries, thoughts?

    Read the article

  • Using border-radius on ul with only giving a radius to the outer li's

    - by RJD22
    Maybe the answer is really simple. But what I'm trying to do it to make a curved border around the li's. So not only the outside but also the inside: Examples: Right Wrong: Don't mind the differences. What I'm trying to do it to curve the inner border this is the html: <ul> <li>Dashboard</li> <li>Voertuigen</li> <li>Klanten</li> <li>Factures</li> <li>Boetes</li> <li>Onderhoud</li> </ul> Css: ul { list-style: none; -moz-border-radius: 12px; -webkit-border-radius: 12px; width: 140px; border: 10px solid #BEBEBE; } ul li { height: 40px; width: 140px; background: #E5E5E5; }

    Read the article

  • how to create a subquery in sql using count based on outer query

    - by user1754716
    I hope someone can help me with this query. Basically I have two queries that I want to "combine". I want the second query as an extra column along with the first query. The first one is this : SELECT t_Item_Storage_Location.Storage_Loc_Nbr, t_Storage_Location.Storage_Loc_Type_Code, Count(t_Load.Load_Id) AS CurrentLoadCount, t_load.MMM_Id_Nbr FROM t_Load INNER JOIN (t_Storage_Location INNER JOIN t_Item_Storage_Location ON t_Storage_Location.Storage_Loc_Nbr = t_Item_Storage_Location.Storage_Loc_Nbr) ON (t_Load.Storage_Loc_Nbr = t_Item_Storage_Location.Storage_Loc_Nbr) AND (t_Load.MMM_Id_Nbr = t_Item_Storage_Location.MMM_Id_Nbr) where ((((t_Item_Storage_Location.MMM_Id_Nbr) Between '702004%' And '702011%') AND ((t_Item_Storage_Location.Storage_Loc_Nbr) Like '%A') AND ((t_Storage_Location.Storage_Loc_Type_Code)='CD') AND ((t_Load.Active_Status_Ind)='A') AND ((t_Load.QC_Status_Code) Like 'R%') AND ((t_Load.MMM_Facility_Code)='MC')) OR (((t_Item_Storage_Location.Storage_Loc_Nbr) Like '%B')) OR (((t_Item_Storage_Location.Storage_Loc_Nbr) Like '%C')) OR (((t_Item_Storage_Location.Storage_Loc_Nbr) Like '%D')) OR (((t_Item_Storage_Location.Storage_Loc_Nbr) Like '%E')) ) GROUP BY t_Item_Storage_Location.MMM_Id_Nbr, t_Item_Storage_Location.Storage_Loc_Nbr, t_Storage_Location.Storage_Loc_Type_Code, t_Load.MMM_Facility_Code, t_load.MMM_Id_Nbr HAVING Count(t_Load.Load_Id)<4 The second one, is based on the t_load.MMM_Id_Nbr of the first one. Basically I want a count of all the loads with that mmm_id_nbr. SELECT count(Load_ID) as LoadCount, MMM_Id_Nbr, storage_Loc_Nbr FROM t_load WHERE QC_Status_Code like 'R%' and mmm_Facility_Code ='MC' and Active_Status_Ind='A' GROUP by MMM_Id_Nbr, storage_loc_Nbr

    Read the article

  • Get records using left outer join

    - by Devendra Gohil
    I have two tables as given below Table A Table B Table C ============= ============== ========= Id Name Id AId CId Id Name 1 A 1 1 1 1 x 2 B 2 1 1 2 y 3 C 3 2 1 3 z 4 D 4 2 3 4 w 5 E 5 3 2 5 v Now I want all the records of Table A with matching Id column CId from Table B where CId = 1. So the output should be like below : Id Name CId 1 A 1 2 B 1 3 C 1 4 D Null 5 E Null Can anyone help me please?

    Read the article

  • Submit button on nested form submits the outer form in IE7

    - by Mike Christensen
    I have the following code on my Home.aspx page: <form id="frmJump" method="post" action="Views/ViewsHome.aspx"> <input name="JumpProject" /><input type="submit" value="Go" /> </form> However, when I click the "Go" button, the page posts back to Home.aspx rather than going to ViewsHome.aspx. I even tried adding some script to force the form to submit: <input name="JumpProject" onkeypress="if(event.keyCode == 13) { this.form.submit(); return false; }" /> But still even if I press ENTER, the Home.aspx page is reloaded. The only thing I can see that might be borking things is this form is actually a child form of the main POSTBACK form that ASP.NET injects into the page. I'm sure there's something stupid I'm missing and this post will get 800 downvotes instantly banishing me back into the n00b realm, but perhaps I haven't gotten enough sleep lately and I'm missing something stupid. This is on IE7 and an ASP.NET 4.0 backend. I also have jQuery libraries loaded on the page incase jQuery can improve this somehow. Thanks!

    Read the article

  • Need some help synch'ing outer loop counter with dialog.onconfirm()

    - by Chris Barnhill
    I am writing a game for Facebook. IN the following code, I have a problem. I have a for loop executing, and in that loop, I call a dialog and implement 'onconfirm' for the dialog. The problem is that I need to access th e loop counter inside of the onconfirm function. But because the onconfirm is called outside of the scope of the for loop, the counter value is no longer valid because it's been incremented. I need some way to pass the counter value to the dialog onconfirm as it was at the time the dialog was displayed, not after the loop has finished. Or maybe someone has a better solution. Any help would be appreciated. Thanks. function unloadCargo() { //debugger; var actionPrompt = document.getElementById('action-prompt'); actionPrompt.setTextValue('Unloading cargo...'); var ajax = new Ajax(); ajax.responseType = Ajax.JSON; ajax.ondone = function(data) { debugger; if(data.unloadableCargo.length == 0) { loadCargo(); } else { //console.log('unloadable cargo='+dump(data.unloadableCargo)); var i = 0; var j = 0; var ucCount = data.unloadableCargo.length; for(i = 0; i < ucCount; i++) { cargoDialog = new Dialog(); cargoDialog.showChoice('Unload Cargo', 'Unload ' + data.unloadableCargo[i].goods_name + ' at ' + data.unloadableCargo[i].city_name + ' for ' + data.unloadableCargo[i].payoff + 'M euros?'); cargoDialog.onconfirm = function() { //console.log('unloadable cargo onconfirm='+dump(data.unloadableCargo)); var ajax = new Ajax(); var param = {"city_id": data.unloadableCargo[i].city_id, "goods_id": data.unloadableCargo[i].goods_id, "payoff": data.unloadableCargo[i].payoff}; ajax.ondone = function(demandData) { var demands = document.getElementById('demands'); var innerXhtml = '<span>'; for(var j = 0; j < demandData.demands.length; j++) { innerXhtml = innerXhtml + ' <div class="demand-item"><div class="demand-city">' + demandData.demands[j].city + '</div><div class="demand-pay">' + demandData.demands[j].cost + '</div><div class="demand-goods">' + demandData.demands[j].goods + '</div></div>'; } innerXtml = innerXhtml + ' </span>'; demands.setInnerXHTML(innerXhtml); // update balance loadCargo(); } ajax.post(baseURL + "/turn/do-unload-cargo", param); } cargoDialog.oncancel = function() { loadCargo(); } } //loadCargo(); } } ajax.post(baseURL + '/turn/unload-cargo'); }

    Read the article

  • Linq2Sql How to write outer join query?

    - by Malcolm
    Hi, I have following SQL tables. ImportantMessages impID Message ImportantMessageUsers imuID imuUserID imuImpID I want to write a Linq2Sql query so that it returns any rows from ImportantMessages that does not have a record in ImportantMessagesUsers. Matchiing fields are impID ----- imuImpID Assume imuUserID of 6

    Read the article

  • Can i access outer class objects in inner class

    - by Shantanu Gupta
    I have three classes like this. class A { public class innerB { //Do something } public class innerC { //trying to access objB here directly or indirectly over here. //I dont have to create an object of innerB, but to access the object created by A //i.e. innerB objInnerB = objB; //not like this innerB objInnerB= new innerB(); } public innerB objB{get;set;} } I want to access the object of class B in Class C that is created by class A. Is it possible somehow to make changes on object of Class A in Class C. Can i get Class A's object by creating event or anyhow.

    Read the article

  • Left outer join in LINQ is showing exception

    - by stackuser3
    The folloqing is the excpetion I am getting The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type. below is my LINQ Statement where QuestionId is the primary key in my table var questionViewsData = from questionViews in objDc.SC_QuestionsViews join questions in objDc.SC_Questions on questionViews.QuestionId equals questions.QuestionId into qs from questions in qs.DefaultIfEmpty() where questionViews.CreatedDate.Date == new DateTime(2010, 4,27) select new { Selected =(questions == null ?-1:questions.QuestionId), QuestioinTitle = questions.Title, VotesCount = questions.VotesCount }; Let me know how to resolve this

    Read the article

  • remove/ignore float from outer div

    - by acidzombie24
    This may sound weird but i have some css which aligns mys divs. In one place i also use http://www.brunildo.org/test/img_center.html which centers images. Now i want my divs inside a larger div to go to another line if this one gets full. float: left seems to be the answer. The problem is it ruins my formatting. Including solution in the above link. I have this test code. If i remove the width and float it looks fine except it may take up too much space and not go to another line. I was thinking i could use float on an outerdiv and center the image within. However float: left is still breaking it. I am hoping there is a way to remove the float so each div does go left but the div inside centers correctly not breaking my formatting. <style type="text/css"> .wraptocenter { display: table-cell; text-align: center; vertical-align: middle; width: 200px; height: 200px; background: blue; } .wraptocenter * { vertical-align: middle; } /*\*//*/ .wraptocenter { display: block; } .wraptocenter span { display: inline-block; height: 100%; width: 1px; } /**/ div.c { background: red; overflow: hidden; min-width: 400px; max-width: 400px; } div.c div { float: left; } </style> <!--[if lt IE 8]><style> .wraptocenter span { display: inline-block; height: 100%; } </style><![endif]--> <div class="c"> <div> <div> <div class="wraptocenter"><span></span><img src="a.jpg" alt="/a.jpg"></div> <div class="wraptocenter"><span></span><img src="a.jpg" alt="/a.jpg"></div> <div class="wraptocenter"><span></span><img src="a.jpg" alt="/a.jpg"></div> </div></div></div>

    Read the article

  • how do you get a reference to an outer div using jquery

    - by oo
    if i have this html <div class="whole">This is a <div class="min">Test</div></div> i want to change the html of the "whole" div when i click on the "min" div: i have tried this below, but it doesn't seem to work. $(document).ready(function() { $('div.min').live('click', function() { $(this).prev('.whole').html("<img BORDER=0 src='../../images/copy1.png' />"); }); }); does anyone have any ideas on whats going wrong here ?

    Read the article

  • Margin-Top push outer div down

    - by Daniel Hertz
    Hello, I have a header div as the first element in my wrapper div, but when I add a top margin to a h1 inside the header div it pushes the entire header div down. I realize this happens whenever I apply a top margin to the first visible element on a page. Here is a sample of the css. Thanks! div#header{ width: 100%; background-color: #000; position: relative; } div#header h1{ text-align: center; width: 375px; height: 50px; margin: 0 auto; font-size: 220%; text-indent: -5000px; background: url('../../images/name_logo.png') no-repeat; } html part <div id="header"> <h1><a href="/home.php">Title</a></h1> <ul id="navbar">

    Read the article

  • Use nested static class as ActionListener for the Outer class

    - by Digvijay Yadav
    I want to use an nested static class as an actionListener for the enclosing class's GUI elements. I did something like this: public class OuterClass { public static void myImplementation() { OuterClass.StartupHandler startupHandler = new OuterClass.StartupHandler(); exitMenuItem.addActionListener(startupHandler); // error Line } public static class StartupHandler implements ActionListener { @Override public void actionPerformed(ActionEvent e) { //throw new UnsupportedOperationException("Not supported yet."); if (e.getSource() == exitMenuItem) { System.exit(1); } else if (e.getSource() == helpMenuItem) { // show help menu } } } } But when I invoke this code I get the NullPointerException at the //error Line. Is this the right method to do do this or there is something I did am missing?

    Read the article

  • pass parameter from $.post() callback to outer variable

    - by Nazmin
    basically i want to hold a parameter that retrieve value from $.post() call like this: init = function(){ var lastpage = getLastPage(); } function getLastPage(){ $.post("getInfo.php",{ last: "yes" }, function(data){ setLast(data.last); },'json'); return function setLast(data){ return data; } } so when reach at last post (last page) i should check with lastpage variable that has a value returned from getLastPage() function. I'm pretty blur with javascript pointer and all. Please help guys. update (20/4/2010): I've done the other way around, like this: init = function(){ getLastPage(); if((page+1) == $("#lastpage").val()){ alert("this is last post"); }else{ page++; //get info and display to the page here } } function getLastPage(){ $.post("getInfo.php",{ last: "yes" }, function(data){ $("#lastpage").val(data.last); },'json'); } first run the function to temporarily store the value in hidden input tag (lastpage) and then grab the value again to check it whenever i click forward button. if you all have more appropriate way please tell me.

    Read the article

  • How do I set up pairing email addresses?

    - by James A. Rosen
    Our team uses the Ruby gem hitch to manage pairing. You set it up with a group email address (e.g. [email protected]) and then tell it who is pairing: $ hitch james tiffany Hitch then sets your Git author configuration so that our commits look like commit 629dbd4739eaa91a720dd432c7a8e6e1a511cb2d Author: James and Tiffany <[email protected]> Date: Thu Oct 31 13:59:05 2013 -0700 Unfortunately, we've only been able to come up with two options: [email protected] doesn't exist. The downside is that if Travis CI tries to notify us that we broke the build, we don't see it. [email protected] does exist and forwards to all the developers. Now the downside is that everyone gets spammed with every broken build by every pair. We have too many possible pair to do any of the following: set up actual [email protected] email addresses or groups (n^2 email addresses) set up forwarding rules for [email protected] (n^2 forwarding rules) set up forwarding rules for [email protected] (n forwarding rules for each of n developers) Does anyone have a system that works for them?

    Read the article

  • Too Many Left Outer Joins in Entity Framework 4?

    - by Adam
    I have a product entity, which has 0 or 1 "BestSeller" entities. For some reason when I say: db.Products.OrderBy(p = p.BestSeller.rating).ToList(); the SQL I get has an "extra" outer join (below). And if I add on a second 0 or 1 relation ship, and order by both, then I get 4 outer joins. It seems like each such entity is producing 2 outer joins rather than one. LINQ to SQL behaves exactly as you'd expect, with no extra join. Has anyone else experienced this, or know how to fix it? SELECT [Extent1].[id] AS [id], [Extent1].[ProductName] AS [ProductName] FROM [dbo].[Products] AS [Extent1] LEFT OUTER JOIN [dbo].[BestSeller] AS [Extent2] ON [Extent1].[id] = [Extent2].[id] LEFT OUTER JOIN [dbo].[BestSeller] AS [Extent3] ON [Extent2].[id] = [Extent3].[id] ORDER BY [Extent3].[rating] ASC

    Read the article

  • Shell not finding binary when attempting to execute it (it's _definitely_ there)

    - by eegg
    I have a specific set of binaries installed at: ~/.GutenMark/binary/<binaries...> These were previously working correctly, but for seemingly no reason when I attempt to execute them the shell claims not to find them: james@anubis:~/.GutenMark/binary$ ls -al ... -rwxr-xr-x 1 james james 2979036 2009-05-10 13:34 GUItenMark ... -rwxrwxrwx 1 james james 76952 2009-05-10 13:34 GutenMark ... -rwxr-xr-x 1 james james 10156 2009-05-10 13:34 GutenSplit ... james@anubis:~/.GutenMark/binary$ ./GutenMark bash: ./GutenMark: No such file or directory james@anubis:~/.GutenMark/binary$ I've tried to isolate the cause of this, with no success. The same happens with zsh, bash, and sh (all giving their appropriate "file not found" error -- this is definitely not a strange output from the binary itself). The same happens either as user james or as root. Nor is it directory specific; if I move the whole directory installation, or just a single binary, to anywhere else, the same happens when attempting to execute it. The same even happens when I put the directory in $PATH and just execute "GutenMark". It also happens when I execute it from a script (I've tried Python's commands module -- though this appears to just call sh). The problem appears to be specific to the binaries themselves, yet they appear to never actually get executed. Any ideas?

    Read the article

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