Hello,
My controls receives some params from the user, I would like to place them inside the view I'm calling, how should I do this without splitting the view into multiple parts?
Thank you.
Hi!
I develop an eclipse plugin and I added an eclipse progress view to it. There is an stop button on the progress view and I want to create some kind of listener to handle the events of the chancel button, but I don't know how I can do it. I know the monitor has an isChancel() method, but I have to create come kind of listener to listen when user clicks the stop button, while the plugin works. Please give me some advice. Thanks
Example:
link text
$('#bit_IsModule').click(function () {
if ($('#bit_IsModule:checked').val() == "true")
$("#featurename").slideUp();
else
$("#featurename").slideDown();
});
I want to disable the first value in the select list on the checkbox click ? how can i do that
Hi,
I was just wondering how I can get a single tap to undo the zoom inside of a scroll view? I cant seem to figure it out.
I was also wondering how do you know what size to set your scroll view contentSize, as I find this issue a little confusing at the moment I have it set at 460x320.
Thanks
Hi there, I've got several MPEG files that I'm using on my site - the first time the user clicks on the link, it will open up and play about 3/4 of the video, the second time it will play entirely?
Was thinking it might be a proxy issue, but happening in both dev and prod. Any ideas?
Hello all,
There is a canvas element with 10 children (polygons). There is a number in my code from 1 to 10.
I'd like to draw the first N elements from the children elements, base on my number.
It would be the best solution to do this from XAML with a minimum code-behind like this:
...
MyCanvas.N = 5;
...
I display a mail composer view upon a tool bar button click event.
At present, I can display the email composer view but when it display it hides the tool bar. I need the toolbar to remain visible.
I have seen other apps display the email composer without hiding a toolbar but I can't figure out how they did so.
I am new to iphone development. Please help me out.Thanks.
Hi everybody,
I want to have a view with several choices when I click an element of my ListView. I was thinking of implementing an AlertDialog but as I need more than 3 options it is not possible...
I also thought of putting my ListView in a FrameLayout and have an view with a gone visibility that I would turn visible at the click and update the content but I don't know If it's a good idea.
I could do with some advice,
Thanks for any idea.
I need to add an image at the top of the default calendar view of the iPhone. If any body knows how to implement this please respond.I am using the Tapku library inorder to show the calendar. Kal library also can be used if this can implement there.
Below attached the calendar view and i need to put an image at the top of this calendar just below the title bar.The calendar need to see just below the image.
Hello
On a very first access to a website, is it possible to know if browser cookies are activated thanks to the GET request?
Is it possible particularly in a J2EE context? On the server side (no ajax/js solution)
I'm playing around with URL schemes in my app. I easily made one to open my app, just adding the necessary items to info.plist. This current URL "myappname://" takes the user to the initial view controller, FirstTableViewController, but I was wondering if it would be possible to modify that URL scheme so it I can have one that takes the user to a certain view controller, such as ThirdTableViewController. I would use this as a handy feature in something like Launch Center.
I need a way to detect if this is the first time the user is ever opening the application, if so, start an activity. Then all previous application launches wouldn't start that activity. I've read in a few places about using preferences to accomplish this. Anyone got any ideas?
My code:
#include <string>
#include <boost/algorithm/string/regex.hpp>
std::cout << boost::algorithm::replace_regex_copy(
"{x}{y}", // source string
boost::regex("\\{.*?\\}"), // what to find
std::string("{...}") // what to replace to
);
This is what I see:
{…}{y}
Thus, only the first occurrence replaced. Why? How to solve it?
My overall use case:
I have a Listing model that has many images. The Listing detail page lists all the fields that can be updated inline (through ajax).
I want to be able to use the same view for both update listing and create new listing.
My listing controller looks as follows:
def detail
@listing = Listing.find(params[:id])
@image = Image.new #should this link somewhere else?
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @listing }
end
end
def create
# create a new listing and save it immediately. Assign it to guest, with a status of "draft"
@listing = Listing.new(:price_id => 1) # Default price id
# save it to db
# TODO add validation that it has to have a price ID, on record creation. So the view doesn't break.
@listing.save
@image = Image.new
# redirect_to "/listings/detail/@listing.id" #this didn't work
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @listing }
end
end
The PROBLEM
I'm using a partial that shows the same form for the create view and the detail view.
This works perfectly except for one thing:
When I pull up
http://0.0.0.0:3000/listings/detail/7, it works perfectly.
When I pull up
http://0.0.0.0:3000/listings/new, I get the following error:
Showing /Applications/MAMP/htdocs/rails_testing/feedbackd/app/views/listings/_edit_form.html.erb where line #100 raised:
No route matches {:action="show", :controller="images"}
Extracted source (around line #100):
97: <!-- Form for new images -->
98: <div class="span-20 append-bottom">
99: <!-- <%# form_for :image, @image, :url => image_path, :html => { :multipart => true } do |f| %> -->
100: <%= form_for @image, :url => image_path, :html => { :multipart => true } do |f| %>
101: <%= f.text_field :description %><br />
102: <%= f.file_field :photo %>
103: <%= submit_tag "Upload" %>
What I think the issue is:
When I upload a new image (I'm using Paperclip), it requires the listing_id to create the image record. Since the listing_id isn't passed in with listings/new it can't find the listing_id. How can I pass in the id? Via a redirect? What's the best way to solve this? Thank you.
How do I create a partial view that has a form with assigned id?
I got as far as:
using (Html.BeginForm(?action?,"Candidate",FormMethod.Post,new {id="blah"}))
Partial view is used for both Create and Edit so first parameter ?action? will be different. I can't figure out what value of ?action? supposed to be
I am using an XSL transformation on an xml file to create an xml document. The problem i am running into is that when i go to view the generated source (the transformed source) i can't see the DOCTYPE attribute of the html so i don't know if its being emitted properly.
Is there any way to view the doctype in this way?
in asp.net mvc , if i shove a dictionary or an array of objects in ViewData and read that in my view compared to creating a view model class that has that same data structure, is there a performance difference or other consideration or should i expect the same response time?
iphone, need to put many text boxes on the view, how to scroll down to view more content? I actually put buttons and labels on the ScrollView, but the scrolling doesn't work. Do I need to write any code for that, any example?
Thanks.
Hi,
I am using the code from this tutorial to parse a CSV file and add the contents to a database table. How would I ignore the first line of the CSV file? The controller code is below:
def csv_import
@parsed_file=CSV::Reader.parse(params[:dump][:file])
n = 0
@parsed_file.each do |row|
s = Student.new
s.name = row[0]
s.cid = row[1]
s.year_id = find_year_id_from_year_title(row[2])
if s.save
n = n+1
GC.start if n%50==0
end
flash.now[:message] = "CSV Import Successful, #{n} new students added to the database."
end
redirect_to(students_url)
end
sifr3 text doesn't load many time first time on FF 3.5? I haven't checked on other browser.
If i reload page again then it loads properly.
this is my code
sIFR.replace(futura, {
selector: '#Homepage h1', ratios: [6, 1.24, 9, 1.13, 10, 1.15, 16, 1.09, 21, 1.06, 22, 1.07, 25, 1.04, 26, 1.06, 29, 1.03, 30, 1.05, 31, 1.03, 32, 1.05, 41, 1.04, 58, 1.03, 97, 1.02, 1.01],
wmode: 'transparent',
css: '.sIFR-root { background-color: none; color: #ffffff; }'
});
For some reason it takes 7 seconds to open a connection to a sql server database for the firt time, subsequent connections takes a second. any idea what could be the reason?
I'm using C# and asp.net
Its after compilation, i essence every time i restart the site, which means every time it needs to actualy create the "first" connection. i understand that setting up connection pooling has overhead, but i have never seen that i should take 7 second to set it up.
I have a bunch of product sku's that look like:
abc234
asdf234324
adc234-b
result:
abc 234
asdf 234324
adc 234-b
I want to split the text at the first instance of a letter.
When I say split, basically I want to have access to both parts of the text, maybe in an array?
What's the best way to do this?
i have formview when with tow required validator and gridview with reqired validator
when i click insert on form view it fires the validation on the gridview i want when i click inserton form view just validate the tow validators on the form and doesnt fire the validator on gridview
How can I find and show Name of first element in a table?
I'm guessing that I have to use something like
$this->data['lastInvioce'] = $this->Invoice->find('all', array('limit' => 1));
... in controller to find it...
Tnx in adv!!!
Is there any way to access javasript variable inside the rails view.
I just set some value of javascript variable and want to access it in rails view.
Thanks