Posts

loops - How do I program a greatest common divisor program is 80x86 assembly? -

I know that there are different ways to find two numbers GCD, but I want to know the best Ordinances have been ordered and how do I apply the method in this program? Even what I have so far: .586 .MODEL FLAT is included io.h; Header file for input / output. STACK 4096 .DATA number1 DWORD? Number 2 DWORD? Prompt1 byte "Enter an integer for x", 0 prompt2 byte "Enter an integer for Y", 0 string byte 40 DUP (?) ResultLbl byte is "the largest common denominator of x and y", 0 gcd byte 11 dup , 0 .CODE _MainProc PROC input prompt1, string, 40 atod string mov number 1, eax input prompt2, string, 40 atod string mov number 2, EDX mov eax, number 1 mov EDX, number 2 get_gcd (?): Xchg eax, EDX CMP eax, EDX JB Get_GCD sub eax, EDX test EDX, EDX JNZ Get_GCD retired dtoa gcd, EDX output resultLbl, gcd mov eax, 0 mov EDX, 0 retired _MainProc ENDP the ending; End of source code I run it and nothing happens. Remove the ANT after jnz Get_GCD and before dETO...

python - Creating a list from a .txt file to write on excel -

I am trying to create a list from a large series of data on my .txt file. I want to process them through Excel and show that I am doing this to create a recurrence list which will be written in every column. However, I get this error that I am not defining J. import xlwt f = open ('inputfile.txt') for lines in C = 1: #split = f.split ('\ t') style0 = xlwt.easyxf (' Font: Name Times New Roman, Color Black, Bold On ') wb = xlwt.Workbook () ws = wb.add_sheet (' database ', cell_overwrite_ok = true) for i, line in enumerate (line): ws.write ( I, j, col) print (str (c) c = c + 1 wb.save ('prueba.xls') In addition, I would like to ask if this is possible You have not defined the variable ( Instead you have additional variables Line which is unused here), you have to define the variable. For i, enumerate the line (line): You have to define j j, j, Call in the calculation (line) for:

class - Create a python object that mimics string iterator behaviour -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मैं बनाने की कोशिश कर रहा हूँ एक ऑब्जेक्ट जो स्ट्रिंग की तरह व्यवहार करता है जब इसे "x इन वाई" वाक्यविन्यास में उपयोग किया जाता है। उदाहरण के लिए, इस मामले में, मैं चाहता हूं कि मेरी ऑब्जेक्ट "test" स्ट्रिंग "एबीसीडीईएफजी" की तरह व्यवहार करती है जब मैं तुलना करता हूं यह एक और स्ट्रिंग के लिए मुझे लगता है कि यह iter फ़ंक्शन में किया जाना चाहिए लेकिन यह काम करने के लिए प्रतीत नहीं होता है। वर्ग टेस्ट (ऑब्जेक्ट): def __init __ (स्वयं, var): self.var = var def __iter __ (स्व): रिटर्न इटरर (सेल्फ। var) & gt; & gt; & gt; Test = test ("ABCDEFG") & gt; & gt; & gt; # परीक्षण में "ईएफ" प्रिंट करें, मैं इसे सही गलत और gt; & gt; & gt; प्रिंट "ईएफ" में "एबीसीडीईएफजी" # इस तरह से परीक्षण कैसे सही व्यवहार करना चाहिए आप अपने वर्ग के साथ में के व्यवहार को नियंत्रित करने के लिए विशेष विधि को अधिभार देना चाहते हैं: & gt; & gt...

c# - SQL error with update -

I have a problem updating what's wrong? Compiles the code, but when I click the click button, line -> Cmd.ExecuteNonQuery (); Did not work. Here the error Additional information: query with parameter '(@nmo int, @ rezerwoâ ???? INA) updated SETTT.amiejska = @no mo' parameter ' @rezerwo ', which was not provided. Inactivity 1: System.Web.UI.Page SqlConnection cn = new SqlConnection (@ "Data Source = (LocalBible) \ v11.0; Attach debuff filename = C: \ Users \ DED \ Documents \ Visual Studio 2013 \ Projects \ sV1 \ Stopovisie1 \ Epadata-STV 1.MDF; Integrated Security = True; MultipleActiveRelasticSets = True; Application Name = EntityFramework "); SqlCommand CMD = new SQL Commands (); Secure Zero Page_load (Object Sender, EventAg E) CMD Connection = CN; Protected Zero GridView1 selected Indexed object (object sender, EventArgs e) var g = GridView1.Row selected; String Razrov = Gridview 1.DataK [G.Datitum Index] ["Idoforti"]. Toasti...

php - Display Custom Taxonomy Field in sidebar -

Hi friends, I am trying to display classification field to be called clpr_store_video code> It is possible to call field values ​​outside of the loop on the sidebar in my wordpress sidebar for every wordpress, but now linked to the post id? I do not know whether it is possible or how to do this. Edit I tried with another tutorial but there was no luck. $ queried_object = Get_queried_object (); $ Classification = $ queried_object- & gt; Classification; $ Term_id = $ queried_object-> Word_id; $ Subtitles = get_field ('clpr_store_video', $ classification. '_'. $ Term_id); $ Subheading echo; See the code block for the post and taxonomies and classification related to their list of links: If you want to get a classification related to a particular term $ terms = get_the_terms (get_the_ID (), 'clpr_store_video'); Forex Currency ($ word $ word) {echo $ subtitle = $ word-> Name; } If you want to get a list of all taxonomyes an...

antlr4 - Lexers w/ Phrase Tokens -

I am using w / ANTL4 on a grammar that would be best in phrases rather than words (i.e., token blank In some cases) In some cases, however, I want to catch the specific phrases mentioned above as separate tokens. Consider the following example: Display of the context of encounter The phrase "one of the events" is special - whenever I see it, I want to Get out of it The rest of the statement ("encounter exposure") is quite arbitrary and for the purposes of this example, anything can happen. For this example, I have suppressed this quick grammar: Grammar testing; State: Okrerence Ferra; Inauguration: 'Incident' LABEL ''; Piece LABEL: [A-Z]; PHRASE: (WORD '') * WORD; Section WORD: [a-zA-Z \ -] +; WS: [\ t \ n \ r] + - - Skip; If I test it against the above statement, then it fails ("Line 1: 0 '" Remembering Opener "during the incidence of advocacy enforcement" I believe that this is because the Lezzer wi...

mysql - Error generating mysqldump with flush tables read lock option -

I have written a simple Bash script that generates mysqldump while locking the table. # Mysqldump will be used on the client side Q1 = "USE test;" Q2 = "Flush table with Reed Lock"; Q3 = "System / USR / Bin / MySakDump-U Route - Master-Data = 1 - OPT SSC" /var/opt/backup.sql "Q4 =" Unlock Table; " Mysql query $ mysql-root- "$ SQL" SQL = "$ {Q1} $ {Q2} $ {Q3} to run SQL =" $ {Q1} $ {Q2} $ {Q1} $ {Q2} $ {Q3} $ {Q2} $ {Q4} " I see this error when I run this script mysqldump: table could not be found:" tab " But the strange thing is that if I run these commands manually on mysql, then everything works as expected. mysql> Use the exam; Reading the table's information to complete the table and column names You can turn off this feature to get a quick startup- A database has mysql & gt; Flush table with read lock; The query is ok, affecting 0 rows (0.00 seconds) mysql & gt; System...