editing

How to use VSCode to remotely edit website files?

半城伤御伤魂 提交于 2019-12-06 06:33:08
问题 I need to be able to remotely log into web servers for my clients and edit code remotely. I mostly use this for CSS changes, but also am starting to play with PHP as well. I have tried to get Remote-Editor to work but it won't pick up the .remote file that I placed in the /home folder. The instructions don't really give great details on setting this up. What do I do? 回答1: There are several approaches to this that are all editor-agnostic. First, there is sshfs , which is cross-platform and you

Emacs: Is there a way to create a interactive script using Emacs?

别来无恙 提交于 2019-12-05 05:37:25
I am new to emacs, but shocked at what I can really do and how much time it saves (Macros save A LOT of time). But I was wondering it was possible to create step based scripts where it asks the user for input and executes code based on that. For example maybe I want to create a SQL query so it would prompt something like: >table name? myTable >type of query (select, insert, update, delete) select >fields to get name, id >Result query is "select (name, id) from myTable" This is just an outline of an idea but I was wonder because something like this would be useful to have. Someone mentioned AWK

cameraOverlayView prevents editing with allowsEditing

≡放荡痞女 提交于 2019-12-04 20:45:31
问题 Editing a photo after it's been taken (moving and scaling it) works fine in my app with this line: [imagePicker setAllowsEditing:YES]; But if I also use a cameraOverlayView, the editing mode doesn't work anymore. The screen comes up, but pan and pinch gestures don't make anything happen. I'm using your average image picker controller: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; And I add a camera overlay view, created from a custom view controller's view:

Saving a .php file and saving the includes too (possibly)

落爺英雄遲暮 提交于 2019-12-04 16:04:56
The setup: I have a standard .php file (index.php) that contains two includes, one for header (header.php) and one for footer (footer.php). The index.php file looks like this: index.php <?php include header.php; ?> <h2>Hello</h2> <p class="editable">Lorem ipsum dolar doo dah day</p> <?php include footer.php; ?> header.php like this: <html> <head> <title>This is my page</title> </head> <body> <h1 class="editable">My Website rocks</h1> and footer .php like this: <p>The end of my page</p> </body> I am writing a PHP script that allows you to edit any of the ".editable" items on a page. My problem

How to use VSCode to remotely edit website files?

北城余情 提交于 2019-12-04 15:56:17
I need to be able to remotely log into web servers for my clients and edit code remotely. I mostly use this for CSS changes, but also am starting to play with PHP as well. I have tried to get Remote-Editor to work but it won't pick up the .remote file that I placed in the /home folder. The instructions don't really give great details on setting this up. What do I do? There are several approaches to this that are all editor-agnostic. First, there is sshfs , which is cross-platform and you can install via your OS package manager. A simple approach would be as following: mkdir -p ~/mnt/server

Editing PDF with XPDF (or with something else)

◇◆丶佛笑我妖孽 提交于 2019-12-04 14:02:32
I would like to ask if it is possible to edit PDF files using the xpdf library and if yes how? I guess this is possible but i could not find any tutorial nor documentation for xpdf so i have realy no idea :( . I'm also open for using another library if any other has support for pdf editing. My only requirement for such library is that it has to be a C++ library or at least a C one and has to be cross-platform (Windows and Linux) I Only need basic editing of a pdf file for example: "this is a text in a pdf document" would be changed to "this is a text in pdf" with a different text color as well

Editing multiple lines of code in Netbeans

冷暖自知 提交于 2019-12-04 07:42:19
问题 Is there a way to select and edit multiple rows of code in netbeans? Visual Studio allows a similar operation where you press alt and select multiple lines using the dragging motion (left click) of mouse ? 回答1: It's called rectangular selection . It can be enabled by Crtl + Shift + R Screenshots for steps: Rectangular Selection By Petr on Oct 20, 2011 If you use development build, you probably noticed that NetBeans editor added Rectangular Selection action. I don't need this functionality

What unix command can we use to append some text to a specific line in a file?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 05:03:16
问题 Does anyone know of a series of unix commands that allows someone to append some text to the end of a specific line in a file? eg Line 1 Line 2 Line 3 Line 4 I wish to append the text ", extra information" to Line 3 so that the File will now look like this: Line 1 Line 2 Line 3, extra information Line 4 回答1: Perl: perl -p -e's{\n}{, extra information\n} if $. ==3' myfile $. is the line number 回答2: in awk it's: awk '{s=$0; if( NR==3 ){ s=s ", Extra Information" } print s;}' myfile > newfile

WPF datagrid: disable editing in certain rows

假如想象 提交于 2019-12-04 02:44:07
I have something like orders table bound to a DataGrid . I want to disable editing on rows, where order date is expired (deadline date > current date): show them greyed and ban entering into edit mode. Here is what I have: <Style TargetType="{x:Type WPFToolkit:DataGridRow}"> <Style.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <!-- ??? order_date > current_date --> <!-- some other condition - already works --> </MultiTrigger.Conditions> <Setter Property="IsEnabled" Value="False"/> <Setter Property="Foreground" Value="LightGray"/> </MultiTrigger> </Style.Triggers> </Style> The order date

Is there a way to *completely* disable Edit and Continue?

蓝咒 提交于 2019-12-04 01:56:00
I was wondering if there was a way to completely lock my code while debugging it within Visual Studio 2008. The code documents lock automatically when running as 64 bit applications, which I greatly prefer; however, I do most of my coding making add-ins for Excel, which is 32 bit. The result is that even though I target 'AnyCPU', the VS host knows that it is running within a 32 bit process and, therefore, the source code is not locked while the code is running hosted in Visual Studio. I can turn off Edit and Continue by going to Tools > Options > Debugging > Edit and Continue, and then