I am creating some JSON on the fly, serializing it and saving it to the DB.
To run it, i create a script element, and load it that way.
Is there a way to load the script source to a textarea?
Hello,
I've 3 columns that I'd like to sort in the Excel way, i.e. sorting the first column, and for each element sorted in the first column, I'll sort the second column, and so on. Let's say I first sort alphabeticaly Countries, then for each country, I sort alphabeticaly cities. How do I do it using Linq2Sql?
Thanks for helping
Hi!
I want to add some style to head tag in html page using javascript.
var h = document.getElementsByTagName('head').item(0);
h.innerHTML += '<style>a{font-size:100px;}</style>';
But when I run this code in IE8 I see this error message:
Could not set the innerHTML property. Invalid target element for this operation.
Any ideas?
Is it possible to control the placement of a generated control in asp .net 2.0 (c#)?
So for example in my page_load I create a new Panel() and then do Form.Controls.Add(pnl). However I'm finding it renders right at the end of the form.
I would like it rendering as the first element in the form.
I'm trying to make a page scroll down 150px from the current position when an element is clicked. So lets say you're roughly halfway scrolled down a page. You click this link, and it will slide you down an additional 150 pixels.
Is this possible with jQuery?
I've been looking at scrollTop and the scrollTo plugin, but I can't seem to connect the dots.
Is it bad to be semantic purist all
the time, at work? is it not achievable all
the time ?
when i saw code of any other
person/interviewee. I know selection
of element for a purpose is most
important thing.
what i should judge person ability
from his code; from a good written,
managed, optimized css or how he
wrote class and id names?
Or both every time.
When I use the annotation:
@XmlRootElement(name="RootElement", namespace="namespace")
class RootElement {
to create xml file from java, it creates the root element as:
<ns2:RootElement xmlns:ns2="namespace">
but I wanted to create without the "ns2", like:
<RootElement xmlns="namespace">
Any idea how to fix it?
Reletad link (example I used to create the xml):
http://www.java2s.com/Code/JavaAPI/javax.xml.bind.annotation/XmlRootElementname.htm
I recently read that using flexible array members in C was poor software engineering practice. However, that statement was not backed by any argument. Is this an accepted fact?
(Flexible array members are a C feature introduced in C99 whereby one can declare the last element to be an array of unspecified size. For example: )
struct header {
size_t len;
unsigned char data[];
};
In one of my HTML page dynamically loading some file field while clicking a button like follows
$('#add').click(function(){
$('#files').append('<input type="file" class="myfile" name="myfile" />');
});
My question is how to "bind" newly added element to HTML page so that I can access like
$('.myfile').change(function(){
// Code Here
});
I am asking this because
$('.myfile').live('change',function(){
// Code here
});
not working in all browsers , expecially IE
Please help thanks
I need to walk a link list in the kernel debugger. How can I determine the head pointer and walk the list?
I have a listing and can find the address and location in the code where I check to see if I have a head, so I know the specific code location and address. But not sure how to determine the pointer or how to determine the next element and pointer on the list.
I know I can do an out of band Post request with Jquery and the $.post( syntax. However, I'm interested to know if it is possible for jquery to cause a post request on the whole page (as when a form is submitted) so that a brand new page is loaded. Is this possible?
Thanks
There is no form element in the DOM, so I can't do form.submit().
I'm writing a script to rewrite Reddit's RSS feeds. The script needs to find a URL named [link] inside a block of HTML that contains other URLs. The HTML is contained in an XML element called <description>.
Here are two examples of the <description> element from I need to parse and the [link] I would need to get.
First example:
<description>submitted by <a href="http://www.reddit.com/user/wildlyinaccurate"> wildlyinaccurate </a> <br/> <a href="http://wildlyinaccurate.com/a-hackers-guide-to-git">[link]</a> <a href="http://www.reddit.com/r/programming/comments/26jvl7/a_hackers_guide_to_git/">[66 comments]</a></description>
The [link] is: http://wildlyinaccurate.com/a-hackers-guide-to-git
Second example:
<description><!-- SC_OFF --><div class="md"><p>I work a support role at a company where I primarily fix issues our customers our experiencing with our software, which is a browser based application written primarily in javascript. I&#39;ve been doing this for 2 years, but I want to take it to the next level (with the long term goal being that I become proficient enough to call myself a developer). I&#39;ve been reading &quot;Javascript The Definitive Guide&quot; by O&#39;Reilly but I was wondering if any of you more experienced users out there had some tips on taking it to the next level. Should I start incorporating some PHP and Jquery into my learning? Side projects on my spare time? Any good online resources? Etc. </p> <p>Thanks! </p> </div><!-- SC_ON --> submitted by <a href="http://www.reddit.com/user/56killa"> 56killa </a> <br/> <a href="http://www.reddit.com/r/javascript/comments/26nduc/i_want_to_become_more_experienced_with_javascript/">[link]</a> <a href="http://www.reddit.com/r/javascript/comments/26nduc/i_want_to_become_more_experienced_with_javascript/">[4 comments]</a></description>
The [link] is: http://www.reddit.com/r/javascript/comments/26nduc/i_want_to_become_more_experienced_with_javascript/
I need to check if an element is x pixels from the bottom of the page, to dynamically load new content. currently, scrollTop and height do not match even if the bar is on the bottom.
jquery is allowed, although basic javascript would be more helpful.
Hi
I have a comma separated string. I split that string and assigned it to elements var.
How can I loop that elements var?
$(document).ready(function(){
var element = $('#imageIds').val().split(",");
// how to loop this elements using jquery
});
When using .hide(), the element is no more participating in the layout of the page.
But what if I want to keep its place, i.e I don't want other elements to move because this one is hidden now.
How could I do this ?
I'm wondering if it is possible to rerender just one element in a listview? I assume by calling notifyDatasetChanged() is gonna rerender the whole list?
Thanks,
I'd like to know if there is a way to dynamically modify/access the data contained in html images just as if they were an html5 canvas element. With canvas, you can in javascript access the raw pixel data with getImageData() and putImageData(), but I have thus far been not able to figure out how to do this with images.
I'm not entirely sure what I'm doing wrong, and I can't figure out how to Google it because a common mistake is very prevalent. I have the parent's height explicitly set, but I can't get #main-sub-content 's height to 100%.
Here's the page:
http://coloryourspot.vadremix.com/
And the corresponding CSS:
http://coloryourspot.vadremix.com/styles/primary/main.css
Can anyone spot the issue?
Solved: The problem was the parent element had height:auto!important;
I created a high memory utilization dump and using !dumpheap -stat and !dumpheap -mt I got the address of two large string generic list of 30 MB each.
I want to know more about these lists. What they contain or which piece of code is using them.
Is there a way to find them out?
0:000 !do 2b370038
Name: System.Object[]
MethodTable: 71e240bc
EEClass: 71c0da54
Size: 33554448(0x2000010) bytes
Array: Rank 1, Number of elements 8388608, Type CLASS
Element Type: System.Collections.Generic.List`1[[System.String, mscorlib]]
Fields:
None
When I learned Java, I was told that the arraylist works this way:
It creates an array with room for 10 elements.
When the 11th element is added, it is created a new list with room for 20 elements, and the 10 elements are copied into the new array. This will repeat as until there are no more elements to add, or to a maximum size.
Is the List in .NET constructed the same way?
I would like to make sure if a textbox has any content at all, that jQuery can show it's parent (an <li class="hidden_dedication") element and set add a class of 'shown'. I'm pretty sure that it should be something like this, but cannot get it to work:
if ($('li.hidden_dedication input').val() !== null) {
$(this).parent().show().addClass('shown');
}
I cannot figure it out.. any ideas?
Many thanks
I tried to program a little Application
in C++, but i just keep getting Compile Error like this
(GGC)
initializer element is not a constant
Here's the Code:
http://bit.ly/aHH81e
lg
After a bunch of animating, adding classes and setting css styles. is there an easy way to reset an element to be back in its original server delivered state?