I want to create a XML file in csharp like the below format pls help me with the code
<MasterEntries>
<fruit>Apple</fruit>
<animal>Fox</animal>
<color>Violet</color>
</MasterEntries>
Hi
I have a code in windows application now i am trying to implement in web
Application but it is showimg that it ths no cursor class
(System.Windows.Forms.Cursor )so..wat is the equivalent in web application.
Here is my code
private void btnGo_Click(System.Object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
Application.DoEvents();
// Load the images.
Bitmap bm1 = (Bitmap) (Image.FromFile(txtFile1.Text));
Bitmap bm2 = (Bitmap) (Image.FromFile(txtFile2.Text));
// Make a difference image.
int wid = Math.Min(bm1.Width, bm2.Width);
int hgt = Math.Min(bm1.Height, bm2.Height);
Bitmap bm3 = new Bitmap(wid, hgt);
// Create the difference image.
bool are_identical = true;
int r1;
int g1;
int b1;
int r2;
int g2;
int b2;
int r3;
int g3;
int b3;
Color eq_color = Color.White;
Color ne_color = Color.Transparent;
for (int x = 0; x <= wid - 1; x++)
{
for (int y = 0; y <= hgt - 1; y++)
{
if (bm1.GetPixel(x, y).Equals(bm2.GetPixel(x, y)))
{
bm3.SetPixel(x, y, eq_color);
}
else
{
bm1.SetPixel(x, y, ne_color);
are_identical = false;
}
}
}
// Display the result.
picResult.Image = bm1;
Bitmap Logo = new Bitmap(picResult.Image);
Logo.MakeTransparent(Logo.GetPixel(1, 1));
picResult.Image = (Image)Logo;
this.Cursor = Cursors.Default;
if ((bm1.Width != bm2.Width) || (bm1.Height != bm2.Height))
{
are_identical = false;
}
if (are_identical)
{
MessageBox.Show("The images are identical");
}
else
{
MessageBox.Show("The images are different");
}
//bm1.Dispose()
// bm2.Dispose()
}
I have a dense set of points in the plane. I want them colored so that points that are close to each other have the same color, and a different color if they're far away. For simplicity assume that there are, say, 5 different colors to choose from. Turns out I've not the slightest idea how to do that ..
I'm using Tkinter with Python, by the way
For example I want to store this in an ivar:
CGFloat color[4] = {red, green, blue, 1.0f};
so I would put this in my header?
CGFloat color[];
?
How would I assign values to that guy later? I mean I can't change it, right?
Basically I have an image loaded, and when I click a portion of the image, a rectangle (with no fill) shows up. If I click another part of the image again, that rectangle will show up once more. With each click, the same rectangle should appear.
So far I have this code, now I don't know how to make the image appear. My image from my file directory. I have already made the code to get the image from my file directory.
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class MP2 extends JPanel implements MouseListener{
JFrame frame;
JPanel panel;
int x = 0;
int y = 0;
String input;
public MP2(){
}
public static void main(String[] args){
JFrame frame = new JFrame();
MP2 panel = new MP2();
panel.addMouseListener(panel);
frame.add(panel);
frame.setSize(200,200);
frame.setVisible(true);
}
public void mouseClicked(MouseEvent event) {
// TODO Auto-generated method stub
this.x = event.getX();
this.y = event.getY();
this.repaint();
input = JOptionPane.showInputDialog("Something pops out");
System.out.println(input);
}
public void mouseEntered(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void mouseExited(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void mousePressed(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void mouseReleased(MouseEvent arg0) {
// TODO Auto-generated method stub
}
public void paintComponent(Graphics g){
super.paintComponent(g);
// this.setBackground(Color.white); *Sets the bg color of the panel
g.setColor(new Color(255,0,0));
g.drawRect(x, y, 100, 100);
}
}
One of my ListView's needs to be created in code. When I specify a ListView in xml, I can set a dividerHeight and assign a color to the divider.
But apparently, in code a color is not acceptable nor is pointing to a resource id. Only a Drawable is acceptable - and I haven't gotten to that chapter yet.
Can someone point me to an example of setting a ListView divider in code?
So I wanted to create the fixed nav bar on top of the page. Instead of creating nav bar with ordered list, I used the following approach:
<header>
<div class="nav">
<img src="images/logo_ab.png" alt="AurinBioTech Logo"/>
<a href="index.html">Home</a>
<a href="#">About</a>
<a href="#">Team</a>
<a href="#">Science</a>
<a href="#">Need</a>
<a href="#">Pipeline</a>
<a href="#">Contact</a>
</div>
</header>
CSS:
header .nav {
margin-top:100px;
width:100%;
height:10%;
text-align:center;
padding-top:2%;
margin:0 auto;
position:fixed;
top:0;
}
header .nav a {
font-size: 2em;
padding-left: 15px;
padding-right: 15px;
color:rgb(1, 1, 1);
text-decoration: none;
font-family: 'Bebas';
}
header .nav a:hover {
color:white;
background-color: #404040;
border-radius:5px;
padding:0 auto;
}
header .nav a:active{
background-color: #404040;
border-radius:5px;
text-decoration:overline;
}
header .nav img {
width:260px;
height:65px;
padding-right:4em;
}
The reason I used this approach is because I wanted to use logo image next to the nav bar so it would align properly in the same line. Now the problem is that I need to add sub-menus under Science and Pipeline heading. Since I didn't use UL or LI, how can I add sub-menus under those heading.
OR, can you tell me any other way to create a NAV bar that shows the logo as well.
so it would be LOGO and MENUS on the same line.
Great thanks in advance.
In IE 7 background shift to 1 px top to but in FF it's ok?
background: url(girl.jpg) top left repeat-x;
position: relative;
top: 0px;color: #666;
border-bottom-color: white;
sifr3 text doesn't load many time first time on FF 3.5? I haven't checked on other browser.
If i reload page again then it loads properly.
this is my code
sIFR.replace(futura, {
selector: '#Homepage h1', ratios: [6, 1.24, 9, 1.13, 10, 1.15, 16, 1.09, 21, 1.06, 22, 1.07, 25, 1.04, 26, 1.06, 29, 1.03, 30, 1.05, 31, 1.03, 32, 1.05, 41, 1.04, 58, 1.03, 97, 1.02, 1.01],
wmode: 'transparent',
css: '.sIFR-root { background-color: none; color: #ffffff; }'
});
I am developing an iPad application where i want to reduce the textsize in a segment in a UISegmentController.Please help. I also want to change the selected segment color. currently the default color we get when a segment is selected is blue. I want to change it to red. Please help me if anyone is aware of these solutions. I am trying to use a Xib file to make the segments.
Hello,
Could you please explain me, how do templating engines in JavaScript work? Thank you.
JSON
{ "color" : "red"}
Template
<strong><%=color%></strong>
Result
<strong>Red</strong>
I wanted to align a newsticker about 300px above it's current position , but I am unable to do so. Please help.
The page is uploaded for viewing at http://cerebration.0fees.net/test/bottom.html
scroll down the page to find the newsticker.
The css file contains the css code for the newsticker and the newsticker is of white color(color mentioned for identification).
The html page code is at : http://pastebin.com/dP8dSEDS
and the css code is as at : http://pastebin.com/46YvqwT7
Thanks in advance.
If I define the up and over states of a button like this:
.button {color:red;}
.button:hover {color:blue;}
How can I get all the hover state styles for an element using JQuery?
Something like $(".button:hover").styles...
I am using the Microsoft Chart Controls for .NET 3.5 (C#) and have a chart in a winform.
My hope is to allow the user to change the color palette based on their preference.
How do I iterate through the color properties of the ChartColorPalette and add them to a combobox list?
I know it should be something like:
for each(something in ChartColorPalette)
{
combobox.items.add(something.ToString);
}
Hi ,
I have this code in my block and i would like to have the two columns left and right . Now the 2-nd one is under the first column .
<style type="text/css">
a img{border:none;}
#planninglaunchbox
{
background:#f3f8e7;
color:#1f1f1f;
font:normal 11px Arial,sans-serif;
margin:0 10px 10px 0;
overflow:hidden;
width:235px;
}
#planninglaunchbox .inner
{
padding:10px 0 10px 10px;
}
#planninglaunchbox a{color:#1f1f1f;text-decoration:none;}
#planninglaunchbox a:active,
#planninglaunchbox a:hover{text-decoration:underline;color:#579BC3;}
#planninglaunchbox h3
{
color:#1f1f1f;
font:normal 12px Georgia,serif;
margin:0 0 5px;
text-transform:lowercase;
width:215px;
}
#planninglaunchbox h4
{
font:bold 12px Arial,sans-serif;
margin:0 0 10px;
}
#planninglaunchbox ul
{
list-style:none;
margin:0 0 5px;
padding:0;
}
#planninglaunchbox ul.first{margin-right:10px;}
#planninglaunchbox ul.first,
#planninglaunchbox ul.last
{
float:left;
}
#planninglaunchbox ul li
{
background:none;
margin-bottom:5px;
padding:0;
}
#planninglaunchbox ul li img
{
margin-right:6px;
vertical-align:middle;
}
#planninglaunchbox .seeall
{
clear:both;
margin:0;
padding:0;
width:auto;
}
</style>
<div id="planninglaunchbox">
<div class="inner">
<h3> Theme</h3>
<ul class="first">
!--Some links--
</ul>
<ul class="last">
!--Some links--
</ul>
</div>
</div>
Say i'm coding in emacs and want to start up a music program. Because it takes too long to start up i go back to coding and type away.
When the music application starts up, the focus is stolen (gasp! stolen!) away from emacs and goes to the music application, often mid-thought.
Is there any way to keep this from happening and have the newly started application not have focus until i see that it's up and ready to be used?
Besides getting rid of my ADD of course. Or getting an impossibly fast computer that can keep up with my mind.
i'm using a Windows XP system, but i will soon have a Windows 7 system, and i have Linux at home.
I guess that string drawing actually works with paths. Could I generate a path out of a string, which than can have a fill color and an outline color, and all this stuff? How would I convert an NSString into a path?
I'm building a custom UIView, which draws its own content in a drawRect: Method. I want to stroke a CGPath with a color, and then grow this selection 1px and stroke with another color. Has somebody worked out a method to do this quite easily?
I am developing an iPad application where i want to reduce the textsize in a segment in a UISegmentController.Please help. I also want to change the selected segment color. currently the default color we get when a segment is selected is blue. I want to change it to red. Please help me if anyone is aware of these solutions
I have this small JavaScript code which I need some help with:
function doFocus(text) {
if (text.value == "Enter Name") {
text.value = "Student Name -";
}
}
All I need here is when someone clicks on my textbox, the text "Student Name -" should change its color, and should text-align = left. I am looking for the appropriate syntax for something like text.color and text.align.
I am a rank beginner in C#. I am currently using this code:
objGraphics.Clear(SystemColors.Control);
What I want to do is Clear this object to black (or some other RGB color), and I'm stumped as to how to replace the SystemColors.Control with, preferably, an RGB color spec. I'd probably want to clear to black most of the time. Any help will be much appreciated!
Most HTML elements have style properties associated with them - such a "color", "font-size" and "padding". These style properties have default values. For example the "color" style property associated with the "a" (anchor) element seems to have a default value of "#000066".
What are the default style properties values fo in HTML?
Dear All,
I'm assigned with new task for detecting the boundaries of an uiimage.That is, i want detect the boundary of an uiimage for coloring the particular part of an uiimage(for,part by part coloring).
My Task is,
I'm selecting the particular color among no.of colors and click on the particular part of the image the selectable part want to color.For that what should i do to achieve this.
Please explain me how can i do this..what are the methods are used to achieve this.
Thanks & Regards
Renuga