How could I programmatically install a font on the Mac platform (Snow Leopard)? What steps would I need to follow? I would like for the user to input a font file, then my software installs it.
I'm writing a Win32 application using plain C and WinAPI. No MFC or C++ is allowed. To get the controls to draw using the appropriate style, I use a manifest, as described in the corresponding MSDN article. Everything is fine, and when I change the system style, my application changes style as well. But the font used is just ugly. How do I force the application to use the standard system font?
I am building a web site similar to Craigslist. I would like to know how to store the html formatted text (bold / italics / font size etc) in a sql 2008 database?
In order words, the user would enter their text, format it with font size, bold etc and save the information. Whats the most efficient way to store that in a database?
appendTo() causes flicker when it is inside $.each....
$.each(jsob.Table, function(i, employee) {
$('<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category :</span> <span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis :</span> <span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary :</span> <span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address :</span> <span class="resultfieldvalues">' + employee.Address + '</span></div>').appendTo('#ResultsDiv');
});
Right now i am appending every new div to #ResultsDiv inside$.each is it good/bad to do so... If it is bad
What can be done to make my divs appendTo() after the loop so that i it wont flicker....
EDIT:(based on answer)
var divs = '';
$.each(jsob.Table, function(i, employee) {
divs += '<div class="resultsdiv"><br /><span class="resultName">' + employee.Emp_Name + '</span><span class="resultfields" style="padding-left:100px;">Category :</span> <span class="resultfieldvalues">' + employee.Desig_Name + '</span><br /><br /><span id="SalaryBasis" class="resultfields">Salary Basis :</span> <span class="resultfieldvalues">' + employee.SalaryBasis + '</span><span class="resultfields" style="padding-left:25px;">Salary :</span> <span class="resultfieldvalues">' + employee.FixedSalary + '</span><span style="font-size:110%;font-weight:bolder;padding-left:25px;">Address :</span> <span class="resultfieldvalues">' + employee.Address + '</span></div>';
});
$("#ResultsDiv").append(divs);
But that too doesn't stop the flicker...
I am working on an application and have a screen that needs to have elements (namely some custom JButtons) appear and disappear based on a user selection. However for some reason, when I add these buttons to their pane, the buttton image goes to the top corner, and leaves the text in the center, completely ignoring GridBagConstraints. I am completely stumped on this one as I have done this same exact thing dozens of times earlier in the program without any issues. Here is an image of the problem:
The problem is in this method here, and occurs down towards the bottom.
public void init(){
contentPane.removeAll();
// Setup jlabels
JLabel countyLabel = new JLabel("County");
countyLabel.setFont(new Font("Times New Roman", Font.PLAIN, 18));
JLabel measureByLabel = new JLabel("Measure By: ");
measureByLabel.setFont(new Font("Times New Roman", Font.PLAIN, 18));
String[] countyChoices = {"Washtenaw", "Oakland", "Livingston"};
// setup components
JComboBox<String> countyCombo = new JComboBox<String>(countyChoices);
// place baseComponents
c.weightx = 0.5;
c.weighty = 0.5;
c.gridx = 0;
c.gridy = 0;
c.anchor = GridBagConstraints.NORTH;
contentPane.add(countyLabel, c);
c.gridx = 2;
contentPane.add(countyCombo, c);
c.gridy = 1;
c.gridx = 0;
contentPane.add(trenchButton, c);
c.gridx = 2;
contentPane.add(bedButton, c);
c.gridy = 2;
c.gridx = 1;
contentPane.add(systemSelection, c);
c.gridy = 3;
c.gridx = 0;
contentPane.add(lengthButton, c);
c.fill = GridBagConstraints.BOTH;
c.gridwidth = 4;
c.gridy = 4;
c.gridx = 0;
contentPane.add(choicePane, c);
GridBagConstraints con = new GridBagConstraints();
con.weightx = 0.5;
con.weighty = 0.5;
con.gridx = 0;
con.gridy = 0;
choicePane.add(lengthButton, c);
// revalidate and repaint
choicePane.revalidate();
choicePane.repaint();
contentPane.revalidate();
contentPane.repaint();
}
I have tried doing this in separate methods, the button looks fine when added to the contentPane, the pane is for sure set to gridbagconstraints as I used the expression
JPanel choicePane = new JPanel(new GridBagLayout())
to initialize it.
in my projects i use em for sizing of font only with body {62.5%}?
with this method i can easily calculate em value.
so what are pros and cons if i use em sizing unit for width, height, padding, margin, line-height also along with font for fixed width layouts?
I'm using FOP to generate PDF reports.
The problem is I need the DIN-Regular font instead of the default Times New Roman.
Can anybody tall me how to change the font?
I'm using fop-0.94.boc.02 version. Thanks
How can I force a winforms app to use the fonts/fontsizes I specify on every machine?
I have a c# app where the font seem to change in size on a different machine, and it's not a resolution thig. This is on windows 7 with a c# app. Is there a way to force the font size I want or do the user os fonts always overrule?
I recently came across a webpage using the font "ff-tisa-web-pro-1" (specified in their css file).
How does that work? I definitely don't have this font on my computer, yet it was displayed.
Hey,
Im having an issue defining the hit area for a javascript sliding element.
See example:
http://www.warface.co.uk/clients/warface.co.uk/
Please slide over the grey box on the right side to reveal the button, although this works I would only like for the slider to only be triggered by rolling over the red block.
CSS
.slidingtwitter { /* -- This is the hit area -- */
background: #ccc;
width:255px;
height:55px;
overflow: hidden;
top:50%;
right: 0px; /* -- This is the sliding start point -- */
position: fixed;
font-family: Gotham, Sans-Serif;
z-index: 50;
}
.slidingtwitter.right {
right:0px;
}
.slidingtwitter .caption { /* -- This is the sliding area -- */
background: #fff;
position: absolute;
width:260px;
height:55px;
right: -205px; /* -- This is the sliding start point -- */
}
.slidingtwitter a {
color: #484848;
font-size: 20px;
text-transform: uppercase;
}
.slidingtwitter a:hover {
color: black;
}
.slidingtwitter .smaller {
font-size: 12px;
font-family: Gotham Medium;
}
.twitterblock {
background: #f35555 url("styles/images/button_twitter.png") no-repeat 14px 15px ;
width:35px;
height:35px;
padding:10px;
float:left;
display:block;
}
.slidingtwitter .followme {
background: url("styles/images/button_arrowheadthin.jpg")no-repeat right 0;
height:35px;
display:block;
float:left;
line-height:14px;
width:140px;
margin:10px 0px 0px 14px;
padding-top:6px;
padding-right: 40px;
}
JS
$('.slidingtwitter').hover(function(){
$(".slide", this).stop().animate({right:'0px'},{queue:false,duration:400}); //Position on rollover
},function() {
$(".slide", this).stop().animate({right:'-205px'},{queue:false,duration:400}); //Position on rollout
});
Any suggestions would be much appreciated.
Using PHP: How can I create an image to display an email address (to help reduce spam)?
Meaning, if I want to display "[email protected]" on my web page, since crawlers can easily find that text - I want to display the email address as an image that says "[email protected]".
How do I do that? I want the font to be:
color: #20c
font: 11px normal tahoma
This command add the text "flower" to the image:
convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg
I'm using ImageMagick 2.2.0. I'm running it from PHP using:
system('convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg');
but I'm not getting the result
I have table like below in the html file:
<table border="1">
<tr>
<td>BuyQuantity</td><td>SellQuantity</td>
</tr>
<tr>
<td>15D</td><td> <span style="font-family: "Arial Unicode MS";"><o:p></o:p></span></p></td>
</tr>
<tr>
<td> <span style="font-family: "Arial Unicode MS";"><o:p></o:p></span></td><td>38D</td>
</tr>
<tr>
<td> <span style="font-family: "Arial Unicode MS";"><o:p></o:p></span></td><td>99D</td>
</tr>
<tr>
<td>38D</td><td> <span style="font-family: "Arial Unicode MS";"><o:p></o:p></span></td>
</tr>
</table>
There are two columns: buy-quantity and sell-quantity.(It is only example but in each html file there is different content in the table.) Now with the content of these two columns I want to decide there is items bought or items sold.Like in the first row there is 15d buy-qauntity then items were bought and in the second row there is 38d sell-qauntity then items were sold and so on. And after deciding there is items-bought or items-sold I want to build one column named buy/sell for this table like below:
![alt text][1]
[1]: http://C:\Documents and Settings\Administrator\My Documents\My Pictures\untitled.png
How can I do this ?
I got a dillema, I'm trying to find a solution for my code. How do I make it so that when the user inputs a given quantity in the text box from the index.php it will transfer that input quantity to the invoice.php. I've tried doing the post method but it seems like it's not working :/ As always, any help or suggestions will be greatly appreciated! I hope it's something simple:( Here's my code:
index.php
<html>
<style>
body{
background-image: url('URL HERE');
font-family: "Helvetica";
font-size:15px;
}
h1{
color:black;
text-align:center;
}
p{
font-size:15px;
}
</style>
<h1>
STORE TITLE HERE
</h1>
<body>
<form action="login.php" method="post">
<?php
//Include products info.inc (Which holds all our product arrays and info)
//Credit: Tracy & Mark (THank you!)
include 'products_info.inc';
/*The following code centers my table on the page, makes the table background white,
makes the table 50% of the browser window, gives it a border of 1 px,
gives a padding of 2 px between the cell border and content, and gives 1 px of spacing between cells.
*/
echo "<table align=center bgcolor='FFFFFF' width=50% border=1 cellpadding=1
cellspacing=2>";
//Credit: Tracy & Mark (THank you!)
echo '<th>Product</th> <th>Description</th> <th>Price</th> <th>Quantity</th>';
//The following code loops through the whole table body and then prints each row.
for($i=0; $i<count($allfood); $i++)
{
//Credit: Tracy & Mark (THank you!)
echo "<tr align=center>";
echo "<td>{$allfood[$i]['Product']}</td>";
echo "<td>{$allfood[$i]['Description']}</td>";
echo "<td>{$allfood[$i]['Price']}</td>";
echo "<td>{$allfood[$i]['Quantity']}</td>";
echo "</tr>";
}
//This code ends the table.
echo "</table>";
echo "<br>";
?>
<br><center><input type='submit' name='purchase' value='Purchase'></center>
</form>
</body>
</html>
And here's my invoice.php
<html>
<style>
body{
background-image: url('URL HERE');
font-family: "Helvetica";
font-size:15px;
}
h1{
color:black;
text-align:center;
}
p{
font-size:15px;
}
</style>
<h1>
Invoice
</h1>
</html>
<?php
//Include products info.inc (Which holds all our product arrays and info)
//Credit: Tracy & Mark (Thank you!)
include 'products_info.inc';
//Display the invoice & 'WELCOME USER. THANK YOU FOR USING THIS DAMN THING msg'
/*The following code centers my invoice table on the page, makes the table background white,
makes the table 50% of the browser window, gives it a border of 1 px,
gives a padding of 2 px between the cell border and content, and gives 1 px of spacing between cells.
*/
echo "<table align=center bgcolor='FFFFFF' width=50% border=1 cellpadding=1cellspacing=2>";
echo "<tr>";
echo "<td align=center><b>Product</b></td>";
echo "<td align=center><b>Quantity</b></td>";
echo "<td align=center><b>Price</></td>";
echo "<td align=center><b>Extended Price</b></td>";
echo "</tr>";
for($i=0; $i<count($allfood); $i++)
{
//Credit: Tracy & Mark (Thank you!)
$qty= @$_POST['Quantity']['$i'];
// This calculates the price if the user orders more than 1 item.
$extendedprice = $qty*$allfood[$i]['Price'];
echo "<tr>";
echo "<td align=center>{$allfood[$i]['Product']}</td>";
echo "<td align=center>$extendedprice</td>";
echo "<td align=center>{$allfood[$i]['Price']}</td>";
echo "</tr>";
}
// The goal here was to make it so that if the user selected a certain quantity from index.php, it would carry over and display on the invoice.php
if ($qty = 0)
{
echo "please choose 1";
}
elseif ($qty > 0)
{
echo $qty;
}
/*echo "<tr>";
echo "<td align=center>Subtotal</b></td>";
echo "<td align=center></td>";
echo "<td align=center></td>";
echo "<tr>";
echo "<td align=center>Tax at 5.75%</td>";
echo "<td align=center></td>";
echo "<td align=center></td>";
echo "<tr>";
echo "<td align=center><b>Grand total</b></td>";
echo "<td align=center></td>";
echo "<td align=center></td>";
*/
echo "</table>";
?>
<br>
<center>
<form action="index.php" method="post">
<input type="submit" name="home" value="Back to homepage">
</form>
</center>
So I just got a C# program from someone that compiles and gives me a
fully functional application. However, when I want to see the .cs{Design] file it gives me the following error:
.ErrorStyle { font-family: tahoma; font-size: 11 pt;
....
How can I convert this to an actual Design file? I am working on Visual Studio C#. Thank you very much.
I've created a simple menu and submenu with tags(not allowed to use ul elements). To access the submenu the user hovers their mouse over the menu item. I use the onmouseover and onmouseout events to either show or hide the sub menu depending on which item is selected.
A pipe (|) is used to seperate each submenu item and this is what is causing me problems.
When a user hovers their mouse above the pipe character the subMenu div calls the onmouseout event which is not what I want. So I added padding around the pipe character and a minus margin so that there were no gaps between the pipe character and the other elements.
This worked for all browsers including IE8. But in IE7 (I haven't tested IE6 yet) the submenu div calls the onmouseout event when I touch the top bit of either the left or right border of the pipe character span element.
<div id="subMenu" onmouseout="hideSubMenu()" >
<div id="opinionSubMenu" onmouseover="showOpinionSubMenu()">
<a id="Blogs" href="HTMLNew.htm">BLOGS</a>
<span class="SubMenuDelimiter">|</span>
<a id="Comments" href="HTMLNew.htm">COMMENTS</a>
<span class="SubMenuDelimiter">|</span>
<a id="Views" href="HTMLNew.htm">VIEWS</a>
</div>
<div id="learningSubMenu" onmouseover="showLearningSubMenu()">
<a id="Articles" href="HTMLNew.htm">ARTICLES</a>
<span class="SubMenuDelimiter">|</span>
<a id="CoursesCases" href="HTMLNew.htm">COURSES & CASES</a>
<span class="SubMenuDelimiter">|</span>
<a id="PracticeImpact" href="HTMLNew.htm">PRACTICE IMPACT</a>
</div>
</div>
This is my css class
#subMenu{
padding:10px 0px;
background-color:#F58F2D;
font-weight:normal;
text-decoration:none;
font-family:Lucida Sans Unicode;
font-size:14px;
float:left;
width:100%;
display:none;}
#Blogs, #Comments, #Views, #Articles
{
padding:10px 5px;
background:none repeat scroll 0 0 transparent;
color:#000000;
font-weight:normal;
text-decoration:none;
border:solid 1px black;}
#Blogs:hover, #Comments:hover, #Views:hover, #Articles:hover{
color:#ffffff;
text-decoration:none;}
.SubMenuDelimiter{
padding:10px 5px;
margin:10px -5px;}
Why border of tfoot tr:first-child not showing in IE. I'm checking in IE7.
font-weight:bold; background:yellow is showing in IE but border not
table {
border-collapse: collapse;
border-spacing: 0;
}
table tfoot tr:first-child
{font-weight:bold;
background:yellow;
border-top:2px solid red;
border-bottom:2px solid red;}
Hello guys Sorry for my stupid question regarding to my yesterday question its not solved
yet even the advice you have given but still not working. i have removed all of spaces but
still showing the problem for me. it's working perfect in localhost but not in CPANEL.
Here is the errors which give:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/scalepro/public_html/Admin Panel/Remote Employee/main.php:1) in /home/scalepro/public_html/Admin Panel/Remote Employee/main.php on line 1
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/scalepro/public_html/Admin Panel/Remote Employee/main.php:1) in /home/scalepro/public_html/Admin Panel/Remote Employee/main.php on line 1
Warning: Cannot modify header information - headers already sent by (output started at /home/scalepro/public_html/Admin Panel/Remote Employee/main.php:1) in /home/scalepro/public_html/Admin Panel/Remote Employee/main.php on line 13
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
ANY ONE PLEASE ???
Here is my code:
<?php session_start();
require_once('../../Admin Panel/db.php');
if(isset($_POST['email']) && !empty($_POST['email']) && isset($_POST['password']) && !empty($_POST['password']))
{
$email = $_POST['email'];
$password = $_POST['password'];
$query="SELECT RemoteEmployeeFullName, RemoteEmployeeEmail, RemoteEmployeePassword FROM remoteemployees WHERE RemoteEmployeeEmail='".$email."' AND RemoteEmployeePassword='".$password."'";
$queryrun=$connection->query($query);
if($queryrun->num_rows > 0)
{
$_SESSION['email']=$RemoteEmployeeFullName;
header("Location: /home/scalepro/public_html/Admin Panel/Remote Employee/REPLists.php");
}
else
{
echo 'Email: <b>'.$email. '</b> or Password <b>'. $password.'</b> Is Not Typed Correctly Try Again Please!.';
header( "refresh:5;url= /home/scalepro/public_html/spd/myaccount.php" );
}
}
else
{
header( "refresh:5;url= /home/scalepro/public_html/spd/myaccount.php" );
}
?>
if the condition gets true this will be redirected to a page by the name of REPLists.php
here is the page.
<?php session_start();
require_once('../../Admin Panel/db.php');
?>
<html>
<head>
<style>
.wrapper
{
width:1250px;
height:auto;
border:solid 1px #000;
margin:0 auto;
padding:5px;
border-radius:5px;
-webkit-border-radius:5px;
-moz-border-radius:5px;
-ms-border-radius:5px;
}
.wrapper .header
{
width:1250px;
height:20px;
border-bottom:solid 1px #f0eeee;
margin:auto 0;
margin-bottom:12px;
}
.wrapper .header div
{
text-decoration:none;
color:#F60;
}
.wrapper .header div a
{
text-decoration:none;
color:#F60;
}
.wrapper .Labelcon
{
width:1250px;
height:29px;
border-bottom:solid 1px #ccc;
}
.wrapper .Labelcon .Label
{
width:125px;
height:20px;
float:left;
text-align:center;
border-left:1px solid #f0eeee;
font:Verdana, Geneva, sans-serif;
font-size:14.3px;
font-weight:bold;
}
.wrapper .Valuecon
{
width:1250px;
height:29px;
border-bottom:solid 1px #ccc;
color:#F60;
text-decoration:none;
}
.wrapper .Valuecon .Value
{
width:125px;
height:20px;
float:left;
text-align:center;
border-left:1px solid #f0eeee;
font-size:14px;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="header">
<div style="float:left;"><font color="#000000">Email:
</font>
<?php
if(isset($_SESSION['email']))
{
echo $_SESSION['email'];
}
?>
</div>
<div style="float:right;"> <a href="#">My Profile</a> | <a href="logout.php">Logout</a></div>
</div>
<div class="Labelcon">
<div class="Label">Property ID</div>
<div class="Label">Property Type</div>
<div class="Label">Property Deal Type</div>
<div class="Label">Property Owner</div>
<div class="Label">Proposted Price</div>
</div>
<?php
if(!isset($_SESSION['email']))
{
header('Location:../../spd/myaccount.php');
}
else
{
$query = "SELECT
properties.PropertyID,
properties.PropertyType,
properties.PropertyDealType,
properties.Status,
properties.PropostedPrice,
remoteemployees.RemoteEmployeeFullName,
propertyowners.PropertyOwnerName,
propertydealers.PropertyDealerName
FROM remoteemployees,
propertyowners,
propertydealers,
properties
WHERE
properties.PropertyOwnerID=propertyowners.PropertyOwnerID
AND properties.PropertyDealerID=propertydealers.PropertyDealerID
AND remoteemployees.RemoteEmployeeID=properties.RemoteEmployeeID
ORDER BY properties.PropertyID
";
$query_run = $connection->query($query);
if( $connection->error ) exit( $connection->error );
while($row=$query_run->fetch_assoc())
{
?>
<div class="Valuecon">
<div class="Value"><?php echo $row['PropertyID'] ?></div>
<div class="Value"><?php echo $row['PropertyType'] ?></div>
<div class="Value"><?php echo $row['PropertyDealType']?></div>
<div class="Value"><?php echo $row['PropertyOwnerName'] ?></div>
<div class="Value"><?php echo $row['PropostedPrice'];?></div>
</div>
<?php } }?>
</div>
</body>
</html>
Hi all ,
In the properties windows , we come across buttons in a table cell < as in font property's row , a button can be clicked on to set font properties . Is there a way to insert a button in a Jtable 's second column < which i've created using netbeans .. how to do that , if it is possible ?
Simple question - how is text-zooming implemented on an Android/iPhone device? Do they pre-compute frequently used bitmaps of a font and replace the text as the scale changes? Or do they extract the contours from the font files and render the text as vector graphics?
Is using css .class in place of #id always a better idea to get rid of style overriding problems and iimportant?
#content ul li a {font-size:10px}
#content .demo ul li a {font-size:15px}
I cannot find how to a text field group, similar to what is in the Address Book app:
Can someone tell me what I am doing wrong? I can't find an option to make them look this way.
Also, does anyone know the font, font size and color?