Posts

Showing posts from January, 2013

plugins - Java: Adding classes from external source to classpath -

So my point here is that I am creating a piece of software that is similar to a DOS command line. Except a jar file would like to add other commands, in which a command class is being expanded into a folder I have not tried to do anything. Here's what I have tried: Using the Reflections Library to add a jar file for classes while increasing the command class It has thrown many errors and did not find most sections in my jar. I think there is something to do with all the SomeClass $ 1.class stuff. Read again through each file in a jar and add it to the class I could not find any way to work for it because I just got to ZipEntry Iterations of can be added to the squares, such as URL. Adding a whole jar to classpath This was not a work because the program will not know the names of these sections, therefore, they can not change these commands. I will get some help here. Any suggestions on how I can make my program more extensible will be very welcome. +1...

css - Full size of inside another next to the -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब यह मेरा html है छोटा खेल। & lt; div id = "game" & gt; & Lt; div id = "पसंद" onmouseover = "npcRoll ()" & gt; & Lt; p & gt; आपके हथियार को चुसे! & Lt; / p & gt; & Lt; बटन आईडी = "रॉक" onClick = "चुनें (1)" & gt; रॉक & lt; / button & gt; & Lt; बटन आईडी = "पेपर" onClick = "चुनें (2)" & gt; पेपर & lt; / button & gt; & Lt; बटन आईडी = "कैंची" onClick = "चुनें (3)" & gt; कैंची & lt; / button & gt; & Lt; p & gt; आपने चुना & lt; span id = "userChoice" & gt; कोई भी & lt; / span & gt;! & Lt; / p & gt; & Lt; / div & gt; & Lt; div id = "पुष्टि करें" & gt; & Lt; p & gt; जब आप तैयार हों, तो & lt; मजबूत & gt; फ़ुट & lt; / strong & gt;। & Lt; / p & gt; पर क्लिक करें। & Lt; बट...

C# List.ForEach(delegate(type t) and how to remove items as the list is iterated through -

This can be considered bad programming, but before .net 4, I used to make heavy use of code like this: / P> enemyList.ForEach (representative (enemy e) (e. Update), if (some condition) enemy list. Remove (e);}); Now, I am going through updating some old projects, and there are lot of the code that were later deleted because they Must have changed. Now, I have an extension for which I have permission to use the foray: public static void ForEach & lt; T & gt; (This IEnumerable & lt; T & gt; sequence, action & lt; T & gt; action) {if (sequence == faucet) remove new logic ("sequence"); If (action == empty) remove new logic ("action"); Forchach (T items in sequence) verb (object); } I know I can do this: var index = 0; Whereas (index & lt; enemyList.Count) {if (condition) enemyList.RemoveAt (index); Other index ++; } But some of them would be a pain to write in this way. Is there any way to add that functionality back...

java - Accessing google sql database with external app in android -

I realize that you can not connect directly to the app directly in the database. So what I did was creating a GAE (Google Apps Engine) backend with an external app that would access the database External app-> Backend-> Google Cloud SQL While I am confused as to where I placed Google SQL Server address in the GAE backend. Will this enable Google Cloud SQL which is under the property for the app engine? It is already in existence with Google Cloud Databases. You must specify the address of the cloud SQL instance (and the user name and the Password): connection conn = DriverManager.getConnection ("jdbc: google: mysql: // your-project-id: your-example-name / database", "user", "password"); View

Updating parent view in backbone.js -

Target: Use backbone to create users' table, be able to edit users inline and save , Re-provide the row with updated data. I am creating a container table for users with a main user view. Then I'm looping through a user archive, and using a UserView to create a table row per user. Clicking on any line requires changing the row with an edit form (more fields are connected to the user displayed in the table.) Click Save to modify the editing form with updated table row Everything works except the render of the table row (if I reload the page , Then update the sub The owner data is displayed correctly, so I know that it has to be saved.) What I'm trying to do (I think) View and view parental views (user view) Receives user views dozens of searches and after different attempts, I am here to help say what I am doing wrong. thank you in advanced. // See main user var UsersView = Backbone.View.extend ({el: '#content', template: _. Template (usersTemp...

DB2 SQL convert decimal to character pad with zeros -

How do I change DB2 DCIML (11) for the character value from 12345678 My LeftPad function without LeftPad function Duplication ('0', 4-length (MY_COLUMN_VALUE)) || CHAR (MY_COLUMN_VALUE) NEW_COLUMN MY_COLUMN_VALUE NEW_COLUMN 1 0004 23 0023 test ... SELECT '32' MY_VALUE, REPEAT ('0', 4- Length ('23 ')) || SYSibm.sysdummy1 from LEFTPAB_MY_VALUE as CHAR ('23')

Slide and fade images using jquery -

I am trying to create a simple homepage that has two main images and a third button image focuses on them. As the entry button, I could not have 2 main images to slide off the screen, one on the left side is clicked on another one to the right and when the entry button fade. ? Animate Use jQuery - ($ ". Button") Click (function () { $ This = $ (this); $ ('left'). ({"Margin-left": -1000}); $ ('right'). Chetan ({"margin-right": - 1000 }, Function () {$ this.fadeOut ();});}); It is not also productive or helpful, because he does not know what it is. Bella -

string - separating variable with a symbol into different parts -

By using batch, I want to be able to separate a variable into two or three parts, for example if I have a string that looks like this: var1; Var2; How can I be var1 different to be a variable and var2? In advance thanks token = 1,2 Loop creates two variables for %% i and %% j & amp; The string divides into two parts, the delimiter ; : @echo off and setlocal set "string = var1; var2;" for / f "token = 1,2 daily =;" Set the "variable1 = %% i" in %% i ("% string") and set "variable2 = %% j" echo variable 1:% variable1% echo variable2:% variable2% endlocal pause Use this for more "dynamic" method: @echo off & setlocal enabledelayedexpansion set "string = var1; var2;" Set to %% i (% string%) / set a count = 0 (set / one count + 1 set "variable! Count! Count! = %% i") in echo% count% variables / l %% i (% 1,% count%) (variable %% i:! Variable %% i!) Indoclock

orchardcms - Orchard Emailing Errors -

I'm using an orchard to enable my new theme and whenever I try to enable my theme to preview (even in preview mode) I get it. "The page can not be displayed due to internal server error." I have tried to close customErrors in web.config and nothing has changed, so I started playing with the configuration of log4net. I have the structure below: & lt; Epander Name = "Error-File" Type = "Orchard.Living.Orchardfile Apache" & gt; & Lt ;! - Error log: FATAL subsets of error and debug logs - & gt; & Lt; File value = "App_Data / log / garden-error" /> & Lt; AppendToFile value = "true" /> & Lt ;! - Instant flush on error log, to avoid data loss with sudden end - & gt; & Lt; Instant flush value = "wrong" /> & Lt; StaticLogFileName value = "wrong" /> & Lt; Rolling style value = "date" /> & Lt; Date pattern = "- yyyy.mm.dd'log '...

php - Setting and using newly set Cookie value -

Working on a site that displays different content based on cookie content. For example: versus This value can be set on any page because I have a job on each page. If the cookie is set or already saved, information has been loaded for that cu. If a cookie value is not set or the value is passed which is not present in DB, then the site displays the default information. Here's the problem if you do not load the existing data until you refresh the current page if you do not set a cookie value to request a site with "? Cu = 10010" attached to any page Does. I have read, I have to refresh the page using the header ("Location .... .... but I'm not sure if I want to do everything based on that cookie value $ _ GET [ "cu"]) and amp; is_numeric ($ _ GET [ "cu"]] {$ Pass_cu = $ _GET [ "cu"]; see // if value passed is an active CU record mysql_select_d $ ($ Database_peewee, $ peewee); $ query_rs_valid_cu = "SELECT...

c# - Can I run another Command Prompt/GUI process in a Windows Service? -

I am writing a service of windows, which sometimes requires the system's IP address to be renewed and IP Conferencing / will renew it. Code is showing like this process ipconfigProcess = new process (); IpconfigProcess.StartInfo.FileName = "ipconfig"; IpconfigProcess.StartInfo.Arguments = "/ Renewal"; IpconfigProcess.StartInfo.UseShellExecute = false; IpconfigProcess.StartInfo.RedirectStandardOutput = True; IpconfigProcess.Start (); StrOutput = compiler.StandardOutput.ReadToEnd (); IpconfigProcess.WaitForExit (); I think the windows service is not allowed to show windows / dialogue, so my question is whether to upgrade the above IP will be a problem in the Windows service, as the IPCPIP can run Can not I see the console or not? I think the only problem you are facing is permission - you There should be no problem in running the process (unless you want to interact with any type of UI), but your windows service needs to be run as an account that ex...

Postgresql very slow query -

Why does this query run very slowly? Others are fine indexes are good i think Select "CIID" as "c_" from "e_inst" as "e_inst" group as "c_" by "e_inst" "e_inst" "Si_id" command "E_inst" "Si_id" ASC Nullest query scheme: sort (cost = 12221.87..12221.90 rows = 68 width = 4) (real time = 1115.377 ..1115.433 rows = 81 loops = 1) Sort key: CIID Sort Meth: QuickSource Memory: 28KB - & gt; Hash aggregate (cost = 12221.25..12221.45 rows = 68 width = 4) (real time = 1115.198..1115.261 rows = 81 loops = 1) - & gt; Seac scan on e-int (cost = 0.00..11920.07 rows = 602357 width = 4) (real time = 0.021..611.570 rows = 602357 loop = 1) Total runtime: 1115.538 ms Create table and index: create table e_inst (id not integer, tap, ip numeric, g character different, changing referer character, proc integer, loke_id integer, top_id integer, si_id integer, Kop integer, counting inte...

ios - NSLineBreakByWordWrapping on First Line but NSLineBreakByTruncatingTail For Second Line? -

Is this possible? I have to put a two line label in the first row, I want to wrap it on words. But for the second line, if the text is too long, I want to sort it by tail and later add ellipses "..." . Any ideas on the simplest way to do this? In my comment, I was wrong about the line break mode. If you only pull a UILB, then the default line break is the trunk tail, which is what you want. If you make the label twice as high, and set the lines to 2, then the text will wrap up, and if you are too long for the second line, then this elipisis will show that there is no need to fancy anything.

php - User already exists and please fill in the form -

This is a code that is yet to register a user Now I Required for: To return an error message if the username has already been taken If the fields are empty, / Li> Here is the code: // ============= Configure server and database ====== = $ Host = 'localhost'; $ User = 'root'; $ Password = 'revolve'; // ============= DATA BASE INFORMATION ================= Database = 'DBSC'; $ Conn = mysql_connect ($ host, $ user, $ password) or die ('server information is not correct'); // Install connection with server mysql_select_db ($ database, $ conn) or die ('database information is not correct'); // =============== End server configuration ========================== Registration script start ========== $ username = mysql_real_escape_string ($ _ POST ['txtUser']); $ Password = mysql_real_escape_string ($ _ POST ['txtPassword']); If (isset ($ _ POST ['btnRegister'])) // === When I set the button 1 or to press...

sql - Summing and ordering at once -

I have a table of commands where I need to know which 3 partners_ID has the largest sum of the sum , And make the three of them the largest from the largest. testdb = # SELECT amount_total, sale_order to partner_id; Zodiac_tools | Partner_id -------------- + ------------ 1244.00 | 93065. 90. 12 3600.00 3 2263.00 | 25,000.00 10 3263.00 | 3 123.00 | 25 5400.00 | 12 (8 lines) Just starting SQL, I am confused ... consolidated amount If you want to list the cumulative amount, it can be as simple as: SELECT partner_id, sum ( Amount_sun) AS amout_supertotal FROM 1 order by sales order group 2 DESC limit 3; 1 in Group B1 is a numerical parameter, which refers to the position in the SELECT list in this case Only a formal shortcut for the partner_id by the group . This ignores a special case where more than three partners will qualify and (arguably for lack of definition) will arbitrarily raise. / P> Personal Quantity SELECT partner_id, amount_exe sales_order...

c++ - Declaration of method changes meaning of symbol -

निम्न कोड के लिए: struct foo {}; संरचना ए {टाइप किए गए एफू foo_type; शून्य foo (); }; जीसीसी एक कंपाइलर त्रुटि देता है: test.cpp: 7: 14: त्रुटि: 'शून्य ए :: एफू ()' की घोषणा [- Fpermissive] शून्य foo (); ^ Test.cpp: 1: 8: त्रुटि: 'फू' का अर्थ 'स्ट्रक्चर फू' से होता है [-fpermissive] struct foo {}; ^ लेकिन क्लैग कंपाइलर त्रुटियों के बिना इसे स्वीकार करता है कौन सही है? ध्यान दें कि यदि टाइप कियाइफ़ निकाल दिया गया है, या टाइप किया गया है, तो जीसीसी और क्लैंग दोनों कोड स्वीकार करते हैं। जीसीसी सही है, लेकिन निदान (3.3.7) देना जरूरी नहीं है: कक्षा एस में इस्तेमाल किया जाने वाला एक नाम एन अपने संदर्भ में एक ही घोषणा को संदर्भित करेगा और एस के पूर्ण दायरे में पुनः मूल्यांकन किया जाएगा। इस नियम के उल्लंघन के लिए कोई नैदानिक ​​की आवश्यकता नहीं है। यह कैसे वर्ग के दायरे का काम करता है के कारण है foo का void foo (); वर्ग के संपूर्ण दायरे में दिखाई देता है ए , इसलिए घोषणा void foo (); का foo के अर्थ में परिवर्तन को struct foo को फ़ंक...

Grab bits from integer value in c -

I have been given an integer designated temporary that is complex and contains 3 high, low, and current temperatures. For 0-9 bits, for short 10-19 medium, and 20-29 errors for the current temperature must hold bits with 2 bits. I'm not sure how to go about it, but I know that it includes bitwise operators. int high = temporary & amp; (2 ^ 10-1); Int middle = (temp> & gt; 10) & amp; (2 ^ 10-1); Int cum = (temp> gt; 20) & amp; (2 ^ 10-1);

oracle - SQL Query to output present guests in hotel -

Consider the above relationships I am trying to list all the guests and dependents who currently live in the hotel. , Which means that they are present in the room. Here is my SQL query: g.FORENAME, g.SURNAME select from guest g at g.GUESTID = b.GUESTID where (b h. DEPARTDATE & gt; TO_CHAR (CURRENT_DATE, 'DD-Mon-YYYY') and b.ARRIVEDATE & LT; TO_CHAR (CURRENT_DATE, 'DD-Mon-YYYY')) UNION jOIN selection d.FORENAME, dependent d interiors BOOKINGDEPENDANT select bd d.SURNAME on bd.DEPENDANTID = d.DEPENDANTID about where booking b (in bd.BOOKINGID b.BOOKINGID to (b.DEPARTDATE & gt; TO_CHAR (CURRENT_DATE, 'DD-Mon-YYYY') and b. ARRIVEDATE & TO; TO_CHAR (CURRENT_DATE, 'DD-Mon-YYYY'))); Performs the query, but shows no rows when it is considered. Here bookings . Include booking values ​​(2002, 5445, '19-MAR-2013 ', '10 -JUN-2013', 250.00); Insert in booking prices (2004, 3005, '19-MAR-2013 ', '21-Marc...

c# - Debug parameter in system.web part of the web.config file in my ASP.NET web application -

I'm trying to find out some information about what this code does to the debug parameter Web.config file for my web application: & lt; System.web & gt; & Lt; Compilation target Fraamework = "4.0" debug = "true" /> Can anyone explain? And should I put it in the production product? It decides whether a line is due to my web Lives in config. Debug information is prepared for compiled assemblies. IIS automatically compile the content, so if you change a page file, then your changes are automatically effective. How does it compile the tag IIS in question.

scope - With... End With vs Using in VB.NET -

I just found out that like C #, VB Using in the keyword is the keyword. By now I thought that I do not have it (I'm stupid, I know ...) and instead of these things were: New allayback connection with such a definition (what is the implication) by using the statement this way Use CN Update I should say that I am familiar with the statement using when it is disposed of that object Tax Received when construction is finished. However, as far as I understand with new ... , the object will be prepared for garbage collection as an object when it will not be scratched . So my question is really the only difference, with the use of I will release the memory now, whereas with build , GC Will it be released even when it feels like? Or am I missing something big here? Is there any best practice effect? Should I go and rewrite all the code MyDisposableObject () ... with as as new MyDisposableObject () used in ? By using ... with A series of assertions...

objective c - Why do I get this error when compiling a LiveCode iOS external for device but it compiles fine for the simulator? -

There is an error: architecture undefined symbols: "___udivmodsi4", for ARMv7 Referenced: _sqlite3BitvecSet libmergDropboxSync.a (sqlite3.o) _sqlite3BitvecClear in libmergDropboxSync.a (sqlite3.o) _sqlite3BitvecTest libmergDropboxSync.a (sqlite3.o) ld: Architectural armv7 not found for the collection Symbol (s) Collection 2: LD back 1 Exit status lipoproteins input file can not be opened: /var/folders/np/1scdfrdd7kx64bbykn22wj200000gn/T//ccvBM79H.out (No such file or directory) error: the external dylib Construction In order to missing failed to add, probably due to the framework or library reference - check MergDropboxSync.ios file command / bin / sh content emitted errors but did not return a Nonjro Autget code to indicate the failure When I create a simulator, it just fine that my library is compiling properly # External's 'dylib' form build: device There is a problem in that This makes it possible for the dylib that is documented in lclink.sh for ...

AppleScript - Using information in the cells of an Excel file as the initializing attributes of a class in Xcode -

I still have the code: Tell the application "Microsoft Excel" - - Set a data set entirely in a list of lists (i.e., 2 dimensions - & gt; columns of rows), set the category "B2: H776" to Category 1, which gives the academic sheet the merit data range 1 To set the value of - Set a myRow to a specific cell data now 7 Set myCol to 3 myVal on the item {myRol} of myData item {myRol} Magistrate or elements and then column by row. So if my Excel cells look like this: | A1 A2 A3 | B1 | B2 | B3 | My variable myVar will be an array that looks like this: {{"A1", "A2", "A3"}, I I want to take an existing project in it, we call it example_project with the current example, M {{B1}, "B2", "B3"}} file, we can call it example_m M, and to be characteristic of an object, write all the elements within myVar. For example, if my array is the same array as I am starting an example object with those values ​​as ...

javascript - Hide DIV when make selection -

I have 2 choices if a user submits form without selecting the dropdown, a message is displayed on DIV. SCRIPT: $ (document) .ready (function () {$ ("#") Click (function () {if (document.getElementById ('sel 'SelectedIndex == 0) $ ("# msg") .html ("Please select 1"); if (document.getElementById (' Sel2 '). SelectedIndex == 0) $ ("# msg2") .html ("Please select 2");});}); Form: & lt; Form id = "form1" & gt; & Lt; Div id = "msg" & gt; & Lt; / Div & gt; & Lt; Select id = "sel" & gt; & Lt; Option value = "" & gt; - Select - & lt; / Options & gt; & Lt; Option value = "Warr 1" & gt; Restored 1 & lt; / Options & gt; & Lt; Option value = "Warr2" & gt; Restore 2 & lt; / Options & gt; & Lt; / Select & gt; & Lt; Div id = "msg2" & gt; & Lt; / Div &...

java - How to add EditText elements in Android on the same activity? -

मेरे पास एक DetailsActivity है जिसमें TextView और दिनांक के लिए समय एडमिट टेक्स्ट उपयोगकर्ता उस तिथि को जोड़ सकते हैं एक बटन बुलाया विस्तार जोड़ें मैं चाहता हूं कि जब कोई उपयोगकर्ता डीएम-याय (भविष्य) की तरह एक तिथि में प्रवेश करे, तो इस टाइमएडिट टेक्स्ट तत्व, गतिविधि को नहीं दिखाना चाहिए वीकएडिट पाठ जैसा सप्ताह 1: सप्ताहआइटिट टेक्स्ट 1 (1 सप्ताह का विवरण जोड़ने के लिए) सप्ताह 2 : WeekEditText2 (दूसरे सप्ताह के लिए विवरण जोड़ने के लिए) और इतने पर। कुल संख्या (AddDate - CurrentDate) / 7 का एक तरीका है विस्तार जोड़ें बटन पर क्लिक करके और फिर दिखा रहा है AddDate इन्टेंट के माध्यम से आदि के पास करते हुए अगली गतिविधि पर EditTexts लेकिन नीचे एक ही पृष्ठ पर EditText दिखाना संभव है TimeEditText के बाद उपयोगकर्ता एक तिथि में प्रवेश करता है? एक बटन उस पर क्लिक करने पर आपको EditText s की आवश्यकता को जोड़ता है public void onClick (देखें v) {// do whatever else you need here int numWeeks = (जोड़ा गया डेट - वर्तमान दिनांक) / 7; के लिए (i...

java - android:inputType="textUri" wont enable internet keyboard (w .com button) -

I have an issue where I'm calling the Internet keyboard with the .com button but it will not be displayed when the keyboard is triggered. Any help is greatly appreciated! Android: layout_width = "fill_content" Android: layout_height = "wrap_content" Android: ems = "10" Android: lines = "1" Android: signal = "@ string / code_hint" Android: imeOptions = "Action Next" Android: InputType = "textUri" /> You can try to give android: inputType = "textEmailAddress" / Code> to place the keyboard with the .com button

c# - A Regular Expression Which matches the sequence -

The set of strings can be like these. 1) Any type of indicator & lt; Anycharacter & gt; Any kind of non-informants of any type of person 2) For any person & lt; Anychar & gt; anyNoOfcharacters and as a (final String) '#' 3) anyNoOfcharacters "_" anyNoOfcharacters and after a "#" 4) anyNoOfcharacters and anyNoOfdigits a "#" Can there be a single regex which can validate all the above set of stars? This I have done ... RegEx patterns = new Regex (@ "^ [A-GAA-Z 0-9 \ _] + [A- GA-Z0-9 # .-] | [\ બી \ w \ D] | "); According to your needs, here is a regex that you must match one of the five accurate stars listed. If it does not mean that you have, please clarify Regex pattern = new Regex (@ "(Ads & lt; R & gt ;. _aimDate50ms \ Okay) | (ads K & lt; t & gt; Valid #) | (tactics_priorityT) | (tactics_SelectedADS #) | (ads3bValid #) "); Edit Waves your needs too much...

Null pointer exception json parsing url android -

I am trying to parse the json entry from the url. Below is the code section. TextView txtViewParsedValue; Private JSONObject jsonObject; Private Static String URL = "https://www.dropbox.com/s/rhk01nqlyj5gixl/jsonparsing.txt?dl=1"; String strparsedValue = null; TextView txtViewParsedValue; Private JSONObject jsonObject; Private Static String URL = "https://www.dropbox.com/s/rhk01nqlyj5gixl/jsonparsing.txt?dl=1"; String strparsedValue = null; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.activity_main); TxtViewParsedValue = (TextView) findViewById (R.id.textview1); Try {parseJSON (); } Grip (JasonAxpection E) {// Two-Auto Auto-Generated Cat Block E.Pintstaxtres (); }} Public Zero ParseJSON () throws JSONException {JSONParser jParser = new JSONParser (); JsonObject = jParser.getJSONFromUrl (url); JSONObject object = jsonObject.getJSONObject ("student"); JSONArray subArray = object....

Android Oauth Exception with SMTP Transport connect,with android version 2.3 -

I get the following error when I try to start a new Android project. I OS version 2.3 but the same code is working fine on Android 4.0. Public SMTP Transport Connect Connect STMTP (string host, int port, string user email, string otheton, boolean debug) exception {multiplier properties = new properties (properties)); Props.put ("mail.smtp.starttls.enable", "true"); Props.put ("mail.smtp.starttls.required", "true"); Props.put ("mail.smtp.sasl.enable", "false"); Session = session. Gate instant (Sahara); Session.setDebug (debug); The final URL name did not use the URL name = null; SMTPTransport transport = new SMTPTransport (session, unused url name); // If the password is non-empty, then SMTP attempts to login. Last string blank password = null; Transport.connect (host, port, user email, empty password); Byte [] response = string.format ("user =% s \ 1auth = bearer% s \ 1 \ 1", user email, othe token) .getBytes ...

java - Pass username to Spring Security -

We are making an application that logs in the user name (Windows NTLM) and we usually use the authentication part All other apps pass to check. I would like to know that it is possible to pass the username to usernames and give usernames and pass our new web application which was developed using Spring 3? So that we can take advantage of the use of spring safety features If this is possible, how can I use it? As we already have an application that Windows users gives, thanks The simplest way to resolve your problem is as follows: 1) Install Apache Web Server and configure to use NTLM authentication using modltmm (Similarly you can use the Kerberos authentication using mod_auth_kerb) 2) Your Selvlet Container (JBoss or Tomcat ) Configure mod_jk in After the successful authentication, the Apache Surlet sends REMOTE_USER header in the container. The user in the header (by name) has a user name, make sure that you configure tomcatAuthentication = "false" A...

java - Error with Pax runner -

I am using the Maven Packs plugin to start the Equinox container within which my OCBB bundles should be deployed. Felix Container I have explicitly instructed to start a Equinox container. This is my pack plugin configuration in the POM file & lt; Plugin & gt; & Lt; Group & gt; Org.ops4j & lt; / Group & gt; & Lt; ArtifactId & gt; Maven-Packs-plugin & lt; / ArtifactId> & Lt; Version & gt; 1.4 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; Runnner & gt; 1.4.0 & lt; / Runnner & gt; & Lt; Frame & gt; Equine & lt; / Frame & gt; & Lt; Provisioning & gt; & Lt; Param & gt; - Log = Debug & lt; / Param & gt; & Lt; Param> gt; Definition URL = File: C: \ User \ 661447 \ Desktop \ Principal Workspace \ OSGiDmHelloWorldProvider \ platform.xml & lt; / Param & gt; & Lt; / Provisioning & gt; & Lt; / Configuration & gt; & Lt; / Plugin ...

Pointers and Arrays in C/C++ -

People I'm trying to bring down some theoretical stuff for pointers and arrays. I was hoping someone could confirm some suspicions with the concept of signs and arrays. Suppose I had something like this int ia [] = {0,1, 2,3,4,5}; Come [2]; // = 2 int * ip = & amp; Iia [0]; // Pointer IP array gets the address of element 0 in IIP IP [2]; // ?? IP [2] = 42; // Most of this code is clearly theoretical but there is little uncertain about the previous 2 lines. Firstly the IP is saying [2] similar to the IP saying the second in the array Element indicates? Is it equal to say * ip = ia [2]? Im also confused with the last line [2] = 42; So the second element of the object, which points to the IP, gives that value to 42? Or is it that dereferencing an array signaling method? Im just a little confused on whats going on The following IA creates an array and in the curly braces in the number store array: int ia [] = {0,1,2,3,4,5}; In the following effect, nothing ...

How to use Hadoop FS API inside Storm Bolt in java -

I would like to store in HDFC data implies that storm I have added Hup FS API code Bolt Class , But it is throwing the compile error with the storm. The following is the hurricane bolt class: package bolts; Import java.io * *; Import java.util. *; Import Java.net *; Import org.apache.hadoop.fs. *; Import org.apache.hadoop.conf *; Import org.apache.hadoop.io *; Import org.apache.hadoop.mapred *; Import org.apache.hadoop.util *; Import backtip. Storm.pholology Basic Optical Collector; Import backtipes Storm. Topology Outputfield Declair; Import BackType.storm.pholology.base Basebescholt; Import backtype.storm.tuple.Fields; Import backtype.storm.tuple.Tuple; Import backtype.storm.tuple.Values; Public class datormormizer basebesciblet (public executed null) (Tupal Input, BasicOutput Collector Collector) {String sentence = input.getString (0); String [] process = sentence split (""); Int n = 1; String REC = ""; Try {string filepet = "/root/data/top_output...

c++ - Jni not working -

यह मेरा जावा कोड है वर्ग मूल निवासी {निजी मूल स्ट्रिंग getInput (स्ट्रिंग प्रॉम्प्ट); // मूल पद्धति स्थिर / स्थिर प्रारंभिक कोड {System.loadLibrary ("मूल प्रॉपर्टी"); } सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {नेटिवप्रॉप्ट एनपी = नया मूल प्रॉपर्टी (); स्ट्रिंग sName = NP.getInput ("अपना नाम दर्ज करें:"); System.out.println ("हैलो" + sName); }} मैं jdk1.7.0_17 का उपयोग कर रहा हूं। यह मेरा सी ++ कोड है #include "nativeprompt.h" #include "jni.h" #include "string" #include "iostream" #include "vector" नामस्थान std का उपयोग कर; / * * कक्षा: नेटिवप्रोप्ट * विधि: getInput * हस्ताक्षर: (Ljava / lang / String;) Ljava / lang / String; * / जेएनआईएक्सपोर्ट जेस्ट्रिंग जेएनआईसीएलएल जावा_नेटिवप्रॉप्ट_गेटइनपूट (जेएनआईइएनव * एंव, जॉब्जेक्ट ओजज, जेस्ट्रिंग प्रॉम्प्ट) {स्ट्रिंग एसएन्ट्री; Const char * str; Str = env- & gt; GetStringutforhars (संकेत, नल); यदि (str == NULL) {वापसी env-> NewStringUTF...

Extracting HTML data fields with Python -

Please forgive me for lack of knowledge, but give HTML the following format, the best way to remove the person What is the data field? Please keep in mind that most of the times will be faucet, in comparison with some, or all, in which we will keep them in the tap. & lt; Div class = "profile-section" id = "about a bit more" & gt; & Lt; DL & gt; & Lt; DT & gt; Name: & lt; / Dt & gt; & Lt; Dd & gt; & Lt; Span class = "given-name" & gt; Claim & lt; / Span & gt; & Lt; Span class = "family-name" & gt; Cuddles & lt; / Span & gt; & Lt; / Dd> & Lt; / DL & gt; & Lt ;! - & lt; Span class = "realname" & gt; / & Lt; Span class = "fn n" & gt; & Lt; Span class = "given-name" & gt; Claim & lt; / Span & gt; & Lt; Span class = "family-name" & gt; Kadlepler & lt; / Span & gt; &...

Specify dependency of my LLVM pass on the mem2reg pass -

I am writing a ModulePass and assign it to opt-load . There is an indication that Promomomerochemical transit pass is nearby and as it should not be necessary from me it is a statement from 2010. Does he still catch up? I found that something similar from the post AU.addRequiredID (PromoteMemoryToRegister :: MemoryToRegisterID); But what I denied was the post written above. So my question is, if possible, how should this dependence be expressed to me? How can I express such close dependence in general? And what is the difference between the passphrase pass, and ok, another pass? What's the difference between the transform pass and the other near? A passphrase pass is a pass that can invalidate other nearby results. How do I express this dependence to me? First of all, I recommend reading. In any case, the correct way to add a dependency between change pass is to add one before the other in the manager (), or if you just call opt , you want to Add ...

Python: how to make form a string comprising of text and variable values in python 2.6 -

Actually I want to add strings and variables together. In Java: string is s = "HI is my name" + var_name + "i" + age + "old of year"; In PHP: $ s = "Hi my name". $ Var_name "I'm" $ age "Years old"; I need a similar thing in Python. I know the format function supported by Python 3.0 and above but there is a hindrance to running Python version 2.6. I can not upgrade, please tell me the best method. PS - I came to know that the format also works in Python 2.6. If you have any other way, please tell me also. Always good for more information. .format : " Hi my name {name}. I'm {age} year old. " Format (name = "John", age = 30)

sql server - How to search multiple strings or chars in a field in sql -

I am using sql server and i have a table with two fields Description I want to select all the rows containing the following strings ('$', ' I am using it like this: Select the name, description from table_name where there is any way Details of ('% $%', '% [%] now giving error when I run it Incorrect syntax keyword 'any' Thanks, if You have many patterns pattern stored on To include the derived table or temporary table code> announcement @bugger table (pattern VARCHAR (20)); Patterns value ('% $%'), ( '% [%]%'), ('% AC cd%'); SELECT a. * Add a comment from the table_name @ Patterns P On (A. P. Pattern like a description); To compare multiple columns, simply add the expression from ON section SELECT a.). @ Patterns P On (A.S.A.L.P.P. Pete Tern) or (A.P.Parten, like A. Column 2); Update as pattern pattern (select 'Association'% ('% Device%') Select All ...

visual studio 2010 - How can 'enable selection' in a gridview be activated programatically in vb? -

I'm using VisualStudio 2010 vb When you use Gridview, you You can expand and select the 'Choable' menu and select 'Select Selection' and it can be created in each row by a select link (which can be changed on the button), allowing it to choose the line and triger, for example, the row A drill below the information contained in Can this 'enable selection' be programmatically activated? I made the following efforts without any consequences: GridView1.AutoGenerateSelectButton = True Thanks I found out that I was missing the database, the following tasks Gridview 1 ENTER Generate Button Button = True Gridview 1.Datind ()

ios - Load .obj file out of Blender -

Now the Blender 3D .obj files are imported to do some work searching for the Iphone application. I can get the details to apply in that way in any way! I do not want to use any engine, I just want to know the steps that are completely and basic to me. There is nothing in fact on www. You can get articles from 2005 - 2008, but these are not up to date and nothing works. So, does anyone have to do this? Take a look at the source, and look at the ozloder. He created ob to be able to load the obz file, and it should work in several platforms (including iOS). By reading the source you will see that it is really simple to make the object loader to the corner, but when you start taking care of normal and textured courses, it becomes more complicated. Here's a simple algorithm for scraping the OBJ file (I will stop parsing the corresponding tpl file for the reader's own research): Read in the file's format, starting all Throwing rows with # (comments) looks ...

javascript - window.postMessage behaves abnormal on Chrome extension -

मैं क्रोम एक्सटेंशन सामग्री स्क्रिप्ट में window.postMessage का उपयोग करता हूं: फ़ंक्शन () {विंडो .addEventListener ("संदेश", फ़ंक्शन (ईवेंट) {console.log (ईवेंट);}, झूठी); Window.postMessage ({प्रकार: \ "FROM_PAGE \"}, "*")}} असामान्य व्यवहार यह है कि पहली बार मैं इस फ़ंक्शन को कॉल करता हूं, एक बार सांत्वना प्रिंट ईवेंट; दूसरी बार मैं कॉल करता हूँ, कंसोल प्रिंट दो बार; तीसरी बार, तीन बार। मेरे कोड में क्या गलत है? ऐसा इसलिए है क्योंकि आप नया ईवेंट लिस्टनर प्रत्येक समय को जोड़ने से आप फ़ंक्शन कॉल कर सकते हैं। इस प्रकार आपके द्वारा जोड़े गए सभी EventListener को पोस्ट किया गया संदेश पोस्टमेस और फिर करता है console.log (इवेंट) इसलिए पहली बार जब आप कॉल करते हैं फ़ंक्शन। आप EventListeners फ़ंक्शन को केवल एक बार निष्पादित कर लेते हैं क्योंकि केवल 1 EventListener उस DOM से जुड़ा हुआ है जो कॉल करता है console.log दूसरी बार दो EventListeners चलाना है console.log और इसी तरह ... आपको संलग्न करना चाहिए आप EventListener ...

Java validate image header -

I have a requirement where I do not need to identify the type of image by file extension, but by validating the header . I am trying to validate the JPEG file by magic number verification. file imgFile = new file ("C: \\ user \\ public \\ picture \\ sample image \\ Chrysanthemum.jpg"); Byte [BA] = Files To beatierre (imgfile); // Its a Google Java library int i = 0; If (BA [i] == 0xFF & amp; ba [i + 1] == 0xD8 and b [i + 2] == 0xFF & b [i + 3] == 0xE0) {println ("IsJPEG"); } But the condition is not satisfied at all. BA [i] returns -1 . What am I doing? byte has been signed in Java and has a limit of 128 to 127, which means your BA [0] -1 comes out as, while 0xFF is interpreted as an int as 255 has been done. If you do the bitword and use the 0xFF with the and operator, it converts the signed byte to the correct value and your code will work as follows: file imgFile = new file ("C: \\ user \\ public \\ picture \\ sampl...

python - _BaseModel__view_look_dom_arch -

This error needs to be clarified. Is able to establish its own developmentblock module. My idea is to double-check XML file also.can't any error file "/home/priyan/Software/openerp-7.0-20130309-002120/openerp/osv/orm.py" Find, line 1776, __view_look_dom in xarch, xfields = relation .__ view_look_dom_arch (million, user, f, VIEW_ID, ctx) AttributeError: 19 :: 32,668 3683 openerp.tools bpl_db error 'NoneType' object No attribute '_BaseModel__view_look_dom_arch' 2013- 03-21 09 .convert: Parse error in: /home/priyan/software/openerp-7.0-20130309-002120/openerp/addons/bpl/bpl_view.xml#76 & lt; Record model = "ir.ui.view" id = "bpl_work_offer_form" & gt; & Lt; Area name = "name" & gt; BPL .work.offer.form & lt; / Field & gt; & Lt; Area name = "model" & gt; BPL .work.offer & lt; / Field & gt; & Lt; Field name = "arch" type = "xml" & gt; & Lt; For...

c# - Xml Format Error -

I had to face an ineligible property problem in my C # webservice project. public class header {{datamember} public long id {received; Set; } [Datamember] get public long game ID { Set; } [Datamember] Public Long Tournament ID {Received; Set; } [Database] Public String Tournament Name {Get; Set; } [Database] Public string tournament ShortName {get; Set; } [Datamember] get public long position id { Set; } [Datamember] public string status name {get; Set; } [Datamember] public string statusShortName {get; Set; } [Datamember] Public Datetime Matchdown (Receive); Set; } [Datamember] public string matchtime {get; Set; } [DateMaker] Public Date Time? Receive {period; Set; } [Datamember] Public int? Quarter 1 HomesumScore {Receive; Set; } [Datamember] Public int? Quarter 1AwayTeamScore {Get; Set; } [Datamember] Public Intimate Quarter 2 Homeschool Solutions {Received; Set; } [Datamember] Public Int Quarter 2 Aveetamscore {Received; Set; } [Datamember] Public Int Quarter 3 Homeschooling...

iphone - how do i get subclass UIButton title in superclass objective c -

यह मेरा कोड है। @interface MasterViewController: UIViewController {} - (शून्य) initCallService; @end @implementation MasterViewController - (शून्य) initCallService {} @end अन्य वर्ग जो उप-वर्ग है @interface DetailViewController: MasterViewController {IBOutlet UIButton * btn; } @ एमेंट @ इप्लिमेंटेशन विवरणवियंटंट्रोलर - (शून्य) बीटीएनटीटीले_चेत: {[बीटीएन सेटटिटल: [एसआरएआर ऑब्जेक्टअटइंडएक्स: रिकॉर्ड इंडैक्स] के लिए स्टेट: यूआईसीओन्टोलस्टेटअनॉर्मल]; } @end जब भी MasterViewController को btntitle_changed विधि DetailViewController वर्ग में भेजता है मुझे कोड>> initCallService विधि। मैं नहीं जानता कि यह कैसे मैं क्लास पदानुक्रम के साथ प्राप्त कर सकता हूं। क्या कोई मुझे इसके लिए मार्गदर्शन कर सकता है? मान्य उत्तर की सराहना की जाएगी। आपको मास्टरव्यूकंट्रोलर में एक संपत्ति की आवश्यकता है, NSString * buttonTitle - (शून्य) btntitle_changed {[बीटीएन सेटटाइटल: [स्वयं। ऑस्टआइएटइंडएक्स: रिकॉर्ड इंडैक्स] के लिए स्टेट: यूआईसीओन्टोलस्टेटअनॉर्मल]; [सुपर सेटबटन टाइ...

java - Xtend "Movies example" best answer -

I followed extensive tutorials and movies example. At the end of this tutorial, you can find the following question: @test def void sumOfVotesOfTop2 () {val long sum = movies.sortBy [ Ratings] .Tak (2) .map [numberofwots]. Royce [a, b | A + B] Asterix (47_22 9L, Yoga)} First of all, movies are sorted by rating, then we get the best two. After this, the list of films changes to their list of numberofwaves, which uses the map function. Now we have a list that can be reduced by adding a value to a long one. You can reduce and reduce instead of map Do you know how? My question is: What is the best answer for the last question? I found a way to calculate the same "yoga" value without using the map () extension, but it sounds terrible to me here. Here's my solution: assertEquals (47229, this.movies.sortBy [-rating] .take (2) .reduce [m1, m2 | new movie ('', 0, 0.0, m1. NumberOfVotes + m2.numberOfVotes, null]] numberOfVotes Is there a better (mo...

amazon - python subprocess popen run multiple command -

I want to open several commands in Python. I installed putty in windows. SSH in linux machine ssh_command_string: plink -i yourppk.ppk ec2-user @ instanceIp A command from that machine will generate a file export_project_command_string: ./AppManage -exportoutout / opt / notme- Download this file download_command_string: pscp -scp -i yourppk.ppk ec2-user @ instanceIp: / opt / notme-facebook .xml D: \ These commands are okay when I check them one by one, but I do not know how to do them in Python To be called once. I have tried the following code, but no luck: LINE_BUFFERED = 1 #NOTE: The first argument is a list p = popen (['cat'] Time = sleep, sleep = true, bufsize = LINE_BUFFERED, stdin = pipew, stdout = pipis, stderr = pipi) for cmd [ssh_command_string, cd_command_string, expo rt_project_command_string, download_command_string]: time.sleep (1) # There is a delay that order one after another even without a p.stdin.write (cmd) p.stdin.flush...

objective c - Add an UIButton to ViewController from custom class -

I have a menu named "Menu", making UIButton: .h file : @ Interface menu: NSBKect @ property (strong) form * form; @ Property (Strong) NSString * imageButtonName; @ Property (strong) UIButton * button; - (id) initWithClef: (int) clef hauteur: (int) Large size: (int) bigur posy: (int) posx: (int) posx alpha: (float) alpha imageButtonName: (NSString *) imageButtonName button :( UIButton *) button; @end .m file: #import "menu.h" @information menu @ synthesis forme = _forme; @ Synthesis button = _button; @ Synthesis imageBootname = _imageButtonName; - (id) initWithClef: (int) clef hauteur: (int) Large size: (int) bigur posy: (int) posx: (int) posx alpha: (float) alpha imageButtonName: (NSString *) imageButtonName button :( UIButton *) Button {if ((self = [super init])) {NSLog (@ "test2"); Self.forme = [[Form ALOC] initWithClef: Cloof Hitter: Houtor Bagre: Bigger Pazzy: Pausex: Paux Alpha: Alpha]; Self.button = Button; [Button Set Frame: CGRactMak...