Search Results

Search found 62161 results on 2487 pages for 'set difference'.

Page 8/2487 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to remove an element from set using Iterator?

    - by ankit
    I have a scenario that I am iterating over a set using iterator. Now I want to remove 1st element while my iterator is on 2nd element. How can I do it. I dont want to convert this set to list and using listIterator. I dont want to collect all objects to be removed in other set and call remove all sample code. Set<MyObject> mySet = new HashSet<MyObject>(); mySet.add(MyObject1); mySet.add(MyObject2); ... Iterator itr = mySet.iterator(); while(itr.hasNext()) { // Now iterator is at second element and I want to remove first element }

    Read the article

  • how to set different wallpapers in ubuntu workspaces

    - by Steve
    I'm having an issues trying to customize ubuntu workspaces in the gnome environment. Assuming the default four workspaces aka desktops, how can one have a different wallpaper for each one? When I go to an individual workspace to set its wallpaper, all of the workspaces use it. So if I set: wallpaper B on workspace 2 wallpaper C on workspace 3 What will happen is that all the workspaces will default to the last wallpaper set no matter which workspace it was set in. What's even weirder is that the very first wallpaper set upon using it for the very first time is what shows up when i call up the Workspaces tool. Even though once I settle upon a workspace, no matter which one, the original wallpaper disappears and the last wallpaper set is the one that always shows up.

    Read the article

  • Bin packing part 6: Further improvements

    - by Hugo Kornelis
    In part 5 of my series on the bin packing problem, I presented a method that sits somewhere in between the true row-by-row iterative characteristics of the first three parts and the truly set-based approach of the fourth part. I did use iteration, but each pass through the loop would use a set-based statement to process a lot of rows at once. Since that statement is fairly complex, I am sure that a single execution of it is far from cheap – but the algorithm used is efficient enough that the entire...(read more)

    Read the article

  • How to set a Static Route on a Storage Node

    - by csoto
    To set up a host route to an IP address, here are the procedures for BUI and CLI. You need to know the destination, mask, interface and network. Note that, in this case, the values are just examples. CLI - Log into CLI and run the commands below: configuration net routing create set family=IPv4 set destination=203.246.186.80 set mask=32 set gateway=192.168.100.230 set interface=igb0 commit BUI - Log in to the web ui of the ZFSSA NAS head - Click Configuration - Network - Routing - (+) - In the popup window that will be displayed, enter the values accordingly on the popup window shown on the screenshot below: Any of the two above procedures should get your desired route in place.

    Read the article

  • SQL SERVER – Difference Between GRANT and WITH GRANT

    - by pinaldave
    This was very interesting question recently asked me to during my session at TechMela Nepal. The question is what is the difference between GRANT and WITH GRANT when giving permissions to user. Let us first see syntax for the same. GRANT: USE master; GRANT VIEW ANY DATABASE TO username; GO WITH GRANT: USE master; GRANT VIEW ANY DATABASE TO username WITH GRANT OPTION; GO The difference between both of this option is very simple. In case of only GRANT – username can not grant the same permission to other users. In case, of the option of WITH GRANT – username will be able to give the permission it has received to other users. This is very basic definition of the subject. I would like to request my readers to come up with working script to prove this scenario. If can submit your script to me by email (pinal ‘at’ sqlauthority.com) or in comment field. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Security, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: SQL Permissions

    Read the article

  • SQL SERVER – Difference Between DATETIME and DATETIME2 – WITH GETDATE

    - by pinaldave
    Earlier I wrote blog post SQL SERVER – Difference Between GETDATE and SYSDATETIME which inspired me to write SQL SERVER – Difference Between DATETIME and DATETIME2. Now earlier two blog post inspired me to write this blog post (and 4 emails and 3 reads from readers). I previously populated DATETIME and DATETIME2 field with SYSDATETIME, which gave me very different behavior as SYSDATETIME was rounded up/down for the DATETIME datatype. I just ran the same experiment but instead of populating SYSDATETIME in this script I will be using GETDATE function. DECLARE @Intveral INT SET @Intveral = 10000 CREATE TABLE #TimeTable (FirstDate DATETIME, LastDate DATETIME2) WHILE (@Intveral > 0) BEGIN INSERT #TimeTable (FirstDate, LastDate) VALUES (GETDATE(), GETDATE()) SET @Intveral = @Intveral - 1 END GO SELECT COUNT(DISTINCT FirstDate) D_FirstDate, COUNT(DISTINCT LastDate) D_LastDate FROM #TimeTable GO SELECT DISTINCT a.FirstDate, b.LastDate FROM #TimeTable a INNER JOIN #TimeTable b ON a.FirstDate = b.LastDate GO SELECT * FROM #TimeTable GO DROP TABLE #TimeTable GO Let us run above script and observe the results. You will find that the values of GETDATE which is populated in both the columns FirstDate and LastDate are very much same. This is because GETDATE is of datatype DATETIME and the precision of the GETDATE is smaller than DATETIME2 there is no rounding happening. In other word, this experiment is pointless. I have included this as I got 4 emails and 3 twitter questions on this subject. If your datatype of variable is smaller than column datatype there is no manipulation of data, if data type of variable is larger than column datatype the data is rounded. Reference: Pinal Dave (http://www.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Difference between sh file.sh and file.sh

    - by RAS
    I have two questions : What is the difference between executing sh filename.sh and filename.sh? How can I make both of them giving me the same output ? I'm asking this question as right now I'm facing a problem. I'm trying to run a Java + SWT application from terminal. When I do filename.sh, it gives me the desired output. But when I do sh filename.sh or bash filename.sh, it throws me an error : Exception in thread "main" java.lang.NoClassDefFoundError: MainForm/java Caused by: java.lang.ClassNotFoundException: MainForm.java at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: MainForm.java. Program will exit. I know this question is already asked here but I'm still not clear about it. I have gone through the following links : What is the difference between ./ and sh to run a script? Can scripts run even when they are not set as executable? Can anyone help me with this?

    Read the article

  • Is the difference between sudo and gksu the same as the difference between sudo -i and sudo -s?

    - by fred.bear
    Is the difference between sudo cmd and gksu cmd, the same as the difference between starting a shell with sudo -i and sudo -s? ... or put another way, Is sudo cmd the same as sudo -i cmd and gksu cmd the same as sudo -s cmd? EDIT: Based on what I read on an Ubuntu Documentation Page where it says: You should never use normal sudo to start graphical applications as root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by root. (AFAICT, this is all that's special about the environment of the started process with gksudo vs. sudo). The "AFAICT" doen't really give me full confidence that there is nothing more to it. (..a belated UPDATE: I tested his commemnt today (2 months later) about: "This prevents files in your home directory becoming owned by root." All files I created via sudo/gksu were all owned by "root", and the group was "root".) I've read parts of the info sudo and noticed the -i and -s seem to be doing the same thing as the AFAICT environment issue... but I hit overload.. so I've asked my question here. PS.. My question is not about sudo vs gksu .. It is more about: Is gksu the same as sudo -s .. and if not, how do they differ?

    Read the article

  • Is there a way to intersect/diff a std::map and a std::set?

    - by Jack
    I'm wondering if there a way to intersect or make the differences between two structures defined as std::set<MyData*> and std::map<MyData*, MyValue> with standard algorithms (like std::set_intersect) The problem is that I need to compute the difference between the set and the keyset of the map but I would like to avoid reallocating it (since it's something that is done many times per second with large data structures). Is there a way to obtain a "key view" of the std::map? After all what I'm looking is to consider just the keys when doing the set operation so from an implementation point it should be possible but I haven't been able to find anything.

    Read the article

  • SQL SERVER – Difference Between DATETIME and DATETIME2

    - by pinaldave
    Yesterday I have written a very quick blog post on SQL SERVER – Difference Between GETDATE and SYSDATETIME and I got tremendous response for the same. I suggest you read that blog post before continuing this blog post today. I had asked people to honestly take part and share their view about above two system function. There are few emails as well few comments on the blog post asking question how did I come to know the difference between the same. The answer is real world issues. I was called in for performance tuning consultancy where I was asked very strange question by one developer. Here is the situation he was facing. System had a single table with two different column of datetime. One column was datelastmodified and second column was datefirstmodified. One of the column was DATETIME and another was DATETIME2. Developer was populating them with SYSDATETIME respectively. He was always thinking that the value inserted in the table will be the same. This table was only accessed by INSERT statement and there was no updates done over it in application.One fine day he ran distinct on both of this column and was in for surprise. He always thought that both of the table will have same data, but in fact they had very different data. He presented this scenario to me. I said this can not be possible but when looked at the resultset, I had to agree with him. Here is the simple script generated to demonstrate the problem he was facing. This is just a sample of original table. DECLARE @Intveral INT SET @Intveral = 10000 CREATE TABLE #TimeTable (FirstDate DATETIME, LastDate DATETIME2) WHILE (@Intveral > 0) BEGIN INSERT #TimeTable (FirstDate, LastDate) VALUES (SYSDATETIME(), SYSDATETIME()) SET @Intveral = @Intveral - 1 END GO SELECT COUNT(DISTINCT FirstDate) D_GETDATE, COUNT(DISTINCT LastDate) D_SYSGETDATE FROM #TimeTable GO SELECT DISTINCT a.FirstDate, b.LastDate FROM #TimeTable a INNER JOIN #TimeTable b ON a.FirstDate = b.LastDate GO SELECT * FROM #TimeTable GO DROP TABLE #TimeTable GO Let us see the resultset. You can clearly see from result that SYSDATETIME() does not populate the same value in the both of the field. In fact the value is either rounded down or rounded up in the field which is DATETIME. Event though we are populating the same value, the values are totally different in both the column resulting the SELF JOIN fail and display different DISTINCT values. The best policy is if you are using DATETIME use GETDATE() and if you are suing DATETIME2 use SYSDATETIME() to populate them with current date and time to accurately address the precision. As DATETIME2 is introduced in SQL Server 2008, above script will only work with SQL SErver 2008 and later versions. I hope I have answered few questions asked yesterday. Reference: Pinal Dave (http://www.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Optimization, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • What is the difference between nvidia-graphics-drivers and nvidia-graphics-drivers-updates

    - by Jarl
    I see that there are two packages nvidia-current and nvidia-current-updates. The apparently stem from nvidia-graphics-drivers and nvidia-graphics-drivers-updates respectively: https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-updates I wonder why there are two packages, and what is the difference between these two packages?

    Read the article

  • Difference between programs in Software Centre and Launchpad PPA

    - by Lionthinker
    On several Ubuntu sites such as OMG Ubuntu there are summaries of new ppa's. These are useful programs, but they don't appear in the Software Center. However, in the center there are programs that specifically say are "community supported" and not Canonical supported. So what is the difference between Software Center programs and PPA's? It would be a lot more useful if more PPAs were in the center.

    Read the article

  • Difference between Windows and Linux development environments?

    - by Ryan
    I have an interview coming up soon for a Business Analyst position and the recruiter mentioned some feedback from a prior candidate that was interviewed who said the interviewers asked him what the difference between a Windows and Linux development environment was. Are there some high level things I need to be aware of from a business point of view when working with a development team or designing an application on Windows vs Linux?

    Read the article

  • Data Flow Diagrams - Difference between Lines and Arrows

    - by Howdy_McGee
    I'm currently working with Visio to create Data Flow Diagrams for a System Analysis and Design class but I'm unsure what the difference between ------ and ------> is. I can connect 2 shapes together with a line (process, entity, data store) but does the single line connecting the two mean data flow? Do I need to explicitly use the data flow arrow to show which way data is flowing? (There doesn't seem to be tags for this topic, maybe im in the wrong place?)

    Read the article

  • Difference between OEM install and custom Ubuntu image

    - by Suman
    I'm looking into the best way to deploy a customized Ubuntu image and it looks like I have two options: To make an "OEM install" version To make a custom Ubuntu image Could someone help me understand the difference between these two methods of customizing a Ubuntu install? It appears to me that both these methods allow for elaborate customization of the image while allowing the user to enter their own end-user details (time zone, username, password, etc.)

    Read the article

  • SQL SERVER Difference Between ROLLBACK IMMEDIATE and WITH NO_WAIT during ALTER DATABASE

    Today, we are going to discuss about something very simple, but quite commonly confused two options of ALTER DATABASE.The first one is ALTER DATABASE …ROLLBACK IMMEDIATE and the second one is WITH NO_WAIT.Many people think they are the same or are not sure of the difference between these two options. Before we continue our explaination, [...]...Did 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

  • Difference between DISTINCT and VALUES in DAX

    - by Marco Russo (SQLBI)
    I recently got a question about differences between DISTINCT and VALUES in DAX and thanks to Jeffrey Wang I created a simple example to describe the difference. Consider the two tables below: Fact and Dim tables, having a single column with the same name of the table. A relationship exists between Fact[Fact] and Dim[Dim]. This relationship generates a referential integrity violations in table Fact for rows containing C, which doesn’t exist in table Dim. In this case, an empty row is virtually inserted...(read more)

    Read the article

  • How to set density for each shape in PhysX 3.1

    - by hywei
    I'm using PhysX 3.1 as my game's physics engine. One requirement is that I need set different density for each shape(there are server shapes for my single rigid actor). I know that the shape's density can be set by NxShapeDesc::density in PhysX 2.8, but I can't find such interface in PhysX 3.1. I know that the mass properties can be set in PhysX 3.1 just as the snowman example in the SDK, but I don't know whether there exists a direct interface to set density for each shape.

    Read the article

  • Is there a major difference between JMF 1.0 and JMF 2.1.1

    - by Fasih Khatib
    Alright, this question stems from the fact that there are very few online resources for learning JMF. The books that are available are quite old, some of them out of publication. This question is an extension to my other question where asked I for the name of a book that I could use to learn JMF. So, is there a major difference between JMF 1.0 and JMF 2.1.1? Should I go ahead and buy a book that covers JMF 1.0?

    Read the article

  • A Look at the Difference Between Web Design and Web Development

    Many people are interested in using the Internet to promote their business. Knowing the difference between web design and web development is important because while the terms are often used in place of one another, they are two very different things. Being able to speak with the people who are creating your website and use the proper terms can help reduce misunderstandings and speed up the creation process.

    Read the article

  • What is the difference in Launchpad between Milestones, Series, Versions and other related info

    - by Luis Alvarado
    How can I explain in an easier way to students the following: What are (and difference between) Milestones, Series and Versions in Launchpad and which one is based on what other. What are Blueprints and Bug Reports What are the different values and descriptions for the columns of Priority, Assignee & Delivery in Blueprints What are the different values and descriptions for the columns of Importance, Assignee, Status in Bug Reports

    Read the article

  • Difference between Zend Framework 1.8 and 1.11 [closed]

    - by user985482
    Hi I have about 6 months of PHP experience and now I am thinking of starting of learning Zend Framework. I learn best usually from books and I noticed on amazon that the most recent release is for the version 1.8. Zend Framework 1.8 Web Application Development Since the curent version is 1.11 will this be a problem in the future? What is the difference beetween the versions. Can anyone recommend a more recent book for this framework?

    Read the article

  • SQL SERVER Difference Between DATETIME and DATETIME2

    Yesterday I have written a very quick blog post on SQL SERVER Difference Between GETDATE and SYSDATETIME and I got tremendous response for the same. I suggest you read that blog post before continuing this blog post today. I had asked people to honestly take part and share their view about above two system [...]...Did 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

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