Web Development
|
|
 |
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
Message Automatically Removed
|
|
|
|
 |
This is a 2 part question. I have a service that has a name "Ads 1", "Ads 2". They take a parameter of "1" and "2".
1. When I invoke the method to start the service "Ads 1" the " 1" is truncated, so I get "Ads" being passed. How can I stop this and force it to be "Ads 1"? All my other services start, stop, pause, everything else just fine, but they don't have a space then number either. What am I missing?
2. I am trying to pass the parameter with the startservice. I am using a hardcoded parameter value(1) for now to get it to work in testing. Due to the fact that I am unable to get the service to start I am not sure the parameter is being passed. How can I check to see if the paramter is being passed and/or Am I doing this right way?
Any help is appreciated. Thank you.
<pre lang="c#">
int iPos;
int iCount = 0;
string sService;
try
{
ConnectionOptions conOpts = new ConnectionOptions();
conOpts.Username = ddlServers.SelectedItem.Text.ToString() + "\\" + System.Configuration.ConfigurationManager.AppSettings["AdminUser"].ToString();
conOpts.Password = System.Configuration.ConfigurationManager.AppSettings["AdminPassword"].ToString();
System.Management.ManagementScope oMs = new System.Management.ManagementScope("\\\\" +
ddlServers.SelectedItem.Text +
"\\root\\cimv2", conOpts);
while (iCount < lboxServices.Items.Count)
{
if (lboxServices.Items[iCount].Selected)
{
iPos = lboxServices.Items[iCount].Text.IndexOf("-");
sService = lboxServices.Items[iCount].Text.Substring(0, iPos).Trim();
System.Management.ObjectQuery oQuery = new System.Management.ObjectQuery("select * from Win32_Service Where Name='" +
sService +
"'");
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oMs, oQuery);
ManagementObjectCollection oReturnCollection = oSearcher.Get();
if (oReturnCollection.Count > 0)
{
foreach (ManagementObject oReturn in oReturnCollection)
{
if (oReturn.GetPropertyValue("State").ToString().ToLower().Equals("stopped") ||
oReturn.GetPropertyValue("State").ToString().ToLower().Equals("paused"))
{
String[] sArgs = new string[] { "1" };
oReturn.InvokeMethod("StartService", sArgs);
}
}
}
lboxServices.Items[iCount].Text = sService + " - " + CheckService(ddlServers.SelectedItem.Text, sService);
}
iCount++;
}
}
catch (Exception err)
{
lboxServices.Items.Add("Error: " + err.Message.ToString());
}
|
|
|
|
 |
i want to add a calender to my web project , which will auto detect the date and will update offline
|
|
|
|
 |
crood wrote: will auto detect the date and will update offline
Your question is not too clear!
crood wrote: i want to add a calender to my web project
There is standard Microsoft Web UI calendar control. If needed, there are various free and third party calendar controls too.
If you face issues, be elaborate and specify what you are trying to do and struggling with.
|
|
|
|
 |
in fact, i need drop down menu similar to ibm.com, but i need it to with css, and css only
i've tried to make one, with transition: height; here is demo[^] (thanks to:Christofer Vilander) , but it doesn't have expended width, it drops with same size when it is un hovered, is it possible to increse the drop down width, and keeping the button size the way it is, or i have to search for another trick or just give up and use jQuery?
|
|
|
|
 |
Mohamed Samir wrote: is it possible to increse the drop down width, and keeping the button size the way it is,
Yes
Try:
.box {
width: 100px;
height: 60px;
background: #005ca1;
-webkit-transition: height 1s;
-moz-transition: height 1s;
-ms-transition: height 1s;
-o-transition: height 1s;
transition: height 1s;
}
.box:hover {
height: 225px;
width: 200px;
}
|
|
|
|
 |
hi
i want to Know how to add google map location in my page...
|
|
|
|
 |
Google tells you how right here ...
vbmike
|
|
|
|
 |
|
|
General
News
Suggestion
Question
Bug
Answer
Joke
Rant
Admin