w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Existing pages to subpages on trac
Having WIKI_RENAME permission every wiki page has a button 'Rename' at the bottom of the page. You click and change e.g. "Test" to "parentToBe/Test2" there, and it's just moved to be a subpage of "parentToBe" then.

Categories : Misc

In Refinery CMS, how can I apply page-part changes to existing pages?
This turned out to be pretty simple. Following the solution given in the Google Groups thread, I used the Rails console. For future reference, here's the full routine for adding a new page-part and applying to all existing pages: First add the new page-page(s) in your refinery pages config file. This is detailed here in the Refinery docs. In this example, I add a page-part called "epigraph": # Configure global page default parts config.default_parts = ["Body", "Side Body", "Epigraph"] # Configure whether to allow adding new page parts config.new_page_parts = true Then update your view file (appviews efinerypagesshow.html.erb if you're using the default) to include the new page-part. In my case: <div class="epigraph"> <%= raw @page.content_for(:epigraph) %&g

Categories : Ruby On Rails

How do I deploy an Octopress blog to an existing gh-pages static site?
By default Octopress publishes your blog to User or Organization Github Pages. I think you'd need to deploy your blog to Project Github Pages instead. See here for the description of the difference. This would mean that you would have another branch called gh-pages. Your existing static site would be on the master branch and would deploy to username.github.io. Your blog would be on the gh-pages branch and would deploy to username.github.io/projectname This sounds quite hopeful, and it may that with some carefully configured CNAME records, it may be enough. Edit There are instructions for deploying to Github project pages in the section With Github Project pages (gh-pages) on the deployment instructions page. A possible alternative would be switch the locations. That is, leave the

Categories : Github

Rails4: Adding Pages to a Controller
If your whole page is a shop, then there's no sense in making a single shop controller that contains every action of the shop. Instead, create controllers for the shops "parts". Normally, you would have a separate controller for static pages like about or policy. Rails will, by default, search for a file that has the same name as the action of the controller under the folder with the same name as the controller and load it, after the code in the controller is executed. So, if your controller is Shop, and the action is policy, just add a policy.html.erb file under the views/shop folder. Finally, add this to the routes.rb file: get 'shop/test/about', to: 'shop#about' Consider the getting started guide, which covers all this.

Categories : Ruby On Rails

Dynamically adding pages to rails app
I think that you should use as below code - Eg : <% @users.each do |u| %> <%= link_to u.name, :controller => 'user', :action => 'show', :id => u.id %> <% end %> I hope that you can solve your problem by using this way.

Categories : Ruby On Rails

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 PHP application to ASP.NET website using master pages
The Microsoft IIS webserver supports PHP so you can create PHP pages (Having the extension .php) that are then interpreted as they would be on Apache. You can't mix and match PHP within other types of file because the script will never get interpreted. Check with your ISP though because not all have PHP enabled.

Categories : PHP

Dynamically adding/removing pages from FragmentStatePagerAdapter
After adding the new item you'll need to call myAdapter.notifyDataSetChanged(); Also, it seems you use a const for the number or items NUM_ITEMS, you'll need to change that to something dynamic you can change.

Categories : Android

Adding shapes at different pages of a MS Word Document in C#
First of all if all you need is generating .docx files, cosider using the OpenXML project. It'll work much faster and will not suffer from issues related with working with Word (like multithreading, files not closed properly or licensing). Generating documents with OpenXML is not trivial, but it becomes much easier if you use the productivity tool - it lets you open any document and generates c# code that would recreate it. Regarding your question, word inserts it exactly where you ask it - the function receives an absolute vertical coordinates and the coordinates you provide point to the first page. So instead of using wdVerticalPositionRelativeToPage use wdVerticalPositionRelativeToTextBoundary, in the case of regular of normal text it will give you the absolute coordinate. Or you can

Categories : C#

adding image from cms/pages/home/content
you can call phtml file this way {{block type="core/template" template="page/html/YOUR_FILE_NAME.phtml"}} you can put this code in content of page page/html/YOUR_FILE_NAME.phtml this path of your phtml file this can be your path

Categories : Magento

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 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 Disqus to multiple [All] pages on Github domain
From what I do understand, you want to add a disqus input for each article of your blog. Well, Jekyll use the liquid templating language, that allow html includes. I defined a layout in '_layout' directory (e.g: default.html). I put a front-matter inside this file to tell Jekyll that I want to parse this file when I run 'jekyll build'. I also create a disqus.html (in my _include directory) where i paste the disqus snippet of code they provide me with. I include this snippet in the default layout (where ever you want). {% include disqus.html %} (I do not use literal name like toto.html but rather variable. But it doesn't matter. We can do so) And in each blog posts, in _post directory, in the front-matter I define 'layout: default' That said, if you don't have the Jekyll documentation i

Categories : Misc

Adding extra classes to archive pages on Wordpress
Your theme header should have something like <body <?php body_class(); ?>>. You can add to your functions.php, or, preferably, in a custom plugin the following filter to manipulate the classes being output: add_filter( 'body_class', 'b5f_modify_body_classes', 10, 2 ); function b5f_modify_body_classes( $classes, $class ) { // Modify the array $classes to your needs if( is_archive() ) { $classes[] = 'woocommerce'; $classes[] = 'woocommerce-page'; } return $classes; } You can check WordPress function get_body_class() to see how it can be built.

Categories : Wordpress

Adding multiple pages to a scrollview with interface builder
You need to use uipageviewcontroller for this project. It creates exactly what you want. Here is a clear example in a form of tutorial as you requested which you may like to look at: http://www.appcoda.com/uipageviewcontroller-tutorial-intro/ And here is the link to the doc's from apple http://developer.apple.com/library/ios/documentation/uikit/reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html

Categories : IOS

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

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

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 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 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 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

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 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 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

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

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 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

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 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#

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 content from external sources to Sharepoint 2010 pages
Ok, I finally figured this out. After many many hours of head banging. It seems that the ASP.NET MVC framework returns JSON as default it if cannot find a content-type or Accept header. As SharePoint does not allow you to customise the headers for data sources, it was receiving JSON back as a default. I Couldn't find a way to override this, so i had to remove the JSON formatter from my ASP.NET API as a temporary solution. GlobalConfiguration.Configuration.Formatters.Remove(GlobalConfiguration.Configuration.Formatters.JsonFormatter); Now, it returns XML regardless of the content disposition. Edit: I switched the formatters around, so if the Accept/Content-type is unknown, it defaults to XML. var switch_it = GlobalConfiguration.Configuration.Formatters.JsonFormatter;

Categories : Xml

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

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 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

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

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



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