Search Results

Search found 24879 results on 996 pages for 'prime number'.

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

  • printing out prime numbers from array

    - by landscape
    I'd like to print out all prime numbers from an array with method. I can do it with one int but don't know how to return certain numbers from array. Thanks for help! public static boolean isPrime(int [] tab) { boolean prime = true; for (int i = 3; i <= Math.sqrt(tab[i]); i += 2) if (tab[i] % i == 0) { prime = false; break; } for(int i=0; i<tab.length; i++) if (( tab[i]%2 !=0 && prime && tab[i] > 2) || tab[i] == 2) { return true; } else { return false; } //return prime; } thanks both of you. Seems like its solved: public static void isPrime(int[] tab) { for (int i = 0; i < tab.length; i++) { if (isPrimeNum(tab[i])) { System.out.println(tab[i]); } } } public static boolean isPrimeNum(int n) { boolean prime = true; for (long i = 3; i <= Math.sqrt(n); i += 2) { if (n % i == 0) { prime = false; break; } } if ((n % 2 != 0 && prime && n > 2) || n == 2) { return true; } else { return false; } }

    Read the article

  • MS Access 2003 - Format a Number with Commas AND Auto-Decimal

    - by Emtucifor
    On a report I have a control which is bound to a column which can have up to 3 decimal places. I want the number to format with commas separating thousands and millions, but I also want the number of decimal places to be automatic, so that if there is no decimal portion then no decimal at all is shown. 1234.567 -> 1,234.567 1234.560 -> 1,234.56 1234.500 -> 1,234.5 1234.000 -> 1,234 General format will give me the auto decimal places but no commas. Standard format gives the comma but is fixed to 2 decimal places. Doing my own =Format(Number, "#,##0.#") leaves the decimal point in and doesn't align properly, with extra space on the right of the number. Do I have to write my own VB function to give the format I want? It seems silly that Access (apparently) can't do this out of the box. This also seems really horrible: =Replace(Replace(Replace(Replace(Replace( _ Format(Number, "#,##0.000") & "x", "0x", ""), "0x", ""), "0x, ""), ".x", ""), "x", "")

    Read the article

  • Code-Golf: Friendly Number Abbreviator

    - by David Murdoch
    Based on this question: Is there a way to round numbers into a friendly format? THE CHALLENGE - UPDATED! (removed hundreds abbreviation from spec) The shortest code by character count that will abbreviate an integer (no decimals). Code should include the full program. Relevant range is from 0 - 9,223,372,036,854,775,807 (the upper limit for signed 64 bit integer). The number of decimal places for abbreviation will be positive. You will not need to calculate the following: 920535 abbreviated -1 place (which would be something like 0.920535M). Numbers in the tens and hundreds place (0-999) should never be abbreviated (the abbreviation for the number 57 to 1+ decimal places is 5.7dk - it is unneccessary and not friendly). Remember to round half away from zero (23.5 gets rounded to 24). Banker's rounding is verboten. Here are the relevant number abbreviations: h = hundred (102) k = thousand (103) M = million (106) G = billion (109) T = trillion (1012) P = quadrillion (1015) E = quintillion (1018) SAMPLE INPUTS/OUTPUTS (inputs can be passed as separate arguments): First argument will be the integer to abbreviate. The second is the number of decimal places. 12 1 => 12 // tens and hundreds places are never rounded 1500 2 => 1.5k 1500 0 => 2k // look, ma! I round UP at .5 0 2 => 0 1234 0 => 1k 34567 2 => 34.57k 918395 1 => 918.4k 2134124 2 => 2.13M 47475782130 2 => 47.48G 9223372036854775807 3 => 9.223E // ect... . . . Original answer from related question (javascript, does not follow spec): function abbrNum(number, decPlaces) { // 2 decimal places => 100, 3 => 1000, etc decPlaces = Math.pow(10,decPlaces); // Enumerate number abbreviations var abbrev = [ "k", "m", "b", "t" ]; // Go through the array backwards, so we do the largest first for (var i=abbrev.length-1; i>=0; i--) { // Convert array index to "1000", "1000000", etc var size = Math.pow(10,(i+1)*3); // If the number is bigger or equal do the abbreviation if(size <= number) { // Here, we multiply by decPlaces, round, and then divide by decPlaces. // This gives us nice rounding to a particular decimal place. number = Math.round(number*decPlaces/size)/decPlaces; // Add the letter for the abbreviation number += abbrev[i]; // We are done... stop break; } } return number; }

    Read the article

  • Batch number variable setter.

    - by eyefinity
    I need help with this batch file I'm working on, Basically everytime it does a task it should plus the variable %number% by one which works fine and all and then repeat over again doing a different task until its completed. This is the code which it uses to repeat I need a way of settings basically: set svn=%svn%%number% set svnlink=%svnlink%%number% set svnfolder=%svnfolder%%number% Instead I am using: if %number%==1 ( set svn=%svn1% set svnlink=%svnlink1% set svnfolder=%svnfolder1%) if %number%==2 ( set svn=%svn2% set svnlink=%svnlink2% set svnfolder=%svnfolder2%) if %number%==3 ( set svn=%svn3% set svnlink=%svnlink3% set svnfolder=%svnfolder3%) Which i really need to shorten as this goes up to number 20+ Is this possible? If you could help me, Thanks!

    Read the article

  • Finding the nth number of primes

    - by Braxton Smith
    I can not figure out why this won't work. Please help me from math import sqrt pN = 0 numPrimes = 0 num = 1 def checkPrime(x): '''Check\'s whether a number is a prime or not''' prime = True if(x==2): prime = True elif(x%2==0): prime=False else: root=int(sqrt(x)) for i in range(3,root,2): if(x%i==0): prime=False break return prime n = int(input("Find n number of primes. N being:")) while( numPrimes != n ): if( checkPrime( num ) == True ): numPrimes += 1 pN = num print("{0}: {1}".format(numPrimes,pN)) num += 1 print("Prime {0} is: {1}".format(n,pN))

    Read the article

  • Java add leading zeros to a number....

    - by user69514
    I need to return a string in the form xxx-xxxx where xxx is a number and xxxx is another number, however when i have leading zeros they disappear. I'm trying number formatter, but it's not working. public String toString(){ NumberFormat nf3 = new DecimalFormat("#000"); NumberFormat nf4 = new DecimalFormat("#0000"); if( areaCode != 0) return nf3.format(areaCode) + "-" + nf3.format(exchangeCode) + "-" + nf4.format(number); else return exchangeCode + "-" + number; } } I figured it out: public String toString(){ NumberFormat nf3 = new DecimalFormat("000"); NumberFormat nf4 = new DecimalFormat("0000"); if( areaCode != 0) //myFormat.format(new Integer(someValue)); return nf3.format(new Integer(areaCode)) + "-" + nf3.format(new Integer(exchangeCode)) + "-" + nf4.format(new Integer(number)); else return nf3.format(new Integer(exchangeCode)) + "-" + nf4.format(new Integer(number)); }

    Read the article

  • Cheap Solution for Routing a Toll Free Number to a Standard POTS Number

    - by VxJasonxV
    I do some technical work for an Internet Radio Show/Podcast, and need to fix something that has been broken for a while. The hosts have a Skype-In number to take listener calls, and for convenience sake, I bought and paid for a toll free number for a period of time. I used to use Asterlink for routing calls, but they folded and sent my number to OneBox, but they're ridiculously expensive by comparison. I'm looking for a cheap solution for this one simple task. Forward toll free calls to a skype-in number. The definition of cheap is as cheap or cheaper than Asterlink was. I paid something like $2 a month, and then the termination/call rate, which was a fraction of a sent for termination, and only whole cents after some serious time on the call. A $20 preload lasted me months at a time. I don't want to be upsold too, I want a simple web based management screen (CDR/stats are fun!), and obviously, it needs to be reliable. What vendors out there are you a fan of that solves this need?

    Read the article

  • Cheap Solution for Routing a Toll Free Number to a Standard POTS Number

    - by VxJasonxV
    I do some technical work for an Internet Radio Show/Podcast, and need to fix something that has been broken for a while. The hosts have a Skype-In number to take listener calls, and for convenience sake, I bought and paid for a toll free number for a period of time. I used to use Asterlink for routing calls, but they folded and sent my number to OneBox, but they're ridiculously expensive by comparison. I'm looking for a cheap solution for this one simple task. Forward toll free calls to a skype-in number. The definition of cheap is as cheap or cheaper than Asterlink was. I paid something like $2 a month, and then the termination/call rate, which was a fraction of a sent for termination, and only whole cents after some serious time on the call. A $20 preload lasted me months at a time. I don't want to be upsold too, I want a simple web based management screen (CDR/stats are fun!), and obviously, it needs to be reliable. What vendors out there are you a fan of that solves this need?

    Read the article

  • Adobe flash player not working with Amazon Prime

    - by Alex
    I have ubuntu 12.04 64bit using Google Chrome. I had chromium from the app center then today amazon prime video stopped working. It told me to update Flash. So I uninstalled chromium and installed Google Chrome. Didn't work. Then I downloaded flash for ubuntu via apt. That one gave me a "flash version isn't supported" message. The flash version was 11. Now I tried http://apt.ubuntu.com/p/flashplugin-installer It worked, but right in the middle of the video, it popped the error message again. Sorry we are unable to stream this video. This is likely because your Flash Player needs to be updated. So I don't know what happened.

    Read the article

  • Windows 7 doesnt boot after installing Ubuntu 12.10 (Asus Zenbook Prime / UEFI problem)

    - by jpdus
    Today I installed Ubuntu and since then i cannot boot into Windows anymore. I used the "standard" option (didnt change any partitions manually, just entered the size) but used the UEFI-mode. At first the GRUB entries for Windows did not work at all, after reading this thead i was able to add a new Grub entry - now i can get into the "windows-loading" screen for a few seconds but then i always see some kind of bluescreen for a fraction of a second and the laptop reboots. I can get into the windows recovery partition but the only option there is to reset everything to factory settings (+erase all data). I have no idea how to get into the Windows 7 repair mode which was mentioned here (tried everything else in this thread too - no success). My boot info can be found here: http://paste.ubuntu.com/1411573/ I have no idea what went wrong (there is even an extra page for the Zenbook Prime where no installation problems are mentioned). I would appreciate any help/ideas, many thanks!

    Read the article

  • number of args for stored procedure PLS00306

    - by Peter Kaleta
    Hi I have problem with calling for my procedure.Oracle scrams pls00306 Error: Wrong number of types of arguments in call to procedure. With my type declaration procedure has exact the same declaration like in header below. If I run it as separate prcedure it works , when i work in ODCI interface for exensible index creation , it throws pls 00306. MEMBER PROCEDURE FILL_TREE_LVL(target_column VARCHAR2, cur_lvl NUMBER, max_lvl NUMBER, parent_rect NUMBER,start_x NUMBER, start_y NUMBER,end_x NUMBER, end_y NUMBER) IS stmt VARCHAR2(2000); rect_id NUMBER; diff_x NUMBER; diff_y NUMBER; new_start_x NUMBER; new_end_x NUMBER; i NUMBER; j NUMBER; BEGIN {...} END FILL_TREE_LVL; STATIC FUNCTION ODCIINDEXCREATE (ia SYS.ODCIINDEXINFO, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER IS stmt VARCHAR2(2000); stmt2 VARCHAR2(2000); min_x NUMBER; max_x NUMBER; min_y NUMBER; max_y NUMBER; lvl NUMBER; rect_id NUMBER; pt_tab VARCHAR2(50); rect_tab VARCHAR2(50); cnum NUMBER; TYPE point_rect is RECORD( point_id NUMBER, rect_id NUMBER ); TYPE point_rect_tab IS TABLE OF point_rect; pr_table point_rect_tab; BEGIN {...} FILL_TREE_LVL('any string',0,lvl,min_x,min_y,max_x, max_y); {...} END;

    Read the article

  • Number of args for stored procedure PLS-00306

    - by Peter Kaleta
    Hi I have problem with calling for my procedure. Oracle scrams PLS-00306 Error: Wrong number of types of arguments in call to procedure. With my type declaration procedure has exact the same declaration like in header below. If I run it as separate procedure it works, when i work in ODCI interface for extensible index creation, it throws PLS-00306. MEMBER PROCEDURE FILL_TREE_LVL (target_column VARCHAR2, cur_lvl NUMBER, max_lvl NUMBER, parent_rect NUMBER,start_x NUMBER, start_y NUMBER, end_x NUMBER, end_y NUMBER) IS stmt VARCHAR2(2000); rect_id NUMBER; diff_x NUMBER; diff_y NUMBER; new_start_x NUMBER; new_end_x NUMBER; i NUMBER; j NUMBER; BEGIN {...} END FILL_TREE_LVL; STATIC FUNCTION ODCIINDEXCREATE (ia SYS.ODCIINDEXINFO, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER IS stmt VARCHAR2(2000); stmt2 VARCHAR2(2000); min_x NUMBER; max_x NUMBER; min_y NUMBER; max_y NUMBER; lvl NUMBER; rect_id NUMBER; pt_tab VARCHAR2(50); rect_tab VARCHAR2(50); cnum NUMBER; TYPE point_rect is RECORD( point_id NUMBER, rect_id NUMBER ); TYPE point_rect_tab IS TABLE OF point_rect; pr_table point_rect_tab; BEGIN {...} FILL_TREE_LVL('any string', 0, lvl,0, min_x, min_y, max_x, max_y); {...} END;

    Read the article

  • javascript number split

    - by Jaron787
    Can anyboyd help me split up this date number in javascript so that when it is outputted to the screen it has slashes between the 4th and 5th number and the 6th and 7th number, so that it can be understood by a vxml voice browser. The number can be any value so i need it to work for any eight digit number. Like so: 20100820 2010/08/20 Many thanks

    Read the article

  • TeamCity build number versus Ant build number task

    - by jonny
    I have a build project that I run from TeamCity, now it takes the build.number from TeamCity. I want to be able to use the buildnumber task (Ant) which in my understanding when used, is supposed to change the value of build number property and increment it for next time. But it seems that I still get the build number from TeamCity. How can I use the build number from <buildnumber file="mybuild.number"/>?

    Read the article

  • Is 12.10 ready from prime time?

    - by Mikey
    I recently installed 12.10 - dual boot using Wubi. I had numerous stability problems: many sporadic, unaccounted for system errors, software that was installed and then seemed to disappear from App Launcher, etc. Machine is new HP quad with 4 gig memory - wonderful piece of hardware - definitely no hardware problems there. I went back to 12.04 (installed from ISO image, not Wubi) and it's rock solid - never any issues at all. Is 12.10 not ready for prime time? Are there fixes-updates in the pipe? Should I get a DVD disc and install 12.10 from ISO instead of Wubi? New to Linux/Ubuntu after 20 years on MS/Windows and loving it - I develop in C++ and Python - maybe will try Lazarus since I know Delphi. Would like to use the latest and greatest Ubuntu but I will not sacrifice stabilty. Are there known problems with 12.10? Would using the standard install instead of Wubi help? Seems a lot of users are voting down this question - not sure why since other users have confirmed problems.

    Read the article

  • Recommended Method to Watch Amazon Prime using Ubuntu 14.04 LTS

    - by Kurt Sanger
    I realize that Hal is no longer in the Ubuntu Software Center for Ubuntu 14.04 and it is only available from a third party at this time. But I would like to know what Ubuntu's plans are for integrating DRM into Linux? Especially with Amazon's integration into the search tool, one would hope that they would make it easier for their Amazon Prime customers to watch Instant Videos. Is the repository for getting Hal for 13.10 safe for use? What will that break if I install it onto 14.04? Or do we need to find another OS that has DRM built into it? If Hal is okay to add to the OS using a third party repo, then why doesn't Ubuntu Software Center support it too? I imagine that Amazon's contract with the video copyright holders requires that they have some protection on electronically distributed media. I also imagine that getting Amazon to change is much harder than getting a bunch of software engineers to fix Ubuntu. Unless they don't want too. At which point Ubuntu isn't really a complete OS. Very disappointing. In general the ease of use of Ubuntu, the software center, and the large variety of applications was alluring. But breaking DRM wasn't a great idea. Can't wait to see what fails in our next update. Please tell us that there is a plan that is going to work in our future.

    Read the article

  • Finding a prime number after a given number

    - by avd
    How can I find the least prime number greater than a given number? For example, given 4, I need 5; given 7, I need 11. I would like to know some ideas on best algorithms to do this. One method that I thought of was generate primes numbers through the Sieve of Eratosthenes, and then find the prime after the given number.

    Read the article

  • Return a number between 0 and 4

    - by munchine
    How do I return a number between 0 and 4, depending the input number? For example if I pass it number 23 it will return 3. The number set should look like 0 5 10 15 20 .. 1 6 11 16 21 .. 2 7 12 17 22 .. 3 8 13 18 23 .. 4 9 14 19 24 What's the math for this?

    Read the article

  • Getting Serial Number of the Hard Drive Provided by the manufacturer through PHP

    - by dta
    Getting Serial Number of the Hard Drive Provided by the manufacturer through PHP : How can it be done? I want to store it in a file. OS : windows 2000,XP,ME,Vista... Yes, I want the serial number of the hard drive of the Server. Or can it be done through Adobe AIR? Or can it be done through a C program on Windows? C:\Documents and Settings\Administrator>dir Volume in drive C has no label. Volume Serial Number is BC16-5D5F Is this number : BC16-5d5f unique for a hard drive? How is it different from the manufacturer given serial number? This command **wmic DISKDRIVE GET SerialNumber** Displays only the following text on my Vista Machine : SerialNumber On my XP machine, the command is unrecognized

    Read the article

  • C++: compute a number's complement and its number of possible mismatches

    - by Eagle
    I got a bit stuck with my algorithm and I need some help to solve my problem. I think an example would explain better my problem. Assuming: d = 4 (maximum number of allowed bits in a number, 2^4-1=15). m_max = 1 (maximum number of allowed bits mismatches). kappa = (maximum number of elements to find for a given d and m, where m in m_max) The main idea is for a given number, x, to compute its complement number (in binary base) and all the possible combinations for up to m_max mismatches from x complement's number. Now the program start to scan from i = 0 till 15. for i = 0 and m = 0, kappa = \binom{d}{0} = 1 (this called a perfect match) possible combinations in bits, is only 1111 (for 0: 0000). for i = 0 and m = 1, kappa = \binom{d}{1} = 4 (one mismatch) possible combinations in bits are: 1000, 0100, 0010 and 0001 My problem was to generalize it to general d and m. I wrote the following code: #include <stdlib.h> #include <iomanip> #include <boost/math/special_functions/binomial.hpp> #include <iostream> #include <stdint.h> #include <vector> namespace vec { typedef std::vector<unsigned int> uint_1d_vec_t; } int main( int argc, char* argv[] ) { int counter, d, m; unsigned num_combination, bits_mask, bit_mask, max_num_mismatch; uint_1d_vec_t kappa; d = 4; m = 2; bits_mask = 2^num_bits - 1; for ( unsigned i = 0 ; i < num_elemets ; i++ ) { counter = 0; for ( unsigned m = 0 ; m < max_num_mismatch ; m++ ) { // maximum number of allowed combinations num_combination = boost::math::binomial_coefficient<double>( static_cast<unsigned>( d ), static_cast<unsigned>(m) ); kappa.push_back( num_combination ); for ( unsigned j = 0 ; j < kappa.at(m) ; j++ ) { if ( m == 0 ) v[i][counter++] = i^bits_mask; // M_0 else { bit_mask = 1 << ( num_bits - j ); v[i][counter++] = v[i][0] ^ bits_mask } } } } return 0; } I got stuck in the line v[i][counter++] = v[i][0] ^ bits_mask since I was unable to generalize my algorithm to m_max1, since I needed for m_max mismatches m_max loops and in my original problem, m is unknown until runtime.

    Read the article

  • Row Number Transformation

    The Row Number Transformation calculates a row number for each row, and adds this as a new output column to the data flow. The column number is a sequential number, based on a seed value. Each row receives the next number in the sequence, based on the defined increment value. The final row number can be stored in a variable for later analysis, and can be used as part of a process to validate the integrity of the data movement. The Row Number transform has a variety of uses, such as generating surrogate keys, or as the basis for a data partitioning scheme when combined with the Conditional Split transformation. Properties Property Data Type Description Seed Int32 The first row number or seed value. Increment Int32 The value added to the previous row number to make the next row number. OutputVariable String The name of the variable into which the final row number is written post execution. (Optional). The three properties have been configured to support expressions, or they can set directly in the normal manner. Expressions on components are only visible on the hosting Data Flow task, not at the individual component level. Sometimes the data type of the property is incorrectly set when the properties are created, see the Troubleshooting section below for details on how to fix this. Installation The component is provided as an MSI file which you can download and run to install it. This simply places the files on disk in the correct locations and also installs the assemblies in the Global Assembly Cache as per Microsoft’s recommendations. You may need to restart the SQL Server Integration Services service, as this caches information about what components are installed, as well as restarting any open instances of Business Intelligence Development Studio (BIDS) / Visual Studio that you may be using to build your SSIS packages. For 2005/2008 Only - Finally you will have to add the transformation to the Visual Studio toolbox manually. Right-click the toolbox, and select Choose Items.... Select the SSIS Data Flow Items tab, and then check the Row Number transformation in the Choose Toolbox Items window. This process has been described in detail in the related FAQ entry for How do I install a task or transform component? We recommend you follow best practice and apply the current Microsoft SQL Server Service pack to your SQL Server servers and workstations, and this component requires a minimum of SQL Server 2005 Service Pack 1. Downloads The Row Number Transformation  is available for SQL Server 2005, SQL Server 2008 (includes R2) and SQL Server 2012. Please choose the version to match your SQL Server version, or you can install multiple versions and use them side by side if you have more than one version of SQL Server installed. Row Number Transformation for SQL Server 2005 Row Number Transformation for SQL Server 2008 Row Number Transformation for SQL Server 2012 Version History SQL Server 2012 Version 3.0.0.6 - SQL Server 2012 release. Includes upgrade support for both 2005 and 2008 packages to 2012. (5 Jun 2012) SQL Server 2008 Version 2.0.0.5 - SQL Server 2008 release. (15 Oct 2008) SQL Server 2005 Version 1.2.0.34 – Updated installer. (25 Jun 2008) Version 1.2.0.7 - SQL Server 2005 RTM Refresh. SP1 Compatibility Testing. Added the ability to reuse an existing column to hold the generated row number, as an alternative to the default of adding a new column to the output. (18 Jun 2006) Version 1.2.0.7 - SQL Server 2005 RTM Refresh. SP1 Compatibility Testing. Added the ability to reuse an existing column to hold the generated row number, as an alternative to the default of adding a new column to the output. (18 Jun 2006) Version 1.0.0.0 - Public Release for SQL Server 2005 IDW 15 June CTP (29 Aug 2005) Screenshot Code Sample The following code sample demonstrates using the Data Generator Source and Row Number Transformation programmatically in a very simple package. Package package = new Package(); package.Name = "Data Generator & Row Number"; // Add the Data Flow Task Executable taskExecutable = package.Executables.Add("STOCK:PipelineTask"); // Get the task host wrapper, and the Data Flow task TaskHost taskHost = taskExecutable as TaskHost; MainPipe dataFlowTask = (MainPipe)taskHost.InnerObject; // Add Data Generator Source IDTSComponentMetaData100 componentSource = dataFlowTask.ComponentMetaDataCollection.New(); componentSource.Name = "Data Generator"; componentSource.ComponentClassID = "Konesans.Dts.Pipeline.DataGenerator.DataGenerator, Konesans.Dts.Pipeline.DataGenerator, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b2ab4a111192992b"; CManagedComponentWrapper instanceSource = componentSource.Instantiate(); instanceSource.ProvideComponentProperties(); instanceSource.SetComponentProperty("RowCount", 10000); // Add Row Number Tx IDTSComponentMetaData100 componentRowNumber = dataFlowTask.ComponentMetaDataCollection.New(); componentRowNumber.Name = "FlatFileDestination"; componentRowNumber.ComponentClassID = "Konesans.Dts.Pipeline.RowNumberTransform.RowNumberTransform, Konesans.Dts.Pipeline.RowNumberTransform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b2ab4a111192992b"; CManagedComponentWrapper instanceRowNumber = componentRowNumber.Instantiate(); instanceRowNumber.ProvideComponentProperties(); instanceRowNumber.SetComponentProperty("Increment", 10); // Connect the two components together IDTSPath100 path = dataFlowTask.PathCollection.New(); path.AttachPathAndPropagateNotifications(componentSource.OutputCollection[0], componentRowNumber.InputCollection[0]); #if DEBUG // Save package to disk, DEBUG only new Application().SaveToXml(String.Format(@"C:\Temp\{0}.dtsx", package.Name), package, null); #endif package.Execute(); foreach (DtsError error in package.Errors) { Console.WriteLine("ErrorCode : {0}", error.ErrorCode); Console.WriteLine(" SubComponent : {0}", error.SubComponent); Console.WriteLine(" Description : {0}", error.Description); } package.Dispose(); Troubleshooting Make sure you have downloaded the version that matches your version of SQL Server. We offer separate downloads for SQL Server 2005, SQL Server 2008 and SQL Server 2012. If you get an error when you try and use the component along the lines of The component could not be added to the Data Flow task. Please verify that this component is properly installed.  ... The data flow object "Konesans ..." is not installed correctly on this computer, this usually indicates that the internal cache of SSIS components needs to be updated. This is held by the SSIS service, so you need restart the the SQL Server Integration Services service. You can do this from the Services applet in Control Panel or Administrative Tools in Windows. You can also restart the computer if you prefer. You may also need to restart any current instances of Business Intelligence Development Studio (BIDS) / Visual Studio that you may be using to build your SSIS packages. Once installation is complete you need to manually add the task to the toolbox before you will see it and to be able add it to packages - How do I install a task or transform component? Please also make sure you have installed a minimum of SP1 for SQL 2005. The IDtsPipelineEnvironmentService was added in SQL Server 2005 Service Pack 1 (SP1) (See  http://support.microsoft.com/kb/916940). If you get an error Could not load type 'Microsoft.SqlServer.Dts.Design.IDtsPipelineEnvironmentService' from assembly 'Microsoft.SqlServer.Dts.Design, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. when trying to open the user interface, it implies that your development machine has not had SP1 applied. Very occasionally we get a problem to do with the properties not being created with the correct data type. Since there is no way to programmatically to define the data type of a pipeline component property, it can only infer it. Whilst we set an integer value as we create the property, sometimes SSIS decides to define it is a decimal. This is often highlighted when you use a property expression against the property and get an error similar to Cannot convert System.Int32 to System.Decimal. Unfortunately this is beyond our control and there appears to be no pattern as to when this happens. If you do have more information we would be happy to hear it. To fix this issue you can manually edit the package file. In Visual Studio right click the package file from the Solution Explorer and select View Code, which will open the package as raw XML. You can now search for the properties by name or the component name. You can then change the incorrect property data types highlighted below from Decimal to Int32. <component id="37" name="Row Number Transformation" componentClassID="{BF01D463-7089-41EE-8F05-0A6DC17CE633}" … >     <properties>         <property id="38" name="UserComponentTypeName" …>         <property id="41" name="Seed" dataType="System.Int32" ...>10</property>         <property id="42" name="Increment" dataType="System.Decimal" ...>10</property>         ... If you are still having issues then contact us, but please provide as much detail as possible about error, as well as which version of the the task you are using and details of the SSIS tools installed.

    Read the article

  • Maximizing the number of true concurrent / parrallel http requests in Silverlight

    - by Clems
    Hi all. I'm using SL 4 beta and my app needs to do a lot of small http requests to the server. I believe that when exceeding the number of allowed concurrent requests, the subsequent requests are put in a queue. I am also aware that SL 4 has both a http browser stack and a http client stack, with both different limit in terms of the number of concurrent requests. Let's say call those limits MAX_BROWSER and MAX_CLIENT. Also I think I read somewhere that the number of concurrent requests is limited per domain, not overall. But I'm sure if this applies to both the http client stack. That means that you CAN have MAX_BROWSER requests to domain1.com AND MAX_BROWSER requests to domain2.com at the same time. And I even believe that sub domains are considered different so you can also have MAX_BROWSER requests to domain1.com AND MAX_BROWSER requests to sub.domain1.com at the same time. I have ownership of the services and domain names so I could easily setup sub domains for my services. Given those considerations I'm trying to optimize the number of concurrent http requests to my server. Here are few questions ? Is is possible to use both stack at the same time ? Is the subdomain/domain story true for both stacks ? None ? If so that would mean that I could potentially have a number of concurrent requests equal to : (MAX_BROWSER + MAX_CLIENT) * NUMBER_OF_DOMAINS which would be fairly good. Is this correct ? I'm kind of sharing my morning thoughts here, hoping somebody has experimented with those things. Thank you.

    Read the article

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