Search Results

Search found 2409 results on 97 pages for 'alex polo'.

Page 63/97 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • How to do jquery code AFTER page loading?

    - by Alex
    If you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded. I want to do javascript code only after the page contents are loaded how can I do that?

    Read the article

  • Dynamic TextBox on LinkButton click

    - by Alex Peta
    I am creating dynamic TextBoxes in a page by clicking a LinkButton. However, after that, if the page is submitted, I can't find the items created dynamically, thus, can't send the information to the database. protected void lbAddTag_Click(object sender, EventArgs e) { for (int i = 0; i < 3;i++ ) { CreateTextBox("txtTag-" + i.ToString()); } } private void CreateTextBox(string ID) { TextBox txt = new TextBox(); txt.ID = ID; txt.Width = Unit.Pixel(300); //txt.TextChanged += new EventHandler(OnTextChanged); txt.AutoPostBack = false; tagsPanel.Controls.Add(txt); Literal lt = new Literal(); lt.Text = "<br /><br />"; tagsPanel.Controls.Add(lt); } If I put: foreach (Control c in tagsPanel.Controls) { if (c is TextBox) { lblError.Text += c.ClientID + " , "; } } in the lbAddTag_Click method I can see the items, and they exist, but if I submit the page and try to insert the values in the database nothing... Any hint is much appreciated.

    Read the article

  • Weather API to mobile platform

    - by Alex
    Hello everybody! I would like to ask from you guys/girls somebody used radar image api in MOBILE PLATFORM? I got some good provider but the user agreement don`t allow to use it in mobile platform. Even some good weather forecast API exists? (with moon phase,5-7 days forecast) and radar images ? Maybe search by US zip code?

    Read the article

  • Stored Procedures In Source Control - Automate Build/Deployment Process

    - by Alex
    My company provides a large .NET service-oriented solution. The services layer interact with a T-SQL back-end consisting of hundreds of tables and stored procedures. Our C# code is in version-control (SVN) but our stored procedures and schema are not. After much lobbying of expedient upper-management, I was allowed to review our (non-existent) build/deployment process to accomplish the following goals: Place schema and stored procedures under source-control. Automate the build/deployment process. I would like to proceed per the accepted answer's strategy in this post but have additional questions: I would like to use Hudson as my build server. Is this a reasonable choice for a C#/SQL solution? What better alternatives should I explore? Assuming I have all triggers, stored-procedures, schema, etc... under source control, and that they are scripted to individual files, how do I generate a build script which will take into account dependencies/references between these items? (SQL Server does this automatically, but it generates one giant script) What does the workflow of performing an update at the client look like? i.e. I have to keep existing table data. How do I roll-back schema changes? I am the only programmer. Several other pseudo-technical staff like to make changes directly inside SQL Management Studio. Is it realistic to expect others to adhere to this solution -- how can I enforce this? Thank you in advance for your help.

    Read the article

  • How to let the matcher to match the second invocation on mock?

    - by Alex Luya
    I have an interface like this public interface EventBus{ public void fireEvent(GwtEvent<?> event); } and test code(testng method) looks like this: @Test public void testFireEvent(){ EventBus mock=mock(EventBus.class); //when both Event1 and Event2 are subclasses of GwtEvent<?> mock.fireEvent(new Event1()); mock.fireEvent(new Event2()); //then verify(mock).fireEvent(argThat(new Event2Matcher())); } Event2Matcher looks like this: private class Event2Matcher extends ArgumentMatcher<Event2> { @Override public boolean matches(Object arg) { return ((Event2) arg).getSth==sth; } } But get an error indicating that: Event1 can't be cast to Event2 And obviously,the matcher matched the first invoking mock.fireEvent(new Event1()); So,the statement within matcher return ((Event2) arg).getSth==sth; Will throw out this exception.So the question is how to let verify(mock).fireEvent(argThat(new Event2Matcher())); to match the second invoking?

    Read the article

  • printing using one '\n'

    - by Alex
    I am pretty sure all of you are familiar with the concept of the Big4, and I have several stuffs to do print in each of the constructor, assignment, destructor, and copy constructor. The restriction is this: I CAN'T use more than one newline (e.g., ƒn or std::endl) in any method I can have a method called print, so I am guessing print is where I will put that precious one and only '\n', my problem is that how can the method print which prints different things on each of the element I want to print in each of the Big4? Any idea? Maybe overloading the Big4?

    Read the article

  • Storing object as a column in LINQ

    - by Alex
    Hello, i have some class which constructs itself from string, like this: CurrencyVector v = new CurrencyVector("10 WMR / 20 WMZ"); it's actually a class which holds multiple currency values, but it does not matter much. I need to change type of column in my LINQ table (in vs 2010 designer) from String to that class, CurrencyVector. If i do it - i get runtime error when LINQ runtime tries to cast String as CurrencyVector (when populating the table from database). Adding IConvertible did not help. I wrapped these columns in properties, but it's ugly and slow solution. Searching internet gave no results.

    Read the article

  • formation an external hard disk

    - by Alex
    I am trying to format an external hard disk to FAT32 (i need it to wrok with some hardware that expects it to be in fat32). When i am trying to format it vie windows the only option I'm getting is to format it to NTFS. Another strange thing is that when i am trying to format one of my own partitions (on the hard disk that is running the OS) i can do it only in NTFS while another partition my OS can format in both NTFS and FAT32. What can cause such a bihavior and how can I format the external hard dist to FAT32?

    Read the article

  • Find Rank in Microsoft Report

    - by Alex Essilfie
    Is there any way I can find the rank of a set of values in Microsoft Reports? For instance, in order to produce a table like the one below, what function/formula do I enter in the Rank column? +------+-----+ |Value | Rank| +------+-----+ | 12 | 3 | | 30 | 5 | | 5 | 1 | | 10 | 2 | | 24 | 4 | +------+-----+ Update Values in the value column are produced from calculations on the report-side so I cannot find the rank using a query.

    Read the article

  • Why is String final in Java?

    - by Alex
    From when I learned that the class java.lang.String is declared as final in Java, I was wondering why is that? I didn't find any answer back then, but this post: How to create a replica of String class in Java? reminded me of my query. Sure, String provides all the functionality I ever needed, and never thought of any operation that would require an extension of class String, but still you'll never know what someone might need! So, does anyone know what was the intent of the designers when they decided to make it final? See also: Why is String a sealed class in C#?

    Read the article

  • Jquery validation, step by step validate on click function.

    - by Alex
    Trying to get jquery validation plugin work with my step by step form and here is the function i made. It works but only with first step. Any other step or final submit wont work in that case. If anyone could have a look whats wrong with my code i would appreciate the most. Thank you. function StepByStep(){ var a = { rules: { fieldname1: "required", fieldname2: "required", } } var b = { rules: { fieldname3:"required" } } var aStep = $("form").validate(a); var bStep = $("form").validate(b); $('input.nextStep').click(function(){ if (aStep.form()) { //open step 2 function } return false }); $('input.submit').click(function(){ if (bStep.form()) { $('form').submit(); } return false }); }

    Read the article

  • Select...Case VB.NET to C# Equivalent

    - by Alex Essilfie
    I just started using C# and I've got a couple of issues. I hook several controls to one event handler as in the following and I want to perform a slightly different action for each control: Private Sub Button_Click(sender as Object, e as EventArgs) _ Handles button1.Click, Button2.Click 'do a general activity Select CType(sender, Button).Name Case button1.Name 'do something Case button2.Name 'do something else Case Else 'do the defalut action End Select End Sub Is there any way of doing the above select statement in C# without having to use nested ifs?

    Read the article

  • Which language should I learn?

    - by Alex
    I am already pretty good at PHP and now want to expand my knowledge to desktop programming.. which language would be: The one's I'm mainly looking into are: Java, C#, C++, Python 1) Easier to learn? 2) Most suitable for Making 3D games and applications with sockets? One more thing - Although I'm looking to code for Windows, I may also want to do a bit of programming for Mac OS after a while.

    Read the article

  • Setting minOccurs="0" (not required) on web service parameters of type int

    - by Alex Angas
    I have an ASP.NET 2.0 web method with the following signature: [WebMethod] public QueryResult[] GetListData( string url, string list, string query, int noOfItems, string titleField) I'm running the disco.exe tool to generate .wsdl and .disco files from this web service for use in SharePoint. The following WSDL for the parameters is being generated: <s:element minOccurs="0" maxOccurs="1" name="url" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="list" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="query" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="noOfItems" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="titleField" type="s:string" /> Why does the int parameter have minOccurs set to 1 instead of 0 and how do I change it? I've tried the following without success: [XmlElementAttribute(IsNullable=false)] in the parameter declaration: makes no difference (as expected when you think about it) [XmlElementAttribute(IsNullable=true)] in the parameter declaration: gives error "IsNullable may not be 'true' for value type System.Int32. Please consider using Nullable instead." changing the parameter type to int? : keeps minOccurs="1" and adds nillable="true" [XmlIgnore] in the parameter declaration: the parameter is never output to the WSDL at all

    Read the article

  • Why is it that I cannot insert this into Django correctly?

    - by alex
    new_thing = MyTable(last_updated=datetime.datetime.now()) new_thing.save() >>>>select * from MyTable\G; last_updated: 2010-04-01 05:26:21 However, in my Python console...this is what it says... >>> print datetime.datetime.now() 2010-04-01 10:26:21.643041 So obviously it's off by 5 hours. By the way, the database uses "SYSTEM" as its time, so they should match perfectly. mysql> SELECT current_time; +--------------+ | current_time | +--------------+ | 10:30:16 | +--------------+ >>> print datetime.datetime.now() 2010-04-01 10:30:17.793040

    Read the article

  • Solving a cyclical dependency in Ninject (Compact Framework)

    - by Alex
    I'm trying to use Ninject for dependency injection in my MVP application. However, I have a problem because I have two types that depend on each other, thus creating a cyclic dependency. At first, I understand that it was a problem, because I had both types require each other in their constructors. Therefore, I moved one of the dependencies to a property injection instead, but I'm still getting the error message. What am I doing wrong? This is the presenter: public class LoginPresenter : Presenter<ILoginView>, ILoginPresenter { public LoginPresenter( ILoginView view ) : base( view ) { } } and this is the view: public partial class LoginForm : Form, ILoginView { [Inject] public ILoginPresenter Presenter { private get; set; } public LoginForm() { InitializeComponent(); } } And here's the code that causes the exception: static class Program { /// <summary> /// The main entry point for the application. /// </summary> [MTAThread] static void Main() { // Show the login form Views.LoginForm loginForm = Kernel.Get<Views.Interfaces.ILoginView>() as Views.LoginForm; Application.Run( loginForm ); } } The exception happens on the line with the Kernel.Get<>() call. Here it is: Error activating ILoginPresenter using binding from ILoginPresenter to LoginPresenter A cyclical dependency was detected between the constructors of two services. Activation path: 4) Injection of dependency ILoginPresenter into property Presenter of type LoginForm 3) Injection of dependency ILoginView into parameter view of constructor of type LoginPresenter 2) Injection of dependency ILoginPresenter into property Presenter of type LoginForm 1) Request for ILoginView Suggestions: 1) Ensure that you have not declared a dependency for ILoginPresenter on any implementations of the service. 2) Consider combining the services into a single one to remove the cycle. 3) Use property injection instead of constructor injection, and implement IInitializable if you need initialization logic to be run after property values have been injected. Why doesn't Ninject understand that since one is constructor injection and the other is property injection, this can work just fine? I even read somewhere looking for the solution to this problem that Ninject supposedly gets this right as long as the cyclic dependency isn't both in the constructors. Apparently not, though. Any help resolving this would be much appreciated.

    Read the article

  • Branching logic in an MVC view

    - by Alex Kilpatrick
    I find myself writing a lot of code in my views that looks like the code below. In this case, I want to add some explanatory HTML for a novice, and different HTML for an expert user. <% if (ViewData["novice"] != null ) { % some extra HTML for a novice <% } else { % some HTML for an expert <% } % This is presentation logic, so it makes sense that it is in a view vs the controller. However, it gets ugly really fast, especially when ReSharper wants to move all the braces around to make it even uglier (is there a way to turn that off for views?). My question is whether this is proper, or should I branch in the controller to two separate views? If I do two views, I will have a lot of duplicated HTML to maintain. Or should I do two separate views with a shared partial view of the stuff that is in common?

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >