Daily Archives

Articles indexed Monday June 4 2012

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

  • ColumnCount in DataGridView remains 0 after assigning data source

    - by Manan Shah
    I am having trouble with the following simple code List<Car> tempList = new List<Car>(); BindingSource bindingSource = new BindingSource(); bindingSource.DataSource = tempList; dgTempView.DataSource = bindingSource; Here, dgTempView is a data grid view After the above lines execute, the column count in the datagrid view remains 0. And when I try adding a Car instance in tempList, I get an error saying that 'no row can be added to a datagridview control that does not have columns' . I am not able to understand what am I missing here

    Read the article

  • Domain Validation in a CQRS architecture

    - by Jupaol
    Basically I want to know if there is a better way to validate my domain entities. This is how I am planning to do it but I would like your opinion The first approach I considered was: class Customer : EntityBase<Customer> { public void ChangeEmail(string email) { if(string.IsNullOrWhitespace(email)) throw new DomainException(“...”); if(!email.IsEmail()) throw new DomainException(); if(email.Contains(“@mailinator.com”)) throw new DomainException(); } } I actually do not like this validation because even when I am encapsulating the validation logic in the correct entity, this is violating the Open/Close principle (Open for extension but Close for modification) and I have found that violating this principle, code maintenance becomes a real pain when the application grows up in complexity. Why? Because domain rules change more often than we would like to admit, and if the rules are hidden and embedded in an entity like this, they are hard to test, hard to read, hard to maintain but the real reason why I do not like this approach is: if the validation rules change, I have to come and edit my domain entity. This has been a really simple example but in RL the validation could be more complex So following the philosophy of Udi Dahan, making roles explicit, and the recommendation from Eric Evans in the blue book, the next try was to implement the specification pattern, something like this class EmailDomainIsAllowedSpecification : IDomainSpecification<Customer> { private INotAllowedEmailDomainsResolver invalidEmailDomainsResolver; public bool IsSatisfiedBy(Customer customer) { return !this.invalidEmailDomainsResolver.GetInvalidEmailDomains().Contains(customer.Email); } } But then I realize that in order to follow this approach I had to mutate my entities first in order to pass the value being valdiated, in this case the email, but mutating them would cause my domain events being fired which I wouldn’t like to happen until the new email is valid So after considering these approaches, I came out with this one, since I am going to implement a CQRS architecture: class EmailDomainIsAllowedValidator : IDomainInvariantValidator<Customer, ChangeEmailCommand> { public void IsValid(Customer entity, ChangeEmailCommand command) { if(!command.Email.HasValidDomain()) throw new DomainException(“...”); } } Well that’s the main idea, the entity is passed to the validator in case we need some value from the entity to perform the validation, the command contains the data coming from the user and since the validators are considered injectable objects they could have external dependencies injected if the validation requires it. Now the dilemma, I am happy with a design like this because my validation is encapsulated in individual objects which brings many advantages: easy unit test, easy to maintain, domain invariants are explicitly expressed using the Ubiquitous Language, easy to extend, validation logic is centralized and validators can be used together to enforce complex domain rules. And even when I know I am placing the validation of my entities outside of them (You could argue a code smell - Anemic Domain) but I think the trade-off is acceptable But there is one thing that I have not figured out how to implement it in a clean way. How should I use this components... Since they will be injected, they won’t fit naturally inside my domain entities, so basically I see two options: Pass the validators to each method of my entity Validate my objects externally (from the command handler) I am not happy with the option 1 so I would explain how I would do it with the option 2 class ChangeEmailCommandHandler : ICommandHandler<ChangeEmailCommand> { public void Execute(ChangeEmailCommand command) { private IEnumerable<IDomainInvariantValidator> validators; // here I would get the validators required for this command injected, and in here I would validate them, something like this using (var t = this.unitOfWork.BeginTransaction()) { var customer = this.unitOfWork.Get<Customer>(command.CustomerId); this.validators.ForEach(x =. x.IsValid(customer, command)); // here I know the command is valid // the call to ChangeEmail will fire domain events as needed customer.ChangeEmail(command.Email); t.Commit(); } } } Well this is it. Can you give me your thoughts about this or share your experiences with Domain entities validation EDIT I think it is not clear from my question, but the real problem is: Hiding the domain rules has serious implications in the future maintainability of the application, and also domain rules change often during the life-cycle of the app. Hence implementing them with this in mind would let us extend them easily. Now imagine in the future a rules engine is implemented, if the rules are encapsulated outside of the domain entities, this change would be easier to implement

    Read the article

  • Loading FireMonkey style resourses with RTTI

    - by HeMet
    I am trying to write class that inherits from FMX TStyledControl. When style is updated it loads style resource objects to cache. I created project group for package with custom controls and test FMX HD project as it describes in Delphi help. After installing package and placing TsgSlideHost on the test form I run test app. It’s work well, but when I close it and try to rebuild package RAD Studio says “Error in rtl160.bpl” or “invalid pointer operation”. It seems what problem in LoadToCacheIfNeeded procedure from TsgStyledControl, but I’m not understand why. Is there any restriction on using RTTI with FMX styles or anything? TsgStyledControl sources: unit SlideGUI.TsgStyledControl; interface uses System.SysUtils, System.Classes, System.Types, FMX.Types, FMX.Layouts, FMX.Objects, FMX.Effects, System.UITypes, FMX.Ani, System.Rtti, System.TypInfo; type TCachedAttribute = class(TCustomAttribute) private fStyleName: string; public constructor Create(const aStyleName: string); property StyleName: string read fStyleName; end; TsgStyledControl = class(TStyledControl) private procedure CacheStyleObjects; procedure LoadToCacheIfNeeded(aField: TRttiField); protected function FindStyleResourceAs<T: class>(const AStyleLookup: string): T; function GetStyleName: string; virtual; abstract; function GetStyleObject: TControl; override; public procedure ApplyStyle; override; published { Published declarations } end; implementation { TsgStyledControl } procedure TsgStyledControl.ApplyStyle; begin inherited; CacheStyleObjects; end; procedure TsgStyledControl.CacheStyleObjects; var ctx: TRttiContext; typ: TRttiType; fld: TRttiField; begin ctx := TRttiContext.Create; try typ := ctx.GetType(Self.ClassType); for fld in typ.GetFields do LoadFromCacheIfNeeded(fld); finally ctx.Free end; end; function TsgStyledControl.FindStyleResourceAs<T>(const AStyleLookup: string): T; var fmxObj: TFmxObject; begin fmxObj := FindStyleResource(AStyleLookup); if Assigned(fmxObj) and (fmxObj is T) then Result := fmxObj as T else Result := nil; end; function TsgStyledControl.GetStyleObject: TControl; var S: TResourceStream; begin if (FStyleLookup = '') then begin if FindRCData(HInstance, GetStyleName) then begin S := TResourceStream.Create(HInstance, GetStyleName, RT_RCDATA); try Result := TControl(CreateObjectFromStream(nil, S)); Exit; finally S.Free; end; end; end; Result := inherited GetStyleObject; end; procedure TsgStyledControl.LoadToCacheIfNeeded(aField: TRttiField); var attr: TCustomAttribute; styleName: string; styleObj: TFmxObject; val: TValue; begin for attr in aField.GetAttributes do begin if attr is TCachedAttribute then begin styleName := TCachedAttribute(attr).StyleName; if styleName <> '' then begin styleObj := FindStyleResource(styleName); val := TValue.From<TFmxObject>(styleObj); aField.SetValue(Self, val); end; end; end; end; { TCachedAttribute } constructor TCachedAttribute.Create(const aStyleName: string); begin fStyleName := aStyleName; end; end. Using of TsgStyledControl: type TsgSlideHost = class(TsgStyledControl) private [TCached('SlideHost')] fSlideHost: TLayout; [TCached('SideMenu')] fSideMenuLyt: TLayout; [TCached('SlideContainer')] fSlideContainer: TLayout; fSideMenu: IsgSideMenu; procedure ReapplyProps; procedure SetSideMenu(const Value: IsgSideMenu); protected function GetStyleName: string; override; function GetStyleObject: TControl; override; procedure UpdateSideMenuLyt; public constructor Create(AOwner: TComponent); override; procedure ApplyStyle; override; published property SideMenu: IsgSideMenu read fSideMenu write SetSideMenu; end;

    Read the article

  • What is better and why to use List as thread safe: BlockingCollection or ReaderWriterLockSlim or lock?

    - by theateist
    I have System.Collections.Generic.List _myList and many threads can read from it or add items to it simultaneously. From what I've read I should using 'BlockingCollection' so this will work. I also read about ReaderWriterLockSlim' and 'lock', but I don't figure out how to use them instead ofBlockingCollection`, so my question is can I do the same with: ReaderWriterLockSlim lock instead of using 'BlockingCollection'. If YES, can you please provide simple example and what pros and cons of using BlockingCollection, ReaderWriterLockSlim, lock?

    Read the article

  • autocomplete issue with iScroll

    - by user1434647
    I am using jQuery Autocomplete on my jQUeryMobile application. It works perfect. Now I'm trying to use iScroll.js to scroll through the list of looked up items. Here is what I'am doing, http://jsfiddle.net/uXbKY/39/ The problem is, iscroll is applying only for the first item of the suggestion box, where as I'm not able to scroll through entire list.Please help me if I'm missing anything in my code.Please help me to acheive this using iScoll. I found one more way that we can use custom touch based scrollbar for autocomplete box http://jsfiddle.net/uXbKY/2/ but there is a issue that, the custom scrollbar appears only for first search and it disappears from the suggastion box when list get refreshed, Please suggest me if we can fix this, because both options are fine for me for using my autocomplete in ipad and android. or if anyone thinks there's a better way to do this than with iScroll and jScrollPane, you are wel-come I'm open to suggestions. Thanks in Advance,

    Read the article

  • How to get/create anonymous method from TRttiMethod?

    - by Heinrich Ulbricht
    I want to handle a TRttiMethod as anonymous method. How could I do this? Here is a simplified example of how I wish things to work: Interface: TMyClass = class public // this method will be acquired via Rtti procedure Foo; // this method shall return above Foo as anonymous method function GetMethodAsAnonymous: TProc; end; Implementation: function TMyClass.GetMethodAsAnonymous: TProc; var Ctx: TRttiContext; RttiType: TRttiType; RttiMethod: TRttiMethod; begin Ctx := TRttiContext.Create; try RttiType := Ctx.GetType(Self.ClassType); RttiMethod := RttiType.GetMethod('Foo'); Result := ??????; // <-- I want to put RttiMethod here - but how? finally Ctx.Free; end; end;

    Read the article

  • A question mark within a @PathVariable in Spring MVC?

    - by sp00m
    Within the @Controller of a search engine: @RequestMapping(value = "/search/{query}", method = RequestMethod.GET) public String search(@PathVariable String query) {} If a user wants to search /search/w?rld (wich should match world, warld, whrld, etc.), the variable query equals w, because of the question mark which indicated a GET var. I tried "/search/{query:.+}", but still doesn't work. Any idea how to solve that problem?

    Read the article

  • Python : How to intercept a method call which does-not exists?

    - by Yugal Jindle
    I want to create a class that doesn't gives an Attribute Error on call of any method that may or may not exists: My class: class magic_class: ... # How to over-ride method calls ... Expected Output: ob = magic_class() ob.unknown_method() # Prints 'unknown_method' was called ob.unknown_method2() # Prints 'unknown_method2' was called Now, unknown_method and unknown_method2 doesn't actually exists in the class, but how can we intercept the method call in python ?

    Read the article

  • Java-Eclipse-Spring 3.1 - the fastest way to get familiar with this set

    - by Leron
    I, know almost all of you at some point of your life as a programmer get to the point where you know (more or less) different technologies/languages/IDEs and a times come when you want to get things together and start using them once - more efficient and second - more closely to the real life situation where in fact just knowing Java, or some experience with Eclipse doesn't mean nothing, and what makes you a programmer worth something is the ability to work with the combination of 2 or more combinations. Having this in mind here is my question - what do you think is the optimal way of getting into Java+Eclipse+Spring3.1 world. I've read, and I've read a lot. I started writing real code but almost every step is discovering the wheel again and again, wondering how to do thing you know are some what trivial, but you've missed that one article where this topic was discussed and so on. I don't mind for paying for a good tutorial like for example, after a bit of research I decided that instead of losing a lot of time getting the different parts together I'd rather pay for the videos in http://knpuniversity.com/screencast/starting-in-symfony2-tutorial and save myself a lot of time (I hope) and get as fast as possible to writing a real code instead of wondering what do what and so on. But I find it much more difficult to find such sources of info especially when you want something more specific as me and that's the reason to ask this question. I know a lot of you go through the hard way, and I won't give up if I have to do the same, but to be honest I really hope to get post with good tutorials on the subject (paid or not) because in my situation time is literally money. Thanks Leron

    Read the article

  • Efficient synchronization of querying an array of resources

    - by Erel Segal Halevi
    There is a list of N resources, each of them can be queried by at most a single thread at a time. There are serveral threads that need to do the same thing at approximately the same time: query each of the resources (each thread has a different query), in arbitrary order, and collect the responses. If each thread loops over the resources in the same order, from 0 to N-1, then they will probably have to wait for each other, which is not efficient. I thought of letting the threads loop over the resources in a random permutation, but this seems too complex and also not so efficient, for example, for 2 resources and 2 threads, in half the cases they will choose the same order and wait for each other. Is there a simple and more efficient way to solve this?

    Read the article

  • Facebook Like Button for a Facebook video

    - by gridsquare
    Today, i created an iframe-Tab on our Facebook Page as a landingpage. On this tab we display a video, implemented from Facebook. Now i want to add the Facebook Like Button for this video on this page, i implement the code generated by the LIKE BUTTON Developer Page. <iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fvideo%2Fvideo.php%3Fv%3D345848348745&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:21px;" allowTransparency="true"></iframe> Now the button where displayed, but without a count. If i click on the like button the counter getting visible (displaying +1) and jumping back then (displaying no count). Do you know, if i can use the like button directly for the Facebook URL? http://www.facebook.com/video/video.php?v=345848348745 Thank u!

    Read the article

  • Slime in emacs seems has conflicts with autopair

    - by Boris
    I have just install slime in emacs. And after removed all the other plugins for debuging, I found that slime seems had conflicts with autopair.(Or a bug of autopair?).In slime, when I typed C-c C-c, the minibuffer displayed error like: error in process filter: define-key: Wrong type argument: characterp, nil error in process filter: Wrong type argument: characterp, nil error in process filter: define-key: Wrong type argument: characterp, nil error in process filter: Wrong type argument: characterp, nil Even more, the error message still alerted after I killed the slime buffer. If I also remove the autopair plugin, slime works just fine. Can anyone tell me how to solve this? Thanks. :)

    Read the article

  • Klazuka/Kal incorporation issue

    - by user1292943
    I'm having a little issue. I am trying to incorporate the Klazuka/Kal project into my project. I've done the following: I added the Kal.xcodeproj and all files to my project Under Build Phases, I've added Kal to "Target Dependencies" Under Build Phases, I've added libKal.a under "Link Binary With Libraries" Under Build Phases, I've added Kal.bundle to "Copy Bundle Resources" Under Build Settings, I've added "“$(BUILT_PRODUCTS_DIR)” (or “$(BUILT_PRODUCTS_DIR)/static_library_name”" for "Header Search Paths" and "User Header Search Paths". Under Build Settings, I've added the path to Kal under "Library Search Paths" Under Build Settings, I've added -ObjC, -all_load, and -force_load under "Other Linker Flags" I've edited my Build Scheme and list the Kal Target prior to my main application target with Analyze, Test, Run, Profile, and Archive all checked. I've attempted to follow the steps from here on Stack Overflow: iphone: Kal calendar not running in xcode 4.2 and here: Trying to integrate a Calendar library that was built for versions of iOS before iOS5 into my new project in XCode 4 using iOS5 - How to port? and here: I added my project and Kal Calendar's project in a workspace, still won't work in Xcode 4 and also on this site: http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/#configuring_the_projects_scheme I try to import the "Kal.h" file but am getting a File Not Found error when I try to build. I'm obviously missing something, just not sure what. Can anyone please help? Thanks for any assistance!!

    Read the article

  • Dojo JsonRest store and dijit.Tree

    - by user1427712
    I'm having a some problem making JSonRest store and dijit.Tree with ForestModel. I've tried some combination of JsonRestStore and json data format following many tips on the web, with no success. At the end, taking example form here http://blog.respondify.se/2011/09/using-dijit-tree-with-the-new-dojo-object-store/ I've made up this simple page (I'm using dojotolkit 1.7.2) <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Tree Model Explorer</title> <script type="text/javascript"> djConfig = { parseOnLoad : true, isDebug : true, } </script> <script type="text/javascript" djConfig="parseOnLoad: true" src="lib/dojo/dojo.js"></script> <script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dijit.Tree"); dojo.require("dojo.store.JsonRest"); dojo.require("dojo.data.ObjectStore"); dojo.require("dijit.tree.ForestStoreModel"); dojo.addOnLoad(function() { var objectStore = new dojo.store.JsonRest({ target : "test.json", labelAttribute : "name", idAttribute: "id" }); var dataStore = new dojo.data.ObjectStore({ objectStore : objectStore }); var treeModel = new dijit.tree.ForestStoreModel({ store : dataStore, deferItemLoadingUntilExpand : true, rootLabel : "Subjects", query : { "id" : "*" }, childrenAttrs : [ "children" ] }); var tree = new dijit.Tree({ model : treeModel }, 'treeNode'); tree.startup(); }); </script> </head> <body> <div id="treeNode"></div> </body> </html> My rest service responds the following json { data: [ { "id": "PippoId", "name": "Pippo", "children": [] }, { "id": "PlutoId", "name": "Pluto", "children": [] }, { "id": "PaperinoId", "name": "Paperino", "children": [] } ]} I've tried also with the following response (actually my final intention n is to use lazy loading for the tree) { data: [ { "id": "PippoId", "name": "Pippo", "$ref": "author0", "children": true }, { "id": "PlutoId", "name": "Pluto", "$ref": "author1", "children": true }, { "id": "PaperinoId", "name": "Paperino", "$ref": "author2", "children": true } ]} Neither of the two works. I see no error message in firebug. I simply see the root "Subject" on the page. Thanks to anybody could help in some way.

    Read the article

  • What is faster in MySQL? WHERE sub request = 0 or IN list

    - by Nicolas Manzini
    Hello I was wondering what is better in MySQL. I have a SELECT querry that exclude every entry associated to a banned userID currently I have a subquerry clause in the WHERE statement that goes like AND (SELECT COUNT(*) FROM TheBlackListTable WHERE userID = userList.ID AND blackListedID = :userID2 ) = 0 Which will accept every userID not present in the TheBlackListTable Would it be faster to retrieve first all Banned ID in a previous request and replace the previous clause by AND creatorID NOT IN listOfBannedID Thank you!

    Read the article

  • How HID devices work when programming?

    - by user1008476
    I have a barcode scanner works as HID device. Everytime a barcode scans it goes directly to windows keyboard, for example if I open notepad I can see the barcode typed there. As far as I know programmatically is it possible to to read HID data from your HID devices. But what happens if the user is already on a form with a text edit control? The scanned code will go inside the text box. Can you block incoming text and make a background-only processing? Can you explain the theory please?

    Read the article

  • ORM Profiler v1.1 has been released!

    - by FransBouma
    We've released ORM Profiler v1.1, which has the following new features: Real time profiling A real time viewer (RTV) has been added, which gives insight in the activity as it is received by the client, in two views: a chronological connection overview and an activity graph overview. This RTV allows the user to directly record to a snapshot using record buttons, pause the view, mark a range to create a snapshot from that range, and view graphs about the # of connection open actions and # of commands per second. The RTV has a 'range' in which it keeps live data and auto-cleans data that's older than this range. Screenshot of the activity graphs part of the real-time viewer: Low-level activity tab A new tab has been added to the Application tabs: the Low-level activity tab. This tab shows the main activity as it has been received over the named pipe. It can help to get insight in the chronological activity without the grouping over connections, so multiple connections at the same time per thread are easier to spot. Clicking a command will sync the rest of the application tabs, clicking a row will show the details below the splitter bar, as it is done with the other application tabs as well. Default application name in interceptor When an empty string or null is passed for application name to the Initialize method of the interceptor, the AppDomain's friendly name is used instead. Copy call stack to clipboard A call stack viewed in a grid in various parts of the UI is now copyable to the clipboard by clicking a button. Enable/Disable interceptor from the config file It's now possible to enable/disable the interceptor Initialization from the application's config file, using: Code: <appSettings> <add key="ORMProfilerEnabled" value="true"/> </appSettings> if value is true, the interceptor's Initialize method will proceed. If the value is false, the interceptor's Initialize method will not proceed and initialization won't be performed, meaning no interception will take place. If the setting is absent, or misconfigured, the Initialize method will proceed as normal and perform the initialization. Stored procedure calls for select databases are now properly displayed as a call For the databases: SQL Server, Oracle, DB2, Sybase ASA, Sybase ASE and Informix a stored procedure call is displayed as an execute/call statement and copy to clipboard works as-is. I'm especially happy with the new real-time profiling feature in ORM Profiler, which is the flagship feature for this release: it offers a completely new way to use the profiler, namely directly during debugging: you can immediately see what's going on without the necessity of a snapshot. The activity graph feature combined with the auto-cleanup of older data, allows you to keep the profiler open for a long period of time and see any spike of activity on the profiled application.

    Read the article

  • Cloudmin KVM DNS hostnames not working

    - by dannymcc
    I have got a new server which has Cloudmin installed. It's working well and I can create and manage VM's as expected. The server came with a /29 subnet and I requested an additional /29 subnet to allow for more virtual machines. I didn't want to replace the existing /29 subnet with a /28 because that would have caused disruption with my existing VM's. To make life easier I decided to configure a domain name for the Cloudmin host server to allow for automatic hostname setup whenever I create a new virtual machine. I have a domain name (example.com) and I have created an NS record as follows: NS kvm.example.com 123.123.123.123 A kvm.example.com 123.123.123.123 In the above example the IP address is that of the host server, I also have two /29 subnets routed to the server. Now, I've added the two subnets to the Cloudmin administration panel as follows: I've tried to hide as little information as possible without giving all of the server details away! If I ping kvm.example.com I get a response from 123.123.123.123, if I ping the newly created virtual machine (example.kvm.example.com) it fails, and if I ping the IP address that's been assigned to the new virtual machine (from the second subnet) it fails. Am I missing anything vital? Does this look (from what little information I can show) like it's setup correctly? Any help/pointers would be appreciated. For reference the Cloudmin documentation I am using as a guide is http://www.virtualmin.com/documentation/cloudmin/gettingstarted

    Read the article

  • Can I split one RAID1 partition in two?

    - by Prosys
    I have a linux box with CentOS 6.2 and a RAID1 (2x 2Tb) configuration: /dev/md1 -> / (10G) /dev/md2 -> /home (1.9T) I want to split the md2 in two different partitions, so I can get the following configuration: /dev/md1 -> / (10G) /dev/md2 -> /home (1T) /dev/md3 -> /example (900G) How can I achieve this? I already know that I can resize the partition, but that doesn't alter the real partition table (only the md device), so how can I do this?

    Read the article

  • postfix header_checks

    - by Shalini Tripathi
    This is my mail log file on my local RHEL5 system:- From [email protected] Mon Jun 4 02:04:23 2012 Return-Path: [email protected] X-Original-To: c Delivered-To: [email protected] Received: by www.achal.com (Postfix, from userid 0) id 9C6C356014; Mon, 4 Jun 2012 02:04:23 -0700 (PDT) To: [email protected] Subject: d Message-Id: <[email protected]> Date: Mon, 4 Jun 2012 02:04:23 -0700 (PDT) From: [email protected] (achal) I want to change Return-Path: to [email protected], I have tried header_ checks in postfix but i am not able to get the proper format.Can anybody tell me how to do this.

    Read the article

  • Postfix : outgoing mail in TLS for a specific domain

    - by vercetty92
    I am trying to configure postfix to send mail in TLS (starttls in fact), but only for a specific destination. I tried with "smtp_tls_policy_maps". This is the only line in my main.cf file regarding TLS configuration, but it seems not working. Here is my main.cf file: queue_directory = /opt/csw/var/spool/postfix command_directory = /opt/csw/sbin daemon_directory = /opt/csw/libexec/postfix html_directory = /opt/csw/share/doc/postfix/html manpage_directory = /opt/csw/share/man sample_directory = /opt/csw/share/doc/postfix/samples readme_directory = /opt/csw/share/doc/postfix/README_FILES mail_spool_directory = /var/spool/mail sendmail_path = /opt/csw/sbin/sendmail newaliases_path = /opt/csw/bin/newaliases mailq_path = /opt/csw/bin/mailq mail_owner = postfix setgid_group = postdrop mydomain = ullink.net myorigin = $myhostname mydestination = $myhostname, localhost.$mydomain, localhost masquerade_domains = vercetty92.net alias_maps = dbm:/etc/opt/csw/postfix/aliases alias_database = dbm:/etc/opt/csw/postfix/aliases transport_maps = dbm:/etc/opt/csw/postfix/transport smtp_tls_policy_maps = dbm:/etc/opt/csw/postfix/tls_policy inet_interfaces = all unknown_local_recipient_reject_code = 550 relayhost = smtpd_banner = $myhostname ESMTP $mail_name debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 And here is my "tls_policy" file: gmail.com encrypt protocols=SSLv3:TLSv1 ciphers=high I also tried gmail.com encrypt My wish is to use TLS only for the gmail domain. With this configuration, I don't see any TLS line in the source of the mail. But if I tell postfix to use TLS if possible for all destination with this line, it works: smtp_tls_security_level = may Beause I can see this line in the source of my mail: (version=TLSv1/SSLv3 cipher=OTHER); But I don't want to try to use TLS for the others domains...only for gmail... Do I miss something in my conf? (I also try whith "hash:/etc/opt/csw/postfix/tls_policy", and it's the same) Thanks a lot in advance

    Read the article

  • Changing Corosync/Heartbeat pair's active node based on MySQL/Galera cluster state

    - by Hace
    Background I'm planning on building a High Availability "cluster" for our Zabbix instance by placing two physical servers in one server room and two in another server room. In each server room one of the physical servers will run Zabbix on RHEL and the other will run Zabbix's MySQL database, also on RHEL. I'd prefer synchronous replication for the MySQL nodes so I'm planning on using Galera in a master-slave configuration. The Zabbix instances on the two Zabbix servers would be controlled by Heartbeat/Corosync (although Red Hat Cluster Suite is also an option...) If the Zabbix server in Server Room A goes down, the one in Server Room B becomes active (and vice versa). Ditto for the MySQL servers/instances. If either of those cases happen, however, the connection between the Zabbix server and the MySQL server becomes significantly slower as ti has to travel over WAN. Question Is it possible to configure the Heartbeat/CoroSync pair to instruct the MySQL/Galera cluster to change the master node to switch to (if available) the one that's in the server room as the active Heartbeat/Corosync -node and (more challengingly) is it possible to do the same in the other direction, i.e have the Galera cluster change the active Heartbeat/CoroSync server to be in the same room as the active MySQL master server in case of a failover in over to avoid unnecessary WAN transfers between the application and its DB? Theories Most likely I can get CoroSync to run something that'd log in to one of the DB nodes to change the MySQL/Galera master but I don't know if it's really possible to do anything similar in the other direction in Galera. Is it possible to define a "service" in CoroSync/Heartbeat so that both the service and its MySQL service would migrate as one if possible. Using the DB server that's behind WAN should still be a better option to DB downtime. Am I just using too many tools to solve a problem that'd be far simpler with something else?

    Read the article

  • How to completely disable apache access log? [closed]

    - by Miljenko Barbir
    I'm running WAMP server on Windows Server 2003, Apache 2.2, and I would like to completely disable writing into the access log. It would be neat if I could do the following, but I'm on Windows: CustomLog "|/dev/null" common All I get in the error log is "piped log program '/dev/null' failed unexpectedly", although I kinda expected this... Is there a Windows alternative to this or any other way to just disable writing the access log?

    Read the article

  • Debian apache2 restart fault after some updates

    - by Ripeed
    can anyone give me an advice with this please: I run update on my debian server by Webmin. After updating some apache2 and etc. It shows update fail. After that I cant start apache2. I must run netstat -ltnp | grep ':80' Then kill pid kill -9 1047 and now i can start apache2 When I started it first time after update some websites on fastCGI wont work I must change them in ISPconfig3 to mod-PHP and now works NOW - I cant restart apache without kill pid. In log of ISP I see Unable to open logs (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down In log of some website I see [emerg] (13)Permission denied: mod_fcgid: can´t lock process table in pid 19264 Do you thing it will be solution update everithing by: apt-get update and apt-get upgrade to complete all updates? I have little scare if I do that then next errors will occur. If I look at apache log i see error: Debian Python version mismatch, expected '2.6.5+', found '2.6.6' But that was there before that problem before. Thanks A LOT for help.

    Read the article

  • debian 6 losing a large amount of packets

    - by Sc0rian
    I have a rather strange problem. We covered all the obvious hardware related issues (different nic, eth cable and switch) however I cannot seem to stop eth dropping packets. I have 4 servers all exactly the same. driver: e1000e version: 1.2.20-k2 firmware-version: 1.8-0 bus-info: 0000:06:00.0 They are all running the latest kernel(2.6.32-5-amd64). However they do this: RX packets:17073870634 errors:0 dropped:14147208 overruns:0 frame:0 another server: eth0 Link encap:Ethernet HWaddr e0:69:95:05:2f:cb inet addr:10.10.10.86 Bcast:10.10.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5455209277 errors:0 dropped:375445 overruns:0 frame:0 TX packets:3666134366 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6688414486673 (6.0 TiB) TX bytes:1611812171539 (1.4 TiB) Interrupt:20 Memory:d0600000-d0620000 eth1 Link encap:Ethernet HWaddr 00:1b:21:b7:7a:ce inet addr:10.10.0.86 Bcast:10.10.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15473695728 errors:0 dropped:5808325 overruns:0 frame:0 TX packets:20112364421 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9192378766434 (8.3 TiB) TX bytes:20216368266761 (18.3 TiB) Interrupt:17 Memory:d0280000-d02a0000 A massive amount of dropped packets. I have tried to load on the latest driver, 1.9.5. This did nothing. I'm not sure what else to do.

    Read the article

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