bulk

How can I do bulk search and replace with Perl?

谁说我不能喝 提交于 2019-12-07 02:11:44
问题 I have the following script that takes in an input file, output file and replaces the string in the input file with some other string and writes out the output file. I want to change the script to traverse through a directory of files i.e. instead of prompting for input and output files, the script should take as argument a directory path such as C:\temp\allFilesTobeReplaced\ and search for a string x and replace it with y for all files under that directory path and write out the same files.

Implementing bulk record fetching

ぐ巨炮叔叔 提交于 2019-12-06 21:53:43
问题 At the start of my program, I need to read data from a MS Access database (.mdb) into a drop down control. This is done so that whenever the user types in that control, the application can auto-complete. Anyway, the reading from database took forever so I thought I'd implement bulk row fetching. This is the code I have: CString sDsn; CString sField; sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",sDriver,sFile); TRY { // Open the database database.Open(NULL,false,false,sDsn); // Allocate the

Upload of huge file using a web application

元气小坏坏 提交于 2019-12-06 21:52:31
The environment for the given objective is not currenly available, hence, I'm not able to try out things and have to rely on the analysis only ! My objective can be broken into the following distinct steps : Uploading huge files(upto 100GB ) using a dumb 'Upload File' page - there is no escape from this as the users want a (dumb)front-end and are not willing to ftp the file etc. The web application which provides the above front end will be hosted on a low-end machine - 2GB RAM and 40GB HDD and this web application WILL NOT STORE any part of the huge file on the local machine but must 'quickly

Bulk update/upsert in MongoDB?

三世轮回 提交于 2019-12-06 20:12:30
问题 Is it possible to do bulk update/upsert (not insert) in MongoDB? If yes, please point me to any docs related to this? Thanks 回答1: You can use the command line program mongoimport it should be in your MongoDB bin dir ... There are two options you'll want to look into to use upsert ... --upsert insert or update objects that already exist --upsertFields arg comma-separated fields for the query part of the upsert. You should make sure this is indexed More info here: http://www.mongodb.org/display

Shredding XML from DB using SSIS

不打扰是莪最后的温柔 提交于 2019-12-06 18:45:26
I am looking for a way to pull XML from a SQL database and shred the XML via SSIS in bulk. I currently have a package that can pull XML from the database and pass the XML to a stored procedure, via variable, for shredding but this only works 1 record at a time. When processing 100,000 records, this can become quite time consuming. I would like to shred multiple XML values at once using SSIS. Is this possible with SSIS? Perhaps something in a Data Flow Task where all the XML values are selected from a source then passed to a parser of some sort? So after a lot of searching and thinking about

What Does bulkCommit Mean In The Context Of Ember's RestAdapter?

喜你入骨 提交于 2019-12-06 14:33:56
问题 Ember Data's DS.RESTAdapter includes a bulkCommit property. I can't find any documentation about what this does/means, other than some vague references to batch committing vs bulk committing. Initially I assumed it would mean I could only update a single record at a time, but I currently have it set to false , and I'm still able to update multiple records at the same time using: this.get('store').commit(); So what is the difference between setting bulkCommit to false and setting it to true ?

PowerShell Command To Bulk Rename Files Sequentially

被刻印的时光 ゝ 提交于 2019-12-06 11:34:31
I am trying to make batch file naming easier for my end users. In photographing our locations, we can sometimes have only 1 photo or 500 depending on the size of the location. The code below works beautifully to bulk rename our photos based on how many files are in the directory: $prefix = "[SomePrefix]" $files = Get-ChildItem $id = 1 $files | foreach { Rename-Item -Path $_.fullname -NewName ( $prefix + ((($id++).tostring()).padleft(($files.count.tostring()).length) -replace ' ','0' ) + $_.extension) } The code pads the photo file name with leading zeroes based on the number of files in the

Django: removing item from many-to-many relation more efficiently

不羁岁月 提交于 2019-12-06 11:09:13
问题 My book class uses a many-to-many field to save its readers. If I want to remove a reader from some books, I can use a loop to go through all book objects to remove the reader. But it's too slow. Is it possible to do it in a bulk operation? class Book(models.Model): readers = models.ManyToManyField(User, related_name='books') #Remove reader 'foo' from book 1, 2, 3, 4, 5. However, it is slow. for book in Book.objects.filter(id__in=[1, 2, 3, 4, 5]) book.readers.remove(R) 回答1: Yes. You can

Cannot bulk load because the file could not be opened. Operating system error code 1326(Logon failure: unknown user name or bad password.)

两盒软妹~` 提交于 2019-12-06 09:34:17
bulk upload from csv test file "\servername\wwwroot\Upload\LDSAgentsMap.txt" SET QUOTED_IDENTIFIER ON SET ANSI_NULLS ON GO CREATE PROCEDURE [dbo].[sp_CSVTest_BulkInsert] ( @Path NVARCHAR(128) ) AS DECLARE @Sql NVARCHAR(256) SET @Sql = 'BULK INSERT CSVTest FROM ''' + @Path + ''' WITH ( FIELDTERMINATOR = '','', ROWTERMINATOR = ''\n'' )' --PRINT @Sql EXEC(@Sql) GO path is "\servername\wwwroot\Upload\LDSAgentsMap.txt" note this is in shared hosting and database user have blukadmin and public service role This can occur when the Windows user account that SQL runs under (e.g. SqlServerAccount) doesn

How to send bulk emails with good success rate?

故事扮演 提交于 2019-12-06 08:59:15
问题 There are many articles and threads about guidelines while sending bulk emails. Most of the times it was mentioned that emails should be sent to the subscribed users. So that we can avoid "users clicking on spam in their mail boxes". There are some features in famous social networking sites where we can send invitations to Yahoo contact list. In such scenarios the persons in our contact list actually did not subscribe with Linkedin to get invitations or other mails. But the hard thing to