0

If you look at the call()

else
    strassenMatrixMultiplication(A,B);
return C;

Nothing is being done with the result of strassenMatrixMultiplication(A,B).

All your P# = future#.get()'s are 0.

A few general remarks:

  • Variable names should be lower case in Java, uppercase implies Objects.
  • Always use { and } in if/else statements and loops to improve readability and avoiding mistakes, even if it's only one line.
  • When you have to declare 7 different P's you're probably hard coding too much (and should use collections), although in this particular case it might make it easier to follow. Keep it in mind though.
0

I don't know why it does that. You can try checking the content of pathItems and see if it actually contains anything, but I don't know if you can do that from within the program you're writing the script in. I have no experience in writing scripts with Adobe.

1

Not a functional language, but Prolog is pretty cool.

hanoi(1,FROM,TO,_) :- write('disk from '),
                      write(FROM),
                      write(' to '),
                      write(TO),
                      nl.
hanoi(N,FROM,TO,X) :- N > 1,
                      NMIN1 is N - 1,
                      hanoi(NMIN1,FROM,X,TO),
                      hanoi(1,FROM,TO,_),
                      hanoi(NMIN1,X,TO,FROM).
hanoi(N) :- hanoi(N,a,c,b).

Would solve the tower of hanoi problem for any number of disks. You would run it with a command like:

hanoi(3,left,right,center). 

And it would print:

disk from left to right
disk from left to center
disk from right to center
disk from left to right
disk from center to left
disk from center to right
disk from left to right

true

Its true power however lies in generation. Like generating a sudoku (live example) in what's technically 3 lines.

Votes + Comments
Remember Borland and all the compilers they had? Prolog was one of them.
2

Change var fillrmv = curDoc.pathItems[0]; to var fillrmv = curDoc.pathItems; because you want it to be all the items and not just the first one. And change for (i=0;i>fillrmv.length;i++) { to for (i=0;i<fillrmv.length;i++) { because you want it to run for all the items (< instead of >).

Votes + Comments
Patience +1 :)
0

Yes, but, from that page:

All it takes is the right configuration (to send mail using a local or a remote server)

So make sure that you include those configurations when you notify your tutor. Or it won't work on their machine.

You don't need PEAR (it only makes things easier and has more options) but you do need to specify an SMTP if you're running your page from localhost. If you're running it on an online host it will depend on their settings.

0

Well even the official PHP mail page makes references to the PEAR package and encourages its use. Down in the comments there are some people who tinker with the php.ini and sendmail.ini to get it to use google smtp, but your tutor wouldn't have those either. If possible I would try to send him/her the entire package of your code, including any libraries.

1

Correct me but isn't that what the code is doing ?

It's not.

if (app.activeDocument.pathItems[0].filled.length == true) {

This is saying, if the length of the "array" of the filled property (which might be an array according to JS, it doesn't know better) equals true, then execute the statement. If that length happens to be 1 (which it is because it's not an array and only has 1 element) the statement will be true because in JS 1 equals true. It basically becomes if (1 == true) {.

for (i=0;i>fillrmv;i++) {

This literally means: start with a variable i that equals 0. As long as i is larger than fillrmv (which is a boolean value mind you) then keep increasing i with 1.

var fillrmv = curDoc.pathItems[0].filled = false;

Here you are saying that fillrmv should be set to the value of curDoc.pathItems[0].filled which should be set to false;
So you are setting the first element's filled property in curDoc.pathItems to false. But fillrmv is also set to false.

I think the main issue here is that JavaScript is very "relaxed" when it comes to variables. In other languages you would get errors that help you out, but JS allows for a lot of weird things. You normally can't put a boolean in a for loop, comparing a number to a boolean usually results in a mismatch. However, JS just assigns a truth value to the number (using vague rules that are very difficult to understand, hence the video) ...

0

Not so much what you're doing wrong is explained in the videos but why it doesn't blow up when you do that. Because in most languages it will blow up and won't let you do that.

What I'm doing wrong

I think the start of your issue is this bit:

var fillrmv = curDoc.pathItems[0].filled = false;

It's pretty much always a bad idea to assign variables this way. In JavaScript it's sort of ok, because here there are no references, but in a lot of languages this would mean that fillrmv is a reference to filled which is set to false. If you then changed filled to true you'd expect fillrmv to stay false (and in JavaScript it does) but it would actually refer to filled and be true.

and set each object in the array to false

In order to do that you'd set fillrmv to the length of the pathItems array. Then inside your for loop you would say something like:

curDoc.pathItems[i].filled = false;

You can retrieve the length of an array by calling the length property. For instance:

var arr = ['one', 'two', 'three'];
for (var i = 0; i < arr.length; i++) {
    arr[i] = 'changed_'+i;
}

Edit: Keeping my answer slightly on the vague side because it looks a bit like homework, if it's not let us know.

1

if (app.activeDocument.pathItems[0].filled = true) {

A single = is used to assign a value, a double == or triple === is used to check a value. So basically in this statement you are assigning true to filled instead of checking whether filled is true.

Also, in your for loop for (i=0;i>fillrmv;i++) { you are saying to continue as long as i is larger than fillrmv, but in var fillrmv = curDoc.pathItems[0].filled = false; you're assigning a boolean value to fillrmv. This is where "silly" JavaScript kicks in. Under water it's assigning truth values to things. If you ask JavaScript "is 1 larger than false" it will say "yep". If you ask it "is 1 smaller than false" it will say "nope". (because '0' is 'falsy' and '1' is 'truthy' and true is "larger than" false)

For a good laugh I recommend this (slightly dated) video about some funny quirks JavaScript has.

For an explanation on why JavaScript is so quirky I strongly suggest this video.

One of the things it explains is why, in JavaScript, this:

function() {

}

...is the only correct way and this:

function()
{

}

is a wrong way.

And many more things that are just a little different in JavaScript.

1

I don't any edit button on the post?

If you could edit it would still be a risk. Google will have indexed the page by now so people can still view the cached versions. If it's a database that's runned by the university maybe contact someone from tech support and see if they can change the password for you.

3

You can't send e-mail from localhost without an smtp server running and a lot of (free) hosts have it disabled by default. The free ones usually require a tiny payment to enable email as a way to discourage spammers.

Also, change your mariadb user name and password because you seem to have posted them:

$username = "s100042374";
$pass = "081292";
0

I followed your suggestion and tried to send just the xml (without envelop). Bad luck.

No no, my point was that you might be signing the envelope and only verifying the body, or signing the envelope which later gets expanded and then trying to verify it.

I can't reproduce your code myself (mostly because I haven't downloaded Rider yet) but these are the things I would try:

  • Remove one of the signedXml.ComputeSignature(); (the first one if you worry about the ds addition).
  • Remove the part you added with the X509Certificate2 to see if it works without.
  • Revert the code back to the original tutorial to see if that one works for you (i.e. without the ds addition, without the certificate). Perhaps check in a new project, copy the tutorial and if that works slowly start adding your changes until it breaks.
  • Remove the signing completely and ensure you can actually send the xml across normally.

Other things that might be happening:

  • a newline \n or \r\n is/are being added to the xml along the way (thus failing the signature)
  • whitespaces might be added along the way
  • the character encoding of the xml has changed along the way
0

You are computing signedXml.ComputeSignature(); on line 26 and on line 30. Is that intentional?

I take it you mean these tutorials on verifying and signing. I only see it being used once there.

From the documentation:

The ComputeSignature method creates an XML digital signature and constructs many of the XML elements needed. You must set the data to be signed and the SigningKey property before calling this method.

So doing it twice might mess things up.

Disclaimer: I'm not an expert in C#

Edit: I just found your StackOverflow question and there I see you mention SoapUI. A "common" issue in Java with signed xml not verifying is that you sign the entire SOAP envelope instead of just the body. But I can't tell if that's what you're trying to do here.

0

It does but not while typing or while in preview. Maybe I'm remembering it wrong and it never did that. I liked to select the language myself though. Unless I'm remembering that wrong as well. I also remember using LaTeX here but now I'm not sure about that either. Yet this is pretty much the only Q&A style website I've ever spent real time on.

human(dani).
human(traevel).
mortal(X) :- human(X).

Will it highlight? *drumroll*

0

I mean that it's pointless typing in code longer than a few lines. There's a code block but that's it. No highlighting anymore, not even in preview. You can't select the language yourself anymore. It's really easy to overlap code boxes, or introduce line breaks in the code that you don't want. Getting the indentation right is also harder to do.

It has improved for normal conversations, but not for code in my opinion.

2

This

$stmt->bind_param('ssssss', strval($title), strval($vacancy), strval($keywords), strval($location), strval($industry), strval($area));
$stmt = $conn->prepare("INSERT INTO 'job_detail' ('job_title', 'vacancies', 'keywords', 'location', 'industry_type', 'functional_area') values('$title','$vacancy','$keywords','$location','$industry','$area')");

Needs to be

$stmt = $conn->prepare("INSERT INTO 'job_detail' ('job_title', 'vacancies', 'keywords', 'location', 'industry_type', 'functional_area') values(?,?,?,?,?,?)");
$stmt->bind_param('ssssss', strval($title), strval($vacancy), strval($keywords), strval($location), strval($industry), strval($area));

Also, you should be getting a general PHP error because in if($conn->query($sqli) == true) you're sending an object that doesn't exist anymore: $sqli;

Did you add a line like display_errors = on to your php.ini? Otherwise you won't see errors of any kind.

0

Now you went back a step again, directly inserting the $_POST variables into the query. Replace the variables in the query with ? and bind them like:

$stmt->bind_param('ssssss', strval($title), strval($vacancy), strval($keywords), strval($location), strval($industry), strval($area));

Is it still not working without giving you errors?

0

In your insert statement I'm seeing indutry_type, which I think should be industry_type and Functional_Area which should probably be functional_area.

It's even better if instead of mysqli_real_escape_string you used prepared statements.

Like:

// prepare the query statement
$stmt = $conn->prepare("INSERT INTO 'job_detail' ('job_title', 'vacancies', 'keywords', 'location', 'industry_type', 'functional_area') values(?, ?, ?, ?, ?, ?)");

// 6 string params, so 6 times 's' and 'strval'
$stmt->bind_param('ssssss', strval($title), strval($vacancy), strval($keywords), strval($location), strval($industry), strval($area));

// execute the query statement
$stmt->execute();

// close statement
$stmt->close();
0

You're inserting user input directly into the database. In other words, any user who uses that form can do whatever they want inside your database. You should use mysqli or PDO instead of mysql.

You're also inserting into the jobposting table, but selecting from the job_detail table. Also, we can't see what's in include ("../connection.php");. But because it's using the unsafe mysql there's no real point in fixing this issue until you've switched to either mysqli or PDO. A lot of people here will help you with that if you run into problems converting to one of the two safer methods.

0

We commit to fairly repayment the money, in case of any awkwardness with assignment papers or you're not satisfied with our revision policies. Our professionals put all efforts to make your assignments purely plagiarism free and meet with all your universities requierments.

I know my English isn't the best around, but this is hilarious LOL

2

Then Doubleclick was acquired by Google. Suddenly I needed a Google account to log into Doubleclick.

Because Google (Dazah) was bigger and better known than Doubleclick (DaniWeb). I had never heard of Doubleclick until you mentioned it just now.

For you it happened that way, but for me the reverse is true. I wouldn't mind going to Doubleclick now because I have a Google account anyway.

DaniWeb is part of the Dazah network of communities: Sign in with Dazah to access DaniWeb

I like that addition as well. After all, I'm not signing up for Dazah but for DaniWeb with Dazah.

0

I think if I wanted to sign up for DaniWeb any sort of redirect would put me off. I've been thinking about it and it seems to me it's about where you enter the network. Were I to enter through Dazah, because it's a network of communities for me to chose from, I would sign up. Were I to enter on DaniWeb, or one of the other communities a redirect to Dazah would confuse me.

Compare it to google. There used to be gmail. You signed up because you wanted free e-mail with large storage. Then along came other services, for instance google+. When I made my gmail account, I didn't want google+. Yet I had one, because it was all the same account. Fine by me, I never use it. Now that there are so many services on offer it's shifted from "gmail" account to "google" account. It's however very clear that gmail belongs to google. Dazah and DaniWeb? Not so much. And the Dazah name carries no weight yet, so if anything it's going to be a barrier, not an advantage.

The difference I guess is this: started with gmail, then created google+, then said "hey, you know that gmail account you have? you can use it to log in to google+".

So a better way, in my opinion, would be to promote the other communities on eachothers sites and tell users they can use the same account for all. Until then, I wouldn't mention the name Dazah ...