Daily Archives

Articles indexed Wednesday April 28 2010

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

  • Problems with WCF endpoints hosted from Windows Service

    - by Dilip
    I have a managed Windows Service that hosts a couple of WCF endpoints. The service is set to start automatically when the PC is restarted. On reboot I find that this line of code: ServiceHost wcfHost1 = new ServiceHost(typeof(WCFHost1)); in the OnStart() method of the service takes somewhere between 15 - 20 seconds to execute. Actually I have two such statements but the second one executes in a flash. It is the first one that takes so long. Does anyone know what could be causing the bottleneck? Because of this, sometimes the call exceeds 30 seconds and as a result the SCM thinks my service timed out while trying to initialize itself. Now, I know its easy for me to just spin off a thread to do this and return from OnStart() right away but I'd like to know what could cause this delay. This happens only when the service starts up on PC reboot. If the PC is up and running, the service starts & stops in less than a second.

    Read the article

  • How do I add a comment to an image using jQuery

    - by marcamillion
    So I am trying to replicate Facebook's picture tagging functionality, and I have the functionality that onClick, a box is created and there is a comment box. Now the issue is that I want to be able to (without doing any back-end processing) take the input from the input field and add it in some form to the underlying image area that they have selected. I would also like to add a small image to that area, that shows that a comment is there. How do I do that? See the code below for what I have for the comment box: <script type="text/javascript"> $(function() { var tag_box = $("<div>").appendTo("body").css({ "width": "40px", "height":"40px", "border":"4px solid #000000", "position":"absolute", "display":"none", "padding":"15px" }); var comment_box = $("<form action='#'><input id='comment' type='text' name='comment' placeholder='Add comment'></form>").appendTo(tag_box).css({"position":"absolute"}); $("#image-wrapper").live('click', function(e){ tag_box.css({ "left": e.pageX - 40, "top": e.pageY - 40, "display": "block" }) .after(comment_box.css({ "left": e.pageX - 65, "top": e.pageY + 40 })); }); }); </script> Now...whenever the user presses enter, the info in the comment box is appended to the URL like so: .html?comment=comment value# Thanks

    Read the article

  • Sorting array of structs

    - by mrblippy
    Hi, i am having trouble making a method to sort an array of structs. i am tring to sort them in ascending order based on classcode. any help you could give would be appreciated struct unit { char classcode[4]; char *classname; }; void insertion_sort(struct unit u[], int n) { int j, p; struct unit tmp[1]; for(p = 1; p < n; p++) { tmp[0] = u[p]; for(j = p; j > 0 && (strcmp(tmp[j-1].classcode, tmp[p].classcode) > 0); j--) u[j] = u[j-1]; u[j] = tmp[0]; } }

    Read the article

  • How to preprocess text to do OCR error correction

    - by eaglefarm
    Here is what I'm trying to accomplish: I need to get a several large text files from a computer that is not networked and has no other output except a printer. I tried printing the text, then scanning the printout with OCR to recover the text on another computer but the OCR gets lots of errors (1 vs l, o vs 0, O vs D, etc). To solve this I am thinking of writing a program to process (annotate?) the text file, before printing it, so that the errors can be corrected from the text output of the OCR program. For example, for 1 (number one) vs l (letter L), I could change the text like this: sample inserting \nnn after characters that are frequently wrong in the OCR results: sampl\108e Then I can write another program to examine the file, looking for \nnn and check the character before the \nnn (where nnn is the ascii code in decimal) and fix it if necessary. Of course the program will have to recognize that the \nnn may have errors too but at least it knows that the nnn are digits and can easily correct them. I think I would add a CRC on each line so that any line that isn't corrected perfectly can be flagged as having a problem. Has anyone done anything like this? If there is an existing way of doing this I'd rather not reinvent the wheel. Or any suggestions for annotation format that would help solve this problem would be helpful too.

    Read the article

  • GHC 6.12 and MacPorts

    - by absz
    I recently installed GHC 6.12 and the Haskell Platform 2010.1.0.1 on my Intel MacBook running OS X 10.5.8, and initially, everything worked fine. However, I discovered that if I use cabal install to install a package which depends on a MacPorts library (e.g., cabal install --extra-lib-dirs=/opt/local/lib --extra-include-dirs=/opt/local/include gd), things work fine in GHCi, but if I try to compile, I get the error Linking test ... Undefined symbols: "_iconv_close", referenced from: _hs_iconv_close in libHSbase-4.2.0.0.a(iconv.o) "_iconv", referenced from: _hs_iconv in libHSbase-4.2.0.0.a(iconv.o) "_iconv_open", referenced from: _hs_iconv_open in libHSbase-4.2.0.0.a(iconv.o) ld: symbol(s) not found collect2: ld returned 1 exit status After some Googling, I found a long Haskell-cafe thread discussing this problem. The upshot seems to be that MacPorts installs an updated version of libiconv, and the binary interface is slightly different from the version included with the system. Consequently, if you try to link with any MacPorts library, the MacPorts libiconv gets linked in too; and since the base library was built to link against a different version of libiconv, things break. I've tried setting LD_LIBRARY_PATH and DYLD_LIBRARY_PATH and adding more flags to try to get it to look at /usr/lib again (e.g. cabal install --extra-lib-dirs=/opt/local/lib --extra-include-dirs=/opt/local/include --extra-lib-dirs=/usr/lib --extra-include-dirs=/usr/include gd), but neither worked. Uninstalling the MacPorts libiconv isn't really an option, since I have a bunch of ports installed which depend on it---including some ports I want Haskell to link to, like gd2. From what I've seen online, the upshot really seems to be "you're boned": you cannot link against any MacPorts library while compiling with GHC, and there doesn't seem to be a solution. However, that thread was from the end of 2009, so I figure there's a chance that someone has a solution, workaround, ridiculous hack… anything, really. So: does anybody know how to get GHC 6.12 to link against the system libiconv at the same time as it links to libraries from MacPorts? Or, failing that, a way to make linking not break in some other clever way?

    Read the article

  • How to get the actual address of a pointer in C?

    - by Airjoe
    BACKGROUND: I'm writing a single level cache simulator in C for a homework assignment, and I've been given code that I must work from. In our discussions of the cache, we were told that the way a small cache can hold large addresses is by splitting the large address into the position in the cache and an identifying tag. That is, if you had an 8 slot cache but wanted to store something with address larger than 8, you take the 3 (because 2^3=8) rightmost bits and put the data in that position; so if you had address 22 for example, binary 10110, you would take those 3 rightmost bits 110, which is decimal 5, and put it in slot 5 of the cache. You would also store in this position the tag, which is the remaining bits 10. One function, cache_load, takes a single argument, and integer pointer. So effectively, I'm being given this int* addr which is an actual address and points to some value. In order to store this value in the cache, I need to split the addr. However, the compiler doesn't like when I try to work with the pointer directly. So, for example, I try to get the position by doing: npos=addr%num_slots The compiler gets angry and gives me errors. I tried casting to an int, but this actually got me the value that the pointer was pointing to, not the numerical address itself. Any help is appreciated, thanks!

    Read the article

  • wp_get_archives(cat=id) <-- Any way to specifiy cat id in archives?

    - by Matrym
    Does anyone know how to specify an INCLUDE ONLY category using wp_get_archives? I would like to specify a category but then list results by month. I've tried kwebble's plugin to no avail. I've also found the following on WP forums, but it appears to only exclude categories. Perhaps it can be modified to do include? Even given that, I'm not sure how I would call it... Thanks in advance! add_filter( 'getarchives_where', 'customarchives_where' ); add_filter( 'getarchives_join', 'customarchives_join' ); function customarchives_join( $x ) { global $wpdb; return $x . " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)"; } function customarchives_where( $x ) { global $wpdb; $exclude = '1'; // category id to exclude return $x . " AND $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->term_taxonomy.term_id NOT IN ($exclude)";

    Read the article

  • CodePlex Daily Summary for Tuesday, April 27, 2010

    CodePlex Daily Summary for Tuesday, April 27, 2010New ProjectsActive Directory User Properties Change: A complete application in VS 2005 and VB.NET, for Request Request in User Details in Active Directory, with flow to HR and then to IT for approval ...AVR Terminal: A Windows application for connecting to an AVR via RS232 serial or USB-to-COM FTDI ports. Works on Arduino, Bare Bones Board, and any custom board...Battle Droids: AVR-based Network Combat!: A Battle Droid is an AVR® microcontroller running the BattleDroid firmware. This firmware turns your AVR into a lean, mean, fighting machine, and ...Camp Foundation: Camp Foundationchakma: chakma is a question - answer based web application to make people get questions from anybody around the world and being able to answer them. c...Document.Editor: Document.Editor is a multitab text editor for Windows. It includes plain and rich text format support, multi tab interface so you can edit multiple...Dot Net Marche Music Store Demo Application: This is a demo application that the DotNetMarche user gorup (www.dotnetmarche.org) use to make experiments and prepare demos for our workshopselivators: a monitor which enables the user to view the movement of the elivators in a buildingExtended SSIS Package Execute: The SSIS package execute task is flawed as it does not support passing variables. Here we have a custom task that will pass items in a dataflow as...File tools: File toolsFileExplorer.NET: FileExplorer.NET is a .net usercontrol which tries to mimic the Windows FileExplorer treeview.Kazuku: ASP.NET MVC 2 Content Management SystemKSharp Ajax Control Toolkit Library: Built ontop of the Microsoft ASP.NET Ajax Control Toolkit, this library offers enhanced versions of the controls found in the Ajax Control Toolkit....Nitrous - An Aspx ViewEngine for ASP.NET MVC: Near drop-in replacement ASP.NET ViewEngine for MVC.Open Data Protocol - Client Libraries: This is an Open Source release of the .NET and Silverlight Client Libraries for the Open Data Protocol (OData). For more information on odata, see ...ORAYLIS BI.SmartDiff: BI.SmartDiff is a helper to connect the functionality of BIDS Helper – SmartDiff to TortoiseSVN. BIDS Helper – SmartDiff helps you to get more read...RicciWebSiteSystem: soon websiteSynapse:Silverlight A Simple Silverlight Framework: Synapse:Silverlight is a simplified framework for Silverlight. It's purpose is to help developers and designers produce basic LOB solutions that do...TestProjectMB: Testing Team Foundation ServerThoughtWorks Cruise Notification Interceptor: Cruise notification interceptorThreadSafeControls: ThreadSafeControls is a C# project that greatly simplifies the process of transitioning Windows Forms applications to a multithreaded environment b...Unscrambler: Unscrambler is a multitouch WPF word game built with MVVM Light in order to show how to use the touch maniupation and inertia features included in ...Web Utilities: web utilitiesNew Releases7zbackup - PowerShell Script to Backup Files with 7zip: 7zBackup v. 1.7.1 Stable: Bug Solved : Presence of junction.exe is wrongly referred to 7z.exeAVR Terminal: AVR Terminal v0.2: Here is an Alpha-almost-BETA release of the AVR Terminal. That being said, I use it almost daily and it shouldn't break anything on your system, b...Bistro FSharp Extensions: 0.9.7.0: This is the VS 2010 release of BistroFS extensions. This release focused on usability, adding key functionality such as resource aliasing and secur...Bojinx: Bojinx Dialog Management V1.0: Stable release of the Bojinx Dialog Management library.BOWIE: BOWIE 2010: This new version works on Outlook 2007/2010 and TFS 2008/2010 RTM. Details about all features in this version on the Home Page : http://bowie.code...Catharsis: Catharsis 2.5 on catarsa.com: The Catharsis framework has finally its own portal http://catarsa.com Example - documented steps to create Web-Application http://catarsa.com/Arti...Colorful Expression: Expression Blend 3: Alpha Version, Read Issues and Installing! Colorful Expression is an add-in for Expression Blend and Expression Design that brings you the Adobe K...Colorful Expression: Expression Blend 4: Read Issues and Installing! Colorful Expression is an add-in for Expression Blend and Expression Design that brings you the Adobe Kuler and ColorLo...Courier: Version 1.0: This release includes integration with the Reactive Framework for more elegant message handling and allowing more succinct client code. Full suite...CRM 4.0 Contract Utilities: Release 1.0: Project Description List of Contract Utilities (i.e. custom workflow actions) 1. Change contract status from Active to Draft 2. Copy Contract (with...Document.Editor: 0.9.0: Whats New?: New icon set Bug fix'sDotNetNuke® Blog: 04.00.00: Minimum Required DNN Version: 4.06.02General Code organization * Converted project to .NET 3.5 * Converted solution to Visual Stud...EPiAbstractions: EPiAbstractions 1.2: Updated for EPiServer CMS 6. Only features abstractions for EPiServer CMS. For abstractions for EPiServer.Common and EPiServer.Community use versio...Fluent ViewModel Configuration for WPF (MVVM): FluentViewModel Alpha2: Added support for view model validation using FluentValidation (http://fluentvalidation.codeplex.com/) Fixed exception from Blend while in design...GArphics: Beta v0.9: Beta v0.9. Practically all of the planned features have been implemented and are available to the users. For the version 1.0 mainly just some minor...HTML Ruby: 6.22.2.1: Fixed a bug where HTML Ruby's options window will generate entries in the error log when applying option changes (regression from 6.21.8)HTML Ruby: 6.22.3: Add/remove stop spacing event listener as needed for possible fix to 4620iTuner - The iTunes Companion: iTuner 1.2.3768 Beta 3b: Beta 3 requires iTunes 9.1.0.79 or later A Librarian status panel showing active and queued Librarian scanners. This will be hidden behind the "bi...LiveUpload to Facebook: LiveUpload to Facebook 3.2.3: Version 3.2.3Become a fan on Facebook! Features Quickly and easily upload your photos and videos to Facebook, including any people tags added in W...Maintainance Schedule: Maintenance Scheduler: The first Alpha release of the project.NetSockets: NetSockets (1.2): The NetSockets library (DLL)NSIS Autorun: NSIS Autorun 0.1.2: NSIS Autorun 0.1.1 This release includes source code, application binary, and example materials.OpenSceneGraph glsl samples: OsgGlslSamples Win32 binaries: Project binary release for Windows. The effects shown are: Ambient Occlusion, Depth of Field, DoF with alpha channel, Fire effects, HDR, Light Ma...ORAYLIS BI.SmartDiff: ORAYLIS BI.SmartDiff 0.6.1: First public versionpatterns & practices - Windows Azure Guidance: Code Drop 4 - Content Complete: This release includes documentation and all code samples intended for this first guide. As before, this code release builds on the previous one an...Pex Custom Arithmetic Solver: Custom Solver Package: This is the custom solvers packaged together. To use simply include the dll in your project and add [assembly: PexCustomArithmeticSolver] to your P...PokeIn Comet Ajax Library: PokeIn v08 x86: New FeatureFrom this version forward, PokeIn will define a way between the main page and client side automaticly based to security level. Add "pub...Proxi [Proxy Interface]: Proxi Release 1.0.0.426: Proxi Release 1.0.0.426QuestTracker: QuestTracker 0.3: This release includes recurring quests! Now you can set a quest to uncomplete itself every X minutes, hours, or days! And the quests still retain t...Rensea Image Viewer: RIV 0.4.5: RIV Fix Version. You would need .NET Framework 4.0 to make it run RIVU Improved Version. With separated RIV up-loader, to upload images to Renjian...SCC Switch Provider: Provides a GUI to Switch Source Code Control Provi: Transferred from GotDotNet Workplace. Initial public Release. Downloaded ~922 times from original post.sTASKedit: sTASKedit v0.7a (Alpha): + Fixed: XOR text encoding + Fixed: adding timed rewards missing values + Fixed: occupations in clone()Synapse:Silverlight A Simple Silverlight Framework: Synapse Silverlight Alpha Release: Initial Road-map is being defined.ThoughtWorks Cruise Notification Interceptor: 1.0.0: Initial release.UDC indexes parser: UDC indexex parser Beta 2: Добавлена возможность работать с распределением определителей как если бы генератор был бы LALR(2) То что осталось: Если текстовое дополнение начи...Unscrambler: Release 1.0: Here's the first release of Unscrambler.WinXound: WinXound 3.3.0 Beta 2 for Mac OsX: New: Code Repository (for UDO and personal code) New: Format Code - Added the ability to format only the selected text of the code New: Explore...WPF Inspirational Quote Management System: Release 1.2.2: - Fixed issue some users were having when the application is minimised.Most Popular ProjectsRawrWBFS ManagerAJAX Control ToolkitSilverlight Toolkitpatterns & practices – Enterprise LibraryMicrosoft SQL Server Product Samples: DatabaseWindows Presentation Foundation (WPF)ASP.NETMicrosoft SQL Server Community & SamplesPHPExcelMost Active Projectspatterns & practices – Enterprise LibraryRawrGMap.NET - Great Maps for Windows Forms & PresentationParticle Plot PivotBlogEngine.NETNB_Store - Free DotNetNuke Ecommerce Catalog ModuleFarseer Physics EngineIonics Isapi Rewrite FilterN2 CMSDotNetZip Library

    Read the article

  • Cocoa @sum array operator too slow - alternatives?

    - by icodestuff
    I've got a text field value bound to a key path that uses @sum. When the array controller is filtered, the text field updates properly, but extremely slowly, lagging the UI or outright beachballing after every key press (less so as the number of items in arrangedObjects decreases). There is no lag if I don't use @sum; I've narrowed it down to this. Is there a faster way to do the same thing?

    Read the article

  • When does printf("%s", char*) stop printing?

    - by remagen
    In my class we are writing our own copy of C's malloc() function. To test my code (which can currently allocate space fine) I was using: char* ptr = my_malloc(6*sizeof(char)); memcpy(ptr, "Hello\n", 6*sizeof(char)); printf("%s", ptr); The output would typically be this: Hello Unprintable character Some debugging figured that my code wasn't causing this per say, as ptr's memory is as follows: [24 bytes of meta info][Number of requested bytes][Padding] So I figured that printf was reaching into the padding, which is just garbage. So I ran a test of: printf("%s", "test\nd"); and got: test d Which makes me wonder, when DOES printf("%s", char*) stop printing chars?

    Read the article

  • Two Questions about the WebBrowser Control

    - by Rudi
    How can I get an HtmlElement if the source code doesn't have the "id=''", but only has the "name=''". Document.GetElementById() doesn't work, and Document.All[""] doesn't work (obviously, because there is no ID. How can I simulate a form post? Question 1 is more important because I found it harder to search. Question 2 I think i can get with more searching.

    Read the article

  • Do Hibernate table classes need to be Serializable?

    - by Scott Leis
    I have inherited a Websphere Portal project that uses Hibernate 3.0 to connect to a SQL Server database. There are about 130 Hibernate table classes in this project. They all implement Serializable. None of them declare a serialVersionUID field, so the Eclipse IDE shows a warning for all of these classes. Is there any actual need for these classes to implement Serializable? If so, is there any tool to add a generated serialVersionUID field to a large number of classes at once (just to make the warnings go away) ?

    Read the article

  • writing to existing workbook using xlwt

    - by Raj N
    I am unable to find examples where xlwt is used to write into existing files. I have a existing xls file that I need to write to. When I use xlrd to read the file, I cant seem to figure out how to transform the "Book" type returned into a xlwt.Workbook. I would appreciate if someone can point me to an example.

    Read the article

  • Playing with bytes...need to convert from java to C#

    - by ibiza
    Hi fellow programmers, I am not used to manipulate bytes in my code and I have this piece of code that is written in Java and I would need to convert it to its C# equivalent : protected static final int putLong(final byte[] b, final int off, final long val) { b[off + 7] = (byte) (val >>> 0); b[off + 6] = (byte) (val >>> 8); b[off + 5] = (byte) (val >>> 16); b[off + 4] = (byte) (val >>> 24); b[off + 3] = (byte) (val >>> 32); b[off + 2] = (byte) (val >>> 40); b[off + 1] = (byte) (val >>> 48); b[off + 0] = (byte) (val >>> 56); return off + 8; } Thanks in advance for all your help, I am looking forward to learn from this.

    Read the article

  • Android: Changing LinearLayout in a widget.

    - by Profete162
    Hello all, I have this really annoying problem: In my widget, i would like to change the background by code. I noticed on the Google doc than I can easily change the background of an Imageview: remoteViews.setImageViewResource(R.id.my_iv, R.drawable.my_bg); Ok, too easy, i want to change now the Linear layout.. What I read about the remoteview id that I can change a Bitmap, Int, Bool, String, etc... but not a drawable. So i guess i cannot use: remoteViews.setBitmap(R.id.my_ll,"setBackgroundDrawable",BitmapFactory.decodeResource(context.getResources(), R.drawablemy_bg)); I am totally disapointed and tried a last idea: views.setInt(R.id.my_ll,"setBackgroundResource",R.drawable.my_bg); But The logcat told me: android.widget.RemoteViews$ActionException:view: android.widget.LinearLayout can't use method with RemoteViews: setBackgroundResource(int) I am totally lost and I really don't know what to do... I would really appreciate any help. Thank a lot!

    Read the article

  • How can I distinguish between overlapping segments of text using HTML / jQuery?

    - by Siracuse
    Easy question, it is valid to have overlapping spans in html? Example: <span id="1">This is <span id="2"> some text </span> some other text </span> ^ ^ End1 End2 Edit: I see now that the spans closing tag would be ambiguous about which one it is closing, and that first </span> would close span id = 2, not 1 like I intended. My problem is, I have a block of text which I'm trying to highlight based on what the mouse hovers over. This block of text is composed of sections, some of which "overlap" eachother. I'm trying to use some jQuery and HTML to present this document so when I hover over the sections, the appropriate one will be highlighted. So, in my example above, the first span is meant to be ended with the first span close tag, and the second span is meant to be ended to with the second span close tag. This is because of the semantics of my document, these are two overlapping segments. I want it so when I hover to the left, it will only highlight up to span id = 1 and the first span close, if I hover between the two "overlapping" spans, it will highlight both of them, and if I hover to the right, it will highlight from span id=2 to the last span close. However, I'm starting to think this isn't possible. Is there any way I can distinguish segments of text in HTML that allows overlapping? So my jQuery script that highlights when I hover over different spans will highlight the correct portions. Should I alternate between div's and spans? Would that disambiguate what I'm closing then and allow me the do the proper highlighting with my jQuery hover script? I'm wondering about more than 2 segments overlapping now. Sigh, I wish I could just be explicate about what I'm closing.

    Read the article

  • Stack / base pointers in assembly

    - by flyingcrab
    I know this topic has been covered ad-naseum here, and other places on the internet - but hopefully the question is a simple one as I try to get my head around assembly... So if i understand correctly the ebp (base pointer) will point to the top of the stack, and the esp (stack pointer) will point to the bottom -- since the stack grows downward. esp therefore points to the 'current location'. So on a function call, once you've saved the ebp on the stack you insert a new stack frame - for the function. So in the case of the image below, if you started from N-3 you would go to N-2 with a function call. But when you are at N-2 - is your ebp == 25 and the esp == 24 (at least initially, before any data is placed on the stack)? Is this correct or am I of on a tangent here? Thanks!

    Read the article

  • iPhone Wait For Animation Ending

    - by paul simmons
    Hi, In an iPhone application, I try to catch animation endings using setAnimationDidStopSelector. I try to suspend code execution until animation ends. I have tried this; set a global BOOL variable, set it to TRUE before commiting animation and after commiting animations waited using a while loop. In the setAnimationDidStopSelector, set the BOOL variable to FALSE and hope while loop to break. But unluckily this did not work, the code did not even fall into setAnimationDidStopSelector (I check that with some trace outputs). What do you suggest?

    Read the article

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