Posts

Showing posts from March, 2012

scala - What is the difference between val b=a (a is an Array) and val b=a.clone()? -

I am reading scaladocs and am thinking the difference between direct assignment and .clone method. val a = array (1,2,3,4,5) case 1: val B = a Case 2: val b = a.clone () Consider: scala> Val a = array (1,2,3,4,5) a: array [int] = array (1, 2, 3, 4, 5) scale & gt; Well B = A B: Array [int] = Array (1, 2, 3, 4, 5) Scale & gt; Val c = a.clone () c: Array [Int] = Array (1, 2, 3, 4, 5) Scale & gt; B (0) = 0 Scala & gt; C (1) = 1 Scala & gt; A res2: array [int] = array (0, 2, 3, 4, 5) scale & gt; BR3: Array [int] = array (0, 2, 3, 4, 5) scale & gt; C rays 4: array [int] = array (1, 1, 3, 4, 5) As you can see, when you val b = a , then a and b point to the same object when the object changes, the change will be seen by both. On the other hand, when you clone the array, you create a new array with the same content. Changing this new array does not change the old.

language agnostic - Non-recursive algorithms for ordered traversing -

Based on the following techniques, there is a family of connective algorithms - we inspect some assets of the structure and use that property Without the linear, then without the linear time is the time for all possible / accessible variations (or closing, which really does not matter), example Lexicographic Permutation a .. a [n] Find previous [k] such as [k] Find [K + 1] in the minimum [M]. An [N] is such that [k] A [M] Swap [M] and [K] Reject one's [1]. A [n] n-k-subset Repeat from the end, first get zero, first 1 (first Count a [k] == 0 as [k1] one. [N] rebelance - 1] a [k] = 1 The division of n (in descending order) First Kashmir like [k] Increase a [k] = a [k] + 1 The number of elements of Kashmir is the last one Allows left neighbors as long as 1. I think it is enough to clarify the nature of such algorithms, and some other examples can be found in excellent, magnificent "book." My question is the following: In an...

dynamic jasper report multi row header -

Using "dynamic jasper", how do you create a table heading (adcum) in which there are several rows? For example HEADING1 | HEADING2 | HEADING3 HEADING4 | HEADING5 | HEADING6 HEADING7 | HEADING8 | HEADING9 ================================================= ==== VALUEFORHEADING1, VALUEFORHEADING2, VALUEFORHEADING3 VALUEFORHEADING4, VALUEFORHEADING5, VALUEFORHEADING6 VALUEFORHEADING7, VALUEFORHEADING8, VALUEFORHEADING9 ------------------------------- ---------------------- VALUEFORHEADING1, VALUEFORHEADING2, VALUEFORHEADING3 VALUEFORHEADING4, VALUEFORHEADING5, VALUEFORHEADING6 VALUEFORHEADING7, VALUEFORHEADING8, VALUEFORHEADING9 ------------- ----------------------------------------- Thanks UPDATE Or any other LIBs that can generate this kind of dynamic Jasper report? It is not possible in the DJ, but it is possible to use it, it is a / Div>

image - Producing a printable calendar with Python -

How can I create a printable PDF file (US letter size) such that every page is a month Represents and divides in such a way that the day of the month gets a box of equal size? What if I want to leave the weekend and only want to work in weekdays? Which Python module will I use to complete the following? : Splitting the image, such as the day of every day. Repeat 2-3 steps for all months in a fixed year Creating a PDF as a Production You can do it with 3 packages. To create a PDF, 'report lab', 'Calendar' to get the month as lists, and dragon binding PDF for 'ghostscript' to convert to PGF. You will start receiving data from the calendar package, in the U.S. Using the REPUBLOW to create a page of letter size. The table can be manipulated to make a grid, each cell should be placed in a box of the same size and the text font, size and alignment must be changed. You want it to be only a PDF, or you can convert this PDF into an image Ghost...

iphone - Apple not currently accepting applications built with this version of the sdk (Xcode 4.2, iOS SDK 4.3) -

I think there are 2000 other SO posts on this question, but what I have seen is Xcode 4.2 and iOS SDK Specific to 4.3 I am thinking that no one knows the setting which I am probably remembering. I have set up the base SDK in my project and it is of no use to target the build settings panels on iOS 4.3. FWID seems to be getting warnings of construction that all SDK 5.0 related boycotts are occurring. Are there any other project / target settings, which I'm missing, or is this a lost cause which is 4.3 app in Xcode 4.2? Xcode 4.2 has not been officially released. Still in beta, you can not submit an app created with it. Use Xcode 4.0.1 (Snow Leopard) or 4.1 (Lion). [4.1 is also available for Snow Leopard, if you can download it ...]

osx - "Double dot" directory name in C? -

I am writing a program for the class, and I'm thinking about the output for a little code. I have such a code: DIR * dir = opendir ("."); Struct dirent * Reader; While ((reader = readdir (dir))! = NULL) {// Print the name of the path found by the reader. } Now it is fine and all works, but I have noticed that the first two entries are always: . .. // Here rest files Now I'm assuming the first dot . is just the name of the current directory, but what is the second double? I know cd .. you have to go up in the file hierarchy, but I have no clue why this output is being made while reading subdirectory names me The reason for being worried is that I want to go to all the files continuously, but if I pass through .. , then the first directory name of it . , which causes a loop, how can I avoid it? .. is the root directory unless you are on file system root , Then it is similar to the root directory. Actually you want to see that your dir var...

c# - Start Debugger in Code -

I need to debug an application that was started from one-click install. (VS 2010, Excel VSTO Office 7). Based on the login credentials given to the one-click installer application, the user should be shown one of two splash pages. All of this works fine on my machine, but when deployed, the result changes in error from default to second slash page. For my life, how can I debug the process from within VS2010, I can attach to the login before entering the credentials, but I can not add Excel because it does not launch until I have not clicked okay button until it is done. So, is there a way to get excel, or instead, my code calls the debugger because it is so instant, so I can understand why my image processing is not available in the deployed application. ? thanks randy system Diagnostics. Debugger. Launch ();

tomcat7 - How to set the context path of a web application in Tomcat 7.0 -

I know that I can change the name of my webpad (or its wise file) root But this is a terrible way to do this, IMHO I now use the Tomcat Dock & amp; It says that elements directly to the server It is not advisable to put it in XML file So I have suggested it another way that he has suggested. So I have a /META-INF/context.xml with the following code, But when I failed to load the reference on "/" even after deploying the server after restarting, it still has "/" & lt; WEB_APP_NAME & gt; ; " What you can do the following; In the ROOT.xml & lt; Catalina_home & gt; Add a file named / conf / Catalina / localhost / This ROOT.xml will override the default settings for that engine and host (Catalina and localhost) for the original reference of the typic installation. Enter the following in the ROOT.xml file; & lt; Contact dockbase = "& lt; yourApp & gt;" Path = "" reloadabl...

c# - System.DirectoryServices.Protocol search question -

I'm trying to write a search from System.DirectoryServices.Protocol from System.DirectoryServices In SDS I get back all the requested properties, but in SDSP, I do not get a GUID or a Homephone ... The rest of the work works for a user. Any thoughts? Public Stable List & lt; AllAdStudentsCV & gt; GetUsersDistinguishedName (string domain, string specific name) {{Network credential credentials = new network credentials (Configuration Manager. AppSettings ["AD_User"], Configuration Manager. AppSettings ["AD_Pass"]); LdapDirectoryIdentifier directoryindexifier = new LdapDirectoryIdentifier (domain + ": 389"); (Using LdapConnection Connection = New LdapConnection (Directory Identifier, Credentials)) {SearchRequest searchRequest = New SearchRequest (); SearchRequest.DistinguishedName = Prominent name; SearchRequest.Filter = "(and (object category = person) (object class = user) (SN = Afran))"; // "(and (object class = user...

Nullifying user-submitted formatting with CSS -

I am working on an online publication that will accept submissions from the general public. My WYSIWYG editor is set to exclude any embedded style / class tags (except those allowed by the editor), and whenever I am saved I also see it on the server side as a third layer of defense I want to implement some CSS overrides to eliminate any CSS instructions embedded within a certain element of the page. Is this possible? I do not think of the embedded style attributes, but possibly embedded & lt; Style & gt; & Lt; / Style & gt; for blocks and class attributes? You can make sure that you win in your stylesheet! Important can use any other styling, inline or otherwise out of etc. Live example: & lt; Div class = "override" style = "background: salmon; height: 50px; width: 50px;" & Gt; & Lt; / Div & gt; . Override {height: 200px! Important; Width: 200px! Important; Background: Sky! Important; }

Can I customize auto-formatting (like using UniversalIndentGUI) with Visual Studio? -

So, I'm trying to create my own code formatting because the visual studio auto-format is not working perfectly Does i need Although I was able to get the exact code format I wanted to use Universal Indentgutty, I do not know how (or if there is any way) integrates my format with Visual Studio for now , I can copy a file into Universal IndUUU in Visual Studio and then select "Live Preview" and then copy it into Visual Studio. I think it's better to do this. Ideally, I can select "Format" in Visual Studio and convert it to my own format as I want. Is there any way I can do that? Is there a better way to copy my code into Universal IndUUI and then bring it back to Visual Studio? There are some code formatting options in Visual Studio, and there is a button to do this, but not me Know how this happens, but there are plugins to control. I know that UniversalIndentGUI can create a script to format all the files in a directory (in a given detail), ...

using .vim plugins with pathogen -

I want to use lustyjuggler and lustyExplorer, they are VIM plugins but I want to pathogens to manage them. Generally I open the Vime Plugin and the entire folder structure goes to ~ / .vim / bundle / but they come in the form of .vim files with lusty jogular and lustyExplorer. How do I get to work with these diseases? Create folders ~ / .vim / bundle / lootiejgler / plugin and ~ / .vim / bundle / lusty explorer / plugin and .im files in there

winapi - Mounting a stream encoder as a drive in windows? -

For a variety of reasons, a stream encoder of a drive, moving around the cost of the copy and the windows file system feet In so that the incoming data can be guided easily on this "drive", collected and encoded, without any intelligent source program, it is basically trivial on Linux, but there is a tough struggle on the windows. Specifically, I want to be able to "mount" a tar builder, which seems strange to me, but seems to be a solid reason to do so, whether there is a utility or library in it Related? Maybe Windows is a vague part of API? But it seems that instead of "devices" folders or similar mount. I have control over where the data is, so I can specify an arbitrary route. After experiencing a virtual drive (see our virtual storage product line) I can say that There is some redefining in your work. As stated in the comments, drive (or better, file system) in Windows, that is expected of the file system (unlike Unix World), and in thi...

jquery - .shake() fires blur event -

यह मेरा html है: & lt; div & gt; & lt; इनपुट / & gt; & lt ; / div & gt; और यह मेरा jQuery है: $ ('इनपुट')। फ़ोकस (); $ ('इनपुट')। धुंधला (फ़ंक्शन () {console.log ('BLUR!');}); । $ ( 'Div') प्रभाव ( 'शेक'); कृपया देखें किसी भी तरह से हिला प्रभाव ब्लर ईवेंट को निकालता है। यह वास्तव में परेशान है कोई सुझाव? संपादित करें : निम्नलिखित स्थिति समान है कुछ खुदाई के बाद, ऐसा लगता है कि यह अपराधी है यह तय था: // फिक्स # 7595 - लिपटे जाने पर तत्व फोकस खो देते हैं। यदि (तत्व [0] === सक्रिय || $। शामिल है (तत्व [0], सक्रिय)) {$ (सक्रिय)। फ़ोकस (); } (जो कि 1.8.16 की लाइन 4425 पर है यदि आप रुचि रखते हैं - टिप्पणी गलती कर रही है क्योंकि यह एक डेकोरेटर के बारे में बात कर रही है (पाठ लपेटने या कुछ भी करने का कोई संबंध नहीं है)) फिल्ड में 1.8.14 है, जो कि बग के खिलाफ की गई थी। यह तय 1.8.16 के रूप में उपलब्ध है, जो कि Google सीडीएन पर उपलब्ध है (और जाहिर है अगर आप डाउनलोड करते हैं नवीनतम)

multidimensional array - Generalizing a for-loop in Java -

I do not really know how my problem is described, so I will just show a code example: int [] [] [] mat; Int n; Int specific value; For (int i = 0; i & lt; n; i ++) {if (mat [ni] [3]! = Specific value) {dustf (;); }} I see the integer values ​​in a 3D-array. For each field I must use one of these: A counter is running from zero to n Running a counter is n to zero a fixed value So I have tried to make a way that would save me from writing 20 times for the loop, but I failed, so where do I need help My idea was: search (loop UP, loop.down, loop. FIXED); Where "loop" will be the nm representing one of my possibilities, but I do not know how to implement it, or if possible, it is possible that Java is possible for every possible combination Without hardcoding without / P> Hope you can help :) Okay, more specific ... with my setup, I have a vector through this 3D-array I am drawing a diagonal, and I want to know which values ​​are on this vector...

How to keep a command output window in vim -

What I see is a separate window compared to an existing window which puts the output of the command in the same buffer . So I can execute: : php% and view the output in a lower partition window. This is usually seen in most of the graphical editors I used. Note: Do not want to switch back the current window Not every time creating a new buffer ("Output" buffer I have to reuse) I do not want to be able to see the output directly in a register. will flow: Open Vim session session ... Edit a file One Perform simple make-typing commands See command output in the output window without having hundreds of new buffers and switching between windows. Do I have tried so far ... that is not satisfactory ... sending output to file, turning on Autorud, opening buffer on that file, it works but I have to start autodetection for all files. Do you have a bit of trouble ... Is there a way to turn on Autodune for a buffer / file? Thank you for your help. ...

c - Exchange the bytes -

I want to exchange a number of bytes. Example example is the binary representation of a number 00000001 00011000 00000100 00001110 . I want to reverse it: 00001110 00000100 00011000 00000001 . Can you please help? The current code is below: Bit of intent (int n) {int i, k, and mask; For (i = 15; i> = 0; i--) {and mask = 1 & lt; & Lt; I; = N & amp; k; AndMask; K == 0? (Court's & lt; "0"): (Court's & lt; If you want to reverse only 32-bit numbers, The transfer technology, which separates each byte field by using bit-masks and logical and , and then swaps those bytes by the appropriate number of transferred bits using bit-shift operators & gt; & Gt; and & lt; & Lt; Then you can rearrange bits like logical or : int temp = 0x12345678; Temp = ((0xFF and Temporary) ((0xFF00 and floating) & lt; > 24) ;; You will now end up with the last value in temporary in 0x78563412 . Update: OK, I'm loo...

Javascript Text Fields and PHP variable Declaration -

$ (दस्तावेज़) .ready (function () { var skillctr = 1; var experiencedctr = 1; var educationctr = 1; var achievementctr = 1; var historyctr = 1; / * कौशल जोड़ें * / $ ("# addSkill")। क्लिक करें (फ़ंक्शन () {if (skillctr & gt ; 10) {चेतावनी ("वाह, लेकिन 10 कौशल पर्याप्त हैं।"); वापस लौटा;} var newTextBoxDiv = $ (document.createElement ('div')) .attr ("id", 'skilldiv' + skillctr); NewTextBoxDiv.html ('& lt; लेबल & gt; कौशल संख्या' + skillctr + ': & lt; / label & gt;' + '& lt; इनपुट प्रकार = "टेक्स्ट" नाम = "कौशल' + skillctr + '" id = "skill' + तो कैसे मैं अपनी मेज में उत्पन्न क्षेत्रों को बचा सकता है? अब डेटाबेस में कैसे? मैं फ़ील्ड को पीएचपी में जैसे तरह से घोषित करने वाला हूँ .. $ _POST ['कौशल']। मुझे यहां मदद की ज़रूरत है। कृपया नाम = "कौशल '+ skillctr +'" का उपयोग न करें, नाम = "कौशल [] का प्रयोग करें"] ।...

How to convert SQL Server database to MySQL database -

I have created a website using a table using ASP.Net, SQL Server, and I have given it a provider Has published near. / P> I want to convert MSSQL.sql file to Mysql.sql file. Is there a free software, or some code to convert it to MySQL in SQL Server? If someone can help me, then it will be highly appreciated. compatibility mode for MSSQL . To do this, go to Import - & gt; Choose your file - & gt; Select "MSSQL" from SQL Compatibility Mode: . If you do not have a phpMyAdmin already installed, you can download it from the linked site above. After importing, if you want to save a copy of the SEC file in the syntax of MySQL, then just use the Export feature. P>

mysql - Entering A price -

What would be the best way to set up my SQL field for values ​​such as $ 34,000 / P> My SQL is: PRICE DECIMAL (4,2) and it seems that I can only produce 34.00. How can I show it, not one (maybe my CMS may be due to stripping data) And think if you really want to be so restrictive. After two decades of the point it makes sense, but you want to make a mistake on the safe side with the total number, otherwise you can say $ 1,000,000 in your database.

mfc - How to check whether the pop up dialog is already open? -

I'm having a button in the main dialog, if I click on it, the pop-up dialog box will be opened. Now I want to stop building many pop-up dialog boxes when I click on that button. So, I have to check whether the child window has already been opened. Help me, how to handle the hair window? I'm not sure that this is something in your program but definitely give it a try. Once your work is done with the first pop-up dialog box, add another button, the name is "closed" in your popup box, which will allow it to close it and for this, in the event handler, type oon OK. void CMyDlg :: OnClose () {CDialog :: ONOK (); } .. Hope this helps.

linux - Changing permission of cramfs file system -

I've mounted the cramfs image in some directories. Showing timestamps of 1970-01-01 files in that directory. I have problems compressing this file system because old stamps That's why I want to change the sort of time using the touch command, but when I get an error, only the file system is read. I have also tried remounting / reading / writing file system, but still I am not able to change the permissions. Can anyone guide me about this? Thanks and Regards, Mayank cramfs A readable file The system is perfect for small-system boot roms and other read-only programs and data. ~ Hollinn, Christopher (2010-10-26). Embedded Linux Primer: A Practical Real-World Approach (2nd Edition) (Kindle Location 4746-4747). Pearson Education (USA) Kindle Edition

Problem in python using readline data into an array -

तो यहां मेरा कोड arr = [] inp = open ("test.txt") Inp.readlines () के लिए लाइन के लिए "," r "): line.split () में: arr.append (i) प्रिंट arr और arr के लिए आउटपुट [ ] और अगर मैं आईआर [0] को प्रिंट करने का प्रयास करता हूं या कुछ भी ऐसा कहता है कि सूचकांक सीमा से बाहर है तो डेटा को टेक्स्ट से बाहर निकालने की कोशिश कर रहा हूं और इसे इस्तेमाल करने के लिए सरणी में डाल दिया है या एक सूची भी मैं आईवी के डेटा को पढ़ सकता हूं मेरे गलत राय में सबसे आसान लग रहा था मुझे लगता है कि lol सभी यहां तक ​​कि आई आईडी पूछने के बाद से "शुरू" कहने वाली एक पंक्ति के लिए उस दस्तावेज़ को खोजना चाहती है, लेकिन उस डेटा में सरणी या सूची जो उस बारे में जाने का सबसे अच्छा तरीका हो सकती है और मदद के लिए धन्यवाद भी अजगर के लिए नया है और यह वास्तव में देर से है इसलिए यह मेरा अंतिम उपाय है कोड ठीक है या तो test.txt खाली है, या यह कोड का सही टुकड़ा नहीं है, या आपने इसके कुछ महत्वपूर्ण संपादन किया है।

licensing - Release Modified GPL v2 Software Under v3 -

If I am modifying the software which was released under GPL v2, am I under the revised software version 3 Can I release If the license GPLv2 is only , then you can not do this. However, if it says that it is under GPLv2 or later , then you can usually it is written at the top of each file, so you can separate those two cases There should be no problem in doing

lisp - Running Emacs ispell command doesn't ask confirmation to save to private dictionary -

Every time I run an ISPL-buffer and add things to a personal dictionary. It confirms me whether I want to save it or not at the end. Can i turn it off So it does not ask me for confirmation and it automatically saves it. After adding something to the personal dictionary on this side then on a side note, until the next time I pass this word, the red does not appear underlined. Do I have to scan the document again immediately after running iPhones, so these red graphs disappear. I have saved the word in the words of private words, but still it will not be removed. It is very distracting. Thanks for any help. added (setq ispell-silently-savep t) In the .emacs file. Rupert's answer is to know the function to set me up. It seems that this also solves problem 2 if you are running on that word if you run it on some area then red graphs are still maintained

mysql - php global within a class but outside a function? -

I can do $ conn from within my function such as: function Xyz ($ A) {global $ conn; ....} I am thinking that this is a way of doing a class before. class abc {global $ conn; Public function xyz ($ a) {$ conn- & gt; Execute ...} public function xya ($ a) {$ conn- & gt; Execute ...}} The above method gives me an error I know that I can get it this way: class ABC {Public Function xyz ($ a) {global $ conn; $ Conn- & gt; Execute ...} Public Function xya ($ a) {global $ conn; $ Conn- & gt; Execute ...}} I hope you can understand what I mean. Thanks in advance for the help. Your second example is possible, your first is not. There is no such thing as a member of a class variable that is a global variable, or the use of scope like yours is your first example. Generally, however, I would advise to avoid global use. Keyword I absolutely do a lot of PHP programming and have never used it in serious (actually, nothing in the last 10 or so years). . If you ...

How to fetch and parse an XML file using AppleScript? -

कुछ रिमोट सर्वर पर एक XML फ़ाइल है (http: //foo/bar.xml): & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8"? & Gt; & LT; foo & gt; बार & lt; / foo & gt; मैं एप्पल स्क्रिप्ट का प्रयोग करके मान "बार" कैसे प्राप्त कर सकता हूं? यहां मैंने जो किया है: सेट file_tgt to (POSIX पथ (अस्थायी वस्तुओं के पथ)) & amp; "File.xml" खोल स्क्रिप्ट "कर्ल -एल" और amp; "Http://url.com/file.xml" & amp; "-ओ" & amp; File_tgt "सिस्टम इवेंट्स" आवेदन को बताओ file_content को एक्सएमएल फ़ाइल की सामग्री के लिए file_tgt file_content file_content सेट करें my_value को एक्सएमएल तत्व के मान 1 अंत बताओ अंत बताओ मूलतः मैं "यूआरएल एक्सेस स्क्रिप्टिंग" का उपयोग कर रहा था फ़ाइल को लाने के लिए ऐप, लेकिन चूंकि इसे शेर में हटा दिया गया है, इसलिए मैं शुद्ध कर्ल में बदल गया, जो हिम तेंदुए और शेर दोनों के तहत काम करता है।

oracle adf - What is the difference between partialSubmit and autoSubmit in JSF? -

I think I knew the difference, but now I am confusing myself. : P Both of them start doing the same thing, except that submitting a button to submit the form using AJAX and autoSubmit to partially submit Is used for editable components, which only submits your content, am I right in saying this? Both of these AJAX enabled calls are due to the custom properties of custom JSF components. Auto Subscription essentially backs up the component's specific content to keep the asynchronous server side bean value contained within the component on the client side. A partialSubmit is another asynchronous AJAX call, which will serve to immediately post a component value on any type of component event, such as the ICEFaces input Focusing on the text component. The noticeable thing is that the entire viewstation is posted back on each type of asynchronous submission, so if the prices of other components have been changed on the page before submission, the bound server In th...

symfony1 - Reuse a Doctrine_Record object to save multiple instances of a model -

I am working on a notification module in the Symphony application. I am running a Doctrine_Collection to create a notification for every user who has an active flag in his profile: // Notification $ notification = Prepare and define normal values ​​of new notifications (); $ Notification & gt; SetField1 ('...'); $ Notification & gt; SetField2 ('...'); ... // Post Notification for users (sfGuardUserTable :: getInstance () - & gt; findByNotifyNewOrder (as the real) $ user) {$ Notice-> SetUser ID ($ user- & gt; getId ()); $ Notification & gt; Save (); } The problem is that once I have saved the first information, then I can not reuse the object to store new records in the database. I received the $ notification-> Tried to do null and "" with setId () , but tried to update the object rather than a new saved one. / P> Is there a way to reuse the $ notification object? I would like to do this because the reasoning o...

web services - Download sharepoint reports in excel format programatically -

I have a SharePoint 2010 server on which there is a report (WorldPopulation.rdl). This report is connected to a SQL server. I would like to create a webservice which can return this report in Excel Format or any other format, which can be moved forward to proceed. maybe help

java : convert string value to int -

to JTable , I follow the row for [row 1] and calculate the values Do: Last Array List & lt; String & gt; Value = new array list & lt; String & gt; (); End end nb = myTable.getRowCount (); Int sum = 0; (Int i = 1; i & lt; nb; i ++) for {string column = value = myTable.getColumnValue (i, columnName); Yoga = Yoga + Integer.parseInt (columnValue); Value list Add (column value); } But I found: java.lang.NumberFormatException: for input string: "java.lang.NumberFormatException.forInputString (unknown source) Java.lang.Integer.parseInt (unknown source) at Java.lang.Integer.parseInt (unknown source) Your table contains at least one empty cell. Here's a suggestion: Try {sum + = integer.parseont (columnValue) );} Hold (Number Format Expection NFE) {// Cell is either empty or not an integer number // Note, method getColumnValue (int i, string name) javax.swing. JTable is not defined for . If you use the subclass of JTable , then there ...

windows "zip folders" file encodings -

Which encodings use file names through zip folders while reading? As far as I am Spanish Espaà ± ol (Spanish) French (Italian) Polish (Polish) T RKAE (Turkish) German (German) Italiano (Italian ) ا٠?? Ø¹Ø ± ب٠?? Ø © (Arabic) Persian One ?? ? À¸ ¢ (Thai) 游¸¸¸¸? (Chinese) æ ?? ¥ æ ?? ¬ ♥ ?? (Japanese) í ???? Êμì ?? '(Korean) Tia Via Via »? T (Vietnamese) I think the first seven are in CP 437. The Chinese may be in Big 5 but I do not know anything about others. According to this, this platform is the default encoding. / P> The Windows "Compressed Folder" feature does not recognize any flag or additional area and creates archives using the default encoding of platforms - and reading those records expects them to be in that encoding is.

overriding admin field label content in django -

I am using administrator forms for CRYOUD operation. However, I want to add some characters to the labels generated by the administrator. For example, * when required in the area *. How can I complete it? I can directly add the admin code to the code and add * (in this case, the file contrib / admin / helpers.py ) but it is not correctly . How can I do this? There is no "good" way to do this, then your options will be CSS (add background IMG) , Subclass form, template tag, or template modification. Here are some good answers to this last question:

javascript - Chrome: Uncaught Syntax Error : Unexpected token -

page It seems Chrome is the only browser in which this bit is a problem with Javascript I found Is that if I remove '//' from the CDATA tag chrome, then I will be given a line number for error-line 48. I do not even know where the bug starts with unfortunately, the code works as expected, but loading / parsing with chrome takes a little longer time. I have tried to use the script as an external file (float.js) but the error is similar, the code in the output must be included in the HTML body. Any suggestions? EDIT: This was an extension that caused this error, is there any way to code against this? This was 'greasy gesture' extension. Delete

sql - Unique index in already existing database table -

मैं SQL Server 2008 में मेरे एक डेटाबेस तालिकाओं पर एक नया अद्वितीय अनुक्रमणिका जोड़ने का प्रयास कर रहा हूं यह एक मौजूदा तालिका और स्तंभ है जहां मैं चाहता हूं कि अद्वितीय अनुक्रमणिका में पहले से कुछ डुप्लिकेट मान हैं। क्या मैं उस कॉलम के लिए एक अद्वितीय अनुक्रमणिका सेट कर सकता हूँ? यदि ऐसा है, तो कैसे? यदि कॉलम में पहले से ही डुप्लिकेट मान हैं तो मैं आपको एक अद्वितीय कम्पोजिट बनाने की सलाह देता हूं इसके बजाय कुंजी। उदाहरण के लिए इसलिए, इस तालिका डिजाइन के साथ उस मुद्दे को संभालने के लिए, आपको ग्राहक ID / ProductID कॉलम पर एक अद्वितीय बाधा बनाने की आवश्यकता है: ग्राहक उत्पाद (ग्राहक आईडी, उत्पाद आईडी) पर अद्वितीय अनुक्रमणिका cust_products_unique बनाएं तो संक्षेप में, खेतों के संयोजन सुनिश्चित करते हैं कि सूचकांक अद्वितीय है। सादर

java - I'm unable to get WiEngine skeleton project to run -

Image
So I'm trying to close some Cocos 2D iOS app on Android and it seems that the Wiiin is the most complete Port is displaying Cocos 2D to Android (), although I have problems running the skeleton project. I am the latest problem running, I started the "Elps / Wione / Engine / Skeleton / Skeleton" error in ADB Time one "exception algebra / lang / dissident Inserting images links is Enter "; I'm trying to run it in the emulator which can be an issue. I have been stuck in a way because I need to see that before getting a hardware purchase right, I can get some things to work (particle effects etc.). Basically I tried to get the skeletal project but ran into many errors, so I created a blank Android project as a skeleton project with the same package name and projects & gt; Libraries & gt; Adds libraries to libraries to add external jars The project compiles but crashes as soon as it tries to initialize the skeletal class, such as console accessories...

java - Declarative Transaction Management in Spring behaving unpredictably -

I have a Spring + Hibernate application with declarative transaction management, I have a service ( FooService ), which has 2 public methods MethodA and MethodB . The client will be call with Method A which in turn will call MethodB . client - & gt; Method A - & gt; Methodeb I have to start with the transaction methib. It is a snippet from my spring app - Reference: & Lt; Property Name = "Transaction Properties" & gt; & Lt; Theater Content & gt; & Lt; Support key = "methodeb" & gt; PROPAGATION_REQUIRED, -FooException & lt; / Prop & gt; & Lt; / Theater & gt; & Lt; / Property & gt; & Lt; / Bean & gt; However, when I call MethodA to my customer, it does not make a transaction proxy when calling MethodB goes . If I add MethodA too to the Bean configuration in the application context, the transaction proxy (start MethodA , as expected) is started . Why is it like this? Can I ma...

c# 4.0 - How to implement string manipulation in efficienct way? -

I have string = "/ show / search / all.spacks? Et = A1" in an efficient way 'Att = How to get the final price? You can make a partition example (in C #): string Line = "/show/search/All.aspx?Att=A1"; p> string [] parts = line. Sample ('='); // parts [1] have A1; Hope this helps

css - How to break long words in a table td? -

This is what I have: & lt; Td style = 'width: 500px; White-space: Pre-wrap; White spot: -Moz-pre-rap; White-space: -Peep-wrap; White spot: -O-pre-rap; Wrap-wrap: break-word; '& Gt; I think this solution will help you! Pre {White-space: East; / * CSS 2.0 * / white-space: pre-rap; / * CSS 2.1 * / white-space: pre-line; / * CSS 3.0 * / White-space: -prep-wrap; / * Opera 4-6 * / white-space: -O-pre-rap; / * Opera 7 * / White-space: -Moz-pre-rap; / * Mozilla * / White-location: -HP-pre-rap; / * HP printer * / word wrap: break-word; / * IE 5+ * /} // Edit It has been long since it accepted The best answer and updates were necessary. See the replies given below @ Benaholdale 89 and @ Steve. The support of the current browser is now enough to use the word-break to break words in many rows Paused: Paused - All

C++ getting the size of an array -

I'm new to programming and I was wondering how to get an array size, which gets the size How many elements are inside the array, for example if I declare an array of size 10, but only 3 input elements in the array, how do I set the size of this array? If I do not know how many elements I had initially placed in If you declare an array, e.g. int array [10] , then its size is always 10 * size (int) . There is no way to know how many times you have accessed it; You need to keep track of yourself. You should consider using container classes, e.g. std :: vector : std :: vector & lt; Int & gt; Vec; Vec.push_back (5); Vec.push_back (10); Vec.push_back (42); Std :: cout & lt; & Lt; Vec.size () & lt; & Lt; "\ N"; // print "3"

ruby on rails - Mapping has_many and belongs_to to Active record relation object -

मेरे पास निम्न मॉडल हैं: मॉडल A & lt; ActiveRecord :: बेस has_many: bs end मॉडल B & lt; ActiveRecord :: बेस is_to: c,,: polymorphic = & gt; सच है,: विदेशी टाइप = & gt; 'C_type',: foreign_key = & gt; 'C_id' end मुझे c से संबंधित a को एक के रूप में प्राप्त करना है ActiveRecord :: संबंध ऑब्जेक्ट इसलिए मूल रूप से मैं निम्नलिखित विधि को हटाना चाहता हूं a.bs.each do | b | सीएस एंड एलटी; & lt; बीसी एंड क्योंकि यह c की एक सरणी का उत्पादन करेगा, लेकिन मैं c का संग्रह प्राप्त करने में सक्षम होना चाहता हूं, जिस पर मैं जैसे scoping चला सकते हैं: cs.scoped (: order = & gt;: updated_at) .all (: limit = & gt; 5) मुझे लगता है मैपिंग की तरह कुछ सरल अवधारणा है: a.bs.map (& amp;: to_resource) या ऐसा कुछ। मैं रेल चला रहा हूँ 2.3.14 वास्तव में इस संबंध में मदद की सराहना करते हैं। अग्रिम धन्यवाद। आप ऐसा कर सकते हैं: वर्ग सी & lt; ActiveRecord :: बेस नामित_स्स्कोप: बाय_ए, लैम्ब्डा {| ए | | {: शर्तें = ...

wordpress - Empty space in post content -

I have a blog based on WordPress, I have developed a plug-in syntax highlighter. The first code in my post is empty space in Chrome, but there is no [image] in IE. How is this fixed? I do not think this issue is okay. I have run into Firefox / Chrome / IE formatting issues working as a software developer, and this problem underscores the HTML structure. Each browser will interpret HTML code differently. If you can change the HTML sent to your post, then you can fix this problem. If not, then I would recommend receiving a separate code formater is a built-in format for the code triggered in WordPress, or & lt; Tt & gt; Your code is here & lt; / Tt & gt; See links for more detail:

php - For Each loop not echoing data (mysql_fetch_assoc problem?) -

Hello and good morning, I'm still learning PHP and for some reason my script Will not post any thoughts in my foreach loop why any thoughts? Email the e-mail properly, but I want to remove my code: & lt ;? Php include 'include / header.php'; $ AccountUser = array (); $ UpgradeEmail = $ _GET ['currEmail']; $ EmailQuery = "Select FBIID, first name, user by last name, where email is a = ''. $ $ UpgradeEmail. '' And authLevel = 0"; & Lt ;? Php echo $ emailRow ['fbID']; ? & Gt; & Lt ;? Php echo $ emailRow ['firstname']; ? & Gt; & Lt ;? Php echo $ email rou ['last name']; ? & Gt; While ($ emailRow = mysql_fetch_assoc ($ e-mail, $ conn)) {$ accountUser [] = $ emailRow; }? & Gt; & Lt; Table & gt; & Lt ;? Php foreach ($ accountUser $ as email data) {? & Gt; & Lt; TR & gt; & Lt; TD & gt; & Lt ;? Php Emailadata ['FBID']; ? & Gt; & Lt; / Td...

indexing - How to get index value of a link with a specific class using plain JavaScript? -

I have about 20 links with the specific category of links that I want to target if 10th link is clicked So, how can I get its indicative value (I need to return)? I am using plain javascript so that there is no jQuery. Through the loop elements, click function link ( L) {var elements = document.getElementsByClassName ('className'); For (var i = 0; i & lt; elements.length; i ++) {if (element [i] == el) {warning (i); // Element Pointer}}}

what's the usage/meaning of jQuery event.detail? -

I handle click events on a button and click on e.detail = 0 However, when I enter a text box and for some reason a button click is triggered (asp.net) e.detail = 1 . I could not find it in jQuery, it's just written that it's there, but it does not tell what it does. Event Properties The following properties are guaranteed, despite being a member of the event object, some of them may be undefined: AltKey, attrChange, attrname, bubbles, button, cancelable, charcoda, client x, client y, ctrlKey, currentTarget, data, description , eventfase , Element, Handler, Keycode, Layerax, Layer Layer, Metaca, NewView, Offset X, Offset Y, Original Target, Pagex, PageY, Preworld, Affiliation This node, related tag, screenX, screen, palette, sequelment, target, to element, view, wheeledelta, , this event varies by type. event.detail property ... Depends on the type of incident gives additional numerical information about the incident see the Notes section for detail...

Run migrations from rails console -

Is there any way to run the rake command for a deb: Migrate and DB: rollback on the console? It is worthless to wait for the rail to load for the environment! This will allow you to migrate the entire rail environment without reloading: ActiveRecord :: Migrator.migrate "db / migrate" and rollback: Number of rollbacks, optional, number of migration for default Is 1 active Record: Migrator.rollback "db / migrate", 3

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -

I am trying to write a simple invoicing system. I want to use the Datetime Diff to calculate the cost of each invoice. I have so far: / * In this example $ dayLength and $ ratePerSec is not really the case, but now we use the hypotethical values ​​of 8.0 and 0.0054 Will * / $ date1 = new date time ("Time 1 Form Database", [DateTimeJonof Chase]); $ Date2 = new date time ("Time 2 Form Database", [Datetime Joneof Choice]); $ Diff = $ date2- & gt; Diff ($ date1); $ LenInSec = $ diff- & gt; Format ("% y") * 365 * $ dayLength * 3600 + $ diff- & gt; Format ("% d") * $ dayLength * 3600 + $ diff- & gt; Format ("% H") * 3600 + $ diff- & gt; Format ("% i") * 60 + $ diff- & gt; Format ("% s"); $ Cost = $ lenInSec * $ rate per second; When I try to output cost using $ lenInSec generated from the Deltaime Diff, I actually get weird results. Occasionally, in 1 and 3 out of 1 to 3 times, I get the...

javascript - How does one move html elements with scroll? -

I want to create a scroll behavior such as what can be found. If you scroll down the page, you will notice crabs, sharks, waves etc. whenever the page moves. How can this be achieved? Is this a script or css animation? Edit: Text bubbles also appear in different scrolling points and disappear. If you need a more robust jQuery script to help you: According to the answer: Justin recommended a small more complete fat solution than already ... (by answer)

plone - What's the most straightforward way to move the globalnav to the footer, only on the front page -

I hid various elements normal Plone front page: . Section-front-page # portal-global nav {display: none; } Now, I want to add a global innovation at the bottom of the footer. I have considered a variety of ways: to select a browser view / template through the display menu Another Wulet JavaScript ( Okay, what I have not because I did not understand it I Javascript not know very well, but it is possible.) the best way? The Plan 4 and above, you can register Drishylet global name as a global provider : & lt; adapter name = "globalnav" For = "* zope.publisher.interfaces.browser.idefaultBrowserLayer * provides" factory = "plone.app.layout.viewlets.common.GlobalSectionsViewlet" = "zope.contentprovider.interfaces.IContentProvider" / & Gt; And then it involved your homepage template or main_template: & lt; Tal: block cadence: replacement = "structure provider: globalnav" />

ajax - response.responseText adds previous responseText (node.js, prototype) -

यह मेरे node.js फ़ंक्शन है जो res.write का उपयोग करता है: function: ping () {Res.write (JSON.stringify ({"डेटा प्रकार": "पिंग"})); SetTimeout (पिंग, 30000); } यह ग्राहक है, प्रोटोटाइप में लिखित अनुरोध: this.pushconnection = new Ajax.Request (pushserveraddress, {method: 'get', EvalJSON: 'झूठी', इंटरैक्टिव पर: this.pushconnectionInteractive.bind (यह)}); } पुश कनेकशन इंटरैक्टिव: फ़ंक्शन (प्रतिक्रिया) {} समस्या यह है कि प्रतिक्रिया.प्रस्पतिक पाठ प्रत्येक res.write से बढ़ेगा के माध्यम से। उदाहरण: 1 पिंग () प्राप्त किया गया है: response.responseText = {"डेटाटाइप": "पिंग"} दूसरा पिंग () प्राप्त किया गया है: response.responseText = {"डेटा प्रकार": "पिंग"} {"डेटािंग": "पिंग"} 3 पिंग () प्राप्त किया गया है: response.responseText = {"डेटाटाइप": "पिंग"} {"डेटा प्रकार": "पिंग"} {"डेटा प्रकार" : "पिंग"} मुझे यकीन नहीं ...

ruby on rails - How do I use xsltproc command-line tools on Heroku -

In Rail application in my Ruby, I am using XSLTProquy command line tools. They work on my development machine but are not working on Heroku, using the deployment platform. I supported a question about this from Harakok, and here's what they say: hi ?? Can you try to compile XSLTproc as a standalone static binary and apply it as part of your application? If I knew what this means, then maybe I will not be here. I'm guessing that all the files are created with the XSLTproc code and call for XSLTProx commands. I do not know how anybody can help it? If anybody wants to use XSLTProx command line tool in Hierocock, do not do this. I was able to use the nozzle gem built in XPath functions for everything that was needed.

php - Ordering an Array with weights? -

Image
समस्या अभी मुझे इसे बनाना है: मेरे डेटाबेस में; अपने पसंदीदा 'वेट' प्रविष्टि के रूप में प्रत्येक पसंदीदा। अभी के रूप में यह '10' के लिए चूक है मान लीजिए मेरे पास पसंदीदा सरणी है, वज़न इस तरह से चलती है तदनुसार: 1 2 3 4 > अगर मैं '2' पर 'डाउन' तीर दबाकर रखता हूं तो मुझे उसके वजन में 1 जोड़ना होगा। इसमें क्या परिणाम होगा: 1 3 4 लेकिन मैं पसंदीदा '2' पसंदीदा के साथ '3 के वजन स्विच करना चाहता हूँ। मुझे यह सुनिश्चित करने के लिए एक तरीका है कि जब प्रत्येक आइटम के लिए वज़न के रूप में वे निहित हों 1 से जोड़कर या घटाए जाने से बहुत अधिक समस्या हो सकती है। उम्मीद है मैंने इसे ठीक से समझाया। कोड डेटाबेस को लेखन / * * डाटाबेस को डेटा लिखें * / फ़ंक्शन f25_favorites_form_submit ($ फ़ॉर्म, और $ form_state) {वैश्विक $ उपयोगकर्ता; $ ListOfPaths = f25_favorites_listOfPaths (); $ चयनित = $ form_state ['values'] ['पथ']; $ डेटा = सरणी ('यूआईडी' = & gt; $ उपयोगकर्ता- & gt; यूआईडी, ...

Android - Retrieve a thumbnail of a video from the server and display on phone -

My question is how do I get a video thumbnail (for example, video exists). I just want to download just one thumbnail from the server and display it on the phone and when the user clicks on the thumbnail, the video player will start using the video file Yuri. So, what is the process of creating a thumbnail directly from the server, as I actually see some methods of files present in SDCD, (but I am not looking for these styles). Thanks Assuming the application of a web site U can read the first video-frame / iFrame and it is decoded by example. Ffmpeg, however, for this, you can implement the C ++ code, possibly to read and change that first frame in that backend, e.g. Send a JPEG, and then return it to the caller (web page)

bash - Space optimization for the UNIX sort -m command? -

I am trying to run a syndication test, in which thousands of very large pre-sorted files have a mega sort Merging is included in the file. There are some current files that are usually merged (68M to 106M each). I do not have enough hard drive space for input, temporary intermediate, and all output at the same time. What is a way to destructively destroy all these files using sort ? I am currently using: sort-T / media / WD_Book / tmp --compress-program = gzip -g -k 6 -m * .rand.tab & gt; / Media / WD_Book / output / merged.rand.tab (via the files 0001.rand.tab to 1000.rand.tab , and the ordered key is in the 6 column [thus -k6 and -g ] in the exponential marking.) I know it It is possible to run a non-merge sort in-place, but MainePep specifically says that it will not work for -m . It may be that way (warning: wipe data.) merged contacts. Rand.tab # File Result File Zero for File [0-9] *. Rand.tab; Sort -k 6 -g -m merge. Rand.tab $ file & g...

java - Getting Callback after all setters called to add extra fields? -

I want to override a setter so that I can do some functions on the data so that I can return a calculation column My organization This function depends on many columns (eg, 1 9 2, 2, 2, 2), so I can not really block a particular setter because other values ​​can not be populated yet. Does Hibernation provide some type of "Finnish ()" method which can be called once upon values? @ override @ column (name = "COL1") public string getCol1 () {this.col1; } @ Override Public Zero Set Call 1 (string value) {super.setCol1 (value); GenMagicValue (); } Public string getMagicValue () {return.magicValue (); } I do not understand your question, never setCol1 Can be said (and left with its default value). Apart from this, anyone is preventing you from calling twice with different values. Perhaps the method you are looking for is: Boolean magic = wrong; Public string getMagicValue () {if (Magic Done) {magicDone = true; GenMagicValue (); } Make this return. Magi...

floating point - double arithmetic and equality in Java -

There is an inequality here (at least for me). This routine is true: double X = 11.0; Double y = 10.0; But this routine prints false prints: double x = 1.1; Double y = 1.0; If (x-y == 0.1) {// print true} and {// print false} Anyone cares to explain what's going on here? I am looking for something with integer arithmetic for int s for float s. Apart from this, is there any other property (other than 10 ) in this property? 1.0 does not have accurate binary representation of 0.1. Perhaps you are asking that 0.1 is not stored in the form of a Mantissa and an exponent of 10? But it's not how it works. This is not an exponent more than the decimal number but it is a binary number. So "Bar 10" is not a natural thing. Sorry, maybe the last part is unclear. It is better to think of exponents as a shift of bits, any shift of bits transforms an infinite sequence such as 0.1 (decimal) into a finite.

php - Safe & Secure Way to Add Domain to Server -

I am trying to find the best way to connect a new domain on the server using PHP. I know that this is possible because applications like Bit Pro Pro are allowed to connect to their domains and begin managing them for small domains (hence they can redirect). Here's how this will work, but I want to make sure it's safe, and also want to learn the safest way to execute this process: The user joins the domain, the domain is valid with the regex The user verifies the domain (is it really necessary? They can edit DNS's domain if it Is of their domain) server The API calls the DNS Manager to add the domain (I'm using Linode, so this is an API call The application writes on the new virtual host httpd.conf App Resume Apache Then, this process may be completely shut down, so please tell me what you think and how you will code it lot Thank you very much! :) and 5. Not sure. Just redirect all domains to a script (php / cgi / etc) that handles and redire...

javascript - Dojo sortable table -

I'm new to dojo but what my team uses is I searched on google and An example is found, but I have not found any dojo documentation about its use, which makes me feel that it disliked it. Table head is declared in HTML and table body is built using JSTL. I just want a table that is based on column clicks. I know that there is a jQuery plug-in, but I'm looking for a dojo solution. I want datagrid and it has more functionality than it needs. Is there a dojo sortable table or do I have to use javascript? There is a group of tables / grids based on dojo Yes, the one you mentioned has been boycotted New, lightweight options of datagrid are being developed. Try or

svn - How to "undo" a commit in tortoise? -

For example, say that I have the version of some files required only for my local dev machine, but I mistakenly Have committed. What is an easy way to return all those files to the previous version and is it the latest copy in svn? You need to do this.

c# - How to register a List in JS and iterate it? -

I have written some code in ASP.net: the back code: public string location { get; Set; } Public listing & lt; String & gt; Categories {Get; Set; } Public listing & lt; String & gt; Hrefs {Get; Set; } Public String Categories J {get; Set; } Public string HrefsJ {get; Set; } ... this.CategoriesJ = new JavaScriptSerializer (). Serialize (Categories); this. HrefsJ = New JavaScript Serializer (). Serialize (categories); JS in markup: & lt; Script type = "text / javascript" src = "scripts / jquery-1.4.1.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var Categories = jQuery.parseJSON (this.CategoriesJ); Hrefs = jQuery.parseJSON (this.HrefsJ); Function onInit () {Warning (Categories [0]); }; & Lt; / Script & gt; Is it OK to use Index such as Jason Worl? Is this the right way to write? So why do not I look alert? The code behind the Var is equal to: ["Restaurants"...

java - Http 400 in appengine when using URLFetch with Http Method 'DELETE' -

I am unable to request "DELETE" using the code given below: URLFetchService fetchService = URLFetchServiceFactory.getURLFetchService (); URL posturals = new URL ("http://www.example.com/comment?token=xxx"); HTTPResponse response = fetchService.fetch (new HTTPRequest (posturl, HTTPMethod.DELETE)); Int responseCode = response.getResponseCode (); This is for Google Appengine 'DELETE' request is for the Facebook Graph API. The above code gives me a status code 400 - bad request. This is an open source Java library that I have created for the Facebook Graph API. This is not really an app engine problem; This means that the destination webserver will not accept your request. If you are actually trying to send DELETE to example.com, this is your problem. If this is considered a clear URL, then you have left the problem that facilitates troubleshooting.

scheme - How to write a macro that receives any number of arguments and print them out? -

(परिभाषित-वाक्यविन्यास prnt (वाक्यविन्यास-नियमों) ([prnt elem ...] (प्रदर्शन (प्रारूप "~ ए" एएमएम ...))]) रैकेट में उपरोक्त कोड निम्न त्रुटि काट देगा: प्रारूप: प्रारूप स्ट्रिंग 3 दिए गए 1 तर्कों की आवश्यकता है; तर्क थे: "~ a" "1" 2 3 फिर उपयोग करने पर मैं कैसे प्राप्त कर सकता हूं (प्रंट "1" 2 3), यह किसी भी चीज़ को प्रिंट करने के बाद प्रिंट कर सकता है? यदि आप वास्तव में एक मैक्रो चाहते हैं: (define-syntax prnt (syntax) -रुल्स () ([प्रिन्ट एएम ...] (शुरू (डिस्प्ले एलएनएमएम) ...)]) आपको एक मैक्रो की ज़रूरत नहीं है अगर आप चाहते हैं कि आप सक्षम हो एक फ़ंक्शन कॉल के साथ कई ऑब्जेक्ट प्रदर्शित करने के लिए, हालांकि: (परिभाषित करें (प्रेंट। एजीआर) (प्रत्येक डिस्प्ले एलएन आरजी के लिए))

uitabbar - Interface Builder won't allow me to select a nib name for tab bar -

I just upgraded to xcode 4 and I have a lot of trouble setting nibb names for a particular tab . If I choose the nibb name then it goes down a list with nothing, if I just type in the nib, I want to, when I run it, it does not show that scene and I did not The class is specified for the tab. I have one tab bar and one of the navigation controller tabs. Thank you You can add a uinavigationcontroller to your uitabbarcontroller. Now you can add a UIIVIC controller for additional UIVAC controller. Now you can change the category of last UIVist controller, and set the nickname for this item.

webclient - How to make a web request using https in silverlight -

मेरे पास var क्लाइंट = नया वेबक्लेन्ट (); Client.DownloadStringCompleted + = (s, ea) = & gt; {Var ret = Newtonsoft.Json.JsonConvert.DeserializeObject (ea.Result); .....}; Var uri = नया उरी ("../ myrest / लॉगिन", उरीकिंड.रिलेटिव); client.DownloadStringAsync (URI); यह ठीक काम करता है लेकिन मैं https पर इस अनुरोध को सादा HTTP नहीं भेजना चाहता हूं। मैं योजना के लिए https को बदलने के लिए यूरी पते में हेर-फेर करने की कोशिश करता हूं var url = "https: // localhost / myrest / login"; // अब क्लाइंट के लिए हार्डकोड। डाउनलोडलोडिंग ऐसिंक (नया यूरी (यूआरएल) , उरीकिंड.असदोल्यूट)); लेकिन यह काम नहीं करता है यह संपूर्ण क्लाइंटटाइसेसपोलिसी.एक्सएम चीज़ी को चालू करता है संभवतः क्योंकि मूल यूआरएल एक्सएपी लोड करने के लिए इस्तेमाल किए जाने वाले यूआरएल से अलग है मुझे पता है कि मेरे पास पूर्ण पथ सही है, अगर मैं सिर्फ 'https' को 'सभी' कामों में बदलता हूं तो ठीक है SL4 HTTPS के माध्यम से अपना सिल्वरलाइट एक्सेस करने का प्रयास करें और HTTPS लॉगइन का ...

c# - how to merge / join two different list into 1 -

I am working on an application for the Windows Phone Platform. Run in a question. I had 2 different lists, 1 is read directly from the XML file, and by some other calculations. And I want to merge these two lists into 1, so I can display it. List 1: public class studentClass1 {public string studentID {get; Set; } Public String Student FirstName {get; Set; } Public string studentListName {get; Set; }} list 2: public class studentClass2 {public string studentID {get; Set; } Public String StudentGradePoint {Received; Set; }} First of all, I had read studentClass1 var studentList = through the studentInndex.Descendants ("student") select new drivers Student List 1 = Student List. ToList (); Secondly, I calculate the function and output of the student grade points in the second list: studentClass2 SG = new student class 2 {studentID = thestudentID , StudentGradpoint = thestudentGradePoint.ToString ()}; StudentList2.Add (SG); StudentListAll = StudentLis...

regex - what is the preg_match solution in php for matching anything between '[' and ']'? -

मेरे पास बहुत सी स्ट्रिंग हैं, जिनके पास अक्षर हैं [anything] जहां शब्द कुछ भी == किसी भी तरह का अक्षर, जैसे ~! @ # $% ^ & Amp; () PHP में ऐसी स्ट्रिंग से मेल करने के लिए preg_match () कोड क्या होगा? इसे आपको जो करना चाहिए, उसे करना चाहिए: & lt;? Php $ matches = array (); Preg_match_all ('/'[(.+?)\]/ s', $ स्ट्रिंग, $ मैचों); विदेशी मुद्रा ($ मैच [1] $ मैच के रूप में) {// क्या यहां सामग्री है } यह आपकी स्ट्रिंग में ब्रैकेट के बीच हर बार टेक्स्ट के माध्यम से पाशन होगा।

What is the difference between Switch-Case and If-Else in PHP? -

I am deciding that if / else vs switch / case I am writing and I was thinking that if there is any benefit to use one or the other, or if there were some such examples Where one was intended to be used compared to the other. Interesting questions when using a compiled languaged (or even in JIT'ed language) switch statement There is a good performance advantage as the compiler can build leap tables and run in constant time. The switch on the string can also be optimized because the string can be washed. However, what I've read appears to be that PHP does not make any such optimization (I believe it because it means and runs the line by line). Great article about switch optimization: About PHP explanation, PHP Docs says: Switch to avoid mistakes It is important to understand how the statement is executed: The switch states the line through the line (in fact, statement by Statement). In the beginning, no code is executed. Only when a case statement is found...

android how to set a fake location to phone -

I'm trying to use fake location over the phone but it's showing exceptions, My code is below, Location location = New location (MOCK_PROVIDER_NAME); Location.setLatitude (latitude); Location.setLongitude (longitude); Location.setTime (new date (.) GetTime ()); LocationManager.setTestProviderEnabled (MOCK_PROVIDER_NAME, true); LocationManager.setTestProviderLocation (MOCK_PROVIDER_NAME, Location); Toast. MakeBaseContext (), "Latitude:" + location. GETLITITUDE () + "Longitude:" + location. Gate lengtewood (toast). LNNGHHORT). Show (); I gave MOCK_PROVIDER_NAME = "GPS" but it is also not trying with "network" and "cheating", but it is not working. Where I am going wrong, tell me anyone. Thank you Here are two possible reasons for your problem: A security exception: If the ACCESS_MOCK_LOCATION permission is missing or the settings are not protected. ALLOW_MOCK_LOCATION is not enabled in the system setting or ...

Creating multiples instances in Google App Engine JAVA -

Image
I am testing Java API using Java Ava and I want to test several instances in parallel to run . However, I do not know how to activate the multiples. I tried to run this service in different browsers (I also tried to run concurrent calls in separate machine with different IPs) - Import java.io.IOException; Import javax.servlet. *; Import javax.servlet.http.http. *; Import java.math. *; Public Square SimpleServlet HttpServlet {// is a variable that is not thread-safe! Public Zero doGet (HttpServletRequest request, HttpServletResponse resp) ServletException throws, IOException {doPost (req, resp); } Public Zero doPost (HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {int counter = 0; Resp.getWriter () println ("& Lt; html> gt; & lt; body & gt;"); Resp.getWriter (). Println (this + ": "); For (int c = 0; c "); }} The process for each service takes 5 seconds but requests are collected in an examp...

c# - not able to get the number of products count -

मेरे पास कॉलम के साथ उत्पाद तालिका है product_id (pk) product_name product_description product_price category_id और मैंने product_id के लिए गुणों को इस तरह सेट किया है ... (प्राथमिक कुंजी, रिक्त नहीं, ऐ) मैं प्रतिनिधित्व करने का प्रयास कर रहा हूं डीटग्रिड दृश्य में समान उत्पादों की संख्या जैसे एक स्तंभ के रूप में product_name product_description स्टॉक उपलब्ध उत्पाद की कीमत एक अच्छा उत्पाद 2 (a + a) 300 b खराब उत्पाद 3 (बी + बी + बी) 400 निम्नलिखित विधि से .... var स्टॉकउपलब्ध = dbcontext.products .GroupBy (x = & gt; x.product_Id)। चयन करें ( A = & gt; नया {productid = a.key, उत्पादनाम = a.FirstOrDefault ()। Product_Name, productdescr = a.FirstOrDefault ()। Product_Description, स्टॉकउपलब्ध = a.LongCount (), productprice = a.FirstOrDefault ()। Product_Price} ); Bindingsource.DataSource = स्टॉक उपलब्ध; Datagridview1.DataSource = bindingsource; लेकिन यह उत्पादों की संख्या नहीं दिखाती है भले ही दो समान उत्पाद हों विभिन्न उत्पाद_आईडी के साथ कोई भी इस पर कोई ...