When a branch is reintegrated to the trunk, is that branch effectively dead? Can you make modifications to the branch after the reintegration and merge those back into the trunk at a later date?
I have a logo link that's using a background-image (css sprite). All works fine, but when I try to add a 20px padding to the top of the link (to give it more space for user to click the link), the background image is not moving down. Here is my css:
a {
background-image:url("sprite.png");
background-repeat:no-repeat;
display:block;
height:70px;
width:70px;
padding-top:20px; /* give top of the link more click space */
}
And my html:
<a href="#" style="background-position:0 0;"></a>
What am I doing wrong?
I have the following piece of code:
root="//valueExpression[matches(self::*,'pattern')]/.."
But I can only use XPath 1.0 and I get an exception for the function matches(). Can you please help me with a solution using only functions from XPath 1.0 ?
I have a php file with an xml header and xml code, named test.php.
How do I load this file as an xml?
The following doesn't work:
$xml = simplexml_load_file('test.php');
echo $xml;
I just get a white page.
The test file is saved as php, as it's dynamic. It's loading data from the tradedoubler api.
The xml looks something like this:
<voucherList>
<voucher>
<id>115</id>
<programId>111</programId>
<programName>Program 111</programName>
<code>AF30C5</code>
<updateDate>1332422674941</updateDate>
<startDate>1332370800000</startDate>
<endDate>1363906800000</endDate>
<title>Voucher number one</title>
<shortDescription>Short description of the voucher.</shortDescription>
<description>This is a long version of the voucher description.</description>
<voucherTypeId>1</voucherTypeId>
<defaultTrackUri>http://clk.tradedoubler.com/click?a(222)p(111)ttid(13)</defaultTrackUri>
<siteSpecific>True</siteSpecific>
</voucher>
<voucher>
<id>116</id>
<programId>111</programId>
<programName>Program 111</programName>
<code>F90Z4F</code>
<updateDate>1332423212631</updateDate>
<startDate>1332370800000</startDate>
<endDate>1363906800000</endDate>
<title>The second voucher</title>
<shortDescription>Short description of the voucher.</shortDescription>
<description>This is a long version of the voucher description.</description>
<voucherTypeId>1</voucherTypeId>
<defaultTrackUri>http://clk.tradedoubler.com/click?a(222)p(111)ttid(13)url(http://www.example.com/product?id=123)</defaultTrackUri>
<siteSpecific>False</siteSpecific>
<landingUrl>http://www.example.com/product?id=123</landingUrl>
</voucher>
</voucherList>
Hi,
My Apache/PHP installation is making me use instead of . Where is this found in the configuration file so that I don't need to do the former? I'm assuming it's in php.ini, but not sure what it would be called.
I'm having a hard time figuring this out. I know pictureBox only lets you display one image a time. I'm trying to create a pictureBox for each image in my collection. For instance if I have ten images in my List, then the method should create ten pictureBox for those respective images so each one is displayes in a pictureBox. I'm not sure which would be better a for loop or a foreach loop instead. every time the loop increments both the varaiables XCoordinate and YCoordinate which are the location of the PictireBox shoulld increase so that the PictureBox won't overlap one another in the Form. The reason for the method is that the number of images in the collection can change everytime the application will run. That's why I'm not creating them manually. So after its done all the pictures in the list should appear in a picture.Box. The box should be all the same size the only difference is the location on the form and the images inside them. Please any help and I will be grateful
I want to do the following:
$a = array();
$a[] = array(1,2);
$a[] = array(2,5);
$a[] = array(3,4);
var_dump (in_array(array(2,5), $a));
this returns OK, as it expected, but if the source array is not fully matched:
$a = array();
$a[] = array(1,2, 'f' => array());
$a[] = array(2,5, 'f' => array());
$a[] = array(3,4, 'f' => array());
var_dump (in_array(array(2,5), $a));
it returns false. Is there a way to do it with the built-in way, or I have to code it?
Does a method which I check for with respondsToSelector have to actually exist?
What if I only define it in the interface part and fail to implement it? I'm looking at a poor-man's virtual function in Objective-C.
I have the following piece of code which helps me to read the paths of all the files in a directory and its subdirectories :
File dir = new File("directory path");
try {
System.out.println("Getting all files in " + dir.getCanonicalPath() + " including those in subdirectories");
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
List<File> files = (List<File>) FileUtils.listFiles(dir, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE);
for (File file : files) {
try {
System.out.println("file: " + file.getCanonicalPath());
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
The problem is that I get a java.lang.NoClassDefFoundError: org/apache/commons/io/filefilter/TrueFileFilter error.
I've imported the necessary libraries. I mention that I work on a plugin project. This code runs in a class with main function. I don't understand why it gave me this error.
Thank you !
I was working on a program today and hit this strange bug. I had a UIButton with an action assigned. The action was something like:
-(void) someaction:(id) e
{
if ([e tag]==SOMETAG)
{
//dostuff
}
}
What confuses me is that when I first wrote it, the if line was
if (e.tag==SOMETAG)
XCode refused to compile it, saying
error: request for member 'tag' in 'e', which is of non-class type 'objc_object*'
but I thought the two were equivalent.
So under what circumstances are they not the same?
I did not forget to add name attributes as is a common problem and yet my serialized form is returning an empty string. What am I doing wrong?
HTML/javascript:
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script>
$( document ).ready( function() {
$('#word_form').submit(function(e) {
e.preventDefault();
console.log($(this).serialize()); //returns an empty string
});
});
</script>
</head>
<body>
<div id="wrapper">
<form name="word_form" id="word_form" method="POST">
<input type="image" name="thumbsUp" id="thumb1" value="1" src="http://upload.wikimedia.org/wikipedia/commons/8/87/Symbol_thumbs_up.svg" style="width:50px;height:50px;">
<input type="image" name="thumbsDown" id="thumb2" value="2" src="http://upload.wikimedia.org/wikipedia/commons/8/84/Symbol_thumbs_down.svg" style="width:50px;height:50px;">
</form>
</div>
</body>
Thanks!
I have an array of addresses that point to integers ( these integers
are sorted in ascending order). They have duplicate values. Ex: 1,
2, 2, 3, 3, 3, 3, 4, 4......
I am trying to get hold of all the values that are greater than a
certain value(key). Currently trying to implement it using binary
search algo -
void *bsearch(
const void *key,
const void *base,
size_t num,
size_t width,
int ( __cdecl *compare ) ( const void *, const void *)
);
I am not able to achieve this completely, but for some of them.
Would there be any other way to get hold of all the values of the
array, with out changing the algorithm I am using?
I am bindind rss items from the net to this page, I cannot Seem to navigate to the link of a selected items hyper link which through binding is string. can anyone help me to navigate to weblink from a listbox item when selected ???
<ListBox Height="712" HorizontalAlignment="Left" Name="listNews" VerticalAlignment="Top" Width="468" SelectionChanged="listNews_SelectionChanged" Margin="0,-22,0,0">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Height="132">
<Image Source="{Binding Avatar}" Height="73" Width="73" VerticalAlignment="Top" Margin="0,7,5,0"/>
<StackPanel Width="370">
<TextBlock Text="{Binding Newstitle}" TextWrapping="Wrap" Foreground="#FFC8AB14" FontSize="28" />
<HyperlinkButton Name="{Binding NewsLink}" Content="{Binding NewsLink}" NavigateUri="{Binding NewsLink}" FontSize="18" ClickMode="Press" Click="Selected" />
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
private void listNews_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.URL = **???????;**
webBrowserTask.Show();
Below is some PHP code that i have written, the problem occurs when it gets to the use of the num_of_rows(), it just does not seem to work and i cant figure out why?
<?php
try
{
$divMon_ID = array();
$divMon_Position = array();
$divMon_Width = array();
$divMon_Div = array();
$db = new PDO('sqlite:db/EVENTS.sqlite');
$result_mon = $db->query('SELECT * FROM Monday');
$totalRows = mysql_num_rows($result_mon);
//for($counter=1; $counter<=10; $counter+=1)
//{
//<div id="event_1" style="position:absolute; left: 0px; top:-39px; width:100px; font-family:Arial, Helvetica, sans-serif; font-size:small; border:2px blue solid; height:93px">
//$divMon_ID[]=$row['Id'];
//$divMon_Position[]=$row['Origin'];
//$divMon_P[]=$row['Position'];
//}
}
catch(PDOException $e)
{
print 'Exception : '.$e->getMessage();
}
?
I know that it is the "$totalRows = mysql_num_rows($result_mon);" statement because when i then comment it out, the page can load.
Am i using the function in the wrong way?
Thanks.
I am attempting to utilize a pointer variable to access elements of a string and there are issues with my code generating a compilation error:
#include <stdio.h>
#define MAX 29
char arrayI[250];
char *ptr;
int main(void)
{
ptr = arrayI;
puts("Enter string to arrayI: up to 29 chars:\n");
fgets(arrayI, MAX, stdin);
printf("\n Now printing array by pointer:\n");
printf("%s", *ptr);
ptr = arrayI[1]; //(I set the pointer to the second array char element)
printf("%c", *ptr); //Here is where I was wanting to use my pointer to
//point to individual array elements.
return 0;
}
My compiler crieth:
[Warning] assignment makes pointer from integer without a cast [enabled by default]
I do not see where my pointer was ever assigned to the integer data type? Could someone please explain why my attempt to implement a pointer variable is failing? Thanks all!
I'm trying to construct a DateTime object with multiple accepted formats.
According to the DateTime::createFromFormat docs, the first parameter (format) must be a string. I was wondering if there was a way to createFromFormats.
In my case, I want the year for my format to be optional:
DateTime::createFromFormat('Y-m-d', $date);
DateTime::createFromFormat('m-d', $date);
so that a user can input just 'm-d' and the year would be assumed 2013. If I wanted multiple accepted formats, would I have to call createFromFormat each time?
Shortest thing for my scenario is:
DateTime::createFromFormat('m-d', $date) ?: DateTime::createFromFormat('Y-m-d', $date);
Originally posted on: http://geekswithblogs.net/TATWORTH/archive/2014/05/21/microsoft-gets-a-first-for-itrsquos-cloud-security.aspxAt http://blogs.technet.com/b/microsoft_blog/archive/2014/04/10/privacy-authorities-across-europe-approve-microsoft-s-cloud-commitments.aspx, the official Microsoft Blog by Brad Smith records that Microsoft now has approval by european data protection authorities that Microsoft’s Cloud Contracts meets EU data protection law.
Drupal is often regarded as one of the most popular Content Management System (CMS) that manages web contents pages, and other online projects such as online publications for writers, graphic designe... [Author: Scheygen Smith - Computers and Internet - March 21, 2010]
The milestone is going to be the web site design as stated above and it involves designing the site pages and the designer here deals mainly with the HTML code because this language is used to build ... [Author: Alan Smith - Web Design and Development - April 02, 2010]
USA : Microsoft appelle le gouvernement à « réduire le déficit de confiance qu'il a créé dans la technologie »
un an après la première révélation de Snowden Cela fait déjà un an qu'Edward Snowden a fait publier sa première révélation sur les exactions de la NSA et ses programmes de surveillance à l'échelle internationale. Pour marquer le coup, Microsoft a entreprit de s'adresser au gouvernement américain par le biais de Brad Smith, son avocat général et accessoirement Vice-Président en charge...
Dartisans Ep. 6 - Meet the community - Dart hangout
In this episode of Dartisans, we are joined by special guests from the Dart community. John Evans, Adam Smith, Chris Buckett, John McCutchan, and Lars Tackmann talk about their Dart libraries, what they like about Dart, and what they want to see in the future. Get started with Dart at www.dartlang.org
From:
GoogleDevelopers
Views:
4
0
ratings
Time:
48:11
More in
Science & Technology
Electronic commerce or e-commerce simply refers to a wide range of online businesses activities for products and services and nowadays E-commerce has entirely overturned the system of communication a... [Author: Alan Smith - Web Design and Development - March 21, 2010]
Knowing the perfect and appropriate strategies are very important in kids piano. Acquiring perfect learning techniques over years of coaching experience is the reason that creates perfect teachers. Y... [Author: Scheygen Smith - Computers and Internet - March 21, 2010]
Planning to get married? If you are ready and prepared to do so, then why not? If you love your partner so much, then why not ask her the golden question? If nothing is holding you back then it is pr... [Author: Scheygen Smith - Computers and Internet - March 21, 2010]
While going for a new one or require performing changes to an existing site then following a good maintenance process is of utmost importance to manage a website in business because an increasing num... [Author: Alan Smith - Web Design and Development - April 02, 2010]