Copying list items’s attachments

I have to modify a .Net console application written in C#.
The application references the following assemblies :

  • Microsoft.SharePoint
  • Microsoft.SharePoint.Client
  • Microsoft.SharePoint.Client.Runtime

The current application copies items from a SharePoint 2010 source list to a SP2010 target list.
The two lists do not belong to the same web application.

Here is the main code block :

ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation(); ListItem l_targetItem = l_targetList.AddItem(itemCreateInfo);  foreach (Field l_field in l_sourceFields) {     if (!l_field.ReadOnlyField && l_field.InternalName != "Attachments" && l_field.InternalName != "ContentType")     {         l_targetItem[l_field.InternalName] = l_sourceItem[l_field.InternalName];     } } 

For each item to copy :
The application adds an item into the target list.
Then the application sets target item’s fields with the values of the corresponding source item’s fields.
If the copy succeed, the application deletes the source item.

What I have to do

A source item can have an attachment.
If so, the application must copy the attachment to the target item.
If the copy succeed, the application must delete the source item’s attachment.

I am beginner in SharePoint programming.
Can someone please help me to achieve my goals ?
Any help will be greatly appreciated

How can I prevent a user from copying files on another hard drive?

I have a Linux machine that contains sensitive files. Users should be able to access them (read) when they are using the computer, but should not be able to copy them on another hard drive (USB stick or another hard drive that might have been added on the same machine).

The main hard drive has been encrypted, in order to prevent someone from extracting it and stealing the files.

I am free to use SELinux or other approaches in order to achieve the goal.

samba bad performance when copying from windows to ubuntu

I am very fresh to linux so my apologies if I am saying something that doesn’t make sense.

I have Ubuntu Server 18.04 box (fresh, only installed few days ago) on which I have installed samba and shared a folder using this guide: link

The problem which I have is that when I copy files from this share to Windows PC (over 1Gb wired connection), I am getting around 100MB/s constant transfer speeds which is good.

If I try to copy something in other direction, from windows to linux, the transfer rate is tragic. It starts off nicely but after few seconds it grints nearly to a halt, with speed varying between 0kb/s to max 20MB/s.

This Ubuntu server is a VM sitting on my home ESXi 6.7 U2 host. On the same host I have another Windows Server 2016 VM. If I try to copy files from or to this windows vm, I have steady 112MB/s from and to it. There is no difference between the ubuntu and reference windows VM and they both live on the same subnet.

I have tried different settings in smb.conf, changing from open-vm-tools to proprietary vmware tools, apt upgrade of everything, rebooting the server and client pc, but I can’t crack this one.

Anyone has any ideas?

Both VMs (ubuntu in question and server 2016 for reference) sit on same Raid 10 datastore.

Transfers from Windows point of view:

transfer – windows to linux

transfer – linux to windows

Same as abovebut from the networking point of view: my pc: 10.0.11.12 ubuntu: 10.0.3.12

wireshark – windows to linux

wireshark – linux to windows

OSX File permissions and inheritance when copying files

OSX: High Sierra

I have 2 drives mounted. The drive I am copying files from has permissions of 700 and when I copy them to the second mount (NFS) I want them to have 755. How can I get inheritance to happen during this copy action (so the files land at my target with 755)?

Currently the files land on my target NFS server with 700 and no one else on the share can access them.

More information: I am using a creative program that writes directly to the first drive with 700 permissions and I am unable to change that (I may look into the idea of changing this but its storage managed by some people offsite).

Speed Up Excel Macro – Autofilter Copying

I am using this code which works fine, but runs painfully slow.

What my code does is that it filters an Excel Table and then extracts only certain columns and pastes them into another sheet (in a different order).

Could it be speed up perhaps with a multi-dimensional array?

With Application .ScreenUpdating = False .Calculation = xlCalculationManual .DisplayAlerts = False .EnableEvents = False End With  Set lo_b1 = x_bf1.ListObjects(1) s_date = CLng(ThisWorkbook.Names("in_fre_m").RefersToRange(1, 1)) s_des = ThisWorkbook.Names("dr_no").RefersToRange(1, 1) s_code = ThisWorkbook.Names("dr_co").RefersToRange(1, 1) lastrow_d = lo_dr.Range.Columns(1).Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row + 1 Set pasterange1 = x_drill.Range("C" & lastrow_d)      With lo_b1.Range     .AutoFilter Field:=13, Criteria1:=s_code     .AutoFilter Field:=1, Criteria1:="<=" & s_date     End With  lastrow_s = lo_b1.Range.Columns(1).Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row  If lastrow_s > 7 Then     Set copyrange1 = x_bf1.Range("D8:D" & lastrow_s) 'Date     Set copyrange2 = copyrange1.Offset(0, 1)  'Description     Set copyrange3 = copyrange1.Offset(0, 16)  'Calculation     Set copyrange5 = copyrange1.Offset(0, 5)  'Classification     Set copyrange6 = copyrange1.Offset(0, 6)  'Notes     Set copyrange7 = copyrange1.Offset(0, 11) '§     Set copyrange8 = copyrange1.Offset(0, 12) 'Code     Set copyrange9 = copyrange1.Offset(0, 20) 'Statutory     Set copyrange10 = copyrange1.Offset(0, 14) 'Ref       copyrange10.SpecialCells(xlCellTypeVisible).Copy 'Ref     pasterange1.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      copyrange1.SpecialCells(xlCellTypeVisible).Copy 'Date     pasterange1.Offset(0, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      copyrange5.SpecialCells(xlCellTypeVisible).Copy 'Account Name     pasterange1.Offset(0, 2).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      copyrange2.SpecialCells(xlCellTypeVisible).Copy 'Notes     pasterange1.Offset(0, 3).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      copyrange8.SpecialCells(xlCellTypeVisible).Copy 'Code     pasterange1.Offset(0, 4).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      copyrange7.SpecialCells(xlCellTypeVisible).Copy '§     pasterange1.Offset(0, 5).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      copyrange3.SpecialCells(xlCellTypeVisible).Copy 'Calculation     pasterange1.Offset(0, 6).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      copyrange9.SpecialCells(xlCellTypeVisible).Copy 'Statutory     pasterange1.Offset(0, 7).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      copyrange6.SpecialCells(xlCellTypeVisible).Copy 'Notes     pasterange1.Offset(0, 8).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone      Set copyrange1 = Nothing     Set copyrange2 = Nothing     Set copyrange3 = Nothing     Set copyrange4 = Nothing     Set copyrange5 = Nothing     Set copyrange6 = Nothing     Set copyrange7 = Nothing     Set copyrange8 = Nothing     Set copyrange9 = Nothing     Set copyrange10 = Nothing     End If 

Can a Wizard identify the spells in another spellbook without copying them into their own?

If a Wizard finds the spellbook of the evil Wizard they discovered, how does the process of finding out which spells are in the spellbook work? (Assume the evil Wizard didn’t simply write the spells’ names in common at the top of the pages or create an index.)

  • Does the Wizard have to spend 2 hours per spell level “deciphering the unique system of notation” to be able to tell that the spell they’ve been studying is detect magic? Or can they tell at a glance that it’s detect magic before spending the 2 hours?
  • Does it require the 50gp per spell level cost just to figure out what the spell is, or do they get to choose whether to spend it after figuring out what spell it is, as part of deciding whether to copy the spell into their spellbook?

From the 5e Basic Rules, Chapter 3, pg. 31 (emphasis mine):

Copying a spell into your spellbook involves reproducing the basic form of the spell, then deciphering the unique system of notation used by the wizard who wrote it. You must practice the spell until you understand the sounds or gestures required, then transcribe it into your spellbook using your own notation. For each level of the spell, the process takes 2 hours and costs 50 gp. The cost represents material components you expend as you experiment with the spell to master it, as well as the fine inks you need to record it.

Copying a Magento 2 Site to New Domain ‘Remembers’ Old Site

I have copied a Magento 2 site from a test domain (testing.mytest.co.uk) to a live domain (mylive.co.uk). It has come time to upgrade the Magento version (2.2.5 to 2.2.6) and I receive the following error during readiness check:

    Found non-writable path(s): /var/www/vhosts/mytest.co.uk/testing.mytest.co.uk/var/.htaccess 

The reason it’s not writable is because that is not the domain that relates to where the site is now. It’s as if it is ‘remembering’ where it used to be? And I am unsure where this needs changing.

env.php and core_config_data have been updated.

Can anyone please advise?

Copying Data into another sheet when a condition is meet

Does anyone have any idea of a solution or know if what i would like to happen is even possible. I am a complete computer novice and know nothing about ExcelVB, if that’s the path to take.

I’ve a USB RFID scanner that when our members enter into the space, they tap in. This generates their unique individual membership number. Using VLOOKUP i have made cell B & C populate the name and company they work for. In Cell D, the now time and date generate.

What I would like to happen is: When their Individual number populates in cell A, i would then like the cells A,B,C & D of that row to be copied into their individual company sheet.

Where then i’ll manually log them out and work out the time between: time in and time out.

if this is even possible please let me know, any help is greatly appreciated.

Kindest New11