Search Results

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

Page 36/96 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • C++ How to deep copy a struct with unknown datatype?

    - by Ewald Peters
    hi, i have a "data provider" which stores its output in a struct of a certain type, for instance struct DATA_TYPE1{ std::string data_string; }; then this struct has to be casted into a general datatype, i thought about void * or char *, because the "intermediate" object that copies and stores it in its binary tree should be able to store many different types of such struct data. struct BINARY_TREE_ENTRY{ void * DATA; struct BINARY_TREE_ENTRY * next; }; this void * is then later taken by another object that casts the void * back into the (struct DATA_TYPE1 *) to get the original data. so the sender and the receiver know about the datatype DATA_TYPE1 but not the copying object inbetween. but how can the intermidiate object deep copy the contents of the different structs, when it doesn't know the datatype, only void * and it has no method to copy the real contents; dynamic_cast doesn't work for void *; the "intermediate" object should do something like: void store_data(void * CASTED_DATA_STRUCT){ void * DATA_COPY = create_a_deepcopy_of(CASTED_DATA_STRUCT); push_into_bintree(DATA_COPY); } a simple solution would be that the sending object doesn't delete the sent data struct, til the receiving object got it, but the sending objects are dynamically created and deleted, before the receiver got the data from the intermediate object, for asynchronous communication, therefore i want to copy it. instead of converting it to void * i also tried converting to a superclass pointer of which the intermediate copying object knows about, and which is inherited by all the different datatypes of the structs: struct DATA_BASE_OBJECT{ public: DATA_BASE_OBJECT(){} DATA_BASE_OBJECT(DATA_BASE_OBJECT * old_ptr){ std::cout << "this should be automatically overridden!" << std::endl; } virtual ~DATA_BASE_OBJECT(){} }; struct DATA_TYPE1 : public DATA_BASE_OBJECT { public: string str; DATA_TYPE1(){} ~DATA_TYPE1(){} DATA_TYPE1(DATA_TYPE1 * old_ptr){ str = old_ptr->str; } }; and the corresponding binary tree entry would then be: struct BINARY_TREE_ENTRY{ struct DATA_BASE_OBJECT * DATA; struct BINARY_TREE_ENTRY * next; }; and to then copy the unknown datatype, i tried in the class that just gets the unknown datatype as a struct DATA_BASE_OBJECT * (before it was the void *): void * copy_data(DATA_BASE_OBJECT * data_that_i_get_in_the_sub_struct){ struct DATA_BASE_OBJECT * copy_sub = new DATA_BASE_OBJECT(data_that_i_get_in_the_sub_struct); push_into_bintree(copy_sub); } i then added a copy constructor to the DATA_BASE_OBJECT, but if the struct DATA_TYPE1 is first casted to a DATA_BASE_OBJECT and then copied, the included sub object DATA_TYPE1 is not also copied. i then thought what about finding out the size of the actual object to copy and then just memcopy it, but the bytes are not stored in one row and how do i find out the real size in memory of the struct DATA_TYPE1 which holds a std::string? Which other c++ methods are available to deepcopy an unknown datatype (and to maybe get the datatype information somehow else during runtime) thanks Ewald

    Read the article

  • Importing modules on portable python

    - by PPTim
    Hi, I am running PortablePython_1.1_py2.6.1 on a USB stick. My code relies on some modules that are not preinstalled. Does anyone know whether it is possible to add new modules to a portable python installation? Simply copying in folders into site-lib does not seem to work.

    Read the article

  • Yii PHP Framework- Implementation

    - by Josh
    I was just curious if Yii is supposed to be compiled into PHP or not. Is it possible to use Yii just by copying the Framework to a folder on the server and then including something (something as in one of the yii files- I am not sure how it works) in the scripts I wish to use the framework for? (Noob when it comes to frameworks and usage) Thanks, Josh

    Read the article

  • add c# user control to existing asp.net vb.net project

    - by Fidel
    Hello, I've got an existing asp.net project written in vb.net. Another person has written a user control in c#. Could you please let me know the steps for adding that C# user control to the vb.net app? I've tried copying them to the folder and using "Add existing item", however it doesn't compile the code behind at all. Thanks, Fidel

    Read the article

  • MSBuild command-line error - Silverlight 4 SDK is not installed

    - by Ned
    My MSBuild command line is as follows: msbuild e:\code\myProject.csproj /p:Configuration=Debug /p:OutputPath=bin/Debug /p:Platform=x86 /p:PlatformTarget=x86 The project builds fine on my development machine in VS2010 but not with the command above. I am running Win 7 64 - Bit. I'm getting an error that says I don't have the Silverlight 4 SDK installed but I do. I"ve read some posts that you have to set the Platform=x86 but to no avail. Here is the error message in full: Microsoft (R) Build Engine Version 4.0.30319.1 [Microsoft .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation 2007. All rights reserved. Build started 6/8/2010 4:03:38 PM. Project "E:\code\dashboards\MyProject2010\MyProject2010.Web\MyProject2010 .web.csproj" on node 1 (default targets). GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output fi les are up-to-date with respect to the input files. CoreCompile: Skipping target "CoreCompile" because all output files are up-to-date with resp ect to the input files. CopyFilesToOutputDirectory: Copying file from "obj\Debug\MyProject.Web.dll" to "bin\Debug\MyProject.Web .dll". MyProject2010.web - E:\code\dashboards\MyProject2010\MyProject2010.Web \bin\Debug\MyProject.Web.dll Copying file from "obj\Debug\MyProject.Web.pdb" to "bin\Debug\MyProject.Web .pdb". Project "E:\code\dashboards\MyProject2010\MyProject2010.Web\MyProject2010 .web.csproj" (1) is building "E:\code\dashboards\MyProject2010\MyProject20 10.Client\MyProject2010.Client.csproj" (2) on node 1 (GetXapOutputFile target( s)). C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight .Common.targets(104,9): error : The Silverlight 4 SDK is not installed. [E:\cod e\dashboards\MyProject2010\MyProject2010.Client\MyProject2010.Client.cspr oj] Done Building Project "E:\code\dashboards\MyProject2010\MyProject2010.Clie nt\MyProject2010.Client.csproj" (GetXapOutputFile target(s)) -- FAILED. Done Building Project "E:\code\dashboards\MyProject2010\MyProject2010.Web\ MyProject2010.web.csproj" (default targets) -- FAILED. Build FAILED. "E:\code\dashboards\MyProject2010\MyProject2010.Web\MyProject2010.web.csp roj" (default target) (1) - "E:\code\dashboards\MyProject2010\MyProject2010.Client\MyProject2010.Clie nt.csproj" (GetXapOutputFile target) (2) - (GetFrameworkPaths target) - C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlig ht.Common.targets(104,9): error : The Silverlight 4 SDK is not installed. [E:\c ode\dashboards\MyProject2010\MyProject2010.Client\MyProject2010.Client.cs proj] 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.39 I appreciate anyone's help. Thanks.

    Read the article

  • SQL Server to PostgreSQL - Migration and design concerns

    - by youwhut
    Currently migrating from SQL Server to PostgreSQL and attempting to improve a couple of key areas on the way: I have an Articles table: CREATE TABLE [dbo].[Articles]( [server_ref] [int] NOT NULL, [article_ref] [int] NOT NULL, [article_title] [varchar](400) NOT NULL, [category_ref] [int] NOT NULL, [size] [bigint] NOT NULL ) Data (comma delimited text files) is dumped on the import server by ~500 (out of ~1000) servers on a daily basis. Importing: Indexes are disabled on the Articles table. For each dumped text file Data is BULK copied to a temporary table. Temporary table is updated. Old data for the server is dropped from the Articles table. Temporary table data is copied to Articles table. Temporary table dropped. Once this process is complete for all servers the indexes are built and the new database is copied to a web server. I am reasonably happy with this process but there is always room for improvement as I strive for a real-time (haha!) system. Is what I am doing correct? The Articles table contains ~500 million records and is expected to grow. Searching across this table is okay but could be better. i.e. SELECT * FROM Articles WHERE server_ref=33 AND article_title LIKE '%criteria%' has been satisfactory but I want to improve the speed of searching. Obviously the "LIKE" is my problem here. Suggestions? SELECT * FROM Articles WHERE article_title LIKE '%criteria%' is horrendous. Partitioning is a feature of SQL Server Enterprise but $$$ which is one of the many exciting prospects of PostgreSQL. What performance hit will be incurred for the import process (drop data, insert data) and building indexes? Will the database grow by a huge amount? The database currently stands at 200 GB and will grow. Copying this across the network is not ideal but it works. I am putting thought into changing the hardware structure of the system. The thought process of having an import server and a web server is so that the import server can do the dirty work (WITHOUT indexes) while the web server (WITH indexes) can present reports. Maybe reducing the system down to one server would work to skip the copying across the network stage. This one server would have two versions of the database: one with the indexes for delivering reports and the other without for importing new data. The databases would swap daily. Thoughts? This is a fantastic system, and believe it or not there is some method to my madness by giving it a big shake up. UPDATE: I am not looking for help with relational databases, but hoping to bounce ideas around with data warehouse experts.

    Read the article

  • .NET Deployment Framework

    - by Khash
    Many people use Nant or Powershell for deployment of their apps to different servers/environments. These are based on scripting while some solutions allow deployment to be embedded in code like Migrator.Net and other Ruby inspired Db deployment/migration frameworks in .NET. I was wondering if there are any frameworks for .NET for application deployment that would allow developers to embed full deployment inside code. Things like copying files, creating web apps in IIS, stopping and starting services and so on.

    Read the article

  • Application as part of Android Built

    - by Gidiyo
    Hi, I had built a application using the Android SDK. Now I would like to package this application as part of the Android build. So that when I port Android into my device, it will appear in the Application menu. I tried, copying the apk file into the package folder, and include it in the make file. Doesn't work. How should I do it?

    Read the article

  • Copy & rename file using .bat file language?

    - by flyout
    I want to make a .bat to copy & rename a file multiple times. I want to have a list of names, and an original file, then I want to copy that file and rename it for each name on the list. How I can do this using a .bat file? Also is it possible to run winrar fromthe .bat to .rar or .zip every file after copying/renaming?

    Read the article

  • Re-using Buttons in WPF

    - by Alex Marshall
    I have a bunch of different objects that are commonly edited in the same TabControl using different DataTemplates, but I want each DataTemplate to have a common look and feel with Ok and Cancel buttons at the bottom right of each tab that will close the tab or save the content and then close the currently selected tab. What's the best way to place buttons on each tab ? Is there a way to do it without copying and pasting the buttons and stack panel across all of my data templates ?

    Read the article

  • UITableViewCell with selectable/copyable text that also detects URLs on the iPhone

    - by Jasarien
    Hi guys, I have a problem. Part of my app requires text to be shown in a table. The text needs to be selectable/copyable (but not editable) and any URLs within the text need to be highlighted and and when tapped allow me to take that URL and open my embedded browser. I have seen a couple of solutions that solve one of either of these problems, but not both. Solution 1: Icon Factory's IFTweetLabel The first solution I tried was to use the IFTweetLabel class made possible by Icon Factory and used in Twitterrific. While this solution allows for links (or anything you can find with a regex) to be detected to be handled on a case by case basis, it doesn't allow for selecting and copying. There is also an issue where if a URL is long enough to be wrapped, the button that the class overlays above the URL to make it interactive cannot wrap and draws off screen, looking very odd. Solution 2: Use IFTweetLabel and handle copy manually The second thing I tried was to keep IFTweetLabel in place to handle the links, but to implement the copying using a long-tap gesture, like how the SMS app handles it. This was just about working, but it doesn't allow for arbitrary selection of text, the whole text is copied, or none is copied at all... Pretty black and white. Solution 3: UITextView My third attempt was to add a UITextView as a subview of the table cell. The only thing that this doesn't solve is the fact that detected URLs cannot be handled by me. The text view uses UIApplication's openURL: method which quits my app and launched Safari. Also, as the table view can get quite large, the number of UITextViews added as subviews cause a noticeable performance drag on scrolling throughout the table, especially on iPhone 3G era devices (because of the creation, layout, compositing whenever a cell is scrolled on screen, etc). So my question to all you knowledgeable folk out there is: What can I do? Would a UIWebView be the best option? Aside from a performance drag, I think a webview would solve all the above issues, and if I remember correctly, back in the 2.0 days, the Apple documentation actually recommended web views where text formatting / hyperlinks were required. Can anyone think of a way to achieve this without a performance drag? Many thanks in advance to everyone who can help.

    Read the article

  • ASP.NET MVC using App_Code directory

    - by Ben
    I've added an App_Code directory to my ASP.NET MVC project so that I get dynamic compilation for plugins. Only slight annoyance is that when developing new plugins, I don't get intellisense on classes inside the App_Code directory. Currently I am creating them in another directory inside my project and then copying them into App_Code. is there any way around this?

    Read the article

  • How to prevent VS copy .pdb files

    - by fresky
    Hi, i set the cache symbols from symbol servers to directory to D:\WebSymbols, but whenever i use VS2008 attach to process to debug, the VS2008 will copy the .pdb to the location of the attached process, and i also found many .pdb in the Microsoft Visual Studio 9.0\Common7\IDE\sym. is there any way to prevent VS copying the .pdb files? thanks in advance!

    Read the article

  • Missing AVFoundation.framework

    - by Alex
    Hi, AVFoundation.framework is not where the documentation says it should be. I have iPhone SDK 2.2 installed (never had previous sdk versions installed) and I can't find that folder under /System/Library/Frameworks I did find it under /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/System/Library/Frameworks/ folder but if I add it from that location, then the compiler can't find the header files. I tried copying the entire AVFoundation.framework folder to /System/Library/Framework, but it still can't find the header files. How can I use AVFoundation classes? Thanks, Alex

    Read the article

  • lucene index missing files

    - by Akhil
    I have _0.cfs file of a lucene index directory but segments.gen and segments_2 are missing. Can I generate the segments.gen and segments_2 files without having to regenerate the _0.cfs file. Does these "segments" files contain any index specific data, which will thus force me to regnerate the entire index again. Or can I just generate the two "segments" file by copying these from another lucen index directory gnerated with the same lucene version.

    Read the article

  • Undo table updates in SQL Server 2008

    - by sikas
    I updated a table in my MS SQL Server 2008 by accident, I was updating a table from another by copying cell by cell, but I have overwritten the original table. Is there a way that I can restore my table contents as it was?

    Read the article

  • Vbscript - Creating a script that mirrors several sets of folders

    - by Kenny Bones
    Ok, this is my problem. I'm doing a logonscript that basically copies Microsoft Word templates from a serverpath on to a local path of each computer. This is done using a check for group membership. If MemberOf(ObjGroupDict, "g_group1") Then oShell.Run "%comspec% /c %LOGONSERVER%\SYSVOL\mydomain.com\scripts\ROBOCOPY \\server\Templates\Group1\OFFICE2003\ " & TemplateFolder & "\" & " * /E /XO", 0, True End If Previously I used the /MIR switch of robocopy, which is exellent. But, if a user is member of more than one group, the /MIR switch removes the content from the first group, since it's mirroring the content from the second group. Meaning, I can't have both contents. This is "solved" by not using the /MIR switch and just let the content get copied anyway. BUT the whole idea of having the templates on a server is so that I can control the content the users receive through the script. So if I delete a file or folder from the server path, this doesn't replicate on the local computer. Since I don't use the /MIR switch anymore. Comprende? So, what do I do? I did a small script that basically checks the folders and files and then removes them accordingly, but this actually ended up being the same functionality as the /MIR switch anyway. How do I solve this problem? Edit: I've found that what I actually need is a routine that scans my local template folder for files and folders and checks if the same structure exists in any of the source template folders. The server template folders are set up like this: \\fileserver\templates\group1\ \\fileserver\templates\group2\ \\fileserver\templates\group3\ \\fileserver\templates\group4\ \\fileserver\templates\group5\ \\fileserver\templates\group6\ And the script that does the copying is structures like this (pseudo): If User is MemberOf (group1) Then RoboCopy.exe \\fileserver\templates\group1\ c:\templates\workgroup *.* /E /XO End if If User is MemberOf (group2) Then RoboCopy.exe \\fileserver\templates\group2\ c:\templates\workgroup *.* /E /XO End if If User is MemberOf (group3) Then RoboCopy.exe \\fileserver\templates\group3\ c:\templates\workgroup *.* /E /XO End if Etc etc With the /E switch, I make sure it copies subfolders as well. And the /XO switch only copies files and folders that are newer than those in my local path. But it doesn't consider if the local path contains files or folders that doesn't exist on the server template path. So after the copying is done, I would like to check if any of the files or folders on my c:\templates\workgroup actually exists in either of the sources. And if they don't, delete them from my local path. Something that could be combined in these memberchecks perhaps?

    Read the article

  • PHP and Permissions

    - by Moe
    Hi, I recently moved my website to a new host and now am experiencing some broken code.. I have an uploading script that is now returning this: move_uploaded_file() failed to open stream: Permission denied in *.. I've set the upload directory to 777 which worked fine, but my script is needed to have top level permissions.. (As the script itself sets permission to directories, does lots of copying etc) Is there a way in apache I can set the PHP script to the owner of all the folders on my server? Thanks

    Read the article

  • Adding images to version control with Subclipse

    - by Brian
    Hello, I know that when using Subversion, adding/copying/renaming files must be done via 'svn add' or 'svn copy' etc. In my Eclipse IDE, I use Subclipse to work with subversion. It's easy enough to add text-based files to version control (ie. php/html/js files) - but how do I properly add images to version control using Subclipse? Thanks, Brian

    Read the article

  • Using a batch file to create folder and copy files into it to multiple PC's

    - by Greg
    Hi, I have a folder with numerous files that I need to copy to multiple PC's on a network. I thought if the folder didn't exist it would automatically create it. Here's what I have... copy "C:\Documents and Settings\follag\Desktop\Music" "\PC NAME\c$\Documents and Settings\All Users\Desktop\Music" When I look at the destinatin PC, it is not creating the folder and copying the files. I'm new to this whole batch files and would appreciate any help. Thanks, Greg

    Read the article

  • Post HTML data via XMLRPC in Python ?

    - by mrblue
    Hi all, I am writing a small script by Python to connect and post content to my WordPress blog. It's pretty straightforward with https://github.com/maxcutler/python-wordpress-xmlrpc However, when i tried to input a HTML data, for example: <b>Hello</b> It appears exactly in the WordPress post (I watch it from the visual editor, and I need to re-format it by copying the data to HTML mode to have the expected result. What should I do with my python script ? Thank you very much

    Read the article

  • Immutable Dictionary overhead?

    - by Roger Alsing
    When using immutable dictionaries in F# , how much overhead is there when adding / removing entries? Will it treat entire buckets as immutable and clone those and only recreate the bucket whos item has changed? Even if that is the case, it seems like there is alot of copying that needs to be done in order to create the new dictionary(?)

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >