FAQ Database Discussion Community


Prevent user from entering more characters into uitextview

ios7,xcode6,uitextview,edit
How could I prevent the user from entering any more characters into a uitextview after the textview has reached a given height? Here is the code I thought would work but does not. I can't put in any more characters but for some reason I can't even delete any.. -...

Basic CakePHP: Edit Post Method become Add Post Method

cakephp,methods,sql-update,edit
Currently following the blog tutorial however my database and their variable are different. I was looking through the "Edit Post" method and follow the step they given however they turn into "Add Post" method. What is the reason that cause it ? (I have set the hidden field at view...

Replicating user input from edit control of one MFC dialog to an edit control of another dialog

mfc,dialog,replication,edit
In one of my dialog based MFC application, I've used two dialogs of similar look. The requirement is when user populates an edit box of one dialog with some data the same to be replicated to similar edit box of another dialog instantly. I'm trying to implement it with EN_CHANGE...

Using a combined Insert & Edit form vs seperate, what is best practice? [closed]

jquery,asp.net,listview,insert,edit
I have an asp.net listview to display records. I then use jquery to add/edit records by displaying a form. The form will look the same whether inserting/editing but certain things will change e.g. on open I will clear all fields for add, and populate for edit. I will change button...

MVC4 Html.DropDownListFor How to list selected item for Edit

asp.net-mvc-4,edit,selected,dropdownlistfor
I can't seem to find any examples anywhere that fit my situation (using MVC4 just directly getting data from the DB using Stored Procedures without using Entity Framework) to set the SELECTED value of the DropDownListFor to the currently selected value of what is listed for that specific item in...

Add a UITableView Edit button to the toolbar in swift

ios,uitableview,swift,edit,toolbar
I have a UIControllerView which contains 2 tables, each having a separate controller. One of the table contains items that can be deleted. By default the edit button can be added to the Navigation Bar adding the below to the UITableViewController in the viewDidLoad(): self.navigationItem.leftBarButtonItem = self.editButtonItem() But I need...

Sectioning off image in python

python,image,edit
I have made a program that is taking an image I uploaded and dividing it into quadrants to mess with the colour in each one differently. My problem is that I can't see to get the division right. import cImage as image img = image.Image("/home/users/groth1/Downloads/selfie.JPG") newimg = image.EmptyImage(img.getWidth(), img.getHeight()) win...

creating edit page for profile in django

python,django,edit,profile
i am a beginner. my project is regarding the companies and customers. i have created, profile page for them. now i want to create an edit page such that companies can edit their profile. my model is: class Company_Profile(models.Model): user = models.OneToOneField(User) name = models.CharField(_('Company Name'), max_length= 30) logo =...

MATLAB - XML Basics in Edit

xml,matlab,edit
I have the following XML structure (simplified version): <?xml version="1.0" encoding="UTF-8" ?> <?xml-stylesheet type="text/xsl" href="LMSDacSolutionReport.xsl" ?> <LMS> <DurabilityTaskDefinition> <Material IdRef="Material_AlSi9Cu3" /> <Tasks> <Task> <Material IdRef="AlSi9Cu3"> <Parameter Name="Temperature" Value="293.15"/> </Material> </Task> </Tasks> </DurabilityTaskDefinition> <Material> <Node> <Parameter Name="Temperature"...

Symfony2 simple file upload edit without entity

file,symfony2,file-upload,doctrine2,edit
Please help me out here because I can't belive my eyes. I refuse to use some 3rd party plugin for file uploads, and refuse to creat a separate entity for a file/document. I just want simple file upload that I would do in Zend/Laravel and so on. I have a...

Using MySQL triggers to clone entries in a table after insert or edit

mysql,triggers,insert,edit
I know its possible to clone an entry from one table into another table using MySQL triggers and I would like to make this operation for both insert and edit actions. For insert action I managed to find a way, but I can't seem to make it work for edit....

PHP Change Part of a URL

php,url,text,replace,edit
I'm working on a wunderground weather intergration for a website and I would like to change/edit parts of the request URL for the API. I've tried a couple of solutions I found here on Stack overflow, but none have worked. $state = 'NC'; $city = 'Boone'; $json_string = file_get_contents("https://api.wunderground.com/api/MY-API-KEY/geolookup/conditions/q/'.$state.'/'.$city.'.json"); $parsed_json...

Edit specific row from table (SQL & PHP)

php,sql,database,select,edit
I'm working on a project in PHP and I don't know how to do something. I have a table with data from a Database. What I want to do is on each row of table to have a button "edit" that will redirect me to another page from where I...

can you write a program to auto-update my facebook post?

facebook,scripting,edit
I was wondering if I could write a program / short script (though I feel like this can hardly be accomplished by a script or two) that would automatically edit my facebook post every 10 minutes? So, say I have a facebook post saying "the time right now is 9:40am"...

javascript - DataTables - updating row using fnUpdate replaces different row

javascript,jquery,datatables,row,edit
I have Edit buttons in each row, on click data from row is passed to modal, where a user can change it, then on Save in modal it should update that row. I am using fnUpdate, however instead of updating (replacing) intended row, different row is replaced... var uId =...

ngGrid - edit a row on button click (ASP.NET Gridview edit equivalent)

row,edit,ng-grid
Is there a straightforward way to enable an entire row of ng-grid to edit mode, in the click of a button. I know if you set gridOptions for enableCellEditOnFocus or enableCellEdit, you can click/doubleclick to edit a particular cell. But what I want is to have a button in each...

python pyPdf How to edit a pdf file, replacing it's data?

python,data,edit,pypdf
I am trying to rotate pages in a pdf file, and then replace the old pages with the rotated onces in the SAME pdf file. I have written the following code: #!/usr/bin/python import os from pyPdf import PdfFileReader, PdfFileWriter my_path = "/home/USER/Desktop/files/" input_file_name = os.path.join(my_path, "myfile.pdf") input_file = PdfFileReader(file(input_file_name, "rb"))...

How to make TableCell editable , so it automatically updates the data class?

javafx,edit,tablecell
I am making a system for a school project , and one part of it is a TableView that is populated with rows using my own data class InventoryData that has properties correspondent to the table columns. I would like to make cells in some columns editable using a TextField,...

Edit form in Django 1.6

python,django,forms,templates,edit
I'm trying to edit a Modelform with an "edit" button but the form isn't updated. I have one view-function, original for posting and saving a new post. Then I have a second function, edit_comment, for updating the object one_entry that is created in original. In my template I have one...

How to edit MULTIPLE rows/data entries in SQL Server Management Studio [closed]

sql,sql-server,edit,ssms
I want to update/edit multiple rows in a database using SQL Server Management Studio. I know you can edit one entry using solutions provided here, here or here using Edit Top(200) function. But I want to edit >100 entries so this is not an adequate solution. I am using SSMS...

Edit xml using powershell

xml,powershell,edit
<configuration> <runtime> <assemblyBindings> <dependentAssemblyss> <assemblyIdentity name="A" publicKeyToken="5d861ad8ad8cd06f" culture="neutral" /> <bindingRedirects oldVersion="0.0.0.0-68834.68834.68834.68834" newVersion="4.5.0.103" /> </dependentAssemblys> <dependentAssembly> <assemblyIdentity name="B" publicKeyToken="ae714df8cd90bc8f" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-65534.65534.65534.65534" newVersion="3.0.0.103" />...

Reading a .txt, Display it in Form, Edit in Form, and Save

c#,file,line,edit
I'm relatively new to programming and I've set up a "fairly" simple task for me to work on. What I am trying to accomplish is clicking on a "Settings" button on Form1 that will open and post the results of "config.txt" to labels on Form2. Config.txt looks like this: [VERSION]...

when trying to edit new profile is creating in django

python,django,edit,profile
i am a beginner. my project is regarding the companies and customers. i have created, profile page for them. now i want to create an edit page such that companies can edit their profile. my model is: class Company_Profile(models.Model): user = models.OneToOneField(User) name = models.CharField(_('Company Name'), max_length= 30) logo =...

how to remove this title from my android application

android,edit
this is my app : http://ge.tt/api/1/files/1GS1TFA2/0/blob?download as you see in this screenshot, i need to remove this title from all tabs : http://drp.io:8080/files/42e423e6e71e326156ee22445d90a482.png there are other titles on the other tabs on app : http://drp.io:8080/files/93e6c9bff3a0d0754a02869912720b51.png i can attach any file from the app source code....

How to edit a UICollectionView item in another UIViewController?

ios,swift,uicollectionview,edit,master-detail
I'm using a Master Detail View Controller with Swift. When I click on a master cell, I see a collection view containing a list of pictures. Each picture represent data stored inside Core Data. Each picture data has also a timestamp and all picture taken the same day are stored...

Have a pop up window when clicking on an image

javascript,jquery,popup,window,edit
Sometime in websites you see that when you click on an edit image, a pop up window appears. In this pop up window, there may be for example, a check box list, or you can attach a file,... and then there is and OK or Return button. How can I...

UITableViewCell get deleted directly by tapping delete control on the left but not show delete button on the right

ios,uitableview,uiscrollview,delete,edit
When I involve [tableView setEditing:YES animated:YES], delete control shows on every cell on the left,what I want to do is to get the event when I tap delete control,and directly delete cell but not to show delete button on the right. I know apple's standard way to do this is...

SAP Script: Set focus on Input Field in order to SendKeys

user-interface,vbscript,scripting,sap,edit
in my SAP VBS Script, I want to paste the Clipboard to an Input Field. I use WshShell.SendKeys "^V", but it does not do anything and I suspect this because the Input Field has no focus. So far my best guess was to "write" empty text into the field and...

Python. Edit file with other extension, format

python,edit
I want to be able to edit file that is not in txt, xml etc format. I mean how to edit wit python a file that has xml structure and can be opened in notepad++. I have file with extension .sdlxliff. This file can be opened in notepad++ without any...

How do you edit a dependency/external library in android studio? [duplicate]

java,android,dependencies,external,edit
This question already has an answer here: How do I add a library project to the Android Studio? 24 answers There is a lot of information about adding libraries and dependencies, but I haven't been able to find any useful information on being able to actually edit a library....

Regular expression for deleting everything between two HTML tags

regex,replace,find,notepad++,edit
I am trying to use Notepad++ to bulk-delete blocks of comments placed between <HTML> and <HEAD> tags in a large number of files. Which regular expression phrase should I use?...

Avoid EF update the null image to database in .Net MVC

asp.net-mvc,entity-framework,null,edit,httppostedfilebase
In my SachController, there is an Edit method like below. In the view, there are several textbox and one file-input for upload image object. Sometime, user doesn't want to change the image and they just don't select a new image. And the image (HttpPostedFileBase) is null. How can I avoid...

Edit data in the model according to the user's input in view-based NSTableView

osx,cocoa,cell,edit,nstableview
I have a view-based NSTableView where all the cells are editable. I need to refresh the data from the model every time the user modifies a textField from the view. All the doc I find is related to the cell-based NSTableView. Does anyone have a clue about this? EDIT: I'm...

Python 3, extract info from file problems

file,python-3.x,edit,expect,xlwt
And again, asking for help. But, before I start, here will be a lot of text, so please sorry for that. I have about 500~ IP addresses with devices 2x categories in .xlsx book I want: telnet to device. Check device (by authentication prompt) type 1 or type 2. If...

ECHO Results into a FORM after multiple pages

php,mysql,forms,search,edit
I've seen tutorials on doing this sort of things echo'ing the results directly from the form into a different form on the following page however the issue I'm facing is slightly different and I can't find any threads that cover it, I'm sure someone will prove how much of a...

Replace CSS block of text within file Python

python,css,text,replace,edit
I'm tying to make a python program to help me make simple edits to a config file. I want to be able to read the file, replace a section of the file and then write the changes. One of the problems i have been having is that there are multiple...

can't get to bash_profile file to edit the path on mac

path,edit,.bash-profile
I can't access my .bash_profile file to edit my environment path. I was editing it in nano, saved and exited, making it so I only have one file path that is useless and can no longer do anything such as sudo or ls. I've tried nano, vi, open, grep search,...

how to edit existing debian package in installation cd?

installation,debian,package,edit,cd
ive been trying to edit a Debian installation CD, followed tutorial on debian website https://wiki.debian.org/DebianInstaller/Modify/CD, successfully extract cd, use genisoimage to recreate iso, try to install debian, no problem. and then the problem, when i tried to edit one of the package, say i want to change a picture in...

QTimeEdit C++ delete padding

c++,qt,stylesheet,edit,qtime
I want to delete an undesirable padding on a QTimeEdit widget. Here is an example of my problem. ...

Adding an Edit.php link to the end of each returned row

php,mysql,web,edit
I am trying to add a link to the end of each returned result row from the mysql database that will send me to another php page which will allow me to edit the data from the row. The problem is I cant find which part of the code I...

Modify function to replace text as well as add at carat when button pressed

javascript,jquery,html,edit,textselection
Ive built a little bit of code which adds text to a text area box depending on which button is pressed a very simple editor if you like. Currently the code just inserts the selected text where the cursor is, but if text is highlighted then I would like it...

Notepad++ Select text within multiple tags

xml,notepad++,edit
hope someone can help. I have a pretty big XML file that needs tidying up. Basically some line breaks are present which we need to get rid of. There are roughly 19,000 "<Location>" tags with text between. Is there a way to have NPP search for all <Location> tags, select...

Ruby on Rails Hours and Minutes in Drop Down Menu

ruby-on-rails,ruby,drop-down-menu,add,edit
In my Ruby on Rails application I am building a cinema application and for the length of each movie I want to display the hours and minutes in a drop down menu on the _form.html.erb. At the minute I am using two text fields (one for hours and one for...

Editing SWF or FLA files

file,flash,swf,edit,fla
I have one SWF file and i have few URLs inside, that i want to change. My question is how can i edit SWF file? Or when i decompiler it into FLA file, how can i edit it and compiler it againt back to SWF file? I decompiler it with...

on editing inserting a new row instead of updating the current row in cakephp 2x

cakephp,edit
I m having trouble in updating the student profile form,after i gave the user_id to the student profile.Every time when i try to edit the form, on saving it provide new id to the existing user. I don't know where I'm getting wrong. Plz help.Thanks in Advance. Here is my...

Is there a way to check if Ektron is loading a page in Edit mode in my codebehind? (C#)

c#,asp.net,edit,mode,ektron
I have a page that prompts the user for a password in order to display the content. However, when Ektron users are editing the page content, I want it to just show the content without asking for the password. The password functionality is all set in the codebehind; the password...