Posts

Showing posts from August, 2010

c# - How to find a repeated string and the value between them using regexes? -

How do you repeat the value of the string and how will it get the data between using regsx? For example, take this piece of XML: between the tag & lt; TagName & gt; Data & lt; / TagName & gt; What would be the correct regex to find these values? (Note that tagname can be anything ) I have found a way that works in which all tagname s which is & lt; & Gt; and then at the end of the string looking for the first instance of tagName from the opening tag and then concluding and working between the data between them. However, it should be an easy way excessive is disabled and complex! EDIT: Please do not tell me to use XMLReader; I suspect that I will ever use my custom class to read XML, I am trying to figure out the best way to do this (and wrongly) through trying my own. Thanks in advance. You can use: & lt; (\ W +) & gt; (. *?) & Lt; \ 1 & gt; The group is # 1 tag, the group # 2 is content.

c - Header per source file -

I am trying to understand the purpose behind each header file method for the purpose behind a header. As I see it, header functions are to declare announcements, typedef and macros among many files that they use when you use your .c file If you create a header file for it, it is a loss, every time you want to see a function declaration or macro, you need to refer to the header file, and generally it is simple that everything Then the programmer Why do you use the method? Definitions (which should be in one place) Header files in different announcements (that is, each C file should be available). In addition, they provide a bit of humility, because you can only put the public interface in the header file, and can not specify functions and static variables that are C should be internal in the file. It uses a public interface and file system to provide private implementation. One. In this way, you know that announcements are in .h file, and definitions in the related file...

web services - Robust method for making a copy of a TRemotable object in Delphi 2007 -

Is Delphi a solid mechanism for copying traceable object (or lineage) in 2007? I am creating a Delphi web service customer who receives different types of objects from a web service; Of course, all Tromtable descendants are in the client, I create a mail object, then I will copy all the attributes from the web service, which is permeable for my own object. It is done by TypInfo.GetPropList () and then a loop around TypInfo. GetPropValue () and TypInfo.SetPropValue () method calls though it works very well for the ordinary type - wires, ints, bool, etc., it does not work for complex types, such as date, time or sub-type type. And I think that if the web service ever uses a new complex type, then my copy code will also be broken. It seems that the object is to be serialized in an XML document, then read it in a new object, but it seems like a lot of land to copy a series of many places. More robust solutions, just type, seems to work fine for TXS ... Derivative types And sob...

iphone - Dynamic, localized NSString -

I need to create an NSString similar to the following: Name: Craig Buchanan Telephone: 800-555-1212 Email: name@company.com Where: Each row (such as a telephone) is included or The main part of the string (i.e. the part of ':' on the left side) is localized The portion of the value is from UITextField. My approach: NSMutableArray * value = [[NSMutableArray alloc] initWithCapacity: 3]; If (self.nameSwitch.isOn) [values ​​addObject: [NSString stringWithFormat: @ "% @:% @", NSLocalizedString (@ "name", @ "name label"), textFieldName.text]]; If (self.telephoneswitch.isOn) [values ​​addObject: [NSString stringWithFormat: @ "% @:% @", NSLocalizedString (@ "telephone", @ "telephone number label"), textFieldTelephone.text]]; If (self.emailSwitch.isOn) [values ​​addObject: [NSString stringWithFormat: @ "% @:% @", NSLocalizedString (@ "email", @ "email address label"), textFi...

windows server 2008 - Why does Perl's File::Copy appear to silently fail? -

I have a Perl script that works on Windows XP. This directory uses the File :: Copy move function to move the tree to the second place on the same drive. Script failed (silently) on Windows 2008 Nothing went away, nothing was removed. I am using ActiveState Perl 5.10.0 build 1005 and file :: copy which comes with it. Anyone can detect problems with ActiveState Perl on Windows 2008 due to which this could be? Example script: Use the file: copy; Print "AZ to ZZZ \ n"; Move ("AAA", "ZZW"); Print "completed \ n"; From itemprop = "text"> to: returns All functions return 1 to success, 0 upon failure $! If an error was encountered it would have been set. The example fails silently because nothing is checking $$! Try it on failure: move ($ from, $ to) || Failed to move files "dead: $!";

c# - How to keep ListBox display updated during .Add calls -

I am trying to easily obtain the scrolling list box which will behave in Delphi's TMemo.Add () way . Using the test code below, it scrolls fine for a while, and then stops at approximately 600 and fails to refresh until it is done. I've seen the reference to run it to be successful to update the code on a different thread given below like this I use regularly and I'm hoping for a more simple solution I am for (int i = 0; i I would not recommend Doing so, the performance cost of the consecutive result will actually kill the speed, which is about 600 you see - it's just getting too much to handle it You processed the window's message To do this, you can call application.Refresh during the loop, which keeps it going but once again the value of the display . A strategy that I have recently seen, which is not simple but effective, is a listback fake, so during adding, you hide the listback and change it in a panel or similar, which is used What you...

How do you setup a Django project with different sites using the same data? -

I am currently looking for documentation for Django sites: Which describes how to associate the content with multiple sites. Examples used are LJWorld.com and Lawrence.com. What do the Django project structure look for? For example, each site is an app in its own right: project / manage.py settings.py urls.py ljworld / models.py views.py Lawrence / Model py views.py If there is SITE_ID = 1 in ljworld and in Lawrence SITE_ID = 2 , then SITE_ID variable Is set to be explicitly set in ljworld / settings.py and Lawrence / Settings.py ? How do you run ljworld or dev servers of Lawrence? Update: I have used two sites with the content shared above. If there are any sites that are sharing the same content , Then what should be done? Do I really need different Django projects on n different servers, all connected to the same database server? In addition, if I need to make changes in settings.py which will affect all those web sites, then each file will be very ...

escaping - How can I properly escape JavaScript in JavaScript? -

It can be something that I can not ... but parent .documentation .getElementById ('& lt ;? php echo $ _GET [' song '];; & gt;') WinnerHTML = '& lt; Img src = "heart.png" onmouseover = "Heartwort ('');" & Gt; '; onmouseover = "heart over (''); The part breaks my javascript. Is there a way to avoid quotes, so that I can do that? Avoid nested quotes with a backslash: \ ' In addition, the never user data will be able to echo it or without sneaking: $ song = $ _GET ['song']; // Valid HTML ID (http: // www .w3.org / TR / REC-html40 / types.html # type-name) if (! Preg_match ('/ ^ [az] [- a-z0-9 _ :.] * $ / ', $ C {// display error because $ song is invalid} OR // save $ song = preg_replace ('/ (^ [^ Az] * | [^ -a-0-9 _:.]] / ',' ', $ Song);

To build a similar reputation tracker as Jon's by Python -

John Skeet has the following: Created by C # I'm interested in making a similar app Beautiful soup defaultdict We have apparently used To store the default data Strong> How can you create such a As Ratishta system by Python's John? Screenscapping is easy, if I understand the HTML format correctly, for example, to get my representative (as I 95810): import urlib import BeautifulSoup page = urllib.urlopen ('http://stackoverflow.com/users/' 95810 ') soup = beautiful soup. Beautiful soup (page) therep = str (soup.find (text = 'prestige'). Parent Prednest. Pre.) Print () print int (APR .rele (',', '')) I'm not sure what you are doing with defaultdict , though - you have a desire to perform on the int what you are processing next Will anyhow need to store it in a defaultdict?

java - How to get maven to timeout earlier while downloading dependencies? -

I am building my project with Apache Maven and a custom repository is configured, but when this repository is configured After killing this very After downloading it: It goes a few minutes and downloads it to a central repo Downloading: 12K Download (Spring -2.5.6. Pom) I think the timeout wants to be faster than that of it Maven With all new versions of version 2.0.6 or earlier there was no problem, it is very fast from time to time. Before Maven 2.1 in versions, there is no point in configuring the client for timed out , But you can configure to update at least updates when setting the update policy. This partially addresses the problem. For example: & lt; Repository & gt; & Lt; ID & gt; Myrepo & lt; / Id & gt; & Lt; URL & gt; Http: //maven.mycompany.com/m2< / URL & gt; & Lt; Release & gt; & Lt; Enabled & gt; True & lt; / Enable & gt; & Lt; UpdatePolicy & gt; Daily & lt; / UpdatePolicy ...

javascript - Jquery: Add class unless there is a child of certain class -

I want to advertise one, but only if there is no child of a particular class. $ selector.addClass ('addthisclass'); So I want to: & lt; Div class = "addthisclass" & gt; & Lt; Span & gt; & Lt; / Span & gt; & Lt; / Div & gt; And nothing here. & lt; Div & gt; & Lt; Span class = "badclass" & gt; & Lt; / Span & gt; & Lt; / Div & gt; How does anyone know this? Selector: $ ("div: not (: (Span.badclass)) ". AddClass ("addthisclass");

reshape - convert data from many rows to many columns in R? -

I have data that comes out of a DB in a normalized manner with the year, state and value area. I want to analyze the data and format it where every year is a field and there is no record. That's why I would like the data where each record is a state and then for each year the field and for each of those values, each value is in that year's value and in that position. Is there any order to do this? Then I have: state, year, value KY, 1998, 56 KY, 1997, 78 IL, 99 8, 48 il, 1997, 72 and I want to: state, 1997_value, 1998_value KY, 78, 56 IL, 72, 48 You want to use reshape ( ) function. reshape (data, idvar = "state", time = "year", direction = "wide")

c# - XmlDocument.SelectSingleNode returns null for root node -

I have many XML files that do not have postfix .xml, but I want to now handle them in the C # program. But it seems that C # slang can also find the basics of these XML files var doc = new XmlDocument (); Doc.Load (path); // MG: Edit XmlNode root = doc.SelectSingleNode ("rootNodename") to load on comment basis; It seems that the root is zero, how should I face it? Given that you have load / LoadXml Illusion has solved, I hope this issue is the name space; Do you have XML? Handling XML with names ... "Funny"; -P For example: XmlDocument doc = new XmlDocument (); Doc.LoadXml (@ "& lt; test xmlns = 'myFunkyUri' value = 'ABC' / & gt;"); // wrong; Do not consider any namespace XmlElement root = (XmlElement) doc.SelectSingleNode ("test"); Console.rootline (root == empty? ("No root)": root. GetAttribute ("value")); // Right XmlNamespaceManager nsmgr = New XmlNamespaceManager (doc.NameTa...

Database command runs glacially in my PHP script, quickly in phpMyAdmin -

I have a huge MySQL database (approximately 1 million items) and a fairly complex query is going on that database. When I enter the SQL command in phpMyAdmin, it takes about 2 seconds, but using PHP code takes about 1-2 minutes to generate the same output. Why would such a time be different? If this was a poorly executed query, would not it take long time to appear in phpMyAdmin? Are you really getting the same output? If you have tons of data in your database, how many lines do your query return? When you launch a query with PhpMyAdmin, it automatically adds the pagination. Then, with this preliminary query: select from test PhpMyAdmin actually executes this one: Choose from test range * 0, 30 If your range is not in your query (while executing it from your PHP script), it The difference can be understood: obtaining 30 lines and achieving hundreds / thousands / more rows does not take the same amount (to provide them the same chi Z). If you are not using...

Inherited CSS Values via Javascript -

On my page I'm changing some CSS styles via javascript. When I tried and pull a price which is inherited - it comes empty. Consider the following: . Sliding {display: none; Hidden flurry; }. #looking the filterbox {height: 185px; Background color: fuscia; } and html: & lt; Div class = "sliding" id = "filterbox" & gt; & Lt; H3 & gt; Test Form & lt; / H3 & gt; This is an exam & lt; Br / & gt; 12345 & lt; / Div & gt; If I look at the element ' document.getElementById (objname) .style.display ' its empty? How can I read the display value via javascript? Would you like to use. . Style is a means of setting up and setting assets inline style (like a style feature). Note, however, that for example nothing has to be done with heritage, just the rules set, which are of interest to you, apply those elements directly. Legacy takes place when an element takes the same style as its parent through the k...

user interface - Blocking specific keyboard key combinations using c# -

I have to block some keyboard shortcuts by using C # in windows applications. Alt + F4 Win + e win + l should have the configuration in App.config For this? And please help me with some sample codes or examples. It is not something that can be completed in the system wide by app.config Equipment such as stadistate must be used.

.Net Analysis tools -

संभव डुप्लिकेट: काम पर हम अपने प्रोजेक्ट्स का विश्लेषण करने के लिए दो टूल का उपयोग करते हैं, FxCop हमारे संगत कोड लेआउट के लिए हमारे प्रबंधित कोड और स्टाइलकॉप का विश्लेषण करते हैं। मैं इन उपकरणों को बहुत दुर्घटना से मिला और मुझे आश्चर्य हुआ कि मुझे कौन-सी अन्य उपकरण उपलब्ध हैं जो मुझे याद नहीं हो सकता है? परीक्षण के लिए NUnit / NMock / NCover। NCover एकमात्र विश्लेषण उपकरण है क्योंकि यह आपके परीक्षणों का विश्लेषण करता है। मैं दूसरों का उल्लेख करना चाहूंगा और साथ ही वे किसी भी नेट प्रोजेक्ट के लिए बहुत अच्छे टूल हैं।

How can I change database from SQL Server to Oracle with SubSonic? -

I am writing code with SubSonic 2.1.1 and have used MSSQL. The project should now run with Oracle. I changed web.config, and it does not work Can someone give me a sample that only changes the database - the web with subsonic Does the config change and the balance does not change? The name of the table in MSSQL is "name" but in the oracle there is "NAME". Can "Name" code be generated for Oscillic? Depending on the question you will need to see the string of your connections (clearly your database values With replace xxxxx): & lt; Connection Sets & gt; & Lt; Add name = "oracle" connectionString = "data source = xxxxxxxx; constant security information = true; user id = xxxxx; password = xxxxx;" ProviderName = "System.Data.OracleClient" /> & Lt; / ConnectionStrings & gt; Your second question again, Oracle case is not sensitive See more questions for details

flash - What's more efficient: a Timer, an EnterFrame event or a basic tween with extra code? -

Greetings I am creating a video player in Action Script 3, which is supposed to be targeted at the display Large H.264 videos will be run through RTMP with less possible processor load. There is not much control over the actual video playback part, but my view is that do not try to kill the processor with Chrome. Other spare parts of the player I have cheated the FLVPlayback and all the components, Using your Netconnection and Netstream, your own player is made from scratch, but there is no update event in the netstream class. For this, to update the progress bar and the time passed text area, I have to create a regular event of my own, which is Netstream. Reads from Time Property and computes the progress of the video. As far as I know, I have two ways I can do this: by adding the listener to creating a timer class insent or for an interframe event. I'm looking at the best ways to update regularly (hundreds of pairs of pairs), with minimal impact on processor loads. Whic...

apache - .htaccess with dynamic php - subfolder problems -

आवश्यक ज्ञान मेरी .htaccess फ़ाइल इस तरह से पुनर्निर्देश करता है: डोमेन कॉम / के बारे में domain.com/index.php?page=about पुनर्लेखन नियम ^ ([^ /।] +) /? $ Index.php? पृष्ठ = $ 1 [एल] "पृष्ठ" चर का उपयोग किसी php में किया जाता है: & lt;? Php include_once ($ _ SERVER ['DOCUMENT_ROOT']। "/ सामग्री /" । $ पेज "HTML।")। ? & Gt; "सामग्री" फ़ोल्डर में बस .html फ़ाइलें शामिल हैं जो सामग्री के रूप में शामिल हैं ठीक है यहां समस्या है: मेरे पास अतिरिक्त ".html" फ़ाइलों के साथ "सामग्री" फ़ोल्डर में एक "सबफ़ोल्डर" है जिसे मुझे एक्सेस करने की आवश्यकता है अब मैं इस तरह से पुनर्निर्देशित करने की कोशिश कर रहा हूं: domain.com/subfolder/about domain.com/index.php पृष्ठ = सबफोल्डर / के बारे में यह काम करता है: रीव्रेट नियम ^ ([^ /।] + / [^ /।] +) /? $ Index.php? पृष्ठ = $ 1 लेकिन अब मैं से सबफ़ोल्डर का उपयोग नहीं कर सकता: domain.com/subfolder/ क्योंकि एक 'पृष्ठ' चर और लेफ्टिने...

java - Generics erasure and legacy code -

Many books have said that due to which general use of Java is erased, there is consistency with legacy code. OK, very good but can someone show me some simple examples, where some common code interacts with the old Legacy code and vice versa? Here's an example, which is not possible without type deformation Will be: public static zero main (string [] args) {list & lt; String & gt; NewList = Legacy Method (); For (strings: newlive) {System.out.println (s); }} Legacy method of public static list () {list old list = new arrelist (); OldList.add ("A"); OldList.add ("b"); OldList.add ("C"); Return old; }

oracle - What is the difference between varchar and varchar2? -

वर्कर और varchar2 में क्या अंतर है? अब के रूप में, वे समानार्थक शब्द हैं। VARCHAR द्वारा ओरेकल के बीच अंतर का समर्थन करने के लिए आरक्षित है NULL और भविष्य में खाली स्ट्रिंग, जैसा कि ANSI मानक निर्धारित करता है। VARCHAR2 एक NULL के बीच अंतर नहीं करता और खाली स्ट्रिंग, और कभी नहीं। यदि आप खाली स्ट्रिंग पर निर्भर हैं और NULL एक ही बात है, तो आपको VARCHAR2 ।

Matrix transposition in XSLT -

I am trying to get to this kind of input: & lt; Col title = "one" & gt; & Lt; Cell & gt; & Lt; / Cell & gt; & Lt; Cell & gt; B & lt; / Cell & gt; & Lt; Cell & gt; C & lt; / Cell & gt; & Lt; Cell & gt; D & lt; / Cell & gt; & Lt; / Col & gt; & Lt; Call title = "two" & gt; & Lt; Cell & gt; E & lt; / Cell & gt; & Lt; Cell & gt; F & lt; / Cell & gt; & Lt; Cell & gt; G & lt; / Cell & gt; & Lt; / Col & gt; ... with this XSLT on this HTML output: & lt; Table & gt; & Lt; TR & gt; & Lt; Th & gt; A & lt; / Th & gt; & Lt; Th & gt; Two & lt; / Th & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; TD & gt; E & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; B & lt; ...

how to capture the "Menu Item 1" text in the dropdown button and assign to textbox -

itemprop = "text"> I'm using a code snippet from the codeproject of the drop-down button . & Lt; M: Click on SplitButton content = "TWB" name = "btnSearch" Grid.Row = "0" Grid.Column = "0" style = "{StaticResource aeroNormalColorSplitButtonStyle}" = "btnSearch_Click" width = "60" height = " 30 "vertical alignment =" center "horizontal alignment =" left "mode =" {binding element name = mode selector, path = selected item} "placement =" {binding element name = placement selector, path = chosen itam} "mouse leftbuttondown = "BTnSearchMouseBetaButdownDown" menu item header = "TWB" / & amp; Gt; MenuItem Header = "PWB" & gt; / MenuItem & amp; Gt; & Lt; / Mi: SplitButton & gt; So, next to the button of this partition, I have a textbox (which is basically a search box). So, as the above code sni...

sql server - SQL: creating a string array and query = like all strings in array -

I have a SQL Server 2005 report that takes a parameter in a query string that searches for customer names. The problem is that some customers should keep in the middle, when the user 'John Smith' will not bring it 'John Q Smith'. By using only SQL, how do I split a string? An array by white space then searches for the result that matches each string in the array? Try this SQL Server 2005 announcement @username Name VARCHAR (Maximum) SELECT @UserName = 'John Smit' DECLARE @User TABLE (Username VARCHAR (MAX)) Include in User (Username) Select 'John Smit' INSERT User Name (User Name, '', '% ') Select the Username' User Q Smit '

delphi - How to change length of dynamic arrays as 'out' parameters? -

I wrote a function, which separates two or more packets obtained in a physical packet. However, the compiler does not appreciate my efforts. Each packet size is in the first two bytes of the packet header, which is 6 bytes. So a real packet = this is the first two bytes + 6. I think if there are more than one packet. > process different packets (packet: indicator; size: word; out result: indicator's out; out number: byte); Var Status: Byte; // Status Start Position: = 0; Number: = 0; SetLength (Results, 0); // & lt; & Lt; Error (podord (cardinal (+ packet + status) ^ + 6 first two bytes + 6 (packet header) satellabamba (result, length (result) + 1); // Ink length & lt; & Lt; Error result [number]: = cardinal (packet) + position; Status: = results [number] + padord (cardinal (packet) + position) ^ + 6; Inc (number); End; End; I have collected compile-time errors in '& lt; & Lt; Error '. The error is one - 'Incompatible type' I n...

jQuery - find all elements without someone between -

उदाहरण के लिए हमारे पास ऐसे डोमेन है: & lt; div id = "main" class = "। कंटेनर" & gt; किसी अन्य तत्व & lt; div & gt; & Lt; span class = "संपादित करें" / & gt; & Lt; / div & gt; & Lt; div वर्ग = "कंटेनर" & gt; & Lt; div class = "संपादित करें" & gt; & Lt; / div & gt; & Lt; / div & gt; केवल पहली संपादन का चयन करने के लिए क्वेरी कैसे करें $ ('# main .edit: not (not between .container)') बाहरी कंटेनर वर्ग "कंटेनर" का भी हो सकता है जब यह भ्रामक है। यह काम करता है: $ ('# main .edit: not (#main .container.edit)') यदि आपकी बाहरी div में " कंटेनर "वर्ग: $ ('# मुख्य। संपादित करें: नहीं (। कंटेनर। एडिट)') (नोट: आपको चाहिए 'वर्ग का उपयोग नहीं करें' "कंटेनर", लेकिन वर्ग = "कंटेनर")

email - How can I send a .pdf file as blat attachment? -

I try to send mail with an attachment with an attachment (with the shell command of access VBA) When I try to send a .txt file, then all works well blat ... -attach c: \ mydir \ myfile.txt But if I try to send a .pdf file, then blat ... -attach c: \ mydir \ myfile.pdf I did not get the mail. Thanks in advance for any suggestions. File type should not make any difference to BLAT by itself, but the size of your email provider PDF Can run on whatever you are trying to send, or stop sending the PDF file completely. I would say check with the mail provider and see if they have such restrictions. In the meantime, you can convert the PDF to the name of the text and ask the recipient to name it back in the PDF, but it is a startling and hopefully short-term solution.

c# - How to I add an item to a Dictionary<string, Dictionary<string, object>>? -

I want my layout manager class users to write it: Layout Manager Layout Manager = New Layout Manager (); Layout Manager AddMainContentView ("Customer", "Introduction", View New {title = "Customer ID", Content = "This is Customer Identity."}}); But how do I fill out this dictionary in a dictionary in AddMainContentView () below? Public category LayoutManager {Private dictionary & lt; String, dictionary & lt; String, Object & gt; & Gt; _mainContentViews = New Dictionary & lt; String, dictionary & lt; String, Object & gt; & Gt; (); Public dictionary & lt; String, dictionary & lt; String, Object & gt; & Gt; MainContentViews {Get {return _mainContentViews; } Set {_mainContentViews = value; }} Public Zero AddMainContentView (String Modules, String View, Object View) {//_mainContentViews.Add(moduleKey, New Dictionary & lt; String, Object & gt; (ViewKey, see)); //_mainContentViews.Add...

javascript - jQuery SO Vote-Object and Scope -

This is a javascript question, the fact is that the mention of this website is irrelevant. It does not is in the meta. I am working on the answer stack overflow on the first page of the answer, as you scroll. It's working well I want to keep the ability to vote / down-vote loaded items, so I'm using $ .live (), which is working fine too. My problem is that the vote object is used by $ .live () not found within the scope of the method, or at least I think this is a problem. $ ("vote-up") Live ("click", function (d) {vote.up ($ (D.target))} $. Get ("/ query / 1151074", function (data) {$ ("div.answer" Data) .inertAfter (". Answer: last");}); This is a bit of sample code that you can paste in your FireBug console for testing. You can see the vote, .live () is not accessible in terms of calls. How can I fix this? Try Unsecured Window.vote.up () . See it in a way Security measures when upset you forget.

user defined functions - SQL Server Query with complex calculations for every row -

यह स्थिति है। तालिका एक कोला 1 कोला 2 टेबल बी Colb1 colb2 colb3 colb4 colb5 तालिका c - colc1 colc2 colc3 cola2 = colb1 और colb4 = colc12 के प्रत्येक मूल्य के लिए, कोला 2 के प्रत्येक मान के लिए colb2 को प्राप्त करें = Colb1 और colb5 = colc3, प्रत्येक कोला 2 के लिए colb3 गणना (colb3-colb2) * size * factor1 करें। प्रत्येक कोला 2 के लिए एसएम ((colb3-colb2) * आकार * कारक 1) की गणना करें के लिए एवीजी ((colb3-colb2) * आकार * कारक 1) की गणना करें मूल्य (colb3-colb2) * size * factor1 को अन्य गणनाओं के लिए तालिका में भी संग्रहित करने की आवश्यकता है मैंने मल्टी स्टेटमेंट टेबल का प्रयोग करके उपयोगकर्ता परिभाषित फ़ंक्शन का मूल्यांकन किया। लेकिन एक ही तालिका में दोनों मूल्यों और एकल मानों को वापस करने में असमर्थ। मैं एक ही युग्म क्वेरी में एकाधिक यूडीएफ कैसे उपयोग करूं? क्या कोई और फीचर है जो मैं उपयोग कर सकता हूं? नमूना डेटा: तालिका एक आईडी 1 प्रोड 1 तालिका बी id1 दिनांक से पहले id1 id2 Id2 तिथि से दाता एडी 3 आईडी 4 टेबल सी आईडी 1 तिथि मूल्य आईडी 2 तिथि मूल्य आईडी 3 द...

asp.net - HoverMenuExtender doesn't show up from within hidden table cell -

I have programmatically added a column to a gridview, in which to add a hoverman accelerator and panel to its cell. When you do not leave any issues on a line, the hoverman displays the accelerator. However, now there is an extra column in my grid which I do not want there, I tried three things to hide it: 1) Column visible on the server = false set Do not work because the columns will not be rendered, so the Hoverman Accelerators are not present on the page. 2) Set the column cells in visibility: hidden. It almost works, but the cells are still captured on the page in the same place as they are visible (as they should be with visibility). 3) Set the column of cells to display: none hides this column, but prevents the hoverman from displaying for any reason. So my question is, why stop HoverManu Extender from displaying when I hover over the line? The Hoverman Extender does not have to be marked as a popupdel / panel display: no one is there and then it should be change...

Library for the Basic Data Structures, such as Queue, in C -

समस्या: कतार के लिए सही डेटा संरचना ढूंढने के लिए: #include & lt; stdio.h & gt; # शामिल करें & lt; stdlib.h & gt; # शामिल करें & lt; stdarg.h & gt; # शामिल करें & lt; time.h & gt; Int main (int argc, const char * argv []) {क्यू q; च = 'ए'; के लिए (int k = 0; int k & lt; 4; int k ++) {q.addq (ch); ch ++; q.addQ (ch); ch = q.front (); q.removeQ (); } वापसी 0; } मैंने इसे संकलित करने की कोशिश की है, लेकिन कतार को अघोषित नहीं किया गया है: $ gcc -o qu_1 -g q_queue.c q_queue.c: फ़ंक्शन में 'मुख्य': q_queue.c: 8: त्रुटि: 'क्यू' अघोषित (इस फ़ंक्शन में पहले उपयोग) प्रश्न: मूल के लिए लाइब्रेरी क्या है उदाहरण में कतार के रूप में डेटा संरचनाएं? यह TAILQ_ * के लिए एक अच्छा उम्मीदवार जैसा दिखता है? #include & lt; sys / queue.h & gt; "मैन कतार" अधिक विवरण देगा - वहाँ सरल सूचियां, पूंछ कतार और परिपत्र कतारें हैं। उन मैक्रोज़ हैं जो आपको अपने स्वयं के ढांचे पर बोल्ट की ज़रूरत होती है, न कि पाठ्य...

classic asp connecting to access database, file not found -

I have to work in a classic ASP for a small job. I'm trying to get a site that runs on my computer to test. I am running Windows 7 and IIS 7. I get an error when I run from the local host and check the log: 80004005 | I_not_find_file_'c: \ inetpub \ wwwroot \ sc \ website \ data \ si.mdb ' My code is such dim objConn dim objRS objConn = set server CreateObject ("ADODB.Connection") objConn.Provider = "Microsoft.Jet.OLEDB.4.0" set objRS = Server.CreateObject objConn.Open ("c: / inetpub / wwwroot / sc / website / Data / si.mdb ") This is the correct path of the file however. Anyone know how can I reach it? Is the code wrong or do IIS settings need to be set up? I do not have any version of the office installed, will this create a problem? I have not done many different paths and provider settings but none. Edit code, in fact there was no connection string description in the code, but that person said that it still works He ...

php - combinations: avoiding multiple nested foreach -

How can you avoid nesting frames when you need to combine / check array elements? Example code: $ as = array ($ optionA1, $ optionA2) $ bs = array ($ optionB1, $ optionB2) $ cs = array ($ optionC1, $ OptionC2) foreach ($ as $ A) {foreach ($ bs $ b) {foreach (c $ as c $) {$ result = $ this- & gt; Method ($ a, $ b, $ c); If ($ result) etc}}} Any option that can avoid nesting? You can write your own Iterator class which implements. After that you can accept three arrays to its constructor and then you can use it with a loop in combination with the foreach However, I think it will be quite slow, so I I would like to avoid it. To avoid the nested advance loop, what would you be interesting to know?

A batch file to detect and display windows based information such as service packs -

I would like to display a batch file that installed that service pack, which is installed by Internet Explorer version , And the version of Windows Media Player that it has been installed will be for Windows XP only because I need this because I have a script that can update windows offline but when it comes to service packs I always install who do not know C, so it is a batch file that installs updates / service packs can quietly reflect on what service pack. Here is a VBS that will show which service pack is installed (from): strComputer = "." ObjWMIService = GetObject (set "winmgmts:" _ "and" {impersonation level = impersonation}! \\ "and Strauss computer and set" \ root \ cimv2 ") colOperatingSystems = objWMIService.ExecQuery_ (" Win32_OperatingSystem from * Select ") for each objOperatingSystem.Echo objOperatingSystem.ServicePackMajorVersion _ & amp;". "& ObjOperatingSystem.ServicePackMinorVersion...

What is the data type of "select 123.866" in SQL server 2005? -

If I just write something choose 10.00; How does it bring me? Here is a test that I went to, to test the binary representation of these types. The surprising thing here is that does not really match the first line in any armor! Select cast (as 123.866 binary) Union All selected artists (cast (123.866 real) as binary) All selected artists (float as cast (123.866) Association as binary) All selected artists (as binary in the form of Cast (123.866 decimals) Union All selected artists (cast (numerical as 123.866) binary as union) All selected artists (cast (123.866 Form of money) form of binary In) union branch select all (cast (as 123.866 smallmoney) in binary form) -------------- 0x0000000000000000000000000000000000000000000006030001DAE30100 0x000000000000000000000000000000000000000000000000000042F7BB64 0x00000000000000000000000000000000000000000000405EF76C8B439581 0x00000000000000000000000000000000000000000000120000017C000000 0x0000000000000000000000000000000000000000000012...

Visually Optimizing JavaScript Conditional Operators that are stringed together -

In Javascript we say we have the following code var test = 'd '; If (test! = 'A' and test! = 'B' & test! = 'C') Warning ('was good to go'); It would be nice to type something like if looks too long for me if (test! = ('A 'And' B 'and' A 'and' C ') Warning (' Good to go '); Unfortunately this is not working. What is a great way? var test = 'd'; if (! / [Abc ] /. Test (test) alerts ('was good to go');

objective c - How can I make an NSDictionary contain a selector as one of its values? -

यह कोड एक UITableViewController subclass दृश्यडिडलोड विधि में है। UITableViewController उप-वर्ग में एक परीक्षण विधि है। यह अपवाद फेंके बिना क्रैश करता है। id dict = [[NSMutableDictionary alloc] initWithObjectsAndKeys: @ "कुछ पाठ", @ " Text ", @selector (test), @" selector ", शून्य] pix0r का समाधान अच्छा है, लेकिन मैं आमतौर पर तारों का उपयोग करना पसंद करता हूं क्योंकि वे सीरियलाइजेशन के लिए अधिक लचीला हैं और डीबग आउटपुट में पढ़ने में आसान शब्द बनाते हैं। // सेट चयनकर्ता एसईएल इन सिलेक्टर = @ सिलेक्टर ( कुछ कुछ:); NSString * selectorAsString = NSStringFromSelector (इनसॉल्टर); Id dict = [[NSMutableDictionary alloc] initWithObjectsAndKeys: @ "कुछ पाठ", @ "पाठ", चयनकर्ता एस्टस्ट्रिंग, @ "चयनकर्ता", शून्य]; // चयनकर्ता एसईएल आउट चयनकर्ता को पुनः प्राप्त करें = NSSelectorFromString ([dict objectForKey: @ "चयनकर्ता"]);

iphone - How do you control action sheet animation direction -

As the Apple Developer Doc has been written, it says: The style animation of Depends on toolbar style, no receiver. When I use this method against the showInView method, it slides from the top, not below it. I am using showFromTabBar , because if I do not, the cancel button is partially untouchable because there is some disturbance with the tab bar, which is behind it (Pfft). Question: How do you alter action sheet from below, because it usually happens with showInView ? Note: My problem with the way the tab bar is happening through the UIView in the whole window showInView has been solved as follows: [FilterActionShot Show Inview: [Auto View Window]]; . I had the same problem with the cancel button. The reason for this is that the bottom bar "hides" when accessing the action sheet, you can make simple user interaction on that scene, until the action letter is over and then it is enabled again.

c# - Int32.TryParse() or (int?)command.ExecuteScalar() -

I have a SQL query that gives only one field - an IID type INT. And I have to use it as an integer in the C # code. How is fast and uses less memory? int id; If (int32.TryParse (command.ExecuteScalar (). ToString (), outside ID)) {// use id} or int? Id = (int?) Command.exequists (); If (id.HasValue) {// use id.Value} or int? Id = command.ExecuteScalar () as int?? If the difference between (id.HasValue) {// use id.Value} According to the three demonstrations, the impedance is taking the data from DB to your app, not a trivial cast or method call. I go with it: int? Id = (int?) Command.exequists (); If (id.HasValue) {// use id.Value} it first fails , if one day people return a string or a date To change the order, at least it will crash and you will get a chance to fix it. I would also go with a simple int cast if command to return the same result was expected Note, I generally prefer to return an externally compared to the executed scalar, e...

c# - Setting the initial directory of an SaveFileDialog? -

I want a SaveFileDialog with the following behavior: First when you , Then it goes to "My Documents". Next, it goes to the last selected folder, what is the best way to accomplish this? If I have not set the initial directory, then it goes to the directory of axle - which I do not want. It remembers the last selected directory - even between frequencies. If I set the initial directory, then it does not remember the last selected directory. Of course, I can save the last selected directory in the registry :( But I'm looking for a better solution. Savefile dialog dialog = new SaveFileDialog (); // ??? InitialDirectory Any advice? text "itemprop =" text "> You must set correct as well as property.

system.reactive - Equivalent to LINQ to Events in Scala -

Is it possible to do something similar to Scala? Is it like the new Traversal feature in Scala 2.8? To create a parallelism, this is what IObservable is IEnumerable (such as .net) (in Scala) Iterable is traversable, though it is just an interface. Comprehensive RX (Events from LINQ) project looks like functional reactivating programming (FRP) in the NAT. For Scala, the Ingo Meyer is doing some work on this under the name Scalphx.

Does iPhone OS support implicit animation? -

उदाहरण मैक ओएस एक्स से: [[एविय एनीमेटर] सेटफ्रेम: एनएसएमकेआरएक्ट (100.0 , 100.0,300.0,300.0)]; मैंने UIKit में कुछ इसी तरह की कोशिश की है, लेकिन ऐसा लगता है कि एनीमेटर पद्धति का उपयोग यूआईवीआईवी के लिए नहीं है। तो कोई "निहित" एनीमेशन नहीं है आईफ़ोन अंतर्निहित एनीमेशन का समर्थन करता है, हालांकि यह एक एनिमेटर का उपयोग नहीं करता है वस्तु, यह सीधे UIView में बनाया गया है इसके बजाय इसे आज़माएं: [UIView startAnimations: शून्य संदर्भ: शून्य]; [AView सेटफ़्रेम: एनएसएमकेआरएक्ट (100.0,100.0,300.0,300.0)]; [UIView commitAnimations]; सटीक विवरण प्रलेखित हैं। हर दृश्य हमेशा परत के रूप में अच्छी तरह समर्थित है, इसलिए आप परतों को चालू करने के लिए परतों को चालू नहीं कर सकते हैं स्पष्ट एनीमेशन।

Email Template Library in Java -

I know that there is a library to create e-mail templates for Java. Do you think this library is suitable for use in enterprise projects? What is another library to create an email template for Java? Freemer works well, and very powerful is a simple syntax, to a lesser extent Less is powerful, and wrt is a lot more forgiving. Nulls (Variables are not being populated) I have used both, and it is very easy to start velocity. Freemer offers (in spite of its strict implementation) 'purity' and much more in terms of features.

javascript - how to pass multiple arguments to onSuccess function in Prototype? -

I'm beginning to use the prototype library. I want to know how can we pass on many successes in the prototype / on-the-break success? For example: - New Ajax Success on: 'testurl', {method: 'post', parameters: {param1: "a", param2: "b", param3: "c"}, fnSccs, performer: fnFail}) my success function fnSccs: - function fnSccs (response) {warning (response.responseText); } I want to give a new argument for the fnSccs function. How is that possible? Thanks for any help. You can convert your success function to another that receives the desired parameter, and back to its old Returns the job: New Ajax Success on mySuccess ('myValue1', 'myValue2'), request ('testurl', {method: 'post', parameters: {param1: "a", param2: "b", param3: "c"}, onfile : FnFail}) mySuccess (param1, param2) function {return function (feedback) {// your old success function warning (para...

c++ - how to catch the power button on wince? -

How would I like to hold the Power button marked as VK_TPOWER in this possible? This is the only interface I can think of: But let me It is not completely convinced that it will let you do whatever you want with the power button, what you can possibly do with it, it is strictly limited: 'A link that can help

compact framework - Windows mobile controlling scroll bar with finger -

itemprop = "text"> I have a question about Windows Mobile Development. I have created a mobile form on the Windows Mobile 6.0 Test Project. But that example is slightly larger than the normal normal PocketPC forms. I now all have said that you can press the scrollbar to reach the bottom or at any place on the form. But I'll have to use finger for easier form fields to navigate. This type of iPhone :) Is it possible? how can I do this? Windows Mobile 6.5 adds gesture support, which is thought to allow such functionality for finger control. You can also write your own, which is not difficult, but still cumbersome.

C# : how to create delegate type from delegate types? -

In C #, how can one create a representative type that maps to the representative type for a representative type? Specifically, in my example given below, I want to declare a representative code (yoga) (borrowing from mathematical notation) yoga (f, g) = f + g . I then use yoga (f, g) - such as yoga (f, g) (5) [this meaning f (5) + g (5) ]. class examples {representative int IntToInt (int i); Public fixed integer double (int i) {return i * 2; } Public Stable Ent Square (Int i) {return i * i; } Representative IntToInt IntToIntPair_To_IntToInt (IntToInt f, IntToInt g); Public Static IntToInt Sum (IntToInt f, IntToInt, g) {Return f + g; } Public static zero main () {IntToInt DoubleInstance = Double; IntToInt SquareEninstance = Square; IntToIntPair_To_IntToInt SumInstance = Amount; System Console Limit (double instance, square instance) (5)); // / 35 = 10 + 25 = Double (5) + Square (5)}} function Funk & lt; Int, int>, funk & lt; Int, int & gt; & Gt...

dcom - Registering in COM+ expose less interfaces than Regsvr32 -

I am using the 32 bit COM library by registering with regsvr32 and all works well. Since I need to access it through 64 bit process, I am registering it as a COM + via component service administrative tool. The problem is, it seems that all COM interfaces are no longer coming up. What can be the reason for this? There are two sides to this problem. First of all, you can control manually that by adding these classes to the COM + application, which square is highlighted by COM +, the sections you do not include Immediately provide in-cost and it will fail only due to 32-bit / 64-bit incompatibilities. Then comes Marshal. To give the consumer the interface of the newly created object, COM + should know how to make the interface martial. Unless you apply marshaling on your own default marshaling, it is used. Default Marshalling will work only when the following requirements are met: COM Server has a type of library, the interface is included in that type of library and the int...

triggers - SQL Server 2005 How can I set up an audit table that records the column name updated? -

यह तालिका परिभाषा दी तालिका herb.app बनाएं (appId int identity प्राथमिक कुंजी, आवेदन varchar (15) अद्वितीय, ग्राहकनाम varchar (35), ऋण संरक्षण बीमा राशि, राज्य varchar (3), पते varchar (50), ऋण अमाउंट पैसा, जोड़ा varchar (7) नल नहीं, जोड़ा गया dhalldatetime डिफ़ॉल्ट getdate ()) मेरा मानना ​​है कि परिवर्तन न्यूनतम होंगे, आमतौर पर केवल एक फ़ील्ड और बहुत ही विरल होगा। तो मैंने यह तालिका बनाई: तालिका जड़ी बूटी बना .appAudit (appAuditId int प्राथमिक कुंजी, फ़ील्ड varchar (20), पुराना वैलार (50), बदलकर varchar (7) नल नहीं, जोड़ा गया जोड़ा smalldatetime डिफ़ॉल्ट getdate ()) कैसे एक ट्रिगर में क्या इसे स्टोर करने के लिए परिवर्तित किए गए मूल्य के कॉलम का नाम मिल सकता है? मुझे पता है कि हटाई गई तालिका में शामिल होने से मूल्य कैसे प्राप्त किया जाए। तालिकाओं का उपयोग करें निगेल रिव्एट ने इन तालिकाओं का उपयोग करते हुए एक महान लिखा है। यह काफी जटिल एसक्यूएल कोड है, लेकिन यह एक साथ जानकारी खींचने के कुछ अच्छे तरीके को हाइलाइट करता है और एक बार जब आप समझते हैं कि आप प्रेरणा के र...

Cross DB stored procedures performance in SQL Server 2008 -

एक SQL सर्वर डेटाबेस $ DB $ DBSP1, $ DB $ DBSP1 की तरह संग्रहीत कार्यविधियों वाले एक SQL सर्वर डेटाबेस $ SP एक संग्रहीत कार्यविधि है सी # कोड से $ DBSP1 $ SP चल रहा है, यह 1.5 के आसपास है। सी # कोड से $ DBSP2 $ SP पर चलाना लगभग 0.5 एस लेता है। सी # कोड बहुत सरल है और उपयोग डिफ़ॉल्ट पैरामीटर के साथ SqlClient। जब मैं एसक्यूएल कंसोल में $ SP $ और $ DBSP2 दोनों पर $ SP निष्पादित करता है, तो यह 0.4 एस लेता है। दो कोड डेटाबेस के बीच फर्क सिर्फ इतना है $ डीबीएसपी 1 उत्पादन में है और थोड़ा भरी हुई है, जबकि $ DBSP2 निष्क्रिय है कोड डेटाबेस में कोई डेटा नहीं है, केवल संग्रहीत कार्यविधियाँ और $ DB से अधिक विचार हैं। क्या कोई ऐसा कारण बताता है कि ऐसा क्यों होता है? चूंकि सभी काम $ डीबी में होते हैं, जो दोनों मामलों में समान रूप से लोड होता है, इसलिए मैं प्रदर्शन समान होने की अपेक्षा करता हूं। "post-text" itemprop = "text"> गति में अंतर विभिन्न क्वेरी योजनाओं से आया है। $ सपा एक जटिल संग्रहीत कार्यविधि है और इसकी प्रारंभिक क्वेरी प्लान बेहद भिन्न ह...

ASP.net - Caching by Query-String (VaryByParam) -

In which situation should we use Question-String (VaryByParam) to get caching in ASP.NET? In the case of a web-application can give an example of the real-life situation? product.aspx? ProductID = 12345 Obviously you do not want to get the data for the product. Output cache of SPX, which was requested. In detail If I hit Products.aspx? ProductID = 12345 will be processed on the page, see the information for product 12345 and cache the result then you Products.aspx? ProductID = 54321 , the page will not be processed for you, but products.aspx will be taken from the output cache and you will see the information for 12345. Not good, VaryByParam solves it.

Modal window with jquery navigation inside -

I'm trying to set up a site navigation that extends to many levels I made an alternative to the customer Where different levels are opened using jquery and now it is to see how this is seen within a model window. However, I am using FancyBox which I have used to load navigation with AJAX calls. It displays exactly as long as you do not click to reach the next layer which causes the window to shut down. Any ideas how can I keep the window open until the user reaches the last point? Help is highly appreciated. Edit: Apple has something that is running on the following page, but with photos, It does not look like a single window that reloads like most modes. I have done this job, how to do the best, need to use the callbenshose function Made in Faxbox.

haskell - Pattern matching identical values -

I was wondering if functional programming languages ​​(Hassel / F # / lotus). Just think about the following example: plus aa = 2 * a plus ab = a + b the first version Will be called when the function is applied with two equal values ​​(which are stored in a ). A more useful application would be (Simplification) an AST). simple (add AA) = multi 2 one but Haskell rejects these codes and gives me the for conflicting definitions Warning A - To know whether the function gets the same value or not, I have a clear case / if-check to indicate whether there is a move to indicate that one variable Against that I want to match which will happen many times? This is called an nonlinear pattern about it's Haskel cafe mailing list But there are many threads, not long ago. Two below: Bottom row: Applying is not impossible, but for simplicity a decision has been taken against it. By the way, you do not need to work around if or case ; To use a guard (a l...

javascript - How to add client side OnClick actions to text in ASP.NET -

I am creating a table of contents in an asp.net page, and I am the customer side OnClick Action in each cell (the action must be set to the value of the named text box control for the text in the clicked cell). If I can add stuff directly to the HTML output, then I think I can do it in every cell with a line of JavaScript. Given that I'm not now using JQuery (and never before), what is the easiest way to add it (spend learning content Including time)? Edit: seems to work Programmatic, you can set the HtmlTableCell's onclick client attribute by using HtmlControls: HtmlTableCell cell = new HtmlTableCell (); Cell.Attributes.Add ("onclick", "someFunction ();"); However, if you are using jQuery, then you can do something like this: $ ('td'). Click (function () (/) select all table cells on the $. $ (This) .html ($ ('# textboxId'). Val ()); // When clicked, replace the internal HTML }); // with a textbox value

mysql - Group and sum from different tables -

मान लें कि हमारे पास तीन तालिकाओं हैं T1 आईडी | प्रकार | कक्षा | अंक 111 | 1 | a101 | 12 111 | 1 | बी 104 | 10 112 | 2 | ए 112 | 40 118 | 1 | ए 245 | 30 186 | 2 | c582 | 23 टी 2 (केवल प्रकार के लिए डेटा = 1) आईडी | प्रकार | EPoints 111 | 1 | 4 118 | 1 | 3 टी 3 (केवल प्रकार के लिए डेटा = 2) आईडी | प्रकार | EPoints 112 | 2 | 9 186 | 2 | 15 और हम एक ऐसा दृश्य देखना चाहते हैं जो आईडी, प्रकार, राशि (अंक) + उदाहरणों के लिए उदाहरण दिखाएगा आईडी | टाइप करें | अंक 111 | 1 | 26 112 | 2 | 49 118 | 1 | 33 186 | 2 | 38 मैं यह कैसे कर सकता हूं? टी 1 समूह द्वारा टी 1 समूह से अंक के रूप में बिंदु (टी 1.आईडी, टी 1। टाइप, बीएम (टी 1 पॉइंट्स) का चयन करें, जैसे dt.id, dt.type, dt.points + coalesce (t2.epoints, t3.epoints) चुनें। आईडी) के रूप में डीटी बाएं बाहरी जुड़ें टी 2 पर टी 2 पर टाइप करें। टाइप = dt.type बाएं बाहरी टी 3 पर टाइप करें t3 पर। टाइप = dt.type

actionscript 3 - Flex 3 event propagation on a composite custom component? -

I have a select component, which is composed of a selection control (radio button) and text input. I want to make some arguments in response to the incidents of change with both the controls, but after that I want to do anything that the transformation of the composite component has been registered on the handler so that there is a change in the handling of events. The problem is, when I send events again, the event goal has changed to my custom component, the goal of the initial event has been lost. Here is my custom component: & Lt; Mx: text input width = "100%" maxChars = "{listItem.specify. EntryLength}" enabled = "{selected}" visible = "{listItem.hasOwnProperty ('specify')}" include inlineout = "{visible} "Change =" onTextChange (event) "/> & Lt; / Mx: hbox & gt; In the event handler that receives the change event from this component, I think that specify the event.target is an example ...

generics - Inheritance in C# - simple question -

डुप्लिकेट यहाँ मेरा कोड है : सार्वजनिक वर्ग बेस {सुरक्षित बाइंडिंग सूची & lt; नमूनाबेस & gt; m_samples; सार्वजनिक आधार () {}} सार्वजनिक श्रेणी तैयार की गई: बेस {सार्वजनिक व्युत्पन्न () {m_samples = नया बाइंडिंग सूची & lt; नमूना डीरिवेट & gt; (); }} नमूना हटाया गया नमूनाबेस से लिया गया है विरासत तर्क के अनुसार, मुझे ऐसा करने में सक्षम होना चाहिए। हालांकि, यह संकलन नहीं करता है - त्रुटि कहती है कि नमूनाबैब को सम्मिलित रूप से नमूनाकृत प्रकार में परिवर्तित नहीं किया जा सकता। क्या करता है? मैं सी # 2.0 का उपयोग कर रहा हूं आप उपयोग करने का प्रयास कर रहे हैं सहवर्ती, जो सी # 3.0 और इससे पहले समर्थित नहीं है (लेकिन सी # 4.0 में होगा) आप अब भी नमूना हटाए गए में m_samples वस्तुओं की ऑब्जेक्ट जोड़ सकते हैं, लेकिन सूची के सामान्य प्रकार को SampleBase होना चाहिए। संपादित करें: तो पावेल सही है, सी # 4.0 वास्तव में इसके साथ मदद नहीं करता है। यदि m_sample को IBindingList & lt; SampleBase & gt; का उपयोग (काल्पनिक) सहृदय अंतरफलक IBindingLis...

jQuery / JavaScript Bubbling and stopPropagation doesn't work -

I am creating an editing button that pops up a modal box with a form to edit it. JQuery then sends this form to my server and I get a JSON response back. However, due to my bubbing issue, if I click on, for example, click on all the edit button and then the last time and change a field, it all happens in this. Click $ ('edit') (function (event) {// more code ... modal_submit (the_id); event.stopPropagation ();}); and then submit event: function modal_submit (the_id) {$ ('# modal form'). Submit (function () {// Every time I click on the Edit Button Alert (the_id), returned false ;;}; } Finally all of this is inside the Hossole: $. GetScript ('js / edit.js', function () {create_edit_btn (); }); I have used only one more time, and it works, but I had to do this. Event.stopPropagation, but if I "do this" now it says The event has not been defined, but as I said it The wrong code used to work for the other script before. Does anyon...

overloading - How do I use PHP's __get() and __set() for defined fields in my class? -

I have read, and most examples show only to allow custom fields to define (similar to StdClass). But what about my private areas defined in my class? How should this be recovered / assigned? I can switch one to the possible values ​​and work on some values: class A {Private $ name; Private $ age; Public function __get ($ var) {switch ($ var) {case 'name': return $ this-> Name; break; Case 'age': return $ $ this- & gt; Age + 10; // just to separate something;) Break; Default: Break; }}} Is this the best way, or is there any other generally best practice? (I do not know that it is possible for the loop class variables inside the classroom, but is not suitable in most situations, because you do not want to return everything.) This will effectively make them public, and generally it does not get anything from you instead of using public properties (but you do not get the performance penalty Pay and you Programming have to write more code, risk bugs)....

c# - How to convert XML file to a Database? -

I downloaded the SO Data Dump recently and wondered how I could convert it from XML into a DB The process of converting the XML data dump to the database by using the procedures that I use in my .NET application Is a description of

Javascript Regex: surround @_____, #_____, and http://______ with anchor tags in one pass? -

related (but slightly different): I want to surround all instances of @_______ , #________ , and http: // ________ with an anchor tag . For example, consider this twitter message: Spread the python on the celestial dog scooter, quick brown fox jumping Running occurs with the desired Reggae pattern: Instant brown fox & lt; A href = "a" & gt; @spreadtamovi & lt; / A & gt; Lazy jumps on the dog & lt; A href = "b" & gt; # Cows & lt; / A & gt; & Lt; A href = "c" & gt; Http: // URL & lt; / A & gt; Fill out the words starting with only @ , # or http: // So that Dog@gmail.com dogs . var sample = "sample"; Sample = sample.rele (/ [^ \ s + - +. +] (@ \ W + | # \ w + | http: // [\ w \ ./] +) [$ \ s + - +. + ] / G, "& lt; a & gt; $ 1 & lt; / a & gt;"); Includes $ 1 match string. Using the function (which I recommend for your particular s...

How does the youtube iphone app work -

I want to apply for a YouTube app like iphone, where some videos are streamed / downloaded from a video site . But by looking at the YouTube app, I doubt it. I searched around Google, and it seems that there is no support for running the flaw file in the IPI. So how is YouTube app video running? Where does encoding happen? From Wikipedia: "From June 2007, there is a series of Apple products available for YouTube's videos. For this, YouTube's content needed to be transcoded in Apple's preferred video standard, H.264, in a process, for several months, "

iphone - how to change from one Viewcontroller to UITabldeview controller? -

I have coded in appdelegate.m as it is to convert from the current view into the UiTable View Controller? But I'm getting the error, tab is a Uitableview controller tab = [interview viewer alloc]; [Remove ViewController.viewprovisionview]; [ViewController.viewAdsviewview: Tab]; [Add window] View: Controller view; You have never started the tab, and you see the additroller Not really sure what you are trying to do Do this: tab = [[Interview viewer alloc] init]; [Remove ViewController.viewprovisionview]; [Add windowAubview: tab.vew];

c# - Is there a better alternative to Console.ReadKey()? -

Most programming books will ask you to use the console to stop the console. Reidki () to stop the console, but is there a better option? console. WrightLine ("Press any key to continue"); Console.ReadKey (); You have not actually told us what you want to achieve. If you choose to continue the user you want to stop the output, then you actually wait for a key to be pressed using Console.ReadKey Are not. If you want to stop the output for a certain time, then you thread. Sleep can use the method, for which no human inventions are required.

c# - Unit testing an HttpApplication -

I have a class from HTTP applications that adds some extra features. I am at the point where I need the unit to test these facilities, which means that I have to be able to create a new installation of HTTPEpiation, to duplicate a request and retrieve the feedback object. How OK do I run the unit to test a HTTPPoint object? I am using Moq this time, but I do not know how to set up the required counterfeit stuff. Unfortunately, this is not particularly easy to do, because the http application itself is very easy to joke. Does not lend in; There is no interface to mock against it and most of the methods have not been marked as virtual. Recently, I had a similar problem with HTTP and HTT Webbashings. In the end, the solution I went to was to create a straightforward "pass-through" cover for those methods I wanted to use: public class HttpWebRequestWrapper: IHttpWebRequestWrapper { Private HttpWebRequest httpWebRequest; Public HttpWebRequestWrapper (vertical url) {...