Search Results

Search found 10634 results on 426 pages for 'pass'.

Page 27/426 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • ObjectDataSource DataObjectTypeName Help. Pass object as parameter

    - by Kettenbach
    I have a partial class (the main class is a LinqToSql generated class) <DataObject(True)> _ Partial Public Class MBI_Contract <DataObjectMethod(DataObjectMethodType.Select, True)> _ Public Shared Function GetCancelableContracts(ByVal dealer As Dealer) As List(Of MBI_Contract) Return Utilities.GetCancelableContractsForDealer(dealer) End Function End Class Here is the method it's calling Public Function GetCancelableContractsForDealer(ByVal dealer As Dealer) As List(Of MBI_Contract) Dim db As TestDataContext = TestDataContext.Create() Return (From mbi As MBI_Contract In db.MBI_Contracts _ Where mbi.MBI_DealerNumber = dealer.DealerNumber _ AndAlso mbi.MBI_PaidFor = True _ AndAlso mbi.MBI_Deleted = False).ToList() End Function I want to use the ObjectDataSource to drive a DropDownList. <asp:ObjectDataSource ID="contractOds" runat="server" TypeName="MBI_Contract" SelectMethod="GetCancelableContracts" DataObjectTypeName="Dealer"> </asp:ObjectDataSource> My aspx page has a Dealer property that is set in a BasePage. My question is how can I pass this property(object) to the ObjectDataSource, so it can be evaluated in my select method. Does anyone know how I can do this? Or am I totally doing this the wrong way? Thanks for any Advice, Cheers, ~ck in San Diego

    Read the article

  • Setting amount of time to pass when sending emails in a loop

    - by Obay
    Forgive me for this noob question, but is there such a setting that sets a certain amount of time (e.g. milli/seconds) that has to pass in between sending emails through a script? How is that setting called and where do I change that setting? I'll give an example: I used to have a PHP script that sends emails like so: for ($i=0; $i<count($emails); $i++) { mail($email[$i],'test','test'); } It turned out that not all emails were sent successfully because the script ran so fast that there was not enough time in between sending emails that was required by the server. Did I make sense?

    Read the article

  • Facebook Connect via Javascript doesn't close and doesn't pass session id

    - by ensnare
    I'm trying to authenticate users via Facebook Connect using a custom Javascript button: <form> <input type="button" value="Connect with Facebook" onclick="window.open('http://www.facebook.com/login.php?api_key=XXXXX&extern=1&fbconnect=1&req_perms=publish_stream,email&return_session=0&v=1.0&next=http%3A%2F%2Fwww.example.com%2Fxd_receiver.htm&fb_connect=1&cancel_url=http%3A%2F%2Fwww.example.com%2Fregister%2Fcancel', '_blank', 'top=442,width=480,height=460,resizable=yes', true)" onlogin='window.location="/register/step2"' /> </form> I am able to authenticate users. However after authentication, the popup window just stays open and the main window is not directed anywhere. In fact, it is the popup window that goes to "/register/step2" How can I get the login window to close as expected, and to pass the facebook session id to /register/step2? Thanks!

    Read the article

  • Should I use the ref or out keyword here?

    - by Blankman
    I have an object that may be null, which I will pass to a method that will set its properties. So my code looks like: User user = null; // may or may not be null at this point. SetUserProperties(user); UpdateUser(user); public void SetUserProperties(User user) { if(user == null) user = new User(); user.Firstname = "blah"; .... } So I am updating the same object I pass into SetUserProperties. Should I use the 'ref' keyword in my method SetUserProperties?

    Read the article

  • jquery-ui, Use dialog('open') and pass a variable to the DIALOG

    - by nobosh
    I have the following JS: $('#listeditdialog').dialog('open'); Which opens the following dialog: $('#listeditdialog').dialog({ autoOpen: false, resizable: false, position: ['center',150], width: 450, open: function(event, ui) { $("#listeditdialog").load("/projects/view/tasks/ajax/?listid=" + XXXX); }, close: function(event, ui) { $("#listeditdialog").html('<p id="loading"> </p>'); } }); My Question is when I use the dialog open function in another JS function, how can I pass a listID variable which I would get fom the click even bind that fired the dialog open func. Thanks!

    Read the article

  • ASP.NET MVC pass information from controller to view WITHOUT ViewData, ViewModel, or Session

    - by josh
    I have a unique scenario where I want a base controller to grab some data and store it in a list. The list should be accessible from my views just as ViewData is. I will be using this list on every page and would like a cleaner solution than just shoving it in the ViewDataDictionary. After attempting to come up with a solution, I thought I would create a custom ViewPage with a property to hold my list. My custom ViewPage would inherit from System.Web.MVC.ViewPage. However, I do not know where MVC passes the viewdata from the controller off to the view. More importantly, how do I get it to pass my list down to the view? Thanks for the help.

    Read the article

  • how to pass url in mailto's body

    - by Simer
    i need to send a url of my site in body so that user can click on that to join my site. but it is coming like this in mail client: Link goes here http://www.example.com/foo.php?this=a url after & is not coming then whole process of joining failed. how can i pass url like these in mailto body http://www.example.com/foo.php?this=a&join=abc&user454 <a href="mailto:[email protected]?body=Link goes here http://www.example.com/foo.php?this=a&amp;really=long&amp;url=with&amp;lots=and&amp;lots=and&amp;lots=of&prameters=on_it ">Link text goes here</a> i have searched alot but did't got right answer thanks

    Read the article

  • how to pass in dynamic data to decorators

    - by steve
    Hi, I am trying to write a base crud controller class that does the following: class BaseCrudController: model = "" field_validation = {} template_dir = "" @expose(self.template_dir) def new(self, *args, **kwargs) .... @validate(self.field_validation, error_handler=new) @expose() def post(self, *args, **kwargs): ... My intent is to have my controllers extend this base class, set the model, field_validation, and template locations, and am ready to go. Unfortunately, decorators (to my understanding), are interpreted when the function is defined. Hence it won't have access to instance's value. Is there a way to pass in dynamic data or values from the sub class? If not, I guess I could use override_template as a workaround to expose and set the template within the controller action. How would I go about validating the form within the controller action? Thanks, Steve

    Read the article

  • How to pass parameters to report model in Reporting Services

    - by savras
    I'm developing report in RS that show top N customers based on some criteria. It also allows to select number of customers and period of time. Is it possible to do it by using report model? Thing that it seems to be difficult is how to pass parameters determined by user. Another thing that in my oppinion is very disappointing is that i cannot use SQL query as dataset query, because it uses odd and elaborate XML. Although report model items seem to map its fields to query or table fields. I m concerning using report models because i need to provide uniform data model (the same tables and fields) for more or less different database schemas. It would be very nice if somebody would explain what can be done with report models and what can not.

    Read the article

  • How to pass a variable as an argument to a command with quotes in powershell

    - by da_ponc
    Hi there, My powershell script takes the following parameter: Param($BackedUpFilePath) The value that is getting passed into my script is: "\123.123.123.123\Backups\Website.7z" I have another variable which is the location I want to extract the file: $WebsiteDeploymentFolder = "C:\example" I am trying to extract the archive with the following command: `7z x $BackedUpFilePath -o$WebsiteDeploymentFolder -aoa I keep getting the following error: Error: cannot find archive The following works but I need $BackedUpFilePath to be dynamic: `7z x '\123.123.123.123\Backups\Website.7z' -o$WebsiteDeploymentFolder -aoa I think I need to pass $BackedUpFilePath to 7z with quotes but they seem to get stripped out no matter what I try. I am in quote hell. Thanks.

    Read the article

  • Not able to pass multiple override parameters using nose-testconfig 0.6 plugin in nosetests

    - by Jaikit
    Hi, I am able to override multiple config parameters using nose-testconfig plugin only if i pass the overriding parameters on commandline. e.g. nosetests -c nose.cfg -s --tc=jack.env1:asl --tc=server2.env2:abc But when I define the same thing inside nose.cfg, than only the value for last parameter is modified. e.g. tc = server2.env2:abc tc = jack.env1:asl I checked the plugin code. It looks fine to me. I am pasting the part of plugin code below: parser.add_option( "--tc", action="append", dest="overrides", default = [], help="Option:Value specific overrides.") configure: if options.overrides: self.overrides = [] overrides = tolist(options.overrides) for override in overrides: keys, val = override.split(":") if options.exact: config[keys] = val else: ns = ''.join(['["%s"]' % i for i in keys.split(".") ]) # BUG: Breaks if the config value you're overriding is not # defined in the configuration file already. TBD exec('config%s = "%s"' % (ns, val)) Let me know if any one has any clue.

    Read the article

  • polymorphism pass instantiated base to deriver

    - by Eric
    I was wondering how to do this, consider the following classes public class Fruit { public string Name { get; set; } public Color Color { get; set; } } public class Apple : Fruit { public Apple() { } } How can I instantiate a new fruit but upcast to Apple, is there a way to instantiate a bunch of Fruit and make them apples with the name & color set. Do I need to manually deep copy? Of course this fails Fruit a = new Fruit(); a.Name = "FirstApple"; a.Color = Color.Red; Apple wa = a as Apple; System.Diagnostics.Debug.Print("Apple name: " + wa.Name); Do I need to pass in a Fruit to the AppleCTor and manually set the name and color( or 1-n properties) Is there an better design to do this?

    Read the article

  • How to pass interface type/GUID reference to an automation method in Delphi

    - by Alan Clark
    In Delphi you can pass class references around to compare the types of objects, and to instantiate them. Can you do the same with interface references being passed to a COM automation server? For example, you can define a method taking a GUID parameter using the type library editor: function ChildNodesOfType(NodeType: TGUID): IMBNode; safecall; In this function I would like to return automation types that support the interface specified by NodeType, e.g. if Supports(SomeNode, NodeType) then result := SomeNode; But the Supports call always fails, I tried passing in the Guids defined in the type library but none of the different types (Ixxx, Class_xxxx, IId_Ixxxx) seem to work.

    Read the article

  • preg_replace pass match through function before replacing

    - by Martin
    This is what i want to do: $line = 'blabla translate("test") blabla'; $line = preg_replace("/(.*?)translate\((.*?)\)(.*?)/","$1".translate("$2")."$3",$line); So the result should be that translate("test") is replaced with the translation of "test". The problem is that translate("$2") passes the string "$2" to the translate function. So translate() tries to translate "$2" instead of "test". Is there some way to pass the value of the match to a function before replacing?

    Read the article

  • how to pass the strMessage (from codebehind to the script) to get the alert message

    - by Ranjana
    how to pass the strMessage (from codebehind to the script) to get the alert message i.e if my strmessage from code behind is hi, then i need You Have Used already the message : hi My code... <script type="text/javascript"> var strFileName; function alertShowMessage() { alert("You Have Used already the message :"+ <%=strFileName %>+ "); } </script> datatable dtChkFile =new datatable(); dtChkFile = objutility.GetData("ChkFileName_SMSSent", new object[] {"rahul"}).Tables[0]; if (dtChkFile.Rows.Count > 0) { for (int i = 0; i < dtChkFile.Rows.Count; i++) { strMessage= dtChkFile.Rows[i]["Message"].To); } }

    Read the article

  • How to pass binaries built upstream to a remote downstream build slave

    - by sbi
    We're using Hudson on Windows to build a .NET solution and run the unit tests (NUnit). Hudson is thereby used to start batch files that do the actual work. I am now trying to set up a new test that is to run on a build slave and will run very long. The test should use the binaries produced by the upstream build. I have searched the Hudson documentation but I cannot find how to pass upstream build artifacts to downstream slaves. How do I do this?

    Read the article

  • C# Pass Generics At Runtime

    - by TheCloudlessSky
    I have a method like the following: public IEnumerable<T> GetControls<T>() : where T : ControlBase { // removed. } I then created a class: public class HandleBase<TOwner> : ControlBase : TOwner { // Removed } I'd like to be able to call GetControls<HandleBase<this.GetType()>>; where it would use the type of THIS class to pass to the HandleBase. This would in essentially get all HandleBase that have an owner of THIS type. How can I achieve this?

    Read the article

  • pass jQuery value to php

    - by andrew
    Hi, for example, i have got this value in my php file: <script type="text/javascript"> function altcat(id) { $ogzu = id; } </script> i want to use $ogzu value in php. is it possible? can i pass a value to php from jquery? i need to learn this answer. can anyone help me please? thanks and regards edit: thanks for your kindly replies. i wanted to use $ogzu value in php like that: <?php echo "<a href='".$ogzu."'>test link</a>"; ?> well, i know its wrong. its already not working. i want to learn if we are able to use jquery values in php? thanks again friends. regards

    Read the article

  • jquery calendarpicker callback pass querystring

    - by user577318
    Trying to use this CalendarPicker source and docs here: http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp I need to be able to pass the date selected as query string variable of "searchdate" and reload page also updating current date for calendarPicker with querystring date on page reload. This is what I have so far: jQuery(document).ready(function() { var calendarPicker = jQuery("#calendarpicker").calendarPicker({ monthNames:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], years:0, months:6, days:5, showDayArrows:true, callback:function(cal) { // Simple output to test calendar date change jQuery("#output").html("Selected date: " + cal.currentDate.getFullYear()+"-"+cal.currentDate.getMonth()+"-"+cal.currentDate.getDate() ); // Not working well since it also includes arrows from datepicker as selectors jQuery(".calDay").children().click(function() { window.location.href="mysite.com?searchdate="+cal.currentDate.getFullYear()+"-"+cal.currentDate.getMonth()+"-"+cal.currentDate.getDate(); }); } }); Any help greatly appreciated. Can this be done with ajax? I am attempting to update a table of events by datepicker.

    Read the article

  • Pass CSS property dynamically from panelgrid

    - by Bernad Ali
    I have a hidden property which is fetched from ebean. how do i pass that color code property to css function? <h:panelGrid id="testpanel" columns="#{message.no_of_columns}" rows="#{message.no_of_rows}" styleClass="dynamicGrid"> <c:forEach items="#{bLDashBoardAction.listBondLoc}" var="item"> <h:panelGroup> <h:outputText value="#{item.rackTagCode}" /> <h:hiddenInput value="#{item.colorEBean.colorCode};" /> </h:panelGroup> </c:forEach> </h:panelGrid> this is my css property,background need to be assigned from panelgrid colorcode .dynamicGrid td { width: 50px; height: 50px; border: 4px solid gray; background: }

    Read the article

  • Pass dynamic data to mvc controller with AJAX

    - by Yustme
    How can I pass dynamic data with an AJAX call to an MVC Controller? Controller: public JsonResult ApplyFilters(dynamic filters){ return null; } The AJAX call: $(':checkbox').click(function (event) { var serviceIds = $('input[type="checkbox"]:checked').map(function () { return $(this).val(); }).toArray(); //alert(serviceIds); $.ajax({ type: 'GET', url: '/home/ApplyFilters', data: JSON.stringify({ name: serviceIds }), contentType: 'application/json', success: function (data) { alert("succeeded"); }, error: function (err, data) { alert("Error " + err.responseText); } }); //return false; }); Ideally would be that the filters would contain the serviceIds as a property For example like this: filters.ServiceIds. I got another filter for a date range and that one would be added like so: filters.DateRange. And server side get the filter as a dynamic object in the ApplyFilters()

    Read the article

  • jquery to construct a string and pass it as a post argument for file

    - by user253530
    I have this js code: $("#startSearch").live("click", function(event){ $("input:checkbox[name='searchId']:checked").each(function(){ var searchId = $(this).val(); var host = ''; $.post("php/autosearch-get-host.php",{sId: searchId},function(data){ host = 'http://' + data + '/index.php'; }); //alert(host); $.getJSON(host,{searchId: $(this).val()},function(){ pagination("php/pagination.php", $('#currentPage').val(), $('#sortBy').val(), $("#sortMode").val(), "autosearch"); }); }); }); The php file php/autosearch-get-host.php returns a string with the host name. What i want is to get the host from the database, create the URL using string concatenation and pass it as an argument to another $.post. $.post should use that URL like this: $.getJSON(host,{searchId: $(this).val()},function() { pagination("php/pagination.php", $('#currentPage').val(), $('#sortBy').val(), $("#sortMode").val(), "autosearch"); });

    Read the article

  • Excel VBA pass array of arrays to a function

    - by user429400
    I have one function that creates an array of arrays, and one function that should get the resulting array and write it to the spreadsheet. I don't find the syntax which will allow me to pass the array of arrays to the second function... Could you please help? Here is my code: The function that creates the array of arrays: Function GetCellDetails(dict1 As Dictionary, dict2 As Dictionary) As Variant Dim arr1, arr2 arr1 = dict1.Items arr2 = dict2.Items GetCellDetails = Array(arr1, arr2) End Function the function that writes it to the spreadsheet: Sub WriteCellDataToMemory(arr As Variant, day As Integer, cellId As Integer, nCells As Integer) row = CellIdToMemRow(cellId, nCells) col = DayToMemCol(day) arrSize = UBound(arr, 2) Range(Cells(row, col), Cells(row + arrSize , col + 2)) = Application.Transpose(arr) End Sub The code that calls the functions: Dim CellDetails CellDetails = GetCellDetails(dict1, dict2) WriteCellDataToMemory CellDetails, day, cellId, nCells Thanks, Li

    Read the article

  • JavaFX - reduce() function to show how to pass functions as parameters

    - by Helper Method
    At the moment I'm writing a JavaFX guide for Java developers. In order to show how to pass a function to another funtion i adopted the reduce() function found in Effective Java: function reduce(seq: Integer[], f: function(: Integer, : Integer): Integer, init: Integer) { var result = init; for (i in seq) { result = f(i, result); } result } def nums = [1 .. 10]; println(reduce(nums, function(a: Integer, b: Integer) { a + b }, 0)); // prints 55 println(reduce(nums, function(a: Integer, b: Integer) { a * b }, 0)); // prints 3628800 Now I wonder if this example is not to hard for someone starting to learn JavaFX. The tutorial is targeted to programmers with a solid understanding of Java, yet I'm not quite sure about the usefulness of the example. Any ideas?

    Read the article

  • HLSL/XNA Ambient light texture mixed up with multi pass lighting

    - by Manu-EPITA
    I've been having some troubles lately with lighting. I have found a source on google which is working pretty good on the example. However, when I try to implement it to my current project, I am getting some very weird bugs. The main one is that my textures are "mixed up" when I only activate the ambient light, which means that a model gets the texture of another one . I am using the same effect for every meshes of my models. I guess this could be the problem, but I don't really know how to "reset" an effect for a new model. Is it possible? Here is my shader: float4x4 WVP; float4x4 WVP; float3x3 World; float3 Ke; float3 Ka; float3 Kd; float3 Ks; float specularPower; float3 globalAmbient; float3 lightColor; float3 eyePosition; float3 lightDirection; float3 lightPosition; float spotPower; texture2D Texture; sampler2D texSampler = sampler_state { Texture = <Texture>; MinFilter = anisotropic; MagFilter = anisotropic; MipFilter = linear; MaxAnisotropy = 16; }; struct VertexShaderInput { float4 Position : POSITION0; float2 Texture : TEXCOORD0; float3 Normal : NORMAL0; }; struct VertexShaderOutput { float4 Position : POSITION0; float2 Texture : TEXCOORD0; float3 PositionO: TEXCOORD1; float3 Normal : NORMAL0; }; VertexShaderOutput VertexShaderFunction(VertexShaderInput input) { VertexShaderOutput output; output.Position = mul(input.Position, WVP); output.Normal = input.Normal; output.PositionO = input.Position.xyz; output.Texture = input.Texture; return output; } float4 PSAmbient(VertexShaderOutput input) : COLOR0 { return float4(Ka*globalAmbient + Ke,1) * tex2D(texSampler,input.Texture); } float4 PSDirectionalLight(VertexShaderOutput input) : COLOR0 { //Difuze float3 L = normalize(-lightDirection); float diffuseLight = max(dot(input.Normal,L), 0); float3 diffuse = Kd*lightColor*diffuseLight; //Specular float3 V = normalize(eyePosition - input.PositionO); float3 H = normalize(L + V); float specularLight = pow(max(dot(input.Normal,H),0),specularPower); if(diffuseLight<=0) specularLight=0; float3 specular = Ks * lightColor * specularLight; //sum all light components float3 light = diffuse + specular; return float4(light,1) * tex2D(texSampler,input.Texture); } technique MultiPassLight { pass Ambient { VertexShader = compile vs_3_0 VertexShaderFunction(); PixelShader = compile ps_3_0 PSAmbient(); } pass Directional { PixelShader = compile ps_3_0 PSDirectionalLight(); } } And here is how I actually apply my effects: public void ApplyLights(ModelMesh mesh, Matrix world, Texture2D modelTexture, Camera camera, Effect effect, GraphicsDevice graphicsDevice) { graphicsDevice.BlendState = BlendState.Opaque; effect.CurrentTechnique.Passes["Ambient"].Apply(); foreach (ModelMeshPart part in mesh.MeshParts) { graphicsDevice.SetVertexBuffer(part.VertexBuffer); graphicsDevice.Indices = part.IndexBuffer; // Texturing graphicsDevice.BlendState = BlendState.AlphaBlend; if (modelTexture != null) { effect.Parameters["Texture"].SetValue( modelTexture ); } graphicsDevice.DrawIndexedPrimitives( PrimitiveType.TriangleList, part.VertexOffset, 0, part.NumVertices, part.StartIndex, part.PrimitiveCount ); // Applying our shader to all the mesh parts effect.Parameters["WVP"].SetValue( world * camera.View * camera.Projection ); effect.Parameters["World"].SetValue(world); effect.Parameters["eyePosition"].SetValue( camera.Position ); graphicsDevice.BlendState = BlendState.Additive; // Drawing lights foreach (DirectionalLight light in DirectionalLights) { effect.Parameters["lightColor"].SetValue(light.Color.ToVector3()); effect.Parameters["lightDirection"].SetValue(light.Direction); // Applying changes and drawing them effect.CurrentTechnique.Passes["Directional"].Apply(); graphicsDevice.DrawIndexedPrimitives( PrimitiveType.TriangleList, part.VertexOffset, 0, part.NumVertices, part.StartIndex, part.PrimitiveCount ); } } I am also applying this when loading the effect: effect.Parameters["lightColor"].SetValue(Color.White.ToVector3()); effect.Parameters["globalAmbient"].SetValue(Color.White.ToVector3()); effect.Parameters["Ke"].SetValue(0.0f); effect.Parameters["Ka"].SetValue(0.01f); effect.Parameters["Kd"].SetValue(1.0f); effect.Parameters["Ks"].SetValue(0.3f); effect.Parameters["specularPower"].SetValue(100); Thank you very much UPDATE: I tried to load an effect for each model when drawing, but it doesn't seem to have changed anything. I suppose it is because XNA detects that the effect has already been loaded before and doesn't want to load a new one. Any idea why?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >