Search Results

Search found 7976 results on 320 pages for 'dynamic linking'.

Page 17/320 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Harvesting Dynamic HTTP Content to produce Replicating HTTP Static Content

    - by Neil Pitman
    I have a slowly evolving dynamic website served from J2EE. The response time and load capacity of the server are inadequate for client needs. Moreover, ad hoc requests can unexpectedly affect other services running on the same application server/database. I know the reasons and can't address them in the short term. I understand HTTP caching hints (expiry, etags....) and for the purpose of this question, please assume that I have maxed out the opportunities to reduce load. I am thinking of doing a brute force traversal of all URLs in the system to prime a cache and then copying the cache contents to geodispersed cache servers near the clients. I'm thinking of Squid or Apache HTTPD mod_disk_cache. I want to prime one copy and (manually) replicate the cache contents. I don't need a federation or intelligence amongst the slaves. When the data changes, invalidating the cache, I will refresh my master cache and update the slave versions, probably once a night. Has anyone done this? Is it a good idea? Are there other technologies that I should investigate? I can program this, but I would prefer a configuration of open source technologies solution Thanks

    Read the article

  • jQuery dynamic css loading weired behavior

    - by jimpsr
    The app I am working on requires dynamic loading of css and js, right now the solution is as follows: myapp.loadCss = function(css){ $("head").append("<link>"); cssDom = $("head").children(":last"); cssDom.attr({rel: "stylesheet", type: "text/css", href: css }); } myapp.loadJs = funciton(js){ ... //$.ajax call is used in synchronized mode to make sure the js is fully loaded } } When some widgets need to be load, the usual call with be myapp.loadCss('/widgets/widget1/css/example.css'); myapp.loadJs('/wiggets/widget1/js/example.js'); The weired thing is that once a while (1 out of 10 or 20), the newly created dom elements from example.js will not be able to get its css from example.css, it seems however my loadCss method does not load the css in a synchronized mode? I have tried to replace my loadCss with the the following code: myapp.loadCss(css){ $('<link href="' + css + '" rel="stylesheet" type="text/css" />').appendTo($('head')); } It seems to be OK then (I refreshed the webpage a hundred times for verification :-( ) But unfortunately this method failed in IE(IE7, not tested in IE6, 8) Is there any better solution for this?

    Read the article

  • Populating and Using Dynamic Classes in C#/.NET 4.0

    - by Bob
    In our application we're considering using dynamically generated classes to hold a lot of our data. The reason for doing this is that we have customers with tables that have different structures. So you could have a customer table called "DOG" (just making this up) that contains the columns "DOGID", "DOGNAME", "DOGTYPE", etc. Customer #2 could have the same table "DOG" with the columns "DOGID", "DOG_FIRST_NAME", "DOG_LAST_NAME", "DOG_BREED", and so on. We can't create classes for these at compile time as the customer can change the table schema at any time. At the moment I have code that can generate a "DOG" class at run-time using reflection. What I'm trying to figure out is how to populate this class from a DataTable (or some other .NET mechanism) without extreme performance penalties. We have one table that contains ~20 columns and ~50k rows. Doing a foreach over all of the rows and columns to create the collection take about 1 minute, which is a little too long. Am I trying to come up with a solution that's too complex or am I on the right track? Has anyone else experienced a problem like this? Create dynamic classes was the solution that a developer at Microsoft proposed. If we can just populate this collection and use it efficiently I think it could work.

    Read the article

  • IIS7 dynamic content compression and webservices

    - by vandalo
    I am moving and old asmx webservice to a new server with IIS7. This webservice basically sends a big dataset (10mb+) to a winform application. The old solution was implemented using a custom soap extension which compressed the content before sending the stream to the client. The client, of course, implemented the same custom soap extension, to decompressed the stream in a dataset. Everything has worked pretty well for years. My customer doesn't want to change the code upgrading to WCF. They just want to put the old App on the new server and use the new dynamic content compression features. We're testing things on a test server (win serv 2008) and it seems that it's working pretty well, even if it seems slow: we can't see any difference in performance (speed) between the uncompressed and compressed stream. Here's the question. Where should I put the settings? Most people say I can't put it in my web.config; others say it can be put there. I am a bit confused. Are there any tricks or things I should know? What about mimeTypes? Should I set some parameters, somewhere? ... considering my stream is XML (dataset) ?? Thanks to everyone who would like to help Alberto

    Read the article

  • Dynamic vertical menu for Wordpress

    - by buttonstack
    Does anyone know how to achieve a dynamic multi-level page menu for Wordpress? I have found a couple scripts but none of them put the subpages directly under the parent page or some will show every subpage to the entire menu Example: page1 (selected) –subpage1-1 –subpage1-2 page2 page3 This code comes close by inserting the subpages directly under, but it doesn't hide the subpages to the other pages. <?php if($post->post_parent) { $children = preg_replace('@\<li([^>^]*)>\<a([^>^]*)>(.*?)\<\/a>@i','<li$1><a$2><span>$3</span></a>',wp_list_pages('title_li=&amp;amp;amp;amp;amp;child_of='.$post->post_parent.'&amp;amp;amp;amp;amp;echo=0&amp;amp;amp;amp;amp;depth=1')); } else { $children = preg_replace('@\<li([^>^]*)>\<a([^>^]*)>(.*?)\<\/a>@i','<li$1><a$2><span>$3</span></a>',wp_list_pages('title_li=&amp;amp;amp;amp;amp;child_of='.$post->ID.'&amp;amp;amp;amp;amp;echo=0&amp;amp;amp;amp;amp;depth=1')); } if($children) { echo" <ul class=\"submenu\">\n". $children ."</ul>\n"; } ?>

    Read the article

  • Four-color theorem in Prolog (using a dynamic predicate)

    - by outa
    Hi, I'm working on coloring a map according to the four-color theorem (http://en.wikipedia.org/wiki/Four_color_theorem) with SWI-Prolog. So far my program looks like this: colour(red). colour(blue). map_color(A,B,C) :- colour(A), colour(B), colour(C), C \= B, C \= A. (the actual progam would be more complex, with 4 colors and more fields, but I thought I'd start out with a simple case) Now, I want to avoid double solutions that have the same structure. E.g. for a map with three fields, the solution "red, red, blue" would have the same structure as "blue, blue, red", just with different color names, and I don't want both of them displayed. So I thought I would have a dynamic predicate solution/3, and call assert(solution(A,B,C)) at the end of my map_color predicate. And then, for each solution, check if they already exist as a solution/3 fact. The problem is that I would have to assert something like solution(Color1,Color1,Color2), i.e. with variables in order to make a unification check. And I can't think of a way to achieve this. So, the question is, what is the best way to assert a found solution and then make a unification test so that "red, red, blue" would unify with "blue, blue, red"?

    Read the article

  • [C#] Dynamic user-interface, WPF or not?

    - by pieter.lowie
    Hi, I'm currently working at a application that helps people understand how to do there job. You can see it as a personal coach that guides them trough all the steps they need to do that no normal person could keep remembering. In my previous application we had the ability to show the user up to 4 pictures (what proves to be more then enough). The application would load the data and see how many pictures where in every instruction and then sort out the picture in the best fitting way without messing up the scale and resolution of the pictures. This all was done with GDI+ and worked very well. Ofc, change is something that always happens, my bosses came up with some great ideas. So they want to be able to see movies on the screen, animated gif's, 3D models that can rotate or animate. So I think we had pushed GDI+ to it's limits and it's time to look for something different. I have heard and readed about WPF but have no experience with it. Is it even possible to do all what I ask in WPF? And what about the old picture-merging thing I wrote, can we also get it done in wpf? I tried to make some things working but I didn't went as smooth as I hoped. I'm also concerned about the fact that the interface needs to be dynamic, the one moment it should be showing picture with some text above it, the other moment it should be showing another text with a video under it. I would love to hear some opinions here and if you got some other suggestions I should look into pls tell me. Thnx in advance PS: If WPF is the choice, should I convince my boss to change to .net 4.0?

    Read the article

  • Dynamic Variable Names in Included Module in Ruby?

    - by viatropos
    I'm hoping to implement something like all of the great plugins out there for ruby, so that you can do this: acts_as_commentable has_attached_file :avatar But I have one constraint: That helper method can only include a module; it can't define any variables or methods. Here's what the structure looks like, and I'm wondering if you know the missing piece in the puzzle: # 1 - The workhorse, encapsuling all dynamic variables module My::Module def self.included(base) base.extend ClassMethods base.class_eval do include InstanceMethods end end module InstanceMethods self.instance_eval %Q? def #{options[:my_method]} "world!" end ? end module ClassMethods end end # 2 - all this does is define that helper method module HelperModule def self.included(base) base.extend(ClassMethods) end module ClassMethods def dynamic_method(options = {}) include My::Module(options) end end end # 3 - send it to active_record ActiveRecord::Base.send(:include, HelperModule) # 4 - what it looks like class TestClass < ActiveRecord::Base dynamic_method :my_method => "hello" end puts TestClass.new.hello #=> "world!" That %Q? I'm not totally sure how to use, but I'm basically just wanting to somehow be able to pass the options hash from that helper method into the workhorse module. Is that possible? That way, the workhorse module could define all sorts of functionality, but I could name the variables whatever I wanted at runtime.

    Read the article

  • Stopping Filter Display in Dynamic Data Entity Web App

    - by bert
    I'm currently experimenting with the Dynamic Data Entity Web App Project type in VS2008 SP1 and after reading many tutorials which offer helpful advice for problems I so far have no need of a solution to I have fallen at the first hurdle. In the DB I have made my entity model from I decided to start small with a table called "Companies" just to see if I could tweak the display into a satisfactory shape for this small table. The Companies table has a column called "contactid" which leads to a record filled with various contact information in a "contacts" table. The default created Entity Data Model has guessed that One companies could have many contact records. So it tries to be helpful and add a "Contact" filter onto the page that allows you to see all the Companies that share a particular set of contact info indexed by the "Contact Name" field. Unfortunately the contact table is a multi-purpose one that also stores contact info for customers and there are about 1000 times more customers than there are companies. So the Dropdown makes the page load time increase exponentially and produces no benefit. So I'd like to just stop the filter from appearing. Only problem is I don't have a clue how to switch it off. Google is so far proving recalcitrant on the matter so I wondered if anyone in here knew how to get rid of a useless filter.

    Read the article

  • WinForms Dynamic Label

    - by tolga
    I am creating dynamic labels and letting users change attributes of the labes like backcolor and so by sending unicode. However I don't know how to check if the label exists therefore I can't manipulate the dynamicly created label. below is my code: if ((InputBox.Text.StartsWith("p")) && (InputBox.Text.EndsWith("}")))// only process if the message starts with p and ends with } { string Message = InputBox.Text; InputBox.Text = "";// Clear the box when done. // Butt1 message line if (Message.StartsWith("plabelt1")) { if (Message.StartsWith("plabelt1_BackColor")) { Message = Message.Substring(19); //labelt1.BackColor = System.Drawing.Color.FromName(Message.Replace("}", "")); } } private void ImageBox_DragDrop(object sender, DragEventArgs e) { //Graphics g = ImageBox.CreateGraphics(); //g.DrawImage((Image)e.Data.GetData(DataFormats.Bitmap), //new Point(e.X - this.Left, e.Y - this.Top - 150)); Point p2 = PointToClient(Cursor.Position); Label buttlbl_ = new Label(); labelCount++; buttlbl_.Name = "labelt" + labelCount.ToString(); buttlbl_.Location = new Point(p2.X, p2.Y); buttlbl_.Size = new System.Drawing.Size(37, 37); buttlbl_.BackColor = System.Drawing.Color.DarkGray; this.Controls.Add(buttlbl_); buttlbl_.BringToFront(); ImageBox.Invalidate(); } } Any suggestions?

    Read the article

  • Dynamic Array of Objects Sans Vector Class

    - by Connor Black
    I am doing a homework assignment for my summer OO class and we need to write two classes. One is called Sale and the other is called Register. I've written my Sale class; here's the .h file: enum ItemType {BOOK, DVD, SOFTWARE, CREDIT}; class Sale { public: Sale(); // default constructor, // sets numerical member data to 0 void MakeSale(ItemType x, double amt); ItemType Item(); // Returns the type of item in the sale double Price(); // Returns the price of the sale double Tax(); // Returns the amount of tax on the sale double Total(); // Returns the total price of the sale void Display(); // outputs sale info private: double price; // price of item or amount of credit double tax; // amount of sales tax double total; // final price once tax is added in. ItemType item; // transaction type }; For the Register class we need to include a dynamic array of Sale objects in our member data. We cannot use the vector class. How is this done? Here's my 'Register' '.h' class Register{ public: Register(int ident, int amount); ~Register(); int GetID(){return identification;} int GetAmount(){return amountMoney;} void RingUpSale(ItemType item, int basePrice); void ShowLast(); void ShowAll(); void Cancel(); int SalesTax(int n); private: int identification; int amountMoney; };

    Read the article

  • How do I copy/clone a dynamic disk in Windows 7?

    - by PP
    I have some dynamic disks (or "partitions" but they are not really partitions) that I want to copy onto spare hard drives. I tried using gpartd (and fdisk for that matter) from a linux live disc. All it saw was hard drives with only one partition encasing the whole hard drive. So gpartd/fdisk is incapable of identifying the dynamic "partitions" and allowing me to copy them. Any tools that can be used to clone/copy a dynamic "partition"? (I'm open to commercial software suggestions if they can do the job).

    Read the article

  • Use Dynamic DNS to access Java servlet, still need port forward ?

    - by Frank
    If I use Dynamic DNS such as the free service at https://www.dyndns.com, do I still need to set up static IP and do port forward ? I have a DSL, most likely with dynamic IP address, and I run a Java servlet to get Paypal IPN messages on my notebook, in order for the messages to reach my notebook, I : [1] set up static IP and [2] did port forwarding. But I found each time the PC re-starts, it has a different external IP, so I was suggested to [3] get Dynamic DNS service like the free one mentioned above, but now I'm a bit confused, if I have step [3], do I still need to do [1] and [2], isn't step [3] supposed to do [1] and [2] for me ? But since I've already done [1],[2], now I wonder if they would cause trouble for step [3], do I need to undo them ? Or do I need all of them together ?

    Read the article

  • How to check the version of the dynamic linker?

    - by netvope
    If I run a binary compiled on a newer Linux distro on an older Linux distro, I may get an error like this: a.out: error while loading shared libraries: requires glibc 2.5 or later dynamic linker How can I check the version of the dynamic linker in a Linux system? Is it provided by a package? If so, what's the name of the package? And a theoretical question: Is it possible to update the dynamic linker? (I don't think I'm going to do this but I just want to know.)

    Read the article

  • Access a windows dynamic hard drive through a virtual machine on ubuntu?

    - by Enigma
    I have a Windows 7 OS and am thinking about transitioning to a dual boot set up with Ubuntu 12.04. From what I recall, it is not possible to natively access Dynamic Windows Partitions in a Linux OS. My thought is that it might be possible to have a virtual machine (running windows) installed within Ubuntu access the physical dynamic drive. The problem comes to whether VMWare can access the physical disk "high enough" to be able to mount it within the windows virtual machine as a native device or if it gets passed through from the native Linux OS. This is really the only thing holding me back from switching to a dual-boot set up as the dynamic disk is made up of 4 or 5 hard drives and I would very much like access to the data on both OS's. Alternatively, is there another solution for combining multiple physical hard drives into one virtual hard drive that would be readable on both OS's?

    Read the article

  • GH-Unit for unit testing Objective-C code, why am I getting linking errors?

    - by djhworld
    Hi there, I'm trying to dive into the quite frankly terrible world of unit testing using Xcode (such a convoluted process it seems.) Basically I have this test class, attempting to test my Show.h class #import <GHUnit/GHUnit.h> #import "Show.h" @interface ShowTest : GHTestCase { } @end @implementation ShowTest - (void)testShowCreate { Show *s = [[Show alloc] init]; GHAssertNotNil(s,@"Was nil."); } @end However when I try to build and run my tests it moans with this error: - Undefined symbols: "_OBJC_CLASS_$_Show", referenced from: __objc_classrefs__DATA@0 in ShowTest.o ld: symbol(s) not found collect2: ld returned 1 exit status Now I'm presuming this is a linking error. I tried following every step in the instructions located here: - http://github.com/gabriel/gh-unit/blob/master/README.md And step 2 of these instructions confused me: - In the Target 'Tests' Info window, General tab: Add a linked library, under Mac OS X 10.5 SDK section, select GHUnit.framework Add a linked library, select your project. Add a direct dependency, and select your project. (This will cause your application or framework to build before the test target.) How am I supposed to add my project to the linked library list when all it accepts it .dylib, .framework and .o files. I'm confused! Thanks for any help that is received.

    Read the article

  • How to prevent VC++ 9 linker from linking unnecessary global variables?

    - by sharptooth
    I'm playing with function-level linking in VC++. I've enabled /OPT:REF and /OPT:ICF and the linker is happy to eliminate all unused functions. Not so with variables. The following code is to demonstrate the problem only, I fully understand that actually having code structured that way is suboptimal. //A.cpp SomeType variable1; //B.cpp extern SomeType variable1; SomeType variable2; class ClassInB { //actually uses variable1 }; //C.cpp extern SomeType variable2; class ClassInC { //actually uses variable2; }; All those files are compiled into a static lib. The consumer project only uses ClassInC and links to the static library. Now comes the VC++ 9 linker. First the linker sees that C.obj references variable2 and includes B.obj. B.obj references variable1, so it includes A.obj. Then the unreferenced stuff elimination phase starts. It removes all functions in A.obj and B.obj, but not the variables. Both variable and variable2 are preserved together with their static initializers and deinitializers. That inflates the image size and introduces a delay for running the initializers and deinitializes. The code above is oversimplified, in actual code I really can't move variable2 into C.cpp easily. I could put it into a separate .cpp file, but that looks really dumb. Is there any better option to resolve the problem with Visual C++ 9?

    Read the article

  • Linking Error Building 64bit Qt app on 32bit XP machine.

    - by photo_tom
    I'm trying to build a 64 bit version of my application (and yes I really do need the memory) on my 32bit xp dev box for production testing on our Vista64 server. Previously, I have built w/o any errors the Qt 4.6.2 DLL's in 64 bit mode. That step went vary smooth. Just to get started in building production, I'm trying to rebuild Qt's Star Delegate demo in 64bit mode. I converted the 32bit to 64bit app by changing the application configuration and adjusting the library's to the 64bit venisons. Now, when I go to link, I'm getting the following error when I link 1>------ Build started: Project: stardelegate, Configuration: Release x64 ------ 1>Linking... 1>MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol WinMain 1>release64\stardelegate.exe : fatal error LNK1120: 1 unresolved externals Suggestions? edit - After some more searching, discovered if I link as a console app it will work and run. But not as a windows app. And I don't have this problem in 32 bit mode.

    Read the article

  • Why do we need to include the .h while everything works when including only the .cpp file?

    - by reaffer
    Why do we need to include both the .h and .cpp files , while we can make it works with making just a .cpp file and then including it . For example, Creating a file.h containing declarations, then creating a file.cpp containing definitions and including both on the main.cpp. Or, creating a file.cpp containing declaration/definitions ( no prototypes ) Including it on the main.cpp. Both worked for me , but still can't the difference since i do not have a background on the compiling and linking process .

    Read the article

  • WPF Dynamic Layout with ItemsControl and Grid

    - by Jason Williams
    I am creating a WPF form. One of the requirements is that it have a sector-based layout so that a control can be explicitly placed in one of the sectors/cells. I have created a tic-tac-toe example below to convey my problem: There are two types and one base type: public class XMoveViewModel : MoveViewModel { } public class OMoveViewModel : MoveViewModel { } public class MoveViewModel { public int Row { get; set; } public int Column { get; set; } } The DataContext of the form is set to an instance of: public class MainViewModel : ViewModelBase { public MainViewModel() { Moves = new ObservableCollection<MoveViewModel>() { new XMoveViewModel() { Row = 0, Column = 0 }, new OMoveViewModel() { Row = 1, Column = 0 }, new XMoveViewModel() { Row = 1, Column = 1 }, new OMoveViewModel() { Row = 0, Column = 2 }, new XMoveViewModel() { Row = 2, Column = 2} }; } public ObservableCollection<MoveViewModel> Moves { get; set; } } And finally, the XAML looks like this: <Window.Resources> <DataTemplate DataType="{x:Type vm:XMoveViewModel}"> <Image Source="XMove.png" Grid.Row="{Binding Path=Row}" Grid.Column="{Binding Path=Column}" Stretch="None" /> </DataTemplate> <DataTemplate DataType="{x:Type vm:OMoveViewModel}"> <Image Source="OMove.png" Grid.Row="{Binding Path=Row}" Grid.Column="{Binding Path=Column}" Stretch="None" /> </DataTemplate> </Window.Resources> <Grid> <ItemsControl ItemsSource="{Binding Path=Moves}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Grid ShowGridLines="True"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> </Grid> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </Grid> What was not so obvious to me when I started was that the ItemsControl element actually wraps each item in a container, so my Grid.Row and Grid.Column bindings are ignored since the images are not directly contained within the grid. Thus, all of the images are placed in the default Row and Column (0, 0). What is happening: The desired result: So, my question is this: how can I achieve the dynamic placement of my controls in a grid? I would prefer a XAML/Data Binding/MVVM-friendly solution. Thanks.

    Read the article

  • Issue with dynamic array Queue data structure with void pointer

    - by Nazgulled
    Hi, Maybe there's no way to solve this the way I'd like it but I don't know everything so I better ask... I've implemented a simple Queue with a dynamic array so the user can initialize with whatever number of items it wants. I'm also trying to use a void pointer as to allow any data type, but that's the problem. Here's my code: typedef void * QueueValue; typedef struct sQueueItem { QueueValue value; } QueueItem; typedef struct sQueue { QueueItem *items; int first; int last; int size; int count; } Queue; void queueInitialize(Queue **queue, size_t size) { *queue = xmalloc(sizeof(Queue)); QueueItem *items = xmalloc(sizeof(QueueItem) * size); (*queue)->items = items; (*queue)->first = 0; (*queue)->last = 0; (*queue)->size = size; (*queue)->count = 0; } Bool queuePush(Queue * const queue, QueueValue value, size_t val_sz) { if(isNull(queue) || isFull(queue)) return FALSE; queue->items[queue->last].value = xmalloc(val_sz); memcpy(queue->items[queue->last].value, value, val_sz); queue->last = (queue->last+1) % queue->size; queue->count += 1; return TRUE; } Bool queuePop(Queue * const queue, QueueValue *value) { if(isEmpty(queue)) return FALSE; *value = queue->items[queue->first].value; free(queue->items[queue->first].value); queue->first = (queue->first+1) % queue->size; queue->count -= 1; return TRUE; } The problem lies on the queuePop function. When I call it, I lose the value because I free it right away. I can't seem to solve this dilemma. I want my library to be generic and modular. The user should not care about allocating and freeing memory, that's the library's job. How can the user still get the value from queuePop and let the library handle all memory allocs/frees?

    Read the article

  • Odd ActiveRecord model dynamic initialization bug in production

    - by qfinder
    I've got an ActiveRecord (2.3.5) model that occasionally exhibits incorrect behavior that appears to be related to a problem in its dynamic initialization. Here's the code: class Widget < ActiveRecord::Base extend ActiveSupport::Memoizable serialize :settings VALID_SETTINGS = %w(show_on_sale show_upcoming show_current show_past) VALID_SETTINGS.each do |setting| class_eval %{ def #{setting}=(val); self.settings[:#{setting}] = (val == "1"); end def #{setting}; self.settings[:#{setting}]; end } end def initialize_settings self.settings ||= { :show_on_sale => true, :show_upcoming => true } end after_initialize :initialize_settings # All the other stuff the model does end The idea was to use a single record field (settings) to persist a bunch of configuration data for this object, but allow all the settings to seamlessly work with form helpers and the like. (Why this approach makes sense here is a little out of scope, but let's assume that it does.) Net-net, Widget should end up with instance methods (eg #show_on_sale= #show_on_sale) for all the entires in the VALID_SETTINGS array. Any default values should be specified in initialize_settings. And indeed this works, mostly. In dev and staging, no problems at all. But in production, the app sometimes ends up in a state where a) any writes to the dynamically generated setters fail and b) none of the default values appear to be set - although my leading theory is that the dynamically generated reader methods are just broken. The code, db, and environment is otherwise identical between the three. A typical error message / backtrace on the fail looks like: IndexError: index 141145 out of string (eval):2:in []=' (eval):2:inshow_on_sale=' [GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/base.rb:2746:in send' [GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/base.rb:2746:inattributes=' [GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/base.rb:2742:in each' [GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/base.rb:2742:inattributes=' [GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/base.rb:2634:in `update_attributes!' ...(then controller and all the way down) Ideas or theories as to what might be going on? My leading theory is that something is going wrong in instance initialization wherein the class instance variable settings is ending up as a string rather than a hash. This explains both the above setter failure (:show_on_sale is being used to index into the string) and the fact that getters don't work (an out of bounds [] call on a string just returns nil). But then how and why might settings occasionally end up as a string rather than hash?

    Read the article

  • jQuery: load refuses to get dynamic content in IE6

    - by user260157
    jQuery refuses to load my dynamic content in IE6. All in FireFox & Safari works fine. Only IE6 is being a pain. When I try the a html with <p>Hello World</p> that works. Properly. But when loading a PHP it doesn't work! As you can see it's doing multiple things. <script type="text/javascript"> // When the document is ready set up our sortable with it's inherant function(s) $(document).ready(function() { // Sort list & amend in database function sortTableMenuAndReload() { var order = $('#menuList').sortable('serialize'); $.post("PLUGINS/SortableMenu/process-sortable.php",order); $("#menuList").load("PLUGINS/SortableMenu/sortableMenu_ajax.php"); } function sortTableOrder() { var order = $('#menuList').sortable('serialize'); $.post("PLUGINS/SortableMenu/process-sortable.php",order); } function sortTableOrderAndRemove(removeID) { $('#listItem_'+removeID).remove(); var order = $('#menuList').sortable('serialize'); $.post("PLUGINS/SortableMenu/process-sortable.php",order); $("#menuList").load("PLUGINS/SortableMenu/sortableMenu_ajax.php"); } $("#menuList > li > .remove").live('click', function () { var removeID = $(this).attr('id'); $.ajax({ type: 'post', url: 'PLUGINS/SortableMenu/removeLine.php', data: 'id='+removeID, success: sortTableOrderAndRemove(removeID) }); }); $("#menuList > li > .publish").live('click', function () { var publishID = $(this).attr('id'); $.ajax({ type: 'post', url: 'PLUGINS/SortableMenu/publishLine.php', data: 'id='+publishID, success: sortTableOrder }); }); $('#new_documents > li').draggable({ addClasses: false, helper:'clone', connectToSortable:'#menuList' }); $("#menuList").droppable({ addClasses: false, drop: function() { var clone = $("#menuList > li#newArticleTYPE1"); $(clone).attr("id","listItem_newArticleTYPE1"); } }); $("#menuList").sortable({ opacity: 0.6, handle : '.handle, .remove', update : sortTableMenuAndReload }); }); </script>

    Read the article

  • Foreign key problem linking tables in phpMyAdmin

    - by alan
    I'm using phpMyAdmin (PHP & MySQL) and I'm having a lot of trouble linking the tables using foreign keys. I'm getting negative values for the field countyId (which is the foriegn key). However, it is linking to my other table and cascading fine. When I go to add data there will be a drop selection for the CountyId and the values will look something like this: " -1 1- " Here is my alter statement: ALTER TABLE Baronies ADD FOREIGN KEY (CountyId) REFERENCES Counties (CountyId) ON DELETE CASCADE

    Read the article

  • Foreign key problem linking tables in phpMyAdmin

    - by alan
    I'm using phpMyAdmin (PHP & MySQL) and I'm having a lot of trouble linking the tables using foreign keys. I'm getting negative values for the field countyId (which is the foriegn key). However, it is linking to my other table and cascading fine. When I go to add data there will be a drop selection for the CountyId and the values will look something like this: " -1 1- " Here is my alter statement: ALTER TABLE Baronies ADD FOREIGN KEY (CountyId) REFERENCES Counties (CountyId) ON DELETE CASCADE

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >