Search Results

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

Page 56/96 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • In C, is it possible do free only an array first ou last position?

    - by user354959
    Hi there! I've an array, but I don't need its first (or last) position. So I point a new variable to the rest of the array, but I should free the array first/last position. For instance: p = read_csv_file(); q = p + 1; // I don't need the first CSV file field // Here I'd like to free only the first position of p return q; Otherwise I've to memcpy the array to other variable, excluding the first position, and then free the original array. Like this: p = read_csv_file(); q = (int*) malloc(sizeof(int) * (SOME_SIZE - 1)); memcpy(q, p+1, sizeof(int) * (SOME_SIZE - 1)); free(p); return q; But then I'll have the overhead of copying all the array. Is this possible to only free a single position of an array?

    Read the article

  • Daily Backups for a single table in Microsoft SQL Server

    - by James Horton
    Hello, I have a table in a database that I would like to backup daily, and keep the backups of the last two weeks. It's important that only this single table will be backed up. I couldn't find a way of creating a maintenance plan or a job that will backup a single table, so I thought of creating a stored procedure job that will run the logic I mentioned above by copying rows from my table to a database on a different server, and deleting old rows from that destination database. Unfortunately, I'm not sure if that's even possible. Any ideas how can I accomplish what I'm trying to do would be greatly appreciated. Thank you.

    Read the article

  • All GIT Repos Corrupted on System Restore

    - by yar
    I restored my OSX today by copying the system over from a backup. Most things seem to be working, but every single GIT repo gives pretty much the same error fatal: object 03b45161eb27228914e690e032ca8009358e9588 is corrupted I have tried chowning, doing everything as sudo or root... I have no idea what to try next. This would be a normal git question except that it's on many repos. Ideas? Note: I'm using git 1.7.0.3 and I was probably using 1.7.0 before.

    Read the article

  • safely lock a file then move? windows

    - by acidzombie24
    I have a file and need to ensure it exist before inserting a row into the db. After i insert i need to use the PK as part of the filename and move it into another location. How do i check if it exist then lock it so it cant be deleted until i can insert into the db then proceed to move the file without it being deleted upon releasing the lock? also the file may be in use. I am thinking of copying the file into a safe location then moving that file away. In this case i need to copy a file that is being used for reading. How can i do the above steps safely? Using .NET

    Read the article

  • Response.TransmitFile() with UNC share (ASP.NET)

    - by frankadelic
    In the comments of this page: http://msdn.microsoft.com/en-us/library/12s31dhy.aspx ..it says that TransmitFile() cannot be used with UNC shares. As far as I can tell, this is the case; I get this error in Event Log when I attempt it: TransmitFile failed. File Name: \\myshare1\e$\file.zip, Impersonation Enabled: 0, Token Valid: 1, HRESULT: 0x8007052e The suggested alternative is to use WriteFile(), however, this is problematic because it loads the file into memory. In my application, the files are 200MB, so this is not going to scale. Is there a method in ASP.NET for streaming files to users that's: scalable (doesn't read entire file into RAM or occupy ASP.NET threads) works with UNC shares Mapping a network drive as a virtual directory is not an option for us. I would like to avoid copying the file to the local web server as well. Thanks

    Read the article

  • How to run a custom action after install which can run in quiet or a UI after Install (WIX)

    - by Jamie
    Hi, I basically want to able to run an command line tool that already exists on the desired machine against the directory the files were run to. I.e The Installer does the following: Specify a location for the files to go into (INSTALLOCATION variable) Then after copying has finished run a tool which will zip the files and attach them to attach them to another application. <CustomAction Id="InstallTo" Return="check" Directory="INSTALLLOCATION" Execute="immediate" ExeCommand='"C:\MyTool\Here\Tool.exe" -ad [INSTALLLOCATION] Poop 1.0'/> <InstallExecuteSequence> <Custom Action="InstallTo" After="InstallFinalize">$InstallTo&gt;2</Custom> </InstallExecuteSequence> At the moment I'm not sure anyuthing is being called, is there a way to basically have this two step install and report progress if the tool failed/doesn't exist etc. Thanks, Jamie

    Read the article

  • Is there a DRM scheme that works?

    - by Simon
    We help our clients to manage and publish their media online - images, video, audio, whatever. They always ask my boss whether they can stop users from copying their media, and he asks me, and I always tell him the same thing: no. If the users can view the media, then a sufficiently determined user will always be able to make a copy. But am I right? I've been asked again today, and I promised my boss I'd ask about it online. So - is there a DRM scheme that will work? One that will stop users making copies without stopping legitimate viewing of the media? And if there isn't, how do I convince my boss?

    Read the article

  • .NET - Is it possible to proxy a HTTPS request using HttpListener & HttpWebRequest? (or is it not p

    - by Greg
    Hi, Question - Is it possible to proxy a HTTPS request using HttpListener & HttpWebRequest? (or is it not possbile due to the encryption?) I have got a .NET proxy working by using HttpListener & HttpWebRequest using the approach here. I'm trying to extend this at the moment to listen for HTTPS too (refer this question) however I'm wondering if I'm trying to tackle something that is not possible...That is if this code works by listening for the HTTPS request (using HttpListener) and then copying headers & content across to a new HttpWebRequest, is this flawed as it may not be able to decrypt the request to get the content? But then normal proxy servers obviously can proxy HTTPS, so I guess perhaps it will work because it will just copy across the encrypted content?

    Read the article

  • Difference between Singleton implemention using pointer and using static object

    - by Anon
    EDIT: Sorry my question was not clear, why do books/articles prefer implementation#1 over implementation#2? What is the actual advantage of using pointer in implementation of Singleton class vs using a static object? Why do most books prefer this class Singleton { private: static Singleton *p_inst; Singleton(); public: static Singleton * instance() { if (!p_inst) { p_inst = new Singleton(); } return p_inst; } }; over this class Singleton { public: static Singleton& Instance() { static Singleton inst; return inst; } protected: Singleton(); // Prevent construction Singleton(const Singleton&); // Prevent construction by copying Singleton& operator=(const Singleton&); // Prevent assignment ~Singleton(); // Prevent unwanted destruction };

    Read the article

  • Using XML to generate SAP ABAP and/or SAPScript?

    - by Rob
    Has anyone got examples and/or experience of generating SAP ABAP or SAPScript form code from XML that came from an external application? This would help: creation of SAP-based applications in a data-driven way by automating the knowledge to do so from the export of XML from an external application automated inputting of knowledge from an external application into SAP applications, rather than manually copying between systems enable 3rd-party external tools to be used to create data, perhaps in a more easier-to-use way than could be done in SAP. Or if there was already heavy investment in training with these third party tools rather than SAP, or if the employment market favoured staff with knowledge of these tools enable creation of data for multiple purposes, views: those in SAP and outside SAP. enable inter-operability of SAP with 3rd-party external tools I'm looking for: - experiences as to the feasibility - tools, e.g. parsers, XSLT etc. - examples

    Read the article

  • How does ListView.ItemCollection.Contains() work?

    - by Inno
    Hi everyone, I'm copying ListViewItems from one ListView to another, sth. like: foreach (ListViewItem item in usersListView.SelectedItems) { selectedUsersListView.Items.Add((ListViewItem)item.Clone()); } If I want to use ListView.ItemCollection.Contains() to determine if an item was already copied I always get false: foreach (ListViewItem item in usersListView.SelectedItems) { if (!selectedUsersListView.Items.Contains(item) { // always !false selectedUsersListView.Items.Add((ListViewItem)item.Clone()); } } I did the following to solve my problem: foreach (ListViewItem item in usersListView.SelectedItems) { ListViewItem newItem = (ListViewItem)item.Clone(); newItem.Name = newItem.Text; if (!selectedUsersListView.Items.ContainsKey(newItem.Name) { // this works selectedUsersListView.Items.Add(newItem); } } So, it's ok that this solves my problem but I still have no idea why ListView.ItemCollection.Contains() doesn't work... How does ListView.ItemCollection.Contains() identify if an item already exists? How do ListViewItems have to be initialised that ListView.ItemCollection.Contains() (not ListView.ItemCollection.ContainsKey()) is able to identify them?

    Read the article

  • How to Edit NSF file using c#?

    - by Preeti
    Hi, I want to programaticaly change some values to NSF item and then want to save it.(i.e to edit NSF File and then save the editions) for example: I want to set Sender name of all mails to "[email protected]".(Using Domino.dll). Solution I tried: (Swaping of To and From values) String Temp_From = ((object[])docInbox.GetItemValue("From"))[0] as String; String Temp_SendTo = ((object[])docInbox.GetItemValue("SendTo"))[0] as String; docInbox.ReplaceItemValue("From", Temp_SendTo); docInbox.ReplaceItemValue("SendTo", Temp_From); docInbox.Save(true, false, false); /* Applied for following fields also: For From: AltFrom,DisplayFrom,DisplayFrom_2,dspFrom,ForwardedFrom,INetFrom,tmpDisplayFrom For To : displaySendTo,EnterSendTo,Envelope_to,tmpDisplaySendTo Also Tried for saving : docInbox.Save(true, true, true); */ In above code after successful editing changes values are not reflected in Nsf File. But when i am reading edited Nsf (copying modified file on different location ) file programatically it is showing changed values.(Why changes are not visible here ?)

    Read the article

  • Automated builds of BizTalk 2009 projects using Team System 2008 Build

    - by Doug
    I'm trying to configure automated build of BizTalk 2009 projects using Team Foundation Server 2008. We have a staging server which has BizTalk 2009 installed. I ran the Team Foundation Server Build Setup on this server, and it can build non-BizTalk projects OK. However, BizTalk projects fail to build. I suspected something was amiss when "Deployment" was not a valid build type! I tried copying various things over from a developer PC which has BizTalk and Visual Studio 2008 installed, but still couldn't get it to work. I don't really want to install Visual Studio on the staging server, but without it the "Developer Tools and SDK" option in the BizTalk install is greyed out. I guess I need this in order for BizTalk projects to compile. So, my question is can a BizTalk 2009 server be used as a TFS build agent to build BizTalk projects without having Visual Studio installed. If the answer is no, what's the smallest part of VS that can be installed to get this to work? Thanks in advance.

    Read the article

  • Problems upgrading MySQL application from Delphi 2006 to 2010

    - by WombaT
    I upgraded my Delphi to 2010 version and I tried to open and run application written in Delphi 2006. The app is using mysql by dbexpress with libmysql.dll and a second driver found somewhere on the Internet. I can't run it on 2010. I'm always getting "missing libmysql.dll library". I tried to get new version of it but it didn't help. Copying this library into almost all system directories didn't help. I'm out of any ideas what to do, how do I connect to database :(

    Read the article

  • Multiple client projects to one server project w/ Silverlight & RIA Services Beta

    - by Dale Halliwell
    The type or namespace name 'Resources' does not exist in the namespace 'MyWebProject.Web' (are you missing an assembly reference?) C:\Users\...\MySecondProject\Generated_Code\MyWebProject.Web.g.cs I am having some problems trying to add a second SL client project to my (Ria services) SL Business Application. It has to do with the way the shared Resources files on the Web project are linked to from my new SL client project (the SL client project that was generated by the Business App template works fine). The same problem was brought up in the SL forums but copying the Web folder from my existing SL client doesn't seem to work. How can I add a second SL client project using RIA services to the solution of an existing SL Business Application without these problems over shared resources? Should I avoid the Business Application solution template for solutions with multiple SL clients since it seems to presume only a single client app will be sharing the resource files?

    Read the article

  • Vim Register Use in Ex Mode

    - by Peck
    Potentially 2 questions in one. I would like to know how to reference a register in Ex mode. For instance, I'm editing a file and I want to save the file with a timestamp (or just datestamp really) appended to it. I know I can set register to the value of a shell commands output using: :let @a = system("date +\"%Y-%m-%d\"") Is there any to dereference this register and insert its value into an Ex command? Something like: :w testfile.<value of "a register> Copying to the system clipboard and pasting would be nice, but doing it in a more generic/programitic way for building on other commands in the future would be nice.

    Read the article

  • Efficiently Combine MatchCollections in .Net Regex

    - by Laramie
    In the simplified example, there are 2 Regular Expressions, one case sensitive, the other not. The idea would be to efficiently create an IEnumerable collection (see "combined" below) combining the results. string test = "abcABC"; string regex = "(?<grpa>a)|(?<grpb>b)|(?<grpc>c)]"; Regex regNoCase = new Regex(regex, RegexOptions.IgnoreCase); Regex regCase = new Regex(regex); MatchCollection matchNoCase = regNoCase.Matches(test); MatchCollection matchCase = regCase.Matches(test); //Combine matchNoCase and matchCase into an IEnumerable IEnumerable<Match> combined= null; foreach (Match match in combined) { //Use the Index and (successful) Groups properties //of the match in another operation } In practice, the MatchCollections might contain thousands of results and be run frequently using long dynamically created REGEXes, so I'd like to shy away from copying the results to arrays, etc. I am still learning LINQ and am fuzzy on how to go about combining these or what the performance hits to an already sluggish process will be.

    Read the article

  • Python Windows File Copy with Wildcard Support

    - by Wang Dingwei
    I've been doing this all the time: result = subprocess.call(['copy', '123*.xml', 'out_folder\\.', '/y']) if result == 0: do_something() else: do_something_else() Until today I started to look into pywin32 modules, then I saw functions like win32file.CopyFiles(), but then I found it may not support copying files to a directory. Maybe this functionality is hidden somewhere, but I haven't found it yet. I've also tried "glob" and "shutil" combination, but "glob" is incredibly slow if there are many files. So, how do you emulate this Windows command with Python? copy 123*.xml out_folder\. /y

    Read the article

  • How can I stop Silverlight DataForm immediately saving changes back to underlying object?

    - by Simon_Weaver
    I have a Silverlight master-details DataForm where the DataForm represents a street address. When I edit the Address1 textbox, the value gets automatically committed to the bound Address object once focus leaves the textbox. If I hit the Cancel button, then any changes are undone because Address implements IEditableObject and saves its state. The problem is that since any change is immediately propagated to the underlying object it will be shown in the master grid before the user has actually hit Save. I also have other locations where this data is shown. This is not a very good user experience. I've tried OneWay binding but then I can't commit back without manually copying all the fields over. The only thing I can think of doing is to create a copy of the data first or using OneWay binding, but they both seem a little clumsy. Does DataForm support this way of working?

    Read the article

  • Building java project with TFS

    - by Jaco Pretorius
    A very small portion of our codebase is some legacy Java code. I'm trying to add a new build that would invoke ant to build this project. The first problem is that TFS doesn't allow you to create a build that doesn't build a .Net solution. I got around this by copying a previous build file and adding an EndToEndIteration task which is the entry point for the build. The problem is that none of the usual build variables are populated - $(BuildDirectory), $(SolutionRoot) - all blank. This pretty much means I can't invoke my ant task without hardcoding the paths (which I definitely can't do). Any ideas?

    Read the article

  • Open source license for test code

    - by Gary
    I'm creating a project to house an iPhone library for common code for the iPhone... essentially it's a library that'll save people from finding solutions to common problems that amount to copying and pasting snippets of code. The site is located here: http://code.google.com/p/devkit-bb/ I licensed it under Eclipse, because fosters the extension of the library without requiring constraints like LGPL on object files being provided/made available, which would be the case since everything is statically linked. What I'm wondering is how/what license to apply to the unit tests? Since they essentially demonstrate how to use various interfaces and components. Thus they're designed for potential copy and paste situations, and I don't want people who might end up using this as part of the building blocks of their environment to feel like the license would prohibit that "derivative work", ie. their application or game.

    Read the article

  • Runtime error of TASM language help!

    - by dominoos
    .model small .stack 400h .data message db "hello. ", 0ah, 0dh, "$" firstdigit db ? seconddigit db ? thirddigit db ? number dw ? newnumber db ? anumber dw 0d bnumber dw 0d Firstn db 0ah, 0dh, "Enter first 3 digit number: ","$" secondn db 0ah, 0dh, "Enter second 3 digit number: ","$" messageB db 0ah, 0dh, "HCF of two number is: ","$" linebreaker db 0ah, 0dh, ' ', 0ah, 0dh, '$' .code Start: mov ax, @data ; establish access to the data segment mov ds, ax ; mov number, 0d mov dx, offset message ; print the string "yob choi 0648293" mov ah, 9h int 21h num: mov dx, offset Firstn ; print the string "put 1st 3 digit" mov ah, 9h int 21h ;run JMP FirstFirst ; jump to FirstFirst FirstFirst: ;first digit mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov firstdigit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, doubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 100d ;This is so we can calculate 100*1st digit +10*2nd digit + 3rd digit mul cx ;start to accumulate the 3 digit number in the variable imul cx ;it is understood that the other operand is ax ; the result will use both dx::ax ;dx will contain only leading zeros add anumber, ax ;save ;Second Digit mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov seconddigit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, boubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 10d ;continue to accumulate the 3 digit number in the variable mul cx ;it is understood that the other operand is ax, containing first digit ;the result will use both dx::ax ;dx will contain only leading zeros. add anumber, ax ;save ;third Digit mov ah, 1d ;samething as above int 21h ; mov thirddigit, al ; sub al, 30h ; cbw ; add anumber, ax ; jmp num2 ;go to checks Num2: mov dx, offset secondn ; print the string "put 2nd 3 digits" mov ah, 9h int 21h ;run JMP SecondSecond SecondSecond: ;first digit mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov firstdigit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, doubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 100d ;This is so we can calculate 100*1st digit +10*2nd digit + 3rd digit mul cx ;start to accumulate the 3 digit number in the variable imul cx ;it is understood that the other operand is ax ; the result will use both dx::ax ;dx will contain only leading zeros add bnumber, ax ;save ;Second Digit mov ah, 1d ;bios code for read a keystroke int 21h ;call bios, it is understood that the ascii code will be returned in al mov seconddigit, al ;may as well save a copy sub al, 30h ;Convert code to an actual integer cbw ;CONVERT BYTE TO WORD. This takes whatever number is in al and ;extends it to ax, boubling its size from 8 bits to 16 bits ;The first digit now occupies all of ax as an integer mov cx, 10d ;continue to accumulate the 3 digit number in the variable mul cx ;it is understood that the other operand is ax, containing first digit ;the result will use both dx::ax ;dx will contain only leading zeros. add bnumber, ax ;save ;third Digit mov ah, 1d ;samething as above int 21h ; mov thirddigit, al ; sub al, 30h ; cbw ; add bnumber, ax ; jmp compare ;go to compare compare: CMP ax, anumber ;comparing numbB and Number JA comp1 ;go to comp1 if anumber is bigger CMP ax, anumber ; JB comp2 ;go to comp2 if anumber is smaller CMP ax, anumber ; JE equal ;go to equal if two numbers are the same JMP compare ;go to compare (avioding error) comp1: SUB ax, anumber; subtract smaller number from bigger number JMP compare ; comp2: SUB anumber, ax; subtract smaller number from bigger number JMP compare ; equal: mov ah, 9d ;make linkbreak after the 2nd 3 digit number mov dx, offset linebreaker int 21h mov ah, 9d ;print "HCF of two number is:" mov dx, offset messageB int 21h mov ax,anumber ;copying 2nd number into ax add al,30h ; converting to ascii mov newnumber,al ; copying from low part of register into newnumb mov ah, 2d ;bios code for print a character mov dl, newnumber ;we had saved the ascii code here int 21h ;call to bios JMP exit; exit: mov ah, 4ch int 21h ;exit the program End hi, this is a program that finds highest common factor of 2 different 3digit number. if i put 200, 235,312 (low numbers) it works fine. but if i put 500, 550, 654(bigger number) the program crashes after the 2nd 3digit number is entered. can you help me to find out what problem is?

    Read the article

  • convert ArrayList.toString() back to ArrayList in one call

    - by dotnetnewbie
    I have a toString() representation of an ArrayList. Copying the toString() value to clipboard, I want to copy it back into my IDE editor, and create the ArrayList instance in one line. In fact, what I'm really doing is this: my ArrayList.toString() has data I need to setup a unit test. I want to copy this ArrayList.toString() into my editor to build a test against this edge case I don't want to parse anything by hand My input looks like this: [15.82, 15.870000000000001, 15.92, 16.32, 16.32, 16.32, 16.32, 17.05, 17.05, 17.05, 17.05, 18.29, 18.29, 19.16] The following do not work: Arrays.asList() google collections Lists.newArrayList() Suggestions?

    Read the article

  • Find/Replace but Increment Value

    - by KR Kahn
    Hello, I have an .HTML file that has many photos attached to it for displaying a photo gallery. I'm replacing old photos with new ones, and I'm thinking there must be a more intelligent way than simply copying and pasting repetitive file names. I would love to be able to replace and increment a file name on each replace, starting at a base file name of my choosing. For example... ...images/69thStreet010.jpg ...images/69thStreet011.jpg ...images/69thStreet012.jpg Basically performing a CTRL+F and REPLACE '69thStreet010.jpg' with... ...images/xyz001.jpg ...images/xyz002.jpg ...images/xyz003.jpg And so on until I want it to stop. Anyone here have any suggestions? Thanks a lot! -K.R. UPDATE: I should also add, I'm using Notepad++ to edit my files.

    Read the article

  • svn branch commit - experimental commit

    - by quano
    I've made some experimental code that I would like to save in the repository, but I don't want it on the main branch. How would you commit this to a branch? Maybe I got this wrong, but of what I've understood about branching, all you actually do is copying already checked in code to another directory in the repository. I suppose one could copy the main branch to another location, and then change the working copy repository location pointer to point at that location, and then commit the experimental code. But that seems a bit long-winded. Is this really how you do it?

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >