Posts

Showing posts from April, 2015

c# - Reading a text file -

I am importing a text file database into my SQL Server database in asp.net c #. Please tell me that nobody knows very much thranks in advance Try changing the data type of the database column, where u save the text file in text or ntext.

ide - How to change Xcode's Build Results view type? -

A few days ago I pressed a button in the build results window, it was located between the error list and code subwindows Changed view mode in net compiler output from And the button went! So far I have managed to stay with the output, but it is really worried. How can I change the original "error list" type of view? In previous versions of Xcode, there were two split scenes in the build results window: one for the editor: and the literal build result For one if you are not using Xcode 3.2, try dragging a partition view from the top of the window. In the current version, there is only one split view remaining, which is the result of the graphical build that shows the editor below. The results of the text are in expandable bubbles, so I think what you are not talking about?

lucene - How to use wildchards, fuzzy search with Solr? -

I use Solr to search my data and now I have recognized that some solr search query language features There is no word for me. I remember those capabilities: Fuzzy search wildcard *? - There is no need to set up yet. I Field Specification - Currently I can not tell the search in the title: Blabla So far as I know That these things should come from the default in Solar, but I do not have them clearly. I'll use Solr 1.4 here you can find thank you for your help. Your fieldType name = "text" is missing many filter references For, here is the text field type from Basic Schema.Xml: & Lt ;! - In this example, we will only use synonyms at query time & lt; Filter class = "solr.SynonymFilterFactory" synonyms = "index_synonyms.txt" Ignore = "true" extension = "wrong" /> - & gt; & Lt ;! - Removing the case insensitive stop term To add 'difference' to more accurate phrase queries, add position

Mysql Union repeating results -

I have a selection of the following, but it repeats the results of the second inner selection 3 times. Can anyone tell me why this is Besides, when I get results, how will I know when the result comes from a table? Home_content or facilities_table Choose from select (from hm_id, hm_name, hm_summary, match (hm_name, hm_summary) ('test') as a score from home_content where match (hm_name, hm_summary) Against the score (fac_title, fac_summary) ('test')) against the UNION selection fac_id, fac_name, fac_summary, match (fac_title, fac_summary) match (as opposed to 'test_') (score from facilities_table) DESC < / Code against a command> Thank you in advance can not see it Why are you getting duplicates? Query: There are no duplicates in the source table The same data appears in home_content and facilties_table The second part of the question reads easily to decide which table comes from the union's content, that by adding a continuous

c# - How to get a Type object from Type's name? -

यह मेरा कोड है: System.Windows.Forms का उपयोग कर; टाइप प्रकार = टाइपफ (फॉर्म); प्रकार type2 = Type.GetType (type.FullName); परिणामस्वरूप: type2 == null क्या मैं गलत कर रहा हूं? शायद आप कोशिश कर सकते हैं: प्रकार type2 = Type.GetType (type.AssemblyQualifiedName);

Python :: How to open a page in the Non Default browser -

I have a simple to open a locally hosted web site to test CSS in 2 or more browsers The default browser was trying to create the script IE7 and this page opens up fine, but when I try to open a non-default browser like Firefox or Aurora, it fails. I am using the WebBuser module and have tried so many ways in such a wide variety of sites on the web. Is it possible and if so? Matt's right and there is a very useful module to know ... < P> IDE 2.6.2> gt; & Gt; & Gt; Import sub process & gt; & Gt; & Gt; Chrome = 'c: \ user \ ted \ appdata \ local \ Google \ Chrome app \ Chrome.xa' & gt; & Gt; & Gt; Chrome_args = 'www.rit.edu' & gt; & Gt; & Gt; SpChrome = subprocess.Popen (chrome + '+ + chrome_argus) & gt; & Gt; & Gt; Print spChrome.pid 2124

javascript - How does this mess work? -

This summary is not available. Please click here to view the post.

javascript - HTML 5 File API -

I've heard that Firefox 3.6 adds support for local file APIs. Does this mean that I can access local files from javascript? Does anyone give me examples to read / write local files? I would love to be able to read / write simple text files. Only you can access files that delete files from desktop or files tag is selected from the demo I wrote here:

mod rewrite - How to forward one url to another using mod_rewrite rules -

I am trying to forward this url but it does not work - this is my code: < / P> Rewrite rules ^ https: //www.wsjwine.com/discovery_offer.aspx? Promo = 2227006 $ https://www.wsjwine.com/discovery_offer_lp2.aspx?promo=2227006 [L] You can only test. You need to make additional use for further tests. Now if you want to rewrite each request for /discovery_offer.aspx to /discovery_offer_lp2.aspx Usage can only be used (for example for the .htaccess file in the root directory): Rewrite ^ discovery_offer \ .aspx $ discovery_offer_lp2.aspx [L] If you do not specify a query in the replacement, the originally requested query was automatically added to the new one. is. And if you want to rewrite that specific URL, try it: % rewritecond% {HTTPS}% {HTTP_HOST} = = www.wsjwine .com RewriteCond% {QUERY_STRING} = Promo = 2227006Rescript Rule ^ discovery_offer \ .aspx $ discovery_offer_lp2.aspx [L]

asp.net - Question about moving common routines to the App_Code Class -

I have some common code that I want to share among the pages and I was messing around with App_Code classes Which is very good but I also want to use the code that affects the drop down lists example: sub Set_FirmType (ByVal as the sender object, byVal e EventArgs as) subcategories .Visible = "false" supplycategories.Visible = "false" supplytypes.Visible = "false" CityData.Visible = "true" CityDropDown.Visible = "false" CityDropDown.Items.Clear () If DropFirmType.SelectedValue = "funeralhomes || FH" then CountryDropDown.ClearSelection () CountryDropDown.Items. FindByValue ("United States"). Selected = true CountryDropDown.Enabled = false StateDropDown.Enabled = true getStateDropDown ("1") end then End Sub Is there a way to put it in my App_Code class? Thanks in advance! After It seems that you are setting a certain subtotal that visibility toggles on many controls and setting some propertie

user interface - How to transfer the elements from one JList to other JList in Java? -

I have two JLists on the swinging GUI. Now I want that when a user clicks on a button (the transfer button ) The selected elements of a jellist should be added from the first jellist to the second gelist and first remove those selected elements from the jellist. Model does not know about selection. The JList offers several ways to get selected items or selected indices. Use those methods to get the items and add them to the other list models.

php - preg_replace speed optimisation -

When looking at the accepted answer, the author added + after expression $ str = preg_replace ('/ [^ 0-9.] + /', '', $ Str); To remove, instead of single events, + is optional for functionality to find sub-string but I wondered whether + < / Code> Adding is fast or not. (Or is there any difference?) I think it is fast, due to the short string and memory handling. But I can also understand that more complex regex expressions are slower than simple words. So when using this technique to remove sub-string, can it try to find large or small sub-string? Do not read too much in benchmark results, they are incredibly difficult to do well From this, you should take only one thing that the repetition can happen on some types of wires, where the repetition time is long. PCRE's such things that can easily change with a different version. function tst ($ pat, $ str) {$ start = microtime (true); Preg_replace ($ pat, '', $ str); Return Mi

sql server - Performant way to get the maximum value of a running total in TSQL -

Text after " We have a table of transactions which is structured like the following: TranxID integer ( P and Identity Area) ItemID Integer TranxDate datetime TranxAmt Money TranxAmt can be positive or negative, hence the running total of this field (for any ItemID) as above and below time Will also be known by going to. Getting the current total is clearly simple, but what I am doing is a great way to get the maximum value of the total value running and this happened when TranxDate happened. Note that TranxDate is not unique, and due to backdating some ID fields, it is not necessary in the same order as a TranxDate of a particular item. We are currently doing something like this (@tblTranx is a table containing only variables containing a particular item's transaction): select top 1 @HighestTotal = z. Join TotalToDate, @DateHighest = z.TranxDate (Selection a.TranxDate, a.TranxID, as an add-on (b.TranxAmt) as an @TblTranx as @TblTranx from TotalToDate as aTranxDat

sql server - Are there any automated white box testing tools for T-SQL stored procedures and/or functions? -

I was wondering if there are any tools that analyze T-SQL stored procedures and tasks (instead of managed code) Order to generate meaningful and interesting input values ​​for Parameterized unit tests. afaik, no I'm never coming near one and looking at each other Failed to throw (I came to this topic) I can only suggest that there are semi-optical devices: - test framework for TSQL - Automatic testing For data generation Or, just write the test in NUnit You can create a basic data access layer (eg.) In .NET, each method wraps a call with the same parameter to pass through a different sproc. You can then use a tool like Pex on that Data Access Layer - a type of proxy approach

What are the SQL Server requirements for Team Foundation Server And Reporting Services? -

I had many problems in setting up Team Foundation Server 2005 (workgroup) for several reasons about six months ago, and because Other projects Priority, I have never finished over that, we are setting up a new server and now I am trying to determine which licensing and additions are needed for SQL Server. The problems I have participated in is that the team foundation server requires the use of reporting services, and I was under the impression that I am only reporting the services of the enterprise version of SQL Server 2005 I can use Therefore, I have some questions and at this time we will probably use SQL Server 2008 and Team Foundation Server 2008 When installing the Working Group Edition of Team System 2008, does the reporting service have to be installed on that machine? Is the reporting service available only for SQL Server Enterprise? Actually, can we install Team Foundation Server and work with SQL Server Standards? What other do we find before installin

c++ - how to build dll files in netbeans using ms vc++ compiler? -

I tried to use the cygwin gcc compiler with netbeans to create dll files, it seems that the generated dll There is a problem with the file. If I use the MS VC ++ compiler and compile its run file on the command line, but I do not know how to integrate the MS VC ++ tool in Netbeen ... can anyone help me on that is? Thanks J

gwt - How can I implement the command pattern in Java? -

I looked and I'm having trouble finding out how the server side works. Slide 21 Show: / ** Name command is taken * / Interface action & lt; Expands T Response & gt; {} Interface Response {} Interface Contact: Increases Service Remote Service {& lt; T increases the reaction & gt; T executed (action action); } Interface ContactsServiceAsync {& lt; T increases the reaction & gt; Zero executed (Action & lt; T & gt; Action, Async Callback & lt; T & gt; Callback); } I thought I could become Public ResponseSubclass executed (ActionSubclass action) {...} And GVT chooses that method when it matches my exact criteria, but it is not. Currently I'm using: if (action.getClass (). GetName () == ActionSubclass.class.getName ()) {Return (T) executed (ActionSubclass) ); } But this means that every time I add a task and I have to use unchecked tapes, IFS has to be added in that method to do this work Is there a better way? Note:

java - Object vs byte[0] as lock -

I commented first ("why java.lang.Object is not abstract?") Stating that I have heard that one Byte [0] was slightly more efficient as a lock using a java.lang.Object . I'm sure I've read it somewhere, but I can not remember: Does anyone know that this is really true? I suspect that this requires a bit byte code compared to byte [0] / code> to object , although it was reported that the < To store code> byte [0] length field requires additional storage and therefore it seems it can reject any benefit I was curious enough to test this. Source code: test for public class {public static object return object () {new object returns (); } Public stable byte [] Return back () {new byte [0]; }} Bytecode: public static java.lang.Object returnObject (); Code: 0: new # 2; // Class Java / Long / Object 3: Dip 4: Investigator # 1; // method java / lang / object "& Lt; init & gt;" :() V7: Public Static Byte [] Return Back; Code: 0

More efficient SQL than using "A UNION (B in A)"? -

संपादन 1 (स्पष्टीकरण): अभी तक उत्तर के लिए धन्यवाद! प्रतिक्रिया संतोषजनक है। मैं थोड़ा प्रश्न स्पष्ट करना चाहता हूं क्योंकि मुझे लगता है कि मैंने इस समस्या के एक पहलू को सही तरीके से वर्णित नहीं किया है (और मुझे यकीन है कि मेरी गलती है क्योंकि मुझे एक कठिन समय निर्धारित करना था यह भी खुद के लिए)। यहाँ रब है: परिणाम सेट में केवल टेस्टएम के साथ रिकॉर्ड '2010-01-03' और '2010-01-09', और एक होना चाहिए रिकॉर्ड जहां पहले सेट में प्रत्येक आदेश_नाम के लिए tstamp IS नल है (वहाँ हमेशा प्रत्येक आदेश_num के लिए रिक्त tstamp के साथ एक हो जाएगा)। अभी तक दिए गए उत्तर में सभी < / Em> एक निश्चित order_num के लिए रिकॉर्ड अगर किसी भी tstamp के साथ '2010-01-03' और '2010-01-09' हैं उदाहरण के लिए, अगर कोई अन्य रिकॉर्ड ऑर्डर_एनयूएम = 2 और tstamp = 2010-01-12 00:00:00 के साथ किया गया था तो न को परिणाम में शामिल किया जाना चाहिए। मूल प्रश्न: आईडी (अद्वितीय), ऑर्डर_एनयूएम, टस्टैम्प (टाइमस्टैम्प) और आइटम_आईड (ऑर्डर में शामिल एकल आइटम) वाले ऑर्डर तालिका प

mfc - Can a window be "in between" minimized (or maximized) and restored state? -

I'm thinking about which situation is a window during the process of reducing or restoring the maximum position I'm not really sure that this question also comes to mind - I'm quite new to Win32 programming. Actually, I have an app with a time problem where it does not show the office app window (make ISWindowVisible call) when it is in the process of having full screen or restore in the process If I can understand that there is a window in this "from within" state, I can wait till it is "in the middle" to use it for the purposes of my app . Thank you, A when there is a window - animated in the process of appearing Or out, the window is still hidden. Changes in the window state are immediate. If the window is set to restore, it will be restored and it will be restored to the screen. There are various animations produced by inside and outside animations shell. Like, before the window is shown, or hidden, they are played. The actual

html - Best ways to reduce number of DOM elements -

Everyone agrees that fewer DOM elements mean better page performance, better javascript performance, especially older In browsers But where are the best places to reduce DOM elements? What are the common culprits you have come to people who are the easy solution to bring down the number? "post-text" itemprop = "text"> Usage: & lt; Ul id = "navigation-main" & gt; e.t.c. & Lt; / Ul & gt; Their place: & lt; Div id = "navigation-main" & gt; & Lt; Ul & gt; e.t.c. & Lt; / Ul & gt; & Lt; / Div & gt; ... when it is possible, then it is. Sometimes you need additional div for layout purposes. But if not necessary, do not use it.

asp.net - Access webpage on lan or remote location running on VisualStudio (2008) -

I enter a webpage. For testing purposes, I want to use the webpage through my VM I can ask my friend to mess with him. The app is running in Visual Studio 2008. I kept my router DMZ at my IP address and I tried to connect VM and away. No fate How do I configure Visual Studio to listen outside the machine? I'm not sure of the answer to this, and it may seem a bit obvious, Is not marked because I am just trying to be helpful, but are you developing ports that are running on web server url? Like Edit The answer to the question provides a work around you that you may be able to use.

php - How to make a onmouseover work in mysql catalog -

I'm having difficulty creating a button on my catalog page, the catalog page returns an 8x or 20 products from a MySQL Is the database so I use a loop to drag out each product from the database, and I need an addtocart button which uses javascript to create an onmouseover effect The code is as follows code This displays the image properly, but nothing happens when the mouse is placed on the image, I'm guessing it's the cause Because either 8 or 15 images are being created, "name = CRT" is throwing the whole thing, if so, how can I fix it? Any advice would be helpful! Instead of using the name attribute on & lt; Img & gt; , I recommend using the id attribute, as follows: & lt; Img id = "crt" /> Then you can change src as follows: document.getElementById ('crt'). Src = 'diagram /addcrt_btn_dn.png'; Ensure that you run away properly from those quotes, or work on preparing the content in a

cocoa - How do I make an NSPopupButton that has a menu with images AND text? -

I have a list of applications and I want to create a NSPopupButton which shows a menu Is the application names with your icon on the left side of each item. I am able to bind NSPopupButton for my code array, but there is no compulsory entry for an image I thought I would put a cell there and cell one I will tie the image and in the form of text, but I can not find an appropriate room in the IB. Is there a clean and simple way of doing this binding? Do I have to write a custom cell? There is no way to bind images, using a stock NSPopUpButton, the title of the menu item gives you the subclass And have to write an IBPlugin to expose the subclass. And of course, you should also handle the cell. I have found the bindings with NSPopup Button, that has been hurt for various reasons, including separator and the impossibility of the outside -Model menu items like "default" or "all" of a different control Consider using, like source lists, or populating pop

iphone - Defining NSString -

How can I define NSString with the name media: thumbnail Is giving up. Error: Invalid type in the bit-field 'Media' The colon (":") is a reserved character in C, C ++, and Objective-C and can not be used in identifiers. NSString * media_thumbnail = @ "Try your NSString text";

iphone - NSURLConnection Not Returning Data -

I have an unusual problem. The code below is working fine and the data is being sent properly to the source, but NSURLConnection Nobody is returning anything from the trigger. The only logging objects are in the function that the request has been sent. Any ideas? // Code starts up from here NSData * myRequestData = [NSData dataWithBytes: [requeststring UTF8String] Length: [Request string length]]; NSURLRequest * Request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString: urlPrefix]]; [Set http system: @ "post"]; [Set http: bb: myRequestData]; [Request Set Value: HTTP HeaderField for @ "App / X-www-Form-URLXode": @ "Content-Type"]; NSURLResponse * resp = zero; NSError * err = Zero; NSDTA * Response = [sending NSRR connection SynchronousAust: Returning Response: And Race Error: And Egg]; NSURLConnection * theConnection = [[NSURLConnection alloc] initWithRequest: Request Rep: Auto Start-up: Yes]; If (! Connection) {NSLog (@ "failed t

Conversion for Delphi 2009 unicode issue -

I am converting a link from Delphi 7 to Delphi 2009. I found this error: E2010 Incompatible Type: 'Four' and 'Anscher' How can I fix this? I tried to declare the alphabet: Ansistring failed on [AlphabetLength]. const alphabet = 64; Alphabet: String [Alphabet Langghi] = 'ABCDEFGHHLMNOPQRTUVXbackDDFGILMNAPCrustWoxix 0123456789 +/'; Function TBase64.ValueToCharacter (value: byte; var character: char): boolean; Start the result: = true; If (value> alphabet lang -1) result: = false else // compilation error E2010 incompatible type: 'four' and 'AnsiChar' characters: = alphabet (value + 1); End; Function TBase64.CharacterToValue (character: char; var value: byte): boolean; Start the result: = true; Value: = status (character, alphabet); If value = 0 then results: = wrong other value: = value -1; End; Avoid using the excluded shortstring type in Unicode Delphi versions (2009 and later): const alphabet = 64; Alphabet = 'ABCDFGHISHLM

html - How can I force iPhone’s Safari to use media="handheld"? -

Use any of the media = "handheld" to use the safari of the iPhone The way is media = "screen" ? You can not safely ignore the media = handheld, because these stylesheets are usually pre-installed. There are very few potentials in the hands of the iPhone, and will therefore result in the poor quality version of the page. However, you can instruct using specific stylesheets using the safari.

C# Webclient problem with looping download? -

This is the implementation of my webclient, it is believed that this download should be continuous, but for some reason, that is not even debug Help, I got 1 success for the first time, then the rest failed. Does anyone know why? for (int i = 1; i & lt; = count; i ++) {(webclient wc = new webclient ()) {wc.Headers ["Accept-Encoding"] = "Jizip"; Wc.Headers ["User-agent"] = "Mozilla / 4.0 (compatible; Windows NT 5.1; MSIE 6.0) (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" ; Byte [] arr = wc.DownloadData (url); If (arr.Length & gt; 0) console. WrightLine (i.ToString () + ": SUCCESS"); Else console.light line (i.ToString () + ": failed"); }} When I messed up with this code, then it works That's right! I do not know what to say now ... using (webclient client = new webclient ()) // // manipulate header (optional) customer. Header. Add ("User-agent", "Mozill

ruby on rails - Better web framework? -

I came from a desktop programming background. I seriously wanted diving in the web programming scene. I looked around and I think that a well-established web framework must be used. Looking at the trains on DeGenego and Ruby I am really popular. So I wanted to know whether either or none of these is a good option for me. Some pretty, strong, scalable, easy to deploy and maintain and fully painted I am currently tilting towards Zeno because it is based on Python which is a very popular and powerful language, but just wants to know Is ROR running for itself, which can make it a better choice? Which is a web page 2.0. Just wanted to consider something extra. .. elegant , strong , Scalable , Easy to deploy and maintain and fully printed . Python that Really Popular and Powerful Language . That is, in a sense, More Web 2.0 . These are all hollow, subjective buzz words. The difference between different frameworks is nothing you can measure; This is their style that

iphone - Paging view within a productivity App navigation hierarchy -

The Apple UI Design Guide shows that UIPAge control is ideal for presenting the top view of a utility app. Is a paging view that appears at the level 2 or 3 inside the main bin controller view, fails during the app review process? In my app I have put a 3-page view on the second navigation, my productivity style below the level in the app, each page presents a question and it needs to be answered which is a multilingual tick or text box Can be done by entry. The questions can be raised in a multi-segment table, but by looking at my prototype, it seems very natural horizontally. Although I have not seen an app store program that uses paging with me. I recently asked a similar question from Apple and came back: " Thanks for contact, Apple is not able to provide pre-approval for the proposed application submissions for developers. " In the end it really depends on the specifics of the reviewer, your app, full moon, etc. . Personally, I'll just try it. If

javascript - Set correct context for focus(); -

How do I get the correct context set when I want to apply Focus ()? I try to do this basically: elemnt = document.getElementById ('someFormField'); Elemnt.focus ('none'); The call to focus is generated, queued and applicable only in the script elsewhere when the application requests it. function testIt () {var queued = {ElementId: 'someFormField', joy: focus, args: ['none']}; Elemnt = document.getElementById (queued.lment id); Queued.func.apply (elemnt, queued.args); } The above method works for another function but I get an error for the Focus method: Opera: WRONG_THIS_ERR < Firefox: Untold exception: [exception ... "Invalid operation on RapedNenet prototype object" (...)] < Strong> How can it get to work? (I'm trying to understand this issue, so I'm not interested in the 'Use Framework X' answer) > Update: There is some confusion about why I pass an argument for Focus () : only

javascript - Can a function defined in a bookmarklet be called from a page-level script? -

I have a bookletlet that needs to open new window / tab to avoid popup blocker, bookmarklet i.e. call window.open () method. However, I want to keep updating the bookmarks by loading external javascript files. To do this, the bookmarklet must add a script node to the DOM. If I was putting window.open () code in one of these externally loaded scripts, then the popup blocker would block it from its page-level. What should I know is whether I can make an envelope around my code in the book window.open () , then it is loaded externally Tell the script? What is the scope and what is allowed on a rap such as this? I have a solution which is not correct but meets the requirements: Here is the bookmarklet code: javascript: window.open (window.location); Window.location = "http://www.google.com/"§var%20s=document.createElement('script');s.setAttribute ('src','http://my-script.js') ; Document.body AppendChild (s); Zero (0); Readable st

sortedlist - Does ruby have a list type that keeps contents sorted as adds/deletes occur? -

I need a data structure in Ruby which keeps its elements sorted because the elements are added or destroyed (at least) the ability to Pop the element before the list. The closest thing in the Ruby docks is to get it. However, it does not provide any way to access the elements (or even close the first element) by their index. These are specific tasks for me: Add an object to the list Pop the object before the list Check that an object is in the list Li> Remove the object from the list (by object, not indexed) Or something to Rabbi has been made, what is a library that I should take it? I can apply one without any difficulty, but if possible I want to use one already. Currently I am using Ruby 1.8, although switching to 1.9 is probably OK. EDIT: Since there is some confusion, my requirement is that the sorted object is not an order to be cast. I would like to sort the & lt; = & Gt; must be on the basis of operator. Generally I'll pop the first elem

jquery - FadeIn image after it is loaded -

Image
I am trying to load the image with fade in effect in the div. The problem is that I do not know that one How to avoid shipment and vanishing time. I want to load the image and it should be faded after it is fully loaded. These images are thumbs up: & lt; Div id = "thumb" & gt; & Lt; A href = "#" class = "slika_thumb" id = "1" & gt; & Lt; Img src = "slike / th.jpg" range = "0" /> & Lt; / A & gt; & Lt; A href = "#" square = "slack_thumb" id = "2" & gt; IMG src = "swipe / th. Jpg" range = "0" /> & Lt; / A & gt; & Lt; A href = "#" square = "slika_thumb" id = "3"> gt; & Lt; / A & gt; & Lt; A href = "#" & gt; & Lt; Img src = "Slike / th.jpg" range = "0" /> gt; & Lt; / A & gt; & Lt; A href = "#" & gt; & Lt

c# - What would be the best way to validate XML? -

I'm looking at XML serialization for C # and it looks interesting I was reading this tutorial And of course, you can sort it into a list of objects, so I am thinking that to sort it back in the list of objects and then go through each object and Validate it or use it schema, make it serialized and use it with Would it be better to validate by showing it? Thanks I think that you But what will depend on, and for what purpose if it is the interface for other systems, there is no proper thought of being valid through XSD because you have to write xsd to write your class with XSD Exe (You can also generate xml or dll from xsd, but this is not accurate). Similarly, to check against XSD if you have XmlReader (appropriately configured), If you just want legitimate .NET objects, then let me implement an implementation In order to leave the sort form, the exam will be expanded, and some C + write the verification code - perhaps using IDataErrorInfo , or usin

Creating offscreen OpenGL ES surfaces on iPhone: fails to attach -

I am using an EAGL reference and looking for the normal screen rendering of my application. This includes (as expected) creating and rendering a renderbuffer and framebuffer in the CAEAGLLayer of the view it works as expected. However, in some cases, I want to use OpenGL so that some geometry is completely offscreen (with the purpose of achieving the resulting raw pixels). An offscreen surface The way I will not use the code I'm using (unless someone asks me) because it is given on the page that is given under "Offscreen Framebuffer Objects". But in the last step, glCheckFramebufferStatusOES always returns failure instead of expected success GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES I initially thought that this is happening because already a The framebuffer (caazllar one) was bound, but the problem persists, even if I destroy the framebuffer before making an office. How do I do this right but the direction? Maybe I have some misconception about the JL pi

annotations - Hibernate not creating correct fields for Clobs in MySQL -

I have a string in my unit @ column (length = 40000) @ lobe Private string intro text; column in my MySQL database that makes hibernate introText is a varchar (255), which does not leap with the column length or @Lob annotation Any ideas? I'm relatively new to hibernate, so I wonder if I can not find any other settings or configuration. after doing // @ lb @ column Without notice (length = 4000) private string getIntroText () {this.introText; } In the script, I IntroText TEXT If it does not work as expected. So my advice is: @lob @ Columns (columnDefinition = "TEXT (4000)") Private string getIntroText () {return this.introText; } Now it works fine! If you want you can test lecture configuration configuration = new interpretation configuration (); Configuration .addAnnotatedClass (& lt; YOUR_ENTITY_GOES_HERE & gt; class) .setProperty (environment. Acbim 2 Deediel_autio, "Create") .setProperty (environmental .US

nhibernate - Difference between Get<T> and Load<T> -

प्राप्त करें & lt; T & gt; (ऑब्जेक्ट आईडी) और लोड & lt; T & gt के बीच अंतर क्या है (वस्तु आईडी) ? प्रलेखन बहुत ज्यादा एक ही पढ़ता है इसके अलावा, अगर यह मायने रखता है, तो मुझे किस मामले में दूसरे पर एक का उपयोग करना चाहिए? यह बताता है कि यह काफी है स्पष्ट रूप से। हालांकि, मुख्य अंतर यह है कि लोड नहीं आपके द्वारा आवश्यक इकाई की जांच और लोड करने के लिए डेटाबेस को हिट कर देता है, क्योंकि यह मानता है कि आपको पता है इकाई मौजूद है लोड द्वारा लौटा गया ऑब्जेक्ट कुछ प्रकार का प्रॉक्सी है, जब आवश्यक हो तो धीमी गति से वास्तविक डेटा को प्राप्त करता है या कोई अपवाद नहीं देता है यदि इकाई नहीं मिली है। पुनर्कथन: < Ul> लोड का उपयोग तब किया जाना चाहिए जब आप यह सुनिश्चित करने के लिए जानते हैं कि कोई विशिष्ट आईडी वाला एक संस्था मौजूद है। कॉल का परिणाम किसी डेटाबेस हिट में नहीं होता (और इस प्रकार कुछ मामलों में NHibernate द्वारा अनुकूलित किया जा सकता है)। अपवाद के बारे में सावधान रहें, जब वस्तु का उदाहरण डीबी में मौजूद नहीं है, तब उस वस्तु को उठाया जा सकता ह

sdl - How to suppress console output in Python? -

I am using Pygame / SDL's joystick module to get input from a gamepad. Every time I call my get_hat () method, it prints on the console. This is problematic because I use the console to help debug it and now it's SDL_JoystickGetHat is full of values: 0: 60x in every second Is there any way I can disable it? Either by pressing the console output while calling the function in Pygame / SDL or by calling the function? Edit: This is triggered due to debugging when the SDL library was compiled. Here is a related block of code from joystick (via SVN) value = SDL_JoystickGetHat (fun, _index); #ifdef DEBUG printf ("SDL_JoystickGatHat value:% d: \ n", value); #endif if (value & amp; SDL_HAT_UP) { Looks like a problem with debugging turned on.

c# - Creative use of MarshalByRefObject -

I'm trying to remove some things. So, I'm looking for advice and research material (via link). Here's the scenario: We have a library (e.g., CommonAlb) which has the necessary resources for many other applications (like APA, APB, APC, and so on ...). Now, the way it is currently working is an APA example, to see if a specific port is available or not. If it is not, then it kicks off Commonlab ("Hey, Awake") and the service is started. Then APP is happy and we go away. Now, I've done a lot of research on remoting. The channel and I have come to the conclusion that I am starting an application made on a technique that is considered 'legacy' good ... I do not like it. Honestly, WCF is much higher than us and has not been fully implemented in mono. We are targeting multi-platform compatibility (windows, mono, linux), so we are researching all the options. The idea of ​​remoting started at the first place, because we wanted the general league to b

GMP arthimetic operations -

As we know, GMP is the most popular tool for large intergr ... handle me about GMP There are questions. 1. How will internal calculation in the GMP library be made? Suppose an integer of two bytes, one of the three bytes, which are the internally performed operations on those raw bits! 2. What is the speed of display for GMP compared to other normal libraries ?! Thanks in advance .. To know about these things for me is very important for my project This page () algorithm uses GMP for its functions. In addition, the GMP library is open source you can download and see yourself.

version control - What Is The Proper Location For One-Offs In VCS Repos? -

I have recently started using mercurials as our VCS. In the past few years, I have been RCS, CVS, and - for the last 5 years - SVN. 13 years ago, when I used CVS and RCS primarily, large projects were edited in place on CVS and one-off specific server and were stored in RCS. It worked well because one-offs were usually specific to the server and the server was supported overnight. Go ahead for more than a decade and many one-off scripts have become less centralized - they may be required at some random time on any server. It was also okay, because now I was an appetizer SVN user. Everything (except the docs) was thrown in a repo Jump on 2010. Now I am using mercurials and re-putting big projects in my own repo. But what to do with one-off? Option as soon as I see them: A repo for each script. It seems that to create a repo for every single page script, it may seem a bit rusty, which can be run once a year. RCS Not an option. There are many potential servers for wh

linq - IQueryable contains any of string array -

I'm not sure why I slow down when I want to find a database for a database with a string from an array . objectFactory.Resolve & LT; IUserDao>. () Query. Where (t => (spltedInput.Any (val => T.ListName.Contains (val)) || spltedInput.Any (val = & gt; T. Name.Contains (val)) & amp; MasterCompany.Id == MasterCompanyets). Select (T = & gt; new {name = t.mic + "" + + t.ListName, Id = t.Id}). AsEnumerable (). Choose (t => New RadComboBoxItemData () {Text = t.Name, Value = t.Id.ToString ()}) .toArray (); This throws NullReferenceException, I'm not sure what to do to see if any element from Ererem is in the last name or name and what is the reason for this exception. I'm just guessing that you can not do a query inside a query because it is? I suspect that either your objectFactory or < Code> IUserDao is probably null and therefore you get a NullReferenceException . Did you debug it, the debugger will tell you what t

objective c - iPhone Application crashes in "AdHoc" mode -

I have found a small application that is working very well with "debug" configuration in my phone and simulator . I created an adhoc provisioning profile, and added the "beta" configuration for this. My application crashes instantly, while trying to launch an application with an ad-hoc configuration. The console output is: Running ... Error in launching remote program: Failed to get job for process 2434 Error in launching remote program: Process 2434 failed to get the job. Program is not being debugged Running program is not being debugged. I have also created a district. When signing the code, out-test-permission and unchecked this file in the settings I created. Do anyone have any ideas? Sometimes when you change a lot of things, especially make configurations, Xcodebuild does not know which files are outdated and links to old stuff that require reconfiguration to clean up everything. Try or delete your build directory from just project d

asp.net mvc - Create reusable 'base code' using MVC2-RC? -

I am trying to write a simple library for MVC2 projects that will be useful for user login, e-mail verification, password recovery, e.t.c. Some of these steps involve the user's interaction, so I want the view and controller in that project. In MVC 2 Preview 2, one can repair such an area (at least it seems) because they were implemented in different projects, however, a new area in RC is only a subfolder Because I want to share the base code between applications, so this is not an option. I tried to brutally hack the AfterBuild steps in my project files, but it does not 'feel right' (I wouldn 'sleep another night :) Do you Can you share some thoughts on this? This question can be a duplicate Build copy to copy Work has been taken to the Mvc.Futures project to solve this problem. Other options include defining ideas in the application, even if they are being referred by the controllers in the library. In addition, the MvcContrib Project offers portable ar

python - How to resolve case problems for non-english languages in django admin panel? -

I have to solve the problem with word ending in the Django Administrator panel. The language I am using is Russian (using UTF-8 charset), so some problems arise, for example, for some model names, there is a problem at the right end on the "Add" button. The easiest thing I have found is that jQuery is being used to fix the "fly" end, but this solution is very radical. Maybe there is a simple answer? Just do not want to lose the depth of the sources of the Djegogo again ... If I understand the problem correctly From, you should just add a suitable attribute in the class meta section. English example: class.men (models.model): [... your fields ...] square meta: verbose_name_plural = "men" More information can be found in .

sql server - writing a transaction in t-sql and error handling -

U think there is a better way to write a transaction in T-SQL? ? Email receiver under specified subject - ==========: Description - There is a better view that maintains and that uses this transaction Application performance is better =================================== ALTER PROCESS [CONTACT]. [Receiver_stpInsert] @First_Name nvarchar (30), @Last_Name nvarchar (30), @ Email Marketing (60), Get started as @Subject_Id Int session note; DECLARE @error_num int; Start transactions INSERT INTO Contact.Receiver (FIRST_NAME, LAST_NAME, email) prices (@First_Name, @Last_Name, @Email); SET @error_num = @@ error; IF (@error_num & lt;> 0) BEGIN Rollback; Return; End DECLARE @rec_record_id int; SET @rec_record_id = (contact record_id contact. Receiver where email = @ email); SET @error_num = @@ error; IF (@error_num & lt;> 0) BEGIN Rollback; Return; End INSERT INTO Contact.Receiver_Subject (Receiver_Id, Subject_Id) values ​​(@rec_record_id, @Subject_Id); SET @error_num = @@ er

mysql foreign key constraints -

I have defined foreign key integrity in the table but I am able to delete data from the master table, which is in the child table. The reference is .. What would be the problem really, it should be an error on removal, as all the referenced table data will be removed. When did you make your own FK? It is not known which engine you are using example create table origin (id INT not zero, primary key) engine = INNODB ; Create a table child (ID INT, parent_id INT, index par_ind (parent_id), foreign key (parent_id) reference DELETE CASCADE parent (id) ENGINE = INNODB; and here

visual studio - error while trying to create DTE2 Interface object with ruby -

I'm trying to use Ruby win32ole lib and controlling Visual Studio 8 tried this 'win32ole' ide = WIN32OLE.new ('EnvDTE80.DTE2') is required And received this error unknown OLE server: NVIDIA 80. DTE2 What I am doing, can it work at all? You are using the wrong object name for Visual Studio 2008 and a solution called MySolution.sln Opening: 'win32ole' objDTE = WIN32OLE.new ("VisualStudio.DTE.9.0") objDTE.MainWindow.Visible = True #Make VS Window visible objDTE.UserControl = true; Due to incorrect VS shutting down the script due to incorrect #Set = objDTE.Solution solution Open ("MySolution.sln");

dns - Trying to create a system to merge two lists of "buzz words" together, forming every possibility for domain availability checking? -

My problem is trying to make a name for the business and products of all my crazy ideas, which then needs To check your purchase availability for .com domain names. So I have a pen and paper system where I make two lists of words ... for example A list and B. I have to find or create a little app where I take each word from the list list, which can create and store custom lists, adds each word from list B (a complete list To create the list * Results of list B?) After the list "ListalistB" result has been compiled, I want to see whether to purchase .com domain online through any other method. Available ... And in the end Make a new list, together with each combination, any type of visual representation may represent one color or word if the combined word is available as a .com ... so i basically loop For the structure nested list A, can each index of the words in lo, through each word in the list B, and list C? Then when the list is completely complete, send a CSV

Something like getch(), textcolor() and gotoxy() in Ruby -

I want to use these functions in Ruby specifically in the getch () conio.c library (Borland). The getoxy () enters the keyboard without pressing a key. The text color changes in the text color () terminal. Thank you. "text"> I had a discussion about this on Ruby-Forum, see. Both nurse and curse are not certain that other lbs are.

java - Grails Warnings/Errors during run-app -

I am currently looking at the warnings given below when trying to run my Google App Engine / Grails test application in Eclipse Has been doing. Warning, overwrite the name of the name Start Getting Started Warning: C: \ Users \ Some Person Cumin \ 1.2.0 \ Projects \ test-grails \ plugins \ App-engine -0.8.8 \ gel-app \ conf \ spring not found. Warning: C: \ Users \ Some Person Cumin \ 1.2.0 \ Projects \ test-grails \ plugins \ app-engine-0.8.8 \ Greil-App \ Conf not found. Warning: C: \ Users \ Some Person Cumin \ 1.2.0 \ Projects did not find test-grails \ plugins \ app-engine-0.8.8 \ Grails-app \ conf \ hibernate. Here is the output from the console: Base directory: C: \ Users \ Some person \ Workspace \ test-grails solution of dependency ... Dependency Solved in 1160ms. The script is running C: \ grails-1.2.0 \ scripts \ RunApp.groovy Warning, start the goal by overwriting the name of the nameGolovic [groovyc] 1 source file C: \ Users \ Some Compiling 1 person cop

javascript - jeditable not updating browser display - leaves "click to edit..." after succesful edit -

I am using jeditable quite easily and it all works well, updates the database, etc. When users enter new value data and hits, this does not update the field in the browser to show a new value - instead it keeps "Click to edit ..." instead. Am I missing something like a return value from my php file? The PHP function just takes the AGR and updates the database - and it works fine. jquery \ jeditable code $ ('Edit'). Editable ('Update.php', {id: 'field', name: 'val', indicator: 'Saving ...', Tooltip: 'Click to edit ...', select Do: true, submit: {db: "pers", kn: "key", rec: "php echo $ rec;;}}}}}"; div & lt; Div class = "edit" id = "svc_ad1" & gt; & Lt ;? Php echo $ row-> Svc_ad1; ? & Gt; & Lt; / Div & gt; I also have a CSS class for pEdit edit {float: left; Width: 200px; Height: 15px; Margin-bottom: 5px; Border bottom: 1px solid #a

css - Why is Firefox displaying my page differently? -

The problem is this: I have three column layout pages on the right that is a commercial that I want to shut down on certain pages. I want to be able to expand the content and the page has two columns instead of three. I found a solution using the display: table-cell . It works in the largest browsers but a strange problem is only in Firefox. When I go to my page then goes below the commercial content and the content is expanded, then when I hit the business to refresh and everything looks fine. Can you please help? Here's the CSS: #wrapper {width: 960px; Margin: 0 auto;} # left {float: left; Width: 220 pixels; Margin: 6px 0 px;} #content_drapper {float: left; Width: 724 pixels; Margin: 6px 0 0 5px;} #content {min-height: 400px; Minimum width: 522px; Max-width: 724px; Limit: Solid 1px #ccc; Padding: 12px; Vertical-align: top; Exhibit: Table-Cell; } #wright {width: 168 pixels; Padding: 0 6px 0 5px; Display: Table-Cell;} Internet Explorer Attribute, so if you are u

How to package and consume an existing Java library with OSGI -

After seeking help to manage dependencies on different versions of the same library in Java, it was suggested that I should see, being under a deadline pressure on OSGI implementation, I can actually use some help that will save me from excavation through endless OSG docs. I have a working app, which is going to use a new framework that uses different versions of the framework jar which I'm already using, so I package the new structure as the OSGI bundle Want to do Can I leave my app like this, and can use the OSGI bundle only as a container inside JVM? This would mean that I would use the OGIG bundle only to separate a set of sections from the remaining GVS to avoid conflicts between different versions of GVM. In other words, I want to use all the code without the OSGI based setup, OSGI. You do not have a complete answer to me, I just want to decide whether Ditterb said: First, you have to complete your application within the OSGI framework Will happen. It is not true

php - Using simplexml to get a node (and its children) by attribute -

Using Simplex, is it possible to get children of nodes on the basis of parental characteristics? For example, I want to get a list of variants in myItem1 (output will be small, bigger) Here are some psuedo codes that I am following: Foreign currency ($ xml-> xpath ('// family [@ name = "myItem1"]') -> Variant-> children () $ $ child) {$ child-> ; GetName ()} (Of course this is not working, but hopefully it tells me what I am trying to do.) Sample XML: & lt; Library & gt; & Lt; Family name = "myItem1" & gt; & Lt; Variants & gt; & Lt; Small & gt; ... & lt; / Small & gt; & Lt; Large & gt; ... & lt; / Large & gt; & Lt; / Variants & gt; & Lt; / Family & gt; & Lt; Family name = "myItem2" & gt; & Lt; Variants & gt; & Lt; Small & gt; ... & lt; / Small & gt; & Lt; Medium & gt; ... & lt; / Medium & gt; & Lt;

sql server - SQL - select distinct records in one field with highest records from another field -

ऐसे परिदृश्य में जहां मेरे पास ऐसा तालिका है: int id (पीके) Int staff_id int skill_id bit mainskill मैं प्रत्येक स्टाफ सदस्य के लिए केवल एक रिकॉर्ड का चयन करना चाहता हूँ (staff_id द्वारा दर्शाया गया है) अपने मुख्य कौशल को सूचीबद्ध करता है, जैसा कि (1) मेनसिल में दर्शाया गया है। यदि कोई मुख्य कौशल मौजूद नहीं है, तो मैं उस स्टाफ के सदस्य के लिए किसी भी कौशल रिकॉर्ड को वापस करना चाहता हूं। उदाहरण के लिए: आईडी कर्मचारी_आईआईडी कौशल_आईडी माइंसस्किल 1 1 24 1 2 1 55 0 3 1 7 0 4 4 24 0 5 4 18 6 6 3 0 7 6 18 1 < / Pre> क्वेरी वापस करनी चाहिए: id कर्मचारी_आईडी skill_id mainskill 1 1 24 1 4 4 24 0 7 6 18 1 मैंने समूहिंग, अलग आदि के विभिन्न संयोजनों की कोशिश की है, लेकिन बाद में मैं आउटपुट प्राप्त नहीं कर सकता। किसी भी मदद की सराहना की। एसक्यूएल सर्वर 2005+, सीटीई का प्रयोग: साथ पंक्तियों के साथ (चयन करें t.id, t.staff_id, t.skill_id, t.mainskill, ROW_NUMBER ()) (रैंक से t.staff_id आदेश द्वारा t.mainskill DESC द्वारा) रैंक से तालिका टी) चयन आर .id, r.staff_id, r.

.net - Memory leak while sending email -

I have a window service, which is configured to send email in the predefined schedule works with the schedule .Timers Timer and Timer_Elapsed every time I've picked Timer.Stop () the phone, sending emails (about every 1500 emails) every time, the next tick will be picked up, calculate the time and start the timer (calling timer.start () method) When the timer is over and the process starts sending email, memory usage increases but does not decrease after finishing when I call the function "not timed" application, then the process is complete to send The memory used after freeing is freed. Does anyone help me understand why this is going on? Maybe there is anything related to the thread used in the timer? Thanks in advance. There are some moral possibilities here. The garbage collection is not kicked and there is no memory leak in it. You are not using close or flush functions of the library Your timer is starting a thread It does not end in any time

jsf - How to make a value of <h:outputText> bold? -

मेरे पास निम्न कोड है: & lt; h: outputText id = "dateVal" मूल्य = "# {items.date}" & gt; & Lt; f: कन्वर्टडेटाइट पैटर्न = "एमएमएम- yy" / & gt; & Lt; / h: outputText & gt; मैं बोल्ड में # {items.date} मान कैसे दिखा सकता हूं? बस करें: & lt; h: आउटपुट टेक्स्ट वैल्यू =" एएएएएए "शैली =" फ़ॉन्ट-वजन: बोल्ड "/ & gt; और यह कोड निम्नलिखित HTML का उत्पादन करेगा: & lt; span style = "font-weight: bold" & gt; AAAAA & lt; / span & gt;

Crystal reports, mysql using a php website, Is it possible? -

I have been asked to find out whether it is possible to add Sirstall reports to a MySQL database within a php website is. Is this possible? Do they have any options thanks edit I think in the right world I have a PHP website In reply to your comment: I would like to show a CR inside the PHP website CR is a Windows executable, it will not be directly possible (aside from remote desktop or VNC inst To embed, but this is probably not possible, and it will not be legal.) Your best bet is whether the CR is an export format that can be embedded in a web site : Pdf, HTML, XML to come to mind, you can manually insert into your web page. If you want automatic interaction between the user of the web site and the CR, it is probably possible, but will not be trivial, the command line from the command line is allowed to be controlled. You may be able to set an interaction between the PHP server and the Crystal Reports via the command line on the Windows server, but i

html - How do I programmatically (via JQuery) set the content of the YUI text editor? -

I hope this is a novice question despite killing my head against UII documentation. I am hooked on a text area called 'Posttext' with a UI simple editor (called 'MyEditor'), the new edit is fine, but the problem I am solving That includes the user clicking on one or more existing elements, and that text is inserted in the editor to amend / resubmit. What do I have to do to set up the program through JQuery I have set a price without a problem, and I can see that this is set in firebug, but I hope that some of the editor There are ways that I need to run the display again to run it (I've tried The function is named setEditor HTML () from the examples of YUI editor Look at the third code block ("handle toggle now")

java - How can I make a URLClassLoader behave like this? -

I'm trying to make a URLClassLoader that behaves as follows: If Otherwise, return a dummy class I can not get it to work. In an effort given below, I hope test $ Thing to load special class loader successfully. In doing so, I hope this attempts to load the test $ supertying , and I hope the dummy class nothing is not loaded in place of it . However, some> gets dashed and tossed a NoClassDefFoundError test for $ SuperThing Does anybody know how to fix this? Public class test {Personal Stable Class SuperThing} Spreads Private Stable Class Talk SuperThing {} public static void (String [] args) {Set & lt; String & gt; Inclusions = New Hashet & lt; String & gt; (); Inclusions.add ("test $ talk"); // Note $ supershot is excluded URLClassLoader cl = (URLClassLoader) Thread.currentThread (). GetContextClassLoader (); Special Classloader Clove = New Specialty Classloader (CLLALS), inclusion); Try {Cll.loadClass ("Test $ Thing"