Search Results

Search found 243 results on 10 pages for 'globalization'.

Page 7/10 | < Previous Page | 3 4 5 6 7 8 9 10  | Next Page >

  • nginx bad gateway 502 with mono fastcgi

    - by Bradley Lederholz Leatherwood
    Hello so I have been trying to get my website to run on mono (on ubuntu server) and I have followed these tutorials almost to the letter: However when my directory is not blank fastcgi logs reveal this: Notice Beginning to receive records on connection. Error Failed to process connection. Reason: Exception has been thrown by the target of an invocation. I am not really sure what this means, and depending on what I do I can get another error that tells me the resource cannot be found: The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /Default.aspx/ Version information: Mono Runtime Version: 2.10.8 (tarball Thu Aug 16 23:46:03 UTC 2012) ASP.NET Version: 4.0.30319.1 If I should provide some more information please let me know. Edit: I am now getting a nginx gateway error. My nginx configuration file looks like this: server { listen 2194; server_name localhost; access_log $HOME/WWW/nginx.log; location / { root $HOME/WWW/dev/; index index.html index.html default.aspx Default.aspx Index.cshtml; fastcgi_index Views/Home/; fastcgi_pass 127.0.0.1:8000; include /etc/nginx/fastcgi_params; } } Running the entire thing with xsp4 I have discovered what the "Exception has been thrown by the target of an invocation." Handling exception type TargetInvocationException Message is Exception has been thrown by the target of an invocation. IsTerminating is set to True System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. Server stack trace: at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0 at System.Runtime.Serialization.ObjectRecord.LoadData (System.Runtime.Serialization.ObjectManager manager, ISurrogateSelector selector, StreamingContext context) [0x00000] in :0 at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000] in :0 at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject (System.IO.BinaryReader reader) [0x00000] in :0 at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph (BinaryElement elem, System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result, System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000] in :0 at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] in :0 at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) [0x00000] in :0 at System.Runtime.Remoting.RemotingServices.DeserializeCallData (System.Byte[] array) [0x00000] in :0 at (wrapper xdomain-dispatch) System.AppDomain:DoCallBack (object,byte[]&,byte[]&) Exception rethrown at [0]: --- System.ArgumentException: Couldn't bind to method 'SetHostingEnvironment'. at System.Delegate.GetCandidateMethod (System.Type type, System.Type target, System.String method, BindingFlags bflags, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in :0 at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in :0 at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method) [0x00000] in :0 at System.DelegateSerializationHolder+DelegateEntry.DeserializeDelegate (System.Runtime.Serialization.SerializationInfo info) [0x00000] in :0 at System.DelegateSerializationHolder..ctor (System.Runtime.Serialization.SerializationInfo info, StreamingContext ctx) [0x00000] in :0 at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 --- End of inner exception stack trace --- at (wrapper xdomain-invoke) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate) at (wrapper remoting-invoke-with-check) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate) at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in :0 at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in :0 at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in :0 at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in :0

    Read the article

  • DLL Config in Mono

    - by nubela
    Hi, I'm trying to pick up Svn.NET (http://www.pumacode.org/projects/svndotnet/) library for use in my Mono project. I tried compiling its mockapp - svnmockapp project (http://www.pumacode.org/projects/svndotnet/browser/trunk/SvnMockApp) , I am able to get the references right and get it compiled right. I understand that it references 2 other modules libapr (libapr-1.so.0) and svn_client (libsvn_client-1.so.0) , by which I've created PumaCode.SvnDotNet.dll.config in /bin/Debug . That is all I've done to tried to try to get the mockapp at least outputting something to show that it is indeed interfacing SVN. Nevertheless, it is not working. Commands that are entered that doesn't interface SVN works fine: $ mono SvnTest.exe -usage Usage: SvnTest <subcommand> [options] Short Options: ~?.V Subcommands: add, checkout[co], status[st], update[up] For help on subcommands, use the -?/--help subcommand option. Commands that tries to access SVN throws an exception: $ mono SvnTest.exe st An exception was thrown by the type initializer for PumaCode.SvnDotNet.AprSharp.Apr Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object at PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.CmdBase.Run (PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.SubCommand sc, System.String[] args) [0x00000] at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] at PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.Application.Run (System.String[] args) [0x00000] at PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.Application.Main (System.String[] args) [0x00000] Using MONO_DEBUG_LEVEL="debug", we get the following log pasted here. At the tail end of the log, we see this: . . . Mono-INFO: DllImport attempting to load: 'libapr-1'. Mono-INFO: DllImport loading location: 'libapr-1.so'. Mono-INFO: DllImport error loading library: 'libapr-1.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading library: './libapr-1.so'. Mono-INFO: DllImport error loading library './libapr-1.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'libapr-1'. Mono-INFO: DllImport error loading library 'libapr-1: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport attempting to load: 'libapr-1'. Mono-INFO: DllImport loading location: 'libapr-1.so'. Mono-INFO: DllImport error loading library: 'libapr-1.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading library: './libapr-1.so'. Mono-INFO: DllImport error loading library './libapr-1.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'libapr-1'. Mono-INFO: DllImport error loading library 'libapr-1: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport attempting to load: 'libapr-1'. Mono-INFO: DllImport loading location: 'libapr-1.so'. Mono-INFO: DllImport error loading library: 'libapr-1.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading library: './libapr-1.so'. Mono-INFO: DllImport error loading library './libapr-1.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'libapr-1'. Mono-INFO: DllImport error loading library 'libapr-1: cannot open shared object file: No such file or directory'. An exception was thrown by the type initializer for PumaCode.SvnDotNet.AprSharp.Apr I've tried to symlink the appropriate modules in the directory where SvnTest.exe exists, but this still persist. How can I fix this? Did I place the PumaCode.SvnDotNet.dll.config in the wrong folder? (I placed it at /bin/Debug and also tried /bin) What can I do to remedy this? Thank you for your kind help! Much appreciated! Heres the config file: (PumaCode.SvnDotNet.dll.config) <configuration> <dllmap dll="libapr" target="/usr/lib/libapr-1.so.0"/> <dllmap dll="svn_client-1" target="/usr/lib/libsvn_client-1.so.0"/> </configuration>

    Read the article

  • linq query - The method or operation is not implemented.

    - by Dejan.S
    I'm doing the Rob Conery mvc storefront and at one place I'm suppose to get categories but I get an error with this linq query and I can not get why. It's exactly the same as his. var culturedName = from ct in ReadOnlyContext.CategoryCultureDetails where ct.Culture.LanguageCode == System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName select new { ct.CategoryName, ct.CategoryId }; return from c in ReadOnlyContext.Categories join cn in culturedName on c.CategoryId equals cn.CategoryId select new Core.Model.Category { Id = c.CategoryId, Name = cn.CategoryName, ParentId = c.ParentId ?? 0, Products = new LazyList<Core.Model.Product>(from p in GetProducts() join cp in ReadOnlyContext.Categories_Products on p.Id equals cp.ProductId where cp.CategoryId == c.CategoryId select p) }; its the return query that mess things up. I have checked and the culturename actually gets data from the database. Appricate your help

    Read the article

  • The best approach for multilingual user interface

    - by Mehdi Golchin
    I am working on a multilingual web application. I'm wondering how do i design the best user interface that the user can localize data for various languages? for instance, in making a page which its title is different in every lang, do i put a textbox for every one? it's not a suitable way to do(in case of 10 lang, the user has 10 textbox!!! too silly) what is your idea about this? Edit: i have no problem with globalization in my system. in fact, i'm looking for a good way for my interface design which user can enter his data to my forms in various langs. thanks in advance

    Read the article

  • DateTime: Require the user to enter a time component

    - by Heinzi
    Checking if a user input is a valid date or a valid "date + time" is easy: .NET provides DateTime.TryParse (and, in addition, VB.NET provides IsDate). Now, I want to check if the user entered a date including a time component. So, when using a German locale, 31.12.2010 00:00 should be OK, but 31.12.2010 shouldn't. I know I could use DateTime.TryParseExact like this: Dim formats() As String = {"d.M.yyyy H:mm:ss", "dd.M.yyyy H:mm:ss", _ "d.MM.yyyy H:mm:ss", "d.MM.yyyy H:mm:ss", _ "d.M.yyyy H:mm", ...} Dim result = DateTime.TryParseExact(userInput, formats, _ Globalization.CultureInfo.CurrentCulture, ..., result) but then I would hard-code the German format of specifying dates (day dot month dot year), which is considered bad practice and will make trouble should we ever want to localize our application. In addition, formats would be quite a large list of all possible combinations (one digit, two digits, ...). Is there a more elegant solution?

    Read the article

  • WPF Localization Using LocBaml: Handling Special Symbols

    - by Aryeh
    Hello, I’m dealing with localization of a WPF application (Visual Studio 2010 under Windows 7). I’ve just accomplished the whole process of localization using LocBaml tool, as explained in WPF Globalization and Localization Overview and in related posts. The target language is Italian (it-IT culture). When I run my application in Italian, I have a problem with interpretation of the special symbols of © and ™: they both appear there as a white question sign upon a black diamond-shaped background. The symbols © and ™ appear identically in both English and Italian CSV-files. I tried also the special letters (such as È, à etc.) that are present in Italian but absent in English, and they also are interpreted as the above diamond-shaped question. In Region and Language, I changed the system locale to Italian[Italy], restarted the PC and ran the application again – this helped me in the past to cope with a similar problem in localization of C++ applications under Windows XP, but now it didn’t help, either. Has somebody any idea what is the catch here?

    Read the article

  • In JavaScript, How to convert string into Date ? Where string may have different culture format.

    - by user328973
    Hi I am getting DateString in JavaScript from the TextBox like, var dateString = document.getElementById('<%= txtEffDate.ClientID %>').value; dateString value may be in following format. en-US - "4/29/2010" fr-FR - "29/04/2010" de-DE - "29.04.2010" it-IT - "29/04/2010" es-ES - "29/04/2010" zh-CN - "2010/4/29" ja-JP - "2010/04/29" sv-SE - "2010-04-29" And converting this to Date Object as follows, var d1 = new Date(dateString); though its giving me the wrong result like for fr-FR "29/04/2010" == "Fri May 4 00:00:00 UTC+0530 2012" Which is completely irrelevant, How should I get the correct Date ? I have also set < globalization culture="auto" / in web.config & < asp:ScriptManager ID="scr1" runat="server" EnableScriptGlobalization="true"/

    Read the article

  • Using a FormattedText object, how do I find out how much of my text was actually displayed?

    - by Robert
    If I have code like this: FormattedText text = new FormattedText(sTheBook, System.Globalization.CultureInfo.CurrentUICulture, System.Windows.FlowDirection.LeftToRight, new Typeface("Times New Roman"), 13, Brushes.Black); text.MaxTextWidth = 300; text.MaxTextHeight = 600; text.TextAlignment = TextAlignment.Justify; dc.DrawText(text, new Point(10, 0)); ...then, if it is long, only some of the text that I passed in (via sTheBook) will be displayed on the screen. I need to know how much was displayed so I can display the rest later! I can easily measure an amount of text, but it seems silly to do a search by rendering and re-rendering my text over and over until I find the piece that fits exactly. Thanks!

    Read the article

  • LevelToVisibilityConverter in silverligt 4

    - by prince23
    <UserControl x:Class="SLGridImage.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"> <UserControl.Resources> <local:LevelToVisibilityConverter x:Key="LevelToVisibility" /> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <sdk:DataGrid x:Name="dgMarks" CanUserResizeColumns="False" SelectionMode="Single" AutoGenerateColumns="False" VerticalAlignment="Top" ItemsSource="{Binding MarkCollection}" IsReadOnly="True" Margin="13,44,0,0" RowDetailsVisibilityMode="Collapsed" Height="391" HorizontalAlignment="Left" Width="965" VerticalScrollBarVisibility="Visible" > <sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button x:Name="myButton" Click="myButton_Click"> <StackPanel Orientation="Horizontal"> <Image Margin="2, 2, 2, 2" x:Name="imgMarks" Stretch="Fill" Width="12" Height="12" Source="Images/test.png" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding Level, Converter={StaticResource LevelToVisibility}}" /> <TextBlock Text="{Binding Level}" TextWrapping="NoWrap" ></TextBlock> </StackPanel> </Button> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="Name" > <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <Border> <TextBlock Text="{Binding Name}" /> </Border> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTemplateColumn Header="Marks" Width="80"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Border> <TextBlock Text="{Binding Marks}" /> </Border> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> </sdk:DataGrid.Columns> </sdk:DataGrid> </Grid> </UserControl> in .cs using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using System.Collections.ObjectModel; using System.ComponentModel; namespace SLGridImage { public partial class MainPage : UserControl { private MarksViewModel model = new MarksViewModel(); public MainPage() { InitializeComponent(); this.DataContext = model; } private void myButton_Click(object sender, RoutedEventArgs e) { } } public class MarksViewModel : INotifyPropertyChanged { public MarksViewModel() { markCollection.Add(new Mark() { Name = "ABC", Marks = 23, Level = 0 }); markCollection.Add(new Mark() { Name = "XYZ", Marks = 67, Level = 1 }); markCollection.Add(new Mark() { Name = "YU", Marks = 56, Level = 0 }); markCollection.Add(new Mark() { Name = "AAA", Marks = 89, Level = 1 }); } private ObservableCollection<Mark> markCollection = new ObservableCollection<Mark>(); public ObservableCollection<Mark> MarkCollection { get { return this.markCollection; } set { this.markCollection = value; OnPropertyChanged("MarkCollection"); } } public event PropertyChangedEventHandler PropertyChanged; public void OnPropertyChanged(string propName) { if (PropertyChanged != null) this.PropertyChanged(this, new PropertyChangedEventArgs(propName)); } } public class Mark { public string Name { get; set; } public int Marks { get; set; } public int Level { get; set; } } public class LevelToVisibilityConverter : System.Windows.Data.IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { Visibility isVisible = Visibility.Collapsed; if ((value == null)) return isVisible; int condition = (int)value; isVisible = condition == 1 ? Visibility.Visible : Visibility.Collapsed; return isVisible; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } #endregion } } when i run getting error The type 'local:LevelToVisibilityConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. what i am i missing here looking forward for an solution thank you

    Read the article

  • How to convert culture specific double using TypeConverter?

    - by Christian
    Hi I have a problem with the TypeConverter class. It works fine with CultureInvariant values but cannot convert specific cultures like english 1000 seperators. Below is a small test program that I cannot get to work. using System; using System.Globalization; using System.ComponentModel; namespace TestConvertCulture { class Program { static void Main() { try { var culture = new CultureInfo( "en" ); TypeConverter typeConverter = TypeDescriptor.GetConverter( typeof ( double ) ); double value = (double)typeConverter.ConvertFromString( null, culture, "2,999.95" ); Console.WriteLine( "Value: " + value ); } catch( Exception e ) { Console.WriteLine( "Error: " + e.Message ); } } } }

    Read the article

  • Using TextOptions.TextFormattingMode with FormattedText

    - by dan gibson
    With WPF4 you can have non-blurry text by adding TextOptions.TextFormattingMode="Display" and TextOptions.TextRenderingMode="Aliased" to your xaml: <Window TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="Aliased"> This works fine for me except for when I draw text with DrawingContext.DrawText like this: void DrawText(DrawingContext dc) { FormattedText ft = new FormattedText("Hello World", System.Globalization.CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(FontFamily, FontStyle, FontWeight, FontStretch), FontSize, brush); dc.DrawText(ft, new Point(rect.Left, rect.Top)); } How can I draw non-blurry text with FormattedText? ie I want TextOptions.TextFormattingMode="Display" and TextOptions.TextRenderingMode="Aliased" to be used.

    Read the article

  • How to choose the right web application framework?

    - by thenextwebguy
    http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks Since we are ambitiously aiming to be big, scalability is important, and so are globalization features. Since we are starting out without funding, price/performance and cost of licences/hardware is important. We definitely want to bring AJAX well present in the web interface. But apart from these, there's no further criteria I can come up with. I'm most experienced with C#/ASP.net, PHP and Java, in that order, but don't turn down other languages (Ruby, Python, Scala, etc.). How can we determine from the jungle of frameworks the one that suits best our goal? What other questions should we be asking ourselves? Reference material: articles, book recommendations, websites, etc.?

    Read the article

  • Convert any currency string to double

    - by James
    I need to store multiple currencies in SQL server. I understand that SQL won't support all different types of currencies (unless I store it as a string, but I don't want to do that). My idea was to convert all the values from their currency format to a standard double and store that instead. Then just re-format based on the culture info when displaying. However, I have tried doing something like e.g. var cultureInfo = new System.Globalization.CultureInfo("en-US"); double plain = return Double.Parse("$20,000.00", cultureInfo); This doesn't ever seem to work it always throws a FormatException. Even removing the currency symbol and just trying to do this based on the number alone does the same thing. This is just an example I want to support pretty much any type of currency. Is there a standard way of stripping out currency and getting the value as a double?

    Read the article

  • How to convert a gi-normous integer (in string format) to hex format? (C#)

    - by eviljack
    Given a potentially huge integer value (in c# string format), I want to be able to generate it's hex equivalent. Normal methods don't apply here as we are talking arbitrarily large numbers, 50 digits or more. The techniques I've seen which use a technique like this: // Store integer 182 int decValue = 182; // Convert integer 182 as a hex in a string variable string hexValue = decValue.ToString("X"); // Convert the hex string back to the number int decAgain = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber); won't work because the integer to convert is too large. For example I need to be able to convert a string like this: 843370923007003347112437570992242323 to it's hex equivalent. these don't work: http://stackoverflow.com/questions/1139957/c-convert-int-to-hex-and-back-again http://stackoverflow.com/questions/74148/how-to-convert-numbers-between-hex-and-decimal-in-c

    Read the article

  • How to store an enum inside a DataColum of a DataTable and show localized text in .Net

    - by SoMoS
    Hello, I have to store on one DataColum of one DataTable an Enum containing some values. De enum is defined as follow: Imports System.ComponentModel Imports System.Globalization Public Enum FirmwareUpdateStatus <Description("updateNotExecuted")> UpdateNotExecuted = 0 <Description("updateSuccess")> UpdateSuccess = 1 <Description("updateError")> UpdateError = 2 End Enum I have also a class called Enum2 that has a method called GetDescription that returns the localized text of an enum value. What I want to do is to show this text into the grid that shows the DataTable but storing the enum value, not the string. How can this be done? Thanks in advance"

    Read the article

  • Change DateTimePicker Calendar Runtime

    - by Smart pro
    I want to view the calendar in another culture, for example let it show in Arabic. I use this code in the Main, but the calendar is still in the same culture: CultureInfo sa = new CultureInfo("ar-SA", false); sa.DateTimeFormat.Calendar = new System.Globalization.HijriCalendar(); // Sets the culture to Arabic (Saudi Arabia) Thread.CurrentThread.CurrentCulture = sa; // Sets the UI culture to Arabic (Saudi Arabia) Thread.CurrentThread.CurrentUICulture = sa; I add the DateTimePicker on a form and expect that it shows the date in Arabic after running, but the DateTimePicker or Calendar is not changed to that culture.

    Read the article

  • Can't Use Path in ASP MVC Action

    - by user1477388
    I am trying to use Path() but it has a blue line under it and says, "local variable (path) cannot be referred to until it is declared." How can I use Path()? Imports System.Globalization Imports System.IO Public Class MessageController Inherits System.Web.Mvc.Controller <EmployeeAuthorize()> <HttpPost()> Function SendReply(ByVal id As Integer, ByVal message As String, ByVal files As IEnumerable(Of HttpPostedFileBase)) As JsonResult ' upload files For Each i In files If (i.ContentLength > 0) Then Dim fileName = path.GetFileName(i.FileName) Dim path = path.Combine(Server.MapPath("~/App_Data/uploads"), fileName) i.SaveAs(path) End If Next End Function End Class

    Read the article

  • "Dynamic" localized display of custom DateTimePicker format

    - by S.C. Madsen
    I have a Winform application with 2 DateTimePicker's on it, initialized as follows: private void InitializeComponent() { ... this._StartDate.Format = System.Windows.Forms.DateTimePickerFormat.Short; .... this._StartTime.CustomFormat = System.Globalization.DateTimeFormatInfo.CurrentInfo.ShortTimePattern; this._StartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom; ... } My question is: When I pick a new region from "Regional and Language Options" in the Control Panel, the _StartDate display is updated to reflect the new regional settings, but the _StartTime is not. Why?

    Read the article

  • Get last element of pipeline in powershell

    - by dozacinc
    Hi, This might be weird, but stay with me. I want to get only the last element of a piped result to be assigned to a varaiable. I know how I would do this in "regular" code of course, but since this must be a one-liner. More specifically, I'm interested in getting the file extension when getting the result from an FTP request ListDirectoryDetails. Since this is done within a string expansion, I can't figure out the proper code. Currently I'm getting the last 3 hars, but that is real nasty. New-Object PSObject -Property @{ LastWriteTime = [DateTime]::ParseExact($tempDate, "MMM dd HH:mm",[System.Globalization.CultureInfo]::InvariantCulture) Type = $(if([int]$tempSize -eq 0) { "Directory" } else { $tempName.SubString($tempName.length-3,3) }) Name = $tempName Size = [int]$tempSize } My idea was doing something similar to $tempName.Split(".") | ? {$_ -eq $input[$input.Length-1]} that is, iterate over all, but only take out where the element I'm looking at is the last one of the input-array. What am I missing ? Fire at will /M

    Read the article

  • Transforming large Xml files

    - by Chad
    I was using this extension method to transform very large xml files with an xslt. Unfortunately, I get an OutOfMemoryException on the source.ToString() line. I realize there must be a better way, I'm just not sure what that would be? public static XElement Transform(this XElement source, string xslPath, XsltArgumentList arguments) { var doc = new XmlDocument(); doc.LoadXml(source.ToString()); var xsl = new XslCompiledTransform(); xsl.Load(xslPath); using (var swDocument = new StringWriter(System.Globalization.CultureInfo.InvariantCulture)) { using (var xtw = new XmlTextWriter(swDocument)) { xsl.Transform((doc.CreateNavigator()), arguments, xtw); xtw.Flush(); return XElement.Parse(swDocument.ToString()); } } } Thoughts? Solutions? Etc.

    Read the article

  • How can a string timestamp with hours 0 to 24 be parsed

    - by user897052
    I am trying to parse a string timestamp of format "yyyyMMddHHmmss" with DateTime.ParseExact(). The catch is I must allow for an hour value of "24" (i.e. hours can be from 0 to 24; Note: I can't control the input values.) and, of course, that results in an exception. Are there any settings/properties I can set instead of manually parsing/using regex's? If not, any efficient parsing ideas? ex. DateTime.ParseExact("20120911240000", "yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture); hour 24 means hour 0 of next day (so day + 1, hour = 0)

    Read the article

  • SQlite insert not working

    - by Ondro Tadanai
    I'm writing a C# database winform app and I have a problem executing this query. It throws me this error: SQLite error near "SELECT": syntax error Can someone help me please? Thanks for any answer or suggestion. INSERT into subor(idsubor, idpodfk, pnazovfk, datumpravop, podiel, podield, cislozLV, datumzaradenia, idmajetok) values (null, " + comboBox1.SelectedValue.ToString() + ", '" + comboBox2.SelectedValue.ToString() + "', '" + dateTimePicker1.Value.ToString("d. M. yyyy") + "', '" + textBox2.Text + "', " + podield.ToString("0.0000", System.Globalization.CultureInfo.InvariantCulture) + ", '" + textBox4.Text + "', '" + dateTimePicker2.Value.ToString("d. M. yyyy") + "', SELECT IFNULL(a, '0') AS idmajetok FROM (SELECT MAX(idmajetok) + 1 AS a FROM subor))";

    Read the article

  • Custom Control with Localization Support in WP7

    - by Ponmalar
    I have created the DateTimePicker control. Now i want to add localization Support with this. I have followed the below steps. Created CustomControls.de-DE.resx inside the ResourceFolder. added some commonly used strings in that resx file changed the access modifier to Public added <SupportedCulture>de-DE;</SupportedCulture> in the csproj file. set System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE"); in sample.cs file before IntializeComponent(). my DateTimevalue was " 2 Day(s): 3 Hr (s): 5 Min(s) : 32 Sec (s) Getting only default language that is english. What i did wrong? Please help me anyone. Is anything i missed?

    Read the article

  • Could not find any resources appropriate for the specified culture or the neutral culture.

    - by Captain Comic
    I have created an assembly and later renamed it. Then i started getting runtime errors when calling toolsMenuName = resourceManager.GetString(resourceName); The resourceName variable is "enTools" at runtime. Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Jfc.TFSAddIn.CommandBar.resources" was correctly embedded or linked into assembly "Jfc.TFSAddIn" at compile time, or that all the satellite assemblies required are loadable and fully signed. The code: string resourceName; ResourceManager resourceManager = new ResourceManager("Jfc.TFSAddIn.CommandBar", Assembly.GetExecutingAssembly()); CultureInfo cultureInfo = new CultureInfo(_applicationObject.LocaleID); if(cultureInfo.TwoLetterISOLanguageName == "zh") { System.Globalization.CultureInfo parentCultureInfo = cultureInfo.Parent; resourceName = String.Concat(parentCultureInfo.Name, "Tools"); } else { resourceName = String.Concat(cultureInfo.TwoLetterISOLanguageName, "Tools"); } // EXCEPTION IS HERE toolsMenuName = resourceManager.GetString(resourceName); I can see the file CommandBar.resx included in the project, i can open it and can see the "enTools" string there.

    Read the article

  • What’s new in Silverlight 4 RC?

    - by pluginbaby
    I am here in Las Vegas for MIX10 where Scott Guthrie announced today the release of Silverlight 4 RC and the Visual Studio 2010 tools. You can now install VS2010 RC!!! As always, downloads links are here: www.silverlight.net He also said that the final version of Silverlight 4 will come next month (so april)! 4 months ago, I wrote a blog post on the new features of Silverlight 4 beta, so… what’s new in the RC ?   Rich Text · RichTextArea renamed to RichTextBox · Text position and selection APIs · “Xaml” property for serializing text content · XAML clipboard format · FlowDirection support on Runs tag · “Format then type” support when dragging controls to the designer · Thai/Vietnamese/Indic support · UI Automation Text pattern   Networking · UploadProgress support (Client stack) · Caching support (Client stack) · Sockets security restrictions removal (Elevated Trust) · Sockets policy file retrieval via HTTP · Accept-Language header   Out of Browser (Elevated Trust) · XAP signing · Silent install and emulation mode · Custom window chrome · Better support for COM Automation · Cancellable shutdown event · Updated security dialogs   Media · Pinned full-screen mode on secondary display · Webcam/Mic configuration preview · More descriptive MediaSourceStream errors · Content & Output protection updates · Updates to H.264 content protection (ClearNAL) · Digital Constraint Token · CGMS-A · Multicast · Graphics card driver validation & revocation   Graphics and Printing · HW accelerated Perspective Transforms · Ability to query page size and printable area · Memory usage and perf improvements   Data · Entity-level validation support of INotifyDataErrorInfo for DataGrid · XPath support for XML   Parser · New architecture enables future innovation · Performance and stability improvements · XmlnsPrefix & XmlnsDefinition attributes · Support setting order-dependent properties   Globalization & Localization · Support for 31 new languages · Arabic, Hebrew and Thai input on Mac · Indic support   More … · Update to DeepZoom code base with HW acceleration · Support for Private mode browsing · Google Chrome support (Windows) · FrameworkElement.Unloaded event · HTML Hosting accessibility · IsoStore perf improvements · Native hosting perf improvements (e.g., Bing Toolbar) · Consistency with Silverlight for Mobile APIs and Tooling · SDK   - System.Numerics.dll   - Dynamic XAP support (MEF)   - Frame/Navigation refresh support   That’s a lot!   You will find more details on the following links: http://timheuer.com/blog/archive/2010/03/15/whats-new-in-silverlight-4-rc-mix10.aspx http://www.davidpoll.com/2010/03/15/new-in-the-silverlight-4-rc-xaml-features/   Technorati Tags: Silverlight

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10  | Next Page >