I'm using S3 in this application for uploaded files, as Heroku has a read-only filesystem. How can I give my s3.yml to Heroku, but avoid checking it into the main repository?
If I have some php classes inside a namespace com\test
and want to import all of them into another php file how can do that?
use com\test\ClassA
use com\test\ClassB
...
use com\test\* give me syntax error.
Good day!
Despite the fact LINQ2SQL and ADO.NET Entity Framework exists there were situations when I need to revert to plain old DataSet (not typed) and friends.
While writing SQL for SqlCommand:
Is it needed to quote field and table names with []?
Is it good to prefix table names with [dbo]
I use to use this syntax:
SqlCommand command = new SqlCommand("SELECT [Field1], [Field2] FROM [dbo].[TableName]", connection);
May be there is a better way?
Thanks in advance!
Hi
I am using jquery and I got a couple plugins that don't offer a minified version. So I want to take the full version and minfiy it but all the sites I have found that you input your javascript and it minifies it breaks the plugin.
Like it must strip something out because I get a syntax error.
So anyone got a good one that I can use?
I'm interested in writing an x86 assembler. I'm wondering what is a good way to map x86 assembly mnemonic instructions (using an Intel-like syntax) into the corresponding binary machine code instructions.
Hi I'm trying to run a WordPress plugin and I get the following error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /nfs/c03/h05/mnt/52704/domains/creathive.net/html/wp-content/plugins/qr-code-tag/lib/qrct/QrctWp.php on line 13
What would be the problem here? Line 13 is the public bit
EDIT: Here is some code:
class QrctWp
{
public $pluginName = 'QR Code Tag';
I can't seem to find any info on this... when will ruby 1.8.6 be 'retired'? ruby 1.8.7 is much more functional while maintaining syntax compatibility, and ruby 1.9.1 is significantly better all around... any idea when 1.8.6 will be retired?
I have an iPhone app that I have started to turn into a universal app, however the process is not complete and I want to release an update to the iPhone version.
I know that you can specify device capabilities in the Info.plist file to restrict your app to certain devices, but how can I do this to prevent the unfinished universal version from appearing in the iPad store?
Is checking the LSRequiresiPhoneOS BOOL entry (in the Info.plist file) enough?
Thanks!
Hello,
I'm running into a scenario where at random times I am getting "Access Denied" when executing javascript. It is not repeatable and occurs in random places of my application. There is not indication of what is causing it in the logs and I'm really at a loss on this. It seems to be UI problem only. However, there is no reason it should appear as I do not have any such permission checking to could be getting triggered.
Thanks in advance
hi
param can be one
of the following
a,b, f,d
a, b, c,e
r , q ,c , d
but we want a,b,c,d without spaces
for example if we get: a , b ,c,d
need to change it to a,b,c,d
sytax to do that
yael
what the best sed syntax to change it
Paperclip produces this error, after checking out the plugin's rails3 branch.
My Gemfile has following line:
gem 'paperclip', :git => 'http://github.com/thoughtbot/paperclip.git', :branch => 'rails3'
And the error message is:
NoMethodError: undefined method `has_attached_file' for #<Class:0x2a50530>
I want to use sqlite memory database for all my testing and Postgresql for my development/production server.
But the SQL syntax is not same in both dbs. for ex: SQLite has autoincrement, and Postgresql has serial
Is it easy to port the SQL script from sqlite to postgresql... what are your solutions?
If you want me to use standard SQL, how should I go about generating primary key in both the databases?
Hi there Iam using asp.net mvc to do model binding, when I pass a model to a view, I am able to see the model data displayed in the form inside a label,
<%= Html.Label(Model.title) %
<%= Html.Label(Model.description) %
however, I am not able to do the same using
<%= Html.TextArea(Model.description)%
is there a syntax difference between displaying in a label as oppsed tp a textbox
In this JDO, why is .class needed here?
Query averageSalaryQuery = pm.newQuery(Employee.class);
I would prefer to write this more concise syntax if possible?
Query averageSalaryQuery = pm.newQuery(Employee);
I want to create a Class, say MyDiv, which inherits from the original DOM DIV element.
Later in my code I would like to use it like that:
$('a-container').adopt(new MyDiv('my own set of params'));
I am missing the exact syntax to do it.
I need to programatically encrypt a directory of files, like in a .zip or whatever. Preferably password protected obviously.
How can I accomplish this, and WHAT IS the BEST encryption way to do it, if applicable?
Programming language doesn't matter. I am dictioned in all syntax.
If you look at the following line of python code:
bpy.ops.object.particle_system_add({"object":bpy.data.objects[2]})
you see that in the parameters there is something enclosed in braces. Can anyone tell me what the braces are for (generically anyway)? I haven't really seen this type of syntax in python and I can't find any documentation on it.
Any help is greatly appreciated. Thank you.
Since the advent of AS3 I have been working like this:
private var loggy:String;
public function getLoggy ():String
{
return loggy;
}
public function setLoggy ( loggy:String ):void
{
// checking to make sure loggy's new value is kosher etc...
this.loggy = loggy;
}
and have avoided working like this:
private var _loggy:String;
public function get loggy ():String
{
return loggy;
}
public function set loggy ( loggy:String ):void
{
// checking to make sure loggy's new value is kosher etc...
this.loggy = loggy;
}
I have avoided using AS3's implicit getters/setters partly so that I can just start typing "get.." and content assist will give me a list of all my getters, and likewise for my setters. I also dislike underscores in my code which turned me off the implicit route.
Another reason is that I prefer the feel of this:
whateverObject.setLoggy( "loggy's awesome new value!" );
to this:
whateverObject.loggy = "loggy's awesome new value!";
I feel that the former better reflects what is actually happening in the code.
I am calling functions, not setting values directly.
After installing Flash Builder and the great new plugin SourceMate ( which helps to get some of the useful features that FDT is famous into FB ) I realized that when I use SourceMate's "generate getters and setters" feature it automatically sets my code up using the implicit route:
private var _loggy:String;
public function get loggy ():String
{
return loggy;
}
public function set loggy ( loggy:String ):void
{
// do whatever is needed to check to make sure loggy is an acceptable value
this.loggy = loggy;
}
I figure that these SourceMate people must know what they are doing or they wouldn't be writing workflow enhancement plugins for coding in AS3, so now I am questioning my ways.
So my question to you is: Can anyone give me a good reason why I should give up my explicit g/s ways, start using the implicit technique, and embrace those stinky little _underscores for my private vars? Or back me up in my reasons for doing things the way that I do?
Hi,
this is probably a very stupid question; in a bash script, given the output of, for instance;
awk '{print $7}' temp
it gives 0.54546
I would like to give this to a variable, so I tried:
read ENE <<< $(awk '{print $7}' temp)
but I get
Syntax error: redirection unexpected
Could you tell me why, and what is the easiest way to do this assignment?
Thanks
Hi
How can I add new function names for .c and .h files to be highlighted, similar to this
http://stackoverflow.com/questions/2464593/custumizing-syntax-highlighting-in-vim but much easier? (as I don't need to color words in
different colors, only in the default color for keywords as defined by my theme).
I need this to add highlighting for function names in a project written in C which has a clearly defined API.
Thanks
I know there are duplicate account numbers in this table, but this query returns no results.
SELECT [CARD NUMBER],[CUSTOMER NAME],[ACCT NBR 1],[ACCT NBR 2],
COUNT([ACCT NBR 1]) AS NumOccurences
FROM DebitCardData.dbo.['ATM Checking Accts - Active$']
GROUP BY [CARD NUMBER],[CUSTOMER NAME],[ACCT NBR 1],[ACCT NBR 2]
HAVING (COUNT([ACCT NBR 1])1)
In postgres I have a table with a varchar column. The data is supposed to be integers and I need it in iteger type in a query. Some values are empty strings.
The following:
SELECT myfield::integer FROM mytable
yields ERROR: invalid input syntax for integer: ""
How can I query a cast and have 0 in case of error during the cast in postgres?
In MSAcess Database
Insert query to insert the character------ N'tetarnyl
i have a insert query
OleDbCommand cmd = new OleDbCommand("insert into checking values('" + dsGetData.Tables[0].Rows[i][0].ToString() + "','" + dsGetData.Tables[0].Rows[i][1].ToString()+ "')", con);
but it is showing me error...
syntax error (missing operator) in query expression
any idea??? how to write insert query to insert the N'tetarnyl (including apostrophe)
I am working on a secure web site, that will allow the user to register their computer, to avoid answering the primary security questions.
Is this just placing a cookie on their machine, and checking to see if the cookie exists?
Or do I need to retrieve the client machines ID data?
Hi,
I am running few tasks in my linux console and want to be notified by some kind of alarm, so I don't keep checking the progress of the task. Is there a way to customize the alarm by specifying additional filters like "ERROR" message etc..I think it will be a useful thing to have. Anyone aware of such functionality in linux?
Thank you
Bala