Search Results

Search found 2399 results on 96 pages for 'alex gosselin'.

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

  • Trigger events from Firefox browser extension?

    - by Alex
    Hello, I want to trigger events from a firefox extension, specifically click events. I've tried jQuery's .click() as well as the whole: var evt = document.createEvent("HTMLEvents"); evt.initEvent("click", true, false ); toClick[0].dispatchEvent(evt); This is not working for me, and I was wondering if this is even possible? (to trigger events from a firefox extension)? If so, how does one do it?

    Read the article

  • Strange behavior of DDD debugger in Ubuntu

    - by Alex Farber
    I installed DDD debugger in Ubuntu and trying to work with it. It looks like DDD UI doesn't work properly with Ubuntu desktop environment. Edit boxes are almost unusable: sometimes they accept keyboard input, most of times input is ignored. Internal resizing panes are not working. Is there some way to get DDD UI working properly? The same behavior is in Ubuntu 9.10 32 bit, and 10.4 64 bit, so this is not Ubuntu version issue.

    Read the article

  • The submitHandler is not binded to the form after loading. why?

    - by Alex
    $(".normalform").click( function() { var hrf = $(this).attr("href"); var typ = $(this).attr("frm_type"); var cls = $(this).attr("class"); var nam = $(this).attr("frm_nam"); var url = $(this).attr("url"); //alert("href:"+hrf+", "+"type:"+typ+", "+"class:"+cls+", "+"name:"+nam+", "+"url:"+url+", "); $("#contentContainer").load(url, null, function() { //start validate : normalform jQuery("#normalform").validate({ submitHandler: function(form) { $('#submitbutton').attr('disabled', 'disabled'); jQuery("#normalform").ajaxSubmit({ target: "#result", error: function () { $('#submitbutton').removeAttr('disabled'); alert('Submission Error ! Try again.'); }, success: function (data) { $('#submitbutton').removeAttr('disabled'); }, clearForm: true }); } }); //end validate : normalform }); });

    Read the article

  • Round bottom corners on Android Bitmap?

    - by alex
    Hey all, what would be best practice for clipping the bottom borders of a Bitmap? Just manipulate the Bitmap itself or overlay an alpha mask drawable or ...? The whole story: I've a Listview which looks like the iPhone's grouped UITableView style. I would like to display a Bitmap in the last row, but for now the Bitmap overlaps my custom background drawable of the Listview cell. Thx in advance!

    Read the article

  • Does this incorporate JavaScript closures?

    - by alex
    In trying to learn JavaScript closures, I've confused myself a bit. From what I've gathered over the web, a closure is... Declaring a function within another function, and that inner function has access to its parent function's variables, even after that parent function has returned. Here is a small sample of script from a recent project. It allows text in a div to be scrolled up and down by buttons. var pageScroll = (function() { var $page, $next, $prev, canScroll = true, textHeight, scrollHeight; var init = function() { $page = $('#secondary-page'); // reset text $page.scrollTop(0); textHeight = $page.outerHeight(); scrollHeight = $page.attr('scrollHeight'); if (textHeight === scrollHeight) { // not enough text to scroll return false; }; $page.after('<div id="page-controls"><button id="page-prev">prev</button><button id="page-next">next</button></div>'); $next = $('#page-next'); $prev = $('#page-prev'); $prev.hide(); $next.click(scrollDown); $prev.click(scrollUp); }; var scrollDown = function() { if ( ! canScroll) return; canScroll = false; var scrollTop = $page.scrollTop(); $prev.fadeIn(500); if (scrollTop == textHeight) { // can we scroll any lower? $next.fadeOut(500); } $page.animate({ scrollTop: '+=' + textHeight + 'px'}, 500, function() { canScroll = true; }); }; var scrollUp = function() { $next.fadeIn(500); $prev.fadeOut(500); $page.animate({ scrollTop: 0}, 500); }; $(document).ready(init); }()); Does this example use closures? I know it has functions within functions, but is there a case where the outer variables being preserved is being used? Am I using them without knowing it? Thanks Update Would this make a closure if I placed this beneath the $(document).ready(init); statement? return { scrollDown: scrollDown }; Could it then be, if I wanted to make the text scroll down from anywhere else in JavaScript, I could do pageScroll.scrollDown(); I'm going to have a play around on http://www.jsbin.com and report back

    Read the article

  • Can you make a PHP function recursive without repeating it's name?

    - by alex
    It's always bugged me a recursive function needs to name itself, when a instantiated class can use $this and a static method can use self etc. Is there a similar way to do this in a recursive function without naming it again (just to cut down on maintenance)? Obviously I could use call_user_func or the __FUNCTION__ constant but I would prefer something less ugly. Update Thanks for your answers. I might stick to including the function name for simple functions, and make take the other approaches for anything more complicated.

    Read the article

  • How do I write this URL in Django?

    - by alex
    (r'^/(?P<the_param>[a-zA-z0-9_-]+)/$','myproject.myapp.views.myview'), How can I change this so that "the_param" accepts a URL(encoded) as a parameter? So, I want to pass a URL to it. mydomain.com/http%3A//google.com

    Read the article

  • Fastest tr:hover method

    - by Alex
    What is the single fastest method for table row hover css change? I've tried jQuery (onmouseover/out) and CSS with tr:hover, but once I make my page fullscreen (1920x1200) the performance on my grid is getting just sluggish enough to give the entire page a feel of being sub-par. That's on a grid with 25 rows, and some spans and divs per row. I've tried IE and Google Chrome. Is there another, faster method? What is generally considered the fastest method across browsers for doing hover CSS changes?

    Read the article

  • 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

  • Simplest way to print an array in Java

    - by Alex Spurling
    What's the simplest way of printing an array of primitives or of objects in Java? Here are some example inputs and outputs: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5] String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]

    Read the article

  • in R, the arguments of "for loop"

    - by alex
    Could anyone please tell me what is wrong with the R code below: i = 1.001 #make SAV and STO become vector SAV = c() STO = c() #set the initial values for the vector SAV[1] = 0 STO[1] = 100 for (t in 2:1000) { if ((price[t]>9.9)&(price[t]<10.1)&(SAV[t-1]!=0)) SAV[t]=SAV[t-1]*i STO[t]=0 } for (t in 2:1000) { if ((price[t]>9.9)&(price[t]<10.1)&(SAV[t-1]=0)) STO[t] = STO [t-1] SAV[t] = 0 } SAV STO What I am trying to do is to find vector for both SAV and STO.

    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

  • Redirect question using mod_rewrite (no extensions - root of site)

    - by alex
    Hi, I'm having a small problem with mod_rewrite I have the following in my .htacces: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC] This is my index.php file: <?php echo $_GET['name]; ?> This works great for the following url: www.mySite.com/this is an example.htm this would display "this is an example" What i'm trying to do however, is get it to do the same, without the .htm extension: for example: www.mySite.com/this is an example Any ideas? (dont think it's relevant but i'm using xampp to test this)

    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

  • Showing the next month

    - by Alex
    I wonder how to set next month with showing only mondays active: i tried to do smth like that but it wont work function onlyMondaysNextMonth(date){ var day = date.getDay(); var mDate = date.getMonth() + 1; return { minDate: mDate, } return [(day == 1),'']; } Thank you.

    Read the article

  • class inheretence of a attribute which is itself a class

    - by alex
    i have a class which inherets a attribute from a super-class. this attribute is a class itself. class classA(superClass): def func(self,x): if self.attributeB is None: do somthing and in the other class i have class superClass: self.attributB = classB() i get the error AttributeError: class classA has no attribute 'attributeB' when i access the attribute like i showed but if on command line i can see it works, x = classA() x.attributeB is None True so the test works. whats going on in the above code?

    Read the article

  • How can I refactor that code ? (state pattern ?)

    - by alex
    Hello guys, How can I refactor that code ? public enum enum1 { value1 = 0x01, value2 = 0x02, value3 = 0x03, value4 = 0x04, value5 = 0x05, UNKNOWN = 0xFF } class class1 { private const string STR_VALUE1 = "some text description of value1"; private const string STR_VALUE2 = "some text description of value2"; private const string STR_VALUE3 = "some text description of value3"; private const string STR_VALUE4 = "some text description of value4"; private const string STR_VALUE5 = "some text description of value5"; private const string STR_VALUE6 = "some text description of unknown type"; public static string GetStringByTypeCode(enum1 type) { switch(type) { case enum1.value1: return STR_VALUE1; case enum1.value2: return STR_VALUE2; case enum1.value3: return STR_VALUE3; case enum1.value4: return STR_VALUE4; case enum1.value5: return STR_VALUE5; default: return STR_VALUE6; } } } PS: there are many enum1...enumX and GetStringByTypeCode(enum1) ... GetStringByTypeCode(enumX) methods.

    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

  • 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

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