Posts

Showing posts from September, 2011

web applications - How to Write Java server logs to separate log file -

After Right now we are using an optimized logger method for our application, but now we have a stand alone code for which we Need to write for a different log file. We keep very little information about log4j. I just know where to change the properties, if any, so that I know about our logs in the new log file as we The existing logger application in Do not Dist Want as well. First of all, a file appender is defined: log4j.appender .LOGFILE = org.apache.log4j.FileAppender log4j.appender.LOGFILE.File = /mylogfile.log log4j.appender.LOGFILE.Append = True log4j.appender.LOGFILE.layout = org.apache.log4j.PatternLayout log4j.appender. LOGFILE.layout.ConversionPattern =% d [% T]% -5p% c% x -% m% n Then use this appender to point your package: log4j.logger.mypackage = logfile log4j.additivity.mypackage = false The last line is important if you do not want your package to be with the global appenders. By doing this mypackage will also result in log messages from the print

mysql - "Specified key was too long; max key length is 1000 bytes" -

मैं varchar (500) पर अनुक्रमणिका नहीं बना सकता। MySQL: निर्दिष्ट कुंजी बहुत लंबी थी; अधिकतम कुंजी लंबाई 1000 बाइट्स latin1 = 1 बाइट = 1 वर्ण uft8 = 3 बाइट = 1 वर्ण जीबीके = 2 बाइट = 1 वर्ण

c# - Can I apply an attribute to an inherited member? -

मान लीजिए मेरे पास निम्न (तुच्छ सरल) आधार वर्ग हैं: सार्वजनिक वर्ग सरल {/} अब मैं निम्न कार्य करना चाहता हूं: सार्वजनिक वर्ग PathValue: सरल {{XmlAttribute ("पथ")] सार्वजनिक स्ट्रिंग मान {प्राप्त करें ; सेट; }} सार्वजनिक वर्ग ObjectValue: सरल {{XmlAttribute ("ऑब्जेक्ट")] सार्वजनिक स्ट्रिंग मान {get; सेट; }} लेकिन वास्तव में संपत्ति को फिर से परिभाषित किए बिना मैं बेस क्लास के सदस्यों को विशेषताओं को लागू करना चाहता हूं। क्या यह संभव है? असली समस्या यह है कि मेरी सीरियलाइज़ेशन तंत्र में / से एक्सएमएल (जो शानदार ढंग से काम करता है), मुझे बहुत सारे समान तत्व मिलते हैं, जहां केवल गुणों के नाम अलग होते हैं (वे संगत नहीं है, और मैं प्रारूप को नियंत्रित नहीं करता)। अभी मुझे प्रत्येक ऐसे तत्व के लिए एक अलग वर्ग बनाने की जरूरत है, जबकि वे 100% समान हैं (विशेषताओं के अलावा)। मुझे नहीं लगता कि यह संभव है, लेकिन आप शायद कभी नहीं जानते । अद्यतन: मैंने मार्क के दृष्टिकोण की कोशिश की, लेकिन कोई फायदा नहीं हुआ: सार्वजनिक वर्ग दस्तावेज़ {सार्वजनिक मार्ग वैल्य

Stumped on Entity Framework & Lambda Expressions -

I understand that the compiler does not like this statement getting the error Lambda expression is called 'System.Func & lt; MyData.Models.SomeModels, bool & gt; Because some return type Representative type type in the block My details are going through my repository class var Qry = repositoryClass.Find (c = Gt; c.Categories.Where (D = & gt; D. Division parentID == typewrite)); Find the Repository Class Method Public INIM Marketplace & lt; SomeModels & gt; Find (Fax & lt; SomeModels, bool & gt; exp) {Return from curl in _db.SomeModels, select EX option); } To work with the EF, you get an expression < ... & gt; , where : public IEnumerable & lt; SomeModels & gt; Applicable with (as an estimate) (expression & lt; Func & lt; SomeModels, bool & gt; & gt; expand) {return _db. Some models Where (f); } Then you will call it like this: var qry = repositoryClass.Find (c => c.CategoryParentID ==

F# strange printfn problem -

I was playing with F # (Visual Studio 2010 Beta 1) around, and I wrote a small console script In which the user asked the input number 2 and one operator and then executed it. It works fine except for a small, but annoying thing: Sometimes my printfn instructions are ignored. I really have a breakpoint in the code to see the case. Code snippet: Convert (source: string) = Try System.Int32.Parse (Source) with:? System.FormatException - & gt; Printfn "'% s' is not a number!" Source; WaitForExitKey (); Give exit 1 read = printfn "Please enter a number."; Give System.Console.ReadLine num1: int = read () | & Gt; Printfn is running in the Convert / Print function ... Give num2: int = read () | & Gt; // Convert ... but this has not been taken care of This is not the full source of the course, but I think it will be enough if you need the full source then Just tell. So my question is very simple: what is the reason for this issue with printfn? A

performance - Writing Clean and Efficient PHP Code -

I am watching online and I am unable to find an article on it which is not entirely old. Does anyone have any good articles that give some good advice? What I've read is good, and a little helpful, but I have to give a modern code example, not since 2002. I have coded a comprehensive PHP / MySQL program and I think it is better now, any suggestions? Edit: People are suggesting frameworks, and I appreciate it, but I am looking for coding tips for raw PHP coding. The entire application has already been done and it will be very long to remember completely in one framework. I am investigating those people for future projects though. Does anyone have any suggestions or suggestions for writing clean and efficient PHP codes? Use < to edit the question Clean and efficient PHP is not very different than any other language. Practice good object-oriented principles Focus refactors on encapsulation, separation and polymorphism often use, and design patterns as possible.

Get list of contexts in tomcat server -

I have several mini-wires that have modules for large applications running on the Tomcat 6.0 server. I'm doing this instead of putting all the modules in a war, because different establishments require different modules. I am starting to hit a roadblock, in which I have to know how other mini warriors are installed in the server. What is the procedure for getting a list of all installed war / references in the Tomcat 6.0 server? i managed to solve this problem because since I will create "mini wars" The loader can share a lib in the tomcat at the level. This trick will be to use a ApplicationListener (located in the normal class loader) which does the following: Public class ApplicationListener ServletContextListener {Private Static Map & lt; String, ServletContext & gt; Reference = New Hashmap & lt; String, circlet contact & gt; (); Public Zero Concept Begins (ServletContextEvent Event) {ServletContext References = event.getServletContext ();

osx - Mac os x Terminal.app's buffer and screen command -

I use the Mac OS X terminal app to connect to my remote machine and then the screen on that machine I use Is the scrollbar used to scroll forward and backward on the screen buffer on the terminal. It is very painful. Ctrl + a + esc and then page up / down thanks Aravind < / P> To expand on the previous two answers: .screenrc line Termcapinfo xterm * ti @: te @ will turn on your scrollbars. This is a win unless you are using Control-A to switch between multiple screen sessions in the same terminal window. The screen is called cursor addressing mode to keep a separate history buffer for each session; The termcapinfo line above indicates that it will never use that mode. All the history goes into a buffer, the original terminal buffer, and you will see the lines of all the sessions mixed with each other. These days, which is just to use a different terminal window (or tab), each login on your remote - low price in my mind to withdraw your scrollbar So why is no

JQuery add a Div after checkbox list -

How do I add a div after each item in a checkbox list? After the clicked item and new item in AppNet, the checkbox list should contain the new one before it comes into control. I know that the checkbox list is presented as a table and every item is in tr and input and The label is inside the TD Table for each item ---- Table-line ---- TD ----- Input and label Last foreach / table I need to be checked in the checkbox list using "JQuery" To add a div after the label of the item being itemized. How do I find a label tag and insert the div from there ....? Basically, if you are inserting out, then you would like to use it after. $ ("table label"). ("& Lt; div> ");

Anybody knows a good extendable open source web-crawler? -

क्रॉलर को नई प्रक्रिया (पूर्व पार्सर, पार्सर, आदि ...) मुझे हेरिट्रिक्स प्रोजेक्ट मिला ()। लेकिन ऐसी अन्य अच्छी परियोजनाएं हैं? सबसे अच्छा आप कर सकते हैं जब एक स्वतंत्र क्रॉलर की बात आती है तो क्या करें यह अवधारणा (एक एंटरप्राइज़ स्केल तरीके से) से बना है और बड़े पैमाने पर डेटा की जांच करने के लिए (पिछला Google के समान) का उपयोग करके समर्थित है बढ़िया उत्पाद! मैं वर्तमान में मैनिंग के नए (अभी तक जारी नहीं) में हडोप के बारे में सब कुछ पढ़ रहा हूं। यदि आप इस मार्ग पर जाते हैं तो मैं इस शीर्षक की प्रारंभिक प्रति प्राप्त करने के लिए अपनी तकनीकी समीक्षा टीम में शामिल होने का सुझाव देता हूं! ये सभी जावा आधारित हैं यदि आप एक असली आदमी हैं (जैसे मेरी !!) तो आप में और अधिक दिलचस्पी हो सकती है, और जो क्लास और एपीआई द्वारा एपीआई पोर्ट्स द्वारा सी # के लिए सभी वर्ग हैं।

html - Should I make it a priority to semantically mark up my pages? Or is the Semantic Web a good idea that will never really get off the ground? -

This is a terrible idea and really good things are done using the semantic web concept but ultimately surprised me It is happening that in the end it is just a dream of a pipe. If we ever succeed in creating a fully meaning web, and if we are not able to use the web meaning of the web to provide a deeper experience on our web site, then it will be fully understood for the web Time and additional endorsements are made by the team itself or by my team? I know that the semantic page is usually compared to only better (more carefully than anything I think), so I am not questioning trying the semantic page design. I am currently thinking, I am leaving it, in the hope of some return in the future, completely semantic, partial review of making meaning pages and revision process At some practical level, some aspects of the Web are being addressed: 1) Semantique markup helps search engines identify the main content and improves keyword results. 2) Online identification is a growi

What is the best unix compression utility? -

सबसे अच्छा यूनिक्स संपीड़न उपयोगिता क्या उपलब्ध है? आपकी गति / आकार व्यापार पर निर्भर करता है जीज़िप तेज है और अच्छे परिणाम पैदा होते हैं। Bzip2 धीमा है और अक्सर बेहतर परिणाम प्राप्त करते हैं।

sql - Delete rows with matching multiple columns same table -

Using SQL, I have 5 columns: SSN, last name, first name, RF and a flag field Remove from MyTable M where the flag = 2050 and is present (select 1 from MyTable where MyTable.ssn = m.ssn and MyTable.lastname = m, div class = "post -text "itemprop =" text "> delete last name and MyTable.firstname = m.firstname and MyTable.RF = m.RF and MyTable.flag <> 2050)

Does Adobe Have A Startup Program Similar to Microsoft's BizSpark? -

Microsoft's BizSpark is a great program that helps in getting started I was wondering whether Adobe or other companies are similar Was the program? I'm not sure that this is the same, but Adobe does that for the next five years, Adobe platforms They plan to invest $ 100 million in startups.

database - How should I escaping quotes and line breaks for Oracle SQLLoader (sqlldr) importing? -

First of all: Yes, I know about CONCENDENT and CONTINUEIF, but I'm not smart enough to understand the documentation can. I do not know how they solve my problem. Thanks ... I am in a position to create the file to import into an Oracle DB via sqlldr. The column file file needs to be delimited with "~" (ask no ask), I have some concern about the behavior of sqlldr in relation to quotes and newlines. If there is a simple line column values ​​to include: one, hello ~ world like you "and three" < P> How should I output this file? My first estimate is one ~ "hello ~ world me" like you "three" <3> I think it's with suspended field It would be easy to import via optional 'encounter' specified in the CTL file. I do not know how to handle that as if I am creating the file, there are quotes around then Should they also save? how? Additional Bonus Questions: There may be line-breaks in the fields. If &quo

c# - Is there anything wrong with using var to declare collections in LINQ queries? -

इस तरह LINQ का उपयोग करते समय: संग्रह। चयन (...); क्या यह कहना बेहतर है: var परिणाम = ... या: IEnumerable & LT; Point3 & gt; परिणाम = ... मैं इसे पूछ रहा हूँ क्योंकि यह हमेशा IEnumerable है, है ना? क्या इस मामले में अधिक स्पष्ट होना बेहतर है? यह वास्तव में विशेष पर निर्भर करता है। यदि आपके बाकी कोड से यह स्पष्ट है कि किस प्रकार के चर, या अधिक महत्वपूर्ण है, अगर यह बिल्कुल पता होना जरूरी नहीं है कि यह किस प्रकार है, तो var उपयोगी है हालांकि, अगर एक प्रकार की घोषणा यह सुनिश्चित करेगी कि आपका कोड अधिक उपयोग करने योग्य और पढ़ने में आसान है, तो अधिक विशिष्ट रहें और प्रकार प्रदान करें। उदाहरण के लिए, यदि आपकी क्वेरी तुरंत परिणामस्वरूप एक पाश और यह लूप स्पष्ट रूप से टाइप किया गया है, var एक उचित विकल्प है क्योंकि यह समय टाइप करने से बचाता है और उस कोड को अस्पष्ट नहीं करता है जहां रखरखाव बहुत कठिन है, जैसे: < पूर्व> // IEnumerable & lt; आकार & gt; के बजाय var का उपयोग करता है Var आइटम = आइटम में से मेरी आइटम चुनें आइटम। आकार; विदेशी वस्त

css - a:active issue in ie6 -

I am asking a few questions about changing the category / status of a link to normalize. I'm using one: When the user clicks on it then active to change a period's background. The target of the link is set to Javascript: zero (0), so clicking on the link simply invokes my JS function. However, when the user releases the mouse button, one: for the active status link Should be removed, the background has been changed in general, but in 6 it is not. In IE6, "active" sometimes " Focused "until another element gets the focus, the DOM object will be" active ", or it will become blurred. If you add a javascript on-free event to the link that calls blur () , the active status should be released when the user's mouse button is released: & Lt; A href = "whatever" & gt ;! Link & lt; / A & gt; ... & lt; / Body & gt; & Lt; Script type = "text / javascript" & gt; Function Handlace () {window.eve

mysql - Inserting distinct entries into the database -

I have two tables with the same area Table A contains 7160 records and table B 7130 records. Now I want to enter B in different record tables from Table A. like it does not have any duplicate entry in B. How should I go about doing this? It basically selects those records which are in A which are not in B. This will work, but you may have to make more changes to identify the fields you use to uniquely identify the record. In this example I used the field 'id', but you may have to change it in Effield 1 = Bifield 1 and Effield 2 = Bifffield 2 etc. (select A. * Table A, on the bottom A tab = B, AID = BID, where BID is zero)

assemblyinfo - How to update assmebly version info with new build and revision during build? -

I have to update the build number in the assembly version of the assemblyinfo.cs file. I have written a custom job that updates all assmeblyinfo.cs under solution before starting construction. But when I change this file and then try to build some of my DLL which is in reference to other DLLs, which are not able to compile because they can not find specific edition assemblies. I have some files that use strong name assembly too. Not sure how to update their version I have tried to set a specific version to false, but there is still a single error. Can you tell me the best way to update assemblyinfo.cs with a creative build number? PS I am using NANT functions to automate creation.

mod rewrite - Simple mod_rewrite problem -

I'm new to using mod_rewrite and trying to write pages again at the base level of my site: Www.site.com I will return any of the following URL www.site.com/main www.site.com/settings www.site.com/username To write: www.site.com/index.php?v=main www.site.com/index.php?v=settings www.site.com/index.php? V = username I had this work when I installed mod_rewrite under www.site.com/directory/ but could not find that it was cas Works www.site.com RewriteEngine On RewriteRule ^ / ([^ / \.] +) /? $ Index.php? V = $ 1 [L] You have an additional "/" Should: RewriteEngine On RewriteRule ^ ([^ /.] +) /? $ Index.php? V = $ 1 [L]

c# - Why does Decimal.Divide(int, int) work, but not (int / int)? -

How two split 32 bit int numbers (int / int) gives me 0 , But if I use decimals Dive () I get the right answer? I'm not the AC # man in any way. int is an integer type; Splitting of two ints causes an integer partition, i.e. partial part is deducted because it can not be stored in the result type (also int !) By contrast, decimals , a partial piece is found. By introducing decimals. Divided , your int arguments is converted into a decimal s. You can apply a non-integer int a = 42; For the floating point type, explicitly casting at least one argument, the partition on the int argument. Int b = 23; Double result = (double) A / B;

centos - How do I convert a wav file to mp3 format using sox? -

When I run from the command line directly from the command line; SOCKS-R8000 - C1 < Wavfilename & gt; & Lt; Mp3filename & gt; I get the following error message: SOCKS: unknown output file format for '747a.mp3': file type 'mp3' is not known My machine is running the CentOS operating system. You will need to install a suitable MP3 encoder, eg, or solx to support liblame Compile it again. This is independent of your Perl programming :)

sql - How to add data to two tables linked via a foreign key? -

If I have 2 tables, they are called Table A and Tableby. TableB has a foreign key that reflects the table Now I have to add data to both the table and the table for the given scenario. To do this I need to first insert the data in the table, then find and retrieve the last inserted primary key of the table and use it as a foreign key value in tablebill. I then put the value in tablebine. It takes a bit more to do a lot of work to include 1 group of data, how do I get it and how? If possible please provide me the SQL statement for SQL Server 2005. It says correctly that you SCOPE_IDENTITY () , or if you use the INSERT / OUTPUT syntax, then you can do set-based operation, and then can already be included in the set of outputs - for example, here we only Insert 1 (each) in "real" tables: / * drop table STAGE_A drop table STAGE_B drop lock Create a table STAGE_B (CustomerKey varchar (10), ORDERNUMBER varchar (100)) Table A (ID not integer NULL) Identity (51,1) Prima

visual studio 2008 - How to add external file to application files ( clickonce / .NET) -

I am using the 'Publish' option in vs2008 and I am very happy How it works. Now I want to add 2 external * .exe files to the installed package I have seen button ' Application Files ... ' on the published tab but It seems that adding new files does not have permission to add manual I have played with this and how it is stored: 1. Add EXE files to project as external item. 2 But now I'm getting the warring information: assembly 'file_name.exe' is incorrectly specified as the file C: \ WINNT \ Microsoft.NET \ Framework \ v3.5 \ Microsoft.Common.targets PROJ_NAME Any idea how to solve this warning / add exe files to deploy other methods? I add it as a reference of my project and finish copying local property to True Gave. There are no warnings now, but make sure that when you click on the unused reference button, you do not accidentally delete it.

winforms - Localization, how to use a specific resx -

Today I'm playing with localization. I have a Winfaces app where I have set the right for local on my screen, so I went and changed all the text as best as Spanish, as much as I could. So now my screen is.Rax and my screen.Seres and everything looks good / buen. How do I run my app now and the Spanish version comes? I tried to go into regional and language options and set my 'standards and formats' option for Spanish Now my dates are in Spanish which is good but the text of my app is still the English version. How can I load this thing from my screen? .resx? Have you set up your application to culture / UI culture to Spanish? In the following code, the N-US will be replaced by your UI culture and it will use the appropriate resx file based on the method you set HTH System globalization . Culture Ifo myCI = New system Globalization.CultureInfo ("en-US", Incorrect); System.Threading.Thread.CurrentThread.CurrentUICulture = myCI; System.Threading.Thread.

asp.net - Maintain usercontrol state accross pages -

I want to maintain user control status in two or three pages, How do I do this I can? I have two pages for the list, which click on any entry and goes to the details page so these two On the left side of the pages I am using Search User Control. server You can value the goods in HttpContext before transferring the transfer or before referencing the previous page.

.htaccess - How do I disable CakePHP rewrite routing for a single folder so it can be used as a location for a second application? -

I have a copypiece installation on the root of my domain, now it has come to know that I have to put another app there The subdirectory will be in. How do I disable controller / model redirection in Cake for this directory? The existing .htaccess in the root folder looks like this: & lt; Ifmodule mod_rewrite c & gt; Rev. Rewrite Raul (. *) App / WebRot / $ 1 [L] & lt; / IfModule & gt; I tried to modify it like this, but it has no use: I know that this is a bit of a hack, but there is no way I can get another app to play well with cake. The following rules www.example.com and www.example.com/app/webroot/ Rewrite Rule ^ $ App / WebRoet / [L] This rule is www.example.com/* at www.example.com/app/webroot/* > I will remove your rule and in the last rule, Wildcards Regex , (. *) , so that it matches any string that does not start with bildbank Something like this can do: RivetRail ((!! Bildbank). *) App / WebOyet / $ 1 [L] The follo

sql server - Usefulness of separating database files and trans logs among partitions -

Some people are working on a new database server for SQL Server where I work. The server also has a system drive that stores backups for single database files and also stores single RAID 5 arrays. RAID 5 array is logically divided into 2 drives. Is for a real database files (MDF) and for the second transaction log (LDF). The reason quoted is best practice. My question is whether or not this extra division is redundant or not. Is there any purpose for different logical partitions with databases and trans-losses if they are still sharing the same physical resource? I understand that there are a few big reasons for the two physically separate disks to separate the database and trans log files. For example, speed and disaster recovery should be improved. However, I can not think of any benefit which is not denied by the lack of physical separation. I'm not sure enough to know about that. You are too much on the mark. The only such other situation that may be wrong is a corru

oracleclient - How do I specify which Oracle client install to use? -

I have a server, which is both 10G and 11G customers installed. How do I setup a connection string to tell my asp.net application to use 11g (i.e. OraClient11g_home2)? to: in ODP.NET 10.2. 0.2.20 and higher, ODP.NET can run more when ODP.NET is installed, then DL code> L search path will be based on the following order: HKEY_LOCAL_MACHINE \ Software \ Oracle \ The directories specified by ODP.NET / executable Directory PATH Environment variables > On the ODP.NET installation, type the registry value of DllPath type REG_SZ to % ORACLE_HOME% \ bin will be set to where the respective dependent DLL s is installed. Make sure you're using ODP.NET as the provider and your ORACLE_HOME environment variable.

ruby on rails - Trying to define named_scopes and other ActiveRecord relationships on all models -

I am trying to define the designated_scope for all my models in Rail applications. Currently, I have got close access to this by typing initialization for ActiveRecord :: Base and putting regular methods in it. Of course, this does not provide any real benefit when it comes to making a query chain and may be the way to get the least rail-e work. However, when I start trying, use Has_many, name_scope, etc. ... ActiveRecord methods. When I think I name_scope may not be right, so I really want to help the name_scope defined in addition, is not interested in the current Ruby ACL GMS in. initializers / in: class ActiveRecord :: base has_many (: permissions) name_scope (: acl_check, lambda | user_id, method | {: include = & gt; ;: Permission ,: Terms => [["Permissions. User_id =?", User_ID], ["Permissions. Method =?", Method], ["Permissions Classname =?", Self.class.name]] } End) # The permission check runs for the current example. Def chec

configuration - Override grails.serverURL and application specific grails.propname settings in application.properties file -

grails.serverURL is required to override not Reinstall application wise file I have tried various methods of file grails.serverURL in the settings > application.properties and can not get it to work. The environment is typical of Config.groovy : environment {prod {grails.serverURL = "http: //nonexistentserver.somecompany. com: 8080 "grails.anotherappspecificURL =" xcc: //user:password@server.somecompany.com "} in fact, our application.properties this looks like: Grails.env = prod grails.war.deployed = true app.grails.version = 1.0.4 app.name = myapp In one of the ways below I have attempted to override the settings The Config.groovy are defined: grails.serverURL = http: //webserver1.somecompany.com: 8080 grails.anotherappspecificURL = xcc: // admin: Xyzabc123@specificserver.somecompany.com Any help to work without code change will be greatly appreciated! The proper way to override the values ​​in Config.groovy is to use an

commonj - weblogic 10 TimerManager avoiding propagation of security context to the scheduled tasks -

We are using Weblogic 10 and I'm using General's Timer Manager to schedule a job Is a part of weblogic, everything is fine but i have a problem security content text of the thread determining the timer listener work is somehow stored in the timer listener function and sub for the work done in the timelist work Being industry and to avoid the promotion of safety in terms of functions determined by any yarn made determine which tasks that can talk to me in that is causing problems for me do you? It is too late, but anyway, one way to avoid the promotion of promotion is to use unmanaged thread, i.e. spawn thread without egg . This causes the child to be thrown out of bath water.

c# - How to properly return T from a generic method while implimenting an interface? -

I am working through a bug that I was able to determine in the rebuilding bug for the following sample Why the problem is happening but if I'm stuck for a better solution then the following program is given: Public interface IFoo & lt; T & gt; {T output type (Tom); } Square Fu: IFoo & lt; Foo & gt; {Public Virtual Foo Output Type (Foo Parm) {Console. Weidline ("Foo"); Return supreme; }} Category Bar: Foo, IFu & lt; Bars & gt; {Public Virtual Bar Output Type (Bar Ultimate) {Console.WriteLine ("Bar"); Return supreme; }} Class program {static zero main (string [] args) {time = new bar (); CallOutputType (bar); Bar.OutputType (bar); } Fixed zero call output type & lt; T & gt; (Tt) where t: fu {t. Output type (t); }} I expected to be output: repeatedly But what I'm getting: foo bar Simplifying this kind of problem It is clear that bar.optput type is not being overridden Foo.OutputType . What are my best opt

c# - Constructor injection working... Property injection not so much -

I am using composite application block. I have a class that uses constructor injection (on constructor parameter Using the [ServiceDependency] attribute) and it is working. But when I try to switch to property injection (property on [ServiceDependency] attribute), the injection is not being done (the property remains empty). I have ensured that the property is similar edit: this is C # / .net This works for me, hmm ... should look like this public class ProjectListViewPresenter: presenter & lt ; IProjectListView & gt; {Private ILookupService _lookupService; [Service Dependency] Receive Public IILkkup Service Lookup Service {Return {_lookupService; } Set {_lookupService = value; }}}

internet explorer 8 - Problem with jquery handling checkboxes in IE8 -

I am using jquery to search for all the checkboxes in the check box. For that purpose I am using the following code: $ ("input [type = checkbox] [checked]"). Each (function () {// Do Stuff}); It works fine in Firefox 3 but does not work in IE 8 or Safari. Edit: I'm using jQuery v1.3.2 / < P> Try $ ("input [type = checkbox]: checked"). Each ... Edit or even Sweeter: $ ("Input: Checkbox: Check"). Each ... It works for me in IE8.

c++ - Adding a Qt GUI to a Dynamic Library -

Greeting overflow I am trying to add a GUI to the current project. More specifically for a plugin that is loaded as a .so file (or when compiled at win32 a .dll ) Its threading of this project is already implemented to deal with portability I know that QT has its own cross-platform threading model, but it would be better to stay inside the existing threading model. My question is for Qt veterans [I have just started reading docs]: Is it possible to embed GUI using Qt in the above mentioned plugin? The plugin is already a command line interface and I would like to make a GUI alternative, even if it has been compiled. Because those standard functions are called by the main program, the GUI (which I think will remain in the second thread) has to be made accessible or able to be called on so that the CLI thread can stay together and the standard functions Can work with any permutation of two interfaces. Editing 1: After playing with the code, I'm able to launch a simpl

modeling - Modelling the creation of an Actor in a use case diagram -

If you believe the use of events makes an actor an actor, how would you do that? I have a case of use that creates a window service, which is a set of cases and actors (in my mind) using a different system. At the moment it is not clear from the case diagram of use that an actor is created as part of the flow of events. Aidan Case diagrams do not display the sequence of actions, there is no time dimension. Consequently, it does not have any meaning to make or remove an actor.

Eclipse plugin - wrong jar used on runtime -

I have a serious problem with my Eclipse plugin .. My plugin is dependent on two other plugins All plugins (including my plugins) use the Mozilla Rhino engine - two of them use js.jar (version 1.4). But my plugin uses the new version, which is not yet released and packed in MyRhino.jar . While developing, everything gets better - by the completion of the code, I get classes and methods, special versions of the count, no errors etc. But when I run my plugin, a different version of Rhino is used and I get a runtime exception such as Klansotfound expletion and so on. Should I let Eclipse use the same jar in the runtime as the development time? When I was developing plugins on NetBusiness, the solution was simple- to wrap the jar in a different module, set which packages to export and declare the dependency on this new module. I have found an equal solution in eclipse, although it does not work for me - although I have announced dependency on the wrapper plugin, packages a

Unbind not working in jQuery -

I have a button and have written two functions for the same button Initially like < / P> $ ("# field setting. Button"). Eq (0). Unbund ('click'); $ ('.button'). Eq (0). In the next jQuery, when I click on a div I (in the function) Another work was written for implementing the same button as $ ("# fb_contentarea_col1down21 div"). Live ("click", function () {$ ("# fieldSetting .button"). Eq (0). Unbund ('click'); $ ('.button'). Eq (0). Click (function ) {Warning ("later");})}); In both cases I have unbounded events but this does not work. My first task for buttons works initally but the afer I use the second function, my first function no longer works; The second function never unbinded. Please suggest how to solve it. If you run "unbind" on line 1, and then you attach a new event to line 10 , Then the most recent activity will take the authority, which means that what

objective c - Getting the POSIX path of the Finder's front window -

How can I get the POSIX path of the Finder window which is currently at the top of its window list? Preferably with some sort of coca framework, but I'm opening anything. Background: I'll need this because I want to select files that match a rajx pattern, which is resumed from this path. To get all the descent of this path, use [[NSWorkspace sharedWorkspace] subway etapath: thePath] method, in "grep "Use a NSTask (to avoid a regex support framework packaging) and select [[NSWorkspace sharedWorkspace] file: aFile inFileViewerRootedAtPath: thePath] Through an NSArray created from entries returned by GRP in a looping loop So far, I have NSWsparas, NSFfile Manager and Ns Within Peepikrn and Akskod document seen other keyword searches. Thank you for checking my question! Andre PS: I'm not sure about the grep part, maybe I'm slapping RegexKit light in there ... < Div class = "post-text" itemprop = "text"> I am de

swt - how can I make my jface ITableTabelProvider image scale correctly -

How does SWT work to scale images in a table? I am using an ITableLabelProvider to provide images for a SWT table. I have recently increased the table column from 140 to 170 and I have widened the image object passing with the Italibal Provider. SWT now displays this 170 pixel image up to 140 pixels at the bottom and 30 pixels in the right-hand side of the hand. I have removed all those references from the old width that I know. Other cells contain only text, and they are behaving completely in the right way. Table contents, columns, and image width are definitely all 170. I'm running swt3.3 and jsf 3.4.2 on Windows XP. I have an alternate solution that listens to SWT, pentamum events on the table, and then drag the image directly into the graphics reference of the paint event. It seems that this is a trick, but it has really started to annoy me that I do not understand how to work more elegant solutions.

api - Strange Google StreetView Internet Explorer warning -

Image
I have a small problem with a SWT.Browser widget that throws a lot of trouble alerts. I tried to test the Google StreetView API in a browser, so I created this page (in fact I did not do anything, pasted it with snippets of Google.) And I get the following message: (Huff, is not it?) My code is very simple (here it is) Public static void Main (string [] args) {disks Le display = Display.getDefault (); Shell shell = new shell (display); Shell.setText ("Temporary API Google AVCC United Nations SWT.Browser"); Shell.setLayout (new gridlate ()); Last Browser Browser = New Browser (Shell, SWT.BORDER); Browser.setLayoutData (New Grid Data (SWT.FILL, SWT.FILL, true, true)); Browser.setText ("& lt;! DOCTYPE HTML Public \" - // W3C // DTD XHTML 1.0 Strongly //n \ "\" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict Dtd \ "& gt;" + "& lt; html xmlns = \" http: //www.w3.org/1999/xhtml \ "mlns: v = \" vase: schemas-m

normalization - Should a SQL VIEW always be in 1NF? -

A SQL view is a global, logical table that can be continuous or not. But it is still a table, therefore, should a sequence always follow the usual form (1 NF)? I.e. no duplicate rows, scalar type only, no top-to-bottom or left to right sequence, etc. What about high normal forms? For me, the results of my application 'Consumption' stored procs, my thoughts are 'consumed' by SQL queries, and these two experiments are mutually exclusive (ie I stored using SQL procs Resultsets do not query and my applications do not include SQL code). I have noticed that others use a view for 'adding' multiple values ​​in one column in a row, usually a comma-separated format. A SQL query against such a column says that such a clause is required: ',' concat_col + ',' likes '%' + ',' + Search_value + ',' + '%' So I think the expectation of all tables is justified, which are only scaly types. Am I even 'pure' by think

Using Map on a list of tuples and print it as flat string in Erlang -

I have a list of Tuplesses: x = [{"alpha" "Beta"}, {"gamma", "theta"}]. I want to print using X as a flat string, io_lib: format ("~ s", [X]) : "" "" "": "" "" "": "Y": " Beta "}, {" x ":" gamma "," y "ex> How do I get it? I started using the map to change the list. But I was not able to print it as a string ... (given unbound variable error on X). Feel like a false JSON serial! You should take a look at it as it really wants for you.

algorithm - How many integer points within the three points forming a triangle? -

In fact this is a classic problem because SO user has put it (another in which during an interview Work to ask) I could not do it in an hour (breath), so what is the algorithm that calculates the integer digits within the triangle? Edit : Assuming the corners are on the integer coordinates (otherwise it becomes a problem finding all the points within the triangle and then by reducing all the floating points, only the integer points Is left with; less elegant problem). Explain that the corners are in integer coordinates, by making a rectangle around the triangles explained by the skin scales. Can get answers. The rectangle for the AJAX, the number of internal digits I = (j - 1) (K - 1). For the 5x3 rectangle below, there are 8 internal points. A vertical leg (J) and a horizontal foot (K) number of internal points for the triangle I = ((J - 1) (K - 1) - h) / 2 Where H is the number of edges of the rectangle, which corresponds to the triangle of the trian

tsql - Conditionals in transact-sql select column lists -

I have found a query that looks a bit like this: records Select ID, Contacts. Name + '(' + contact 'organization' + ') As a contact, join on the records from Records. Record. Contact = contact Contact The problem is - contact. Organization is often empty, and I get contacts like "John Smith ()" Is this just a way to incorporate the organization if it is not empty? Use a CASE statement SELECT records.id, CASE contacts. The organization, when contacted in the name of "contact names, contact names as ELSE contacts.name + '(' + contact.organization + ')' END Records, on the Spaces Records .contact = contacts.contactid You can modify it to check tap values, but I believe that you do not have this problem because if you did not have a number in your contacts, Your entire result field is empty instead of the free space

subprocess - When I write a python script to run Devenv with configure "Debug|Win32" it does nothing -

अपडेट: जब मैं subprocess.call के बजाय < कोड> सबप्रोसीस। पॉपिन , समस्या हल हो गई है - क्या किसी को पता है कि इसका कारण क्या है? और फिर एक और समस्या हुई: मुझे आउटपुट को नियंत्रित करने का एक तरीका नहीं मिल सकता है ... क्या कोई स्ट्रिंग या ऐसा कुछ करने के लिए subprocess.call से आउटपुट को रीडायरेक्ट करने का कोई तरीका है? धन्यवाद! मैं परियोजनाओं के निर्माण के लिए Devenv का उपयोग करने की कोशिश कर रहा हूं, और जब मैं इसे कमांड प्रॉम्प्ट में devenv एएसएलएन / बिल्ड " डीबग | Win32 " - परन्तु जब मैं Popen (cmd, shell = true) का उपयोग कर इसे चलाने के लिए अजगर का उपयोग करता हूं जहां cmd उसी प्रकार की पंक्ति है, यह कुछ नहीं दिखाता है अगर मैं | को हटा देता हूं, तो इसे "code"> "डीबग" में बदलें, यह काम करता है .... क्या कोई यह जानता है कि ऐसा क्यों होता है? मैंने \ से पहले | डालने की कोशिश की है, लेकिन अभी भी कुछ भी नहीं हुआ .. यह मैं उपयोग कर रहा हूँ कोड है: < पूर्व> उपप्रोसेस आयात से पॉपिन, पाइप सीएमडी = '' सी: \\ प्र

c# - Is using "base" bad practice even though it might be good for readability? -

I know that this is a subjective question, but I'm always curious about the best practices in the coding genre. ReSharper 4.5 is giving me a warning for the keyword "base" before the base method call in the implementation sections, that is, base.DoCommonBaseBehaviorThing (); While I appreciate the "less-better" mentality, I've spent a lot of time in maintaining debugging / non-invasive applications for a long time, and feel like this It could be that the subscriber's call is just by looking at a base object. Definitely, ReSharper's rules are quite simple to change, but what do you all think? Should "base" be used while calling the base members? Only once you should use the base. Bureaucracy (); occurs when you have an override system of the same name in the children category, but you really want to call the method in parent. For all other cases, simply MethodCall (); use such as the keyword and base do not make th

dynamics crm - Add a deployment administrator to CRM 4.0 using SQL -

Is there a way to add a deployment administrator on Microsoft CRM 4.0 using a SQL query against the CRM database? The person who established the CRM was the only one who was the deployment administrator and has left and can be added to another controlling administrator by using the deployment manager tool. Or is there another way to add another deployment administrator? How to Set Up Additional Deployment Administrators "Deployment Manager" MMC Console Definitely consoles the existing deployment administrator Eddie Should be opened under the account. If you say that the account was disabled from AD, then activate it again, reset the password, which you know and then open the console and add another deployment manager. On the other hand, if the account was deactivated from the CRM, then it means that another CRM user has the privilege of activating / deactivating users ... then log on with users and accounts Reactivate. Hope it helps.

filesystems - How do I create a directory and parent directories in one Perl command? -

How do I create a subdirectory in Perl and, at the same time, make the original directories if they are not present? Like UNIX's MCD-P Command? file :: Use path qw (make_path); Make_path ("path / to / sub / directory"); Excluded mkpath and favorite make_path are generated from the archive stored in Perl 5 portsarts thread. In short, the Pearl 5.10 test logic parsing turned into a strange mechanism of the makepath () interface, so it was replaced with a simplified version which, as the last argument for setting options for the function Had taken a hash.

visual studio - VS.NET - Multiple Find All References Result Windows? -

There is a "Search all references" tool in Visual Studio which is great for navigating the codebase so that the function Where is or where one variable is used Imagine that we have the following: A1 (On navigating on a large code base, I have repeatedly referenced all the references To find where the top-level functions are called.) Call B1 (), B1 () Call C () A2 () Call B2 (), B2 () Call C () My problem: If I get all the references on C (), then I have B1 () and B2 () Both meet, which is great. Now, I try to know where B1 () I get A1 () B1 () Great! However, when I want to return the track and I know what is B2 (), but I've lost track of B2 (), then I go into a problem! By default, in VS.NET, there is only a window for the "Search all references" result. Since I have received all the references for B1 (B) (now), I came to know where C () was called. Now I have all the references to C (), and then find all the references to B2 (). I am working

oop - Why does PHP require an explicit reference to "$this" to call member functions? -

It is very clear in most OO programming languages, a clear reference to the scrolling, the current instance (i.e. in PHP in '$ this') Resolve the symbols without Why does PHAP do me so that each call should be kept in the same class with $ member in a member function? To resolve the scope of the function call. Consider: $ this-> Strstr (... and simply strstr (... the latter PHP's built-in strstr ( ) Will call the function that we do not want to do here. This is a result of adding OOP features in the top level processive / scripting language.

java - JAX-WS client for IIS Integrated Windows authentication (NTLM) -

Recently, I am working on a project for which to create a web service client in Java, Need to run on WS engines for a .NET web service secured by integrated Windows authentication (also called NTLM protocol) This seems to be a famous issue I searched on the Internet, but so far There is no good solution. Has anyone done this before? Any suggestion would be appreciated. We are using JX-WS, built in Java 6, and the client has Windows XP And the server running on the Windows 2003 server is on the IIS 7 Windows 2003 server. I found out that the integrated authentication works out of the box. No configuration provided. I turned on trace logging on the HTTP layer, and found that NTLM authentication was being used. So basically, the answer is: it just works. To test: > package url.auth; Import java.io.IOException; Import java.io.InputStream; Import java.net.URL; Import java.net.URLConnection; Import java.util.list; Import java.util.Map; Import org.apache.commons.io.

vb.net - EnvironmentEvent macro doesn't complete -

I am working in Visual Studio 2008 and I would like to compress> outlining> definitions for editing whenever I open One line It would be nice, after that, all areas were expanded. I tried the code which offered in a comment on Kyralessa, and it works very well as a macro that will run me manually by placing the following code in the EnvironmentEvents module in this macro macro IDE tried to extend to act as an event: public sub documentEvents_DocumentOpened (ByVal document EnvDTE.Document as) handles DocumentEvents.DocumentOpened documentDTE Excite Commands ("Edit. Callpoto Definition") DTE Shooter UI = True Dim Option. TextSeclectation = Dte as selection Active Documents Selection obz selection. Startoff document (obz) selection Fund Test ("#selected", "Windifed Option:. VSFI and Opports Match Inhaled Text") Loop Oz Selection StartOfDocument () DTE.SuppressUI = False End Sub However, when I VS I open a file with my solution, so nothing like

asp.net - Silverlight IninParams -

मैं ASP.NET 2.o वेब अनुप्रयोग में एक Silverlight अनुप्रयोग की मेजबानी करने की योजना बना रहा हूँ। वेब ऐप को निकट भविष्य के लिए 2.0 ढांचा को लक्षित करना होगा। यह सिल्वरलाइट कंट्रोल का नियम है क्योंकि इससे मुझे अपना वेब ऐप 3.5 पर अपग्रेड करने में मदद मिलेगी। सौभाग्य से, मैं के दृष्टिकोण को ले सकता हूं मेरा प्रश्न यह है कि मैं प्रोग्राम को किस प्रकार सेट कर सकता हूं जब मैं इस दृष्टिकोण को लेता हूं, तो सिल्वरलाइट ऐप के लिए InitParams। जब आप प्रोग्राममैटिक रूप से कहते हैं, क्या आप का मतलब है कि आप अभी भी कुछ मान सेट करने के लिए सर्वर चाहते हैं? एक लिटल कंट्रोल पर विचार करें और इसे इसके साथ बदलें: & lt; param name = "initparams" value = "foo" / & gt; जहां आपको इसकी आवश्यकता है, इसलिए ऐसा कुछ दिखाई दे सकता है: & lt; ऑब्जेक्ट ... & gt; ... & lt; एएसपी: लिमिटल आईडी = "इनट पैराम्स प्लेलेस" रनैट = "सर्वर" / & gt; & Lt; / वस्तु & gt;

c++ - Thread-safe static variables without mutexing? -

I remember that the static variable declared within the methods is not thread-safe. (As previously mentioned) dogs * MyClass :: BadMethod () {stable dog ("dog"); Return and dog; } My Library creates C ++ code for end users to compile as part of their application. The code generated is required to start the stable variable in a thread-safe cross-platform manner. I want to use the boost :: call_once to mute variable initialization, but then the end users are exposed to the boost dependency. Is there any way to do this without compromising additional dependence on end-user? You are right that the static initial thread is not secure (an article on which the compiler turns it on At present, there is no standard, thread-safe, portable way to make stable standards, double check locking can be used, but you can potentially see non-portable threading libraries ) is required. If thread protection is essential, then here are some options: Do not be lazy (load):

django - Get user group in a template -

I want to display a menu that changes according to the currently logged in user's user group, which is contained in this argument. My view, and then to check in the templates, set a variable to show which menu item .... I had asked this question before, but my argument was being done in the template. So now I want it in my view ... menu will look below Supporting the user is management, they will all see ... but considering the user in the sale of the group, they will only see the first two and the last two items .. and similarly. I also want a dynamic redirect after login based on the user's group. Any ideas? Check the permissions for the standard design of the default way the demo group name is group name. If you want to check group names, then know that for the group users have multiple relationships, you can get the group first in the list of groups In your template with something like this: {{user.groups.all.0}} or use this method in a conditional

serialization - A tricky javascript question -

I'll probably explain it through the best code I get something like this: Var object 1 = function () {// do something} var object 2 = function () {// some more} var objects = {'o1': object1, 'o2': object 2}; Var verb = []; Function addAction (actionName) {var object = objects [actionName]; Actions.push (function () {new object ();}); } So this code saves the runtime-defined actions sequence based on saved user input in an array. addAction ("o1"); AddAction ("o2"); If I want to play that sequence again, then I just do it: for (verb in i) {actions [i] () ; } and it will create objects of two object 1 object and object 2. Now, I need some sort of ordering [] array, but for me to maintain its scope, its inner work if I put the function in the string then I get And if I remove this string, then the object is' Will be undefined. How would you do this ? Why do not name the action with an object in the function, so th

model view controller - Building a menu the MVC way in PHP -

Hello I am creating my own PHP MVC framework, not with the intention of using it. But I'm trying to learn PHP5 OO and MVC design patterns. I have read a lot of tutorials and have worked the basics, but now I get stuck because things are getting more complicated. My framework uses the following URL structure: / Controller / Action Alternatively after a unique number of variables, eg. / Product / View / 1. By now I have received two different controllers: the page and the product I do not want to include them in the same menu. Corrosponding URL I am trying to install the following menu structure is between parentheses. Our company (/ page / view / 2) Werkwijze (/ page / view / 3) Staff (/ Product / Category / 1 Cake (/ Products / Category / 3) Contact ( / Page / view / 5) So basically I found a main menu and a sub menu for the menu class, I have set some essential requirements: The current item should have a separate CSS class in the menu. If there

java - JApplet Not Stopping or Reacting to Keyboard Input -

I'm walking with applet / swing, I'm trying to figure out how to do the applet recently. I have written in the following brief, which starts working on the surface. When I try to get it out, then there are problems: Does not do anything by pressing the ESC Fact line 38 does not reach anytime until I get it from the debugger Nor do line 94) - It seems that the override function is not processed by the ProcessAyvent (Caewant E) Applet Runner). However, mouse events are processed (through the debugger I can see the line 99 when I move the mouse). It is hanging by trying to shut down apple apple run apple runner, which means I did not have to kill the process when another applet was being played through it. . The printed '@' is not at the right size, and I suspect that this is not being illustrated using fixed width fonts line 74. Any thoughts that I am doing wrong? -Dido It seems that you have not given focus on the applet. When I run it in eclipse

css - Can the second of two consecutively invoked stylesheets override all styles defined in the first? -

If I have an HTML page that links to two stylesheets that apply as follows: < Pre> & lt; Link rel = "stylesheet" href = "original.css" media = "screen, projection" /> & Lt; Link rel = "stylesheet" href = "override.css" media = "screen, projection" /> If these two files define the names of the same style, is it true that the result of the style page will have no effect with original.css And all these styles will come from the styles defined in override.css : The reason I asked for is: I have original.css that I can not modify and I do not want to touch the lines of code that implement this file. Instead, I would like to insert the original column after making the original call in my new file and override all the things defined in the original. I am not sure whether this will work, whether it is appropriate, etc. Yes, it can be sure. This is the cascading bit of cascading style sheets

asp.net mvc - Ninject vs Unity for DI -

We are using ASP.NET MVC. Which of these best de frameworks is Nungect or Unity and why? The last time I saw one of them, I found that the foundation is slightly better. But there are drawbacks of both. Ninject is a better fluency-configuration plan Unity seems to rely on most XML configurations Ninject's main drawback is that you need to reference the niv. [Injection] Refer your code everywhere to add attributes. If I can ask, why are you limiting your choice for these options? I think that Castle.Windsor, Autofac and StructureMap are at least good or better.

apache - How can I use .htaccess to automatically chmod a folder? -

I am looking at this article Therefore, I want more details about this method. Thank you. I believe the article is contained, and there is no such attribute for htaccess files. I could not reference the Apache documentation or the source code of this instruction.

sql server 2005 - Using ASP.NET label as SSRS report parameter -

I have an SSR report with my datasets coming directly from the database. I have reports on the ASP.NET application page I The user page and user area defined in the master page is in the app page header Now, I want to read this area ID label from the ASP.Net page and Accordingly, I want to prepare my report. Basically creating a dataset based on the parameter coming from the ASP.Net page. Is this possible? Yes, you can send these as parameters to report. .. ReportParameter rpt = new ReportParameter ("name", "value");

Drawing on a DataModule in Delphi -

I'm afraid it might be able to be a custom background or be able to attract the datamade canvas in any way It would be difficult for all dataset relationships to be represented well with arrows and accessories, way back in Delphi 7 or so I think some types of datamodule designers who seem to be missing (I always seem to remember Area would be disturbed by any means). Does anyone know whether this is some type of IDE plugin or something? TDITA module is a direct descendant of TCMP, and thus, it is not a canvas or any There is a provision of such painting as there is no way to attract or paint on it. It is conceivable that you can make a descendant which is a TNEVENS, but to get it you must actually have to hack in the IDE design should be prepared at the time it is an interesting idea, though . Draftsmakers used to have a "diagram" tab on the designer. There is the ability to put notes in, boxes and data relations with text were not very understood or used,

c# - Recordset only returning 1000 records -

I'm doing an ADODB recordset.open () command with an LDAP query that will allow all the users from my Active Directory Receives. There are about 2,600 users in this, but I'm only getting 1000 returns. I have tried to change the PageSize and MaxRecords properties without any destiny recorded archives. Without external content, the code looks the same (I have made the connection details generic): ADODB.Connection conn = new ADODB.Connection (); ADODB.Recordset RS = new ADODB.Recordset (); Rsmaxrecords = 10000; Rs.PageSize = 10000; Conn.Open ("Active Directory Provider", "", "", 0); String query = "select from CD" LDAP: // OU = user accounts, OU = topleval, DC = domain name, DC = local 'where samAccountName =' * '"rs.Open (query, conn, ADODB.CursorTypeEnum.adOpenKeyset , ADODB.LockTypeEnum.adLockOptimistic, -1); It's definitely returning 1,000 records only, (I've confirmed), and I can use them properl

mocking - unit test smell -

I'm trying to change ArcGIS's own unit test, and I'm starting to use mocks (I'm Rhino's I use). When I started writing tests, I saw that I have to make fun of many things, and even stopping many ways to pass a single test. For example - my controller must first have relationax (hence I need iworkspace and returned irelationshipclass stub), even then a IFeature (a stub), and finally call stubRelClass.GetRelatedObjects (stubFeature) , second to ISet to other IFeatures for. Is it normal that so many objects and methods should be held so that it is passed? I also think that I really need to step on the code (yes - I know that I should have written the test earlier, I am still trying one), to find out what is going on ahead, And what should I do. I am also having problems with the com class jokes which apply more than one interface. In the output code I have them between the interfaces between QI How can I make a fake that implements both interfaces

c# - Is there a way I can enforce a method to follow certain method signature? -

मान लें कि मेरे पास सार्वजनिक प्रतिनिधि डेटासेट स्वत: पूर्ण Delegate (स्ट्रिंग फ़िल्टर, लंबी पंक्ति ऑफसेट); क्या मैं उस विधि हस्ताक्षर को लागू करने के लिए निम्नलिखित वर्ग बना सकता हूँ? (केवल एक कल्पित विचार): सार्वजनिक वर्ग मध्यस्थी {[का पालन करें (स्वत: पूर्णत: डिएलेगेट)) सार्वजनिक डेटासेट ग्राहक_आटो पूर्ण (स्ट्रिंग फ़िल्टर, लंबी पंक्ति ऑफसेट) {var c = कनेक्ट (); // कुछ कोड यहाँ} [सार्वजनिक कॉन्टैप्लेट डिलीट करें] सार्वजनिक डेटासेट आइटम_आटो पूर्ण (स्ट्रिंग फ़िल्टर, लंबी पंक्ति ऑफसेट) {var c = Connect (); // कुछ कोड यहाँ} // यह संकलन त्रुटि देनी चाहिए, विधि हस्ताक्षर का पालन नहीं करता [सार्वजनिक डेटासेट शाखा का पालन करें (आटो कॉम्पलेक्ट डिलीएगेट करें)] कार्यालय ऑफिसअफोटो समाप्ति (स्ट्रिंग फ़िल्टर, स्ट्रिंग पंक्ति ऑफसेट) {var c = connect (); // कुछ कोड यहाँ}} [संपादित करें] उद्देश्य: मैं पहले से ही अपने मिडलटियर के तरीकों में विशेषताओं डाल दिया मेरे पास इस तरह की विधियां हैं: सार्वजनिक सार वर्ग मध्यस्थ: मार्शलबीरफ ओब्जेक्ट {// ऑपरेशन। सेव केवल एक एन्यूम [कार्य (&quo