can I define border width. like
.box{
width:200px;
height:150px;
border-bottom:1px solid #000;
}
box width is 200px but i want border width in bottom only 100px.
My code is below:
var statement = "test_oracle.sql";
F = aqFile.OpenTextFile(statement, aqFile.faRead, aqFile.ctANSI);
F.Cursor = 0;
while(! F.IsEndOfFile()){
s = F.ReadLine();
oResult = Project.Variables.oConnection.Execute_(s);
CheckResult(oResult, "Unable to run SQL script to add documents");
The first line that "s" reads is: set serverout on size 10000
An error is returned as "ORA-00922: missing or invalid option"
Can anyone provide guidance?
I want to build my queries dynamically and use the following snippet:
--snip--
module.exports = {
get : function(req, res, next) {
var queryStr = "req.database.table('locations').get(parseInt(req.params.id))";
if (req.params.id) {
if (req.fields) {
queryStr += '.pick(' + req.fieldsStr + ')';
}
console.log(queryStr);
eval(queryStr).run(function(result) {
console.log(result);
res.send(result);
});
} else if (!req.params.id) {
--snip--
However introducing eval opens up my code to injection (req.fields is filled with url parameters) and I see the response time of my app increase from 7 to 11ms
Is there a smarter way to accomplish what I did here?
Please advice.
I have a page with several galleries including accordions and sliders. The problem is that the page takes forever to load. Is there a way of wrapping an image in a bit of code or applying a class to it to force it to load only after everything else is loaded?
I am working on Ruby on Rails application, with Prototype.
I want to display a loading div automatically with every ajax request and hide it on completion, without writing code for every ajax request in my application.
Is there anyway to do this.
<div id="loader">Loading...</div>
function doIt(param) {
var localVar = param;
//do lots of stuff with localVar
}
function doIt(param) {
//do lots of stuff with param
}
Is there any difference in terms of efficiency between the code above?
Not sure if this is against stackoverflow rules as it's not a specific code question but I really need a little help.
I want to know if it is possible to create a search feature (search box) on an HTML webpage that will query a database and return the results?
Basically I have a database of products and their related categories. A user would come to the website, enter the category in the search field...somehow query the database and return the results on a new page.
Note: the results page doesn't have to be HTML (could be PHP etc).
If you could also include a little guidance on how (please nothing detailed, just need a direction).
Thank you!
In general, should one design in order to place processing load on client-side?
More specifically, a search engine to locate subscriber information requires a fair amount of parsing (multiple phone numbers to sort and format, hour of day, timezone, comparisons for possible substitutions of user information, etc.).
Again, in general, is it preferred that one have client-side do the work?
It seems to me 'yes' in a situation in which one will have many thousands of hits per minute.
Use php for quick database queries ... process retrieved data client-side.
yes ... no?
Anyone help? When I run this I get " invalid quantifier ?<=href= "
var aHrefMatch = new RegExp("(?<=href\=")[^]+?(?=")");
var matchedLink = mystring.match(aHrefMatch);
But I know the regular expression is valid.
Any ideas?
By default it's like this:
$.fn.ellipsis = function() {
...
return this.each(function(){
//do some operation on each element here to see if it qualifies
}
}
But now I want to return a subset of all, only those qualify in this.each(function() {}),
how to modify the code so that it finally returns only those that qualify?
I need to populate the first box with the items from a db table. Users would choose from the first box, and either drag value(items) to the second for selection, or would select items, and then click a button to move them over to the 2nd box. After that I need to update the db with the selected values/items.
When I am trying to access Topspeed.com, my internet explorer shows the page just fine, but if I try firefox then I end up on the apache 2 test page... any idea why ?
I am facing an issue in my application user directly clicked on browser close [X] button. Browser can be IE, Chrome, Mozilla, Firefox and many more.
What I want to do :
1. as soon as User hits [X] button of browser, need to set there status as logged off in database for which we have a method in Login.aspx file which is within the masterpage.
2. We do not have any Logoff feature in the application
I will be thanlful if anyone suggest a solution to call the method which sets the user status as logged off from master page.
Thanks in advance.
{"paging": {"pageNum":2,"action":"Next","type":"","availableCacheName":"getAllFunds","selectedCacheName":"","showFrom":101,"showTo":200,"totalRec":289,"pageSize":100},
"Data":[{"sourceCodeId":0,"radio_fund":"individua
l","availableFunds":[],"fundId":288,"searchName":[],"fundName":"Asian Equity Fund A Class Income","srcFundGrpId":"PGI","firstElement":0,"las
tElement":0,"totalElements":0,"pageList":[],"standardExtract":true}]
I have json file with above format with two fileds,one paging and one is Data array.
I able to retrieve values of paging,but i am not able to retrieve the values of data array with .each function of jquery.
Any suggestions or inputs really appreciated.
Is there a way in IE Browsers to access the Flash object? In this case it is made with mootools swiff. It´s working fine in all other browsers, because they can wrap this object correctly. But it does not work in IE.
Here is the script:
var swfObj = $('mbImage').getElement('object');
swfObj.get('data'); <--- Thats not working in IE
I'm looking for a jQuery function or plugin that serializes form inputs to an object using the naming convention for deep-serialization supported by param() in jQuery 1.4:
<form>
<input name="a[b]" value="1"/>
<input name="a[c]" value="2"/>
<input name="d[]" value="3"/>
<input name="d[]" value="4"/>
<input name="d[2][e]" value="5"/>
</form>
$('form').serializeObject(); // { a: { b:1,c:2 }, d: [3,4,{ e:5 }] }
Prototype's Form.serialize method can do exactly this. What's the jQuery equivalent? I found this plugin but it doesn't follow this naming convention.
I have a stack of <div> elements that show a name. I'd like to include a + link off to the side that, when clicked, expands the <div> and adds more detailed information (from a RoR controller).
After poking around on the net, I found link_to_remote and related RoR stuff, but I can't seem to get the right combination to work together. Can someone point me to a tutorial or show what the controller and view interaction should look like?
Thanks!
I have the following code for writing draw calls to a "back buffer" canvas, then placing those in a main canvas using drawImage. This is for optimization purposes and to ensure all images get placed in sequence.
Before placing the buffer canvas on top of the main one, I'm using fillRect to create a dark-blue background on the main canvas.
However, the blue background is rendering after the sprites. This is unexpected, as I am making its fillRect call first.
Here is my code:
render: function() {
this.buffer.clearRect(0,0,this.w,this.h);
this.context.fillStyle = "#000044";
this.context.fillRect(0,0,this.w,this.h);
for (var i in this.renderQueue) {
for (var ii = 0; ii < this.renderQueue[i].length; ii++) {
sprite = this.renderQueue[i][ii];
// Draw it!
this.buffer.fillStyle = "green";
this.buffer.fillRect(sprite.x, sprite.y, sprite.w, sprite.h);
}
}
this.context.drawImage(this.bufferCanvas,0,0);
}
This also happens when I use fillRect on the buffer canvas, instead of the main one.
Changing the globalCompositeOperation between 'source-over' and 'destination-over' (for both contexts) does nothing to change this.
Paradoxically, if I instead place the blue fillRect inside the nested for loops with the other draw calls, it works as expected...
Thanks in advance!
i want move up the object, delay 1000ms , then hide it,
i get the code:
$("#test").animate({"top":"-=80px"},1500)
.animate({"top":"-=0px"},1000)
.animate({"opacity":"0"},500);
i use ".animate({"top":"-=0px"},1000)" to implement delay, it's not good.
i want:
$("#test").animate({"top":"-=80px"},1500)
.sleep(1000)
.animate({"opacity":"0"},500);
any idea? thanks! :)
Hello,
I am trying to get the Treemap plugin (http://www.jquery.info/spip.php?article40) working with jQuery v1.3.x. The plugin works with jQuery v1.1 and v1.2 but for some reason it fails with the v1.3 base.
This is the browser error "Error: uncaught exception: Syntax error, unrecognized expression: "
Does anyone know changes occurred between JQuery v1.2 and v1.3 that could cause this?
Cheers,
D