hi, i want only the first word of a variable.. example input:
<?php $myvalue = Test me more; ?>
the output should only "Test", the first word of the input.. how can i do this?
I am having trouble getting fancybox to display its corresponding images on a website that I'm building http://www.nomadicdrift.com/test/kaniwa#events . It's a custom one page portfolio theme that I set up on the WordPress platform.
If you follow the link to the events section you will see 1 figure item in a gallery like position. I have this image set up to work as a fancybox gallery, but when you click on it, it opens up the fancybox interface but does not place a image in the frame, even though it should. So this is the problem...the images do not show up in fancybox and instead I see just the frame.
Here is the html that I'm displaying:
<figure>
<a class="fancybox" data-fancybox-type="Fashion Show de Paris, France" href="http://www.nomadicdrift.com/test/kaniwa/wp-content/uploads/2012/07/NM2.jpg">
<img class="attachment-evento wp-post-image" width="231" height="191" title="NM" alt="NM" src="http://www.nomadicdrift.com/test/kaniwa/wp-content/uploads/2012/07/NM2-231x191.jpg">
</a>
<figcaption>
<a class="fancybox" data-fancybox-type="Fashion Show de Paris, France" href="http://www.nomadicdrift.com/test/kaniwa/wp-content/uploads/2012/07/CEDESAN.jpg"> </a>
<h4>Fashion Show de Paris, France</h4>
</figcaption>
</figure>
I'm not going to bore you with the PHP that I used to get that output because I think the problem lies elsewhere.
***I have tried to set up a simple standard fancybox gallery on the site also, but it gives me thes same problem, leading me to believe that the problem is deeper than the html markup. I have also successfully used this same markup for a one thumbnail fancybox gallery on another site.
I thought maybe it was due to some conflict in the .js files I'm using. I tried uninstalling all of my plugins/addons (which aren't too many) one by one and still had the same result. I have all of my personal javascript in the functions.js file, which is where I call the fancybox plugin using the standard $("a.fancybox").fancybox();.
I have installed this plugin before on other sites and have searched extensively for an answer, so any help is greatly appreciated.
Thanks,
Sean
I am very inexperienced with PHP and I've having trouble calling a mootools function.
Here's my code:
echo '<script language="JavaScript">';
echo "Sexy.error('Test!');";
echo '</script>';
When I try it with a simple alert('test') it works just fine.. I'm confused?!?
I have a text file test.txt with the following content:
text1
text2
And I want to assign the content of the file to a UNIX variable but when I do this:
testvar=$(cat test.txt)
echo $testvar the reult is:
text1 text2
instead of
text1
text2
Can someone suggest me a solution for this?
I have the following code:
$('#change').dialog({
autoOpen: false,
width: 380,
buttons: {
"Close": function() {
$(this).dialog("close");
},
"Accept": function() {
var test = $("#ChangePasswordForm").submit();
alert(test);
}
}
});
In my controller I want to return a string
[AcceptVerbs(HttpVerbs.Post)]
public string ChangePassword(string Name)
{
var msg = "Cool!";
if (name != null)
return msg;
}
How can I do that?
How can I dipslay
Hey all,
I am trying to centre page numbers at the bottom of this test blog...
http://jocelynwarner.com/test/
in the centre between the previous and next buttons however I cannot think how to do it, I tried a few different tutorials but they didn't really seem to help with this.
Any hints on how to make them sit centrally in the left column (the width of the blog content - sidebar) would be greatly appreciated.
I cant seem to send an email using PHP's mail(). I have also tried PHPMailer and Swiftmail with no success. However, the following command on the server delivers mail successfully.
cat test.txt | mail -s "test mail" [email protected]
Is there a way to trace where the problem is coming from? mail() just seems to return true or false.
I am trying to find the difference in time (without days/years/months) of two different days.
Example:
#ruby >1.9
time1 = Time.now - 1.day
time2 = Time.now
#code to make changes
#test:
time1 == time2 # TRUE
My solution:
time1 = time1.strftime("%h:%m").to_time
time2 = time2.strftime("%h:%m").to_time
#test
time1 == time2 #True
#passes
I was wondering if there was a better way of doing this? Maybe we could keep the Date the same as time1/time2?
I want to know if you guys know how to make BDD tests with Robotium.
As I research Robotium works with a different Virtual Machine (Dalvik) so I cannot run as Junit Test (Only with Android Junit Test). So I found a possible solution to run Robotium with Junit with RoboRemote https://github.com/groupon/robo-remote. But when i tried to integrate with cucumber the tests became unstable.
So you guys know some way to make BDD tests using Robotium?
Why does my flex app open a blank page in firefox? Example http://localhost/flexApp/flex_bin/test.html. IE works fine--no blank pop up along with my test page. I'm not asking for one, yet ff feels the need to serve one up. Does anyone know why?
Hi all,
Not a VB6 expert... Trying to come up with a VB6 test app that calls InternetCheckConnection. In my test app, InternetCheckConnection always returns false regardless of the URL I use. I copied and pasted this code from a larger spaghetti-code app, but in the spaghetti-code, InternetCheckConnection seems to work fine, returns true.
Is there some other function I have to call first in order for InternetCheckConnection to work?
array_key_exists is not working for large multidimensional array. For ex
$arr=array( '1'=>10,
'2'=>array('21'=>21,
'22'=>22,
'23'=>array('test'=>100,
'231'=>231),
),
'3'=>30,
'4'=>40
);
array_key_exists('test',$arr) returns 'false' but it works with some simple arrays.
Hi,
My string is
mystring = "<tr><td><span class='para'><b>Total Amount : </b>INR (Indian Rupees)
100.00</span></td></tr>"
My problem here is I have to search and get the total amount
test = re.search("(Indian Rupees)(\d{2})(?:\D|$)", mystring)
but my test give me None.
How can I get the values and values can be 10.00, 100.00, 1000.00
Thanks
The following code resets one selectOneMenu through particular id. How to make it dynamic for more selectOneMenus to reset at the top value.
var test= document.getElementById('form1:text3');
test.options.selectedIndex=0;
This resets to top value of menu, but how to make it dynamic.
ANy help is appreciated.
Hi,
dadasdf\sdasdasd\qazxbbjj\test.txt
Above is the string in cell A1 in excelsheet,I want to extract the last word from that cell.i.e,I want only test.txt,How can I acchive that using excel function.If it is acchived by declaring any variable then also help me out.
Hi all,
I wonder if we can capture that which button is clicked if there are more than one button.
On this example, can we reach //do something1 and //do something2 parts with joinPoints?
public class Test {
public Test() {
JButton j1 = new JButton("button1");
j1.addActionListener(this);
JButton j2 = new JButton("button2");
j2.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
//if the button1 clicked
//do something1
//if the button2 clicked
//do something2
}
}
Is there a way to test the html from the response of:
response = self.client.get('/user/login/')
I want a detailed check like input ids, and other attributes. Also, how about sessions that has been set? is it possible to check their values in the test?
In ruby, how do I test that one array not only has the elements of another array, but contain them in that particular order?
correct_combination = [1, 2, 3, 4, 5]
[1, 5, 8, 2, 3, 4, 5].function_name(correct_combination) # => false
[8, 10, 1, 2, 3, 4, 5, 9].function_name(correct_combination) # => true
I tried using include, but that is used to test whether [1,2,3].include?(2) is true or not.
Datagrid is in content,When trying to access client side function for the cells in the datagrid,its always showing at 0 position
suppose i have 10 rows,for each row "Test button" i should invoke the client side java script.
For each row "Test button" client side script is displaying message at first row only.
I have the follwing:
<% using (Ajax.BeginForm("ChangePassword", new AjaxOptions { OnComplete = "ChangePasswordComplete" }))
{%
<%Html.RenderPartial("ChangePassword"); %
<input type="submit" value="test" />
<%}
%
I want to write it in the following manner:
<form>
<%Html.RenderPartial("ChangePassword"); %>
<input type="submit" value="test" />
</form>
How can I do that? What to write in the form tag
I have a view: User. In that I have an ascx page : Details
I have a view : Test. I want to access the Details from User from test, using render partial. How can I do that?
<%Html.RenderPartial("Details"); %> doesn`t workin this case.
Can i write something like this in WPF(i know that this piece of code is wrong, but need to know if there is kind of this construct):
<TextBlock Height="50" Text="Test: {Binding Path=MODULE_GUID}" />
Or always to add some text to binding value i must do something like this:
<StackPanel Orientation="Horizontal">
<TextBlock Height="50" Text="Test: " />
<TextBlock Height="50" Text="{Binding Path=MODULE_GUID}" />
</StackPanel>
Hi,
I have various objects in application,and each has isvalid method to test if values of all properties are set correctly(as per business rules).Now,to test that for each violation isvalid throws false,i will have to write as many tests as rules being checked in isvalid.Is there a simpler way to do this? I am using MBunit.
I have a CSV file I'm importing but am running into an issue. The data is in the format:
TEST 690, "This is a test 1, 2 and 3" ,$14.95 ,4
I need to be able to explode by the , that are not within the quotes...
Hi ,
How to test procedures with record type parameters.I have a procedure which takes test_ap ,basic and user_name as inputs.where test_ap is of record/row type,basic record array type and user_name charater varying.
I need to test the procedure in pgadmin.
test_client(test_ap test_base, basic test_base_detail[], user_name character varying)
Any suggestions plz.