I would like to find some help building a tree interface in Rails. I've tried using jsTree but am having trouble integrating it properly into Rails.
Thanks.
I got assigned the task to list the activities a Java Developer should be able to perform and create an estimate about the time it would take.
I've came up with the following:
Create JDBC CRUD backend ( S=1d, M=5d, H=10d )
Create JSP/Servlet frontend for a CRUD app ( S=1d, M=10d, H=20d )
Create Swing desktop frontend ( S=1d, M=15d, H=30d)…
This problem is easy fixed clientside. But for performance I want to do it directly to the database.
LIST a
+------+-------+-------+
| name | score | cre |
+------+-------+-------+
| Abe | 3 | 1 |
| Zoe | 5 | 2 |
| Mye | 1 | 3 |
| Joe | 3 | 4 |
Want to retrieve a joined hybrid result…
def mailTo(subject,msg,folks)
begin
Net::SMTP.start('localhost', 25) do |smtp|
smtp.send_message "MIME-Version: 1.0\nContent-type: text/html\nSubject: #{subject}\n#{msg}\n#{DateTime.now}\n", 'person@domain.com', folks
end
rescue => e
puts "Emailing Sending Error - #{e}"
end
end
when the HTML is VERY large I get this…
Hopefully that title makes sense...
Let's say I have an employee table:
ID | Name | Title | Salary
----------------------------
1 | Bob | Manager | 15285
2 | Joe | Worker | 10250
3 | Al | Worker | 11050
4 | Paul | Manager | 16025
5 | John | Worker | 10450
What I'd like to do is write a query that will give me the…
hi, can any body help me on separating this example of data that i need to parse and seperate text just like PHPDoc. It is PHP source code.
The example string :
function one_to_tree() {
//bla bla bla
return FALSE;
}
function two_to_tree() {
//bla bla bla
return FALSE;
}
function…
This works fine:
fit.mc1 <-MCMCglmm(bull~1,random=~school,data=dt1,family="categorical",
prior=list(R=list(V=1, fix=1), G=list(G1=list(V=1, nu=0))), slice=T)
So does this:
fit.glmer <- glmer(bull~(1|school),data=dt1,family=binomial)
But now I am trying to work with the package glmmadmb and this does not…
I'm looking for a thin, generic layer (probably written in PHP) that sits between a database (probably MySQL) and web service clients (which could be anything). I imagine there would be config files of some sort that tell it how to map web service requests to database queries (or other DB commands). It would also…
I'm localizing an iPhone app for the first time. I've put all my strings into a Localizable.strings file, accessing them via NSLocalizedString from within my code. Works fine.
Next, I have a file called info.html that contains the flesh of a UIWebView that I use as an About box. I've put it in the language folders…
Hi all
I have this regex pattern
<(\d+)>(\d+\.\d+|\d{4}\-\d+\-\d+\s+\d{2}:\d{2}:\d{2})(?:\..*?)*\s+(ALER|NOTI)
and this is my input (will not matched at all)
<150>2010-12-29 18:11:30.883 -0700 192.168.2.145 80 192.168.2.87 2795 "-" "-" GET HTTP 192.168.2.145 HTTP/1.1 200 36200 0 1038 544…
I've been reading about overloading true and false in C#, and I think I understand the basic difference between this and defining a bool operator. The example I see around is something like:
public static bool operator true(Foo foo) {
return (foo.PropA > 0);
}
public static bool operator false(Foo…
The other day at work I came across a handy little block of SQL code from Jeremiah Clark's blog. It's pretty simple logic but through the mind of a C# developer making some quick DB updates, seems to me that it's more likely to end up writing out the code in Solution 1 instead of Solution 2 below to…
This seems like an easy enough issue but I can't seem to find the keywords to effect my searches.
I'm trying to unit test by mocking out all objects within this method call. I am able to do so to all of my own creations except for this one:
public void MyFunc(MyVarClass myVar)
{
Image picture;…
I'm trying to calculate a ts_rank for a full-text match where some of the terms in the query may not be in the ts_vector against which it is being matched. I would like the rank to be higher in a match where more words match. Seems pretty simple?
Because not all of the terms have to match, I have…
I have this PHP/SQL query:
$sql = sprintf("SELECT * FROM %sCubeCart_filemanager WHERE filepath REGEXP '%s[\\/\\\\][^\\/\\\\]+$' AND type = '%d' AND disabled = '0' ORDER BY filepath ASC %s", $this->_config['dbprefix'], str_replace(array('\\','/'),'.',$folder), $type, $limit);
if '$folder' ==…
I'm getting an exception with a message of "Access Denied" when executing against a WMI request. Some WMI requests appear to require higher security privileges than others. Ultimately my goal is to monitor process launches within the system and log. Regardless if there is a better approach,…
I have a few .Net projects that would benefit from using a document/object database opposed to a relational one. I think that db4o would be a good choice, but the $1200 commercial price tag is bit too much for us. I'd love to use MongoDb but it's design isn't for small scale, single server…
I am trying to get a feel for the difference between the various classes of machine-learning algorithms.
I understand that the implementations of evolutionary algorithms are quite different from the implementations of neural networks.
However, they both seem to be geared at determining…
I have just rolled a custom configuration section, created an accompanying schema document for Intellisense and added it to the Web.config's Schemas property as per Michael Stum's answer to another similar question.
Unfortunately, and possibly due to me creating the XSD by hand with…
I am using an ASP.NET 4.0 Menu control with RenderingMode=List and am struggling with creating the appropriate CSS. Each menu item is represented by an <li tag that contains a nested <a tag with what appear to be fixed class names:
<a class="level1" for unselected level 1…
I'm attempting to draw a background to a chart. If I try to call
canvas.beginFill(0xff0000,1)
canvas.drawEllipse(10,200,300,-30);
canvas.endFill()
And -30 is outside the range of the chart, it won't draw anything. I want it to draw an ellipse that is cut off by the edge of the…
For Example in shell script :
_CLASSPATH =.
for jar in lib/*.jar
do
_CLASSPATH=${_CLASSPATH}:${jar}
done
how to build dynamically a Java classpath in Perl ?
Everybody knows the standard procedure to keep your app alive, after the user pressed the lock button (silent sound).
If I start a sound with AVAudioPlayer (before the iphone is locked), the sound plays till it's end (after locking). The app is still running. If I try to start…
I'm trying to figure out a way to store files in a database. I know it's recommended to store files on the file system rather than the database, but the job I'm working on would highly prefer using the database to store these images (files).
There are also some constraints.…
I wrote a first sample Hello World Program for BB in eclipse using the plugin and everything worked fine. But then I wrote another app, not much different from the first and I went to deploy it and the simulator opened but only the first application was there. I tried…