Search Results

Search found 1056 results on 43 pages for 'f spot'.

Page 22/43 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Possible to bind an event listener to a (hypothetical) onChangeInnerHTML event?

    - by DustMason
    In my app, I have an OL tag whose contents are changed by various other dynamic events. Is there some way to put a listener on that OL so that I can execute a function whenever its contents are altered in any way? In this example I need to update a count of items in the list which appears in another spot in the interface. I am using jQuery if that helps. The contents of the OL are being changed with OL.append() and LI.remove(), in case those methods have some special events that I don't know about Thanks!

    Read the article

  • emacs/Python: running python-shell in line buffered vs. block buffered mode

    - by Begbie00
    Hi all - In a related question and answer here, someone hypothesized that python-shell within emacs(23.2) was block-buffered instead of line-buffered. The recommended fix was to add sys.stdout.flush() to the spot in my script where I want stdio to flush its contents to the python-shell. Is there someway to trick python-shell (running in emacs 23.2 on Windows, not Linux) into either a) thinking it's attached to a TTY or b) using line-buffered instead of block-buffered mode? I don't see why I'd be able to do this in IDLE but not emacs. I'd rather customize emacs than add sys.stdout.flush() throughout my scripts. Call me lazy :-). Thanks, Mike

    Read the article

  • Python editor/IDE for OS X

    - by TheJuice
    As a (reasonably) new Python programmer, what IDEs or editors would you recommend for Python programming on OS X and why (i.e. what features/capabilities/workflow techniques really help)? I've used Xcode and played a bit with TextMate but I can't really say that either have really hit the spot for me (although TextMate's code completion is pretty neat, I think i've been spoilt with code-completion facilities provided by editors for statically-typed languages so maybe i'm subconsciously comparing apples and oranges) I'm looking to increase my efficacy with Python and any tips would be appreciated. I know people have asked similar questions for Python IDEs in general but I am specifically concentrating on OS X and the 'Mac way'. If Xcode or TextMate are thought highly of, perhaps some suggestions as to how I could get the most benefit from the tools would help.

    Read the article

  • Loop with pointer arithmetic refuse to stay within boundary in C. Gives me segfault.

    - by Fred
    Hi have made this function which is made to replicate an error that I can't get past. It looks like this: void enumerate(double *c, int size){ while(c < &c[size]){ printf("%lf\n", *c); c++; } } I have added some printf's in there and it gives me: Adressof c: 0x100100080, Adressof c + size: 0x1001000a8 I then also print the address of c for each iteration of the loop, it reaches 0x1001000a8 but continues past this point even though the condition should be false as far as I can tell until I get a segfault. If anyone can spot the problem, please tell me, I have been staring at this for a while now. Thanks.

    Read the article

  • What FIX implementation do you recommend for use with .NET

    - by Ajaxx
    I am reviewing implementation choices for FIX when using .NET. A few obvious choices come to mind, but I want to know if there are other options, better choices or if we've made the same decision as a lot of you. QuickFIX - Stable, C++ implementation - so you've got unmanaged code to interop with. FIX4NET - C# implementation - seems to have some gaps in its implementation. DIY - Chime in here if you've made your own FIX engine Let me throw in some caveats here. I'm not looking for sub 100 microsecond processing. Performance is a requirement, but not so much that it's driving my decisions. A solid product that is stable, performs well and is flexible enough to deal with vendor specific dialects is the sweet spot. The more we can do in .NET the better.

    Read the article

  • php require class call from inside method

    - by jera
    from my understanding, require pastes code into the calling php file. what if you were requiring from inside a method...it would paste the entire code/class inside the method, blocking the next statement in the method. eg. function test() { require 'pathtosomeclasscode'; somestatement; // any code after the require is blocked. } how do i get around this, to be able to require code where-ever, without it being pasted in that exact spot? Thanks in advance for your help.

    Read the article

  • How to make margin be relative to the center of the UIElement and not its top-left corner in a Grid?

    - by Nockawa
    I'd like the Margin property to reference the center of the UIElement and not the top-left corner. That way when I change the width/height of the UIElement it stays in the same spot. Is there a way to configure this behavior or I'll have to rely on Binding to make the adjustment ? Thanks. For instance if I change the Width/Height of the following rectangle, its center will move. <Grid> <Rectangle Fill="#FF991C1C" Width="10" Height="40" HorizontalAlignment="Left" Margin="90,161,0,0" VerticalAlignment="Top"/> </Grid>

    Read the article

  • OpenGL embedded in gtk has colour badly displayed

    - by Sardathrion
    Note that this is a re-write now that I have more clues as to where the problem could be... I am creating a GTK GUI which contains two embedded OpenGL displays. Both use the same shader code (complied once for each). On my normal hardware, this works fine. On a virtual machine running on the same hardware, I get horrible colours -- see images. I suspect that the shader code is at fault -- certainly dropping a simpler shader does make the problem moot. However, I do need both diffuse and spot lights in my shader thus making it non-trivial. Anyone has seen this before?

    Read the article

  • Setting the gap of layout

    - by Kamo
    I usually set the layout like this where I specify the gap inside the VerticalLayout tag <s:Group> <s:layout> <s:VerticalLayout gap="10"/> </s:layout> </s:Group> I'm trying to specify the layout as a property of the Group like this <s:Group layout="{new VerticalLayout()}"> </s:Group> but not sure how to specify the gap in this case. Couldn't spot something in the documentation to show if it's possible to include gap as a parameter when creating new VerticalLayout or what its position would be.

    Read the article

  • Best way to implement nested loops in a view in asp.net mvc 2

    - by Junior Ewing
    Hi, Trying to implement some nested loops that are spitting out good old nested html table data. So the question is; What is the best way to loop through lists and nested lists in order to produce easily maintainable code. It can get quite narly quite fast when working with multiple nested tables or lists. Should I make use of a HTML helper, or make something with the ViewModel to simplify this? A requirement is if there are no children at a node there should be an empty row on that spot with some links for creation and into other parts of the system.

    Read the article

  • Stubborn UIButton

    - by Mike
    I have a UIButton that is supposed to be disabled during certain phases. So, when this happens I do [myButton setEnabled:NO]; This is perfect because the button stays grayed and if clicked will not trigger its action, but... when the button is clicked even grayed, it enables again and a second click will trigger its actions (???????!!!!!!!!!!). How can that be? If the button is disabled it is supposed to be "part of the background", i.e., an image without any action. I have tried to make the button vanish using alpha but even if you click on the empty spot, it reappears after the first click and then can trigger actions after the second click... (????) Am I missing something?

    Read the article

  • How to handle inaccurate Google Maps locations?

    - by Azzizz81
    When I type in addresses in Google maps for locations in Asia, quite a lot of them are off by more than 200 metres. For example, "blk 85 bedok north road, singapore" is off by more than 300 metres. While I don't expect Google Maps to be spot on every time, sometimes the error is too great for certain use cases. What options do I have to handle inaccurate Google Maps locations in a web app? The web app should let the user enter an address or postal code as part of an entry and I will geocode the address and store the lat-long.

    Read the article

  • XNA Multi-Thread Jitters

    - by Ice Phoenix
    Hi guys, brand new question. Just implemented multi-threading into my XNA game as it was unable to keep up with using 1 processor. MT is all implemented fine and everything, however the player seems to jitter all over the spot every now and then. I originally thought it was a loss of data between the update and render, but even when i did the player update in the render it did the same thing. It's not a memory/processor issue as i'm no where near maxing out my RAM or processors. It's strange aswell because none of the other entities in the game seem to have any of these issues. Any ideas at all??

    Read the article

  • jQuery blockUI and AJAX POST

    - by oompahloompah
    I am using jQuery BlockUI in a project. For a particular user action, I want to block the UI, and then POST data to the server. When the timeout event occurs OR the server returns, I want to unblock the page. I can't seem to implement this behaviour. This is what I have so far (not working) $(document).ready(function(){ $('#test').click(function(event){ $.blockUI({ message: $('#syntax-chk') }); $.ajax({ type: 'POST', url: 'www.example.com', data: somedata, dataType: "json" }); setTimeout(function() { $.unblockUI({ onUnblock: function(){ alert('onUnblock'); } }); }, 2000); }); can anyone spot what I may be doing wrong?

    Read the article

  • How do I create a Magento module or widget that will appear on the shopping cart page?

    - by user303449
    I’m having a lot of trouble understanding how to create a module that will add an extra button to the shopping cart page. I found lots of info on payment modules and stand-a-lone page modules, but nothing for this. I simply need to add a button underneath the regular “Checkout” button that can post item data to another website. I’ve created a module but can’t get Magento to recognize it and display the button on that spot. Any help would be greatly appreciated, even just sending me to an existing tutorial that I haven’t been able to find. Thanks.

    Read the article

  • Can Visual Studio exclude certain folders when searching for header files?

    - by identitycrisisuk
    I'm having trouble with a library that we are using, which has two copies of header files that are needed - one which we are modifying and building from and another which is automatically created during the build process. I don't fully know why or really want to change this but it can cause a bit of annoyance when on random occasions the go to definition function takes you to the auto created header instead of the one used to build. Usually you can spot it but sometimes you don't and make changes to the auto created one, which are then overwritten or sometimes stay around for a while so that something works on your machine but breaks on other peoples. I don't know if there is any way around this as the auto created folder is in the additional include directories of some of the projects in the solution but I just thought I would ask if there was any good way of reducing the chance of this annoying situation cropping up.

    Read the article

  • Where does one enter the JavaScript code in CRM Dynamics?

    - by Konrad Viltersten
    I've started to play with CRM Dynamics yesterday so this question should be seen as a very basic one. I've been coding for many years but CRM D is news to me. Apparently, one is supposed to be able to enter JavaScript code to customize the behavior of the application. I've understood that there's an API for that and that touching DOM directly or playing with jQuery is a no-no. Question: Where is the JS-code supposed to be entered? I've gone through all the menus but as far I can see, there's no spot where I could plug-in my custom code. E.g.: Where do I get to define a validation for the last name of a contact currently being defined?

    Read the article

  • Fixing too long comment lines in Vim

    - by Tomek Kaftal
    I'm looking for a convenient way to fix comments where line lengths exceed a certain number of characters in Vim. I'm fine with doing this manually with code, especially since it's not that frequent, plus refactoring long lines is often language, or even code-style dependent, but with comments this is pure drudgery. What happens is I often spot some issue in a comment, tweak one or two words and the line spills out of the, say, 80 character limit. I move the last word to the next line and then the next line spills, and so on. Does anyone know a way to do this automatically in Vim?

    Read the article

  • How to transfer visitors to the servers closes to them and where to place the servers?

    - by user2971623
    I am focusing on providing fast page refreshes for my visitors and I wonder where is the smartest spot to place my servers on? I understand that the best would be to place a server in every country or even city, but that is of course not doable with my economy. I am thinking of maybe setting up three servers, one in the middle of USA (Kansas?), one in Italy and one in Sweden. What do you think about that? I don't care about Africa since they haven't even got computers so I won't get traffic from there anyway. China, North Korea etc are probably just visiting chinese websites, they barely know english anway... The next problem is how do I redirect a visitor from Finland to the Swedish server? I don't want the visitor from Finland to be using the USA server or vice versa.

    Read the article

  • Examples of both beautiful and ugly java code?

    - by tputkonen
    I would like to demonstrate how difficult it is for a layman to identify high quality code from flawed code. I'm thinking of doing this with the help of two java methods. Both of the methods should look like they do the same, pretty simple thing. However one of them should have several kind of flaws, for example: iteration with array off by one error string concatenations causing lots of objects to be created (as opposed to StringBuffer in the "good" code, which looks more complicated) possibly null pointer exception (but it should not be trivial to spot) Those are just some examples, all kinds of other issues including bugs and performance related structures are highly appreciated. Methods should be around 10-20 lines of length, and the task they do should be something simple - preferably printing something in an iteration.

    Read the article

  • Obtaining command line arguments in a QT console app

    - by morpheous
    The following snippet is from a little console app I wrote using the QT framework. Currently, it does not receive the arguments passed at the CLI. Can anyone spot what I may be doing wrong? int main(int argc, char *argv[]) { //Q_INIT_RESOURCE(application); try { QApplication the_app(argc, argv); utility::option_values ov; QStringList cmdline_args = QCoreApplication::arguments(); //attempt to parse arguments here, but cmdline_args is an empty list :( ov.parse_options(cmdline_args); // Code continues ... } } catch (utility::invalid_option&) { return 1; } return 0; } I am debugging using QtCreator 1.3

    Read the article

  • Profiling help required

    - by Mick
    I have a profiling issue - imagine I have the following code... void main() { well_written_function(); badly_written_function(); } void well_written_function() { for (a small number) { highly_optimised_subroutine(); } } void badly_written_function() { for (a wastefully and unnecessarily large number) { highly_optimised_subroutine(); } } void highly_optimised_subroutine() { // lots of code } If I run this under vtune (or other profilers) it is very hard to spot that anything is wrong. All the hotspots will appear in the section marked "// lots of code" which is already optimised. The badly_written_function() will not be highlighted in any way even though it is the cause of all the trouble. Is there some feature of vtune that will help me find the problem? Is there some sort of mode whereby I can find the time taken by badly_written_function() and all of its sub-functions?

    Read the article

  • Debugging compiled .NET 2.0 application

    - by brovar
    I don't know if I'll pass all the necessary information here, but I've only been asked to post this question here and I'm not entirely onto the matter. There is a .NET Framework 2.0 application compiled in the Debug mode with the parameter jitDebugging set to true in app.config <system.windows.forms jitDebugging="true" /> After any crash we get the dialog box allowing us to send a report or to debug the program. When we choose to debug and select proper VS, the IDE starts but with the announcement: No symbols are loaded for any call stack frame. The source code cannot be displayed. and Disassembly cannot be displayed in run mode. Is there any possiblity to see the code or the spot where the crash has occured?

    Read the article

  • c: memory allocation (what's going on)

    - by facha
    Hi, everyone Please take a look at this piece of code. I'm allocating one byte for the first variable and another byte for the second one. However, it seems like the compiler allocates more (or I'm missing something). The program outputs both strings, even though their length is more the one byte. void main() { char* some1 = malloc(1); sprintf(some1,"cool"); char* some2 = malloc(1); sprintf(some2,"face"); printf("%s ",some1); printf("%s\n",some2); } Please, could anyone spot some light on what's going on when memory is being allocated.

    Read the article

  • Strange exception phenomenon in Windows 7

    - by Level 2
    I spot some interesting articles about exception handle in CodeProject http://www.codeproject.com/KB/cpp/seexception.aspx After reading, I decided to do some experiment. The first time I try to execute the following code char *p; p[0] = 0; The program died without question. But After several times when I executed the same problem binary code, it magically did fine. Even the following code is doing well. Any clue or explanation? char *p p[1000] = 'd'; cout<<p[1000]<<endl; My O/S is Windows 7 64bit and compiler is VS2008 rc1.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >