w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
setPreferredContentSize error in ios app
In iOS7, UIViewController has a new property preferredContentSize. A project made for iOS7 has the following method: - (void)awakeFromNib { self.preferredContentSize = CGSizeMake(320.0, 480.0); [super awakeFromNib]; } It therefore sends a setPreferredContentSize: message to your own controller, no matter if the property is implemented or not. To resolve the issue, you might want to avoid setting a property that does not exist: - (void)awakeFromNib { if ([[[UIDevice currentDevice] systemVersion] compare:@"7" options:NSNumericSearch] != NSOrderedAscending) { self.preferredContentSize = CGSizeMake(320.0, 480.0); } [super awakeFromNib]; }

Categories : Iphone

Heroku Production Error: PG::Error: ERROR: relation "users" already exists error
I took a look at your code, and ran the database migrations on an empty database. Your migrations seem to be fine. However, this line in your error: PG::Error: ERROR: relation "users" already exists suggests that you might not be working from a fresh database. Assuming you don't have any data that's mission-critical stored in your database, your best bet is just to drop the database and start over. So, if you run: heroku pg:reset blog_production (assuming you're deploying in production mode) you'll have a fresh database. Then just do: heroku run rake db:migrate and you should be back on track.

Categories : Ruby On Rails

Codeigniter 1.7: Why do I get this error: Fatal error in /..: Cannot redeclare class Error in error.php on line 6
There is already a class in scope called Error, You can not have 2 class names called the same thing You will need to rename the old or the new class to continue Edit: to help find it $reflector = new ReflectionClass('Error'); echo $reflector->getFileName(); echo $reflector->getStartLine(); That should give you the file and the line

Categories : Codeigniter

Error related to phpbb forum - Parse error: syntax error, unexpected T_STRING
This error might involve missing (;) semi colon, php code must end with a semi colon Missing () Missing ($) before varible Missing {} Or atleast strings ("...") are not properly closed.

Categories : PHP

Excel Macro error: "Error 1004: application defied or object defined error"
What happens if you change this line .ListObject.DisplayName = "Table_Speed.accdb_16" to ActiveSheet.ListObjects(1).DisplayName = "Table_Speed.accdb_16"

Categories : Excel

MySQL Cluster ERROR 1296 (HY000): Got error 157 'Unknown error code' from NDBCLUSTER
Error 157 is actually 'could not connect to storage engine' and the fact that MySQL fails to report that error correctly is a bug: http://bugs.mysql.com/bug.php?id=44817 The case described in that bug mentions that you get the error when you try to query a table in NDB when the cluster is still down. So I'm just guessing, but I would conclude that your cluster is not started. Either you missed starting one of the nodes, or else something went wrong starting one of the nodes.

Categories : Mysql

Uncaught Error: Error calling method on NPObject Error with embedded Youtube Video
"youtube-nocookie.com" redirects the HTTP request to HTTPS but uses sources inside of the page, which are not secure. So if you don't have access to the source of "youtube-nocookie.com" there is nothing you can do. If you have, use only HTTPS sources or prevent the redirect to HTTPS.

Categories : Javascript

ajax, jquery ,respose error (500 internal server error) & xml parsing error
Cross domain posts do not allow for XML I believe. You can try using jsonp though. To do that add datatype:'jsonp' Also when you use JSONP it is not possible to do a post. Only GET is possible with JSONP.

Categories : Jquery

Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error
OK. This definitely seems to be a Mac OSX issue. For some reason, the HTTP headers created by File.upload() method in OSX cause the external server to crash with a 301 Move Permanently. This DOES NOT happen in Windows. Of course, anything other than a HTTP 2xx response will result in an I/O Error as far as the AIR compiler concerned. Therefore, in order to get around the file upload problem, we have to manually create the HTTP headers responsible for the upload per se. I would suggest not using File.upload() (or FileReference.upload() for that matter) until this issue is resolved. In order to do this, the file that we are uploading must be converted into a ByteArray. Therefore I would only use File/FileReference for capturing the file. For the actual upload, the file must be converted to

Categories : Actionscript

Parse error: syntax error, unexpected $end, expecting T_FUNCTION in error.php
You don't mention a version but in the 3.x series that file is in the legacy directory not the joomla directory of the /libraries, so I'm going with 2.5.x To answer you question, "Yes you are missing something" - the rest of the file. That file is from the 2.5.x series of Joomla and should be over 900 lines long as shown below by the 2.5.14 version: <?php /** * @package Joomla.Platform * @subpackage Error * * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; // Error Definition: Illegal Options define('JERROR_ILLEGAL_OPTIONS', 1); // Error Definition: Callback does not exist define('JERROR_CALLBACK_NOT_CALLABLE', 2); // Error D

Categories : Joomla

CURL Error while making request: SSL connect error (error code: 35)
I tried this on several different machines: curl -v https://www.example.com/ On some machines I got the SSL error 35, and on some it worked with no error message. From this I suspected that there was some difference in the curl version being used, or else the related packages for SSL certs. So I tried updating some packages on the server I needed. It turned out that updating the Network Security Services (NSS) package fixed the problem. yum update nss

Categories : PHP

Proguard error preventing APK from building with "returned error with error code 1"
In order to fix this, Change: java -jar $PROGUARD_HOME/lib/proguard.jar "$@" To: java -jar "$PROGUARD_HOME/lib/proguard.jar" "$@" in this file <Android SDK Location Here>/sdk/tools/proguard/bin/proguard.sh Credit here

Categories : Android

Error Displaying Error page:Application installation Error in joomla 3.0
Looking that screen, I suppose the error is on the instance of the controller (that call the particular action) ... check if is it istantiate proprely. Also check the action calling... I suppose that is here the error..

Categories : Joomla

Compiler error message error:expected ')' before '*' token. Error with my constructor
costmap_2d::costmap2DROS* needs a forward declaration or you need to include the header file where it is defined. Because it is a pointer, a forward declarion is better. So before the class definition do this: namespace costmap_2d{ class costmap2DROS; }

Categories : C++

XML Parse Error: error on line 1 at column 769: Encoding error
You need to escape any ampersands and angle brackets in your XML content. So & should become, &amp;, < should become &lt; and > should become &gt;. The easiest way to do that is probably with str_replace call like this: $string = str_replace( array('&', '<', '>'), array('&amp;', '&lt;', '&gt;'), $string);

Categories : PHP

Omniauth error -- PG::Error: ERROR: duplicate key value violates
You have a unique constraint on the email field. Because this field is defined as not nullable and has a default value of "" (empty string). This means if you don't specify the email, your DBMS will set this field to "". Of course, because it has a unique constraint, you'll only be able to add two users without email, because only one can have the empty string email. If you didn't create the constraint manually, then I assume rails has created it for you (because there's an index on the email field too apparently) by assuming the first field is the table primary key, since you didn't specify any. This made it create both an index and a unique constraint on it.

Categories : Ruby On Rails

Error: Server Error in '/' Application Parser Error, asp.net c#?
Try changing CodeBehind="OutReport.aspx.cs" to CodeFile="OutReport.aspx.cs" EDIT: A CodeBehind Needs to be compiled ( asp.net 1.1 model) and compiled binary is placed in the bin folder of the website. You need to do a compile in visual studio before you deploy. Good model when you do not want the source code to be viewable as plain text ... for example when delivering to a customer who you not have obligation to provide code. A CodeFile file is located and compiled by ASP.NET at runtime, on demand. You can "pre-compile" your web site to fall back on the older model, which is useful if you won't want to deploy your source code to every web site. But by default, your CodeFile file is a .cs file that is deployed to the site, and the class is generated in the ASP.NET temporary storage folde

Categories : C#

how to put the error logs in an error log file such as error.log using Yii framework?
There are hardly calls to Yii::log() in Yii's core. Most are Yii::trace() which you'll only see if you have set YII_DEBUG true and add log level trace.

Categories : PHP

Excel Error 1004 - Run-time error '1004' Application-defined or object-defined error
Perhaps this: changed c to cells instead of range and used cells collection on the range. Realized you may need c.value as well. Otherwise what property of the cell are you looking at? Sub ClearAll() Dim c As cell, MyRange As Range Set MyRange = Range("A1:JS87") For Each c In MyRange.cells If Len(c.value) = 0 Then c.ClearContents Next c End Sub MSFT Link

Categories : Excel

While returning a DataContract from a WCF function, I'm getting this error: "An error occurred while receiving the HTTP response"
That's a pretty generic exception in WCF so you'll need to enable WCF tracing to get more detailed info. Just guessing but look at this MSDN forum thread where the list contained complex objects that exceeded the default internal object limits in WCF. Once you enable WCF tracing, you should have a better idea of what's going on.

Categories : C#

scala error when extending java.util.Stack : error while loading vector$
eThis same issue may be part of a larger bug report: https://issues.scala-lang.org/browse/SI-7455 The report claims fixed in Scala 2.10.3-RC1, Scala 2.11.0-M6 I'm waiting for the next stable scala IDE update before verifying fixed (lazy I know) but a simple work around in the mean time is to simply change the class definitions to extend scala.collection.mutable.Stack instead. -- Most people running into this issue are trying to use swing; for you I can only recommend trying one of the fixed builds of scala.

Categories : Scala

Error: The remote server returned an error: (400) Bad Request, During Google Token Access
It looks like you've gotten past the first step, and now have an authorization code that you are trying to swap for an access token. Make sure the request is a POST and make sure that all parameters are in the body of the request, and not in the query string portion. Since it looks like you're in C#, see Google Analytics API - Retrieve refresh token with OAuth2 & ASP.NET for what looks like the same issue and resolution. Finally, please reset your client secret since you included that in the URL that's in your question above. This can be done via the API Console: https://code.google.com/apis/console/

Categories : C#

Ajax alert error (Fatal error Class not found in home/../test.php)
Your AJAX call is calling a PHP page which returns a PHP error. You should open test.php and check line 3. You are most likely calling a class that doesn't exist (is not declared) or the class is declared in a file, which is not included. Most class calls look like this: $c = new MyClass(); // Create a class object or MyClass::myMethod(); // Static call to a class method These both will throw the above PHP error if MyClass is not defined anywhere.

Categories : PHP

Try to use quatitize.js but got error message "Uncaught TypeError: Object # has no method 'palette'"
If you open the link to the current version of the script, you will see that this section of the code is commented out. Also on lines 38 and 39 it is specified that: * Returns a color map you can use to map original pixels to the reduced * palette. Still a work in progress. Therefore, I wouldn't expect it to work, perhaps there are some missing libraries. I suggest you update your code with the latest version at https://gist.github.com/nrabinowitz/1104622. Also, you can keep your page clean and separate the module. For example create a subdirectory assets, put the quantize.js in there and in your page include: <script src="/assets/quantize.js" type="text/javascript"></script>

Categories : Javascript

Can't connect with MySQL database, getting error "Fatal error: Class 'mysql_connect' not found in..."
You cannot do new mysql_connect, mysql_connect is a function and not a Class. Also please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.

Categories : PHP

facebook error : OAuthException, errorMessage: Error validating access token in android
In your code you are requesting the session for read session.openForRead(new Session.OpenRequest(this).setCallback(callback)); and passing the permission for write thats why the exception is occured.

Categories : Android

Parse error: syntax error, unexpected T_RETURN in C:wampwwwNu-Bioview_topic.php on line 77
What should this "return" do? Anyway it's wrong here and is your error at line 77. $res1 = return($mythisql); Solution: $res1 = $mythisql; or $res1 = mysql_query($thisql);

Categories : PHP

im getting this error in sql server 2008 : Error converting data type nvarchar to bigint
Your query is: SELECT @ResultValue = COUNT(id_tips) from tips,blood where blood_id = id_blood + @test ; You are adding a string value (@test) to whatever id_blood is. I imagine that it is a bigint and this is not allowed. It looks like you might be thinking dynamic SQL. But this is not how you code dynamic SQL. I would suggest that you talk to someone locally about the correct way to write stored procedures in SQL Server (or at least read the documentation on the select statement). Also, learn proper join syntax. Just say "no" to commas in the from clause.

Categories : SQL

Inserting Image into Azure blob -{"Error: Internal Server Error"} MobileInvalidOperationException
By default, Azure Mobile Services have "dynamic schema" enabled, which means that you don't really need to define the columns in your tables - as long as you insert data, it will "figure out" the appropriate type and create the column for you. But it needs to figure out which type to use. In your case, this is the request which will be sent to the service (pretty-printing of JSON added for clarity, in reality it's sent without unnecessary whitespaces): POST .../tables/TodoItem Content-Type: application/json { "text":null, "containerName":"todoitemimages", "resourceName":null, "sasQueryString":null, "imageUri":null } When this gets to the service for the first time, it knows that you're trying to insert columns such as "text", "resourceName", but since there is no va

Categories : Azure

ajax response error(XML Parsing Error: no element found Location: moz-nullprincipal)
I've this problem with request: $.ajax({ type: "POST", url: ajaxUrl, dataType : "json", contentType: "application/json", data: JSON.stringify(data), success: function (data) { ... } }); Accept header in request is: Accept application/json, text/javascript, */*; q=0.01 Response status is 200, but browser detect error and no success callback called Fixed by remove dataType : "json": $.ajax({ type: "POST", url: ajaxUrl, contentType: "application/json", ... The only difference that accept header in request changed to: Accept */* But now success callback is called.

Categories : Javascript

CHCSV Parser error: No known class method for selector 'arrayWithContentsOfCSVFile:encoding:error:'
The header from github appears to have no such method. Your choices appear to be: + (instancetype)arrayWithContentsOfCSVFile:(NSString *)csvFilePath; + (instancetype)arrayWithContentsOfCSVFile:(NSString *)csvFilePath options:(CHCSVParserOptions)options; Note that neither has an encoding: argument.

Categories : IOS

How to fix error "clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)"?
It looks like you only compiled main.cpp but not pattern.cpp. When it came time to link the executable together, functions defined in pattern.cpp won't be found. The undefined reference indicates your main.cpp is using pattern(int, int) somewhere. You can see why this becomes a problem if pattern.cpp is never compiled in. Try compiling with: clang++ -Wall -pedantic main.cpp pattern.cpp -o main

Categories : C++

Throw error in error function of $http causes $digest already in progress in unit test
The problem is that the mock $exceptionHandler service re-throws exceptions by default. So your exception is causing a $rootScope.$apply to be aborted in the middle. One solution is to switch the mock $exceptionHandlerProvider to 'log' mode and then check $exceptionHandler.errors. See here.

Categories : Unit Testing

How to solve internal error: retry receiver class not set yet and GCMBaseIntentService : SERVICE_NOT_AVAILABLE error
This is a known bug, If you get the error "internal error: retry receiver class not set yet," then you've got an older version of the client gcm.jar. This is the patch that fixes the error. Instead of patching your local version of GCMBroadcastReceiver.java in the Android SDK, you can download either the source or the updated gcm.jar file from the GCM repository. Link to Patch

Categories : Android

DELPHI ERROR : Multiple-step operation generater error. Check each status value
Ah... Finally I found what the cause of it. It lies on the "Field size" in Access and AdoQuery in Delphi. The field size for both is 50. When I change them to 255, whola.... the error is gone.... So based on my conclusion, the error for "Multiple-step operation generater error. Check each status value." for my case was caused by the FIELD SIZE... Thanks ^^

Categories : Delphi

How to solve error message about squirrel mail (ERROR: Connection dropped by IMAP)
Did you tried telnet to the server to port 143 try "telnet hostname _or_IP 143" Make sure that the entered E-mail account mailbox is exists in the server. Also make sure that the its MX is local domain if the domain points to the server in which you have installed squirrel mail. In case if its using remote MX then you need to use a domain that is having MX on the current server. dig +trace domain_name MX will show you the domain's MX record.

Categories : Misc

Using XMLHttpRequest object to PHP, responseText is correct array, but 500 error thrown. Cannot identify cause of error
The error seems like there is some file required which is not included, you can try this spl_autoload_unregister(array('YiiBase','autoload')); Yii::import('ext.PHPExcel.Classes.PHPExcel', true); spl_autoload_register(array('YiiBase','autoload')); Ref: 1) http://www.yiiframework.com/forum/index.php/topic/31998-problem-loading-phpexcel/

Categories : PHP

VS2008 error expected constant expression on declaring array, but no error for this code in GCC
The parameter const int size does not mean that size is compile-time constant. It simply means that in someFun, you cannot change the value of size. However, the value of size could be changed between different calls of someFun. Arrays in C/C++ need to have a size that is known at compile-time.

Categories : C++

Error: Database server connection limit exceeded in SQL Anywhere. Does this error has anything to do with calling dispose()?
Kevin brought up a good point in the comments. It's easiest to just put your connection in a using statement so it is automatically disposed of when not in use. // connectionString must be set up using (SqlConnection connection = new SqlConnection(connectionString)) { // Do stuff with connection to DB } You were wondering if Dispose needed to ever be called and if it would have an impact on user connection. Actually, the using statement calls Dispose() itself, as you can see here. "The using statement calls the Dispose method on the object in the correct way..." So, I believe your issue may be because your original way of opening/closing the connections left hanging connections. Instead, using the using statement, your connections will automatically be closed once the code leaves th

Categories : C#

Google Drive API 1.4 error : Error occurred while sending a direct message or getting the response
I was having the same problem. I got it working eventually; I had a few things wrong. I went to the Google Cloud Console and regenerated and downloaded my key file. Go to APIs & auth->Registered Apps. The ONLY properties I put in the provider object are .ServiceAccountId and .Scope. I had to replace Scope with the actual scope and not use the enum value (This is only a problem because I am using VB). I'm working in Fusion Tables and the scope was rendering as just "Fusiontables" because VB.NET does not use the GetStringValue() enum function. Now I'm using "https://www.googleapis.com/auth/fusiontables". Go here for a list of valid scopes. For the ServiceAccountId, I used the service account "Email address:" with the "@" in it. (12345@developer.gserviceaccount.com), and not the on

Categories : C#



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