Posts

Showing posts from April, 2014

sql - How would I do this JOIN in Rails? -

यहाँ मेरा एसक्यूएल कथन है: SELECT * से 'message_users' LEFT JOIN 'messages` पर message_users.message_id = messages.id WHERE (message_users.user_id = 1 और message_users.hidden = 0) और message_users.last_read_at & gt; Messages.updated_at ORDER BY messages.updated_at DESC LIMIT 0, 20 मैं उचित रेल के साथ उस बंद कैसे खींचूँगा / शामिल / जो कुछ भी हो? आप आम तौर पर कई तालिकाओं से सभी डेटा को रेल में एक मॉडल में लोड नहीं करते हैं। शामिल हो को शामिल करें से बदलकर अधिक सामान्य है, जो संबंधित मॉडल को प्रीलोड करेगा ताकि आप message.message_users को कॉल करते समय कैश को दबाएंगे। संदेश और संदेश_युजर्स के बीच कोई स्तंभ नाम संघर्ष नहीं है, किसी भी दर पर, यह आपके एसक्यूएल क्या कर रहा था डुप्लिकेट चाहिए। यदि आप क्वेरी के बाद messages_users से डेटा की आवश्यकता नहीं है, आप चयन करें खंड निकाल सकते हैं। Message.find (: सभी,: joins =>: Message_users,: select => "message_users। *, संदेश। *",: Conditions => ['message_users.user_id =? और messag

MODx removing content resource field -

How do I hide the content processing field from non-administrator users? So you want a user to change the document fields such as title, alias etc. Yes, but not content? You can not remove individual fields from the admin user (as far as I know). You can either lock the whole page / resource or you can put content that you want to lock in the template for that document and lock the template only to the admin user who will get the same effect . Be sure that you do not have a reference to [+ content +] in the template, and even if the user enters the document contents, then this page will not affect.

Unix C++ simple server question: sending data back to browser -

I have written in a simple Unix server C ++ which just waits for an incoming connection, and then when a connection If installed, sends the requested data to display in the customer's browser. I have everything except work to send the data to the customer. I started the server and set the port number (for this example I have 8181 I will use it). The client opens the browser and connects to my server and tries to retrieve test.txt to see. The server accepts incoming connections. Checks to see whether the file exists or not. If the file exists, then it sends the file to the browser. My problem is that I am not sure how the data can be sent back to the browser. I am trying to use Unix system calls to accomplish this, because I believe everyone needs to get back the data. Now what I am doing, put the file in a four array buffer and then it is fed into writing (socket id, buffer, strollon (buffer)). When I check it, the server gets the file correctly and reads

.net - jquery ajax error cannot find url outside of debug mode -

I used some jquery.ajax method to connect to a .NET web service that I received some code two weeks ago Has been doing. Here the code snippet is causing me trouble ... if (MSCour.AppSettings.OFFLINE! == 'TRUE') {$ .ajax ({url: url, data: json, Type: "Post", Content Type: "Application / Jason", Timeout: 10000, Datatype: "Jason", // No "Jason" We will parse the success: Function {race} {if (! Callback) {return; } / * // *** Use the JSN Library so that we can fix MS AJX dates * / var results = "" if (RAS! == "") {try {result = $ .valvalJSON (res); } (E) {Results = {}; bare = true;}} / * // *** The bare message is the result * / If (bare) {callback (result); return;} / * // *** top-tier object node in wrapped message / *** strip it off * / for (different attributes in result) {callback ( Result (properties); break;}}, error: function (xhr, position, error) {if (position === 'parsererror') {} else {return err

c# - Tips for creating an admin login for a client's website -

I am making a website for a real estate firm. Looks great, but the last factor is to create an admin login for my clients so that they add and remove real estate properties, and that they want to sell. I am planning to store my entries in the database file. Entries will be displayed on a public page on a public page, which will be bound to DB. How can I log in to an ASP.NET 3.5 website? I do not know PHP yet [and] I have read some MSDN content on making roles. Members and it seems that I just want an administrator login for my client. "Itemprop =" text "> If you create a subscription provider, you can use standard login controls that are included in the toolbox! Check it out: And this: Then, this Check: How to use login controls.

java - Element not recognized on page until a manual click on the page occurs -

I am looking for an element on a web page using my xpath. Xpath is correct and the element can be found only if I manually click on the page for the first time if I do not do this before the statement, then it will not get the element. I have tried many attempts to focus on the page: selenium.selectWindow (null); Selenium.firivant (xpath, "focus"); Selenium.Click (element on page); Selenium.mouseDown (); Selenium.mouseUp (); After completing these tasks, the statement will still not be able to find the element, but if I maximize the page manually and click anywhere on the page, then say the statement The element is found. Can anyone help me with this? I am using this element to find: selenium.isElementPresent ("// div [@ class = 'sample_class']"); Thanks! Instead of using XPath, the CSS selector for that item. Use selenium.isElementPresent ("css = div.sample_class"); as your selector. Saucelabs explained this very well o

Does anyone know how to generate on the fly page that contain iframe of specific site That his address appears after the main site address? -

Does anyone know how to generate on the fly page that has a special site's iframe, which addresses its main site address Appears after? sample = "post-text" itemprop = "text"> Check it: You can replace src = "http: //url.to/page " with src =" & lt;? Echo $ _GET ['link']? & Gt;; "

Creating a generator expression from a list in python -

What's the best way to do the following in Python: for items [x X.attr for some_list x]: do_something_with (item) This may be a short question, but the understanding of the list is not needed to create a new list, for which Not required and take the memory? Would not it be better if we could understand an Iterator-like list? Yes (both of your questions) By using brackets instead of brackets, you can say "generator expression" for that sequence, which is proposed by you. It allows you to retain the sequence without assigning a list to keep all the elements together. in item (x for x for some in x): do_something_with (item) The details of the generator expression are documented inside.

iphone - Nesting UIScrollView inside UIScrollView Cocoa Touch -

They "brush" the topic in this thread, but it does not really answer a lot: < P> I work together to present a group of UIScrollView and a UIPageControl sequences. (Standard "home screen" swipe style due to lack of better words) In all these ideas inside the scrollview, there is a thin menu in the bottom part, which can be swipe side by side. If anyone remembers the previous Facebook app, it was also a menu that could be swiped horizontally, however, it was not included in any other scroll-wave, but this idea is similar. The outer scroll wev will scroll through the entire scene, which will include the view with the internal scroll wheel, but the inner scrollview will only replace a menu within the scene. I had already given proof of concept testing about it, is that what happens, that the representative methods are called in both scroll weights, even if it does not have to be swift on the screen, and the most More scrollwhe apps will crash, but not fro

How to check a service account is built-in network service account? -

I have to check that the service account (xxx \ yyy $) has a built-in network service account. In a way, I am thinking that the account name is compared with "domainName \ hostname $"; if it is equal then there is a network service account; not otherwise. I believe that some simple APIs (C / C ++) can help me anyone know this? You have to compare the actual SID. View in Microsoft, where you will find: SID: S-1-5-20 Name: NT Authority P> Description: Network Service

c++ cli - C++/CLI : How do I declare abstract (in C#) class and method in C++/CLI? -

C ++ / CLI में निम्न C # कोड के बराबर क्या है? सार्वजनिक सार कक्षा कुछ क्लास {सार्वजनिक सार स्ट्रिंग SomeMethod (); } सही सिंटैक्स पर पहुंचने के लिए बस थोड़ा सा खोजशब्दों को मिलाएं। अमूर्त आगे सी में सी जाता है, लेकिन सी + + / सीएलआई के अंत में ओवरराइड कीवर्ड के समान, आज भी C + + 11 अनुरूप कंपलर द्वारा मान्यता प्राप्त है जो कि कार्य घोषणा के अंत पर इसकी अपेक्षा करता है जैसा कि = 0 एक फ़ंक्शन सार को चिह्नित करने के लिए पारंपरिक C ++ में करता है: सार्वजनिक रेफ़ क्लास SomeClass सार {सार्वजनिक: वर्चुअल स्ट्रिंग ^ SomeMethod () सार; };

PHP loop only going around 9 times instead of ~45? -

यह मेरा कोड है: के लिए ($ i = 0; $ i & lt; $ I ++) {if ($ badLinkHolder [$ i] [0]! = "") {गूंजती "& lt; tr & gt; {$ badLinkHolder [$ i] [0]} & lt; / टीडी & gt; & lt; टीडी & gt; {$ badLinkHolder [$ i] [1]} & lt; / टीडी & gt; & lt; / टीआर & gt; "; }} अब, $ badLinkHolder में लगभग 45 प्रविष्टियां हैं जो मुझे print_r () का उपयोग करके पुष्टि कर सकती हैं। किसी कारण से, यह लूप केवल 9 गुना के आसपास रहा है और मैं अपने सभी डेटा को सरणी से नहीं निकाल सकता। इस पर कोई मदद? मैं पूरी तरह से चकित हूँ। सबसे पहले, आप कैसे जानते हैं कि यह केवल 9 बार जा रहा है? मेरा अनुमान है कि आपने अपनी तालिका में केवल 9 पंक्तियों को देखा है, इस प्रकार यह सोचते हुए कि आपका लूप केवल 9 बार जाता है आपके पास एक अगर कथन है जो बताता है कि यदि ($ badLinkHolder [$ i] [0]! = "") , तब ही आप पंक्ति प्रिंट करेंगे। इस के शीर्ष पर, foreach PHP में एक सरणी के लिए से बेहतर होगा। $ i = 0 ; ($ धारक [0]! = "") {गूंजना "&

algorithm - How to go about making an untrained speech to text converter? -

I am serious for severe deafness from a very young age but fortunately I can talk like a normal person. Oral communication has always been difficult for me because of my poor voice capabilities along with lip-reading, I have just gone through school and college through reading boards, powerpoint slides, books and internet. I used to present my current software engineering I am doing very well at the job, but late I feel that I should make some effort to improve my position. Subtitles are my lifeguards in this country who understand movies / shows TV and I am enjoying it for the last 7 years (I am 31 years old). I strongly feel the need to see the subtitles in real life whenever I talk to a person, even strangers. I want to develop an untrained speech for the text converter, and as a start, I do not even have to type the exact words, the signal only on syllables / phoneticity will also be cured. I have been for a while, but most of the results either read text or speech recogn

image - How to save a GIF on the iPhone? -

How can I save a GIF on iPhone? SDK contains only UIImageJPEG report and UIImagePNG report but nothing is for GIFs or other image formats, is there a way to convert UIImage into a GIF and save it? GM This is a library that I can encode to GIF images on the iPhone It is written, if someone is reading it, then it is interested:

data structures - C : Store and index a HUGH amount of info! School Project -

I need to do a school project in C (I do not really know C ++ too) I need a data structure to indicate every word of approximately 34k documents, there are so many words in it, and some rankings need to be done about the words, I already have this project I used to have a hash table of school and back (this year) and a binary tree of about 2 years ago, but I got a small grade reason because my project made all the words It took about 2 hours to make an indication. I need something a little faster ... any kind of possibilities? Tkz Roberto If you have the option, then I have a database engine ( MSSQ, MySQL, etc.) because it is exactly the type of dataset and operation that has been written for them. Not to change the best wheel again. Otherwise, why use absolutely btree? What you have described (and I think we are probably not getting the full story ...) should be useful in the form of a key in the form of a key in the table and its rank / count should be useful?

.net - c#:How to use enum for storing string constants? -

संभव डुप्लिकेट: ऐसा मान संभव है कि यदि ऐसा नहीं है तो मान की स्ट्रिंग स्थिरांक होना संभव है enum {name1 = "hmmm" name2 = "bdidwe"} ऐसा करने का सबसे अच्छा तरीका क्या है? मैंने कोशिश की है कि यह स्ट्रिंग के लिए काम नहीं कर रहा है, इसलिए अभी मैं एक संबंधित सभी वर्गों में एक समूह जैसे समूह की तरह वर्ग संचालन {सार्वजनिक Const स्ट्रिंग नाम 1 = "हम्म"; सार्वजनिक const स्ट्रिंग name2 = "bdidwe"} ऐनम स्थिरांक केवल क्रमिक प्रकार के हो सकते हैं (डिफ़ॉल्ट रूप से int ), तो आप enums में स्ट्रिंग स्थिरांक नहीं कर सकते हैं। जब मैं "स्ट्रिंग-आधारित एन्यूम" की तरह कुछ चाहता हूं, आपके जैसे स्थिरांक को छोड़कर, मैं इसे अवांछित तत्काल और अवांछित उप-क्लासिंग को रोकने के लिए एक स्थैतिक वर्ग बना देता हूं। लेकिन अगर आप स्ट्रिंग को विधि हस्ताक्षर में टाइप के रूप में नहीं इस्तेमाल करना चाहते हैं और आप एक सुरक्षित पसंद करते हैं, अधिक प्रतिबंधात्मक प्रकार (जैसे ऑपरेशन ), आप सुरक्षित एंमान पैटर्न का उपयोग कर सकते हैं: सार्वजनिक सी

php - How to integrate FirstData as payment gateway? -

I want to integrate first data as my payment gateway. How to thanks The code I used & Lt; Input type = "hidden" name = "txndatetime" value = "& lt ;? php echo getDateTime ()? & Gt;" /> & Lt; Input type = "hidden" name = "hash" value = "& lt ;? php create echoHash (13.00 9 78)?" /> & Lt; Input type = "hidden" name = "store name" value = "1909354791" /> & Lt; Input type = "hidden" name = "mode" value = "payment" /> & lt; Input type = "text" name = "charcott" value = "13.00" /> & Lt; Input type = "hidden" name = "currency" value = "978" /> & Lt; Input type = "submit" value = "submit" & gt; & Lt; / Form & gt; may be quite old posts, but useful to others. The first data payment gateway document is avai

oop - Abstract keyword in PHP -

Hey, I'm experiencing a lot with PHP but I do not know what the essence of the keyword is when this object is centered. Programming Can anyone explain in plain English that what can be used for it? What preconditions will I use? How does the class / interface change? (Hopefully this is very easy - I think I can do better I ^^) a abstract can not be instanciated: you can only create another class which is abstract class , And instciciate that child. And if you declare some methods in the form of abstract , then they should be defined in the child class, Instanciable.

How do I embed sharethis javascript into another javascript file? -

Basically here I have the code, it adds the existing button to the share button. Now what I want to do, the image of Twitter (on the right) Share javascript: & lt; Script type = "text / javascript" & gt; {Function () {function replaceAll (text, stra, strb) {while (text.indexOf (stra)! = -1) {text = text.replace (stra, strb);} return text;} var share = {" Html ":" << a ; \ N \ t \ t & lt; / tr & gt; \ n \ t Sharethis button Javascript that I am trying to add: script type = "text / javascript" src = "http: // w. Sharethis.com / button / sharethis.js # Publisher = 394f24b1-b257-4daf-a92d-334c05a91b58 & amp; amp; type = Website & amp; amp; buttonText = More% 20Services & amp; post_services = Email% 2Csms% 2Caim% 2Cmyspace% 2Clinkedin% 2Cfriendfeed% 2Cwordpress% 2Cblogger% 2Ctypepad% 2Cbebo% 2Clivejournal% 2Cxanga "& gt; & Lt; / Script & gt; Can anyone help me do this? Thanks Can

c++ - Use a regular iterator to iterate backwards, or struggle with reverse_iterator? -

I recently learned the correct way to work with reverse contractors in C ++ (especially when you need to be deleted). (See and.) To do this you should do this: typedef std :: vector & lt; Int & gt; Fourth; (IV :: reverse_iterator rit = iv.rbegin (), rend = iv.rend (); rit! = Rend; ++ rit) {// Use 'Write' if a reverse_itator is good enough, for example, * Rit + = 10; // Usage (rit + 1) .base () If you need a regular iterator, such as iv.erase ((rit + 1) .base ()); } But I thought that it is much better ( do not do it , do not conform to standards, like mowing Doc explains): for (IV :: iterator = iv.end), start = iv.begin (); It--! = Begin;) {// Use 'it' for anything you want * this + = 10; Iv.erase (this); Cons: You tell me What has happened to this? It does not conform to the standards, as the mowing dock explains. / Li> Remember also (or explain) works for std :: list: it = il If you erase an element, then You do not ha

Python networkx 2D radial plotting -

How do you create a graph in the network, such as its layout to increase the length of the 2D, radial, and edges Is weighted or weight? Have you tried to ask your questions?

c# - DataTable to List<T> conversion -

Is there a better way than the following? Specifically, I want to change the Activator with something else. Public Stable List & lt; T & gt; ToList & lt; T & gt; (Datatelle dt) {type type = typef (t); & Lt; T & gt; List = new list & lt; T & gt; (); Foreach (DataRow dr in dt.ows) {object [args = new object [1]; Argus [0] = Dr.; List Add (T) Catalyst Create Science (types, args)); } Return list; } The first thing I want to say is that you probably do not want anyone List There are obstacles, an IEnumerable is enough, even if you need a list, then it's trivial to convert an IEnumerable to a list. Keeping this in mind, this code is a good general way to accomplish this: Public Fixed IEnumerable & lt; T & gt; Genius & lt; T & gt; (Datatelle DT, Funk & lt; Detaar, T & T; translator) {foreach (Detroe Dr. in dt.Rows) {yield returns translator (Dr.); }} Hope you can see how this is reusable. You only need to provid

xcode - ostringstream problem with int in c++ -

I expect the following code from output Hello5 Instead, it only outputs to Hello . It seems that there is a problem trying to output an output to ostringstream when I directly output directly to cout , I get the expected input I using XCode 3.2 on Snow Leopard Thank you! #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Sstream & gt; using namespace std; Int main () {int myint = 5; String mystr = "hello"; String finalist; Ostringstream dew; OSS & LT; & Lt; Maestrate & Lieutenant; & Lt; Mint; Finestrate = oss.str (); Cout & lt; & Lt; Finalstr; Return 0; } Edit: I see the answers given below. This is created by a problem in Active Configuration 'debug' on Snow Leopard in XCode 3.2 < P> Changing the active configuration in 'XCode' with 'debug' for 'Release' functions as an alternative solution.

winapi - How to get the x,y coordinate of a mouse-click with win32 C++ on a directx object? -

Text after " How can I get X, Y coordinate a mouse click, if it's done by DirectX my menu button is over Have been to see? Currently, my codebase does not seem to be able to give this..I'm not related to the following mouse related class that I'm sure how it can work. InputMouse :: InputMouse (): M_LastX (-1), M_List (-1) {m_MouseActionEvent.clear (); } InputMouse :: ~ InputMouse () {} zero InputMouse :: PostUpdate () {m_CurrentAction.clear (); } Bool InputMouse :: IsEventTriggered (for integer eventNumber) {for (unsigned int i = 0; I & lt; m_CurrentAction.size (); i ++) {if (m_MouseActionEvent.size ()> 0 & amp; Amp; m_MouseActionEvent [m_CurrentAction [i]] == eventNumber) {back true; } } return false; } Zero InputMouse :: AddInputEvent (int action, int eventNumber) {m_MouseActionEvent [action] = eventNumber; } Zero InputMouse :: SetMouseMouse (int x, int y) {if (m_LastX = -1!) {If (x> m_LastX) {m_CurrentAction.push_back (MOUSE_RIGHT); } An

sql - Wiki Database, is there one? -

I was searching for something like Wiki database, like Wikipedia but instead stores structured content, Editable by users What I was looking for was an online database by everyone, where people can design schemas and data with the proper version of both schema and data. I did not find any such site. I'm not sure whether it is my search skill or actually there is no wiki database now. Does anyone know anything like this? I think there is a great potential for something like this. A possible example is a website that will have a GUI to query a MySQL DB, where any website visitors can create DB objects and populate the data. UPDATE: I registered to start the wikidatabase.org domain on one device but I have not had enough time yet if someone is interested in spending some time and coding on it, So please tell me what you are looking for: what they are looking for: they work on extracting data from Wikipedia , And use it in a structured format encoding, so that its use Rke

dynamic - .NET 4 makes for better unit testing/mocking due to the ability to monkey patch? -

Consider this about the implementation that comes up. In theory, will this allow the monkey to correct the bar? Good or bad, it does not matter what the dynamic keywords will allow, (looking at someone else's non-testable code) (at least with ease)? If it is reading for C # and VB, then there are many possibilities in it. What are the views on this? Dynamic type support in .NET 4 You do not actually have full monkey-patching support in the CLR type system gives. This gives you another way to mimic the object, but it is very good to be clear in the present way (see Mock:) With dynamic types, you lose intensities, so logic It can be given that this advice is not given for the joke to be dynamic. Iron Python style prevention will allow you to wrap an existing object with your desired behavior, but it will not allow you to tell the framework to patch all the foo objects after the point) Then the bar will call Bar 2 instead of the method bar. Keep in mind, there are 2

java - Tips for developing Penlets -

Finally it's time to do some projects for entertainment, I want to write some apps for my new one. Has anyone written something like this before? Do you have any suggestions for initial or useful links? I'm having trouble finding sites for pencils! In addition to the obvious sources (like), it seems, and one (which are often useful) ).

WF: Determining if workflow completed -

In addition to subscribing to the workflow that completes the workflow runtime, how do I set the host to the workflow example? Is there any flag or state, can I check a given warflow instance to determine whether it is completed? @edit: The question is about sequential workflows. Check the TrackingServices to know the current status for the workflow frequency can do. Here are some code snippets :.

soa - What do we mean by 'Variability in Web Services'? -

In the era of SOA and cloud computing , we often hear The word "variability in web services" I think it means how an implemented web service can be modified for new users of the geography or new requirements. Still, what would be a good definition of this? I think this means that all web services will not output the same output Thus, if you are building an application that uses that output, you may have to change it in any way ... Change the web service or update it Which can cause problems to some users.

How to configure grails classpath in order to add "src/groovy" folder ( in Linux environment)? -

I am currently porting Windows to my development environment for Linux. Under Linux, I have noticed that the "Class not found" compilation error is related to my classes directory & lt; PROJECT_HOME & gt; / Src / groovy Under the windows, it works fine. Is this included in the "src / groovy" directory CLASSPATH when "grails run-app" is running? Why does it behave differently under Windows and under Linux? ( GRAILS_HOME and GROOVY_HOME are defined in both environments) Is there a way to display the current CLASSPATH in the log? And most importantly, how do I solve my problem? (Global CLASSPATH = & lt; PROJECT_HOME & gt; / src / groovy setting) Thank you for your help, Regards, Fabien Yes, src / groovy and src / java are automatically used in classpath while using the graves Order I recommend to make sure that your package statement is correct and this error is referencing your code.

editor - vim formatting command -

Today I unknowingly typed something when the cursor was on a very long line and it forms my line, to limit it Braking length of several lines of This line looks like this: Fu ("It is a very long line ('% s' is left 'right') and it will never end." PNode-> left C_str (), pNode- & gt; right.c_str ()); Foo ("This is a very long line (left '% s' is correct) and it will never" end ", pNode- & gt; left.c_str ( ), PNode- & gt; right.c_str ()); What did I press? videek set wrap (ho

c# - How to detect whether Java runtime is installed or not -

I program windows applications using Java and it creates the ".jar" file which is the ".exe" file is not. When a Java Runtime is not installed, the client computer opens the ".jar" file, then it runs as a store with winrar. To show the message box to the user to install the Java Runtime or to launch the ".jar" file using the Java Runtime, I need to know how to run the Java runtime or not, using the C # code. Whether or not the computer is installed on. You can check the registry Registry RK = Registry local machine; Registry all = RK OpenSubby ("software \\ Java soft \\ Java runtime environment"); String current virion = subkeygate value ("current version"). Toasting ();

c# - Catch Id (INT AUTO INCREMENT) of a Record after INSERT INTO Statement -

This is my first time that I use MySQL as a datestouse for my C # application, as I I have seen that there is no irregularity type as I decieded for INTI_INCREMENT to use INT in SQL Server, my problem is now if I execute INSERT, how can I add the record ID now? My quick and dirty solution has been performed, execute a selection MAX (ID) from the table description but it does not seem consistent. I believe that there is a better solution like mysql_insert_id () (PHP). Any ideas how to solve it in C #? You use the function last_int_id () < / Code>: select last_insert_id () You have to use this database session, that is, the same connection object. As you've thought, you should not use max (id) to get the ID, because it will get the final ID created from any session, it No specific sessions. If two concurrents are closed for different users over time (so both entries are before one of them before choosing to receive the ID), they will get the last entry I

emacs - Windows and Minibuffer floating over the frame -

When I start Emacs, its windows and its minibugar start floating on the main frame, leaving a very empty space : And). I am using EMACS version 23.1.1 on XMID Thanks! I sometimes get the same thing when a tab spreads in shell mode. I do not end up with a blank mini-buff, it usually contains all material from shell material. The only solution I've found is that the current shell buffer

c++ - printf boost:tuple -

क्या बढ़ावा देने के तरीके हैं: printf to tuple ()? सीधे नहीं, क्योंकि printf को कुछ प्रारूप विनिर्देशक की आवश्यकता होती है आपको एक समय में प्रत्येक तत्व को प्रिंट करने की आवश्यकता होगी। आप एक टेम्पलेट फ़ंक्शन बना सकते हैं जो ट्यूपल के तत्वों पर दोहराता है, उन्हें छापें। पता है कि उसने कहा, फिर से काम नहीं करेगा जब तक कि प्रत्येक तत्व printf के साथ मुद्रित नहीं किया जा सकता। बल्कि, क्यों नहीं iostream का उपयोग करें? तो आप केवल std :: cout & lt; & lt; TheTuple ।

How do you determine 32 or 64 bit architecture of Windows using Java? -

How do you determine Windows 32 or 64 bit architecture using Java? Thank you. Please note, the os.arch property is only available to you JRE < / Em>, not from the built-in OS If you install a 32 bit JR on a 64 bit system, then System.getProperty ("o.sarch") back x86 < / P will return> To really determine the underlying architecture, you have to type some native code. See more information (and link to original code sample)

wifi - iPhone: Reachability for wireless where actual internet is not needed -

Anyone have an idea of ​​how I can check the WiFi connection where I need to connect to the Internet is not? I have implemented Wifi multiplayer in a game from which I am working, so I have to make sure that the user should know that there is no connection when he is trying to use that mode. Availability sample code only works for situations where you have a host on which you are trying to route. Since I do not have any knowledge of how other people's WiFi will be installed, I should be able to check wifi without trying a route to a specific location. EDIT: Never mind, I got it. Just dig more in the reheability code. You can check that you reach the access point (which is almost always the iPhone's gateway, Internet or Will not done). With the route for the Internet 802.11 B / G / N and the internet will be seen similar to the phone or any device without the route. I should ask the phone for an entrance gate and try to talk to it (ping, maybe?) But I am unfamiliar

osx - Mac Based Python GUI Libraries -

I am currently building a GUI based Python application on my Mac and wondering if a good GUI library Can suggest using? I was watching and it was difficult to choose between many options. I am developing on Snow Leopard and cross-platform is not necessary (if it makes a difference). If you are not concerned about cross-platform compatibility, (see also) the original OS Bridge directly into the X-Coco Interface PyObjC (Clear Pie-Obze-View) is an important piece that makes it possible to write cocoa applications in Python. This enables python objects as objects in Objective-C objects as they are the companion python object, and likewise lets Object-Objects allow Python objects to be sent as brothers. Note that Apple does not support and then coca does not support these non-native interfaces; This is a good sign that PyObjC's recent releases are.

C++/CLI generics, use T in array<> and other collections -

I am writing a generic class in C ++ / CLI (VS2008) to store and manage different types of records I need to collect and keep them in the DB / disc / etc before I was trapped in something like this: Ref Class Record {// .. .}} General & lt; Typename T & gt; Where T: record, GCN (public) public square class {public: // .... functions .... protected: array & lt; T ^ & gt; ^ Stored data; }; The error of the course is failed with the C3229 ( indirections on a common type of parameter is not allowed ) if I delete '^' The error is C3149 ( this type can be used without top level ^ ^ ' ). It is easily done in VBnet (in fact, I am migrating to the current VBnet class!), But in C ++ I think that has reached a dead end. Is it really impossible in C ++ / CLI? Thanks in advance. Do you have to: public ref class record { }; General & lt; Typename T & gt; Where T: record, GCN (public) public square class {public: // .... functions .... protect

antlr - How to lex 0 .. 255? -

I want to accept a decimal number from 0 to 255. This is the best I can come up with: Piece my_token: ('0' .. '9'). // 0 -> 9 ('1' .. '9' '0' .. '9'). // 0 -> 99 ('1' '0' .. '9' '0' .. '9'). // 100-> 199 ('2' '0' .. '4' '0' .. '9'). // 200 -> 24 9 ('25' '0' .. '5'); // 250 -> 255 But Surelry is a better way I am just an NGN00b? If you lexer relax and defer later check Lex NUMBER , then when If you convert it later, the value is out of bounds, you can provide a very specific error message if you enter a strong and powerful 256 error message, which results in any ambiguity for the first Grammar has not been created. Number: '0' .. '9';

Masks in AIR with Actionscript 3 -

I'm trying to do a mask on the circle size in Action Script 3 (I'm using the Flex Air Framework ). It is to be done with ecological footprint, each cycle represents an earth. This ecological footprint is inside a container. The problem is that the mask is fixed, though the picture floats. When I scroll down the container, the picture will scroll just fine, but the mask will not clipping the top of the photo. I've put this and other UIMovieClip in a VBox container. The VBox container is still inside another VBox container if I put the fomer VBox container under the latter, the mask will not go with it, hence the circle will not be masked. mask = new UIIMVE clip (); Mask.graphics.beginFill (0xFFFFFF); Mask.graphics.drawRect (Radius, Radius + Radius * 2 * (ecoWeight-Math.floor (ecoWeight)), 1000,1000); Mask.graphics.endFill (); Earth = new UIMovieClip (); Earth.graphics.beginFill (0xFFFFFF); Earth.graphics.drawCircle (radius, radius, radius); Earth.mask = mask; Earth.gr

wpf - Why does UseLayoutRounding not seem to work with Viewbox? -

I am trying to write a tile-based game in WPF 4. I want to scale the sports board to fit in the window, so I am using a viewbook; But I want every tile on a nice, crispy pixel border. I may be wrong, but my understanding is that it is considered to be the new UseLayoutRounding property - but the way I expect it, it is not working. Here is a window that shows this issue: & lt; Rectangle canvas. Lift = "200" canvas. Top = "100" width = "100" height = "100" = "gray" /> & lt; / Canvas & gt; & Lt; / Viewbox & gt; & Lt; / Window & gt; Two rectangles are imminent, but because of the sub-pixel coordinates (as a result of the scaling of the viewbox), I end up with a deep gray border between them, this is what I'm trying to get rid of - I want them to mix together. But UseLayoutRounding does not seem to affect this. I have tried to set the UseLayoutRounding = "True" on the window, view

semantic web - How to import data in relational database to RDF? -

How do I get data from a relational database in RDF? I suggest that the SRRQL (RdF query) can be converted to relational SQL queries, you can change / There is no need to export.

c++ - wistringstream from an xml file to an integer? -

const XMLDataNode * अंकनोड = नोड- & gt; GetChildren ()। पर (0); Std :: wistringstream pointsstrm (* pointsNode- & gt; GetInnerText ()); पॉइंटस्ट्रम & gt; & gt; loadedGame.points; यह एक XML फ़ाइल से int को खींचने के लिए लिखा गया कोड है और इसे loadedGame.points (एक < कोड> पूर्णांक )। हालांकि, यह काम नहीं कर रहा है यह संकलित है लेकिन सही मूल्य नहीं देते हैं। ऐसा क्यों है? XMLDataNode एक वर्ग है जो xmllite.dll manipulates। कुछ जंगली अनुमानों के लिए समय! मैं आपको शर्त लगा सकता हूँ कि आपको * pointsNode-> GetInnerText () से मिलता है वह टेक्स्ट नहीं है जो आपको लगता है कि यह है । क्या आपने यह जाँच कर लिया है कि यह वास्तव में आपके इच्छित टेक्स्ट है? विशेष रूप से, क्या यह सफेद स्थान हो सकता है? संदर्भ के लिए एक स्कीमा के बिना एक अच्छी तरह से स्वरूपित (यानी इंडेंट, लाइनों में टूटी हुई आदि) पार्सिंग को समाप्त होता है, अर्थात् कि सभी प्रकार के टेक्स्ट नोड्स को सफेद स्थान को शामिल करना आपके DOM ट्री में समाप्त होगा।

c# - How hard is it to tamper with a strong named assembly? -

Assume that I have a net legislation that is a strong name. Only I have access to the private key. Then I distribute the assembly to some client systems. How difficult is the client to modify the assembly? Ie: What will they have to do to modify my assembly? Strong Naming Assembly, but it prevents other applications that have a strong-named assembly inadvertently Refers using the modified version.

Toplink client session -

Is there a way that I can access a client session object from another client session? Unless you have separated the client session (classdescriptor .setIsIlated) from your institutions The client session never keeps the instances of any organization. Therefore, unless you have disabled all the questions against any client session, it will return the example of the same entity. If you have different organizations or are actually using the unitofwork, then you have to get the value of UnitOffore / Alternate Client session. Using a unitoffice or client session with multiple threads is not advisable.

iphone - identifying Button selection of each row in Tableview? -

(UITableViewCell *) तालिकादृश्य: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath {< / P> UIButton * btn = [UIButton बटन के साथप्रकार: UIButtonTypeRoundedRect]; बीटीएन.फ्रेम = सीजीआरएक्टमेक (230.0 एफ, 4.0 एफ, 60.0 एफ, 36.0 एफ); [बीटीएन सेटटिटल: @ "ओके" के लिए स्टेट: यूआईसीओन्ट्रोलस्टेटअनॉर्मल]; [बीटीएन सेटटिटल: @ "ओके" के लिए स्टेट: यूआईसीओन्ट्रोलस्टेट चयनित); [बीटीएन एट टार्गेट: स्पी एक्शन: @ सिलेक्टर (ऑनक्लिक रीनैम :) कंट्रोल ईवेंट्स: यूआईसीटीआरएलईवेंट टचअप इनसाइड]; [सेल ऐड एस्यूब्यूव्यू: बीटीएन]; रिटर्न सेल; } लेकिन यदि उपयोगकर्ता विशेष पंक्ति पर बटन का चयन करता है, तो मैं उस छवि को onClickRename के माध्यम से बदल सकता हूँ ... लेकिन कर सकते हैं मुझे मिलता है कि पंक्ति की छवि को (शून्य) तालिका व्यू के माध्यम से छुआ गया है: (UITableView ) तालिका दृश्य किया था SelectionRowAtIndexPath: (NSIndexPath ) indexPath? आप ऐसा कुछ कर सकते हैं [btn SetTag: [indexPath] पंक्ति] अपने सेल सेटअप में, और फिर - (शून्य) on

c# - Fluent NHibernate: How to tell it not to map a base class -

I have been googling and stackoverflowing for the past two hours and my question could not be answered: < P> I am using ASP.NET MVC and NHibernate, and whatever I am trying to do is to manually map my institutions without mapping my base class. I am using the following conference: Public class car: EntityBase {public virtual user user {get; Set; } Public virtual string plate number {get; Set; } Public Virtual String {get; Set; } Public virtual string model {get; Set; } Public Virtual Int Year {Received; Set; } Public virtual string color {get; Set; } Public Virtual String Insurers {get; Set; } Public Virtual String Policyholder {Received; Set; }} Where EntityBase should not be mapped. My NHibernate assistant class looks like this: Nom place model. Public class NHibernateHelper {Private String String Connection String; Private static ISessionFactory session; Private static Fluent Configuration Config; /// & lt; Summary & gt; /// becomes a session for NHiber

Oracle Data Modeller and synonyms -

I am searching the web for two days and still to generate a DDL code with the public synonyms Can not find the route . Would be very grateful for any advice. I think you are working with two different and specific uses of the word "option ": 1) In logical (unit) modeling, synonyms are optional business names for one unit, e.g. Unit customer can have synonyms for PURCHASER and clients. 2) In the physical (database) model, the public synonyms are used to remove the need to specify the schema of a table. Generally, synonyms and table names are the same "create a public SYNONYM client for MYSCHEMA.CUSTOMERS";

ANTLR3 Syntax reference? -

I am looking for syntax references for ANLR3 and a quick search is not found, someone can tell me Where do you mean a list of ANTLR's reserved words?

string - What's the difference between 'eq' vs '==' in PHP? -

First of all, I searched the various forms of the titles I have kept for this question in Stack Overflow and Google I tried not to get the solution. I'm quite new to php; New enough to not know the difference between using eq and == for string comparison! I usually use == to compare wire in PHP I am comfortable with it. But I've seen the code using eq to compare strings. And I'm missing something like 'Oh! I used == to compare strings. I should have used the eq ' I just want to know whether using == is ok to compare simple string is? I am not talking about any fancy type of special cases, case-sensitive, substring or string comparison. Just checking whether apple is like apple . What is == enough? Or should I use the eq . Edit: My mistake :( Thank you very much for cleansing my 'nonsense research' that it should have been in Pearl. I was confused about seeing the embedded code within HTML and I thought it was a differen

c++ - Shall I place try...catch block in destructor, if I know my function won't throw exception -

I know that the destroyer should not leave the exception. I have the following code: ~ a () {cleanup}; } // I do not expect the exception being thrown at this function. // If the exception is actually, then I know that it is not recoverable: zero: clap () {delete p; } In my static source code analysis, it complains that I will call the cleaning work like this: ~ a () {try { Cleanup (); } Hold (...) {// what to do? Print some logging messages? }} // I'm not expecting an exception to be thrown in this function. // If the exception is actually, then I know that it is not recoverable: zero: clap () {delete p; } I'm not sure that this is a good practice, to try ... block the block in the constructor, whenever this function calls. As:: (1) If the cleanup function is able to leave the exception, then I know that something bad happened. I like this, just let the whole system crash, and programmers debug it. (2) Overhead is generated when entering and exiting ...

java - Is there a good examples and documentation of jface databinding framework for Eclipse 3.4? -

The official site is quite rare and most examples are linked to the EMF and Eclipse is for 3.5 but what if using any 3.4 targets Does not use eclipse platform and emf. I am particularly interested in examples of tree viewer, but always appreciate good examples and documentation. Here are some good resources: < Li> I do not think there is a big difference between eclipses 3.4 and 3.5 in Jeffus databasing. Edit shows an overviewed list-examiner with the following code: // Viewer viewer Define = New ListViewer (Guardian); Viewer.setContentProvider (New Observable List Content Provider); & Lt; Person & gt; Person = new arreelist & lt; Person & gt; (); // Just for testing we create sample data Example Examples (individuals); Input = new writable list (individuals, individual classes); // Set the writeable list as the input for the viewer viewer .set input (input); Introduction It encourages that it also works with triviers. Content Provider re

Writing a Tokenizer class in C# for a BASIC Interpreter -

For a little fun, I am trying to write a basic interpreter in C #. The following is my Tokeninger class (with only a few keywords) I am after any suggestions or comments ... Code clarity is more important to me than efficiency. class tokensager {const string operator = "+ - / *% gt; = & amp;;"; Private listing & lt; String & gt; Keyword = new list & lt; String & gt; {"LET", "DIM", "PRINT", "REM"}; Private listing & lt; String & gt; Token = new list & lt; String & gt; (); Private listing & lt; String & gt; Token type = new list & lt; String & gt; (); Private Ink Token Index; // Turn on command string in token Public invalid tokenize (string cmdline) {string token = ""; Char lastc = ''; Bool inString = false; Tokens.Clear (); TokenTypes.Clear (); // Step through line and divide into Tocane Foursachet (4 C in Cndline) {If (C == '' ') inString =! InStr

c# - which is collection or list is fastest for too many additions & deletions? -

I have a list with a large number of elements added & amp; Removed every other I have to search the elements in the list at the same time. In addition to this, I need to find the key / value pair comparison. Extra rate is more than delete Thanks in advance. Try it Extra, extinction and lookup are too much (1). I'm not sure what you call "search for the key / price comparison", but searching the dictionary map keys in values ​​more quickly. If you actually list (i.e., an order on the elements), then you will be better served.

COM - .NET Interop - Winform from COM client -

I have a WinForm-containing .NET application. This WinForm includes an unmanaged ActiveX control and some other controls. This app works fine in standalone mode Now we want to publish some kind of interface, so this winform can be used to interop functionality from unmanaged C ++ / MFC applications. Client applications will show this form in a model manner. When the user gives details of the input, the client is given the same by using the Com Event Source / Sync (or Connection Point) method. I have followed many articles and a method working for us But if I start more than one thread from the same client application, then the second example of the form is reached The violation throws an exception because the ActiveX control on the form always expects the thread to base my thread (based on). Can you please tell me what is the correct way of displaying a WinForm functionality for unmanaged client applications through the interop? Many thanks You get all the necessary in

jQuery growing number help -

O people, I do not know that there is a plugin for this but what I want to do The code that appears in "Grow" or "Junk" then it starts with 0000.00 then increases to a set price (i.e. 9 000.00) then this 0000.00 , 0000.01, 0000.02, 0000.03 ... 8999.98,8999.99, 9000.00 Any thoughts? I believe that you want this number to increase as it appears? Here's a solution that does not require jQuery: var start = 0, max = 9000, step = .01, refreshRate = 50 // ms, Number = start, el = document .getElementById ('displayField'), growNumber = function () {number + = step; El.innerHTML = number; // You want to format it according to your choice if (number> = maximum) {clear timer (timer id); }}, TimerID = set interval (tree number, refresh); GrowNumber (); This will create an element with id = "displayfield", as it grows, displays values.

c - How to read the content of an other app's text field on OS X? -

For a project I have to make a small friend who must read the contents of one of the main areas of the main app. Is there a way to get the contents of window / control on OS X (I am interested in the text field text)? On some such GetDlgItemText () like Windows where I just pass the global handle of control and get the text of the control. Can any of you give me some keywords for Google? :) It is a great starting point to use. Another good If you are using Apple Sky script from Cocoa on version 10.5 or later, then your life may be easy. Good luck!

perl - How do you generate website navigation? -

I'm interested in how other people handle website navigation is not part of the style or applicability, but part of the generation Most websites have a type of "navigation tree" that is displayed as one or more menu levels - in what form do you save and process this tree? The simple solution is a stable menu template, something like this: & lt; Ul id = "menu" & gt; & Lt; Li & gt; & Lt; A href = "..." & gt; A & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "..." & gt; Two & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "..." & gt; Three & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; But this is not very flexible. You can not easily mark the current page in the menu and there is no easy way to show or hide a part of the menu tree depending on the current page. (Or is this?) I came

mysql - Update Field When Not Null -

The updated statement to me that updates x, y and z fields where id = xx. I have some different x_created_datetime field in the table (for the different parts of the different held by different people / enter the record). I would like to write a single query which will update this field if it is zero, but if it is not empty then leave it alone. So what I have: Update newsletter set scan_notes = "data", scan_entered_by = "some_name", scan_modified_date = "current_unix_timestamp" WHERE id = X what I need is a way to add the following, but still always update above: scan_created_date = "current_unix_timestamp" where scan_created_date empty I hope I can do this without a second transaction for DB. Any ideas on how to accomplish this do this:? Update newsletter set scan_notes = "data", scan_entered_by = "some_name", scan_modified_date = "current_unix_timestamp", scan_created_date = COALESCE (sc

Adding a Search, & Bookmark Feature -

I have my entire data stored in an array as a string. I'm bringing every string randomly with an array on the autate / onclick event. Now I want to enable my user to book the desired data. In addition to this, I want to find the desired data by array by providing search criteria to my user. Thanks

actionscript 3 - Get Enum from String in ActionScript3 -

Is there a way in Action Script 3 to get an input from string value? Like I have enum public last class day {public stable position Monday: day = new day (); Public static payments today: day = new day (); Public stable command Wednesday: day = new day (); Mass Static Treaty Today: Day = New Day (); Public static const Friday: day = new day (); Public stable concept Saturday: Day = New Day (); Public Static Institution Sunday: Day = New Day (); } And I want Man Day. From Monday to "Monday" Similar to action code in obj.prop obj ["prop"] - has just been confirmed that it also applies to static properties so you can see it like this: trace ( Day ["Monday"]);

svn - Need help configuring external diff with Eclipse -

I'm trying to set up my Dev environment and I'm running SVN with Eclipse on my Mac (subclipse with). However, when I click on a file then I have changed and compared to comparison with the repository, I have seen that I was getting a sub-side Diffuse tool (which I think). Therefore, I have configured an external FIFA device (called "Diff Marge") to prioritize -> Team -> SVN -> Diff / Merge. However, whatever I put in the "External" field and "Parameters" field, I can not get the Duff Merg tool to work. For example, I tried "/ application / def merge" in the external field (I just put the executor directly in the application folder) and created the parameter: "$ {base}" "$ {Your} ". However, when I return to my revised file and compare it with the hit -> repository with lettas, I still get the same built-in firefighter device. Any thoughts or resources that you can tell me will be greatly appreciat

mysql query optimization -

I have this database: tab 1 --- 1: n ---> tab 2 (parent -> id) (max 1: 4) - complex part tab 1 --- 1: n ---> tab3 (original-> id) - simple access Tab 1 id name version .. tab2 id = paternity = type < Br> value .. .. tab3 id = parent / type data I want to select the complete information, but I need to use several variable conditions, Slia I need to come up with probably the best solution. I use this query: SELECT tab1.id, CONCAT (tab 1.name, '', tab 1. version) AS NV, ndvar. Price, tab3.data, ndvar.v1 [and column] to tab 1 inner join (select parent, type, groupconcat (type SEPARATOR '') + "AS V1, min (price) AS value [more column] Tab 2 from where show = 1 [more circumstance] Typing typing type IN (2,3) [1-3 parameters] by parents) Click on tab 1.id = ndvar. Tabs on panning content 1.id = Tab3.parent and tab3.type = 0 where name '% xyz%' [max Conditions] ORDER BY NV I've tried so easy to understand me a

segmentation fault - Signal 11 segfault on wait() system call? -

I am working on a basic shell in C, in my implementation, I calculate the order of the rows and I Code> Fork () A new process At the end of each instance, before I proceed in the next order, wait for on the child () in the previous code Was working fine, but in some way I broke it: Program signal 11, with segmentation fault Expiry # 0xfef28730 from _waitpid () to /usr/lib/libc.so.1 (gdb) from backtrace # 0xfef28730 in _waitpid () /usr/lib/libc.so.1 # 1 0xfef28770 _wait () from / Main () in usr in / Lib / libc.so.1 # 2 0xfef696d1 in wait () /usr/lib/libc.so.1 to # 3 0x08051428 Why, and in which case wait () will cause the default? How can I go about debugging this kind of thing? You are probably giving an invalid indicator for the reasoning argument (2). How to debug this type, my first step is to establish debugging symbols for your C library. Then see which point it is at fault and to detect the stack (if possible).

How to convert a PNG image to a SVG? -

एक एसवीजी को एक पीएनजी छवि कैसे परिवर्तित करें? एक वेबसाइट है जहां आप अपनी छवि अपलोड कर सकते हैं, और परिणाम देख सकते हैं। लेकिन अगर आप अपना डाउनलोड करना चाहते हैं Svg- छवि, आप रजिस्टर करने की आवश्यकता है। (यदि आप रजिस्टर करते हैं, तो आपको 2 छवियां निःशुल्क मिलती हैं)

Python vs. Java -- Which would you pick to do concurrent programming and why? -

In addition, if you do not have python or Java, then do you usually have a statically typed language or dynamic -Will choose language? I select Python on Python, mainly because Python has multi- Threading is interrupted. However, Java is not possible for you to be the best when running on JVM. If you choose Java, then you should consider using the libraries and multi-threading preferences such as synchronized Gone .

c++ - Is it possible to define multiple classes in just one .cpp file? -

I am working on a project for school and the instructor urges that all the code is one. Go to the CPP file (on your part for easy grading) I would like to define several sections within this file, will I participate in any kind of problem in doing so? There is no rule for you to follow (like Java). You are free to place nominated files (in addition to suffix) to place and name sections. However another question of this is that it is good practice (its not!).

reverse engineering - Hibernate - moving annotations from property (method) level to field level -

How do I generate a hibernate domain class from tables with annotations at the field level? I used the tool project and generated domain class to hibernate from the table in the database Generated sections have comments on recipient methods instead of field level. Please advise a way to generate domain classes, whose areas are annotated. Is there any refactoring facility available in Eclipse / IDEA etc. to move the annotation from the eclipse level to the field level? Appreciate your help and time. These steps are: allocate "hibernate -tools.jar "For example, by doing a search within your eclipse folder, you will find it at Celsius: \ eclipse \ plugins \ org.hibernate.eclipse_3. 4.1.xxx \ lib \ tools Remove the temporary folder (the WinRar can do) For example, [your project] \ Templates Remove under [your project] \ template \ POJO folder, "Ejb3FieldGetAnnotation.ftl" create a file named this file is actually a copy of "Ejb3Property

Auto complete textbox in Java Swing -

Image
Is there any good ready Java swing component that can be used to apply auto full text box? When a unique match is received it will be automatically completed for you. Completed text field is automatically entered and selected. How the address area of ​​the Safari works, like the way. To provide a list of solution options Can be extended, although it was not part of my needs. UPDATE I lost the domain with the original code. It can now be reached on github:

Strip all non-numeric characters from string in JavaScript -

Consider a non-dom scenario where you want to remove all non-numeric characters from the string using javascript / ECMAScript . Any characters that are in the range of 0-9 should be kept. var myString = 'abc123.8 & lt; Blah & gt; '; // The desired output is 1238 How do you get it in plain JavaScript? Please remember this is a non-DOM scenario, so jQuery and other solutions that include browser and keypress events are not appropriate. Use the string method with a regex of \ D Which is a miniature character square that matches all non-digits: myString = myString.replace (/ \ D / g, '');

.NET Reflection of all method parameters -

Is it possible to get the parameter name (where do I have parmName below)? Or maybe there are only relative posts in MSIL code, there is no complete vascular name? Within Microsoft Host Integration Server, I have an unusual case of using HIV. If the field is zero and the error goes back to the CIS (mainframe), then the error is "A Call to VerifinVoxAdamus Fiddle" . I have coded a solution hard, but it was trying to create a common solution that would work for any HIP sub-routine. Thanks, Neil Walters // Check the zero values ​​in any parameter MethodBase method = MethodBase.GetCurrentMethod (); // string key = method.Name + "("; for (int i = 0; i Additional information: I'm calling a BizTech Orch published as WCF web service. When these errors occur, some fields are not back in the above program This is the first way that the values ​​should be taped. But CIS / application which is calling my HIS / hip program does not like the tap.

Compressing content with PHP ob_start() vs Apache Deflate/Gzip? -

Most sites want to narrow their content to save on bandwidth, however, when Apache servers run on PHP, There are two ways - or with Apache, which is fast or easy on your server? For example, in PHP I run the following function at the beginning of your pages to enable it: / ** * Gzip compressed page output * from the original function Came wordpress.org * / function gzip_compression () {// If any encoding was given - so it does accept gzip pages, (empty ($ _ server ['HTTP_ACCEPT_ENCODING'])) {Unreal Returning enabled needed; } // zlib If the page is not already compressed - and if ob_gzhandler is set, then ((ini_get ('on' 'zlib.output_compression' ') == or ini_get (' zlib.output_compression_level ')>) or Ini_get ('output_handler') == 'ob_gzhandler') {return false; } // If zlib is loaded otherwise, start compression. If (! Extension_loaded ('zlib') and (strpos ($ _ server ['HTTP_ACCEPT_ENCODING'], 'gzip&#

ipc - Erlang Documentation/SMP: single-node and multi-node per machine or per application, and the confusion that may follow -

I am currently studying the process of Errang. I have hit a jerk at Arlong (section 3, paragraph 2): It explains why in some cases why to run several SMP VMs with a scheduler and Instead of many schedulers, on a SMP VM with many schedules, of course, many VMs need to be run that the application can be run in many parallel functions, with no less or less communication with each other it happens. Now this paragraph is misleading me; I can see the Uni-process multiple scheduler scenario, but I fail to see many processes with a scheduler; Probably each process will have a separate node name , and this means that without modifying a particular application, this model can not be used with; Due to the lack of modification is not required, is mentioned as a key feature of SMP in the report. If multiple processes have the same node name, then due to inter-arcing-process messaging storms performance - it considers the use of in-memory amnesia Is there some process model in the a

directx - Who can tell me what this bit of C++ does? -

CUSTOMVERTEX * pVertexArray; अगर (FAILED (m_pVB- & gt; लॉक (0, 0, (शून्य **) & amp; pVertexArray, 0))) {E_FAIL वापसी; } पीवीर्टेक्सअरे [0]। रचना = डी 3 डीएक्सएवटेन्ट 3 (-1.0, -1.0, 1.0); PVertexArray [1]। रचना = D3DXVECTOR3 (-1.0, 1.0, 1.0); पीवीर्टेक्सअरे [2]। रचना = डी 3 डीएक्सएवटेन्ट 3 (1.0, -1.0, 1.0); ... मैंने कुछ समय के लिए सी ++ को छुआ नहीं है - इसलिए विषय है लेकिन कोड का यह कोड खुद को भ्रमित कर रहा है M_pVB-> लॉक के बाद सरणी को इनिशियलाइज़ किया जाता है। ये बहुत अच्छा और सब कुछ है, लेकिन समस्या यह है कि ऐसा कैसे होता है। कोड के नीचे नौ तत्वों का उपयोग करता है, लेकिन एक और समारोह कोड मैं केवल का उपयोग के साथ काम कर रहा हूँ की (काफी कॉपी / पेस्ट) चार तत्वों का कहना है। CUSTOMVERTEX एक struct है, लेकिन मैं यह धारणा थी कि यह मायने नहीं रखता है कि स्ट्रैक्ट्स / ऑब्जेक्ट्स की एक सरणी को एक निश्चित आकार के लिए आरम्भ किया जाना चाहिए। क्या कोई इसे साफ़ कर सकता है? संपादित करें: उत्तर दिए जाने पर, यह कैसे पता चलता है कि मुझे सरणी में नौ तत्वों की आवश्यकता ह