Search Results

Search found 441 results on 18 pages for 'duplication'.

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

  • Remove all rows in duplication (different from distinct row selection)

    - by user1671401
    How can I remove EVERY duplicating row in a DataTable, based on the value of two columns that are in duplication. Unfortunately, I am unable to find the equivalent LINQ Query. (I dont want distinct values even). The table below shall explain my problem I want to delete every row in duplication based on Column_A and Column_B COLUMN_A      COLUMN_B      COLUMN_C     COLUMN_D..... A                       B C                       D E                       F G                       H A                       B E                       F EXPECTED OUTPUT: COLUMN_A      COLUMN_B      COLUMN_C     COLUMN_D..... C                       D G                       H Please help

    Read the article

  • Nginx password protect one domain and avoid config duplication

    - by gansbrest
    I got 2 domains dev.domain.com and beta.domain.com. At the moment I have one server section (default) with a bunch of specific locations and rules. Now I need to password protect beta.domain.com. Is there a way to do this without creating additional server section and essentially duplicating all my location and other rules? Generally I would like to know how other people manage complex nginx configurations. Do they just copy sections (duplicate) or include common rules somehow?

    Read the article

  • Virtual PC duplication process

    - by Toddintr
    This is the process I use for duplicating a Virtual PC (on Windows 7): 1 - Create a new VPC. 2 - Install Windows 7 on the new VPC. 3 - Configure the new Windows 7 installation (install Windows updates, install applications, etc). 4 - Run Sysprep on the new VPC. 5 - Shut down the new VPC. 6 - Make a copy of the new VPC's VHD file. 7 - Create a new VPC, specify "use existing VHD file" in the wizard and provide the name of the copied VHD file. Above works fine but there is one point that threw me off: During the OOBE for the duplicated VPC, when asked for a user name, I had to specify a different user name than the one I had specified for the base VPC. This makes sense because the copied VPC already has that user name. But what I did not understand is why I was asked for a new user name at all? Is it because it is part of the OOBE process and when the OOBE was designed by Microsoft, they did not think of the fact that base OS images could be copied? Thanks - -Todd

    Read the article

  • E-mail duplication problem

    - by Gavin Osborn
    I have taken out a hosting agreement with a well respected hosting provider for a couple of internet facing servers. We have deployed several applications to these servers which send various e-mails back to us for reporting purposes. Context: Each server runs Windows Server 2003 R2 with the IIS 6.0 SMTP service installed. Each application is configured to use the local instance of IIS to send e-mails. The external IP address of each server is mapped to a particular domain eg: server1.mydomain.com server2.mydomain.com These e-mails are sent from a company domain name and not the domain name of the hosted servers (eg: [email protected]) Symptoms: A small number (<1%) of e-mails sent from these applications appear to be duplicated. These are exact duplicate in terms of both content and message headers. The Fix: I contacted my hosting provider and they told me this was a common problem & instructed me to: Change the HELO response of your mail server service to a FQDN (server1.mydomain.com && server2.mydomain.com) Create a DNS A record that resolves the FQDN of your mail server to the primary IP address of your sending mail server. Create a PTR record that resolves your primary IP address back to your mail server's FQDN In the sending domain's (mycompanydomain.com) DNS zone file, add the appropriate SPF record for your hosted servers. eg: v=spf1 a mx include:mydomain -all The Problem Continues: I made all of the changes as prescribed above, I was a little hesitant because these steps seemed to suggest they were more for stopping your messages getting blocked than they were for stopping them from being duplicated - but I am certainly no expert in these matters. It has been 5 days since I applied this fix and the problem still persists. I am certain that these problems are not a bug in the software because they are 4 different applications installed on 2 different servers, all of whom are exhibiting this strange behaviour. This behaviour has also not been seen in our UAT environment. Were my hosts correct to suggest this fix? If not, does anyone know what could be the cause of this problem? Many Thanks

    Read the article

  • Duplication of Windows 7 Backup

    - by Steven Pickles
    I use the built in backup utility for Windows 7 because it's automated and flexible enough to allow me to schedule a daily shadow copy backup of particular files and folders directly to a separate internal RAID 0 array (2 x 1TB). It's also lightweight and stays out of the way. For off-site backup purposes, each week I copy the contents of the internal backup from the RAID 0 array to an external 1 TB drive. I then store move this drive to a different building. The copy from the internal backup to the external backup typically works like this: mount and erase contents of external drive highlight "file" on internal drive, hit CTRL+C CTRL+V on root directory of external drive Is there a better way to synchronize? Microsoft's SyncToy application does a pitiful job, and often leaves the folders not truly synchronized... which completely defeats the ability to use the backup's restore feature.

    Read the article

  • Wired and Wireless Network Duplication

    - by Dave
    Howdy! Running into an issue when some of our client's have their laptop's connected via the wired ethernet network aswell as on the WLAN of the same network. There is know issues caused to the end clients.. BUT! Being a Managed Services Engineer i get pretty over the alerts that come through on our reports for machine's with the same hostname on the same network! We are not going to remove this monitoring because it does help a lot with detecting and stopping inferior users and things like that. So basically.. Question is, is there a way in Windows (third party programs welcome) to disable the wireless network when a wired network is connected and operational.. I know that Windows automticaly 'prefers' the wired network, however they are still both connected and therfore there is duplicate hostnames on the same network. Could also have stupid issues with DNS and things like that! Thanks!

    Read the article

  • MongoDB, Carrierwave, GridFS and prevention of files' duplication

    - by Arkan
    I am dealing with Mongoid, carrierwave and gridFS to store my uploads. For example, I have a model Article, containing a file upload(a picture). class Article include Mongoid::Document field :title, :type => String field :content, :type => String mount_uploader :asset, AssetUploader end But I would like to only store the file once, in the case where I'll upload many times the same file for differents articles. I saw GridFS has a MD5 checksum. What would be the best way to prevent duplication of identicals files ? Thanks

    Read the article

  • How to avoid code duplication for one-off methods with a slightly different signature

    - by Sean
    I am wrapping a number of functions from a vender API in C#. Each of the wrapping functions will fit the pattern: public IEnumerator<IValues> GetAggregateValues(string pointID, DateTime startDate, DateTime endDate, TimeSpan period) { // Validate Data // Break up Requesting Time-Span // Make Requests // Read Results (through another method call } 5 of the 6 requests are aggregate data pulls and have the same signature, so it makes sense to put them in one method and pass the aggregate type to avoid duplication of code. The 6th method however follows the exact same pattern with the same result-set, but is not an aggregate, so no time period is passed to the function (changing the signature). Is there an elegant way to handle this kind of situation without coding a one-off function to handle the non-aggregate request?

    Read the article

  • How do views reduce code duplication?

    - by Debuger
    Hi! I read something like this about db views: Views are incredibly powerful and useful for one reason that stands out above all the other very good reasons. They reduce code duplication. That is, in most cases, the bottom line. If a query will be used in three or more places, then a view will drastically simplify your changes if the schema or query parameters change. I once had to edit 22 stored procedures to change some query logic. If the original architecture had utilized views, then I would have had only three changes. Can anyone explain to me how it works, and maybe give me some examples? Best regards!

    Read the article

  • mercurial: less duplication in hgrc file

    - by zaharpopov
    Hi there. I have using Hg for some projects on my google code hosting. For each projects I set in [auth] section of .hgrc the username/password to push without every asking for password. But it is lots of duplication like: [auth] proj1.prefix = ... 111 proj1.username = google code username proj1.password = google code password proj2.prefix = ... 222 proj2.username = google code username proj2.password = google code password Can this somehow be doing with less duplications? Maybe set variable in hgrc and refer to it from all username/password lines? Thanks in advance for your help

    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

  • Ruby: reduce duplication while initialize hash

    - by user612308
    array = [0, 0.3, 0.4, 0.2, 0.6] hash = { "key1" => array[0..2], "key2" => array[0..3], "key3" => array, "key4" => array, "key5" => array, "key6" => array, "key7" => array } Is there a way I can remove the duplication by doing something like hash = { "key1" => array[0..2], "key2" => array[0..3], %(key3, key4, key5, key6, key7).each {|ele| ele => array} }

    Read the article

  • Duplication in mysql/php

    - by user1334095
    I have a problem in the code.i have two tables 'sms' and 'bd_paid_bribe'.sms table has a column 'Message' and bd_paid_bribe table has a column 'c_addi_info'.when i execute the code first time all the values of Message column are inserted into c_addi_info column.when i enter a record for the second time instead of inserting the new record, all the records of Message column are inserted into bd_paid_bribe column.can u modify the code and provide a solution to avoid duplication and to insert only the newly added record. <?php $con=mysql_connect('localhost','root',''); if(!$con) { die("couldn't connect"); } mysql_select_db("ipab2",$con); $rs2=mysql_query(" select max(sms_index) from tab3"); do { $rs=mysql_query("insert into tab3(sms_index)select max(sms_index) from sms"); $rs3=mysql_query("SELECT max(sms_index) FROM sms"); $rs1=mysql_query("insert into bd_paid_bribe(c_addi_info) select Message from sms "); }while($rs2>$rs3); ?>

    Read the article

  • Django: how to cleanup form fields and avoid code duplication

    - by Alexander Konstantinov
    Quite often I need to filter some form data before using it (saving to database etc.) Let's say I want to strip whitespaces and replace repeating whitespaces with a single one in most of the text fields, in many forms. It's not difficult to do this using clean_<fieldname> methods: # Simplified model with two text fields class MyModel(models.Model): title = models.CharField() description = models.CharField() # Model-based form class MyForm(forms.ModelForm): class Meta: model = MyModel def clean_title(self): title = self.cleaned_data['title'] return re.sub(r'\s{2,}', ' ', title.strip()) def clean_description(self): description = self.cleaned_data['description'] return re.sub(r'\s{2,}', ' ', description.strip()) It does exactly what I need, and has a nice side effect which I like: if user enters only whitespaces, the field will be considered empty and therefore invalid (if it is required) and I don't even have to throw a ValidationError. The obvious problem here is code duplication. Even if I'll create some function for that, say my_text_filter, I'll have to call it for every text field in all my forms: from myproject.filters import my_text_filter class MyForm(forms.ModelForm): class Meta: model = MyModel def clean_title(self): return my_text_filter(self.cleaned_data['title']) def clean_description(self): return my_text_filter(self.cleaned_data['description']) The question: is there any standard and simple way in Django (I use version 1.2 if that matters) to do this (like, for example, by adding property validators = {'title': my_text_filter, 'description': my_text_filter} to MyModel), or at least some more or less standard workaround? I've read about form validation and validators in the documentation, but couldn't find what I need there.

    Read the article

  • detecting object-reference duplication across JavaScript files

    - by AnC
    I have a number of files with contents like this: function hello() { ... element1.text = foo.locale.lorem; element2.text = foo.locale.ipsum; ... elementn.text = foo.locale.whatever; ... } function world() { ... var label = bar.options.baz.blah; var toggle = bar.options.baz.use_toggle; ... } This could be written more efficiently, and also be more readable, by creating a shortcut to the locale object: function hello() { var loc = foo.locale; ... element1.text = loc.lorem; element2.text = loc.ipsum; ... elementn.text = loc.whatever; ... } function world() { var options = bar.options.baz; ... var label = options.blah; var toggle = options.use_toggle; ... } Is there a simple way to detect occurrences of such duplication for any arbitrary object (it's not always as simple as "locale", or foo.something)? Basically, I wanna know where lengthy object references appear two or more times within a function. Thanks!

    Read the article

  • Android 2.0+ account duplication

    - by Stoyan
    I know that you can setup accounts in Android 2.0+ and thats great but as i have recently found out, it can create duplication. My phone(Sprint HTC hero 2.1-upadate1) comes with HTC Sense and thats great, it also has Peep pre-installed and it asked me when i setup the phone to add a twitter account, and so i did. I can now open peep and it all works, perfect. But I decided i wanted to try the Twitter for Android app. I installed it and it also asked me to create a twitter account, not good. I did create the new account and the app worked just like it was supposed to. Then when i go into my accounts i can see that i have two twitter accounts(the same one). Is this something that can be avoided in the programming or is this something that can be fixed with the os? I also noticed the same for the facebook account. Is there something in the SDK that can prevent this...or combine the accounts after the fact? or is this all completely up to the developers. If its up to the developers then i would really like to see some code/documentation so i can avoid such things.

    Read the article

  • Remove duplication's from my DropDownList

    - by user2976270
    In my controller i am returning list of my object with specific property: public ActionResult Index() { List<MyObject> list = db.MyObjects.Where(x => x.family == "Web").ToList(); ViewBag.Files = new SelectList(list, "Id", "protocol"); return View(); } This is my object: public class MyObject { public int id { get; set; } public string fileName { get; set; } public string browser { get; set; } public string protocol { get; set; } public string family { get; set; } } Index.cshtml: @Html.DropDownList("File", new SelectList(ViewBag.Files, "Id", "protocol_site"), "Select webmail site", new { style = "vertical-align:middle;" }) And i try to made 2 changes with no succeed: Remove all the duplication protocol from my DropDownListfor exapmle if i have 10 objects : 9 is doc protocol and 1 pdf i wand to see in my DropDownList only 2 items: DOC and PDF and not all the 10 items. Sort this DropDownList in alphabet order

    Read the article

  • Dynamic UI vs Static UI

    - by Damien
    I've been wondering, at what point should I give up the convenience of a static data entry form with designer support for a dynamic UI which removes a lot of code duplication? There seems to be a conflict in the programming world where people constantly try to remove code repetition to improve maintainability and yet when it comes to forms, that all goes out of the window and everything gets added explicitly to the forms. What signs should I look for to know when it's time to leave the designer in the dust and create a dynamic UI?

    Read the article

  • remove duplicate code in java

    - by Anantha Kumaran
    class A extends ApiClass { public void duplicateMethod() { } } class B extends AnotherApiClass { public void duplicateMethod() { } } I have two classes which extend different api classes. The two class has some duplicate methods(same method repeated in both class) and how to remove this duplication? Edit The ApiClass is not under my control

    Read the article

  • How to use Common Table Expression and check no duplication in SQL Server

    - by vodkhang
    I have a table references to itself. User table: id, username, managerid and managerid links back to id Now, I want to get all the managers including direct manager, manager of direct manager, so on and so forth... The problem is that I do not want to have a unstop recursive sql. So, I want to check if an id alreay in a list, I will not include it anymore. Here is my sql for that: with all_managers (id, username, managerid, idlist) as ( select u1.id, u1.username, u1.managerid, ' ' from users u1, users u2 where u1.id = u2.managerid and u2.id = 6 UNION ALL select u.id, u.username, u.managerid, idlist + ' ' + u.id from all_managers a, users u where a.managerid = u.id and charindex(cast(u.id as nvarchar(5)), idlist) != 0 ) select id, username from all_managers; The problem is that in this line: select u1.id, u1.username, u1.managerid, ' ' The SQL Server complains with me that I can not put ' ' as the initialized for idlist. nvarchar(40) does not work as well. I do not know how to declare it inside a common table expression like this one. Usually, in db2, I can just put varchar(40) My sample data: ID UserName ManagerID 1 admin 1 2 a 1 3 b 1 4 c 2 What I want to do is that I want to find all managers of c guy. The result should be: admin, a, b. Some of the user can be his manager (like admin) because the ManagerID does not allow NULL and some does not have direct manager. With common table expression, it can lead to an infinite recursive. So, I am also trying to avoid that situation by trying to not include the id twice. For example, in the 1st iteration, we already have id : 1, so, in the 2nd iteration and later on, 1 should never be allowed. I also want to ask if my current approach is good or not and any other solutions? Because if I have a big database with a deep hierarchy, I will have to initialize a big varchar to keep it and it consumes memory, right?

    Read the article

  • How to use Common Table Expression and check no duplication in sqlserver

    - by vodkhang
    I have a table references to itself. User table: id, username, managerid and managerid links back to id Now, I want to get all the managers including direct manager, manager of direct manager, so on and so forth... The problem is that I do not want to have a unstop recursive sql. So, I want to check if an id alreay in a list, I will not include it anymore. Here is my sql for that: with --the relation for all the subparts of ozsolar including itself all_managers (id, username, managerid, idlist) as ( --seed that is the ozsola part select u1.id, u1.username, u1.managerid, ' ' from users u1, users u2 where u1.id = u2.managerid and u2.id = 6 UNION ALL select u.id, u.username, u.managerid, idlist + ' ' + u.id from all_managers a, users u where a.managerid = u.id and charindex(cast(u.id as nvarchar(5)), idlist) != 0 ) --select the total number of subparts and group by subpart select id, username from all_managers; The problem is that in this line: select u1.id, u1.username, u1.managerid, ' ' The sqlserver complains with me that I can not put ' ' as the initialized for idlist. nvarchar(40) does not work as well. I do not know how to declare it inside a common table expression like this one. Usually, in db2, I can just put varchar(40)

    Read the article

  • How to avoid duplication entry via form into database

    - by DAFFODIL
    <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form", $con); $reb = "select count(*) from customer where name = '$name';" if (mysql_result($reb,0) > 0) { echo "Item Already Added!<br>"; } else { // add the item } mysql_close($con); header( 'Location: http://localhost/cus.php' ); ?> Parse error: parse error in C:\wamp\www\c.php on line 10

    Read the article

  • Speed up SQL Server Fulltext Index through Text Duplication of Non-Indexed Columns

    - by Alex
    1) I have the text fields FirstName, LastName, and City. They are fulltext indexed. 2) I also have the FK int fields AuthorId and EditorId, not fulltext indexed. A search on FirstName = 'abc' AND AuthorId = 1 will first search the entire fulltext index for 'abc', and then narrow the resultset for AuthorId = 1. This is bad because it is a huge waste of resources as the fulltext search will be performed on many records that won't be applicable. Unfortunately, to my knowledge, this can't be turned around (narrow by AuthorId first and then fulltext-search the subset that matches) because the FTS process is separate from SQL Server. Now my proposed solution that I seek feedback on: Does it make sense to create another computed column which will be included in the fulltext search which will identify the Author as text (e.g. AUTHORONE). That way I could get rid of the AuthorId restriction, and instead make it part of my fulltext search (a search for 'abc' would be 'abc' and 'AUTHORONE' - all executed as part of the fulltext search). Is this a good idea or not? Why?

    Read the article

  • How to aviod duplication entry via form into database

    - by DAFFODIL
    <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form", $con); $reb = "select count(*) from customer where name = '$name';" if (mysql_result($reb,0) > 0) { echo "Item Already Added!<br>"; } else { // add the item } mysql_close($con); header( 'Location: http://localhost/cus.php' ); ?> Parse error: parse error in C:\wamp\www\c.php on line 10

    Read the article

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