Search Results

Search found 4882 results on 196 pages for 'odd behaviour'.

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

  • trigger click behaviour of image-map's area

    - by Amit
    I have a image map set up and each area in the image map has a href defined. the href on area contains urls to other pages in my application. i generate a have a small ul which lists down name attribute of the area tag. i want the dynamically generated ul/lis to imitate click behaviour of area tag. for this, i have the following jquery set up - $('li').click(function(e){ $('area[name='+$(this).html()+']').trigger('click'); }); but the above works well only in ie6+. ff does not fire the click event. i also tried the click() variant but to no avail. looking forward for some help. Thanks :)

    Read the article

  • odd validation error messages with authlogic

    - by peter
    i have an issue where when validation fails, i get messages like "{{count}} errors prohibited this {{model}} from being saved" and "{{attribute}} {{message}}". it looks like something isn't getting expanded correctly. i've tried adding validates_* stuff but it doesn't seem to help. i've also tried to search the web for an answer but when i add the '{{' and '}}' i get no results. what am i missing? how can i fix this? thanks, -peter

    Read the article

  • working with a csv with odd encapsulation // php

    - by Patrick
    I have a CSV file that im working with, and all the fields are comma separated. But some of the fields themselves, contain commas. In the raw csv file, the fields that contain commas, are encapsulated with quotes, as seen here; "Doctor Such and Such, Medical Center","555 Scruff McGruff, Suite 103, Chicago IL 60652",(555) 555-5555,,,,something else the code im using is below <?PHP $file_handle = fopen("file.csv", "r"); $i=0; while (!feof($file_handle) ) { $line = fgetcsv($file_handle, 1024); $c=0; foreach($line AS $key=>$value){ if($i != 0){ if($c == 0){ echo "[ROW $i][COL $c] - $value"; //First field in row, show row # }else{ echo "[COL $c] - $value"; // Remaining fields in row } } $c++; } echo "<br>"; // Line Break to next line $i++; } fclose($file_handle); ?> The problem is im getting the fields with the comma's split into two fields, which messes up the number of columns im supposed to have. Is there any way i could search for comma's within quotes and convert them, or another way to deal with this?

    Read the article

  • odd behavior with C# ftp client class

    - by geoff
    I found an ftp client class in c# over a year ago and have been using it in a process that uploads files on a nightly basis. A few days ago we started having a problem where it would time out. I'm not well versed in this so I'm not sure why it's doing this. When the program starts uploading a file it checks to see if it's logged in and if not, it calls the login method. In that method is this block of code. if (this.resultCode != 230) { this.sendCommand("PASS " + password); if (!(this.resultCode == 230 || this.resultCode == 202)) { this.cleanup(); throw new FtpException(this.result.Substring(4)); } } On the line that says this.sendCommand("PASS"... it goes into this code. private void sendCommand(String command) { if (this.verboseDebugging) Debug.WriteLine(command, "FtpClient"); Byte[] cmdBytes = Encoding.ASCII.GetBytes((command + "\r\n").ToCharArray()); clientSocket.Send(cmdBytes, cmdBytes.Length, 0); this.readResponse(); } If I let the program run, it times out. However if I step through it into the sendCommand method it executes fine. Does anyone know why it would work fine when I step through it? Nothing on our end has changed and I've been told nothing on the client's end has changed so I'm stumped. Thanks.

    Read the article

  • odd url, and difficulty in following the php page flow

    - by sdfor
    I'm trying to understand code that I bought so I can modify it. In the index.php there are picture links: <a href="test10,10"><img title="" border=1 src="makethumb.php?pic=product_images/test101.jpg&amp;w=121&amp;sq=N" / ></a> I don't understand the href since it is not pointing to a page. test10 is an id of a picture. I assumed it was going back to the index.php and the code would extract the test10,10 from the url, but it's not. I know that because I put in trace code as the first line. The question is, where is the link going to? I know it that it somewhere in the process it executes a page called profile.php, but nowhere in the source code (doing a global search) is there an explicit call to profile.php. As a related question, is there a way to profile the code to see what pages it's calling without using xdebug, which for the life of me I can't get working after many hours of trying every suggestion I found here and else where. (I'm using xampp) thanks

    Read the article

  • Persisting sensitve data in asp.net, odd implementation

    - by rawsonstreet
    For reasons not in scope of this question I have implemented a .net project in an iframe which runs from a classic asp page. The classic asp site persisted a few sensitive values by hitting the db on each page. I have passed there variables as xml to the aspx page, now I need to make these values available on any page of this .net site. I've looked into the cache object but we are on a web farm so I am not sure it would work. Is there a way I can can instantiate an object in a base page class and have other pages inherit from the base page to access these values? What is the best way to persist these values? A few more points to consider the site runs in https mode and I cannot use session variables, and I would like to avoid cookies if possible..

    Read the article

  • Odd behaviour with scala method syntax

    - by Ceilingfish
    Hi chaps, I hit a bit of a quirk of scala's syntax I don't really understand object Board { def getObjectAt(x:Int, y:Int):Placeable = return locations(x)(y) } works fine. But object Board { def getObjectAt(x:Int, y:Int):Placeable { return locations(x)(y) } } returns the error Board.scala:8: error: illegal start of declaration return locations(x)(y) I found some stuff that says the second form convinces the scala compiler you're trying to specify an expansion to the return type Placeable. Is there a way I can fix this, or should I just avoid specifying a return type here?

    Read the article

  • Strange margin-behaviour with Sifr spans in link (screens)

    - by knalstaaf
    I'm making a menu and it's supposed to look like picture nr 1 on this link. However, at this moment, it looks like picture nr 2. There's no logic in this behaviour, since all three elements have the same css-attributes. Moreover, let's change the word "Reiki" to "Psychotherapie" and see what happens... (picture nr 3) For some reason the word "Reiki" ignores certain attributes. This is not a problem when Sifr is turned off. I guess I'll need some extra CSS to solve this (messing with paddings, heights or margins on that specific element doesn't give any result. It just won't budge). Unless someone knows a more elegant solution?

    Read the article

  • odd response after INVITE request, SIP

    - by supersk
    After sending an invite request i receive a trying answer, and immidietly after that i receive error 407 proxy authentication required. After sending ack & another invite with the proxy header i receive session progress about 1/4 of the time!! other times it just sends 407 error again & again. Any ideas?

    Read the article

  • odd behavior setting timeouts inside a function with global references in javascript

    - by Pablo
    Here is the the function and the globals: $note_instance = Array(); $note_count = 0; function create(text){ count = $note_count++; time = 5000; $note_instance[count] = $notifications.notify("create", text); setTimeout(function(){ $note_instance[count].close() }, time); } The function simply opens a notification, a sets a timeout to close it in 5 seconds. so if i call this create("Good Note 1"); create("Good Note 2"); create("Good Note 3"); Ecah note should close 5 seconds from their creation, however always and only the last note closes, in this case "Good Note 3". Each note object has its own entry in the the $note_instance global array so the timeouts should no be overwriting themselves. What am i missing here folks? Thanks in advance

    Read the article

  • ASP.NET problem - Firebug shows odd behaviour

    - by Brandi
    I have an ASP.NET application that does a large database read. It loads up a gridview inside an update panel. In VS2008, just running on my local machine, it runs fantastically. In production (identical code, just published and put on one of our network servers), it runs slow as dirt. Debug is set to false, so this is not the cause of the slow down. I'm not an experienced web developer, so besides that, feel free to suggest the obvious. I have been using Firebug to determine what's going on, and here is what that has turned up: On production, there are around 500 requests. The timeline bar is very short. The size column varies from run to run, but is always the same for the duration of the run. Locally, there are about 30 requests. The timeline bar takes up the entire space. Can anyone shed some light on why this is happening and what I can do to fix it? Also, I can't find much of anything on the web about this, so any references are helpful too.

    Read the article

  • Unix: replace every odd | with \left| and every even | with \right|

    - by HH
    An enormous equation. You need to add \left| on the left side of corresponding |. The corresponding | you need to replace with \right|. Equation \begin{equation} | \Delta w_{0} | = \frac{|w_{0}|}{2} \left( |\frac{\Delta g}{g}|+|\frac{\Delta (\Delta r)}{\Delta r}| + |\frac{\Delta r}{r}| +|\frac{\Delta L}{L}| \right) \end{equation}

    Read the article

  • casting odd smallint time to to datetime format.

    - by c6400sc
    Hello everyone, I'm working with a db (SQL server 2008), and have an interesting issue with times stored in the db. The DBA who originally set it up was crafty and stored scheduled times as smallints in 12-hour form-- 6:00AM would be represented as 600. I've figured out how to split them into hours and minutes like thus: select floor(time/100) as hr, right(time, 2) as min from table; What I want to do is compare these scheduled times to actual times, which are stored in the proper datetime format. Ideally, I would do this with two datetime fields and use datediff() between them, but this would require converting the smallint time into a datetime, which I can't figure out. Does anyone have suggestions on how to do this? Thanks in advance.

    Read the article

  • odd behavior when checking if radio button selected in jQuery

    - by RememberME
    I had the following check in my jQuery which I thought was working fine to see if a radio button was checked. if ($("input[@name='companyType']:checked").attr('id') == "primary") { ... } Here's the radiobuttons: <p> <label>Company Type:</label> <label for="primary"><input onclick="javascript: $('#sec').hide('slow');$('#primary_company').find('option:first').attr('selected','selected');" type="radio" name="companyType" id="primary" checked />Primary</label> <label for="secondary"><input onclick="javascript: $('#sec').show('slow');" type="radio" name="companyType" id="secondary" />Subsidiary</label> </p> Then, it suddenly stopped working (or so I thought). I did some debugging and finally realized that it was returning an id of "approved_status". Elsewhere on my form I have a checkbox called "approved_status". I realized that when I originally tested this, I must have testing it on records where approved_status is false. And, now most of my approved_statuses are true/checked. I changed the code to this: var id = $("input:radio[@name='companyType']:checked").attr('id'); alert(id); if (id == "primary") { And it's now properly returning "primary" or "secondary" as the id. So, it is working, but it seems that it's not checking the name at all and now just checking radio buttons. I just want to know for future use, what's wrong with the original code b/c I can see possibly having 2 different radio sets on a page and then my new fix probably wouldn't work. Thanks!

    Read the article

  • /form making table go odd

    - by noryb009
    I have a table (3x3) that counts "< /form" as space in IE. The code for 1 td looks like: <style type="text/css"> table { border-width: 0px; border-collapse: collapse; padding: 0px; } td, th { padding: 0px; } </style> <table><tr><td><form name="form" action="index.php" method="post"><input type="hidden" name="from" value="a" /><input type="image" src="pic1.gif" alt="1" name="submit" value="submit" /></form></td> There is no spaces anywhere outside the tags. Inside the td, there is a form, with a hidden field and a picture. Firefox shows only the picture, but IE has spaces between the rows. I did a little debugging, and found it was from the /form. Does anyone know a fix to this?

    Read the article

  • LINQ to SQL Queries odd Materialization

    - by ptoinson
    I ran across an interesting Linq to SQL, uh, feature, the other day. Perhaps someone can give me a logical explanation for the reasoning behind the results. Take the code below as my example which utilizes the AdventureWorks database setup in a Linq to SQL DataContext. This is a clip from my unit test. The resulting customer returned from a call to both CustomerQuery_Test_01() and CustomerQuery_Test_02() is the same. However, the query executed on the SQLServer are different is a major way. The method CustomerQuery_Test_01 us causing the entire Customer table to be materialized, which the call to CustomerQuery_Test_02 is only causing the single customer to be materialized. The resulting SQL Queries are at the bottom of this post. Anyone have a good reason for this? To me, it was highly non-intuitive. protected virtual Customer GetByPrimaryKey(Func<Customer, bool> keySelection) { AdventureWorksDataContext context = new AdventureWorksDataContext(); return (from r in context.Customers select r).SingleOrDefault(keySelection); } [TestMethod] public void CustomerQuery_Test_01() { Customer customer = GetByPrimaryKey(c => c.CustomerID == 2); } [TestMethod] public void CustomerQuery_Test_02() { AdventureWorksDataContext context = new AdventureWorksDataContext(); Customer customer = (from r in context.Customers select r).SingleOrDefault(c => c.CustomerID == 2); } Query for CustomerQuery_Test_01 (notice the lack of a where clause) SELECT [t0].[CustomerID], [t0].[NameStyle], [t0].[Title], [t0].[FirstName], [t0].[MiddleName], [t0].[LastName], [t0].[Suffix], [t0].[CompanyName], [t0].[SalesPerson], [t0].[EmailAddress], [t0].[Phone], [t0].[PasswordHash], [t0].[PasswordSalt], [t0].[rowguid], [t0].[ModifiedDate] FROM [SalesLT].[Customer] AS [t0] Query for CustomerQuery_Test_02 (notice the where clause) SELECT [t0].[CustomerID], [t0].[NameStyle], [t0].[Title], [t0].[FirstName], [t0].[MiddleName], [t0].[LastName], [t0].[Suffix], [t0].[CompanyName], [t0].[SalesPerson], [t0].[EmailAddress], [t0].[Phone], [t0].[PasswordHash], [t0].[PasswordSalt], [t0].[rowguid], [t0].[ModifiedDate] FROM [SalesLT].[Customer] AS [t0] WHERE [t0].[CustomerID] = @p0

    Read the article

  • Odd Things of ASP.NET MVC Deployment on IIS 6

    - by misaxi
    Recently, I am a bit interested in the deployment of ASP.NET MVC application on IIS6 because Phil Haack posted an easier way to deploy ASP.NET MVC application on ASP.NET 4. So I decided to see how different version of ASP.NET MVC works on different version of ASP.NET. First off, I created an ASP.NET MVC 2 project in Visual Studio 2010 and deploy it to IIS 6 on Windows Server 2003 (only .NET framework 3.5 installed). I set the application to run in ASP.NET 2.0 and no extra stuff. Because I just wanted to see what sort of error would occur. And as expected, some error was reported as following. Then, I set the Copy Local attribute of System.Web.Mvc assembly to true as following and deploy again. As a result, the application ran smoothly. I had read tons of materials talked about the mess of deploying MVC application on IIS 6. And I did fight to tackle the deploying issues in my previous project. At least, if had used Extensionless Url in your application, you should have configured wildcard mapping in IIS. But in this case, I even didn’t have chance to do so. What the heck was going on exactly? Did I discover a new continent?

    Read the article

  • odd behavior with java collections of parameterized Class objects

    - by Paul
    Ran into some questionable behavior using lists of parameterized Class objects: ArrayList<Class<String>> classList = new ArrayList<Class<String>>(); classList.add(Integer.class); //compile error Class intClass = Integer.class; classList.add(intClass); //legal apparently, as long as intClass is not parameterized Found the same behavior for LinkedList, haven't tried other collections. Is it like this for a reason? Or have I stumbled on something?

    Read the article

  • Reason for unintuitive UnboundLocalError behaviour 2

    - by Jonathan
    Following up on Reason for unintuitive UnboundLocalError behaviour (I will assume you've read it). Consider the following Python script: def f(): # a+=1 # 1 aa=a aa+=1 # b+='b' # 2 bb=b bb+='b' c[0]+='c' # 3 c.append('c') cc=c cc.append('c') # 4 a=1 b='b' c=['c'] f() print a print b print c The result of the script is: 1 b ['cc', 'c', 'c'] The commented out lines (marked 1,2) are lines that would through an UnboundLocalError and the SO question I referenced explains why. However, the line marked 3 works! By default, lists are copied by reference in Python, therefore it's understandable that c changes when cc changes. But why should Python allow c to change in the first place, if it didn't allow changes to a and b directly from the method's scope? I don't see how the fact that by default lists are copied by reference in Python should make this design decision inconsistent. What am I missing folks?

    Read the article

  • Odd toString behavior in javascript

    - by George
    I have this small function that's behaving oddly to me. Easy enough to work around, but enough to pique my curiosity. function formatNumber(number,style) { if (typeof style == 'number') { style = style.toString(); } return (number).format(style); } The return format part is based on another function that requires the style variable to be a string to work properly, so I'm just checking if style is a number and if it is to convert it to a string. When the function above is written as is, the format function format doesn't work properly. However when I write it as simply: return (number).format(style.toString()); Everything works. Is there a difference between putting the .toString function inside the format call vs performing it before hand and setting it as the variable style?

    Read the article

  • Strange Array#each Ruby behaviour

    - by with a dot.
    The question is a bit vague, but I am not really sure why this happens: I have the following code: p user.room.users.length user.room.users.each {|usr| puts "b" } user.room.users.each {|usr| puts "a"; usr.enter(Room[Config::entrance]) } which outputs: 5 b b b b b a a a I also made User#enter count how many times it's been called and it returns 3! I am completely baffled by this behaviour. I doubt the code within User#enter is the cause, but if someone thinks it might be relevant I can provide it (I don't want to clutter the question unnecessarily). Edit If it's relevant I am using ruby-1.9.3-p125

    Read the article

  • C# Console Application - Odd behaviour - char '\a'

    - by KHT
    After extensive debugging of an application, I noticed the console window would hang when searching text for the char '\a'. The goal is to strip out characters from a file. The console window would always hang upon exiting the program, and it would make it to the last statement of main. I removed the '\a' from the switch statement and the console application does not hang anymore. Any idea why? I still need to strip out the char '\a', but cannot get the application to work without hanging. switch (c) { case '\t': //Horizontal Tab case '\v': //Vertical Tab case '\n': //Newline case '\f': //Form feed case '\r': //carriage return case '\b': //Backspace case '\x7f': //delete character case '\x99': //TM Trademark case '\a': //Bell Alert **REMOVED THIS** return true; }

    Read the article

  • Strange iterator's behaviour;

    - by A-ha
    #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { string s = "Haven't got an idea why."; auto beg = s.begin(); auto end = s.end(); while (beg < end) { cout << *beg << '\n'; if (*beg == 'a') {//whithout if construct it works perfectly beg = s.erase(beg); } ++beg; } return 0; } Why if I erase one or more chars from this string this code breaks? I suppose it has something to do with returned iterator after erase operation being created at higher address than end iterator but I'm not sure and it surely isn't right behaviour. Or is it?

    Read the article

  • Odd PHP Error Message

    - by John
    When I run some php code I've written, I get the following message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition, price, name, email) VALUES('Fake Title', 'Fake Subhead', 'Fake Author' at line 1 I do not see anything wrong with my syntax, however, which is like: mysql_query("INSERT INTO table (x1, x2, x3) VALUES('$y1', '$y2', '$y3')"); Any ideas?

    Read the article

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