|
zebra88 wrote: Error 27 File 'log4net.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86' C:\Users\user\Documents\Visual Studio 2010\Projects\WindowsFormsApplication3\Insurance Management Setup\Insurance Management Setup\Insurance Management Setup.vdproj Insurance Management Setup
Why this is happening is described in the error message: you are trying to deploy the AMD (AMD64) targeted dll against a Generic x86 (x86) application.
zebra88 wrote: What is the solution ??
Personally, I'd start by downloading the Log4Net Source and building alongside the app so it always builds against the same version as the app. You could also get the generic version of the dll and deploy that, but as you require 32-bit deployment as well it might get messy.
As for 32/64 bit deployment, the simplest thing to do is to set up both 32 and 64 bit versions of your build configuration and swapping to produce 32 and 64-bit versions of your MSIs. You could also consider two installer projects for each, but it depends on your circumstances. If you want a single installer where the user chooses which version as part of the installation process, then that is beyond my ken I'm afraid.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
Hi all ,
I'm creating MVC4 controller that accepts Uri as parameter from the caller (wrapped in the AppMessage class with other info ) , this uri represents callBack link (WCF service / web page/ ) so this link is used to send the success of execution block of the controller body . I want the client to be notified so he can perform some acts when this confirmation is recieved by the requested uri .
public class AppMessage
{
public Uri CallbackUri { get; set; }
public string data1 {get;set;} ....
}
and the controller looks like
public ActionResult Send(AppMessage message)
{
NotifyByURi(message.Uri)
}
I would love to hear what is the best way to implement such thing (Web service deuplix communication / SignalR .... what else ?)
|
|
|
|
|
Has anyone done any programming around a Symbol Scanner, specifically an LS4208? What I am looking to do is remotely program the scanner so our system techs won't have to use the paper guide to program them. I have the SDK, and have a ruff idea about how to do it. However, I can't seem to find the attribute to set the scanner to USB IBM Hand-held. Does anyone happen to know which attribute this is?
Thanks,
|
|
|
|
|
Your best bet is to ask this question on the support forums for that product. It's highly unlikely that anyone here just happens to have knowledge of that particular product in that level of detail.
|
|
|
|
|
I've worked with Symbol scanners, but don't remember the specifics you are talking about. All I can say is to check the SDK docs (since contacting Motorola generally gets you nowhere.) One my former employers, Wavelink, makes awesome software to do what you want.
|
|
|
|
|
Im trying to create a program where there are two files for two separate classes.. after the user enters the course they want to show the grades and students name of the program searches through that file and gets all the students averages for each category then prints the final grade at the end. Right now I'm getting an error for "unexpected symbol public"on line 17 and "unexpected symbol }" at line 101
using System;
using System.IO;
namespace IntroCS
{
class GradeFiles
{
public static void Main(string[] args)
{
public static int codeIndex(string code, string[] categories)
{
string fileName = UIF.PromptLine ("Please enter the comp course with no spaces: ");
string categoryFileName = "categories_" + fileName + ".txt";
var reader = new StreamReader (categoryFileName);
string input = reader.ReadLine ();
string[] category = input.Split (',');
for (int i = 0; i < category.Length; i++)
category [i] = category [i].Trim ();
input = reader.ReadLine ();
string[] weights = input.Split (',');
for (i = 0; i < weights.Length; i++)
weights [i] = weights [i].Trim ();
input = reader.ReadLine ();
string[] number = input.Split (',');
for (i = 0; i < number.Length; i++)
number [i] = number [i].Trim ();
string studentFileName = "students_" + fileName + ".txt";
var reader2 = new StreamReader (studentFileName);
while (!reader2.EndOfStream) {
string student = reader2.ReadLine ();
int[] totalGrade = new int[category.Length];
string [] studentData = student.Split (',');
string studentFile = ("studentData[0]" + fileName + ".data");
var reader3 = new StreamReader (studentFile);
}
while (!reader3.EndOfStream) {
string grade = reader3.ReadLine ();
string [] gradeValue = grade.Split (',');
}
for (int i = 0; i < category.Length; i++) {
if (category [i].Trim ().StartsWith (code)) {
return i;
}
}
return -1;
{
int totalGrade = 0;
for (int i = 0; i < totalGrade.Length; i++){
totalGrade[i] = totalGrade[i]/number[i]*weights[i];
}
{
int totalGradeScore = 0;
int weightScore = 0;
for (int i = 0; i < totalGrade.Length; i++){
totalGradeScore += totalGrade [i];
weightScore += weights [i];
}
int avg;
avg = totalGradeScore/weightScore;
//writer.WriteLine avg = totalGradeScore/weightScore;
writer.WriteLine(avg);
writer.Close();
return avg;
}
}
}
}}}
|
|
|
|
|
1 using System;
2 using System.IO;
3
4 namespace IntroCS
5 {
6 class GradeFiles
7 {
8
9 public static void Main(string[] args)
10 {
11
12
13
14
15
16
17 public static int codeIndex(string code, string[] categories)
18 {
You've declare a method on line 9, it's body starting on line 10. Line 17 is a new method; you can't put a method in another method. Put a "}" on line 12, and call your method on line 11
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
1. class a{
public int add(int x)
{
return x;
}
}
2. class b {
public double add(int x, int y, int z)
{
return x+y+z;
}
}
m little confused about overriding and overloading
can anyone tells wht happn in the above methods is it overloading or overriding????
|
|
|
|
|
Arun kumar Gautam wrote: it overloading or overriding????
According to the code you have neither.
Polymorphism (search for overridden methods)[^]
Overloading[^]
The first would require one class to subclass and have a method with the same name AND input parameters (and the virtual/override keywords in c#). The second requires two methods with the same name but different input parameters (these can be in the same class or inheritance hierarchy). If b subclassed a or vice versa add would be overloaded, but there would be no overriding.
Perhaps you copied the code from the question down incorrectly?
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
Override is when a class will "override" or implement it's own version of a method in a parent class.
Overload is when the same named function has different signatures. In your example, if both add functions were in the same class it would be overloaded.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
but according to the concept of overloading the number of parameters and data type of parameters in two functions must have to be different
and according to the concept of overriding the number of parameters and datatype of parameters must have to be same in two functions
so i think if the number of parameters and data type of parameters are different of two functions than it must be the overloading so it doesnt matter whether these two function are in same class or in derived class
|
|
|
|
|
Arun kumar Gautam wrote: but according to the concept of overloading the number of parameters and / or data type of parameters in two functions must have to be different
You've missed other important characteristics: The method must be have the same name (for both overloading and overriding).
Overloading happen when you have methods with different parameters, with or without a subclass/superclass but both methods need to be in the same class hierarchy (including the same class - which has a hierarchy of 1). Neither of your add methods do this as they they are in unrelated classes, so you don't have overloading.
Overriding requires class hierarchy where a method supersedes (overrides) it's equivalent (i.e. having same name, parameters) in class higher up in the hierarchy. As you don't have any subclassing/super classing you can't have overriding in your example.
So that takes us back to your original question. Either you have copied the code across incorrectly, or the questioner doesn't know what they are doing/has made a mistake (which is a real possibility, I'm not being facetious).
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
1. class a{
public int add(int x)
{
return x;
}
}
2. class b:a {
public double add(int x, int y, int z)
{
return x+y+z;
}
}
sorry now can u help me for clearing my doubt.... is it overloading or overriding...????
|
|
|
|
|
Arun kumar Gautam wrote: class b:a
That makes all the difference.
b.Add overloads a.add as:
- Both methods are available from type
b . - Both methods have the same name
b.add has a different input signature
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
thnks for answer it make my concept completely clear.... thnks for this
|
|
|
|
|
No Problem.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
Overloadings can be overridden, but that requires inheriting a class/interface that already has the overloadings defined. You can also overload without inheriting from another class. However to Override you need to inherit from another class that already has the method with a signature defined.
|
|
|
|
|
I'm using "user" level settings to store the configuration of my application (main form size / position, user selected display options etc.) I can save changes using:
Properties.Settings.Default.Save();
This is all well and good, however at any opportunity the system creates a new file with the default setting vales. So on a development PC I get different settings for debug and release versions of the application, different settings for different users and the biggest problem the default setting every time the application version number is changed!
Is there anyway to specify the file name / path used for the users settings so that I can have just one file on each machine and so that the users does not have to re-configure the application every time the software is updated.
James
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/system.configuration.applicationsettingsbase.upgrade.aspx
|
|
|
|
|
Upgrade is of no use.
It does no allow you to specify one file for all users / copies of the application.
It also sets all of the properties back to their defaults every time the application runs.
|
|
|
|
|
1) Why would you have a single configuration file for every user? Windows is a user based OS. Every user should be able to configure the application how they like. You have default common options like paths and stuff, but layout, window positions, usernames / passwords are all unique to a user.
2) The .config file goes in a directory in the user application data folder. So each user gets their own copy.
3) The path to the .config file is based on the executing EXE as well as the version #, so if you change the EXE (i.e. running in the debugger) or the version #, you'll get a different folder and thus the options will be "reset"
4) The Upgrade method will handle a version # change, it will not handle the EXE change or user change.
|
|
|
|
|
We provide turn-key systems, where several users may use the product on a single PC. They MUST all have the same configuration (customised for each site) each site will have several PCs with the software each configured the same so any user can use any computer.
It would be good to have the config file on a central server accessed by all PCs, an alternative (for some sites) will be a single configuration on each PC as "supervisor" positions need a different configuration.
|
|
|
|
|
I think you are confused about the various types of settings.
There are USER SPECIFIC settings which are, you guessed it , specific to each user. These are things like window layouts, fonts, colors, option checkboxes, usernames, passwords, etc.
There are also APPLICATION SPECIFIC settings which are global application settings. These may OR MAY NOT be changed by the user.
It sounds like you are trying to jam APPLICATION SPECIFIC (that may NOT be changed) into the USER SPECIFIC settings infrastructure which is why you are not liking the result.
Use the application specific / read-only infrastructure instead. Store your configuration settings in the app.config file. Configuration \ AppSettings.
|
|
|
|
|
The settings need to be changeable via the application (so can't be application specific). They need to be in effect a mid point between application and user specific (computer specific?). It seams so simple years ago a simple .ini file would do this, even they registry can do this (though in a far more complex way) and now with .net you can't. It looks like a big step in the wrong direction yet again by microsoft with them trying to stop users (and programmers) being able to use their computers how they want.
|
|
|
|