Search Results

Search found 369 results on 15 pages for 'codeproject'.

Page 3/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • APress Deal of the Day 12/Oct/2013 - Beginning Windows 8 Application Development – XAML Edition

    - by TATWORTH
    Originally posted on: http://geekswithblogs.net/TATWORTH/archive/2013/10/12/apress-deal-of-the-day-12oct2013---beginning-windows-8.aspxToday's $10 deal of the day from APress at http://www.apress.com/9781430245667 is Beginning Windows 8 Application Development – XAML Edition "Beginning Windows 8 Application Development – XAML Edition shows you how to start building rich, immersive applications that connect people, applications, and devices with Windows 8."

    Read the article

  • APress Deal of the Day 20/Oct/2013 - Windows 8 App Projects - XAML and C# Edition

    - by TATWORTH
    Originally posted on: http://geekswithblogs.net/TATWORTH/archive/2013/10/20/apress-deal-of-the-day-20oct2013---windows-8-app.aspxToday's $10 deal of the day from APress at http://www.apress.com/9781430250654 is Windows 8 App Projects - XAML and C# Edition "Windows 8 App Projects - XAML and C# Edition takes you through the process of building your own apps for Windows 8 in a project oriented, example driven way. The book is aimed at developers looking to build Windows 8 apps in a variety of contexts."

    Read the article

  • Republishing blog posts on a popular website

    - by Giorgi
    I started my blog about programming yesterday and in order to promote and increase traffic I submitted my rss to Codeproject which pulls my posts and publishes them at Codeproject. While it increases the number of people reading my posts (but they are reading it at codeproject) I am worried that Google will penalize my site for duplicate content (Especially considering that Codeproject has much more reputation compared to my new website). The post at Codeproject has a link back to my blog post but it does not have "rel=canonical". So my question which one is better: a link from a high reputation website and some traffic or should I remove it from codeproject so that my blog is not penalized? What if codeproject adds "rel=canonical" to the link?

    Read the article

  • Linq Tutorial

    - by SAMIR BHOGAYTA
    Microsoft LINQ Tutorials http://www.deitel.com/ResourceCenters/Programming/MicrosoftLINQ/Tutorials/tabid/2673/Default.aspx Introducing C# 3 – Part 4 LINQ http://www.programmersheaven.com/2/CSharp3-4 101 LINQ Samples http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx What is LinQ http://www.dotnetspider.com/forum/173039-what-linq-net.aspx Beginners Guides http://www.progtalk.com/viewarticle.aspx?articleid=68 http://www.programmersheaven.com/2/CSharp3-4 http://dotnetslackers.com/articles/csharp/introducinglinq1.aspx Using Linq http://weblogs.asp.net/scottgu/archive/2006/05/14/446412.aspx Step By Step Articles http://www.codeproject.com/KB/linq/linqtutorial.aspx http://www.codeproject.com/KB/linq/linqtutorial2.aspx http://www.codeproject.com/KB/linq/linqtutorial3.aspx

    Read the article

  • NHibernate + ASP.NET + Open Session in View + L2Cache

    - by Pedro
    I am using CodeProject's well known Open Session in View to handle NHibernate Sessions. Does it works well with Level 2 Cache? Anyone has succeeded doing it? Should I use NH.Burrow instead? Any advice on l2 cache in asp.net best practices is appreciated. Edit: link to CodeProject's article: http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx

    Read the article

  • Is there a MergedGradientBrush in wpf?

    - by AKRamkumar
    Suppose I had two brushes. One that was a linear gradient brush that was from Dark to light One was a radial brush that went from Dark to light. How could I merge the brushes so that when I apply them, I can apply both at once. EG Check this: 1) http://www.codeproject.com/KB/vista/WindowsVistaRenderer/VistaRenderer4.gif 2) http://www.codeproject.com/KB/vista/WindowsVistaRenderer/VistaRenderer5.gif How could I (In WPF/XAML) merge both into one gradient and then refer to that? (This is Mr. Menendez's Images from Codeproject)

    Read the article

  • BDD using SpecFlow on ASP.NET MVC Application

    - by Rajesh Pillai
    I usually love doing TDD and am moving towards understanding BDD (Behaviour Driven Development).  My learnings are documented in the form of an article at CodeProject. The URL is http://www.codeproject.com/KB/architecture/BddWithSpecFlow.aspx I will keep this updated as and when I learn a couple of more things. Hope you like it. Cheers !!!

    Read the article

  • Bulk inserting best way to about it? + Helping me understand fully what I found so far

    - by chobo2
    Hi So I saw this post here and read it and it seems like bulk copy might be the way to go. http://stackoverflow.com/questions/682015/whats-the-best-way-to-bulk-database-inserts-from-c I still have some questions and want to know how things actually work. So I found 2 tutorials. http://www.codeproject.com/KB/cs/MultipleInsertsIn1dbTrip.aspx#_Toc196622241 http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx First way uses 2 ado.net 2.0 features. BulkInsert and BulkCopy. the second one uses linq to sql and OpenXML. This sort of appeals to me as I am using linq to sql already and prefer it over ado.net. However as one person pointed out in the posts what he just going around the issue at the cost of performance( nothing wrong with that in my opinion) First I will talk about the 2 ways in the first tutorial I am using VS2010 Express, .net 4.0, MVC 2.0, SQl Server 2005 Is ado.net 2.0 the most current version? Based on the technology I am using, is there some updates to what I am going to show that would improve it somehow? Is there any thing that these tutorial left out that I should know about? BulkInsert I am using this table for all the examples. CREATE TABLE [dbo].[TBL_TEST_TEST] ( ID INT IDENTITY(1,1) PRIMARY KEY, [NAME] [varchar](50) ) SP Code USE [Test] GO /****** Object: StoredProcedure [dbo].[sp_BatchInsert] Script Date: 05/19/2010 15:12:47 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[sp_BatchInsert] (@Name VARCHAR(50) ) AS BEGIN INSERT INTO TBL_TEST_TEST VALUES (@Name); END C# Code /// <summary> /// Another ado.net 2.0 way that uses a stored procedure to do a bulk insert. /// Seems slower then "BatchBulkCopy" way and it crashes when you try to insert 500,000 records in one go. /// http://www.codeproject.com/KB/cs/MultipleInsertsIn1dbTrip.aspx#_Toc196622241 /// </summary> private static void BatchInsert() { // Get the DataTable with Rows State as RowState.Added DataTable dtInsertRows = GetDataTable(); SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = new SqlCommand("sp_BatchInsert", connection); command.CommandType = CommandType.StoredProcedure; command.UpdatedRowSource = UpdateRowSource.None; // Set the Parameter with appropriate Source Column Name command.Parameters.Add("@Name", SqlDbType.VarChar, 50, dtInsertRows.Columns[0].ColumnName); SqlDataAdapter adpt = new SqlDataAdapter(); adpt.InsertCommand = command; // Specify the number of records to be Inserted/Updated in one go. Default is 1. adpt.UpdateBatchSize = 1000; connection.Open(); int recordsInserted = adpt.Update(dtInsertRows); connection.Close(); } So first thing is the batch size. Why would you set a batch size to anything but the number of records you are sending? Like I am sending 500,000 records so I did a Batch size of 500,000. Next why does it crash when I do this? If I set it to 1000 for batch size it works just fine. System.Data.SqlClient.SqlException was unhandled Message="A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)" Source=".Net SqlClient Data Provider" ErrorCode=-2146232060 Class=20 LineNumber=0 Number=233 Server="" State=0 StackTrace: at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataTable dataTable) at TestIQueryable.Program.BatchInsert() in C:\Users\a\Downloads\TestIQueryable\TestIQueryable\TestIQueryable\Program.cs:line 124 at TestIQueryable.Program.Main(String[] args) in C:\Users\a\Downloads\TestIQueryable\TestIQueryable\TestIQueryable\Program.cs:line 16 InnerException: Time it took to insert 500,000 records with insert batch size of 1000 took "2 mins and 54 seconds" Of course this is no official time I sat there with a stop watch( I am sure there are better ways but was too lazy to look what they where) So I find that kinda slow compared to all my other ones(expect the linq to sql insert one) and I am not really sure why. Next I looked at bulkcopy /// <summary> /// An ado.net 2.0 way to mass insert records. This seems to be the fastest. /// http://www.codeproject.com/KB/cs/MultipleInsertsIn1dbTrip.aspx#_Toc196622241 /// </summary> private static void BatchBulkCopy() { // Get the DataTable DataTable dtInsertRows = GetDataTable(); using (SqlBulkCopy sbc = new SqlBulkCopy(connectionString, SqlBulkCopyOptions.KeepIdentity)) { sbc.DestinationTableName = "TBL_TEST_TEST"; // Number of records to be processed in one go sbc.BatchSize = 500000; // Map the Source Column from DataTabel to the Destination Columns in SQL Server 2005 Person Table // sbc.ColumnMappings.Add("ID", "ID"); sbc.ColumnMappings.Add("NAME", "NAME"); // Number of records after which client has to be notified about its status sbc.NotifyAfter = dtInsertRows.Rows.Count; // Event that gets fired when NotifyAfter number of records are processed. sbc.SqlRowsCopied += new SqlRowsCopiedEventHandler(sbc_SqlRowsCopied); // Finally write to server sbc.WriteToServer(dtInsertRows); sbc.Close(); } } This one seemed to go really fast and did not even need a SP( can you use SP with bulk copy? If you can would it be better?) BatchCopy had no problem with a 500,000 batch size.So again why make it smaller then the number of records you want to send? I found that with BatchCopy and 500,000 batch size it took only 5 seconds to complete. I then tried with a batch size of 1,000 and it only took 8 seconds. So much faster then the bulkinsert one above. Now I tried the other tutorial. USE [Test] GO /****** Object: StoredProcedure [dbo].[spTEST_InsertXMLTEST_TEST] Script Date: 05/19/2010 15:39:03 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[spTEST_InsertXMLTEST_TEST](@UpdatedProdData nText) AS DECLARE @hDoc int exec sp_xml_preparedocument @hDoc OUTPUT,@UpdatedProdData INSERT INTO TBL_TEST_TEST(NAME) SELECT XMLProdTable.NAME FROM OPENXML(@hDoc, 'ArrayOfTBL_TEST_TEST/TBL_TEST_TEST', 2) WITH ( ID Int, NAME varchar(100) ) XMLProdTable EXEC sp_xml_removedocument @hDoc C# code. /// <summary> /// This is using linq to sql to make the table objects. /// It is then serailzed to to an xml document and sent to a stored proedure /// that then does a bulk insert(I think with OpenXML) /// http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx /// </summary> private static void LinqInsertXMLBatch() { using (TestDataContext db = new TestDataContext()) { TBL_TEST_TEST[] testRecords = new TBL_TEST_TEST[500000]; for (int count = 0; count < 500000; count++) { TBL_TEST_TEST testRecord = new TBL_TEST_TEST(); testRecord.NAME = "Name : " + count; testRecords[count] = testRecord; } StringBuilder sBuilder = new StringBuilder(); System.IO.StringWriter sWriter = new System.IO.StringWriter(sBuilder); XmlSerializer serializer = new XmlSerializer(typeof(TBL_TEST_TEST[])); serializer.Serialize(sWriter, testRecords); db.insertTestData(sBuilder.ToString()); } } So I like this because I get to use objects even though it is kinda redundant. I don't get how the SP works. Like I don't get the whole thing. I don't know if OPENXML has some batch insert under the hood but I do not even know how to take this example SP and change it to fit my tables since like I said I don't know what is going on. I also don't know what would happen if the object you have more tables in it. Like say I have a ProductName table what has a relationship to a Product table or something like that. In linq to sql you could get the product name object and make changes to the Product table in that same object. So I am not sure how to take that into account. I am not sure if I would have to do separate inserts or what. The time was pretty good for 500,000 records it took 52 seconds The last way of course was just using linq to do it all and it was pretty bad. /// <summary> /// This is using linq to sql to to insert lots of records. /// This way is slow as it uses no mass insert. /// Only tried to insert 50,000 records as I did not want to sit around till it did 500,000 records. /// http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx /// </summary> private static void LinqInsertAll() { using (TestDataContext db = new TestDataContext()) { db.CommandTimeout = 600; for (int count = 0; count < 50000; count++) { TBL_TEST_TEST testRecord = new TBL_TEST_TEST(); testRecord.NAME = "Name : " + count; db.TBL_TEST_TESTs.InsertOnSubmit(testRecord); } db.SubmitChanges(); } } I did only 50,000 records and that took over a minute to do. So I really narrowed it done to the linq to sql bulk insert way or bulk copy. I am just not sure how to do it when you have relationship for either way. I am not sure how they both stand up when doing updates instead of inserts as I have not gotten around to try it yet. I don't think I will ever need to insert/update more than 50,000 records at one type but at the same time I know I will have to do validation on records before inserting so that will slow it down and that sort of makes linq to sql nicer as your got objects especially if your first parsing data from a xml file before you insert into the database. Full C# code using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Serialization; using System.Data; using System.Data.SqlClient; namespace TestIQueryable { class Program { private static string connectionString = ""; static void Main(string[] args) { BatchInsert(); Console.WriteLine("done"); } /// <summary> /// This is using linq to sql to to insert lots of records. /// This way is slow as it uses no mass insert. /// Only tried to insert 50,000 records as I did not want to sit around till it did 500,000 records. /// http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx /// </summary> private static void LinqInsertAll() { using (TestDataContext db = new TestDataContext()) { db.CommandTimeout = 600; for (int count = 0; count < 50000; count++) { TBL_TEST_TEST testRecord = new TBL_TEST_TEST(); testRecord.NAME = "Name : " + count; db.TBL_TEST_TESTs.InsertOnSubmit(testRecord); } db.SubmitChanges(); } } /// <summary> /// This is using linq to sql to make the table objects. /// It is then serailzed to to an xml document and sent to a stored proedure /// that then does a bulk insert(I think with OpenXML) /// http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx /// </summary> private static void LinqInsertXMLBatch() { using (TestDataContext db = new TestDataContext()) { TBL_TEST_TEST[] testRecords = new TBL_TEST_TEST[500000]; for (int count = 0; count < 500000; count++) { TBL_TEST_TEST testRecord = new TBL_TEST_TEST(); testRecord.NAME = "Name : " + count; testRecords[count] = testRecord; } StringBuilder sBuilder = new StringBuilder(); System.IO.StringWriter sWriter = new System.IO.StringWriter(sBuilder); XmlSerializer serializer = new XmlSerializer(typeof(TBL_TEST_TEST[])); serializer.Serialize(sWriter, testRecords); db.insertTestData(sBuilder.ToString()); } } /// <summary> /// An ado.net 2.0 way to mass insert records. This seems to be the fastest. /// http://www.codeproject.com/KB/cs/MultipleInsertsIn1dbTrip.aspx#_Toc196622241 /// </summary> private static void BatchBulkCopy() { // Get the DataTable DataTable dtInsertRows = GetDataTable(); using (SqlBulkCopy sbc = new SqlBulkCopy(connectionString, SqlBulkCopyOptions.KeepIdentity)) { sbc.DestinationTableName = "TBL_TEST_TEST"; // Number of records to be processed in one go sbc.BatchSize = 500000; // Map the Source Column from DataTabel to the Destination Columns in SQL Server 2005 Person Table // sbc.ColumnMappings.Add("ID", "ID"); sbc.ColumnMappings.Add("NAME", "NAME"); // Number of records after which client has to be notified about its status sbc.NotifyAfter = dtInsertRows.Rows.Count; // Event that gets fired when NotifyAfter number of records are processed. sbc.SqlRowsCopied += new SqlRowsCopiedEventHandler(sbc_SqlRowsCopied); // Finally write to server sbc.WriteToServer(dtInsertRows); sbc.Close(); } } /// <summary> /// Another ado.net 2.0 way that uses a stored procedure to do a bulk insert. /// Seems slower then "BatchBulkCopy" way and it crashes when you try to insert 500,000 records in one go. /// http://www.codeproject.com/KB/cs/MultipleInsertsIn1dbTrip.aspx#_Toc196622241 /// </summary> private static void BatchInsert() { // Get the DataTable with Rows State as RowState.Added DataTable dtInsertRows = GetDataTable(); SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = new SqlCommand("sp_BatchInsert", connection); command.CommandType = CommandType.StoredProcedure; command.UpdatedRowSource = UpdateRowSource.None; // Set the Parameter with appropriate Source Column Name command.Parameters.Add("@Name", SqlDbType.VarChar, 50, dtInsertRows.Columns[0].ColumnName); SqlDataAdapter adpt = new SqlDataAdapter(); adpt.InsertCommand = command; // Specify the number of records to be Inserted/Updated in one go. Default is 1. adpt.UpdateBatchSize = 500000; connection.Open(); int recordsInserted = adpt.Update(dtInsertRows); connection.Close(); } private static DataTable GetDataTable() { // You First need a DataTable and have all the insert values in it DataTable dtInsertRows = new DataTable(); dtInsertRows.Columns.Add("NAME"); for (int i = 0; i < 500000; i++) { DataRow drInsertRow = dtInsertRows.NewRow(); string name = "Name : " + i; drInsertRow["NAME"] = name; dtInsertRows.Rows.Add(drInsertRow); } return dtInsertRows; } static void sbc_SqlRowsCopied(object sender, SqlRowsCopiedEventArgs e) { Console.WriteLine("Number of records affected : " + e.RowsCopied.ToString()); } } }

    Read the article

  • Quick ways to boost performance and scalability of ASP.NET, WCF and Desktop Clients

    - by oazabir
    There are some simple configuration changes that you can make on machine.config and IIS to give your web applications significant performance boost. These are simple harmless changes but makes a lot of difference in terms of scalability. By tweaking system.net changes, you can increase the number of parallel calls that can be made from the services hosted on your servers as well as on desktop computers and thus increase scalability. By changing WCF throttling config you can increase number of simultaneous calls WCF can accept and thus make most use of your hardware power. By changing ASP.NET process model, you can increase number of concurrent requests that can be served by your website. And finally by turning on IIS caching and dynamic compression, you can dramatically increase the page download speed on browsers and and overall responsiveness of your applications. Read the CodeProject article for more details. http://www.codeproject.com/KB/webservices/quickwins.aspx Please vote for me if you find the article useful.

    Read the article

  • Using todolist (abstract spoon) on ubuntu 11.10?

    - by Tal Galili
    I wish to run todolist 6.3.8 (http://www.codeproject.com/KB/applications/todolist2.aspx) on ubuntu 11.10. I have installed the latest wine and winetricks. I have tried running: http://www.codeproject.com/KB/applications/todolist2.aspx winetricks vcrun2005 winetricks vcrun2008 winetricks vcrun6 Which installed all of the components. When I went to run todolist.exe, it started fine with the "first time wizard" (asking me where to save definitions and what file to open first), and then it stopped saying "the program todolist.exe has encountered a serious problem and needs to close. we are sorry for the inconvenience". What can I do to make this (great) software work on ubuntu? Thanks.

    Read the article

  • C# LZO Library and Experience

    - by Hounshell
    Anyone have experience with a C# LZO compression/decompression library? LZO.NET (at http://lzo-net.sourceforge.net/ ) looks pretty alpha QuickLZ (at http://www.quicklz.com/ ) isn't stream-based and I need to compress files as they're generated and don't want to buffer the whole file in memory MiniLZO (at http://www.codeproject.com/KB/recipes/managedlzo.aspx ) is on CodeProject and I don't have a good track record with code from there working

    Read the article

  • SQL Server Management Studio Connect to Server List Editing

    - by Paul Farry
    I'm using SQLServer Management Studio (2005) and I have a fairly lengthy list of servers in there, and I'd like to get rid of some of them that are no longer in use, without having to set them all up again. I know that the C:\Users\*\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat can be deleted and this will remove ALL the entries, but is there anyway to just delete some of them? (Coding info) I looked at the file and it is a serialised blob from the Microsoft.SqlServer.Express.ConnectionDlg.dll (Class Personalization) in the Appplication directory, but all the methods are private. So I can't just create an instance of this and then call Remove on the entries. Update I have written an Article on CodeProject explaining How this can be achieved. http://www.codeproject.com/KB/vb/AlterSQL2005MRU.aspx

    Read the article

  • Open Source WPF UML Design tool

    - by oazabir
    PlantUmlEditor is my new free open source UML designer project built using WPF and .NET 3.5. If you have used plantuml before, you know that you can quickly create sophisitcated UML diagrams without struggling with a designer. Especially those who use Visio to draw UML diagrams (God forbid!), you will be at heaven. This is a super fast way to get your diagrams up and ready for show. You can *write* UML diagrams in plain English, following a simple syntax and get diagrams generated on-the-fly. This editor really saves time designing UML diagrams. I have to produce quick diagrams to convey ideas quickly to Architects, Designers and Developers everyday. So, I use this tool to write some quick diagrams at the speed of coding, and the diagrams get generated on the fly. Instead of writing a long mail explaining some complex operation or some business process in English, I can quickly write it in the editor in almost plain English, and get a nice looking activity/sequence diagram generated instantly. Making major changes is also as easy as doing search-replace and copy-pasting blocks here and there. You don't get such agility in any conventional mouse-based UML designers. I have submited a full codeproject article to give you a detail walkthrough how I have built this. Please read this article and vote for me if you like it. PlantUML Editor: A fast and simple UML editor using WPF http://www.codeproject.com/KB/smart/plantumleditor.aspx You can download the project from here: http://code.google.com/p/plantumleditor/

    Read the article

  • Read email from incoming mail server(POP)

    - by nccsbim071
    Hi, I have used an open source code from codeproject to read email from incoming mail server(POP Server). The code can be found at following location: http://www.codeproject.com/KB/IP/Pop3MimeClient.aspx So far it works fine i can read emails. My objective of using this code was to retrieve emails from POP server and process them. My problem is: If i use gmails pop server "pop.gmail.com" and run the appplication. I get only those emails that i have not retrieved since the last time i run the application. but if i use my clients pop server everytime i run the application i get all the emails in the pop server. for example: If i use gmail pop server: pop.gmail.com I have three emails in the pop server. I haven't run the application. I am running the application for the first time. Application reads the email, this time i will get 3 all the three email. I run the application second time, my application will not read any emails this time because i have already read the 3 existing one. This is fine, this is what i want. Now i send email to pop.gmail.com. I run the application again for the third time, this time i will only get the email that has just arrived that is the fourth one. This is good behaviour, this is what i want. But if i use my clients pop server: No matter how many times i run the application, it reads all the emails in the mail box. This will create problem for me, because i am thinking of building a window service that will read emails from pop server and process them. This service will run continuously. I will process emails in the pop serve then sleep for let's say 1 minute and the process the emails again. If the application downloaded from codeproject reads all the emails all the time, my clients mailbox can have like thousands for email in this mail box, so this would not be feasible for me. Is there some settings that is to be made at my client's pop server that will allow my application to retrieve only those emails that i have not read since last time i run the service or any help Please help, thanks,

    Read the article

  • MOSS 2007 - Using Connectable WebPart - Consumer has TextBox

    - by JohnP
    I have 2 webparts which are connected, where the provider sends a string to the consumer. However it fails to work if I put any TextBox controls in the consumer webpart. (works fine if I use a Label or Literal control. The idea is that the consumer is to be composed of form controls like TextBoxes. e.g. the codeproject sample at http://www.codeproject.com/KB/sharepoint/ConnectingCustomWebParts.aspx Works fine... until you replace the consumer Label control with a TextBox. Any help gratefully received.

    Read the article

  • c# application and configuration settings

    - by Maks
    Hi, I never used Settings class before but I found some articles on CodeProject which I'm currently reading (for example http://www.codeproject.com/KB/cs/PropertiesSettings.aspx) but so far I didn't see how to save string array for getting it after application is started next time. For example my application has several FileSystemWatcher instances, with each instance several other directories are connected (for example one FSW instance is monitoring one directory for a change and when it happens it copies some file to several other directories), so I would have one string array with watched paths representing FSW instances, and string array for each of those paths, representing directories that are affected. My question is, what should I use (Settings class or something else), and how should I use that for storing application configuration that is variable number of string arrays? Emphasize is on something I could use very soon as I don't have too much time to make custom class (but would have to if I cannot find solution) or dig into some obscure hacks. Any tutorial link, code snippet would be very helpful. Thanks.

    Read the article

  • [C++] Wrong EOF when unzipping binary file

    - by djzmo
    Hello there, I tried to unzip a binary file to a membuf from a zip archive using Lucian Wischik's Zip Utils: http://www.wischik.com/lu/programmer/zip_utils.html http://www.codeproject.com/KB/files/zip_utils.aspx FindZipItem(hz, filename.c_str(), true, &j, &ze); char *content = new char[ze.unc_size]; UnzipItem(hz, j, content, ze.unc_size); delete[] content; But it didn't unzip the file correctly. It stopped at the first 0x00 of the file. For example when I unzip an MP3 file, it will only unzip the first 4 bytes: 0x49443303 (ID3\0) because the 5th to 8th byte is 0x00000000. I also tried to capture the ZR_RESULT, and it always return ZR_OK (which means completed without errors). I think this guy also had the same problem, but no one replied to his question: http://www.codeproject.com/KB/files/zip_utils.aspx?msg=2876222#xx2876222xx Any kind of help would be appreciated :)

    Read the article

  • Why state cannot be part of Presenter in MVP?

    - by rFactor
    I read http://www.codeproject.com/KB/architecture/MVC_MVP_MVVM_design.aspx and it said: As powerful as they are, both MVC and MVP have their problems. One of them is persistence of the View’s state. For instance, if the Model, being a domain object, does not know anything about the UI, and the View does not implement any business logic, then where would we store the state of the View’s elements such as selected items? Fowler comes up with a solution in the form of a Presentation Model pattern. I wonder why Presenter can't hold View state? It already holds all View logic. As far as I understand, in MVC and MVP the state is kept in View. In PM and MVVM the state is kept in the Presentation Model. Why can't Presenter follow PM in this particular case and contain the state of the view? Here is another article which says Presenter does not hold View state, instead the view does: http://www.codeproject.com/KB/aspnet/ArchitectureComparison.aspx

    Read the article

  • Adding a textblock to a custom wpf control (piepiece control from codeplex)

    - by bomortensen
    Hi Stackoverflow! I'm currently building a Surface application where the main navigation is a circular menu. For each menu item I'm using a custom control that I found on codeproject.com: http://www.codeproject.com/KB/WPF/PieChartDataBinding.aspx (PiePiece control) The number of submenu items (which is also piepiece controls) comes from a database and thus dynamically loaded. What I can't figure out is how I add a textblock to this custom control to display the submenu item text. It needs to follow the PiePiece's RotationAngle property to line up correctly. Anyone got a hot-fix for this? I was thinking about adding another dependencyproperty to the piepiece custom control, but that way I can't set the font-family, size etc (can I?) Any input on this is greatly appreciated! Thanks!

    Read the article

  • Graphic editor opensource project example on c++ underlying composite pattern

    - by G-71
    Can you tell me when I can see a some opensource project (only project on C++ language), which is simple graphic editor, ?ontaining following primitive (for example): an ellipse, a rectangle, a line. And desirable, that to be able to group this primitive in one primitive (for example, Word Grouping - Group). Composite pattern use is desirable in this project. I want to see how to organize classes, but more serious for me is to see how organize grouping operation. I searched for it on codeproject.com codeproject.com, codeplex.com, but not found this. I have already some source http://pastebin.com/xe4JF5PW But in my opinion, this code is dirty and ugly. Therefore, I want to see some opensource project for example. Thanks!

    Read the article

  • Strange exception phenomenon in Windows 7

    - by Level 2
    I spot some interesting articles about exception handle in CodeProject http://www.codeproject.com/KB/cpp/seexception.aspx After reading, I decided to do some experiment. The first time I try to execute the following code char *p; p[0] = 0; The program died without question. But After several times when I executed the same problem binary code, it magically did fine. Even the following code is doing well. Any clue or explanation? char *p p[1000] = 'd'; cout<<p[1000]<<endl; My O/S is Windows 7 64bit and compiler is VS2008 rc1.

    Read the article

  • strenge exception phenomenon in win7

    - by Level 2
    Hello all, I spot some interesting artcles about exception handle in codeproject http://www.codeproject.com/KB/cpp/seexception.aspx after reading, I decided to do some experiment. The first time I try to excute the following code char *p; p[0] = 0; The program died without question. But After serveral time I execute the same problem binary code. It magically did fine. even the following code is doing well. any clue or explain? char *p p[1000] = 'd'; cout<<p[1000]<<endl; my os is windows 7 64bit and compiler is vs2008 rc1.

    Read the article

  • Is there any way that I can draw fast a chart with too many series? [on hold]

    - by Maryam Bagheri
    I have a project that need to draw a fast chart with many series. I must change start position of drawing to a favor position when user want. .Net Chart is slow in lots of series. I wanted to use this library: http://www.codeproject.com/Articles/32836/A-simple-C-library-for-graph-plotting?msg=4109664#xx4109664xx but loading speed is too slow when count of series increases. When I plot the chart, I must invalidate the chart for updates, drawing speed will be too slow if there are too many series. I need at least 900 series in a chart for this project. I wanted to use multiple layer series to decrease invalidate rate with the idea: http://www.codeproject.com/Articles/84833/Drawing-multiple-layers-without-flicker I do not know this idea would be helpful. I tested LightningChart control but it could not help me.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >