on my rails(2.3.5) app(currently 50-70rpm, maximum response time around 0.7s), uploading even 700k file(using paperclip plugin) locks up the server for web requests for everyone for 2 minutes! (other apps on same server work normally)
does anyone have a clue why that might be happening? i am using some mysql transactions which lock the database also if that might be an issue
i read http://www.therailsway.com/2009/4/23/uploading-files
but it couldn't be locking server for 2 minutes for a small file, could it?!
Is there any javascript(/jquery) framework/plugin which generates Balloons? The one that can be used in Comics. The balloon dynamically expands and contracts based on the length of the quote.
Basically, I have a datetime parameter, after picking a date with the calendar widget, the date will display correctly (12/1/2010 or 1-DEC-2010). If the parameter tab refreshes in any way, either from report processing or changing another of the parameters, the date flips the month and day (1-DEC-2010 becomes 12-Jan-2010, or 12/1/2010 becomes 1/12/2010).
I'm utilizing the SSRS plugin for C# (Microsoft.Reporting.Winforms.ReportViewer).
Has anyone seen anything like this?
Hi all
I'm currently investigating MEF to know the feasibility of some kind of plugin subsystem for a software we are writing at my company. One of the first questions that came to my mind is to know the influence of MEF components in the application load time.
Moreover, if that's something of significant weight, is it possible to load those components completely at runtime?
Thanks in advance
Roman
(function($){
// Creating the sweetPages jQuery plugin:
$.fn.sweetPages = function(opts){
// If no options were passed, create an empty opts object
if(!opts) opts = {};
var resultsPerPage = opts.perPage || 3;
var swDiv = opts.getSwDiv || "swControls";
// The plugin works best for unordered lists, althugh ols would do just as well:
var ul = this;
var li = ul.find('li');
li.each(function(){
// Calculating the height of each li element, and storing it with the data method:
var el = $(this);
el.data('height',el.outerHeight(true));
});
// Calculating the total number of pages:
var pagesNumber = Math.ceil(li.length/resultsPerPage);
// If the pages are less than two, do nothing:
if(pagesNumber<2) return this;
// Creating the controls div:
//var swControls = $('<div class="swControls">');
var swControls = $('<div class='+swDiv+'>');
for(var i=0;i<pagesNumber;i++)
{
// Slice a portion of the lis, and wrap it in a swPage div:
li.slice(i*resultsPerPage,(i+1)*resultsPerPage).wrapAll('<div class="swPage" />');
// Adding a link to the swControls div:
swControls.append('<a href="" class="swShowPage">'+(i+1)+'</a>');
}
ul.append(swControls);
var maxHeight = 0;
var totalWidth = 0;
var swPage = ul.find('.swPage');
swPage.each(function(){
// Looping through all the newly created pages:
var elem = $(this);
var tmpHeight = 0;
elem.find('li').each(function(){tmpHeight+=$(this).data('height');});
if(tmpHeight>maxHeight)
maxHeight = tmpHeight;
totalWidth+=elem.outerWidth();
elem.css('float','left').width(ul.width());
});
swPage.wrapAll('<div class="swSlider" />');
// Setting the height of the ul to the height of the tallest page:
//ul.height(maxHeight);
var swSlider = ul.find('.swSlider');
swSlider.append('<div class="clear" />').width(totalWidth);
var hyperLinks = ul.find('a.swShowPage');
hyperLinks.click(function(e){
// If one of the control links is clicked, slide the swSlider div
// (which contains all the pages) and mark it as active:
$(this).addClass('active').siblings().removeClass('active');
swSlider.stop().animate({'margin-left':-(parseInt($(this).text())-1)*ul.width()},'slow');
e.preventDefault();
});
// Mark the first link as active the first time this code runs:
hyperLinks.eq(0).addClass('active');
// Center the control div:
swControls.css({
'right':'10%',
'margin-left':-swControls.width()/2
});
return this;
}})(jQuery);
Is there any way to reorder or manipulate a set of inputs before posting to a script for processing?
I'm able to reorder the elements in the DOM no problem, but getting this to happen after the user presses the submit button and before the browser makes the POST is a bit tricky. I'm using the ajaxForm plugin in jQuery. There is a beforeSubmit callback, but this doesn't seem to allow me to reorded the inputs.
I'm trying to get jQuery to play a sound on element hover/click. (It's like a flash website without flash)
I've tried the methods recommended in Cross-platform, cross-browser way to play sound from Javascript?, the jQuery Sound plugin and a couple of other tutorials without any success. I'm assuming this is because they haven't been updated since 2008.
Does anyone have any recommendations?
I've got things minimally working in Scite... and a quick browse tells me that there is an Eclipse plugin and several other standalone editors, in addition to other general purpose editors with Lua capability.
Out of that, what do people recommend? Particularly, what do people who program primarily in Lua like to use?
Edit: Thanks for all the answers!
I'm looking for a way to trigger for a different function on each individual image. I'm using the Galleria Jquery plugin and have it set up on my site. The problem is i want to display a div with information depending on which image is loaded. I can't figure out how to capture which image is displayed and how to create a condition based on it.
I want to extract a user country name from visitors' IP addresses.
I could get the IP address with remote_ip. But what could be
the easiest way to get the country name?
It doesn't have to be super accurate. Any ruby library (gem or plugin) to do this?
I want an simple and easy solution for this.
We are trying to implement jquery ketchup
demos.usejquery.com/ketchup-plugin/
and use required fields for the name, email and phone fields we have included all the markup and I think I have it setup properly but the form fields are not validating...
You can see my sample here... thx for any assistance I have been staring at this for hours...
http://c5.dealercontrol.net/service/service-appointment/
I'm looking for a way to trigger for a different function on each individual image. I'm using the Galleria Jquery plugin and have it set up on my site. The problem is i want to display a div with information depending on which image is loaded. I can't figure out how to capture which image is displayed and how to create a condition based on it.
I have a problem as I'm conditionally including the Prototype-based Lightbox script for IE6 as it works better than the jQuery plugin.
Of course the two libraries conflict but the official solution is not really feasible for me as i would have to replace tons of $ with the alternative no-conflict syntax.
Is there any other solution for me, keeping in mind that in my case it would be easier to have Prototype work nicely with jQuery than the other way around?
Hello,
Suppose we have 3 apps - appMain, app1 and app2.
Applications 1 and 2 are protected, they have is_secure: true and everything works fine with sfDoctrineGuard plugin.
A behavior I want to achieve is when a user is not authenticated, current application to forward him to another one, say appMain with defined module and action.
Is that possible? Or can someone tell me where to dig about security mechanisms in symfony?
I would like to know about JavaScipt. Is Javascipt available only for web browsers? Because I used some JavaScript code for Firefox Plugin development and Thunderbird.
Help me to find out more about this: where can I use JavaScript other than web browsers, and how?
In a rails project how would I create a picture slideshow? It could be generated as flash or use prototype or something else.
I just want a series of images (as a sub-part of a web page, not be the whole page) to fade into each other, and to advance manually if clicked. It would be nice if I could do things like slowly zoom into the images
I imagine there must be a plugin or something to handle this?
Hello,
I'm hoping somebody knows the answer :).
Within wordpress in the users section I would like to add a new row which will data pulled in from the Register Plus plugin.
Where would I need to create a new row?
My Example:
Username Name E-mail Role **Website** Posts
Admin Admin [email protected] Administrator google.com 2
Thanks.
I am using Easy Slider 1.7 - jQuery plugin and have made many modifications. My slider contains 7 slides, numeric navigation and next and previous arrows. The only problem is the numeric navigation. When you are on slide 1 and click slide 5, for example, all the slides scroll by, one-by-one. I am having trouble modifying the code so that whatever slide you are on, when you click another slide, it is the next one.
Sample here: http://www.weiserwebworld.com/slider.html
I have two eclipse projects on an SVN repository that I feel should be merged into one.
The easiest way that I can think of doing this is to copy the contents of both projects into a new local project, commit it, and nuke the old ones.
Is there a better, SVN-ish way of doing things?
I'm using the Eclipse Subversive plugin, for what its worth
I would like to create a Java-written RESTFul Web Service, possibly using an eclipse plugin.
This service should be consumed by an android application, using the apache HttpClient.
But my question is, which is the best/ideal technology (server side) to implement this kind of web service?
In Silverlight, is there any way to get a notification event if a Control (or any FrameworkElement) has been scrolled into the viewport and is now visible?
I want to implement something like the Lazy Load Images jQuery Plugin.
Hi,
I have just started with the ebay Finding API and Feedback API and I need to deploy a basic API implementation on GAE/J.
The problems are:
How do we start with the local dev environment of the ebay SDK?
There is no Java tutorial for the Finding API and feedback.
GAE/J + ebay APIs won't cause any complexity right?
I am looking for head start in the right direction,I am using Eclipse + GAE plugin.
I am new to android development.
Have tried a couple times downloading the Android SDK and ADT plugin for Eclipse
In the Android SDK and AVD manager load fine but will not load any available packages.
Show:
- Android Repository
--"Some packages were found but are not compatible updates"
In the installed it shows 1.5 to 2.3 SDK platforms.
How to I get them available.
Appreciate help.
Thanks,
Alex
One of my clients websites, www.kevinsplants.co.uk is not showing the search results in alphabetical order, how do I go about ordering the results in alphabetical order?
We are using the Shopp plugin and I believe its that plugin that is generating the results!
Cheers, Brad
case "orderby-list":
if (isset($Shopp->Category->controls)) return false;
if (isset($Shopp->Category->smart)) return false;
$menuoptions = Category::sortoptions();
$title = "";
$string = "";
$default = $Shopp->Settings->get('default_product_order');
if (empty($default)) $default = "title";
if (isset($options['default'])) $default = $options['default'];
if (isset($options['title'])) $title = $options['title'];
if (value_is_true($options['dropdown'])) {
if (isset($Shopp->Cart->data->Category['orderby']))
$default = $Shopp->Cart->data->Category['orderby'];
$string .= $title;
$string .= '<form action="'.esc_url($_SERVER['REQUEST_URI']).'" method="get" id="shopp-'.$Shopp->Category->slug.'-orderby-menu">';
if (!SHOPP_PERMALINKS) {
foreach ($_GET as $key => $value)
if ($key != 'shopp_orderby') $string .= '<input type="hidden" name="'.$key.'" value="'.$value.'" />';
}
$string .= '<select name="shopp_orderby" class="shopp-orderby-menu">';
$string .= menuoptions($menuoptions,$default,true);
$string .= '</select>';
$string .= '</form>';
$string .= '<script type="text/javascript">';
$string .= "jQuery('#shopp-".$Shopp->Category->slug."-orderby-menu select.shopp-orderby-menu').change(function () { this.form.submit(); });";
$string .= '</script>';
} else {
if (strpos($_SERVER['REQUEST_URI'],"?") !== false)
list($link,$query) = explode("\?",$_SERVER['REQUEST_URI']);
$query = $_GET;
unset($query['shopp_orderby']);
$query = http_build_query($query);
if (!empty($query)) $query .= '&';
foreach($menuoptions as $value => $option) {
$label = $option;
$href = esc_url($link.'?'.$query.'shopp_orderby='.$value);
$string .= '<li><a href="'.$href.'">'.$label.'</a></li>';
}
}
return $string;
break;