I am creating a program that takes two english words from the command line and prints one out vertical and the other horizontal and sees how many times the words cross. If they don't cross it then prints out an error message.
Here is what I have so far for the program. I don't know what the next step should be.
public class Assg2
public static void main(String args)
String w1 = args;
String w2 = args;
int numberOfCrosses =0;
int pos1 = 0;
int pos2 = 0;
for(int i=0; i < w1.length(); i++)
for(int j=0; j < w2.length(); j++)
if(w1.charAt(pos1) == w2.charAt(pos2))
System.out.println(w1 + " " + w2);
if(numberOfCrosses == 0)
System.out.print("Words do not cross");
I'm looking for what exactly is a Vector3 (or any Vector for that matter) and also what a Quaternion is in code? What are the variables types? Should you have multiple classes for each type?
Depends on the language you're using, and even then, there are multiple ways to represent vectors and quaternions.
Vectors in R3 can be simple structures with x, y, and z members, or you can use an array-like member to hold those values instead. You'll need arrays (or equivalent) to represent generic vectors in Rn though. If you're going to be working with matrices, you might also consider using a 1xn or nx1 matrix for your vectors.
The actual member type will be something "close enough" to a real number. For practical purposes, this is usually a single- or double-precision floating point value, unless you're doing something special, which is an entirely different conversation.
Then there are vector operations--some are only defined for vectors of certain sizes, and others, while they can be written generically for any size vector, have alternate implementations that are smaller and/or faster for certain sizes. Depending on your language, you may be able to take advantage of inheritance and/or templates to avoid writing duplicate code.
The quaternions (denoted H) are equivalent to vectors in R4, just with special operations.
Here you go. Read http://ss64.com/nt/syntax-variables.html to learn what most are. My bet you don't need all of those and let's see if you read it. That is, I see how to set them permantly (until you change or delete) but some folk don't read articles they just want it fixed for them.
Hello and thank you , probably you have figured it out , but here is a simple way to iterate through this SimpleXMLElement object (guess from the output that you are in DownloadDataByUserStringResponse->DownloadDataByUserStringResult->results)
$xmlArray = xml2array($xml);
&& isset($xmlArray["data"]["Report.Disposition.Summary3"]["row"]) )
$rows = $xmlArray["data"]["Report.Disposition.Summary3"]["row"];
if( count($rows) > 0 )
foreach($rows as $row)
$userDataArray = $row["@attributes"];
// you will have for each user something like
// array ( 'UserId' => '104', 'Name' => 'Agent Template'
// , 'Code' => '9999 ', 'Count' => '8', 'TalkDuration' => '28'
// , 'AvgTalkDuration' => '3', 'WrapDuration' => '0'
// , 'AvgWrapDuration' => '0', 'PercentageOfTotalCalls' => '100', )
* Takes a SimpleXMLElement as argument and returns the array of its data
* and attributes
* @param SimpleXMLElement $xmlObject
* @param array $out . Optional array() by default
* @return array
* @see http://php.net/manual/en/ref.simplexml.php#111227
function xml2array ( SimpleXMLElement $xmlObject, $out = array () )
foreach ( (array) $xmlObject as $index => $node )
$out[$index] = ( is_object ( $node ) || is_array ( $node ) )
? xml2array ( $node ) : $node;
The same thing we did here with arrays we could have done it with objects instantiators and objects list but of course the first step is to understand how SOAP is working in general. (For the specific method that your app had to consume I keep my doubts that maybe it wasn't designed well on the provider side or it wasn't designed for Web Services at all (sometimes , some people in order not having more providers they add a plain method from post (from example) inside a service ( I don't think that is a good way either but would explain the xml inside the xml response) )
Maybe you can find useful information on the website of IBM in this article? http://www-01.ibm.com/support/docview.wss?uid=swg21085746
The BIG problem with UNIX/Linux file-system repairs is that blocks of data of one file could (theoretically) end up in another, and file size corrections can lead to blocks of empty data or truncated files. This is not a real problem for plain text files, since you can see what's wrong, but binaries and files with complex structures (like nsf files) can get damaged beyond repair. And if fsck runs for 10 whole hours, there must have been some serious damage, with a very lengthy report of all modifications it did.
I'm amazed that the system still runs... See it as a boxer who's lights went seriously out, was patched up and is now covered in patches and stitches. On the other hand, the system will run because it's unlikely that there was any write-behind action on vital system files.
You might ask IBM/Lotus for their help, maybe they have a tool that can be used to revive an nsf database... Or maybe it's better you try to recover a file via Lotus Notes Repair Kit tool? try this option also. I'm sure this is a good alternative fallback. http://www.lotusnotes.repair/
Look at this reputable source also. http://www-10.lotus.com/ldd/dominowiki.nsf/dx/Database_Corruption_Troubleshooting_Guide
This smells like gcat implant but UPX for obfuscation ..
For the password, you can AES encrypt it and only decrypt during runtime in memory so whatever touches disk will awalys be encrypted. Add anti-debug techniques otherwise using ollydbg would take 10 seconds to run ur executable and get to the point where the password is decrypted
May you kindly help me. I have a windows login form in VB.net. I have a users table in MySQL. How can i use the users table in to login changes made to any table in MySql database. I only have 1 mysql databse user that i use in my connection string from all my windows forms
I can't guess why anyone would use SMTP today. It may have to die.
Anyway, I googles ROT13 ONLINE (those words) and there are tools to type in a string and get the rot13 string back to put into your clear text areas. Then you use your rot13 function to decode when needed.
I use a Shield UI Chart for displaying some forex data. I do need to gradually add data to the chart in other dynamically add points.
However according to the documentation, there isn't the possibility for dynamically adding of points, at least I can't see such method, something like: AddPoint or similar.
How can I still achieve a web page using Shield UI Chart, which to constantly show a couple of exchange rates?
Construct a large integer (32 - Bit) from two Byte Variables (8 - Bit) and one Word Type variable
(16 - Bit). Store your result into EAX and print it. Like if
byte1 = 21h, byte2 = 43h & word1 = 8765h
Then your output may be
87654321h OR 43218765 OR 43876521
Agreed - I reckon popular tags and page nav should be on top AND bottom. The click on "last post" in thread list may go over the heads of newbies (and oldies!) Hope that can be done without compromising the new (very) neat UI.
I don't see anything that could cause the problem you describe. I'm wondering though if CumLoss is represented as a positive integer and then added to CumProfit, could that be skewing your results to give the effect you observe? If not, you'll most likely have to submit enough of the rest of your code so that someone else will be able to try and duplicate your results.
Has your teacher covered the switch statement?
This is an excelent opportunity to use it, if it is allowed.
Here is a link that tells about how it works: Click Here
It is quite possible that the teacher wanted you to do this in a less efficient way, just to teach you how the "if .. else .. if" thing works. The very next topic might be how to make it work better by using a switch statement.