bulk

Applying DOM Manipulations to HTML and saving the result?

旧巷老猫 提交于 2019-12-04 07:17:19
I have about 100 static HTML pages that I want to apply some DOM manipulations to. They all follow the same HTML structure. I want to apply some DOM manipulations to each of these files, and then save the resulting HTML. These are the manipulations I want to apply: # [start] $("h1.title, h2.description", this).wrap("<hgroup>"); if ( $("h1.title").height() < 200 ) { $("div.content").addClass('tall'); } # [end] # SAVE NEW HTML The first line ( .wrap() ) I could easily do with a find and replace, but it gets tricky when I have to determine the calculated height of an element, which can't be

RESTful API and bulk operations

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 05:58:14
I have a middle tier which performs CRUD operations on a shared database. When I converted the product to .NET Core I thought I'd also look at using REST for the API as CRUD is supposed to be what it does well. It seems like REST is a great solution for single record operations, but what happens when I want to delete, say, 1,000 records? Every professional multi-user application is going to have some concept of Optimistic Concurrency checking: you can't have one user wipe out the work of another user without some feedback. As I understand it, REST handles this with the HTTP ETag header record.

How to change slow parametrized inserts into fast bulk copy (even from memory)

旧街凉风 提交于 2019-12-03 20:10:07
I had someting like this in my code (.Net 2.0, MS SQL) SqlConnection connection = new SqlConnection(@"Data Source=localhost;Initial Catalog=DataBase;Integrated Security=True"); connection.Open(); SqlCommand cmdInsert = connection.CreateCommand(); SqlTransaction sqlTran = connection.BeginTransaction(); cmdInsert.Transaction = sqlTran; cmdInsert.CommandText = @"INSERT INTO MyDestinationTable" + "(Year, Month, Day, Hour, ...) " + "VALUES " + "(@Year, @Month, @Day, @Hour, ...) "; cmdInsert.Parameters.Add("@Year", SqlDbType.SmallInt); cmdInsert.Parameters.Add("@Month", SqlDbType.TinyInt); cmdInsert

libusb bulk transfer

时间秒杀一切 提交于 2019-12-03 13:39:05
问题 I am trying to implement user space usb driver using libusb1.0.9. I have lpc2148 blueboard(ARM7) with me..This board is loaded with opensource USB stack/firmware by Mr. Bertrik Sikken. Now my user space driver is trying read write with board. I am getting garbage data. I want to know about the flow of bulk tranfer. For any transfer/transaction is there kernel device driver involved?? and do we need usb gadget device driver also?? I am not able to understand that where the data gets copied.

Implementing a periodically refreshing Cache in Java

只谈情不闲聊 提交于 2019-12-03 07:47:35
My use case is to maintain an in-memory cache over the data stored in a persistent DB. I use the data to populate a list/map of entries on the UI. At any given time, the data displayed on the UI should be as updated as it is possible (well this can be done by the refresh frequency of the cache). Major difference between a regular cache implementation and this particular cache is that it needs a bulk refresh of all the elements at regular intervals and hence is pretty different from an LRU kind of cache. I need to do this implementation in Java and it will be great if there are any existing

libusb bulk transfer

不想你离开。 提交于 2019-12-03 03:44:22
I am trying to implement user space usb driver using libusb1.0.9. I have lpc2148 blueboard(ARM7) with me..This board is loaded with opensource USB stack/firmware by Mr. Bertrik Sikken. Now my user space driver is trying read write with board. I am getting garbage data. I want to know about the flow of bulk tranfer. For any transfer/transaction is there kernel device driver involved?? and do we need usb gadget device driver also?? I am not able to understand that where the data gets copied. Important thing is that when I read/write interrupt gets generated and I can see correct data on LCD. Do

Add multiple users to multiple groups from one import csv (follow up query)

梦想的初衷 提交于 2019-12-02 10:12:23
问题 I was looking for a way to populate multiple distribution groups with multiple user names. I came across a script on this site written by member Frode F.: Import-Csv "C:\Scripts\Import Bulk Users into bulk groups\bulkgroups3.csv" | Group-Object Group | % { #Foreach Group, get ADUser object for users and add members $users = $_.Group | % { Get-ADUser $_.Accountname } Add-ADGroupMember -Identity $_.Name -Member $users } This was working when the csv file contained about 10 lines with 2

Rally add test case results in bulk using web services API

耗尽温柔 提交于 2019-12-02 07:21:45
问题 We are about to start the phase of updating test results in Rally via the api. I couldn't find an example to do this via the web services API (e.g. posting xml). Can anyone point me to this? Also I wondered what ability there is to do this in bulk, e.g. upload a set of test results in one go. Perhaps there are connectors for this that will upload various test result standards (e.g. JUnit report) into Rally? Thoughts and ideas welcomed. Thanks, Andy 回答1: If you're doing a simple POST against

Rally add test case results in bulk using web services API

北城余情 提交于 2019-12-02 07:21:09
We are about to start the phase of updating test results in Rally via the api. I couldn't find an example to do this via the web services API (e.g. posting xml). Can anyone point me to this? Also I wondered what ability there is to do this in bulk, e.g. upload a set of test results in one go. Perhaps there are connectors for this that will upload various test result standards (e.g. JUnit report) into Rally? Thoughts and ideas welcomed. Thanks, Andy If you're doing a simple POST against the Test Case Result Create REST endpoint: https://rally1.rallydev.com/slm/webservice/1.41/testcaseresult

Add multiple users to multiple groups from one import csv (follow up query)

本小妞迷上赌 提交于 2019-12-02 06:04:52
I was looking for a way to populate multiple distribution groups with multiple user names. I came across a script on this site written by member Frode F. : Import-Csv "C:\Scripts\Import Bulk Users into bulk groups\bulkgroups3.csv" | Group-Object Group | % { #Foreach Group, get ADUser object for users and add members $users = $_.Group | % { Get-ADUser $_.Accountname } Add-ADGroupMember -Identity $_.Name -Member $users } This was working when the csv file contained about 10 lines with 2 different groups in column 1 and multiple users in column 2. When the csv contains a few hundred lines, still