Community Member
Member Avatar
Topic by G_S in Programming
I took APL in my second year of Comp Sci and loved it. I used it on almost all my numerical analysis courses after that (I still play with it from time to time). I actually went through the `Life` code operator by operator to see what was happening at … Reply by Reverend Jim
Member Avatar
Topic by subhaac in Programming
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 … Reply by Traevel
Member Avatar
I'm trying to implement Callable for Strassen's algorithm to multiply two matrices. I'm new to this, and i'm having a few issues and I can't figure it out for the life of me :( .

The first problem is that the program prints out 0 for all the elements of … Topic by subhaac in Programming
Member Avatar
Traevel 216 Replied To a Post in If statement Error ?
Topic by Siberian in Web Development
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. Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in Questions on the class
Topic by Sameer_8 in Software Development
`this.age = (this.age * increment) + this.age;`

So if I am **40** and the increment is **5** I would be (40 \* 5) + 40... talk about time flying. Why not just add increment to age?

Also, as a rule of convention: `Person Kail = new Person` the variable name … Reply by Traevel
Member Avatar
Traevel 216 Began Watching Questions on the class
Hi i have other problems in other class the questions is
**
The Person class
Create a class called "Person" that includes three pieces of information as instance variables: a name, address, and age. Your class should have a constructor that initializes the three instance variables. Provide a set and … Topic by Sameer_8 in Software Development
Member Avatar
Traevel 216 Replied To a Post in If statement Error ?
Topic by Siberian in Web Development
What is the content of `fillrmv[i]` ? Maybe it doesn't have a property `filled`.

Is this scripting for Adobe Illustrator btw? Because I have no idea where you get things like `app.activeDocument.pathItems` from. Reply by Traevel
Member Avatar
Topic by G_S in Programming
>They also say that once you learn how to think the C way you'll be able to program in every other single language because they are mostly the same.

That statement is complete nonsense.

Learning your first programming language can be hard (and that's just learning, not mastering). Learning a … Reply by Reverend Jim
Member Avatar
Topic by G_S in Programming
I have to agree that the basics do help when you learn a new language. My first was Fortran which at the time there was no C language but there was Fortran, PL/1, Cobol and such.

What about testing for equality? You would think that's a basic thing you learn … Reply by rproffitt
Member Avatar
Topic by G_S in Programming
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 … Reply by Traevel
Member Avatar
Hello people. I'm looking for FP examples that are very simple (very few lines, one-liners are even better) and that totally look like sorcery to a traditional imperative programmer. Can you help me with that? I want to show some old school programmers who are friends of mine but keep … Topic by G_S in Programming
Member Avatar
Traevel 216 Replied To a Post in If statement Error ?
Topic by Siberian in Web Development
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 `>`). Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in If statement Error ?
Topic by Siberian in Web Development
I don't think you need `fillrmv` at all. Unless you want to store the `.length` in there or something. Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in email(), but not receive mail
Topic by gahhon in Web Development
php
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 … Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in email(), but not receive mail
Topic by gahhon in Web Development
php
Well even the official [PHP mail](https://secure.php.net/manual/en/function.mail.php) 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 … Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in If statement Error ?
Topic by Siberian in Web Development
> 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. … Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in email(), but not receive mail
Topic by gahhon in Web Development
php
Are you sure you are allowed to send mail from your server? Localhost can't on its own and most hosts block it. Maybe look into [using an smtp server with PHP](https://help.dreamhost.com/hc/en-us/articles/216140597-How-do-I-send-PHP-mail-via-SMTP-) to send mails, for instance, with your google account.

PS, to the mod that edited OP's snippet: feel free … Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in If statement Error ?
Topic by Siberian in Web Development
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 … Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in If statement Error ?
Topic by Siberian in Web Development
> `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 … Reply by Traevel
Member Avatar
Traevel 216 Began Watching If statement Error ?
I was informed the if-statement is incorrect. I can't find the syntax error ?

var curDoc = app.activeDocument;
var selall = app.executeMenuCommand("selectall");
var fillrmv = curDoc.pathItems[0].filled = false;
if (app.activeDocument.pathItems[0].filled = true) {
for (i=0;i>fillrmv;i++) {
curDoc.pathItems[0].filled = false;
};
}; Topic by Siberian in Web Development
Member Avatar
Traevel 216 Replied To a Post in email(), but not receive mail
Topic by gahhon in Web Development
php
> 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 … Reply by Traevel
Member Avatar
Traevel 216 Replied To a Post in email(), but not receive mail
Topic by gahhon in Web Development
php
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 … Reply by Traevel
Member Avatar
Traevel 216 Began Watching email(), but not receive mail
function email($reqNo){
//Database Configurations
$host = "some.url";
$username = "someuser";
$pass = "xxxxxx";
$db = "mydatabase_db";

//Customer Configurations
$cName = null;
$cEmail = null;

$DBConnect = @mysqli_connect($host, $username, $pass, $db) or die
("<p>Unable to connect to the database server.</p>". "<p>Error code ". mysqli_connect_errno().": ". mysqli_connect_error()). "</p>";

$SQLString = "SELECT name, … Topic by gahhon in Web Development
php
Member Avatar
Traevel 216 Replied To a Post in extract text from image
Topic by batoolhussain in Software Development
[Tesseract](https://github.com/tesseract-ocr/tesseract) 3.0+ should have Arabic support. It's in C but there are [wrappers](https://github.com/tesseract-ocr/tesseract/wiki/AddOns#tesseract-wrappers) for other languages, including two for .NET.

If that proves too hard there is also a [JavaScript](https://github.com/naptha/tesseract.js) port of Tesseract that supports Arabic. You'll need node.js though. Reply by Traevel
Member Avatar
Traevel 216 Began Watching extract text from image
hi everyone I need your help in extracting arabic text from image using vb.net. I only found program for extracting english language text but not found for arabic.
I used the following code that support only english language.

Imports MODI
Imports System.IO
Public Class Form1

Private Sub Button1_Click(ByVal sender As … Topic by batoolhussain in Software Development
Member Avatar
Traevel 216 Replied To a Post in Enabling JAVA
Topic by Jerome_5 in Hardware and Software
Same for [Android](https://play.google.com/store/apps/details?id=com.keepcalling.ui)

But since it's a paid service, perhaps drop a message in their support box as well? They should be willing to help their customers I'd reckon. Reply by Traevel
Member Avatar
Traevel 216 Began Watching Enabling JAVA
Have an online app "keepCalling.com" that allows one to make calls to land lines over the internet. Has worked for years but now I find that new devices after java installation are not recognized by the online app. Looking for a way to generate reports for what might have failed. … Topic by Jerome_5 in Hardware and Software
Member Avatar
Featured Traevel 216 Replied To a Post in How to correctly sign an xml document with .PFX key?
Topic by Chiquito in Programming
> 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 … Reply by Traevel
Member Avatar
Featured Traevel 216 Replied To a Post in How to correctly sign an xml document with .PFX key?
Topic by Chiquito in Programming
You are computing `signedXml.ComputeSignature();` on line **26** and on line **30**. Is that intentional?

I take it you mean these tutorials on [verifying](https://msdn.microsoft.com/en-us/library/ms229950%28v=vs.110%29.aspx) and [signing](https://msdn.microsoft.com/en-us/library/ms229745%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396). 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 … Reply by Traevel
Member Avatar
Hello!. I am trying to sign an xml with a key (.pfx) and when I sent it to who should receive it I get in response "Incorrect reference digest value". I am working with C# and** I need your help** to solve my problem. Here is my code, which I … Topic by Chiquito in Programming