Search Results

Search found 2397 results on 96 pages for 'copying'.

Page 12/96 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Preserving order when copying elements using Deliverance / XPath

    - by Jon Hadley
    How would I, using Deliverance & XPath (or CSS) selectors, select and copy list items .one and .three from each list below, but display them in the order of their parent list? <ul id="a-wrapper"> <li class="one"></li> <li class="two"></li> <li class="three"></li> <li class="four"></li> </li> <ul id="b-wrapper"> <li class="one"></li> <li class="two"></li> <li class="three"></li> <li class="four"></li> </ul> c,d,e,f,g etc.... The catch is it needs to use a href rule, eg: <prepend href="/blah/deblah" content="#x" theme="#y" /> Using the following just lists all the .one elements, then all the .three elements. <prepend href="/blah/deblah" content=".one" theme="#y" /> <prepend href="/blah/deblah" content=".three" theme="#y" />

    Read the article

  • copying a short int to a char array

    - by cateof
    I have a short integer variable called s_int that holds value = 2 unsighed short s_int = 2; I want to copy this number to a char array to the first and second position of a char array. Let's say we have char buffer[10];. We want the two bytes of s_int to be copied at buffer[0] and buffer[1]. How can I do it?

    Read the article

  • reference dll not copying to bin with deployment project causing error

    - by g.foley
    We have several external dlls being referenced in our Web Application Project. We have a deployment project for installing on the hosting servers. When we were using .net 3.5 and vs2008 the dll were being copied to the bin folder. Since we have upgraded to .net 4 vs2010 this no longer happens and we are getting servers errors since the references cannot be found. CopyLocal is set to true, and i cannot find anything inside the web.config which suggest this is being set else where.

    Read the article

  • Copying contents of a MySQL table to a table in another (local) database

    - by Philip Eve
    I have two MySQL databases for my site - one is for a production environment and the other, much smaller, is for a testing/development environment. Both have identical schemas (except when I am testing something I intend to change, of course). A small number of the tables are for internationalisation purposes: TransLanguage - non-English languages TransModule - modules (bundles of phrases for translation, that can be loaded individually by PHP scripts) TransPhrase - individual phrases, in English, for potential translation TranslatedPhrase - translations of phrases that are submitted by volunteers ChosenTranslatedPhrase - screened translations of phrases. The volunteers who do translation are all working on the production site, as they are regular users. I wanted to create a stored procedure that could be used to synchronise the contents of four of these tables - TransLanguage, TransModule, TransPhrase and ChosenTranslatedPhrase - from the production database to the testing database, so as to keep the test environment up-to-date and prevent "unknown phrase" errors from being in the way while testing. My first effort was to create the following procedure in the test database: CREATE PROCEDURE `SynchroniseTranslations` () LANGUAGE SQL NOT DETERMINISTIC MODIFIES SQL DATA SQL SECURITY DEFINER BEGIN DELETE FROM `TransLanguage`; DELETE FROM `TransModule`; INSERT INTO `TransLanguage` SELECT * FROM `PRODUCTION_DB`.`TransLanguage`; INSERT INTO `TransModule` SELECT * FROM `PRODUCTION_DB`.`TransModule`; INSERT INTO `TransPhrase` SELECT * FROM `PRODUCTION_DB`.`TransPhrase`; INSERT INTO `ChosenTranslatedPhrase` SELECT * FROM `PRODUCTION_DB`.`ChosenTranslatedPhrase`; END When I try to run this, I get an error message: "SELECT command denied to user 'username'@'localhost' for table 'TransLanguage'". I also tried to create the procedure to work the other way around (that is, to exist as part of the data dictionary for the production database rather than the test database). If I do it that, way, I get an identical message except it tells me I'm denied the DELETE command rather than SELECT. I have made sure that my user has INSERT, DELETE, SELECT, UPDATE and CREATE ROUTINE privileges on both databases. However, it seems as though MySQL is reluctant to let this user exercise its privileges on both databases at the same time. How come, and is there a way around this?

    Read the article

  • Copying metadata over a database link in Oracle 10g

    - by Tunde
    Thanks in advance for your help experts. I want to be able to copy over database objects from database A into database B with a procedure created on database B. I created a database link between the two and have tweaked the get_ddl function of the dbms_metadata to look like this: create or replace function GetDDL ( p_name in MetaDataPkg.t_string p_type in MetaDataPkg.t_string ) return MetaDataPkg.t_longstring is -- clob v_clob clob; -- array of long strings c_SYSPrefix constant char(4) := 'SYS_'; c_doublequote constant char(1) := '"'; v_longstrings metadatapkg.t_arraylongstring; v_schema metadatapkg.t_string; v_fullength pls_integer := 0; v_offset pls_integer := 0; v_length pls_integer := 0; begin SELECT DISTINCT OWNER INTO v_schema FROM all_objects@ENTORA where object_name = upper(p_name); -- get DDL v_clob := dbms_metadata.get_ddl(p_type, upper(p_name), upper(v_schema)); -- get CLOB length v_fullength := dbms_lob.GetLength(v_clob); for nIndex in 1..ceil(v_fullength / 32767) loop v_offset := v_length + 1; v_length := least(v_fullength - (nIndex - 1) * 32767, 32767); dbms_lob.read(v_clob, v_length, v_offset, v_longstrings(nIndex)); -- Remove table’s owner from DDL string: v_longstrings(nIndex) := replace( v_longstrings(nIndex), c_doublequote || user || c_doublequote || '.', '' ); -- Remove the following from DDL string: -- 1) "new line" characters (chr(10)) -- 2) leading and trailing spaces v_longstrings(nIndex) := ltrim(rtrim(replace(v_longstrings(nIndex), chr(10), ''))); end loop; -- close CLOB if (dbms_lob.isOpen(v_clob) > 0) then dbms_lob.close(v_clob); end if; return v_longstrings(1); end GetDDL; so as to remove the schema prefix that usually comes with metadata. I get a null value whenever I run this function over the database link with the following queries. select getddl( 'TABLE', 'TABLE1') from user_tables@ENTORA where table_name = 'TABLE1'; select getddl( 'TABLE', 'TABLE1') from dual@ENTORA; t_string is varchar2(30) t_longstring is varchar2(32767) and type t_ArrayLongString is table of t_longstring I would really appreciate it if any one could help. Many thanks.

    Read the article

  • Copying data from STDOUT to a remote machine using SFTP

    - by freddie
    In order to backup large database partitions to a remote machine using SFTP, I'd like to use the databases dump command and send it directly over using SFTP to a remote location. This is useful when needing to dump large data sets when you don't have enough local disk space to create the backup file, and then copy it to a remote location. I've tried using python + paramiko which provides this functionality, but the performance much worse than using the native openssh/sftp binary to transfer files. Does anyone have any idea on how to do this either with the native sftp client on linux, or some library like paramiko? (but one that performs close to the native sftp client)?

    Read the article

  • Problem with copying arrays.

    - by Machta
    I have the following code: string[] firstarray = { "bla bla", "bla bla", "bla bla"}; string[] secondArray = {"aaaaaaaaaaaa", "aaaaaaaaaaa", "aaaaaaaaa"}; string[] newArray = array; array = secondArray; foreach (string item in newArray) { Console.WriteLine(item); } This code gives the following results: bla bla bla bla bla bla I can't understand why the newArray has the same conntent after I assign a different instance to the array. Please help me.

    Read the article

  • Data not displayed first time in android after copying the file from assets to data folder

    - by Thinkcomplete
    Description I have used the code tip from http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ to copy a pre-filled data file to the target and handled this in a asynch task Problem : On starting the application it gives error and shuts down first time, starting again without any change it works perfectly fine. So first time after the file is copied, the error comes but after that no issues. Please help Code attached:.. private class CopyDatabase extends AsyncTask<String, Void, Boolean> { private final ProgressDialog dialog = new ProgressDialog(BabyNames.this); protected void onPreExecute() { this.dialog.setMessage("Loading..."); this.dialog.show(); } @Override protected Boolean doInBackground(String... params) { // TODO Auto-generated method stub try { namesDBSQLHelper.createDatabase(); return null; } catch(IOException ioe){ ioe.printStackTrace(); } return null; } protected void onPostExecute(final Boolean success){ if (this.dialog.isShowing()){ this.dialog.dismiss(); } } }

    Read the article

  • Vector [] vs copying

    - by sak
    What is faster and/or generally better? vector<myType> myVec; int i; myType current; for( i = 0; i < 1000000; i ++ ) { current = myVec[ i ]; doSomethingWith( current ); doAlotMoreWith( current ); messAroundWith( current ); checkSomeValuesOf( current ); } or vector<myType> myVec; int i; for( i = 0; i < 1000000; i ++ ) { doSomethingWith( myVec[ i ] ); doAlotMoreWith( myVec[ i ] ); messAroundWith( myVec[ i ] ); checkSomeValuesOf( myVec[ i ] ); } I'm currently using the first solution. There are really millions of calls per second and every single bit comparison/move is performance-problematic.

    Read the article

  • Copying file to client machine

    - by Shoba Anandhan
    Hi We have a requirement to copy a .txt file into the client machine and open the file using notepad.exe. We develop our application using MS Visual Studio 2008 VB .Net. Any experencied this kind of requirement? Help required... Thanks Shoba Anandhan

    Read the article

  • Python: Copying files with special characters in path

    - by erikderwikinger
    Hi is there any possibility in Python 2.5 to copy files having special chars (Japanese chars, cyrillic letters) in their path? shutil.copy cannot handle this. here is some example code: import copy, os,shutil,sys fname=os.getenv("USERPROFILE")+"\\Desktop\\testfile.txt" print fname print "type of fname: "+str(type(fname)) fname0 = unicode(fname,'mbcs') print fname0 print "type of fname0: "+str(type(fname0)) fname1 = unicodedata.normalize('NFKD', fname0).encode('cp1251','replace') print fname1 print "type of fname1: "+str(type(fname1)) fname2 = unicode(fname,'mbcs').encode(sys.stdout.encoding) print fname2 print "type of fname2: "+str(type(fname2)) shutil.copy(fname2,'C:\\') the output on a Russian Windows XP C:\Documents and Settings\+????????????\Desktop\testfile.txt type of fname: <type 'str'> C:\Documents and Settings\?????????????\Desktop\testfile.txt type of fname0: <type 'unicode'> C:\Documents and Settings\+????????????\Desktop\testfile.txt type of fname1: <type 'str'> C:\Documents and Settings\?????????????\Desktop\testfile.txt type of fname2: <type 'str'> Traceback (most recent call last): File "C:\Test\getuserdir.py", line 23, in <module> shutil.copy(fname2,'C:\\') File "C:\Python25\lib\shutil.py", line 80, in copy copyfile(src, dst) File "C:\Python25\lib\shutil.py", line 46, in copyfile fsrc = open(src, 'rb') IOError: [Errno 2] No such file or directory: 'C:\\Documents and Settings\\\x80\ xa4\xac\xa8\xad\xa8\xe1\xe2\xe0\xa0\xe2\xae\xe0\\Desktop\\testfile.txt'

    Read the article

  • Generic Lists copying references rather than creating a copiedList

    - by Dean
    I was developing a small function when trying to run an enumerator across a list and then carry out some action. (Below is an idea of what I was trying to do. When trying to remove I got a "Collection cannot be modified" which after I had actually woken up I realised that tempList must have just been assigned myLists reference rather than a copy of myLists. After that I tried to find a way to say tempList = myList.copy However nothing seems to exist?? I ended up writing a small for loop that then just added each item from myLsit into tempList but I would have thought there would have been another mechanism (like clone??) So my question(s): is my assumption about tempList receiving a reference to myList correct How should a list be copied to another list? private myList as List (Of something) sub new() myList.add(new Something) end sub sub myCalledFunction() dim tempList as new List (Of Something) tempList = myList Using i as IEnumerator = myList.getEnumarator while i.moveNext 'if some critria is met then tempList.remove(i.current) end end using end sub

    Read the article

  • Cannot copying tables when compiling on Device

    - by Amarpreet
    Hi guys, I am working on sqlite application with around 10 tables in database. it works fine when i run on simulator. And when i open the sqlite file from Applications folder of simulator it shows me all the tables and data. the problem arises when i run app on device. I downloaded the application from device and i checked the sqlite database files there were no tables in it. please help me solving this problem. thanks.

    Read the article

  • Copying Data between table without identity column

    - by user668479
    I have two table and I need to copy the data across from SRCServiceUsers to Clients Everytime i run it I get the following: Violation of PRIMARY KEY constraint 'PK_Clients'. Cannot insert duplicate key in object 'dbo.Clients'. The statement has been terminated. The Primary key ClientId field is not an identity column and therefore requires filling To date I have the following insert into Clients( ClientID, Title, Forenames, FamilyName, [Address], Town, County, PostCode, PhoneNumber, StartDate) SELECT ( Select Max(Clients.ClientID)+ 1, SRCServiceUsers.Title, SRCServiceUsers.[First Names], SRCServiceUsers.Surname, --BUILD UP MUITIPLE COLUMNS SRCServiceUsers.[Property Name] + ', ' + SRCServiceUsers.Street + ', ' + SRCServiceUsers.Suburb as [Address], SRCServiceUsers.Town, SRCServiceUsers.County, SRCServiceUsers.Postcode, SRCServiceUsers.Telephone, SRCServiceUsers.[Start Date] From srcsERVICEuSERS How can i autoincrement the PK field - CLientID when inserting the data? Many thanks Andrew

    Read the article

  • No parameterless constructor defined for this object when simply copying site

    - by jaffa
    I'm getting the above error. All I have done is copied an existing site and set-up debugging to use a different port using IISExpress in Visual Studio. Any ideas why I would suddenly get this error? Normally I get this error when StructureMap cannot for some reason resolve a dependency to inject into a controller. But this has me stumped. The code-base is the same. All I've done is copied the code into another folder!?!

    Read the article

  • Error copying file from app bundle

    - by Michael Chen
    I used the FireFox add-on SQLite Manager, created a database, which saved to my desktop as "DB.sqlite". I copied the file into my supporting files for the project. But when I run the app, immediately I get the error "Assertion failure in -[AppDelegate copyDatabaseIfNeeded], /Users/Mac/Desktop/Note/Note/AppDelegate.m:32 2014-08-19 23:38:02.830 Note[28309:60b] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to create writable database file with message 'The operation couldn’t be completed. (Cocoa error 4.)'.' First throw call stack: "... Here is the App Delegate Code where the error takes place -(void) copyDatabaseIfNeeded { NSFileManager *fileManager = [NSFileManager defaultManager]; NSError *error; NSString *dbPath = [self getDBPath]; BOOL success = [fileManager fileExistsAtPath:dbPath]; if (!success) { NSString *defaultDBPath = [[ [NSBundle mainBundle ] resourcePath] stringByAppendingPathComponent:@"DB.sqlite"]; success = [fileManager copyItemAtPath:defaultDBPath toPath:dbPath error:&error]; if (!success) NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]); } } I am very new to Sqlite, so I maybe I didn't create a database correctly in the FireFox Sqlite manager, or maybe I didn't "properly" copy the .sqlite file in? (I did check the target membership in the sqlite and it correctly has my project selected. Also, the .sqlite file names all match up perfectly.)

    Read the article

  • How to create copying items from property values?

    - by Nam Gi VU
    Let's say I have a list of sub paths such as <PropertyGroup> <subPaths>$(path1)\**\*; $(path2)\**\*; $(path3)\file3.txt; </subPaths> </PropertyGroup> I want to copy these files from folder A to folder B (surely we already have all the sub folders/files in A). What I try was: <Target Name="Replace" DependsOnTargets="Replace_Init; Replace_Copy1Path"> </Target> <Target Name="Replace_Init"> <PropertyGroup> <subPaths>$(path1)\**\*; $(path2)\**\*; $(path3)\file3.txt; </subPaths> </PropertyGroup> <ItemGroup> <subPathItems Include="$(subPathFiles.Split(';'))" /> </ItemGroup> </Target> <Target Name="Replace_Copy1Path" Outputs="%(subPathItems.Identity)"> <PropertyGroup> <src>$(folderA)\%(subPathItems.Identity)</src> <dest>$(folderB)\%(subPathItems.Identity)</dest> </PropertyGroup> <Copy SourceFiles="$(src)" DestinationFiles="$(dest)" /> </Target> But the Copy task didn't work. It doesn't translate the *** to files. What did I do wrong? Please help!

    Read the article

  • Copying contents from one NSMutableArray to another

    - by Sheehan Alam
    I have two NSMutableArrays: NSMutableArray* currentMessages NSMutableArray* items I am trying to copy the contents of items into currentMessages as such: [self.currentMessages addObjectsFromArray:self.items]; When I am debugging self.items contains 30 objects. After this operation self.currentMessages contains 0 objects. Why is the copy not working?

    Read the article

  • Copying web part pages within SharePoint

    - by Jasper
    Hi, I'm trying to copy some web part pages (aspx) from one library into another. Reason is that I've got sites which are created dynamiccally. I also want to add some content (based on several rules) to those sites, which include aspx web part pages. The deployment works fine, but the web part pages are empty in the target site. As I've read in several blog posts, this has something to do with the ghosting of the files. Is there a way to literally copy all of the content in the ASPX to the site? The webparts aren't site or feature dependant, so the pages should work on every site. When I copy the pages with SPD, it works fine, but I don't understand how SPD does this.

    Read the article

  • Copying eclipse projects through command line?

    - by Richie
    Hi, Does anyone know if it is possible to copy an existing project into a new, created workspace on the fly? I can create the workspace already through command line. I am thinking I either need to copy the whole project into another workspace (possible through command line?) or create a new project and copy the .classpath and .project folders. Any help is appreciated. Thanks, Richie

    Read the article

  • Copying a mysql database from localhost to remote server using mysqldump.exe

    - by Ankur
    I want to copy a mysql database from my local computer to a remote server. I am trying to use the mysql dump command. All the examples on the internet suggest doing something like The initial mysql> is just the prompt I get after logging in. mysql> mysqldump -u user -p pass myDBName | NewDBName.out; But when I do this I get You have an error in your SQL syntax; check the manual that corresponds ... to use near 'mysqldump -u user -p pass myDBName | NewDBName.out' Since I have already logged in do I need to use -u and -p? Not doing so gives me the same error. Can you see what is wrong?

    Read the article

  • Copying pointers in C++

    - by tunnuz
    Hello, I have a class A containing two pointers to objects of another class B. I want to initialize one pointer or the other depending on which one is passed to init(), which also takes other parameters. My situation is thus the following: class A { public: A(); init(int parameter, int otherParameter, B* toBeInitialized); protected: B* myB; B* myOtherB; }; Now my point is that I want to call init() as: init(640, 480, this->myB); or init(640, 480, this->myOtherB); Now, my init is implemented as: void init( int parameter, int otherParameter, B* toBeInitialized ) { toBeInitialized = someConstructorFunction(parameter, otherParameter); } The problem is that the two pointers are not initialized, I suspect that toBeInitialized is overwritten, but the original parameter is not modified. I am doing something wrong? Should I use references to pointers? Thank you Tommaso

    Read the article

  • Copying to binary file row of a matrix

    - by Flethuseo
    Hi everyone I want to write each row of a matrix to a binary file. I try writing it like this: vector< vector<uint32_t> > matrix; ... for(size_t i = 0; i < matrix.size(); ++i) ofile->write( reinterpret_cast<char*>(&matrix[i]), sizeof(uint32_t*sizeof(matrix[i])) ); { for(size_t j = 0; j < numcols; ++j) { std::cout << left << setw(10) << matrix[i][j]; } cout << endl; } but it doesn't work, I get garbage numbers. Any help appreciated, Ted.

    Read the article

  • Copying only the changed files while mirroring a website

    - by Rishi Verma
    I am using wget to mirror website using this code $ wget \ --recursive \ --no-clobber \ --page-requisites \ --html-extension \ --convert-links \ --restrict-file-names=windows \ --domains website.org \ --no-parent \ www.website.org/tutorials/html/ The next time I run it it starts downloading the same files again, however I want only the changed files to be downloaded next time. I am open to use any other tool or script(preferably PHP,Curl) apart from using wget.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >