Search Results

Search found 636 results on 26 pages for 'dumb questioner'.

Page 14/26 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • How to use xml response as XMLObject outside of ajax callback function

    - by Anthony
    Hopefully I've just made a dumb oversight, but I can't figure out why the following doesn't work: $(function() { var xml; $.get( "somexml.xml", function(data){ xml = data; }, "xml"); alert(xml); }); If I put the alert inside of the callback function, I get back object XMLdocument but if I place it outside of the ajax call, I get undefined. Since my goal is to have a new DOM to parse, I don't want the entire handling of the XMLdocument to be within the callback function. I've tried defining the variable outside of the entire onready function, inside at the top (like above) and inside the callback function, all with no luck. According to Specifying the Data Type for Ajax Requests in the jquery documentation, this should be possible.

    Read the article

  • Interface and base class mix, the right way to implement this

    - by Lerxst
    I have some user controls which I want to specify properties and methods for. They inherit from a base class, because they all have properties such as "Foo" and "Bar", and the reason I used a base class is so that I dont have to manually implement all of these properties in each derived class. However, I want to have a method that is only in the derived classes, not in the base class, as the base class doesn't know how to "do" the method, so I am thinking of using an interface for this. If i put it in the base class, I have to define some body to return a value (which would be invalid), and always make sure that the overriding method is not calling the base. method Is the right way to go about this to use both the base class and an interface to expose the method? It seems very round-about, but every way i think about doing it seems wrong... Let me know if the question is not clear, it's probably a dumb question but I want to do this right.

    Read the article

  • C++/MFC: Handling multiple CListCtrl's headers HDN_ITEMCLICK events

    - by raph.amiard
    I'm coding an MFC application in which i have a dialog box with multiple CListCtrls in report view. I want one of them to be sortable. So i handled the HDM_ITEMCLICK event, and everything works just fine .. Except that if i click on the headers of another CListCtrl, it does sort the OTHER CListCtrl, which does look kind of dumb. This is apparently due to the fact that headers have an ID of 0, which make the entry in the message map look like this : ON_NOTIFY(HDN_ITEMCLICK, 0, &Ccreationprogramme::OnHdnItemclickList5) But since all the headers have an id of zero, apparently every header of my dialog sends the message. Is there an easy way around this problem ?

    Read the article

  • setting page access permissions in drupal

    - by Nikhil Patil
    I'm new to drupal. Its a very dumb question I guess. I have enabled PHP filter module so that I can create a new page with my own PHP code in it. This particular page I want to be accessible to only authenticated users, not visible to anonymous users. How can I achieve this? Can I set permissions for individual pages in drupal? Or is it possible to identify that an anonymous user is trying to access the current page through PHP code?

    Read the article

  • Is there a way to hide annotations in Netbeans or Eclipse?

    - by Boden
    Maybe a dumb question, but it would be nice if there was a way to hide or collapse Java annotations when viewing source in Netbeans (or Eclipse). I'm not finding an option and a quick search didn't turn anything up. Is this one of those "you should never want to do that, code folding is a sin!" things? Personally I'd find it useful for annotated entity classes. All the hibernate / etc annotations are just fluff that I never look at once my mapping is working fine. It's similar to imports, really. (Yes, I can use XML instead of annotations, which I might start doing. But I was just wondering...)

    Read the article

  • make reference to an empty query in flex

    - by Adam
    a bit of a dumb questions I'm sure I'm trying to allow user to set an item to be default. I've got a function that run a query to first find the current default item. Then runs a second query that unsets the current default item. Then a third query runs to set the new user selected item to be the default. This seem to work fine when a default item has been perviously selected, but when I try to set the default item initially I get the good old "Cannot access a property or method of a null object reference." error. This is because the first query that runs returns no items I'm sure. So I need to write an if statement that if the first query returns nothing to skip the second and go right to the third. The only problem is I can't make a reference to a null object. So how do I go about writing this statement. Thanks

    Read the article

  • Having a problem getting my ActionListeners, Handlers, and GUI to communicate.

    - by badpanda
    So I am trying to get my GUI to work. When I run the code below, it does nothing, and I'm sure I'm probably just doing something dumb, but I am completely stuck... public void actionPerformed(ActionEvent e){ UI.getInstance().sS++; if((UI.getInstance().sS %2) != 0){ UI.getInstance().startStop.setName("STOP"); UI.getInstance().change.setEnabled(false); }else if(UI.getInstance().sS%2 == 0){ UI.getInstance().startStop.setName("START"); UI.getInstance().change.setEnabled(true); } } public void setStartListener(StartHandler e){ this.startStop.addActionListener(e); } sS is an int that increments every time the button startStop is clicked. change is also a button.

    Read the article

  • Win32 Window Menu is appearing along left side instead of across top of window

    - by Khat
    I think I may be using a wrong window style or something or maybe just adding the menu to the window incorrectly. I'll post a link to an image here so you can see what I mean about the menu not diplaying correctly: http://img707.imageshack.us/img707/4828/wtfmenu.jpg And here's a link to the code that creates the menu and the window: http://pastebin.com/CBrSVXUD I'm sure I'm missing something simple and dumb in the labyrinth of styles, settings and etc that are part and parcel for the Win32 API. Has anyone seen this before and know what I'm doing wrong? I just want a 'normal' menu bar along the top, snug against the title bar. Thanks in advance for any advice.

    Read the article

  • LINQ and paging with a DataTable - can't get Skip working?

    - by Kit Menke
    Ok so this might be a dumb question, but I can't seem to figure it out. I thought I'd try out LINQ against a DataTable. I got my query working and now I'm trying to implement some simple paging. DataTable dataTable = null; dataTable = GetAllDataTables(); var query = from r in dataTable.AsEnumerable() orderby r.Field<string>(Constants.fileName) select r; query.Skip(WPP_PAGE_SIZE * pageIndex).Take(WPP_PAGE_SIZE); My problem is that I get an error at query.Skip(...). Error 1 'System.Data.OrderedEnumerableRowCollection' does not contain a definition for 'Skip' and no extension method 'Skip' accepting a first argument of type 'System.Data.OrderedEnumerableRowCollection' could be found (are you missing a using directive or an assembly reference?) References I have: Microsoft.SharePoint System System.Core System.Data System.Data.DataSetExtensions System.Web System.Xml What am I missing?

    Read the article

  • Premature optimization is the root of all evil, but can it ever be too late?

    - by polygenelubricants
    "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil" So what is that 3% like? Can the avoidance of premature optimization ever be taken too extreme that it does more harm than good? Even if it's rare, has there been a case of a real measurable software engineering disaster due to complete negligence to optimize early in the process? Bonus question: is software engineering pretty much the only field that has such a counter intuitive principle regarding doing something earlier rather than later before things potentially become too big a problem to fix? Personal question: how do you justify something as premature optimization and not just a case of you being lazy/ignorant/dumb?

    Read the article

  • Warning: XXX may not respond to YYY

    - by Aurel300
    Hey, I am making some stuff in Objective-C++... And I must say that I am a total newbie when it comes to the Objective-C part... I don't really want to learn it, I kinda just need it for accessing a few Mac APIs (ObjC is such a dumb language). So - compiling with g++ -x objective-c++ - and I somehow keep getting this warning: XXX may not respond to YYY First it was with a NSScreen, now it is with a NSWindow: NSWindow may not respond to +initWithContentRect:styleMask:backing:defer: I saw somewhere that I should cast it to id, but didn't work, throwing absolutely cryptic errors... So - WHAT does this warning actually mean and HOW am I supposed to make it stop?

    Read the article

  • How created method with signature as List

    - by London
    Hi all, I'm very new to Java programming language so this is probably dumb question but I have to ask it because I can't figure it out on my own. Here is the deal. I want to create method which extracts certain object type from a list. So the method should receive List as argument, meaning list should contain either Object1 or Object2. I've tried like this : public Object1 extractObject(List<?>){ //some pseudo-code ... loop trough list and check if list item is instance of object one return that instance } The problem with declaring method with List<?> as method argument is that I receive compilation error from eclipse Syntax error on token ">", VariableDeclaratorId expected after this token. How do I set the method signature properly to accept object types either Object1 or Object2 ? Thank you

    Read the article

  • Integers in JavaScript

    - by muntoo
    I'm a beginner to Javascript so forgive me if I sound dumb because I learned some Javascript from W3Fools (which are really difficult tutorials - they don't explain anything I want to know, but everything I probably can guess from my experience with C++). I may be switching over to MDN, but if you can recommend any other tutorials, that be great. Anyways, so here's my question: I just read a few lines of this, and apparently: Numbers in JavaScript are "double-precision 64-bit format IEEE 754 values", according to the spec. This has some interesting consequences. There's no such thing as an integer in JavaScript, so you have to be a little careful with your arithmetic if you're used to math in C or Java. I've already seen that there are few of the data types (for variables) I'm used to from C++. But I didn't expect all numbers to automatically be floats. Isn't there any way to use integers, not float? Will a future version of JavaScript support ints?

    Read the article

  • Beginner Java Question about Integer.parseInt() and casting

    - by happysoul
    so when casting like in the statement below :- int randomNumber=(int) (Math.random()*5) it causes the random no. generated to get converted into an int.. Also there's this method I just came across Integer.parseInt() which does the same ! i.e return an integer Why two different ways to make a value an int ? Also I made a search and it says parseInt() takes string as an argument.. So does this mean that parseInt() is ONLY to convert String into integer ? What about this casting then (int) ?? Can we use this to convert a string to an int too ? sorry if it sounds like a dumb question..I am just confused and trying to understand Help ?

    Read the article

  • Basic PHP question for Drupal Views theming

    - by oalo
    My PHP and programming knowledge is extremely basic, so this is probably a dumb question: I am theming a View in Drupal 6, and I want to add an id with a consecutive number to each item in the view (first item would have the id #item1, the second #item2, etc). I am customizing the style output (views-view-unformatted--MYVIEWNAME.tpl.php) and the row style output (views-view-fields--MYVIEWNAME.tpl.php), and I want to add a counter variable in the foreach loop in the style output tpl, and then use that variable in the row style output tpl, but the last one is not recognizing the variable. It does not give me any errors, but doesnt print the number. I understand this has probably something to do with variables visibility, how can I declare the counter variable in the style .tpl so I can the use it in the row style .tpl? Thank you

    Read the article

  • WPF - How do I expose namespaces throughout a project

    - by Mark Pearl
    Sorry... I hope this isnt a really dumb question... but I couldnt find the answer anywhere. I have a WPF application, in each of my usercontrols / windows I am currently putting the following code in xaml in the header... xmlns:properties="clr-namespace:MaxCut2.Properties" This particular properties namespace I use in every window / usercontrol in my project and I would have thought that if I had put the code in my App.xaml, it would have been exposed to all the child windows/uc's - but it doesn't seem to work. Is there a way that I can expose this without having to declare it in every file in XAML?

    Read the article

  • Have you switched from CodeIgniter to Kohana?

    - by Eli
    Hi All, I usually just work with straight PHP, but want to try MVC and see if a framework will really speed up development. After much waffling, analysis paralysis, and many dumb SO questions, I thought I had settled on CodeIgniter for my next PHP project. However, I am now seriously considering Kohana. Has anyone made the switch from CI to Kohana? If so, why? What's better about the actual code, libraries, etc? Edit: Hi All, I did end up going with Kohana. It's easy to use, but more importantly, it's easy NOT to use, since there are a lot of things I like to work with native PHP for. It's ridiculously extensible, well coded, and seems like it is beginning to pull out ahead of CI in a few things like putting views in views, passing subview data, etc. I am sure CI will catch up, but Kohana should be 3 steps ahead by then =o)

    Read the article

  • Pre-populating Radio Buttons with Java

    - by Gary Deuces Rozanski
    Is it possible to pre-populate a radio button, using jsp, depending on the value in the database? If so, how? I have done research here at StackOverflow & Google but with no real solution. p.s. I hope somebody can help me out with a question. As you will see from previous questions, I am not a developer, but get loaded with questions being the most technical on my team. oh the joy. Any help will be appreciated & I apologize in advance if my question is dumb.

    Read the article

  • How do I redirect stdin/stdout when I have a sequence of commands in Bash?

    - by Tom
    I've currently got a Bash command being executed (via Python's subprocess::Popen) which is reading from stdin, doing something and outputing to stdout. Something along the lines of: pid = subprocess.Popen( ["-c", "cmd1 | cmd2"], stdin = subprocess.PIPE, stdout = subprocess.PIPE, shell =True ) output_data = pid.communicate( "input data\n" ) Now, what I want to do is to change that to execute another command in that same subshell that will alter the state before the next commands execute, so my shell command line will now (conceptually) be: cmd0; cmd1 | cmd2 Is there any way to have the input sent to cmd1 instead of cmd0 in this scenario? I'm assuming the output will include cmd0's output (which will be empty) followed by cmd2's output. cmd0 shouldn't actually read anything from stdin, does that make a difference in this situation? I know this is probably just a dumb way of doing this, I'm trying to patch in cmd0 without altering the other code too significantly. That said, I'm open to suggestions if there's a much cleaner way to approach this.

    Read the article

  • Post High Score and Retrieve Position

    - by majman
    I'm not so savvy with MYSQL, so my apologies in advance is this is a dumb question. I've created a super basic PHP High Scores table. Upon inserting a new score into the DB Table, I'd like to retrieve the position of that score so that I can get 10 results with the persons score falling within that range. My INSERT Query looks something like: $stmt = $mysqli->prepare("INSERT INTO highscores (name, time, score) VALUES (?, ?, ?)"); $stmt->bind_param('sdi', $name, $time, $score); UPDATE - I'm looking for a way to do this with as few queries as possible. I recall reading something about getting an INSERT ID when making an insert, but I would then still have to make a second query to get those results.

    Read the article

  • How do I programmatically set property of control in aspx file ?

    - by Thomas Wanner
    This may be a very dumb question but I can't seem to get it working. I use at many places the following syntax for dynamically binding a property of a control in aspx file to the resource entry, e.g. <SomeFunnyControl Text="<%$ Resources : ResClass, ResEntry %>" /> I want to do a similar thing with a class containing some constants, something like <SomeFunnyControl Text="<%= MyConstantsClass.MyStringConstant %>" /> But this doesn't seem to work, it simply sets the text to the exact expression without evaluating it. I am using ASP.NET 3.5 btw. I have tried the databinding approach but I get an HttpParseException saying Databinding expressions are only supported on objects that have a DataBinding event.

    Read the article

  • iPhone noob - different method types?

    - by codemonkey
    My apologies in advance for what is probably a really dumb question. I'm familiar (or at least getting familiar) with instance and class methods in objective-c, but have also seen method implementations that look like this: #import "Utilities.h" #import "CHAPPAppDelegate.h" #import "AppState.h" @implementation Utilities CHAPPAppDelegate* GetAppDelegate() { return (CHAPPAppDelegate *)[UIApplication sharedApplication].delegate; } AppState* GetAppState() { return [GetAppDelegate() appState]; } @end What are these? While I'm sure this is documented somewhere, I don't know what term to use in searching for an explanation of what's being done here. I like the syntax methods like this let me use when calling them, but I'm not sure exactly what I'm doing, what the implications are, how to send parameters to these types of functions, etc? To clarify how I ended up in this position, I started using these methods in a "utilities" class of mine after reading some online blog describing the author's preference for declaring these functions this way. Now I can't seem to track down a more detailed explanation of what exactly the differences are, etc.

    Read the article

  • Hibernate HQL to basic SQL

    - by CC
    Hello everybody, I working on a project with Hibernate and we need to replace Hibernate with some "home made persistence" stuff. The idea is that the project is big enough, and we have many HQL queries. The problem is with the queries like select a,b from table1, table2 on t1.table1=t2.table2 Basically all joins are not supported by our "hand made persistence" stuff. What I would need, is to be able to do some sort of transcoder, which will take as a input the HQL queries and output some SQL, but the basic SQL without joins, something like (a dumb example) select a from table1 where t1 IN ( select b from table2) I hope you get the idea. My persistence layer does not supports joins. Does anybody has any idea about something like that? Some framework, or something? Thanks alot everybody. C.C.

    Read the article

  • Good link checking tool?

    - by AP257
    Hi all Can anyone recommend a good, free link checker to check all pages within a domain? Ideally a browser add-on or a web app (otherwise something that runs on OSX). Crucially it needs to follow links recursively within a domain. Links outside the domain should be followed to a depth of 1, but not checked recursively. This is for the fairly common situation where you want to check all pages on your own site, but not evaluate the links on e.g. Google's homepage. I can't find anything suitable. Am I missing something? I've tried the Firefox LinkChecker add-on and the W3C link validator - neither seem to have the 'follow recursively within a domain' property, or am I being dumb? I know Xenu does this, but I don't run Windows.

    Read the article

  • dynamic 404.jsp using struts

    - by Kapsh
    I would like to display an intelligent 404 page with some application data. Currently, there is a 'dumb' jsp, so I just forward to the view and I am done with it. But now I guess I really need to forward to an action so that I can set some more data to display on the error.jsp. How do I do it through configuration via struts-config? I need congifuration because I do not want to touch any individual files that might be forwarding to the existing view. I tried doing the fol, but I get an error and I dont see anything in the log. So currently, <forward name="ErrorView" path="/Error404.jsp" type="org.apache.struts.action.ActionForward"> </forward> What I want: <forward name="ErrorView" path="/errorAction.do" type="org.apache.struts.action.ActionForward"> </forward>

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >