Search Results

Search found 3598 results on 144 pages for 'joe coder guy'.

Page 22/144 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • JavaScript keeps returning ambigious error (in ASP.NET MVC 2.0)

    - by Erx_VB.NExT.Coder
    this is my function (with other lines ive tried/abandoned)... function DoClicked(eNumber) { //obj.style = 'bgcolor: maroon'; var eid = 'cat' + eNumber; //$get(obj).style.backgroundColor = 'maroon'; //var nObj = $get(obj); var nObj = document.getElementById(eid) //alert(nObj.getAttribute("style")); nObj.style.backgroundColor = 'Maroon'; alert(nObj.style.backgroundColor); //nObj.setAttribute("style", "backgroundcolor: Maroon"); }; This error keeps getting returned even after the last line in the function runs: Microsoft JScript runtime error: Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: method this function is called with an "OnSuccess" set in my Ajax.ActionLink call (ASP.NET MVC)... anyone any ideas on this? i have these referenced... even when i remove the 'debug' versions for normal versions, i still get an error but the error just has much less information and says 'b' is undefined (probably a ms js library internal variable)... <script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftMvcValidation.debug.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script> <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script> also, this is how i am calling the actionlink method: Ajax.ActionLink(item.CategoryName, "SubCategoryList", "Home", New With {.CategoryID = item.CategoryID}, New AjaxOptions With {.UpdateTargetId = "SubCat", .HttpMethod = "Post", .OnSuccess = "DoClicked(" & item.CategoryID.ToString & ")"}, New With {.id = "cat" & item.CategoryID.ToString})

    Read the article

  • Design patter to keep track UITableView rows correspondance to underlying data in constant time.

    - by DenNukem
    When my model changes I want to animate changes in UITableView by inserting/deleting rows. For that I need to know the ordinal of the given row (so I can construct NSIndexPath), which I find hard to do in better-than-linear time. For example, consider that I have a list of addressbook entries which are manualy sorted by the user, i.e. there is no ordering "key" that represents the sort order. There is also a corresponding UITableView that shows one row per addressbook entry. When UITableView queries the datasource I query the NSMUtableArray populated with my entries and return required data in constant time for each row. However, if there is a change in underlying model I am getting a notification "Joe Smith, id#123 has been removed". Now I have a dilemma. A naive approach would be to scan the array, determine the index at which Joe Smith is and then ask UITableView to remove that precise row from the view, also removing it form the array. However, the scan will take linear time to finish. Now I could have an NSDictionary which allows me to find Joe Smith in constant time, but that doesn't do me a lot of good because I still need to find his ordinal index within the array in order to instruct UITableView to remove that row, which is again a linear search. I could further decide to store each object's ordinal inside the object itself to make it constant, but it will become outdated after first such update as all subsequent index values will have changed due to removal of an object. So what is the correct design pattern to accurately reflect model changes in the UITableView in costant (or at least logarithmic) time?

    Read the article

  • Why not to use Array of errors instead of Exception Handling !?

    - by Naughty.Coder
    Why not using array of errors instead of throwing errors and check if it's not empty later in the code.... Exception handling is very confusing to me , I can not understand it's purpose ... can anybody enlighten me !? they compare it with die() as better not to stop the execution of the code , why would I stop the execution of code if I don't want to !? ofcourse I do I'm a beginner programmer , it might be confusing to you as well , or because i'm not very experienced in this ugly thing. Please in the context of PHP only.

    Read the article

  • XML RPC c# Call returns array of strings and int

    - by chillconsulting
    I'm doing an XML RPC call in ASP.net with c# and the call returns an Array called userinfo with strings and integers in it and I can't seem to figure out how to parse the data and put it into string and int objects... The only thing that compiles is if I make it an Object in the struct. The int returns fines and is referenced easily. Any help would be appreciated - this is what I got. public Page_Load(object sender, EventArgs e){ IValidateSSO proxy = XmlRpcProxyGen.Create<IValidateSSO>(); UserInfoSSOValue ret2 = proxy.UserInfoSSO(ssoAuth, ssoValue); int i = ret2.isonid; } public struct UserInfoSSOValue { public Object userinfo; public int isonid; } [XmlRpcUrl("host")] public interface IValidateSSO : IXmlRpcProxy { [XmlRpcMethod("sso.session_userinfo")] UserInfoSSOValue UserInfoSSO(string ssoauth, string sid); } Here is what the xml rpc calls returns (I know it's in php... I'm trying to implement in c#): sso.session_userinfo(string $ssoauth, string $sid) string $ssoauth - authentication string (assigned by ONID support) string $sid - sid to get info on Returns: Array ( [userinfo] => Array ( [lastname] => College [expire_time] => 1118688011 [osuuid] => 12345678901 [sid_length] => 3600 [ip] => 10.0.0.1 [sid] => WiT7ppAEUKS3rJ2lNz3Ue64sGPxnnLL0 [username] => collegej [firstname] => Joe [fullname] => College, Joe Student [email] => joe[email protected] [create_time] => 1118684410 ) [isonid] => 1 ) array userinfo - array containing basic user information

    Read the article

  • How do i translate movement on the Canvas3D to movement in the virtual 3D world

    - by Coder
    My goal is to move a shape in the virtual world in such a way so that it ends up where the mouse pointer is on the canvas. What i have: -mouse position (x,y) on a Canvas3D object -Point3d object of where a pick ray starting from the Canvas3D viewport intersects with the first scene object. (point in 3D space of where i want to start the drag) What i want: -Some way to translate the Point3d's coordinates so that the initial point of intersection (the Point3d object) is always overlapping the the mouse position on the canvas (same as when i used the pick ray to determine what the user clicked on from the Canvas3D object). Thanks!

    Read the article

  • What's PHP Equivalent of Java Servlet Filter?

    - by ZZ Coder
    On Java side, we have a servlet filter that handles authentication. We don't have to change all other servlet or JSPs to add authentication to the page, unless the page needs customized content. How can we achieve the same on PHP? We don't use any frameworks on PHP.

    Read the article

  • ASP.NET MVC 2.0 Unused Model Property being called when posting a product to the server?

    - by Erx_VB.NExT.Coder
    i have my auto-generated linq to sql classes, and i extend this class using partial classing (instead of using inheritance), and i have properties that that i've put in later which are not part of the database model and should not be. these are things like "FinalPrice" and "DisplayFinalPrice" - in the dbase, there is only RetailPrice and WholesalePrice so FinalPrice etc are more like extensions of the dbase fields. when i submit the form with nothing filled in, "FinalPrice" gets called (the 'get' of the property) even tho i never ask for it to be, and even tho it is not needed. this happens before validation, so i don't even get the validation errors i would get. i've tried using and on the FinalPrice and FinalPriceDisplay properties - no go! why does this happen and how can i stop it from happening? is the modelstate just trying to validate everything so therefore it calls every item no matter what? for those interested, here is all the code... Partial Public Class tProduct 'Inherits tProduct Private Const CommissionMultiplier As Decimal = CDec(1.18) Private _FinalPrice As Decimal? Private _DisplayFinalPrice As String Private _DisplayNormalPrice As String Public Property CategoryComplete As Short <ScaffoldColumn(False)> Public ReadOnly Property FinalPrice As Decimal Get 'If RetailPrice IsNot Nothing OrElse WholesalePrice IsNot Nothing Then If _FinalPrice Is Nothing Then If RetailPrice IsNot Nothing Then _FinalPrice = RetailPrice Else _FinalPrice = WholesalePrice * CommissionMultiplier ' TODO: this should be rounded to the nearest 5th cent so prices don't look weird. End If Dim NormalPart = Decimal.Floor(_FinalPrice.Value) Dim DecimalPart = _FinalPrice.Value - NormalPart If DecimalPart = 0 OrElse DecimalPart = 0.5 Then Return _FinalPrice ElseIf DecimalPart > 0 AndAlso DecimalPart < 0.5 Then DecimalPart = 0.5 ' always rounded up to the nearest 50 cents. ElseIf DecimalPart > 0.5 AndAlso DecimalPart < 1 Then ' Only in this case round down if its about to be rounded up to a valeu like 20, 30 or 50 etc as we want most prices to end in 9. If NormalPart.ToString.LastChr.ToInt = 9 Then DecimalPart = 0.5 Else DecimalPart = 1 End If End If _FinalPrice = NormalPart + DecimalPart End If Return _FinalPrice 'End If End Get End Property <ScaffoldColumn(False)> Public ReadOnly Property DisplayFinalPrice As String Get If _DisplayFinalPrice.IsNullOrEmpty Then _DisplayFinalPrice = FormatCurrency(FinalPrice, 2, TriState.True) End If Return _DisplayFinalPrice End Get End Property Public ReadOnly Property DisplayNormalPrice As String Get If _DisplayNormalPrice.IsNullOrEmpty Then _DisplayNormalPrice = FormatCurrency(NormalPrice, 2, TriState.True) End If Return _DisplayNormalPrice End Get End Property Public ReadOnly Property DivID As String Get Return "pdiv" & ProductID End Get End Property End Class more... i get busted here, with a null reference exception telling me it should contain a value... Dim NormalPart = Decimal.Floor(_FinalPrice.Value)

    Read the article

  • Prefuse: Reloading of XML files

    - by John
    Hello all, I am a new to the prefuse visualization toolkit and have a couple of general questions. For my purpose, I would like to perform an initial visualization using prefuse (graphview / graphml). Once rendered, upon a user click of a node, I would like to completely reload a new xml file for a new visualization. I want to do this in order to allow me to "pre-package" graphs for display. For example. If I search for Ted. I would like to have an xml file relating to Ted load and render a display. Now in the display I see that Ted has nodes associated called Bill and Joe. When I click Joe, I would like to clear the display and load an xml file associated with Joe. And so on. I have looked into loading one very large xml file containing all node and node relationship info and allowing prefuse to handle this using the hops from one level to another. However, eventually I am sure that system performance issues will arise due to the size of data. Thanks in advance for any help, John

    Read the article

  • PHP Simple DOM Parser

    - by Junior Coder
    Hi guys I'm using this wonderful class here to do a bit of code embed filtering: http://simplehtmldom.sourceforge.net/. It extends the PHP DOM document class. Pretty much what I am doing is parsing a string through this class that contains embed code, i grab the unique bits of information eg id, width, height send through a handler function which inserts the id, width, height etc into my predefined "safe" template and reinsert my safe template in the place of the embed code the user has put in. May seem a backward way of doing it but it's the way it has to be done :) All of that works fine. Problem is when there is more than just embed code contained in the string, as I can't just replace the embed code i can only replace the entire string which wipes the rest of the tags etc string. For example if there were a p tag that would be wiped. So my question is how using this class can i just replace the certain part of the string? Spent the last few days trying to work this out and need some more input. It appears the class can do this so i'm stumped. Here's a basic version of what i have so far :) // load the class $html = new simple_html_dom(); // load the entire string containing everything user entered here $return = $html->load($string); // check for embed tags if($html->find('embed') == true { foreach($html->find('embed') as $element) { // send it off to the function which returns a new safe embed code $element = create_new_embed($parameters); // this is where i somehow i need to save the changes and send it back to $return } } Any input would be gratefully appreciated. If i have explained my problem well enough please let me know :)

    Read the article

  • Linking session state between servlets and EJBs?

    - by wilth
    Hello, I have servlets (in a web module) that access stateless EJB beans (in an EJB module). The EJB module is built using SEAM. Users can have different roles and the EJB services check this using Seam's Identity. I also use a customized Authenticator (although this might not be relevant here). I noticed problems with this approach and I'm suspecting that the session context in the servlets is not "linked" with the session context in the EJB beans. What I think happens is something like: User Joe access servlet A and is assigned Session W1. Servlet A calls a login function on an EJB, using the EJB session E1. Later, user Mary accesses servlet A and is assigned Session W2. When calling the EJBs, however, the EJB session E1 is used and therefore Mary is authenticated as Joe. What also happens is that when Joe is calling the servlet twice in rapid succession, the same session W1 is used, but two different sessions E1 and E2 in the business layer, causing errors. I might be wrong in my suspicion, but maybe I'm actually expecting these "sessions" to be linked together while they in fact are not. If this is true, is there any way of achieving this? I could - of course - use stateful beans and save the authentication information in the beans, but this would break the "Identity" concept of Seam (and in general, it would be preferable to be able to use the Session context in my EJB beans). Any help and pointers are very welcome - thanks! Technology: EJB3, Seam 2.1.2. The servlets are actually the server-side of a GWT app, although I don't think this matters much. I'm using JBoss 5.

    Read the article

  • Can I use this technique to provide free email service for my users?

    - by Naughty.Coder
    I'll let users register their [email protected] ,,, they enter their members area where they can : 1- send emails ( easy to do) 2- receive emails .. for receiving emails , I'll use a catch all email account , read the email and figure to whom it's sent (username), and then I save it on the database with userid of the username who has registerd ! Do I miss something here ... is it really this simple (if I don't have an email server) ?

    Read the article

  • Objective-C assigning variables question for iphone.

    - by coder net
    The following piece of code can be written in two ways. I would like to know what are the pros and cons of each. If possible I would like to stick with the one liner. 1) UIColor *background = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"Background.png"]]; self.view.backgroundColor = background; [background release]; 2) self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"Background.png"]]; Any issues with releasing memory etc. with #2? I'm new to Objective-C and would like to follow the best approach.

    Read the article

  • How to distribute java components for developers to use?

    - by coder
    I am not sure how to put the correct title. but here is the brief explanation. With Microsoft .NET, i created a server side custom control using C# to be used in ASP.NET pages. I distribute the DLL generated as a component. developers will include that and use in their ASP.NET project. Likewise, how can i do for Java based web components for to use with JSP or JSF or any other java web frameworks?

    Read the article

  • Jquery with multi level json data array

    - by coder
    var data = [{"Address":{"Address":"4 Selby Road\nHowden","AddressId":"1414449","AddressLine1":"4 Selby Road","AddressLine2":"Howden","ContactId":"14248844","County":"North Humberside","Country":"UK","Postcode":"DN14 7JW","Town":"GOOLE","FullAddress":"4 Selby Road\nHowden\r\nGOOLE\r\nNorth Humberside\r\nDN14 7JW\r\nUnited Kingdom"},"ContactId":14248844,"Title":"Mrs","FirstName":"","Surname":"Neild","FullName":" Neild","PostCode":"DN14 7JW"},{"Address":{"Address":"466 Manchester Road\nBlackrod","AddressId":"1669615","AddressLine1":"466 Manchester Road","AddressLine2":"Blackrod","ContactId":"16721687","County":"","Country":"UK","Postcode":"BL6 5SU","Town":"BOLTON","FullAddress":"466 Manchester Road\nBlackrod\r\nBOLTON\r\nBL6 5SU\r\nUnited Kingdom"},"ContactId":16721687,"Title":"Miss","FirstName":"Andrea","Surname":"Neild","FullName":"Andrea Neild","PostCode":"BL6 5SU"},{"Address":{"Address":"5 Prospect Vale\nHeald Green","AddressId":"2127294","AddressLine1":"5 Prospect Vale","AddressLine2":"Heald Green","ContactId":"21178752","County":"Cheshire","Country":"UK","Postcode":"SK8 3RJ","Town":"CHEADLE","FullAddress":"5 Prospect Vale\nHeald Green\r\nCHEADLE\r\nCheshire\r\nSK8 3RJ\r\nUnited Kingdom"},"ContactId":21178752,"Title":"Mrs","FirstName":"","Surname":"Neild","FullName":" Neild","PostCode":"SK8 3RJ"}]; I'm tring to retrieve above json fommated data in jquery as below: var source = { localdata: data, sort: customsortfunc, datafields: [ { name: 'Surname', type: 'string' }, { name: 'FirstName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'Address.Address', type: 'string' } ], datatype: "array" }; var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid( { width: 670, source: dataAdapter, theme: theme, sortable: true, pageable: true, autoheight: true, ready: function () { //$("#jqxgrid").jqxGrid('sortby', 'firstname', 'asc'); $("#jqxgrid").jqxGrid('sortby', 'FirstName', 'asc'); }, columns: [ { text: 'Title', datafield: 'Title', width: 100 }, { text: 'First Name', datafield: 'FirstName', width: 100 }, { text: 'Last Name', datafield: 'Surname', width: 100 }, { text: 'Address', datafield: 'Address.Address', width: 100 }, ] }); The only issue is there is no display for "Address.Adress". Can anyone advise me ?

    Read the article

  • if cookies are disabled, does asp.net store the cookie as a session cookie instead or not?

    - by Erx_VB.NExT.Coder
    basically, if cookeis are disabled on the client, im wondering if this... dim newCookie = New HttpCookie("cookieName", "cookieValue") newCookie.Expires = DateTime.Now.AddDays(1) response.cookies.add(newCookie) notice i set a date, so it should be stored on disk, if cookies are disabled does asp.net automatically store this cookie as a session cookie (which is a cookie that lasts in browser memory until the user closes the browser, if i am not mistaken).... OR does asp.net not add the cookie at all (anywhere) in which case i would have to re-add the cookie to the collection without the date (which stores as a session cookie)... of course, this would require me doing the addition of a cookie twice... perhaps the second time unnecessarily if it is being stored in browsers memory anyway... im just trying not to store it twice as it's just bad code!! any ideas if i need to write another line or not? (which would be)... response.cookies.add(New HttpCookie("cookieName", "cookieValue") ' session cookie in client browser memory thanks guys

    Read the article

  • Class/Model Level Validation (as opposed to Property Level)? (ASP.NET MVC 2.0)

    - by Erx_VB.NExT.Coder
    Basically, what the title says. I have several properties that combine together to really make one logical answer, and i would like to run a server-side validation code (that i write) which take these multiple fields into account and hook up to only one validation output/error message that users see on the webpage. I looked at scott guthries method of extending an attribute and using it in yoru dataannotations declarations, but, as i can see, there is no way to declare a dataannotations-style attribute on multiple properties, and you can only place the declarations (such as [Email], [Range], [Required]) over one property :(. i have looked at the PropertiesMustMatchAttribute in the default mvc 2.0 project that appears when you start a new project, this example is as useful as using a pair of pins to check your motor oil - useless! i have tried this method, however, creating a class level attribute, and have no idea how to display the error from this in my aspx page. i have tried html.ValidationMessage("ClassNameWhereAttributeIsAdded") and a variety of other thing, and it has not worked. and i should mention, there is NOT ONE blog post on doing validation at this level - despite this being a common need in any project or business logic scenario! can anyone help me in having my message displayed in my aspx page, and also if possible a proper document or reference explaining validation at this level?

    Read the article

  • SonarJ like tool for .NET

    - by J. Random Coder
    I'm looking for a tool like SonarJ but for .NET instead of Java. SonarJ helps you to find deviations between he architecture and the code within minutes. It can be integrated into your IDE to help you avoid the introduction of new architetural violations to your code base. You can also use it to maintain metric based software quality rules which will keep complexity under control. I googled and searched SO without satisfying results.

    Read the article

  • Detect HTTPHandler Start

    - by Joe Coder Guy
    Is there a way to detect if a httphandler has started transmitting? I'm trying to do large dynamic Excel Exports (in html table format). I can do this, but there's a long delay from the httphandler getting the message and starting the download. I have turned off the output buffer, so the delay seems to be waiting for the SQL server to dump the data into the sqldataset. Anyways, I'd like to send the user to a new page, have the page display a message, and automatically close once the httphandler has started sending the file. Is there a way to detect if the first file headers have been sent? Many thanks in advance!

    Read the article

  • Why not use Git?

    - by Tom R
    A lot of people like git (in particular this guy) against other SCMs such as SVN, but many projects, even new ones, are set up using alternative SCMs. Furthermore, Google Code still does not support it (although many of their large open source projects use it). My question is: what are the reasons for not using git in any project, whether it be personal or collaborative? Maybe I've just been brainwashed by this guy, but I can't see any area in which other SCMs excel over git.

    Read the article

  • SQL View with Data from two tables

    - by Alex
    Hello! I can't seem to crack this - I have two tables (Persons and Companies), and I'm trying to create a view that: 1) shows all persons 2) also returns companies by themselves once, regardless of how many persons are related to it 3) orders by name across both tables To clarify, some sample data: (Table: Companies) Id Name 1 Banana 2 ABC Inc. 3 Microsoft 4 Bigwig (Table: Persons) Id Name RelatedCompanyId 1 Joe Smith 3 2 Justin 3 Paul Rudd 4 4 Anjolie 5 Dustin 4 The output I'm looking for is something like this: Name PersonName CompanyName RelatedCompanyId ABC Inc. NULL ABC Inc. NULL Anjolie Anjolie NULL NULL Banana NULL Banana NULL Bigwig NULL Bigwig NULL Dustin Dustin Bigwig 4 Joe Smith Joe Smith Microsoft 3 Justin Justin NULL NULL Microsoft NULL Microsoft NULL Paul Rudd Paul Rudd Bigwig 4 As you can see, the new "Name" column is ordered across both tables (the company names appear correctly in between the person names), and each company appears exactly once, regardless of how many people are related to it. Can this even be done in SQL?! P.S. I'm trying to create a view so I can use this later for easy data retrieval, fulltext indexing and make the programming side simpler by just querying the view.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >