__avd 1,826

You have to define factorial() function and don't use old turboc compiler. Here you can find name of some compilers.

#include<iostream>

int factorial(int);  // function declaration

int factorial(int value)  //function definition
{
   //code
}
int main() 
{
  //code
}
__avd 1,826

I guess, you want to request an action without adding parameters. Take a look at second parameter of action; it is non-nullable (value type). You need to convert Char type to Nullable.

Function mostrar(cor As String, alinea? As Char) As ActionResult
   ViewBag.cor = cor
   ViewBag.alinea = alinea
   Return View()
End Function
diafol commented: Long tie no see - great to see you back! +15
__avd 1,826

You should save both date & time. However, use DateTime or Timespan to parse the string time.

Example:

        DateTime date = DateTime.Parse("10:10:10 AM");
        Console.WriteLine(date.TimeOfDay);

        TimeSpan time = TimeSpan.Parse("20:10:10");
        Console.WriteLine(time);

Or you can use TryParse / TryParseExact methods to parse the string.

__avd 1,826

Use CSS width,height, and overflow properties.

PS: Try to learn and use twitter bootstrap

__avd 1,826

You should have to use System.DateTime type.

Dim newDate = DateTime.ParseExact("20111120", 
                                  "yyyyMMdd",
                 CultureInfo.InvariantCulture)

Me.txtSoNo.text=newDate.ToString("yyyyMMdd")
__avd 1,826

Use @parameterized sql statement and that want you can compare data without formating data into string.

Example:

string sql = "select txt from [Sheet2$] where HHMM=@dateParam";
OleDbCommand command = new OleDbCommand(sql,conn);
command.Parameters.AddWithValue("@dateParam",maskedTextBox1.Text);
__avd 1,826

Welcome,
You can do (search from database) in many ways - executing queirues or LINQ to SQL or EntityDataModel. Please show your code to us so we can suggest or guide you on that issue.

sajee1 commented: View: private void textBox1_KeyDown(object sender, KeyEvent Args e) if (e.KeyCode == Keys.Enter) { MessageBox.Show(controller.CheckAndGetBarcode()); } } Model: public class ProductModel { public string s; public st +0
__avd 1,826

Sorry to hear that.

RIP Mel

__avd 1,826

Your code invokes toString() method (when an object reference is used in string context) and it returns string representation of an object. Take a look at toString() - Oracle Tutorial.

__avd 1,826

Use WebClient class methods to read the URLs.

__avd 1,826

Welcome to Daniweb.

Yes, you can style the text if you're working with Graphical user-interface APIs. For more details read threads - 12

__avd 1,826
Do I have to register them?

No. They are not activex (COM components).

Where am I supposed to put the downloaded dll files

In order to use VLC DotNet library in WinForm app, you have to add references of Vlc.DotNet.Core.Dll, Vlc.DotNet.Core.Interops.Dll and Vlc.DotNet.Forms.Dll files to the project.

__avd 1,826

Short answer : Yes.

__avd 1,826

Sorry I did't get you. Do you want to fetch some data when user hits Next button? Is it web or winForm app?

__avd 1,826

VideoLan DotNet works perfectly for me.

 Dim cnt As New Vlc.DotNet.Forms.VlcControl
 cnt.Media = New Vlc.DotNet.Core.Medias.PathMedia("x:\file.mp4")
 cnt.Dock = DockStyle.Fill
 Me.Controls.Add(cnt)
__avd 1,826

What is the field type of kickoff?

If it is DateTime then $TodayDate as bindParam variable.

$STM->bindParam(':kickofftime', $TodayDate);
$STM->execute();
$rows  = $STM -> fetchAll(PDO::FETCH_ASSOC);
foreach($rows as $row) {
   ....
}
__avd 1,826

Resource variable $result is null. You need to verify the value of id and also the result of SQL statement.

$result = mysql_query("...... ");      
if($result) {
  while($row = mysql_fetch_array($result)) {
    ...
  }
}

Important: Do not use mysql_* extension. Always use MySqlI or PDO.

__avd 1,826

This thread is already been marked as solved without adding justification.

In opening post, there are issues with properties definition especially to set accessor where value parameter replaces the field.

public double Length
{
 get
  {
  return length;
  }
 set
 {
   // value = length; <-- 
   length = value; 
  }
}

I think one should have to use auto-implemented property to avoid such issues.

public class Circle : TwoDimShape
{
   public double Radius {get;set;}
   public Circle (double rad)
   {
      Radius = rad;
   }
   ...... 
}
__avd 1,826

You can prepare List<T> or use DataTable.

__avd 1,826

If you've ASP.NET MVC project then 'PrepareCheckout()' should be an action method and you can request via jQuery.ajax. If not then create AJAX Service component, add PrepareCheckout method in it and request it via jQuery.ajax function.

__avd 1,826
__avd 1,826

In order to insert/update/delete rows, you need to configure UpdateCommand, InsertCommand and DeleteCommand properties of OldDbDataAdapter.

Well I'm suggest you to learn/use the EDM.

__avd 1,826

I want a group of users to be able to work offline...

Well you need to plan local-storage. You can use XML,CSV, Serrialization etc.

I have an application that is running on the inernet, done in asp.net(webforms)....

You should have to deploy WCF service components along with the webapp.

Fore further information read MSDN pages on WCF services, XML APIs and Serialization.

__avd 1,826

In order to select rows from database, you need to use SELECT with appropriate WHERE clause.

Include necessary code and description of problem in your post.

PS: I'd like to suggest you to learn/use LINQ and Entity Framework.

__avd 1,826
__avd 1,826
__avd 1,826

You need to correct the parameter name and SELECT statement. You can either use ? or @paramName.

cmd.CommandText = "SELECT username FROM Users WHERE username=@username";
cmd.Parameters.AddWithValue("@username", txtNewUser.Text);

PS: ExecuteScalar() returns value from 1st column and 1st row.

__avd 1,826

session?global variables?

No. You have to use Application object.

Post your code if possible.

__avd 1,826

en-GB is United Kigdom's culture name.

Have a look at following code-snippet which returns English cultures:

 var list = CultureInfo
             .GetCultures(CultureTypes.AllCultures)
             .Where(x=>x.TwoLetterISOLanguageName=="en");

 foreach (var cultureInfo in list)
 {
   Console.WriteLine(cultureInfo.TextInfo.CultureName);
 }
__avd 1,826

You should have to create wrapper class to manage cookies and session data.

For example,

public class CookieWrapper
    {
       /* Username property */
        public static string Username
        {
            get
            {
                return GetCookie("Username");
            }
            set
            {
                SetCookie("Username", value, false);
            }
        }
        /* Role property */
        public static string Role
        {
            get
            {
                return GetCookie("Role");
            }
            set
            {
                SetCookie("Role", value,false);
            }
        }

        /* Create a cookie */
        public static  void SetCookie(string key, string value,bool persist)
        {
            HttpCookie cookie = new HttpCookie(key, value);
            if (persist)
                cookie.Expires = DateTime.Now.AddDays(15);
            HttpContext.Current.Response.Cookies.Add(cookie);
        }
        /* Read a cookie */
        public static  string  GetCookie(string key)
        {
            HttpCookie cookie = HttpContext.Current.Request.Cookies[key];
            if (cookie == null)
                return "";
            return cookie.Value;
        }
        /* Remove a cookie */
        public static void RemoveCookie(string key)
        {
            HttpCookie cookie = HttpContext.Current.Request.Cookies[key];
            cookie.Expires = DateTime.Now.AddDays(-1);
            HttpContext.Current.Response.Cookies.Add(cookie);
        }
    }

And to set Username (cookie)

CookieWrapper.Username = "user1";