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 created one blackberry application which will play a video on a button click.This is my code,
invocation=new Invocation("file:///SDCard/Blackberry/videos/PlayingVideo/funny.mp4");
registry=Registry.getRegistry("net.rim.device.api.content.BlackBerryContentHandler");
try
{
registry.invoke(invocation);
}
catch(Exception e)
{
}
Now i can play the Video file.After clicking the Back button the native player is going to the background.It always running in the background.But i want to close that player.I have no idea about how to do it.Anybody knows please help me.
Hi all,
I have a header file with all the enums listed (#ifndef #define #endif construct has been used to avoid multiple inclusion of the file) that I use in multiple cpp files in my application.One of the enums in the files is
enum StatusSubsystem {ENABLED,INCORRECT_FRAME,INVALID_DATA,DISABLED};
There are functions in the application delcared as
ShowStatus(const StatusSubsystem&);
Earlier in the application when I made calls to the above function like
ShowStatus(INCORRECT_FRAME);
my application used to compile perfectly. But after some code was added The compilation halts giving the following error:
File.cpp:71: error: invalid conversion from `int' to `StatusSubsystem'
File.cpp:71: error: initializing argument 1 of `void Class::ShowStatus(const StatusSubsystem&)
I checked the code for any conflicting enums in the new code and it looked fine.
My Question is what is wrong with the function call that compiler shows as erroneous?
For your reference the function definition is:
void Class::ShowStatus(const StatusSubsystem& eStatus)
{
QPalette palette;
mStatus=eStatus;//store current Communication status of system
if(eStatus==DISABLED)
{
//select red color for label, if it is to be shown disabled
palette.setColor(QPalette::Window,QColor(Qt::red));
mLabel->setText("SYSTEM");
}
else if(eStatus==ENABLED)
{
//select green color for label,if it is to be shown enabled
palette.setColor(QPalette::Window,QColor(Qt::green));
mLabel->setText("SYSTEM");
}
else if(eStatus==INCORRECT_FRAME)
{
//select yellow color for label,to show that it is sending incorrect frames
palette.setColor(QPalette::Window,QColor(Qt::yellow));
mLabel->setText("SYSTEM(I)");
}
//Set the color on the Label
mLabel->setPalette(palette);
}
A strange side effect of this situation is it compiles when I cast all the calls to ShowStatus() as
ShowStatus((StatusSubsystem)INCORRECT_FRAME);
Though this removes any compilation error, but a strange thing happens. Though I make call to INCORRECT_FRAME above but in function definition it matches with ENABLED. How on earth is that possible? Its like while passing INCORRECT_FRAME by reference, it magically converts to ENABLED, which should be impossible. This is driving me nuts.
Can you find any flaw in what I am doing? or is it something else?
The application is made using C++,Qt-4.2.1 on RHEL4.
Thanks.
Hi
I have created two different grid background and radio button style in my
App.xaml.
User can select any style to change the look of the page i.e: Changing the background and style of the radiobutton.
Now When I click on the raduio button the application navigates to another page and the style disappears.
Is there a way to Set the style in application level or I need to store the styleVar as Global Var and check on the second page load and then apply the styles as per the styleVar.
/* Style 1 */
.myclass {
background:#ff0;
border:1px solid #ff0
}
#myid {
width:80px;
height:80px;
}
/* Style 2 */
.myclass { background:#ff0; border:1px solid #ff0 }
#myid { width:80px; height:80px; }
I'm sure there must be more styles for writing CSS, I'd like to know what are they. Is there an article already written that lists all styles.
Thanks
This is probably easy for you guys, but I can't understand it.
I want to save the filename of an image to it's own row in the SQL base.
Basically, I log on to the site where I have my own userID.
And each user has its own column for background images. And the user can choose his own image if he wants to. So basically, when the user clicks on the image he wants, a jquery click event occurs and an ajax call is made to a php file which is supposed to take care of the actual update. The row for each user always exist so there's only an update of the data that's necessary.
First, I collect the filename of the css property 'background-image' and split it so I get only the filename. I then store that filename in a variable I call 'filename' which is then passed on to this jQuery snippet:
$.ajax({
url: 'save_to_db.php',
data: filename,
dataType:'Text',
type: 'POST',
success: function(data) {
// Just for testing purposes.
alert('Background changed to: ' + data);
}
});
And this is the php:
<?php
require("dbconnect.php")
?>
<?php
$uploadstring = ($_POST['filename']);
mysql_query("UPDATE brukere SET brukerBakgrunn = $uploadstring WHERE brukerID=" .$_SESSION['id'] ."";
mysql_close();
?>
Basically, each user has their own ID and this is called 'brukerID'
The table everything is in is called 'brukere' and the column I'm supposed to update is the one called 'brukerBakgrunn'
When I just run the javascript snippet, I get this message box in return where it says:
Background changed to: Parse
error: syntax error, unexpected
';' in
/var/www/clients/client2/web8/web/save_to_db.php
on line 8
I actualle get this messagebox twice, not sure why.
Line 8 in 'save_to_db.php' is this one:
mysql_query("UPDATE brukere SET brukerBakgrunn = $uploadstring WHERE brukerID=" .$_SESSION['id'] ."";
Not sure if you need to see db_connect.php as well. I can add that later if you need to see it. So what am I missing here?
Hi, I have a web browser in my access form. I am embedding a gif file on it. but how ever i re size it there is a white border coming in the top and left side. The adjustments take place only at the bottom and right side. So when i embed a gif file with black background i end up getting a white background on the top and left sides, how do i make this go.
thanks
tksy
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
Hey everybody, this is not really a question, I have just written an article on Code Project on how to create rich interactive backgrounds for Silverlight applications. This background reacts to a users mouse movements and causes a fluid animation of the background elements.
hi my problem is how to create footer image in this video screen while playing....
how to create this format. now i am give my description:
• 1) Header image, a stretched background image. The location of this external image comes
from the application xml;
• 2) Footer image, a stretched background image. The location of this external image comes
from the application xml;
2.a) the copyright, disclaimer and buy block, this block contains links to popup
windows that contain a copyright and or disclaimer. And an option to buy the
application for the advertisement less version. The content of this block is fed
trough the application XML feed. The color of the text is fed by the application
xml plus the popup links and texts itself;
• 3) Carousel image, a stretched background image. The location of this external image
comes from the application xml;
3.a) the carousel contains objects that can flow from right to left, possibly trough a
animation (a soft break of the slide). The first object is centered in the middle
of the carousel. This is the first element in the video feed. All the subsequent
video object are added to the right of the centered object;
4) Total Video object, this object links to window two with the corresponding video of
this object.
This object is visually build out of the following sub parts:o
4.a) Thumb object (possible playing video thumb);
4.b) Reflection of the Thumb;
4.c) Textual Explanation of Thumb.
1) Video stream, this is the video stream coming from a external server streamed to the
television (maybe up scaled) as 720p stream;
2) Advertisement, the type of advertisement shown overlaid on the video is based on
previous settings in the video feed. This could mean that Admob, Adsense or a third
party image plus URL could be shown. When the advertisement is selected trough
navigation (it will highlight in a different color as a border around the
advertisement. The color an thickness can be managed trough the application xml),
when clicked a browser will open with the associated site (the application will be
pushed to the background process, when the user is finished it will return to
the app);
3) A back button, an image and navigational element. The location of the image comes from
the application xml. The button is only shown when a cursor is moved (a button is
pressed on the remote) it will highlight when selected and when pressed will forward
the screen to the main window. When the main window is opened the video will be
removed from cache and memory and cannot be start from the point it was exited.
please give me your idea....
I feel dumb for having been a web programmer for so long and not knowing the answer to this question, I actually hope it's possible and I just didn't know about rather than what I think is the answer (which is that it's not possible).
My question is whether it is possible to make a CSS class that "inherits" from another CSS class (or more than one).
For example, say we had:
.something { display:inline }
.else { background:red }
What I'd like to do is something like this:
.composite
{
.something;
.else
}
where the ".composite" class would both display inline and have a red background
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?
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'm able to draw a circle on a transparent background, but it's pixelated around the edges.
I can also get an anti-aliased circle on a non-transparent background with http://mierendo.com/software/antialiased_arcs/.
So, how do I get both?
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 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...
We have an ASP.NET 3.5 application that has been in production for over a year. Our last release was a couple of months ago. We use CSS for styling and application of background images to divs and such. The server is Windows 2003 with IIS.
Suddenly, this week, we have had reports from some users that the page seems to hang up while loading. The status bar was showing the name of a background image used in the page main area (assigned in CSS). At our office, some of us could recreate the problem, while others could not. IE6 and Firefox do not seem to be affected, only IE7/8. Running Fiddler on an affected machine and trying to see what was happening with the requests seemed to make the problem go away (while running through Fiddler, it returned when not). Hitting Refresh on a hung load often made the page load just fine.
I checked the background image, and even replaced it with an archived copy. No joy. We re-deployed the app from our production source. No Joy. We restarted IIS and eventually rebooted the whole server. There are no unusual entries in the event logs, the app logs or the IIS logs. Finally, I removed the image entirely and re-styled the page not to use a background image. That solved the problem at least for now.
However, we have reports of other images "hanging." The images are PNGs, but I have heard some rumors that sometimes a GIF hangs, but I have no screenshot to confirm.
This just started happening "out of the blue." There have been no releases or updates applied to the server recently. We even checked updates on clients to see if a recent Windows Update might have caused this on the client, but there was nothing updated within the last couple of weeks.
If you have any information about this problem, I would love to hear from you. I would also greatly appreciate any recommendations on additional diagnostics we can try.
Hi all i have a background worker thread and some unmanaged code dlls , In progress changed event of background worker . I will get the data from my database in a datatable and make this table as my DataSource. But when i use the scrollbards od DataGridView my application crashes.when I try to debug the application it gives "Unhandled exception in TestExe.exe : 0xC0000096: Privileged Instruction.
Hi,
I have a customized navigation bar with a image background. I do want to show the title on the background but I need its text for the back button in the next view.
How can I do it please?
Thank you
ps: self.title=@"" will not put (naturally) in the back button the previous title.
Is their any way to add background image in VIM.
like, I don't know is is possible or not. If you know any way to do this tell me.
:set background=dark
Thanks.....
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.
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>