Navigation

    爱代码

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Tags
    3. net
    Log in to post

    • S

      Get permissions from sharepoint in console/wpf/xamarin application
      网络文章 • c net wpf xamarin console-application • • share  

      1
      0
      Votes
      1
      Posts
      0
      Views

      No one has replied

    • S

      Title case capitalising letter after ‘
      网络文章 • c net asp.net string • • share  

      3
      0
      Votes
      3
      Posts
      0
      Views

      S

      ToTitleCase does indeed seem to treat the right single quotation mark as a separator between the words it converts to title case. The documentation says: the ToTitleCase method provides an arbitrary casing behavior which is not necessarily linguistically correct. A linguistically correct solution would require additional rules, and the current algorithm is somewhat simpler and faster. We reserve the right to make this API slower in the future.
    • S

      How to get the Current Cell value when you edit the cell in DataGridComboBoxColumn?
      网络文章 • c net wpf • • share  

      4
      0
      Votes
      4
      Posts
      0
      Views

      S

      If your ItemSource is a ListCollectView, you can get the current item like this: public void OnCellValueChanged(object sender, CellValueChangedEventArgs e) { var currentItem = itemlist.CurrentItem; // to get the whole current item // Or you just get the current changed cell value from the EventArgs: var currentValue = e.Value?.ToString(); }
    • S

      Best Practices for Transitive Package References in NuGet
      网络文章 • c net net-core msbuild • • share  

      2
      0
      Votes
      2
      Posts
      0
      Views

      S

      I think I prefer explicitly referencing packages. However, I can understand the answer may be subjective. In any case, there is a tool that helps you find transitive package references: https://github.com/spectresystems/snitch
    • S

      cannot implicitly convert type system.collections.generic.IEnumerable<string> to string[]
      网络文章 • c net xamarin • • share  

      6
      0
      Votes
      6
      Posts
      0
      Views

      S

      public String[] Any() { return Enumerable.Range(0, 6).Select(i => DateTime.Now.AddMonths(i - 6)).Select(date => date.ToString("MM/yyyy")).ToArray(); } What needs to be understood Understand the requirement, fetching 6 months of data from the database using LINQ will provide us a collection of data or multiple rows. So if we want we can limit it by giving condition and using .FirstorDefault or if we need an array or in the list format we can use .ToList or .ToArray.
    • S

      Is it possible to deserialize .net DataContractSerializer xml with reference in other coding languages?
      网络文章 • c net xml serialization datacontractserializer • • share  

      1
      0
      Votes
      1
      Posts
      0
      Views

      No one has replied

    • S

      Filter items in ListBox according to Selected items
      网络文章 • net asp.net gridview listitem • • share  

      1
      0
      Votes
      1
      Posts
      0
      Views

      No one has replied

    • S

      Xamarin Media Plugin Auto start or Timer
      网络文章 • c net xamarin xamarin.forms xamarin.ios • • share  

      2
      0
      Votes
      2
      Posts
      0
      Views

      S

      You can't start a video or take a photo without user interaction with Xamarin Media Plugin. At the following link you can find all StoreVideoOptions where offered https://github.com/jamesmontemagno/MediaPlugin/blob/master/src/Media.Plugin/Shared/MediaStoreOptions.cs
    • S

      why is Jarray adding duplicate jobjects?
      网络文章 • c net arrays json.net • • share  

      3
      0
      Votes
      3
      Posts
      0
      Views

      S

      As mentioned by Leon in comments you should use a new JObject in your loop instead of the array reference you have. Reason why your code is adding the same values (objects really): The memory location for your object gets allocated when you create it: dynamic product_Price = new JObject(); When you add the object to the array, a reference of the address is stored product_Price_array.Add(product_Price); On clearing it, and then adding new values in product_Price, the values inside are removed, and new values are added, but the original location has not changed, so all the object you add to product_Price_array are pointing to the same address (and also the same object). product_Price.RemoveAll(); If instead RemoveAll, you would just create a new JObject, this will create a new product_Price object at a different address, which will then get added to your array at the end. product_Price = new JObject(); I would suggest you have a look at how arrays work Also, not sure why are you using a Dynamic object why not just use a JObject
    • S

      How to create Firebird database user and grant some privileges to that user
      网络文章 • c net firebird firebird-3.0 • • share  

      2
      0
      Votes
      2
      Posts
      0
      Views

      S

      violation of PRIMARY or UNIQUE KEY - that means you are trying to insert a row into a table that already exists. in your specific case, the user (by SRP plugin) with such a name was already created, and you can not create two users (by one and the same plugin) with the same name. Check users existing: https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-pseudo-users.html select * from sec$users Then either drop user before re-creating him, or set some new, not yet used user name P.S. note that by default users are created in the server instance, so it is not like you create one and the same user for every database again and again. Once you created user - it exists ON THE SERVER for all the databases there. This is default configuration albeit it can be overrode using Firebird's databases.conf file. Sadly, you can not change this configuration by your application's connection string, while you are creating your new databases. P.P.S. personally I would not create the database command by command but rather would restore the ready-made database from pre-prepared backup file. YMMV.
    • S

      ImageColumn in DatagridView with datasource built on linq to Entities query
      网络文章 • c net entity-framework datagridview linq-to-entities • • share  

      1
      0
      Votes
      1
      Posts
      0
      Views

      No one has replied

    • S

      Query By Wiql (WorkItem) Give Bad Request Status
      网络文章 • c net asp.net-web-api tfs • • share  

      2
      0
      Votes
      2
      Posts
      0
      Views

      S

      You may try the following code: var personalaccesstoken = "xxxxxxxxxx"; var base64Token = Convert.ToBase64String(Encoding.ASCII.GetBytes($":{personalaccesstoken}")); using (HttpClient client = new HttpClient()) {     client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", base64Token);     var requestMessage = new HttpRequestMessage(HttpMethod.Post, "http://{tfsserver}:8080/tfs/DefaultCollection/_apis/wit/wiql?api-version=1.0");     requestMessage.Content = new StringContent("{\"query\": \"select [System.Id], [System.Title], [System.State] from WorkItems\"}", Encoding.UTF8, "application/json");     using (HttpResponseMessage response = client.SendAsync(requestMessage).Result)     {   response.EnsureSuccessStatusCode();     } }
    • S

      ref list isn&#39;t modified outside command class
      网络文章 • c net • • share  

      1
      0
      Votes
      1
      Posts
      0
      Views

      No one has replied

    • S

      DataReader.GetGuid is throwing The method or operation is not implemented error
      网络文章 • c net datareader • • share  

      1
      0
      Votes
      1
      Posts
      0
      Views

      No one has replied

    • S

      How to initialize a dynamic class that has a constructor
      网络文章 • c net reflection • • share  

      3
      0
      Votes
      3
      Posts
      0
      Views

      S

      you could use T instance = (T)Activator.CreateInstance(typeof(T), myCustomItem); sorry, correct answer was given 10 seconds before: https://stackoverflow.com/a/55829165/5281555
    • S

      log4net BufferingForwardingAppender appender looks like not working in .net core 2.1
      网络文章 • net net-core buffer log4net log4net-appender • • share  

      2
      0
      Votes
      2
      Posts
      0
      Views

      S

      It looks like lossy value is the culprit. have set it to false and logs get output <lossy value="false" />
    • S

      How to reference NuGet package in .csproj
      网络文章 • c net nuget • • share  

      2
      0
      Votes
      2
      Posts
      0
      Views

      S

      I think you are mixing NAnt and MSBuild tasks. NAnt tasks are written on a .build file and called by passing this file to the NAnt executable like explained here. You load them with loadtasks. MSBuild tasks however can be used like you want, in the .csproj file. You use usingtask to work with them. So in your case, what you can do is use the msbuildtasks package which also have an attrib task. Install the package: The latest build can be downloaded from the releases section. https://github.com/loresoft/msbuildtasks/releases The MSBuild Community Tasks library is also available on nuget.org via package name > MSBuildTasks. To install MSBuildTasks, run the following command in the Package Manager Console PM> Install-Package MSBuildTasks The installation also make sure you can then use the tasks in your csproj without needing to use usingtask, so: <Target Name="BeforeBuild"> <Attrib Files="App.config" ReadOnly="false" /> <Attrib Files="Ocelot.json" ReadOnly="false" /> <Attrib Files="OcelotLogging.json" ReadOnly="false" /> </Target> Note they are other way to do this with MSBuild, this one is only the closest to what you wrote.
    • S

      How to detect dependencies on exceptions
      网络文章 • net azure azure-application-insights telemetry • • share  

      3
      0
      Votes
      3
      Posts
      0
      Views

      S

      Is there any way to know if a dependency belongs to an exception or to cluster Telemetry items that belong together? You can use operation_id to find all telemetry from a single operation. However you probably don't need it, as default sampling either keeps or discards all Telemetry from a single operation (i.e same operation_id). So if your request failed, and that telemetry is captured by application insights, and sampling decides to send this Request, then all the related telemetry, including exceptions, dependencies will also be retained.
    • S

      Cannot implicitly convert type &#39;string&#39; to &#39;Microsoft.Azure.Management.DataFactory.Models.SecretBase&#39;
      网络文章 • c net azure azure-data-factory • • share  

      3
      0
      Votes
      3
      Posts
      0
      Views

      S

      I think i have found solution using SecureString which is derived from SecretBase and has Property to set string value
    • S

      SQLDataReader. ExecuteReader times out
      网络文章 • c sql net • • share  

      2
      0
      Votes
      2
      Posts
      0
      Views

      S

      Fact of the matter is that using SQL 2K12 the above snippet all worked (same database same etc) However as sb suggested instead of selecting all fields (*), when explicitly added the req'd fields it started to work.