Search Results

Search found 21556 results on 863 pages for 'control structures'.

Page 15/863 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Source Control and SQL Development &ndash; Part 3

    - by Ajarn Mark Caldwell
    In parts one and two of this series, I have been specifically focusing on the latest version of SQL Source Control by Red Gate Software.  But I have been doing source-controlled SQL development for years, long before this product was available, and well before Microsoft came out with Database Projects for Visual Studio.  “So, how does that work?” you may wonder.  Well, let me share some of the details of how we do it where I work… The key to this approach is that everything is done via Transact-SQL script files; either natively written T-SQL, or generated.  My preference is to write all my code by hand, which forces you to become better at your SQL syntax.  But if you really prefer to use the Management Studio GUI to make database changes, you can still do that, and then you use the Generate Scripts feature of the GUI to produce T-SQL scripts afterwards, and store those in your source control system.  You can generate scripts for things like stored procedures and views by right-clicking on the database in the Object Explorer, and Choosing Tasks, Generate Scripts (see figure 1 to the left).  You can also do that for the CREATE scripts for tables, but that does not work when you have a table that is already in production, and you need to make just a simple change, such as adding a new column or index.  In this case, you can use the GUI to make the table changes, and then instead of clicking the Save button, click the Generate Change Script button (). Then, once you have saved the change script, go ahead and execute it on your development database to actually make the change.  I believe that it is important to actually execute the script rather than just click the Save button because this is your first test that your change script is working and you didn’t somehow lose a portion of the change. As you can imagine, all this generating of scripts can get tedious and tempting to skip entirely, so again, I would encourage you to just get in the habit of writing your own Transact-SQL code, and then it is just a matter of remembering to save your work, just like you are in the habit of saving changes to a Word or Excel document before you exit the program. So, now that you have all of these script files, what do you do with them?  Well, we organize ours into folders labeled ChangeScripts, Functions, Views, and StoredProcedures, and those folders are loaded into our source control system.  ChangeScripts contains all of the table and index changes, and anything else that is basically a one-time-only execution.  Of course you want to write your scripts with qualifying logic so that if a script were accidentally run more than once in a database, it would not crash nor corrupt anything; but these scripts are really intended to be run only once in a database. Once you have your initial set of scripts loaded into source control, then making changes, such as altering a stored procedure becomes a simple matter of checking out your CREATE PROCEDURE* script, editing it in SSMS, saving the change, executing the script in order to effect the change in your database, and then checking the script back in to source control.  Of course, this is where the lack of integration for source control systems within SSMS becomes an irritation, because this means that in addition to SSMS, I also have my source control client application running to do the check-out and check-in.  And when you have 800+ procedures like we do, that can be quite tedious to locate the procedure I want to change in source control, check it out, then locate the script file in my working folder, open it in SSMS, do the change, save it, and the go back to source control to check in.  Granted, it is not nearly as burdensome as, say, losing your source code and having to rebuild it from memory, or losing the audit trail that good source control systems provide.  It is worth the effort, and this is how I have been doing development for the last several years. Remember that everything that the SQL Server Management Studio does in modifying your database can also be done in plain Transact-SQL code, and this is what you are storing.  And now I have shown you how you can do it all without spending any extra money.  You already have source control, or can get free, open-source source control systems (almost seems like an oxymoron, doesn’t it) and of course Management Studio is free with your SQL Server database engine software. So, whether you spend the money on tools to make it easier, or not, you now have no excuse for not using source control with your SQL development. * In our current model, the scripts for stored procedures and similar database objects are written with an IF EXISTS…DROP… at the top, followed by the CREATE PROCEDURE… section, and that followed by a section that assigns permissions.  This allows me to run the same script regardless of whether the procedure previously existed in the database.  If the script was only an ALTER PROCEDURE, then it would fail the first time that procedure was deployed to a database, unless you wrote other code to stub it if it did not exist.  There are a few different ways you could organize your scripts for deployment, each with its own trade-offs, but I think it is absolutely critical that whichever way you organize things, you ensure that the same script is run throughout the deployment cycle, and do not allow customizations to creep in between TEST and PROD.  If you do, then you have broken the integrity of your deployment process because what you deployed to PROD was not exactly the same as what was tested in TEST, so you effectively have now released untested code into PROD.

    Read the article

  • Why are source control systems still mostly backed with files?

    - by Andy
    It seems that more source control systems still use files as the means of storing the version data. Vault and TFS use Sql Server as their data store, which I would think would be better for data consistency as well as speed. So why is it that SVN, I believe GIT, CVS, etc still use the file system as essentially a database, (I ask this question as we had our SVN server just corrupt itself during a normal commit) instead of using actual database software (MSSQL, Oracle, Postgre, etc)?

    Read the article

  • How do I start implementing version control on legacy websites?

    - by Eric
    Assuming no experience with version control systems, just local to live web development. I've been dropped in on a few legacy website projects, and want an easier and more robust way to be able to quickly push and revert changes en masse. I'm currently the only developer on these projects, but more may be added in the future and I think it would be beneficial to set up a system that others can use.

    Read the article

  • What libgdx project files can I ignore from version control?

    - by Zhen
    In an automatically created libgdx project, what files can I safely tell Git (or other revision control systems) to ignore? I'm considering these: *-android/.settings/ *-android/bin/ *-desktop/.settings/ *-desktop/bin/ *-html/.settings/ *-html/gwt-unitCache/ *-html/war/WEB-INF/classes/ *-html/war/WEB-INF/deploy/ *-html/war/assets/ *-html/war/ */.settings/ */bin/ Am I missing some? Is there a complete list somewhere?

    Read the article

  • CustomValidatation control that fire on multiple control events

    - by George
    I am trying to create a UserControl that is a composite control for entering Dates. It involves 2 drop down controls (one for month and one for day) and a text box for year. It also has a CustomValidation control that I would like the user of the UserControl to be able to set the ClientValidationFunction property and have it triggered whenever the value in any of the 3 date part controls changes. To hook up each of the 3 controls to the validation control, I use teh AJAX ValidatorHookupControlID method. If I hard code the following code directly in my aspx page that houses the usercontrol, my Client Validation Function is successfulluy called when any of the 3 date part control values are changed: <script type="text/javascript"> //<![CDATA[ debugger; alert('hooking up'); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_txtYear", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_ddlDate", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); ValidatorHookupControlID("ctl00_phPageContent_dtmPassportExpirationDate_ddlMonth", document.all("ctl00_phPageContent_dtmPassportExpirationDate_CustomValidator1")); //]]> However, I would like my usercontrol to emit this Javascript, so I added the following Code. Public Property ClientValidationFunction() As String Get Return CustomValidator1.ClientValidationFunction End Get Set(ByVal value As String) CustomValidator1.ClientValidationFunction = value End Set End Property Public Property EnableClientScript() As Boolean Get Return CustomValidator1.EnableClientScript End Get Set(ByVal value As Boolean) CustomValidator1.EnableClientScript = value End Set End Property Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If Me.ClientValidationFunction.Trim <> "" AndAlso Me.EnableClientScript Then RegisterValidationScript() End If End Sub Private Sub RegisterValidationScript() Dim Key As String = Me.ClientID & "_ClientValidate" If Not Page.ClientScript.IsClientScriptBlockRegistered(Key) Then Page.ClientScript.RegisterClientScriptBlock(GetType(String), Key, GetJavascript, True) End If End Sub Private Function GetJavascript() As String Dim Out As String = "" Const Quote As String = Chr(34) Out &= "debugger;" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & txtYear.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & ddlDate.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Out &= "ValidatorHookupControlID(" & Quote & ddlMonth.ClientID & Quote & ", document.all(" & Quote & CustomValidator1.ClientID & Quote & "));" & vbCrLf Return Out End Function Unfortunately, when the ValidatorHookupControlID method is called, the second parameter (the one that locates the validation control) always evaluates to null and the method fails. ValidatorHookupControlID("ctl00_phPageContent_DateSelector21_txtYear", document.all("ctl00_phPageContent_DateSelector21_CustomValidator1")); Can you tell me how to correct this error?

    Read the article

  • .NET C#: WebBrowser control Navigate() does not load targeted URL

    - by Dave
    Hey guys, I'm trying to programmatically load a web page via the WebBrowser control with the intent of testing the page & it's JavaScript functions. Basically, I want to compare the HTML & JavaScript run through this control against a known output to ascertain whether there is a problem. However, I'm having trouble simply creating and navigating the WebBrowser control. The code below is intended to load the HtmlDocument into the WebBrowser.Document property: WebBrowser wb = new WebBrowser(); wb.AllowNavigation = true; wb.Navigate("http://www.google.com/"); When examining the web browser's state via Intellisense after Navigate() runs, the WebBrowser.ReadyState is 'Uninitialized', WebBrowser.Document = null, and it overall appears completely unaffected by my call. On a contextual note, I'm running this control outside of a Windows form object: I do not need to load a window or actually look at the page. Requirements dictate the need to simply execute the page's JavaScript and examine the resultant HTML. Any suggestions are greatly appreciated, thanks!

    Read the article

  • Version control of software refactoring

    - by Muhammad Alkarouri
    What is the best way of doing version control of large scale refactoring? My typical style of programming (actually of writing documents as well) is getting something out as quickly as possible and then refactoring it. Typically, refactoring takes place at the same time as adding other functionality. In addition to standard refactoring of classes and functions, functions may move from one file to another, files get split and merged or just reordered. For the time being, I am using version control as a lone user, so there is no issue of interaction with other developers at this stage. Still, version control gives me two aspects: Backup and ability to revert to a good version "in case". Looking at the history tells me how the project progressed and the flow of ideas. I am using mercurial on windows using TortoiseHg which enables selections of hunks to commit. The reason I mention this is that I would like advice on the granularity of a commit in refactoring. Should I split refactoring from functionality added always in committing? I have looked at the answers of http://stackoverflow.com/questions/68459/refactoring-and-source-control-how-to but it doesn't answer my question. That question focuses on collaboration with a team. This one concentrates on having a history that is understandable in future (assuming I don't rewrite history as some VCS seem to allow).

    Read the article

  • How to check absolute control visibility and how to be notified for changes of absolute visibility

    - by portakalla
    I have several controls inside my form and I perform several changes (Text, Font, BackColor etc.) on these controls. My changes are necessary only if the controls are visible. So, I want to stop performing my changes on controls that are not visible. I want to keep changing my controls when they become visible again. I can use Control.Visible and Control.VisibleChanged, however they are not satisfactory for my purpose. The problem is, VisibleChanged is not fired when control becomes invisible due to its parent (i.e. because its parent became invisible). Interestingly, it is fired when control becomes visible again. Is there a way to be notified for visibility changes without recursively listening parent visibility changes? I also want to be notified when another form is placed over my form and some of my controls become non-visible. I call this absolute visibility. (Is there another term for it?) Is there an event that I can use for this purpose? Thanks.

    Read the article

  • Namespaces combined with TFS / Source Control explanation

    - by Christian
    As an ISV company we slowly run into the "structure your code"-issue. We mainly develop using Visual Studio 2008 and 2010 RC. Languages c# and vb.net. We have our own Team Foundation Server and of course we use Source Control. When we started developing based on the .NET Framework, we also begun using Namespaces in a primitive way. With the time we 'became more mature', i mean we learned to use the namespaces and we structured the code more and more, but only in the solution scope. Now we have about 100 different projects and solutions in our Source Safe. We realized that many of our own classes are coded very redundant, i mean, a Write2Log, GetExtensionFromFilename or similar Function can be found between one and 20 times in all these projects and solutions. So my idea is: Creating one single kind of root folder in Source Control and start an own namespace-hierarchy-structure below this root, let's name it CompanyName. A Write2Log class would then be found in CompanyName.System.Logging. Whenever we create a new solution or project and we need a log function, we will 'namespace' that solution and place it accordingly somewhere below the CompanyName root folder. To have the logging functionality we then import (add) the existing project to the solution. Those 20+ projects/solutions with the write2log class can then be maintained in one single place. To my questions: - is that a good idea, the philosophy of namespaces and source control? - There must be a good book explaining the Namespaces combined with Source Control, yes? any hints/directions/tips? - how do you manage your 50+ projects?

    Read the article

  • ASP.NET dynamically reassign controls in the control tree

    - by pbz
    Let's say I have a custom control that looks like this <cc:MyControl runat="server" ID="myc" LinkControlID="NewParent" /> and, on the same page: <asp:TextBox runat="server" ID="NewParent" /> What I would like to do is, from MyControl, change NewParent's parent so that it would be part of MyControl's Controls collection. When I try to do this, from OnInit, I get: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases. Which makes sense, but is there a way around this? I'm OK if NewParent remains the child of the Page as long as from MyControl I can somehow redirect the rendering to MyControl's control. Can this be done? Thanks. EDIT: To clarify here's a mockup of MyControl: public class MyControl : Panel { protected override void OnInit(System.EventArgs e) { base.OnInit(e); if (!String.IsNullOrEmpty(LinkControlID)) { Control link = Parent.FindControl(LinkControlID); if (link != null) { Controls.Add(link); } } } public string LinkControlID { get; set; } } This assumes that MyControl and LinkControlID are placed on the same level in the tree hierarchy, which is OK in my case.

    Read the article

  • Growing user control not updating

    - by user328259
    I am developing in C# and .Net 2.0. I have a user control that draws cells (columnar) depending upon the maximum number of cells. There are some drawing routines that generate the necessary cells. There is a property NumberOfCells that adjust the height of this control; CELLHEIGHT_CONSTANT * NumberOfCells. The OnPaint() method is overridden (code that draws the Number of cells). There is another user control that contains a panel which contains the userControl1 from above. There is a property NumberCells that changes userControl1's NumberOfCells. UserControl2 is then placed on a windows form. On that form there is a NumericUpDown control (only increments from 1). When the user increments by 1, I adjust the VerticalScroll.Maximum by 1 as well. Everything works well and good BUT when I increment once, the panel updates fine (inserts a vertical scrolll when necessary) but cells are not being added! I've tried Invalidating on userControl2 AND on the form but nothing seems to draw the newly added cells. Any assistance is appreciated. Thank you in advance. Lawrence

    Read the article

  • Error on clicking on Text to Speech tab in Speech properties in Control Panel

    - by iceman
    When I click on Text to Speech tab in Speech properties I receive error: "C:\WINDOWS\system32\shell32.dll,Control_RunDLL "C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.cpl",Speech". There's a hotfix mentioned the the KBs in MS support.For that MS sent me a password protected file ; 170483_ENU_i386_zip.exe which contained two files : WindowsXP-KB838659-x86-ENU.EXE and WINDOWSXP-KB838659-X86-ENU-Symbols.EXE . The first one did not install as it said i already had it and the second one unpacked some dlls which i don't know how to use. I also tried Re-registering sapi.dll on Windows XP using C:\Windows\System32\regsvr32.exe Is there any other fix to this error?

    Read the article

  • lxc bandwidth control using tc

    - by kumar
    I am trying to restrict bandwidth inside my containers. I have tried using the following commands , But I think it is not getting effective. cd /sys/fs/cgroup/net_cls/ echo 0x1001 > A/net_cls.classid # 10:1 echo 0x1002 > B/net_cls.classid # 10:2 tc qdisc add dev eth0 root \ handle 10: htb tc class add dev eth0 parent 10: \ classid 10:1 htb rate 40mbit tc class add dev eth0 parent 10: \ classid 10:2 htb rate 30mbit tc filter add dev eth0 parent 10: \ protocol ip prio 10 \ handle 1: cgroup Here A and B are containers created with this command. lxc-execute -n A -f configfile /bin/bash lxc-execute -n B -f configfile /bin/bash Whereas configfile contains only this entry: lxc.utsname = test_lxc AFter starting the container , I have started vsftpd inside container A and try to access the files using the ftp client from another machine. Then I killed vsftpd in container A and started vsftpd in container B and try to access the files using ftp client from another machine. I cannot observe any difference in performance, for that matter it is nowhere nearer to 40mbit/30mbit. Please correct me whether anything wrong here.

    Read the article

  • Introduction to Shop Drawing Structures

    A shop drawing is a three dimensional drawing and it consisting of three detailed views like plans, elevations and sections. The shop drawing normally shows more detail than the construction document... [Author: Prahlad Parmar - Computers and Internet - April 06, 2010]

    Read the article

  • Execute background program in bash without job control

    - by Wu Yongzheng
    I often execute GUI programs, such as firefox and evince from shell. If I type "firefox &", firefox is considered as a bash job, so "fg" will bring it to foreground and "hang" the shell. This becomes annoying when I have some background jobs such as vim already running. What I want is to launch firefox and dis-associate it with bash. Consider the following ideal case with my imaginary runbg: $ vim foo.tex ctrl+z and vim is job 1 $ pdflatex foo $ runbg evince foo.pdf evince runs in background and I get me bash prompt back $ fg vim goes foreground Is there any way to do this using existing program? If no, I will write my own runbg.

    Read the article

  • BizTalk: Repeating structures with the Table Looping and Tab

    How to use the Table looping functoid in conjunction with the Table extractor functoid.  read moreBy BiZTech KnowDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Which VNC for Mac to WinXP Home control?

    - by IVR Avenger
    Hi, all. I've got a MacBook and a Windows XP Home machine. I'd like to be able to connect into the XP machine from the Mac over VNC, but not through the Web method, where performance seems to be a bit iffy. I've done some research, and it seems everyone is interested in the XP-Mac connection, where I'm looking to go in the other direction. Is there a free VNC Server out there that will let me accomplish this? Thanks! IVR Avenger

    Read the article

  • Which Version Control Systems support LDAP/AD users and groups

    - by Jason Irwin
    Does anyone know which of the big players (if any) support LDAP/AD users and groups for authentication AND database permissions? Specifically, I'm wondering if SVN, GIT, Mercurial etc. will allow users to login/connect based on AD permissions and also allow granular permissions to be applied to folders within the VC database based on groups within AD. So far my research has not shown this to be possible....

    Read the article

  • How do I learn algorithms and data structures?

    - by sushil bharwani
    this is in continuation to my previous question where i asked is it necessary to learn algorithm and datastructures. I feel yes it is. Now when i work in a enviornment where i wont ever get the chance to learn it by experimenting or practically or in any assignment. What is the right approach like the right books, right kind of problems, right kind of resources that i can go through to give six months or a year or two to learn it. And also mould my mind in a way that it can relate problems to datastructures and algos.

    Read the article

  • Client-Server MMOG & data structures sync when joining / playing

    - by plang
    After reading a few articles on MMOG architecture, there is still one point on which I cannot find much information: it has to do with how you keep in sync server data on the client, when you join, and while you play. A pretty vague question, I agree. Let me refine it: Let's say we have an MMOG virtual world subdivided into geographical cells. A player in a cell is mostly interested in what happens in the cell itself, and all the surrounding cells, not more. When joining the game for the first time, the only thing we can do is send some sort of "database dump" of the interesting cells to the client. When playing, I guess it would be very inefficient to do the same thing regularly. I imagine the best thing to do is to send "deltas" to the client, which would allow keeping the local database in sync. Now let's say the player moves, and arrives in another cell. Surrounding cells change, and for all the new cells the player subscribes, the same technique as used when joining the game has to be used: some sort of "database dump". This mechanic of joining/moving in a cell-based MMOG virtual world interests me, and I was wondering if there were tried and tested techniques in this domain. Thanks!

    Read the article

  • How should I structure my database to gain maximum efficiently in this scenario?

    - by Bob Jansen
    I'm developing a PHP script that analyzes the web traffic of my clients websites. By placing a link to a javascript on the clients website (think of Google Analyses), my script harvests information like: the visitors IP address, reference link, current page link, user agent, etc. Now my clients can view these statistics via a control panel that I have build. These clients can also adjust profile settings, set firewall rules, create support tickets and pay invoices. Currently all the the traffic is stored in one table. You can imagine that this tabel would become very large as some my clients receive thousands of pageviews per day. Furthermore, all the traffic data of each client would be stored in the same table, creating a mess. This is the same for the firewall rules currently, and the invoice and support system. I'm looking for way to structure my database in a more organized way to hold large amounts of data of multiple users. This is the first project that I'm developing that deals with so much data, and would like to hear suggestions and tips. I was thinking of using multiple databases to structure the data. The main database will store users data (email,pass,id,etc) admin/website settings. Than each client will have an unique database labeled prefix_userid, which carry tables holding their traffic, invoice, and support ticket data. Would this be a solution, and would it slow down or speed up overall performances (that is spreading the data over muliple databases). I have a solid VPS, but would like to safe and be as effient as possible.

    Read the article

  • Working with different URL structures

    - by Dane411
    As I'm quite newbie to this field, I've doubts and there are some I couldn't find on Google, i.e: If I'm not wrong, index.html makes it possible to avoid to add the filename to the url, www.example.com/ is equal to www.example.com/index.html. And that works for the following subdirectories, right? www.example.com/music/ Is there any other way to achieve this without using an index.html file? (I've read smth about converting dynamic urls to static: ./?var1=value1&varN=valueN - ./value1/valueN) How can I convert www.example.com/music/ to music.example.com/ and why should it be used? Thanks in advance!

    Read the article

  • Modular Database Structures

    - by John D
    I have been examining the code base we use in work and I am worried about the size the packages have grown to. The actual code is modular, procedures have been broken down into small functional (and testable) parts. The issue I see is that we have 100 procedures in a single package - almost an entire domain model. I had thought of breaking these packages down - to create sub domains that are centered around the procedure relationships to other objects. Group a bunch of procedures that have 80% of their relationships to three tables etc. The end result would be a lot more packages, but the packages would be smaller and I feel the entire code base would be more readable - when procedures cross between two domain models it is less of a struggle to figure which package it belongs to. The problem I now have is what the actual benefit of all this would really be. I looked at the general advantages of modularity: 1. Re-usability 2. Asynchronous Development 3. Maintainability Yet when I consider our latest development, the procedures within the packages are already reusable. At this advanced stage we rarely require asynchronous development - and when it is required we simply ladder the stories across iterations. So I guess my question is if people know of reasons why you would break down classes rather than just the methods inside of classes? Right now I do believe there is an issue with these mega packages forming but the only benefit I can really pin down to break them down is readability - something that experience gained from working with them would solve.

    Read the article

  • Google Docs revision/access control

    - by brainjam
    I've worked on shared Google Docs with family members, but don't really know how or whether Google prevents two users from modifying the same document at the same time .. and clobbering one another's work. How does Google Docs handle this .. is a document 'locked' whenever somebody opens it for revisions? I haven't been able to see an answer for this in their documentation/help.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >