Posts

Showing posts from August, 2015

java - Best way to protect url so that only defined party can interact each other -

I need to upgrade the jsp / struts application. We currently only have 1 web site (branch) and now I need to upgrade and build another web site that represents headquarters. Headquarter and branches can see 4 branches in Headquarters Headquarters page, separate domains. To use headquarter and branches we need to enter if the headquarters want to see the details in branch A, then we can click on the link like total attack: My question is how to protect the URL so that communication can be secured by the headquarters and branch_a server only? If we use that URL from any other IP then it should display unauthorized messages. I did the IP in the branch using the request.getRemoteAddr () but it is not secure enough. We need to login So you have a login system. As you are already asking this question, it seems like a home login system, otherwise you can configure container-managed authentication to check some URL-pattern for any logged-in user / roles. . You

Logging to a file on Android -

Text after " There is no way to recover log messages from an Android handset. I'm building an application that uses the GPS of my HTC Hero I can run and debug applications in Eclipse but it is not a good use of GPS, sat at my desk. I have the fire when I'm running around, I have an intermittent exception. Am no way can I make these exceptions output at Log.x ( "") on the SD card or output calls in a text file so that I can see that the exception is. Edit: Solution Here is the code that I went to ... Thread CurrentThread () SetUncaughtExceptionHandler (new Thread.UncaughtExceptionHandler () {@Override public void uncaughtException (thread, propellant ex) {PrintWriter pw ;. try {pw = new PrintWriter (new FileWriter (Environment.getExternalStorageDirectory () + '/ rt. log ", true)); ex.printStackTrace (PW); pw.flush (); pw.close ();} catch (IOException e) {e.printStackTrace ();}}}); I line to wrap pw = new PrintWriter (new FileWrite

Java generics why can't I instantiate a genericized type -

इस सवाल का पहले से ही एक उत्तर है: < / P> 11 जवाब मैं जेनरिक का उपयोग कर कुछ लिख रहा था और मुझे आश्चर्य हुआ कि मैंने यह काम नहीं किया: वर्ग foo & lt; T & gt; {टी इनरट्यूटी = नया टी (); } तो क्या मैं सामान्यीकृत प्रकार को इन्स्तांत नहीं कर सकता? क्या ऐसा करने के लिए कोई तरीका नहीं है? हाँ, यह बहुत ही कष्टप्रद है। मैं उपयोग के आसपास का काम क्लाइंट को नए foo & lt; T & gt; - यानी सार्वजनिक foo (कक्षा & lt; T & gt; myClass) तब आप इसके बजाय myClass.newInstance () का उपयोग कर सकते हैं।

Reduce git repository size -

I tried a good tutorial to reduce the repo size but none found it. How can I reduce my repo size ... it's about 10 MB, but this is the thing that allows only 50 MB and I'm not the one where my app is closest to developing. I added common suspects, vendors, doctors etc.) .gitignore Already though, I have recently added the same. Any suggestions? The only way to force the attachment to apply (to ensure: git gc --aggressive --prune = now ). You must also clean the repo, however do not forget, sometimes git gc can be alone! It can also be used after a filter-branch , removed from history (with profit ahead of space); See . But this means that no one is pulling your public repo so that the directory can be cleaned too. Finally, as mentioned and; Cleaning up Refael can help: Completion of git reflog - all - exccharge = now GIT gc --prune = now - agressive An even more complete and potentially dangerous solution is

database - ASP.NET Session State Service in Sql Server but w3wp.exe #private increasing -

I recently transferred our SAP.Net session status from InProc with SQL Server solution. I can see the session data can be inserted in the SQL data database. I am monitoring the w3wp.exe process using "private bytes"; "#Bytes in all stacks" display counter. As I navigate to the website, it sends the data in session, although the private bytes counter still climb on the server hosting the website? I thought session data was being written in the database and not being stored in memory? The managed byte remains constant, and I am sure that all the items in the session are managed types. Does anyone know why private bytes will still increase? The session is one of the many objects needed for an ASP.NET website. You have transferred the Samson Store to RAM and SQL, but there are many other objects needed to not mention the rendered pages themselves.

android - textNoSuggestions is ignored by 2.0.1 emulator -

textNo suggestions are ignored by 2.0.1 emulator ... am I doing something wrong? I'm using the stock setting that has 12 major softboards. See also Kru and Jack's answer android: InputType = "textNoSuggestions | textVisiblePassword" to

java - Native status bars -

Is there a way to create a native status bar in SWT that has been found in Windows applications : I have seen the status bar simulated using labels, but I am more interested in the true solution. org.eclipse.jface.action.StatusLineManager.createControl (), or getControl (), a status Line gives control. This control is definitely (native to SDT), being native.

iphone - ABPersonRef - usage -

Abipirenff is trying to create an object for example: ABpersonRef ref; This includes the addressbook and address book UI framework, so when I call it 'ABPsinerf' underdeveloped identifier, "post-text" itemprop = "text"> Have you imported into your source file? #import & lt; Address book / address book & Gt; #import & lt; Address Book UI / Address BookIH & GT; Edit Edit: I have read your question more carefully. There is no APPSerff type (at least public) in iPhone SDK with ABRecordRef type Should work which is normal for both person and group records - as you can all AB *** methods work with the ABRecordRef type.

c++ - Is there any emulator programming tutorial or guide? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 16 उत्तर संभव डुप्लिकेट मैं एक इम्यूलेटर (एनईएस या सी 64 हो सकता है, मैंने अभी तक निर्णय नहीं लिया है) प्रोग्राम करना चाहता हूं, मुझे पता है कि उनमें से बहुत सारे हैं तो बहुत से लोग पूछ सकते हैं कि किसी को किसी को खरोंच से क्यों बनाना है, लेकिन मैं चाहता हूं इसमें कुछ विशिष्ट विशेषताओं को शामिल करें, और खुद को खुद के निर्माण के लिए भी। मैं उस व्यक्ति से एक मार्गदर्शिका पढ़ना चाहूंगा जिसने एक बना दिया है और अनुभव संचारित कर सकता है, यह प्लेटफ़ॉर्म-विशिष्ट नहीं है (बेहतर नहीं है अगर यह नहीं है) क्योंकि मुझे पता है कि प्रोग्राम कैसे करना है, मैं नहीं कैसे अनुकरण करना है। < P> दोनों एनईएस और सी 64 8 बिट पर आधारित हैं 65xx प्रोसेसर उस चिप के लिए एक अनुदेश सेट एमुलेटर लिखना बहुत तुच्छ है क्योंकि निर्देश सेट छोटा है। बड़ा मुद्दा अन्य समर्थन हार्डवेयर, वीडियो नियंत्रक, आदि का अनुकरण करना है। C64, और मैंने कभी एनईएस प्रोग्राम नहीं किया, इसलिए मेरी मेमोरी धूमिल है जैसा कि मुझे याद है कि सी 64 में वीडियो या इंटरफेस के लिए

c# - Factorial task is incorrectly outputting zero -

I am having trouble in the dry part of a program, I can not find it, so my program is giving 0 in output . Here's my code: using the system; Using System.Collections.Generic; Using System.Linq; Using System.Text; Namespace Task_8_Set_III {class program {static zero main (string [] args) {int i = 3; Int c = i / fact (i); Console.light line ("is factorial:" + c); Console.ReadLine (); } Fixed int fact {if (value == 1) {return 1; } And {return (value * (fact (value - 1)); }}}}} You are dividing the integer variables you are 3 to 6 Are divided, which gets round in the next integer, which is zero. Instead of getting that value, instead of 'int', type 'double' which you may be looking for.

charts - Flex LineSeries interpolateValues as ZERO? -

In a line chart in Flex, you set a LineSeries set for interpolateValues ​​= "true" What this does is connects to unavailable values, so there is no lag in your line but what I want to do is to insert 0 for missing areas instead of drawing the straight line to fill the gap. Is there any way to set this up? Thank you! I do not think you can infiltrate among each other, maybe the data point may be I think a quick function on your dataprovider can fill the gap with 0s, and then you do not have to mess with the interpolation.

python - In wxPython, What is the Standard Process of Making an Application Slightly More Complex Than a Wizard? -

I am trying to create my first OS level GUI which is using wxPython. I have the book wxPython in action and I have seen the code demo. I have no experience with incident-based programming (different from some javascript), saifers, and all specific GUI elements. The book is organized somewhat weirdly and believes that I know more about OS GUI programming which I actually do. I'm much more recent for object-oriented programming. I know that I am clearly in my depth. My application is simple on the GUI side: mostly a set of reminder screens ("Turn on the scanner," "Turn on the printer" etc.) and background system In Python or web service killing files in the file system, but it is just so complex that the wizard class does not seem quite enough to cover it. I have to change the name on the "back" and "next" buttons, they have to disable on time, and even further. What is the standard procedure for an application like mine? 1) Create

.net - C# Invoke Action Cross Thread Access -

Greetings, new to programming I Currently my application is in another class / object Uses representative to process / execute methods. But I am getting an error stating that they were living in Separate thread. So after searching the web I came up with: this.Invoke (new action (representative) (this. It worked fine I do not know what's going on. I just pasted the code and it worked. Although currently I need to do this differently because the compiler says it is not> & lt ; Please take action in this action. Please advise how to apply it Thank you very much. Access to the Windows Forms Control naturally If you have two or more threads that are tampered with in the control situation, then it is possible to apply control in an inconsistent state. Other thread related bugs are possible, such as race conditions and deadlock. It is important to make sure that Access to your controls is done in a thread-safe way. This is a mandatory requirement to ma

Only Load Javascript if Supported -

I do not want my user to load a ton of JS files, if their browser does not support it if the browser Javascript supports only What is the easiest / easiest of the load SS scripts? In advance, thanks - js naob If Javascript is turned off, Code> src to and

data binding - N-N table and WPF databinding -

मेरे पास 3 डेटा टेबल हैं: उपयोगकर्ता UserID < / कोड>, उपयोगकर्ता नाम 1, चमगादड़ 2, जॉन आदि ... सदस्य < कोड> सदस्य आईडी , सदस्य 1, स्थानीय 2, क्षेत्र आदि ... उपयोगकर्ता मेम्बर UserID , MemberID 1, 1 1, 2 2, 1 आदि ... < / P> उपयोगकर्ता इनपुट XAML फॉर्म पर WPF में चेक लिस्ट बॉक्स को सदस्य तालिका के लिए बाध्य है मेरा प्रश्न: मैं यह चाहता हूं कि जब उपयोगकर्ता सदस्य प्रकार की जांच करता है, तो चयनित मान स्वचालित रूप से UserMember तालिका में डाला जाता है। और जब उपयोगकर्ता सदस्य प्रकार को अनचेक करता है, तो चयनित मान को UserMember तालिका से हटा दिया जाता है मैं यह कैसे WPF में कर सकता हूँ? यह किस तरह का निर्भर करता है आप ऐसा एक व्यू मॉोडल बना सकते हैं: सार्वजनिक वर्ग UserViewModel {int UserId {get; set;} संग्रह & lt; सदस्य & gt; सदस्य सूची {सेट; सेट;}} सार्वजनिक वर्ग सदस्य {bool _IsMember; Bool IsMember {वापसी प्राप्त करें _IsMember; सेट _IsMember = value; EditMemberStatus ();} सदस्य सदस्य {get; set;} स्ट्र

html - Add a Link Around an Embedded Flash File -

I want to create it so that when I click anywhere on the embedded flash element, I take me to a destination url . / P> This is my current code, which does not produce desired effect: & lt; Div class = "contentdiv" style = "margin: -72px 0ppx 0px; cursor: pointer," onclick = "location.href = 'http: //example.com/';" & Gt; & Lt; Object height = "410" width = "720" & gt; & Lt; Param name = "movie" value = "images / tri.swf" & gt; & Lt; Embed src = "images / tri.swf" height = "400" width = "700" & gt; & Lt; / Embed & gt; & Lt; / Object & gt; & Lt; / Div & gt; Right now it is making the click behind the .swf file clickable for the link, but the Flash element is not clickable. To edit the .swf file any way to do the right thing, please tell me that I do not consider myself a flash developer, but is there any existi

sql - What is better: to have many similar databases or one database with similar tables or one database with one table? -

I need to work with many data samples, say, N samples equal Represent data but from different origins For example, the history of order in different shops. So the structure of all the samples is the same. I have many possibilities to work with data: Use the N database with the same schema, one for each sample Use a database, but for example N sets of tables, for example, User_1, ..., User_N; Product_1, ..., Product_N, Order_1, ..., Order_N and so on. Use a database with a set of tables, users, products, commands, but each table represents an auxiliary column that represents a sample index. Obviously, this column should be an index. The final form seems most convenient to use because all questions are simplified. In the second case, I have a query as a parameter (this is possible?) (Stored procedures) need to send a table name. How would you advise? Performance is very important. Step 1. Obtain a book on data warehousing - since it's you're done ag

How do I can close/hide a frame based upon a button click event in wpf? -

I have two frames that require a second frame based on the button click event in the first frame, and the second frame load It is necessary to hide for the first time. Why do not you just navigate? You can use the navigationService.Navigate () button to use the event and navigate within the same frame, then you do not need a separate frame. Do you have any special requirements that you are using 2 different frames?

c# - WCF contract for Field level update -

I am developing an application that performs some CRUED operations through the WCF service, return method returns the whole unit , Updates are done through legacy system, and only changed values ​​should be updated. What is the best way to design data contracts for this scenario? The key-value pairs dictionary? The only thing I can think of is to create our component - that is, a file or In this way, in the database your status continues, on the updates you can compare the previous situation to pass the state. I'm not sure that this is a good way because this key-value will apply more overhead than simply being in pairs. From outside it may be more CRDD or whatever, but in practical terms, you can be better at passing some signals, as prices have changed.

auto increment - Simple Question regarding autoincrement operator in Java -

I know that from the C / C ++, the autoincrement operator has a different meaning at which it is applied (Example For: integer = i ++ vs integer = ++ i). Does the following two statements in Java mean the same thing? int i = 1 driverVO.setUid (String.valueOf (i ++)); // 1? driverVO.setUid (String.valueOf (++ i)); // 2? In the first example, I will increase after the rest of the statement. In another example, before that I will increase.

java - How do I remove implementing types from GWT’s Serialization Policy? -

इस प्रश्न के विपरीत: जीडब्ल्यूटी अवांछित प्रकारों को सीरियलाइज़ेशन नीति में जोड़ रहा है और मेरे जेएस को फूला रहा है । मैं अपने GWT श्वेतसूची को हाथ से कैसे ट्रिम कर सकता हूं? उदाहरण के लिए, अगर मैं जीडब्ल्यूटी आरपीसी सेवा वर्ग पर इंटरफ़ेस सूची डालता हूं, तो जीडब्ल्यूटी को जावास्क्रिप्ट उत्पन्न करना पड़ता है जो अर्रेयलिस्ट, लिंक्डलिस्ट, स्टैक, वेक्टर, को संभालती है ... हालांकि मेरा टीम जानता है कि हम केवल एक ArrayList को वापस करने जा रहे हैं मैं सिर्फ विधि का वापसी प्रकार ArrayList बना सकता था, लेकिन मुझे एक विशिष्ट कार्यान्वयन के बजाय एक अंतरफलक पर निर्भर करना पसंद है। सब के बाद, शायद एक दिन हम इसे ऊपर स्विच कर देंगे और उदासीन करेंगे एक लिंक्डलिस्ट उस स्थिति में, मैं केवल अर्रेइस्ट और लिंक्डलिस्ट के लिए संकलित करने के लिए जीडब्ल्यूटी सीरियलाइज़ेशन नीति को बल देना चाहता हूं। कोई ढेर या वेक्टर नहीं। इन अंतर्निहित प्रतिबंधों में एक बहुत बड़ा नकारात्मक पहलू है जो मैं सोच सकता हूँ: टीम का एक नया सदस्य वेक्टर वापस लौटना शुरू करता है, जो एक रनटाइम त्रुटि होगी। इसलिए शीर्षक के सवाल के

c# - How to only see "my" items on a list when using item Level permissions as a site owner -

In order to view and edit list name "user data" and to read and edit item-level permissions " for. How can I view only my own items in that list as a site owner when using the SharePoint object model? In fact, I want to store a small quantity of user data stored and display through a web part. SPList list = web.lists ["user data"]; If (list! = Null) {foreach (SPListItem item in list.Items) // // How to limit everything to admin accounts do not see anything // Perhaps instead or is using some SPQL? }} I think there is another interesting question, how would I tell if current users have "Manage List" permission and do some custom queries? So you have to look at some properties in the list to filter.

java - Windows Mobile 6 Application from WindowsCE -

I have a game written in Java on Windows CE, now I would like to upgrade to Windows Mobile 6.x You need either WinMo version of the exact same GVM version you are using in Windows CE Or you need to close your application in JMV which is supported on WinMo despite knowing that you are not running much against the GVM which you are running against.

java - Create a char from a string that contains the utf code -

I am trying to create four from the urf code. I am reading this code with a file which is a map of the characters All the characters are specified by their UTF code. 0020 Space 0021 Exclamation Mark 0022 Quote Mark Read the code from the file After this, I end up with this code in this string. How can I change this code (stering) in a four? The codes are stored in hexadecimal, so I think you want it: String code = "0021"; Four c = (four) integer PRIIENT (code, 16); System.out.println ("Code:" + Code + "Character:" + c); I think that none of your character codes are worth more than the maximum value that can be stored in a four, that is, the characters in it. Because your data format seems to be tickle to the maximum length of maximum 4 hexadecimal digits, I think all the characters you need to consider are actually in BMP. If it is not, you will need a different solution.

How do I prevent ASP.NET MVC from caching invalid data in my View? -

I have a situation that I have not received any help. I have seen through many questions here, but unable to find any person who has asked my specific question (or answer) Plastic (id: 2) Click on user paper , change name to plastic , and click on 'Submit' Click. Within my controller it is found that there is already a class named plastic , so I send the user a message with a friendly message. The problem occurs when users change the value not , and instead navigate away from the page. They do some other things and then click on paper to change its name. Only this time they actually see the name in the plastic text box! I have this problem on all my administrators when I decline invalid form data. How do I solve this problem? I wanted to answer the question myself that my question was answered by comment. I came to know that the value was coming back with my invalid value from LinqToSql. The way I have fixed this issue, he was recording Castle

python - Convert string in Class name (from appengine datastore to class) -

संभव डुप्लिकेट: मैं एक अनुप्रयोग विकसित करने के लिए एपेंजिन का उपयोग कर रहा हूं। आदर्श रूप से मैं एक नए प्रकार (जिसे पकाने की विधि कहा जाता है) को परिभाषित करना चाहूंगा: वर्ग पकाने की विधि (डीबी। मॉडल): सामग्री = डीबी। लिस्टप्रॉपर्टी (प्रकार) मात्रा = डीबी। लिस्टप्रॉपर्टी (इंट) हालांकि ऐसा लगता है कि आप "प्रकार" को सूचीप्रॉपर्टी में वर्ग के मूल्य के रूप में नहीं उपयोग कर सकते हैं मैं ListProperty का उपयोग करने के बजाय, ListStringProperty का उपयोग करने और तार के नामों को तार के रूप में सहेजने की बजाय सोच रहा था। हालांकि, मैं एक स्ट्रिंग को क्लास के नाम में कैसे रूपांतरित कर सकता हूं, इसलिए मैं इस तरह से लिख सकता हूँ: class_str class_str ()। ) अग्रिम धन्यवाद, जोस मैं सुझाव है कि आप घटक को तारों की सूची बनाते हैं, इसे अपने सेवकों की pickle.dnd से भरें और पुनर्प्राप्ति पर, pickle.loads का उपयोग करें अचार करें प्रकार "नाम से" प्रकार, इसलिए कुछ बाधाएं हैं (अनिवार्य रूप से, प्रकार के शीर्ष स्तर पर रहना चाहिए कुछ मॉड्यूल), लेकिन प्रकार के

android - Google maps doesn't work on the HTC? -

I am developing an application with Google Maps. I have tested the emulator and have seen the error line in the log: 01-23 16: 04: 28.453: error / map activation (733): connection factory The client could not be found but it worked fine on the emulator. Then I signed the application and created its .apk file. I have put it on the web server and installed it on the actual device (this is with HTC Verizon). But Google Maps is not visible on my application device I checked the API key and other configurations, everything was fine. Please suggest. Thanks in advance. / div> The API key you are using, Are not related to him. You usually have to register for two Maps API key - linked to a debug certificate, which automatically marks each build that you deploy for the emulator during development. , And the other is related to your production certificate which you previously signed on your APK. Publication on the market.

Is it possible to update a DirectX SDK install? -

It is possible to update the current installation of DirectX SDK, or to use the latest SDK to install it Is the way to remove the latest SDK and old in a new directory? Specifically, if I have DirectX (March 2009), and the latest version is DirectX (August 2009), then what option do I have to update SDK's SDK without installing the old SDK ? The install can stay together, and install in different places. You have to uninstall the old one, and install a new one, otherwise you will use double space.

ruby on rails - How to restrict user access page in RoR? -

I know that after the user login I can have a session and at the same time, I have an assistant method called "Current_User" I have not created any other people who can not get signed access to the page. How can I do this by doing this? I can do that people are not allowed to gain access to the content, but I do not want to see the user blank pages within the login itself. & lt;% if current_user% & gt; My content & lt;% end% & gt; Make the first_filter, which checks that the current_user variable is set, and redirects the user Does some other place (root, signup page, something) if it is not. Something like this: class ApplicationController & lt; ActionController :: Base DF login_require redirect_to ('/') if current_user.blank? End and class microcontroller & lt; ApplicationController before_filter: login_required ,: only = & gt; : Action_aviable_only_for_logged_in def action_aviable_only_for_logged_in ... and end

c++ - Generating a unique id of std::string -

मैं 32 बिट अनुप्रयोग में कोई भी सीमित std :: string size unique id (i.e आकार 6) उत्पन्न करना चाहता हूं। ऐसा करने का सबसे अच्छा और तेज़ तरीका क्या होगा? स्ट्रिंग्स की हैशिंग की तलाश करें, उदा। । लेकिन आप कभी नहीं अद्वितीय हैश प्राप्त करेंगे, क्योंकि तार आपके आकार 6 से अधिक लंबा हो सकते हैं, और शो में कम से कम हो सकता है कि चाहिए टकराने जैसा परिणाम है।

Ruby Ebook for building social neworking site -

I want to create a basic social networking site in the rail. Can you please suggest some eBooks for that or any web resource? Are there. Thanks Originally a "social network starter kit" built on the rail is.

sql - Cross-tab Query -

I have a table with employee attendance - say - OATT is the following structure and sample data AttDate EmpId EmpName AttCode InTime OutTime 01-10-2009 1 Jain, Rahul P 0900 1830 02-10-2009 1 Jain, Rahul P 0900 1830 03-10-2009 1 Jain, Rahul P 0900 1830 04-10-2009 1 Jain, Rahul P 0900 1830 05-10-2009 1 Jain, Rahul P 0900 1830 06-10-2009 1 Jain, Rahul, WO 0900 1830 07-10-2009 1 Jain, Rahul Wau 0900 1830 08-10-2009 1 Jain, Rahul P 0900 1830 09-10-2009 1 Jain, Rahul L 0900 1830 10-10-2009 1 Jain, Rahul P 0900 1830 01-10-2009 1 Jain, Rahul A 09 00 1830 I need the following result: EmpId 01-10 02-10 03-10 04-10 05-10 1 PPPPP 2 PPPLP3 PPPPA < P> I know that this pivot can be completed using questions, but I need a dynamic query to do this for the dates of a specified range. I'm using SQL Server 2005. The keyword PIVOT can help, but with that you still need to know that the query What are your columns before running? It generally means running two questions: one column t

Git subtree tags -

I want to use a subtitle to draw a remote project into a directory in my own GIT tree. I followed the instructions given here: But I'm not sure how to checkout a tag. I think this is a common request - you want to draw an external project but want to get a secure tag version of the source Subdivision merge solution works great, but I'm not sure how to get the tag? Love git, but sometimes it hurts my head .... When you Type the git tag You will get the list of all tags in your repository Remote tags also show here, and I do not know if they can fight (did not check), and to check that your Which tags were imported in the repository. But what I checked, you add remote and it comes from other projects, you can see what the tags are importing, after which you can merge with that tag, for example : git merge -s our - no-commit v0.1.2 # instead: bproject / master (2) git read-tree - and It should work. Hope this helps a bit, but I'm not advanced with git be

sockets - Test harness software for networking failures -

During integration testing it is important to ensure that to ensure the different types of low-level networking failure It is necessary that these components are handled properly. Connection refused Never send any data with Remote and SEN / ACK Remote and Answers Remote and only sends reset packets The connection is established, but does not accept remote and packet, which causes endless re-launch further . This would be useful for simulating such failures for integration testing with web services, database calls etc. Is this device a specific device (i.e. socket-level failures)? For example, there is a possibility that it will be a useless server that exhibits different types of failures on different ports. Edit: After some additional research, it seems that it is possible to handle such a thing by using a firewall. For example, iptables has some options Which allows you to match packets (either randomly based on some configurable probability or on the basis o

java - how to access gmail mails using sinetfactory api. please provide an example -

Please provide an example how can I use Gmail email using the sinetfactory API Just use the document, which is everything there is in the html folder of sinetfactory. Import com.jscape.inet.imap. *; Import com.jscape.inet.email *; Import com.jscape.inet.imapssl.ImapSsl; Import com.jscape.inet.mime *; Import java.io * *; Public class ImapSshExample {Fixed BufferedReader Reader = New BufferedReader (New InputStreamReader (System.in)) ;; Public Zero getMessages () ImapException, MimeException, IOException {ImapSsl imap = new ImapSsl ("imap.gmail.com", 993, "Username", "Password") throws; Imap.connect (); Int messageCount = imap.getMessageCount (); {EmailMessage msg = imap.getMessage (i) for (Int i = 1; I & lt; = messageCount; i ++); System.out.println ("- start message -"); System.out.println (new string (msg.getMessage ())); System.out.println ("- end message -"); System.out.print ("Enter QUIT to enter or leave for

ruby - Right clicking with a Webkit view -

I am currently working on a project in Ruby which is basically a web-app format of web-app And there are some natural flaw advantages for the web, however, we want to be able to package our applications and deliver in a standalone format. Ideally, we essentially want to create an .exe package for Mac and an .exe for Windows that opens a webkit view, connects to our servers and we provide it with HTML Does what we do it. So far it has not worked so hard, though it is beyond our current expertise (especially Windows development), but all is worth moving. The issue is that we want to enable right-click, as you can in the iTunes Store (which is a webkit view that has custom events for custom clicks). We also want to give our right-click special meaning in our application, and also make it context sensitive. What do we do? What do we want from our webpage or on behalf of our original app? "post-text" itemprop = "text"> ? If you are doing this with a

actionscript 3 - as3 conidtional statement not working -

मेरे कोड में यहां: var manTimer: टाइमर = नया टाइमर (1700,5 ); ManTimer.addEventListener (टाइमरइवेंट। टीएमईआर, चालमन); फ़ंक्शन चालन मैन (ई: टाइमर एवेन्ट): शून्य {var मेनएक्स: ट्विल = न्यू ट्विल (आदमी, "एक्स", रेग्यूलर। अंत में, मैन.एक्स, मैन.एक्स - 100, 1.5, सच); } फ़ंक्शन प्रारंभमैन (ई: माउसईवेंट): शून्य {manTimer.start (); Var मेनएक्स: ट्विल = नए टिविइन (आदमी, "एक्स", रेगुलर.इज़इन, मैन.एक्स, मैन.एक्स - 100, 1.5, सच); } अगर (man.x> 58 9) {paper.btnElScorcho.addEventListener (MouseEvent.CLICK, startMan); Paper.btnTheGoodLife.addEventListener (MouseEvent.CLICK, प्रारंभमैन); } मैं इसे प्राप्त करने का प्रयास कर रहा हूं, जब btnElScorcho या btnTheGoodLife पर क्लिक किया जाता है तो यह मेरे "आदमी" एमसीसी को मंच पर ले जाएगा। यह 590 पीएक्स से शुरू होता है और -10 पीएक्स पर समाप्त होता है। वह भाग काम कर रहा है। जो काम नहीं कर रहा है वह मेरी सशर्त बयान है जो इसे केवल "आदमी" को स्थानांतरित करने के लिए कहता है अगर वह 590 या उससे अधिक की एक्स स्थित

ruby on rails - Are there any authentication plugins that work with DataMapper? -

I need an authentication method that works with the datamaker I can see that the authlogic plug-in field is required crypted_password, password_salt, persistence_token in the user model. Is it just enough to use these fields in the user model definition, using the datamap? It is necessary to be much more sophisticated than this, because APIs differ significantly between datamapper and activivord. However, it appears that at least one person is similar to the equal wavelength , which has links used by datamap . HTML

java - Starting JVM Tool Interface agents in the VM during live phase -

JVM Machine Interface (JVMTI) says that during the live phase, JMMTI agents can be started in VM but they have mentioned how it can be done. Does anybody try to do this before or how to do it? You can use the method * @ Ultimate Agent * The path to the agent in the jar file. * * @ Param option * Agent's & lt; Code & gt; Agentman & lt; / Code & gt; Option to provide * method (& lt; code & gt; null & lt; / code & gt; may be) Com.sun.tools.attach.VirtualMachine.loadAgent (string agent, string option) From $ {java.home} /../ lib / tools.jar

numerical methods - Converting a repeating binary number to decimal (express as a series?) -

Repeats that looking at a binary number, for example 0. (0011) or 0.0 (101), how to Will it have to go about converting to decimals? I have been able to dig so far, which is the simplest way to change a decimal binary number for decimal: res (N + 2) = res ( N + 1) / 2 + res (N) Where the resolution is the result of phase N, and N is running (n = 0; n -> (number binary digits) ). Often, applying a non-terminating binary number is a good approximation, for example dec: 0.4 || Bin: 0. (0110): 0/2 + 0 = 0 0/2 + 0 = 0 + 2 + 1 = 1 1/2/2 2 + 1 = 3/23/2 / 2 + 0 = 3 / 4 3/4/2 + 0 = 3/8 3/8/2 + 1 = 1 9/16 1/9/16/2 + 1 = 51/32 51/32/2 + 0 = 51/64 51 / 64/2 + 0 = 51/128 = 0.3984 Which is approximately 0.4. So, I have found an approximate calculation tool, but I am struggling with the search, one way to express it, I started trying to write it as a series On which I can count as n-> inf. = "Text"> One way to get an accurate answer is using an infinite geometr

asp.net - How to redirect images requests to another folder using urlrewriting.net -

I am using urlrewriting.net to redirect the cascading stylesheet image request. I'm trying to do this without luck. Here I have written the following: & lt; Add name = "reportImagesRedirect" virtualUrl = "^ ~ / estadisticas /(.*) .png" rewriteUrlParameter = "ExcludeFromClientQueryString" destinationUrl = "~ / images / $ 1" ignoresees = "true" /> I want to know whether there is something wrong with it or not. For example, when I make a request like this, I'm trying to link all http find requests in a folder to redirect to the Pictures folder < P> I want to see the image in the web server Need to flip. & lt; Add name = "reportImagesRedirect" destinationUrl = "~ / images /$1.png" rewrite ur parameter = "extract form clienttit string" virtualize = "^ ~ / estadisticas /(.+)." $ IgnoreCase = "true" /> ; URLReerting for Extractional URLs. Th

How to automatically monitor and limit resource of process on Windows -

On Linux, I normally use the ptrace function to detect all the code And if I kill the process, it tries to do anything harmful to my machine, such as the system ("shutdown-st-00") or Is there a way to do this windows? EDIT: I want to write a sandbox program to limit my child's time and memory usage, which can work on both Windows and Linux, and now it only works on Linux ptrace If you combine your process with one, you get CPU time and process Can limit memory. This will not allow you to avoid performing malicious actions, but it will allow you to receive whatever you have said.

convert.php does not run in a screen session -

I'm trying to change a larger platform. At the moment I have to do it via SSH and "php5 -f convert" .php - $ option "to start with convert.php. But my internet connection is a buggy and therefore it is often killed. If I start the above working command in the screen session, then it does not work. Instead php gives me the HTML code of "convert.php" back. Head of the page: By X-power: PHP / 5.2.12 set-cookie: PHPSESSID = 6bc4370b2d8d40ff8c3ab23672ff4135; Path = / expiration: Thursday, November 19, 1981 08:52:00 GMT Cash-Control: No-store, no-cash, rick-delitate, post check = 0, pre-check = 0 Pragma: No-cache content - Type: text / html Is it something to do with sessions? But why does it work on the same SSH connection without the screen? I can not convert any of the standard simple machine forum package. Which conversions are you actually running? Are you certain that it can be used as a command line script? Edit: You nohup php5 -f c

web hosting - URL rewriting in PHP without htaccess -

The website is running on a web host, where we do not have access to the .htaccess file. However, I want to re-url the URL for the URL's friendly URL. The original URL for example www.example.com/file?q=name the expected URL www.example As other people said, just use the link like /index.php/nice/looking/url . In the middle of the URL "index.php" may seem a bit awkward, but I do not think it is possible to look better without .htaccess Otherwise, you can contact someone from your hoster at /index.php You can also ask the URL to redirect so that you can handle the /index.php without rewriting the URL in your URL. / P> Then you can find out which file can be included by using only a regex match. preg_match ('@ [/] {1} ([a-zA-Z0-9] +) @', $ _SERVER ["PATH_INFO"], $ matches) ( $ Matches will contain all "parts" of the url in an array) Use a whitelist , including files so you can be sure that any internal The file w

how to read nokogiri.org documentation? (ruby+mechanize+nokogiri) -

Last week I started writing a script in Ruby. I need to scrape some data from the web, so I was recommended to use it mechanically and then. Uses mechanisms to pose HTML to mosaics. What does this mean for you? You can treat mechanized pages like Nobody objects. After using the mechanic to navigate that page, which you need to scrape, then scrap it using nocogary methods. I know that I can use .xpath .at_xpath because it was part of but I do not know the exact sentence of these methods, difference etc. I tried to search I was told that I often use the text () expression it is not necessary for the use of nocogiri, you can get the node, then the text method Call on the node. It is very less expensive. I tried to search but found nothing on it. Is there anyone who can read notereading documents help me? Let's say I want to know how to use the text method instead of text. I'm not really sure what the problem is when reading "Notogiri" on Google T

Java: How can I access a class's field by a name stored in a variable? -

How do I set or get a field in the name whose name is dynamic and stored in the string variable? Testing the public class {public string A1; Public string A2; Public Test (string key) {this.key = 'found'; & Lt; --- error}} You must use reflection: Use to get references if it is not public, you will need to call instead Use this to access the field if it is not public To set the value, or if one of the similarly-named methods is a primitive This is an example that is a public Is related to simple case of that area. If possible it would be a good option to use the properties. import java.lang.reflect.Field; Class Databies {// I do not like the public sector; It is * only * to make public string foo easy to display; } Public class test {public static zero main (string [] args) // One method throws exceptions / declaration / Similar is usually a bad idea; / Careful exceptions to cases of different failures {Field field = Data object Consider throwing t

Converting ASP.NET app to Mono without .csproj and .sln -

I have an asp.net application that I want to try to run on mono, just as an experiment When I get the application as a Mac, then start Xpay 2 on the directory, it runs because I think this is what it is, this file system path difference ( \ vs / in directories). This is the place where I would like to open it to fix more problems in this mono development. Not a csproj file, and it seems that there is no .lnf Because Visual Studio stores in some random directories by default, in Visual Studio you can open the project with Open -> Web site ... -> local IIS etc., but I do not see any such thing in mono . Is there a way to open a directory on a web site or some way .csproj file generated? I like an answer for which to help me Visual Studio or Windows will not be required. MonoDevelop in your file as a Create a new project in the directory itself. Right click on the project in the solution window Select the display option -> Show all files Right click on a f

php - support new facebook API instead of $facebook->api_client->profile_setFBML($profileContent); -

I looked on the Facebook page, and they are not supported with PHP API: $ facebook-> api_client-> profile_setFBML ($ ProfileContent); Can someone help me to use another potential API? < P> The method dislikes, and is going to be fully staged. You will not be able to use it anymore, and in fact, there is no point, because the profile boxes are also stopped being present. Whatever you have to migrate, in turn, the application will be the only way to put the content of the content in the user's profile very soon (the timeline is "").

java - Drawing Nine Patch onto Canvas (Android) -

I'm trying to draw nine patches on the canvas object on Android. I feel weird though I use the draw9patch tool While generating nine patch while producing nine patch, the manufacturer needs an additional byte array which is called "Chak" to make nine patches. Why is not it easy? What is "part"? And if you did it yourself, how did you go about it? Any help appreciated. You can easily do this like this: // Load image in the form of nanapache drawable Nautch druftable NPD = (NanpatchDrWobble) resource.GetDubable (R.drawable.my_nine_patch); // Set your bind where you need the rack npdBounds = new rect (...); Npd.setBounds (npbBounds); // Finally draw on canvas NPDDoura (canvas);

events - How to get the right target when submitting a form in jQuery? -

$ ('# form')। सबमिट करें (फ़ंक्शन (ईवेंट) {}); उपयोगकर्ता द्वारा & lt; इनपुट प्रकार = "सबमिट करें" / & gt; पर क्लिक करके फ़ॉर्म सबमिट किया जाता है, तो यह & lt; इनपुट प्रकार = "सबमिट होना चाहिए "/> , जब उपयोगकर्ता एन्टर को और में दबाकर फ़ॉर्म सबमिट करता है, तो यह होना चाहिए मैंने event.target की कोशिश की, लेकिन यह गलत है। < Div class = "post-text" itemprop = "text"> यह चाल करना चाहता है: $ (document) .ready (function () {var target = null; $ ('# फॉर्म: इनपुट') फ़ोकस (फ़ंक्शन () {target = this; सतर्क (लक्ष्य);}); $ ('# फॉर्म')। सबमिट करें (फ़ंक्शन () {चेतावनी (लक्ष्य);}); });

c# - HowTo reorder items in DataView object -

I have a dataview object with productID and productName, I get all the items from the product table and store them in cache I want to receive items that the consumer has purchased so that they are included in the purchase or tables without using any other query. Meaning Product Data View 1. Foo 2. Foo 2. 3. Fu3 Filter the product by using Rob Filters (in Manufacturer (1,3)) User Products Dataview 1.Foo 3.Foo3 The user has now purchased Foo3 first, how do I reorder items based on the correct (chronological) array. I.e. 3 1 thanks Here is the datawave. Source: Private Zero SortByTwoColumns () {// Get a DataTable's DefaultViewManager Datatyview View = Datatile 1. Default view // By default, the first column sorting ascending. See. Location = "state, zipcode dessc"; } From your original post, it seems that you only have product ID and product name. You can not sort them into these storage, as long as you are not retrieving the date of purchase / order.

PHP in binary mode? -

Changing PHP into binary mode (compile) and running it in all standard web servers? There are many who cache computed byte codes that produce interpreter. Not sure if they will still run on the server - although I have never tried!

visual studio - attempted to read or write protected memory ASP.Net -

Whenever I try to run a web application from the IDE, I get this error I VS 2008 Team Edition, Net I am using Framework 3.5, SP1. It really happens with a new app that does not have any code. Just a default page I hit the run button, and I get the error message. There is no break point, I have not received any error information, just the dialog box. debug, click exception, ask it to break on everything, try again and let us Give more details.

syntax - Whats the difference between float* varname and float *varname in classic c -

फ्लोट * वर्नाम और फ्लोट * क्लासिक सी में वार्नम के बीच अंतर क्या है? स्वरूपण बस। वे एक ही बात का मतलब है। जहां आप अंतरिक्ष डाल (या यदि आपके पास भी है, वास्तव में) वरीयता की बात है कुछ वर्नामे के बगल में * पसंद करते हैं ताकि आप कुछ की तरह भ्रमित न हों: float * a, b; (यहाँ, केवल एक एक सूचक है, बी नहीं है) दूसरों का तर्क है कि वे एक बार में कई चर की घोषणा नहीं करते हैं, इसलिए वे फ्लोट के आगे * पसंद करते हैं , क्योंकि यह प्रकार का हिस्सा है।

IP address of client in Python SimpleXMLRPCServer? -

I have a server (Python). How do I obtain the customer's IP address in the request handler? This information appears in the log. However, I am not sure how to use this information from within the request handler. As Michael said, you received client_address from within the request handler For example, you can override the __init __ function which is indirectly inherited from BaseRequestHandler . class RequestHandler (SimpleXMLRPCRequestHandler): def __init __ (self, Request, client_address, server): print_click ############################################ #####

iphone - a problem when pushViewController with UIViewcontroller -

Image
My thoughts are filling behind the navigation bar How can I bundle it This is my code WebViewController * webViewController = [[WebViewController alloc] initWithNibName: @ "WebControler" bundle: zero]; [[Self-Navigation Controller] Push ViewController: Animated Webview Controller: Yes]; [Webviewtranslator release]; It seems that it has changed properly, but the original is off you attempt to set the frame of the view of the webview controller Should: cgtt frame = webViewController.view.frame; Frame.origin.x = 0; Frame.origin.y = 0; [WebViewController.viewSet Frame: Frame];

numerical - Javascript to convert string to number? -

var str = '0.25'; ऊपर 0.25? इसे प्राप्त करने के कई तरीके हैं: यूनरी प्लस ऑपरेटर का उपयोग: var n = + str; संख्या निर्माता: var n = संख्या (str); पार्सफ़्लोट फ़ंक्शन: var n = parseFloat (str);

python - How to get IUnknown from WDM driver CreateInstance -

दस्तावेज़ीकरण में (सी ++ उदाहरण) लुनाज्ञ * pIUnknown = CreateInstance (slot); मैं यह कोशिश करता हूं & gt; & gt; आयात सीटीआईपीएस & gt; & gt; प्रिंट प्रकार (ctypes.cdll.lcomp.CreateInstance (0)) & lt; टाइप 'int' & gt; IUNKNOWN और QueryInterface कैसे प्राप्त करें? मुझे लगता है कि ctypes के साथ COM ऑब्जेक्ट को एक्सेस करना थोड़ा मुश्किल हो सकता है। मैं मार्क हॉमोंड द्वारा खिड़कियों के विस्तार में जीतने वाली 32com को देखने की सलाह देता हूं। आप इस ट्यूटोरियल के साथ शुरू कर सकते हैं: मुझे आशा है कि यह मदद करता है

Android : launching diff activities under TabWidget -

I am trying to launch activities under each tab. I have tried with the following code Public class Tab_Proj1 TabActivity {TabHost mTabHost; Crate on Public Zero (Bundle Saved Instantstate) {Super. Secret (Saved Instantstate); SetContentView (R.layout.main); Last Reference Reference = getApplicationContext (); // mTabHost = (TabHost) this.findViewById (R.id.); MTabHost = getTabHost (); MTabHost.setup (); MTabHost.addTab (mTabHost.newTabSpec ("tab_test4") .setIndicator ("contact") .setContent (new intent (.) SetClass (context, Tab1Activity.class))); Tab1Activity ListActivity is expanding and I am getting the following error: 01-25 11: 57: 07.352: error / androidtime (9 52) ): Uncouted handler: Due to the exception of the main thread, 01-25 11: 57: 07.382: Error / Android Runtime (9 52): java.lang.RuntimeException: Unable to launch activity ComponentInfo {com.android.app .Tab_Proj1 / com.android app.Tab_Proj1.Tab_Proj1}: java.lang.RuntimeException: 57 :: 0

arrays - Create a CSV file with PHP -

I need to create a CSV file from the PHP array, let me remember fputcsv () That there is a better work for such things, but I can not find it or remember its name. What Is anyone aware of this kind of work or am I imagining? There may be some confusion with < fgetcsv () function and str_getcsv () equivalent. With the CRV format, write the array in the file. To read the data from the file with the CSV format and convert it to an array. And to convert the string into a string CRV format. Then fputcsv and fgetcsv are their related inversions fgetcsv can be a function that is str_getcsv .

virtual machine - VM cannot access Windows 7 host website -

I am developing a website using VS2008 on Windows 7. I'm driving VM with IE 6 and want to test that the site works fine on IE6 VM I write on the IE6 browser because my router gave the IP address to the Windows host but with browser errors: server or DNS error can not be found, though I can ping the host through a command window. Could this be possible to allow firewall problems on Windows7 and VM browsing of the host website, how can I open it? The most dangerous but the simplest way to test this theory: " Network and Sharing Center "if you see the left panel on the button, then" Windows Firewall "should be under the" View "section. The left should now look like a "turn windows firewall on or off" So you can now quickly check and see if it is actually blocking your firewall. I do not close the firewall, and before I consider to plug the network cable. / P> Hope this helps Rihanna

subsonic3 - SubSonic 3. Get results as DataTable -

How can I get it All () method results in the form of datatale? Currently it gives the IQueryable, WinForms can not be used as a data source for DataGridView control. dataGridView1.DataSource = Product.All (); // is not working You can tie a list in a datagrid view control so that only Use the ToList () method on the IQueryable instance MyDataGridView.DataSource = MyObject.All (). ToList ();

php - Erlang Binary Packet -

I am very new to Erlang, and I'm converting some of my PHP stuff, Can not figure out the outside Here's the function in PHP: public function raw_send ($ string1, $ string2 = zero, $ type = SERVERDATA_EXECCOMMAND) {$ data = pack ('vv', $ this- & Gt; get_request_id (), $ type) $ string 1 chr (0) $ string 2 chr (0); // Build Data $ Packet = Pack ('V', Stellen ($ data)). $ Data; FILIT ($ this-> FP, $ packet, strollon ($ packet)); } This is my attempt: raw_send (SOK, STRING1, string2, type) - & gt; RequestId = Random: Uniforms (10), PacketData = list_to_binary ([< >, STRING1, 0, string2, 0]), DataLength = byte_size (PacketData), packet = List_to_binary ([& lt; DataLength & gt; & gt ;, PacketData]), fine = gen_tcp: to send (soak, packet). To compare things using CRC32, I have tried the pack ("VV", 1, 3) in php = & lt; & Lt; 1 / unsigned-little, 3 / unsigned-little >>, some Besides, what I'm try

validation - WPF ValidationRule when control IsEnabled=false -

How do I add a validation rule in my control which starts to fire if only control is enabled is? Thank you. Take a look, look under the 'Custom Validation Rule' and you can call it the public override validation Related value in the method. Just do if (mytextbox.IsEnabled) {// validate here} Edit: Therefore, instead of enforcing your verification rule to force XAML, I think you have to back it up in your code, and you can do this in your custom verification rules category in your current example of your combobox. Assign the property you created, and then enter your override of your valid method. Use. Therefore Validation Class Public Combo Box Mycombo (Received; Set; } Then when binding your verification rule myvalidationinstance.MyCombo = mycombobox; You can now check your MyCombo in valid method to check IsEnabled You can use Property>

pdf generation - PDF Making with Rotated Image for iPhone -

I am having trouble portraying images rotated on PDF, my output is poor. My case is, we do not have any coordination. X, Y, Rotation, etc. it depends on. I select the image view and rotate it through the sliders. Check on the application ZOSH I have to implement functions like that app. I want to create PDFs by adding images one by one. Please send me a link for any example, who can help me, I am stuck here. I am portraying the image on the PDF based on the center of the picture. Please help me, thank you. There was only one problem, after a reasonable time I was able to find a solution .... Can be useful for you - (UIImage *) RotateImage: (UIImage *) Image: (float) angle {CGFloat angleInRadians = -1 * angle * (M_PI / 180.0); CGAffineTransform transform = CGAffineTransformIdentity; Conversions = CFE Refined Transformer (Anglinadrian); // transform = CGFINI Transformmacscale (1, -1); // Transform = CGFine Transmake Conversion (0, 80); CGRact rotate per capita = C

Is there a way (or a plugin) to make Vim generate a code outline for CSS? -

I was trying to set up the tag list (but I could not install CTAga), but I realized that this Does not support CSS, is there any other way to do this work or plugin? PS: I checked the CTADS file, but I could not find any steps that looked like an installation manual. It just says: installation notes ================== for non-UNIX platforms, simple makefiles Are provided: VMS for descrip.mms either for the December C or MSXOS VAX C mk_bc3.mak for Win32 using Borland C / C ++ 3.x mk_bc5.mak using MSDOS DJGPP for GNU GCC For mink_manx.mak Amiga Win32 using Aztec / Mux C 5.0 mk_mingw.mak using Borland C ++ 5.5 mk_djg.mak (for better follow unix) Macintosh using Win32 To use Microsoft Visual C by using MPW mk_mvc.mak, use the MinGW mk_mpw.mak for using G2C (EMX) mk_qdos.mak ++ mk_os2.mak QDOS for C68 mk_riscos using OS / 2 By using the MAMC GCC SDK for RISC, the OS & lt; Http: //hard-mofo.dsvr.net> For amiga using Mk_sas.mak SAS / C is a complaint ctag.exe. What do I h

php - How can I get the extrapolated version of a parameterized query? -

I am trying to update the database library that we use to use parametric queries so that colleagues Too much information should not be remembered to avoid input about SQL injection and would have to pass through the array of parameters instead (I am using). However, I am running into a problem. One requirement of database library is that it logs every query that is executed and I can not figure out any way to get the text of a parameterized query after filling out the parameters. Is there any way to do this (aside from rolling your own function for the paramedit questions)? pg_query_params ('SELECT id from table WHERE foo = $ 1', array ('bar') while executing parameterized query); I like something SELECT id from table WHERE foo = 'bar' PostgreSQL differing parameters from the extended protocol (which is used by pg_query_params ) Does. The questions are ultimately created on the server side only, there is no way to create them on the c

.net - What is the name of the question mark in my URL? -

I am restructuring and needing to give me a constant name Let's just keep the character with the question mark of this string. I'm not sure what the name of the variable is best, because I never knew what was the correct name for that question. What do I want a constant name? Or ... there is something like this, which is a sensible choice (some underlying in which the question of value already has a question mark - or it creates a query string for me, automatically name / value pair collection)? In this document, it is literally called "question mark" (Hyphen included) (Scroll down the 3.2 - 3.2 authorization component). I think this is a bad name. Hash (#) is called "piece identifier" (scroll down 4.1). Therefore it should probably be called "query identifier" .

installation - Install only on one machine -

is a Windows program that has been downloaded after entering a valid serial in a web page. Now, I want to restrict the user to install the program for the first time on a single PC. I would like some advice on making such a system Thank you. P.S. Serial keys must be entered on the web page rather than the installer. Looks like you need to create downloadable, active control control programs on the client machine The computer version of the network adapter Windows version including SP Hard disk serial number Processor Create and type CPU and relay information back to the website, then generate the key, and download The attached key Nstolr and allows the user to download the installer that is going on which is read at run-time key and the Czech Against the Machine. The only thing that ActiveX should be written in C / C ++ is that you can not do it on the NATT language because the customer believes that the runtime of the machine will be established which IMHO is

ruby on rails - How to change my parameter format? -

यहाँ मेरा रूबी कोड है: & lt;% form_tag orders_path,: method = & gt ; 'प्राप्त करें'% & gt; से & lt;% = date_select ("से", "",: start_year = & gt; 2010,: आदेश = & gt; [: दिन, महीने:: वर्ष])% & gt; & Lt;% = date_select ("", "",:: start_year = & gt; 2010,: ऑर्डर = & gt; [: दिन, महीने:: वर्ष])% & gt; & Lt;% = submit_tag "खोज",: नाम = & gt; % & Gt नहीं के बराबर; & LT;% अंत% & gt; कुछ तारीख चुनने के बाद, मेरे पास यह परिणाम है: मैं चाहता हूं कि पैरामीटर आसान हो जैसे प्रारूप को पढ़ने के लिए: http: // localhost: 3000 / orders? से = 25/01/2010 और amp; से = 25/01/2010 मुझे क्या करना चाहिए? यह रेल विशिष्ट नहीं है, प्रारूप के बाद से HTML प्रपत्रों द्वारा पैरामीटर कैसे पारित किए जाते हैं यह एक परिभाषित मानक है (? Input_name = input_value & amp; next_input_name = next_input_value) । चूंकि आप दिन / महीना / वर्ष के लिए अलग-अलग चयन करना चाहते हैं, इस

flex datagrid custom tab behavior -

I have two datagrids and I want to override the behavior of tab-key event so that it goes to the next grid, When the cursor first reaches the end of the Data Grid column Any hint is appreciated! Marcus gt; & lt; mx: script & gt; & gt; [CDATA [[bidetable] personal query src: array = [[A: 1, b: 2, c : 3}, {a: 1, b: 2, c: 3}, {a: 1, b: 2, c: 3}]; private function init (): zero {this.systemManager.addEventListener (KeyboardEvent.KEY_DOWN , OnKeyDown);} Kidown at the Private Function (E: Dialboard Avent): Zero {trace (dg1.rowCount, dg1.columnCount); if (e.target.parent.parent.parent.pdf is DataGrid) var dg: DataGrid = e.target.parent.parent as a DataGrid ; If (DG == DG1) if (DG.editItimposicolm index == DG columnCount-1) if (DG.editItemotion.OR &X == (DG.Rockout / 2) - 1) DG 2.Setfocus () ;}]] & Gt; & lt; / mx: script & gt; & lt; mx: vbox & gt; & lt; Mx: DataGrade id = "dg1" dataProvider = "{src}" tab enabled = "tr

reset group of form fields - jquery -

I would like to reset the value of a set of field fields related to the same class. For example, < Pre> & lt; Input type = "checkbox" name "abc" id = "abc" class = "class1" & gt; & Lt; Input type = "text" name "abc1" id = "abc1" class = "class 1" & gt; & Lt; Input type = "checkbox" name "abc2" id = "abc2" class = "class1" & gt; Click on the second checkbox, I would like to reset the above 3 fields. help please. $ ('# somecheckbox'). Click (function () {$ ('Input.class1'). At ('check', wrong);});

c# - Format Number like (rounded to thousands with K suffix)

How to format numbers such as SO with C? 10, 5k, ... like this: ( Edit : test) Fixed string format number (integer number) {if (digits> gt = = 100000) return format (number / 1000) + "k"; If (numerals> = 10000) {return (digits / 1000d). Toastring ("0. #") + "K"; } Return num.ToString ("#, 0"); } Example: 1 => 1 23 => 23 < / Code> 136 => 136 6968 => 6,968 23067 => < Code> 23.1K 133031 => 133K Note that this will give strange values ​​to numbers> = 10 < Sup> 8 . For example, 12345678 becomes 12.3KK .

Location of CRX in chrome after installation? -

I'm doing a project that includes a browser extension In Firefox, I locate the location where the extension is downloaded After (under your profile folder) and I was wondering where chrome hides the cranks after installing them? Especially in Mac. I am doing this cause, I know how other people have especially solved the problem of XBOOM and are moving forward on some issues with Chrome extensions. The CRX files are basically zip files, after installing the extension extension, all the files have the extension ID According to the names folder. To get the extension ID, go to chrome: // extensions / and make sure the developer mode is checked. Install Chrome extension directories: Mac / user / USERNAME / library / application support / Google / Chrome / default / extension Windows 7 C: \ user \ user name \ AppData \ local \ Google \ user data \ default extension Windows XP C: \ Documents and Settings \ USERNAME \ Local Settings \ Application Data \ Googl

math - What is the best algorithm to calculate the most scored item? -

I have music items that are scored by users between 1 and 5, and I run 5 most runs Create Formula Items But obviously an item that receives 3.5 average scores from different average users of 1000, then more points will be received, only 5 users will get 4.9 average scores ... in other words It seems that if an item is carefully viewed for people to mark it, this indicates that the item is interesting so the parameters for votes in the calculation should be a power. (How much power? I'm not sure, and I'm asking you to get the idea). I think that in the function we need the following parameters: Vote, VoteCount < H2> You can use the weighted voting for 5-star system with many voters (Internet Movie Database) to determine its IMDB's top 250, this calculation Uses. (Note: IMDB uses 10 stars, but formulas are similar to using 5 stars). The weighted rating (WR) = (v ÷ (v + =) Votes = number of votes for movie = (vote) = Average for movie (average

decimal - Ruby on Rails - Currency : commas causing an issue -

Looking at SO, I think the preferred method of currency using ROR is using decimal (8,2) and using number_to_currency () to output them; I can get my number outside of DB, but I am having problems in getting them in. In my update action I have the following line. parameter shows the correct value if p> inserted @ non_labor_expense.update_attributes (parameter [: non_labor_expense]). Xx, yyy.zz, but which gets accumulated in DB is only xx.00 I have to do to pay attention to the fact that there may be a comma and no user can enter can. (Cents). For some regex and commas? If you will handle decimal, it 2 2 versus .20 There is a builtin or at least should be a better way. My migrations (I do not know if this helps): class ChangeExenseToDec & lt; ActiveRecord :: Migration DF self.up change_column: non_labor_expenses ,: amount,: decimal ,: accuracy => 8 ,: scale = & gt; 2 end DEF self.down change_column: non_labor_expenses ,: zodiac: integer end end It m

components - Componetizing jQuery functions calls. Best practices? -

I am creating a site that is running with components, HTML and CSS and a special set of jQuery form Each component of the site defined in each component will have several components. According to best practices, we are putting our javascript blocks at the bottom of the page. We load the required .js files, and then I am planning to call the necessary tasks: do do (to do); DoThatThing (); Assume that I have the component X. I want to call that function whenever that component will appear on the page provided. From a jQuery perspective, what would be the ideal way to handle this? Some options: 1) Whether the component is always on the page: Whether $ ('.comonentX'). / Code> This is easy, because we may have a universal block of jQuery function calls. But a slight performance is getting hit because he is searching for DOM, which is not something that can happen. 2) Attach the component to call: & lt; Div id = "componentX" & gt; My Compo

asp.net - Get URL of error page in global.asax's Application_OnError -

मेरे पास एक asp.net अनुप्रयोग है, जहां मैं Global.asax On_Error विधि साइट में कुछ त्रुटि होने पर मैं अपने आईडी पर एक ईमेल भेजूंगा (i.e .: जब Application_Error लागू किया जा रहा है)। अब मेरे ग्लोबल.एएसएक्स के Application_OnError ईवेंट से, मैं उस पृष्ठ का यूआरएल कैसे प्राप्त कर सकता हूं जहां यह त्रुटि उत्पन्न हुई? अनुरोध का उपयोग करें। URL