Umbraco - Edit a custiom data type
I want to modify an existing custom data type in Umbraco. I tried to look
for an option but somehow I can't see the Edit option in context. Does
anyone have an idea about this ?
Your help is much appreciated.
Thanks!!!!
Monday, 19 August 2013
create lable image with php ans png
create lable image with php ans png
hello i need a script that shows af followering:
******************** ||||||BARCODE-1||||||
******************[ ][ NAME]
********LOGO******[170.50 kr. ]
********************
******************** ||||||||BARCODE-2||||||||
and this is the request for the script:
pic.php?info=BARCODE-1;170.50;BARCODE-1;NAME
BARCODE-1 can look like this = '1017035931'
BARCODE-2 can look like this = '5703302094214'
NAME can look like this = 'Fuga afbr. 2 polet HV'
Background = 'Black'
LOGO = 'Fill out the Left side'
170.50 kr. = 'Align Left' & 'Rotate 21 CW'
NAME = 'Align Right'
BARCODE-1 = 'White border' & 'height 100'
BARCODE-2 = 'White border' & 'height 50'
full size = '101x310'
the Whole lable must be rotated 90 CW
This what i got four now:
<?php
$exp = 'http://www.line-web.dk/als-el_vvs/service/images/logo90x270.png';
$barcode =
'http://line-web.dk/als-el_vvs/service/papir/barcodegen/html/image.php?filetype=PNG&dpi=72&scale=1&rotation=0&font_family=Arial.ttf&font_size=8&text='
. $_REQUEST['id'] . '&thickness=30&start=NULL&code=BCGcode128';
header ('Content-Type: image/png');
$im = imagecreatetruecolor(101, 310) or die('Cannot Initialize new GD
image stream');
// Barcode
$x = 60;
$y = 150;
$degrees = 270;
$per = imagecreate(302,7);
list($width, $height) = getimagesize($barcode);
$border_h = $height + 5;
$border_w = $width + 5;
$image = imagecreatefrompng($barcode);
$rotate = imagerotate($image, $degrees, 0);
imagerectangle($per, 0, 0, 301, 6, $border);
imagecopyresampled($im, $rotate, $x, $y, 0, 0, $height, 150, $height,
$width);
// EXP
$x = 1;
$y = $height + 5;
list($height, $width) = getimagesize($exp);
$image = imagecreatefrompng($exp);
$rotate = imagerotate($image, $degrees, 0);
imagecopyresampled($im, $rotate, $x, $y, 0, 0, $width, $height, $width,
$height);
imagepng($im);
imagedestroy($im);
?>
hope someone can help me make it fit. i an trying to create some kind of
Price lable.
hello i need a script that shows af followering:
******************** ||||||BARCODE-1||||||
******************[ ][ NAME]
********LOGO******[170.50 kr. ]
********************
******************** ||||||||BARCODE-2||||||||
and this is the request for the script:
pic.php?info=BARCODE-1;170.50;BARCODE-1;NAME
BARCODE-1 can look like this = '1017035931'
BARCODE-2 can look like this = '5703302094214'
NAME can look like this = 'Fuga afbr. 2 polet HV'
Background = 'Black'
LOGO = 'Fill out the Left side'
170.50 kr. = 'Align Left' & 'Rotate 21 CW'
NAME = 'Align Right'
BARCODE-1 = 'White border' & 'height 100'
BARCODE-2 = 'White border' & 'height 50'
full size = '101x310'
the Whole lable must be rotated 90 CW
This what i got four now:
<?php
$exp = 'http://www.line-web.dk/als-el_vvs/service/images/logo90x270.png';
$barcode =
'http://line-web.dk/als-el_vvs/service/papir/barcodegen/html/image.php?filetype=PNG&dpi=72&scale=1&rotation=0&font_family=Arial.ttf&font_size=8&text='
. $_REQUEST['id'] . '&thickness=30&start=NULL&code=BCGcode128';
header ('Content-Type: image/png');
$im = imagecreatetruecolor(101, 310) or die('Cannot Initialize new GD
image stream');
// Barcode
$x = 60;
$y = 150;
$degrees = 270;
$per = imagecreate(302,7);
list($width, $height) = getimagesize($barcode);
$border_h = $height + 5;
$border_w = $width + 5;
$image = imagecreatefrompng($barcode);
$rotate = imagerotate($image, $degrees, 0);
imagerectangle($per, 0, 0, 301, 6, $border);
imagecopyresampled($im, $rotate, $x, $y, 0, 0, $height, 150, $height,
$width);
// EXP
$x = 1;
$y = $height + 5;
list($height, $width) = getimagesize($exp);
$image = imagecreatefrompng($exp);
$rotate = imagerotate($image, $degrees, 0);
imagecopyresampled($im, $rotate, $x, $y, 0, 0, $width, $height, $width,
$height);
imagepng($im);
imagedestroy($im);
?>
hope someone can help me make it fit. i an trying to create some kind of
Price lable.
How to access data in an object in C#
How to access data in an object in C#
I want to pass the data in a datagridview to another form to do some
processing ... I have tried getting that object into the new form by
passing it as a parameter but after that I don't know how to access the
data inside that object . I want to access the data column wise as they
were inside the datagridview . If somebody can help me with this it would
be great .
I want to pass the data in a datagridview to another form to do some
processing ... I have tried getting that object into the new form by
passing it as a parameter but after that I don't know how to access the
data inside that object . I want to access the data column wise as they
were inside the datagridview . If somebody can help me with this it would
be great .
Sunday, 18 August 2013
Show / Hide nested div jquery html
Show / Hide nested div jquery html
Ok so I'm trying to build a nav using a unordered list that shows a div
when on li hover. I'm working within the wordpress loop so this is my
HTML:
<div class="menu-header-container">
<ul>
<li>
<?php
$args = array(
'post_type' => 'menu',
'post_status' => 'publish',
'posts_per_page' => 10,
'offset' => 0,
'order' => 'ASC'
);
$the_query = new WP_Query( $args ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<a href="#"><?php the_title(); ?></a>
<div class="overlay">
<p><?php the_field('sub_menu_item_one'); ?></p>
</div>
This parts seems to be working fine. This is my jquery:
<script>
$(".menu-header-container li").hover(function(){
$(this).find(".overlay").stop().fadeIn();
},function(){
$(this).find(".overlay").stop().fadeOut();
});
</script>
This is my CSS
.menu-header-container{
overflow: visible;
float: right;
width: 74%;
margin-top: 4%;
}
.menu-header-container li{
position: relative;
display: block;
height: 100%;
}
.menu-header-container ul li a{
float: right;
padding-left: 5%;
font-size: 1.3125em;
font-family: 'MuseoSans300';
text-transform: capitalize;
display: block;
}
.overlay{
display:none;
}
li > .overlay {
position: absolute;
top: 100%;
left: 25%;
overflow: visible;
}
So when I hover over one of the line items it shows everything in all the
nested divs, I think its a jquery issue I'm having but it may be
wordpress.
Ok so I'm trying to build a nav using a unordered list that shows a div
when on li hover. I'm working within the wordpress loop so this is my
HTML:
<div class="menu-header-container">
<ul>
<li>
<?php
$args = array(
'post_type' => 'menu',
'post_status' => 'publish',
'posts_per_page' => 10,
'offset' => 0,
'order' => 'ASC'
);
$the_query = new WP_Query( $args ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<a href="#"><?php the_title(); ?></a>
<div class="overlay">
<p><?php the_field('sub_menu_item_one'); ?></p>
</div>
This parts seems to be working fine. This is my jquery:
<script>
$(".menu-header-container li").hover(function(){
$(this).find(".overlay").stop().fadeIn();
},function(){
$(this).find(".overlay").stop().fadeOut();
});
</script>
This is my CSS
.menu-header-container{
overflow: visible;
float: right;
width: 74%;
margin-top: 4%;
}
.menu-header-container li{
position: relative;
display: block;
height: 100%;
}
.menu-header-container ul li a{
float: right;
padding-left: 5%;
font-size: 1.3125em;
font-family: 'MuseoSans300';
text-transform: capitalize;
display: block;
}
.overlay{
display:none;
}
li > .overlay {
position: absolute;
top: 100%;
left: 25%;
overflow: visible;
}
So when I hover over one of the line items it shows everything in all the
nested divs, I think its a jquery issue I'm having but it may be
wordpress.
Using json encode
Using json encode
I am trying to use json encode for the first time and need some insight to
what I am doing wrong.
It should look like this:-
{ teams : [ ["2147483647", "9"],["2147483647", "6"],["2147483647",
"4"],["11", "2147483647"],["5", "2147483647"],["12", "8"],["10",
"3"],["2147483647", "7"], ], results : [ [ [[0, 1],[0, 1],[0, 1],[1,
0],[1, 0],[0, 0],[0, 0],[0, 1],], [[0, 0],[0, 0],[0, 0],[0, 0],], [[0,
0],[0, 0],], [[0, 0],[0, 0]] ] ] }
But the data being returned looks like this:-
{"teams":[["2147483647","10","5","12","11","2147483647","2147483647","2147483647"],["7","3","2147483647","8","2147483647","4","6","9"]],"results":[["0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0"]]}
Code:
public function getAutoCompleteData($tournID,$db) {
$max = $this -> max($tournID);
$one = $this -> tourn_info("1on1",$tournID);
$total_matches = $max;
$after_matches = $max / 2;
$matches = $db->query($this -> select("*", "matches",
"leagueID='{$tournID}' AND league='tourn'"));
while($row = $db->fetchAssoc($matches)) {
$clan1 = $this -> getname($row['clan1'], $tournID,
"tourn", $ac = NULL, 1 ,1, $wc2 = 0);
$clan2 = $this -> getname($row['clan2'], $tournID,
"tourn", $ac = NULL, 1 ,1, $wc2 = 1);
if($row['matchno'] <= $after_matches) {
$clan_one[] = $row['clan1'];
$clan_two[] = $row['clan2'];
$score_one[]= $row['score1'];
$score_two[]= $row['score2'];
}
}
$data = array(
'teams' => array($clan_one,$clan_two),
'results' => array($score_one,$score_two),
);
return $data;
}
Where it shows teams, it should close the bracket "]" every two teams?
Hope someone can help,
thank you!
I am trying to use json encode for the first time and need some insight to
what I am doing wrong.
It should look like this:-
{ teams : [ ["2147483647", "9"],["2147483647", "6"],["2147483647",
"4"],["11", "2147483647"],["5", "2147483647"],["12", "8"],["10",
"3"],["2147483647", "7"], ], results : [ [ [[0, 1],[0, 1],[0, 1],[1,
0],[1, 0],[0, 0],[0, 0],[0, 1],], [[0, 0],[0, 0],[0, 0],[0, 0],], [[0,
0],[0, 0],], [[0, 0],[0, 0]] ] ] }
But the data being returned looks like this:-
{"teams":[["2147483647","10","5","12","11","2147483647","2147483647","2147483647"],["7","3","2147483647","8","2147483647","4","6","9"]],"results":[["0","0","0","0","0","0","0","0"],["0","0","0","0","0","0","0","0"]]}
Code:
public function getAutoCompleteData($tournID,$db) {
$max = $this -> max($tournID);
$one = $this -> tourn_info("1on1",$tournID);
$total_matches = $max;
$after_matches = $max / 2;
$matches = $db->query($this -> select("*", "matches",
"leagueID='{$tournID}' AND league='tourn'"));
while($row = $db->fetchAssoc($matches)) {
$clan1 = $this -> getname($row['clan1'], $tournID,
"tourn", $ac = NULL, 1 ,1, $wc2 = 0);
$clan2 = $this -> getname($row['clan2'], $tournID,
"tourn", $ac = NULL, 1 ,1, $wc2 = 1);
if($row['matchno'] <= $after_matches) {
$clan_one[] = $row['clan1'];
$clan_two[] = $row['clan2'];
$score_one[]= $row['score1'];
$score_two[]= $row['score2'];
}
}
$data = array(
'teams' => array($clan_one,$clan_two),
'results' => array($score_one,$score_two),
);
return $data;
}
Where it shows teams, it should close the bracket "]" every two teams?
Hope someone can help,
thank you!
Is it possible to do TabBarViewConreoller's animation for chaning views?
Is it possible to do TabBarViewConreoller's animation for chaning views?
I need to do animation of transition of uiviews, when user change tab bar
item. Is it possible?
I need to do animation of transition of uiviews, when user change tab bar
item. Is it possible?
Python Linux Joystick support?
Python Linux Joystick support?
How can I use an analog joystick in Python on Linux? I come from a C++
background, where I used joystick.h to read events from /dev/input/js[x].
Is there a python wrapper around this I can use, perhaps? I don't really
want to have to use a huge library like pyGame.
How can I use an analog joystick in Python on Linux? I come from a C++
background, where I used joystick.h to read events from /dev/input/js[x].
Is there a python wrapper around this I can use, perhaps? I don't really
want to have to use a huge library like pyGame.
Subscribe to:
Posts (Atom)