move

ASP.NET mvc: Moving items between two listboxes

末鹿安然 提交于 2019-12-06 08:17:46
Currently I have 2 listboxes binding data from a database on my view... I've used a custom Viewmodel and it is not strongly-typed. Here's the code: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ProjectenII.Models.Domain.StudentModel>"%> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> IndexStudents </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>IndexStudents</h2> <div class="editor-field"> <%: Html.ListBox("IndexStudentsNormal", Model

Show / Hide Image in Swift

Deadly 提交于 2019-12-06 07:38:28
how to show or hide a image in Swift by taping on a Button? For example: i have ImageA and ImageB and one Button which i want to use to move ImageA to ImageB and back to ImageA and so on.. It works perfect to move from ImageA to ImageB, but how can i move back to ImageA? My code is: import UIKit class ViewController: UIViewController { @IBOutlet weak var Bild1: UIImageView! @IBOutlet weak var Bild2: UIImageView! @IBAction func pressedButton(sender: AnyObject) { Bild1.hidden = true Bild2.hidden = false } override func viewDidLoad() { super.viewDidLoad() Bild1.hidden = false Bild2.hidden = true

Can't copy Umbrao.sdf from webserver

自闭症网瘾萝莉.ら 提交于 2019-12-06 03:46:38
I have an Umbraco application running on a webserver and I need to move the application to another webserver. The Umbraco application uses an embedded database (SQL CE 4). I can copy all the files in the application except the "Umbraco.sdf" file. Add file named (if you like you can insert HTML that will be your maintenance page) app_offline.html After that IIS will release Umbraco.sdf and web.config copy and delete/rename mentioned file. Gramson As the Umbraco installation will be using the Umbraco.sdf database, you need to turn the application into maintenance mode, by adding a app_offline

Powershell: Move Files recursively

狂风中的少年 提交于 2019-12-06 01:37:14
问题 I am trying to copy all build output files and folders into a Bin folder ( OutputDir/Bin ) except of some files which stay in the OutputDir . The Bin folder will never be deleted. Initial condition: Output config.log4net file1.txt file2.txt file3.dll ProjectXXX.exe en foo.txt fr foo.txt de foo.txt Target: Output Bin file1.txt file2.txt file3.dll en foo.txt fr foo.txt de foo.txt config.log4net ProjectXXX.exe My first try: $binaries = $args[0] $binFolderName = "bin" $binFolderPath = Join-Path

Java - How to move a file into a zip file?

此生再无相见时 提交于 2019-12-06 00:18:50
That's it. I have a text file, and I need to move it to a (existing) Zip File in a given directory. File file = new File("C:\\afolder\\test.txt"); File dir = new File(directoryToGo+"existingzipfile.zip"); boolean success = file.renameTo(new File(dir, file.getName())); But it does not work. Is there a way to move a file into a existing Zip File? Thank you. David Kroukamp Hmm you could use something like: public static void addFilesToExistingZip(File zipFile, File[] files) throws IOException { // get a temp file File tempFile = File.createTempFile(zipFile.getName(), null); // delete it,

C# Form Control Move

坚强是说给别人听的谎言 提交于 2019-12-05 23:24:50
Is there anyway to control where you can move a form? So if i move a form, it can only be moved on the vertical axis and when i try to move it horizontally, nothing happens. I dont want a buggy implementation like locationchanged or move event and poping it back inline. I no there is a way using something like a WndProc override but after searching for a while, i couldnt find anything. Please help You would most likely want to override WndProc and handle the WM_MOVING message. According to MSDN : The WM_MOVING message is sent to a window that the user is moving. By processing this message, an

std::move with std::make_pair

纵然是瞬间 提交于 2019-12-05 23:07:36
问题 Is there any difference between: std::map <int,std::pair<T,T>> m; T t1,t2; m.emplace(1,std::make_pair(t1,t2)); and: std::map <int,std::pair<T,T>> m; T t1,t2; m.emplace(1,std::move(std::make_pair(t1,t2))); Is the std::move redundant here? Will std::map::emplace and perfect forwarding take care of allocating the std::pair directly in the std::map ? 回答1: std::make_pair(...) and std::move(std::make_pair(...)) are both rvalue expressions (the first one is a prvalue, the second one is an xvalue).

Resize on std::vector does not call move constructor [duplicate]

半世苍凉 提交于 2019-12-05 21:04:06
问题 This question already has answers here : C++11 rvalue reference calling copy constructor too (4 answers) Closed 4 years ago . I have been playing around with std::vector to understand when objects are constructed, destructed, copy constructed and move constructed. To so do, I have written the following program #include <iostream> #include <vector> class Test { public: Test() { std::cout << "Constructor called for " << this << std::endl; } Test(const Test& x) { std::cout << "Copy Constructor

move constructor for std::runtime_error

天涯浪子 提交于 2019-12-05 20:26:04
问题 Why does std::runtime_error not provide a constructor accepting an std::string&& ? Looking at the constructors for std::string, it has a move constructor, but the noexcept specification is only there for C++14, not C++11. Was this a mistake, a deadline that was missed or am I missing something? 回答1: explicit runtime_error(string&&); does not exist simply because it would not provide any optimization. As it turns out, a C++11-conforming runtime_error does not internally store a std::string .

Bash: Loop over files listed in a text file and move them

被刻印的时光 ゝ 提交于 2019-12-05 19:16:10
问题 I have a directory (directory A) with 10,000 files in it. I want to move some of them to directory B and the others to directory C. I made a text file that contains the names of all the files I want to move to directory B and another one with the names of all the files that I want to move to directory C. How can I write a bash for loop to move these files to the new directories. Pseudocode: for file in textfileB: move file from directory A to directory B for file in textfileC: move file from