Search Results

Search found 1878 results on 76 pages for 'tom kruse'.

Page 49/76 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • jQuery ajax returns

    - by Tom
    I think this will be some obvious problem, but I cannot figure it out. I hope someone can help me. So I have a slider with 3 slides - Intro, Question, Submit Now I want to make sure that if the question is answered wrong people cannot slide to Submit. The function to move slide is like this: function changeSlide(slide){ // In case current slide is question check the answer if (jQuery('.modalSteps li.current',base).hasClass('questionStep')){ checkAnswer(jQuery('input[name="question_id"]',base).val(), jQuery('input[name="answer"]:checked',base).val()); } jQuery('.modalSteps li.current',base).fadeOut('fast',function(){ jQuery(this).removeClass('current'); jQuery(slide).fadeIn('fast',function(){ jQuery(slide).addClass('current'); }); }); // In case the new slide is question, load the question if (jQuery(slide).hasClass('questionStep')){ var country = jQuery('input[name="country"]:checked',base).val(); loadQuestion(country); } } Now as you can see on first lines, I am calling function checkAnswer, which takes id of question and id of answer and pass it to the AJAX call. function checkAnswer(question, answer){ jQuery.ajax({ url: window.base_url+'ajax/check_answer/'+question+'/'+answer+'/', success: function(data){ if (!data.success){ jQuery('.question',base).html(data.message); } } }); } The problem i am having is that I cannot say if(checkAnswer(...)){} Because of Ajax it always returns false or undefined. What I need is something like this: function changeSlide(slide){ // In case current slide is question check the answer if (jQuery('.modalSteps li.current',base).hasClass('questionStep')){ if (!checkAnswer(jQuery('input[name="question_id"]',base).val(), jQuery('input[name="answer"]:checked',base).val())){ return false; } } ... So it will prevent the slide from moving on. Now when Im thinking about it, I will probably have slide like "Wrong answer" so I could just move the slide there, but I would like to see the first solution anyway. Thank you for tips

    Read the article

  • Link Labels c# - displaying a list of them

    - by tom
    I am trying to add a list of linked lables to a listview. I amd doing so like this foreach (String s in values) { LinkLabel label = new LinkLabel(); label.Text = s; txtBox.Controls.Add(label); } } It keeps adding just one item to the listbox even tho there are more. Any ideas? ps) i can tell there are more items from adding a breakbpoint and using console.writeline when iterating Thanks

    Read the article

  • How to get the trending tags using php and mysql?

    - by Tom
    Hello I have a table : tags(tagname,entryid,stamp) and i want to make a section for the most trending tags today, the tagname column has no unique value, because many entries has the same tag, so the php code that i want should display the most attached tags today. Note: the "stamp" column is the date of adding the tag in UNIX time stamp format. Thanks

    Read the article

  • ASP.NET MVC Routes Login/Logout Problem

    - by Tom
    Hi Guys, Relatively new to ASP.NET MVC and little confused about how to do routing. My problem basically relates to "logged in" and "logged out routes" and having both as "/". i.e. I have home/index for logged out user which appears as "/" but this has got me confused as to how I can have home/home for logged in user and still have "/". I keep getting 127.0.0.1/home/home I could modify like 127.0.0.1/home - but I want it like "/". My confusion relates to the fact that the "/" [127.0.0.1/] is bound in the routes collection to home/index. Does anyone know how I can modify the routes dictionary (which will be binded ONCE at the start) so that the "/" can be shared for logged and non-logged users ? Thanks?

    Read the article

  • "Access is denied" iFrame IE

    - by Tom
    I have an iframe in b.com which attempts to grab the jQuery library from a.com [my website]. Whenever it does this I get the "Access is Denied" error in both IE7 and IE8. I have checked out Fiddler and it doesnt show that the script is getting blocked - but IE does errors with "Access is Denied" What is causing this prob and how to get around it ? Thx

    Read the article

  • Python 2.7.3 memory error

    - by Tom Baker
    I have a specific case with python code. Every time I run the code, the RAM memory is increasing until it reaches 1.8 gb and crashes. import itertools import csv import pokersleuth cards = ['2s', '3s', '4s', '5s', '6s', '7s', '8s', '9s', 'Ts', 'Js', 'Qs', 'Ks', 'As', '2h', '3h', '4h', '5h', '6h', '7h', '8h', '9h', 'Th', 'Jh', 'Qh', 'Kh', 'Ah', '2c', '3c', '4c', '5c', '6c', '7c', '8c', '9c', 'Tc', 'Jc', 'Qc', 'Kc', 'Ac', '2d', '3d', '4d', '5d', '6d', '7d', '8d', '9d', 'Td', 'Jd', 'Qd', 'Kd', 'Ad'] flop = itertools.combinations(cards,3) a1 = 'Ks' ; a2 = 'Qs' b1 = 'Jc' ; b2 = 'Jd' cards1 = a1+a2 cards2 = b1+b2 number = 0 n=0 m=0 for row1 in flop: if (row1[0] <> a1 and row1[0] <>a2 and row1[0] <>b1 and row1[0] <>b2) and (row1[1] <> a1 and row1[1] <>a2 and row1[1] <>b1 and row1[1] <>b2) and (row1[2] <> a1 and row1[2] <> a2 and row1[2] <> b1 and row1[2] <> b2): for row2 in cards: if (row2 <> a1 and row2 <> a2 and row2 <> b1 and row2 <> b2 and row2 <> row1[0] and row2 <> row1[1] and row2 <> row1[2]): s = pokersleuth.compute_equity(row1[0]+row1[1]+row1[2]+row2, (cards1, cards2)) if s[0]>=0.5: number +=1 del s[:] del s[:] print number/45.0 number = 0 n+=1

    Read the article

  • Jquery toggle function that doesn't return false?

    - by Tom
    Hi, Is it possible to stop the automatic preventDefault() from applying in a simple Jquery toggle function? $(".mydiv").toggle( function () { $(this).addClass("blue"); }, function () { $(this).removeClass("blue"); } ); The above prevents elements inside the div from responding normally to the click. It doesn't have to be the toggle() function - anything that allows toggling a class on and off AND doesn't return false would be great. Thanks.

    Read the article

  • Defined outlets, connected them, they all returns (null)

    - by Tom
    Hi! I'm trying to play with a WebView. I made an outlet: IBOutlet UIWebView *browser; Defined it as a property: @property (nonatomic, retain) IBOutlet UIWebView *browser; Synthethized it: @synthesize browser; Finally, I connected it in Interface Builder, really it is. Then I try to do something with it i.e.: [browser loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://apple.com"]]]; Or also: Etape *etape = [[Etape alloc] init]; NSString *html = [etape generateHTMLforEtape:[current_etape objectAtIndex:0]]; [browser loadHTMLString:html baseURL:nil]; [etape release]; I get no errors, I tried to Build & Analyse, no notices or warnings or errors.. I've been searching for one whole day, please help me :/ Thanks a lot! EDIT: Here's screenshots of my connections for my WebView: EDIT: That is how I call the view: DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:[NSBundle mainBundle]]; dvController.workflow_id = parent_id; Etape *etape = [[Etape alloc] init]; dvController.etapes = [etape getEtapes:parent_id]; [etape release]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release];

    Read the article

  • Identifying all types with some attribute

    - by Tom W
    Hello SO; I have an issue with .Net reflection. The concept is fairly new to me and I'm exploring it with some test cases to see what works and what doesn't. I'm constructing an example wherein I populate a set of menus dynamically by scanning through my Types' attributes. Basically, I want to find every type in my main namespace that declares 'SomeAttribute' (doesn't matter what it is, it doesn't have any members at present). What I've done is: For Each itemtype As Type In Reflection.Assembly.GetExecutingAssembly().GetTypes If itemtype.IsDefined(Type.GetType("SomeAttribute"), False) Then 'do something with the type End If Next This crashes the application on startup - the first type it identifies is MyApplication which is fairly obviously not what I want. Is there a right and proper way to look for all the 'real' 'sensible' types - i.e. classes that I've defined - within the current assembly?

    Read the article

  • Simple Java to XML example

    - by Tom Brito
    I've read a time ago about generate xml from Java using annotations, but I'm not finding a simple example now. If I want to make a xml file like: <x:element uid="asdf">value</x:element> from my java class: public class Element { private String uid = "asdf"; } Which annotations I should use to perform that? (I have a xml-schema, if this helps the generation)

    Read the article

  • SVN 255 Character Problem

    - by Tom
    Hi Guys, I am using TortiseSVN and we have a problem when we exporting etc because subversion errors. The path has a character limit 255 - so I am not sure if this is the problem [I think it is in Win7 x-64 bit] How do I fix this ? i.e. allow paths for 255 characters ?

    Read the article

  • Manipulate Excel workbooks programmatically

    - by Tom
    I have an Excel workbook that I want to use as a template. It has several worksheets setup, one that produces the pretty graphs and summarizes the numbers. Sheet 1 needs to be populated with data that is generated by another program. The data comes in a tab delimited file. Currently the user imports the tab delimited file into a new Workbook, selects all and copies. Then goes to the template and pastes the data into sheet1. This is a large amount of data, 269 columns and over 135,000 rows. It’s a cumbersome process and the users are not experienced Excel users. All they really want is the pretty graphs. I would like to add a step after the program that generates the data to programmatically automate the process the user currently must do manually. Can anyone suggest the best method/programming language that could accomplish this?

    Read the article

  • SWIG_NewPointerObj and values always being nil

    - by Tom J Nowell
    I'm using SWIG to wrap C++ objects for use in lua, and Im trying to pass data to a method in my lua script, but it always comes out as 'nil' void CTestAI::UnitCreated(IUnit* unit){ lua_getglobal(L, "ai"); lua_getfield(L, -1, "UnitCreated"); swig_module_info *module = SWIG_GetModule( L ); swig_type_info *type = SWIG_TypeQueryModule( module, module, "IUnit *" ); SWIG_NewPointerObj(L,unit,type,0); lua_epcall(L, 1, 0); } Here is the lua code: function AI:UnitCreated(unit) if(unit == nil) then game:SendToConsole("I CAN HAS nil ?") else game:SendToConsole("I CAN HAS UNITS!!!?") end end unit is always nil. I have checked and in the C++ code, the unit pointer is never invalid/null I've also tried: void CTestAI::UnitCreated(IUnit* unit){ lua_getglobal(L, "ai"); lua_getfield(L, -1, "UnitCreated"); SWIG_NewPointerObj(L,unit,SWIGTYPE_p_IUnit,0); lua_epcall(L, 1, 0); } with identical results. Why is this failing? How do I fix it?

    Read the article

  • My first Lisp macro; is it leaky?

    - by Tom Martin
    I've been working through Practical Common Lisp and as an exercise decided to write a macro to determine if a number is a multiple of another number: (defmacro multp (value factor) `(= (rem ,value ,factor) 0)) so that : (multp 40 10) evaluates to true whilst (multp 40 13) does not The question is does this macro leak in some way? Also is this "good" Lisp? Is there already an existing function/macro that I could have used?

    Read the article

  • Why are the default UI controls in my iPhone app blurred?

    - by Tom H
    Why would the default iPhone interface elements, specifically the UISwitch (unmodified) and a UISegmentedControl appear slightly blurred? I have not changed them or called any private APIs. This blurring occurs when I run it both in the simulator and when I load it on my iPod Touch, so I don't think it's a one off drawing glitch. These elements were created via some code (initWithFrame:) not in interface builder. Here is a screenshot of the blurring in the simulator: http://drp.ly/14rS6a It looks similar on the actual device. Thanks for your help

    Read the article

  • How do i get the reg string from the handle integer?

    - by Tom
    Hi, ive got the reg handles (as ints) being outputted, but i need to convert this to the HKLM/bla/bla.... I know that the 5 Root Keys are 0x80000000Y where Y is a value from 0 to 4, but i'm also getting much smaller values which represent nodes lower down in the registry leaves.

    Read the article

  • Pass HTML form entries into a Javascript array to then be written to a client side cookie?

    - by Tom
    I'm building a bit of a test-case JS application, something very basic, but have run into some problems. I'm trying to use a HTML form for a user to enter a number, which is then written to a Javascript Array. The user then has the option to write that same array to a local (client side) cookie. (I understand the security implications of this - it's a test-case and not for commercial use.) However, I can't make the connection - how can I capture the HTML entry, press 'submit' which will send it to a JS array, where the user can then press a different 'submit' which will write the array to a text file? If anyone can help I'd appreciate it because it's been nearly 6 hours and it's not funny anymore.

    Read the article

  • asp.net mvc script and style references

    - by tom
    I'm trying to include script and style references that will not break on deployment, however I can not even get the references to work locally. I have tried using Url.Content() and MVCContrib's <%=Html.ScriptInclude("")%>. My scripts are in a Scripts folder on the root of the site; my styles are in the usual Content/css/ folder. The scripts render like this: <script type="text/javascript" src="/Scripts/MicrosoftAjax.debug.js" ></script> This will not work in a view page in the Views folder. What am I doing wrong and what is the best way to handle this? I would have thought Url.Content() would at least work for styles but used in my master page, the link rendered <link href="/Content/css/Site.css rel="stylesheet" type="text/css" /> This does not work, because the Master Page is in a Shared folder, so what is really the way forward with this?

    Read the article

  • UIWebView doesn't scroll to the bottom of the webpage loaded/created

    - by tom
    I have a UIWebView inside a normal UIViewController. The content of the UIWebView is programming/dynamically created in my program, and it could be very long (multiple table rows). Somehow, after loading, the page won't scroll more then one and half screen of content when swipe on the screen. Because of that I can only see the beginning few rows of data, but not the many others after them. Why is that?

    Read the article

  • TCP 3 way handshake

    - by Tom
    Hi, i'm just observing what NMAP is doing for the 3 ports it reports are open. I understand what a half-scan attack is, but what's happening doesnt make sense. NMAP is reporting ports 139 are 445 are open..... all fine. But when i look at the control bits, NMAP never sends RST once it has found out the port is open, It does this for port 135- but not 139 and 445. This is what happens: (I HAVE OMITTED THE victim's replies) Sends a 2 (SYN) Sends a 16 (ACK) Sends a 24 (ACK + PST) Sends a 16 (ACK) Sends a 17 (ACK + FIN) I dont get why NMAP doesnt 'RST' ports 139 and 445??

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >