I need to open a link from within jQuery but i need to avoid sending the referral information. In shorter words, i need to simulate rel="noreferrer"
Is it feasible?
I use a basic setup which uses a layout.phtml for the HTML Layout and view scripts for the content part.
I want to control some variables in the layout in my controllers, i.e. the title of my site.
How can I access my layout to output variables from withinthe controller?
Thanks for your feedback!
After you enter your name and password on a website, a cookie is stored on your computer. Your computer then sends information from that cookie to the website whenever you browse to another page on that site so that the site knows who you are.
How is information from the cookie sent? Does the browser append information from withinthe cookie to the html address?
Goal: To implement a jQuery plugin for my rails app (or write one myself, if necessary) that creates a "box" around text after a delimiter is typed.
Example: With tagging on SO, the user begins typing a tag, then selects one from the drop-down list provided. The input field recognizes that a tag has been selected, puts a space and then is ready for the next tag. Similarly, I am attempting to use this plugin to put a box around the previously entered tag before moving to to accept the next tag/input.
The instructions in the README.txt seem simple enough, however I have been receiving a
$(".tagbox").tagbox is not a function
error when debugging my app with firebug.
Here is what I have in my application.js:
$(document).ready( function(){
$('.tagbox').tagbox({
separator: /\[,]/, // specifying comma separation for <code>tags</code>
});
});
And here is my _form.html.erb:
<% form_for @tag do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :name %><br />
<%= text_field :tag, :name, { :method => :get, :class => "tagbox" } %>
</p>
<p><%= f.submit "Submit" %></p>
<% end %>
I have omitted some other code (namely the implementation of an autocomplete plugin) existing within my _form.html.erb and application.js for sake of readability. The inclusion or exclusion of this omitted code does not affect the performance of this plugin.
I have included all of the necessary files for the tagbox plugin (as well as application.js after all other included JS files) withinthe javascript_include_tag in my application.html.erb file.
I'm pretty much confused as to why I'd be getting this "not a function" error when jquery.tagbox.js clearly defines the function and is included in the head of my html page in question. I've been struggling with this plugin for longer than I'd like to admit, so any help would really be appreciated. And, of course, I'm open to any other plugins or from-scratch suggestions you may have in mind..
This tagbox plugin does not seem to have a wealth of documentation or any currently working examples.
Also to note, I'm trying to avoid using jrails.
Thanks for your time
Can A datatable somehow be passed into SQL Server 2005 or 2008 ?
I know the standard way seesm to be passing XML to a SP. And a datatable can easily be converted to XML somehow to do that.
What about passing a .NET object into a SP ? Is that possible ?
I remember hearing about SQL and CLR working together in 2008 somehow but I never understood.. Maybe that means you can refer to .NET objects within a Stored Procedure ?
I'm trying to do a couple of things at once. I'm trying to do one major thing: redirect the application output that is displayed in the Qt Creator console to a textEdit that I have on my GUI. However, the class that I need to do this in is written in C and all of its related headers are in C as well. Is there a way that I can redirect the output into the textEdit withinthe C class?
Hello,
Hoping to get some feedback from someone more experienced here. I haven't dealt with the dreaded floating-point calculation before...
Is my understanding correct that with Ruby BigDecimal types (even with varying precision and scale lengths) should calculate accurately or should I anticipate floating point shenanigans?
All my values within a Rails application are BigDecimal type and I'm seeing some errors (they do have different decimal lengths), hoping it's just my methods and not my object types...
Thanks!
I am building an app based on google app engine (Java) using JDO for persistence.
Can someone give me an example or a point me to some code which shows persisting of multiple entities (of same type) using javax.jdo.PersistenceManager.makePersistentAll() within a transaction.
Basically I need to understand how to put multiple entites in one Entity Group so that they can be saved using makePersistentAll() inside transaction.
Hi folks,
I'll briefly explain what I'm trying to do:
I need to sort a set of content-types within a paginated page. Also I need to add filtering to the page, for example each content-type should have a set of tags and the filter needs to filter through these tags.
This is a basic mockup of what this page consists of:
I'm finding it quite hard figuring out the best way to do it, and if this can be done.
Help would be very much appreciated!!
I have a web app using Hibernate, and I am attempting to persist some data, but it is failing to persist within a Transaction despite using the @Transactional annotation.
My service class is as follows:
@Service("profileService")
public class ProfileService {
private EntityManager entityManager;
@Autowired
private AccountService accountService;
@Autowired
private ProfileDAOImpl profileDao;
@PersistenceContext
public void setEntityManager(EntityManager em) {
this.entityManager = em;
}
@Transactional
public void addConnectionToAccount(SocialConnection sc) {
entityManager.persist(sc);
}
}
The addConnectionToAccount() method is being called from another Spring bean in a normal method, and the ProfileService class is currently being injected there:
public class HibernateConnectionRepository implements ConnectionRepository {
@Inject
private ProfileService profileService;
@Override
@Transactional
public void addConnection(SocialConnection sc) {
try {
profileService.addConnectionToAccount(accountId, sc);
} catch (Exception e) {
e.printStackTrace();
}
}
I tried putting the @Transactional annotation on the calling method in the vain hope that it might make a difference but nothing.
Previously I have experienced problems like this its been because the object being persisted does not satisfy table restrictions (such as non-nullable columns as null) or because the method is being called from withinthe same class and the calling method is not Transactional, but neither of those are the case here..
Any ideas? it just fails silently, the logs are as follows:
2012-03-26 22:25:04,702 [http-bio-8085-exec-9] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - trace com.mchange.v2.resourcepool.BasicResourcePool@1bc25c8 [managed: 3, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@e5b006)
2012-03-26 22:25:04,710 [http-bio-8085-exec-9] DEBUG org.hibernate.SQL - select SEQ_COUNT from SEQUENCE where SEQ_NAME = 'PO_SEQ' for update
2012-03-26 22:25:04,711 [http-bio-8085-exec-9] DEBUG org.hibernate.SQL - update SEQUENCE set SEQ_COUNT = ? where SEQ_COUNT = ? and SEQ_NAME = 'PO_SEQ'
2012-03-26 22:25:04,723 [http-bio-8085-exec-9] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - trace com.mchange.v2.resourcepool.BasicResourcePool@1bc25c8 [managed: 3, unused: 2, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@e5b006)
2012-03-26 22:25:04,723 [http-bio-8085-exec-9] DEBUG org.hibernate.event.internal.AbstractSaveEventListener - Generated identifier: 2200, using strategy: org.hibernate.id.MultipleHiLoPerTableGenerator
UPDATE
Also wanted to mention that the HibernateConnectionRepository bean is not annotated and is actually being configured in an @Configuration class (if this makes any difference? not used @Configuration classes much).
The method to create the bean is as follows:
@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public ConnectionRepository connectionRepository() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication == null) {
throw new IllegalStateException("Unable to get a ConnectionRepository: no user signed in");
}
ApplicationUser user = (ApplicationUser) authentication.getPrincipal();
return usersConnectionRepository().createConnectionRepository(String.valueOf(user.getAccountId()));
}
The bean is scoped to the logged in user, but may also be created multiple times for each user..
I have an Project that I distribute by sending out large packages. I'd like to know if there is a user friendly way of using Maven to distribute updates of the project? I'd need something like what is done for updating softwares like Firefox or Acrobat Reader. Check a respository, warn user of an update, download and reconfigure. All within a simple and friendly interface. Alternative open source java projects are welcome.
I am writing a tomcat app, and have a need to do authentication withinthe URL like this:
https://user:[email protected]
Except for the life of me i'm not sure how to set it up or able to find the docs to read up on it, clearly my google skills need work.
Can anyone tell me where i should be looking for this kind of info or where to start?
Cheers
Andy
I am using the Location module within Drupal 6 to tag geographical locations to blog entries. So every blog entry has a long/lat
My question is: What is the most efficient way of querying all coordinates for all blog entries of a given user?
Hi
I currently loook after 20 odd databases in SQL server 2005 and need a tool for monitoring the performance and keep me informed if a database is running slow. Is there anything I can run within Managment studio of any other good third party tool (Pref free) that can do the job.
Thanks
Quick question, my data model is a singleton object and it contains a list of names I want archive. My idea is to make the model responsible for loading / saving this data. The ModelLoad will then be called by the ViewControllerviewDidLoad and the ModelSave by ViewControllerapplicationWillTerminate. I could do the load / save directly withinthe ViewController, but this would be messy as the list of names are on instance variable of the model.
gary
Hi Folks,
when creating a dialog with buttons like:
buttons: {
'button text': function(){
// do something
},
do I have access to the button withinthe click event handler?
$(this)
is the context/jQuery object of the whole dialog.
I doubt I have to be such creative as
$(this).find('button').attr(...)
to disabled a button there ?
I have produced a new Maven Project from gae-archetype-gwt from within IntelliJ, and everything is generated well, but the gae:... goals won't show up in the Maven View, and if I try to update Repository Indices, apart from the local repository I get errors only.
When I run gae:unpack from terminal, everything works fine.
Im running Ubuntu 10.04 Beta 1 and am using open-jdk, for which IntelliJ is also configured.
UPDATE: WORKS FINE WITH UBUNTU 10.04 FINAL + JDK FROM PARTNER REPOSITORY
I have a parent container, that has child containers within it. 2 child containers take up 60% width and 40% width respectively. They have no margin, and they have padding, but use box-sizing so this is included in the width. But for some reason they don't sit side by side. If I change one of them to 39% width then it looks fine.
What am I doing wrong?
Example can be seen at http://jsfiddle.net/Rcaet/
Hi All,
Can mapkit framework provided in iphone be used to create an enterprise application, without violating Google privacy and terms. As I am creating enterprise application using enterprise certificate (http://developer.apple.com/programs/iphone/enterprise/) form apple, wanted to know weather I can use makkit framework in my application application for distribution withinthe enterprise and on itunes app store.
Please let me know if there is any additional legal agreement/certificates involved.
Thanking you in advance.
Hi folks,
this might be quite simple, but I must say I'm a bit confused on this topic.
I'm writing code based on two popular libraries:
jQuery
underscore.js
I am just wondering what would be the best way to isolate the code and prevent conflicts and how to merge it with its dependencies.
By merging I mean putting them withinthe same file. :)
I hope I'm not asking something which is too basic.
...and a last thing
MERRY CHRISTMAS EVERYONE! =D
I've been developing an SSRS 2005 report (a form letter) that contains two tables. The first "table" uses DataSet "A" to populate address fields on letterhead.
The second table uses DataSet "B" to display a basic list of records that pertain to the addressed party.
Even though the two tables are withinthe same page and all PageBreak* properties are set to "False", SSRS renders the report as two pages.
How can I force both tables to render in series, without any forced page breaks?
My intention here is to select all entries (Bookings) between "begin" (begin_prefix) and "end" (end_prefix)
BUT! The important thing is:
If I have a booking at 07:25-10:00 - you query for 09:00-10:00 it should still show the booking because it reserves the room until 10 no matter what ..
So ..
07.25-10.00 booking means query for 09:00-10.00 still returns a list of bookings within 09:00-10.00 (which means 07.25-10.00 is included)
public static List<booking> Today(DateTime begin, DateTime end)
{
try
{
IFormatProvider Culturez = new CultureInfo(ConfigurationManager.AppSettings["locale"].ToString(), true);
DateTime begin_prefix = DateTime.ParseExact(begin.ToString(), "dd-MM-yyyy HH:mm:ss", Culturez);
DateTime end_prefix = DateTime.ParseExact(end.ToString(), "dd-MM-yyyy HH:mm:ss", Culturez);
dbDataContext db = new dbDataContext();
// gives bookings BEFORE begin_prefix (why?)
IQueryable<booking> bQ = from b in db.bookings
where begin_prefix >= b.Starts &&
b.Ends <= end_prefix &&
b.Ends > b.Starts &&
b.pointsbookings.Count > 0
select b;
// ^gives bookings BEFORE begin_prefix (why?)
List<booking> bL = bQ.ToList();
return bL;
}
catch (Exception)
{
throw;
}
}
I've tried getting this right for some time now .. Seems everytime I correct it to something new, a new overlap or selection outside the two begin/end dates seem to appear :(
UPDATE CRITERIA and SOURCE: Bookings has to be WITHIN "begin_prefix" and "end_prefix" or on the exact same time ..
.. currently the above code gives me bookings BEFORE begin_prefix date, which is not intentioned! We're in 2011, I got bookings from 2010 as well! **
NEW!! UPDATED:
This is what I have:
SEARCH.START = BOOKING.START
BOOKING.END <= SEARCH.END
... the problem comes up when ..
BOOKING entry: 10:00(Start)-14:00(End)
This means according to above:
08.59 = 10.00
(SEARCH.START = BOOKING.START)
It will never include it. But it should, since this is the same room and the seats are booked individually!
I am trying to get dynamically session object in struts2 application.
<s:if test="%{#session['resToken'].bookingType == 1}">
resToken can be get by <s:property value="%{resToken}">..
But I can't write <s:property> within <s:if test="">
its giving me error of double quotes..
org.apache.jasper.JasperException: /WEB-INF/jsp/booking/banquet/guest-Info-View.jsp(150,40) Unterminated <s:if tag
In Javascript is there a function that returns the number of times that a given string occurs?
I need to return a numeric value that is equal to the number of times that a given string occurs within a particular string for instance:
var myString = "This is a test text"
If I had to search for 'te' in the above string it would return 2.
Is there a way to reassign agents to a different container or will I have to create a new container and then create all new instances of the agents withinthe new container?
I have done a lot of searching and can't seem to find anything on container reassignment.
Thanks in advance for any info!