Search Results

Search found 3479 results on 140 pages for 'chris kolenko'.

Page 100/140 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Why is FBJS dropping my 'onclick' attribute from this input element?

    - by Chris Barnhill
    When I include an 'onClick' attribute in setInnerXTHML() like this: var innerHtml = '<span>Build Track: Select a city where track building should begin'+ '<div id="action-end">'+ '<form>'+ '<input type="button" value="End Track Building" id="next-phase" onClick="moveTrainAuto();" />'+ '</form>'+ '</div></span>'; actionPrompt.setInnerXHTML(innerHtml); var btn = document.getElementById('next-phase'); btn.addEventListener('click', 'moveTrainAuto'); The 'onClick' gets dropped. I know this from inspecting the element with Firebug. This is what it reveals: <input id="app148184604666_next-phase" type="button" value="End Track Building"/> Here is the function called for onClick: function moveTrainAuto(evt) { debugger; ajax = new Ajax(); ajax.responseType = Ajax.JSON; ajax.ondone = function(data) { debugger; if(data.code == 'UNLOAD_CARGO') { unloadCargo(); } else if (data.code == 'MOVE_TRAIN_AUTO') { moveTrainAuto(); } else if (data.code == 'TURN_END') { turnEnd(); } else { /* handle error */ } } ajax.post(baseURL + '/turn/move-trains-auto'); } As you can see, I've tried both 'onClick' and 'addEventListener'. Neither works. Any ideas?

    Read the article

  • Excel 2007 - Worksheet is larger than the window

    - by Chris
    Hi This is an odd problem but frustrating none the less. I have a worksheet saved which is larger than the Excel 2007 "workarea". This means when I open the worksheet I cannot access the corners of the worksheet to reduce the size and the worksheets title bar area (with move,size,minimise etc) is hidden beneath the ribbon , even if I remove the ribbon , I still can't see the title bar. In Excel 2003 I've had a similar effect but I've always been able to hit the "alt" key to access the "Move" option. However in Excel 2007 , hitting "alt" brings up some shortcuts for the ribbon etc but I can't access the worksheet options. Has anyone else know how to access the worksheet drop down when this happens?

    Read the article

  • Detecting the onload event of a window opened with window.open

    - by Chris T
    window.popup = window.open($(this).attr('href'), 'Ad', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); $(window.popup).onload = function() { alert("Popup has loaded a page"); }; This doesn't work in any browser I've tried it with (IE, Firefox, Chrome). How can I detect when a page is loaded in the window (like an iframe onload)?

    Read the article

  • How to remove htmlentities() values from the database?

    - by Chris
    Long before I knew anything - not that I know much even now - I desgined a web app in php which inserted data in my mysql database after running the values through htmlentities(). I eventually came to my senses and removed this step and stuck it in the output rather than input and went on my merry way. However I've since had to revisit some of this old data and unfortunately I have an issue, when it's displayed on the screen I'm getting values displayed which are effectively htmlentitied twice. So, is there a mysql or phpmyadmin way of changing all the older, affected rows back into their relevant characters or will I have to write a script to read each row, decode and update all 17 million rows in 12 tables?

    Read the article

  • Cast Object to JTable?

    - by Chris
    I am trying to implement a ListSelectionListener for some of my JTables. Simply (at the moment) the ListSelectionListener is supposed to simply return the text of the cell that was selected. My program design has several JTables and I would like to have one ListSelectionListener work for them all. In the valueChanged event of the ListSelectionListener I thought it was possible to do something like: private class SelectionHandler implements ListSelectionListener { public void valueChanged(ListSelectionEvent e) { JTable table = (JTable)e.getSource(); String data = (String) table.getValueAt(table.getSelectedRow(), 0); // Print data } } But when I do this I a ClassCastException error. Is there a way to do something like this? One solution I thought of was to compare the source of the event (e.getSource()) to all my JTables to see if they were equivalent (big if block) and then just calling .getValueAt inside that block but that would making the code in the future difficult if tables were to be added or removed.

    Read the article

  • On iPhone, what does EPERM (errno == 1) mean in reponse to send() of UDP data?

    - by Chris Markle
    We sending data over UDP from the iPhone, sometimes, but not always, in response to our first send() of UDP data, we are getting back a -1 return code and errno set to 1 (EPERM / operation not permitted). The EPERM result for send(), sendto() and sendmsg() is not documented in the man pages as a return result from those functions. Has anyone out there encountered this and might be able to shed some light on what this errno value means in this context?

    Read the article

  • mod rewrite, title slugs and htaccess

    - by chris
    I have been taken in to provide some seo guidance on a website which has been running since 2005. My problem is i want to use clean urls. The code that handles the url is hidden away in some class file.. and with over a few thousand lines of code its a struggle to rewrite it. So I'm think, I have gone through all the products and created a slug for them as a field in the product table. Is it possible to do something like an intermediate file for htaccess. Some thing like 1./clean-slug-comes-in/ 2.htaccess catches this and uses slug.php to find the relevant product id for the slug. 3.Then product.php?id=(ID.found.from.2) is loaded?

    Read the article

  • Formatting numbers with significant figures in C#

    - by Chris Farmer
    I have some decimal data that I am pushing into a SharePoint list where it is to be viewed. I'd like to restrict the number of significant figures displayed in the result data based on my knowledge of the specific calculation. Sometimes it'll be 3, so 12345 will become 12300 and 0.012345 will become 0.0123. Occasionally it will be 4 or 5. Is there any convenient way to handle this?

    Read the article

  • converting rgb values to System.Drawing

    - by Chris
    Hi, I've looked around, but don't see this question - maybe its too easy, but I don't have it. If I have file containing color values like: 255, 65535, 65280 ( I think this is green) is there a way to either: convert these to a System.Drawing.Color type or....better yet.. have .NET accept them as is to represent the color? thanks,

    Read the article

  • Is there an x86 or x64 emulator that passes system calls back to the Windows API?

    - by Chris Lomont
    I want to emulate windows programs (not VM, true emulation) under windows. This would require the emulator to make calls back to the system APIs, but the program itself would be emulated. The reason is I want to change the opcode formats for research purposes. The process should be: Take existing program. Disassemble and then reassemble with my new opcode formats. Put the new format into the PE with a stub calling the emulator and passing the new code. The emulator would have to pass system calls from the emulated side back to windows API calls. I can do all these steps, except I need an open source emulator with the ability to pass the API calls out. I could try Bochs or QEMU, but I think I'd have to add in the system calls, which I could do if needed. I wonder if there is already something closer to what I need. I know I would have to change the instruction decoding in the emulator to match my new formats, but that is a given. Thanks.

    Read the article

  • Can't touch UITextField on UIScrollView

    - by Chris B
    Hey guys, I know this has been talked about a lot. I think I've gone thru every question on this site, and still have not been able to get this working. I'm new to developing but I have a good sense of what's going on with all of my code. I definitely don't have a lot of experience though, this is my first iPhone app. I'm making a data entry field that is comprised of multiple UITextFields within a UIScrollView. I'll avoid explaining the other details for now, as it seems its a very basic problem. Without a scrollview, the textfields work perfectly. I can touch the textfield and the keyboard or picker view show up appropriately. When I add the textfields to a scrollview, the scrollview works, but then the text fields don't receive my touches. Here's the key: When 'User Interaction' is ENABLED, the scrollview works but the textfield touches are NOT registered. When 'User Interaction' is DISABLED, the scrollview doesn't work, but the textfield touches ARE registered and the keyboard/picker pops up. From the other posts I have seen people creating subclasses and overriding the touches in a separate implementation. I've seen people using custom content views (subviews?), I've seen some solutions that are now obsolete since the APIs have changed in newer versions of the SDK, and I am just completely stuck. I will leave out my code for now, because maybe there is a solution that someone has without requiring my code. If someone needs to see my code, I will put it up. My app is being written in the 3.1.3 SDK. If anyone has ANY information that could help, it would be so greatly appreciated.

    Read the article

  • Need some help synch'ing outer loop counter with dialog.onconfirm()

    - by Chris Barnhill
    I am writing a game for Facebook. IN the following code, I have a problem. I have a for loop executing, and in that loop, I call a dialog and implement 'onconfirm' for the dialog. The problem is that I need to access th e loop counter inside of the onconfirm function. But because the onconfirm is called outside of the scope of the for loop, the counter value is no longer valid because it's been incremented. I need some way to pass the counter value to the dialog onconfirm as it was at the time the dialog was displayed, not after the loop has finished. Or maybe someone has a better solution. Any help would be appreciated. Thanks. function unloadCargo() { //debugger; var actionPrompt = document.getElementById('action-prompt'); actionPrompt.setTextValue('Unloading cargo...'); var ajax = new Ajax(); ajax.responseType = Ajax.JSON; ajax.ondone = function(data) { debugger; if(data.unloadableCargo.length == 0) { loadCargo(); } else { //console.log('unloadable cargo='+dump(data.unloadableCargo)); var i = 0; var j = 0; var ucCount = data.unloadableCargo.length; for(i = 0; i < ucCount; i++) { cargoDialog = new Dialog(); cargoDialog.showChoice('Unload Cargo', 'Unload ' + data.unloadableCargo[i].goods_name + ' at ' + data.unloadableCargo[i].city_name + ' for ' + data.unloadableCargo[i].payoff + 'M euros?'); cargoDialog.onconfirm = function() { //console.log('unloadable cargo onconfirm='+dump(data.unloadableCargo)); var ajax = new Ajax(); var param = {"city_id": data.unloadableCargo[i].city_id, "goods_id": data.unloadableCargo[i].goods_id, "payoff": data.unloadableCargo[i].payoff}; ajax.ondone = function(demandData) { var demands = document.getElementById('demands'); var innerXhtml = '<span>'; for(var j = 0; j < demandData.demands.length; j++) { innerXhtml = innerXhtml + ' <div class="demand-item"><div class="demand-city">' + demandData.demands[j].city + '</div><div class="demand-pay">' + demandData.demands[j].cost + '</div><div class="demand-goods">' + demandData.demands[j].goods + '</div></div>'; } innerXtml = innerXhtml + ' </span>'; demands.setInnerXHTML(innerXhtml); // update balance loadCargo(); } ajax.post(baseURL + "/turn/do-unload-cargo", param); } cargoDialog.oncancel = function() { loadCargo(); } } //loadCargo(); } } ajax.post(baseURL + '/turn/unload-cargo'); }

    Read the article

  • How are two-dimensional arrays formatted in memory?

    - by Chris Cooper
    In C, I know I can dynamically allocate a two-dimensional array on the heap using the following code: int** someNumbers = malloc(arrayRows*sizeof(int*)); for (i = 0; i < arrayRows; i++) { someNumbers[i] = malloc(arrayColumns*sizeof(int)); } Clearly, this actually creates a one-dimensional array of pointers to a bunch of separate one-dimensional arrays of integers, and "The System" can figure you what I mean when I ask for: someNumbers[4][2]; But when I statically declare a 2D array, as in the following line...: int someNumbers[ARRAY_ROWS][ARRAY_COLUMNS]; ...does a similar structure get created on the stack, or is it of another form completely? (i.e. is it a 1D array of pointers? If not, what is it, and how do references to it get figured out?) Also, when I said, "The System," what is actually responsible for figuring that out? The kernel? Or does the C compiler sort it out while compiling?

    Read the article

  • Exporting dates properly formatted on Google Appengine in Python

    - by Chris M
    I think this is right but google appengine seems to get to a certain point and cop-out; Firstly is this code actually right; and secondly is there away to skip the record if it cant output (like an ignore errors and continue)? class TrackerExporter(bulkloader.Exporter): def __init__(self): bulkloader.Exporter.__init__(self, 'SearchRec', [('__key__', lambda key:key.name(), None), ('WebSite', str, None), ('DateStamp', lambda x: datetime.datetime.strptime(x, '%d-%m-%Y').date(), None), ('IP', str, None), ('UserAgent', str, None)]) Thanks

    Read the article

  • How are variables bound to the body of a define_method?

    - by Chris
    While trying to brush up my Ruby skills I keep running across this case which I can't figure out an explanation for by just reading the API docs. An explanation would be greatly appreciated. Here's the example code: for name in [ :new, :create, :destroy ] define_method("test_#{name}") do puts name end end What I want/expect to happen is that the name variable will be bound to the block given to define_method and that when #test_new is called it will output "new". Instead each defined method outputs "destroy" -- the last value assigned to the name variable. What am I misunderstanding about define_method and its blocks? Thanks!

    Read the article

  • 1180: Call to a possibly undefined method addEventListener

    - by Chris
    I'm going through some AS3 training, but I'm getting a weird error... I'm trying to add an event listener to the end of a motion tween in AS. I've created a tween, highlighted the frames, right clicked and copied the tween as AS and pasted it into the movie clip (I think there's a better way to do this, but I'm not sure what it is...) When I try to add the listener to the end of that code, I get the error. Here's my code. import fl.motion.AnimatorFactory; import fl.motion.MotionBase; import fl.motion.Motion; import flash.filters.*; import flash.geom.Point; import fl.motion.MotionEvent; import fl.events.*; var __motion_Enemy_3:MotionBase; if(__motion_Enemy_3 == null) { __motion_Enemy_3 = new Motion(); __motion_Enemy_3.duration = 30; // Call overrideTargetTransform to prevent the scale, skew, // or rotation values from being made relative to the target // object's original transform. // __motion_Enemy_3.overrideTargetTransform(); // The following calls to addPropertyArray assign data values // for each tweened property. There is one value in the Array // for every frame in the tween, or fewer if the last value // remains the same for the rest of the frames. __motion_Enemy_3.addPropertyArray("x", [0]); __motion_Enemy_3.addPropertyArray("y", [0]); __motion_Enemy_3.addPropertyArray("scaleX", [1.000000,1.048712,1.097424,1.146136,1.194847,1.243559,1.292271,1.340983,1.389695,1.438407,1.487118,1.535830,1.584542,1.633254,1.681966,1.730678,1.779389,1.828101,1.876813,1.925525,1.974237,2.022949,2.071661,2.120372,2.169084,2.217796,2.266508,2.315220,2.363932,2.412643]); __motion_Enemy_3.addPropertyArray("scaleY", [1.000000,1.048712,1.097424,1.146136,1.194847,1.243559,1.292271,1.340983,1.389695,1.438407,1.487118,1.535830,1.584542,1.633254,1.681966,1.730678,1.779389,1.828101,1.876813,1.925525,1.974237,2.022949,2.071661,2.120372,2.169084,2.217796,2.266508,2.315220,2.363932,2.412643]); __motion_Enemy_3.addPropertyArray("skewX", [0]); __motion_Enemy_3.addPropertyArray("skewY", [0]); __motion_Enemy_3.addPropertyArray("rotationConcat", [0]); __motion_Enemy_3.addPropertyArray("blendMode", ["normal"]); __motion_Enemy_3.addPropertyArray("cacheAsBitmap", [false]); __motion_Enemy_3.addEventListener(MotionEvent.MOTION_END, hurtPlayer); // Create an AnimatorFactory instance, which will manage // targets for its corresponding Motion. var __animFactory_Enemy_3:AnimatorFactory = new AnimatorFactory(__motion_Enemy_3); __animFactory_Enemy_3.transformationPoint = new Point(0.499558, 0.500000); // Call the addTarget function on the AnimatorFactory // instance to target a DisplayObject with this Motion. // The second parameter is the number of times the animation // will play - the default value of 0 means it will loop. // __animFactory_Enemy_3.addTarget(<instance name goes here>, 0); } function hurtPlayer(event:MotionEvent):void { this.parent.removeChild(this); } I've tried a few places for it, both with the animFactory_Enemy_3 variable and the motion_Enemy_3 variable - getting the same error both times.

    Read the article

  • Delays in .net app when connecting to oracle db using Oracle.DataAccess

    - by chris
    I have a .net desktop app that connects to an oracle database. At times, there are very noticable delays. I ran a trace on the code, and it was always in the DataReader.Read(). I turned on sql tracing, and found the following, which corresponds to the delays I'm seeing: (2128) [23-MAR-2010 13:00:07:310] nsprecv: reading from transport... (2128) [23-MAR-2010 13:00:07:310] nttrd: entry (2128) [23-MAR-2010 13:00:24:655] nttrd: socket 676 had bytes read=2047 (2128) [23-MAR-2010 13:00:24:655] nttrd: exit (2128) [23-MAR-2010 13:00:24:655] nsprecv: 2047 bytes from transport There's about a 14 second pause in there. I'm pretty sure that there's not a problem in the code, but not sure where to look at next. Is there anyone out there with experience with oracle trace that can explain what's going on?

    Read the article

  • In-order tree traversal

    - by Chris S
    I have the following text from an academic course I took a while ago about in-order traversal (they also call it pancaking) of a binary tree (not BST): In-order tree traversal Draw a line around the outside of the tree. Start to the left of the root, and go around the outside of the tree, to end up to the right of the root. Stay as close to the tree as possible, but do not cross the tree. (Think of the tree — its branches and nodes — as a solid barrier.) The order of the nodes is the order in which this line passes underneath them. If you are unsure as to when you go “underneath” a node, remember that a node “to the left” always comes first. Here's the example used (slightly different tree from below) However when I do a search on google, I get a conflicting definition. For example the wikipedia example: Inorder traversal sequence: A, B, C, D, E, F, G, H, I (leftchild,rootnode,right node) But according to (my understanding of) definition #1, this should be A, B, D, C, E, F, G, I, H Can anyone clarify which definition is correct? They might be both describing different traversal methods, but happen to be using the same name. I'm having trouble believing the peer-reviewed academic text is wrong, but can't be certain.

    Read the article

  • Has anybody used the WB B-tree library?

    - by Chris B
    I stumbled across the WB on-disk B-tree library: http://people.csail.mit.edu/jaffer/WB It seems like it could be useful for my purposes (swapping data to disk during very large statistical calculations that do not fit in memory), but I was wondering how stable it is. Reading the manual, it seems worringly 'researchy' - there are sections labelled [NOT IMPLEMENTED] etc. But maybe the manual is just out-of-date. So, is this library useable? Am I better off looking at Tokyo Cabinet, MemcacheDB, etc.? By the way I am working in Java.

    Read the article

  • php request variables assigning $_GEt

    - by chris
    if you take a look at a previous question http://stackoverflow.com/questions/2690742/mod-rewrite-title-slugs-and-htaccess I am using the solution that Col. Shrapnel proposed- but when i assign values to $_GET in the actual file and not from a request the code doesnt work. It defaults away from the file as if the $_GET variables are not set The code I have come up with is- if(!empty($_GET['cat'])){ $_GET['target'] = "category"; if(isset($_GET['page'])){ $_GET['pageID'] = $_GET['page']; } $URL_query = "SELECT category_id FROM cats WHERE slug = '".$_GET['cat']."';"; $URL_result = mysql_query($URL_query); $URL_array = mysql_fetch_array($URL_result); $_GET['category_id'] = $URL_array['category_id']; }elseif($_GET['product']){ $_GET['target'] = "product"; $URL_query = "SELECT product_id FROM products WHERE slug = '".$_GET['product']."';"; $URL_result = mysql_query($URL_query); $URL_array = mysql_fetch_array($URL_result); print_r($URL_array); $_GET['product_id'] = $URL_array['product_id']; The original variable string that im trying to represent is /cart.php?Target=product&product_id=16142&category_id=249 And i'm trying to build the query string variables with code and including cart.php so i can use cleaner URL's So I have product/product-title-with-clean-url/ going to slug.php?product=slug Then the slug searches the db for a record with the matching slug and returns the product_id as in the code above.Then built the query string and include cart.php

    Read the article

  • Is there a way to validate the presence of Javadoc and/or inline code comments?

    - by Chris Aldrich
    We are trying to put quality code processes in place for a large project I am working on. Right now a lot of developers are not putting in Javadoc or in-line code comments into their code. Ok right now. But it will severely hurt us in the very near future. We are using Maven 2.0.9 as our build tool, as well as Hudson for Continuous Integration. We are using Subversion as our source versioning tool/code repository, Rational Application Developer and Rational Softare Architect (essentially Eclipse) 7.5.1 as our IDE's, and then Subclipse as our Eclipse plug-in to connect to SVN. Is there a plug-in or a way to validate that a developer put in Javadoc and/or in-line code comments in order to allow a commit to SVN? This isn't intended to be a substitute for good code reviews, but merely a help to make sure that developers are reminded to add this documentation before committing. We are still intending on conducting code reviews that would also review documentation. Has anyone found any plug-ins for something like this? Any links? Any ideas?

    Read the article

  • Configuring Warden for use in RSpec controller specs

    - by Chris Peters
    I was able to use Devise's sign_in method to log in a user in my controller specs. But now that I'm removing Devise from my application, I'm not quite sure how to get similar functionality working with just Warden on its own. How should I go about setting up spec/spec_helper.rb and related spec/support/*.rb files to get Warden running within controller specs sufficiently? I've tried setting up a file at spec/support/warden.rb with these contents: RSpec.configure do |config| config.include Warden::Test::Helpers config.after do Warden.test_reset! end end Then I have before calls similar to this to authenticate a user factory: before { login_as FactoryGirl.create(:user) } But here is the error that I keep seeing: NameError: undefined method `user' for nil:NilClass This error traces back to my authenticate_user! method in the controller: def authenticate_user! redirect_to login_path, notice: "You need to sign in or sign up before continuing." if env['warden'].user.nil? end I'd appreciate any guidance that anyone could provide.

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >