Search Results

Search found 254039 results on 10162 pages for 'overflow auto'.

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

  • Auto Mocking using JustMock

    - by mehfuzh
    Auto mocking containers are designed to reduce the friction of keeping unit test beds in sync with the code being tested as systems are updated and evolve over time. This is one sentence how you define auto mocking. Of course this is a more or less formal. In a more informal way auto mocking containers are nothing but a tool to keep your tests synced so that you don’t have to go back and change tests every time you add a new dependency to your SUT or System Under Test. In Q3 2012 JustMock is shipped with built in auto mocking container. This will help developers to have all the existing fun they are having with JustMock plus they can now mock object with dependencies in a more elegant way and without needing to do the homework of managing the graph. If you are not familiar with auto mocking then I won't go ahead and educate you rather ask you to do so from contents that is already made available out there from community as this is way beyond the scope of this post. Moving forward, getting started with Justmock auto mocking is pretty simple. First, I have to reference Telerik.JustMock.Container.DLL from the installation folder along with Telerik.JustMock.DLL (of course) that it uses internally and next I will write my tests with mocking container. It's that simple! In this post first I will mock the target with dependencies using current method and going forward do the same with auto mocking container. In short the sample is all about a report builder that will go through all the existing reports, send email and log any exception in that process. This is somewhat my  report builder class looks like: Reporter class depends on the following interfaces: IReporBuilder: used to  create and get the available reports IReportSender: used to send the reports ILogger: used to log any exception. Now, if I just write the test without using an auto mocking container it might end up something like this: Now, it looks fine. However, the only issue is that I am creating the mock of each dependency that is sort of a grunt work and if you have ever changing list of dependencies then it becomes really hard to keep the tests in sync. The typical example is your ASP.NET MVC controller where the number of service dependencies grows along with the project. The same test if written with auto mocking container would look like: Here few things to observe: I didn't created mock for each dependencies There is no extra step creating the Reporter class and sending in the dependencies Since ILogger is not required for the purpose of this test therefore I can be completely ignorant of it. How cool is that ? Auto mocking in JustMock is just released and we also want to extend it even further using profiler that will let me resolve not just interfaces but concrete classes as well. But that of course starts the debate of code smell vs. working with legacy code. Feel free to send in your expert opinion in that regard using one of telerik’s official channels. Hope that helps

    Read the article

  • DuplicateKeyException in LINQ, but I've set auto increment and auto sync

    - by Fritos
    I'm getting a DuplicateKeyException error in my C# code. I've set Auto Generated = true, and Auto-Sync = OnInsert in my dbml. I'm not even touching the PK field in any manually written code (as seen below [My primary key field is actually called PK]). using (DeviceExerciseDataDataContext context = new DeviceExerciseDataDataContext()) { foreach(Data tgudData in data.Data) { tgd = new tableData(); tgd.FK = key; tgd.Time = tgudData.TimeStamp; tgd.Calories = Convert.ToInt32(tgudData.Calories); tgd.HeartRate = tgudData.AvgHr; tgd.BenchAngle = tgudData.Angle; tgd.WorkoutTarget = 0; tgd.Reps = tgudData.Reps; context.tableDatas.InsertOnSubmit(tgd); } context.SubmitChanges(); } This is the code for the column in the designer (columns are named PK and FK) [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PK", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)] public int PK { get { return this._PK; } set { if ((this._PK != value)) { this.OnPKChanging(value); this.SendPropertyChanging(); this._PK = value; this.SendPropertyChanged("PK"); this.OnPKChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FK", DbType="Int")] public System.Nullable<int> FK { get { return this._FK; } set { if ((this._FK != value)) { this.OnFKChanging(value); this.SendPropertyChanging(); this._FK = value; this.SendPropertyChanged("FK"); this.OnFKChanged(); } } }

    Read the article

  • Turning off auto indent when pasting text into vim

    - by Rimian
    Unfortunately, I am not an experienced vim user. But, I am making the effort to learn it. When I paste code into my document from the clipboard, I get extra spaces at the start of each new line: line line line I know you can turn off auto indent but mine doesn't seem to work because I have some other settings conflicting or something (which look pretty obvious in my .vimrc but don't seem to matter when I take them out). Can someone please show me the way to turn this off when I paste code but still have vim auto indent when I am writing code? Please see my .vimrc file: set expandtab set tabstop=2 set shiftwidth=2 set autoindent set smartindent set bg=dark set nowrap Many thanks

    Read the article

  • How to import text file to table with primary key as auto-increment

    - by webworm
    I have some bulk data in a text file that I need to import into a MySQL table. The table consists of two fields .. ID (integer with auto-increment) Name (varchar) The text file is a large collection of names with one name per line ... (example) John Doe Alex Smith Bob Denver I know how to import a text file via phpMyAdmin however, as far as I understand, I need to import data that has the same number of fields as the target table. Is there a way to import the data from my text file into one field and have the ID field auto-increment automatically? Thank you in advance for any help.

    Read the article

  • Auto-versioning of static content with JBoss

    - by Bears will eat you
    As per the Q&A here, I'd like to implement a similar auto-versioning system for a web app running in JBoss 5. Is there anything already out there to do this sort of thing, or will I need to write something myself? To be clear: I am not using PHP. Not knowing much about PHP, I'm not sure what the Tomcat/JBoss analogs of PHP's .htaccess, etc. are. If I do have to write my own auto-versioning, where would I start? The principle is clear to me - rewriting the URL using the file's timestamp, but I don't know much about URL rewriting with JBoss/Tomcat.

    Read the article

  • Reset auto increment column value in script mysql

    - by Lucia
    Hi, I have two mysql tables, one needs to start its auto-increment column id with the last value of the last inserted row in the other table (plus 1). According to mysql manual you can restart the value of an auto increment column like this: mysql ALTER TABLE tbl AUTO_INCREMENT = 100; However, this is not possible: mysql ALTER TABLE tb2 AUTO_INCREMENT = (SELECT MAX(id) FROM tbl1); I need to perform something like this because I'm filling the tables using a script. Is there another way to achieve it?

    Read the article

  • MySQL: Changing order of auto-incremented primary keys?

    - by Tom
    Hi, I have a table with a auto-incremented primary key: user_id. For a currently theoretical reason, I might need to change a user_id to be something else than it was when originally created through auto-incrementation. This means there's a possibility that the keys will not be in incremental order anymore: PK: 1 2 3 952 // changed key 4 5 6 7 I'm wondering whether this will cause problems, and whether MySQL reads something special to the incremental order of the keys, given that they should have come to existence in incremental order (which persists even when some rows are deleted). Assuming there are no associated foreignkey issues, or that these are under control, is there a problem with "messing with" the order of MySQL's autoincremented keys? Thank you.

    Read the article

  • avoid duplication with auto increment key in Hibernate

    - by Lily
    I am trying to use Hibernate to auto increment the id, however, I try to avoid duplication. class Service { Long id; // auto increment String name; String owner; // setter and getter } What I want to achieve is, whenever name and owner are the same, it will be a duplicated entry. In this case, I don't want to add another entry into the Database anymore. How to revise the hbm.xml files to avoid this issue?

    Read the article

  • Windows XP failing to set theme correctly on auto-login

    - by Alois Mahdal
    On several testing machines we have, when automatic login (as Administrator) is activated, Windows fails to set theme (Display properties - Themes) correctly. Particularly, even if theme is set to "Windows Classic", visually it's obvious that "Windows XP" is applied (the one with blue title bars and red "X" butons). I have only seen this happen when Auto-login is set--we always use Administrator on XP. Even if I log out and back in manually, theme is set correctly. Apart from logging out and in, it's also possible to reset theme in "Display properties". It does not happen in 100% of the cases, but it's way over 50%. Definitely it's often enough to be annoying. I believe this is a bug in Windows XP. I have never encountered it on other Windows versions. Does anybody know how to avoid this issue once forever? (Or can anybody provide explanation, relevant links, etc.?)

    Read the article

  • Svn import with auto-props & pre-commit hook

    - by James Tisato
    My company's svn repo has a lot of MS Word docs in it. We've implemented a policy that all .doc files must have the svn:needs-lock property set to prevent parallel access on files that are hard to merge (we've also done this for xls, ppt, pdf etc.). We've implemented the policy by distributing a svn config with auto-props set appropriately for all relevant document types. We've also set up a pre-commit hook that checks that all added files of these types have the needs-lock property set (i.e. if they forget/are too lazy to update their svn config file, they won't be able to add any docs to the repo). The problem I'm having, however, is that the pre-commit hook fails when users try to import files into the repo, e.g. some users like to add files directly thru TortoiseSVN's Repo Browser, which effectively is an svn import. Through testing on other file types, I have seen that doing an import does in fact apply the auto-props listed in my config, but they don't seem to be applied at the point that the pre-commit hook runs. When importing .doc files, the hook fails, saying that the needs-lock property is missing. Is there really much difference between adding a single file to a working copy and committing it vs importing a file directly? Do we need to tailor our precommit hook in some way to cater for this scenario?

    Read the article

  • E-Mail Center: How to Debug Auto-Processing Issues

    - by LuciaC
    Do you use E-mail Center Auto-Processing functionality?  Auto-processing rules can be defined which will process an email and initiate actions such as sending an auto-reply, auto-acknowledgement or service request update or creation.  If you're using auto-processing in your environment, then you will have noticed that, when things go wrong, often the only indication that there is an issue is if the email goes to the Supervisor Queue for manual processing instead of being sent.  Oracle Development has developed a script to help you debug when an email is meant to be auto-processed but is failing. There are scripts for R12.0.6 through to R12.1.3. See Doc ID 1427925.1 for details of the script and how to use it.

    Read the article

  • Xcode Disable Colon-aligning Auto-indent

    - by Andy Shea
    Is there any way to disable the auto-indent Xcode performs to align colons when breaking up a long method name into multiple lines? That is, I'd rather not have this: UIBarButtonItem *longDescriptiveButton = [[UIBarButtonItem alloc] initWithTitle:@"Title of Button" style:UIBarButtonItemStyleBordered target:self action:@selector(longDescriptiveButtonClicked)]; which, as you can see, looks terrible when variable/method/class names are long.

    Read the article

  • auto update for winforms application

    - by AnonymousCow
    When creating an auto updating feature for a .net winforms application, how does it update the .dll's and not effect the currently running application? Since the application is running during the update process, won't their be a lock on the .dll's (because those .dll's will have to be overwritten during the update.

    Read the article

  • C# Win Forms Auto-Updating Controls

    - by Goober
    Hello! I have a datagridview and a combobox which get populated randomly with data. However, the new data is never displayed automatically. Someone mentioned the idea of invalidating the control to force the application to redraw it and thus iterate through the contents and populate the control with the new data. Does anyone know which is the best method for implementing auto-updating controls in windows forms applications? help greatly appreciated, regards.

    Read the article

  • MySQL auto increments disappeared

    - by Lizard
    I have a mysql database with 60 tables most of the tables have primary keys (expect pivot tables) all these primary keys had the attribute AUTO INCREMENT Then over night some how all the primary keys had that attribute removed, and the default value set to 0. I have no idea how this may have been caused. Any suggestions?

    Read the article

  • Auto-Completion in Unix VI editor

    - by IllustratedInsomnia
    Hey guys, after using graphical IDE's like Visual Studio, I'm used to pressing CTRL+Space to auto-complete a variable or function name. Now, I know such a thing isn't completely possible in VI, but I heard there was a list of commands that could be mapped that allowed automatic completion of variables and functions in the current file opened. Does anyone know what this sequence is? Thanks in advance.

    Read the article

  • 'Auto' value in binding property 'width'

    - by Ivan
    Must attach to the property Width, what I'm doing this: <ColumnDefinition Width="{Binding Path=TabPanelWidth, RelativeSource={RelativeSource TemplatedParent}}" /> - public float TabPanelWidth { get {return (float) GetValue (TabPanelWidthProperty);} set {SetValue (TabPanelWidthProperty, value);} } public static readonly DependencyProperty TabPanelWidthProperty = DependencyProperty.Register ("TabPanelWidth", typeof (float), typeof (BivTabControl), new UIPropertyMetadata (null)); But vozmozhnast need to set not only fixed values, but still a value of type: Auto, 0.5 *, and the like. Any ideas?

    Read the article

  • Why does C++ not allow multiple types in one auto statement?

    - by Walter
    The 2011 C++ standard introduced the new keyword auto, which can be used for defining variables instead of a type, i.e. auto p=make_pair(1,2.5); // pair<int,double> auto i=std::begin(c), end=std::end(c); // decltype(std::begin(c)) In the second line, i and end are of the same type, referred to as auto. The standard does not allow auto i=std::begin(container), e=std::end(container), x=*i; when x would be of different type. My question: why does the standard not allow this last line? It could be allowed by interpreting auto not as representing some to-be-decuded type, but as indicating that the type of any variable declared auto shall be deduced from its assigned value. Is there any good reason for the C++11 standard to not follow this approach? There is actually a use case for this, namely in the initialisation statement of for loops: for(auto i=std::begin(c), end=std::end(c), x=*i; i!=end; ++i, x+=*i) { ... } when the scope of the variables i, end, and x is limited to the for loop. AFAIK, this cannot be achieved in C++ unless those variables have a common type. Is this correct? (ugly tricks of putting all types inside a struct excluded) There may also be use cases in some variadic template applications.

    Read the article

  • Auto-cancel reason not found (6, 13906)

    - by Rajesh Sharma
    There are many errors in the application which are never invoked because of appropriate application configuration done at the time of implementation by the solution architects. So typically, as an application end user you would never stumble upon such errors. But what if the application administrator inadvertently changes the configuration/setup in the development, test, QA, or production environment? This is the time when you as an end user are introduced to a brand-new error for which you may not have a clue or understanding to what it means and neither the access/privilege to rectify it.    In this post we'll focus on one such error '6, 13906 - Auto-cancel reason not found'.   You get this error if you have not defined a Bill (Segment) Cancel Reason (Admin Menu, B, Bill Cancel Reason) code with System Default value of Turn off auto-cancel.   Consider a scenario when you are about to final bill an 'Account' for which the bill period's cut-off date you selected is falling on or after the Service Agreement's (SA) end/stop date (basically SA is Stopped with a date earlier than it was billed previously). And for the same 'Account' either: Bill segments exists that end after the SA's end date OR Non-closing bill segments exists that end on the SA's end date (OR closing bill segments that do not end on SA's end date or do not exist at all - remember closing/final bill segment is generated if the SA is in Stopped status).   CC&B detects such scenario and attempts to cancel all such violating bill segments automatically, but NOT if you are generating the bill Online. If online, the system assumes that you know what you are doing, and prompts you with error 2, 13716 - Bill segments that violate the SA (%1) End Date (%2) exist to take necessary action.   If in batch, system automatically cancels these kinds of bill segment(s).   Since this happens in the background, you have to define within the application which System Default Bill (Segment) cancellation reason code identified as Turn off auto-cancel, should be used by the process when it attempts to cancel any such violating bill segments (You already know that you cannot cancel a bill segment without giving a reason for cancellation).   So what exactly happens during batch billing?   Bill Segment generation routine at first determines billing eligibility of the service agreement being billed. One of the billing eligibility criteria is to check the SA's previous bill segments which have end dates greater than the current cut-off date/end date. Technically, the routine retrieves a count of such violating bill segments.     SELECT COUNT (*) FROM CI_BSEG WHERE SA_ID = :SA-ID AND BSEG_STAT_FLG = '50' -- Frozen AND END_DT IS NOT NULL AND (END_DT > '03-JUN-2010' -- Bill segment greater than SA's End Date OR OR (END_DT = '03-JUN-2010' AND CLOSING_BSEG_SW = 'N')) -- Non-closing bill segment ending on SA's end date   If the count is greater than zero, Bill segment generation routine executes another program to auto-cancel such bill segments. Auto-cancel program retrieves the 'Bill Cancel Reason' code which is identified as Turn off auto-cancel. Retrieved cancel reason code is then placed on the bill segments that are being cancelled automatically.   During this process if the routine fails to determine the bill cancel reason code having System Default Turn off auto-cancel because it was not been configured, you get a bill exception 6, 13906 - Auto-cancel reason not found.   Also note that duplicate or multiple System Default codes identified as Turn off auto-cancel are not allowed. CC&B would complain with an error 2, 54201.   Duplicate validation/check is also performed within Auto-cancel routine, if suppose for test purposes you executed a DML statement updating CI_BILL_CAN_RSN.BSCAN_SYS_DFLT_FLG with a value 'T'.

    Read the article

  • mySQL auto increment problem: Duplicate entry '4294967295' for key 1

    - by Josh
    I have a table of emails. The last record in there for an auto increment id is 3780, which is a legit record. Any new record I now insert is being inserted right there. However, in my logs I have the occasional: Query FAIL: INSERT INTO mail.messages (timestamp_queue) VALUES (:time); Array ( [0] => 23000 [1] => 1062 [2] => Duplicate entry '4294967295' for key 1 ) Somehow, the autoincrement jumped up to the INT max of 4294967295 Why on god's green earth would this get jumped up so high? I have no inserts with an id field. The show status for that table, Auto_increment table now reads: 4294967296 How could something like this occur? I realize the id field should perhaps be a big int, but the worry I have is that somehow this thing jumps back up. Josh

    Read the article

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