Posts

Showing posts from February, 2015

python, lxml and xpath - html table parsing -

I am new to lxml, new to python and the following can not be found: I have to import some tables with 3 columns and an undefined number of rows starting 3 lines. When the second column of any row is empty, then this row is removed and processing of the table is aborted. The following code fixes the data in the table (but I can not reuse the data later): to lxml.html import parse def Process_row (line): for cell in row.xpath ('./td'): print cell.text_content () produce cell.text_content () def process_table (table): [process_row (line) for line return table.xpath ('./tr')] doc = parse (url) .getroot () tbl = doc.xpath ("/ html // table [2]") [0] data = process_table (tbl) This prints the first column only: ( In the data I: print i.next () The following are only the third Import line, and not later tbl = doc.xpath ("// body / table [2] // tr [position ()> gt; 2]") [0] Anyone can know a fancy solution to get all the data f...

java - LazyInitialization Exception -

मेरे पास हाइबरनेट ऑब्जेक्ट हैं: डेरो और आकृति। एक डायरो मोटीफ का एक सेट है। मैं डीबी जुर्माना से एक डीरो ऑब्जेक्ट लोड करता हूं। लेकिन जब मैं आकृति के अपने सेट का उपयोग करने की कोशिश करता हूं: assertEquals (dero.getMotifRefus (), deroFromDB.getMotifRefus ()); मुझे कोई अपवाद मिलता है: org.hibernate.LazyInitializationException: आलसी भूमिका को संग्रहित करने में विफल: com.dossier.Derogation.motifRefus, नहीं सत्र या सत्र org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException पर बंद किया गया था (AbstractPersistentCollection.java:358) मैं यह कैसे हल कर? ऐसा लगता है कि आर्टिकल के आलसी सेट से पहले डायरो को लाया जाने वाला सत्र बंद हो गया था। यह एक स्प्रिंग संचालित वेबएप के बारे में बात करने पर, OpenSessionInViewFilter आपके लिए होगा & lt; फ़िल्टर & gt; & LT; फिल्टर-नाम & gt; OpenSessionFilter & lt; / फिल्टर-नाम & gt; & LT; फिल्टर श्रेणी & gt; org.springframework.orm.hibernate3.support.OpenSessionInVie...

mysql - How do I search for a 'blank tile' in a scrabble application? (PHP) -

I created this app a few months ago: Allows the application to enter the set of users Actually, what I want to do is to increase the application so that users can enter 'empty tile' - this is the one which can pass as any of the 26 letters of the alphabet, and Can be echoed back to valid words. Below is a screenshot of database structure. http://i37.tinypic.com/28v6a8h.png You may have to copy that browser into your browser. For the query example, 'Aardvark' - is as follows: Select * from Scrabble where a & lt; = 3 and b & lt; = 0 and c & lt; = 0 and D & lt; = 1 and E & lt; = 0 and f If you want to see results that I'm typing a word in the link posted at the top. OK, So does anyone have any idea how to do this? I started with the following code, which adds each alphabetical character at the end of the string entered by the user, if they enter spaces (empty tiled spaces) if (preg_match ('/ [\ s] /', $ string)...

asp.net - ASP .NET WebSite with importing DLL-s -

I have your file. Trying to call a DLL function in Aspx.cs: [DllImport ("the.dll")] Private static extern bool function (int width, int height); and: The file is in "the.dll" "C: \ Windows \ System32 \ inetsvr" My Web Site is an application that has the privilege to read and execute If I try to file Example ("the.dll") is correct on the server, so DLL but: If I click on the page on the local host I'm trying to run, so all is well. If I try to play the uploaded page on the IIS server, then loads on the infinite page ... nothing appears, Nothing happens! And then IIS is blocked and I have to restart the server. What am I doing wrong? Check the security and permission settings on IIS OI about IIS In addition to attempting to insert bin folder in the dill Please.

javascript - Flash detection with SWFObject -

मुझे SWFObject उदाहरण डाउनलोड करने में काफी समझ नहीं है http://download.macromedia.com/pub/developer/alternative_content_examples। ज़िप '> यहां। क्यों फ्लैश प्लगइन की उपलब्धता केवल & lt | | - [if! IE]> -> निर्देशों से की जाती है क्या इसका अर्थ यह है कि सिर्फ आईईई पहले से ही फ्लैश प्लेयर के बिना हो सकती है? बेशक नहीं। तो क्यों सिर्फ IE जाँच की है? नहीं! कोड का मतलब यह नहीं है कि यह केवल आईई की जांच करता है। ज़िप में दो उदाहरण हैं, पहले एक है & lt; object classid = "clsid: D27CDB6E-AE6D -11cf-96B8-444553540000 "चौड़ाई =" 728 "ऊंचाई =" 90 "आईडी =" myFlashContent "& gt; & Lt; param name = "movie" value = "banner.swf" / & gt; & Lt;! - [if! IE] & gt; - & gt; & Lt; ऑब्जेक्ट प्रकार = "एप्लिकेशन / एक्स-शॉकवेव-फ्लैश" डेटा = "बैनर.swf" width = "728" height = "90" & gt; & Lt; -! & Lt; [endif] - & gt; & Lt; img src =...

actionscript 3 - Flex 3 color picker no color value -

I need the "no color" value in the Flex 3/4 color picker component. Here are some options I've investigated: 1) External componet searched a lot, but did not succeed in finding a suitable one. There is a great color picker that completely meets my needs, but this action is in script 2 format I need 3. 2) Increase the existing built-in color picker component. In this way I need your help. Do you have any idea how to increase the built-in color picker component to support "any color" value? We had this problem, we put just one "clear button" on the right side of the color picker. not ideal.

Can I do 'git svn dcommit' from a SVN git clone which was created with --no-metadata? -

मैंने एक एसवीएन भंडार को जीआईटी में परिवर्तित किया है git svn clone --stdlayout - लेखक-फाइल = Authors.txt --no-metadata svn: //svn.foo.com किसी कारण से, यह मुझे एक नंगे भंडार की तरह दिख रहा था। सिर्फ एक .git निर्देशिका था। इस क्लोन वाले रिपॉजिटरी में, मैं एक चेकआउट प्राप्त करना चाहता था। चूंकि git चेकआउट काम नहीं कर रहा था, मैंने भाग लिया git रीसेट - हार्ड क्या यह सही तरीका है? यह काम करने लगता है, लेकिन डरावना लगता है मैंने तब git svn rebase को चलाने का प्रयास किया ताकि सबवर्जन रिपॉजिटरी से नवीनतम बदलाव मेरे जीआईटी क्लोन में खींचा जाए। हालांकि, यह काम नहीं कर रहा था इसके बजाय, यह संदेश पैदा करता है काम के पेड़ के इतिहास से अपस्ट्रीम एसवीएन सूचना को निर्धारित करने में असमर्थ क्या कोई भी ऐसा क्यों हो रहा है? मैं विश्वास करता हूँ ऐसा इसलिए होता है क्योंकि मैंने पास - no-metadata Git svn क्लोन करने के लिए यह 'मैन मेटाडेटा' विकल्प के बारे में मैन पेज कहता है: यह हर प्रतिबद्ध के अंत में git-svn-id: लाइनों से मुक्त हो जाता है। यदि आप अपना .git ...

How to update automatically a file when committing with SVN -

शायद का डुप्लिकेट ... मैं एक फ़ाइल को अपडेट करने का एक तरीका देख रहा हूँ (चलिए अंतिम सौदा कहते हैं) जब मैं प्रतिबद्ध करता हूं तो पिछले एसवीएन संशोधन संख्या के साथ। मैं कैसे कर सकता हूं? धन्यवाद:) एसवीएन हुक का समर्थन करता है - लिपियों या प्रोग्राम जो निश्चित कार्यों पर कॉल करते हैं आप एक पोस्ट-कट हुक सेट कर सकते हैं जो आपके लिए फ़ाइल अपडेट करेगा। हुक पर और पढ़ें।

c# - How can I get an instance of a base class from an inherited class dynamically? -

I have a class public class fiber: fou FO has its properties and such foobers I have made an example of Fobre and have set all the properties including base classes. Now I need a frequency of Fauau which is the value of the property which is in FOB. True, I can create a new example and write a code that will populate this new instance with a new experience, but that means that I have to change the properties of the base class every time. I want Faw test = (FO) FB; This "works" in C #, but the test is actually typing. For ideas I want to return to an example of a base class which is populated by data / example. Thoughts? I dynamically put a reflection to copy the base class' field, found it here: Now I have a true fou type that I can pass to EF. Private Fate Getbizadeata (Fobar FB) {Fu test_fou = New Faw (); Type type = FB.GetType (); Type = type. Base type; UpdateForType (type, FB, test_fou); Return exam_fau; } Private static void UpdateForType...

c++ - Exporting template code = dangerous? (MSVC) -

As I have written in another question, I came across this issue when I came to 1.40 through MSVC 7 And raised many C24251 warnings. Now, after reading the article, I wonder: Is it generally frustrating to export the template code, such as class DLLEXPORT_MACRO AClass {public: Std :: vector & lt; Int & gt; GetVecCopy () {myVec; } ...} This code has been compiled into a DLL through MSVC7.1. Although this code does not cause any errors referenced from another MSVC7.1 code, it is said that the MSVC8 code in this DLL correlates to runtime (memory alignment issues?). . Because it is clearly bad ... What is a "best practice" to deal with the issue of exporting template code? This is a bad idea, as the std :: vector is different or there is a difference between the compiler versions Could. However, this could possibly fail in load times, since the name of std :: vector should be different in compatible compiler versions (this name is part of the argument ...

c# - Update Sharepoint List Item -

मुझे त्रुटि मिली ... System.NullReferenceException: ऑब्जेक्ट संदर्भ सेट नहीं है एक वस्तु का एक उदाहरण निम्न कोड चलाना का उपयोग (एसपीएसite साइट = नया एसपीएसite ("http: // site /")) {SPWeb web = site.OpenWeb ()) {{SPList list = web.Lists ["ListName"]; // 2 SPListItem item = list.Items.Add (); गाइड आइटम आईड = आइटम। यूनिक आयड; SPListItem itemUpdate = web.Lists ["सूचीनाम"]। आइटम [itemId]; आइटम अपडेट ["प्रतिशत पूर्ण"] = .45; // 45% itemUpdate.Update (); } पकड़ (अपवाद ई) {Console.WriteLine (ई); Console.ReadLine (); }}} समस्या क्या है? यदि आप ' एक अभी सम्मिलित सूची आइटम के लिए मूल्यों को बदलने की कोशिश कर रहा है, तो आपको इसके साथ जाना चाहिए: SPList list = web.Lists ["ListName"]; // SPListItem item = list.Items.Add (); // आइटम ["प्रतिशत पूर्ण"] = .45; // 45% //item.Update (); SPListItemCollection items = list.GetItems (नया SPQuery () {क्वेरी = @ "& lt; कहां & gt; & lt; Eq & gt; ...

java - Weird System.out.print Behavior in Netbeans -

I'm getting strange results from system.out.print immediately below the scanner declaration in the system snippet. It is executing this twice and I've debug it and immediately after executing the print statement I get it in the standard: Run: An angry binary number: a useless binary number input: I said to verify it "Fdking" was entered into the loop print during learn without me in any way. Your information is being executed on NetBeans IDE 6.7.1 with 64 bit on 64 bit Vista machine. JDK. Hope you can see the mistake of my methods! Thank you: When performing the Netbeans, a JR file is generated on the command line, the statement prints once. Did anyone have encountered such strange behavior in Netbeans, which could know how I can stop it I hate working out of my IDE during the development cycle. Private Zero GetInput () {Scanner Scanner = New Scanner (System.in); System.out.print ("Input a binary number:"); // Take the next input for long and ...

Setup kits in VS.2008 -

I have run a lot in this problem in the past, but in reality it was never answered. When I am making a setup kit in Visual Studio 2008 (my projects are usually in VB, whatever changes), they all start working properly. However, when I make a new version of the setup kit something weird: The installation made the registry change only fine (it checks to see if it usually does this). (I think there are some changes in the registry or wherever anywhere Windows stores your data for the program 'Remove Programs of your OS'), but the file has not changed, so that's why A. I was still living with the old version! If I try to install an older version, then it tells me that the new version is installed and will not allow this, to confirm the fact that something changed during the establishment . Also, when I try to re-install the new version, I get a general option to remove and repair, so if I do repairs then nothing can change. If I delete it, then the application is succes...

c++ - Declaring a global in a global header file? -

I have a header file, say, common. H, which is included on many projects in all files. Actually I want to declare a global variable, eg .: memory manager; DLL_EXPORT MemoryManager * gMemoryManager; When I do this, I get many linker errors class memory manager * Gmail Manager is already defined. : (? As you type each of the variables in each compiled file These are then collision on linking. Remember that the preprocessor reads in all the header files and creates a large file from all of them, so every time this big file is compiled, gMemoryManager has been made. You need to use the extern and it is a non-header extern DLL_EXPORT MemoryManager One of your C ++ files / P> DLL_EXPORT MemoryManager * GmailReader; By the way I do not know what DLL_EXPORT does, I'm assuming that it needs to go to both places.

c# - Fluent Nhibernate - How to specify table name -

I have just started Nhibernate and Fluent Nhibernate. When I make my mapping class, I want to specify the table name. In the application, the entity's name is "CustomerAdWords", but in the Oracle database, the name of the table is "CUSTOMER_ORDERS" I have learned from googling that I specify the database table name You can use "WithTable". I'm not sure how to use it, and where VS 2008 did not know the method. thanks stable to 1.0 The table for release was done in the mention (first bullet point).

c++ - Heap currupted error in VS2005 with OpenCV? -

When I try to debug this simple code, I'm getting an error called "I Corrects Corruption" I, cvcpc capture * capture = cccaptuarefrem file ("1.avi"); If (capture) {cvNamedWindow ("motion", 1); While (true) {// hold frame and display image // no need of this, because the error is coming in cvCaptureFromFile ("1.avi"); }} But the real problem is that if I try to run .exe (debug output) of code (not through .2005) then this error does not occur. Can anyone help me understand this? Thanks ... This means that OpenCV avi can not load. I always convert my video to RAW I420 format; It loads completely. The following command will convert a video into this format in this format: Maincoder-Oxy Raw-nodes-VF format = i420 -o "% OUTPUT%" " % INPUT% " where % INPUT% and % OUTPUT% are input and output files.

c++ - pimpl idiom and template class friend -

I'm trying to use pimpl idiom to hide some grungy template code, but I do not give the derived class of Access to Body Class Mandle Class I get a C2248 error from MSVC 9 SP1 Here's some code to duplicate the error: // // interface.hpp // Namespace Internal {template & lt; Class T & gt; Class specific_a; } Class interface {struct body; Body * pbody_; Interface (body * pbody); Template & lt; Class T & gt; Friend class internal :: specific_; Public: ~ interface (); Interface (console interface & amp; rhs); Bull Test () CONST; Create stable interface (boolean value); }; // // interface.cpp // struct interface :: body {virtual ~ body () {} Virtual Bull Test () const = 0; Virtual Interface :: Body * Clone () const = 0; }; Square true_struct {}; Square false_struct {}; Namespace Internal {template & lt; Class T & gt; Class specific_ people: public interface :: body {// C2248 public: specific_body} {} Virtual Bull Test () const; Virtual Interface :: B...

c# - How can I get the current season using .NET? (Summer, Winter, etc...) -

Is there a way, given a date, retrieve the weather of the year? For any place on the globe? Is it based on time zones and hemispheres? Note, the southern hemisphere is still hot in summer. Edit: To clarify, I'm talking about the celestial. I do not think it is standardized. This part of the known globalization dataset is also not included.

Python logging for non-trivial uses? -

I'm trying to use Python logging module to do complex things. I will leave the inspiration for this design because it will make the post too long, but I need to be a root logger which requires a regular log file for our code and library that uses logging - The other logger collections for different log files. The overall setup should look like this. To simplify the code, I will do everything on stdout in this example. Import logging, sys root = logging.getLogger ('') top = logging.getLogger ('top') = logging down .getLogger ('top.bottom') class KillFilter (object) : DF filter (auto, message): return 0 root_handler = logging.streamhandler (sys.stdout) top_handler = logging.StreamHandler (sys.stdout) bottom_handler = logging.StreamHandler (Sys.stdout) root_handler.setFormatter (logging.former (' Root ')) top_handler.setFormatter (logging.former (' top handler ')) bottom_handler.setFormatter (logging.former ("botim handler")) ...

linux - How do I use tr to substitute '--' string -

मेरे पास एक आउटपुट है: - out1 - out2 - out3 मैं आउटपुट प्राप्त करना चाहता हूं: out1 out2 out3 मैंने उपयोग करने के बारे में सोचा: tr '-' '' लेकिन यह '-' को पहचानने के लिए पहली स्ट्रिंग होना चाहिए जिसे मैं स्थानांतरित करना चाहता हूं। मैं इसे कैसे हल करता हूं? बिल्ली फ़ाइल | Sed '/ ^ - / d'

c# - Shorten this reflection property name helper method? -

I want a static helper method to remove magic strings. Of course, I could pack the property method within TestContainer, which will remove the requirement to provide TestContainer as a reasoning. This is done well. But I want to have helpful methods in a stable class, if I later decide to optimize my code and remove the method. I managed to downgrade it, but to provide a little ugly (string type, does not look very good) Keep in mind to know any better way to "expression God", the static class should be kept universal and nothing should be known about the Test Container (otherwise it is as easy as the link provided). ) Internal class Property Name Resolving {Internal Class Test Container {Public String LastName {Receive; Set; }} Internal Static Class Binding Helper {Public Stable String Property Name and Lieutenant; Tubact, TVL> (Expression & lt; Funk & Left; Tobagect, TVLux> PropertiesCycler) {var Members Expression = PropertiesThich. As a Member Mem...

javascript - How to open a new window when clicking a hyperlink? -

After clicking on a hyperlink I would like to open a new window with a height of 600px and a width of 200px. How can I do this in HTML / Javascript? Do I use something like window. open? Is it also compatible with IE? Or should I use something in the jacquery? Thanks in advance. It is far better to engage hyperlinks without any inherently: HTML & lt; A href = "mypopup.htm" id = "popup" & gt; This will open in a new window & lt; / A & gt; Javascript window.onload = function {document.getElementById ("popup"). Onclick = function () {Return! Window. Open (this .hrf, "pop", "width = 200, height = 600"); }} The advantage of this approach is that you only have to specify the hyperlink in your HTML, and if Javascript is disabled or causes an error for some reason, a standard hyperlink.

css - Prevent Duplicate Borders on Nested Table (border-collapse not working) -

I am doing a net search about the collapse and it seems that it actually breaks the boundary on the nested table I have written a sample HTML and it is ignoring the collapse of the boundary. I got a related question here but it seems that this is not being solved. & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; Dsafhidsljfalkdsjfklsdajfkjsdakl jdsfjasdklfasdkljfkl & lt; / P & gt; & Lt; Table style = "border: solid 1px # 000000; boundary-fall: collapse;" Cellpadding = "0" cellspacing = "0" & ​​gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Table style = "border: solid 1px # 000000; boundary-fall: collapse;" Cellpadding = "0" cellspacing = "0" & ​​gt; & Lt; TR & gt; & Lt; TD & gt; A & lt; / Td> & Lt; TD & gt; & Lt; Input type = "text" / & gt; & Lt; / TD & gt...

syntax - Multiple Statements In Haskell -

How do you have more than one statement in Haskell? Here's what I'm trying to do: given that a list of [a, b, c, d] comes back to every other element, so you get [a, c] . I can see the solution, and even what I still have: facts (xs) | Length (xs) `mod` 2 == 1 = head (xs) | Otherwise = the fact (tail (xs)) This works fine around the first time, but then it ends, what I want to be able to say, the head comes back , And then call the truth (tail) (x)) How can I do this? The specified function returns only one element, you will need something to change: facts [] = [] - can not call tail on the list of length! Facts (xs) | Length (xs) `mod` 2 == 1 = head (xs): fact (tails (xs)). Fact: tail (xs)) To help you understand such thinkers, typing signatures can be useful: [ A] - & gt; [A] - Change any other list to another (small) list However note that this is very slow - O (N ^ 2) actually, because it's each Stepping is taking the length on. A lot o...

php - how do I chart this data with the google chart api? -

Hello, I have a query that I have run with mysql and I need to chart the data. Someone can tell me how I can format output to PHP and give it to Google with the correct and syntax - I have tried everything, but there is no happiness. There will be a code sample if it is possible to actually be useful, ideally I want a line chart, which has X X axis and it is the #x question of Y axis. Hours Questions 0 27 1 28 2 15 3 16 4 16 5 16 6 22 7 1 9 42 42 42 24 10 38 11 21 12 33 13 25 14 21 15 16 16 12 17 11 18 5 192 20 2 Thanks in the antecedents of your help. Kind regards Jonathan Like this: In a table, data returned from query: full-time hourly website website irma hoc_client spreadsheet 2009-10-14 23:00:00 23 93 2 1 0 0 2009-10-15 00 : 00: 00 00 15 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4:00:00 0 4 91 5 1 0 0 0 0 0 0 0 0 0 0 05:00 05:00 05 23 9 13 1 0 0 0 0 0 0 0 0 0 06 06 06 063 443 14 14 0 0 0 0 0 0 0 0 0 07 07 07...

uitableview - Getting started in Core Data for iPhone? -

If I want to implement core data in my iPhone app, then Core Data is the best way to learn for iPhone specifically. What's the way I have 4 hours which I can dedicate to today, so ideally I will be able to add this (though a bit) to my app. The only way I keep data now is through NSUserDefaults, just when the app stops and is reopened, their data is still there I will save the set of data to the user, I want to give them the ability to read, edit, remove them, etc. There was a move for me in the iPhone Dev Center: -) No, seriously From this, it may seem like a clear suggestion, but this one page document gives a good strategy for which to read the document and tutorial and in which order. Once you work through the first tutorial, this strange terminology will look a little odd.

mysql - correlated subquery update -

I have decided in my table that now I do not want to record the start and end time, but only a start How can I update my table in time and minutes so that it includes its value in my new column based on existing data? My attempt below produces an error: You can not specify the target table 'Lesson' for updates in the FRM section Update Text SET Period = (SELECT TIME_TO_SEC (TIMEDIFF (finish_time, start_time)) / 60 as a lesson L.L.I.D. = Saban.ID You do not have to do this because by updating a column with the values ​​of other columns in the same line, just do it: chapter text duration SET period = TIME_TO_SEC (TIMEDIFF (full_time, start_time)) / 60

iphone - Is there a way to find out what App Store the user is connected to? -

I'm planning to release my app as a free version, and then the user will be able to buy the full version should buy . I would like to customize the artwork so that if they are on the UK store, then it says "Buy the full version for 59p" and "buy full version for $ 1" at US store. Is there any easy way to get this information? I know NSLokel can provide this information, but whatever I can gather can be set in any country, and it is not necessarily an app store that is connected to the user. In the section of the App Purchasing Program, the process of obtaining information about your product from the App Store Has been described. SKProduct objects that you withdraw from the store for the special element you purchase include value and priceloc properties, which can be used to create local value for your full version. You may know how you can keep this pricing information inside the app, because many people (including me) in our free editions provide inf...

Is there an error in POCO C++ library documentation? -

भ्रामक पृष्ठ है "/ Bin / ps" के लिए खोजें लाइन है: प्रोसेसहैंडल पीएच (लॉन्च ("/ बिन / पी एस", एल्ग्स, और आउटपिप, 0, 0)); यह नहीं होना चाहिए: प्रोसेसहैंडल पीएच (लॉन्च ("/ bin / ps", आर्ग्स, 0, और amp; आउटपिप, 0)); ? हां, आपके अवलोकन की पुष्टि - आदेश पिछले तीन एल्ग्स का वास्तव में stdin, stdout, stderr है, इसलिए डॉक्स में outPipe गलती से इनपुट के रूप में पारित हो रही है मेरे पास आपके पास और कोई विचार नहीं है, यह डॉक्टर की किसी भी तरह की गलती नहीं हुई है! -)

c# 3.0 - Problem with XML Serialization: Must implement default access descriptor in -

I have an excuse when trying to serialize a stack in Visual Studio 2008, C # 3.5 Here's some sample code. & gt; 1 CardDNKK = New CardDN (12, CardDN. UtyType Club); & Gt; 2 stacks & lt; CardDN & gt; Kk1 = new stack & lt; CardDN & gt; (); & Gt; 3KK1 Push (K.K.); & Gt; 4 & gt; 5 XML Serializer SerialLark = New XML Surgery (kk1.GetType ()); & Gt; 6 string vents auxSerializedk = new stringwriter (); & Gt; 7 Serializer. Serialize (Ox Serialized, KK1); This fails in line 5. The exception is: The system implementing the DB is defined and the system. oath. Generic. Stack 1 [[Black Jack.CardDN, DN-Blackjack, Version = 1.0.0.0, Culture = Neutral, PublicK-Token = Null]] Porchelle Hereda de Ikling. There is something like this in English: "The default access descriptor in the system is required to implement Colllections.Generic.Stack11 [[BlackJack.CardDN, DN_BlackJack, Version = 1.0.0.0, Culture = Neutral, PublicKeyToken = nu...

How to view the controller's resulting html in debug with ASP.NET MVC? -

While debugging the result of an administrator's action (html, xml, json), I can see For example, in my controller this is: reload public partial view () {partial view ("index"); } While debugging, I want to see what HTML will be sent to the client. Thanks This is not easy, because partial view results are sent directly to httpcontext.current.response.output It does not return the string, you can filter it by using the extension method, by filtering it as a HK kontex output: /// & lt; Summary & gt; Presents a view for the string. & Lt; / Summary & gt; Public Stabilized String RenderViewToString (This Controller Controller, String Visionname, Object ViewData) {// Existing response is getting response var = Feedback HttpContext.Current.Response; // response flushing Flush (); // View footage view view = scene engine. Engine. View of FundPartel (Controller Controller Contex, Visualization). See; // Create visual footage vs. visual view = n...

c# - ASP.NET register a control from external dll on a page -

Today I'm peating my head against a brick wall. I am porting a site that I developed on a new box in a new god and. I have not copied all the files yet because I did not have any large file structure and I would like to remove some parts of that code as I went. Basically I wanted a website (file -> new -> web site) I wanted something like a file structure: The new blank solution was created so that the SLN file is in its own right, then the projects (various DLL projects) and ASP Net Web Application This last part has given me the reason for some issues that have given me headache, as far as I understand (it can be a little limited), a weblist (as I did before) The latter is different from what I have made. For example, to resolve the App_Code folder portion as previously did I have created a separate DLL for Web Library CS files and added a reference for it. My problem now is how do I register it on a page to use it under control. For example, I have a control ...

Linq to Sql - DataContext design issues and considerations in ASP.NET MVC application -

मैं एक एएसपी.NET MVC आवेदन में Linq से Sql का उपयोग करते समय "एकल डेटा संदर्भ प्रति परमाणु आपरेशन" का उपयोग कर रहा हूं। / P> अब तक, मैं एक सिंगलटन डेटाकॉन्टेक्स्ट का उपयोग कर रहा हूं, जिसे मैंने सीखा है, कई मुद्दों पर हैं, इसलिए मैंने परमाणु संचालन के लिए एकल डेटाकॉन्टेक्स्ट का उपयोग करने के लिए कोड को पुन: लागू किया है। नियंत्रक क्रिया का एक उदाहरण अब इस प्रकार है (refactoring ने इसे बदल नहीं किया है): सार्वजनिक कार्यवाही सूची () {सूची & lt; अनुरोध & gt; अनुरोध = this.repository.AllRequests (); वापसी देखें (अनुरोध); } रिपॉजिटरी प्रकार आईआरपीजीटरी है मैं एक अलग डेटा परत पर स्विच करने में सक्षम होने के लिए इस अमूर्त को रखना चाहता हूं (Linq से Sql के साथ मेरे हाल के अनुभव के आधार पर, यह बहुत जल्द हो सकता है:)) LinqRepository AllRequests () विधि लागू करता है निम्नानुसार: सार्वजनिक सूची & lt; अनुरोध & gt; AllRequests () {(DataModelDataContext कनेक्शन = GetContext ()) का उपयोग करके {return connection.Requests.ToList (); }} (केवल संदर्भ के लि...

c# - Does using a delegate create garbage -

I am working on a game for xbox360, using xNA I am comparing trash collector to a PC in xbox Performs very poorly in comparison to anyone, so the garbage made for minimal exposure is important for a smooth running game. I remember that once the call to a representative is created garbage, but now no reference can be given to the representatives of the garbage collection for my life. Public Representative T GetValue & lt; T & gt; (T value) If there is a mistake to succeed, then the bonus points , T [] Args); Public Static T Transactions & lt; T & gt; (GetValue & lt; T & gt; Count, Ref: T Value, Paramus T [] Args) Where T: Class {T newValue = Calculation (Value, Args); Return foo (newValue); } My code looks quite vague at this time, only one solution I can think is to get rid of the representatives pass in those sections which handle the interface IValueCalculator, and then I can call the method on that interface, though it's not really very clean!...

wpf / silverlight textbox filter design -

I have a list that users can filter in several ways, two of which lend themselves to the combo boxes and two Needs to accept user input. For example, a text box allows the user to type in any part of the description of a list item, and will display only those items whose text is entered in the text. This is a dialogue type 'picker' type window, so space is at a premium. I did not want a conventional label for the text box. Instead, when the dialog is first brought, the label ( I.e., "description") becomes grayed out, centered, and in the intersection. A tool tip might explain to the user how it is. When the user starts typing, the incorrect label disappears and the text entered is normal left-aligned text. Is there any basic support for doing this kind of WFP / Silver? I think it can be a combination of styles and events. I did not want to invent any wheels which could be from there (I met Tartoise '"Log Lodge" window in particular, but I have se...

memory - How does an environment (e.g. Ruby) handle massive integers? -

Ruby (MRI) refuses to overflow my integer. I have seen a change in class from Fixanam to Bignna but I am wondering how it has been modeled and what kind of process Ruby uses to make arithmetic on such a huge integer. I have seen this behavior in SCHEME as well as in other environments. I ask because I want to implement something similar in C program and would like to know that Bignam + Bignam reduces primitive operations Any sign? Python also does this. In fact, rather than behaving as a string of bits instead of behaving as a string of bits that fits the hardware architecture (for example 32 bits), this number is a string of 32-bit digits It is believed that to handle all the arithmetic, from 32-bit digits to the second, the action involves allocating additional 32-bit digits in it because the number is increasing. For example, 99 * 99 is less than 100 * 100 which is 10,000, therefore one can assume that by multiplying the two 2 digit number, no more than 4 digits can b...

c# - Extracting audio data from FLV and injecting into MP3 -

I need to extract audio data from an FLV and put it into an MP3 with C # So I would like to see either a library for it or with a raw data / file structure. Take a look at An os flux audio stream extractor. Edit: The files of interest are under the Library folder to try them in your project: (FLVFile flvFile = Using the new FLVFile (fileName)) {// The first paragraph is whether to extract audio stream (true) / second parameter or whether to remove video streams (false) / / third parameter Whether to remove timecode (false) or not / fourth This is the absolute representative who is said in the case of overwritten signal (if you want to overwrite leave empty then automatically) flvFile.ExtractStreams (true, false, false, blank); }

javascript not generating in browser, just prints code to screen -

First of all, I'm not asking anyone to do my homework, this means a simple to get acquainted with javascript Had to write a webpage. It generates a random card from a folder called 'card' and shows that I completed that part though, when I handed it to the teacher, then they sent me the screenshot the subject line "Back with any ideas"? I have tested this page on several machines and it works in every browser. I do not know that when he runs it, it prints the code on the page. any idea? (I'm assuming Javascript will be enabled, especially when everyone in my class submits this program). EDIT: Here is the code, sorry, but I've included everything to clear some questions & Lt; Title & gt; Aaron Gamble page! & Lt; / Title & gt; & Lt; Style type = "text / css" & gt; * {Padding: 0; Margin: 0; } Body {font-family: aerial, helvetica, sans-serif; Font-size: 13px; Background: # 48454C; } #wap {margin: 0 auto; Width: 3...

flash - Function executing as constructor, but not as function -

मेरे पास मेरे displayandmove.as फ़ाइल में निम्न कोड है: पैकेज {import flash.display। मूवी क्लिप; सार्वजनिक कक्षा चित्रासंपादित करें मूवी क्लिप (सार्वजनिक समारोह displayandmove) का विस्तार करती है () {this.height = stage.stageHyight / 5; This.width = stage.stageWidth / 5; }}} और मेरे पास मेरे displayand move.fla के फ्रेम 1 पर निम्नलिखित हैं: var आकृति: चित्रा चित्रा = नए चित्रात्र रचना (); stage.addChild (आंकड़ा); Figure.x = stage.stageWidth / 2; Figure.y = stage.stageHeight / 2; ये फ़ाइलें एक ही निर्देशिका में हैं। मेरी एफएलए लाइब्रेरी में मेरी आकृति मूवी क्लिप है और यह "चित्रा" संरचना "और बेस क्लास" flash.display.MovieClip "का एक वर्ग है। वर्तमान में उपरोक्त कोड ठीक काम करता है क्योंकि मुझे पता चला है कि यदि मैं ऑब्जेक्ट आकार कोड को एक निर्माण के रूप में निष्पादित करता हूं - फ़ंक्शन नाम के रूप में फ़ाइल नाम का उपयोग कर - यह काम करता है। मैं जो मूल रूप से करना चाहता था, मेरी एएस फ़ाइल में "sizeFigure ()" नामक मेरे फ़ंक्शन का होना था और...

.net - Non-standard UI in C# -

I'm still learning C #, and I know that WinForms is not yet known but I Very soon, though, I want to know how to create an application that shows a customized notifier, like a mess on Mac. Here is a ridicule: Can someone tell me in the right direction? And I know I should know more about C # than trying this, but I always like to peek at the complex stuff. Take a look, I think it does what you want to get out of the box, Hopefully something like this will be part of WPF in the future. I have used this one before for exactly the same reason, and it's really good: you can use standard tooltips or "toast" popups, or create your own, which is the example you posted Can be similar in

ASP.NET - ListView binding - Clarification -

We have ASP.NET applications and use a ListView to display some user records from the database. Once we populate the list view from the database, the user can edit some of his records Now our requirement is that when a user edits a record So, we need to post those changes in the database, but do not reboot from ListView (database). We also should not use cash or session objects to store the ListView's data. Do you think this is possible? If this happens, would you please see a code sample on it? Use Data Set 2 Data Set 1 (D1) and Data Set 2 (D2) Bind ListView with D1, when the user edits D1. For Copy D1 D2, accept the change on D2. But reject the changes in D1, so it will be with the old values. List them on. But the database has been updated using D2. - But let me tell you why you want to do this? Whenever the user edits anything, it should be shown both on the screen and in the database, then there should be stability between the data only.

localization - Do numbers need to be localized? -

It seems like a stupid question that "10" has been named "10" in Hebrew, Arabic and all languages is? I am not looking anywhere where it says that when dealing with localization you need to do something special with numbers. Maybe that number format but only about the number? I would think that the numbers will be read aloud in the right-to-left languages, but translate.google.com is giving me the same number back. Can anyone confirm this? There are different glyphs for Arabic and Japanese (?) Numbers, but the standard system is very common Numbers usually do not change If you are using .NET formatting functions, the numbers will be formatted according to the system's preferences (I am speaking a comma and decimal digits here)

mysql - PHP warning problem? -

संभव डुप्लिकेट: मैं php और mysql के लिए नया हूँ, मुझे लगता है कि मैं mysqli_real_escape_string () को खो दिया है। मैं लाइन 3 पर निम्न चेतावनी प्राप्त करता रहता हूं। चेतावनी: mysqli_real_escape_string () अपेक्षा 2 पैरामीटर, 1 में यहां पीएचपी कोड है। & lt;? Php $ page = mysqli_real_escape_string ($ _ SERVER ['SCRIPT_FILENAME']); // डेटाबेस से क्वेरी सदस्य डेटा और $ mysqli = नए mysqli ("स्थानीयहोस्ट", "रूट", "", "sitename") प्रदर्शित करने के लिए तैयार; $ Dbc = mysqli_query ($ mysqli, "mysql_counter_logs से SELECT आईडी पेज जहां पृष्ठ = '$ page'"); यदि (mysqli_num_rows ($ dbc) == 0) {$ mysqli = नया mysqli ("स्थानीयहोस्ट", "रूट", "", "sitename"); $ Dbc = mysqli_query ($ mysqli, "mysql_counter_logs (पृष्ठ) मूल्यों में शामिल करें ('$ पृष्ठ')"); } यदि ($ dbc == 1) {$ dbc = mysqli_query ($ mysqli, "UPDATE mysql_counter_logs SET हिट = हिट + 1 जहां प...

.net - Enumerators and Thread-safety -

Just to ensure that I have this code: this.allObjects = [Some linq query]; And there are two ways that both read (not modified) this IEnumerable, are they safe to call in parallel? Should it be safe to just loop through an IEnumerable? It depends on the implementation of the calculator, but in most cases, it is safe. A note though: pseudocode, as you do, does not actually do anything (due to suspended execution). The LINQ query will only be executed when you use allObjects (or if you make some calls to the toList () on the LINQ query).

How do I edit an external css file with PHP? -

I have a page with image I want the client to be able to upload a new image in the database and then Be able to exclude the image from inside the CMS Once they convert it to CMS, I want to edit PHP background image in an external CSS file. Is it possible to do this? I know PHP is a way to exclude an image tag in HTML markup, but I would like to be able to edit the external CSS file to keep my code cleaner. "post-text" itemprop = "text"> AddHandler application / x-httpd-php.css

perl - How can I send arrow key presses to a process using Expect.pm -

It looks like it should be clear, but how do I send an Arrow key in a process using Expect.pm? Does it depend on the terminal type which I am using (vt100) or do I send keyboard scandals? TIA It really depends on your current TERM environment variable once it's set correctly (Called VT220 or linux), then there are arrow keys above: "\ c [[" a "bottom:" \ c [[b "left:" \ c [[d " Correct: "\ c [[c"

c# - How do I search for a list of files using wildcard -

How do I use wildcards in C # to list the files in the selected folder? Your friend is here: Directory.GetFiles (@ " C: \ Users \ Me \ Documents "," * .docx "); Or, recurring: directory. Getfile (@ "c: \ user \ m \ document", "* .docx", searchoptions, all directories);

sql - convert xml into table -

I have to convert an oracle table to XML and then return it to the table form. I have converted a table using xmlgen, but I do not know how to reverse the conversion. I see an example of converting an XML file into a table. More examples are working. ..

sql - Mysql query to return server load average -

Is anyone aware of a MySQL query that gives the current load average of the server? Correct me if I am wrong, but load average variable is a property of machine, not mysql To get the server average, you should look for a system call, not a SQL query.

wpf - Bubbling scroll events from a ListView to its parent -

मेरे WPF अनुप्रयोग में मेरे पास ListView जिसका ScrollViewer.VerticalScrollBarVisibility अक्षम पर सेट है यह एक ScrollViewer के भीतर समाहित है जब मैं ListView पर माउस व्हील का उपयोग करने का प्रयास करता हूं, तो बाहरी ScrollViewer स्क्रॉल नहीं करता है क्योंकि ListView स्क्रॉल ईवेंट को कैप्चर करता है। मैं ListView को ScrollViewer पर आपको आंतरिक सूची दृश्य में पूर्वावलोकन माउस व्हील ईवेंट को कैप्चर करना होगा ctl.previewmouseWheel + = PreviewMouseWheel; फिर सूची दृश्य को स्क्रॉल करने और माता-पिता सूचीदृश्य में घटना को उठाने से घटना को रोकें। निजी स्थिर शून्य पूर्वावलोकनमाउस वेहेल (ऑब्जेक्ट प्रेषक, माउसवेहेलेएवेंटएरग्स ई) { अगर (! ई। हैंडल) (ई। हँडल = सच; Var eventArg = नए MouseWheelEventArgs (e.MouseDevice, e.Timestamp, e.Delta); EventArg.RoutedEvent = UIElement.MouseWheelEvent; EventArg.Source = प्रेषक; Var पेरेंट = ((कंट्रोल) प्रेषक)। UIElement के रूप में मापन; parent.RaiseEvent (eventArg); }} क्रैड @ रॉबर्ट-वाग्नेर के पास जाते हैं जो कुछ महीने पहले...

sql - Compare MySQL "Time" Field with String in PHP -

I have a specific line in my database, with the following information: : User_id start_time end_time 405 12:00:00 14:00:00 I have the following selection statement: data from SELECT * to INNER user Join Users.user_id = where the data is not present (Select * Date between '10: 00: 00 'between start_time and end_time) users by users "."); Now, I think this question will return the above line (user 405), however, it does not bring anyone back. (Because 10:00 am is not between 12:00:00 and 14:00:00). Interesting, if I change the value from 10:00 to 07:00:00, then it works fine. Why is this not working but any thoughts? In the database, set up the fields as my TIME, and they have been formatted as: 00:00:00 Thanks a lot! Update: I changed my query to look like this: select usrID, first , From previous users where no User_id (select from `u`user_id``````,` user` u WHERE d.user_id = u.user_id and CAST ('10: 00: 00 'as between time) star...

c# - Scheduled .NET code execution in hosted environment? -

I have approximately 40 lines in a console application that read in a database and have RSS feed and store information. . Until the RSS feed is present (indefinitely) I need this code to execute every night Currently, I just launch the console app from my home computer Because I The night can not trust myself to do this, so I need to host this code. I would like to see this app somehow. Or code (it can be easily put in an ASP.NET page code and I run automatically without running the console app when the page is triggered to execute on load). Manually Any thoughts? EDIT: I do not want to run this code from my computer; I can not guarantee that my computer will not be connected to hybratting every night or internet. EDIT: Now I am thinking of a background thread using BackgroundWorker in Application_Start of global background, this is RSS feeds once a day, download threads and threads. Sleep () rest time Although controversial, Jeff Atwood told about the blog that he was ...

asp.net mvc - Add Group Membership to Custom Membership/Roles provider -

Being quite new to the MVC framework, I am trying to establish a custom membership provider that can support the concept of groups or departments. "post-text" itemprop = "text" I need to allocate each user in relation to one (and only one) of several groups - each group (and its members) can see only those records which are related to it - Group ID Recognized by I somehow need to store this group in the user profile so that when they are logged in and call the index method on the controller, then the group is passed to the address, See who the user can do. I'm sure this is a straightforward approach, but I find a mental block with it. Any insight will be helpful (and possibly embarrassing!) Roger I wonder if you can use" roles "instead of" groups "permissions can be easily controlled with roles. Typically, a role is something like admin, manager, superuser, user, guest. But can you play a role for your goals? Here's ho...

java - ClassNotFoundException com.mysql.jdbc.Driver -

This question has been asked several times here, after performing some Google searches and making some updates for the above error, I do not understand why I am still getting that error. I have already added my driver - mysql-connector-java-5.1.5-bin to the classpath: Java_Home \ jre \ lib \ Java_Home \ jre \ lib \ ext \ Java_Home \ Lib and the code I am using to connect to mysql database: try {class.forName ("com.mysql. Jdbc driver "); Connection con = DriverManager.getConnection ("jdbc: mysql: // localhost: 3306 / mail", "root", ""); Statement stmt = con.createStatement (); Results reset rs = stmt.executeQuery ("message_body from deadletter"); String db time; While (rsnext ()) {dbtime = rs.getString (1); Println (dbtime); } Con.close (); } Hold (SQLException e) {System.out.println ("Connection Failed! Test Output Console"); E.printStackTrace (); }} and the full stacktrace of the above exception is: java.la...

css - Having problems getting divs to line up properly -

I'm having trouble displaying some images inline. I have tried many things but nothing works properly How do you do this normally? Floating them? Put them in a list and lined up on it? Maybe I'm not thinking about anything = / Thank you. "Block" element by default DIV if you want inline behavior, style element "Display: Inline "use -Oisin

Iphone Receiving Errors in Organizer Console -

When I tried to use the app, I found the following errors: Sun 18 October 17:49:38 unknown com.apple.debugserver-43 [316] : Error: RNBRemote :: HandlePacket_p (p3b): Unknown register number 59 Requested Sun 18 Oct 17:49:38 Unknown Comm. Apple.debugserver-43 [316] & lt; Error & gt; Error: RNBRemote :: Handle packet_p (P3C): unknown register number 60 requested sun October 18 17:49:38 unknown com.apple.debugserver-43 [316] : Error: RNBRemote :: Handle packet_p (P3d): Unknown register number 61 Requested sun 18 October 17:49:38 Unknown com.apple.debugserver-43 [316] : Error: RNBMMTE :: Handle Packet_P (P3E) Unknown Register Number 62 Requested Sun 18 October 17:49:38 Unknown com.apple.debugserver-43 [316] & lt; Error & gt; Error: RNBRemote :: HandlePacket_p (p3f): unknown register number 63 requested sun 18 October 17: 49:38 unknown com.apple.debugserver-43 [316] : Error: RNBRemote :: HandlePa Cket_p (p40): unknown register number 64 requested sun 18 October 17:49:3...

Custom C++ Preprocessor / Typeful Macros -

Given the benefits of metaprogramming in Ruby and Python, but lower-level language like C- + and C I'm thinking that for an actual work, an example for combining both comes in simple problems to sort out the list of arbitrary structures / classes, for example: stratus {int a; Int b; }; The vector & lt; S & gt; Vec; (Int x = 0; x & lt; 10; x ++); Inst.a = x; Inst.b = x + 10; Vec.push_back (inst); } Eventually, I want to be able to sort my voluntary sort with minimum minimum boilerplate code. The easiest way I can do this is to use STL type: sort (vec.begin (), vec.end ()); However, for this I have to write a method that can compare "strats s" to what I want to do: sort (vec , ASC, B.Desc); Which is not very clearly valid C ++ What is the best way to fulfill my dream? If I had some types of macros, which would reveal to me how the elements of a vector were, then it would be trivial to write the C preprocessor macros to make the necessa...

audio - C# - .WAV Playback Randomly High Pitch -

For some reason, when a WAV file is played back down using the snippet, it is randomly reversed Plays like, a high pitch noise. It does not happen all the time, just randomly. It seems more often when it is played more often, the WAV properties are below with the code snippet below. WAV Properties: bit rate - 750kbps Audio sample size - 16 bit channel - 1 (mono) Audio sample rate - 44 kHz Audio Format - PCM Snippet: System.media Soundplayer MyPlayer = New System Media. Soundplayer (Captcha.Properties.Resources.sound1); MyPlayer.Play (); Is this because I am playing a file or file myself? Thank you. An audio problem seems to be trying out another WAV file.

javascript - What are some quick tips for increasing jQuery performance? -

What are some quick tips to increase jQuery performance? Prioritize the simple selection first with id only , and only Second by tag name . To select by the class name or the CSS selector, jQuery needs to run on the DOM, while the ID and the tag map are in the "native" browser DOM Functions (getElementById and getElementByTagName). Make your zodose objects as much as possible cache . Instead of choosing the elements individually, select a common ancestor element and use the find function to find the elements within the scope of those elements. It is actually only optimal if you are doing some operations on the general ancestor; Otherwise, to find and cache the ancestors, this could be more than the benefits of the Schodday traversal. Do not use $ each. , Use for this (;;) Instead it's ten times faster.

What kinds of operator overloads does Delphi support? -

I wonder what type of operator overload is possible (and which version of Delphi)? Subtract (left, right: type): I know about: Add (left, right: type): type (For the '+' operator) Type (for the '-' operator) Multiply (left, right: type): Type (for the '*' operator ) Split (left, right: type): type (for the '/' operator) Full (Ave: type): Other type and Full (examples: other type): type (for implied function: a: = b clear (Ave: Ta) I.ap): other type and clear (examples: other type): type (for clear assignments of 'cast': a: = Type (b) However, I do not know that the names of '=', '& lt; =', ' ', '>' and '> =' are the operator ' And what version of Delphi can I use these? PS: I still use Delphi 2009 at this time, so in 2010 they will have another strong upgrade logic; -) Actually, me I got the answer myself, but kept the question as I can imagine that people will...

Best practices for processing input HTML content at server side in java -

I would like to apply content management system with RDBMS in java / j2ee, and would like to know the best practice to handle input HTML Content There are some doubts given below, I'm sure there are many things to be careful about. Do we need to avoid HTML tags and specials The first letter is saving the HTML content from the database We have large input HTML How to validate / delete invalid special symbols in content Best practices for displaying HTML content from the database back in the browser Post-text "itemprop =" text "> HTML in HTML Use a tool to clean up, then to parse it using any XML parser.