Rami 的个人资料You must enter a title b...照片日志列表更多 ![]() | 帮助 |
|
11月4日 Make your DotNetNuke Module Searchable Hi, If you were from those who using DotNetNuke content management system, and you have your own customized module, and wondering how to make these modules searchable, Do the following: 1- Go to your Controller class in your module (or any name you naming the class, the class which handle database requests, usually called [moduleName]Controller), and make it implements ISearchable Interface VB: Implements Entities.Modules.ISearchable C#:: Entities.Modules.ISearchable 2- Implement GetSearchItems function VB: Public Function GetSearchItems(ByVal ModInfo As Entities.Modules.ModuleInfo) _ As Services.Search.SearchItemInfoCollection Implements Entities.Modules.ISearchable.GetSearchItems ' Get the Surveys for this Module instance Dim colSurveys As List(Of SurveyInfo) = GetSurveys(ModInfo.ModuleID) Dim SearchItemCollection As New SearchItemInfoCollection Dim SurveyInfo As SurveyInfo For Each SurveyInfo In colSurveys Dim SearchItem As SearchItemInfo SearchItem = New SearchItemInfo _ (ModInfo.ModuleTitle & " - " & SurveyInfo.Question, _ SurveyInfo.Question, _ SurveyInfo.CreatedByUser, _ SurveyInfo.CreatedDate, ModInfo.ModuleID, _ SurveyInfo.SurveyId, _ SurveyInfo.Question) SearchItemCollection.Add(SearchItem) Next Return SearchItemCollection End Function C#: public SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo) { // Get the Surveys for this Module instance List<SurveyInfo> colSurveys = GetSurveys(ModInfo.ModuleID); SearchItemInfoCollection SearchItemCollection = new SearchItemInfoCollection(); foreach (SurveyInfo SurveyInfo in colSurveys) }{ SearchItemInfo SearchItem; SearchItem = new SearchItemInfo (ModInfo.ModuleTitle + " - " + SurveyInfo.Question, SurveyInfo.Question, SurveyInfo.CreatedByUser, SurveyInfo.CreatedDate, ModInfo.ModuleID, Convert.ToString(SurveyInfo.SurveyId), SurveyInfo.Question); SearchItemCollection.Add(SearchItem); } return SearchItemCollection; Now these search items will be saved in DNN database to perform search operation on them 3- Go to your module definition page and under supported Features you can see 'searchable' is checked, which mean it has been activated Thank you 11月3日 Unable to start debugging on the web server. The type initializer for 'System.Net.DigestClinet' threw an exception.If you have troubled with this exception when trying to start debugging your web application that hosted in IIS, try on of the following: · Check if there is any DLL in bin directory called Security.dll, and rename it using its own project · Check IIS ASP.NET Version, should be 2.0…. · Check web.config for o <configuration> o and see if something looks odd (like some incorrect values for Version for the System.Net.DigestClient authentication module. References: http://social.msdn.microsoft.com/forums/en-US/vsdebug/thread/9d30fcfd-c872-478c-817e-52e184eb5e55/ http://social.msdn.microsoft.com/forums/en-US/vsdebug/thread/a79fb2ce-8ac6-4092-831b-9858aef72102/ 9月11日 JavaScript DebuggerRecently at work, I asked to build a web-based report designer, and this must be all at client side, so I turned to play around with JavaScript, it sounds pretty until I reach the point where I have to debug dozen lines of code, classes, functions…. Especially when I have to debug mouseMove event, watching width, height, left, top properties. Window.alert() does not serve me, so I workaround this and try to make my debugging more dynamic, writing specific value, watching variables … Div element was the hero in this battle, I put div and dynamically I started to write my individual values and properties to it using .innerHTML property, and everything seems to be okay. After debugging and writing 10 values, I want to change the values I debugged and watching new values, so I started to comment all last wrote values , It starts to bother me, type comment operator then remove it, type remove type remove…. So I decided to build a small javaScript debugger using div element as a primary element I wrote I jsDebugger class and start to put methods support our goals · Write(string) //to write to debugging board(div) · WriteLine(string)//to write on debugging board with new line · Clear()//clears debugging board · stopDebugging()//stop writing values on debugging board so you don't have to go an comments all wrote values : )
One last thing, you can configure jsDebugger using a config object in constructor (it's optional)
Configuration contains writingColor // the color of write height//the height of debugging board (div) bgColor// div background color borderWidth// div border width borderStyle// div border style borderColor// div border color fontFamily// writing font type fontSize// writing font size enabled:true// enable or disable jsDebugger
Like this d = new jsDebugger( { writingColor:"black", height:"auto", bgColor:"#D0CFCC", borderWidth:"3px", borderStyle:"solid", borderColor:"gray", fontFamily:"Calibri", fontSize:"15px", enabled:true} ); Downloads: 7月3日 Environment Variables Editor - Path Edition Environment Variables Editor - Path Edition C#.NET based code tool (Environment Variables) simply are variables, that store information about your computer, these variables created by windows operating system. Environment Variables contains part called user variables, and one of (User variables) variables called (path), this variable store paths separated by ( ; ) each variable refer to a path in your hard disk, this stored paths used for fast access. fast access can be done by using run program (win + r ) or (start --> Run...), and typing the name of the file or folder that you want access (open) e.g. let's assume that we have the following directory (folder) D:\pics\friends\summerParty and you want access to summerParty folder. all you have to do is add D:\pics\friends\summerParty to (path) environment variables mentioned before (only once) and then use Run... program (win + r ) and type (summerParty) and the folder will open for you you can save a lot of time be using something like this This tool allow users to modify (path) variable to meet their needs. All questions, suggestion, bugs are welcome Note: by adding (D:\pics\friends\summerParty ) you can only fast accessing the folders and files stored inside summerParty folder Need .Net Framework 2.0 or higher Downloads: Envaironment Variable Editor - Path Edition 6月14日 Gradient Brush ToolGradient Brush tool (another generation code)
Gradient Brush tool: is a small tool, allows developers to generate a block of code,which can easily set a [b]Gradient color[/b] for form's background. have a good try ! Note: it needs .NET Frame Work 2.0 or higher |
a nice sites that talking about programming languages and such as
|
|||||||||
|
|