Posts

Showing posts from January, 2012

java - Limited sockets to midp? -

It seems that there is some kind of limit on the socket in MIDP. I need to make a lot of connections in one server ( No consent) and with the attempt to crash in or forward my app. It crashes in the simulator and also in my real device. To isolate the possibility of being affected by my code, I exclude the following code: try {stream connection c; Stringbuffer sb = new stringbuffer (); C = (stream connection) connector. Open ("http://www.cnn.com.br/", connector.READ_WRITE); InputStreamReader r = new input stream provider (c.openInputStream (), "UTF-8"); Println (r.read ()); C.close (); } Hold (IOException pre) {ex.printStackTrace (); } This code crashes in the 13th attempt. I have tried to add 10 seconds of sleep in a little loop, and it crashes in the 13th attempt. The accident message is: java.io.IOException: the resource limit exceeded the TCP client socket - com.sun.midp.io.j2me.socket protocol . Ops 0 (), BCI = 0 - com.sun.mid.po.a.m.m.ac.uk....

asp.net - programatically remove all html and inline formatting -

I have taken a code base and I need to read these HTML files which were genreated by Microsoft Word, I think It has all kinds of weird inline formatting. To parse all bad inline formatting there is the same way to get text from this stream. I basically want to program a researcher so I can use some sensible CSS - This is one specific when it comes to purifying HTML.

php - Using sqlsrv_connect on Platforms other than Windows -

मैंने एक कोड SQL को एक कनेक्शन को इन्स्तांत करने के लिए sqlsrv_connect विधि का उपयोग करने वाले कुछ कोड को विरासत में मिला है डेटाबेस। मेरी निजी डेवलपमेंट मशीन एक ओएस एक्स बॉक्स है जो मैं एपीएचएपी को PHP पर चला रहा हूं। मेरे पास वर्चुअल मशीन में SQL सर्वर का एक उदाहरण है। जब मैं डेटाबेस से कनेक्ट करने का प्रयास करता हूं, तो मुझे निम्न त्रुटि मिलती है। गंभीर त्रुटि: कॉल करने के लिए यह प्रतीत होता है कि sqlsrv_connect मानक PHP का हिस्सा नहीं है, और यह एक ड्राइवर का हिस्सा है जो कि जहाज़ के साथ है। (कृपया मुझे सही करें अगर मैं यहाँ गलत हूं) क्या इस फ़ंक्शन का उपयोग गैर-विंडोज प्लेटफॉर्म पर है? मुझे पता है कि मैं अपने विंडोज मशीन पर अपाचे / पीएचपी स्थापित / स्थापित कर सकता / सकती हूं, लेकिन अगर ओएस एक्स (या अन्य * निक्से) पर काम करने वाला यह फ़ंक्शन मिल रहा है, तो मैं इसे पसंद करूंगा। संभव नहीं है PHP के लिए एसक्यूएल मूल ड्राइवर: PHP के लिए SQL सर्वर ड्रायवर SQL सर्वर के साथ निम्न स्तरीय संचार को प्रबंधित करने के लिए माइक्रोसॉफ्ट एसक्यूएल सर्वर 2005 ओडीबीसी ड्राइवर...

What is the sense of defining several services in single WSDL file -

I understand that this same functionality (the interface in WSDL 1.2, PortType in WSDL 1.1) is different Based on WSDL 1.1), the underlying transport protocol (determined by compulsion). But what does the definition of different services in the same WSDL mean? In particular, if each service exposes only one operation? For example, see the following WSDL file: The WSDL1.2 specification mentions that "WSDL 1.1 supports multiple services in a single WSDL file. Confusion between users has been created. " They resolve it by allowing "many services, where each can be of a different service type." What does it mean - different types of here? Massey What is the definition of many services in a single WSDL file feeling? In the same way, you will define how many interfaces with different functions in object-oriented language: To moderate your service. > In theory I can pack all the methods in an interface, but since I want to separate the concerns in ...

java - how to find text in jar file which is in war file? -

A special file is the way to grep (search) the text, which is * .jar and it *. Jar is * .war? Are you doing this program from Java? .ar files are basically .zip files, such as .jar files you can open .zip files with java.util.zipfile. Open your .war as a zipfile, within it. Find it, open your .jar as a zip file, find your text file in it. Now you can read the text and process it on the one you want. Does this answer your question?

asp.net - What's the fastest way to load a text or ntext SQL Server column? -

I make it as straightforward as possible, but sometimes the query takes 3+ seconds. Using a query with the original parameter: Choose from MyStream (NOLOCK) from TextStuff Where MyInfoID = @ MyInfoID Is there a faster way For doing this? Performance improving on changing the ntext column in nvarchar (MAX) column I will go against some political winds here and say ... If you do not need 16-bit Unicode capabilities, then varchar (MAX) Instead of ntext instead of Nvarchar (MAX), the storage and transfer time will be cut in half for the text field using varchar (MAX). If you Seriously the networks are IO-bound (example: your "text field" megabyte-range), so you can consider using data compression They are: Store a zipped version of the text in a verb (instead of text). Thus, shuffling the results on the network is all compressed. (The new "Compression" attributes of SQL Server 2008 are actually Here will not help ... the traffic on the wire ...

language agnostic - Real world uses for obfuscation -

For what purpose do you want to obscure your code? I have not run in any other purpose other than this, but I am sure that there will be some intelligent and useful reasons to obscure the source code. Why, in general, do you want or need to obscure your code? Is there ambiguity in real life applications?

Returning a rendered HTML partial in a JSON Property in ASP.NET MVC -

I am gladly return JasonSasselt objects or partial ASP.NET views to my controllers in ASP.NET. I want to return a provided partial view as a property in a JSON object. For example request / post / description / 1 will return {"Post ID": 1, "HTML": "& lt; p & gt; some markups that have been partially injected & lt; / p & gt;"} This will allow me to know when postId is handling replies in javascript. Any suggestions on the best way to do this? Here's some code that is necessary for me to do the work today. Public Stabilized String RenderPartialToString (String ControlName, Object ViewData) {var viewContext = New ViewContext (); Var urlHelper = New UrlHelper (viewContext.RequestContext); Var viewDataDictionary = New ViewDataDictionary (ViewData); Var viewPage = New ViewPage {ViewData = viewDataDictionary, ViewContext = viewContext, Url = urlHelper}; Var control = viewPage.LoadControl (controlName); ViewPage.Cont...

authentication - Can you validate an inactive user's password in ASP.NET's membership system? -

I am creating an activation form for newly created users in ASP.Net membership system. When a user is created, I send an email with a link to an activation page. However, before the user is activated, I want to verify my username and password, so I have recorded my credentials in the text box. However, what I have read and the behavior that I am seeing, it appears that I have to activate the user before I can test the password, either with form authentication. Or membership. ValidateUser I think this is a potential security weakness - is there any way around it? Thank you, Graham On the other hand, if you really want it to be another way, send them an activation">

networking - Manipulating Network Data in R -

I have a description of the weight of the edge among the nodes. Is there any package to work with such data? For example, I would like to make the following information as a network: p1 p2 count 1 now 100 2 ac 200 3 ad 100 4 bc 80 5bd 90bb 100 100 cd 100 8 CE 40 9D 60 is an option package, for statistical social network analysis Part of the family of R packages. It handles network data in a rare way, which is good for large data sets. Below, I do the following: Load the adGlist (first two columns) in the network object having an edge attribute in the name of the load Plot the network with a plot (see the help page to change the thickness of the edges.) Plot a saosimetrix (just set the set of 5x5 blocks Represents the matrix, where (i, j) is relative to the cell Counting is shaded) A = readable (file = "SO". "Txt", Header = T) AP1 P2 count 1 AB 100 2 AC 200 3 ads 100 4 BC 80 5 BD 90 6 100 7 CD 100 8 CEE 409D60 Library (Network) Net = Network (...

bash - How can I write a shell-script that will email me a file if the file is not empty? -

I'm looking at a script that I can see if a text file is empty or not, if it's nothing then If there is something in it, then I have to send an email with a text file as this message. Do not know how to do it. [-s "$ f"] & amp; Amp; ; Mail me@example.com -s "$ f Content" & lt; $ F Good and Compact :)

c# - Statically checked design by contract -

Recently, NAT 4.0 / Visual Studio 2010 is excited with the idea of ​​examining the design by contract. However, I was sad to know that it will only be available in Visual Studio Team System. Is there any option that gives the design static checked by contract for C #? Will the mono project be added to the compiler in this functional? He is referring to the theorem of the theorem. There is nothing to stop open source or by applying its own to the commercial community. Contract classes are part of BCL and it is easy to add to mono. "We" need to make a theorem spokesman if we want to examine factual things. The driver is not part of the compiler, it basically follows: Compile a version of binary with defined . It uses all contract attributes and calls contract class static methods. Just "Load an assembly for reflection", and parse the byte code of all method. Detailed flow analysis with state information will show some contracts "always t...

c# - How to get top 3 elements in int array using LINQ? -

I think its a simple LINQ question, but I am very new to LINQ I have this array: int [] array = new int [7] (1, 3, 5, 2, 8, 6, 4}; And I have written this code to get the top 3 elements in this array: var topthree = (I am inferred by selecting the order of the array from me). (3) Take; And when I find out what's inside the top three: {System.Linq.Enumerable.TakeIterator} Nutrition: 0 What did I do, and how to fix my code. How do you check "What's inside" the top three? The easiest way to do this is to print them: Using the system; Using System.Linq; Public Class Test {static zero main () {int [] array = new int [7] (1, 3, 5, 2, 8, 6, 4}; var topThree = (I select descending I in the order of the array). Take (3); Forex Currency (Top Three in the top x) {Console.WriteLine (x); }}} I'm feeling OK ... Sorting is probably a more efficient way of finding top N values, but it certainly Will work. You may want to consider using dot nati...

php - Retrieve a complete list of all Categories, Sub Categories, Sub Sub Categories, etc. in only one SQL query -

मेरे पास तालिका संरचना और MySQL में डेटा है CatID CatName ParentCatID ---- --------------------------- 1 शर्ट्स नल 2 शॉर्ट स्लेव 1 3 लांग स्लेव 1 4 कॉलरलेस 2 5 कॉलर 2 6 कॉलरलेस 3 7 कॉलर 3 8 स्क्वायर कट 4 9 राउंड कट 4 10 स्क्वायर कट 6 11 राउंड कट 6 डेटा जो मैं चाहता हूँ, वह इस तरह से कुछ है: shirts & gt; लघु स्लेव शर्ट्स & gt; लांग स्लेव शर्ट्स & gt; लघु स्लेव & gt; कॉलरलेस शर्ट्स & gt; लघु स्लेव & gt; कॉलर शर्ट्स & gt; लांग स्लेव & gt; कॉलरलेस शर्ट्स & gt; लांग स्लेव & gt; कॉलर शर्ट्स & gt; लघु स्लेव & gt; कॉलरलेस & gt; स्क्वायर कट शर्ट्स & gt; लघु स्लेव & gt; कॉलरलेस & gt; गोल कट शर्ट्स & gt; लघु स्लेव & gt; कॉलर & gt; स्क्वायर कट शर्ट्स & gt; लघु स्लेव & gt; कॉलर & gt; राइट कट हम इन डेटा को एक एसक्यूएल क्वेरी का उपयोग करके MySQL में कैसे प्राप्त कर सकते हैं? वास्तव में कोई जवाब नहीं है, लेकिन मैंने पिछली पीएचपी में गंदे निश्चय का उपयोग किया है ऐसा कुछ है: $ categories = arr...

plsql cursor iterating problem -

I used the Oracle demo schema Scott to test some plsql I use (data will never change in that schema). I wrote the following program to get the employee number of each department. The problem is, there are only 4 departments but my program output 5 lines can not tell the reason for this, can anybody help? great thank you. Announce cursor staff (department_id number) Selection count from Scott.Empi (*) howmany where deptno = department_id; Employees_per_dept employee% rowtype; The cursor is selected from the department * Scott dept; A department department% line type; Start dbms_output.put_line ('------------------------------' ''); Open section; Exit loop when section% notfound; Moving departments into a department; Open staff (a_department.deptno); Bring employees to employees; Dbms_output.put_line (employees_per_dept.howmany); Closed employees; End loop; Closed department; Dbms_output.put_line ('----------------------------------' '); End; If you...

iphone - Save recorded file to ipod Library path -

Hope you're all right and also in your best mood. I need your help if you know one thing in the iPhone, so please share it with me and with so many other phone developer. I am developing an application in which I need to record sound and add to the iPod library. / P> I ended up with the recording file, but now the issue arises as to how I can save this song in the iPod path or iPod directory. I am not able to add a record file on the iPod. I think if we have any way for the iPod library, then I can keep that file on that path using the File Manager. (I think this is a thing but it is not sure.) So you know the way to the iPod library ten, please tell me, and how do I file a file in this way. This issue can be a little easier, but I'm a newbie, I do not know how thanks. Thank you, Please help me, Arun Thakkar. The application in the iPhone has a sandboxed access to the file system, which means that iTunes Can not write a file in the library You c...

C# console application icon -

Does anyone have to set the icon of the C # console application in the code (not using project properties in Visual Studio) ? You can not specify executable icons in the code - it is only part of a binary file. From the command line you can / win32icon: & lt; File & gt; , if this is any help, but you can not specify it within the code of the app Do not forget that the app icon is not running at all, for longer time displaying the icon ! It seems that you mean the icon for the file in Explorer. If you mean the app's icon running if you double-click on the file, then I believe that there will always be an icon for the console.

Limit width of custom list itemrenderer in Flex -

I am using a custom itemendender to display a list of photos and learn about controlling the width is required. At the moment it does this: Which, I am sure you will agree, it is bleeding in the eyes. The list has been created such as: ; & Lt; / Mx: cell & gt; And the Object Extension component looks like this: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Mx: VBox xmlns: mx = "http://www.adobe.com/2006/mxml" & gt; & Lt; Mx: image source = "{data.src}" id = "image" scale abstract = "correct" tooltip = "{data.caption}" height = "100%" horizontal align = "center" /> & Lt; / Mx: VBox & gt; I have tried to keep width = "100%" in a whole bunch of places, but without success If someone knows how I can control it, I would be very grateful. If you set these properties inside I do not know why they choose to turn...

linux - How to capture x screen using PHP, shell_exe and scrot -

I am making a web page screen capture application for internal R & D projects. Environment: Ubuntu 9.04 (default desktop installation), Apache, PP. By now I've got a Bash script that takes a parameter (URL), spreads Firefox, grabs the screen and saves it as PNG. I have tried to run it from the terminal and it works fine. Here is the Bash script: #! / Bin / bash Firefox $ 1 # Start Firefox and grab the screen with the delay of # 5 seconds passed in the URL scroll-d 5 test.png Next I have a simple PHP page is created which uses shell_exec to run the script: & lt;? // sample url $ url = 'http://www.google.com'; // run the script shell_exec ('sh script.sh'. $ Url); // put HTML to display the out image 'echo' & lt; Img src = "test.png" / & gt; '; ? & Gt; However, when the PHP page is called then the screen is not captured. A quick result in Apache error logs shows the following message: Error: No perform...

c++ - using boost::lambda_ to compress whitespaces in a string -

I am using Boost :: Lambda to remove white space later in a string, leaving only one location . I tried this program #include & lt; Algorithm & gt; # Include & lt; Iostream & gt; #include & lt; String & gt; #include & lt; Boost / lambda / lambda.hpp & gt; Int main () {std :: string s = "str str st st sss"; //s.erase (std :: unique (s.begin (), s.end (), (boost: lambda :: _ 1 == '') & amp; amp; amp; amp; amp; : Lambda :: _ 2 == '')), sand (); /// & LT; Works s.erase (std :: unique (s.begin (), s.end (), (boost :: lambda :: _ 1 == boost :: lambda :: _ 2 == '')), S.end ()); /// & LT; Std :: cout & lt; & Lt; S & lt; & Lt; Std :: endl; Return 0; } The commented row works fine, but not unsettled. How to (boost: lambda :: _ 1 == boost: lambda :: _ 2 == '') Separately (boost: lambda :: _ 1 == '') & amp; Amp; (Promotion: lambda :: _ 2 == '')) The comm...

com - Is there a .NET equivalent to CoCreateInstanceEx? -

I have found the closest thing, using activator.creditentence, but you can name it a server name / Can not provide account information. What I want to do is create COM object on another computer I (I know that I can make it on a separate computer by adding component properties in the control panel, Dynamically start a COM component on a different server) Is there a managed way for it, or do I have CoCreateInstanceEx p-invoke No, you have CoCreateInstanceEx by P / Invoke

php - Friend Invite Feature for Facebook Applications -

How can I add friend invitation to my newly created Facebook application? I have never created a Facebook application. I have never tested how to make a Facebook application. It took less than a minute to estimate the home page address and follow some links with names like "How to guide" and find out hell; Which is actually asked for you.

MS Access VBA Listbox with row colouring? -

I am trying to collect a small list box, which is left of the query on which the background of its rows The color will be in the form of different colors depending on a certain position. I have made some googling around this topic and it is not possible to use standard controls that provide access form designer. There are some ActiveX controls like ListView and MS Forms 2.0 Listbox but I can not find any use guide or reference for this control. Do anyone know above and / or where to get documents for aforementioned ActiveX controls? Highly appreciated, Andy You have to use a sub-form Listbox lines are not format-specific

asp.net - Div tags rendering as tables in IE -

I have an ASP. Some of these clients have recently started seeing problems with HTML rendering in IE. All bid tags are now rendering in the form of tables. We have a development machine running IE7 which is showing the same problem in a scenario: when the app is installed on the machine and we use the same machine to apply. for. This development machine, using IE7, can see other installations and other clients of the application, without installing any problem development machines. All negative tags have been replaced with table tags. This is a sample HTML that has been sung correctly in IE: & lt; Div id = "wtbToolbar" & gt; & Lt; / Div & gt; And similarly with the problem, the same HTML renders in IE on the machine: & lt; Table id = "wtbToolbar" & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; The source of this HTML is ASP.NET Control, ...

Multi-key dictionary in c#? -

इस सवाल का पहले से ही एक उत्तर है: 14 जवाब मुझे पता है वहाँ नहीं है एक बीसीएल में, लेकिन क्या कोई मुझे एक अच्छा ओपनसोर्स एक में बता सकता है? मल्टी द्वारा मैं 2 कुंजी का मतलब है ; -) मैंने जेसन की तरह ट्यूपल्स का इस्तेमाल किया है हालांकि, मेरा सुझाव है कि आप केवल एक संरचना के रूप में एक ट्यूपल को परिभाषित करते हैं: सार्वजनिक संरचना ट्यूपल & lt; T1, T2 & gt; {सार्वजनिक रीडोनली टी 1 मद 1; सार्वजनिक रीडोनली टी 2 मद 2; सार्वजनिक ट्यूपल (टी 1 मद 1, टी 2 मद 2) {आइटम 1 = आइटम 1; मद 2 = आइटम 2;}} सार्वजनिक स्थैतिक वर्ग ट्यूपल {// टाइप-एन्फरेंस वेलनेस के लिए सार्वजनिक स्थिर ट्यूपल & lt; T1, टी 2 & gt; बनाएँ & lt; T1, T2 & gt; (T1 आइटम 1, टी 2 मद 2) {नया ट्यूपल & lt; T1, T2 & gt; (आइटम 1, आइटम 2); }} आपको अपरिवर्तनीयता प्राप्त है, .getHashcode और .Equals मुफ़्त के लिए, (जब आप C # 4.0 के लिए प्रतीक्षा कर रहे हैं) अच्छा है 'n सरल ... एक चेतावनी हालांकि: डिफ़ॉल्ट GetHashcode कार्यान्वयन (कभी-कभी) इसलिए सुनिश्चित करें कि पहले फ़...

jquery - Keep Side Navigation Fixed with Scrolling of page -

I have a client website - www.stagecraft.co.uk and they () still want navigation there when If you scroll down the page I have a quick position (not a) with the situation, but in doing so it is approximately 200px or so from the top of the leftside navigation window You can fix this situation, only when scrolling has reached a certain point: $ (window ) .sc Roll (function () {if ($ (this) .scrollTop ()> 200) {// I just use $ 200 for test $ ("# tester"). Css ({"position": " Css ({"status": "full", "top": "200px"}); // right here}}) ; And CSS for the div is the following: #tester {position: absolute; Correct: 20px; Top: 200px; Height: 200 pixels; Width: 100px; Background: Red; }

latex - How can I change the vertical position of content after a tabularnewline? -

I have some problems with tables in latex. There are 4 columns in my table. I \ Textwidth is too broad to fit, So I discovered a line break and found \ tabularnewline Now the content of the first column breaks down in 2 lines but the content in the other 3 columns is now below the cell. I want to focus it in the column, or at least it should be on the roof. How can I go about doing this? I have tried tabular, tabulated * and tabular. I would like to write as short command as possible, is it possible to do similar to HTML? \ in usepackage {array} Preamble then you \ start {table} Can use {ccm} - 'm' will give you vertical mid alignment. Also: 'T' will give you top alignment, and 'B' will give you below.

Is it worth it to use jQuery for Ajax instead of building your own JavaScript? -

In addition to the framework, is jQuery worth using instead of JavaScript? If the framework was always better to use for making calls, then I have always debated what are the disadvantages of using it? Sorry for the initial question, I am trying to realize that it would be better to use it and instead it would have to be developed from scratch rather than making some strange work of my site. Is there any other structure that would be better to create an Ajax website? Yes, jQuery is worth it. I speak as someone who opposes the use of any library for a long time, then finally saw the light. I recommend that you create some hand-rolled Ajax interactions before using jQuery for Ajax, so that you understand what is happening with Ajax. Once this is done, allow the library to do dirty work.

.net - Visual Source Safe 2005 Remote Access -

I want to transmit VSSDB from one machine to another via the Internet (not LAN). Updates I Thanks for the reply but it is not. It is saying that there was some failure to implement the SSL requirement on IIS. VSS Web services will be disabled on this machine .... Update II Is it possible to connect it after installation of VPN? How to Thanks for the reply but it is not. It is saying that there was some failure to implement the SSL requirement on IIS. The VSS web services will be disabled on this machine .... I had the same problem with the VSS internet plugin, it was found that my certificate was installed in my personal store Was not / is local computer store when VSS tries to set it up, then it tries to contact "" as a local system account. In my case, I was using a self-signed certificate which was not installed / trusted in the local computer store, but instead my user account had a private store, so this security would be unsuccessful in warning th...

c# - enum with value 0x0001? -

मेरे पास इस तरह एक enum घोषणा है: सार्वजनिक enum फ़िल्टर {a = 0x0001; बी = 0x0002; } इसका क्या मतलब है? वे एक सरणी को फ़िल्टर करने के लिए इसका उपयोग कर रहे हैं। इसका मतलब यह है कि यदि आप फ़िल्टर-> ए, आपको 1 मिलता है। फ़िल्टर-> बी 2 है। अजीब हेक्स अंकन सिर्फ यही है, संकेतन। संपादित करें: चूंकि यह एक 'फिल्टर' है, हेक्स संकेतन थोड़ा सा बनाता है अधिक समझ। 0x1 लिखकर, आप निम्न बिट पैटर्न निर्दिष्ट करते हैं: 0000 0001 और 0x2 है: 0000 0010 इससे फिल्टर का उपयोग करने के तरीके पर यह स्पष्ट हो जाता है। उदाहरण के लिए, यदि आप डेटा को फ़िल्टर करना चाहते हैं जिसकी कम 2 बिट्स सेट हैं, आप कर सकते हैं: फ़िल्टर-> ए | फ़िल्टर- & gt; बी जो इसके अनुरूप होगा: 0000 0011 हेक्स संकेतन अवधारणा बनाता है एक फिल्टर स्पष्ट (कुछ लोगों के लिए) उदाहरण के लिए, इसे देखकर 0x83F0 के द्विआधारी को समझना अपेक्षाकृत आसान है, लेकिन 33776 (आधार 10 में समान संख्या) के लिए और अधिक कठिन।

asp.net - Pressing enter on any textbox invokes my Save button click event? -

मेरे पास एक मानक asp.net वेबफ़ॉर्म है जिसमें एकाधिक टेक्स्टबॉक्स (Autopostback = False) और एक सेव बटन। किसी भी टेक्स्ट बॉक्स में सर्वर को क्लिक करने से बचाने के लिए बटन दबाए जाने पर इंप्रेस को दबाया जा रहा है। अगर मैं कॉल स्टैक को तोड़ता हूं और देखता हूं, क्लिक ईवेंट केवल एकमात्र ईवेंट सूचीबद्ध होता है मेरे पास प्रपत्र के लिए एक डिफ़ॉल्ट बटन सेट नहीं है अगर मैं सहेजें बटन के ऊपर एक और बटन डालता हूं, तो उसे किसी पाठ बॉक्स पर दर्ज होने के किसी भी प्रेस पर लागू होने वाले क्लिक ईवेंट प्राप्त होता है। कोई भी विचार क्यों हो रहा है, और उसे कैसे रोकना है? यह पाठ क्षेत्रों को छोड़कर अधिकांश क्षेत्रों के लिए डिफ़ॉल्ट व्यवहार है। यह कुंजीपटल की जांच करने के लिए फ़ॉर्म सबमिट करने से पहले आप जावास्क्रिप्ट फंक्शन कॉल कर सकते हैं। & lt; script type = "text / javascript" & gt; फ़ंक्शन अनुमतिसबमिशन () {वापसी! (खिड़की। घटना और खिड़की.ईवेंट.कीकोड == 13); } & Lt; / script & gt; फिर फ़ॉर्म सबमिट करने का एकमात्र तरीका है कि वह वास्तव में हिट सबमिट करें। हालांकि क...

web services - Call webservice on outside server from javascript using asp.net and C# -

I'm trying to test the web service call using an ASP.Net page which is the username and password Creates a form with the field and the "Depository Button." (Both JQuery and JS files are included in script tags in the head element.) "Submit" button calls a call Behind the file calls a call created in the C # code which calls a different Java Script file. Secure Zero mSubmit_Click (Object Sender, EventArgs eventArgs) {String Authentication = String.Format ("Authentication (\" {0} \ ", \" {1} \ ") ; ", This.mU.name text, this.mPassword.Text); Page Client Script.Registering StartSupcript (this .gate type)," client script ", authenticate, true);} JavaScript function, authenticate , creates web service calls, using JSON and Ajax on a different server, sending JSON parameters, and so on JSON is returning back in response. Authentication (uname, pwd) {// gets the search parameter and puts them in json format var par...

java - jsp:setProperty equivalent for servlet -

क्या इसके बराबर है: & lt; jsp: setProperty name = "beanName" संपत्ति = "*" / & gt; Servlets के लिए ? कुछ ऐसी चीज जो अनुरोध मापदंडों का उपयोग करके सर्वलेट के अंदर से बीन को स्वत: भरती करेगी? मैं एक जेएसपी-केवल आवेदन को पुन: लागू कर रहा हूं और कुछ कोड को सर्लेटों में ले जाना चाहता हूं। दुखद कारणों के एक गुच्छा के लिए, हम इसे आसान बनाने के लिए किसी भी चौखटे का उपयोग करने में सक्षम नहीं हैं (अभी)। क्या आप बाहरी पुस्तकालयों का उपयोग कर सकते हैं? यदि हां, तो आपको बहुत मदद मिलेगी। अपडेट: अब जब आपने पुष्टि की है कि आप इस दृष्टिकोण का उपयोग कर सकते हैं: जिस विधि का आप खोज रहे हैं वह है अनुरोध पैरामीटर को मैप करने के तरीके का उपयोग करने के तरीके में यहां एक अध्याय (4.2) है।

audio - Best way to play wav files in the browser? -

I do not have the option to run a straightwave file in the browser (ServerAd encoding on mp3 is not an option, unfortunately From) What is the best way to do this? I really want to take advantage of the HTML5 audio tag but my target audience includes many teens using IE6. As far as I know that Flash is not an option, fast playback is really important. Thank you. Nowadays, the best way is probably only to design HTML5 & lt; Audio & gt; In the past, you can do this: Background: & lt; Embed src = "bgsound.wav" hidden = "true" autostart = "true" loop = "1" & gt; Click: & lt; A href = "success.wav" & gt; Play sound & lt; / A & gt;

weblogic - How do you run Spring 2.5.6 sample apps in Jdeveloper 11g? -

I'm trying to run the image DB and Jepastor in Jedivelr 11g. It compiles fine, but will not do it, and how to run Veblogik server throws errors Spring 2.5.x sample application to know how successfully Jedvelr 11g? When I tried Jepetstor samples I get the following error. 27 Julai, 2009 5:03:20 AM org.springframework.web.context.ContextLoader initWebApplicationContext SEVERE: Context initialize failed org.springframework.beans.factory.BeanDefinitionStoreException: Opertektekst Resources unexpected exception XML document parsing [/WEB-INF/applicationContext.xml]; Nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.aop.aspectj.ApectpectExpressionPointcut There is a problem due to weblogic server application classlogging. You need the following weblogic.xm & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Weblogic-Web-App xmlns = "http://www.bea.com/ns/weblogic/weblogic-web...

Enterprise library for .NET -

Which enterprise libraries are you using for your enterprise projects? Thanks We are a web client software factory, composite, next to Microsoft Enterprise Library. Application guides use - Both are frameworks from Microsoft to build composite applications (Web and WPF).

fonts - Unbounded element infinity symbol shows as rectangle in XMLSpy -

I need a screenshot of my XSD, and XMLMT is a great-looking and descriptive graphical view of XSD schema. However, under infinite elements, it tries to show a little infinity symbol in Ariel and unfortunately fails, instead it displays small rectangles. I have tried to change the font, such as XMLMf, the FAQs suggest, and I have tried Ariel MS with any luck I suspect that this is something with my default system language It may be, which is Croatian (Eastern European charset). I have tried it on both Windows XP and Windows 7. I can leave small rectangles (which looks unprofessional), I can make it Photoshop (but there is a lot more to it), but I really like to fix it in some way - it's the smallest One of the things that is extremely disappointed. PS I hope that it is seen as related to programming because superuser is not currently out of beta. P.P.S. This works on the new clean XP installation with the same Windows settings. Maybe the office screws with Ariel instal...

Using jQuery's getJSON method with an ASP.NET Web Form -

How do I call a method on an ASP.NET Web form page to use the getJSON method on jQuery? The goal is: The user clicks the list list The value is sent to the server related to the server Luggage list, formatted using JSON Populate secondary box I do not want to use an UpdatePanel, I used it several times using ASP Hundreds of work done. Net MVC framework, but it does not understand using the web form! So far, I can do everything, including calling the server, does not call it correctly. Thanks, Some code: jQuery (document) .ready (function () {jQuery ("# ​​& lt;% = AreaListBox. Client ID% & gt; "). Click (function () {updateRegions (jQuery (this) .val ());});}); Function Update Regions (Region ID) {jQuery.getJSON ('/ Locations.aspx / GetRegions', {Area ID: Area ID}, Function (Data, Textstats) {Debugger;}); } Here's a simple example, which you should expect to get started: & lt;% @ Page language = "C #"%> ...

c - strncpy and using sizeof to copy maximum characters -

मैं नीचे कोड का उपयोग कर रहा हूं चार कॉल [64] = {'\ 0 '} / * साफ बफर * / strncpy (कॉल, info.called, sizeof (कॉल)); मैं हमेशा ओवरफ़्लो की सुरक्षा के लिए गंतव्य के आकार का उपयोग करता हूं, स्रोत से अधिक गंतव्य से अधिक है। इस तरह मैं बफर ओवरफ्लो को रोका जा सकता हूं क्योंकि यह गंतव्य जितना भी संभाल सकता है उतना जितना भी कॉपी होगा। लेकिन अब मैं सोच रहा हूं कि यह गंतव्य को समाप्त कर देगा। एक जोड़ी मामलों की 1) यदि स्रोत अधिक है मैं ऐसा कर सकता हूं: कॉल [strlen (call) - 1] = '\ 0'; / * अंतिम तत्व पर एक नल सम्मिलित करें। * / 2) यदि स्रोत गंतव्य से कम है कॉल 64 बाइट्स है, और मैं 50 बाइट प्रतिलिपि बनाता हूं क्योंकि यह स्रोत का आकार है। क्या यह स्वतः 51 तत्वों में अशक्त रखेगा? किसी भी जानकारी के लिए बहुत धन्यवाद, यदि स्रोत की लंबाई से कम तीसरी पैरामीटर strncpy के रूप में पारित अधिकतम संख्या गंतव्य को समाप्त नहीं करेगा, अन्यथा - नहीं। यदि स्रोत बराबर या अधिक है गंतव्य की तुलना में लंबाई में - इसके साथ निपटने के लिए आपकी समस्या है जैसे आप सुझाव दे रहे...

iis 7 - asp.net mvc keeps overriding text/html content-type with .wml -

I am developing a website that is being viewed on mobile (cellphone) devices. I'm just using plain HTML 4.01, not very special. Except Nokia Series 40 1-5 versions, we have presented pages properly on all mobile browsers. On closer inspection, it seems that the IIS is automatically rendering html with the content-type of text / vnd.wap.wml instead of text / html . Since we are not using WAP, the page fails with error. I am using ASP.Net MVC 1.0, so I've added a ActionFilterAttribute to override content-type. This code runs but the client still comes out as vnd.wap.wml. I am using this principle; & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE HTML PUBLIC "- // W3C / / DTD HTML 4.01 Transitional // N" "http://www.w3.org/TR/html4/loose.dtd" & gt; It is worth noting that vnd.wap.wml first is worth Accept-Encoding specified by mobile browser, so I IIS7, so this offer Let's take it...

java - Acronyms in Camel Back -

मैं अक्सर जावा वर्ग नाम जैसे XmlReader देखता हूं XMLReader मेरी आंत की भावना पूरी तरह से ऊपरी मामले में है, लेकिन जाहिरा तौर पर बहुत से लोग अलग तरीके से सोचते हैं या हो सकता है कि यह सिर्फ इसलिए कि बहुत सारे कोड जनरेटर को संक्षेपण के साथ समस्या हो रही है ... इसलिए मैं जनता की राय सुनना चाहता हूं। क्या आप अपने वर्ग के नामों को अक्षरों से युक्त करते हैं? हम जावा और। एनएटी जैसे ऊंट मामले सम्मेलन का उपयोग करते हैं कर। नहीं कोड जनरेटर के कारणों के लिए, लेकिन पठनीयता के लिए उदाहरण के लिए, एक ऐसा नाम जो एक एक्सएमएल को एचटीएमएल में कनवर्ट करता है, एक परिमाण के दो परिमाणों के संयोजन के मामले पर विचार करें। XMLHTMLConverter या XmlHtmlConverter आप किसको पसंद करते हैं?

web applications - In what scenario is stateful better than stateless for the web? -

I have always advocated the Stateless Web, but I would like to know what advocates of useful web are saying. Do you have any situation where statewide state is more suitable than Stateless? Our project uses the Wicket Web Framework, which allows state-wide or stateless interaction stateful pages Using a state page in the wicket makes it easy to update partial pages by using the AJAX frame of wickets Stateful is a more "intuitive" Programming model, for example, in a wicket page class, I have server side And can declare a private member field do, it can set the page loads, and hits every time some updates a Ajeaks request page. During the handling of the request, the user stops the most common millennium problems in web thier by syncing on the session object. Storing the status on the server side can improve occasionally performance; For example, an object that is ready to take time to build, but should be available on the page, when the page is first ins...

subsonic3 - SubSonic 3.0.0.3 Update Exception -

When I try to update in subsonic, I am congratulated with a null reference exception. This is an exception message I get: Object references are not set to an instance of an object. "," Stacktrait ":" GetCommand () at SubSonic.Query.Update has checked the object I am updating and there are no missing fields, all the square property databases Match the name of the column Any idea what this could be? Cheers Tony Apparently it has already been found what I have said OP about this issue and It works fine. It's a time to fix this: Go to: Click here, and select 3.0.0.3. Go to the "GetCommand" method in Subsonic.Core / Query / Update.cs (line 244) change x = & gt; X.Name.Equals For this, x = & gt; X.QualifiedName.Equals Compile it and sort it out.

c# - How do I use Strong Assembly names and key files to verify that the DLL I'm loading is what I expect? -

I am getting a project where I need to programmatically load the DLL and run some code in them. DLL and their dependencies are stored in a database, and I write them on disk, but I want to know whether any DLL is already there before it is already written or not. Currently, the database contains the strong Assembly name and binary data and version number of the file. I am thinking that in order to check against the keys of the existing files in the DLL directory, I need to collect the public key for assembly. I I know that I have the AssemblyName.GetPublicKey () Can I get the public key of assemblies using Should I also store the public key of the database file? If your code does not have a public key, how can one assembly be verified (may be)? All the code examples I have found is to show the public key in fact or to check if a strong name exists. Right now, I am working on a library management class which has only one dictionary in its core. It checks the dll directory on sta...

login failed for user: The user is not associated with a trusted sql server connection? -

We have an SQL Front End connected to SQL Server 2005 Back End. There is no problem with any user reaching the interface with the exception of one. When trying to interact with the interface, we get a SQL Server connection error telling us that the user is not connected to a trusted SQL Server connection. We are using mixed mode authentication so that there is no problem. We also thought it could be a computer, but the user gets the same error on many computers. Any suggestions? Unexpected character in username?

Multidimensional array only returning one item in PHP -

I have a multi-dimensional array, which is a few levels deep I trying to loop through some lower levels of array objects But when I do, it only returns an array item. foreach ($ item as item $) {foreign currency ($ item $ id) {echo $ id; }} For some reason, $ id echo returns the first item in the $ item array, how do I see all objects in the $ item array and resonate them? First, are you completely sure that this is a multi-dimensional array? I'll try to check my $ item structure by using print_r ($ item)

How should a HTTP server (using sockets) detect that the client is no longer connected and abort processing? -

मैं एक मूल HTTP सर्वर को सी ++ में कार्यान्वित कर रहा हूं, boost :: asio। I प्रत्येक अनुरोध को संसाधित करने के लिए, मैं अंशों में डेटा लिखता हूं, अस्तिष्क से। अगर किसी भी समय मुझे पता था कि क्लाइंट अब कनेक्ट नहीं था, तो मैं प्रसंस्करण को रद्द करना चाहता हूं, उदा। मुझे लगता है कि यह पहले से कुछ बार पूछा गया है, उदाहरण के लिए: लेकिन मैं उन्हें पढ़ रहा हूं, मुझे अभी भी यकीन नहीं है कि यहां एक अच्छा तरीका क्या है। क्या मैं क्लाइंट सॉकेट से पढ़ने की कोशिश कर सकता हूं? (यहां तक ​​कि कि HTTP क्लाइंट दूसरे छोर पर किसी भी डेटा भेजने नहीं जा रहा है) क्योंकि मैं asynchronously लिख रहा हूँ (boost :: asio :: async_write का उपयोग करके), मुझे नहीं लगता यदि ग्राहक अब नहीं है तो प्रतिक्रिया प्राप्त करने के लिए यदि ग्राहक डिस्कनेक्ट हो जाता है, तो आपको चाहिए आपके एसिंक्रोनस लेखन को एक उपयुक्त त्रुटि कोड के साथ विफल हो। जब आपके पूर्णता वाले हैंडलर को एक त्रुटि के साथ लागू किया जाता है, तो उसके बाद गर्भपात की प्रक्रिया।

version control - How do I go about splitting Lisp code into multiple source files? -

Now, whatever I fit in a source file, and how you decide on it a surprisingly small How much and different is that in different files? With Java, it's easy to decide what happens in a file (the decision has already been made for you), but I think I write several small functions which It is difficult to determine and it is difficult to decide if anything should be divided, as I have resolved big projects in Lisp, it will not be good to change the wheel again, but let me know about it Switch to was not a lot of concrete information on the web. Can you share some strategies to deal with big projects in Lisp, or to point me out some resources to deal with this issue? When you start to write a Lisp program, it may be useful to start with a file . Once the code gets very big (whatever it is) you can divide it Some signals: Some tools for managing the source There are file dependencies and functions such as compilation, load, compile-load and others. ASDF is one, but ...

customization - SharePoint View to automatically show only the current month? -

I need to create a scene that will automatically change from month to month, only the current month (i.e. if present July to July - Show items are posted in July). Currently I have a view set up, but every time I change it, then manually change the month (it is set on the first day of the current month and on the last day of the current month). Thanks Edit: I believe That's none of the box solution for this. A trick code may be written to the default view, which will actually set the month for you or redirect to another view. Something like this SPWeb web = SPContext.Current.Web; String [] massy url = {"url1", "url2", ...}; String current MonthUrl = monthViewUrls [DateTime.Now.Month-1]; response. Redirect (current Mindyral); Hope it helps.

iphone - More than 1 button on the left side of a NavigationBar -

Is this possible? I have the UINavigationBar that I want to have the 'edit' button next to the 'back' button, only one or the other from what I've read can be There is no point because they have different properties of the navigation item objects (Backbarbettonime and Bambertbutnitum). Believing that you have to enter a custom UIView in UINavigationBar . I am looking at this option and if I do not get a better solution then I will outline this method. A short answer is: Yes, you Navigation controller must add its own UIButton idea (or other UIControll subclasses), by itself, ignore custom * buttontime properties and roll it manually. A little more involved answer is: The guidelines make it easy to follow your HIV code, but if you want to break or customize them In this situation, only one button is allowed, because the actual hit area is larger than the size of the display button - it is very easy to hit from the perspective of usabilit...

python - Composite pattern for GTD app -

यह एक निरंतरता है यहां मेरी कक्षाएं हैं। #Project वर्ग वर्ग परियोजना: def __init __ (स्वयं, नाम, बच्चे = []): स्वयं। नाम = नाम self.children = children #add ऑब्जेक्ट def जोड़ (स्वयं, ऑब्जेक्ट): self.children.append (object) # सभी कार्यों डीईएफ़ कार्यों (स्वयं) की सूची प्राप्त करें: a = [] स्वयं में c के लिए। बच्चे: यदि isinstance (सी, एक्शन): a.append (c.name) वापस एक #get विशिष्ट कार्रवाई def कार्रवाई (स्वयं, नाम ): स्वयं में सी के लिए। बच्चों: अगर आईएसआईएनटीन (सी, एक्शन): यदि नाम == c.name: return c #get सभी परियोजनाओं डीईएफ़ प्रोजेक्ट्स (स्वयं): पी = [] के लिए स्वयं में c.children: यदि आईस्टेंन्स (सी, प्रोजेक्ट): पी। एपेंड (सी.नाम) रिटर्न पी # जीटी प्रोजेक्ट डेफ प्रोजेक्ट (स्वयं, नाम): सी में स्वयं के लिए। बच्चों: यदि ईस्टेंस (सी, प्रोजेक्ट): यदि नाम == c.name: return c #Action वर्ग वर्ग कार्रवाई: def __init __ (स्वयं, नाम): self.name = name self.done = False def mark_done (स्वयं): स्वयं। Done = true यहाँ मेरे लिए परेशानी है I अगर मैं कई छोटी परियोजनाओं के साथ एक बड़ी पर...

MySQL Select Statement - GROUP BY/Unique -

I currently use PHP / MySQL to select some data from my database My current selection statement is : mysql_query ("SELECT * fROM tblpm WHERE receiver_id = '$ usrID' group by thread_id ORDER by unique_id DESC) or die (mysql_error ()); There are some columns that have "thread-id", thus, I am using the group so that only one "thread-id" column has been selected. Everything works well with the group, however, it is selecting the first 'thread-id' column, and not recently (which I want to do). For example, there are four columns in the same thread_ID: thread_id unique_id 222 1 222 2 222 3 222 4 When I'm done by the group, I want to receive it with the unique ID4 (most recently created column), not unique ID 1 (oldest column created). How to get it with my selection statement, but any thoughts? Thank you. Select Thread_and, Max (unique_id) from tblpm GROUP to thread_id like: select mysql_query (& lt; & lt; ...

c# - IIS hosting WCF service error -

I am using IIS 7.0 to host a simple WCF service. I write it using VSTS 2008 + Net 3.5 + C #. The problem occurs when I (I think in the web browser that we can browse the contents of WSDL, and I create a new web site which uses port 9999 and runs an application pool under the administrator account) , I have the following error, any ideas what is wrong? Here is my service. Svc: & lt;% @ ServiceHost language = "C #" service = "Gujarat WCF.StudentManagement"% & gt; This is my web Configure: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; System.serviceModel & gt; & Lt; Services & gt; & Lt; Service Treatment Report = "Th WCF.ServiceBehavior" name = "Gu.WCF.StudentManagement" & gt; & Lt; Endpoint Address = "" Binding = "Basic HttpBinding" Contract = "Th WCF.IStudentManagement" & gt; & Lt; I...

iphone - How to copy objects, like AVAudioPlayer -

I wonder how some objects implement NCPOping is the third time in two weeks where I duplicate an existing object To do so, to go back to the disk without having to reload, or to recreate the object and set its settings. Now do I have to duplicate an AVAudioPlayer sound? I want to play sound twice, without sound. Only time determines the playback location of the other playback. I thought that class or subclass AVAudioPlayer can be easy and can implement copyWithZone However, AVAudioPlayer's internal hiding and I can not copy them easily. Now I want the good old BlockMove (& var, & newVar, sizeof (varType)); How to duplicate the AVAudioPlayer sound or a UIView view? Cause objects do not support NSCopying because it always has a link The object is not clear, and in particular, read more about what it means to 'copy the object'. I will take a practical approach in this matter. If you need a bar frequency of AvAudioPlayer , then I would recommend i...

When application is behind the VPN IPSec, How can I connect it through my iPhone application? -

I'm making iPhone applications to access the Bugzilla (app). Rightnow My application allows VPN access to Bugzilla from anywhere without IPS, but whenever I need VPN IPECEC authentication to use from outside some of the Bugzilla network, it is not allowed to access the Bugzilla from my iPhone app How can I configure VPN before joining Bugzilla? Thank you. There is no programmatic access to the VPN system on IPO so that you can do it in your application. If the question is whether it can be done on the iPhone at all, the answer is yes, although the iPhone supports VPN with IPEC. The user will need to set that set and activate it before using the app.

What is a Class Library in Java? -

What is the class library in Java? Is it a collection of classes in a package, or is it a package that has a collection of classes? I am a little confused ^ _ ^ This is a collection of classes, Usually bundled in one. All classes can be in in the same Java package, but they do not have to be. A jar file can also have resources and meta-data in the class library for which it is required (such as driver information for string translation, other frameworks etc.).

c# - FindControl() returning copy? -

I FindControl to set the value of a dropdown list on a page (). For some reason, it appears that FindControl () returns a copy of the control object against a reference, I lack a copy constructor for the control that was under the impression Will not this happen due to this? & lt; EDIT & gt; OK, it recommends that it is not actually returning the copy, it is not only setting the visibility of a control to me, the other properties that I am working in is fine. Do anyone have this information that why can this happen? I have tried to install it in Quick-clock mode, and seeing the value directly, and it is not actually changing the value! & lt; / Edit & gt; & lt; Edit & gt; (Two) Well, I'm in it Pej_lod, and it uses a Gridwu is not (I like you guys to believe that I FindControl to a search () am. I have to perform dynamic number of lists named me Similarly, because a set of operations have been, and it is better to be in the loop than hard c...

.net - Image Property Tag Constant -

I want to use GDI + defined by .NET. I wonder if these stable price classes ( eg PropertyTagGpsVer continuous ) are coming out in any base class library? I have tried to look at the system. Drawing No profit to get the name of the place. No, they are not. Tag calculation: long description of tag: I ended up copying and pasting these two pages to do this work: A set of constants you have property icons A name of the name must be implemented in the name and they must be pre-populated with the type of id, length, and property itam. Another way to do this is to select only the constants and implement them.

css - How to prevent left "post" section from dropping off? -

I have found a problem with my blog when the browser window only scales, the left part of the page ("post "Field), becomes drop. You can see it in action here: Just drag the right side of the browser, this is done by reducing the width of the browser. If necessary, I can post CSS (let me know), but I basically stand on one side of the page on the left side and the other has got to the right I think I have no clear (Or maybe not), but I'm not sure. So, how can I stop leaving the "post" section? I am precisely setting a minimum width across the pages if that is what it is happening to. should do this: #wrap, # content-wrap {Min-width: 1018px;} Of course, the minimum-width is not supported In IE 6, I will add it to get around it: & Lt ;! - [If lte IE 6]> gt; & Gt; Style type = "text / css" & gt; #wrap, #content -wrap {width: 1018px;} & lt; / Style & gt; & Lt; [Endif] - & gt ;!

What is the optimal way for reading the contents of a webpage into a string in Java? -

To get the full content of the HTML page at the URL given to me, there is the following Java code to be done in a more efficient way. Could? Any improvement is welcome. throws a static string obtained HTML (final string URL) IOException {if (url == null} url.length () == 0) {new illegalArgumentException ("URL is not empty or empty so may "); } Last HttpURLConnection conn = (HttpURLConnection) New URL (url) .openConnection (); Last BufferedReader buf = new BufferedReader (new InputStreamReader (conn.getInputStream ())); Last StringBinder Page = New StringBuilder (); Last String Lineand = System.JetProperty ("Line Separator"); String line; Try {while (true) {line = buf.readLine (); If (line == zero) {break; } Page.append (line) .append (lineEnd); }} Finally {buf.close (); } Return page To string (); } I can not help but I feel that the line is less than optimal in reading. I know that I'm probably doing masking due OpenConnection is due to the call, ...

To improve a relation figure for a database -

This question is based on my plan. The following figure shows relationships in my database I have two "help tables": question-topic and Check-Moderator . I use pre because one question can have many topics , while later because more than one moderator can examine a question. I left out 1 to 1 number on the arrow. A dotted arrow between the table question and moderator-check indicates that there may be questions that do not check the moderator. This is my first database-project, so there are mistakes in the table. What would you improve in the table? Users, user information, moderators and passwords are redundant tables that do not provide any benefits . They express only 1-1 relationships with the user, so there is no need to normalize them in separate tables: Create a table: UserId Name Email Password MD5 Issamoder

binaryfiles - What is the meaning of \x00 , \x04 in PHP -

\ x00 और \ x04 हेक्स कोड , इसका क्या अर्थ है? $ str = implode ("\ x00", $ var ['message']); // पंक्ति 1 $ id = $ var ['संदेश'] "\ X04" $ आईडी; line1 और line2 में क्या होगा मैं इसे बाइनरी प्रारूप के रूप में एक बाहरी फाइल में लिखना चाहता हूं I मुझे इस तरह की सभी जानकारी कहां मिलती है। \ x हेक्साडेसिमल अंकन इंगित करता है देखें: यह देखने के लिए कि क्या 0x00 और 0x04 का प्रतिनिधित्व करते हैं। 0x00 = NULL 0x04 = EOT (संचरण समाप्त)

iphone - How to reposition UITableView? -

I have a UITableViewController and I want to add a navigation bar for it. Therefore, after the navigation bar (which works fine), part of the original table view is being covered by the nav bar. I tried to change the table view using: self.tableView.frame = CGRectMake (0, 44 + 20 / * nab height + some margin * /, 320, 416); But table status will not be self.tableView.frame This does not work for me, throws the error, but I tableview in IB Setting, file IBOUTLET UITableView * myTabli; Connect FileOwner and tableView & gt; From MyTabli to IB I can call myTabli.frame = CGRectframe (x, y, width, height); in-file works for me.

grep - unexpected agrep() results related to max.distance in R -

edit: This bug was found in 32-bit versions of R. R. version 2.9 Was fixed in 2.. I was tweeted today by @Lenyudu and I do not have any answer for that, so I thought I would post it here. I have read the documentation for agrep () (fuzzy string mailing) and it appears that I can not fully understand the maximum distance parameter. Here's an example: pattern & lt; - "Staatssekretar im Bundeskanzleramt" X & lt; - "Bundeskanzleramt" agrep (Pattern, X, max.distance = 18) agrep (Pattern, X, Max. Distance = 19) It behaves properly as I expected There were 18 letters separated between the strings, so I hope that the threshold of a match will be. Who is confusing me here: agrep (pattern, x, max.distance = 30) agrep (pattern, x, max.distance = 31) agrep (pattern, x, max. Distance = 32) Agrep (pattern, x, max.distance = 33) Why are 30 and 33 matches, but not 31 and 32? To save you a few counts, & gt; Nchar ("Stacets without bunds...

php - what is your method of directories with in a root -

ive has created an MVC which has this level of organization as far as folders and settings are in the file. - [class] - list of PHP classes - [contains this] - config.phip - functions.php php function) --root --- [js] [css] [images] [class] - list of php squares - [contains] - config.php (includes DB connection string - functions. Php (php function) I have problems with this structure as you can see that the class, function, and a DB configured in the administration section The Shan file has its own folder. Then there is a set of pages for the root category, function, and DB connection (which is similar to the administrator) for other pages Ive tried only one folder for classes and included it for the second and the admin section and the root page are all shares but the result is included as a spider. include_once (dirname ( FILE ) ./ directory / ...) and other What if IM and Im are trying to include a file inside a folder that has a level in the current page which doe...

Getting the referrer URL in php ( including parameters ) -

Are there any HTTP headers I can use to keep the whole referrer URL by using the webserver / server-side scripting Am I ET et al with query string? You should get it from $ _SERVER ['HTTP_REFERER' '] variable.

c++ - Best way to rotate an image using SDL? -

I am creating a game and the hand of the main character will follow the mouse cursor, so it will rotate very often . What will be the best way to rotate it? With SDL you have a few options. Rotate all your sprites in advance (pre-render all possible rotations) and present them as if you have any other phantom this approach is faster, but more memory and more Uses sprites As stated, phantom is a great tool for making transformations. Use something to do real-time rotation / zooming. (Not recommended, too slow) Use SDL in OpenGL mode and submit your Phantom to the archives to apply rotation. Option 3 is probably your best bet because you gain all the benefits of using OpenGL. It really depends on you how to do it. It is also a possibility that you can load your sprites, calculate all the rotation with SDL_gfx, and then save the rotated versions to SDL_Surface in memory. EDIT: In response to your comment I have Lazyfoo's SDL tutorals. . There is also one, which ...

c++ - Using `getline(cin, s);` after using `cin >> n;` -

int n; Std :: cin & gt; & gt; n; Std :: string s = ""; Std :: getline (cin, s); मैंने देखा है कि अगर मैं cin का उपयोग करता हूं, तो मेरा प्रोग्राम अगली बार लटका होगा जब मैं लाइन मिलती है (पिन, श्रेणी इनपुट) । चूंकि getline () का उपयोग कर रहा है cin , यही वजह है कि अगर यह प्रोग्राम पहले से इस्तेमाल किया हुआ है, तो उसे क्यों लटकाया जा रहा है cin ? अगर मुझे cin ? आपको इनपुट स्ट्रीम साफ़ करने की आवश्यकता है - अपनी कॉइन के बाद निम्नलिखित को जोड़ने का प्रयास करें: cin.clear (); Cin.ignore (std :: numeric_limits & lt; std :: streamsize & gt; :: max (), '\ n'); प्रश्न का स्वीकृत जवाब यह बताता है कि क्यों / जब यह आवश्यक है।

python - why __builtins__ is both module and dict -

I am using built-in modules to insert some cases, so they are accessed globally for debugging purposes can be done. The problem with the __Biltions __ module is that it is a module in a main script and there is a word in the module, but depending on the cases my script may be the main script or module, I have to It: ifinstance (__biltins_, dict): __biltions __ ['g_frame'] = 'xxx' Other: settings (__biltins__, 'g_frame', 'xxx') Is there a lesser measure than this? More importantly, why does __biltions___ behave like this? This is a script to see. Create a module. A.py: # module- an import b print 'a-builtin:', type (__pinned pin) Create a module B.PO: # module -b print 'b-builtin:', type (__bidden pin) Now run python > $ python a.py b-builtin: & lt; Type 'dict' & gt; A-Biltine: & lt; Type 'module' & gt; I think you want __ builtin__ Modules (see Note: CPython imp...