w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Adding image to existing PDF (vb.net)
You can automate that process by using a PDF editing library. Use for example the PDFLib 2.1 which is an open source project. Download it from here http://pdflib.codeplex.com/ and try editing your pages. It exposes a function named GetPages which returns a list of the PDF pages. By iterating through every page, you can edit it or add new content to it.

Categories : Vb.Net

Adding existing classes to ecorediagram
Smth's obviously not working right for you because that should be reasonably easy. Two options I'm aware of: If you reveal the palette (it might be collapsed to a little triangle in the top-left hand corner of your ecorediag), the EClass icon (2nd from top) lets you create a new EClass by drag-dropping it onto the diagram. If this isn't working for some obscure reason, you could go to the ecore model linked to your diagram, right-click an EPackage and select New Child->EClass. That new class can then be dragged & dropped onto your diagram. Hope this helps; let me know if not.

Categories : Misc

Adding DbContext into existing .net 4 application
You could cast to object context but then you gain nothing from DbContext if you 100% stick with existing code. but Ive done that with POCOs, not EntityObjects and can't confirm that it would work with entityobjects. Otherwise it's not possible to do that without changes. DbContext does not support EntityObject. DbContext is designed for POCOs. Plus there are other code differences between DbContext and ObjectContext. You'd have to change even if you were already using POCOs. If you are using the EF designer, you'd have to start by using a different code gen template (ef5 DbContext template). But that will result in very different classes and plenty of changes to your EF calls in your app.

Categories : Entity Framework

Adding value with existing value rails update
You can use several ways to update the value: with validation: refund_update.increment('price', 5) or refund_update.update_attributes({'price': refund_update.price+5}) without validation: refund_update.increment!('price',5) or refund_update.update_attribute('price', refund_update.price+5)

Categories : Ruby On Rails

adding div to existing 100% height content
When you set <div id="outfit-area"> to height:100%, it takes on 100% of the height of the parent element - in this case <div id="outfit-wrapper">. When you add the header, outfit-area is STILL taking 100% of outfit wrapper which now includes the header. You need to either: A. Give <div id="header"> a percentage height and then subtract that height from 100% and use this value as the percentage height for <div id="outfit-area">, like this: #header { height: 10%; } #outfit-area { height: 90%; } Edit: Here's a fiddle demonstrating: http://jsfiddle.net/CVwCr/ -OR- B. Nest the header inside of <div id="outfit-area"> so that it's height isn't being added to ` like so: <div class="ui-droppable" id="outfit-area"> <!-- drop to this area -->

Categories : HTML

Adding an orphaned commit to an existing branch in git
If you know the commit hash, instead of: git checkout -b new-branch 123abc You can use: git checkout existing-branch git cherry-pick 123abc The commit hash can be retrieved by looking at git log.

Categories : GIT

PHP adding specific key values into pre-existing array
The code you provided doesn't parse. Make sure $date variable contains exactly what it should, since (other than syntax problems) your example works perfectly fine: <?php $test = array ( 'foo' => array ( 'totalsales' => 80, 'totalamount' => 4 ) ); $date = '2013-06-30'; $test['foo'][$date] = 20; $date = '2013-06-25'; $test['foo'][$date] = 40; print_r($test); Outputs: Array ( [foo] => Array ( [totalsales] => 80 [totalamount] => 4 [2013-06-30] => 20 [2013-06-25] => 40 ) )

Categories : PHP

Emberjs - adding new record to existing array
From inside a controller the store instance of your app is always available because it get's injected in every controller automatically by the framework, so you should access the store like this: this.get('store').createRecord(App.Post, {...}); This should work correctly and not raise any errors. Hope it helps.

Categories : Ember Js

adding series from existing highcharts chart
this is what you need function redraw(chart) { // Delete all the series. /* while (chart.series.length > 0) { chart.series[0].remove(false); } */ // Add the new series. chart.series[0].setData([129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4]); chart.redraw();

Categories : Javascript

Adding text to existing PDF page in Cocoa under OS X
Well, didn’t have to go as far as CGPDF, all that was needed was to subclass PDFPage and create a custom init method passing in the PDF page I wanted as the base, the overriding the following methods: - (void) drawWithBox: (PDFDisplayBox) box - (NSRect) boundsForBox: (PDFDisplayBox) box Thanks to http://www.cocoabuilder.com/archive/cocoa/207723-pdfpage-creation-query.html for pointing me in the right direction.

Categories : Osx

Error adding foreign key to existing column
It seems you already have some data in the table, which is refraining you from adding the constraint. It may be the case that you have some rows in the table which are referring to a non-existent foreign key. Make sure the tables data are good to be referenced.

Categories : Mysql

Adding a UIScrollView to an existing UIView in Storyboard
One way is to select the view, then go to editor -> embed in -> scroll view. For more complex things, temporarily disable autolayout, create a new empty viewcontroller, copy/paste all your subitems there, do your voodoo with your scrollview, paste them back when it's done.

Categories : IOS

Adding more properties to existing CQRS Events
Depends on how you are serializing the messages. In other words, the best way to phrase this (/ search for an existing answer) is to identify how you are serializing the messages and then find out how that mechanism deals with the issue. Assuming it's JSON with JSON.NET and simple POCOs, then the answer is that adding a property is handled pretty cleanly - in the absence of any customizations (which is very doable), new fields come in withe default(T), i.e. null or 0 for each relevant value.

Categories : Misc

Adding Cocos2d (2.0) to existing iPhone Project
I will point out the steps that I have taken , so someone can take a look Step 1. Create a test project in Cocos2d and find the “libs” folder in finder, and then just copy it into your project’s folder in finder. Then from finder, drag-and-drop the “libs” folder into Xcode’s “Project Navigator” sidebar and check the “add files to destination”. Step 2. In Project > Targets > Build Phases > Link Binaries with libraries > Hit the + and Check if following frameworks are there if not add them:
 AVFoundation.framework
 GameKit.framework
 CoreText.framework
 AudioToolbox.framework OpenAL.framework
 QuartzCore.framework
 CoreGraphics.framework
 UIKit.framework
 Foundation.framework OpenGLES.framework Step 3. In Project > Targets > Build Settings > Se

Categories : IOS

Adding Storyboard support in existing project
You need to load the storyboard first: [[UIStoryboard storyboardWithName:@"MainStoryboardName" bundle: nil] instantiateViewControllerWithIdentifier:@"SomeVCInMainStoryboard"]; Assuming that project is setup correctly, you should just need to change the names to load the Storyboard and a subsequent view controller.

Categories : IOS

Adding Existing File. No Reference Found
Include the namespace of the HTTP via the using keyword, like this: using NamespaceWhereHTTPClassLives; OR Fully qualify the type name like this: private NamespaceWhereHTTPClassLives.HTTP http = new NamespaceWhereHTTPClassLives.HTTP();

Categories : C#

Autoconfigure existing HA nodes when adding new HA node
Starting with 1.9 there is no need to change the configuration of already existing cluster member if you want to add a new instance. Key for this is using ha.discovery.url as documented on http://docs.neo4j.org/chunked/stable/ha-configuration.html#_different_methods_for_participating_in_a_cluster.

Categories : Neo4j

Adding items to an already existing jlist from another class
String[] ar = {"one", "two", "three"}; JList Jlist1 = new JList(ar); The constructor you are using is as follows /** * Constructs a <code>JList</code> that displays the elements in * the specified array. This constructor creates a read-only model * for the given array, and then delegates to the constructor that * takes a {@code ListModel}. * <p> * Attempts to pass a {@code null} value to this method results in * undefined behavior and, most likely, exceptions. The created model * references the given array directly. Attempts to modify the array * after constructing the list results in undefined behavior. * * @param listData the array of Objects to be loaded into the data model, * {@code non-null} */ public JList(final E[] listData) {

Categories : Java

adding cells to existing rows using Javascript
Try this var row = document.getElementById(rowId); var TD = document.createElement('td'); //Create new cell TD.innerHTML = 'This is a new cell added'; //Set some thing row.appendChild (TD); //Add it to row

Categories : Javascript

Adding more fields in existing Mongo document
There is extensive documentation here http://docs.mongodb.org/manual/core/update/#add-a-new-field-to-a-document This shouldn't replace the old properties.

Categories : Java

Adding new values to existing mongo array
MongoDB has the $push operator for that. You don't have to iterate over the collection to do it, you can do an update inside the database. Written in Java, this would look something like collection.update(...query expression..., new BasicDBObject("$push", new BasicDBObject("digits", value))); This assumes that value is a single new value for the array. If you want to append all the elements of an array at once, you have to use the $each modifier (see above link for the details).

Categories : Java

Adding existing users from a table to a membership database
It does actually store passwords. You probably have it configured for ‘hashed’ passwords – so you can’t actually see the passwords in the table – only a 1 way hash of the passwords. If you set the passwordFormat to Clear, the passwords will be in plain text within the db. That being said, for security I do suggest you use Hashed. Do a search on google on how to hash your existing passwords so they can be put in the db in the correct format. But if you want to get it up and running quickly, use Clear and then Hash them in the future once you’ve got everything working. And just a note - the password field is on the aspnet_Membership table.

Categories : Sharepoint

Adding on update/on delete option to already existing column
You can use foreign keys (assuming you are using innodb): ALTER TABLE device ADD FOREIGN KEY (task_id) REFERENCES task (task_id) ON DELETE SET NULL ALTER TABLE task ADD FOREIGN KEY (device_id) REFERENCES device (device_id) ON DELETE CASCADE See here for a detailed description: http://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html

Categories : Mysql

T4 template adding assembly of existing project in solution
T4 works nearly completely independent from the rest of your code. You're on the right track though, with the assembly directive, but you'll need to specify a full path to the actual DLL of the assembly, unless the assembly is in the GAC (which it probably isn't). Luckily, however, you can use MSBuild macros in T4 directives. So, you'll probably get something like <#@ assembly name="$(SolutionDir)Project.Common.WebApiinDebugProject.Common.WebApi.dll" #> See MSDN for some more background on this syntax. You still also need the import namespace directive. Finally, be wary of project build order. The project that contains your T4 template now depends on Project.Common.WebApi, so you'll need to make sure that Project.Common.WebApi is built first. Otherwise, your T4 template might

Categories : C#

Adding whitespace handling to existing Java regex
Just using \s will account for all of them. And add the + quantifier on entire character class, to match 1 or more repetition: Pattern.compile("[~#@*+%\s]+"); Note that in Java, you need to escape the backslashes. So it's \s and not s.

Categories : Java

Adding a progress bar to an existing Symfony2 entity form
Try this bundle. It give you integration with really good amount of plugins and you can choose one of them. Anyway if you want progress bar, file must be send via ajax. You can upload file first and then submit form.

Categories : Symfony2

Adding data to existing object mapping a contanst key/value
Iterate and check for a match : function otherFunction(txnID) { for (var i=0; i<autoArray.length; i++) { if (autoArray[i].txnID == txnID) { autoArray[i].data1 = 'something 1'; autoArray[i].data2 = 'something 2'; autoArray[i].data3 = 'something 3'; } } }

Categories : Javascript

HTML layout: adding sidebar column to existing site
I like to use an absolutely positioned sidebar, then set the padding on the wrapper to the width of that element. Then I either set the margin-padding on the other elements, or I add it to the padding on the wrapper. http://jsfiddle.net/jAVQv/ <div class="container"> <div id="sidebar"></div> <div id="header"></div> <div id="content"></div> <div id="footer"></div> </div> .container { position:relative; padding:0 0 0 55px; } #sidebar { position:absolute; top:0; bottom:0; left:0; width:50px; background:#000; } #header { border:1px solid #000; width:100px; height:20px; margin:0 0 5px 0; } #content { border:1px solid #000; width:100px; height:50px; margin:5px 0 5px 0; } #footer { border:1px

Categories : CSS

adding a cuda file to an existing c project in visual studio
You have to select the right Compiler for the .cu files Are you following any of the tutorial on how to setup it on visual studio ? http://blog.norture.com/2012/10/gpu-parallel-programming-in-vs2012-with-nvidia-cuda/

Categories : C++

Adding new column in between existing columns according to data in a text file
Columns are only added at the end, because otherwise it can mess up existing INSERT SQL queries. You should not be concerned about how the db organizes itself - that's the whole point! later on just query out columns at your wanted order..

Categories : C#

Adding lettuce to an existing django project throws 'model already registered'
I was facing the same issue coming from a cucumber background expecting to start by running "harvest" and then writing my first feature file. But I was faced with that error. Apparently if you don't have a feature folder inside the apps you're running harvest against (defined by LETTUCE_APPS inside settings.py) and at least one step definition file (.py) inside it. It looks like if it doesn't land upon features in the default locations it starts an exhaustive search that reloads the module and thus brings about the admin reload fail.

Categories : Django

Appending / Adding function to existing jqueryui DatePicker 'onSelect' event?
After you called this $('#hello').datepicker("option", "onSelect", function(){ var prevFunction ... the current event handler is already the new one! So when the event fires and the following code executes var prevFunction = $(this).datepicker("option","onSelect"); prevFunction points to itself. You can solve this using an IIFE: $('#hello').datepicker("option", "onSelect", (function() { var prevFunction = $('#hello').datepicker("option","onSelect"); return function(){ prevFunction(); alert('def'); }; }())); Now var prevFunction = .. is called immediately and the old handler is stored. The new handler is assigned with return function(){ ....

Categories : Jquery

Undeclared identifier error when adding Core Data to existing Xcode project
You've set everything up correctly (note that you don't need to add the PCH to the Copy Bundle Resources build phase). The reason you're getting that error is because the _managedObjectContext ivar is not getting synthesized, because you're overriding the getter on a read-only property. You either need to change the property to be readwrite (which I wouldn't recommend), redefine the property as readwrite in a class extension, or define the ivar manually in a class extension or the implementation block.

Categories : Iphone

Adding page to existing PDF com.itextpdf.text.exceptions.InvalidPdfException: PDF header signature not found
The exception tells you that the first bytes obtained from your fileInputStream aren't equal to '%', 'P', 'D', 'F', '-', '1', '.'. Maybe the file you're trying to inspect is empty, maybe the InputStream can't be read correctly,... Many people before you have encountered and fixed the same problem: How to solve pdf header signature not found error? PDF header signature not found, iText com.itextpdf.text.exceptions.InvalidPdfException: PDF header signature not found iTextSharp exception: PDF header signature not found Error PDF header signature not found itextsharp multipage pdf form ... You should debug your code, by saving mainPdfAsBytes to a file and by examining that file. Is it really a PDF file? iText tells you it doesn't start with %PDF-1..

Categories : Java

Database design, adding an extra column versus converting existing column with a function
Having a string-valued PK should not be a problem in any modern database system. A PK is automatically indexed, so when you perform a look-up with a condition like table1.pk = 'long-string-key', it won't be a string comparison but an index look-up. So it's ok to have string-valued PK, regardless of the length of the key values. In any case, if you need an additional column with all unique values, then I think you should just add a new column.

Categories : Python

getting specific type of file and adding them to an existing zip file
$zip = new ZipArchive; if ($zip->open('source.zip') === TRUE) { for($i = 0; $i < $zip->numFiles; $i++) { $fp = $zip->getStream($zip->getNameIndex($i)); if(!$fp) exit("failed "); while (!feof($fp)) { $contents = fread($fp, 8192); // explode for extension and do what ever you want } fclose($fp); } } else { echo 'Error reading zip-archive!'; }

Categories : PHP

Adding new events without removing existing events in FullCalendar
It's hard to say without seeing the fetchEvents() function, but it may be that fetchAndRenderEvents() is calling a collection.reset. Assuming the events are stored in a collection, calling collection.set will do exactly that, but then you have to have your view set up to listen for add and remove events on the collection to keep the view in sync.

Categories : Javascript

MongoDB: Adding an array into an existing array
You might need to take a look at this. you can achieve this using dot.notation It's very powerfull way to find or update items in a larger array of document scheme. If you still not able to achieve this i would happy to provide you the following code... I've inserted a new owner2 owner2 = { email : 'murali.ramakrishnan@gmail.com', password : 'mypassword', firstName : 'murali', lastName : 'ramakrishnan', camps : [ { name : 'Rotary club', location : 'trichy', manager : {name: 'baskaran', email: 'baskaran@mit.edu', password: 'baskaran'}, instructors : [ { firstName : 'baskaran', lastName : 'subbiah', classes : []

Categories : Javascript

How to disable identity from the existing column & after adding data , how to enable identity again on the same column in SQL Server 2008?
Use SET IDENTITY_INSERT (http://msdn.microsoft.com/en-us/library/ms188059.aspx). SET IDENTITY_INSERT TableName ON; -- Insert Data. SET IDENTITY_INSERT TableName OFF;

Categories : Sql Server

How to append an existing XML file using DOM without overwriting the existing data? in java
It's pretty easy. Say, you want to append new Employees to your XML. Instead of creating a new root you'd simply find it using getElementsByName() like // find root NodeList rootList = doc.getElementsByName("Employees"); Node root = rootList.item(0); Element employee = doc.createElement("employee"); //create new Element root.appendChild(employee); // append as before There's a Document.getElementById() method as well that you could use if an element has been assigned an identifier. To insert something deep down the tree use XPath to find the node first then append() as usual. EDIT : (Sample code added) You can't have two root nodes i.e. two <Employees> tags as root. That's invalid XML. What you need is multiple <Employee> tags inside one single root <Employees> tag.

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.