Search Results

Search found 14411 results on 577 pages for 'library'.

Page 7/577 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Logging in a C# library

    - by koumides
    All, I wonder what is the best practise regarding logging inside a library. I am creating a C# library to be used by users and at some points I want to log an error or a warning. Is it a good practice to use log4net and log in a file? Thanks, M

    Read the article

  • Library to parse C/C++ source code

    - by John
    Which library should I use to parse C/C++ source code file? I need to parse source file, calculate how much useful strings inside, how much 'for' blocks, 'if' blocks, how much comments inside. I also may need to insert a comment or small piece of code after each 'for' block. Is there any libraries? May be any library included in Microsoft Visual Studio?

    Read the article

  • Making shared library from exist o-files

    - by Ockonal
    Hi guys, I have a project. I need in shared library of it to use in extensions. I don't want to make copy of this project but with shared-library settings. Are there any way to build it using *.o-files from building project? As I understand, I can write makefile for this.

    Read the article

  • Best open source C# library?

    - by Alon
    There are great .NET libraries and components. What is, for your opinion the most useful, effective, well wrriten open source C# library you've ever seen? Mines, is the great Html Agility Pack. Please post one library per answer.

    Read the article

  • [C#] Library for working with web pages

    - by kitchen
    I'm in search for a library that will let me work with web pages using C# without having to display anything graphically. The library should handle web sites that use JavaScript / AJAX and it should return the correct HTML as if I were viewing the source from within Firefox/Chrome. If there is any information I left out, let me know.

    Read the article

  • Windows Sharepoint Services - FullTextSqlQuery Document library Unable to find items created by SYST

    - by Ashok
    We have created an ASP.NET web app that upload files to WSS Doc Libary. The files get added under 'SYSTEM ACCOUNT' in the library. The FullTextSqlQuery class is used to search the document libary items. But it only searches files that has been uploaded by a windows user account like 'Administrator' and ignores the ones uploaded by 'SYSTEM ACCOUNT'. As a result the search results are empty even though we have the necessary data in the document library. What could be the reason for this? The code is given below: public static List GetListItemsFromFTSQuery(string searchText) { string docLibUrl = "http://localhost:6666/Articles%20Library/Forms/AllItems.aspx"; List items = new List(); DataTable retResults = new DataTable(); SPSecurity.RunWithElevatedPrivileges(delegate { using (SPSite site = new SPSite(docLibUrl)) { SPWeb CRsite = site.OpenWeb(); SPList ContRep = CRsite.GetListFromUrl(docLibUrl); FullTextSqlQuery fts = new FullTextSqlQuery(site); fts.QueryText = "SELECT Title,ContentType,Path FROM portal..scope() WHERE freetext('" + searchText + "') AND (CONTAINS(Path,'\"" + ContRep.RootFolder.ServerRelativeUrl + "\"'))"; fts.ResultTypes = ResultType.RelevantResults; fts.RowLimit = 300; if (SPSecurity.AuthenticationMode != System.Web.Configuration.AuthenticationMode.Windows) fts.AuthenticationType = QueryAuthenticationType.PluggableAuthenticatedQuery; else fts.AuthenticationType = QueryAuthenticationType.NtAuthenticatedQuery; ResultTableCollection rtc = fts.Execute(); if (rtc.Count > 0) { using ( ResultTable relevantResults = rtc[ResultType.RelevantResults]) retResults.Load(relevantResults, LoadOption.OverwriteChanges); foreach (DataRow row in retResults.Rows) { if (!row["Path"].ToString().EndsWith(".aspx")) //if (row["ContentType"].ToString() == "Item") { using ( SPSite lookupSite = new SPSite(row["Path"].ToString())) { using (SPWeb web = lookupSite.OpenWeb()) { SPFile file = web.GetFile(row["Path"].ToString()); items.Add(file.Item); } } } } } } //using ends here }); return items; }

    Read the article

  • Problem when trying to configure enterprise library 5.0 (Data Access Application Block)

    - by Phil
    Hi There Stackoverflow, I am running into some problems while trying to get DAAB from Enterprise library 5.0 running. I have followed the steps as per the tutorial, but am getting errors... 1) Download / install enterprise library 2) Add references to the blocks I need (common / data) 3) Imports Imports Microsoft.Practices.EnterpriseLibrary.Common Imports Microsoft.Practices.EnterpriseLibrary.Data 4) Through the enterprise library config software. I open up the web.config from my site. I then click Blocks, then Add data settings... fill in my details and save / close 5) I then (thinking setup is complete) try to get an instance of the database via Dim db As Database = DatabaseFactory.CreateDatabase() 6) I compile and receive the following error: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (C:\site\web.config line 4) Line 4 off my web.config was generated by the config tool and is: <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /> Am I missing a required step? Have I done the steps in the wrong order? Have I made a mistake? Thanks a lot for the assistance.

    Read the article

  • Problems using a library in Xcode

    - by Pablo
    Hi! I'm actually developping an application for iPhone and I need to use a library, initially dedicated to a Linux environment. Since I'm using a Mac (with Snow Leopard and Intel Core Duo), I guess it's possible to use this library in my app. My library has 3 files: a file .h, a file .a and a file .so (both .a and .so are in /Developer/usr/lib). In addition I have included the .h i nmy code and I've added the .a in XCode has a framework (and it works because XCode find the .so compiling). For your info when I use the command "file" for the file .so, I have: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped When I compile for the Xcode Simulator, I have a warning and an error. The warning is: In /Developer/usr/lib/mylib.so, file was built for unsupported file format which is not the architecture being linked (i386) The error is: "_mylib_fct", referenced from: -[MyAppAppDelegate applicationDidBecomeActive:] in MyAppAppDelegate.o Symbol(s) not found Collect2: ld returned 1 exit status When I compile for the Device 3.0 with architecture arm6, I also have the same error, but the warning is quite different: ln /Users/Pablo/MyApp/mylib.a file is not of required architecture I try to solve this and make the app working with this lib since days, and I don't understand why the compiler is complaining... is it a 32/64 bits issues ? How can I deal with that ? Your help will be very appreciated. Thx!

    Read the article

  • make arm architecture c library in mac

    - by gamegamelife
    I'm trying to make my own c library in Mac and include it to my iphone program. The c code is simple , like this: math.h: int myPow2(int); math.c: #include "math.h" int myPow2(int num) { return num*num; } I search how to make the c library file ( .a or .lib ..etc) seems need to use gcc compiler (Is there other methods?) so I use this command: gcc -c math.c -o math.o ar rcs libmath.a math.o And include it in iPhone Project. Now it has the problem when build xcode iphone project. "file was built for unsupported file format which is not the architecture being linked" I found some pages discuss about the problem, but no detail how to make the i386/arm architecture library. And I finally use this command to do it: gcc -arch i386 -c math.c -o math.o /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 -c math.c -o math.o I dont know if this method is correct? Or there has another method to do it?

    Read the article

  • Creating a Document Library with Content Type in code

    - by David Jacobus
    Originally posted on: http://geekswithblogs.net/djacobus/archive/2013/10/15/154360.aspxIn the past, I have shown how to create a list content type and add the content type to a list in code.  As a Developer, many of the artifacts which we create are widgets which have a List or Document Library as the back end.   We need to be able to create our applications (Web Part, etc.) without having the user involved except to enter the list item data.  Today, I will show you how to do the same with a document library.    A summary of what we will do is as follows:   1.   Create an Empty SharePoint Project in Visual Studio 2.   Add a Code Folder in the solution and Drag and Drop Utilities and Extensions Libraries to the solution 3.   Create a new Feature and add and event receiver  all the code will be in the event receiver 4.   Add the fields which will extend the built-in Document content type 5.   If the Content Type does not exist, Create it 6.   If the Document Library does not exist, Create it with the new Content Type inherited from the Document Content Type 7.   Delete the Document Content Type from the Library (as we have a new one which inherited from it) 8.   Add the fields which we want to be visible from the fields added to the new Content Type   Here we go:   Create an Empty SharePoint Project in Visual Studio      Add a Code Folder in the solution and Drag and Drop Utilities and Extensions Libraries to the solution       The Utilities and Extensions Library will be part of this project which I will provide a download link at the end of this post.  Drag and drop them into your project.  If Dragged and Dropped from windows explorer you will need to show all files and then include them in your project.  Change the Namespace to agree with your project.   Create a new Feature and add and event receiver  all the code will be in the event receiver.  Here We added a new Feature called “CreateDocLib”  and then right click to add an Event Receiver All of our code will be in this Event Receiver.  For this Demo I will only be using the Feature Activated Event.      From this point on we will be looking at code!    We are adding two constants for use columGroup (How we want SharePoint to Group them, usually Company Name) and ctName(ContentType Name)  using System; using System.Runtime.InteropServices; using System.Security.Permissions; using Microsoft.SharePoint; namespace CreateDocLib.Features.CreateDocLib { /// <summary> /// This class handles events raised during feature activation, deactivation, installation, uninstallation, and upgrade. /// </summary> /// <remarks> /// The GUID attached to this class may be used during packaging and should not be modified. /// </remarks> [Guid("56e6897c-97c4-41ac-bc5b-5cd2c04f2dd1")] public class CreateDocLibEventReceiver : SPFeatureReceiver { const string columnGroup = "DJ"; const string ctName = "DJDocLib"; } }     Here we are creating the Feature Activated event.   Adding the new fields (Site Columns) ,  Testing if the Content Type Exists, if not adding it.  Testing if the document Library exists, if not adding it.   #region DocLib public override void FeatureActivated(SPFeatureReceiverProperties properties) { using (SPWeb spWeb = properties.GetWeb() as SPWeb) { //add the fields addFields(spWeb); //add content type SPContentType testCT = spWeb.ContentTypes[ctName]; // we will not create the content type if it exists if (testCT == null) { //the content type does not exist add it addContentType(spWeb, ctName); } if ((spWeb.Lists.TryGetList("MyDocuments") == null)) { //create the list if it dosen't to exist CreateDocLib(spWeb); } } } #endregion The addFields method uses the utilities library to add site columns to the site. We can add as many fields within this method as we like. Here we are adding one for demonstration purposes. Icon as a Url type.  public void addFields(SPWeb spWeb) { Utilities.addField(spWeb, "Icon", SPFieldType.URL, false, columnGroup); }The addContentType method add the new Content Type to the site Content Types. We have already checked to see that it does not exist. In addition, here is where we add the linkages from our site columns previously created to our new Content Type   private static void addContentType(SPWeb spWeb, string name) { SPContentType myContentType = new SPContentType(spWeb.ContentTypes["Document"], spWeb.ContentTypes, name) { Group = columnGroup }; spWeb.ContentTypes.Add(myContentType); addContentTypeLinkages(spWeb, myContentType); myContentType.Update(); } Here we are adding just one linkage as we only have one additional field in our Content Type public static void addContentTypeLinkages(SPWeb spWeb, SPContentType ct) { Utilities.addContentTypeLink(spWeb, "Icon", ct); } Next we add the logic to create our new Document Library, which we have already checked to see if it exists.  We create the document library and turn on content types.  Add the new content type and then delete the old “Document” content types.   private void CreateDocLib(SPWeb web) { using (var site = new SPSite(web.Url)) { var web1 = site.RootWeb; var listId = web1.Lists.Add("MyDocuments", string.Empty, SPListTemplateType.DocumentLibrary); var lib = web1.Lists[listId] as SPDocumentLibrary; lib.ContentTypesEnabled = true; var docType = web.ContentTypes[ctName]; lib.ContentTypes.Add(docType); lib.ContentTypes.Delete(lib.ContentTypes["Document"].Id); lib.Update(); AddLibrarySettings(web1, lib); } }  Finally, we set some document library settings on our new document library with the AddLibrarySettings method. We then ensure that the new site column is visible when viewed in the browser.  private void AddLibrarySettings(SPWeb web, SPDocumentLibrary lib) { lib.OnQuickLaunch = true; lib.ForceCheckout = true; lib.EnableVersioning = true; lib.MajorVersionLimit = 5; lib.EnableMinorVersions = true; lib.MajorWithMinorVersionsLimit = 5; lib.Update(); var view = lib.DefaultView; view.ViewFields.Add("Icon"); view.Update(); } Okay, what's cool here: In a few lines of code, we have created site columns, A content Type, a document library. As a developer, I use this functionality all the time. For instance, I could now just add a web part to this same solutionwhich uses this document Library. I love SharePoint! Here is the complete solution: Create Document Library Code

    Read the article

  • How to design a C / C++ library to be usable in many client languages?

    - by Brian Schimmel
    I'm planning to code a library that should be usable by a large number of people in on a wide spectrum of platforms. What do I have to consider to design it right? To make this questions more specific, there are four "subquestions" at the end. Choice of language Considering all the known requirements and details, I concluded that a library written in C or C++ was the way to go. I think the primary usage of my library will be in programs written in C, C++ and Java SE, but I can also think of reasons to use it from Java ME, PHP, .NET, Objective C, Python, Ruby, bash scrips, etc... Maybe I cannot target all of them, but if it's possible, I'll do it. Requirements It would be to much to describe the full purpose of my library here, but there are some aspects that might be important to this question: The library itself will start out small, but definitely will grow to enormous complexity, so it is not an option to maintain several versions in parallel. Most of the complexity will be hidden inside the library, though The library will construct an object graph that is used heavily inside. Some clients of the library will only be interested in specific attributes of specific objects, while other clients must traverse the object graph in some way Clients may change the objects, and the library must be notified thereof The library may change the objects, and the client must be notified thereof, if it already has a handle to that object The library must be multi-threaded, because it will maintain network connections to several other hosts While some requests to the library may be handled synchronously, many of them will take too long and must be processed in the background, and notify the client on success (or failure) Of course, answers are welcome no matter if they address my specific requirements, or if they answer the question in a general way that matters to a wider audience! My assumptions, so far So here are some of my assumptions and conclusions, which I gathered in the past months: Internally I can use whatever I want, e.g. C++ with operator overloading, multiple inheritance, template meta programming... as long as there is a portable compiler which handles it (think of gcc / g++) But my interface has to be a clean C interface that does not involve name mangling Also, I think my interface should only consist of functions, with basic/primitive data types (and maybe pointers) passed as parameters and return values If I use pointers, I think I should only use them to pass them back to the library, not to operate directly on the referenced memory For usage in a C++ application, I might also offer an object oriented interface (Which is also prone to name mangling, so the App must either use the same compiler, or include the library in source form) Is this also true for usage in C# ? For usage in Java SE / Java EE, the Java native interface (JNI) applies. I have some basic knowledge about it, but I should definitely double check it. Not all client languages handle multithreading well, so there should be a single thread talking to the client For usage on Java ME, there is no such thing as JNI, but I might go with Nested VM For usage in Bash scripts, there must be an executable with a command line interface For the other client languages, I have no idea For most client languages, it would be nice to have kind of an adapter interface written in that language. I think there are tools to automatically generate this for Java and some others For object oriented languages, it might be possible to create an object oriented adapter which hides the fact that the interface to the library is function based - but I don't know if its worth the effort Possible subquestions is this possible with manageable effort, or is it just too much portability? are there any good books / websites about this kind of design criteria? are any of my assumptions wrong? which open source libraries are worth studying to learn from their design / interface / souce? meta: This question is rather long, do you see any way to split it into several smaller ones? (If you reply to this, do it as a comment, not as an answer)

    Read the article

  • Getting many files from a SharePoint Document Library the easy way

    - by Stacy Vicknair
    As an individual who does not use Internet Explorer as their primary browser, there is a great feature that you may never notice that allows you to easily copy files to and from a document library: the Open in Windows Explorer link. In browsers such as Chrome or Firefox this link may not appear. I know this isn’t a major groundbreaking feature, but it’s really easy to overlook and it’s worth knowing about, especially when you need to create a local copy of a full document library. In this quick blog we’ll go over how to access this feature in both SharePoint 2007 and 2010. First, make sure you are in Internet Explorer. These options may not show in other browsers. In SharePoint 2007, browse to the document library you would like to access then select Actions > Open with Windows Explorer. In SharePoint 2010, browse to the document library you would like to access then select Library Tools > Library > Open with Explorer from the ribbon.

    Read the article

  • How to get the Ansinerator library to work?

    - by konzepz
    I'm trying to get the Ansinerator library to work my on my localhost, but something's amiss. I'm receiving the following errors: Notice: Undefined index: hash in ansi.php on line 23 Notice: Undefined index: aml in ansi.php on line 37 Notice: Undefined variable: PNG_DESTRUCT in ansi.php on line 119 Notice: Undefined offset: -1 in ansi.php on line 362 Notice: Trying to get property of non-object in ansi.php on line 362 Notice: Undefined variable: links in ansi.php on line 459 Notice: Trying to get property of non-object in ansi.php on line 677 Notice: Undefined variable: links in ansi.php on line 459 Notice: Undefined variable: map_link in ansi.php on line 687 Any idea where am I going wrong with this one? I've installed the php-gd library, restarted the server, and while runs perfectly on production server, localhost will refuse. Ideas? Thank you.

    Read the article

  • Does Objective-C have a Standard Library?

    - by Roman A. Taycher
    Most somewhat modern programming languages have a standard library? It is my impression is that there isn't a decent sized standard library for Obj-C , rather that it relies mostly/all on Cocoa and that (plus people not wanting to use GNUstep) is why Obj-C is only used on macs)? Is this true/to what extent? Are there any standard obj-c collections? (note I haven't done any Obj-C programming and am not to likely to try it in the near future, I'm just curious). P.S. are there a any decent non-Cocoa/Gnustep Libraries? are they non-apple, are they open source, well documented?

    Read the article

  • Lightweight PHP library alternative to common frameworks

    - by artarad
    Hi hi, I'm looking for a easy to learn php library to use for my coming web app project. I've recently finished a web app with fully handwritten raw php code and it's absolutely hard to be done again for another project. even though I have the recent project code snippets to be used again, but due to their non-structural arrangement (not object oriented), i have no passion to use 'em again. I have no experience with common frameworks like ZF, CakePhp, CodeIgniter, so I think to get my hands on a multipurpose OO library for my web app and the framework learning will be the next step! any suggestion? UPDATE: Many thanks guys, I have not enough time to get through the depth of every lib or framework you have kindly introduced. Since I'm going one step further I'm going to use ZF as famous framework which could provide me more job opportunities perhaps. thankssss :)

    Read the article

  • Cannot figure out how to take in generic parameters for an Enterprise Framework library sql statemen

    - by KallDrexx
    I have written a specialized class to wrap up the enterprise library database functionality for easier usage. The reasoning for using the Enterprise Library is because my applications commonly connect to both oracle and sql server database systems. My wrapper handles both creating connection strings on the fly, connecting, and executing queries allowing my main code to only have to write a few lines of code to do database stuff and deal with error handling. As an example my ExecuteNonQuery method has the following declaration: /// <summary> /// Executes a query that returns no results (e.g. insert or update statements) /// </summary> /// <param name="sqlQuery"></param> /// <param name="parameters">Hashtable containing all the parameters for the query</param> /// <returns>The total number of records modified, -1 if an error occurred </returns> public int ExecuteNonQuery(string sqlQuery, Hashtable parameters) { // Make sure we are connected to the database if (!IsConnected) { ErrorHandler("Attempted to run a query without being connected to a database.", ErrorSeverity.Critical); return -1; } // Form the command DbCommand dbCommand = _database.GetSqlStringCommand(sqlQuery); // Add all the paramters foreach (string key in parameters.Keys) { if (parameters[key] == null) _database.AddInParameter(dbCommand, key, DbType.Object, null); else _database.AddInParameter(dbCommand, key, DbType.Object, parameters[key].ToString()); } return _database.ExecuteNonQuery(dbCommand); } _database is defined as private Database _database;. Hashtable parameters are created via code similar to p.Add("@param", value);. the issue I am having is that it seems that with enterprise library database framework you must declare the dbType of each parameter. This isn't an issue when you are calling the database code directly when forming the paramters but doesn't work for creating a generic abstraction class such as I have. In order to try and get around that I thought I could just use DbType.Object and figure the DB will figure it out based on the columns the sql is working with. Unfortunately, this is not the case as I get the following error: Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query Is there any way to use generic parameters in a wrapper class or am I just going to have to move all my DB code into my main classes?

    Read the article

  • Lightweight PHP library alternative to common MVC frameworks

    - by artarad
    Hi hi, I'm looking for a easy to learn php library to use for my coming web app project. I've recently finished a web app with fully handwritten raw php code and it's absolutely hard to be done again for another project. even though I have the recent project code snippets to be used again, but due to their non-structural arrangement (not object oriented), i have no passion to use 'em again. I have no experience with common frameworks like ZF, CakePhp, CodeIgniter, so I think to get my hands on a multipurpose OO library for my web app and the framework learning will be the next step! any suggestion? UPDATE: Many thanks guys, I have not enough time to get through the depth of every lib or framework you have kindly introduced. Since I'm going one step further I'm going to use ZF as famous framework which could provide me more job opportunities perhaps. thankssss :)

    Read the article

  • custom DB logging using enterprise library 4.1

    - by Rohit
    We have to create a historical log of all the changed entities. we have defined our custom tables for this purpose. I have to incorporate this tables in Enterprise library logging block and do logging in these tables. I need to write a SP to insert values to these tables. Till now,what i have got from google is that i have to create a listener inheriting from CustomTraceListener and give my implementation of WriteMessage. What i need to know is,how will i plug my tables and SP in Enterprise library logging block.

    Read the article

  • import existing source code as referenced library in eclipse

    - by user555174
    I have some source codes from a friend that I would like to use as referenced library in my BlackBerry project. I'm not sure about how to package the source codes into a .jar file. I tried exporting the source to a JAR file and import it as external JAR in my project, it's giving me missing stack map error. I tried to preverify the .jar file generated from the source using the provided preverification tool from BlackBerry JDE, it didn't give me any output folder. In fact, I'm not sure if the way I export the source is correct. Can anyone provide step-by-step instructions on how to package existing source code into a valid JAR file that can be imported into my project as a referenced library? Again, I'm using eclipse. Thanks very much in advance.

    Read the article

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