w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Is there a C++ equivalent (or equivalent technique) of Perl's __DATA__ segment?
There’s nothing like that in general. However, the Linux ELF binary format allows the inclusion of data files via the GNU tool objcopy. On Windows you can use resource files and assign the linker to include those in the executable. OS X conventionally uses application bundles to achieve a similar effect.

Categories : C++

Equivalent of "GoTo" in Google Apps Script (equivalent VBA-GAS )
You don't need GoTo, most people would argue that it is terrible programming practice to use it even when it is present. Using other control structures will do the job. if() { } else if() { } else { } for(;;) { continue; break; } while() { } do { } while(); switch() { case: default: } // for errors throw "Error string" try { } catch(error) { } You'll have to shuffle your logic around a bit, but it will result is better more maintainable code.

Categories : Javascript

migrating from 1.5 to joomla 2.5
Did you try it with this already?http://docs.joomla.org/J2.5:Migrating_from_Joomla_1.5_to_Joomla_2.5 Take your time, this is not an easy task, set up a testing environment, do backups, check requirements and all the stuff we all hate to do :-) Good Luck.

Categories : Joomla

Migrating to FOSUserBundle
That's the reason why doctrine:schema:update is not recommended for production. There is a much better and robust way: the DoctrineMigrationsBundle. As you have a heavy change in your database (i.e. your some columns need only renames, some are new, they need to be filled, etc.) you should take care of it on yours and not automatically. With the Doctrine Migrations you can do this step in a robust way. You can try to generate your migrations class automatically from the diff, but in the end I think you must modify the generated class to your needs. I've made you a migrations class from a fresh symfony installation and with a naked user class (only id) extending the FOSUserBundle base class. <?php // app/DoctrineMigrations/Version20130701120836.php namespace ApplicationMigrations; use

Categories : PHP

migrating from boost to std
No, it's not mandatory to use the std versions of features that were first implemented in boost. There aren't any big advantages to using std versions over boost's implementation, except if perhaps it enables you to eliminate a dependency on boost. In the process of adopting features from boost, improvements were made to the std versions. I'm not sure to what degree those improvements have also been applied back to boost; it's likely that most have been, but possibly not all. Using a variety of std implementations may flush out bugs where you're relying on some peculiarity of one implementation.

Categories : C++

Migrating wordpress
You can either update the database //FIXME: do comment/remove these hack lines. (once the database is updated) update_option('siteurl', 'http://your.domain.name/the/path' ); update_option('home', 'http://your.domain.name/the/path' ); http://codex.wordpress.org/Moving_WordPress or place the folowing in you wp-config define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com'); http://codex.wordpress.org/Changing_The_Site_URL In order to make all links working you've to update your htaccess in your admin area under settings -> permalinks.

Categories : Wordpress

Migrating from PyroCMS 2.1.x to 2.2.x
this is the change log, you can take a look at new changes http://docs.pyrocms.com/2.2/manual/reference/changelog

Categories : Misc

Migrating JSF 1.1 with Ajax4jsf 1.x to JSF 2
Get rid of Ajax4jsf 1.x altogether. It's indeed not compatible with JSF2. Instead, JSF2 offers a new main ajax tag <f:ajax> which covers all the core functionality as previously offered by Ajax4jsf 1.x. If upgrading to RichFaces 4 is not an option (because, as you said yourself, you aren't using RichFaces components anywhere), then just remove Ajax4jsf 1.x and replace all <a4j:xxx> tags by standard JSF2 equivalents. <a4j:ajaxListener>: use <f:ajax listener>. <a4j:keepAlive>: just put managed bean in the view scope by @ViewScoped. <a4j:log>: use jsf.ajax.addOnEvent() or jsf.ajax.addOnError() in JS context. <a4j:commandLink>: just nest <f:ajax> inside <h:commandLink>. <a4j:outputPanel>: use <h:panelGroup> and remember to in

Categories : JSF

Migrating from Mercurial to Git
Add hg-git to Mercurial Push hg-repo to git-target Step-by-step Guide A Clone Hg-Git Extension from it's repository into some local PATHTOHG-GIT B Enable extension in (global mercurial.ini or repository's-specific .hgrc) [extensions] bookmarks = ... hggit = PATHTOHG-GIT bookmark was added long time ago, when this extension wasn't part of TortoiseHG|Mercurial, not sure about today's configuration C Create new Git-repository with read|write access to it (or remeber existing?!) D Add Git-repo from p. C into [paths] section of .hgrc for Mercurial repository, which you want to export in Git under any name. Sample for my local Mercurial repository, which have Git-mirror on Github [paths] default = git+ssh://git@github.com/lazybadger/Fiver-l10n.git E After it you can use Git-reposit

Categories : GIT

Migrating key to new table
Obviously I can't go through and individually replace 10 with 12, 11 with 13, 12 with 13 because then the TableB_Id column will read 13, 13, 13, 13 Why not? If you only update by Unique_ID, it will only update 1 row at a time. Wouldn't this work: -- Iterate over each row in excel file Update TableA Set TableB_Id = New_ID Where Unique_ID = [new field to add to excel table corresponding to the unique_id]

Categories : SQL

Migrating from ant + ivy to gradle
You'll have to migrate the build manually, translating the build.xml's and ivy.xml's into Gradle's build language. (There is an Ant import feature, but it's not particularly useful in practice.) Where necessary you can easily reuse Ant tasks. You can import a Gradle build into Eclipse using the Eclipse Gradle plugin, or generate Eclipse files using the Gradle Eclipse plugin. A good start is to study the first several chapters of the Gradle User Guide, followed by the chapters on Ant integration and multi-project builds. The full Gradle distribution ships with many sample builds.

Categories : Eclipse

migrating cassandra from 1.1.2 to 1.2.6
I migrate a two cluster nodes from 1.1.6 to 1.2.6 without problems and without doing version by version. Anyway, you should take a closer look into: http://www.datastax.com/documentation/cassandra/1.2/index.html?pagename=docs&version=1.2&file=index#upgrade/upgradeC_c.html#concept_ds_smb_nyr_ck Because there are a lot of new features from version 1.2 like the partioners maybe you need to change some configurations for your cluster.

Categories : Cassandra

Migrating from ASP.NET WebForms to ASP.NET MVC 4
It's been my experience, when migrating old pages from webforms to mvc, that you kind of have to 'forget' that it was ever a webform page to begin with. to more directly answer your request for help resources, maybe this will be useful: http://kylehodgson.com/2013/01/08/asp-netmvc-web-security-basics-csrf/

Categories : Asp Net Mvc

Is a ORM the right tool to use for migrating data?
An ORM is definitely not the right tool, as you rightly point out they are for OLTP applications. Given that SSIS is off the table (it is the right choice were it an option), I'd consider looking at Rhino ETL. Very flexible, and you can use SqlBulkCopy with it which obviously you should consider doing here. It's open source, too boot.

Categories : C#

Migrating from Junit to TestNG
The official document for Migrating from Juit to TestNG can be found here. Please have a look. You can also check this for better understanding.

Categories : Java

Migrating passwords to Devise
I believe if you manually filled in 'my_php_framework_salt' into the db rows for old users then just used: self.password_salt instead of password_salt it would work. As I remember ruby returns the result of the last line in a function. Devise.secure_compare should return a bool, which means valid_password? would return a boolean as well. In short: require 'digest/sha1' # ... def valid_password?(password) return false if encrypted_password.blank? Devise.secure_compare(Digest::SHA1.hexdigest(self.password_salt+password), self.encrypted_password) end

Categories : Ruby On Rails

Error in Name Space after migrating to JSF 2.2
The way how the new xmlns.jcp.org XML namespaces are been handled is broken in the first Mojarra releases 2.2.0 and 2.2.1. Among others, they overlooked to properly register the new JSF 2.2 components/tags/attributes/handlers. It has been fixed in Mojarra 2.2.2 as per issue 2900 (note: issue ticket describes different problem symptom, but under the covers, it's essentially the same cause). So, upgrading to at least Mojarra 2.2.2 should fix your problem. It's currently already at 2.2.5.

Categories : JSF

Linker errors while migrating from x32 to x64
Ensure that the x64 configuration is selected. Right-click your project in the Solution Explorer window, Properties, Linker, Input. Click on the Additional Dependencies box and click the button that appears. This is what it should look like if the project is configured correctly. Note how the "Inherit" checkbox is ticked and how the inherited values list the standard SDK libraries. Like kernel32.lib, the link library that has the definition for __imp_FlushFileBuffers, etc. If it doesn't look like this in your project then you'll get these linker errors.

Categories : C++

migrating an existing app via south
It's possible that prefixing 'title' and 'status' with 'todo_' is causing a collision with the name of the table fields. In fact, in the database Django is naming the fields todoapp_todo_todo_status, and South might just be confused. South does some creative things internally, hence the collision. I would suggest trying: class ToDo(models.Model): title = models.CharField(null=True, blank=True, max_length=200) status = models.IntegerField(choices=TASK_STATUS, null=True, blank=True) assigned_to = models.ManyToManyField(OrgStaff, null=True, blank=True, related_name='assigned_to') assigned_by = models.ManyToManyField(OrgStaff, null=True, blank=True, related_name='assigned_by') assigned_time = models.DateTimeField(auto_now_add=True) completed_time = models.DateTimeFiel

Categories : Python

Migrating Datetime to DateTimeOffset
There are no such tools in SQL Server itself, however there 3rd party tools, that wrap up management tasks of a DB and generate change scripts for you. In absence of a third party tool, you can write a script that will generate change scripts for you. Here is a sample script, that finds all columns of datatime type and generate script to change it to DateTimeOffset data type. select OBJECT_NAME (a.object_id) as Table_Name ,a.name as Colimn_Name ,b.name as Old_Datatype ,'ALTER TABLE ' + OBJECT_NAME (a.object_id) + ' ALTER COLUMN ' + a.name + ' DATETIMEOFFSET ' + CASE a.is_nullable when 1 then ' NULL ' else ' NOT NULL ' END from sys.columns a join sys.types b on a.user_type_id = b.user_type_id join sys.tables c on a.object_id = c.object_id where b.name = 'datetime' and c.type

Categories : SQL

Building APK with Gradle outside IDE (migrating from Ant)
Standard examples provided by Google are here http://tools.android.com/tech-docs/new-build-system/gradle-samples-0.4.2.zip?attredirects=0&d=1 For automatically changing values in code use BuildConfig class. Examples are in the link above. Variants are explained here http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants UPDATE as this example gets bit stale here is pasetbin to newer version http://pastebin.com/FmcCZwA5 main difference is Robolectric support provided by plugin, and support library fetched from SDK internal repo Older version Less basic example with Robolectric and AndroidAnnotations Use nexus buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.4' } } apply plugin:

Categories : Android

AsyncTreeNode in Extjs 4 migrating from 3 to 4
nodeType doesn't do anything anymore so you can remove that. By defining a store with a proxy all nodes become asynchronous unless you set children to an empty array in which case it won't make a request when you expand the node. For more info: http://www.sencha.com/forum/showthread.php?128137-Where-is-AsyncTreeNode

Categories : Extjs

crypt() breaks when migrating from PHP 5.2 to 5.4
No, there's no way you can recreate the original cipher. Otherwise even a boy scout would be able to break blowfish. Your best chance is to generate a random password for your users and hash it once again, then force them to change the password as soon as they login.

Categories : PHP

TemplateSyntaxError after migrating to python 2.7
In this case, the error is because item.key.id is currently equal to an empty string, which is not matching your url pattern. Instead of: (r'^edit/(d+)$', 'views.edit'), try: (r'^edit/(d*)$', 'views.edit'),

Categories : Python

Using JUpgrade migrating to Joomla 2.5
There is an alternative to upgrading your Joomla 1.6 site. Firstly, go to the following page and download the file called Joomla_1.6.5_to_1.7.0_Package.zip. http://joomlacode.org/gf/project/joomla/frs/?action=FrsReleaseBrowse&frs_package_id=5986 Upload this to the root folder for your site and extract it. You will now see that you're running Joomla 1.7 From Joomla 1.7 onwards, the Quick Update was introduced, making updated very easy. So when you go to you're backend, as before, you will see all the quick icons. There will be one that says there is an update for Joomla. Click it and run the process. Hope this helps

Categories : Joomla

Migrating NSFetchedResultsController to UIViewController from UITableViewController
The NSFetchedResultsControllerDelegate is used for monitoring changes to core data entities so you don't need self.tableView = self.fetchedResultsController.delegate; You need to implement the UITableViewDelegate methods using the NSFetchedResultsController. Mainly - (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [self.fetchedResultsController.sections objectAtIndex:section]; return sectionInfo.numberOfObjects; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; NSMana

Categories : Iphone

Migrating to Twitter API version 1.1 (?) [duplicated]
According to this google groups post, tweepy is supposed to support the 1.1 API. Your error message reports that tweepy is trying to use the 1.0 API. I suspect your update failed. Try uninstalling and reinstalling tweepy. What version of tweepy are you using? tweepy.__version__ should be 2.0

Categories : Python

Migrating to MongoDB: how to query GROUP BY + WHERE
There are examples of this all over the documentation, Google and this site. Some references: http://api.mongodb.org/python/current/examples/aggregation.html http://docs.mongodb.org/manual/reference/aggregation/group/ http://docs.mongodb.org/manual/reference/aggregation/sum/ And for some code: self.db.aggregate( # Lets find our records {"$match":{"Time":{"$gte":100,"$lte":1000}}}, # Now lets group on the name counting how many grouped documents we have {"$group":{"_id":"$name", "sum":{"$sum":1}}} )

Categories : Python

Implementing Windsor, migrating and have questions
You don't have to do anything except registering that created instance in the container: Kernel.Register(Component.For<ILinkedInService>() .Instance(LinkedInServiceHelper.LinkedInService)));

Categories : Asp Net Mvc

dup method not working after migrating Rails 3.2 → 4.0
As discussed in http://edgeguides.rubyonrails.org/4_0_release_notes.html#general, Model.all now returns an ActiveRecord::Relation rather than an Array. While a Relation supports many of the methods that an Array does (e.g. each), it does not support empty?. The to_a converts it to an Array so that the empty tests can function.

Categories : Ruby On Rails

Can I continue to use Hibernate 3.0 when migrating PostgreSQL 8.2 to 9.2?
Actually, upgrading from 8.2 to 9.2 is not crazy at all. The biggest challenge is 8.2 to 8.3, due the removal of implicit cast to text per the 8.3.0 release notes. In comparison the other compatibility-affecting changes, like the change of bytea to hex by default and standard_conforming_strings being on by default, are more minor and easily worked around by compatibility settings if necessary. Since you have to do a dump and reload to get from 8.2 to any newer version (pg_upgrade only supports 8.4 and newer) you might as well go straight to 9.2. I strongly recommend updating to the latest Hibernate 3.x release, as the Hibernate PostgreSQL dialect code will contain compatibility fixes for newer PostgreSQL releases, bug fixes, performance enhancements, etc. You might want to look and see

Categories : Hibernate

Migrating Laravel Passwords to Ruby
Sorry about that. I just figured out how it worked after posting. The solution was BCrypt::Password.new('$2a$08$WJZWRyljoJGx.qunOGuGLeDaOn/Q3ShEvGxTkx3csWXqWUF21GhBe') == '123456'

Categories : PHP

Migrating from mysql_result() to updated method
I would try using mysqli_result with mysqli_fetch_assoc. mysqli_result mysqli_fetch_assoc Also, I would definitely quit using mysql_result as all the mysql_* functions are deprecated.

Categories : PHP

Issue in migrating trac to redmine-2.3
gem install sqlite3 The issue was that the gem file is not updating with "sqlite3" In GEM FILE manually updated as gem "sqlite3","1.3.8" in redmine/Gemfile

Categories : Ruby On Rails

Migrating from Joomla 2.5 to 3x Generating Errors
Add the below line defined( '_JEXEC' ) or die( 'Restricted access' ); if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR); From the docs The DS constant has been removed. If you really need it you can use DIRECTORY_SEPARATOR instead. Similar Question

Categories : Joomla

Rails Migrating Foreign Keys
Have you established Active Record associations? That will allow you to map the records from one table to another. Otherwise the column name is just an arbitrary name in the table. Did you add the foreign key attribute to your model? this creates the attribute for the existing model through in attr accessible these can be some of the potential problems guide on associations http://guides.rubyonrails.org/association_basics.html i would also edit the title of the question to something like "Migrating Foreign Keys" so other people can find answers to similar questions.

Categories : Ruby On Rails

migrating code from dev to prodcution, is there a checklist
Test Test Test back up everything you're going to replace Test Make sure that any modifications to underlying tables/views are migrated first Use the "GENERATE SCRIPTS" option Mind you, it's a good idea to have two databases: one for storing data and one for storing stored procedures. This way, you can create a third database to deploy your new stored procedures and views to so you can test them using live data without breaking anything for your users. We refer to it as a "staging" database.

Categories : SQL

WebView issues on migrating Awesomium 1.6.6 to 1.7.1
Well, this is embarrassing, I'm kinda talking to myself... So I figured out the answers for the last two issues: Getting the size should be done through a JavaScript code executed from the WebView's LoadingFrameComplete event: WebView _view; _view.LoadingFrameComplete += LoadingFrameCompleteHandler; private void LoadingFrameCompleteHandler(object sender, FrameEventArgs e) { if (e.IsMainFrame) { var view = (WebView)sender; var js = "(function() { some js code to return size }) ();"; var size = view.ExecuteJavascriptWithResult(js); if (size != JSValue.Null && size != JSValue.Undefined) { var values = (JSValue[])size; int width = (int)values[0];

Categories : Misc

Migrating web service from ColdFusion 8 to 10 issues
I found the solution to my problem. The ColdFusion connector was causing the fault. After installing ColdFusion 10 and patching, I had run the wsconfig to rebuild the connector. I had either done this incorrectly, or for some reason it didn't take. I ran it this morning, removed the connector, re-added it.... everything working fine now. Very frustrating.

Categories : Web Services

Migrating from mongodb to postgresql in rails
You should look into some of the automated migration/replication tools like MoSQL: https://stripe.com/blog/announcing-mosql One risky strategy for this migration would be to convert your codebase to using postgres and all of your models, put your site into maintenance mode, migrate your databases, deploy the new code, and bring it back up. However, this requires significant downtime and development risk of bugs or data loss. A safer, but much more involved strategy would be to setup automatic migration of data to a new database to sync up your databases. Then, every action in the application writes to both databases. After each transaction, you verify the data is in sync between both databases and read from Mongo. This allows you to fix errors as you find them and highlight any incon

Categories : Ruby On Rails



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