I have made one project as a Static library and i want to use that library in another project as a Framework of other so how can i use it as a framework.
I'd like to addClass "green" to the 5th li.hr in every ul containers in my site.
$("ul li.hr").each(function() {
if ($(this).length = 5) {
$(this).addClass("green");
}
});
PS: if its possible with CSS only, tell me how please.
Note that the ul has mixed elements, like:
<li class="a">foo</li>
<li class="b">foo</li>
<li class="hr">foo</li>
<li class="c">foo</li>
<li class="a">foo</li>
<li class="hr">foo</li>
I need the 5th li.hr.
I have a main server with windows server 2008 with active directory installed. Additionally, I have created the hyper-v virtual server with MOSS 2007 installed with dynamic ip address. I can access the sharepoint site as an intranet.
How can I assign the access of all the active directory users and their profile to MOSS without adding them up manually ?
If I am missing any information to provide please mention.
I am having issues adding an image across a view while moving finger across the screen.
Currently it is adding the image multiple times but squeezing them too close together and not really following my touch.
Here is what I am trying:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch * touch = [touches anyObject];
touchPoint = [touch locationInView:imageView];
if (touchPoint.x > 0 && touchPoint.y > 0) {
_aImageView = [[UIImageView alloc] initWithImage:aImage];
_aImageView.multipleTouchEnabled = YES;
_aImageView.userInteractionEnabled = YES;
[_aImageView setFrame:CGRectMake(touchPoint.x, touchPoint.y, 80.0, 80.0)];
[imageView addSubview:_aImageView];
[_aImageView release];
}
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[self touchesBegan:touches withEvent:event];
}
Any suggestions is much appreciated.
EDIT:
What I want:
After taking or choosing an image, the user can then select another image from a list. I want the user to touch and move their finger across the view and the selected image will appear where they drag their finger, without overlapping, in each location.
I started getting into reading design blogs a little while ago, and it seemed that @font-face got really popular sometime late last year, or something like that, because I was under the impression that it was a new emerging feature of the web. But then I saw that Internet Explorer has had it since IE4 (with some conversion).
So is it common to see @font-face online nowadays? Sould I have anything in mind with respect to accessibility, legality, or rendering before I do something like this? I saw that Hulu.com renders fonts with Canvas and a javascript called "cufon."
Hi,
I'm a matlab newbie and i'm in trouble for a very silly (i guess) question.
Well, i have a variable a = 1.
I want to generate a variable name like :
variable1
How can i do that?
Thanx for any answer!
I have an XML based file format that I'm using to store and load instances of objects. I'm interested in adding some scripting support to those objects so that they can respond to events.
That said, I also don't want to cripple performance. Are there any well known scripting options for Android - maybe even ones where while loading, I can pre-compile and cache the scripts?
So I have searched for this but not finding anything about it and if I missed it sorry about that. What I am trying to do is see how to go about adding some code to my iphone app that will connect to a php script (if connection available) and update a counter so that I can let my clients know that their app is constantly being used? Also, would apple allow that? Or would my app be denied for doing such a thing? Any help would be great! Thanks in advance.
I searched the Web and could not find anything that would show me a good solid example. My question is basically this:
How do I convert this:
SELECT * FROM table WHERE ((a = 1 AND b = 2) OR (c = 3 OR c = 4)) AND d = 5;
To Zend syntax similar to this:
$this
-select()
-from($this-_schema.'.'.$this-_name)
-where('a = ?', '1');
So how can it be done?
Thank a lot in advance.
Hello everybody,
I'm working on a modal window, and I want to make the function as reusable as possible. Said that, I want to set a few anchor tags with a class equals to "modal", and when a particular anchor tag is clicked, get its Id and pass it to a function that will execute another function based on the Id that was passed.
This is what I have so far:
// this gets an array with all the elements that have a class equals to "modal"
var anchorTrigger = document.getElementsByClassName('modal');
Then I tried to set the addEventListener for each item in the array by doing this:
var anchorTotal = anchorTrigger.length;
for(var i = 0; i < anchorTotal ; i++){
anchorTrigger.addEventListener('click', fireModal, false);
}
and then run the last function "fireModal" that will open the modal, like so:
function fireModal(){
//some more code here ...
}
My problem is that in the "for" loop, I get an error saying that anchorTrigger.addEvent ... is not a function.
I can tell that the error might be related to the fact that I'm trying to set up the "addEventListener" to an array as oppose to individual elements, but I don't know what I'm supposed to do.
Any help would be greatly appreciated.
Suppose, I write
class A { };
compiler should provide (as and when needed)
a constructor
a destructor
a copy constructor
= operator
Is this all what the compiler provides? Are there any additions or deletions to this list?
I want to define a method that take an integer as input and creates dynamically a list of all descending integer numbers to zero. I find trouble into calling method for the n-1 element
Hi,
I have a teacher model which has_many students. When I render a student (as json) I want to strip out the teacher_id property and replace it with the name of the teacher in my representation.
What is the best way to achieve this?
Cheers,
Chris
I have the calendar.ics file. I have to read that file from my application and transfer the data in to Google calendar in android. I am new to android. I need some help to do this.Can anyone help me to do this?
Firstly I used this call jQuery('#grid').jqGrid('editRow',id,true,pickdates);, it worked fine with UI Datepicker integration, but editRow is implemented for inline editing, but I prefer modal dialog, so I switched to editGridRow, now I can't find the way to call my custom function (pickdates) in onClick-event. My current call is jQuery('#grid').jqGrid('editGridRow',id,{closeOnEscape:true,width:400,savekey:[true,13]});
Thanks
Anatoliy
Hello :)
I need to test a piece of code which only seems to fail on Windows XP RTM. Unfortunately, all my disks came slipstreamed with SP2 on-disk. Is there any way to install an RTM install using my SP2 CD and key?
Billy3
PS: Not sure if this belongs on SU or not -- please vote it over there if you think so.
I seem to be missing something obvious here, but cannot see what it is. My problem is that the closing form tag for BeginForm is not being added to my markup. I am looping through a collection and creating a form for each item, but the forms arent closing properly. Any suggestions please?
Thanks
<% foreach (var item in Model) { %>
<% using (Html.BeginForm("EditUser","Users"))
{ %>
<tr>
<td>
<input id="contactID" type="hidden" value="<%= item.ContactID %>" />
<%=item.Email %>
</td>
<td>
<%=item.Market.MarketName%>
</td>
<td>
<%=item.ContactType.ContactTypeName%>
</td>
<td>
<input type="submit" value="Edit" />
</td>
</tr>
<%} %>
<% } %>
I have a simple table of two rows. The first column is required, but the others are not; however, I would like them to be required in pairs. So if the user enters a value for Quantity3, then Size3 should also now be required.
As a fiddle: http://jsfiddle.net/NaRts/7/
<tr>
<td><input name="qty1[492]" class="qty required" type="text"></td>
<td><input name="qty2[492]" class="qty" type="text"></td>
<td><input name="qty3[492]" class="qty" type="text"></td>
</tr><tr>
<td><input name="size1[492]" type="text" class="size required" ></td>
<td><input name="size2[492]" type="text" class="size" ></td>
<td><input name="size3[492]" type="text" class="size" ></td>
</tr>
And the simple jQuery I have is:
$('.qty').keyup(function() {
var s = $(this).attr('name'); // = qty3[418]
var qtyID = s.replace(/[^1-9\[\]]/g, ""); // = 3[418]
var SizeID = "size" + qtyID;
var $sizeInput = $(this).closest('tr').next().find(SizeID);
$sizeInput.css('background-color', 'green');
$sizeInput.addClass('required');
//I tried this too but it didn't work
//$(this).parent().find(SizeID).addClass('required');
});?
?
Any help is much appreciated.
I found at this Adobe tutorial a nice "RemoteService" class that creates a RemoteObject and contains the functions for handling the result and fault events. If I wanted to use this approach, how could I pass the data from the result handler to interfaces that modules from the main application could use?
I could put the RemoteService/RemoteObject in the modules, but (in my opinion- and I could be wrong) the best design seems to be using the remote calls in the main app and passing the data along to the modules.
What's the difference between these two constructors in perl?
1) sub new {
my $class = shift;
my $self = {};
$self->{firstName} = undef;
$self->{lastName} = undef;
$self->{PEERS} = [];
bless ($self, $class);
return $self;
}
2) sub new {
my $class = shift;
my $self = {
_firstName => shift,
_lastName => shift,
_ssn => shift,
};
bless $self, $class;
return $self;
}
I am using the second one so far, but I need to implement the PEERS array in the second one? How do I do it with the second constructor and how can we use get and set methods on those array variables?