Programming :: List Of Hex Values For Intel / AMD Instructions
Jan 24, 2010
Does anyone know what the Inet/AMD instruction 'nopl' is or does anyone know where I can find a list of hex values for the Intel/AMD instructions. nothing important is waiting on this reply.
i am having two small issues with a function i have made.sorry if it is a mess, i am still learning bash.the first is calling the nonpersistssh function (second line) and assigning the return value to nonpersistdiag.the function returns 1, but nonpersistdiag seems to only contain 0. i am unsure on how to proceed.the second problem is the nested else clause on line 10. it is a syntactical error. how would i declare it correctly?
Code: function endsession(){ nonpersistdiag=$[nonpersistssh]# a function that returns an exit code sudo /etc/init.d/ssh stop; sshdiag=$?
I can use hexedit to manually edit one or two hex values in a binary file, but if I want to change many of the, this is impractical. Is there any tool that will take parameters like Code: someTool filename byteNumber replacementByte ?
The idea is to make a website to check the availability of domains and it works but its not pretty yet. Below is what i have till so far:
## this is the API from my domain registrar. <?php $client = new SoapClient('http://api.sync.com/?wsdl'); ## I have a search box that sends the request to this page $var = $_GET ["s"];
## remove the most common subdomains from the request. $var=eregi_replace("www.", "", $var); $var=eregi_replace("mail.", "", $var); $var=eregi_replace("ftp.", "", $var); $var=eregi_replace("pop.", "", $var); $var=eregi_replace("smtp.", "", $var);
## remove any TLD extension from the request. $split = explode(".", $var); $main = $split[0]; $arraysize = sizeof($split); for ($x=1; $x<$arraysize; $x++) { $tld .= "." . $split[$x]; } ## login to the API $paramLogin = array('handle' => 'randall', 'password' => 'password');
Result Login: Array ( [code] => 200 [message] => Login succesful ) array(3) { ["code"]=> string(3) "200" ["message"]=> string(20) "Domain not available" ["result"]=> object(stdClass)#236 (1) { ["status"]=> string(5) "TAKEN" } } bool(true) array(3) { ["code"]=> string(3) "200" ["message"]=> string(16) "Domain available" ["result"]=> object(stdClass)#232 (1) { ["status"]=> string(4) "FREE" } } bool(true) ?> ## till so far it works
What I need to do is to make this ugly looking reply in to something more readable, basically if TAKEN print occupied and if free print its yours to grab. I have been struggling with the in_array function but i'm not getting anywhere close in getting it to work.
I have been reading the Wikibook on C Programming for quite some time and am up to the variable part. I did learn several new things, like that too many variables hog memory.
What I want to know is how to assign a variable to the keyboard (in the C/C++ family) as such that the user has to type it in.
I have a application in C++, and now I have two class. MyDialog is the class that main function launch. In MyDialog class there are four elements and when I click over theese elements, there is a MousePressEvent that launch other class, Touchpad class. So, in some moments, I have loaded two class. My question is, how can pass a value from Touchpad class to MyDialog class, when I close (destroy) Touchpad class. In a few words, is it possible to communicate values between class?
How would I list 4 users ID numbered 10, 11, 12 and 13 from my users list and output them to a file busers where their names are numbered by ascending order? How would I accomplish that on a one line command?
I am trying to get this script to work. The purpose is to download a list of modules from the slax.org the list consist of a list of module numbers. What I am trying to do is Download the file or the file name corresponding to the number in the list.the list is comma delimited. this is what I have done so far and I am a stand still.
#!/bin/sh # Wget script to retrieve modules from slax.org modules # # ----Begin of user defined values ----- # Path to wget
I am developing a script to automate some database setup, but I have an issue I cannot figure out. I prompt for some input with whiptail and select a default if nothing is entered. However, if you do not enter anything, it normally returns 0, but this time it is returning an empty value.
I have a variable in which the data is stored as below:
variable_test=0m0.001s 0m0.001s 0m0.001s 0m0.001s 0m0.001s 0m0.001s .....an so on.
There are lots of values in format like "3m1.057s" are stored in variable_test separated with an space between two such values. For exapmple, value is "3m1.057s" I need to save different parts of a value in three separate array variables such as the
var_hour=3 var_min=1 var_sec= 057
tell if this can be done using "awk". A "WHILE" loop might be used to separate and store theses values I guess?
I have a function that returns a boolean value, True of False. Is there any convention whether 0 = False or 0 = True? It should be obvious, 0=False, 1=True. However programs usually return 0 on success and reserve higher numbers for error values. I.e. if the program finishes successfully (function int main() finishes successfully ), it returns 0 - and that contradicts that 0 should be false.
And especially if I want a function to do some computations on parameters passed by reference and return success status. Should it return 1 (true) for success, or should it return 0 for success - like any Unix program does?
I have written a code on Linux that searches a long dictionary. I have used hsearch() function but the problem is it does not work. This is my code://Search the count values from the dictionary.
I open each DIC file, get the word from it and search the hash table and extract the key from it. The problem with the above code is that it is able to make the hash table but it returns NULL when searching. It should not return NULL in any case because all words from DIC files are there in the dictionary. I am not able to figure out why?
I need a shell script which gathers the data from a remote XML file and then displays it according to my needs.. I need this for my job due to the fact that I need to keep track price changes of euro, usd, gold, etc. The XML file I am talking about is located at this page: here. The reason I am posting the URL is that I need to use curl to get this file and it does NOT have newlines after each tag. I thought that that would be a problem. Here is what I need from the script: 1) curl to get the page 2) make use of sed, awk, etc. to display its contents in a more structured and readable manner as shown below:
I want to insert values into a MySql database. The following line works fine:1
Code: mysql_query(connection, "INSERT INTO main (NumofShows , Title) VALUES('12', 'Home')"); but if the data to be inserted is from a string... like.... Code: string NewTitle = "Monaco"; string NumofShows = "2";
How do i edit my sql statements so variables can be inserted into the Values ( ) , and it will be able to read the variables and then store it into the database.
I have the most strange problem ever in programming. I fork a process into a parent and a child. In every forked process i declare a pointer, malloc and define a different value for every pointer.When i printf the value and the address guess what? They both have the SAME ADDRESS but DIFFERENT values, as assigned..Here's the portion of my code:
I have a java compiler and Im using a double intiger called Experience and when compiled and run the double intiger does not hold intiger values that are mathameticle. Like 1.5 - 1.4 will equal .100000000000000000009 and 5/3 will equal 1.0. and 1.5x 1.4 doesnt equal 2.1. Is there something I am doing wrong with double intigers? Is it the compilers fault? Could it be something thats wrong with my computer and the compilers I am using are not tat fault? Anyways double 1.5 + 1.4 does equal 2.9 so.
Code: #!/bin/bash echo -n "Please insert your name: " read NAME
[Code]....
It works fine, but is it possible to have default values using bash read(1b)? I mean if user is prompter for sex, he just pushes ENTER and by default 'm' is chosen. Or if user is prompted for hometown and he doesn't insert anything, but just pushes ENTER button, 'New-York' sis chosen by default Are such default values possible in bash?
I am writing a script to mine data from my game server logs which are going to mysql. My first question is syslog-ng is sticking $msg into one colum it self, $msg tends to be a long string here are a few examples:
cn name team frag death flags role host. 0 Maik CLA 2 0 0 normal *.70.233.118. 1 lizardncd RVSF -1 3 0 normal [*.22.247.40] lizardncd fragged Maik.
And they are not always in the same format, How could I parse this data to do something useful, like creating a user stats page with frag counts and flag counts. Should I create a script that runs in a cronjob that parses this data to a new table maybe once a day. Even then the $msg string value is random and I am thinking in terms of awk.
Second. I would like to keep track of what ip's are using what nicknames. Kinda in the sense of and ip associated to a array of names that have been used on that ip address so I can keep track of users. How would this work logically with a mysql db, could a column allow multiple values, then loadable into an array, which then can add, remove, and store to mysql.
I'm working on a script to table the outputs of various commands that depend on each other. The commands are these:
Code:
[root@kybsdc2 ~]# raw -q /dev/raw/raw1 [root@kybsdc2 ~]# sginfo -a /dev/dm-5 | grep Serial [root@kybsdc2 ~]# multipath -ll
which give these outputs:
Code:
#/dev/raw/raw1:bound to major 253, minor 5 #Serial Number 'P3e8hZWrsSeX' #netapp (360a9800050336538685a577273536558) dm-5 NETAPP,LUN [size=1.0G][features=1 queue_if_no_path][hwhandler=0][rw]
[code]....
Also the RAW13 device has completely wrong output due to 1 occurring more times throughout the sequence causing more information to be displayed then needed. The last point is if I could somehow remove the '' in the serial number outputs and the = sign from the device sizes. I guess I will have to either put a whole lot of logical IF or CASE statements in but somehow I need to streamline and make this code dynamic!
If I have a Query that returns columns where some of the values are NULL, is it possible to tell SQL to return all the NULL values as empty strings instead of the NULL datatype?
If the solution is vendor specific I am (unfortunately) using a Microsoft 2008 SQL server.
Example:
Code: Select * from imaginary_table where id = 1 Might return: Code: Id: 1 Name:xyz
I have an assignment where I have to use an expr command to read values from File1.txt and File2.txtHeres the assignment:Create two files.File1 has one line with the value of 5.ile2 has one line with the value of 100.Edit your new file using Gedit or VI and change it so it performs the following actions:Read the values from the files above (file1 and file2)Divide the value from file2 by the value in file1.utput the result of this calculation to a new file called file3. My .scr file is week3prog3_george, in file1 I put var1=5, file2 is var1=20.Then, I put in my .scr file this:
#!/bin/bash expr File2.txt / File1.txt
It returns an error message stating "non-integer argument."And...how do you point the .scr file to read values from two different files, and the book my school has provided does not contain the info I need.
if the address of stWndClass is 403000h, WHY it would be compile as mov eax,[esi+403004] and the first one would be mov eax,[esi+4]? I know how to get the values 403004h and 4,but do not know why.
Basically, I am provided with a file "temp.dat" with 30 high temperatures (integers) in it. The program is supposed to read them in and compute/print the average. Then it is supposed to print the temperature of each day and, in addition, display a + by each day that is over the average, but only if it is above the average high for three or more consecutive days. This is the part I am stuck on. I'd appreciate any tips that would point me in the right directionFull disclosure: This is a school project. Code: