Posts

Showing posts from March, 2013

More SVG questions (and Javascript) - Interactivity [moving a rectangle] -

The following code should be rectangularized while pressing WASD keys on the keyboard. This does not work, the rectangle is not transferred, but no error occurs. How can I do this work? & lt ;? Xml version = "1.0" encoding = "UTF-8" standalone = "no"? & Gt; & Lt ;! DOCTYPE svg PUBLIC "- // W3C / DTD SVG 1.1 / n" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> & Lt; Svg width = "90%" height = "90%" version = "1.1" xmlns = "http://www.w3.org/2000/svg" & gt; & Lt; Script type = "text / javascript" & gt; & Lt ;! [CDATA [var x; Var y; Function moves () {x = new number (document.getElementById ("player").); Y = new number (document.getElementById ("player"). Y); Switch (event.keyCode) {Case 119: y--; Document.getElementById ("player") y = y break; Case 115: y ++; Document.getElementById ("player") y = y break...

Perl: Store column from Mysql-table in Perl-Hash -

I have problems with MySQL and Perl. I am coding a web crawler and I want to save the Tudo-list in the MySQL table. Now, at the beginning of the script, I want to load mySQL from MySQL in Pearl hash, so that I do not filter the URL again. The following is the structure: The table "todo" - unique ID "todoid" - TODO-urls "todourl" ToDo hash in Pearl is like this: My% todo = (); $ VAR1 = 'http://www.example.com/661/'; How can I load all mysql-table URLs in my own hash? You can use DBI, like Allen has suggested, but with less code: $ todo = $ dbh- & gt; Select all_hashref ('select todoid, todoourl fROM todo', 'todoid'); As you can see, I did not use DBI's preparation, execution, fetch and finish because the selectall_hashref method does all this for us. View online documentation:

javascript - Check what item is next to be deleted with delete key press -

I am working with a content editable area (especially in chrome) If I capture the deleted key press, is it possible to know what the next element or text is to be removed? What I really want to test is to remove the next item & lt; Div class = "clearfix" & gt; & Lt; / Div & gt; Then I do not want to delete it. I was looking at Tracy selection here: but it was not really clear how to implement it, what should I also see. Do not ignore friends. It was a dumb question. It is just so necessary that if I am the current node I am finally, so I can not do anything Sometimes I make things more complicated that are actually in reality. Something worked for me: if (event.keyCode == 46) {var s = document.getSelection (); If (S. Charoffset == s.anchorNode.length) {return false; }}

c# - WPF comparing strings in separate files -

I have 2 files with a CSV file and the other is a text file. I need to know that I want to know whether the contained strings contained in the CSV file are present in the text file or not. After doing this check, I want to add those CSV strings which are present in the INMemable collection in the text file which I will use for binding. For example, if CSV Connets "AA", "BB", "CC" and "BB", "EE", "FF", "CC", "BB" in my text "BB", "CC" Should be "bb" I have made a start by reading the CSV file using code below. Can any solution provide PLS? Thanks - Ben public class VM {public VM} {words = load word (file path); } Public IEnumerable & lt; String & gt; Word (get; private set;) string filePath = @ "Z: \ My document \ Words.csv"; Private static IEnumerable & lt; string & gt; load word (string filespath) {list & lt; string & gt; Word = new lis...

Java DataInputStream methods in C# BinaryReader -

Is Java DataInputStream Reading Completely equivalent to the C #BinReader? What is Java DataInputStream icon and C # BinaryReader or Reset the same methods in the stream? see there is no such object Whatever this behavior is in .net, you should implement it by itself.

authentication - PHP authenticating with LDAP -

I am relatively new to PHP and there is even more for LDAP and one page is accessible only to certified users Need to create. / P> All I'm working on is the following command on the console: $ ldapsearch -b 'dc = ut, dc = ee' -D 'uid = USER, or = People, Dc = ut, dc = ee '-x -w' password '' UID = User '' 'Details' So far I've successfully used and set ldap_connect That is using this protocol version 3. I've played with ldap_search and ldap_bind, but all attempts are unsuccessful. I think it's starting to be due to the -x and -w option, or LDAP is still really confusing me. Any sign will be deeper than that! $ username = 'user'; $ Password = 'passwd'; $ Account_suffix = '@ example.com'; $ Hostname = 'ldap.example.com'; $ Con = ldap_connect (hostname); If (! Is_resource ($ con)) trigger_error ("Unable to connect to $ hostname", E_USER_WARNING); Ldap_set_option ($ co...

inheritance and polymorphism java -

I have my base class, the customer's address, in it there are 3 sub-sections account 1, account 2 and acount3. When I go through a loop, to check everybody's every type and then properly assigning it, I finally get empty data fields. Is such a thing possible? public static and readFile (string filename, customer [] review) throws IOException {scanner scan = new scanner (new file (filename)); * * * Read separate records separately * / Customer first = new customer (); Account 1 first 1 = new account 1 (); Account 2 First 2 = New Account 2 (); Account 3 First 3 = New Account 3 (); String [] a = scan NXTIN () Partition ("="); First.set_account_id (Integer.parseInt (a [1] .trim ())); A = Scan. NXTIN (). Partition ("="); First.set_name (a [1] .toUpperCase () trim ().); A = Scan. NXTIN (). Partition ("="); First.set_address (a [1] .trim ()); A = Scan. NXTIN (). Partition ("="); First.set_accType (a [1] .trim ()); If (first .get_accType...

Django calendar widget in a custom form -

Uses on pages, but I did not know how to add it to a custom form. I got some more questions about the same subject here, but they were all old, complex and not working. Is there any way to add the widget to my calendar in a calendar widget? All widgets used by DJGengo-admin are in the Django / Diskab / Admin / Widgetspa file. Just use that form as a normal widget. You want AdminDateWidget. Import django.contrib.admin.widgets from AdminDateWidget class MyForm (form): my_field = DateField (widget = AdminDateWidget) with this calendar Will make a date-picker. You can try to customize it to expand it or create new widgets from a new section with inspiration from AdminDateWidget.

osx - How can I set up my own local Git server on my own computer? -

I want to use my own server (i.e. 127.0.0.1) when I use push commands. How can I set up my own server? I am using Maccode X. You do not need a server to push in a local repository. You can only use local file URLs like: For the local repository, which is basically supported by GIT, the following syntax can be used: /path/to/repo.git/ File: ///path/to/repo.git/

how to install apk application from my pc to my mobile android -

I have 2 questions: First of all, let me install an APK application from my PC Need Mobile Android? Second, how do I run my code directly in mobile? I install the USB driver but my PC does not detect the USB of my mobile Install an APK To make your mobile, you can either use: , and do the following: adb install fileename.apk . Note that you will need to work for it. Transfer the file to your device, then open it as a file manager, like Note that you must be able to install packages from your application settings. As for the USB work, I suggest consulting for suggestions.

java - J frame resizing in an aspect ratio -

I have created a game using jFrame with component, is there any way that I can make the JFram bigger, But using a square aspect so that the length of the stretch is always equal to the width? Any help is appreciated. Cheers You can implement component listener and something like @ Override public zero component was resized (component identifier RGR) {rectangle B = RGEL.GetCompNant (). GetBounds (); Arg0.getComponent (). Setbound (bx, bi, b.width, b.width); } and use it for your JFrame. The only thing is with JFrame, it does not increase this phenomenon until the mouse is released. If you want to see the change by dragging the mouse, you have to use JeffNeal and for this, instead of the JFRM, you must use this component listener and fill the frame with the panel.

how can hackers inject javascript code to my homepage.php -

संभव डुप्लिकेट: हाय, मुझे आश्चर्य है कि हैकर्स कैसे इस जावास्क्रिप्ट कोड को मेरे homepage.php में इंजेक्ट कर सकते हैं & lt; script type = "text / javascript" & gt; document.write ('\ u003c \ u0069 \ u006d \ u0067 \ u0020 \ u0073 \ u0072 \ u0063 \ u003d \ u0022 \ u0068 \ u0074 \ u0074 \ u0070 \ u003a \ u002f \ u002f \ u0061 \ ......... ') & lt; / स्क्रिप्ट & gt; मैं इसे कैसे रोक सकता हूं? रूपों जो आपकी साइट पर सामग्री पोस्ट करते हैं, और यह आपकी पीएचपी फाइलों में समाप्त हो जाता है, मैं कहूंगा कि उन्होंने इसे FTP के माध्यम से अपलोड किया है, या तो आपकी एफटीपी सर्विस में भेद्यता या बस ब्रूटफोर्स द्वारा। > अपने एफटीपी हस्तांतरण लॉग्स की जांच करें और देखें कि प्रश्न में फाइल को अज्ञात आईपी द्वारा अपलोड किया गया है। अपने FTP डीमन को पैच करें और सर्वोत्तम के लिए आशा करें, लेकिन मेरा सुझाव है कि आप या तो एफटीपी एक्सेस, या आईपी को हटा दें इसे प्रभावित करें।

python - How can I improve my INSERT statement performance? -

How to insert a 256x64x250 value array in a MySQL database When I actually tried my INSERT statement on my data So it turned out very slow (in 6 minutes for a 16 minute file). Include "` data` (frame, sensor_ro, sensor_col, value) values ​​(% s,% s,% s,% s) for frames in range (NA): For rows in category (NA): For the Colonel Range (NX): cursor. Execute (query, (frame, rows, columns, data [rows, columns, frames])) I was reading, who said that This was not the right approach because it is very difficult to execute 4 million separate inserts. Now my data There is a lot of void (actually more than 90%), so I threw into the IF statement. Only enter more than zero value and I have used executemany () instead: For rows in the category (NA) in the `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` `` For the rows in the range (nx) S,% s,% s,% s) "" "value = [] frame in range (nj): if data [rows, cols, frames] & gt; 0.0: value.append (frame, lines, columns, data [ro...

what would be the hardware req for an android phone running android 2.1? -

I have created an application that will run on Android 2.1. I need to make documentation for the application. For this I need the hardware rick of the phone running Android 2.1. I'll need things like processor speed, RAM etc. Thank you in advance. Edit: Do not say things like "2.1 or higher to run the device" because I'm going to write that under the requirement of software As far as I know that it runs Android 2.1 on various devices and hard requirements for hardware Not in any case, "Android 2.1 or higher requirement" should be sufficient to specify; None of the hardware that 2.1 can not run 2.1 will be running.

facebook - Triming and creating a text ellipsis in Javascript based NOT on the number of characters but the number of line breaks -

I want to program a function that takes in some text and trim on the number of lines on it , I want to trim it and after the "... read more" it hits 6 line breaks, such as with Facebook comments and wall posts. Thank you. You can use the last index property of a global regular expression. var str = 'one \ ntwo \ nthree \ nfour \ nfive \ nxix \ n', rx = /((.+\n+){3})/g, m = rx Exec (str), cut = rx.lastIndex; If (cut) {first3lines = m [1] .replace (/ \ s + $ /, '...'); Balance = str. Spring (cut); } Else {first3lines = str; Balance = ''; } Alert ('first 3 rows: \ n' + 3links + '\ n \ n Finish: \ n' + left); / * Return value: first 3 rows: one two three ... remaining: four five six: * /

actionscript 3 - AS3 - How can I generate a random number? -

How can I make a random number using Flash AS5 in Flash CS5, I can make it as simple as I can. My attempt gives me an error: day_grass.adventelstein (mouse events.Sec, random number); Function Random Number (Event: Mouse Event): Zero {var randint: number = Math.random (); Randint; } You can use to generate a pseudo-random number. If you are creating numbers for cryptography purposes, you should use (FP11 is required)

coding style - C language evolves -

1) What is the latest version of C language? 2) How is it done by GCC? 3) For an old programmer, what is the main difference of the new language? I'm asking this because I have learned these days (a new feature) that we actually have a structure like value: struct t {int i; Four c; } S; S = (struct t) {exponent, coefficient}; Div class = "post-text" itemprop = "text "> The most recent version of C language seems to be C99. The most important IMHO of many changes are: restricted indicators variable length arrays Built-in C ++ - style // comments is a large list

ajax - Word Suggestion program -

शब्द सुधार / सुझाव प्रणाली को संभालने के लिए मुझे एक प्रोग्राम या तरीका सुझाएं - मान लें कि इनपुट 'एसगेट' के रूप में दिया गया है, इसे 'सुझाव' का सुझाव देना चाहिए। थानक्स अग्रिम में और मैं अजगर और AJAX का उपयोग कर रहा हूँ। कृपया मुझे किसी भी jquery मॉड्यूल का सुझाव न दें cuz मुझे एल्गोरिथम भाग की आवश्यकता है। एल्गोरिद्म जो आपकी समस्या का समाधान करता है जिसे "दूरी संपादित करें" कहा जाता है कुछ भाषा में शब्दों की सूची और गलत टाइप / अपूर्ण शब्द को देखते हुए आपको दिए गए शब्दकोश से शब्दों की एक सूची बनाने की आवश्यकता है। उदाहरण के लिए "सुझाव" और "सुझाव" के बीच दूरी 2 के बराबर है - आपको एक विलोपन और एक प्रविष्टि की आवश्यकता है। अनुकूलन के रूप में आप प्रत्येक ऑपरेशन के लिए अलग-अलग वजन प्रदान कर सकते हैं - उदाहरण के लिए आप यह कह सकते हैं कि प्रतिस्थापन कुंजीपटल (उदाहरण 'वी' और 'बी') के करीब होने वाले दो अक्षरों के बीच विलोपन और प्रतिस्थापन से सस्ता है जो कि उन लोगों के बीच सस्ता है 1 9 64 में स्पेलिंग और सुधार के लिए एल्गो...

sql - CakePHP query additions in controller -

I am migrating raw PHP code to KHHHP and there are some problems like I have problems with the question of ORM conversion I use temporary raw sql. I is doing everything well, but i got ugly code and in fact does not know how to make it beautiful i dealerscontroller and added function Advanced ($ condition = null) (this is 1 to 15 more parameters And will be asked to AJAX with parameters). The function looks like: switch ($ bet) {case '1': $ cond_query = 'AND ((d.email = \' \ 'or d.email IS is tap) ); break; Case '2': $ cond_query = 'AND (dealer_id FROM dealer_logo)'; break; // In many cases, some are long, some are like these two if ($ user_group == 'group_1') { $ Query = 'Long term with hosting up to 6+'. $ Cond_query;} Otherwise ($ user_group == 'group_2') {$ query = 'Table 6+ long long search with a long bit different long search'. $ Cond_query;} Other {$ query = '10+ table plus a little more bit diff...

Instance variable not working in rails model -

I am trying to make local variables permanent for my model, but although it seems that it is not so easy Used to be. I have this in my model: class coupon & lt; ActiveRecord :: Base @ user name = "blank" @ admin = false def self.setUser (name, isAdmin) @ user name = name @ admin = isadmin enddef self.get_user (user) to use current_user Effort, but did not work. I call it to the controller (I think this is not the best practice) # @ User = The user self User (user.user, user.admin?) End DEF_synchronized errors.ad ("property_off", "name is not valid: # {@ user name}") if! Validator? End end DEF legal property_off? Return Property_ == @ User Name # @ Admin Expiration End Really get "a blank" or a new value instead of user name in set.user. How do I create these values? I have printed the values ​​in each method, so that they remain inside the law but not for any reason. @username is always zero or "" when it is near_not_c...

python - Why won't this override of the Model.save() function in Django work? -

I'm new to SO and Python / Django, so please support me. The blog app based on the tutorial in my generic, I am trying to create slugs for posts when they are saved in the database using the slugify () method on the title of the post here. Models.py: django.db import model from django.template.defaultfilters import slugify import datetime class post (models.Model): DEF __unicode __ (self): return self. Title Title = Model. Richfield (max_long = 200) slug = model. Sloughfind (editable = false) body = model TextField () pub_date = Model. Datatiffild ('Date published') Def Safe (self, * args, ** Kwargs): If not self.id: self.slug = slugify (self.title) super (post, self). Unfortunately, it throws up the following exception when trying to start the server: file "/ user Name / post / models / "/ code / blog / post / models", line 24, post super (post, self) .ave (* args, ** kwargs) NameError: name 'post' is not defined Why I am confused why N...

rails 3 - SQL pass variable to "order" -

I'm trying to pass the variable in order ... [code ] .order ([(Prices.Price *?) + Profile .PippingCost), Parameter [: Prod_ID]]. All but this variable does not convert to SQL in exchange, it gives me (In this case the variable was "1"). Group by Price Order by SUM (Prices.Price *?) + Profiles.shippingCost), 1): Is this possible? You can: [code] .order ( "SUM (prices.price * # {params [: prod_id] .to_i}) + profiles.shippingCost)". All.

c++ - error C2664: 'strcmp' : cannot convert parameter 2 from 'char' to 'const char *' -

I need help about that script. BOOL Check (LPCSSRIs MKID) {char ClientMacs [18] = {"11: 22: 33: 44: 55: 66",}; (Int x = 0; x & lt; 10; x ++) {if (! Strcmp (macid, client mac [x]) {printf (macid, "successful!"); Back true; } } return false; } I'm getting Error C2664: 'strcmp': Pointer to type 'integral' from 'const char *' conversion to 'char' Type reinterpret_cast, C-style cast or function-style cast when I try to compile it. not if (strcmp (macid, clientmax [x ]) {} but if (! Strcmp (MacID, and ClientMacs [x])) {...} Arg 2 is a four *, but you see it in four forms, if your argument was simple then the clientmax // compiler understands that this short story and client mac [0] for , it will be fine. But when the index is different from zero, then you have to keep the ampersand with it. - Box

javascript - Newly created input-element ignoring attribute changes -

क्यों $ ("& lt; इनपुट प्रकार = 'टेक्स्ट' मान = फू '/ & gt; ")। Val (" बार ") एक ऑब्जेक्ट में परिणाम (जैसा कि डीबगर कंसोल में दिखाया गया है): & lt; इनपुट प्रकार = "टेक्स्ट" मान = "फू" & gt; मान अब "बार" होना चाहिए जिसे मैंने बदल दिया है? मेरा अनुमान है कि तत्व के साथ ऐसा करने के लिए कुछ है जो दस्तावेज का हिस्सा नहीं है। मैं इस सीमा के आसपास कैसे काम कर सकता हूं? मैं उस समय दस्तावेज़ में तत्व को सम्मिलित करने से बचना चाहूंगा। हालांकि, बाद में कोड जो attr ("value") का सही परिणाम प्राप्त करना चाहिए। तत्व दस्तावेज में सम्मिलित नहीं है और इसकी कीमत "बार" है, जैसा कि अपेक्षित है कंसोल में कुछ गड़बड़ हो सकती है।

java - Google calendar: how to access it on android -

What's the best way to reach Google Calendar on Android now? The following methods I found: - This is only an alpha authentication, working in the calendar list, but updating calendar crashes in the sample. - As far as I know, it does not work / support Android. Is there any alternative that I have missed? Are there any working examples? I used it recently to handle this oyoth, You can use it to sign in to receive or post data in the calendar. To work with Android I was having trouble at Google's Java API because I think it is dependent on Java API that is not present in Android. To create your requests, you can refer to this page:

c# - MVVM - Model Tutorials? -

I am currently creating a WPF app in C # and I am following it. I have read many articles on MVVM but I am particularly looking for details on everything under the dotted box (hence the model and data access). I already have a local database setup (SQLite) and I'm looking for an efficient way to connect it to my application. Is any good article or step to make this specific part of MVVM? There are several ways to deal with this problem and what you choose is the complexity of your application and your data Will be determined on the basis of model. This approach will be a standard way to see. To create an entity framework model at the top of your SQLite database, it will generate your object model and allow you to attach behavior without much fuss. This is database / firmly somewhat immersed from your application code (View Models). For information about this approach, search Google for 'Entity Framework' - there is a ton of information there. EF 4.0 has improve...

php - Including files in namespace -

I have a small problem with name spaces in PHP 5.3. I have announced for the namespace: Use \ com \ me \ libs as Libs; And I can find the answer to how to include the file in that namespace using "lbs" ... I can include Are ('com / me / libs / functions.php'); But I am trying to find "clear" way to do this ... as the object declaration: $ foo = new Libs \ Foo .php And the second question I'm trying to return to the php file is the JSON array. To do this I must include the "Connection.php" class. But when I include this file (same folder) I get an error in the implementation file (same folder, same namespace) ... First question: You can use an autoloader for more information.

order - Adjusting web.xml listeners, filters and servlets -

The following is the framework I have in my web.xml config file. I need help in putting it in the correct order web.xml web-app 1. Reference Config Location App Contex. XML 2. Default HTML correctly 3. Listener 4. Servicelet 5. Filter & lt; Order Sensitive & gt; 6. Session-Config Timeout 120 7. Error Page 404 500 Update: > Update: I have a ClassNotFound exception on all your listeners in logout / localhost Receiving is not a problem since .log, only after introduction entries are indicated that something is off I have arranged it according to the suggestions of BalusC only & lt; Filter-Mapping & gt; The order of the elements is relevant It would be the actual order that whenever a request URL matches url-pattern of more than one filter, then a filter can determine how the filters apply. Whether or not to continue the series. The rest of the people have no significant effect on the functioning of the webapp, and according to the order and / or w...

Updating XSLT files in a deployed Java EE app without re-deploying? -

I have a Java EE application that takes XML and implements XSLT to generate HTML. This process is done in a custom service, it is usually used to create part of the content on some web pages. Since the actual data is already stored in XML, it was understandable to just change the servlet. It is actually made up how this report prepares the servlet HTML by lifting the cost of change in the servlet every time. The DOM representing the XSL file is also cached in memory . Currently XSLT has been deployed inside the war file. We want to support a default XSLT deployed in the WAR file, but there is also the ability to update XSLT only without reapplying the entire app. I am hoping that some people may have some good ideas to solve this kind of problem. Update I get the comment (comment) I know some servers are doing this way but I'm hoping to solve it in more normal way . I need to make sure that I am able to keep the following features ... Once a new XSLT is found, then ...

image - Loading animated GIFs from resource file in wxWidgets -

I am trying to embed an animated GIF image into a wxWidgets C ++ program. I am able to load the image from the file and it looks like this: wxAnimationCtrl * a = new wxAnimationCtrl (this, wxID_ANY, wxAnimation (wxT ("image.gif"), wxANIMATION_TYPE_ANY ), WxPoint (150,0)); One-> Play (); But I have a GIF picture in my Resource.rc. file, so that it can be compiled into executable. How do I do this? You can try to use or function, load memory GIF resources, then Get that function and use that input stream and pass

c# - Email message with static Google map not displaying correctly in Gmail -

I am using the C # code to generate an email message. In the body of the message, I want to add a steady Google map. To create a static url, I have the following code string order = "111 remote drive carry, NC 27511"; String mapU = "http://maps.google.com/maps/api/staticmap?center=" + addr + HttpUtility.HtmlEncode ("& amp; Zoom = 14 & Size = 512x512 & amp; maptype = roadmap & Amp; sensor = false & amp; markers = color: green | ") + Acer; This string mapU is added to the message body as a message for the img tag. When an email is sent to a Google Mail account, the static image is not displayed. Check the element in a broken image & lt; Img src = "http://maps.google.com/maps/api/staticmap?secenter=111+Remote+Drive++Cary%2CNC + 27511% 26zoom% 3D14% 26size% 3D512x512% 26maptype% 3Droadmap% 26sensor% 3Dfalse % 26markers% 3Dcolor: green% 7C111 + remote + drive ++ carry, NC + 27511 "& gt; In Gmail, the ...

Creating Cocoa Touch Static Library with XCode4 -

After creating a coco-touch static library with XCode4, the .a file in the product group looks red and does not fix it is. After that, when adding this project to another project with the Build Foundation / Link Binary with Libraries, it fails to add the link. Any sign? EDIT: There is something that I'm building with XCode4, with a problem that looks like a problem, because I'm not making any projects, the content of the product appears in red Gives I have experienced the same bug in the exode. Try to build the project for the device. Once I did once, the build product was black and I could build without issues without the simulator or device. You may have to re-link the libraries to your dependent project.

java - two dimensional array sum -

I have two dimensional float array as below {0.2,0.0, 0.3.0.0, 0.0} {0.4,0.1,0.0,0.0,0.9} {0.0,0.0,0.0,0.3,0.6} I have to get the following output {0.6,0.0,0.3,0.0,0.0} {0.6,0.1,0.0,0.0,1.5} {0.0,0.0,0.0,0.3,1.5} if You do analysis, I give zero denominator of each column and update all non-zero values ​​with that par value. For example, in the first column I updated the value of the sum of (0.2 + 0.4 = 0.4) and the value of both with 0.6. I am using Java, how can I do this? This is a simple example, in real time, I actually have a big array. There is exercise for the reader in the same length in special cases. class matte {static void makeSums (float [] [] floats) {// We will not take any kind of action on these inputs, so come back if (floats == tap || Floats.lamm == 0 || floats.lang == 1) returns; // To make sure it is for float [] arr: Floats {if (arr.length! = Floats [0]. Length) {New illegal archive exception ("Makesm () rectangular array is required...

class - ClassNotFoundException Sandwich.Java... where is it? -

Ok then I have a file named 'Sandwich.java' in the root folder and one named 'SandwichType.java' The file is [root] / a folder on MyFrstPkg for whatever reason it will not be claimed that the sandwich. Java can not be found. Here is the directory structure: root - | | - sandwich.java | | -MyFirstPkg | | SandwichType.Java Here is Sandwich.java: // Note I also tried to add a package MyFrstPkg; Also in this file and the removal of the major MyFrstPkg is imported from the import statement below, there is still no luck importing MyFrstPkg.SandwichType; // part of 'MyFrustPCG' is outlined as an error class sandwich (sandwich type type; // text 'sandwich type'), an error was highlighted as public static zero main (string [] args {Sandwich sndwch1 = new sandwich (); Sndwch1.type = sandwich type. Ham; // text 'sandwich type' is outlined as an error System.out.println ("AHM cost $" + Sndwch1.type .getCost ()); System.out.println (...

java - Get Posted XML from HttpServletRequest Object -

I have a filter that receives HTTPSRL REV and request is a post which has an XML that I need to read. It depends on what is the best way to get XML from the filter method HttpServletRequest object. That's how the customer sent it. If it has been sent as a raw request body, then use: InputStream xml = request.getInputStream (); // ... Use this if it has been sent as a regular application / x-www-form-urlencoded request parameter : string xml = request.getParameter ("somename"); // ... If this is sent as a upload code in the taste of multipart / form-data part, use it. InputStream xml = request.getPart ("somename"). GetInputStream (); // ... These were standard methods supported by the Serallet API. Other methods may require different or third party APIs (eg SOAP).

jquery - How to center an iframe that is created via injection -

I am trying to create a bookmark that creates an iframe on the page that you are on if you click on it I can find IFrame to show, but I am unable to focus it on the page. Here is the code: javascript: (function (e, a, g, h, f, c, b, d) {if >> g> (F = e.jQuery!); F.fn.jquery || h (f)) {c = a.createElement ("script"); c.type = "text / javascript"; c.src = "http: //ajax.googleapis.com/ajax/libs/jquery/ "+ g +" /jquery.min.js "; c.onload = c.onreadystatechange = function () {if (B & amp;! (D = this.readyState) || d == "load" || d == "complete") {hour ((= e.jQuery f) .noConflict (1), b = 1); f (c) ) .remove ();}}; a.documentElement.childNodes [0] .appendChild (c);}}) (window, document, "1.5.1", function ($, L) {var a = $ (' & Lt; iframe / & gt; ', {id:' test-iframe ', category:' test-iframe ', genre:' position: full; z-index: 99999; ', width:' 700 ', he...

JQuery: How can I select all descendant nodes of an element that have a certain css class on them? -

Looking at any DOM element, I would like to select all those clans which are class = 'foo'. How can I do this in jquery? Use: $ (e) .fund (' (This document is your friend :))

datetime - How can I get the remote server's date and time at the client side in my application in c#? -

I have a cutoff time for the user in my application, so for that I do not want to take the current system time and instead I want to take into account the time of remote server machine, how can I get the remote server date and time in C # "post-text" itemprop = "text"> Write the request handler on your server which sends the date time without knowing more information It is difficult how to implement it.

javascript - Primefaces p:datatable - Change {CurrentPageReport} -

I'm searching and searching but I can not find anything to solve my problem. I use datatable (primheses) and am surprised how can I change the language / output of some areas. More accurate, I want to change {CurrentPageReport} in PaginatorTemplate. Now, it looks a lot easier: (100 of 100). I like it (page 100 of 100, 500 results). I tried a lot, but nothing works. Last I did: function change_text () {$ (".ui-paginator-current") Each (function () {$ (this) .html ("simple test");}); } $ (".ui-icon"). Each (function (index) {$ (this) .bind ("click", function () {change_text ();});}); (ui-icon is part of every button in the table.) But it's not really effective as you can see :-) This solution is half- way. When I press a button (on the next page, on the previous page), the text in the .ui-paginator-current field changes back to the default template. I know ... the reason for this is that this area is being reloaded too. I ...

Issue using DOM in external javascript file / django -

So I'm going around with DJGengo, HTML and Javascript for the first time, a script to display on an updated counter Writing panna. When I was working without using text and using DOM I decided to update it to use images instead, but I can not take it to work. Below is html to display the initial duration / counter {% extends 'vices / index.html'%} {% block content%} & lt; Script type = "text / javascript" src = "/ site_media / js / clock.js" & gt; & Lt; / Script & gt; & Lt; Body onload = "period ()" & gt; & Lt; Img src = "/ site_media / picture / clock / 0.jpg" id = "second_1" /> & Lt; / Body & gt; {% Endblock%} This is the JavaScript function that I am calling for testing purposes, I want to set it to set for a specified distinct value. Function duration () {// irrelevant logic (works before trying to import a picture) document. GetElementById ("second_1"). Src...

firefox is not responding -

I turned off the firefox window. When I wanted to open the error, it came out. You can not open because Firefox has already been opened but it is not responding. Please close Firefox or restart your system. I have searched for solutions on the Internet Most people say that Firefox is using the task manager. Then I opened Task Manager but there is no Firefox process, so how can I stop it? How do I restart? Try it: Your Firefox may be locked out already Without deleting the file Restart your computer. After restarting it, do not try to start Firefox. Go to your Firefox profile folder Delete the lock file If you remove the Parent.lock file and get the error, click " Can not remove parent: file or directory is corrupt and unreadable ", restart the computer and run the error-checking tool Chkdsk (Windows 2000, XP) or ScanDisk (Windows 98, ME). ) Or the following should also work as follows: Start the task manager. Select the Process tab. Select ...

Linq to sql and sql injection attacks -

What is the protection from SQL injection attacks using linq-to-sql? Thanks for your input. , they are not weak for traditional SQL injection How does LINQ SQL is protected from Q-SQL injection attacks? A SQL injection has been a significant risk to traditional SQL queries created by adding user input. Using SQLParameter in LINQ queries for SQL avoids such injection is changed to user input parameter values. This approach prevents malicious commands from being used by Customer Informatics

javascript - international Count sms characters -

I have found, but it does not support international characters like Chinese, Japanese, Thai, etc. var $ Balance = $ ('# left), $ message = $ remaining.ext (); $ ('#messages'). Key (function () {var character = this.value.length, message = Math.Cecil (character / 160), balance = message * 160 - (character% (message * 160) || message * 160); rest Text (Balance + 'Characters Remaining'); $ messages.text (Message + 'Message');}); Here are some examples of incorrect character counting: æ ?? Åå ¥ ½ï¼ ?? È «???? One ???? One half a £ E ¯äº ?? Å ???? I ¼ ?? & Lt; & Lt; 11 characters Reply thread one £ one · One? & Lt; & Lt; 17 letters a word ???? One ?? One ?? One ?? One ???? One ?? Line Line ?? E £ ?? A ?? ¹ã ?? |  ???? A ?? ¾a ???? à ???? I ¼ ?? & Lt; & Lt; 18 letters "????" Line Line Line Line ????, '? '?? Answer: Thread? оРYou can not really believe in" characters "here, according ...

sql server 2005 - SQL: Select all rows that meet a condition if that condition is met, but only a certain nuber rows if it isn't -

I have a requirement for a SQL Server 2005 query that I need to write and I have to complete it How to be completed I will simplify it a little bit, but the essence is that if a customer is not at all exactly at any given date, then I have to choose from the customer's most recent bills. But if they have billions after the cutoff date, just show them to any of those bills. Therefore, if my cutoff date is January 1, 2010 and I have the data as follows: ClaimID ClientID billing date 1 March 12, 2010 2 June 1, 3 , 2010 3 January 1, 2008 4 February 1 9, 2011 5 May 19, 2005 6 November 2, 20, 2005 7 October 2, 2009 8 3 January 4, 1999 9 July, 8, 1997 10 May 3 7, 2010 11 3 August 6, 1999 12 May 24, 2000 13 April 4, 2005 14 4 March 9, 2009 15 December 4, 2007 16 December 4, 19, 1998 17 June 4, 2006 Then I want to select: Clemice Cleant ID Belith 1 1 Mar 12, 2010 2 June 1, 2010 4 February 1 9, 2011 6 November 2, 20, 2005 7 October 2, 2009 10 May 3, 2010 14 4 March 9, 2009 15 ...

python - Packaging javascript and css files in a django app for reuse, install via pip? -

I am preparing a DJ ango app for which some Ajax bits require a Javascript file. I would like to package this app so that it can be installed through easy_conversion or possibly as small as possible. But I'm not sure where to place static media, especially the javascript file. On my machine, I have a static media in an external directory, which was not done by the Django. All internal references at my template point at MEDIA_URL Is there a standard for package / add / attach static media to the reusable agency app? Is there a way to package the app so that others can use it to automate any JavaScript / CSS files without using it, or during installation? I am using the DJAga 1.2 - did not upgrade the server to 1.3. I think that's what you are looking for, unfortunately, in this new Django 1.3 Are you able to upgrade? From Docs: django.contrib.staticfiles collects static files from each of your apps (and any other locations you specify ) Which can be easily ...

asp.net - MVC3 AllowHtml for custom types -

I have a custom type in your model like so: [StringLength (1000, MinimumLength = 150, ErrorMessageResourceName = "fld_Description_val_MinLength_lbl", ErrorMessageResourceType = typeof (Resources.Service.Controllers.Firm))] [AllowHtml] [display (name = "fld_Description_lbl", ResourceType = typeof (Resources.Service.Controllers.Firm))] Public Multilingual Property & lt; String & gt; Description {{this.GetMultilanguageProperty return (the "Statement", string.Empty,); } Set {this.SetMultilanguageProperty ("description", value); }} does not work for some reason AllowHtml custom type (A potentially dangerous Request.Form value was detected from the client). How can I get it? Thank you any specific argument AllowHtml is doing established RequestValidationEnabled = false on the metadata, it Is not containst. The most likely cause here name between your property and the value does not see) POST store this metadata as metadata (Value...

html - downloadable html5 & css3 compressors? -

Do any downloadable, html5 & amp; CSS3 Compressors I can keep on my site for people's use because I do not have the knowledge, or time, or money to do myself? Look at this topic:

Click on Link in robotium -

How can I click robotium on a particular link in a page? You should try to click the anchor text in the link. For example, if the link is called www.google.com, then you can: this.solo.clickOnText ("www.google.com"); This is working for me, it should work for you as well.

Refresh jquery ui dialog position -

I am using a jquery dialog The content of this dialog is dynamic, so when the dialog is open then the height change She goes. $ ("# a_div"). Dialog ({width: 400}); Dialog is initially displayed in the center of the page. Thanks Div class = "post-text" itemprop = "text"> You will need to reset the status again: $ ("# a_div"). Dialog ({status: {'Mary': 'center', 'on': 'center'}}); When set up the dialog is set once, but can be changed later (or reset to the same value, forcing jQuery to recalculate). See this demo:

listview - i want to make a screen with list and it should include a drill down concept in android app on gingerbread -

My app should have an activity to show a list of elements and These elements can be selected by using some elements, if it is clicked, then another list on the next screen with sub elements should be visible . Desperate need help snippet link would be better Thanx Extend two activities with ListActivity. To create a list list, check it and apply the click listener to the list item and start another activity on the click event ...

How to call next assembly in gdb? -

If I type n in GDB, then the next statement will be run. But how to direct it to run the statement of the next assembly? nexti (ni) and stepi (ci) instead of next (n) and step (s) ).

command line - Storing bezier paths in Core Data for Mac OS X and iOS -

I am developing an iOS application that loads before the core data contents. I'm trying to create an Importer app for the Mac OS X command line that uses the same XCDTodm and imports initial data which I can send with the actual app. So far, very good. > One of the fields in the model, however, is a variable in which I want to store the Bezier Path. Unfortunately, Mac OS X uses NSBJerpath, while iOS uses UIBezierPath to store the Beggar Path. Is there a way to use the binary UIBezierPath class (and its header file) from the iOS Simulator platform from the iOS Simulator platform? I do not want to change my project to run in the simulator because I want to run it from the command line and be able to run the arguments. There should be a way to make this work, should there be? Because the simulator platform has been compiled for Mac architecture and no GUI components have ever been used. Am I searching for other (creative) methods to solve this problem ?? A custom NSV...

WPF: Image Source is System.Windows.Interop.InteropBitmap -

System How source set Krenkvindo. Control. Image if source is a type of system. Windows.Interop InteropBitmap? InteropBitmap information below: {System.Windows.Interop.InteropBitmap} [System.Windows.Interop.InteropBitmap]: {System.Windows.Interop.InteropBitmap} base {System.Windows.Media. ImageSource}: {System.Windows.Interop.InteropBitmap} Deepiaiaks: 96.0 Deepiaiwai: 96.0 format: {Bgra32} Height: 851.0 Hadaunloding incorrect metadata faucet palette: Blank Pikselhait 851 Pikselwaid: 900 Width: 900.0 it seems that InteropBitmap and image Source Already you myImage.Source = myInteropbitmap; Referee: To be able

How can i show the htmltext in XtraGrid column in devexpress -

Showing data details of Xtragrid In the data, I have a html text coming in a column. I would like to show html text for that column, please anybody please You can enter ColumnEdit The property should be set in an example. Set repository etam text edit. Document format property This should allow you to get the necessary behavior.

.net - Is there an implementation of silverlight's policy file server in twisted? -

Is there an implementation for Silver XML file file server in twisted Pth? If not, what should I do to myself? Not in twisted, no. But you need to know how to do it on your site. If you are using commands like twistd web - path foo , just create a foo / clientaccesspolicy.xml (or foo / crossdomain.xml ) and you have done it.

Web Browser for a site that with a single click install -

I want to create a browser for my site which can be easily installed, to start this user from a computer Substitute, homepad link, etc. How can I do this .... The browser should be executable, which will be displayed on the homepage of my website when loaded. Thank you guys You should monitor the prism ()

NHibernate - Help with ICriteria -

I am trying to change the following SQL query for an ICriteria in NHibernate. Select MITIPID, Model M from TPpronym, type T WHERE m.qualifier =? And m.typeId is not zero and m.typeId = t.typeId Both of these are mapped in classes in NHibernate and models called model type. ICriteria.List should return the ModelType type list. Thank you There is good news and bad news is you can set criteria Which will return a list of ModelTypes. However, those sessions will not be managed. The reason for this is that, a separate query can return only one projection and estimates are always unmanaged. The question below will generate the same query above because it does an internal insertion between the two entities and gives a different set based on those 2 columns. The result transformer should be set to generate some types, which can be set through properties. You can probably return the type of model type, but just know that they will not be managed by the session. session. Cr...

How to pass single variable from Jquery to PHP and access it in PHP -

Jquery से PHP पर पास किए गए मान तक पहुंचने में सक्षम नहीं है। यह काम करना चाहिए $। Get ('js_test.php? B =' + b, फ़ंक्शन (डेटा) {}) ;

Solution folder in Visual Studio 2010 does not build -

Image
I have a solution with five projects and a solution folder. All projects have a reference to project inside the solution folder. When I clean up the solution and create the solution, the project is not created in the solution folder. How can I fix this problem? It seems that a project depends on any other project in your solution (not unusual). You can change the order that your projects are created in Visual Studio so that the dependency tree is satisfied when preparing the solution. If you right click on Solution Explorer solution and select 'Project Dependency ...' then you will be able to tell to Visual Studio which will order to make your projects.

multithreading - how to print this number in a shortest time using thread in python -

यह मेरा कोड है: आयात थ्रेड k = 0 b = 0 def a ( N): i = 0 जबकि i & lt; n: प्रिंट ii + = 1 j = 5000 जबकि कश्मीर & lt; 5000: ए (कश्मीर) कश्मीर + 1 के लिए रेंज में (2,5): धागा। स्टार्ट_न्यू_थ्रेड (a, (j * n,)) और मैं तीन थ्रेड्स और एक मुख्य धागा ¼ ?? मुख्य धागा प्रिंट 1,2,3,4,5, .... 5000 और धागा 1 प्रिंट 5001,5002,500, ... 10000 धागा 2 प्रिंट 10001,10002,10003, ... 15000 धागे 3 प्रिंट 15001,15002,15003, ... 20000 वे एक ही समय में हैं तो मैं क्या कर सकता हूँ, धन्यवाद आपको थ्रेड के बजाय थ्रेडिंग का उपयोग करना चाहिए, क्योंकि यह लागू करना आसान है और यह लगभग हर मामले में काम करता है अब आपका कोड होगा: आयात थ्रेडिंग क्लास प्रिंट नंबर (थ्रेड): def __init __ (स्वयं, एन): स्वयं। एन = एनएफ़ रन (स्वयं): श्रेणी के लिए i , एन +5000): प्रिंट मैं # अपने थ्रेड्स को यहां बनाएं # यदि आवश्यक है तो cicle का उपयोग करें धागा = प्रिंट नंबर (0) # पहले 5000 नंबर धागा। स्टार्टिंग () धागा = प्रिंट संख्या (5000) # अगला 5000 धागा.प्रारंभ () मन से कोडित किया है और इसका परीक्षण नहीं ...

api - I cannot determine error in my android application -

How can I download the Android phone from the Wi-Fi internet but not from the 3G internet? I changed my code to & lt; Usage-permission Android: name = "android.permission.INTERNET" /> , but I still see grid gray lines when I install and launch the app on the actual phone when I start the app on the emulator, it loads it at no time. The API key is convinced with keystore. Br> Ensure that the device is using the same keystore using the emulator, otherwise you will need another API key.

objective c - What does "+resetStandardUserDefaults" actually do? -

Tried to use "+ resetStandardUserDefaults" of the NSUserDefaults class to reset default values ​​in your "factory" settings is. It does not have the appropriate method to use. Out of some archived discussions, find out in the SW that we should instead use the "removal objectfire" example method to remove user settings. But just curious and hope that someone can explain the real use of "+ resetStandardUserDefaults". I have read the reference web manual about this but it is very brief and I do not think what it actually means ... Somewhere (usually app representatives + in the beginning), you declare standard user default (prioritizing your app's preferences). + ResetStandardUserDefaults Your app means that this is the first time it launches and uses the way users declare them in app rep. The wrong answer above is As it says,: shared users were made in default object Synchronizes the changes and releases it from memory R...

Make a div a child of another div using Javascript -

मैंने एक div adiv बनाया है मैं इस div को Bdiv जावास्क्रिप्ट का उपयोग? मान लें adiv जावास्क्रिप्ट में बनाया गया है और bdiv पृष्ठ पर घोषणात्मक रूप से बनाया गया है: document.getElementById ("bdiv")। AppendChild (adiv);

subscribing to an asynchronous web-service event in both winform and aspx page (C#) -

I have WebBrowser control on a winform. WebBrowser control shows an aspx page that has a GridView. WinForm also has a grid on both FSPX pages, the WFFFrame and Grid on Gridview draws data from the same table in the same database. This idea occurs when I select a line on the window, it should be sealed on the ASPX page, without the user pressing the F5 / Refresh key. And when a line on the ASPX page is selected then it is selected on the WinFfix grid. I have thought that I would use a webservice with both aspex pages and win-win encryption. I think this is the best way to solve the problem, as long as there is no other way. The problem is, I have very new ASP and C # and events such as Webcoroxic are also very unfamiliar areas. How can I write such an incident in the website? How can I subscribe to ASPX page? How do I get it on Winform? Please thanks Desire What are you trying to achieve to achieve this, it is very easy to achieve? When you select items in...

Program to find the number of methods in a java program -

I used the following code to identify the number of tasks in the class. Similarly, anyone can help me identify the number of functions in a Java program. In my program I gave the input file as a class. Guide me with the code to give input as Java program and find the number of functions declared in it. import java.lang.reflect *; Import java.io * *; Import java.lang.String *; Public class method 1 {Personal integer F1 (object P, int X) throws the null pointer exception (if throw (P == Rick) new nullioner exposure (return); return x;} public static zero main (string rule []) exception Throws {int Mcount = 0, MthdLen = 0; {class cls = Class.forName ("honey"); try an int method; method mathist [] = cls.getDeclaredMethods (); for (int i = 0; I & lt; methlist.length; i ++) {method m = methylist [i]; macant = macontoon + 1; mthdLen = mthdLen + (m.getName () length (.);}} Grip (throbable e) {System.err.println (e);} System.out.prin Tln ("length =" + MthdLen); Sy...

c# - Setting a ToolStripLabel in a thread-safe manner -

मेरे पास एक ToolStripLabel है जिसके पास इसकी Text property अपडेट होने की आवश्यकता है एक अलग थ्रेड पर एक ईवेंट हैंडलर से आम तौर पर एक नियमित लेबल के साथ मैं InvokeRequired संपत्ति का उपयोग कर रहा हूं और यदि कोई invokeRequired रिटर्न सच हो तो काम करने के लिए एक प्रतिनिधि का उपयोग कर रहा है परेशानी यह है कि ToolStripLabel में यह संपत्ति नहीं है यह टेक्स्ट किसी धागे-सुरक्षित तरीके से अपडेट करने का सबसे साफ तरीका क्या है? टूल स्ट्रीप लेबल के बजाय ToolStrip नियंत्रण पर InvokeRequired

publishing - How to Publish WebMatrix site to Local File System? -

What is the first time the webmatrix website has an option or a workaround for file system to be published And upload manually, as we do in Visual Studio 2010 in Web Projects and MVC projects? OK I thought, Publishing WebMatrix website is copy-pasting the entire website code on the production server only is. But with this, you can copy all the sects from C: \ program files \ Microsoft asp.NET \ asp.net Web Pages \ v1.0 \ Assemblies \ to bin The website directory is required.

navicat - mySQL Table Sync -

I suggest the best way to sync mySQL tables (myISAM) from 2 different databases. Currently we use Navicat to sync tables from our production servers to our test servers, but we are running into many problems, about everyday we run into a sync failure on the table. Are there. We sometimes get the error below, not to mention our email to successful and unsuccessful synchronized spam, just to get unsuccessful synchrot anyway?). I also know that changing the table anyway is a failure to synchronize. So by changing the table in any way, the master should be done (this is understandable, but is there any posture?). - [synchronization] expired - unsuccessful synchronization: out of index index limit (0) Is there any reason to not use Navicat sync? Instead my boss suggested to use my SQL replication, but my first concern is that why do we have so many problems because it seems that we are misusing sinks in such a way that we can all these problems Are giving up. Thank you. Sy...

Git/Linux: What is a good strategy for maintaining a Linux kernel with patches from multiple Git repositories? -

I maintain a custom Linux kernel that consists of changes that are merged from different sources. This is for an embedded system. The Chip Seller is working with us to release a board support package as a change against a mainline kernel (2.6.31). I have made changes to support my custom hardware since then, and have merged with the stable (2.6.31.K) kernel release. I have also merged into a bug fix for a particular file system driver, which we sometimes use, before they make the changes in the mainline kernel. I am not very systematic how I was chosen to merge the various contribution sources and if I had a big change in my own changes; If it was small then I would raise the third party's changes again on my own. Generally merge conflicts are very rare, because most of my work affects those drivers which are not in the Mainline kernel. I am thinking that there is a better way to manage this. One concern is that my changes are mixed with the merger 2.6.31 + board suppor...

Version Control with PHP -

Currently I am creating a simple page for hosting the project, and now I have got a question. Is there any implementation of GIT or HG (Mercurial) in PHP? - Yes, I know about the command system () , but I'm working on hosting with some permissions and therefore I need some random PHP. I have already searched on the web, but I did not find anything = ( I hope that something like that already exists. Thanks You can give a try. It seems that it can also do the trick.

c++ - Unexposed private member variables vs. global variables in the source file -

I am looking for some code in a company on which I am currently working and I have some (not much) Fixed global variables (for example, to store list of listeners) in announcements * .cpp files where .h / .cpp files belong to a class. If a variable (steady or otherwise) is used only in class, then I always declare it as private Is there any advantage to declare it private? Is this bad behavior? Or is it normal when just declaring static variables used by class and nobody else? Edit: In my question I asked about the stable, but if it is a non-static global variable instead of being a private member of the class instead of .pppp in the file? Is it bad behavior or is it considered okay? Any advantage in this matter? In this way, the main benefit amount is decreasing * .h in the file " Unnecessary "stuff can compile some time and modify / modify files when the complexity is improved again, and it can make the header file a little easier to read. (In my opin...

encryption - Generate Initialization Vector (IV) and Salt values in .NET -

I am using .NET cryptography library to encrypt / decrypt some text. I would like to generate initial vector (IV) and salt for the user during encryption so that everyone needs to provide them, pass-phrase. After the text is encrypted, I will present the user the salt value and initial vector so they can send them to the receiver of the message. How do I use the net to generate salt? Initial vector (IV) out of real encryption steps? Currently encryption / decryption methods I have accepted salt and initial vector as parameters, as strings. I tried to use the following code which generates an initialization vector, but the size of the return value always comes back bigger than the 16 bytes required for the initial vector in AES. New RNGCryptoServiceProvider () Dim Buffer Byte () = New Byte (15) {} rng.GetBytes (Fond) Return Convert as the RENDER to The size of the fourth is determined by the algorithm (eg For, 16 bytes). This means that the size of the byte array is fixed,...

jax rs - How to get Tomcat7 working with JAX-RS? -

I am trying to get a rental web service running with Tomcat 7 (JX-RS). I have tried 3 different implementations (jerseys, restes and restlets) without success, it should be easy, but in some way it is not. I annotation, the web Looking for tutorial / documentation for XML and sample code. I know that as long as you've posted this question, it's been a while. Most likely you have understood it so far, but I would like to answer someone else in terms of profit. Here are some tutorials you can start:

sql server - Query takes 1.5 seconds in SSMS, but times out when run from .NET windows app? -

I have a query that is time to run from my windows application even though it runs fine within 2 seconds I run it directly in SSMS. All the other questions in the app go fine. I have also run a profile and confirmed that the app is actually running the query which I hope (when I get the code which is run by the programmer show app and run it in SSMS , It takes less than 2 seconds). Long time running questions do not come in the app. What's going on? String result = dbHelper.GetTypedDataTable (dtMyProjects, "sp_get_DashboardPMMyProjects", MyUttivity.DW Connection, New String [] {"'+" + ShortNTID + "' '}); Static public string GetTypedDataTable (DataTable DT, string SSPN, string connection name, string [] arraypalmators) {if (connectionName == "default") {Setup Connection (SSPN, "sqlConn.ConnectionString", "SP"); } Other {Setup Connection (SSP, Connection Name, "SP"); } CmdSELECT.CommandText + = ...