Search Results

Search found 771 results on 31 pages for 'johnny coder'.

Page 10/31 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | 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

  • Duplicate image with Haxe

    - by Johnny Oin
    Hello, My goal is to make a wide map using only one square image. Using actionscript 3 the solution is to simply make new Bitmap from the Loader: var loader:Loader = new Loader(); loader.load(new URLRequest("xyz.png")); this.addChild(loader); var duplicationBitmap:Bitmap = new Bitmap(Bitmap(loader.content).bitmapData); Unluckily, Haxe API doesn't allow to do that. I can't get bitmapData from loader content… Anyone has a clue? Thanks.

    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

  • Is ASP.NET MVC destined to replace Webforms?

    - by johnny
    I found these questions, but a couple of them were a little old: http://stackoverflow.com/questions/191556/should-i-pursue-asp-net-webforms-or-asp-net-mvc http://stackoverflow.com/questions/88787/do-you-think-asp-net-mvc-will-compete-with-asp-net-webforms http://stackoverflow.com/questions/722637/asp-net-mvc-asp-net-webforms-why I do not believe these are duplicates and might be old enough that new light can be shed. If not please close this. I know that no one framework or language is necessarily the only tool for every job. But, do you see MVC eclipsing webforms or webforms going lower on the priority list for Microsoft? They will have to keep webforms for a long time because so many have invested in it, but they don't have to keep adding new functionality for it. I don't know if this is a good example, but it reminds me of web parts. I never saw much improvement in it from Microsoft. It works and I thought it was great until I started to really try and get a lot out of it. Then from what I could see it just wasn't being pursued by Microsoft that much, though it stayed in Visual Studio. Maybe that's a bad example; just what I remembered. EDIT: Also, if anyone has any statements from Microsoft on this subject it is appreciated. No offense to anyone. I was only hoping for something official.

    Read the article

  • SO_LINGER and closing sockets(WINSOCK)

    - by Johnny Walked
    hey. im writing a multithreaded winsock application and im having some issues with closing the sockets. first of all, is there a limit for a number of simultaneously open sockets? lets say like 32 sockets all in once. i establish a connection on one of the sockets, and passing information and it all goes right. problem is when i disconnect the socket and then reconnect to the same destination, i get a RST from the server after my SYN. i dont have the code for the server app so i cant debug it. when i used SO_LINGER and it sent a RST flag at the end of each session - it worked. but i dont want to end my connections this way. when not using SO_LINGER a FIN flag was sent but it seems the connection was not really closed. any help? thanks

    Read the article

  • XML deserialization problem (attribute with a namespace)

    - by Johnny
    hi, I'm trying to deserialize the following XML node (RDF actually) into a class. <rdf:Description rdf:about="http://d.opencalais.com/genericHasher-1/dae360d4-25f1-34a7-9c70-d5f7e4cfe175"> <rdf:type rdf:resource="http://s.opencalais.com/1/type/em/e/Country"/> <c:name>Egypt</c:name> </rdf:Description> [Serializable] [XmlRoot(Namespace = "http://www.w3.org/1999/02/22-rdf-syntax-ns#", ElementName = "Description")] public class BasicEntity { [XmlElement(Namespace = "http://s.opencalais.com/1/pred/", ElementName = "name")] public string Name { get; set; } [XmlAttribute("about", Namespace = "http://www.w3.org/1999/02/22-rdf-syntax-ns#")] public string Uri { get; set; } } The name element is parsed correctly but the about attribute isn't. What am I doing wrong?

    Read the article

  • How do I create a custom python interpreter? i.e. with certain modules already included?

    - by Johnny Brown
    If you've used Ruby on Rails, I'm thinking of the feature where the user types 'rails console' and instantly gets a Ruby console with rails and the current app already loaded. I want to make something like this for a python program I'm working on, does anyone know how I would get to type say, 'python myPythonConsole.py' and open up a regular python interpreter but with my program and all its dependencies loaded?

    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

  • ASP .NET MVC partial views and routing

    - by Johnny
    Hi, I have an MVC view that contains a number of partial views. These partial views are populated using partial requests so the controller for the view itself doesn't pass any data to them. Is it possible to reload the data in one of those partial views if an action was triggered in another? For example, one partial view has a jqGrid and I want to refresh the data in another partial view when a user selects a new row in this grid. Is there a code example for this scenario (in C#) that I can look at to see what am I doing wrong? I am using ajax calls to trigger a new request but non of the partial views are refreshed so I am not sure if the issue is with the routing, the controller, or if this even possible at all! Thanks!

    Read the article

  • SQL server timeout 2000 from C# .NET

    - by Johnny Egeland
    I have run into a strange problem using SQL Server 2000 and two linked server. For two years now our solution has run without a hitch, but suddenly yesterday a query synchronizing data from one of the databases to the other started timing out. I connect to a server in the production network, which is linked to a server containing orders I need data from. The query contains a few joins, but basically this summarizes what is done: INSERT INTO ProductionDataCache (column1, column2, ...) SELECT tab1.column1, tab1.column2, tab2.column1, tab3.column1 ... FROM linkedserver.database.dbo.Table1 AS tab1 JOIN linkedserver.database.dbo.Table2 AS tab2 ON (...) JOIN linkedserver.database.dbo.Tabl32 AS tab3 ON (...) ... WHERE tab1.productionOrderId = @id ORDER BY ... Obviously my first attempt to fix the problem was to increase the timeout limit from the original 5 minutes. But when I arrived at 30 minutes and still got a timeout, I started to suspect something else was going on. A query just does not go from executing in less than 5 minutes to over 30 minutes over night. I outputted the SQL query (which was originally in the C# code) to my logs, and decided to execute the query in the Query Analyzer directly on the database server. To my big surprise, the query executed correctly in less than 10 seconds. So I isolated the SQL execution in a simple test program, and observed the same query time out both on the server originally running this solution AND when running it locally on the database server. Also I have tried to create a Stored Procedure and execute this from the program, but this also times out. Running it in Query Analyzer works fine in less than a few seconds. It seems that the problem only occurs when I execute this query from the C# program. Has anyone seen such behavior before, and found a solution for it? UPDATE: I have now used SQL Profiler on the server. The obvious difference is that when executing the query from the .NET program, it shows up in the log as "exec sp_executesql N'INSERT INTO ...'", but when executing from Query Analyzer it occurs as a normal query in the log. Further I tried to connect the SQL Query Analyzer using the same SQL user as the program, and this triggered the problem in Query Analyzer as well. So it seems the problem only occurs when connecting via TCP/IP using a sql user.

    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

  • 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

  • Switch to 64 bit or stay at 32 bit?

    - by Johnny
    I have a small office, and I currently use a Visual Foxpro Application that I wrote to handle all the data. It is time to buy a new server. It seems that there are problems with VFP and 64 bit operating system. Should I make the move to 64 bit and try to deal with the problems that arise, or buy a new server running the older 32 bit acrhitecture? The latter would of course require that I use Exchange 2003 instead of 2007 or 2008. Probably no big deal?

    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

  • Disable second dropdown menu before first is populated

    - by johnny-kessel
    I need to grey out the second jump box (Select a Subcategory) before the first (Choose a Category) has a valid selection ..Here is the current code.. thanks guys <script type="text/javascript"> \$j(document).ready(function() { \$j('.subf_dropdown').html($j('.subf_dropdown').html()); }); function chooseForum(f, name) { \$j.ajax({ url: 'index.php?autocom=cats&root=' + f, type: 'GET', timeout: 100000, error: function(){ alert('Oops something went wrong. Please try again'); }, success: function(xml){ \$j('.subf_dropdown').html("<optgroup label='Subcategories'> " + xml + " </optgroup>"); } }); } function newPostInForum(f) { if (f != "") { window.location = "http://www.xxx.co.za/?act=post&do=new_post&f=" + f; } } </script> <select name='f' class='f_dropdown' onchange="chooseForum(this.value, this); return false;"> <optgroup label="Choose a Category"> {$data} </optgroup> </select> <br /><br /> <select name='subf' class='subf_dropdown' onchange="newPostInForum(this.value); return false;"> <optgroup label="Subcategories"> <option value="" selected="selected">Select a Subcategory</option> </optgroup> </select>

    Read the article

  • Decrypting PKCS#7 encrypted data in C#

    - by Johnny Egeland
    I am working on a solution that needs to decrypt PKCS#7 encrypted data, preferably in C#. As far as I can see, the .NET api has support for this through the System.Security.Cryptography.Pkcs namespace. However it seems that the implementation can only work on byte arrays. So what do I do when I have a large encrypted file that does not fit into the memory? Am I missing something here, or is there another way to do this on a Stream level instead of using bytearrays?

    Read the article

  • actionscript 3.0 load images dynamically

    - by johnny
    I am making a photo slideshow in flash and would like to be able to load images dynamically from a folder. So that whenever i have a new photo i can just stick it in a folder and have my swf file read from that folder and update the slideshow. Is this doable in actionscript 3.0? if so any pointers would be helpful. thanks!

    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

  • WSDL: What do I do with it? Add service Reference? Noobie question

    - by Johnny
    Hey guys! I have been given a WSDL with all the method requests and responses, and all the objects I'll need to use for creating a few webmethods. The thing is, I don't know what to do with it. I've added the WSDL as a Service Reference. I can see the methods and structures, I can instantiate them, it's all there, but the project doesn't build as soon as I add the WSDL. "Error 2 The type name 'ServiceReference1' does not exist in the type 'WSPELab.WSPELab' C:\Users\JJ\Documents\Visual Studio 2008\Projects\WSPELab\WSPELab\Service References\ServiceReference1\Reference.cs 21 111 WSPELabSLN Is it a stupid namespace error on my part? EDIT : Forgot to add this. With the WSDL added, can I used the structures it contains directly? Or are they just "listings" for me to implement? Thanks!

    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

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