I have a jQuery script that adds a new field to a form, and this field contains dynamic information from an array. The problem is that I can't figure out how to add an array.each to populate the options of the select field within the javascript without breaking the HAML indentation and causing errors.
Here is my best attempt that does not work:
…
I have attempted to email the author of this package without success,
just wondering if anybody else has experienced this.
I am having an using rpart on 4000 rows of data with 13 attributes.
I can run the same test on 300 rows of the same data with no issue.
When I run on 4000 rows, Rgui.exe runs consistently at 50% cpu and the
UI hangs.... it…
Two quick questions (I hope...) with the following code. The script below checks if a number is prime, and if not, returns all the factors for that number, otherwise it just returns that the number prime. Pay no attention to the zs. stuff in the script, for that is client specific and has no bearing on script functionality.
The script…
I have an array:
myarr = [];
I'm filling it with some values:
myarray['name'] = "Me!";
Now I want to transform that array into a set of Key = Value pairs. I though jQuery would do it automatically, but it doesn't seem to.
$.ajax
({
type: "POST",
dataType: "text",
url: "myurl",
data: myarr
});
Is there a way to do…
I have a property group, like so:
<PropertyGroup>
<Platform>Win32;x64</Platform>
</PropertyGroup>
And I want to batch in an Exec task, like so:
<Exec Command='devenv MySolution.sln /Build "Release|%(Platform)"' />
But of course, as written I get an error:
error MSB4095: The item metadata…
I am writing HTML to an ASP.NET page (from a web service response), and the HTML has tags. Unfortunately, because the ASP.NET page already has a wrapped around it, a lot of the buttons on the page break. Does anyone know how I can nest the form inside the ASP.NET page without breaking the top-level form?
Note: the HTML I am…
I'm looking for a nice tutorial or framework for developing Python written web applications.
I've done lots in PHP, but very little in Python or Ruby and figured I'd start with the first one alphabetically.
I have an ASP.NET page with a jQuery dialog that is displayed to change some data. I am setting up the jQuery dialog so that when the user clicks the OK button it calls ASP.NET's
Page_ClientValidate('validationGroup') via javascript, finds all the invalid controls and changes their CSS class. So here's the scenario: the user…
Within my Website project, I have some aspx pages, javascript files, and a custom C# class I called MyCustomReport. I placed a Image box with an ID of Image1 inside SelectionReport.aspx. I need to get access to that Image1 inside MyCustomReport.cs so I can turn it on and off based on conditions. What code do I need to do…
I have a stored procedure that retrieves SQL queries as text and executes the statements using sp_executesql. Each of the dynamic queries is a count query in that it only returns the number of records found (select COUNT(id) from...). I am looping through a set of SQL queries stored as text and building a table variable out…
I have a WCF service that is causing a bit of a headache. I have tracing enabled, I have an object with a data contract being built and passed in, but I am seeing this error in the log:
<TraceData>
<DataItem>
<TraceRecord…
I am attempting to use Android XML-RPC and for some calls I get the following exception:
W/System.err( 837): java.io.IOException: Cannot serialize java.lang.Object@43759748
It looks like it is having troubles serializing the returned data, but I cannot find much…
This error just started happening this morning in one particular project. When I try to publish the site it gives me this error and I can't complete the publish! Sometimes restarting Visual Studio magically fixes the problem, but it will just appear again later. …
I understand that placement new calls are usually matched with explicit calls to the destructor. My question is: if I have no need for a destructor (no code to put there, and no member variables that have destructors) can I safely skip the explicit destructor…
I am having a problem where my button click event is still firing even though my custom server-side validation is set to args.IsValid = false. I am debugging through the code and the validation is definitely being fired before the button click, and…
I'm aware of os.listdir, but as far as I can gather, that gets all the filenames in a directory into memory, and then returns the list. What I want, is a way to yield a filename, work on it, and then yield the next one, without reading them all…
If I would like to have several static methods in my models so I can say User::get_registered_users() and have it do something like
public static function get_registered_users()
{
$sql = "SELECT * FROM `users` WHERE `is_registered` = 0";
…
There was a debate today among some of my colleagues and I wanted to clarify it. It is about the evaluation order and the sequence point in an expression. It is clearly stated in the standard that C/C++ does not have a left-to-right evaluation…
I have a rails app up on heroku. Sometimes the server bombs out and I have to go to the console and execute heroku restart so that servers get restarted. This seems to fix the problem.
However, I am not on my machine all the time. I would…
I've just set our development Django site to use redis for a cache backend and it was all working fine. I brought down redis to see what would happen, and sure enough Django 404's due to cache backend behaviour. Either the Connection was…
Basically I want a confirmation box to pop up when they click the button asking if they sure they want to restart, if yes, then it destroys session and takes them to the first page. Heres what i got...
echo "<form id=\"form\"…
What is the best SQL query to remove any text within parenthesis in a mySQL database? I'd like something that works regardless of the position of the parenthesis in the text (beginning, middle, end, whatever). I don't care…
I need some help finding the error in my javascript calculation.
I need to calculate the sum of my input boxes automatically and have my user be able to edit the calculation using + or - buttons.
The code I have already…