Search Results

Search found 5180 results on 208 pages for 'outside'.

Page 157/208 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • FindByIdentity in System.DirectoryServices.AccountManagment Memory Issues

    - by MVC Fanatic
    I'm working on an active directory managament application. In addition to the typical Create A New User, Enable/Disable an account, reset my password etc. it also managages application permissions for all of the clients web applications. Application management is handled by thousands of AD groups such as which are built from 3 letter codes for the application, section and site, there are also hundreds of AD groups which determine which applications and locations a coordinator can grant rights to. All of these groups in turn belong to other groups so I typically filter the groups list with the MemberOf property to find the groups that a user directly belongs to (or everyone has rights to do everything). I've made extensive use of the System.DirectoryServices.AccountManagment namespace using the FindByIdentity method in 31 places throughout the application. This method calls a private method FindPrincipalByIdentRefHelper on the internal ADStoreCtx class. A SearchResultCollection is created but not disposed so eventually typically once or twice a day the web server runs out of memory and all of the applications on the web server stop responsing until iis is reset because the resources used by the com objects aren't ever relased. There are places where I fall back to the underlying directory objects, but there are lot of places where I'm using the properties on the Principal - it's a vast improvement over using the esoteric ad property names in the .Net 2.0 Directory services code. I've contacted microsoft about the problem and it's been fixed in .Net 4.0 but they don't currently have plans to fix it in 3.5 unless there is intrest in the community about it. I only found information about it in a couple of places the MDSN documentation in the community content state's there is a memory leak at the bottom (guess I should have read that before using the the method) http://msdn.microsoft.com/en-us/library/bb345628.aspx And the class in question is internal and doesn't expose SearchResultsCollection outside the offending method so I can't get at the results to dispose them or inherit from the class and override the method. So my questions are Has anyone else encountered this problem? If so were you able to work around it? Do I have any option besides rewriting the application not using any of the .Net 3.5 active directory code? Thanks

    Read the article

  • Visual Studio project using the Quality Center API remains in memory

    - by Traveling Tech Guy
    Hi, Currently developing a connector DLL to HP's Quality Center. I'm using their (insert expelative) COM API to connect to the server. An Interop wrapper gets created automatically by VStudio. My solution has 2 projects: the DLL and a tester application - essentially a form with buttons that call functions in the DLL. Everything works well - I can create defects, update them and delete them. When I close the main form, the application stops nicely. But when I call a function that returns a list of all available projects (to fill a combo box), if I close the main form, VStudio still shows the solution as running and I have to stop it. I've managed to pinpoint a single function in my code that when I call, the solution remains "hung" and if I don't, it closes well. It's a call to a property in the TDC object get_VisibleProjects that returns a List (not the .Net one, but a type in the COM library) - I just iterate over it and return a proper list (that I later use to fill the combo box): public List<string> GetAvailableProjects() { List<string> projects = new List<string>(); foreach (string project in this.tdc.get_VisibleProjects(qcDomain)) { projects.Add(project); } return projects; } My assumption is that something gets retained in memory. If I run the EXE outside of VStudio it closes - but who knows what gets left behind in memory? My question is - how do I get rid of whatever calling this property returns? Shouldn't the GC handle this? Do I need to delve into pointers? Things I've tried: getting the list into a variable and setting it to null at the end of the function Adding a destructor to the class and nulling the tdc object Stepping through the tester function application all the way out, whne the form closes and the Main function ends - it closes, but VStudio still shows I'm running. Thanks for your assistance!

    Read the article

  • Useful training courses that aren't specific to a single technology

    - by Dave Turvey
    I have possibly the best problem in the world. I have about £1600 left in a training budget and I need to find something to spend it on. I can spend it on anything that could be considered training. Books, courses, conferences, etc. I would like to find a course that would benifit a software developer but is not about learning a specific programming technology. I don't really want to spend it on a technical training course. These topics are usually best learned with a good book and some trial and error. I have also already been on a general business/management training course and a PRINCE2 project management course. I am currently working on a project on my own so am responsible for communicating with the client, requirements gathering, project management, etc., as well as the coding. What training have you found useful outside the usual technical stuff? Has anyone done any business analysis courses? What were they like? Are there any courses on some of the practicalities of working with software, e.g. automated test and deployment strategies, handling technical support? I would prefer a course in the UK but I can travel if necessary.

    Read the article

  • multi thread apps crashes in release mode

    - by etzarfat
    Hello, I'm using Visual Studio 2008 (programming in c). I've a weird problem I worte a program that has 2 threads that runs simultaneously, a recording thread (using audio card to record into memory) and a translation thread (using a speech engine to recognize the words). when I run my program in debug mode (aka setting a breakpoint in the code) it runs great, however when I run in debug mode or release mode (outside the visual studio enviroment) it crashes and give me the following exception: "Unhandled exception at 0x7c911129 in LowLevel.exe: 0xC0000005: Access violation reading location 0x014c7245." My stack looks: LowLevel.exe!__set_flsgetvalue() Line 256 + 0xc bytes C LowLevel.exe!_isleadbyte_l(int c=4359676, localeinfo_struct * plocinfo=0x00000001) Line 57 C++ 014b00d8() LowLevel.exe!PlayDateOfExam(int option=1) Line 2240 + 0x7 bytes C++ LowLevel.exe!NSCThread(void * arg=0x00000000) Line 1585 + 0xb bytes C++ kernel32.dll!7c80b729() winmm.dll!76b5b294() I uses the following file in my project "nsc.lib" and WinMM.lib" I'm not really familiar with threads I used a sample (which works great) and built on it. I saw a similiar question year on the forum but I didn't really understand the answers since I'm not familiar with with threads. Can someone help me? Thanks

    Read the article

  • Should UTF-16 be considered harmful?

    - by Artyom
    I'm going to ask what is probably quite a controversial question: "Should one of the most popular encodings, UTF-16, be considered harmful?" Why do I ask this question? How many programmers are aware of the fact that UTF-16 is actually a variable length encoding? By this I mean that there are code points that, represented as surrogate pairs, take more then one element. I know; lots of applications, frameworks and APIs use UTF-16, such as Java's String, C#'s String, Win32 APIs, Qt GUI libraries, the ICU Unicode library, etc. However, with all of that, there are lots of basic bugs in the processing of characters out of BMP (characters that should be encoded using two UTF-16 elements). For example, try to edit one of these characters: 𝄞 𝕥 𝟶 𠂊 You may miss some, depending on what fonts you have installed. These characters are all outside of the BMP (Basic Multilingual Plane). If you cannot see these characters, you can also try looking at them in the Unicode Character reference. For example, try to create file names in Windows that include these characters; try to delete these characters with a "backspace" to see how they behave in different applications that use UTF-16. I did some tests and the results are quite bad: Opera has problem with editing them Notepad can't deal with them correctly (delete for example) File names editing in Window dialogs in broken All QT3 applications can't deal with them. StackOverflow seems to remove these characters if edited directly in as Unicode characters, and only seems to allow them as HTML Unicode escapes. So... This was very simple test. Do you think that UTF-16 should be considered harmful?

    Read the article

  • Using multiple QStyledItemDelegate with stylesheets

    - by Shane Holloway
    I'm creating a styled QTreeView using double-dispatch to resolve specific delegate for data items, which is working great. I subclassed the delegates from QStyledItemDelegate to take advantage of stylesheets, enabling the designers to style the UI outside of the code. Unfortunately, I have been unable to address different styles from the CSS. How do I select and use the item sub-control style specified in the stylesheet? The CSS I'm testing with: QTreeView::item:selected { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #dddddd, stop: 1 #888888); } QTreeView::item:selected[role="title"] { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fde7ef, stop: 1 #f1cbda); } QTreeView::item:selected[role="entry"] { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1); } My delegate rendering classes: class VisitingDelegate(QtGui.QAbstractItemDelegate): def __init__(self, parent=None): super(VisitingDelegate,self).__init__(parent) roles = {} self.renderRoles = roles d = TitleDelegate(parent) d.setProperty("role", "title") roles['title'] = d d = EntryDelegate(parent) d.setProperty("role", "entry") roles['entry'] = d def delegateForIndex(self, mi): role = mi.model().data(mi, "renderRole") return self.renderRoles[role] def paint(self, painter, option, mi): dg = self.delegateForIndex(mi) return dg.paint(painter, option, mi) def sizeHint(self, option, mi): dg = self.delegateForIndex(mi) return dg.sizeHint(option, mi) class TextDocumentDelegate(QtGui.QStyledItemDelegate): fmt = "<font color='%(color)s'>%(text)s</font)>" def paint(self, painter, option, mi): painter.save() opt = QtGui.QStyleOptionViewItemV4(option) self.initStyleOption(opt, mi) opt.text = '' style = opt.widget.style() style.drawControl(style.CE_ItemViewItem, opt, painter, opt.widget) textRect = style.subElementRect(style.SE_ItemViewItemText, opt, opt.widget); doc = self.asTextDoc(option, mi) painter.translate(textRect.topLeft()) doc.drawContents(painter) painter.restore() def sizeHint(self, option, mi): doc = self.asTextDoc(option, mi) sz = doc.size() sz = QtCore.QSize(sz.width(), sz.height()) return sz def asTextDoc(self, option, mi): info = {} info['text'] = mi.model().data(mi, Qt.DisplayRole) doc = QtGui.QTextDocument() doc.setDefaultFont(option.font) pal = option.palette if option.state & QtGui.QStyle.State_Selected: color = pal.color(pal.HighlightedText) else: color = pal.color(pal.Text) info['color'] = color.name() doc.setHtml(self.fmt % info) return doc class EntryDelegate(TextDocumentDelegate): pass class TitleDelegate(TextDocumentDelegate): fmt = "<h3><font color='%(color)s'>%(text)s</font)></h3>"

    Read the article

  • Plot in GNU PLOT

    - by guddi
    I have to plot many lines in GNU PLOT.No problem with the X axis. The problem that I am facing is that most of the plotted lines are at yscale [0-0.05] ,few at range 60-70 and rest at 600-700. These numbers correspond to the y axis scale values. But after I plot I can see only 3 sets of lines all messed up. There is no clearity between the lines. Line at 0 and the line at 0.003 look like one single line. If I set yrange[0:0.05], the lines between this range are clearly vissible. But I want all the lines in the same graph. I have heard of breaking axis's and multi plotting..Can they be useful? how to implement them. Anyone pls help me. Below is the sript set terminal png size 1300,1200 enhanced font 'Verdana,20 set output ' output .png’ set key font 'Verdana,16' set key bottom outside set yrange[500:1000] set xtics("25k" 25000,"50k" 50000,"75k" 75000,"100k" 100000) set grid set title 'Performance Metrics' set ylabel 'Metrices' set xlabel 'FES' plot ' input ' using 1:2 title ' A' with linespoints linewidth 4, ' input ' using 1:3 title B'with linespoints linewidth 4, 'input ' using 1:4 title ' c' with linespoints linewidth 4, 'input ' using 1:5 title 'D' with linespoints linewidth 4, ' input ' using 1:6 title 'E' with linespoints linewidth 4, ' input ' using 1:7 title 'F' with linespoints linewidth 4, ' input ' using 1:8 title 'G' with linespoints linewidth 4, ' input ' using 1:9 title ' H ' with linespoints linewidth 4, ' input ' using 1:10 title ' I' Metric ' with linespoints linewidth 4 set output set terminal windows input.dat is something like this: 25 0.002 0.05 899 455 444 0.08 0.00004 900 700 0.003 This way i have other rows. I have shown only the first one

    Read the article

  • Add incremental numbers at the end of a string in a loop in Javascript.

    - by Kyle Sevenoaks
    This Javascript is part of a Foreach loop. var stickytooltip={ tooltipoffsets: [20, -30], //additional x and y offset from mouse cursor for tooltips fadeinspeed: 200, //duration of fade effect in milliseconds rightclickstick: false, //sticky tooltip when user right clicks over the triggering element (apart from pressing "s" key) ? stickybordercolors: ["#0a5692", "#0a5692"], //border color of tooltip depending on sticky state stickynotice: ["Press \"s\"", "or right click", "to sticky box"], //customize tooltip status message stickynotice2: "Click outside this box to hide it", //customize tooltip status message //***** NO NEED TO EDIT BEYOND HERE isdocked: false, positiontooltip:function($, $tooltip, e){ var x=e.pageX+this.tooltipoffsets[0], y=e.pageY+this.tooltipoffsets[1] var tipw=$tooltip.outerWidth(), tiph=$tooltip.outerHeight(), x=(x+tipw>$(document).scrollLeft()+$(window).width())? x-tipw-(stickytooltip.tooltipoffsets[0]*2) : x y=(y+tiph>$(document).scrollTop()+$(window).height())? $(document).scrollTop()+$(window).height()-tiph-10 : y $tooltip.css({left:x, top:y}) }, showbox:function($, $tooltip, e){ $tooltip.fadeIn(this.fadeinspeed) this.positiontooltip($, $tooltip, e) }, hidebox:function($, $tooltip){ if (!this.isdocked){ $tooltip.stop(false, true).hide() $tooltip.css({borderColor:'black'}).find('.stickystatus:eq(0)').css({background:this.stickybordercolors[0]}).html(this.stickynotice) } }, docktooltip:function($, $tooltip, e){ this.isdocked=true $tooltip.css({borderColor:'darkred'}).find('.stickystatus:eq(0)').css({background:this.stickybordercolors[1]}).html(this.stickynotice) }, init:function(targetselector, tipid){ jQuery(document).ready(function($){ var $targets=$(targetselector) var $tooltip=$('#'+tipid).appendTo(document.body) if ($targets.length==0) return var $alltips=$tooltip.find('div.atip') if (!stickytooltip.rightclickstick) stickytooltip.stickynotice[1]='' stickytooltip.stickynotice=stickytooltip.stickynotice.join(' ') stickytooltip.hidebox($, $tooltip) $targets.bind('mouseenter', function(e){ $alltips.hide().filter('#'+$(this).attr('data-tooltip')).show() stickytooltip.showbox($, $tooltip, e) }) $targets.bind('mouseleave', function(e){ stickytooltip.hidebox($, $tooltip) }) $targets.bind('mousemove', function(e){ if (!stickytooltip.isdocked){ stickytooltip.positiontooltip($, $tooltip, e) } }) $tooltip.bind("mouseenter", function(){ stickytooltip.hidebox($, $tooltip) }) $tooltip.bind("click", function(e){ e.stopPropagation() }) $(this).bind("click", function(e){ if (e.button==0){ stickytooltip.isdocked=false stickytooltip.hidebox($, $tooltip) } }) $(this).bind("contextmenu", function(e){ if (stickytooltip.rightclickstick && $(e.target).parents().andSelf().filter(targetselector).length==1){ //if oncontextmenu over a target element stickytooltip.docktooltip($, $tooltip, e) return false } }) $(this).bind('keypress', function(e){ var keyunicode=e.charCode || e.keyCode if (keyunicode==115){ //if "s" key was pressed stickytooltip.docktooltip($, $tooltip, e) } }) }) //end dom ready } } //stickytooltip.init("targetElementSelector", "tooltipcontainer") stickytooltip.init("*[data-tooltip]", "mystickytooltip") I need to just add some code to the end of "mystickytooltip" to add 1, 2, 3, 4 each time it loops. My JS-foo is nonexistant, please help :)

    Read the article

  • ASP.NET MVC: what mechanic returns ViewModel objects?

    - by Dr. Zim
    As I understand it, Domain Models are classes that only describe the data (aggregate roots). They are POCOs and do not reference outside libraries (nothing special). View models on the other hand are classes that contain domain model objects as well as all the interface specific objects like SelectList. A ViewModel includes using System.Web.Mvc;. A repository pulls data out of a database and feeds them to us through domain model objects. What mechanic or device creates the view model objects, populating them from a database? Would it be a factory that has database access? Would you bleed the view specific classes like System.Web.Mvc in to the Repository? Something else? For example, if you have a drop down list of cities, you would reference a SelectList object in the root of your View Model object, right next to your DomainModel reference: public class CustomerForm { public CustomerAddress address {get;set;} public SelectList cities {get;set;} } The cities should come from a database and be in the form of a select list object. The hope is that you don't create a special Repository method to extract out just the distinct cities, then create a redundant second SelectList object only so you have the right data types.

    Read the article

  • Deploy multiple instances of an EAR (representing versions) to Glassfish

    - by Thorbjørn Ravn Andersen
    I basically want to be able to deploy multiple versions of the same EAR file to the same server (Glassfish instance?) , and have a unique path to each version separating them. From my reading on this it appears that multiple EARs deploy to the root of the web server namespace so that they can coexist if they do not have colliding context-root's of WAR's. In my case I'd rather have that instead of everything going under "/", I'd like to be able to brand a given EAR-file build to ALWAYS deploy under a given path like "/foo-20100319" or "/foo-CUSTOMER-20010101". This can easily be done with a single WAR file just by renaming it. I do not need or want them to disturb each other. It is my understanding that this remapping is outside the scope of the application.xml file, so I found that http://docs.sun.com/app/docs/doc/820-7693/beayr?a=view says that I can specify web-uri and context-root, but I am not certain that what I wish to do, can be specified with these in Glassfish. How should I approach this? I have full control over the build process. (I have found http://stackoverflow.com/questions/877390/deploying-multiple-java-web-apps-to-glassfish-in-one-go but I am not certain how to apply this to what I need).

    Read the article

  • QT- QImage and multi-threading problem.

    - by umanga
    Greetings all, Please refer to image at : http://i48.tinypic.com/316qb78.jpg We are developing an application to extract cell edges from MRC images from electron microscope. MRC file format stores volumetric pixel data (http://en.wikipedia.org/wiki/Voxel) and we simply use 3D char array(char***) to load and store data (gray scale values) from a MRC file. As shown in the image,there are 3 viewers to display XY,YZ and ZX planes respectively. Scrollbars on the top of the viewers use to change the image slice along an axis. Here is the steps we do when user changes the scrollbar position. 1) get the new scrollbar value.(this is the selected slice) 2) for the relavant plane (YZ,XY or ZX), generate (char* slice;) array for the selected slice by reading 3D char array (char***) 3) Create a new QImage* (Format_RGB888) and set pixel values by reading 'slice' (using img-setPixel(x,y,c);) 4) This new QImage* is painted in the paintEvent() method. We are going to execute "edge-detection" process in a seperate thread since it is an intensive process.During this process we need to draw detected curve (set of pixels) on top of above QImage*.(as a layer).This means we need to call drawPoint() methods outside the QT thread. Is it the best wayto use QImage for this case? What is the best way to execute QT drawing methods from another thread? thanks in advance,

    Read the article

  • How to use Object.GetHashCode() on a type that overrides GetHashCode()

    - by Jimmy
    Hi, I have a class A that implements IEquatable<, using its fields (say, A.b and A.c) for implementing/overriding Equals() and overriding GetHashCode(), and everything works fine, 99% of the time. Class A is part of a hierarchy (class B, C) that all inherit from interface D; they can all be stored together in a dictionary Dictionary, thus it's convenient when they all carry their own default Equals()/GetHashCode(). However, while constructing A I sometime need to do some work to get the values for A.b and A.c; while that's happening, I want to store a reference to the instance that's being built. In that case, I don't want to use the default Equals()/GetHashCode() overrides provided by A. Thus, I was thinking of implementing a ReferenceEqualityComparer, that's meant to force the use of Object's Equals()/GetHashCode(): private class ReferenceEqualityComparer<T> : IEqualityComparer<T> { #region IEqualityComparer<T> Members public bool Equals(T x, T y) { return System.Object.ReferenceEquals(x, y); } public int GetHashCode(T obj) { // what goes here? I want to do something like System.Object.GetHashCode(obj); } #endregion } The question is, since A overrides Object.GetHashCode(), how can I (outside of A) call Object.GetHashCode() for an instance of A? One way of course would be for A to not implement IEquatable< and always supply an IEqualityComparer< to any dictionary that I create, but I'm hoping for a different answer. Thanks

    Read the article

  • mono --aot with MinGW: unknown pseudo-op: `.local'

    - by Jared Updike
    Can I user mono's AOT feature to natively "pre-compile" .NET DLLs (and or EXEs) to make them harder to reverse engineer? If so, how do I get mono/AOT working in Windows 7? (I'm running x64 but the app is targeting x86 explicitly.) I just installed Mono 2.6.3 and MinGW 5.1.6 and I'm trying to AOT compile an exe (or a dll, it doesn't matter). I get screens and screens of error messages: C:\Users\jupdike\AppData\Local\Temp\mono_aot_XSDEAV:533: Error: junk at end of line, first unrecognized character is `H' C:\Users\jupdike\AppData\Local\Temp\mono_aot_XSDEAV:539: Error: unknown pseudo-op: `.local' C:\Users\jupdike\AppData\Local\Temp\mono_aot_XSDEAV:546: Warning: .size pseudo-op used outside of .def/.endef ignored. C:\Users\jupdike\AppData\Local\Temp\mono_aot_XSDEAV:546: Error: junk at end of line, first unrecognized character is `H' I can open the generated assembly code but I have no idea why the assembler chokes on it: .size HappyForms_TextForm__ctor_string_string_string_bool,.-HappyForms_TextForm__ctor_string_string_string_bool (533) _.Lme_a: .Lme_a: .balign 16 _.Lm_b: .Lm_b: .local HappyForms_TextForm_get_InputValue (539) _HappyForms_TextForm_get_InputValue: HappyForms_TextForm_get_InputValue: .byte 85,139,236,131,236,8,139,69,8,139,128,216,2,0,0,131,236,12,80,139,0,144,144,144,255,144,200,2,0,0,131,196 .byte 16,201,195 .size HappyForms_TextForm_get_InputValue,.-HappyForms_TextForm_get_InputValue (546) (numbers above in parens are line numbers)

    Read the article

  • Umbraco XSLT issue

    - by Brad
    I'm trying to use the Umbraco GetMedia function to write an image URL to the screen, I receive an error parsing the XSLT file. <xsl:for-each select="$currentPage/descendant::node [string(data [@alias='tickerItemActive']) = '1']"> <xsl:value-of select="data [@alias='tickerText']"/><br /> <xsl:value-of select="umbraco.library:GetMedia(data [@alias='tickerImage'], 0)/data [@alias = 'umbracoFile']"/> </xsl:for-each> The tickerImage field contains the MediaID for which I'd like to display the URL. I can return the field outside the GetMedia function and it works fine. I can also replace the data [@alias='tickerImage] with '1117' (or any valid media ID) the XSLT passes verification and the script runs. THIS WORKS: <xsl:value-of select="umbraco.library:GetMedia('1117', 0)/data [@alias = 'umbracoFile']"/> THIS DOES NOT: <xsl:value-of select="umbraco.library:GetMedia(data [@alias='tickerImage'], 0)/data [@alias = 'umbracoFile']"/> Any help that can be offered would is appreciated. Thanks!

    Read the article

  • How important is PhD research topic to getting a job?

    - by thornate
    EDIT: This has been closed and I realise that I may not have been specific enough with the original title. I ask two questions here: The general one (Does a PhD help get a job?) which has been asked elsewhere, and the specific one (Is it possible to get work outside of the specific research field?). Assume I've already decided going to do the phd. I'm just stressing about the research topic. Well, I'm one year out of university (Mechatronics engineering and Software Eng double bachelors), worked for a few months then got retrenched (yay economy!). It's looking less and less likely that I'll get a job worth having with the job market as it is, so I'm thinking about going back to uni to do a PhD. I figure that by the time I'm done, the job market will have improved and hopefully I'll have something on my resume that is more attractive than spending three years doing customer support for accounting software. So, my question is to people who've done PhD's. Would you say that they were worth the effort? How important is the research topic to future job-seeking success? The idea I have is a computer-sciencey/neural-networks/data-mining thing which I think is very interesting, but not a field I want to be in forever. My potential supervisor claims that employers don't care so much about the topic of the research but rather the peripheral skills that are developed through a PhD; time managment, self-restraint, planning and whatnot. How does this mesh with people's real world experience? I'd appreciate any advice before signing my life on the line for the next three years. See also: Should developers go to grad school? Best reason not to hire a PhD? How to find an entry-level job after you already have a graduate degree?

    Read the article

  • Long labels appear to be hidden with "..." - MS Chart Pie Graph control

    - by Mike
    I would like the labels to be completely visible, and if necessary, just spin the pie chart so that the text will fit without being hidden with "...". Here is an example Anyone know how to fix this so it is not shortened? This is the control on my asp page. <asp:CHART ID="Chart1" runat="server" BorderColor="181, 64, 1" BorderDashStyle="Solid" BorderWidth="2" Height="371px" ImageLocation="~/TempImages/ChartPic_#SEQ(300,3)" ImageType="Png" Palette="None" Width="693px" BorderlineColor=""> <legends> <asp:Legend BackColor="Transparent" Enabled="False" Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="True" Name="Default"> </asp:Legend> </legends> <series> <asp:Series ChartArea="ChartArea1" ChartType="Pie" Legend="Default" Name="Series1" CustomProperties="PieLabelStyle=Outside, PieDrawingStyle=Concave" YValuesPerPoint="6" Font="Trebuchet MS, 8.25pt, style=Bold"> <SmartLabelStyle AllowOutsidePlotArea="No" MaxMovingDistance="100" /> </asp:Series> </series> <chartareas> <asp:ChartArea BackColor="#DEEDF7" BackGradientStyle="TopBottom" BackSecondaryColor="White" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" Name="ChartArea1" ShadowColor="Transparent"> <Area3DStyle Enable3D="True" IsRightAngleAxes="False" /> </asp:ChartArea> </chartareas> </asp:CHART> Thanks.

    Read the article

  • safely hosting a django project over apache using centos

    - by tipu
    Error can be seen at: http://djaffry.selfip.com:8080/ I had a project working great, but I had all the files under /var/www/ and with my limited understanding it's bad, according to django's site: "If your background is in PHP, you’re probably used to putting code under the Web server’s document root (in a place such as /var/www). With Django, you don’t do that. It’s not a good idea to put any of this Python code within your Web server’s document root, because it risks the possibility that people may be able to view your code over the Web. That’s not good for security. Put your code in some directory outside of the document root, such as /home/mycode." So I went to /home/tipu/stuff/ and executed django-admin.py startproject twingle. Then I went to apache and did <VirtualHost *:8080> ServerName tweet_search_engine DocumentRoot /home/tipu/stuff/twingle/ </VirtualHost> <Directory /home/tipu/stuff/twingle> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonOption django.root /home/tipu/stuff/twingle PythonDebug On PythonPath "['/home/tipu/stuff/', '/home/tipu/stuff/twingle/'] + sys.path" </Directory> Now I am getting a 403 Forbidden error.. any idea what I'm doing wrong? I'm newer to Linux (CentOS) and django, so I could be over looking some very simple things.

    Read the article

  • Posting messages in two RabbitMQ queue, instead of one (using py-amqp)

    - by Khelben
    I've got this strange problem using py-amqp and the Flopsy module. I have written a publisher that sends messages to a RabbitMQ server, and I wanted to be able to send it to a specified queue. On the Flopsy module that is not possible, so I tweaked it adding a parameter and a line to declare the queue on the init_ method of the Publisher object def __init__(self, routing_key=DEFAULT_ROUTING_KEY, exchange=DEFAULT_EXCHANGE, connection=None, delivery_mode=DEFAULT_DELIVERY_MODE, queue=DEFAULT_QUEUE): self.connection = connection or Connection() self.channel = self.connection.connection.channel() self.channel.queue_declare(queue) # ADDED TO SET UP QUEUE self.exchange = exchange self.routing_key = routing_key self.delivery_mode = delivery_mode The channel object is part of the py-amqplib library The problem I've got it's that, even if it's sending the messages to the specified queue, it's ALSO sending the messages to the default queue. AS in this system we expect to send quite a lot of messages, we don't want to stress the system making useless duplicates... I've tried to debug the code and go inside the py-amqplib library, but I'm not able figure out any error or lacking step. Also, I'm not able to find any documentation form py-amqplib outside the code. Any ideas on why is this happening and how to correct it?

    Read the article

  • Can I trigger PHP garbage collection to happen automatically if I have circular references?

    - by Beau Simensen
    I seem to recall a way to setup the __destruct for a class in such a way that it would ensure that circular references would be cleaned up as soon as the outside object falls out of scope. However, the simple test I built seems to indicate that this is not behaving as I had expected/hoped. Is there a way to setup my classes in such a way that PHP would clean them up correctly when the outermost object falls out of scope? I am not looking for alternate ways to write this code, I am looking for whether or not this can be done, and if so, how? I generally try to avoid these types of circular references where possible. class Bar { private $foo; public function __construct($foo) { $this->foo = $foo; } public function __destruct() { print "[destroying bar]\n"; unset($this->foo); } } class Foo { private $bar; public function __construct() { $this->bar = new Bar($this); } public function __destruct() { print "[destroying foo]\n"; unset($this->bar); } } function testGarbageCollection() { $foo = new Foo(); } for ( $i = 0; $i < 25; $i++ ) { echo memory_get_usage() . "\n"; testGarbageCollection(); } The output looks like this: 60440 61504 62036 62564 63092 63620 [ destroying foo ] [ destroying bar ] [ destroying foo ] [ destroying bar ] [ destroying foo ] [ destroying bar ] [ destroying foo ] [ destroying bar ] [ destroying foo ] [ destroying bar ] What I had hoped for: 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ]

    Read the article

  • PDF parsing file trailer

    - by Ralph
    It is not clear from the PDF ISO standard document (PDF32000-2008) whether a comment may follow the startxref keyword: startxref Byte_offset_of_last_cross-reference_section %%EOF The standard does seem to imply that comments may appear anywhere: 7.2.3 Comments Any occurrence of the PERCENT SIGN (25h) outside a string or stream introduces a comment. The comment consists of all characters after the PERCENT SIGN and up to but not including the end of the line, including regular, delimiter, SPACE (20h), and HORZONTAL TAB characters (09h). A conforming reader shall ignore comments, and treat them as single white-space characters. That is, a comment separates the token preceding it from the one following it. EXAMPLE The PDF fragment in this example is syntactically equivalent to just the tokens abc and 123. abc% comment ( /%) blah blah blah 123 Comments (other than the %PDF–n.m and %%EOF comments described in 7.5, "File Structure") have no semantics. They are not necessarily preserved by applications that edit PDF files. If they are allowed to appear after the startxref, parsing the file becomes more difficult because you do not know how far to back up from the %%EOF comment to start parsing to find the byte offset. Any ideas?

    Read the article

  • Linux Kernel - Red/Black Trees

    - by CodeRanger
    I'm trying to implement a red/black tree in Linux per task_struct using code from linux/rbtree.h. I can get a red/black tree inserting properly in a standalone space in the kernel such as a module but when I try to get the same code to function with the rb_root declared in either task_struct or task_struct-files_struct, I get a SEGFAULT everytime I try an insert. Here's some code: In task_struct I create a rb_root struct for my tree (not a pointer). In init_task.h, macro INIT_TASK(tsk), I set this equal to RB_ROOT. To do an insert, I use this code: rb_insert(&(current-fd_tree), &rbnode); This is where the issue occurs. My insert command is the standard insert that is documented in all RBTree documentation for the kernel: int my_insert(struct rb_root *root, struct mytype *data) { struct rb_node **new = &(root->rb_node), *parent = NULL; /* Figure out where to put new node */ while (*new) { struct mytype *this = container_of(*new, struct mytype, node); int result = strcmp(data->keystring, this->keystring); parent = *new; if (result < 0) new = &((*new)->rb_left); else if (result > 0) new = &((*new)->rb_right); else return FALSE; } /* Add new node and rebalance tree. */ rb_link_node(&data->node, parent, new); rb_insert_color(&data->node, root); return TRUE; } Is there something I'm missing? Some reason this would work fine if I made a tree root outside of task_struct? If I make rb_root inside of a module this insert works fine. But once I put the actual tree root in the task_struct or even in the task_struct-files_struct, I get a SEGFAULT. Can a root node not be added in these structs? Any tips are greatly appreciated. I've tried nearly everything I can think of.

    Read the article

  • Spell checker software

    - by Naren
    Hello Guys, I have been assigned a task to find a decent spell checker (UK English) preferably the free one for a project that we are doing. I have looked at Google AJAX API for this. The project contains some young person's (kids less than 18 years old) data which shouldn't allow exposing or storing outside the application boundaries. Google logs the data for research purpose that means Google owns the data whatever we send over the wire through Google API. Is this right? I fired an email to Google regarding the privacy of data and storage but they haven't come back. If you have some knowledge regarding this please share with me. At this point our servers might not have access to external entities that means we might not be able to use Web API for this over the wire. But it may change in the future. That means I have to find out some spell checker alternatives that can sit in our environment and do the job or an external APIs. Would you mind share your findings and knowledge in this regard. I would prefer free services but never know if you have some cracking spell checker for a few quid’s then I don't mind recommending to the project board. Technology using ASP.NET 3.5/4.0, MVC, jQuery, SQL Sever 2008 etc Cheers, Naren

    Read the article

  • JQuery not working.

    - by Shantanu Gupta
    I am trying to implement JQuery in my web page but i am not been able to implement it successfully. I have a master page where i added one script for menu bar that is already using jquery hosted by Google This is coded in master page itself <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script> <script type="text/javascript"> <script type="text/javascript"> $(document).ready(function(){ $('#ddmenu > li').bind('mouseover', ddmenu_open) $('#ddmenu > li').bind('mouseout', ddmenu_timer) }); document.onclick = ddmenu_close; // ]]> </script> Now i want to implement a Jquery to set the css visibility property to true or false. into my content page of same master page. <script type="text/javascript"> $(document).ready(function(){ $("#lnkAddMore").click(function(){ alert(); } ); }); </script> This html control is under my UpdatePanel. I dont know why it is not working ? I am using this control under UpdatePanel. <input type="button" id="lnkAddMore" value="Add More" /> I tried to use it outside my update panel it is running successfully but not in UpdatePanel I think there is a problem using it with an UpdatePanel

    Read the article

  • MVC Areas - View not found

    - by user314827
    Hi, I have a project that is using MVC areas. The area has the entire project in it while the main "Views/Controllers/Models" folders outside the Areas are empty barring a dispatch controller I have setup that routes default incoming requests to the Home Controller in my area. This controller has one method as follows:- public ActionResult Index(string id) { return RedirectToAction("Index", "Home", new {area = "xyz"}); } I also have a default route setup to use this controller as follows:- routes.MapRoute( "Default", // Default route "{controller}/{action}/{id}", new { controller = "Dispatch", action = "Index", id = UrlParameter.Optional } ); Any default requests to my site are appropriately routed to the relevant area. The Area's "RegisterArea" method has a single route:- context.MapRoute( "xyz_default", "xyz/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } My area has multiple controllers with a lot of views. Any call to a specific view in these controller methods like "return View("blah"); renders the correct view. However whenever I try and return a view along with a model object passed in as a parameter I get the following error:- Server Error in '/DeveloperPortal' Application. The view 'blah' or its master was not found. The following locations were searched: ~/Views/Profile/blah.aspx ~/Views/Profile/blah.ascx ~/Views/Shared/blah.aspx ~/Views/Shared/blah.ascx It looks like whenever a model object is passed in as a param. to the "View()" method [e.g. return View("blah",obj) ] it searches for the view in the root of the project instead of in the area specific view folder. What am I missing here ? Thanks in advance.

    Read the article

  • Selecting a Java framework for large application w/ only ONE user

    - by Bijan
    I am building a large application that will be hosted on an AWS server. I'm trying to select a web framework for assisting me with code organization, template design, and generally presentation aspects. Here are some points of consideration: Require security/login/user authentication. I may add the ability in the future to allow more than just an administrator to access the web app, but it is not a public facing website. AJAX support would be helpful. There are a couple widgets that I don't want to recreate. One is a tree object, where the user can expand/contract items in the list, can create new branches, add/edit objects. This would be better off in some dynamic view rather than all done in ugly html. Generally, this is just to provide the application with a face for control, management, and monitoring. Having an easier time adding buttons, CSS, AJAX widgets are great additions though, but not the primary purpose. I'm considering: Wicket Spring Seam GWT Stripe and the list goes on, as I'm sure you all know. I originally planned on using GWT, but then started to feel that GWT didn't cover my primary needs. I could be wrong about this, but there seems to be a lot of support for GWT AND Wicket/Spring. All of this 'getting lost in java frameworks' got me thinking outside the java realm for a framework that would suit my needs that was a clear option, like: JRuby/Rails Jython/Django Groovy/Grails Guice (just throwing this in there... I don't clearly understand the main purposes of all these frameworks. It doesn't seem like DInjection is something I need for a single purpose application) Thanks as always. This community makes Googling for esoteric programming information an order of magnitude better.

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >