Sunday, 15 August 2010

visual studio 2008 - Where is the option that lets me edit code which is running in the debugger and then continue with the changes compiled? -


By luck, sometimes I can edit a class, while debugger is running and sometimes not ( On different machines such as on collaborative work)

As the title, where is the option that can edit the code which is running in the debugger and then continuing with compiled changes?

I Visual Studio 2008 Professional Edition SP1

Thanks

Tools / Options / Debugging / Editing and Continue. This is often the case that you will not be able to see the option because another user has not indicated that the 'Do not show this again' checkbox when it first indicates this dialog allows you to reset those options.


binary - Python integer to read-only buffer -


I am using cdb for a continuous database in python. I would like to add integer IDs to some strings, and I would not like to handle each of these integer IDs as strings, and instead of storing them as an integer, the CDB is either a string or a read-only buffer Is searching. Is there any way that I can store these keys as an integer instead of a string?

For example:

  cdb = cdb.cdbmake ("test.cdb", "test.cdb.tmp") key = 5 value = "some test string "# This is an error constructor throws. The (key, value) #TypeError: add () argument should be 1 string or read-only buffer, not int #this will work, but seems incompetent creator. According to the database, the string takes only the keys: ADD (str (key), value)   

ADD is an associative array: it maps the string to the strings (data).

Then you have to convert the integer first to string. I suggest that you wrap str in a utility function and forget about overhead.


Can I flush the event stack within Firefox using Javascript? -


There is a hierarchy of tags within my HTML that contains all the onclick event handlers. On the page through the root of the hierarchy On the rotation back, the event is pushed onto the stick on the stick. I just want to answer the event on the leaf click event. Can I flush the event stack instead of using the flag?

For example ...

  & lt; Ul & gt; & Lt; Li onclick = "Nada ('1');" & Gt; & Lt; A href = "# 1" & gt; 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li onclick = "nada ('2');" & Gt; & Lt; A href = "# 2" & gt; 2 & lt; / A & gt; & Lt; Ul & gt; & Lt; Li onclick = "Nada ('2.1');" & Gt; & Lt; A href = "# 2.1" & gt; 2.1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li onclick = "Nada ('2.2');" & Gt; & Lt; A href = "# 2.2" & gt; 2.2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li onclick = "Nada ('2.3');" & Gt; & Lt; A href = "# 2.3" & gt; 2.3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li onclick = "Nada ('4');" & Gt; & Lt; A href = "# 4" & gt; 4 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li onclick = "Nada ('5');" & Gt; & Lt; A href = "# 5" & gt; 5 & ​​lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;  

Clicking 2.2 using this function ...

  function nada (which) {warning (which); }  

... will result in two alerts for '2.2' and '2'.

Do I '2' in Nada Festival?

To prevent the incident from bubbling parent elements, you to tell the incident < / Code> About the object in IE, you set event.cancelBubble = true . In other browsers, you call event.stopPropagation () .

You might want to disable the default link-the following action so that the browser can not keep jumping on top of following non-existing anchor links such as # 1 . In IE, you set event.returnValue = false in other browsers, you call event.preventDefault () .

Event object is accessible as window.event i.e. On other browsers, it is passed in the event handler function. One way to pass an event into a function that works on both:

  & lt; Li onclick = "Nada ('2.1', incident);" & Gt; & Lt; A href = "# 2.1" & gt; 2.1 & lt; / A & gt; & Lt; / Li & gt; Function nada (n, event) {alert (n); If ('StopPropagation' in the event) {event.stopPropagation (); Event.preventDefault (); } And {event.cancelBubble = true; Event.returnValue = false; }}  

However, it would be better all round to put an onclick event on the a element, which is usually related to it . It helps to access because the a element will be focusable and keyboard-operated and this means that you do not have to worry about parents, click the handler called is.

(You can style a to look like a plain block if you want.)

You need unnecessary with unneeded scripting Onclick can also be linked to:

  & lt; Ul id = "nadalist" & gt; ; & Lt; Li & gt; & Lt; A href = "# 1" & gt; 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# 2" & gt; 2 & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "# 2.1" & gt; 2.1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# 2.2" & gt; 2.2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# 2.3" & gt; 2.3 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# 4" & gt; 4 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# 5" & gt; 5 & ​​lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Script type = "text / javascript" & gt; Var link = document.getElementById ('Nadlist'). GetElementsByTagName ('A'); (Var i = links.length; i ->;;) {link [i] .onclick = function (warnings (this.hash.substring (1)); return false; }} & Lt; / Script & gt;  

c++ - Write and test sub func -


I am trying to write subfunction for nachOS, but when I add it it does not work.

Cause not know details: Add ../userprog/syscall.h to:

  define # SC_Sub 11 int (int a, int b);  ../ test /  

  .globl sub in  

Sub sub: addiu $ 2, $ 0, SC_Sub syscall j $ 31 .end sub

Then I write a sub-quote:

  # Include "syscall.h" int main () {int results; Result = sub (100,99); Halt (); }  

In exception.cc: I try to catch exception:

  case SC_Sub: op1 = machine-> ReadRegister (4); Op2 = Machine-> ReadRegister (5); Results = op1 - op2; Printf ("OP1:% d \ n", OP1); Printf ("op2:% d \ n", op2); Printf ("result:% d \ n", result); Machine & gt; WriteRegister (2, results); Machine & gt; WriteRegister (PCReg, Machine> ReadRegister (PCReg) 4); break;  

I go to / code / gmake all and I have an error: (

 . /../../gnu-decstation-ultrix/decstation-ultrix/2.95.3/gcc-B../../ gnu-decstation-ultrix / -t script-n sub-oo-sub ../ ./../gnu-decstation-ultrix/decstation-ultrix/2.95.3/ld: crt0.o can not open: [1] by making such a file or directory: *** [sub] error 1 create [1]: excluding directory `/home/nxqd/Desktop/nachos-3.4/code/test 'gmake: *** [All] Error 2  

This dance folder It does not have a "bug" sub-funk included.

  P: //www.mediafire.com/? G3mnjxz4wdc Enter the code here  

hmm Well, I do not know anything from Nachos, but I have developed some OS.

can not open crt0 .o: No such file or directory

Are you sending the right linker command? Let's look at your linker script.

I believe that you have a MISS cross compiler Have you configured it to use a standard library if there is no standard library, have you configured it to use the default CRT0?

Note that crt0 is a "bootstrap" object in it's __ main which is the first thing executed by OS. This bootstrap object then parses command line arguments and other initialized objects and then calls your main function. I'm sure how much stuff is available in NachOS, but you can also create your own CRT0 and link to it as a startup image with the script (can not remember the exact name)


database - C# Reusing an Adapter to populate other controls -


I am using the following code to populate DataGridView (sqliteAdapter is obtained from DbDataAdapter):

  sqliteAdapter.SelectCommand.CommandText = SQLCommand; SqliteConn.Open (); (Using datatable dt = new datatile ()) {sqLiteAdapter.Fill (dt); DataGridRes.DataSource = DT; }  

The actual SQL command is:

  Select Email as NOTNULL, SEL, Regio, Distro, Groupo, MG, ID, Nom, Morada, E -mail evaluators  

Now, I want to use this datatale again to populate other controls in the form. I.e. 4 checked checkbox control I was hoping to avoid any other connection with DataData, as if to do something like "filtering" to the current datatelle (invalid code. Only the illustrative)

 < Select> Regiao separately from code> Datatyes Select specific distributes from the data selection  

The adapter and datatable properties and methods have been meaningless to me.

Controls can not be compelled for any archive, not just data-able.
So you can use LINQ, like:

  myControl.DataSource = Dt.AsEnumerable (). Select (DR = & gt; dr.Field & lt; string & gt; ("regio")). () (Toyare);  

apache - Why won't this mod-rewrite rule work? -


मेरे पास मशीन पर एक विकास स्थल है

  localhost / ~ jason / hfh / Admin /? Admin = संग्रह  

मेरी। Htaccess फ़ाइल / hfh / admin / निर्देशिका में है यह कहते हैं:

  रीवरइटइन्गइन ऑन रीईवरबेज / ~ जेसन / एचएफएच / रीव्रेट नियम ^ ([ए-ज़ा-जे 0-9 \ - \ _] *) $ index.php? Admin = $ 1   

लेकिन जब मैं

  localhost / ~ jason / hfh / admin / collections  

पर जाता हूं, मुझे "पृष्ठ प्राप्त होता है त्रुटि नहीं मिली। क्या कोई मुझे बता सकता है?

(यह किसी अन्य प्रश्न से संबंधित है।)

< P> यदि आपके पास .htaccess फाइल / hfh / admin / में है, तो आधार के साथ आरंभ करने के लिए।

  रिवरैटबेस / ~ जेसन / एचएफएच / व्यवस्थापक /   

तब आप देख सकते हैं कि आप क्या उम्मीद करते हैं

क्या अपेक्षित परिणाम यूआरएल काम करता है?

  / ~ जेसन / एचएफएच / व्यवस्थापक /index.php?admin=collections  

संपादित करें:

तो क्या होता है यदि आप पूरी बहुत कुछ बदलते हैं:

  RewriteCond % {REQUEST_FILENAME}! -f पुनर्लेखनकॉन्ड% {REQUEST_FILENAME}! -d रिक्राइटआर्यूल ^ (। *) $ / ~ जेसन / एचएफ़एएच / एडमिन / इंडैक्स.एफ़पी? एडमिन = $ 1 [एल]   

database - Case insensitivity for DB Collation - does it affect performance? -


Before I was working on my database, I wonder if utf8_bin Performance on case insensitive fusion such as utf8_general_ci (eg from MySQL) will increase.

Do anyone have any comments on this? What about other databases other than MySQL?

Yes, a binary collation will be faster when others

Easy to deal with a binary type or comparison case ( + Extant, kinetipe and width in SQL Server). >