Search Results

Search found 15081 results on 604 pages for 'passing by reference'.

Page 58/604 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Alternative Python standard library reference

    - by Ender
    I love Python; I absolutely despise its official documentation. Tutorials do not count as library references, but that appears to be what they're attempting. What I really want is the ability to find a class in the standard library and view documentation for all of its properties and methods. Actionscript, MSDN, and Java all do this just fine (although each with their odd quirks). Where is this for python? For example, I wanted to sort a list. mylist.sort(). Awesome. But what if I wanted it sorted in descending order? Official documentation is not - much - help. Or what if I wanted to specify a key function? That's also supported: mylist.sort(key=lamba item: item.customVar)- but documented...where? I understand that Python's approach to OOP may not be equivalent to Java et. al. Maybe list isn't actually a class - maybe it's just a function that returns an iterable when the tachyon beams are set to glorious and the unboxed hyper enumeration is quantized, but...I don't care. I just want to know how to sort lists. (Apologies for the angst - too much caffeine today)

    Read the article

  • Passing variables to shopping cart with Javascript

    - by albatross
    This question is an extension of this one: http://stackoverflow.com/questions/2359238/calculate-order-price-by-date-selection-value I'm trying to make a conference registration page based off the previous page, which passes the variables(name, email, price) to my organization's outdated shopping cart using javascript. I'm also using Seminar Registration by CSSTricks (http://css-tricks.com/examples/SeminarRegTutorial/) Currently, my proceed to payment button produces an 'element is undefined' error on line 298(same thing on unresolved previous question, linked above^): switch (document.Information.amount.value) { Any help would be greatly appreciated. I'm at my wits end with this. Here is the page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Seminar Registration Form with jQuery</title> <link rel="stylesheet" type="text/css" href="css/style.css" media="screen" /> <script src="js/jquery-1.2.6.js" type="text/javascript" charset="utf-8"></script> <script src="js/form-fun.jquery.js" type="text/javascript" charset="utf-8"></script> <!--[if IE]> <style type="text/css"> legend { position: relative; top: -30px; } fieldset { margin: 30px 10px 0 0; } </style> <script type="text/javascript"> $(function(){ $("#step_2 legend").css({ opacity: 0.5 }); $("#step_3 legend").css({ opacity: 0.5 }); }); </script> <![endif]--> </head> <body> <div id="page-wrap"> <h1>Conference <span>Registration</span></h1> <form action="#" method="post"> <fieldset id="step_1"> <legend>Step 1</legend> <label for="num_attendees"> How cool are you? </label> <select id="amount"> <option id="0" value="0">Please Choose</option> <option id="prof" value="90.00">Professional</option> <option id="grad" value="55.00">Graduate Student</option> </select> <br /> <div id="attendee_1_wrap" class="name_wrap push"> <h3>Who are you?</h3> <p> <label for="FirstName"> First Name: </label> <input type="text" id="FirstName" class="name_input"></input> </p> <p> <label for="LastName"> Last Name: </label> <input type="text" id="LastName" class="name_input"></input> </p> <p> <label for="OfficialTitle"> Official Title: </label> <input type="text" id="OfficialTitle" class="name_input"></input> </p> <h3>How do we find you?</h3> <label for="email">Email: </label> <input id="email" name="email" class="required email" /> </p> <p> <label for="Address">Street Address: </label><input name="Address" id="Address" type="text" size="20" maxlength="75" /> </p> <p> <label for="City">City: </label><input name="City" id="City" /> </p> <p> <label for="State">State: </label><select name="State" id="State"> <option selected value="IL">IL</option> <option value="AL">AL</option> <option value="AK">AK</option> <option value="AZ">AZ</option> <option value="AR">AR</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DE">DE</option> <option value="DC">DC</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="ID">ID</option> <option value="IN">IN</option> <option value="IA">IA</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="ME">ME</option> <option value="MD">MD</option> <option value="MA">MA</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MS">MS</option> <option value="MO">MO</option> <option value="MT">MT</option> <option value="NE">NE</option> <option value="NV">NV</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NY">NY</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VT">VT</option> <option value="VA">VA</option> <option value="WA">WA</option> <option value="WV">WV</option> <option value="WI">WI</option> <option value="WY">WY</option> </select> </p> <p> <label for="Zip">Zip Code: </label><input name="Zip" id="Zip" type="text" value="" size="5" maxlength="10" /> </p> <p> <label for="Phone">Telephone: </label><input name="Phone" id="Phone" type="text" value="" size="10" maxlength="13" /> </p> </div> </fieldset> <fieldset id="step_2"> <legend>Step 2</legend> <p> Do you work in Higher Education? </p> <input type="radio" id="company_name_toggle_on" name="company_name_toggle_group"></input> <label for="company_name_toggle_on">Yes</label> &emsp; <input type="radio" id="company_name_toggle_off" name="company_name_toggle_group"></input> <label for="company_name_toggle_off">No</label> <div id="company_name_wrap"> <label for="company_name"> Which School? </label> <input type="text" id="company_name"></input> </div> <div class="push"> <p> Will anyone in your group require special accommodations? </p> <input type="radio" id="special_accommodations_toggle_on" name="special_accommodations_toggle"></input> <label for="special_accommodations_toggle_on">Yes</label> &emsp; <input type="radio" id="special_accommodations_toggle_off" name="special_accommodations_toggle"></input> <label for="special_accommodations_toggle_off">No</label> </div> <div id="special_accommodations_wrap"> <label for="special_accomodations_text"> Please explain below: </label> <textarea rows="10" cols="10" id="special_accomodations_text"></textarea> </div> </fieldset> <fieldset id="step_3"> <legend>Step 3</legend> <label for="rock"> Are you ready to rock? </label> <input type="checkbox" id="rock"></input> <p> <INPUT onclick="javascript:PaymentButtonClick()" type=button value="Proceed to payment" name=PaymentButton> <img src="images/visa1.gif" /> <img src="images/mastercard1.gif" /> </p> </fieldset> </form> </div> <FORM name="emailForm" action="mailform.asp" method=post"> <INPUT type="hidden" value="Conference Registration" name="mf_subject"> <INPUT type="hidden" value="Yes" name="mf_email_results"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffa0" size="20" name="num_attendees"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffa0" size="17" name="FirstName"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffa0" size="22" name="LastName"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffff" size="64" name="OfficialTitle"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffff" size="40" name="email"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffff" size="48" name="Address"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffa0" size="17" name="City"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffa0" size="17" name="State"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffa0" size="17" name="Zip"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffa0" size="17" name="Phone"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffa0" size="17" name="company_name"> <INPUT type="hidden" title="" style="BACKGROUND-COLOR: #ffffff" size="20" name="special_accomodations_text"> <INPUT type="hidden" value="[email protected]" name="mf_from"> <INPUT type="hidden" value="[email protected]" name="mf_to"> </FORM> <FORM name="addform" action="https://webcluster.niu.edu/CreditCard/servlet/Shopping_Cart_Add_Item_Servlet" method="post"> <INPUT type="hidden" value="orient" name="Dept_ID"> <INPUT type="hidden" value="Orientation" name="Product_Name"> <INPUT type="hidden" value="z000000" name="Product_Code"> <INPUT type="hidden" value="" name="amount"> <INPUT type="hidden" value="/orientation/index.shtml" name="return_link"> <INPUT type="hidden" value="http://www.niu.edu" name="return_server"> <INPUT type="hidden" value="1" name="quantity"> <INPUT type="hidden" value="0" name="tax"> <INPUT type="hidden" value="0" name="ship"> <INPUT type="hidden" value="DQ83225" name="sale_id"> <INPUT type="hidden" value="XXXXXX" name="sale_acct"> </FORM> <SCRIPT language="Javascript"> function PaymentButtonClick() { switch (document.Information.amount.value) { case 'prof': document.Information.amount.value = 90.00; break; case 'grad': document.Information.amount.value = 55.00; break; } document.addform.Product_Name.value = document.Information.FirstName.value + ","+ document.Information.LastName.value+","+ document.Information.OfficialTitle.value+","+ document.Information.email.name+","+","+ document.Information.Address.value+ "," + document.Information.City.value+ "," + document.Information.State.value+ "," + document.Information.Zip.value+ "," + document.Information.Phone.value+ "," + document.Information.company_name.value+ "," + document.Information.special_accomodations_text.value; document.addform.Product_Code.value = document.Information.LastName.value; if ((document.Information.UCheck.checked==true) && (document.Information.altDate1.value != "") && (document.Information.altDate1.value != "x")) { if (document.Information.StudentLastName.value != "" || document.Information.StudentFirstName.value != "" || document.Information.StudentID.value != "" ) { document.addform.submit(); } else { alert("Please enter missing information"); } } } </SCRIPT> </body> </html>

    Read the article

  • No compile errors when reference added, but errors seen upon build

    - by cjs
    A solution was just converted from VS 2008 to VS 2010. My VS 2010 build is failing with the popular "The type or namespace X could not be found". When I go to the project and go to Add References and add the appropriate project dll, the class name appears in blue text as if .NET found the correct class. However, when I go to the Build menu and select "Build Solution" I get the "namespace not found error" and the class name is no longer blue. Thanks.

    Read the article

  • Reference inherited class's <T>ype in a derived class

    - by DRapp
    I don't know if its possible or not, but here's what I need. I'm toying around with something and want to know if its possible since you can't create your own data type based on a sealed type such as int, Int32, Int64, etc. I want to create a top-level class that is defined of a given type with some common stuff. Then, derive this into two subclasses, but in this case, each class is based on either and int or Int64 type. From THAT instance, create an instance of either one and know its yped basis for parameter referenc / return settings. So when I need to create an instance of the "ThisClass", I don't have to know its type basis of either int or Int64, yet IT will know the type and be able to allow methods/functions to be called with the typed... This way, If I want to change my ThisClass definition from SubLevel1 to SubLevel2, I don't have to dance around all different data type definitions. Hope this makes sense.. public class TopLevel<T> { ... } pubic class SubLevel1 : TopLevel<int> { ... } public class SubLevel2 : TopLevel<Int64> { ... } public class ThisClass : SubLevel1 { ... public <based on the Int data type from SubLevel1> SomeFunc() { return <the Int value computed>; } }

    Read the article

  • Rails: Passing new child object placeholder (build) to parent view

    - by Meltemi
    I've got 2 classes of objects... Magician has_many Rabbits and Rabbit belongs_to Magician. When viewing a Magician (show.html) I'd like to list all the associated Rabbits and then have some blank fields with a submit button to add a new Rabbit. To do so I build a new rabbit (associated to the current magician) in the Magician's show method (below). Edit2: found way to make it work but not sure if it's the "Rails way"? see comments inline (below): If I build the rabbit in Magician's show method then when show is rendered an empty (and invalid) rabbit ends the list before the new rabbit form fields are then shown. If I build it in the view itself then everything works & renders correctly. I was led to believe that we should not be doing this type of stuff in the view...if so, what's the proper way to address this? #/app/controllers/magicians_controller.rb class MagiciansController < ApplicationController respond_to :html, :json def show @magician = Magician.find(params[:id]) @rabbit = @magician.rabbits.build # <=== build here and empty rabbit gets # included in @magician.rabbits when they're rendered... # but is NOT included in @magician.rabbits.count for some reason?!?!? respond_with(@magician) end ... end #view/magicians/show.html.haml %p %b Name: = @magician.name %h2 Rabbits = "There are #{pluralize(@magician.rabbits.count, "rabbit")}" = render @magician.rabbits, :target => @magician %h2 Add a rabbit: - @rabbit = @clown.rabbits.build -# <=== build here and everything SEEMS to work = render :partial =>"rabbits/form", :locals => { :parent => @magician, :foreign_key => :magician_id, :flash => flash } Edit1: Adding generated html from partial as per request: <p> <b>Rabbit:</b> <b>Color:</b> | <b>ID:</b> <a href="/magicians/2/rabbits" data-confirm="Sure? A bunny will die" data-method="delete" rel="nofollow">Kill Rabbit</a> </p> And I suppose you probably want to see the partial that generates this: %p %b Rabbit: = rabbit.name %b Color: = rabbit.color | %b ID: = rabbit.id = link_to("Kill Rabbit", [target, rabbit], :method => :delete, :confirm => "Sure? A bunny will die")

    Read the article

  • Accessing 2D array and passing string to label.text

    - by Amir
    Hi. I'm trying to create 2D array and initialize it with NSStrings. When I try to copy content of a cell from the array to a label.text, the application crashes. NSMutableArray *array = [NSMutableArray arrayWithCapacity:0]; [array addObject:[NSMutableArray arrayWithObjects: [NSArray arrayWithObjects: @"0-0", @"0-1", @"0-2", nil], [NSArray arrayWithObjects: @"1-0", @"1-1", @"1-2", nil], [NSArray arrayWithObjects: @"2-0", @"2-1", @"2-2", nil], nil]]; label.text = [[array objectAtIndex:0] objectAtIndex:0]; Any idea why and what am I doing wrong?

    Read the article

  • Passing an NSDate

    - by Garry
    I'm new to the iPhone and objective-c and I am still trying to get my head around ownership of objects so bear with me. I have a DOBViewController that has a datepicker on it. I have created a custom init method: -(id)initWithInitialDate(NSDate *)initialDate; Another view controller has a date instance declared (NSDate *dob) that holds a value. I would like to pass this to the DOBViewController so that it can scroll the datepicker to the passed value. Here is the custom init method: - (id)initWithInitialDate:(NSDate *)initialDate { // Initialise ourselves self = [super init]; // Set the date of the date picker if (initialDate != nil) { datePicker.date = initialDate; } else { // Set it to today datePicker.date = [NSDate date]; } return self; } This is how I am sending the dob NSDate object: DOBViewController *dobViewController = [[DOBViewController alloc] initWithInitialDate:dob]; Where dob is a variable of type NSDate that is declared in the header file. This doesn't seem to work as initialDate is always NULL. What am I doing wrong?

    Read the article

  • Obj-C : Passing parameters back from a detailViewController in a navigation controller

    - by Garfield81
    Hi I am using a navigation Controller on an iPhone app. I am able to pass data forward when I push a controller into the navigation stack but how do I pass data back when I pop the controller. What I am basically trying to achieve is the root navigation controller view displays a number of fields that can be edited. A user then clicks on one of the fields to be edited and a EditViewController is pushed onto the stack with the name of the field the user wants to edit. Now the users enters the new value of the field and presses save to pop the view controller. So how do I get the value from the editViewController back to the root navigation controller view?

    Read the article

  • Why can you reference an imported module using the importing module in python

    - by noam
    I am trying to understand why any import can be referenced using the importing module, e.g #module master.py import slave and then >>>import master >>>print master.slave gives <module 'slave' from 'C:\Documents and Settings....'> What is the purpose of the feature? I can see how it can be helpful in a package's __init__.py file, but nothing else. Is it a side effect of the fact that every import is added to the module's namespace and that the module's namespace is visible from the outside? If so, why didn't they make an exception with data imported from other modules (e.g don't show it as part of the module's namespace for other modules)?

    Read the article

  • PHP OOP question about reference

    - by Starmaster
    Can one please explain with example what does $obj-$a()-$b mean? I've used PHP OOP quite a long time and have seen in some places this structure and not just this $obj-$a(); In what cases should I use it? Thanks in advance!

    Read the article

  • Passing methods/functions as args in Objective C

    - by Baishampayan Ghose
    Hello, I am new to Objective C and I am trying to implement an async library which works with callbacks. I need to figure out a way to pass callback methods as args to my async methods so that the callback can be invoked when the task is finished. What is the best way to achieve this in Objective C? In Python, for example I could easily pass a function, but in Objective C it seems selectors are the way to go(?). Can anyone point me to an example from where I can get some ideas? Thanks in advance.

    Read the article

  • C++ Newbie: Passing an fstream to a function to read data

    - by vgm64
    I have a text file named num.txt who's only contents is the line 123. Then I have the following: void alt_reader(ifstream &file, char* line){ file.read(line, 3); cout << "First Time: " << line << endl; } int main() { ifstream inFile; int num; inFile.open("num.txt"); alt_reader(inFile, (char*)&num); cout << "Second Time: " << num << endl; } The output is: First Time: 123 Second Time: 3355185 Can you help me figure out how to get an fstream that is read in a function still assign the variable in main? I'm doing this because alt_reader really has a lot more to it, but this is the part I'm stuck on. Thanks a lot for the help.

    Read the article

  • JQuery Passing Variable From href to load()

    - by dvancouver
    I am trying to pass an href id to load() in JQuery, I can see from the alert the returned id# 960, so I know the id value is getting past I just don't know how to append the load url, well the $("#refreshme_"+add_id) is the important part, I use that to refresh the unique div id in the page assigned by the database pull, so it would be looking for id="refreshme_960". My simple example that is obviously not working. I want to refresh the db select part of the page showing the new list of cars. Any ideas? $(document).ready(function() { $(".add_to_favorites").livequery("click", function(event) { var add_id = this.id.replace("add_", ""); //taken from a.href tag alert (id); $.get(this.href, function(data) { $("#refreshme_"+add_id).load("http://www.example.com/car_list/"+add_id); <a class="add_to_cars" href="/car-add/960/add'}" id="add_960">Add Car</a>

    Read the article

  • Excel VBA: Passing a collection from a class to a module issue

    - by Martin
    Hello, I have been trying to return a collection from a property within a class to a routine in a normal module. The issue I am experiencing is that the collection is getting populated correctly within the property in the class (FetchAll) but when I pass the collection back to the module (Test) all the entries are populated with the last item in the list. This is the Test sub-routine in the standard module: Sub Test() Dim QueryType As New QueryType Dim Item Dim QueryTypes As Collection Set QueryTypes = QueryType.FetchAll For Each Item In QueryTypes Debug.Print Item.QueryTypeID, _ Left(Item.Description, 4) Next Item End Sub This is the FetchAll property in the QueryType class: Public Property Get FetchAll() As Collection Dim RS As Variant Dim Row As Long Dim QTypeList As Collection Set QTypeList = New Collection RS = .Run ' populates RS with a record set from a database (as an array), ' some code removed ' goes through the array and sets up objects for each entry For Row = LBound(RS, 2) To UBound(RS, 2) Dim QType As New QueryType With QType .QueryTypeID = RS(0, Row) .Description = RS(1, Row) .Priority = RS(2, Row) .QueryGroupID = RS(3, Row) .ActiveIND = RS(4, Row) End With ' adds new QType to collection QTypeList.Add Item:=QType, Key:=CStr(RS(0, Row)) Debug.Print QTypeList.Item(QTypeList.Count).QueryTypeID, _ Left(QTypeList.Item(QTypeList.Count).Description, 4) Next Row Set FetchAll = QTypeList End Property This is the output I get from the debug in FetchAll: 1 Numb 2 PBM 3 BPM 4 Bran 5 Claw 6 FA C 7 HNW 8 HNW 9 IFA 10 Manu 11 New 12 Non 13 Numb 14 Repo 15 Sell 16 Sms 17 SMS 18 SWPM This is the output I get from the debug in Test: 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM 18 SWPM Anyone got any ideas? I am probably totally overlooking something! Thanks, Martin

    Read the article

  • Class Self-Reference

    - by Free Bullets
    I have the following code. The angle function needs some information from the class it was called from. What's the best way to do this? class MyScannedRobotEvent extends robocode.ScannedRobotEvent { public int angle(robocode.Robot myRobot) { return (int) Math.toRadians((myRobot.getHeading() + getBearing()) % 360); } } public class MyRobot extends robocode.Robot { int a = angle(**WHATDOIPUTHERE?**) }

    Read the article

  • Autocomplete and Dynamic Parameter Passing

    - by abcParsing
    The code below works fine using jQuery UI 1.8 and jQuery 1.4.2 $("#sid_entry_box").autocomplete( {source:"autocomplete_sid.php?database="+database_name, minLength:4, delay:1000, enable:true, cacheLength:1 }); The database name is passed as a get parameter of the php call. In this application, I have two databases selected by a radio button. Since jQuery loads and assigns this function when the document is loaded, the database name is whatever was checked at that momemnt. What I really need to pass to the php call is the following: database=$("input[name=rf_database_option]:checked").val(); Is ther ean easy to understand way to be able to pass a dynamic dom value?

    Read the article

  • Passing JSON object from Controller to View(jsp)

    - by user752233
    I am trying to send JSON object to my view from controller but unable to send it. Please help me out! I am using following code public class SystemController extends AbstractController{ protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView mav = new ModelAndView("SystemInfo", "System", "S"); response.setContentType("application/json;charset=UTF-8"); response.setHeader("Cache-Control", "no-cache"); JSONObject jsonResult = new JSONObject(); jsonResult.put("JVMVendor", System.getProperty("java.vendor")); jsonResult.put("JVMVersion", System.getProperty("java.version")); jsonResult.put("JVMVendorURL", System.getProperty("java.vendor.url")); jsonResult.put("OSName", System.getProperty("os.name")); jsonResult.put("OSVersion", System.getProperty("os.version")); jsonResult.put("OSArchitectire", System.getProperty("os.arch")); response.getWriter().write(jsonResult.toString()); // response.getWriter().close(); return mav; // return modelandview object } } and in the view side I am using <script type="text/javascript"> Ext.onReady(function(response) { //Ext.MessageBox.alert('Hello', 'The DOM is ready!'); var showExistingScreen = function () { Ext.Ajax.request({ url : 'system.htm', method : 'POST', scope : this, success: function ( response ) { alert('1'); var existingValues = Ext.util.JSON.decode(response.responseText); alert('2'); } }); }; return showExistingScreen(); });

    Read the article

  • raising events passing parameters in wpf

    - by Thiago
    Hi, I'd like to add tabs to my window when an item in the GridView is double-clicked. But the tab that will be added depends on the clicked item. Which way should I do this on WPF? I thought about RoutedEvents, but I don't know how to pass a parameter with it. Any suggestions?

    Read the article

  • Having trouble passing text from MySQL to a Javascript function using PHP

    - by Nathan Brady
    So here's the problem. I have data in a MySQL DB as text. The data is inserted via mysql_real_escape_string. I have no problem with the data being displayed to the user. At some point I want to pass this data into a javascript function called foo. // This is a PHP block of code // $someText is text retrieved from the database echo "<img src=someimage.gif onclick=\"foo('{$someText}')\">"; If the data in $someText has line breaks in it like: Line 1 Line 2 Line 3 The javascript breaks because the html output is <img src=someimage.gif onclick="foo('line1 line2 line3')"> So the question is, how can I pass $someText to my javascript foo function while preserving line breaks and carriage returns but not breaking the code? =========================================================================================== After using json like this: echo "<img src=someimage.gif onclick=\"foo($newData)\">"; It is outputting HTML like this: onclick="foo("line 1<br \/>\r\nline 2");"> Which displays the image followed by \r\nline 2");"

    Read the article

  • Passing parameter in C#

    - by Lu Lu
    In C++, I have a function: void MyFunction(int p) { p=5; } Assume, I have: int x = 10; MyFunction(x); // x = 10 MyFunction(&x); // x = 5 How to archive this in C# with condition: I create only one MyFunction. Thanks.

    Read the article

  • Reference a internal class from a Windows Workflow Activity

    - by Ben Hughes
    I'm creating a custom Workflow activity for use within TFS2010. In the same assembly I have a XAML activity and a C# code activity. The XAML activity references the code activity. When the assembly is deployed to our clients, I only want them to be able to use the Workflow activity. The code activity is of little use by itself and would no doubt confuse them. I thought the logical way to do this would be to set the code activity class to internal: the XAML is in the same assembly and should be able to access it. However, when I do that I get an error in the XAML saying that the assembly can't be found. Is there a way to make activities internal/hidden?

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >