Posts

Showing posts from January, 2013

iphone - iOS 4 GCD questions -

I've seen some presentations of the WWDC 2010 and block and read most of the concurrency documents and Grand Central Dispatch uses blocks with serial lines to about a few questions in a iOS 4 project to me which is a dictionary of Scrolwu and image information - like URLs for images and so on. I want to use GCD and blocks to download images and in my scrollwid so that the main thread is not blocked. I wrote the following code seems to work: (for pictures Ansreepshn * dict) {Preshk_sisnk (image_queue, ^ {NSString * urlString = [dict objectForKey: @ "url"] ; NSURL * url = [NSURL URLWithString: urlString]; NSData * imageData = [[NSData alloc] initWithContentsOfURL: url] UIImage * image = [UIImage imageWithData: imageData]; UIImageView * Start imageView = // see the image; Dispatch_async (dispatch_as_main_queue (), ^ {[self.scrollView addSubview: imageView];}); [image data release];}); } I have two questions: According to concurrency guide, should I hold the var...

Global Exception in struts2 -

I am trying to configure global exceptions in struts.xml. When I include the global-exception mapping tag, the project is not starting I get the following message in the log, July 27, 2010 6:33:07 PM org .apache.catalina.core.StandardContext Starters SEVERE: Filter Filters Error July 27, 2010 6:33: 07 PM start org.apache.catalina.core.StandardContext: Reference [/ ehspreg2] Startup failed due to previous errors log4j: Error log manager. The repository selector was empty due to an error in reloading the class, using the NOPLoggerRepository. is the Struts.xml file, & lt; Expands package name = "default" = "string-default" & gt; & Lt; Result-type & gt; & Lt; Result-type name = "tiles" class = "org.apache.struts2.views.tiles.TilesResult" /> & Lt; / Result-type & gt; & Lt; Interceptor & gt; & Lt; Interceptor-Stack name = "ehs pre2 stack" & gt; & Lt; Interceptor-Rif name = "...

iphone - How do you set the content size of a UIPopoverController? -

I'm showing a scene in popup. When I click on a button in this view, another view will be pushed into popup using the navigation controller. By pushing, the height of the popover is increased. How do I create the same popover height? In all your view controllers, override -contentSizeForViewInPopover and all of them are identical Return the shape.

reflection - get class from java.util.List<SomeType> -

इस अभिव्यक्ति से वर्ग कैसे प्राप्त करें java.util.List मुझे लगता है कि आप रन टाइम पर सूची के टेम्पलेट वर्ग को जानना चाहते हैं, और संक्षिप्त उत्तर है: आप नहीं कर सकते जावा जेनेरिक्स का उपयोग केवल संकलन समय पर किया जाता है: बाइट कोड उत्पन्न होने से पहले टेम्पलेट तर्क मिटा दिए जाते हैं। इसे "" कहा जाता है।

editor - Is It Possible to Comment Out HTML Code in a Wordpress Post? -

Sometimes I need to put some raw HTML code into a WordPress post, and sometimes I can see that code A part of the need to comment !! With a plain text editor, I just click and I can hide around Chuck. But when I see it in a WP post, it hides the code, but I still see the "off comment tag" -> look. What is the correct way, if possible, to exclude the code in a WP post? Thank you! There is a bug in Wpautop () that breaks the HTML code comments. An easy solution is to add a second open HTML comment tag before the optional closing - it works like WordPress you would expect it to & Lt; / A & gt; & Lt; / Div & gt; & Lt ;! - - & gt; This will not work in WordPress: & lt ;! - & lt; Div class = "book floatleft" & gt; & Lt; A href = "#" & gt; & Lt; Img src = "http://www.myreallycoolsite.com/wp-content/uploads/2013/02/button.png" alt = "" /> & Lt; / A & g...

How to Get dependency of a PHP script? -

I am using a PHP library PHPExcel in my script. Now the library is very big around 7 MB and I do not think I am using it all the facilities. I want to lightweight my script by inserting files in PHPExcel which I am not using. PHPExcel uses an autoloader that contains only the file that your The script actually uses, so the actual "memory" size of the script is kept minimal. If you are not using any language other than English, then you can delete all the subdirectories in the classes / PHPExcel / locale ... if you want to have other places like francs, you can use fr Exclude all subdirectories except (0.5 MB savings). However, I will not recommend removing any other thing. Especially without knowing what you need is what you need. If the disk space is absolutely important, and you are working with only xls (for example) files, then you have all other readers and authors (note that the PDF author uses the HTML author) ; But then you have to clearly recognize that...

language agnostic - How to generate every possible combination of a string when given a list of values -

Say that there is a list of my values, this list can be of any length: "100", "200", "300" , "400", "500", ... and I have a template string that contains some tokens which need to be replaced: "@ Token1 @ - @ tokens2 @ - @ tokens3 @ -....- token n @" Using the list of values, I can add values ​​to the templates How can I create every possible combination? Values ​​can be used more than once, so the result can be "100-100-100". Additional points for a method that takes into account a variable amount of tokens! edit: a fixed number of deleted token version Takes advantage of recycling just for fun: r ($ values, false, $ numtokens); 100-100-100 as well to get / wrong function r ($ value, $ unique = true, $ depth = 3, $ deposit = array ()) {if ($ depth == 0) { Print implode ("-", $ accumulated). "\ N"; } Else {foreach ($ id = & gt; $ value as $ t) {if ($ unique) unset ...

iis 7 - The device or resource (localhost) is not set up to accept connections on port "The World Wide Web service (HTTP)" -

The device or resource (localhost) has not been set to accept connections on the port "World Wide Web Service (HTTP)" . To download IIS platform from Microsoft, there are windows 7. I have done bad news more than once, it used to work a few days ago .... Today my inetpub / wwwroot compeletally running service And firewalls are allowed in the World Wide Web Services (HTTP) private. Do you have a firewall Port 80 is open? Make an exception for that port and see if it's a trick.

python - UUID returning as bytes_le from MS SQL -

I ask a table with my Django app, but whenever I do a query on a specific table, I get it Instead of the practical string representation, the UUID columns were returned as a byte_level UUID. Now, I know that I am converting it by using uuid.UUID (bytes_le = value), but I am using this query to populate a WTForms QuerySelectField, so let me manually fix the UUID Is not luxury, unless I want to call the query, get the result, and then copy it to another list (fixed with UUID) and then pass that query into my QuerySelectField.query object The Or is there any better way that I can force Saklichi to stop me from making useless formats? In addition, it is only happening on one table when I query any other table with UUID, then they work fine, and specify all 'uniqueidentifier' row type in my MSSQLServer tables And I am using the same data structure for the UUID column in all of my sqlalchemy models.

xml - Flash, actionscript...load and parseXML with scrolling -

I would like to add a component to my Flash website, which will be 1.load xml data. 2. Separate it to use the stylesheet 3. XML data can be applied to a scrollbar. Any suggestions will be useful Try the following: Load your XML file with the URL loader. Use listener program. Enter data to the complex and XML. Pull the children of XML through the loop or create recursive and data objects. Render the data objects in the textfield with the space tag and apply the stylesheet as per the need for formatting. Of course, there are other ways but I am guessing about the use of this application.

c#, Excel + csv: how to get the correct encoding? -

I'm trying this for a little while, but I can not understand it. I am trying to export the data to Excel via * .csv file. It works so far, but I have some encoding problems when opening files in Excel (the left side is the original String, the result on Excel right) is:. Masswit (microgram / m) ==> Meswarts (micr / m) dumé masong == & gt; Dümme Mässèng Notepad ++ tells me that the file "ANSI" encoding as UTF8 (WTF?) here in different ways I'm trying to get a valid result: Clear implementation: tWriter.Write ("Messwert (μm / m)"); tWriter.Write (Encoding.Default.GetString (Encoding.Unicode.GetBytes: and more sophisticated one (maybe a dozen or more encoding combinations Tried ("; masvirt (microg / m)"))); TWriter.Write (encoding.assici.getstring (encoding.uncodegatebytes ("; masvrat (microg / m)"))); and so on The entire source code to create the method data: MemoryStream tStream = new MemoryStream ...

asp.net - How do I get the EntityDataSource to allow me to access child entities? -

I have a very simple mockup that I am creating a customer using the Northwind database I have a three Edmx file is: Product, Category, and Supplier. I am trying to create a page that has a gridview that shows the name of the category and the supplier name. To SQL with LINQ I can return the LinqDataSource Control Product Unit and after that there can be a TemplateField in GridView like: & Lt; / ItemTemplate & gt; However, it seems that EntityDataSource is not playing well so it seems that it will not load lazy category data. I am a very simple EDS: & lt; ASP: EntityDataSource id = "dsProducts" runat = "server" ConnectionString = "name = NorthwindEntities" DefaultContainerName = "NorthwindEntities" EnableFlattening = "false" EntitySetName = "Product" & gt; & Lt; / ASP: EntityDataSource & gt; But Gridview does not show the name of the category. If I am creating a RoadAdbound event ha...

php - Why are there pluses ( + ) in my oAuth tweets? -

I oAuth has broken and my class file is for this I am the last of posting a tweet I am in step and all words are added with a plus sign in tweets. Changing some results in the signature is wrong and Twitter gives 401 error So how does one remove the Plus? Post Function: function post ($ token, $ token sync, $ position) {// default parameter $ params = array ("oauth_version" => "1.0", "oauth_nonce" = & Quot; $ o- "status" = & gt; $ position); Uksort ($ params, 'strcmp'); // Forex Currency ($$ k => $ v) $ $ [$ pairs]] = $ this- & gt; Convert the parameter as _urlencode_rfc3986 ($ k). '='. $ This- & gt; _urlencode_rfc3986 ($ v);} $ ConcatenatedParams = implode ('& amp;', $ added); // Form Base String (First Key) $ BaseString = "Post" and "$$" - $ _- $ _ ($ this- & request_statuses_url) "& Amp;". $ This- & gt; _urlencode_rfc3986 ($ concatenate...

c# - Text file to store data -

I want to continue some data in a text file in my C # application. I added the text file to the root of my project. How do I use it now? Does this file my exe or what? First of all, make sure that you click on the correct file and "copy in the output directory" Second, the file will not be embedded inside your executable. It will be a normal * .txt file with your * .exe and you can access it like this: StreamWriter sw = null; FileInfo fi = New FileInfo (Path.Combine (application.StartupPath, "filename.txt")); If (fi.Exists) sw = new StreamWriter (fi.Open (FileMode.Open));

hgweb - Published mercurial repos - links return 404 -

I am able to publish a repository list using hgwebdir.cgi on Tomk. Although there is no link to the published repository work, what should be set to the basal? I set it in where the CG-Bin is right under the folder. URLs do not form correctly (they do not have hgwebdir.cgi) and I do not have any URL re-write setup. Does the URL require some tomcat configuration to work? As far as I know that hgwebdir.cgi should be installed by an HTTP web server like Apache It is not possible to run it under Tomcat: This is not working because of this. Install an Apache Web server (try XMP if you are running Windows) Install a Python interpreter Keep hgwebdir.cgi under the CGI Dior of Apache web server. Configure hgwebdir.cgi so that it can get Python on the path You can find more information on Mercurial Book

python - Gmail SMTP + XOAuth mystery -

I am using Python smtplib and xoauth and I am trying to send an email. I am using the code posted by Google: I'm actually verifying against Gmail and I get this answer. Answers: '235 2.7.0 Accepted \ r \ n ' After sending my XOAuth string as expected () When I receive an email I think I have the following error Attempts to send a composition Answer: '530-5.5.1 Learn more at the authentication required answers:' 530 5.5.1 http://mail.google.com/support/bin/answer.py?topic=125 = 14257f10sm4144741bkl.17 \ r \ n ' ? Any clue The problem here is how you make a piece from SMTP connection my code: smtp_conn = smtplib.SMTP ('smtp.googlemail.com', 587) # smtp_conn.set_debuglevel (true) smtp_conn.ehlo () smtp_conn.starttls () smtp_conn.ehlo () smtp_conn. DoCmd ('Pradhi', 'XOAUTH' + base64.b64encode (xoauth_string)) You create xoauth_string as an example from Google. After this you can use smtp_conn to send your email. ...

c# - XmlDocument.Load(xml) generates No Root Element error from XmlSerializer serialized code -

मेरे पास एक ऐसा वर्ग है: [XmlRoot "MyMessageType"]] सार्वजनिक वर्ग MyMessageType: BaseMessageType {[XmlElement ("MessageId")) // संदेश इंप्रेशन के लिए ... & lt; snip & gt; // अंत गुण } इस वर्ग में एक BizTalk सर्वर को पास करने के लिए XmlDocument उदाहरण बनाने के लिए एक स्थिर विधि है जैसे: सार्वजनिक स्थिर XmlDocument GetMyMessageType (स्ट्रिंग इनपुट 1, स्ट्रिंग इनपुट 2 ...) GetMyMessageType की एक उदाहरण बनाता है MyMessageType, फिर निम्न कोड को कॉल करता है: XmlSerializer आउटसियर = नया एक्सएमएलसेरियलाइजर (उदाहरण। GetType ()); (मेमोरीस्ट्रीम मेम = नया मेमोरीस्ट्रीम ()) का उपयोग करते हुए (एक्सएमएलआरित्र _xWrite = XmlWriter.Create (मेम)) {out.Ser.Serialize (_xWrite, उदाहरण); XmlDocument आउट डॉक = नया XmlDocument (); outDoc.Load (XmlReader.Create (सदस्य)); वापसी आउट डॉक; } जब मैं इस कोड को चलाने का प्रयास करता हूं, मुझे एक XmlException "रूट एलीमेंट लापता है।" जब मैं कोड को आउटपुट को एक परीक्षण फ़ाइल में संशोधित करता हूं, मुझे एक अच...

TFS and MSBuild: how to get latest changeset version -

I am trying to get a version of the latest changes in TFS MSBuild. I have tried many solutions, and have any other ideas referenced without the desired result? Some blog entries / examples 'TF changes / do suggest using the latest / I Msbild', but I did not have documentation to that desired within the property value How can I get an MSBuild xml file? Using suggest other examples that msbuild extension pack, though the documentation is not complete, and there is the 'changesets' property appears to be empty. > See more: & lt; MSBuild.ExtensionPack.Tfs.TeamBuild Caryakshn = "related Chaijessets" Timfudeshn server = url = "$ (TeamFoundationServerUrl)" TeamProject = "$ (Timprojekt)" Bilduarai = "$ (Bilduarai)" Bilddifinishnnam = "$ (Bilddifinishnnam)" & gt ; & Lt; Output ItemName = "Changes" WorkPametor = "Related Etc." /> & Lt; /MSBuild.ExtensionPack.Tfs.TeamBuild...

mysql - What is the proper way to ensure EntityManager connections are closed? -

हमारे डीएओ परत में 1 9 तरीके हैं, प्रत्येक यह कुछ भिन्नता है: सार्वजनिक TicketProp saveTicketProp (TicketProp प्रोप) {EntityManager em = this.emf.createEntityManager (); कोशिश {em.getTransaction ()। शुरू (); प्रोप = (टिकेटप्रॉप) em.merge (prop); em.getTransaction () के लिए प्रतिबद्ध ()।; वापसी सहारा; } अंत में {em.close (); }} अर्थ: प्रत्येक पद्धति में हम अपने लेनदेन को संभालते हैं और अंत में ब्लॉक में इसे बंद करते हैं। हम एक जर्सी ऐप का परीक्षण कर रहे हैं, इसलिए हमारे जेयूनिट परीक्षण जर्सीटीस्ट को बढ़ाते हैं प्रत्येक परीक्षा पद्धति ग्रिज़ली कंटेनर को तत्काल प्रदान करती है, परीक्षण चलाती है, फिर कंटेनर को बंद कर देती है EntityManagerFactory वसंत द्वारा अंतःक्षिप्त है। हम हाइबरनेट पर जेपीए का उपयोग कर रहे हैं। मैं अपने MySQL टेस्ट डीबी से कनेक्शन की निगरानी कर रहा हूं और वे हमेशा उच्च होते हैं अकेले एक परीक्षण MySQL "Max_used_connections" चर को 38 पर चलाता है। मज़े के लिए, मैं गया और सभी em.close () कॉलों पर टिप्पणी की, और परीक्षण अभी भी 38 कनेक्शन का उपयोग करता है...

c# - Why does one class contained in a namespace not see another one contained in the same namespace? -

I am working on an application and I have participated in an unusual error that I have never seen before. I have two classes, which is a UserControl and a form, such an establishment: Namespace NC {Public partial board: UserControl {// stuff}} Namespace NC {partial square Board {// This is * .designer.cs file}} Name space NC {public partial class mainform: form {// normal form content}} namespace NC {partial class mainform {//} * .designer.cs file . A board has been added to it. }} This is included in the same project, so it should not be an issue. However, when I compile, I get it: Type name 'board' is not present in the "NC.NC" type I saw the form designer's file and found it: this.Board1 = new NC.Board (); I remove the name space and it works fine. Every time I use a form editor, it adds it again. I had no issue before this before. Is there any type of setting or something I can change? Do you have a class named NC ? If you do, then ...

Is it better to sprinkle PHP blocks in a document or use PHP DOM with anchors? -

What is the best way to create an HTML document using PHP? I feel that when the page contains dynamically generated content, & lt ;? Php? & Gt; The use of blocks becomes quite dirty. I was thinking of using PHP DOM manipulation library to insert dynamic content into "anchor" in the document. The result will be in the cleaner document layout because all PHP is in one place and the HTML is in each other. What is readability / execution professional / misfortune to use PHL blocks using PHP DOM manipulation? What is acceptable practice of creating HTML documents with PHP? Before long, I believed the "anchor" was the way to go I had a smart templates in those days Use the engine to do yourself a favor, and leave that step you see ... you will soon find you need some basic control structures in your pages. Here is a small loop, a small conditional is there before you know it, you may be implementing your own little programming language to parse those a...

perl - Cleanest way of choosing between two values in Python -

There is a very good method in python datas get : # M to a dict Mkget (a, V) # If M [a] exists, then returns returns, otherwise returns v is it any value Any way For example, in Perl I can do this: Return $ some_var or "some_var does not exist." returning one of the or operators in Python Its operation, if the left expression evaluates incorrect , then the correct is evaluated and returned. Edit : After reading your question again, I saw that I first misunderstood it. Using the local () built-in function, you can use the variable for the get () method, as if you use it to decrypt ( Although it is neither very beautiful nor dragon), to check whether a value exists or not: & gt; & Gt; & Gt; Get local () ('some_var', 'some_var does not exist.') "Some_var does not exist." & Gt; & Gt; & Gt; Some_var = 0> gt; & Gt; & Gt; ('Some_var', 'some_var does not exist.') 0

c - fgetpos/fsetpos and ftell/fseek -

fgetpos / fsetpos और ftell / fseek के बीच अंतर क्या है? Fgetpos और fsetpos क्या अच्छा है? ठीक है, मैनपाप से हम देख सकते हैं कि ftell और fseek उपयोग एक फ़ाइल में ऑफसेट (पदों) का प्रतिनिधित्व करने के लिए लंबे समय तक टाइप करें, और इसलिए ऑफ़सेट के लिए सीमित हो सकता है, जो कि लंबे अंतराल में प्रदर्शित किया जा सकता है (टाइप करें लंबे इंट 2 + 31-1 से बड़ा मूल्य रखने की गारंटी नहीं है, अधिकतम ऑफसेट को 2 गीगाबाइट्स तक सीमित करना) दूसरी ओर, नए फास्टोप्स और फ़्स्ट्रोज फ़ंक्शंस, ऑफसेट्स का प्रतिनिधित्व करने के लिए, एक विशेष टाइप-टोफ, फॉपो_टी, का उपयोग करते हैं। इस टाइपफीफ के पीछे के प्रकार, यदि उचित रूप से चुना गया है, तो मनमाने ढंग से बड़े ऑफसेट का प्रतिनिधित्व कर सकते हैं, इसलिए fgetpos और fsetpos को मनमाने ढंग से बड़ी फ़ाइलों के साथ प्रयोग किया जा सकता है Fgetpos और fsetpos भी multibyte धाराओं के साथ जुड़े राज्य रिकॉर्ड।

c# - Unmapped property in a mapped class (Fluent NHibernate 1.1) -

पृष्ठभूमि तरल NHibernate 1.1 (LINQ को NHibernate का उपयोग कर एक रिपॉजिटरी कार्यान्वयन के साथ) एक asp.net में एमआईसीसी 2 परियोजना का उपयोग एनआईएनआईजी। मेरे पास मैप किए गए वर्ग ( स्टेशन ) एक अन्य मैप किए गए वर्ग ( report ) के संग्रह के साथ है। मैं स्टेशन को एक सुविधा संपत्ति ( अधिकांश संदर्भ रिपोर्ट ) के लिए भी चाहूंगा जो कि रिपोर्ट को उस स्टेशन के साथ देता है सबसे हाल के टाइमस्टैम्प। आंशिक स्कीमा स्टेशन -------- आईडी रिपोर्ट --------- आईडी स्टेशनइंड टाइमस्टैम्प आंशिक कोड सार्वजनिक अमूर्त वर्ग इकाई {सार्वजनिक वर्चुअल इन्ट आईडी (get; निजी सेट; }} सार्वजनिक वर्ग स्टेशन: इकाई {सार्वजनिक वर्चुअल आइएलआईटी & lt; रिपोर्ट & gt; रिपोर्टें {प्राप्त करें; निजी सेट; } सार्वजनिक स्टेशन () {रिपोर्ट = नई सूची & lt; रिपोर्ट & gt; (); }} सार्वजनिक वर्ग की रिपोर्ट: इकाई {सार्वजनिक वर्चुअल स्टेशन स्टेशन {प्राप्त करें; सेट; } सार्वजनिक वर्चुअल दिनांकटाइम टाइमस्टैम्प {get; सेट; }} सार्वजनिक स्टेशनमैप: क्लासमार्क & lt; स्टेशन & gt; {सार्वजनिक स्टेशनमैप () {आ...

Using two emacs (Cocoa emacs and Aquamacs) at the same time -

The reason I have two emacs on Mac is The problem is that Cocoa emacs and Aquamacs are the same ~ Uses .emacs.d, but cocoa is not compatible with emacs and elpa of Aquamacs so that some files can be overwritten and can not be used for both. Is there a way to not use aquamax ~ / .emacs.d for ALPA? I mean, can I replace the default ELPA directory other than ~ / .emacs.d? I use, but it seems that ~ / .emacs directory is used in init.el. (Until file-directory-p "~ / .emacs.d / ALPa") (make-directory "~ / .emacs.d / elpa" t)) I am not familiar with ELPA, but if AquaX and Carbon EMACs are using different copies of the package, Try to change the definition of package-user-dir in any one. In general, I have found that using two different emacses on a machine is a recipe for baldness.

Using a smarty foreach variable within php tags -

मेरे पास निम्न स्मार्टरी कोड है: {foreach = $ extra_fields आइटम = v } {यदि $ v.fieldid eq 5} {php} // कई पाउंड का PHP कोड है तो $ myfieldid = {$ v.fieldid}; // यह गलत है {/ php} {/ if} {/ foreach} मैं अपने कस्टम php कोड के साथ मौजूदा फ़ील्ड आईडी को दूसरे शब्दों में पकड़ने की कोशिश कर रहा हूं {$ v .fieldid}। _ tpl_vars [somevar], लेकिन ऐसा प्रतीत होता है कि वे foreach के साथ काम करते हैं। मुझे पता है कि चतुर में {php} टैग पूरी बुद्धिमान अवधारणा के प्रति बिल्कुल सहज है और पूरी तरह लंगड़ा है, लेकिन मेरे पास मेरे कारण हैं। मदद के लिए धन्यवाद! $ myfieldid = {$ v.fieldid} बदलें करने के लिए $ myfieldid = $ v ['fieldid']; जिस तरह से आप कर रहे हैं बुरा है!

oop - JavaScript: Create global Object from inside Prototype dom loaded event -

I want to create an object that can be accessed worldwide after the DOM loads. My approach is to use Prototype dom: Instant loading and events. Javascript code: document.observe ("dom: loaded", function {var globalpao = new picArrayObject (); warning (globalPAO. PicArray [0]); // Alert [Object HTMLDivElement]}); Var picArrayObject = function () {var myPic1 = document.getElementById ('pic1'); Var myPic2 = document.getElementById ('pic2'); Var myPic3 = document.getElementById ('pic3'); Create function () {this.picArray = [myPic1, myPic2, myPic3]; } Return new build (); } MyTrigger.onClick = function ({warning (globalPAO.picArray [0]); // Alert Nothing} Try it yourself: Three things that I see: You have to assign click handler inside the " dom: loaded " handler, else ID The element with trigger can not yet exist (in fact, this error has been shown in the error console in Safari: Writing Error: The Outcome of Expressi...

How do I properly arrange my Gemfile for Rails 3? -

I am trying to establish a vote-fu in my Rail 3 project. Documentation (for Rail 2) it's my environment. RB installs in the file, as it says. config.gem "peteonrails-vote_fu" ,: lib = & gt; 'Vote_foo',: source = & gt; 'Http://gems.github.com' How can I change it for jamfile for 3? in jammfile: gem 'vote_fu' No more now The standard gem is hosted by the bundler, which is setup to use by default, so you do not need to specify the source. For reference, you can change options in config.gem like this: : change in source => 'example.com' (in your amount in Gemfile): source 'example.com' : Mani 'libkey_mylib' ,: need = & Gt; 'Mylib'

What is "incremental linking"? -

I've seen everyone on Microsoft's MSDN and the web, but I still can not really get it right Its idea. Does this mean that during its execution, the complete program load DLL is installed at different times, as is done once on the launch? Am I completely closed? :) All .obj files created from your source files in the linking include packaging together, along with Along with any .lib files you refer to your output (like .exe or .dll). Without incremental linking, it has to be done every time from scratch. Incremental linking link is your EXE / DLL in a way that makes linking easy to update existing XE / DLL when you make a small change and recompile. So, the incremental link just makes it faster to compile it and link your project. There may be only one runtime effect that can make your exe / dll slightly larger and slower, as mentioned here: Edit: As mentioned by Logan, the incremental link is also incompatible - therefore losing potential performance op...

VB.NET: Assign value to variable inside an IF condition? -

Is there a possibility to specify a variable within a IF condition in VB.NET? Something like this: Dormant customer in the form of a customer = nothing if the customer (customer = GetCustomer (ID)) then the wrong end return thanks Sorry, on the other hand, it will be really confusing, because VB.Net uses the same operator for both assignment and parity. If a = b then 'Wait, is this an assignment or comparison? ! Instead, just set up the variable and compare: Customer as a dormant client = nothing Customer = GetCustomer (ID) if not (Customer) then return false end if

c++ - Remove_if predicate for list -

Why will not this work when I use template function bidding? class A {Int x; Public: A (Int X): X (x) {} ITXX (Constant {Return X;}}; Template & lt; Typename T & gt; Bool lower_than_two (T const & a) {return (a.getX () You type the template type a . Then you l.remove_if (lower_than_two

php - How to save a Item Object in Magento to get it back later -

I want $ this-> _getCart () - & gt; GetItems () and save it so that I can work with items after checkout! After checkout, I want to write item back in the cart. Is anyone an idea to move forward? It's easy: Set the first item: Dana :: getSingleton ('core / session') - & gt; Setdata ('old_items', sort ($ item)); and then retrieve them: unscreyize (dana :: getSingleton ('core / session') - & gt; getData (' Old_items'));

c# - RAM saving when loading many Bitmap objects -

Is there any difference when you load the same image in bitmap from BMP or PNG (or other format)? What is the effect in the original image format bitmap object size in RAM? Is there a way to store bitmap objects to consume less RAM resources? The size is affected by the size of the file only, regardless of the format (but of course, definite As a result of smaller files compared to other files). One way to store bitmaps, if you need to keep them in bitmap, then zip them, alternatively, convert them into another image format, in which compression (Ideally, lossless compression is not JPG). Sorry, it was being understood to store files, not to conserve live memory usage. By using memory to prevent bitmap objects, you will need to leave the item in memory and reload it again when you want to use it again, alternatively, Have no experience, see the new .NET 4 memory mapped files.

Drupal: hiding node titles -

Is there any option in Drupal settings to hide the node title? I usually comment on the code in my theme template, but I was wondering if I can do it with the drip back-end (for all nodes, or some content-types .. ( Even better)). Thank you Actually not the title of the node to some extent radical for Drupal Are there. Removing the theme is the best way to end up front of your site. You also have to change the default page title. You can prevent people from entering a node title with the module. But there are still pages like / admin / content which will show the node title

integer - Java question about autoboxing and object equality / identity -

इस सवाल का पहले से ही एक उत्तर है: 9 जवाब सार्वजनिक कक्षा मुख्य {/ ** * @ परम कमांड लाइन तर्क * / सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] एआरजी) {// TODO कोड आवेदन तर्क यहाँ int a1 = 1000, a2 = 1000; System.out.println (a1 == a2); // = & gt; सही पूर्णांक बी 1 = 1000, बी 2 = 1000; System.out.println (b1 == b2); // = & gt; गलत पूर्णांक c1 = 100, c2 = 100; System.out.println (c1 == c2); // = & gt; सच}} क्यों b1 == b2 गलत और c1 है पढ़ें। जावा का उपयोग करता है इसका मतलब है कि यदि आप पूर्णांक के साथ बनाते हैं, तो पूल के लिए पूर्णांक कोड> पूर्णांक I = 42; और इसका मान -128 और 128 के बीच है, नहीं नया ऑब्जेक्ट बनाया गया है, लेकिन पूल से संबंधित एक ही लौटा दिया गया है। यही कारण है कि c1 वास्तव में समान से c2 । ( मुझे लगता है कि आप जानते हैं कि == संदर्भों की तुलना करता है, नहीं मान, जब वस्तुओं पर लागू होता है )।

wpf - Why would adding an x:Name attribute to a user control cause a compilation error? -

I really need to have some more ideas as to what is needed to create it, at present it's my The wall is driving up. I have a Xaml user control which includes another user control like this: & lt; UserControl x: Class = "MyModule.View.MainView" xmlns = "http://schemas.microsoft.com/enffx/2006/XAML/Presentation" xmlns: x = "http://schemas.microsoft.com/winfx/ 2006 / xaml "xmlns: igDock =" http://infragistics.com/DockManager "xmlns: View =" Clr-namespace: MyModule.View "& gt; & Lt; StackPanel x: name = "panel" & gt; & Lt; Thought: MyHeaderView / & gt; & Lt; IgDock: XamDockManager x: name = "docking manager" /> & Lt; / StackPanel & gt; & Lt; / UserControl & gt; This is within a prism module (hence MyModule name), but otherwise I do not think it is something unusual. Now, as soon as I add a name to the title to see the code, it fails to compile such as ...

php - convert mysqli result to json -

I have a mysqli query that I need to format Jason for mobile application I have managed to create an XML document for query results, although I am looking for some more light things. (See below for my current XML code) Any help or information a lot appreciates! $ mysql = new mysqli (DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or die ('There was a problem connecting to database'); $ Stmt = $ mysql- & gt; Prepare (Select the DISTINCT title, separated by the sections titled 'ASC); $ Stmt- & gt; Executed (); $ Stmt- & gt; Bind_result ($ title); // Create XML format $ doc = new DomDocument ('1.0'); // Make Root Root $ root = $ doc- & gt; Create Element ('xml'); $ Root = $ doc- & gt; Append child ($ root); // Add a node for each line ($ line = $ stmt-> fetch ()): $ occ = $ doc- & gt; Create Element ('Data'); $ Occs = $ root- & gt; Append child ($ occ); $ Child = $ doc- & gt; Create Element ('Section'); $ ...

unicode - downgrade non-ascii symbols to closest 7-bit ASCII equivalent (preferrably Java) -

Is there a simple / light solution to replace at least some non-ASCII symbols for related ASCII analogs? For example, this string abc-åäö.txt to abc-aao.txt A little background: ZIP-tools do not support UTF-8 credentials, so downgrades are required. AFAICR Google replaces any non-ASCII symbol with the '_' character with the "Download attachment as a single zip file" feature. PS: This code can be done in any other language, if it is more or less understood, I will close Java. PPS: My first question is so far, please drop me down from the ground no it's fine? Look at java.text.Normalizer This can help you to convert equivalent characters:

asp.net mvc - jQuery Autocomplete not working with Json data -

There is a whole bunch of tutorials on how to do this, examples and Looks like real easy? Example: The following tasks are quite fine public function searchstuff (string quo) {return content ("test"); } $ ('# MyTextBox'). Autocomplete ("MyController / FindStuff", {parse: function (data) {warning ('parsing');}}); If I change it in the following, then nothing happens at all. Public Jason Oscald Fastf (String Q) {Jason (new {name = "test"}); } $ ('# MyTextBox'). Autocomplete ("MyController / FindStuff", {dataType: 'json', // I have also tried this line with the parse comment: function (data) {warning ('parsing');}}); It seems that parsing calls can never be hit, that is, I'm assuming that the data load is flowing in some way or thinks that there is no data. any idea? Thank you. P. s. This is the JaegerFeafer plugin. Ensure that you are returning an array and you grant permissio...

Adding authentication to a Silverlight 4 RIA services application (not the business template) -

मैंने व्यावसायिक अनुप्रयोग टेम्पलेट के बजाय नेविगेशन अनुप्रयोग टेम्पलेट के साथ एक सिल्वरलाइट 4 आरआईए सेवा आवेदन शुरू किया। अब मैं उस अनुप्रयोग (प्रमाणीकृत उपयोगकर्ताओं से एक पेज को सुरक्षित रखने के लिए) के लिए प्रमाणीकरण जोड़ना चाहता हूं मैंने प्रोजेक्ट के लिए एक प्रमाणीकरण सेवा जोड़ दी है, लेकिन मुझे यकीन नहीं है कि ये कदम अब क्या हैं यह वास्तव में काम कर रहा है और व्यावसायिक अनुप्रयोग टेम्पलेट को "अपग्रेड" करने का कोई तरीका नहीं है। मैं कुछ आवश्यक सेवा विधियों [RequiresAuthentication] विशेषता को जोड़ सकता हूं, लेकिन मैं नहीं समझ सकता उपयोगकर्ता को लॉग इन करने या किसी विशिष्ट पेज को खोलने से रोकने के लिए कैसे अनुमति दें। क्या इस तरह के "अपग्रेड" के लिए कोई मार्गदर्शन है? आपको फॉर्म प्रमाणन को सक्षम करने के लिए होस्टिंग एएसपी.Net ऐप को कॉन्फ़िगर करने की जरूरत है, जिसे संभवत: प्रमाणीकरण प्रदाता के विन्यास की आवश्यकता होगी। यह प्रयास करें संपादित करें: doh क्षणों को बहुत देर हो चुकी है;)

Pylons can't see my config dictionary -

Update: Understand this: I was loading config options in config.ini, then config.ini is running. DUH! I am installing an existing project in Pilanes and I am trying to tell about my local configuration options. Pastor makeconfig My_app production.ini has run and edited the production.ini file in the options which I call the solr.url I want to do this with entry, however, if I again serve pster - reload config.ini The file is found: file "/lib/solrhelp.py", in line 12, the solr_connection solr_url = config ['solr.url'] file "/lib/python2.6/site- Packages / Paste-1.7.4-py2.6.egg / Paste / registry.py ", line 146, __getitem__ in return self._current_obj () [key] KeyError: 'solr.url' The file is solrhelp.py: It looks like pylons 'can not see configured' Solr Dictionary with entry for url Open the python and do & gt; & Gt; & Gt; Import config from pylons & gt; & Gt; & Gt; Print config {...

iPhone web App Server connection -

I am developing an iPhone app that requires connections from the server to bring huge data at regular intervals. Better socket connection or use of libXML thanks Library data transfer is not a library And socket does not have to handle XML, so if you are trying to download and process large XML documents, then I would say that you need both, one or the other is not needed. In addition, I move the "huge" data to be very vigilant set directly to an iPhone at the very least, I use the compression and transfer the data to the user's 3G link Before I make some warnings.

javascript - Are there any widget sets (and application frameworks) that build on jquery? -

It is clear that jquery standard has become "low level" JavaScript library. We also have extensions and dojos that provide extension frames and widgets. "post-text" itemprop = "Text" > With a powerful theme framework, there is a host of widgets available to use as most widgets.

Google Map with Android Application -

I want to know about the Google Maps configuration process in an Android application. To show maps, you must download the Google Add ons API. Then create a project in Eclipse on Android (hopefully using it) and select the Google Addons API 1.x / 2.x version that you have downloaded. You need to get the API key using your debug. Keystore file (this is present in the folders of your installation). The first step is to get a local key (to say) using that file. Then you need to get the online IOPi key of that locale. You can check Google for it. (I do not remember local.). Android with Android Include key in XML file: mapsAPIKey = "received key". Increase map activity and overdraft displayed () This should give you an original idea ... I hope Hope it helps ... :)

php - two forms in smarty template -

I have a feedback form in a website and it is included through a tpl file from a page. I am trying to include another tpl in which we have contact form. When I am involved, contact us. Through the TLL file, the previous form (feedback) is also not visible. I tried to get different form names, there are different names in the form field. The way both forms work is the same. I am sure if my guess is correct or there may be some other jquery conflict. Please please advise me = "lesson "> Yes posting code is helpful. To include files in clever you do {include file = filename.tpl}

configuration files - Purpose of the Tomcat conf folder -

This is in fact my own confirmation. What is the & lt; CATALINA_HOME & gt; / Config for the Config folder in the TOKTACK, instead of configuring application-specific settings? I think if I wanted that application-specific config files can be placed in this folder but this is not a good idea, partly because it's a wrong location and they will not appear in the class , Thus the meaning is that the file getResourceAsStream () . will not be accessible. Is this a good summary of what the folder is and what's not for? OK, I'm pretty sure that's right: This is the main configuration file for the configuration files and related DTDs server.xml containers here is the most important file.

php - Repetetive data in WordPress posts -

I am creating a tutorial site for music producers. On every tutorial (post, which is) there will be some repetitive and recurring information, so I was thinking that after being able to present it in post, best practice to enter this data when creating a post. What is it? This is an example where the data is bold and labeled in plain: Requirements: Steinberg Qbase, Protoples (an array) Estimated time: 1 hour (string) project file: file 1, file 2 (files) ) Any thoughts? Good plug-ins or so? I appreciate all the tips! How about the functionality of custom areas?

How to access session custom action data (properties) during install and uninstall in Wix? -

Can you please tell me what is wrong with the following code? I am able to access custom action data during installs and I add my value custom action collection session. However, during the uninstallation, I added the price pairs to the collection. Public category custom action {// This action is only called app install [custom action] during the public stable operation. CreateToolbar CreateToolbar (session session) {// This works fine; wix scripts are sent appropriately from // / Expected Value string toolbar name = session ["VSTOCustomAction_ToolbarName"]; // Save the value for the Uninstaller session. CustomActionData.Add ("VSTOCustomAction_ToolbarName", Toolbar name); ...} // This action is only called during the application uninstall [custom action] Public Static Action Routal DotToolbar (session session) {// Get the toolbar name and remove it // Why does the following call return empty? String toolbarname = session. Custom section data ["VSTOCustom...

C# first time I use GetRequestStream() it takes 20 seconds -

I use C #. The first time I use WebRequest GetRequestStream () in my code, after 20 seconds it takes less than 1 second. Below is my code line "this.requestStream = httpRequest.GetRequestStream ()" is causing the delay. StringBinder PostData = New StringBuilder (100); PostData.Append ("param ="); PostData.Append ("test"); Byte [] Data array = encoding. UTF8.GetBytes (postData.ToString ()); This.httpRequest = (HttpWebRequest) WebRequest.Create ("http://myurl.com"); HttpRequest.method = "POST"; HttpRequest.ContentType = "application / x-www-form-urlencoded"; HttpRequest.ContentLength = dataArray.Length; This.requestStream = httpRequest.GetRequestStream (); (Request array) stream.Write (data array, 0, data array) using request; This.webResponse = (HttpWebResponse) httpRequest.GetResponse (); Stream response stream = webResponse.GetResponseStream (); StreamerRedderRedder = New System.io.StreamRadder (Reactions Stream, E...

android - onActivityResult() called prematurely -

I activist activity Activity (Priority parent family) as follows: Start the I: @ override protected void activity results (Int egzekododa, Inc. results, code, intent data) {super. Enaektiviti result (anurodhakoda, parinamakoda, data); If (requestcode == 1458) loadInfo (); } Void show settings Dialog () {startActivityForResult (new Intent (). SetClass (This, MyConfigure.class), 1458); } MyConfigure class in a set (negative) call actually, MyConfigure class onakreta addition to any code, where it addPreferencesFromResource using preferences loads. MyConfigure activity immediately after the play, now on to 1458 ActivityResult with the request code before time is called. 1.6 and 2.1 in accordance with the device have also been tested with 2.1. What priority is buried somewhere in the reference () is to set up a call? It may be premature to call or how to explain? Launch Mode to singleTop in the changing has been scheduled: & lt; Activity Android: name = ". Ma...

vbscript - How to programmatically edit all hyperlinks in a Word document? -

Is there a macro, VBA code or VBSSP that I can write to edit all hyperlink URLs in my Word document Am I Either Word 97-2003 or DOS format. Dual link in the form of a slow dock, I loop through all open documents. For each document loop in the application form through each hyperlink. For I = 1 doc.Hyperlinks.Count 'if hyperlink matches if LCAC (Doc. hyperlinks (i) .advertiser) = "http://www.yahoo.com/" then' Change Link Address' Doc .Hyperlinks (i) .address = "http://www.google.com/" 'If desired, Change the text displayed in the link Doctor Hyperlinks (i) .extToDisplay = "Change in Google" End if Next Next is All here .

visual studio using old xap -

I'm debugging my Silverlight application This app reads an XML file to draw some stuff. Every time I change my XML file, refreshing the page does not show new results. I have to go back to Visual Studio and press Ctrl + F5. I have added a random query string to my XAP URL ? Lt;% = good.NewGuide () .tostring ()%> /> But even after refresh the page still does not work. Will I get the same problem when I launch the website or is it just a visual studio?

database - Generating a XSD file from Powerdesigner -

Is the PowerDesigner an Easy Way to Create an Xsd File? It generates an XSM file, but it is not the same specification. If there was an easy way to do this, then it would reduce my life in the form of heaven: p. Will this be the contents of the XSD file? A DTD Definition? In that case, it is managed by a Power Designer as a separate XSM "Language", so you have to change the language (from XML schema definition to document type definition) to generate a different schema.

jQuery: div doesn't appear until second click? I want it on the first. =\ -

First click: Blank Flatimaze Developer Click Next and later: Works. function fltimases (messages) {var box = $ j (". Flatimams") if (box.length == 0) {$ j (' Body '). Attached (" "); } Box.html (Message); // center this box.css ("left", ($ j (window) .wide () - box.width ()) / 2 + $ j (window) .scrollLeft () + "px"); Box.fadeIn ('slow'); SetTimeout (function () {$ J ('. Floatymessage') fadeOut ('slow');}}, 3500); } link: & lt; CSS for floatmasego: Background: black; white color; text align: center; filter: alpha (opacity = 75); -moz-ambiguity: 0.75; -khtml-opacity: 0.75; ambiguity: 0.75; box-shadow: 10px 10px 5px # 000; boundary: 1px solid black; border-bottom-left-radius: 5px 5px; border- Bottom-Radius: 5px 5px; Border- Top-left-radius: 5px 5px; border-top right-radius: 5px 5px; line-height: 50px; z-index: 10000; do not display anything;) Your argument in the box was unavailable, if ...

c# - Getting All Of The Points In An Existing Curve? -

I am using the zodgraph and want to know how I can find a complete curve versus digit. foreach (Various curves in graphpane) {foreach (point point in curve. ???) {Console.WriteLine (Point.X + "+ Point.Y); // How can I do this? (Based on the docs), try to do something like this: foreach (var curve in graphpen.) {For (Int i = 0; i & lt; curve.Points.Count; i ++) {var pt = curve.points [i]; console.light line (PTX + "+ + PTY);}}

html - how to expand content for a TD to cover 100% of its height (IE) -

Image
I have a table with a TR and two TDS, one of the TD has more content (content with mine Meaning: other sub-tables), this is the result of the following: TD shrinks with a little bit of material (its content is not expanded, and it is only in case of IE) Firefox and Google Chrome are okay, to fill 100% of the height of both FF and Chrome TD Small TDs extend the content, my question is how to extend the content of small TD to fill 100% of its height? ps I tried height: 100%; On small TD but did not work ... and it is a dynamic code, it means that according to some parameters, both TDs are variable with their content ... See both screenshots: Thanks alot from the very first time!

asp.net - C# sometimes currency format does not work -

It looks like sometimes the currency format does not work: string amount = "11123.45"; Literal2.Text = string.Format ("{0: c}", zodiac); This code will never work - because the amount is a string, there is no number. The currency format is only applicable to number . For example: decimal amount = 11123.45m; Console.lightline (string format ("{0: c}", volume); (Note that using dual for currencies is almost always a bad The idea is, as it can not represent double equal decimal numbers, there is a more appropriate type of decimal financial data.)

scala - program hangs when using multiple futures with multiple remote actors -

I start two remote actors on a host who fixes whatever gets sent to them. Then I will make another actor who will send some actors (using !!) to keep a list of future items for both actors and these artists. Then I am getting a loop on this list for every future result. The problem is that most futures do not return at all times, even thought that the actor claims he has sent the answer. This problem is randomly, sometimes it gets through the entire list, but most of the time it gets stuck at any time and hangs indefinitely. Here is some code that creates a problem on my machine: Sync.ca: Import Slaël.actors. Actors.actor._size slaella.actors.import import scale.actors.remat RemoteActure Import Scala Actors.remote.RemoteActor._Object Sync {ARG: array [string]): unit = {new remote sync ("node 0-0-0", 43001). Start () "New" ("node 0 3", 43001) start ()}} class RemoteSync (name: string, port: IT) extends actor {def act () {println (name + "sta...

Cocos2d icons for universal app -

How can Icon an icon for the iPhone and iPad in cocos2d for the universal app? If you insert an icon file into your resource folder in the encode and name it as icon.png It will be an icon that will appear for the user to select their application on the iPad / iPod / iPad. This happens if you put another file in the resource folder and put its name as default, then it will be shown that your app is being loaded. Note: If you are working with a template, then probably these names should have files with their names. Simply remove them from the resource folder in the xodod and add new ones. To add files to your project, drag them into the resource folder in the Xodeod and select the check box: "Copy things to the folder of the destination group (if necessary)", and also, make sure that the target section is only Add to the check box Your application name is checked and the radio button has been selected "Create an inverted group for any added folders". Thi...

Fast nbody algorithms / solutions (with opengl/c++/??) -

I am working on a (C ++, OpenGlip) project where I need a lot of particles If I am right I am called a problem of ninety. Does anyone know which solutions are there for such algorithms? I know that burning kite algorithm and maybe I can peep around OpenCL, although I'm not just thinking if you use other solutions the code I will make it very much: for (int i = 0; i & lt; num_particles; ++ i) {for (int j = i + 1, j and lt; num_particles ; ++ j) dist = distance (particle [i], particle [j]); If the (dist> boundary) {....}}} kind regards, Pollux Maximum objects (particles in this case) are ideal for finding maximum distance. If the tree looks balanced, then O (log n) .

objective c - getRandomColor but avoid dark colors: Help my algorithm -

I'm trying to get a random color. I use it is brute force, but this method seems much more strenuous (although delivery is pretty too): - (UIColor *) getRandomColor {// Goals: reject color too Deep Boats are Total = 3; Float A = ArS 4 Random (%) 256 / 256.0; Total - = A; Float two = arc4random ()% 256 / 256.0; Total - = two; Float three = total; // UIColor will NSMutableArray out of range Cutting nums * threeFloats = [[[NSMutableArray alloc] initWithObjects: [NSNumber numberWithFloat: a], [NSNumber numberWithFloat: two], [NSNumber numberWithFloat: three], minus] autorelease]; Nsnm * red, * green, * blue; Red = [three flight objects atindex: ARC 4 RRM (%) [Count three floats]]; [Three floats removed objects: red]; Green = [three flight objects atindex: ARC 4 random ()% [three floats count]]; [Three flights removed objects: green]; Blue = [three flights final object]; Return [UIColor colorWithRed: [Red floatValue] beat [Green Float value] Blue: [Blue float value] alpha: 1]; } ...

oop - When can you call yourself PHP professional? -

What makes you a professional PHP programmer? When you know OOP, smartly, framework, I think it's okay? If not, what else? If you earn money, you are a professional if you are "trained" for it (BS CS anyone?) You are a professional

python - I'm using pyAMF in my app, but I want to set smart service like explained here: -

सामान्य अनुप्रयोग में मैं सेवा सेट करता हूं services = {'users.login': लॉगिन, 'परीक्षा': राउटर} लेकिन मैं ऐसा करना चाहूंगा: सेवाओं = ['users.login', 'test' ] और हर अनुरोध रूटर फ़ंक्शन पर जाता है। यह 2 पैरामीटर लेता है: सेवा नाम (इस मामले में "users.login" या "test" हो सकता है) और इनपुट (जो ऑब्जेक्ट को फ्लेक्स द्वारा भेजे गए ऑब्जेक्ट है) तो अगर फ़्लेक्स से कमांड (सर्विस) "प्रयोक्ता लॉग इन करें"। मैं पैरामीटर के साथ राउटर को चलाने के लिए चाहूंगा और फिर यह फ़ंक्शन लॉगिन को कमांड.युजर्स.login पैकेज में खुल जाएगा। मुझे यह कैसे करना है? धन्यवाद। अगर मैं यह सही करने के लिए आपके प्रश्न को सही ढंग से समझता हूं, तो आपको इसकी आवश्यकता होगी गेटवे क्लास पर getServiceRequest ओवरराइड करने के लिए जो आप उपयोग कर रहे हैं: pyamf.remoting.gateway.django आयात से DjangoGateway pyamf.remoting.gateway आयात करें UnknownServiceError वर्ग MyGateway ( DjangoGateway): def __init __ (स्वयं, रूटर_फंक्, ** kwargs): self.router = rou...

Result of bitwise operator in C++ -

Checking some compiler (comma, g ++) has confirmed that some "integer types" are the result of the bitwise operator int: zero foo (unsigned char); Zero foo (signed short); Unsigned four A, B; Fu (A | B); I could expect to be an unsigned four by the type of "a | b" because both operands are unsigned char, but the compiler says that the result is an int, and call To foo () is unclear why the language has been designed so that the result is an integer, or is this implementation dependent? Thank you, This is actually a standard C ++ behavior (ISO / IEC 14882): 5.13 / 1 bit wise inclusive or operator Normal arithmetic conversion is performed; The result is that its operators have a bitwise inclusive or function. The operator only applies to integral or calculation operands. 5/9 Common Arithmetic Conversions Many binary operators hope that generate arithmetic or computation type, The objective is to cultivate a common type, which is also the type...

apache - .htaccess question - URL-rewriting -

मेरे पास .htaccess में URL-rewriting के साथ एक समस्या है। यहाँ .htaccess फाइल है:! RewriteBase / समुदाय / RewriteCond% {RewriteEngine चालू REQUEST_FILENAME} -f RewriteCond% {REQUEST_FILENAME} -d RewriteRule ^ दृश्य-सभी परिणाम $ मंचों / सूचकांक। php? दृश्य = दृश्य-सभी परिणाम [आर = 302] RewriteRule ^ दृश्य-सभी परिणाम / $ मंचों / index.php? दृश्य = दृश्य-सभी परिणाम [आर = 302] मैं की तरह "? / समुदाय / दृश्य-सभी परिणाम यू = 2 " को " समुदाय / फ़ोरम / index.php दृश्य = दृश्य-सभी परिणाम & amp यूआरएल पुनर्लेखन के लिए की जरूरत है; यू = 2 "। लेकिन उपरोक्त नियम के अनुसार मुझे " समुदाय / मंच / सूचकांक। Php? दृश्य = दृश्य-सभी-परिणाम " मिलेगा। मैंने RewriteRule को RewriteRule ^ दृश्य-सभी परिणाम $ मंचों / index.php दृश्य = दृश्य-सभी परिणाम & amp? (*।);? $ 1 [आर = 302] लेकिन यह ठीक से काम नहीं करता है। यह अभी भी " समुदाय / मंच / index.php? दृश्य = दृश्य-सभी-परिणाम " के लिए यूआरएल को पुनः लिखता है। जब मैं नियम बदलता हूं (* के बजाय ...

asp classic - Converting French Characters to ASCII on form submit -

Hi there I was wondering if anyone could help with this. I am submitting values ​​for an Access database using ASP Classic and need to convert French letters to ASCII. I have done this before with a form for email script. Here is the code that I used with the first line which is the code that writes a value for the database field. Any help would be great. [code] '-------------------------------------- -------------------------------------- 'Checks form fields and headings of French characters And changes them with 'ASCII equivalent' -------------------------------------- ----------- ------------------------- rsAddComments.Fields ("Customer") = Request.form (" Change the body ("body", "Á", chr (206), change (body, "Á", chr (1) 9) 3) body = Change (body, "a", chr)) [/ code] Just set the ISO Latin 1 character Try Page: & meta http-equiv = "content-type" content = "text / html; Charset...

Regex Enforcing match -

ठीक है मुझे यह regex मिला: ^ [\ w \ s] + = [ a href = 'google' a href = " Google " और भी a href = 'google' मैं अपनी बोली से मिलान करने के लिए कैसे regex को लागू कर सकता हूं? अगर पहले उद्धरण एक बोली है , मैं आखिरी बोली कैसे बना सकता हूं, एक भी बोली एक दोहरे उद्धरण नहीं है के बारे में पढ़ें। ^ [\ w \ s] + = (["']) \ w +? \ 1 ध्यान दें कि आप एक डाल देना चाहते हैं? दूसरा + के बाद या फिर वह लालची हो जाएगा हालांकि, सामान्य तौर पर यह HTML को पार्स करने का सही तरीका नहीं है उपयोग करें।

how to sort file in ruby -

This is my file content. Receipt = Power Cobre Pabels = Buy Quentos Pargrar ytd .label = Purchase YTD Verification. Error.maxvalue = value is too large, maximum value {0} I want to sort this content in alphabetical order ... How can I do this? ? Update: This code will sort my file. new_array = File.readlines ("# {$ base_properties}"). Sort file.open ("# {$ Base_properties}", "w") | File | New_array.each {| N | | File.puts (n)} end Is there a better way to sort the file? obvious simplification: new_array = File.readlines ("# {$ Base_properties} "). Sort file. Open ("# {$ base_properties}", "w"). File | File.puts new_array end I just define a method like this, I'm doing the opposite of the file. Read . It is extremely reusable, and should actually be a part of the standard: def file.write! (Path, content) File.open (path, "w") {| Fh | Fh.write content} end and then trimmed: fi...

java - What GUI toolkit is Cisco's ASDM written in? -

I do a lot like ASDM on ASA 5505 Do anyone know that GUI toolkit has developed Cisco have used? It seems that they are using a lot of JIDE components, especially, and.

python - Using a remote stylesheet that includes other stylesheets with relative paths -

मैं lxml.etree.XSLT का उपयोग कर किसी DocBook दस्तावेज़ पर एक XSL ट्रांसफ़ॉर्म करना चाहता हूं । यद्यपि यह दस्तावेज बताता है कि etree.XSLT () पहले xslt_input के पहले पैरामीटर लेता है, तो मुझे उस पर कोई डॉक्स नहीं मिल सकता है यह पैरामीटर होना चाहिए इसे पढ़ने वाली फाइल को पास करने के लिए खुला है; संपादित करें एक विवेक जांच के बाद, मुझे एहसास हुआ कि etree.XSLT एक पार्स किया जाता है etree ._ElementTree । इसलिए । । । हो सकता है कि किसी तत्व के पेड़ को ऐसे तरीके से पार्स करने का एक तरीका है जो उसे सापेक्ष पथों के मानचित्रण के लिए उपयोग करने का पथ प्रदान करता है? । । । जांच कर रहा है। यदि एक्सएमएल फाइल जो इसे पारित की जाती है तो दूसरे को शामिल किया गया है, इसमें शामिल बयान शामिल हैं, वर्तमान कार्य निर्देशिका से लिया जाता है। मैं इस वर्ग का उपयोग करना चाहता हूं किसी DocBook दस्तावेज़ को परिणत करें, और दूरस्थ रूप से डॉकबुक एक्सएसएल तक पहुंचने में सक्षम होना पसंद करेंगे। डॉकबुक एक्सएसएल बहुत जटिल है, और कई अन्य फाइलें भी शामिल हैं क्या कोई तरीका है कि मैं इन फ़ाइलों को किसी...

javascript - Am I missing something? My values don't get stored into my array -

मेरे पास यह var चयनित = [] $ ('# SelectBoxContainer .DDLs: चयनित ')। प्रत्येक (फ़ंक्शन (i, चयनित) {चेतावनी ($ (चयनित) .val ()); चयनित [i] = $ (चयनित) .val ();}); मेरा सतर्क मुझे बता रहा है कि यह इस पाश के माध्यम से जा रहा है और चयन बॉक्स मानों को प्राप्त कर रहा है। फिर भी एक बार सब कुछ कहा जाता है और मेरे "चयनित" सरणी में कुछ भी नहीं है। आपका कॉलबैक एक स्थानीय कोड नामित चयनित , जो बाहरी क्षेत्र में चयनित चर को छुपाता है। चयनित में चयनित [i] = है चयनित से फ़ंक्शन (i, चयनित) , नहीं चयनित से var चयनित । इसके लिए दो चर में से एक का नाम बदलें।

sql - Put back deleted row from another db while preserving id field -

I have a SQL 2005 database. I have removed the row from one of them and want to get it back from another database which was a backup of the line. How does this ID target while preserving its ID primary key field? Can you give a TSQL to do this, is there a backup called "TbrPdata" and "TBR0910"? Malcolm Use: SET IDENTITY_INSERT tbrPdata.dbo.TABLE in tbrPdata.dbo.TABLE (col1, col2, col3, ...), select t.col1, t.col2, t Col3, ... to tbr0910.dbo.TABLE T WHERE T.id =? Go SET IDENTITY_INSERT tbrPdata.dbo.TABLE OFF

c# - How to use Regex to split data together with extracting pattern value -

मुझे इस तरह टेक्स्ट फाइल को संसाधित करना होगा: 2010-04-02 .. ... ... 2010-05-01 ... ... ... स्प्लिट फ़ंक्शन का उपयोग करके मूल्य प्राप्त करना संभव है: Regex.Split (text, @ "\ d {4} - \ d {2} - \ d {2}") क्या दिनांक और संबंधित टेक्स्ट प्राप्त करने का कोई तरीका है तिथि के नीचे धन्यवाद टेक्स्ट "itemprop =" text "> के अनुसार, जिस स्ट्रिंग को आप () में बांट रहे हैं (इसे एक कैप्चर समूह बनाकर) लपेटकर इन कैप्चर को सरणी में शामिल किया जाएगा। Regex.Split (पाठ, @ "(\ d {4} - \ d {2} - \ d {2})")