Posts

Showing posts from September, 2013

Is there an easy way to embed a Javascript interpreter in a C# application? -

संभव डुप्लिकेट: सी # एप्लिकेशन में जावास्क्रिप्ट को एम्बेड करने का एक आसान तरीका है? मैं अपने सी # आवेदन scriptable बनाने के लिए चाहते हैं मैंने अतीत में इसके लिए लुआ का उपयोग किया है, लेकिन इस उदाहरण में जावास्क्रिप्ट का उपयोग करना चाहते हैं। LuaInterface सी Lua एपीआई के लिए एक अच्छा सी # आवरण है और यह बहुत सी # में Lua एम्बेड करने के लिए आसान है और Lua API (मैं भी उस के रूप में अच्छी तरह से करने की कोशिश की है) के लिए एक प्रबंधित सी + + आवरण लिखने से बहुत कम दर्दनाक बनाया है। वहां एक है: जिंत ()

winforms - How to make a tab's name editable in C#? -

Then I have some tabs in the form, and I want to work it this way: When you click on the tab name, it becomes editable, and when I stop editing it stays with the new name. How do I do this with C # and winforms? You can dynamically create a text box and put it on the tab area so that the user It seems that they are editing the tab directly when the text box loses focus then you can put the typed value in the tab property.

header - iText HeaderFooter -- page number appearing on the next line -

I am creating a header with iText using the headerfooter object. The page number is always displayed on the second row of the header, even if there are so many rooms on the first line, and I'm not clearly putting a line break there. It seems that this problem only started during the upgrade of iText 2.1.5 from iText 1.2, but I did not clear anything in the iText source code. Does anyone else have this problem, or knows how to solve it? headstring + = viewReportTitle + "Page:"; // Set the second paragraph to the right HeaderFooter header = new HeaderFooter (new paragraph (headstrings, iTextHeadingFont, true); Header.setAlignment (Element.ALIGN_CENTER); ITextDoc.setHeader (header); The output looks like this: report title page: 1 I understand all those who are interested. The problem is resolved by changing the headerfooter parameter from the phrase to the paragraph. Change this line: headerfuter header = new headerfutter (new paragraph (headstrings,

Django Object Manager Problem -

So here's a question for a Django wizard. I inherited the object manager in some way with lines: class MyObjManager (models.Manager): def total_values ​​(self, myobj_id): return 49 def what_the_heck (manually , Poll_id): return 48 square TestMe (): def what_the_heck (self, poll_id): return 47 Now if I make a model that uses this object manager, then work as follows does not. MyObj (models.Model): x = models.CharField (max_length = 200) y = Model. Dataimfield ('Date published') objects = MyObjManager () kb = MyObjManager () testMe = TestMe () DRF all_values ​​(self): # Return one self.objects.total_values ​​(1) #b Return self.objects.yyy (1) # Returns C.B.V.H_HEKAQ (1) #D Returns 50 # A Return Self TestMe.what_the_heck (1) #f Returns self.objects.what_the_heck (1) Now it seems that A, B, C, D, E are at one time Respectively made a comment. Here are the results if I call myObj.total_values. (Where MyObj is an example of MyObj) A) Nothing B) Nothing C) None D) 5

apache - How to programmaticaly build an APR1-MD5 using PHP -

A lot I want to generate an htpasswd file entry from PHP. However, it needs APR 1 (Apache) style, as outlined in the original answer (no answer was shown how to apply the APR1 style), to work with mod_dav_svn I do not think so function crypt_apr1_md5 ($ plainpasswd) {$ salt = substr (str_shuffle) I have come to know that an implementation Implementation ("Abcdefghijklmnopqrstuvwxyz0123456789"), 0, 8); $ Len = strlen ($ plainpasswd); $ Text = $ plainpasswd '$ Apr1 $' $ Salt; $ Bin = pack ("H32", md5 ($ plainpasswd. $ Salt. $ Plainpasswd)); ($ I = $ len; $ i> $; - $ i - = 16) {$ text. = Substr ($ bin, 0, min (16, $ i)); } ($ I = $ len; $ i> 0; $ i & gt; & gt; = 1) {$ text. = ($ I and 1)? Chr (0): $ plainpasswd {0}; } $ Bin = pack ("H32", MD5 ($ text)); {$ New = ($ i & amp; 1) for ($ I = 0; $ i & lt; 1000; $ i ++)? $ Plain password: $ bin; If $ ($ i% 3) $ new = $ Salt; If $ ($ i% 7) $ new = $ Plainpasswd; $ New = ($ I

Windows 7 logo testing -

We are currently testing logos for Windows 7. We make it successful, although we face some warnings in case of testing. Test Case 7 warns "Executable C: \ Program Files (x86) \ abc.exe Closed Failed to do so. " Can anyone tell me how does this test? How can we avoid this? Test case 7 "Verify that the application has to restart the manager". You can get explanation in Quoted from the document: To pass this exam: Note: The application should be inactive and should not do any work during this test. Logic To avoid rejecting a Windows restart or shutdown request, an application must be stopped when the system does this Instructions, and if necessary, it must be restarted automatically. In addition, as a Windows Vista, now you only get about 2 seconds to get out of your app completely after receiving the WM_SHUTDOWN message, The app will fail in the test and will be killed by the OS.

Running BASH script from iPhone app? -

Actually, I'm thinking that the console script (from the iPhone app) to download a program from a repository Is written which I have set up, has responded, then after a time the program is deleted and respring, so it requires root privileges, and it is interactive that the user can determine how much the program Till late I have a script written to me, and when the phone is called from the mobile terminal, it works fine, but is it a way to do a jailbroken app (without the use of mobile terminal / ssh / bosprifs) Is it better to have a better way of achieving it? Thanks Jason is right here It is very restricted and as we all know that all apps Number of Sandboksd. But it is not impossible because the objective-C is just a C, you can use system ( "ls"); To execute an original LS command and if you look into your GDB output it works. Eltheo You can also use Popan to get the app to get the stream to work with data.

asp.net - Custom SiteMapProvider derived from XMLSiteMapProvider : How to load an xml document directly in BuildSiteMap() -

Each of our users needs to load a different XML Sitemap which logs in. This sitemap can come from a variety of sources (Webservice, database, file) and to be loaded at runtime. I designed it this way: When a user logs in, the custom XML is loaded for that user and put in session. In the BuildSiteMap () method of my custom SiteMapProvider, I have to load XML as a Sitemap, I know how to do this node-by-node, but my question is: If XMLSiteMapProvider loads sitemap data from an XML file Can I do this with an in-memory sitemap file (to change my XML) While it should be technically possible, I do not think it will be a good approach Because this is contrary to the idea of ​​a sitemap, which handles full site navigation and authorization by specifying users / groups for each node. xml version = "1.0" encoding = "UTF-8"? & Gt; Sitemap & gt; & lt;! - Other & lt; siteMapNode & gt; element - & gt; siteMapNode title = "support" des

load balancing - Difference between session affinity and sticky session? -

What is the difference between session signage and sticky session in context Load Balancing Server? I have seen those terms in a different word, but there are several ways to implement it: / P> Send a cookie on the first reaction and see this for the people who follow it, the cookie tells which real server sends. Bad If you have to support cookies-free browsers Participation based on the requester's IP address. Bad If it is not stable or many come through the same proxy. If you authenticate the user, then the partition based on the user name (this should be an HTTP supported authentication mode). The state is not needed. Let customers kill any server (send the state to the customer and send them back) This is not a sticky session, this is one way to avoid doing this. I suspect that the sticky cookie can be done in a manner, and this relation can refer to # 2 and # 3 in some contexts, but it is not that I have noticed that Use it (or use it for yo

syntax - What is the recommended way of writing anonymous functions in C#? -

var seq = अनग्रामनीय.रेंज (1, 10) .Reverse (); Var sort1 = seq.OrderBy (i = & gt; i); Var sort2 = seq.OrderBy (प्रतिनिधि (int i) {वापसी i;}); मुझे लगता है कि sort2 अधिक स्पष्ट है, लेकिन सॉर्ट 1 छोटा है। इसके अलावा, मुझे वास्तव में अंतर नहीं पता है यह करने का अनुशंसित तरीका क्या है? लैम्ब्डा अभिव्यक्ति (आईएमओ) प्रत्येक में गुमनाम तरीके से बेहतर है मामले को छोड़कर जहां आप पैरामीटर के बारे में परवाह नहीं करते हैं, उस स्थिति में एक अच्छा शॉर्टकट है: // लैम्ब्डा अभिव्यक्ति में पैरामीटर प्रकार इवेंटहैंडर एक्स = ( प्रेषक, आर्ग्स) = & gt; Console.WriteLine ( "हाय"); // बेनामी विधि उन्हें इवेंटहैंडर एक्स = प्रतिनिधि {कंसोल.प्रकाशलाइन ("हाय") को अनदेखा कर सकता है; }; लैम्ब्डा अभिव्यक्ति में दो अन्य "समस्याएं" आईएमओ: जाहिर है वे उपलब्ध नहीं हैं यदि आप सी # 3 का उपयोग नहीं कर रहे हैं। (हालांकि आप लक्ष्य VS2008 से .NET 2.0 और अभी भी उनका उपयोग करें।) पैरामीटर रहित लैम्ब्डा एक्सप्रेस के लिए वाक्यविन्यास कुछ हद तक clunky है: () = &am

sql - Delete foreign keys in sybase 12.5 -

मैं दो तालिकाओं है: टेबल dbo.country बनाएँ (cntry_id VARCHAR (2) नहीं NULL, नाम VARCHAR (50) नहीं NULL, बाधा pk_country प्राथमिक कुंजी (cntry_id) टेबल dbo.city (city_id VARCHAR (3) नहीं NULL, नाम VARCHAR (50) नहीं NULL, cntry_id VARCHAR (2) नहीं NULL, बाधा pk_city बनाएं प्राथमिक कुंजी (city_id), विदेशी कुँजी (cntry_id) दें संदर्भ dbo.country (cntry_id)) मैं तो मैं तो तालिका ड्रॉप कर सकते हैं FK constrait ड्रॉप करने की कोशिश कर रहा हूँ। FK definitley मौजूद है: EXEC sp_fkeys देश pktable_qualifier pktable_owner pk_tablename ... xxxxxx xxx देश cntry_id .... (DB नाम छिप ) लेकिन दोनों विदेशी, देश, विदेश, शहर sp_dropkey शहर EXEC, देश sp_dropkey EXEC वापसी 264 त्रुटि (174 9 9) तालिका या दृश्य के लिए कोई विदेशी कुंजी मौजूद नहीं है। Sp_dropkey (263) क्या कोई इन कुंजियों को कैसे छोड़ सकता है? पहले से धन्यवाद रयान परिवर्तन तालिका dbo.city DELETE विदेशी कुँजी [enternameoftheforeignkeyhere] अन्यथा मैं नहीं जानता कि क्या हो सकता है कारण। त्रुटि संदेश की सं

security - Create a Survey in SharePoint 2007 where external users can submit but -

In SharePoint 2007, I have an assignment to present surveys for filling out and submitting external users to a user, but they are not able to see the results submitted (so they do not see that others have access to ) This survey will be done for my vendors to submit information about them for our records. I am open to any suggestion about completing this goal .... To be properly configured, the users will be able to view their own submissions, but others who have not registered: Create a new survey and fill it with your questions. Select Settings -> Survey Settings Advanced Settings from the new survey list > Set the Access permissions section Read access and Edit access to only on in the item And OK .

c# - Query Entity Framework including records that have not been committed -

It is possible to ask a reference, make changes in one unit, and then it is possible to get the reference back and get results. Set back which contains a converted unit without including saved things? (I do not want to save because I want to rollback) I know that I can withdraw changes using GetObjectStateEntries, but I am interested in the whole dataset .. Not only the changed institutions. I think the only way to do this is with a savings window, but wrap around a transaction around everything so that I can do a rollback if my status is not complete. Or am I doing something easy? Why should not the group of existing institutions be added? I tested it and it seems that works - though it does not have an account to be removed, but you should be able to get this idea: // Obtain those entities The ones that have been inserted or modified on projects = myObjectContext.ObjectStateManager.GetObjectStateEntries (EntityState.Added | EntityState.Modified). Where (x => x.Enti

java - How can I run unit tests for just the source files which have changed? -

Is there any way i can take an ant to run unit tests for chima classes? For example, if MyClass.java is outdated, then Ant will build MyClass.class, then I want to run MyClassTest and MyClassTestSuite as well if they exist. This nomenclature is not based on the conference. I am fine with using annotation or any other method. Edit: Many people have shouted on saying that this is a bad idea. It will be , , if I plan on checking all the unit tests without running, there are more than 16 unit tests in my main project, which takes about 20 minutes to run the run. Before the check-in I will drive them all, but every time I change a file, then it is completely impractical to run the entire suit. Sorry, I should have given more context. I do not recommend this approach, it is a good opportunity for errors initiated by side effects .

wcf client - How do I return an interface from a WCF Service? -

मान लें कि मेरे पास कुछ इंटरफेस हैं: सार्वजनिक इंटरफ़ेस IFoo {IBar doStuff (); } सार्वजनिक इंटरफेस आईबीआर {स्ट्रिंग थिंगो {प्राप्त; }} मैं इस कोड को मेरे कोड बेस में उपभोग कर रहा हूं। IFoo प्रक्रिया को एक अलग प्रणाली (एक्स 64 बनाम एक्स 32 का अंतर) पर स्थानांतरित करने की आवश्यकता है, यह हमारे WFC का उपयोग करने का कारण है मेरी WCF सेवा इस इंटरफ़ेस को कार्यान्वित करती है। जब मैं "सेवा संदर्भ" बनाते हैं तो प्रॉक्सी स्टब्स बनाये जाते हैं लेकिन अंतरफलक बदल जाता है। सार्वजनिक इंटरफ़ेस IFoo {वस्तु doStuff (); } मैंने आईबीआर / बार को कोई अंतर नहीं के साथ एक डाटासेवा और डाटा कंट्रेंट के रूप में परिभाषित करने की कोशिश की क्या मेरे इंटरफ़ेस का उपयोग करके प्रॉक्सी कोड उत्पन्न करने का कोई तरीका है? मैं सोच रहा हूं कि नकली वस्तुओं का परीक्षण करने के लिए मेरे इंटरफ़ेस का एक ऑब्जेक्ट उत्पन्न हो सकता है, तो क्या मुझे यह सेवा भी सम्मानित करने में सक्षम नहीं होना चाहिए? या कुछ मूर्खतापूर्ण और गलत किया है? बैकर को ठोस और एक डाटा कंट्रेक्ट की आवश्यकता है डब्ल्यूसीएफ वितरित व

ruby on rails - Using cucumber and Rspec to develop a SOAP client with BDD -

As a learning experience, I am developing a small Rail application that is an existing SOAP API / Web service Handsoap gem) and will present just one user gathered information. I like to use rspec and is being used for cucumber testing of my applications. The part which has stumped me is to check the conversation with the API, meaning 'non-presentation' part of leaving XML requests and reactions. Any tips and hints have been given! Thank you! Take a look at the gem. This network helps stub the interoperability, that is, you can create test responses: FakeWeb.register_uri (: "http://example.com/ Test1 ",: body = & gt; Hello World!)) and the inability to send http requests: FakeWeb.allow_net_connect = false nets :: HTTP.get (URI.parse ("HTTP://example.com/") => FakeWeb :: increases NetConnectNotAllowedError

sound lib python -

im looking for a sound lid for python which can increase the amount of a sound file per frame Or software that can make a noise gate, likes the command line software thanx !! The library can do this specifically, this library supports WAV, AU, AIFF, MP3, CSL Supports SD, SMP, and NIST / Sphere files. It can run the sound, power spectrum analysis and filtering.

SQL question, DISTINCT returned values in multiple UNION ALL'ed statements -

I have a SQL statement that is a union of many queries that return everything: select key as select key from the table where XYZ union selects all the keys from the table as the DISTINCT id where the XYZ union all ... My question is that there are some questions that the key comes back overlap , And I really want the last key field to be different Bring back the looking values Any ideas? Use UNION instead of UNION ALL.

regex - Problem with regular expression replacement in Visual Studio 2003 -

I am in the process of converting some latex documentation into a redesigned text and some problems with a regular expression in Visual Studio 2003 I'm trying to convert \ emph {text} to * text * using the Find / Replace string by following: \\ emph \ {([^ \}] *) \ } * \ 0 * However, using this pair, I was converting \ emph {text} to * \ emph {text} * which I Mid was not. When I use * \ 0 * instead of * * 1 *, I get ** as a replacement result. Am I missing or do not understand the rules of the group? Thank you. I think that VS In Regex replacement syntax, \ 0 is a full-matched string, while \ 1 is the content of the first captured variable (\ 2 second and so on) therefore: \ 0 < / Em> However, using this pair, I was converting \ emph {text} to * \ emph {text} * which was not what I expected. To confirm this way, \ 0 is a complete matching string. When I get ** * * instead of * * * I get the replacement result **. Perhaps you do not match anyt

sanitize - Php safe output -

When user input output I use this function: function BBQ ($ Text) {$ Text = htmlspecialchars ($ text); $ Text = nl2br ($ text); $ Hitta = array ("'\ [b] (. *?) \ [/ B]' is', '' [[]] (. *?) \ [/ I] ''); $ Byt = array ("& lt; b & gt; \\ 1 & lt; / b & gt;", "& lt; i & gt; \\ 1 & lt; / i & gt;"); $ Text = preg_replace ($ hitta, $ byt, $ text); Return $ text; } Is it safe enough? I put all in db with mysql_real_escape_string and output it with htmlspecialchars . I am a very suspicious person: P thanks Already very good Explanation on this topic is, of course, you definitely need to work on your in-and-output, it is actually safe!

sql - Best way to add a new column with an initial (but not default) value? -

I have to add a new column in a MS SQL 2005 database with an initial value. However, I do not want to automatically create a default barrier on this column. At the time that I correct the column default / initial value, but it can change over time. Therefore, instead of accepting a default in future access to the table, a value must be specified. The best I can come up with: ALTER TABLE tbl ADD COL INTEGER NULL Update tbl SET col = 1 ALTER TABLE tbl ALTER COLUMN COL INTEGER NOT NULL This is slightly ineligible for tables on large scale (100,000 to 1,000,000 records). I used to add columns with a default and then with the removal of the default barrier. However, I do not know what the default barrier is, and it will not use Cisco and it will put the database in specific knowledge. Please, should be a better way. me ALTER TABLE tbl ADD COL INTEGER CONSTRAINT TEMPname DEFAULT 1 First, and <(Probably within the transaction) they are specified after.

parsing - How can I define an INI file grammar using the BNFC? -

How to write BNF with my label to make INFi Parser for me? I have yet received the o__O! entry point file; Comment "#" ; Token id (letter | numbers | ["-_ '"]] +; Th File :: = [section]; Sect Section: = "[" id "]" [statement]; Bind Statement: = id = "id"; Separator Details "\ n"; Terminator section ""; [name] #x = 10 y = 20 Pars succeeded! [Surname] [name (name "name") [bind (id "y") (id "20")] [linerized tree] [name] y = 20 < Pre> [name] x = 10 #y = 20 Pars succeeded! [Abstract syntax] Ine [sect (id "name") [bind (id "x") (id "10")] [alkaline tree] [name] x = 10 ODO I am stuck ... I asked a BNFC devs and quoted it here: Space characters such as Newlines are not well supported in tokens because the hard-wired laser type "Space" in BNFC. The idea is that the spaces can not make sense in "well-beha

Prevent UIWebView sliding off the screen (iPhone) -

मेरे पास निश्चित साइज़ सामग्री के साथ स्क्रीन पर एक पूर्ण स्क्रीन UIWebView घटक है, इसलिए कोई स्क्रॉलिंग आवश्यक नहीं है जब मैं स्क्रीन को ऊपर या नीचे बढ़ने में स्क्रीन की ओर झुक जाता हूं। एक स्क्रॉल-सक्षम घटक होने पर भी एक ही प्रभाव पूरे आईफोन पर अनुभव कर सकता है मैं अपने आवेदन में इस घटना को रोकना चाहूंगा। कृपया कुछ प्रकाश डालें ... ऐसा लगता है कि एक जावास्क्रिप्ट की क्षमता रखने के दौरान स्क्रॉल करने से रोकता है लिंक पर क्लिक करें: document.onload = function () {document.ontouchmove = function (e) {e.preventDefault (); }}; मैंने इसे परीक्षण नहीं किया है और कोई दस्तावेज नहीं मिल सकता है। मैं इसे एक हैक मानता हूं।

c# - Most elegant way to generate prime numbers -

What is the best way to implement this function: ArrayList generPrime (int N) This function generates first n primes (edit: where n> 1 ), so Returns {2, 3, 5, 7, 11} with generPrimes (5) ArrayList . (I'm doing it in C #, but I'm happy with Java implementation - or any other similar language for that language (not hackel)). I know how to write this function, but when I did it last night, it was not as good as expected. Here is who I came with: ArrayList Generate Prime (int to generate) {ArrayList primes = new ArrayList (); Primes.Add (2); Primes.Add (3); While (primes.Count & lt; toGenerate) {int nextPrime = (int) (primes [primes.Count - 1]) + 2; While (true) {bool isPrime = true; Foreach (int n in primes) {if (nextPrime% n == 0) {isPrime = false; break; }} If (isPrime) {break; } Else {nextPrime + = 2; }} Primes.Add (nextPrime); } Return Primes; } I am not very worried about speed, although I do not want it to be clearly disabled. I do not care w

exception - wpf DoDragDrop IndexOutOfRangeException -

I have found this solution that I am trying to implement drag and drop behavior among a group of ListViews Uses full properties: But whenever I try to drag and drop, I get the following error message in the debug log: My 'xx The first chance of type 'System.IndexOutOrRangeException' occurred in ' exception I tracked it down and it You can see that DragDrop.DoDragDrop is running, but since the exception has just been swallowed, I do not know where this code is being thrown away from. How can I find the exception? The main problem with my problem was that I do not know how to break the Visual Studio when An exception was thrown within the WPF code because I was doing drag and drop operations, this can be done under the debug menu in Visual Studio: debug -> exception -> exception Locate it that you are interested in and click on the checkbox to make the debugger breakdown exception The expertise.

c# - Performance of nested yield in a tree -

I have a tree-like structure, each element of this structure should be able to calculate all the elements that it is root . Let's call this method IEnumerable & lt; Foo & gt; GetAll () . So if we have a < - Top Root / \ BC / \ / DEFG call GetAll element returns {C, F, G} } (the exact order of elements will be good, but this is not required). I think everyone knows that already. The current implementation of GetAll looks like this: public IEnumerable & lt; Foo & gt; GetAll () returns yield; Foreign (Fu Fu in My Childhood) {in foreach (foo.foo.GetAll ()) F (F) returns F; }}} In the previous implementation, I returned a list and hair-fuzz was List.AddRange () . Added by using . My question is whether the version has been implemented correctly using the yield or if it should be improved (especially in the case of performance) or it is simply bad and I instead use list < Want to stick to / code> s (or ReadOnlyCollections )? Th

How can I validate enum types as Perl subroutine arguments? -

Closing, how can I check the dynamic type (or if it is capable of using strictly typing styptic type) The true type of suburban logic is happening? package phone :: type; Continuous {Home = & gt; 'Home', Task = & gt; 'work', }; Package head; Sub Fun {my ($ my_phone_type_enum) = @_; # How to check my_phone_type_enum, either the phone :: type-> home or phone :: type- & gt; WORK or ... but not 'dog' or 'cat'? } HAPPY (Phone :: Type-> HOME); # Valid joke (phone :: type-> WORK); # Valid joke ('dog'); Compile # run-time or time Here's a way: #! / Usr / bin / perl package phone :: type; Strict use; Use warnings; Continuous {Home = & gt; 'Home', Task = & gt; 'work', }; Package head; Strict use; Use warnings; Sub Fun {my ($ phone_type) = @_; Phone :: Type-> ($ Phone_type) or die '' $ phone_type 'is not valid \ n ";} Funny (' home '); #private joke (' work '

iframe - FB Feed dialog not asking for user comments -

Below is the FB feed dialog (iframe solution), the user is not asking for comments on the dialog, the dialog appears and Post is sent to- function callback () {warning ("thank you"); } Function showFeed () {FB_RequireFeatures ([ "XFBML"], function () {FB.Facebook.init ( 'kkkc', '/facebook/xd_receiver.htm', NULL); FB.ensureInit (function () {var tpl_data = { "Images": [{ "src": "logo.gif", "href": "kkk"}], "city": ""}; var user_message_prompt = "what do you think about this?"; Var USER_MESSAGE = {value: "here write your comment"}; tData = {}; FB.Connect.showFeedDialog (439,384, tpl_data, null, null, null, FBkRequireConnectkrequire, callback, user_message_prompt, USER_MESSAGE);} < / Code> (added additional tap to code, still not working!) Note: Communicating with Firefox seems to be empty when next Until the upper corner is closed from the X. I

asp.net - Photos and Database -

I am working on a website, where users can upload photos of the advertisement's product. I am saving photos in a folder on the Web in the table where I refer to the photo, there is an important field photo, which is the identity field (primary key). The following methods are in my repository photo photo = rep.NewPhoto (); Photo.Title = "Some Title"; Rep.InsertPhoto (photo); Rep.SaveAll (); Rep.SavePhoto (photo, uploadedPhoto); Rep.SaveAll (); I am using SQL from my Linq for data model. Now my problem is, if I want to save my file by name which is coming from Photo ID, then I will have to call rep.SaveAll () method to get a newly created photo and then upload the photo I have to save with ID and then I have to change it in the SavePhoto () method, to call it SaveAll () method to update it again. The other option is to save the file first with some random file number and then save the photo record in one step This is the second approach. Photo photo = rep

sql - How to create a "singleton" scheduled job in oracle? -

This is probably just a glossary, I'm missing out on finding out how to do this: To run regularly every 5 minutes, however, keeping in mind that the two instances are not going to run at the same time, i.e. the next event will be postponed or abandoned if the first run is 5 minutes Are longer. Is this the easiest / most beautiful way to achieve? DBMS_Job takes care of her. Just use it.

javascript - How to Access iFrame Checkbox Elements -

Can anyone tell me if I have a web page that has the checkbox (parent) and this web On the page, I also have an IFrame that comes from another page which displays many records, in which each record also has a checkbox (children), if I stick to the parent checkbox, then I have all children Iframe want to cascade in check box You can also disable these children's checkboxes as well as within. In fact, may appreciate some help with this because I'm not sure how to use the check box within the iframe. My iframe definition man page is similar to: & lt; Iframe id = "iframe1" src = "'+ url +' style =" border: none; Width: 79 9px; Height: 200px; "Frameborder =" 1 "fraszing =" 0 "margin width =" 0 "margin width =" 0 "> Any example / website Thanks Tony. OK, here's an example. First of all, here is the source for iframe content (I called it frame page html) ... & lt; body &

.net - Is a code only ASP.NET Header and Footer possible? -

I have a global header and footer in which there is a database connection and the headers and footers are different and this ASP. Net - This should be done before any HTML output and output to the footer after any HTML. I can not find any easy way to do this, like classic ASP - if possible please post an example or thank you, thank you. A little more detail is that I have a SQL connection string, then I want to use a single SQL object in all pages on the website. - Connection in connection string and headers, and disconnected in the footer. Your use posts headers and footers Many people believe that you really want to make HTML Which make a visible header and footer in the output. Therefore the number of references to master pages in the answer. Although I'm guessing in a different direction. You have a classic ASP page that contains the inline code from the file contained, then the main ASP page uses the contents included in the body, then the final file included be

database - install sqlite3 on mac os x? -

I'm trying to update my version of sqlite3 on Mac OS X 10.5.7. I have downloaded the source code which is recommended for UNIX programs like Unix, I compiled instructions in the remixed file and followed the instructions and everything seems to work well. However, when I check the version number of sqlite3, it stays at 3.4.0 (the older version). Why is it like this? What am i doing wrong Most likely you can find it at a different location on the original & mdash; One or whatever is not seen in $ path or at all.

How to programatically get the latest commit date on a CVS checkout -

For a script I am working to implement bifurcation using CVS, I have to find out that What's the 'timestamp'? Current checkout In other words, if I am on a branch / tag, then I should know that the previous timestamp was assembled for that branch / tag. If I'm on the head, then I want to know the last timestamp on the head. I know this is not a 100% guarantee, because CVS checkouts can file different timestamps / modifications / ... but one-on-one-of-most case solutions are right by me Are there. Knightley, I thought cvs log -n | Grep ^ dated: | Sort | Tail-n1 Cut-d \; -f1 It was going to do this, but it has come to know that it goes through the entire history, for all the branches / tags. CVS files on different timestamps on branches, any time to get the information for the branch The accuracy of choosing a file is hardly worth it. However, it may be better that if there is some file that will change often, for example, in one of my bases, there is

build - Debian: create user during packaging -

I am repeating some software (which has its own installer) for personal use under a Debian-based system This software has already been compiled (no source), so I basically run the installer in the $ DESTDIR tree. Unfortunately, the installer requires that the system username and group name first have been created. Now, I know that before making (and installing) the Debian package it is a simple matter to "hand", but I am thinking that "creating a fake user" (while in the form of a route with a futuristic Running) is possible to debuild. Editing debian / preinst.ex and debian / postrm.ex files works to do those tasks, but also build Phase, where they become unnecessary after user builds. So basically this allows a Debian build tool (and run the tool within Build) to have a certain user already exist "Trust". Lack of running in a chroot-ed environment (like a pbuilder), how can I do this? It's a bit late, but my best guess would be a

flex4 - How do you remove the border of a Flex 4 TextArea Component (spark themed halo) -

With Flex 3 SDK you need to set a straight border, thickness style to 0 or border border to anyone No. With Flex 4 SDK ads Spark theme, it has no effect. Try something like this: borderVisible = "false "

generics - Java 6 Map.get() Type Safety Unexpected Behavior(?) -

संभव डुप्लिकेट: नक्शा अंतरफलक के लिए जावडॉक्स () के अनुसार, प्राप्त की परिभाषा वी मिलती है (ऑब्जेक्ट कुंजी) वह मान देता है जिस पर निर्दिष्ट कुंजी मैप की जाती है या नल यदि यह मैप है कुंजी के लिए मानचित्रण नहीं। कोड उदाहरण: मानचित्र & lt; InstrumentInfo, Double & gt; Moo = नया हैशमैप & lt; InstrumentInfo, डबल & gt; (); Moo.get (नया पूर्णांक (5)); मुझे उम्मीद थी कि उपरोक्त कोड अपवाद फेंक देगा या कम से कम एक चेतावनी देगी। मुझे उम्मीद है कि जेनेरिक और प्रकार की सुरक्षा के साथ, विधि प्राप्त करें प्रकार के एक पैरामीटर में ले जाएगा प्रकार वस्तु लेने के लिए क्या कारण है और नहीं? इस प्रश्न में चर्चा की, साथ ही साथ। ।

iis 6 - CS0234 error with System.Linq namespace in ASP.NET -

In my company, we have expanded the environment for our web applications (development, scaffolding, production). I have created a bunch of changes in one of my applications and posted them in the development environment (Windows 2003 w / IIS 6.0). I had to make an immediate change to one of the user control files which needed to solve the problem with the current production application. I just received the following ASP.NET 2.0 compilation error in a file staging environment (Windows 2003 w / IIS 6.0), which is an exact copy of the output. Exception type: HttpCompileException Exception Message: d: \ inetpub \ myapp \ BaseControl.cs (3): Error CS0234: Namespace name 'Linux' namespace does not exist in 'System' Remembering an assembly reference?) I have copied the original file from the output (Windows 2003 w / IIS 6.0) back down on the platform and get the same error I also got the application pool Recycled and restarted. I still get this result. Has everyo

flash - Set Flex component width to 100% at runtime? -

If I am creating an input field through MXML , then I 100% . But I can not do this on a runtime through an action script. This works: & lt; Mx: text input ... width = "100%" /> This collection is used, width is a number, a string does not say: var textinp: TextInput = new TextInput (); SomeContainer.addChild (textinp); Textinp.width = "100%" How do I set 100% as the size on the component created on the runtime through the action script? instead of width instead of percentwidth Use the attribute. Then, the third line of your code will be: textinp.percentWidth = 100; It slipped me for a while too.

c# - Validate a Word 2007 Template file -

I am developing a solution that allows people to upload a DOCX file as a template. This template is used to create Word documents with databases documents What to do once I get a template upload, to check it for errors. (I do not want the template to be used when my parser is crashing.) I have seen a question about a word template, but it is not enough to validate the integrity of the file. Of course, opening the file, validating XML there, and doing the same thing is possible, but this is the CPU's intensity and if I want a different perspective. Is there any solution that is part of Open XML SDK or other standard methods? Any thoughts are apreciated. in C # close public static Bool isDocumentValid (word processing document) Mydoc) {OpenXmlValidator verifier = new openexvalidator (); Var Errors = Verifier Validity (mydoc); Foreach Debugging Errors Error (Validation Error in Error). Write (error description); Return (errors.Count () == 0); }

c# - Convert System.Windows.Media.Brush to System.Drawing.Brush -

How can I convert a system. Windows Media. System system Drawing Brush? I am trying to get the color of a system. Windows.media.brush was formatted in a system. Drawing.Color Object. The following solution does not work because it requires a solid color object, while the object I need to change is a system.windows. Media. Brush object: public system. Drawing Caller GateColor (System. Windows Media, Solid Coulobrish Obrish) {Return System. Drawing Color .FromArgb (oBrush.Color.A, oBrush.Color.R, oBrush.Color.G, oBrush.Color.B); } I believe that you get it to be a solid coiler Can put in the form of a brush. / P> Try doing something like this: MyColor = ((SolidColorBrush) MyMediaBrush). Colour;

What is the best way to re-use exception handling logic in C#? -

I have two functions that have enough logic but very exception handling: public Zero DoIt1 / DoIt2 has different arguments, but the same exception handling {try ... doIt1 logic (MySpecialException myEx) {Debug.WriteLine (myEx.MyErrorString); throw; } Hold (exception e) {Debug.WriteLine (e.ToString ()); throw; }} It is not possible to use single entry point for DoIt1 and DoIt2, because what is the best way to block exception blocks from them? It depends ... if there is too much similarity, As a parameter, you can either talk in the form of an interface or representative: Zero Fu (Action Cheat Toado) {If Tudo == blank) Throw new logic; ("Cheese trudo"); Try {thingToDo (); } Hold {...} // many} and call as: FU (representative {/ * logic one * / }); Fu (Rep. {* * Logic B * /});

asp.net - Is it possible to add a UserControl to a Composite control? -

I am trying to create a composite control which is flexible, based on some parameters, I would like to load the control in my User Controller in the CreateChildControls method. Accurate UserControls do not know design at the time Just as a quick example, I tried with "strict coded" user control and it failed: protected Override Zero CreateChildControls () {Control UserControlControl = Page.LoadControl (Typf (MyUser Control), Faucet); Controls.Add (UserControlControl); Label regular controller = new label (); RegularControl.Text = "This is displayed"; Controls.Add (RegularControl); Try the following: Protected Override Zero CreateChildControls () {Control UserControlControl = Page.LoadControl ("~ / path / to / control.ascx"); Controls.Add (UserControlControl); }

jsp - Setting a default value to a param in s:include -

I am writing a small widget in struts, which I want to include. As long as I do not have an altitude of altitude, the height of the widget should be automatically For example: # Example 1: & lt; S: Include value = "myWidget.jsp" & gt; & Lt; S: Ultimate name = "height" & gt; 300px & lt; / S: Ultimate & gt; & Lt; / S: Included & gt; # Example 2: & lt; S: Include value = "myWidget.jsp" & gt; & Lt; / S: Included & gt; Inside myWidget.jsp, I can reach the height of the value by using $ {param.height}. But if I do not pass the altitude altogether, then it remains simple. I want to explicitly set the value to "auto", how can I do this? You can use it in the original tag. & lt; C: Out value = "$ {param.height}" default = "auto" />

autotools - What is the best way to AC_CHECK_LIB a library that has additional external dependencies? -

I wrote a library that has dependency on libxml ++ and curl and I have to find out how to use it I wrote The file config.log for the new package AC_CHECK_LIB on my library in another package indicates that curl _ * and There are undefined references of xmlpp :: * . I have the PKG_CHECK_MODULES setup, I already have a curl in the package and already in my new package, but they apparently have their own library for < Code> AC_CHECK_LIB are not available for calls (I have check and curl for Limbxml ++ before check for my library) Why not provide just one pkg-config metadata file ( * .pic) for your package Es. In this way, customers can use PKG_CHECK_MODULES and things will just work. But the fact that you are experiencing this problem is that you should libxml ++ and libcurl- to your library- and you probably should have on most modern systems (including Linux), shared libraries about their reliance Know in

Php, date manipulation? -

I am new to php and i would like to know some date manipulation things in php. // Get current date $ date = date ("Y-M-D"); What if I want to reduce the current date and a specific date, so says "today - 2008-06-26"? If today, a customer accepts today's date 2009-06-26, after 1 week I Want to delete my account from my database, how do I do this? (I am using mysql) What can we do if we store the user's date in our database? For example, we can store the date of the user's fleet, so when he sent some emails to him on his late day. What else can you do? First of all, you need, and To understand the difference between is used only for the purposes of use. Never use it for mathematical additions. returns the current timestamp (a int represents the current time and date). , with no parameters, is similar to the parameters, this allows you to get the timestamp for a set time parameter is in this order: hour, minute , Seconds

mks integrity - How to see the list of files checked in to MKS after creating the devpath? -

After creating Devpath in MKS, developers will check MKS in code. After the creation of Devdas, I want to search for the list of files found in MSK (from beginning to end). Please help me Thanks You can use the command line interface "rlog" Devpath But to see all the changes at the command The original syntax will look like this: si rlog --devpath = Version2 You can also use Hopefully It helps.

winapi - Taking a screenshot of the window in the background -

There may be a problem in taking a screenshot of the window content, if that window overlaps with any other application. Unless you find a method in the application to render it in off-screen bitmap, So you get only the visible part of the window.

java - Get height of multi line text with fixed width to make dialog resize properly -

I want to create a dialog that has some kind of text element (JLabel / JTextArea etc.) which is multi-queued and wrapped word. I want the dialog to be of a certain width, but the height should be adjusted how big is the text I have this code: import static javax.swing.GroupLayout.DEFAULT_SIZE; Import java.awt.event.ActionEvent; Import java.awt.event.ActionListener; Import javax.swing *; Public class text size problem increases JFrame {public text size problem (string) {string dummies = ""; For (int i = 0; i <100; i ++) {dmestress + = "word" + i; // Create a longer text JLabel text = new jlabel (); Text.setText ("& lt; html>" + Dummy Staster + " "); Jebton PackMetton = New Pocket ("Pack"); PackMeButton.addActionListener (New Executioner) {Public Zero Action Action (Action Event e) {Pack ();}}); Group Layout Layout = New Group Layout (this.getContentPane ()); GetContentPane () setLayout (layout). Layout.setVerticalGroup (

svn - Is there a command which will print the path of the file in the repo-browser in the command line -

dupe Is there a command that will print the path of the file in the repo browser command line In? The SVN diff only prints the name of the file. Thank you. To get details about the file, click svn info & lt; File & gt; . This includes the URL, which includes its path in the repository in case of a file. If you only need the path without the repository route, you get the repository root in the output, so it can be easily filtered.

lamp - Server-Side Web Framework to use for an Embedded Device -

Do you recommend using server-side web language / framework on an embedded device? The device is similar to a linky wireless router. Ideally, I'm looking for a framework that will run well on a device with fast, efficient, and limited resources (CPU, memory etc). Some initial ideas are PHP, Django, or even mod_perl. Justin, it seems that your platform is relatively much a lot of HP. For this reason, I would say go with the structure, you are the most comfortable. PHP and mod_perl are very fast and efficient, this is exactly what module is available for the http server you are running, it really depends. Your query led me to take a peep on the framework using the Tomato firmware for my web interface, their servers are with the micro_httpd / mini_httpd CGA extension, and the page is asp. Some javascript has been thrown in it. Here's a link where you can download the source and find yourself if your device is similar to a wireless router, you should check other router

algorithm - Getting the computer to realise 360 degrees = 0 degrees, rotating a gun turret -

I am creating a game and it can rotate a turret gun gun 360 degree in a computer controlled gun turret. This gun (objdeg) uses trig to detect the need for the angle and angle of the gun is stored in the current angle (gundeg) The following code sets one Will rotate the gun at the speed of if (objdeg> gundeg) {gundeg ++; } If (objdeg The problem is that if there is an object at 10 degrees, the gun rotates, shoots it and destroys it, if another target appears at 320 degrees , Then the gun will rotate 310 degrees digit How can I fix my code so that it is not stupid? If you need to rotate more than 180 degrees in one direction to target the turret It will be faster to rotate the other direction. I'll check for just this and then to rotate in the right direction if (objdeg! = Gundeg) {if ((gundeg - objdeg)> 180) Gundeg ++; And Gundag -; } Edit: New Solution I have refined my solution based on feedback in comments. This determines whether the targe

JQuery - ASP.NET and JQuery -

Do I need to delete code-behind * .cs files to use JQuery with ASP.NET? If yes, why should I do this? No. The server-side behind the code is the jQuery client side. They are two completely different worlds There should be no reason why you need to remove .cs files.

javascript - document.onkeyup ported to jQuery -

मैं कुछ पुरानी जावास्क्रिप्ट को jQuery में भेज रहा हूं: document.onkeyup = function घटना) {यदि (! घटना) खिड़की। घटना; ...} यह कोड सभी प्रमुख ब्राउज़रों पर काम करता है मेरा jQuery कोड ऐसा दिखता है: $ (document) .keyup = function (event) {...} हालांकि यह कोड काम नहीं कर रहा है ( फ़ंक्शन कम से कम आईई 7/8 में ट्रिगर नहीं होता है)। क्यूं कर? कैसे ठीक करना है? यह अलग है: $ (document) .keyup ( फ़ंक्शन (इवेंट) {...}); jQuery.keyup एक फ़ंक्शन है जो एक तर्क के रूप में कॉलबैक लेता है। इसके पीछे का कारण है कि हम एक से अधिक कुंजीप (या जो कुछ भी) इवेंट्स असाइन करें। $ (document) .keyup (फ़ंक्शन (इवेंट) {alert ('foo');}); $ (दस्तावेज़) .keyup (फ़ंक्शन (इवेंट) {चेतावनी ('बार');}); तर्क के बिना भी कुंजीप () है, जो कि संबंधित तत्व से जुड़े कुंजीप घटना को गति देगा।

silverlight - How to access the TextBox in a SL3 AutoCompleteBox -

I want to call the selection function on the text box used by SL3 AutoCompleteBox. What is a good way to access this object? visualtreehelper.get chald (visualtreehelper.get chald ("AutoCompleteboxName" 0), 0) text box As You should enter a text box

How do you do rounded corners with CSS on the iPhone in a UIWebView? -

does not seem to work for me, maybe I'm doing it wrong < P> Answer Yes it works, I was doing it wrong :) If you have UIWebView (or even on a regular web page) People can see the iPhone safari), you can do this: div {-webkit-border-radius: 10px;} If you want to make a specific corner, you can do this Div {-webkit-border-top-right-radius: 10px;}

How can I visualize XML in Flex /Flash? -

I am creating a Flex application to visualize the contents of the XML file in a tree, radial diagram, etc. I was seeing everything on the internet and I did not find any useful tutorials or source code to do this. Most existing components on the web are licensing issues with them, so I prefer to write some type of XML Visualization algorithm from scratch. One example I found was the same as what I am trying to do. How can I write XML / visualization in Flex / Flash? Any help is greatly appreciated. Thanks! Edit: Visualizer should do something like hierarchical diagram, such as: server 1-permission 1 -UIT 2 -UNIT3 -Unit 4 Think of a network with servers and routers and computers - and you want to put it in web or a diagram. Try a radial layout for your demo, take a look at what you are looking for, though It is not as attractive as science, it is free.

include - Ruby module with a static method call from includer class -

I need to define stability in the module using the method from the class included in this module: Module B DRF self.included (base) class & lt; & Lt; The base CONST = self.find end-end end class AF self.find "AAA" is finally included in a B: CONST but the compiler returns an error on the 4th row. Is there any other way of defining stability? The more idiomatic ways to get it in Ruby: module B DRF self.included (Class) Clays. Class_val & lt; & Lt; -ruby_eval CONST = rabbi_evail # Note that the block form of class_ option will not work # Because you can not assign a constant end-end class ARF self.find "AAA" in the end B. Finally A :: CONST What were you doing (class and lieutenant; & lt; basis) actually puts you in the context of A's MetaCLASS , not find yourself a The method itself is on its own, it does not have metacalls. Land that classes themselves are objects, and they have their Metaclas. To try to make it cl

vba - How can I tell what module my code is executing in? -

For a very long time, when I have an error handler, I get the report whether the project, module , And the process error is thrown inside. I have always completed their name by storing the name through constants. I know that in the class you get a program name with the name TypeMem (May), but obviously only I get one of three pieces of information and when I am not in the "Standard" module. I have no big problem in using constants, it is just that people do not always keep them up to date, or in return they copy and paste and then you have the wrong name information Is it So what I would do without losing the information, like to get rid of the constants shown in the example, to figure it out. Compare options Binary Options Clear Option Base 0 Option Private Module Private Contection m_strModuleName_c as string = "MyModule" Private sub instance () Conflict strProcedureName_c string = "example" error on error Goto Err_Hnd Exit_Proc as: Error resume

c# - Would you use regions within long switch/enum declarations? -

I recently needed myself to define the stupid long switch statement ( Yes, is needed) enum announcements in the C # code, but I am thinking that what people think is the best way to divide them into logical sub-sections, in my situation, both enum Prices and cases (which are based on enum values) are quite clear groups, yet I have a few Or am unsure how to reflect in this code. Note that in my code, I have around 5 groups between 10 and 30 enum values ​​/ cases. I understand that there are three obscure sense choices: defined #region within the declarations of logical groups / alternate values ​​of all cases Beach block (alternatively divided by empty rows). Write each group name with each blank name before the empty name before group name. Do nothing - just leave the switch / NAM as a large list of cases / values. Whom do you like? Will you use emos and switch separately? (This seems a bit awkward for me.) Now, I will not say that there is a right / wrong ans

boot - What information does BIOS load into RAM? -

I know, on booting, the BIOS memory loads the first sector (512 bytes) of the previously defined device drive on 0x7c00 And then jump to that address. So, the memory from 0x7c00 to 0x7dff has been captured. Is any other part of RAM that is captured? If I am programming an operating system, can I exclude all objects except the 0x7c00 for my own purposes and leave the Ox 7 def? Or, at the boot time is full of "valuable" information that I should not overwrite? I know that in a moment, I can overwrite loaded MBR on memory, my question focuses on ... Is the share of memory available for an operating system? Sorry for my bad english Thanks for your reply! The x86 Real Mode Memory Map is as follows: - 0x00000000 - 0x000003FF - Actual Mode Interrupt Vector Table - 0x00000400 - 0x000004FF - BIOS Data Area - 0x00000500 - 0x00007BFF - Unused - 0x00007C00 - 0x00007 DFF - Our bootloader - 0x00007E00 - 0x0009FFFF - Unused - 0x000A0000 - 0x000BFFFF - Video RAM (VRAM) Me

c# - Can you use Settings.Settings file for ASP.Net sites also? -

I have a code base that is used as ASP.NET web application. It is now being used as part of outside branches and two WinForms applications. The main difference is that the WinForms application should store "per user" their settings and the web app needs to store settings only at the "apps" level. They are similar settings, but are stored differently depending on the type of application Explanation: Using the same code as the foundation for a website site as well as code base for the desktop application Will be done. The settings in the desktop application should be stored in the appropriate user directory, but this is not useful when the same code is turning on the web app. So the dilemma for web app from the web.config-type status to the desktop app. How to switch to the config-type status (stored in the proper directory). Does anyone know that the settings.settings file is useful for a web app? Is there a better way to store the same settings in two di

Why the leading semicolon in JQuery ui.core.js? -

I started the code of ui.core.js in the jQuery UI is very interesting, ; JQuery.ui || (Function ($) {// code ...}) (jQuery); ''; ' in front of? This is for the purposes of unity, if someone wants to add this file the end of the second script The scripts that were not properly completed by the semi-colon have to effectively add stupid proof. Therefore, the following script has been given: alotOfJsCode (logic); Var fileEnd = noSemiColon In the beginning, the semi-colon allows to prevent it: alotOfJsCode (logic); Var fileAnd = no smilecolnja (function ($) {// ... which will cause the code to fail. In Javascript, a semi- The colon has no syntax all by itself. The following two statements are the same: // Statement 1 ;;;; alerts ('hello world!'); ;;;;;;;;;;;;;;;;; ; Alert ('Hello world!');

SQL Server not visible in Server Explorer -

If SQL Server 2000 is installed on one server, and I have a VWD Express 2008 on a PC on that network, Could the server be possible due to VWD's not being visible in the server explorer? Both PCs are on the same workgroup. I also tried keying and login and password in the name of the server, but does not appear in the database dropdown list in that server. Any suggestion helpful. Regards. What Visual Web Developer Supports SQL 2000? According to my knowledge it is not. Why not use SQL 2005 Express or SQL 2008 Express, besides you can download SQL Management Studio Express (05/08), install it on PC with Visual Web Developer. Try to connect to the SQL 2000 machine If this can not happen, it will throw an error that will help you to find out more about the cause. One last thing (very original ..) Is your SQL 2000 running?

java - Wrap exceptions by runtime exceptions with an annotation -

Is there a way to interpret a method so that all the exceptions dropped automatically to runtime exceptions? @ Magic annotation throws no segment! Void foo () {new exception ("bar") '} No way To do this, at least now I use an alternative solution like this (simplified): @SuppressWarnings ({"rawtypes", "uncheck"}) Public classes unchecked {Public Static Interface Uncheck Definition {InputStream openStream (); String readline (); ...} Private Static Class Proxy Class = Proxy .getProxyClass (Unchecked.clash.get classloader (), UncheckDefinition.class); Public Static UncheckedDefinitions Unchecked (Final Object Goal) {try {Return (UncheckedDefinitions) proxyClass.getConstructor (InvocationHandler.class) .newInstance (New InvocationHandler) {@Override throws public object invocation (object proxy, method method, object [] args) Throne (if the target of the class example) {return MethodUtils.invokeExactStaticMethod (class) target, method.getN

vb.net - How can I avoid Outlook's security warning when sending email programmatically? -

I send emails via Outlook using VB.Net 2005; It's working fine At the same time, I receive the following message: A program is automatically trying to send email from you. Do you want to allow this? If this is unexpected, then this virus can happen and you should not choose. Is there any way to avoid this? This is "by design" to get this virus to go through the address book and email from the user It is done to stop things like sending. Conversation quietly prevents the virus from becoming a spam bot.

c# - how to create hotkey to show window? -

I am working on the window using C # when I press the key but I do not know how to make hotkeys Show my app window for .. Tell me? You can create an application that starts and then installs a so-called keyboard hook Here's a good example: After that the application can be reduced to the taskbar or system tray. The keyboard hook's event holder then re-activates the app.

ActionScript 3 AsyncToken implementation -

Looking for an example or documentation link, how a method is coming back to implement AsyncToken . Note that there is no unnecessary token about using / consuming the returning method! I want to type these ways myself. An unincorporated application is easy to implement: Function doStuffLater (): Async Token {var Token: Asynchronous token = New Unsoliculate Token (empty); // This method will randomly call the responder's 'result' or 'fault' // handler. Function doStuff () {var response: string = (math.rendum ()> 0.5)? "Result": "Defects"; For each one (Respondents: IRSpender In (token.Soxster || [])) {// Remember: This is equivalent to // responder. The result (...) or responder.fault (...) respondent [feedback] ("the result was received!"); }} SetTimeout (doStuff, 1000); Return token; } Note that you can not actually use the applyResult and applyFault methods, because they give the respondents a Pass the event

app.xaml - WPF - Shut-off autogen of Main in App.g.cs -

I am learning WPF I want to provide my own main method in App.xaml App.g.cs. Instead of being generated for me in .cc. Although I am struggling because I do not know how to stop generating an additional head. Is there a control over my project file or elsewhere? I got the answer here. This is: The way WPF knows how to create a main () method for a particular xaml file for the App.xaml build action property set Through - this is a build action of ApplicationDefinition by changing this page will not create WPF main method and you can provide your own in a regular class file adding to the project. However, in the comment on the blog above, there may be a comment with notes and this reference:. I have not yet fully understood the issues.

Does "insert" in SQLite return SQLITE_OK or SQLITE_DONE? -

What is the "insert" statement in SQLite's return in case of success? I always believed that SQLITE_DONE should be, but recently I got the following string in my logs: sqlite3_step error: 'no error' / Code> And here is the code that logs the following string: prepared statement (adtonslationTMT2, "Include in translations (lang1_wordid, lang2_wordid) VALUES ( ?,?) "); If (AddTranslationStmt2) returns -2; Sqlite3_bind_int (addTranslationStmt2, 1, word_id); Sqlite3_bind_int (Additional translation STM2, 2, translation_ID); If (sqlite3_step (addTranslationStmt2)! = SQLITE_DONE) {NSLog (@ "sqlite3_step error: '% s'", sqlite3_errmsg (database)); Sqlite3_reset (addTranslationStmt2); Return -1; } Sqlite3_reset (addTranslationStmt2); I wonder, why does this work in most cases should I change SQLITE_DONE to SQLITE_OK in my code? Thank you. SQLITE_DONE You can also try to print the error code for.

Prolog Compiler for .Net -

Can recommend a prol compiler for .net. Net search, which I am able to find, has not been updated for many years. thank you Shiraz < Blockquote> ego, i "prologue. Net Googled for the "Prog.NET" .NET Framework is a full featured Prolog programming environment, with an enhanced compiler with language extensions and Microsoft's Intermediate Language (MSIL) and Visual Studio A code generator integrated with the .NIT integrated development environment.

Employees and departments database query with Sql -

मान लें कि मेरे पास एक जंक्शन टेबल है कर्मचारी आईडी विभाग -------- ------ 1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 4 1 5 2 5 3 6 1 6 2 6 3 इसलिए 1 कर्मचारी कर सकते हैं कई विभागों में काम करते हैं मेरी समस्या यह है कि कौन सा कर्मचारी कई विभागों में काम करता है? उदाहरण के लिए यदि मैं एक कर्मचारी खोजना चाहता हूं जो विभाग के लिए काम करता है < कोड> 1,2,3 , परिणाम होगा: 1,2,6 अगर मैं एक कर्मचारी खोजना चाहता हूं जो विभाग के लिए काम करता है 2 & amp; 3 परिणाम होगा 1,2,5,6 अगर मैं एक कर्मचारी खोजना चाहता हूं जो विभाग के लिए काम करता है 1 & amp; 2 परिणाम होगा 1,2, 3,6 मैंने निम्नलिखित प्रश्नों के साथ कोशिश की a) चयन भिन्न EmployeeId FROM dbo.EmpDept जहां में DeptId (2,3) मुझे गलत परिणाम मिला ख) dbo.EmpDept जहां से अलग कर्मचारी का चयन करें DeptId = एनबी ~> मैं केवल अपने वास्तविक समय परियोजना परिदृश्य सिम्युलेटेड। पहले से धन्यवाद Itemprop = "text"> यह प्रश्न उन सभी कर्मचारियों को मिलेगा जो 1 से अधिक विभागों के लिए काम कर

When to use lambda expressions instead of a Where clause in LINQ -

I'm actually digging in LINQ, and I'm trying to exclude this Lambda expression business. I'm not seeing the benefits of some nuances of syntax. Primarily, I think that Lambda's expression is a different way of using only a single clause. Why would not I just use a clause where? What is lambda expression more efficient? Is it just a syntax to attract other programmers to feel comfortable in C #? Have not I been exposed yet in other better use cases for Lambda Expression? Take a look at this article: Normally , We recommend cementet because it is usually simple and more readable; Although there is no meaning difference between method syntax and query syntax, in addition to this, some questions, such as retrieving the number of elements matching a specified condition, or those that retrieve the maximum value element in the source sequence Only method calls can be expressed in the form. Reference documentation for the standard query operator in System.Linq nam

entity relationship - SQL Server to er model -

Is there a program that converts a SQL Server database diagram into an AR model, or a database from the SQL Server server Makes AR model? Within SQL Server, there is a "database diagram" feature in each database in Management Studio. You can create a new diagram with it, and include all (or some) of your table, which shows where the relationships are, and what the tables are.

c# - Deactivate FocusVisualStyle globally -

I want to disable focus shapes globally in my WPF application. For single control which & gt; Style TargetType = "Button" & gt; & Lt; Setter Property = "FocusVijual Style" Value = "{x: Faucet}" /> & Lt; / Style & gt; But in all the controls in my application it would have no time to apply for the Framework Element how to apply I'll need to do something like "square x and applies to all derived classes" . Thanks, Stefan It That there is no magic bullet for this:

php - str_replace -

$ टैग = mysql_real_escape_string ($ _GET ['tag']); $ Tag = str_replace ("-", "", $ _GET ['टैग']); $ Query = mysql_query ("SELECT * FROM tags where name = '$ tag'"); $ पंक्ति = mysql_fetch_assoc ($ क्वेरी); यदि (! Mysql_num_rows ($ query)) बाहर निकलें ('वह टैग नहीं है।'); मेरे नाम में रिक्त स्थान के साथ एक टैग है, मैं हाइफ़ंस के साथ रिक्त स्थान को कैसे बदलूं? मुझे लगता है कि उपरोक्त कोड को काम करना चाहिए लेकिन यह नहीं है: / अपडेट: $ tag = str_replace ('', '-', $ _GET [ 'टैग']); $ टैग = mysql_real_escape_string ($ टैग); $ Query = mysql_query ("SELECT * FROM tags where name = '$ tag'"); $ पंक्ति = mysql_fetch_assoc ($ क्वेरी); अगर (! Mysql_num_rows ($ query)) बाहर निकलें ('वह टैग मौजूद नहीं है'); डीबी टैग `id` int (10) अहस्ताक्षरित नहीं नल एयूटीओएनसीआरमेंट,` नाम 'varchar (40) COLLATE Utf8_unicode_ci `` `` `` `` `` `` `` `` `` `` `` `` `` ``````````````

How to avoid call-time pass-by-reference deprecated error in PHP? -

I am trying to Reduce Alert which is sent to my Apache server log Are there. There is a warning: Call-time pass-by-reference has been deprecated. This is hard taking public functionKeyvinthmarker (and $ lines, $ marker) {... is a useful programming feature like this , So why was it disliked <...} and I am continuously getting this result for this function and asking them for processing, but this too It is said that the array $ rows are being sent repeatedly in this method. To reprogram it will be broad. I just do not want to "turn off warnings" because I want to see other warnings. So, as the call-by-referral has been deprecated, What is "Approved way" to get the functionality of this pattern: i.e. To send an array they can be changed by method, then continue to use that array? Basically, there is no problem with the way you define the function. The way you call the function, there is a problem. So instead of calling it to you,