http://www.vbulletin.com/docs/html/
Are they using a custom design or is that a script? If it's custom, is there something similar to it that I could use to document my software?
I recently played with MongoDB in Rails using Mongoid. I like the ability to define attributes for models within the model file (as opposed to in migrations):
class Person
include Mongoid::Document
field :name, :type => String
field :birthday, :type => Date
end
For projects that cannot use a schema-less database, does a similar feature exist? Any gems or plugins that generate schemas from a similar syntax would be greatly appreciated.
Thanks.
G'day guys, currently have almost finished writing a rails application that allows a CSV download of the database. This is generated when the index is first viewed.
Is there an easy way to insert a link to a helper that returns a CSV document? That is to say is it easy to insert links to helpers? This would make a lot of problems I've been having much easier
I am creating a background color animation with jQuery and the color animation plugin
http://plugins.jquery.com/project/color
How do I have a function stay in a loop repeating itself each time it has finished running? I tried this but it did not work :
$(document).ready(function(){
function colorLoop(){
$("#window")
.animate({ backgroundColor: "orange" }, 11000)
.animate({ backgroundColor: "yellow" }, 1000)
.animate({ backgroundColor: "green" }, 1000)
.animate({ backgroundColor: "blue" }, 1000)
.animate({ backgroundColor: "indigo" }, 1000)
.animate({ backgroundColor: "violet" }, 1000)
.animate({ backgroundColor: "red" }, 1000, colorLoop);
};
});
First let me state that I'm a jquery noob, so this may not make a lot of sense.
So I have a series of list items that expand to show a hidden div inside if the user mouses over a link inside the item (not the whole list item itself)
The problem is that if the users mouse leaves the link the li closes up again.
I need this to work in a way so that the li only closes if you mouse over a link in another li. (sorry this is kind of hard to put into words)
Heres my code.
$(document).ready(function(){
$(".home_upcoming_title").hoverIntent({
over: makeTall,
timeout: 500,
out: makeShort
});
}); // close document.ready
function makeTall(){$(this).parents("li").animate({"height":200},200);}
function makeShort(){$(this).parents("li").animate({"height":32},200);}
and the HTML
<li class="p1">
<ul class="home_upcoming_list2" id="fade">
<li class="home_upcoming_date">Sat.Sept.23rd.2010</li>
<li><a href="./." class="home_upcoming_title" >Event Title</a></li>
<li class="home_upcoming_city">Los Angeles</li>
<li class="home_upcoming_type">Festival</li>
<li class="home_upcoming_venue">Venue</li>
<li class="home_upcoming_age">18+</li>
<li><a href="./." title="Buy Tickets" class="home_upcoming_tix">Buy Tickets</a></li>
<li><a href="./." class="upcoming_info" title="View Details"></a></li>
</ul>
<div style="height:150px; background-color:#FF0000; display:block;" class="sl0w"></div>
</li>
so the link with the class "home_upcoming_title" expands li to show the div inside but when I mouse over the div itself the list closes. I also need it so only the class "home_upcoming_title" expands the div. but it needs to stay open until you mouse over another link with the same class.
sorry if that doesn't make much sense :)
Hi,
is it possible to trigger Parent's page load event from a popup.When i use javascript function window.parent.document.form.submit,this creates a postback.I want a function which creates "reload" for page because some of my functions work in the "if not postback" statement.
We have deployed a .net 4 asp.net site on IIS 6.0.
Default.aspx is configured as one of the default document.
When we access the site using the following url
http://testsite
We expect it to render
http://testsite/Default.aspx
But instead we get 404 Not found error. We did not had this issue when it was deployed on .Net 2.0. Only thing that has changed on the server is that we use .Net 4 instead of .Net 2.
I already have pdf links set up. I am just looking to prepend Google's syntax in front of my current href using jQuery. i know the following doesn't work, but I feel I am close…?
jQuery(document).ready(function() {
jQuery("a[href$=.pdf]").attr("href", "http://docs.google.com/viewer?url=" + current.href);
});
Can anyway help, please?
I'm trying to build a basic POP3 mail client in C/++, but I've run into a bit of an issue. Since you have to define the buffer size when building the program, but a message can be arbitrarily large, how do you, say, get the mail server to send it to you in parts? And if this isn't the correct means of solving the problem, what is?
And while I'm here, can anyone confirm for me that RFC 2822 is still the current document defining email layout?
Thanks
In the document for the method notifyDataSetChanged of class BaseAdapter noted that "Notifies the attached observers that the underlying data has been changed and any View reflecting the data set should refresh itself. "
Supposed I changed the 3rd element in my string array (array data for the listview), what "any View reflecting the data set should refresh itself" means ? Does the 3rd view item in my list view be notified ?
Also, how is notifyDataSetChanged() and getView() concerned ?
Thanks in advance
I need to match and replace some comments.
for example:
$test = "the url is http://www.google.com";// comment "<-- that quote needs to be matched
I want to match the comments outside of the quotes, and replace any "'s in the comments with "'s.
I have tried a number of patterns and different ways of running them but with no luck.
The regex will be run with javascript to match php "//" comments
UPDATE:
I took the regex from borkweb below and modified it. used a function from http://ejohn.org/blog/search-and-dont-replace/ and came up with this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function t_replace(data){
var q = {}, ret = "";
data.replace(/(?:((["'\/]*(("[^"]*")|('[^']*'))?[\s]*)?[\/\/|#][^"|^']*))/g, function(value){
q[key] = value;
});
for ( var key in q ){
ret = q[key];
}
var text = data.split(ret);
var out = ret + text[1];
out = out.replace(/"/g,""");
out = out.replace(/'/g,"'");
return text[0] + out;
}
</script>
</head>
<body>
<script type="text/javascript">
document.write(t_replace("$test = \"the url is http://www.google.com\";// c'o\"mment \"\"\"<-- that quote needs to be matched")+"<br>");
document.write(t_replace("$test = 'the url is http://www.google.com';# c'o\"mment \"\"\"<-- that quote needs to be matched"));
</script>
</body>
</html>
it handles all the line comments outside of single or double quotes. Is there anyway I could optimize this function?
Hi,
I have a xml document holding a small data for my project where I want to convert my xml to an excel file (microsoft office excel 2003 and over)
How can I do this?
Kind Regards.
I have been working on this program which inserts an XML file into a MYSQL database. I'm new to the whole .jar idea by inserting packages. Im having an issue with parse(), select(), and children(). Can someone inform me how I could fix this issue? Here is my stack trace and my program below:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The method select(String) is undefined for the type Document
The method children() is undefined for the type Element
The method children() is undefined for the type Element
The method children() is undefined for the type Element
The method children() is undefined for the type Element
at jdbc.parseXML.main(parseXML.java:28)
import java.io.*;
import java.sql.*;
import org.jsoup.Jsoup;
import org.w3c.dom.*;
import javax.xml.parsers.*;
public class parseXML{
public static void main(String xml) {
try{
BufferedReader br = new BufferedReader(new FileReader(new File("C:\\staff.xml")));
String line;
StringBuilder sb = new StringBuilder();
while((line=br.readLine())!= null){
sb.append(line.trim());
}
Document doc = Jsoup.parse(line);
StringBuilder queryBuilder;
StringBuilder columnNames;
StringBuilder values;
for (Element row : doc.select("row")) {
// Start the query
queryBuilder = new StringBuilder("insert into customer(");
columnNames = new StringBuilder();
values = new StringBuilder();
for (int x = 0; x < row.children().size(); x++) {
// Append the column name and it's value
columnNames.append(row.children().get(x).tagName());
values.append(row.children().get(x).text());
if (x != row.children().size() - 1) {
// If this is not the last item, append a comma
columnNames.append(",");
values.append(",");
}
else {
// Otherwise, add the closing paranthesis
columnNames.append(")");
values.append(")");
}
}
// Add the column names and values to the query
queryBuilder.append(columnNames);
queryBuilder.append(" values(");
queryBuilder.append(values);
// Print the query
System.out.println(queryBuilder);
}
}catch (Exception err) {
System.out.println(" " + err.getMessage ());
}
}
}
I am attempting to convert Java code to Jython and am using the apache Log and LogFactory imports. I am attempting to emulate Foo.class in Jython The chunk of code is as follows:
in Java
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class MyClass {
private static final Log log = LogFactory.getLog(MyClass.class);
public MyClass(Document dom)
{ //code
}
How can I emulate this same behavior of MyClass.class in Jython/Python?
Given a PDF document, is it possible to generate a XSL-FO (FOP) template?
Obviously, this would be a one-time thing - the generated template would just be a starting point for creating a proper template that pulls in the appropriate data.
For me, the ideal tool for doing so would be a Java-based one and should be executable from the command line or through an ANT task. Failing that, it would be something that runs on Linux and MacOS X.
I am currently playing around with jqueries drag and drop, basically I currently have a div (.drag_check) that holds a checkbox, I have the drag and drop working but I want to alert out the checkbox's ID once the element is dropped, I assume I have to use child but all my attempts have returned 'undefined'. Below is my code,
$('.drag_check').draggable({
containment: 'document',
opacity:0.6,
revert: 'invalid',
helper: 'clone',
zIndex: 100
});
$("ul.searchPage").droppable({
drop:
function(e, ui) {
var param = $(ui.draggable).attr('class')
addlist(param)
alert(param)
}
})
I want detailed explanations for bsd-socket options so that I can use them in the right manner. Can anybody please provide me some document or link from where I can refer?
Thanks,
Satinder Singh
[email protected]
I am following the Zend Framework quickstart document and got stuck on the .htaccess rewrite rules. I am using this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
This works find when I access through HTTP, however, nothing is served when accessing through HTTPS. I am using a single directory for HTTP and HTTPS content.
I would not want to force HTTPS either.
How can I fix this?
I have a model with a JSON field or a link to a CouchDB document. I can currently access the dynamic informaction in a way such as:
genericdocument.objects.get(pk=1) == genericdocument.json_field['sample subfield'] instead I would like genericdocument.sample_subfield
to maintain compatibility with all the apps the project currently shares.
I just started my real development career and I want to know what set of tools/strategy that the community is using to write better quality code.
To start, I use
astyle to format my code
doxygen to document my code
gcc -Wall -Wextra -pedantic and clang -Wall -Wextra -pedantic to check all warnings
What tools/strategy do you use to write better code? This question is open to all language and all platform.
how do i minify this. (mootools, but it probably looks similar in jQuery)
window.frames['buffer'].document.body.innerHTML
in mootools, this does not work:
$('buffer').$('body').get('html');
I am trying to build a python script that will take in an XML document and remove all of the comment blocks from it.
I tried something along the lines of:
tree = ElementTree()
tree.parse(file)
commentElements = tree.findall('//comment()')
for element in commentElements:
element.parentNode.remove(element)
Doing this yields a weird error from python: "KeyError: '()'
I know there are ways to easily edit the file using other methods ( like sed ), but I have to do it in a python script.
I've got a document fragment with children that I want to loop over (when possible). This is causing an error "Cannot read property 'xxx' of null".
How do I test if this will be the case?
Recently I saw this document that specify how great is Caliburn(Not really it compares it to the micro framework, and thats enough).
I'm working with Caliburn for more than a year and don't know many things about it.
So maybe someone can explain the following(Some of it I can understand but have no iea about the relation to caliburn):
Validation abstraction
module framework
ExpressionTree-Based runtime delegate generation
ViewModelFactory
ShellFramework
I'm working with V1.1 so if something is new in 2.0, just say it belong to the new version I'll learn it probably in the future.