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). >

Tomcat per webapp memory settings -


I have two webpiling running inside Tomcat. Java hasap space has been allocated for tomacat and it is shared for both applique, one application costs more and the other is getting OUT_OF_MEMORY.

Is there a way to set memory settings in every web application? Say 30% to 30% for the overall memory allocated for 70% of a webapp and allocated for the tomak.

Regards Ganesh

Memory is defined for JVM example, therefore If you are using a Tomcat, then you can not do this.

Though you can run two bad examples - one per web application - and then you will have better control over memory allocation for each webpad.


tortoisesvn - I can't check out SVN project on windows 7 Ultimate -


On Windows 7 Ultimate I can not check or update SVN projects. After clicking or updating the checkout project, it displays a dialog where I had placed the project URL and then I need to type the username and password after which the dialog is just hanging there, "639 bytes" Moved, at 0 bytes / s ". If I'm the user repo browser only and this time after an hour (I can do a browser repository with a browser) I can checkout and update on XP mode so I do not think this is a firewall problem. Any suggestions?

Are you using Tortoise SVN? Do you have to provide a proxy in another browser to connect to Internet Explorer or the Internet?

If yes, then you have to enter proxy settings in Tories, just go to all programs -> Turtle SVN -> Settings -> Network.

Turtle settings that were set in Internet Explorer were not used.


.net - POCO objects with lazy loading -


I is new to AAPNet MVC, IOC, Poko, etc. So I should know that it is ok to use this type of architecture

This is my demo project.

project.Core ( assembly referred to by this project )

  public class user {public string name {get ; Set;} public list & lt; UserGroup & gt; UserGroups {get; Set}} public class UserGroup {public string title {get; Set;}} Public Interface IUserService {User GetById (int id); } Public Interface IUserGroupService {List & lt; UserGroup & gt; GetByUser (User User); }  

Good, but how can I use lazy to load this way? Users Groups Every time I'am is getting the user does not want to receive.

My thoughts are to modify my user class like this:

  public class user {public string name {get; Set;} public list & lt; UserGroup & gt; Get UserGroup {{Return_Groups} (_groups = Services.UserGroupService.GetByUser (this)); } Set {_group = value;}}} Public class services {// Unity public in this class is static IUserGroupService UserGroupService {get; Set;}}  

What is the harm to my solution? I do not like that my POCO object uses the IUserGroupService example.

I do not want to get the user group every time.

Then do not bind them together in the object model. It becomes increasingly complicated, as much as you begin to do it.

If you are doing this to give ideas for the same example, then you can create a view modell with a set of information needs.

Note that if you end the user's requirement with a set of consistent information, which can indicate all the related data in an alternative way and then you can decide You may be able to load curious, and save those extra shottrips that do not do any good.


Socket Server/Client conflict when running on same system -


Writing using functions I can add it properly using the confirmation and it works as expected.

However my PHP-CLI client is not working properly. It seems like the client is trying to get the socket from the server (yes the server / client is on the same system).

They start connecting, but if I have to get the client just to receive the server's welcome message it just stalls. If I have written after adding the customer, the server sends everything, and the customer starts reading properly - but then the server socket_bread incorrect (i.e. an error), but the error message "operation successfully Completed "with.

This is my default algorithm:

Server

  $ this-> _clientSock = socket_create (AF_INET, SOCK_STREAM), SOL_TCP); Socket_bind ($ this-> _clientSock, $ this-> _address, $ this- & gt; _port); // port 50000 socket_listen ($ this-> _clientSock, 5); $ This- & gt; _clientMsgSock = socket_accept ($ this- & gt; _clientSock); $ Msg = "Welcome"; Socket_write ($ this-> _clientMsgSock, $ msg, strlen ($ msg)); While {$ buffer = socket_read ($ this-> _clientMsgSock, $ this-> _readSize, PHP_NORMAL_READ)) $ INMsg = $ buffer; $ Msg = "You have sent '$ inMsg'; Socket_write ($ this-> _clientMsgSock, $ msg, strlen ($ msg));} while ($ msg! =" Skip ");    client  

  $ this-> _serverSock = socket_create (AAUNETET, SOACAKRRM, SOOOLOCCP); Socket_connect ($ this-> _serverSock, $ This- & gt; _address, $ this- & gt; _port); Socket_write ($ this-> _serverSock, $ msg, strlen ($ msg)); // With this line, the server "socket_read" Otherwise the customer is hanging ($ buffer = socket_read ($ this-> _serverSock, $ this-> _readSize, PHP_NORMAL_READ)) $ inMBsg = $ buffer; Print is "Welcome Message $ INMsg";  

I think you should at least socket_connect ()


Php Multi-Dimensional Array / MySql problem -


I Breaking the content I am trying to write a PHP script that down to a text file enter into a MySQL database, The code is as follows:

  $ file = "my_file.txt"; $ Db = "db_name"; $ Link = mysql_connect ("localhost", "root"); If (! $ Link) dies ("Connection failed"); Mysql_select_db ($ db) or die ("$ db could not open:" .mysql_error (). "& Lt; br / & gt;"); $ Fp = fopen ($ file, 'r') or die ("file can not be opened"); $ My_filesize = filesize ($ file); While ((Fif ($ fp)) {$ prod_doc. = Fread ($ fp, $ my_filesize); // Store the file in a variable} $ prod_array = explode ( "~", $ prod_doc); // ($ i = 0; $ i & lt; Create an array with the explosion function count ($ prod_array); $ i + +) {$ prod_items [$ i] = explode ( ',', $ prod_array [$ i]) ; // Create a Maltese-dimensional array} into the $ query = "my_table (feild1, feild two, feild three) value ( '$ prod_items [$ i] [0]', '$ prod_items [$ i] [1] ',' $ Prod_items [$ i] [2] ') "; $ result = mysql_query ($ query); if (! die $ result) (mysql_error ()); $ result = mysql_ Prbavit_ro ($ result); return $ Results; mysql_close ($ Link); My problem is: Array [0], Array [1], Array [3] which has been entered in the database instead of my data Thanks in advance, Cheers   

You have to repeat your $ prod_items array as well, then assume value $ insert = array ($ I = 0; $ i & lt; Count ($ prod_array); $ i ++) {$ prod_items [$ i] = Explosion (',', $ prod_array [$ i]); // a Maltese-dimensional array insert $ [] = '('. $ Prod_items [$ i] [0]. ','. $ Prod_items [$ i] [1]. ','. $ Prod_items [$ i ] [3]. ')'; } $ Insert_string = implode (',', $ insert); $ Query = "Enter in my_table (feild1, feild two, feild three) Value" $ Insert_string;

And you should use insted for it.


c# - ClassName<Type.GetType("Somenamespace.ClassName")> -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 7 जवाब

असल में मुझे क्या चाहिए एक सामान्य प्रकार में Type.GetType का उपयोग करने वाले प्रकार का उपयोग करें,
क्या यह संभव है, यदि हां हैं तो? मुझे इस तरह से कुछ चाहिए:

  प्रकार t = Type.GetType ("mynamespce.a.b.c"); Var x = जेनेरिक क्लास & lt; t & gt; ();  

आप Type.MakeGenericType और Activator.CreateInstance का उपयोग कर सकते हैं सामान्य प्रकार का एक उदाहरण बनाने के लिए, उदाहरण के लिए

  प्रकार t = Type.GetType ("mynamespce.abc"); प्रकार जी = टाइपफ (जेनेरिक क्लास & lt; & gt;)। MakeGenericType (टी); ऑब्जेक्ट एक्स = एक्टिवेटर। क्रिएट इंस्टेंस (जी);  

लेकिन यह आपके कोड में जेनेरिक वर्ग के प्रकार के रूप में जोरदार टाइप नहीं किया जाएगा, अगर आप यही चाहते हैं यह संभव नहीं है क्योंकि सी # आपको खुले सामान्य प्रकार के साथ काम करने की अनुमति नहीं देता है।


c# - right way to create thread in ASP.NET web application -


I am creating the asmx web service and refresh the system data to create a thread to background IO What's the way I'm not interested in getting any results to make threads. I just want to create a thread that loads the ASP.NET worker thread and finally assigns one (I think assigning _alldata = newData which is atom where both of my own large structure class SystemData Examples) so that a new thread created by the worker thread can immediately promote it.

I have read an article that suggests using non-threaded threads. Although the article was about a different / more complex scenario and does not help me so much.

Thanks: Matte

PS I have also asked this question, but it was very complex with many questions.

Something like this:

  public representative zero worker (); Private stationary thread worker; Public Static Zero Init (worker's work) {worker = new thread (new threadstart (work)); Worker.Start (); } Start things by public static zero work () {// do stuff}  

then by calling Init .

If you call BeginInvoke () or ThreadPool.QueueUserWorkItem () , it uses an ASP.NET thread pool thread, Which can affect the scalability of your application.

If this is useful, then I cover these issues in detail in my book, with code examples, sample benchmark etc.


asp.net - java script for radiobuttonlist select and deselect -


I have radio button list control in which the data is coming from DB and is bidding in a .cs file

Now I have to write a Javascript that if the user selects item 1 in the Radiobutton list, then it is selected and then the user clicks on a single item then deselect it.

Even if I have 10 items, then this should be selected and deselecting the item's churn on it

thanks

  & lt; Input type = "radio" name = "foo" value = "bar" onclick = "toggle (this);" & Gt; Var radio = new array; Function toggle (radio) {if (radios [radio.name] == radio.value) {radio.checked = false; } Other {radio.checked = true; Radio [radio.name] = radio.value; }}  

Appending multiple html elements using Jquery -


New to jQuery and wondering if someone can advise me on best practice ...

I want to add a Div element to the page, I have a lot of HTML and is not sure how to achieve it .... Or if it is capable of using jquery ...

For example, if I want to add the following code on the page using jquery, then what is the best way.

  & lt; Div id = "test" & gt; & Lt; H1 & gt; This test is & lt; / H1> & Lt; P & gt; Hello, just a trial. / P & gt; & Lt; A href = "www.test.com" & gt; Click me & lt; / A & gt; & Lt; A href = "www.test.com" & gt; Click me again & lt; / A & gt; & Lt; / Div & gt;  

If you want to add HTML, then just use the jQuery app function . For example:

  $ ('body'). Attached ('

Change the selector from body to second element / selector according to your needs.

Or if you have div elements with ID "test" in the document, you can set the content using the html () function as follows:

  $ ("# Test"). Html ('& lt; h1 & gt; This test is & lt; / h1 & gt; \ & lt; p & gt; Hello, just a test & lt; / p & gt; \ & lt; a href = " Www.test.com "& gt; click me & lt; / a & gt; \ & lt; a href =" www.test.com "& gt; me again & lt; / a & gt; ');  

Django on Webfaction: Serving static admin media files - configuration -


I'm having trouble delivering Django's stable admin files to webfication.

:

  • I have created a symbolic link for 'stable-only app', and 'added information' has provided a link to Dezanne admin files : / home / myusername /webapps/mydjangoapp/lib/python2.5/django/contrib/admin/media (cd'ing works fine in that directory)

  • I have added this app to my DNS website, and specified in the URL path / media

  • In my settings, ADMIN_MEDIA_PREFIX = '/ media /' (My Static Files / There is a prefix with static /, so there is no conflict)

    In the source code of an admin page, I can see that the admin media is properly linked, e.g. & lt; Link rel = "stylesheet" type = "text / css" href = "/ media / css / base.css" />

However, After that I get 404 pages (from nginx).

I have always played with it, so any thoughts that may be wrong here, or how to troubleshoot it will be really appreciated!

I think you should be the "symbol" static-only app ", it should be: < / P>

 /home/myusername/webapps/mydjangoapp/lib/python2.5/django/contrib/admin/media/ 

(Or at least, what works for me on webfactions ).

If he is not working - ask him, he is actually the most helpful assistant team of any hosting company that I have ever used.


C++ type casting vector class -


मेरे पास दो वेक्टर क्लासेस हैं:

  typedef struct D3DXVECTOR3 {FLOAT x; फ्लोट वाई; फ्लोट जेड; } D3DXVECTOR3, * एलपीडी 3 डीएक्सएक्टेक्टर 3;  

और

  वर्ग MyVector3 {FLOAT x; फ्लोट वाई; फ्लोट जेड; };  

और एक फ़ंक्शन:

  शून्य फ़ंक्शन (D3DXVECTOR3 * वेक्टर);  

यह कैसे संभव है (यदि यह संभव है) इस तरह से कुछ हासिल करने के लिए:

  MyVector3 vTest; समारोह (& amp; vTest);  

  फ़ंक्शन (reinterpret_cast & lt; D3DXVECTOR3 * & gt; (& amp; vTest)) ;  

आम तौर पर बोलने से आपको reinterpret_cast से बचना चाहिए।


jquery - javascript for radio button list -


I have a radio button (6 items below it). And I have a search button, if the user clicks on the search button, the result is all the result. I am bound to the item for the Radiobuttonlist by using the database in .cs file

Position 1: If the user selected Radiobutton1 [item1] as selected. And now if the user again clicks on Radiobutton 1 [item 1] then deselect it.

How to write the onclick function here if I have to check this condition

Either you can provide me a solution in Javascript or JQuery, then no help is great Thank you eagerly for a solution

This is what you should do. Provides enable / disable functionality on each radio-button on the page. You can only change the selector to match that radio.

But let me tell you that enabling / disabling radiobuttons is counter-intuitive, you should actually use the checkbox for it as I can not expect when using your site One should be able to unblock the radiobutan because it is unusual behavior.

  $ ('Input [type = radio]'). Each (function (i, e) {// reserved initial state $ (e). Data ("old", e. Check);}); $ ('Input [type = radio]'). Click (function (e) {var x = $ (this); // If the current state is similar to a saved toggle / then do nothing / (this.checked == x.data ("oldstate")) .checked =! (This.checked); // Save current status x.data ("oldstate", this.checked);});  

entity framework - SaveChanges(): "...can only appear on the left hand..." -


मेरे पास यह कोड का टुकड़ा है:

  अनुसूची chk = _entities.Schedules.Where ( X = & gt; x.ScheduleStart == शेड्यूल। शेड्यूल स्टार्ट एंड amp; एक्स। शेड्यूअल एंड एंड लैटिन = शेड्यूल। शेड्यूअल एंड)। फर्स्टऑर डीफॉल्ट (); अगर (chk! = नल) {chk.Discontinued = true; _entities.SavingChanges (); }  

मूल रूप से अगर कुछ मानदंडों के साथ डेटाबेस में मौजूद है, तो बंद करें = सत्य सेट करें और सहेजें ...

लेकिन मुझे यह त्रुटि मिलती है:

घटना 'System.Data.Objects.ObjectContext.SavingChanges' केवल + = या - =

के बाएं हाथ पर प्रकट हो सकता है? क्या गलत है?

/ एम

आप गलत तरीके से कॉल कर रहे हैं बचत चैंज एक घटना है, एक विधि नहीं इसके बजाय आपको SaveChanges चाहिए।


plsql - Oracle How to Avoid writes to UNDO / REDO log -


I have Oracle PL / SQL script. It processes approximately 51 million registers, and results from 5 different tables Writes.

The problem is that I left the process last night, and apparently there was an overflow in the UNDO log.

Specifically, we are not interested in rollback this script, if it fails, then we can run it again.

Is there any way to optimize the use of undo / re-logs? Avoid writing them or at least they write?

As far as I understand, in addition to setting up the NOLOGGING attribute, using append, output tables will help

any suggestions will be appreciated. thank you in advanced.

You should not take action on 51 million registers in only one batch. For example, try to split it into a small part of a few thousand. If you do a COMMIT after each small batch (which you do as you say you are not going to rollback) the redo / undo log will be used only for the latent parts and you will avoid an overflow .


registry - How to pass in multiple file/folder paths via a right-click event (verb) to an executable? -


संबंधित:

मैंने सभी फाइलों में कस्टम राइट-क्लिक क्रिया को जोड़ा HKEY_CLASSES_ROOT \ * के लिए रजिस्ट्री कुंजियों को जोड़कर अंतिम परिणाम इस तरह दिखता है

HKEY_CLASSES_ROOT * \ Shell \ TestRightClick \ command

------- डिफ़ॉल्ट = c: \ RightClickTest.exe "% 1" < / P>

समस्या: एकाधिक फ़ाइलों को चुनते समय c: \ RightClickTest.exe को कई बार कहलाएगा (चयनित फ़ाइलों की संख्या)

मुझे क्या चाहिए: एक निष्पादन योग्य में एकाधिक फाइल पथ में पास-इन

जैसा कि मैंने कहा पिछले सवाल, आप अपने आवेदन के अंदर इसके बारे में बुद्धिमान होना करने जा रहे हैं। अगर आप शेल विस्तार का उपयोग नहीं कर रहे हैं, तो इस फाइल का एक उदाहरण चुन लिया जाएगा, क्योंकि प्रत्येक फाइल को लॉन्च किया जाएगा। आपकी सामान्य रणनीति यह हो सकती है:

  1. जब कोई फ़ाइल पैरामीटर (% 1 ) के साथ एप्लिकेशन लॉन्च किया जाता है, तो जांचें कि आवेदन के किसी भी उदाहरण पहले से ही चल रहे हैं। / Li>
  2. यदि कोई अन्य उदाहरण चल रहा है, तो उस अनुप्रयोग पर कुछ प्रकार की इंटर-प्रोसेस कम्युनिकेशन (आईपीसी) चैनल खोलें।
  3. मुख्य उदाहरण के लिए इस उदाहरण के फ़ाइल पैरामीटर को संचारित करें।
  4. यह जानकारी प्राप्त होने के कारण मुख्य कार्यक्रम में तर्क लिखें।

php - Passing parameters in breadcrumbs -


I'm still a relative newcomer to the Zend Framework, please forgive me if this is a stupid question!

I am using breadcrumbs view assistant in the main layout of my application to provide breadcrumb functionality normally. Although I really need breadcrumbs that include parameters passing the user clicked tasks ...

So if you "From / controller / parent / id / 1" to "/ controller / Child / id / 2 "breadcrumb on the child's page" should be linked back to "/ controller / parent / id / 1" instead of "/ controller / parent /" / "/"

What are my options? Do I have a complete database of my database Need to create your Zend_Navigation tree with Green, so that every possible ID can be prepared for each action? Or when I am providing breadcrumbs, do I write my own helper to add additional parameters in the Z_Navigation_page object

The first option seems to be the path of least resistance, but seems very inefficient! However, I think it is in memory usage

Thanks for any help!

I think the answer is to use reset_perm in your navigation. Xml

inside your page you have to set reset_params = 0 as:

  & lt; Reset_params & gt; 0 & lt; / Reset_params & gt;  

See:

For example on our application, we use something like this:

  & lt; Config & gt; & Lt; NAV & gt; & Lt; FSMs & gt; & Lt; Label & gt; Home & lt; / Labels & gt; & Lt; Module & gt; Default & lt; / Module & gt; & Lt; Controller & gt; Index & lt; / Controller & gt; & Lt; Action & gt; Index & lt; / Action & gt; & Lt; Pages & gt; & Lt ;! - case - & gt; & Lt; Page_case & gt; & Lt; Label & gt; Case & lt; / Labels & gt; & Lt; Module & gt; Case & lt; / Module & gt; & Lt; Controller & gt; Details & lt; / Controller & gt; & Lt; Action & gt; Index & lt; / Action & gt; & Lt; Reset_params & gt; 0 & lt; / Reset_params & gt; & Lt; Pages & gt; & Lt ;! - Case production - & gt; & Lt; Page_case_create & gt; & Lt; Label & gt; Create & lt; / Labels & gt; & Lt; Module & gt; Case & lt; / Module & gt; & Lt; Controller & gt; Create & lt; / Controller & gt; & Lt; Action & gt; Index & lt; / Action & gt; & Lt; / Page_case_create & gt; & Lt; / Pages & gt; & Lt; / Page_case & gt; & Lt; / Pages & gt; & Lt; / FSMs & gt; & Lt; / Neo & gt;  


nsdata - iPhone - dataWithContentsOfURL: does not work for some URLs -


I am using NSDT to get content from a URL (RSS feed) and then parsing it . Although most of the URLs are full, some of them do not return any data.

These URLs are open on the web, so I know they are legitimate, but they do not just return NSData. One such URL - feed: //jpl.nasa.gov/multimedia/rss/vv.xml

Here's how I am using it (NSRR object Is correctly created)

  NSURL * feedURL = [NSURL URLWithString: [myUrl stringbading printing escapus encoding encoding: NSUTF8StringEncoding]]; NSDT * Data = [NSData Datatyh content of URL: feed URL];   

">

Switch to NSURL connection so that you have some representative methods to see that the debugger is taking place if you do not have it load Check the system docs happening.


javascript - email div content in php -


क्या सामग्री को एक विशिष्ट के अंतर्गत लेना संभव है और ईमेल सामग्री?

उदाहरण के लिए: अगर मेरे पास ऐसा कुछ है:

  & lt; div id = "1" & gt; & LT; ul & gt; & Lt; li & gt; & lt; / li & gt; & Lt; li & gt; ख & lt; / li & gt; & LT; ul & gt; & Lt; / div & gt;  

असल में मैं सिर्फ & lt; div & gt; संदर्भित करना चाहता हूं और पूरी सामग्री लेता हूं और इसे ईमेल कर रहा हूं। क्या डिव में सामग्री को कैश करने का कोई तरीका है? क्या यह संभव है? (जावास्क्रिप्ट? Php?)

धन्यवाद।

यह वास्तव में आगे क्या है पर निर्भर करता है आपके पास आवश्यकताएं आप एक jQuery स्क्रिप्ट को PHP स्क्रिप्ट के लिए सामग्री भेज सकते हैं, जो फिर उन्हें ईमेल करता है:

  $। Post ("email.php", {data: $ ("div # 1" )। Html ()}, फ़ंक्शन (परिणाम) {/ * संभाल परिणाम * /});  

और फिर आपकी ईमेल। Php स्क्रिप्ट निम्न के समान दिखती है ( नीचे दिए गए कोड का उपयोग न करें ):

  & lt;? Php $ to = "john@doe.com"; $ विषय = "एचटीएमएल डाटा"; $ संदेश = $ _POST ["डेटा"]; $ हेडर = "से: सर्वर & lt; server@doe.com>" । "\ R \ n" "सामग्री-प्रकार: पाठ / html" "\ R \ n"; मेल ($ से $ $ विषय, $ संदेश, $ हेडर्स); ? & Gt;  

Javascript cast from object to function -


Suppose I have a JavaScript function of the form:

  function () {warning ( Suppose I also have an applet, in which there is a method called Dustfile which takes the function as a parameter:  
  MyApplet. DoStuff (function () {warnings ("blah ");});  

Now suppose that the applet function gives success or failure javascript callback function based on the results of its calculations A. In the callback function, I want to execute function have to throw users to get my highly informative "blah" message:

  function callback (function) {()); }  

However, in the above example, the function is no longer considered the "function" type (the type of the "object" will return the type). Is the function possible to change the function, so that it can be executed? I have many hacks that can give me what I want, but they are very ugly and I was hoping that I was missing some simple.

Any help is greatly appreciated.

/ Div>

Try func.call ()


wpf - How can i be notified of a right click event of a Listbox in C# -


I am trying to determine if a user has right clicked on the existing listback entry or empty part, enabled Or the context menus to disable.

In WinForms (for a datagrid view) I was able to do this

  var result = DGV Task. Hit Test (EX, EY); Selected Boole Exists Selected = Results Type == DataGridViewHitTestType.Cell; In a datagrid view,  

I have now tried in WPF

  point pt = e.GetPosition ((UIElement) LBXWorkflow); HitTestResult Results = VisualTreeHelper.HitTest (LBXWorkflow, PT);  

The Result.VisualHit text box shows, if I click on existing text, but limit if I click on an empty space before or after the text on an existing line (which I use it wrong to determine if any entry was right clicked).

Any ideas, both listboxes and datagrid?

PLS check the code given below; This is a mouse button buttontone event handler that prints the item name under mouse pointer for box control if it is a private zeros-box box. 1_MouseRightButtonUp (Object Sender, MouseButtonEventArgs e) {Object Item = GetElementFromPoint (listBox1, e .GetPosition (ListBox1)); If (item! = Null) console; light line (item); Else Console Type ("no items found"); } Private Object GetElementFromPoint (ItemsControl ItemsControl, Point Point) {// You can use VisualTreeHelper.HitTest or itemsControl.InputHitTest method; Among them, the UII element element = VisualTriehaller as both the UIILEMENT. Hit Test (items control, point) will work. UIElement element = itemsControl.InputHitTest (point) as UIElement; While (element! = Null) {if (element == item control) tap back; Object item = itemscontrol ITEM Container Generator. ITomfort Container (element); If (! Item Ecloss (Dependency Property. Uet Valley)) return item; Element = (UIElement) VisualTreeHelper.GetParent (element); } Return tap; }

This list should work fine for the box


c# - converting xdoc or xelement into string? -


Can you easily convert xdocument and xelement into a string to store in DD?

Have you tried to use it or?

There are several options depending on what you want to do, but these are simple:)


ruby - Creating an XML document with a namespaced root element with Nokogiri builder -


I am implementing an exporter for XML data format which requires namespace. I am using builder (version 1.4.0).

However, I can not find the nockery to create a root node with a namespace.

This works:

  NotchGree :: XML :: Builder. NY || Xml | Xml.root ('xmlns: foobar' = & gt; 'my-ns-url')} .to_xml & lt ;? XML version = "1.0"? & Gt; & Lt; Root xmlns: foobar = "my-ns-url" />  

does this:

  Nokogiri :: XML :: Builder. NUE | Xml | Xml.root ('xmlns: foobar' = & gt; 'my-ns-url') {xml ['foobar']. Child} end.to_xml & lt ;? XML version = "1.0"? & Gt; & Lt; Root xmlns: foobar = "my-ns-url" & gt; & Lt; Foobar: child / & gt; & Lt; / Root & gt;  

However, give me & lt; Foo: root & gt; Like anything else it will not work:

  Nokogiri :: XML :: Builder.new {| Xml | | Xml ['foobar']. Root ('xmlns: foobar' = & gt; 'my-ns-url')} .to_xml no. Method: unknown method # namespace_definitions for # nokogiri :: XML :: document: 0x11bfef8name = "document" & gt;  

Namespaces should be defined before using, apparently, there is no way to add one to the root node.

I found, but had no answer, did anyone have any solutions?

  'rubygems' is required 'nokogiri' is required Nokogiri :: XML :: builder.nu {| Xml | Xml.root ("xmlns: foo" = & gt; "url") {xml.parent.namespace = xml.parent.namespace_definitions.find {| Ns | Ns.prefix == "foo"} xml ['foo']. Child}} .to_xml  

You can not use it before the namespace is defined xml ['foo'] that means it is root node. Thus, after the root-node, add the above named name after the namespace.


security - Why same origin policy for XMLHttpRequest -


Why do browsers apply the same basic policy to XMLHttpRequest? It's really inconvenient for the developers, but it seems that this is very little action in preventing hackers, they can still include Javascript from external sources (the power behind JSONP).

It looks like an old "feature" which is closely related to each other.

Because an XMLHttpRequest user passes the authentication token if the user exceeds the original proof or some cookies for example When the loggers were logged on, the attacker visited the site, the latter site could create XMLHttpRequest for example.com with full authorization to that user and read any personal page that the user (then

Because it is easy to insert a secret token in webpage pages There is a way to stop S-site-request-counterfeiting attacks, which means that the attacker.com can take any on-page action, the user could communicate with them at no time, or interact with them. Global XMLHttpRequest Global cross-site-scripting.

(Even if you had a version of XMLHttpRequest that did not pass authentication, then there are still problems. For example, an attacker might have other non- Your intran On public machines and read any file that can be downloaded to them, which may not be for public consumption. & lt; Script & gt; Tags already suffer from this kind of vulnerability, but the readable reactions of XMLHttpRequest can leak all types of files instead of those created by some unfortunately, which are parsed as JavaScript You can.)


emulation - How do I structure the memory map in an N64 emulator? -


According to Wikipedia, N64 is only 4 MB of RDRAM (8 MB with expansion pack), and other quantities are

itemprop = "text">

Similarly, small (4 KB or L1 cache). However, technical documents I found on Google State that your memory addresses range from $ 0000: $ 0000 to $ FFFF: FFFF - that's 4 GB! Since current 64-emulator emblems like Project 64 do not use 4GB RAM, how does memory map work? I have tried to look through various documents and such a way, and these are at least a little different. Anyone has some advice on this issue

Specifically, I have found a memory map:

  0x0000 0000 0x03EF FFFF RDRAM memory 0x03F0 0000 to 0x03FF FFFF RDRAM register 0x0400 0000 to 0x040FFFFSP Registers 0x0410 0000 to 0x041FFFFFD.D. Command Register 0x0420 0000 to 0x042FFFFF DP SPAN Registers 0x0430 0000 to 0x043FFFFF MIP Interface (MI) Registers 0x0440 0000 to 0x044FFFFF Video Interface (vi) Registers 0x0450 0000 to 0x045FFFFF odds Yo Interface (AI) Registers 0x0460 0000 to 0x046FFFF Peripheral Interface (PI) Registers 0x0470 0000 to 0x047FFFF RDRAM Interface (RI) Registers 0x0480 0000 to 0x048FFFFF Serial Interface (SI) Registers 0x0490 0000 to 0x04FFFFFF 0x0500 0000 0x05FFFFF Cartridge Domains 2 Address1 0x0600 0000 0x07FFFFFF Cartridge Domains 1 to know 1 0x0800 0000 0x0FFFFFFF cartridge domain2 to know2 0x1000 0000 0x1FBFFFFF cartridge domain1 to know2 0x1FC0 0000 0x1  
for FC0 07BF PIF boot ROM 0x1FC0 07C0 0x1F to C0 07FF PIF RAM 0x1FC0 0800 0x1FCF FFFF Safe 0x1FD0 0000 to 0x7FFF FFFF cartridge domain 1 address 3 0x8000 0000 0xFFFF FFFF External SysAD device

Regardless of how much memory you are copying, you do not need that more memory host machine Available on (you do not need 4 GB, and you do not need 4 MB). Instead, use a data structure where you can access your ammounted memory by the address value. You only need to store something in memory when you assign your space in your real memory.

However, it can be trivial to actually allocate the amount of internal memory described above.

Like offset theory, but address ranges you seem to deny the theory that the above list is completely: Simon, I will also accept the first volume. In addition, the whole "64" -bitt address space thing

Note that the majority of address space has been allocated for external interfaces (cartridges, etc.), not internal hardware resources.


css - How to create a drop-shadow around the template like artisteer does? -


I am new to CSS things; Yesterday (in fact) it has learned and since then I have made some templates, I am developing very fast, but there is one thing that I can not get enough of. How do you make a drop shadow around some parts of the template without destroying the layout or dealing with the new problems

I have created a CSS / HTML template that has a glass effect and I have a Was able to make the cover using float and full position within the relative division, but it does not work on IE 7 works on all FF versions on IE6.

My question is:

How do I create a drop-shadow around the template like an artist?