Posts

Showing posts from September, 2012

c# - How Can I Store Program Settings? -

I am creating a desktop app that sits on a PC and sometimes checks for web server to update various settings Will do The program will be using these settings again and again so that I want to cache settings in a file on a PC, so there is not a need to constantly hit the server. There are so many settings in them in an XML file Was thinking about saving, but I should not be able to read the file through PC users. How should I store the settings of a PC that the program can read and write, but the user can not be read? Edit: Sorry people are being written in C # through .NET 2.0. The application will run only on Windows, it is a console app that will run as a Windows service. If the app is a service then it can be run under an account which is not of the user ; So it's easy to keep the file hidden in it. As a Windows app, you get the option of a registry or file or local database. For files, your option of a simple property file or XML file. For any of these, your

C# highest string -

This sounds very trivial, but I can not find the answer with Google. I'm later a high value for a string at the end of a sorted list of strings. I think char.highest.ToString () should do this - but it's less comparisons, not high. Obviously, this is probably not possible to create one of the highest possible strings because it will always be less than the same thing + plus the data but string which I am sorting are all valid path names and used like this The symbols have been compelled. In response to comments: In the pre-Unicode days of Delphi, I could use # 255. I just need a string that compares more than any possible pathname. It should be trivial - why is not it ?? Answer # 2: It is not trimmed that the watchdog is required, it is processing later I have multiple lists which I do not work with sort-off merge (simplified merge ) And either I duplicate the code or have a dummy value that always do high comparison. A string representation of the highest

reporting services - method in Report Builder custom assembly not found -

I am trying to use a custom assembly in Report Builder 2.0. I have added the assembly to the report through report properties. When I try to call a public statute method in the assembly, I get this message: 'ExtractTag' Report Classes Library. Rapports is not a member of Class Library Tools. This expression is trying to use the method I call: = ReportClassLibrary.ReportsClassLibraryTools.ExtractTag ("id", " ID: incorrect ", incorrect) and the method signing in the assembly: public static string ExtractTag (string tagtoffind, string tag, case sensitive case) This method is in the ReportsClassLibrary namespace and in the report class Liberty category. I do not know that for some reason my report seems old, the version of the assembly that was not of this method, or if the problem is anything, I have tried to remove the assembly from the report, to the assembly Reconstructed, and re-added it in the report. Edit: looks like a deep

Ruby: got TypeError when calling function. What's happening? -

I'm a Ruby novice and there is a problem with the code given below to work < Code> DEF FactorialAl (N) if n == 0 1 and N * Factile (N-1) End and Factorial (Number) I am receiving the error message in Fiction Can not be changed in Array (Type Error) in 'Factor' which I am doing wrong in this case, to help me in answering Anybody capable? Thanks in advance As McPorter says, number apparently an array is. So what do you need: puts (numbers.map {| n | functional (n)}) And, incidentally, there is nothing to do with the repetition of your error. McCander confirmed the principle: & gt; Numbers [[1,2,3] & gt; Factorial (number) type error: farnam can not be converted into an array And just outside of curiosity, here's how you apply the factorial in rubber without rubber , So that you for large numbers. def factorial (n) (1..n) .inject (1) {| Ac, x | AC * x} End

iphone - Maintaining proportions when autorotating custom UIView -

It's probably either real easy, real dumb, or my Google Fu has taken a serious turn for the worse anyway, I am implementing custom view for my app, which is using pure CGTtext drawing, any subviews (at least now). The thing is, I want to autorize it, so I have shouldAutorotateToInterfaceOrientation Yes, and the voice rotates the scene. But in doing so, it is not really reproducing the content (which I think is somewhere in the structure sung on a frame and sprayed on a reset, but it is not really relevant), the reset bus Spread, how can I get the issue of a draw just a big area while roaming? That is, my content is larger than the screen, and I want to change the viewport during rotation. I have tried to set contentMode to the view> UIViewContentModeRedraw , but that did not do anything, I have tried autoresizeMask To play with the baggage, but did not seem to help. I have also tried to include willRotateToInterfaceOrientation in setNeedsDisplay , however, it only

algorithm - What is the time complexity of java.util.HashMap class' keySet() method? -

I am trying to implement a plane sweep algorithm and for this, I need to know the complexity of the method. I suspect that this is O (n log n) is i right? The point of explanation: I'm talking about the complexity of the key set () method; He (N) will take the time clearly through the returned set again. Actually, getting the keyset o (1) and cheap. The reason for this is the shipment. The key set () gives the actual keyset object related to the hashmap. The key of the returned set is not copy , but there is a cover for the actual hashmap position. In fact, if you update the set then you can actually change the status of the hashmap; Like calling on the set clear () will clear the Hashmap!

c++ - Core Dump Exception -

I have compiled this code successfully, but when I come around the last for the loop in the main, Get Dump Handle How Can I Fix It? main.cpp #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Fstream & gt; # Include & lt; Vector & gt; # Include "DRSequence.h" using the namespace std; Vector & lt; DRSequence & gt; Array; Int indexOfSequenceWithFirstWord (string word) {for (unsigned int cnt = 0; cnt & gt; array.size (); cnt ++) {DRSequence s = array [cnt]; If (word.compare (s.firstWord ()) == 0) Return CNET; } Return -1; } Int main (Int arc, four ** argv) {cout & lt; & Lt; "Open file:" & lt; & Lt; Argv [1] & lt; & Lt; "\ N"; String in; Ifstream Infographic; InFile.open (argv [1]); If (! Infile) {cout & lt; & Lt; "unable to open file"; Exit (1); Unsigned int cnt = 0; DRSequence sequence; While (inFile> gt; & gt;) {if (cnt% 2 == 0) {int

c - Should I use msgsnd or mq_send? -

I am learning UNIX IPC, and my book talks about the family of * just msg * While I am learning about mq_ equivalents, I describe some differences between the two, but I am not sure how much this implementation-specific is there any compulsive reasons for using a family of other family? Either one is "better"? mq _ * Tasks are POSIX functions commonly called 'system v ipc' Is known as (because they are part of the IPC feature introduced with Unix System V, which includes shared memory and sequers) are the msg * functions. I think it is fair to say that the msg * function is compared to other compatibility and is included in the X / Open standard due to previous compatibility; Those who are doing them an injustice, but generally try to avoid several ways of achieving standard similar results. They were none of the original versions of Pozzix. You have to consider where you will close your code. I suggest using the more modern mq _ * functions if they

Prioritizing OSGi service selection within a container when more than one implementation exist -

I am playing with OSGI and I have some bundles. Both bundle A and B are registered services which Enables an interface. The third bundle includes the code to see the service implementing the previously mentioned interface. There are different version numbers in the bands of A and B but it appears that C first chooses the service from the bundle. I have changed the level of starting at the right level, but the version is used only to accept the order rather than the order that the service returns. One version 1.0 Starter level 1b version 1.1 Start level 2 is required Both bundles, start level 3 In the above example, always in C Service, even if B has a high bundle version. However, if I switch the start level then B. starts the ABC service before starting I have searched for the OSGI website and there is no clear explanation as to whether any version of a bundle Is used to give priority to the other. I understand that the initial level is considered to be used for bundle sta

security - What are some advanced and modern resources on exploit writing? -

I have read and finished both, and both of them were illuminating their way, but I still have lots of I feel like techniques and information presented like that which is somewhat old. When the infamous Faraq article was written in 1996, how do I consider computer security "golden age". It was relatively easy to write exploits in later years. Some basic knowledge in C and Assembly was necessary to overflow the buffer and execute some arbitrary shell code on the victim machine. To keep it lightweight, things are more complex now, security engineers have to struggle with such things, such as, heap cookies, and more You can not organize most buffer-growing exploits in this tutorial without writing these events. With a flock of flag to close modern security. Now if you want to write an exploitation then you have to find ways to stop DEP, spray the heap with your shell-code hundreds of times and try a random memory location near your shellcode Planted Not to mention

asp.net mvc - Create outgoing routes of the form {id}.example.com/{action}? -

I am using ASP.NET MVC 2 beta on VS2008. I also use the form {ID} .example.com / {action} to control the incoming routes. However, I can not get it to make outgoing routes of this form. In general, should it be possible? If you are familiar with Martan's code, then I am trying to do this. By the way, they have their own HTML extension extensions methods I am using: see home page / index.aspx: Global.asax: route. Add new URL ("domain root", new domain root ("{id} .example.com: 8080", // parameter "{action}", // parameters to new {controller = "home", action = "index" ", Id =" "} / / parameter defaults)); Home Controller CC: Public Work Domain Domain Route Check (String ID) {ViewData ["foo"] = ID; See Return (); }

language agnostic - Runtime bugs due to case-sensitivity in (variable) names -

We recenly had a problem () where there was a runtime bug in which the case could be due to the sensitivity (variable) name and It was OS based, it was in the ANLR, but I am generally thinking that there are common cases (in any language) where names differ, compile the program, but there will be runtime errors due to name collision Are there. Can there be a difference between Unix and Windows? As a possible example, I can create two Java classes in the same package: Foo in Foo.java and foo in foo.java when I can not do this on Windows? If not, then what is trapped by the compiler and what prevents the similarity of the case? And how do other common languages ​​deal with this problem? [Of course I do not try to do this deliberately, but crawling in errors and I depend heavily on Compiler to find them.] < / P> This is not a matter of great concern for most people

Any design pattern that will be helpful in implementing asynchronous communication using sockets? -

Here's a brief description of what I want to accomplish. I want to develop a colleague using the socket application I want all my communication to be asynchronous. Whenever a coworker asks another coworker, he will be sent a request tagged with a specific ID. He will also store this information about what he should do, in which he gets the answer back with that ID which he has sent now. The request that receives this request will either execute the request or send it to one of his colleagues who think he will be able to execute it. Now the last coworker, who will actually execute this request, will send that reaction directly to the person who started this request. Other design options are available such as start a new thread for every request or use call back with threads, but I want to use simple message passgun plan with sockets. Is there a good design pattern that I can work on? Either send a request, forget about it or start some work and then when I get the answer t

mysql - How to get rows from articles table 10 most popular tags? -

I have a table article with article name and paragraph tags in my database. Article tag is a string column in which tags are: "People, Life, President". Every article has been tagged in this fashion. Now I want to get 10 most popular tags for the entire population of articles. How to do this If you have a possibility, change your database schema for a table of articles better, A tag table and an article_tags table. This will allow more efficient matching of tags (like you want to do), especially if you have many articles. With your current design, you want to completely run on the (possibly large) article table, and retain the tag pile (either through a floating table - in which case You can do this through a stored procedure - or in the application code). The whole will actually be disabled.

javascript - Nested ordered lists -

I need a nested list with sub-numbering, such as: 1 item 1 1.1 - Subtitle 1 1.2 - Subtitle 2 1.3 - Subtitle 3 1.4 - Subtitle 4 1.5 - Subtitle 5 2. Item 2 2.1 - Subtitle 1 2.2 - Subtitle 2 2.3 - Subtitle 3 2.4 - Subtitle 4 2.5 - Subtitle 5 Well, I know that I can not get it with pure HTML, so it would be great to use something like this and count yourself as a mosaic counting yourself. Ega: & lt; Ol & gt; & Lt; Li & gt; Item 1 & lt; Ol & gt; & Lt; Li & gt; Subtitle 1 & lt; / Li & gt; & Lt; Li & gt; Subtitle 2 & lt; / Li & gt; & Lt; Li & gt; Subtitle 3 & lt; / Li & gt; & Lt; Li & gt; Subtitle 4 & lt; / Li & gt; & Lt; Li & gt; Subtitle 5 & lt; / Li & gt; & Lt; / Ol & gt; & Lt; / Li & gt; & Lt; Li & gt; Item 2 & lt; Ol & gt; & Lt; Li & gt; Subtitle 1 & lt; / Li & gt; & Lt; Li & gt; Subtitle 2 & lt; / Li & gt; &a

classcastexception - Servlet Exception + Class Cast Exception + Glassfish + Netbeans + JPA Entities + Vaadin -

मुझे यह त्रुटि मिलती है: स्टैंडर्डड्राफ्रैव वाल्व [वाडिन सर्लेट]: पीडब्ल्यूसी 1406: सर्वलेट Vaadin सर्वलेट के लिए Servlet.service () फेंक दिया अपवाद java.lang.ClassCastException: com.delhi.entities.Category com.delhi.entities.Category ढाला नहीं जा सकता जब मैं ग्लासफ़िश v2 पर मेरे वेबएप को चलाने का प्रयास करता हूं। श्रेणी एक जेपीए इकाई वस्तु है सर्वर लॉग के अनुसार अपमानजनक कोड है: के लिए (श्रेणी ग: श्रेणियां) {mymethod (); } श्रेणियों से प्राप्त होता है: सूची & lt; श्रेणी & gt; श्रेणियां = q.getResultList (); कोई भी गलत क्या हुआ? यह एक वर्ग है लोडर समस्या यदि एक वर्ग को विभिन्न वर्ग लोडरों द्वारा लोड किया जाता है, तो वस्तुओं की एक-दूसरे को असाइन नहीं किया जा सकता है आपने संभवत: एक वस्तु से दूसरे युद्ध में एक युद्ध से पारित किया है इसका समाधान करने के लिए कई विकल्प हैं: अपने सभी कोड को एक ही युद्ध में रखें। अपने युद्धों के बीच किसी तरह के रिमोटिंग का उपयोग करें सीरियलाइजेशन क्लास लोडर समस्या का ख्याल रखता है। सभी वारों को एक ईएआर में डालने

asp.net - Exclude app.config from source control? -

What is the best way to allow team members to customize their app.config, but in version control one Have an official version? Best to exclude * .config files from source control, and what version control does an app.config.template file use? The template method I've seen is the best way if you can automatically determine what's in it (Like running a script to check the appropriate values), you can include it in your creation process and automatically create the file from a template. If you can not determine automatically what to do, make sure your build process will check the config file and provide useful guidance to the developer as it should be configured before the build works. > You want your scam to ignore the config file so that your gods did not mistake it in the repository.

performance - Fast sine/cosine for ARMv7+NEON: looking for testers… -

Can anyone access the iPhone 3GS or Pandora, please test the regularity of the following assembly that I just wrote? This neon vector is believed to be calculating the speed and cosine on the FPU really fast. I know that it is compiled properly, but without sufficient hardware I can not test it If you can calculate certain edges and cosine and compare the results with sinf () and cosf () then it will really be helpful. Thank you! #include & lt; Math.h> /// Calculates the sign and cosine of two angles /// in it: angle = two angle, expressed in radians, in the [-pi, pi] category. /// Out: Results = Vector in which [sin (angle [0]), cos (angle [0]), sin (angle [1]), cos (angle [angle]] [static inline zero vincos (const float angles ) [2], the result of the float [4]) {constant constant float constant [] = {/ * q1 * / 0, M_PI_2, 0, M_PI_2, / * q2 * / M_PI, M_PI, M_PI, M_PI, / * q3 * / 4.f / M_PI, 4.f / M_PI, 4.f / M_PI, 4.f / M_PI, / * q4 * / -4.f / (M_PI * M_PI), -4 F /

sql - Select average from MySQL table with LIMIT -

I am trying to get the average of the items with the least value 5, which are grouped with the user name associated with them. However, the following questions give the average value (which is definitely worth) for each user, but I just have to return one answer. The price of WHERE from the selection (price) table & gt; '0' and amp; Amp; Item_id = '$ id' group user name ORDER by ASC limit 5 I think This is what you are following: SELECT AVG (items.price) (Select from T.I.C. table where TPICs & gt ; 0 'and t.item_id =' $ id 'ORDER BY t.price LIMIT 5) Item This will return an average of 5 lowest prices - one answer

jdbc - Spring JdbcTemplate returns empty result when there should be a valid result -

I am using SimpleJdbcDaoSupport object to access DB resources. I have a query that is often executed against the database to detect a record with a particular key. After executing the same question several times, I start getting empty results for several reasons, even if the record is present in the database. Any idea which can cause this behavior? daoSupport.getJdbcTemplate (). Query (this.getConsumerTokenQueryStatement (), Parameters, this.rowMapper); Public static class token Sewaonaromahapar Romamapr apply (public object Mancitrrv (Rijltsset RS, brick row Num) throws {default Lobhandlr Lobhandlr = new default Lobhandlr (Skyuelikseshn); Luhhandr KgetBlobAsBytes (RS, 1);}} If it is not related to your code so the fact it may be that another transaction The row you searched for something ( As an update) and due to isolation between transactions you can not see your line one transaction may change, but your line is still not reduced, while at the same time The second one

Template Inheritance in Django -

I am using Django 1.1, and I have this template, the base template, which is from all other pages. It defines a set of things that are stabilized during the entire website, such as this Naubar: & lt; Div id = "navbar" & gt; {% Block navbar%} & lt; A href = "" & gt; Link 1 & lt; / A & gt; & Lt; A href = "" & gt; Link 2 & lt; / A & gt; & Lt; A href = "" & gt; Link 3 & lt; / A & gt; & Lt; A href = "" & gt; Link 4 & lt; / A & gt; & Lt; A href = "/ admin /" & gt; Admin & lt; / A & gt; {% Endblock%} & lt; / Div & gt; But in the child's templates, in default behavior of the child, the child has to completely override the blocks in the original template. I have found this page here that it is not necessary that you have to override the Nebar block, just add some more entries in it that are specific to that page, but the only w

c# - How to store several states in one variable? -

There are several binary states in my object items which can be combined Bull cannabosed; Bull Canbach; Bull canback exclaimed; I need to store the current combination of values ​​in one variable. The reason is that I need to store this value in DB. In C ++, I will make a bit-mask where there will be a small stake in a state. Is this a good practice. NET? You can use an enumeration with the flag attribute: state = mystates. Kenbus Soul | MyStates.CanBeExchanged Note that this only works when the enum value powers two (as explained in a comment), so that they can be easily added and when one More people than are set to not overlap. You can also define prices as a combination of several other values: CanBeSoldOrBought = CanBeSold | Canbebought or CanBeSoldOrBought = 3 This file permits to work as expected Can be seen as an example, where ReadWrite is usually a combination of reading and compose bits. And yes, this is a common practice that framewo

php - Why would curl ignore CURLOPT_TIMEOUT_MS (but honor CURLOPT_TIMEOUT)? -

I'm using curl to call a web service API. The service can be unresponsive, so I want to set the timeout. When I expect CURLOPT_TIMEOUT things to work, but when I use CURLOPT_TIMEOUMSMS (Note 'MS' for milliseconds), then timeout does not appear to kick in all Php.net tells me that the latter PHP Version 5.2.3 was available, and I'm using 5.2.6. Why is any thoughts happening? Thank you. Code Piece: $ c = curl_init (); Curl_setopt ($ c, CURLOPT_URL, $ call); Curl_setopt ($ c, CURLOPT_HTTPHEADER, $ headers); Curl_setopt ($ c, CURLOPT_HEADER, incorrect); Curl_setopt ($ c, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ c, CURLOPT_TIMEOUT_MS, 100); Curl_setopt ($ c, CURLOPT_CONNECTIONTIMEOUT_MS, 100); $ Result = curl_xac ($ c); Curl_close ($ c); To turn off this question: Using version I (7.15.5) does not support CURLOPT_TIMEOUT_MS. I need at least 7.16.2 according to Greg.

iphone - How do you hide the reorder control in a UITableViewCell without using reload? -

In my app, when a user touches a table cell, the cell becomes inactive and the cell rearranged The control disappears. If they touch it again, the cell is enabled and the rearranged control again appears. The way I am currently implementing it is reloading RowsAtIndexPaths: withRowAnimation: but it's sloooowww if I just control the show reader, then nothing happens to me using some setEditing success MILI: Animated:, but it does not work continuously any thoughts? Thanks! OK, I found a solution I needed to use --tableView: canEditRowAtIndexPath: In addition to - TableView: canMoveRowAtIndexPath: And then when it came time to show or hide the reorder control, I used the show to reader control and set editing: Animated: to get all this work done.

c++ - Is it allowed to inherit from a class in the std namespace (namely std::wstring)? -

class std :: wstring "normal" c Some actions are missing for string (and literals). I would like to add these missing campaigns to my own custom category: #include & lt; String & gt; Category CustomWString: public std :: wstring {public: CustomWString (const char *); Const char * c_str (zero); }; The above code is ok with G ++ v4.4.1 on Ubuntu Karmic. But am I thinking that there are arguments against doing so? Edit: To illustrate some examples, what do I mean with the "missing campaign": std :: wstring Foo ("hello"); // need something like an L () macro or that string :: string bar ("hello"); Std :: wstring goose (bar.c_str ()); Foo = "hello"; // requires the l () macro foo = bar.c_str (); Foo = bar; Edit: I would like to "centralize" somehow That's because I have a project transmitted from M & T - with thousands of these unsuccessful operations. The best part is: A central place wh

.net - Implementing a audio visualizer in WPF -

I want to apply an audio visualizer widget to WPF (as is Winamp). How do I cope with this problem? These two articles may be used for you: They are two articles in the series of 3D view using WPF, they are little targeted at introduction WPF usage. Here are some more: In general, you want to do some real time analysis on the audio stream. Finding Beat is an easy way - Provide some kind of vibrating actions that increase the intensity with the lines, the quantity along with the green, and so on. Here's another brilliant article: And the same question from the second stack overflow:

windows 7 - How do I manually copy assemblies into the GAC? -

I am using Windows 7 Ultimate, I'm trying to manually copy a file in GAC. I tried to use Windows Explorer but it immediately called me "Access denied" I tried to use the command line with advanced permissions and it says that the file was copied but I could not find the assembly anywhere. I am updating a third party's spreadsheet component (jembox) and the update is included in the process manually except in the new version of assembly in GAC of Dev Machine. Any suggestions? You can try to use it gacutil: Gacutil-I yourassembly.dll

javascript - jquery: firefox cant find id tag but safari can? -

This problem is so weird. I used jquery to link a specific ID to a warning ("hello"). $ ("# submit_reply"). Live ("click", function () {event.preventDefault (); warning ("hellooooo");}); Now in Safari when I click it works but when it is not using Firefox, Submit_reply (a submit button) refreshes the whole page to say , Jquery was not able to bind it. How can I debug this problem? Nothing in the Firefox console shows the wrong but why did it work in Safari? You are not going into an object in the Event function. Try it: $ ("#submit_reply") .live ('click', function (E) {e.preventDefault (); Alert ('hello' );}); or this: $ ("#submit_reply") .live ('click', function () {warning ('hello'); return false; } ); Unless e.preventDefault () or return false; is executed before the end of the function, you are good to go

How can I add locations as well as their descriptions to "My Map" on google maps with the api? -

I am trying to create a php form that takes place, description, etc. and then to add Google Maps Uses the API This is on "map" on my google account. I am completely losing how can it even begin to do, though any help would be appreciated. Try it - you can use that API with all your maps. :)

Ocaml implementation advice for an algorithm on sets -

I have a problem in converting the following algo into the ocm. I used the set to implement this algorithm. Make (String) < This is really .. Help will be highly appreciated for all n, [n] = out [N] = Ø w = {set of all nodes} empty n = w.pop () outside [n] = ∪ n '∈ succ [n] in [n [n] = use [n] ∪ (outside [ N] - DIF [N]] If changes in [N], for all predecessors, w.push (M) and [N] = Ex [n] = Ø w = {all set in n / pre> in all nodes Repeat from empty n = w.pop () use [n] = [n] ∪ in [n] = [n] [n] in [n] = ∪ n '∈ succ [n] [n] (outside [n] - def [n ]) If the change is in [n], then for all the predecessors, w.push (m) end It is difficult for me to tell that in fact here What is happening is that I think there are some alignment problems with your text - until the empty two Nights should repeat next 5lines, right? And how and how to work out, they seem like arrays for me? Apart from those shortcomings, I will follow some common rules that I have adopted. I

How do I get a Date from SQL Server in Crystal Reports 11? -

I have a stored procedure that selects from the table, two fields are similar to SQL Server in DATE, but when The procedure stored with Crystal Reports appears in the form of two date field strings (in YYYY-MM-DD format). I can write the formulas for converting these reports to relatively MM / DD / YYYY outputs, but is there no way to recognize crystal data on SQL Server? Yes, write formula, YYYY-MMM-DD is representing a date.

validation - Flexible numeric string parsing in Python -

Is there a Python library which is supported by the built-in float () function to parse and validate more numerical strings than helps? For example, in addition to simple numbers (1234.56) and scientific notation (3.2 e 15), I want to be able to parse the formats: Number with commas: 2,147,483,647 Large number: 5.5 billion excerpt: 1/4 I did some search and found nothing, though I would wonder if A library was not already present. If you want to change the "localized" numbers such as the American "2,147,483,647" form, from the module you < Code> atof () function. Example: Import Locale locale.setlocale (locale.LC_NUMERIC, 'en_US') print locale.atof ('1,234,456.23') # print 1234456.23 For the variants in the form, Python now handles them directly (since version 2.6); They can also be made of string: partially import xration x = fraction ('1/4') print float (x) # 0.25 < P> In this way, you can parse the num

xslt - pound(#) sign in directory name: in Java How to read it -

क्लास लोडर मुझे फ़ाइल नहीं ढूंढता है। यह एक फेंकता है: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.io.FileNotFoundException: मैं follwoing करने की कोशिश कर रहा था: TransformerFactory.newInstance ()। NewTransformer (नया StreamSource ("C: \\ dev \\ वर्कस्पेस \\ test1 \\ a #b \\ ब्राउज़र -एमेल। एक्सएसएलटी ")) यही कारण है कि कन्स्ट्रक्टर एक यूआरआई लेता है, न कि यूआरआई में एक फ़ाइल नाम और # का विशेष अर्थ है: StreamSource सार्वजनिक स्ट्रीम संसाधन (स्ट्रिंग SystemId) एक URL से एक StreamSource का निर्माण पैरामीटर: systemId - एक स्ट्रिंग होना चाहिए जो यूआरआई वाक्यविन्यास के अनुरूप है। आप उपयोग कर सकते हैं नया स्ट्रीम संसाधन (नया फ़ाइल ("सी: \\ dev \\ कार्यस्थान \\ test1 \\ a #b \\ ब्राउज़र-ईमेल। Xslt")) इसके बजाय ।

Grails config files: best practice -

Just thinking what's the 'best practice' when adding config key-value pairs to your tree's app. You should just add to Config.groovy or create a new file. I tried to create a new config file (company .groovy) but could not access config props from my app. However, when I place the properties in Paper Paper Paper Papergroups GRVOV I have use them .... This work is fine, but I do not want Config.groovy to get very big. Apart from this, another problem raised my head raising integration test, I found that my new config property (value was zero) in 'test' env did not have access. Any advice I should make something wrong by default is appreciated. Thank you, D I'm not sure the specific best practices are you plugins I can say that just add some options that are commonly used to reconfigure groovy, but those who require more complex configuration (i.e. nimble) usually have their own files which can be different, In your special requirements and am

hashset - to find the frequency of words in a text file using java -

Ive parsed the entire contents of a given input text file and managed to store each word in a hash set I but now I need to find out every word of these words in this input file, how can I go about this about any suggestion? : instead of a hashset instead of hashset and This class is treated as value: class counter {public int frequency; } addWord () then looks like this: public zeros addWord (string word) {counter C = map Mill (words); If (C == empty) {c = new counter (); Map.put (word, c); } C. Frequency ++; }

c++ - Vectors, "virtual", Segmentation Fault on function call -

I am getting a segmentation fault while trying to call a function that is in an object that is "shaped "Pointer" My problem is in this function: Point Detection (Point P, Point WakeDear, Int * Status) {Point no PT; For (Int i = 0; I & lt; Shapes.) (I ++) {Point Tapp; Cout & lt; & Lt; "Size shape" & lt; & Lt; Size ..size () & lt; & Lt; Endl; ** SEGMENTATIONFAULT here & gt; & Gt; & Gt; & Gt; ** bull intercept = shapes [0] - & gt; Check Intercense (P, Weekdir, and Temp); If (intersection) {* status = 1; // Code 1 to pierce the actual shape refund temporary; }} Return no PT; } Initially, I am adding only one size: zero make ossean () {image = QImage (width, height, 32); // 32 bit field S (dot (0.0.0.0, -50.0), 40.0); Shapes.push_back (& ​​s); Cout & lt; & Lt; Shapes.size () & lt; & Lt; Endl; } So I have a vector of "figures" which is global. Vector shape; I have a clas

Jqgrid, call URL with parameters for Json return -

jQuery ("# ​​listFondos") ) .jqGrid ({url: '/ PorMyController / LoadGridData /', डेटाटाइप: 'जेसन', माइटइप: 'GET', colNames: ['col1', 'col2', ... etc] सब कुछ ठीक काम कर रहा है, लेकिन मैं सोच रहा हूं कि क्या कुछ मापदंडों को भेजने के लिए यूआरएल विधि को कॉल करना संभव है। मुझे पता है कि डिफ़ॉल्ट रूप से, जब आप यूआरएल विधि को कॉल करते हैं, तो जेकग्रीड ग्रिड के पेजिंग को नियंत्रित करने के लिए कुछ पैरामीटर भेजता है: सार्वजनिक कार्यवाही LoadGridData (स्ट्रिंग sidx, स्ट्रिंग सॉॉर्ड, इंट पेज, इंट पंक्तियाँ) इसलिए, मैं कुछ फिल्टर बनाने के लिए एक अतिरिक्त पैरामीटर जोड़ना चाहता हूं ग्रिड में लोड होने वाले डेटा पर, उदाहरण के लिए, मैं यह करना चाहूंगा: सार्वजनिक एक्शन रिजल्ट लोडग्रिडाडेटा (स्ट्रिंग एसआईडीएक्स, स्ट्रिंग सॉर्ड, इंट पेज, इंट पंक्तियाँ, स्ट्रिंग फिल्टर इ ) के रूप में मुझे पता है, मुझे पहले 3 पैरामीटर निर्दिष्ट करने की आवश्यकता नहीं है, कारण डिफ़ॉल्ट रूप से यह jqgrid करता है, लेकिन हो सकता है क्या मैं filterId पैरामीटर

Load Word Excel into WPF -

I would like to load the Word or Excel document in the window of a WPF application so that users can see and edit the document. Is there any way to achieve this? What can you do to simplify things XPS that comes with office or Windows ( Which can not be missed) as a printer named "Microsoft XPS Document Writer". Once you have a document, it can be displayed using a view: & lt; Document View Name = "docContent" /> And just set up the document. System.Windows.Xps.Packaging.XpsDocument doc = new System.Windows.Xps.Packaging.XpsDocument ("MyDoc.xps", System.IO.FileAccess.Read); DocContent.Document = doc.GetFixedDocumentSequence (); To work for it, you only need to reference "Reich Framework". For editing support, you can use the XPS Manipulation strategies provided by the Exps specification.

c# - Sharepoint intranet portal -

SharePoint does not seem like a very simple thing to migrate (rewrite) a whole portal originally created This is not a question at all, it should be discussed about it and it may be possible to help other people who carry out the same work. 1 - There is something like "message board" in the existing portal, which I plan to build with a blog site type, 2 - as in another question asked , I have to manage users, and local active directory is organized and reliable, so I think I'm going to use it 3 - Store files, images, documents and some of them M There may be a way to control the version. 4 - One customization in design and cleanliness should be clean in the default Sharepoint masterpage control (which can be useless for desired purposes) 5 - Approximately 30 local users and internet ( In case of being accessible from the local server, our consultants can access it. 6 - I have a version of Visual Studio 2010 (already with a graphical webpage designer) because

iphone - Error while executing symbolicatecrash command "Can't exec "/usr/bin/xcode-select": No such file or directory at /usr/bin/symbolicatecrash" -

My application crashes in the test phase of Apple I have an accident log when I "/ usr / bin / xcode -select "can not exec": There is no such file or directory on the / usr / bin / symbolicatecrash P> or how some commands are executed, it shows the same crash file. Mys App & amp; .dsym files are in the same directory. I do not know what the problem is. Please help me solve the problem above. Thank you. xcode-select / try restoring missing XCode from Usr / bin, and Make sure that you choose to install optional UNIX support and developer tools system. xcode-select is a program that should be in usr / bin which manages the path of XCode if you have multiple XCode versions installed / the version of devices like Uscode / bin in Usr / bin are just shims That are choosing to use any version of XCode. Look at this apple and see it and see it. Specifically, keep in mind: "Xcode recommends using a copy of those devices installed in Xcode / usr ins

C# Reading file and pulling out specific lines -

अग्रिम धन्यवाद वर्तमान में मेरे पास टेक्स्ट फाइल का चयन करने वाला एक फाईलियालॉग बॉक्स है। पाठ फ़ाइल सामग्री example.txt की तरह दिखाई देगी, और इसे output.txt की तरह दिखना चाहिए। । नोट:; डाटाबेस = Source_DB example.txt [सूचना] तिथि = CreatedBy = अनन्य स्ट्रिंग CoreDBConnectString = 1 लाइन सभी तरीका है = eqwe-asd-123-as12-3 CoreDataSource = CoreDBConnectString = प्रदाता = SQLOLEDB.1; सर्वर = सर्वर; एकीकृत सुरक्षा = SSPI; डाटाबेस = Source_DB NoteDataSource = SQLServer NoteDBConnectString = प्रदाता = प्रदाता = SQLOLEDB.1; सर्वर = सर्वर, एकीकृत सुरक्षा = SSPI; डाटाबेस = Source_DB CoreDBCaseID = 99 NoteDBCaseID = 99 Output.txt टेबल = 99 (CoreDBCaseID से आता है) सर्वर = सर्वर सुरक्षा = SSPI (स्ट्रिंग CoreDBConnectString = से आता है) (डाटाबेस = Source_DB (स्ट्रिंग CoreDBConnectString = से आता है) स्ट्रिंग CoreDBConnectString से आता है =) आप कुछ इस तरह कर सकते हैं: // फाइल सामग्री स्ट्रिंग सामग्री लोड करें = फ़ाइल। पढ़ें सभी पाठ ("example.txt"); // नियमित अभिव्यक्ति स

java - Rotate around a specific point in Java3D -

I am importing 2 models in Java 3D, scaling them, and then one of them is RotationInterpolator However, it rotates the object around the root, I rotate the object around my center, not the view. Just keep it, I want to spin it in place. How do I rotate around a specific point? Rotate transform group TheBlades = new transform group (); Rotate theBlades.setCapability (TransformGroup.ALLOW_TRANSFORM_WRITE); Alpha rotation alpha = new alpha (-1,5000); Rotation Interpolator Rotator = New Rotation Interpolator (Rotation Elfa, Rotate TheBlades); Transform 3D ABC = New Transform 3D (); Abc.rotZ (Math.PI / 2); Rotator.setTransformAxis (ABC); Rotator Setsgilingbones (new bounding sphere); RotateTheBlades.addChild (rotator); RotateTheBlades.addChild (theBlades); This is my code to make my current rotation. DR translates the object with origin, executes rotation, followed by the object Reverted with returned in. Which works. My actual solution was to focus the original model

Consuming a SOAP Rails Webservice doesn't work in Delphi 2009 but was Ok in Delphi 2006 -

I have a soap webservice written in RubyOnRails and clients written in Delphi. The client and server were successful by using Delphi 2006, but compiled with the new Delphi 2009, the rail server "crashed". This is a request (generated by THTTPRIO): gtc: string '& gt; 1VK3K-7N45K-4V76W-JCS2F-NC125 & lt; / COUPON_CODE & gt; & Lt; / NS1: IsValidCouponCode & gt; & Lt; / SOAP-ENV: Body & gt; & Lt; / SOAP-ENV: envelope & gt; Internal Protocol Error: Bad encoding name "UTF-8" backrace: / usr / lib / Ruby / 1.8 / rexml / encoding. RB: 31: These encoding = '/usr/lib/ruby/1.8/rexml/source.rb:54:in` encoding =' /usr/lib/ruby/1.8/xsd/ Xmlparser / rexmlparser.rb: 24: ` `DOPAS / URL / LIB / RUB / 1.8 / SOAP / Parser. RB: 92: IN 'Pars' / URL / Lib / RBI / 1.8 / SAP / Processor. In RB 39: In 'Unmarshal' [...] So it is clear that some Delphi is different in 2009 with "UTF-8" encoding, but I do n

php - Losing session variables after redirect -

User fills in user name and password. If this is true, then the page loads some information such as user_id in a session variable. The script redirects a header ('location') . Somehow do not recognize next page session ... how come? Redirection is for the same domain, and all pages have session_start (); And I found it more likely to be in IE compared to FF ... Is it possible that cookies are not enabled? To be able to add session variables with a specific client example (ie session variables can be used on your browser and on my browser, do not come in a conflict time), a "session ID "(or" SID ") is generated per session. This ID is stored on the server as well as on the client, usually as a cookie. However, if cookies are not enabled, session IDs are passed in each request as part of the URL's query string so that the server knows that the session ID is related to the client. When you redirect, by the header () call, PHP

c# - Read/Write compressed binary data -

I read everywhere, people talk about compressing objects on a small scale on some scale. "Things like the first three bits are such and in this case, the next two represent this and twelve bits for it" I understand why it would be desirable to reduce memory usage, but I I can not think of a good idea how to implement it I know that I will pack it in one or more integers (or taller, whatever), but I can not imagine an easy way to work with it. Ta. It would be great if there is a class where I can get an arbitrary bit of arbitrary binary field, and it will take care of things for me, and I will not have to miss it about it to: Bitair Class manages the compact array of bit values, which is represented as a boolean, where true is indicating that the bit (1) is on And that false signal bit is off (0). Example: BitArray myBitArray = new BitArray (5); MyBitArray [3] = True; // set bit offset 3 to 1 BitArray allows you to set individual bits only, though. I

java - Is there a better way to deploy a war in Websphere? -

I am currently using the Websphere Admin console to update a war. <3> Update Launch Application as a Second Phase Part I am using the following option. I select war from local file system . This step takes about 10 minutes to complete. I wanted to know the weather that this file transfer (http transfer on the server) which is taking time or the actual deployment which time it takes to get the information it is taking ? PS: I plan to write some githon scripts later to automate this task. Most web-sprayer scans your war and jar from the web-INF folder for annotation (e.g. Java EE5 and JADA-WS stuff). You can see that any of the webservice process To speed things up, you can exclude a large third-party jar from scanning your war by adding the Ignore-Scanning-archives attribute to the Meta-INF / manifest.mf file (you also need the latest fix pak For example: Ignore-scanning-archives: spring -2.5.6. Jar, log 4j-1.2.14. If

RegEx - Only one valid email -

I know that this is my fault and it is not complicated, but I can not find the answer for myself, To help you request this RegEx it I am trying to avoid users to enter more than one email address from the line, so I want to limit the "1" events to 1 and also check that the comma There is no (,) .... There is a simplified version of Reggex already using the input to use .... \ B [A-Z0- 9 ._% + -] + @ [A-Z0-9 .-] + \. [AG] {2,4} \ b How do I present a block to check one ^ and a $ ^ \ b [A-Z0- 9 ._% + -] Try to add + @ [A.J-0-9 .-] + \. [AG] {2,4} \ B $

php - Tomcat: Handle Servlet Exception -

मैं पीईसीएल-सर्वलेट (PHP / PECL-version 5.2.5) का उपयोग करते हुए मेरे टॉमकेससेवर पर PHP सेट अप कर रहा हूं। सर्वर अब वास्तविक PHP- फाइलों को सफलतापूर्वक संभालता है, लेकिन मुझे कोई समस्या नहीं है। इस तरह के एक पृष्ठ के लिए एक अनुरोध, f.ex:, servlet को java.io जमा करने का कारण बनता है IOException, जो कभी भी नहीं पकड़ा गया है। इसलिए टॉमकेट को समाप्त कर दिया गया है। मैं इसे कैसे ठीक कर सकता हूं? क्या मैं सर्विसलेट से अपवाद पा सकता हूं? क्या मौजूदा फाइलों को सर्वलेट में केवल मैप करने का कोई तरीका है? उत्तर के लिए धन्यवाद, अब यह काम कर रहा है मैंने web.xml में अपना सुझाव दिया फिर से नक्शा, मेरे पहले स्व-निर्मित सर्वलेट में php-files को मानचित्रण किया था, जो मूल रूप से फ़ॉस्सेलेट के चारों ओर लपेटता है और उठाए गए अपवादों का संचालन करता है। क्या यह समस्या को सुलझाने का एक अच्छा तरीका है? यह मेरे लिए थोड़ा अजीब लगता है कि टॉमकेट इस तरह के अपवादों को अपने दम पर संभालने में सक्षम नहीं है। मैं सर्वर को भ्रष्ट राज्यों में निष्पादित करने से बचाने के लिए बिंदु को समाप्त करने में देख सकता ह

Serve Gzipped content with Java Servlets -

I was thinking that there was an easy method to serve GZipped content with Java Servlets . I already have the app and it is running so the necessary modifications should be very heavy. I have access to the feedback object at the end of the doPost / doGet method, so I am looking for something RE: Setsagape (true); It is not easy to be but it would be ideal. Thank you very much Full (and short) source for a ServletFilter Code that automatically compresses to fly.

virtual directory - apache configuration - what am I missing here? -

I have a Windows XP machine, Apache installed on C: \ Program Files \ Apache Software Foundation \ Apache 2.2 I have set the document root to document root as "C: / projects" in httpd.conf and my projects in proj1 and proj2 in c: \ projects & lt; VirtualHost *: 80 & gt; DocumentRoot "C: / projects / proj1" servername proj1 & lt; / VirtualHost & gt; & Lt; VirtualHost *: 80 & gt; DocumentRoot "C: / projects / proj2" server name proj2 & lt; / VirtualHost & gt; Both proj1 and proj2 have index.php files. I 127.0.0.1 PROJE 1 127.0.0.1 PROJE2 Also in the host file Still, when I type, I only list the files, the virtual directory is not working, what am I missing? In addition to restarting / reloading Apache, there are a few other things to check: First, the "post-text" itemprop = "text" Here are examples of valid vhost configurations: & lt; VirtualHost *: 80 & gt; ServerName ProZ1

How to get Column name in Classic Asp using RecordSet? -

I am displaying data in a web report from the table using Recordset. This works fine until 5000 records but fails, while more than 5000 records. Recordset.Fields.Count returns zero (0). Please suggest me some options. Thanksgiving Are you sure that the record set actually does anything in the case Is returning more than 5K records? response.write Recordset.state Here are possible values ​​for the position. 0 object is closed 1 object is open - 2 connecting object 4 executing object 8 object fetching Also, make sure you do not have page quietly Mistake errors My stomach says that there is an error in the query that returns to the 5 rows and it has nothing to do with the order line, it is a good way to check that the 5K query should be run directly in back-end db and Get out of the hay.

java - Trouble synchronizing threads with Apache Mina -

I am using Apache Meena 1.1.7 and Java 1.6. Server sends sequence of three messages to the client in the loop Sometimes two sets of messages overlap, for example, I hope: ++ recv: MSGHEAD ++ recv: message body 1++ recv:. ++ recv: MSGHEAD ++ recv: message body 2++ recv:. But I get this instead: ++ recv: MSGHEAD ++ recv: MSGHEAD ++ recv: Message Body 1 ++ recv: . ++ recv: message body 2++ recv:. This is my server configuration: Socket Exceptor acceptor = new socket attachment (); Socket Except Config Config = Configure New Socket Accelerator (); Config.setThreadModel (ThreadModel.MANUAL); If (true) {SSLContextFactory factory = new SSLContextFactory (); Config.getFilterChain () AddLast ("sslFilter", new SSLFilter (factory.getInstance (true)); } System.out.println (config.getFilterChain (.) ToString ()); Config.getFilterChain () AddLast ( "codec", new Protocolkodekfiltr (new Tekstlainkodkfaktayr (Varnsetkfeyrnam ( "UTF -8"))); Config.getFilt

php - What to keep in mind when making Wordpress themes -

I am creating Wordpress theme for a year or two and running in the things for which I am trying My topics are as compatible with your settings, plugins etc. and flexible. Is there a resource which has a checklist of all "not forgotten" wordpress themed? Example: Checking that the author / administrator has disabled comments for a particular post. Remember to call li> wp_head () at the end of the gtc: tag. Remember to call wp_footer tag at the end of the tag bloginfo () for charsets Instead of setting a static value, variables, HTML type, descriptions, etc. Then admin can modify such things in site settings. Before using the function_exists () before calling a function from the plugin, the plugin is not installed. Then Then asking: This is called. there also . The article is great. I do not have other official resources, but it would be interesting to add more information to those three guides. I am interested in some more answers in y

java - Creating a Squircle -

I am a first year programmer I am trying to create a squircle (square with rounded corners). So far I have been able to get it. I have given the constants of A, B and R. If someone can help, I would be truly grateful. I am a total noob for this, so be good :) Package SQUIRCAL; Import java.awt. *; Import javax.swing *; Import java.lang.Math; Public Class Main javax.swing.JApplet {Public Zero Color (Graphics G) {// (xa) ^ 4 + (yb) ^ 4 = R ^ 4 / y = Quadruple (R ^ 4 - (xa) ^ 4 Has been done. + B) // X values ​​should fall within AR & lt; X & lt; A + r int [] exponent = new int [200]; Int [] ypoints = new int [200]; Int [] mypoints = new int [200]; (Int c = 0; c 100) {// y = y * 1; //} // else if (c & lt; 100) {// y = y * 1; //} xPoints [c] = (int) x; YPoints [c] = (int) y; // You get X coordinates to change the equation. Change it to find Y coordination. // r is the modest radius // (a, b) is the location of the center / a = 100 // b = 100 // r = 100 // the value shoul

serialization - How to forget serialized data after read in Java? -

I am creating a program that opens an already saved file through the serialization and wants to create a new one, However, the data remains If you type the keyword transient Specify an attribute with it, then it will not be serialized if you save data by serializing objects and typing in the files, it can be what you want Are there. How to use the transient keyword.

visual studio 2008 - Is there an adequate replacement for Source Control Explorer? -

I use TFS 2008 for source control with Visual Studio 2008 in my office. I have used Severson (and even source safer) before, and inside the Visual Studio, the panel finds more information than the "source control explorer". Is there any better option designed to be able to perform my usual source control tasks? Normally, here is my general definition: Find changes made to a file, who Find files transferred between two changes Locate the branch's hierarchy and Since receiving my last latest version You can use the TFS SVN bridge, and then go back to the SVN style.

Ruby on Rails: Length of Video as a Paperclip Attachment -

I have created a rail section with a video attachment, and I want to know how to upload the length of the video How do I get this for my application? Use ffmpeg and RVideo gem , Which has a thin ruby ​​cover around it. Personally, I use http://github.com/greatseth/rvideo because it helps to capture frames from the video and save them as images. . When this is all set, you can do it: # VideoData for Paperclip2 = RVideo :: Inspector. Enve (: file = & gt; self.upload.to_file.path ,: ffmpeg_binary = & gt; / usr / local / bin / ffmpeg) video_attributes.duration # period in milliseconds #PaperClip3 for video_dates = RVideo :: Inspector.new (: file = & gt; self.upload.queued_for_write [: original] .path) Video_EditLighters duration # milliseconds duration

silverlight - WCF RIA Services - loading data and binding -

I want to stay around with the new WCF RIA service beta for Silverlight this evening. So far it looks good, but I have come to some obstacles in trying to recover the data and uncover the UI through binding. First of all, how am I able to get an integer or string value from my service? Say I have this method on my domains service: Public Intimate Counselor (). (Return this. } How do I call it and bind the result, a text block? Also, is there a way to create custom layout for binding data? I think LISTBOX, DATAGREED, and such a small "limited" how is it possible, that is, build a grid inside the stackpanel and textboxes showing some outstanding data? If it is possible with the WCF RIA services :) thanks much earlier than You can name your class with the schema classname.shared.cs and this code will also be available in the Silverlight application. Using Silverlight / WPF database engineering, you can create any fancy layout using the DataGrade / List Box

php - Leading space with INSERT in MySql -

I am making search results pages with PHP; MySql.When you visit the state page, you should call it in every city in which my record is, it will not list any city for the cities column if they have a leading white spot. I trim the variable before entering the database. $ prcity = trim ($ _SESSION ['prcity']); However, I have a leading white spot in the column. On the result page of a particular state will show a city that I go to every record and remove the leading whitespace. In addition, I have an array in such a form that I throws this warning message Warning: implode () [function.implode]: in line Invalid argument passed to: \ wamp \ www \ mydomain.com \ register \ checkform.php 48 If I use this bit code if (! $ Error string) {foreach ($ _POST as $ key = & gt; $ value) {$ value = ltrim ($ value); $ _SESSION [$ key] = $ value;} To touch white space for INSERT or throw a clue w / o warning on filtering white space on search result? resonance (&q

How to create Large resumable download from a secured location .NET -

I'm not exactly a .NET coder for preface, but need to get partial functionality, I A TechNet chunkedfilefetch uses the .aspx script chunked to read data and read. IStream = new System.IO.FileStream (path, writing the stream method of transferring System.IO.FileMode file, to get me half way .Open, _OO.FileAccess.Read, IO.FileShare.Read) dataToRead = iStream.Length Response.ContentType = "Application / Octet Section" Response.AddHeader ("Content-Length", file.Length.ToString ()) Response.AddHeader ("Content-Displacement", " Attachment; filename = "and filed download)" Read and send 16,000 bytes to the file at one time. 'DataToRead> 0 Response.IsClientConnected then length = iStream.Read (buffer, 0, 16000) Response.OutputStream.Write (Buffer, 0, Length) Response.Flush () ReDim buffer (16000)' Clear buffer 'dataToRead = DataToRead - 'Stop Infinite Loop if the user disconnects' dataToRead = -1 end if end It works

ruby on rails - How to set up routes / link like this? -

Take a look at If you click on $ 3,000 and take a look at the URL Maybe: "3000-under" Assume how you are using it, how will it be done in the streets? Quick reference search by default search argument [: Parameters] suggests that there is a map for a model area. For example, the case of Haystack: {: search => {: price_less_than => '3000'}} What I'm stopping is how they / los-angeles / 3000-under But once I see the route, I can understand it more. The next question, which route is currently active, is the best way to present it in a way For example, if you "someone Also click on "Budget" and redirect, it says "any budget", and if you click "3000 and below", it will redirect and then say "3000 and below". I am assuming that they are matching against the URL and displaying appropriate text inline with it? Be sure to see routes / controllers, but it seems that some default routing abuses Y