|
The page shows up as blank in my browser.
Most companies had to add code to prevent people from automating the sign-up proces; it is the reason captcha's exist.
If what you are doing is a valid use-case, then the people from Sony will probably help out.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I updated the link, account.sonyentertainmentnetwork.com/home/index.action you have to click on the bottom button to register a new account, then click on Start and there is the site that I speak from.
|
|
|
|
|
That's something they don't want to automate or allow; good luck with the "I'm not a robot" test
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
The I'm not a Robot test pops now out, so the user can verify it and the program does the rest. Everything works now, used another site to create psn accounts. Problem solved by myself.
|
|
|
|
|
Have to agree; the whole thing stinks.
I heard 40 - 60% of all accounts are faked; you are part of the problem.
You're probabably not even from "Switzerland" (test.de).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Lol I do not have to prove anything to you. I am Swiss believe it or not
|
|
|
|
|
But you don't deny faking accounts?
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
If you mean the Account on codeproject, no I do not fake any accounts here, this is my only one. If you mean Sony then I won't say anything without my lawyer
|
|
|
|
|
Well, we know what you meant.
And I'll let Sony know you're interested ... considering their past experiences with your type.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have uploaded a C # ActiveX control inside an MFC ActiveX control.
The WebBrowser inside the C # ActiveX control does not communicate with the script.
Is there a solution?
|
|
|
|
|
Please do not post the same question in multiple forums.
|
|
|
|
|
OK. The .NET Framework side post has been deleted.
|
|
|
|
|
Yes. Since the user can "disable AciveX content", use something else.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I'm building a fraction application and I have recently fixed an issue with a divide by zero exception. However after fixing this problem, a whole new one arose, the problem I am having now is that the textbox in which the answer displays always states the denominator as 0 when it is supposed to show the reduced form.
The code for both is below and I appreciate any help or feedback
<pre>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Fractionapp
{
class Fraction
{
private int numerator;
private int denominator;
public Fraction()
{
numerator = 0;
denominator = 0;
}
public Fraction(int num, int den)
{
numerator = num;
Denominator = den;
Reduce();
}
public int Numerator
{
get
{ return numerator; }
set
{ numerator = value; }
}
public int Denominator
{
get
{
return Denominator;
}
set
{
if (value == 0)
{
throw new ArgumentOutOfRangeException("Denominator", value, "Denominator cannot be zero");
}
}
}
private void Reduce()
{
int GCD = 0;
for (int x = 1; x <= denominator; x++)
{
if ((numerator % x == 0) && (denominator % x == 0))
GCD = x;
}
if (GCD != 0)
{
numerator = numerator / GCD;
denominator = denominator / GCD;
}
}
public override string ToString()
{
return numerator + "/" + denominator;
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Fractionapp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnCalculateFraction_Click(object sender, EventArgs e)
{
{
Fraction fr2 = new Fractionapp.Fraction(Convert.ToInt32(txtNumerator.Text), Convert.ToInt32(txtDenominator.Text));
txtReduced.Text = "The lowest form of the inputted fraction is: " + fr2.ToString();
}
}
}
}
|
|
|
|
|
Hi,
you tricked yourself in this one. First some comments, as requested:
1.
property Denominator throws when the value is zero, yet without parameters you create a Fraction with denominator zero??? This should be 1 IMO.
2.
Inside Reduce() you apply a brute force approach by trying each and every possible common divisor. Rather than trying them all in ascending order, you should use descending order and stop as soon as you find one.
3.
Again, inside Reduce(), you also try divisor 1, which always will be a common divisor. Such test is unnecessary, and so is the if (GCD != 0) test, as GCD will be 1 or larger.
4.
In the setter half of Denominator you fail to set anything.
5.
Now check the casing inside your Fraction(int num, int den) constructor!
Please check why several of the above issues are relevant to your program's current symptom.
6.
When you fixed all of the above, then consider entering some negative numbers, and check whether your program fails for negative denominators; fix if necessary.
7.
Rather than using Convert.ToInt32() you should use int.TryParse() which takes a bit more code but offers an indication the text actually is/isn't representing a valid number, so you can act accordingly.
8.
Needless to say, there are much better algorithms to determine a GCD, e.g. Euclid's.
modified 13-Apr-18 22:11pm.
|
|
|
|
|
Thanks for the reply! I guess I'm just not understanding what you're explaining for comments 2, 3, 4. Comment 1 I was messing around trying to fix things (so the exception would fire and forgot to set it back to 1, that's been fixed). If I change the D to a d in the 2 parameter constructor it works perfectly just doesn't fire the exception. Yet changing the d to a D causes any number entered in the denominator box to show as a zero in the answer box. I'm trying to understand why this happens and the code to fix it (has to be simple), I'm a complete coding novice so I don't really understand this without visuals.
|
|
|
|
|
a line
denominator=value;
is missing!
|
|
|
|
|
Hah! I guess that's what I get for copying and pasting, I've got this in like 3 different files (don't ask), one of the programs must've had that line missing and I copied from it, thank you though!
|
|
|
|
|
Rather than using brute-force to find the GCD, you should consider using the Euclidean algorithm:
function gcd(a, b)
while b ≠ 0
t := b;
b := a mod b;
a := t;
return a;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
I'm displaying data from a stored procedure in excel, columns which have null values in database are displayed
#VALUE! in Excel, what should i do so that i can display them as blank cells?
thanks
|
|
|
|
|
|
|
Hello,
I found a way to resolve this, it is just about adding a test on the value i want to display, i added a test if it is null, i affect an empty string to it, below my code:
<pre> for (int j = 0; j <= rows - 1; j++)
{
var rowItem = dt.Rows[j].ItemArray;
for (int k = 0; k <= rowItem.Length - 1; k++)
{
if (String.IsNullOrEmpty(rowItem[k].ToString()))
allRecords[j + 1, k] = string.Empty;
else
allRecords[j + 1, k] = rowItem[k];
}
}
Thanks ,
|
|
|
|
|
So I very recently started learning my first coding language at college, which is C#, i have an assignment in for Tuesday and cant for the life of me figure out how to complete one of the tasks it asks of me. The task is as follows:
"Write example program code that demonstrates the use of a function that calculates and returns the mean average of 5 values that are passed to it."
If anyone could walk me through what to do or give me some example code as to how they would approach this task then that would be most appreciated.
(I'm using VisualStudio)
|
|
|
|
|
This weekend would be the best time to start learning in C# functions.
To jump start, create a new project in visual studio and choose C#->Windows->Console Application.
class Program
{
static void Main(string[] args)
{
decimal[] values = new decimal[] { 1, 2, 3, 4, 5 };
decimal result = MeanAvg(values);
}
static decimal MeanAvg(decimal[] values)
{
decimal result = 0;
return result;
}
}
|
|
|
|