Hi,
We are developing a product in C#.Net. We would definately not like our product to be copied easily across machines (in short pirated). For that purpose can anybody suggest using a 3rd party tool or a home grown solution.
What are the pros and cons of each.
One negative about home grown solution is that the cost involved in creating one from scratch.
Can somebody comment on the technology to be used for licensing as .Net can be decompiled.
Hello everyone,
I would like someone to explainme what _forward is exactly doing, I cannot see if _forward is also rendering the attached view to the action or just executing the action.
Also is it possible to pass argument to $this-action in a view script ?
More generally my problem is how to code a confirmation page, let's say the user input some stuff and you want to show him confirmation, is forward is mean for that case ?
Thanks
Ok so I'm lost here, frustrated and pulling my hair and out. Plus probably about to be fired or take a pay cut.
I moved Files from a development server to my local machine. The files are consistent (used diff tool), all the dependencies are there. It works for the most part. The problem is that the some of the javascript (not all) is just not working. We're using jquery and a lot of plugins for it. I've checked with the web developer plugin in firefox and all the js files are loading. I cleared the cache in both firefox and chrome multiple times to no avail. The development server is a windows server running wamp. My local machine is running ubuntu. Somebody tell me what I missed.
hi,
i have a value like that
var myvalue=myfunction(1,2);
what I need is that
GETTING myfunction(a,b) as a string..
I mean not "myfunction's value"
hmmm, let meexplain,
myfunction(1,2) returns 1+2=3
if I type
alert(myvalue)
it returns 3
but I need myfunction(a,b) AS IT'S TYPED when I use alert. NOT IT'S VALUE
think it like
var myvalue='myfunction(a,b)'
now, if i use Alert, it gives me myfunction(a,b)
how can I do that?
RestClient.post("auth/login/", loginparam, new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String s) {
Toast.makeText(getApplicationContext(), String.valueOf(s.toLowerCase().equals("ok")), Toast.LENGTH_LONG).show();
if (s.equals("ok")) {
startActivity(new Intent(getApplication(), HomeActivity.class));
}
}
});
This is the code I used for login in android app, In the Toast text, I can see the server did returned "ok", but s.equals always failed in my case, can someone explain that? Thank you.
I have two tables: comments(id(primary key), author, ip(index)) and visitors(id(primary key), date_time, ip(index))
I want to join them like that:
SELECT visitors.date_time
FROM comments
LEFT JOIN visitors ON ( comments.ip = visitors.ip )
WHERE comments.author = 'author'
LIMIT 10
It works, but very slow.. In EXPLAIN it shows that it doesn't use the index on the visitors table:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE comments ref author author 78 const 9660 Using where
1 SIMPLE visitors ALL NULL NULL NULL NULL 8033
Any ideas? Thanks!
I don't mean to start a holy war here, but I cannot fathom why would anybody use Visual Basic for a new project.
Can you explainme why is it used? What new applications (which a lay person may be familiar with) have been developed in it? Why is it chosen over other languages?
Thanks.
I'm trying to figure out how to use Zend_Db_Table_Abstract correctly. I want to return just the name column from my query. Can you please explain what's wrong with the following code?
class Model_DbTable_Foo extends Zend_Db_Table_Abstract
{
protected $_name = 'foo';
public function getFooById($id) {
$select = $this->select(true)->columns('name')->where('id=' . $id);
$row = $this->fetchRow($select);
print_r($row->toArray());
}
}
I have a database with some images. Could anyone explainme how I could load an image in a JSF page?
I already have a managed bean that converts an Image object into a streamcontent. This streamcontent is called from the page in a tag <h:graphicImage>, but when I check the source code of the page, there's no src where the image could be loaded.
Hi All,
Is it necessary to decorate custom objects with [DataContract] and [DataMember] when using shared assemblies (as opposed to auto proxy generation)?
The reason I ask is that I have encountered the following scenario:
Suppose the following object is implemented in my service:
public class baseClass
{
Guid _guid;
public baseClass()
{
_guid = Guid.NewGuid()
}
public Guid ReturnGuid { get {return _guid;}}
}
public class newClass : baseClass
{
int _someValue;
public newClass {}
public int SomeValue
{
get {return _someValue;}
set {_someValue = value;}
}
}
[ServiceContract]
public IService
{
[OperationContract]
newClass SomeOperation();
}
In my client (with shared assemblie) I can happily recieve and use a serialized newClass when SomeOperation is called - even though I have not marked it as a DataContract.
However, as soon as I do mark it with DataContract and use DataMember then it complains that set is not implemented on ReturnGuid in the base class.
Could somebodyexplain why it works fine when I do not decorate with DataContract and DataMember.
Many thanks.
One of my upper classmen has gave me a data set for experimenting with vlfeat's SIFT, however, her extracted SIFT data for the frame part contains 5 dimensions. Recall from vl_sift function:
[F,D] = VL_SIFT(I)
Each column of D is the descriptor of the corresponding frame in F. F normally contains 4 dimensions which consists of x-coordinate, y-coordinate, scale, and orientation.
So I asked her what is this 5th dimension, and she pointed me to search for "standard oxford format" for sift feature.
The thing is I tried to search around regarding this standard oxford format and sift feature, but I got no luck in finding it at all. If somebody knows regarding this, could you please point me to the right direction?
What is the difference between Java Build Path - Add External JARs Button and Add Variable Button Functionality,
Why its required. Please explain in detail.
A friend of mine came to me with this strange behavior which i can't explain, any insight view would be appreciated.
Im running VS 2005 (C# 2.0), the following code show the behavior
int rr = "test".IndexOf("");
Console.WriteLine(rr.ToString());
the above code, print "0" which clearly show it should have return -1
This also happen in Java where the following Class show the behavior:
public class Test{
public static void main(String[] args){
System.out.println("Result->"+("test".indexOf("")));
}
}
Im running Java 1.6.0_17
HELP! For some reason when I create a custom edit or display form, all the lookup fields are showing in a weird way or not showing any value at all, can someone explain to me how I am suppose to fix that, I know it has something to do where it say select="@value" in the display form.
Please help me out.
Thank you.
I have made a java application that allows a user to choose from certain standards and then allows him to customize those standards according to his needs. Now, the customization [via a swing application] that has been made needs to be persistent. For this we use a database [mysql/access] and hook it to the application so that with each customization made, a table [if non-existent] is created [thus making it runtime and we can not pre-determine the table names or the keys of table etc] and an appropriate entry in the table is made.
I have written the driver for this connection.
How do I call it in the java application and what approach should I take?
I would much appreciate that if somebody can refer me some example that not only shows a sample connection being made via driver but its appropriate calls to the database as well so that i can use it as a guide.
A moderator of a forum i own did so. I still can't belive on it, and i can't understand how he did it. Can someone explain me?
He said he used only HTTP GET requests.
Thanks
I had never noticed the __path__ attribute that gets defined on some of my packages before today. According to the documentation:
Packages support one more special
attribute, __path__. This is
initialized to be a list containing
the name of the directory holding the
package’s __init__.py before the code
in that file is executed. This
variable can be modified; doing so
affects future searches for modules
and subpackages contained in the
package.
While this feature is not often
needed, it can be used to extend the
set of modules found in a package.
Could somebodyexplain to me what exactly this means and why I would ever want to use it?
We currently have a XAP file which contains Foo.dll, and another XAP file (with a completely different name) which contains an updated version Foo.dll (but the same version number).
When we run the second XAP file, it looks as though the Silverlight runtime on the client, is picking up the old version of Foo.dll from the first XAP file.
Anyone know where the Silverlight runtime unzips the xap file before running its content? Or if the runtime executes on a single app domain which could explain these errors?
In my database we have fields where the data is not readable. I now know why it happened but I don't know how to fix it.
I found a way to get the info back from the database:
SELECT id,
name
FROM projects
WHERE LENGTH(name) != CHAR_LENGTH(name);
One of the rows returned shows:
id | name
-------------------------
1008 | Cajón el Diablo
This should be:
id | name
-------------------------
1008 | Cajón el Diablo
Can somebody help me figure out how to fix this problem? How can I convert this using SQL? Is SQL not good? If not, how about Python?
When using MySQL 5.1 Enterprise after years of using other database products like Sybase, Infomix, DB2; I run into things that MySQL just doesn't do. For example, it can only generate an EXPLAIN query plan for SELECT queries.
What are the other things I should watch out for?
Hello,
Could you please explainme, how do templating engines in JavaScript work? Thank you.
JSON
{ "color" : "red"}
Template
<strong><%=color%></strong>
Result
<strong>Red</strong>
I know 'this' can be a problem when you don't understand Javascript well but this one got me a little puzzled.
var ControlTypes = {
TextBox: function () {
console.log(this);
this.Name = "TextBox";
console.log(this);
}
}
ControlTypes.TextBox();
Firebug gives the following result:
Object {}
Object { Name="TextBox"}
The first object is ControlTypes and the second one is Textbox. Could anybody explain the behavior behind this?
Hy guys sorry for this post but i need help with my application, i need optimize my view. I have 5 models, how i can do this?
def save(request):
# get the request.POST in content
if request.POST:
content = request.POST
dicionario = {}
# create a dict to get the values in content
for key,value in content.items():
# get my fk Course.objects
if key == 'curso' :
busca_curso = Curso.objects.get(id=value)
dicionario.update({key:busca_curso})
else:
dicionario.update({key:value})
#create the new teacher
Professor.objects.create(**dicionario)
my questions are?
1 - How i can do this function in a generic way? Can I pass a variable in a %s to create and
get? like this way ?
foo = "Teacher" , bar = "Course"
def save(request, bar, foo):
if request post:
...
if key == 'course' :
get_course = (%s.objects.get=id=value) %bar
...
(%s.objects.create(**dict)) %foo ???
i tried do this in my view but don't work =/, can somebody help me to make this work ? Thanks