Saturday, 15 June 2013

bash - sed - how to remove A-Z from second column -


I'm able to do it in pieces through awk print $ 2, sed [az] etc., but how do I Is this all through a single stream on a single stream?

  host_192.168.0.100 host_192.168.0.100   

current

  host_192.168.0.100 192.168. 0.100   

In addition, 'host' is just a placeholder, I really want 'all' letters that leave numbers / punctuation marks. Edit: Underscore will be good to catch, but I'm sure I can understand that there are some other common examples: abababab-abababab- 000.000.000.0 ab-ab-abababab -abababab-000.000.000.0 01-admin-10.10.10.10 01-admin-10.10.10.10 10.10.10.10-NAT 10.10.10.10-NAT 1test-10.10.10.10 1test-10.10.10.10

Thanks!

Looking at the second example, it seems that you want to appear after the first white space To remove all non-digits, logically Git before the first DI. You need to remove dashes, underscores, even dots, as well as letters; Anything that is not a digit gives this suggestion:

  sed -e 's / [^ 0-9] * / /'   

Quite easy, but meets your criteria:

  $ cat data host_192.168.0.100 host_192.168.0.100 now-now-nowabbab-abababab-2000,000.000.0 Now-now- Ababab-Ababab-2000.000.000.0 $ sed -e '/ s [^ 0-9] * / /' data host_1 92.168.0.100 1982.18.100 al-abbabab-ababab-2000.000.000.0 000.000.000.0 $ < / Code>  

A good part is writing good writing of good regular expression in writing. If you really want to do regular expression (Understand regular expressions such words).


The three major items make life very complex, with numbers and letters, and the following content:

  $ cat data host_192.168.0. 100 host_192.168.0.100 ab-ab-abababab-abababab-000.000.000 ab abbabab-abbabab -000.000.000.0 01-admin-10.10.10.10 01-admin-10.10.10.10 10.10.10.10-NAT 10.10.10.10- NAT 1test-10.10.10.10 1 Test-10.10.10.10 $ sed -e's / [^ 0- 9] * / / '\ & gt; -e s / [^.] * - \ ([0-9] [0-9.] * [0- 9] \) / \ 1 / '\ & gt; -Es / \ ([0-9] [0-9.] * [0-9] \) [^ 0-9.]. * $ / 1 / 'Data Host_1 92.168.0.100 192.168.0.100 Ab-ab-abababab-abababab-000.000.000.0 000.000.000.0 01-admin-10.10.10.10 10.10.10.10 10.10.10.10-NAT 10.10.10.10 1test-10.10. 10.10 10.10.10.10 $   

sed The script receives 3 free clean expression before, as before, removes any non-digit immediately after the space is. It does not require tweaking.

01-admin - line though untouched by that; The second regular expression follows a blank, sequence of non-dots followed by a dash, and then occupy the starting sequence with one digit, continuing with the interleaved points and dots, and ending with a digit, with changing it Matching string dash, remembering points and points is important for that task; If you are not careful, then * is too greedy (for example, s /. * \ ([0-9] [0-9.] * [0-9] ) / \ 1 / key digit has been closed from the IP-address component). I'm assuming that sed does not have a non-greedy quantifier such as *? ; If your version does, you can come up with a different answer (but this version will also work) you may need to zoom that pattern to handle other extraordinary matters; Please do this for yourself, do not edit this question.

The third regular expression deals with the following -NET and other such content; It remembers the sequence of digits and points (beginning and ending with the digits) and after that, remembering the digits and the points, instead of the string of memories, after a non-digit, non-dot character and any other trailing material is. It does not require much more tweaking.

Sample Grails 2.14 app not working in Tomcat -


  Grails 2.1.4 टॉमकेट 7.0.37 जावा 1.7 विंडो 7   

मैं ग्रहण में नमूना Grails ऐप बनाया है, मैं रन एप्लिकेशन के साथ चलाने के लिए यह ठीक काम कर रहा है और ब्रशर में भी खोल सकता है।

लेकिन एक ही आवेदन के लिए, मैं grails के साथ .war फ़ाइल का निर्माण: maven-install और मैं तैनात करने के लिए कोशिश कर रहा हूँ, लेकिन मैं त्रुटि नीचे हो रही है:

मार्च 26, 2013 11:56:26 org.apache.catalina.core.StandardContext startInternal गंभीर: प्रसंग [/HelloGrails-0.1] पिछले त्रुटियों की वजह से स्टार्टअप विफल रहा है मार्च 26, 2013 11:56:26 PM org.apache.catalina.loader.WebappClassLoader चेकथाफल लोकलफार्म लेकसेवर: वेब एप्लिकेशन [/HelloGrails-0.1] ने प्रकार की कुंजी के साथ एक थ्रेडलोकल बनाया [org.codehaus.groovy .runtime.GroovyCategorySupport.MyThreadLocal] (मूल्य [org.codehaus.groovy.runtime.GroovyCategorySupport$MyThreadLocal@644aa32b]) और के प्रकार [java.lang.ref.SoftReference] (मूल्य एक मूल्य [java.lang.ref.SoftReference @ 601e8f7d]) लेकिन वेब अनुप्रयोग को रोक दिया गया था जब इसे हटाने में विफल रहा। संभवतया मेमोरी रिसाव की कोशिश करने और उससे बचने के लिए समय के साथ थ्रेड्स का नवीनीकरण किया जा रहा है मार्च 26, 2013 11:56:26 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks SEVERE: वेब अनुप्रयोग [/HelloGrails-0.1] प्रकार की कुंजी के साथ एक थ्रेडलोकल बनाया [org.codehaus.groovy.reflection.ClassInfo.ThreadLocalMapHandler ] (मूल्य [org.codehaus.groovy.reflection.ClassInfo$ThreadLocalMapHandler@639ca35]) और के प्रकार [java.lang.ref.SoftReference] (मूल्य [java.lang.ref.SoftReference@3c0a60c4]) एक मूल्य लेकिन करने में विफल रहा इसे हटा दें जब वेब अनुप्रयोग रोक दिया गया था।

कृपया मेरी मदद करें ..............

धन्यवाद, रवि

वेब-इनफ / क्लासेस में लॉगिंग। प्रॉपर्टीज़ बनाओ निम्नलिखित सामग्री के साथ:

 <कोड> org.apache.catalina.core.ContainerBase। [कैटालिना] .level = जानकारी org.apache.catalina.core.ContainerBase। [कैटालिना] .handlers = java.util.logging.ConsoleHandler   

अपाचे को फिर से शुरू करें और स्टैकट्र्रेस को देखें

oauth - What sort of information is accessible from a user's Google account using OAuth2.0? -


If you receive a user to log in to your website using Google's authorization, What information can you get about? In particular, can you get their advertising preferences that Google collects?

I do not know of any Google APIs A user's ads preferences are shown. You can see your ads preferences with the manager, but the authorized person does not have an API to allow anyone else to see the preferences.

sublimetext2 - SublimeREPL to python -


How can I find a python for Python in Sublime Text 2? My use (Python 3.3 on Windows 7):

"default_extend_env": {"PYTHONPATH": "C: // Python 33"},

This

error message:

Error Message: P>

Error

I do not know that you still need it, but according to someone else may be

You have settings - & gt; Package Settings - & gt; SublimeREPL - & gt; Settings - Users

and add this option:

  {"default_extend_env": {"PATH": "{PATH}; C: \\ Python 27 "}}    

xml - How to use XPath to find the closest ancestor in a ancestor-or-self nodelist -


I have a structure with such recursive elements:

  & lt; A & gt; & Lt; P & gt; & Lt; A & gt; & Lt; / A & gt; & Lt; / P & gt; & Lt; A & gt; & Lt; P & gt; & Lt; A & gt; & Lt; C att = "val" /> & Lt; / A & gt; & Lt; / P & gt; & Lt; / A & gt; & Lt; / A & gt;   

If you are in the form of a C-node, there is $ currentNode, when I use Express

     

I get an anonymous list of nodes that match the expression What I need to always get the node to be closest to the tree, in the branches the deepest or highest level.

Unfortunately, I could not use XPath 2 max function:

     

Note that the closest node is not always above the reference, just above the top ...

Any suggestions appreciated!

I think you ordered the nodes Get to the former from the parent. Try the $ currentNode / ancestor-or-self :: a [1] to get the parent of c att = "val".

flash - What's the reason for interface to exist in Actionscript-3 and other languages -


What does this interface mean? Even if we apply an interface to a class, we have to re-declare its functionality every time we implement it in a different class, so what is the interface of the interface or interface in another language thanks < /p>

I agree with the answers originally posted so far, just a little bit to add.

To answer the easiest answer, yes, there are interfaces in other languages. Java comes to mind immediately, but I'm pretty sure that to create an interface in all OOP languages ​​(C ++, C # etc) There are some mechanisms involved.

As Jake has said, you can write the interface in the form of "contracts". What will be accomplished to separate the work. To say a fiction that I am working on A and You are working on C, and working on Bob B. If we define B as the interface for B, then we can define B quickly and relatively easily. B, Implementation), and all go on our way. I can assume that A to B can be a code, you can get it from C. You can code B, and when done with Bob B, we can simply plug it.

This Jugg1es point. The ability to swap the entire functional piece has been made easier by "dependency injection" (if you do not know this phrase, please Google). That's right, you create an interface that usually defines what will happen, say a database connector. For all database connectors, you want to be able to connect it to the database, and run the query, so that you can define an interface that says that the class "connect ()" method and a "duke (stringing) ) "Should be. Now, Bob explains that the MySQL writes the implementation for the database, now your customer says that we only pay 200,000 for new servers and they will run Microsoft SQL so that you can take advantage of it with your software Databases connector is needed.

In real life, I have a friend who runs meat packing / distribution company in Chicago. The companies that have created their software / hardware setup for scanning packages, and telling things for weight and exchange, that they have to upgrade to new OS / server and new hardware to keep them with software. Modularly not written, allowing them to maintain the rear compatibility. I have been in this boat long ago, telling someone that XYZ needs to upgrade to get ABC functionality which will make my job easier by 90%, in any way, in the real world, guess People do not always use these things and it can cut you in the ass.

jquery - Why doesn't this work - jsonp and REST Easy? -


जेएस कोड

  & lt; html & gt; & Lt; शीर्ष & gt; & Lt; script src = "http://code.jquery.com/jquery-1.9.1.min.js" & gt; & lt; / स्क्रिप्ट & gt; & LT; स्क्रिप्ट & gt; $ .getJSON ("http: // localhost: 8080 / gbsshop / rest / auth / test / xyz? कॉलबैक =?", फ़ंक्शन (डेटा) {चेतावनी ("52");}); & Lt; / स्क्रिप्ट & gt; & Lt; / head & gt; & Lt; / html & gt;   

आराम से आसान तरीका

  @GET @ POST @ पथ ("/ test / {param}") @ उत्पाद ({MediaType.APPLICATION_JSON}) सार्वजनिक स्ट्रिंग रिटर्न मेसेज (@PathParam ("परम") स्ट्रिंग msg) {System.out.println ("~~~~~~~~~~~~~" + msg + "~~~~~~~~~~~~ "); वापसी "हिल्लो" + msg; }   

मुझे लगता है कि सर्वर को कॉल मिलता है लेकिन ब्राउज़र "अनचाहे सिंटेक्स त्रुटि: अप्रत्याशित पहचानकर्ता" के साथ विफल रहता है

किसी भी मदद की सराहना की जाती है। समय के लिए धन्यवाद।

3.x संस्करण में बॉक्स से बाहर आना आराम करें: < Blockquote>

यदि आप जैक्सन का उपयोग कर रहे हैं, तो Resteasy में JSONP है कि आप प्रदाता के org.jboss.resteasy.plugins.providers.jackson.JacksonJsonpInterceptor (Jackson2JsonpInterceptor जोड़कर अगर आप जैक्सन 2 प्रदाता का उपयोग कर रहे हैं) को जोड़कर चालू कर सकते हैं की तैनाती। अगर प्रतिक्रिया का मीडिया प्रकार है json और कॉलबैक क्वेरी पैरामीटर दिया गया है, तो प्रतिक्रिया कॉलबैक पैरामीटर द्वारा परिभाषित विधि की विधि कॉल के साथ एक जावास्क्रिप्ट स्निपेट होगी। उदाहरण के लिए:

GET / resources / stuff? Callback = processStuffResponse इस प्रतिक्रिया का उत्पादन करेगा:

processStuffResponse () यह jQuery के डिफ़ॉल्ट व्यवहार का समर्थन करता है।

आप कॉलबैक पैरामीटर गुण को सेट करके कॉलबैक पैरामीटर का नाम बदल सकता है।

हालांकि ऐसा लगता है कि यह

इसलिए foo ({"foo ":" बार "} foo ({" foo ":" bar "}) के बजाय गाया गया है और इसका कारण" अनचाहे सिंटेक्स त्रुटि: अनपेक्षित पहचानकर्ता " त्रुटि

मैंने एक ठीक से एक submimtted है और उम्मीद है कि यह अगले रिलीज में मिलना चाहिए 3.0.12

मुझे पता है कि इस qustion बहुत पुराना है, लेकिन यह पहले पृष्ठ पर दिखाया गया है जब आप resteasy jsonp समस्याओं की खोज करते हैं, तो मैंने इसे अपडेट करने का निर्णय लिया

php - include works only when file is in same directory -


I do this site which I am doing when I include a php file from the same folder, But when I

  & lt ;? Includes Php ('/ ioanblog / appstore / header.php') ;? & Gt;   

This does not work or

    

This is not working either.

If all the header are holding a style sheet and Piwik code, it will also keep navigation. > Enter image details here

Read on the relative path.

If a path is defined ??? Whether full (starting with a drive letter or on Windows, or on the / Unix / Linux system) or relative to the current directory (.or ..) ???? The included_path will be completely ignored, for example, if the file name starts with somebody, the requester will look in the parser to find the file in the original directory.

Are you using / ioanblog / â ?? Which is a Full path I suspect on your site / var / www / public_html / ioanblog / â ?? | or / home / user / ioanblog / â ?? | or something similar, no in / ioanblog / â ?? | You should first create a relative in place of a full path instead of / for the actual file you have .. / contents / header.php < You may have to go "up" in the original directories such as / code> or ../../content / header.php .

Because it should probably be ../../ header.php . But first make sure that you understand the absolute / relative path!

You may also want to read the full paths to change the 'relative path'.

c# - How to split a string at a . to parse to an integer from user input? (ex. IP Address that will be formatted with the . already in it) -


  स्ट्रिंग strSeverIP = Console.ReadLine (); स्ट्रिंग सर्वरआईपीएड्रेस = स्ट्रिंग। स्प्लिट ("।", एसआरएसआईआईपीआईपी);   

मैं इस स्ट्रिंग को सर्वर पते की अवधि में विभाजित करने की कोशिश कर रहा हूं ताकि मैं प्रत्येक स्ट्रिंग को पूर्णांक में पार्स कर सकूं। इन पूर्णांक को तुलना के लिए टेक्स्ट के स्थान के रूप में एक पता स्वरूप में नंबर के रूप में डाला जाएगा। String.Split "सर्वोत्तम अतिभारित विधि मिलान 'स्ट्रिंग के साथ त्रुटि को बरकरार रखता है। नमूना (स्ट्रिंग [], सिस्टम। स्ट्रिंगप्लेट ऑप्शन) के पास कुछ अमान्य तर्क हैं।" मैं नहीं देख रहा हूँ कि समस्या कहाँ है मैंने उदाहरणों को ऑनलाइन देखा है और अभी भी समस्या नहीं मिल पाई है उन लोगों के लिए धन्यवाद जिन्होंने इस समस्या पर काम किया है और मैं आपके धैर्य के लिए धन्यवाद करता हूं। मैं सबसे अच्छा फ्रैसर नहीं हूं और मुझे नहीं लगता कि जब मैंने नाराज़ हो तो समस्या की कोशिश करने के लिए मैंने क्या किया है। आपके धैर्य के लिए फिर से धन्यवाद।

यदि स्ट्रिंग एक आईपी पते है, तो IPAddress वर्ग का उपयोग करना बेहतर है : <पूर्व> स्ट्रिंग inputStr = "10.30.0.72"; System.Net.IPAddress ipAddress; अगर (System.Net.IPAddress.TryParse (इनपुट एसआरआर, आईपीएड्रेस आउट)) {बाइट [] एड्रेसबिट = आईपीएडडर। गेटएड्रेसबेट्स (); }

यह पता देगा [4] = {10, 30, 0, 72}

How to find out if a string is a PHP regex? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 10 उत्तर

    क्या कोई तरीका है यह, @ पेग_मैच पर त्रुटि नियंत्रण ऑपरेटर का उपयोग किए बिना? :)

    क्योंकि PHP को एक चरित्र के बीच पैटर्न लिपटे जाने की आवश्यकता है, मैं इसे इस तरह से करने की सोच रहा था:

    1. पहले अक्षर प्राप्त करें
    2. इस वर्ण के साथ इस वर्ण का आखिरी अवसर ढूंढें:

        $ rpos = strrpos ($ स्ट्रिंग, $ स्ट्रिंग [0]); संशोधक सूची प्राप्त करें:  
        $ mods = substr ($ rpos, strlen ($ स्ट्रिंग));    
    3. अगर वापसी लौटा है, अन्यथा regex वैध प्रतीत होता है।

      यह समाधान कितना विश्वसनीय है? क्या कोई बेहतर है?

      मैं हमेशा Symfony2 खोजक घटक में उपयोग कर रहा हूं:

        अगर (preg_match ('/ ^ (। {3,}}) ([imsxuADU] *) $ /', $ expr, $ m) {$ Start = substr ($ m [1], 0, 1); $ End = substr ($ m [1], -1); यदि (($ start === $ end & amp;! Preg_match ('/ [* * [: alnum:] \\\\] /', $ start)) ($ start === '{' & Amp; $ end === '}')) {// यह एक regex है! }}    

MySQL and Java - throwing exception when inserting into the table -


I am a new MySQL user who is trying to write a program that manages the database through Java.

Code> User with the following attributes: | USERNAME | EMAIL | ROLE | , where is the USERNAME key and the remaining attributes are NOT NULL .

Let's say, I enter user , because there is a lack of primary keys on USERNAME , MySQL should throw error. How will this error be thrown and how can I catch it in Java? Do I need to write the stored procedure to throw errors, or is this capability even in the INSERT INTO statement?

If the primary key is violated then SQLException with that message Things that will be thrown into the name of the compulsion of infringement can be seen in dealing with your exception: try {// insert}} (if eclipse) E.getMessage ()) contains ("MY_CONSTRAINT_NAME")) / duplicate key} other {// some other error}}

an option to SQLException.getSQLState () Received SQLException.getErrorCode () to the Czech .

I would recommend that anyone who needs to be careful and usually needs to reduce the amount of JDBC code.

How does AngularJS $watch these cases in an ng-repeat? -


I think AngularJS sets some watches on ng-repeat. What type of clock is set at this point?

In addition to this, can anyone tell what happens in each of these scenarios? I want to know in this incident that I have many things, so the user is not being thrown out of the clocks which could have ended, I wrote it in another way.

one

    

two

  & lt; Div ng-repeat = "item in item" & gt; & Lt; Div & gt; {{Item.property | MyFormatter}} & lt; / Div & gt; & Lt; / Div & gt;   

three

  & lt; Div ng-repeat = "item in item" & gt; & Lt; Div & gt; {{Format (item.property)}} & lt; / Div & gt; & Lt; / Div & gt;   

Four

  & lt; Div ng-repeat = "item in item" & gt; & Lt; Div & gt; {{Item.something ()}} & lt; / Div & gt; & Lt; / Div & gt;  

every ng-repeat will set a $ watch < At Code> Items (if you look at it, most of this is the $ 100 Execution Function for the Watch Method). Each time an angular conducts, items will be checked by this clock function in items . (Note that in the Digest cycle, this clock function can be called more than once).

Each {{}} sets a $ watch if something like {code> item.property is inside of {{}} s, then it In the digestive cycle, dirty check is done at least once.

If a function is {{}} inside, then that function is said at least once in the Digest cycle.

I'm not sure about the x I filter , but it seems that the filter is called at least once in each digest cycle, even if x does not change.

Python Query 'module' object has no attribute 'test_func' -


I am trying to create a new module and method as part of the existing library.

The existing library is called Bly.Pht. I am creating a new * .i file in this directory which is named in Distance.py Distance.py I have:

  square distance: def __init __ (self, handle): self.handle = def def_func (t1, t2): print "executed correctly"   

from the dragon shell, I do the following: Bly.Pht imports distance from

  # This works fine dist = distance.test_func (input1, input2)   

error me Makes in the 'module' object, in particular Do not have 'test_func'

Is it possible to give any advice about this?

Many thanks.

You are not importing distance class, you are importing modules It consists of the distance class which can be fixed:

  dist = distance.Distance.test_fund (input1, input2)   

If you do not plan to include other functionality Distance.py , the class definition may be Bly / Pht / __ init __. There is a better idea to put in Py or Bly / Pht.py , in which case you could import it as you did it. (Unlike other languages, Python does not encourage each category of its own file).

salesforce - Do triggers before update and after update eliminate race conditions? -


I have an invoice item and payment object. I want to add payment to the invoice, as long as the amount on the invoice is zero Does not exist Outstanding balance on invoices must be less than zero.

I can create an updated trigger against checking the payment amount applied to the invoice, and throwing an AddError to prevent it from collecting data but, before I update or after the update Should use?

Can the situation of a race if two people pay 200 $ at the same time with an amount of $ 200 on an invoice, the outstanding amount on the invoice can be $ 200 for both triggers , And therefore both payments apply to the invoice, it will bring the total in the negative.

Update on the keyword in the docs.

Using it will ensure that the transaction will be completed before updating it to another user.

css - Blink not working in Chrome -


The problem is I am using blink in my application to display an error message That's working in Firefox, but not in Chrome. I do not know what the problem is, how can I work it in chrome?

Add the following code to your CSS file, > blink { -webkit-animation-name: blink; Webkit-animation-repetition-count: infinity; Webkit-animation-timing function: cubic bezier (1.0,0,0,1.0); Webkit-Animation-Duration: 1s; }

javascript - Loading a page via Ajax into Div Best Practice? -


I am using the method below to load a remote page in a device on this page. <> $ ('# results') preload ('www.myurl.com/results.html').

I'm curious, is it a bad practice to load a fully formatted HTML page into another page? My concern is more to load css or additional javascript, in which the other elements on the primary page can be overwritten.

I have not had any problems during my initial tests, I am not sure that this is the best practice.

To illustrate: If I have a primary page,

    

and the results.html code that looks like this:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "jquery.js" & gt; & Lt; / Script & gt; & Lt; Link href = "myResults.css" rel = "stylesheet" type = "text / css" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Header & gt; & Lt; H1 & gt; My results page & lt; / H1> & Lt; / Header & gt; ... & lt; / Body & gt;   

Will CSS and JS overwrite each other, or will page 2 serve as separate entities?

This will work fine and the browser will handle it properly:

< P> ... Browsers often filter elements from the document such as & lt; Html & gt; , & lt; Title & gt; , or & lt; Head & gt; element As a result, the elements obtained by .load () can not be exactly the same, such as the documents were recovered by the browser directly.

However, this is probably the best practice to specify the element in the returned HTML in which you want to insert:

  $ ('# remoteContainer '). Load ('www.myurl.com/results.html #containerDiv');    

c - Parsing simple HTML into tree -


I would like to ask what is the best way to parse a simple HTML code like this in a DOM node tree:

example tree

Here are some obstacles I am facing

  • The HTML code contains only the tag, no attribute, and I have to ignore the empty space
  • & lt; P & gt; , & lt; H1 & gt; , & lt; A & gt; etc.
  • I can not use libraries

    I was thinking about regex, but never tried it .. Any thoughts?

    Every node in the tree has this structure:

      typedef struct tag {struct tag * parent; Structure tag * next sibling; Structure tag * previous siphoning; Structure tag * firstchild; Structure tag * last baby; Four names; Four * text; } Node;    

    I know that it is not in C, but this presentation will give you some input You can deal with this problem efficiently.

    I have also written a very simple parser example in javascript (not in c, but hopefully you also know js) initial requirements, which means that Will not parse any features and will not automatically control the closing tag and many other things that should be handled according to HTML space. This will produce a parse tree in this format:

      {cn: [{tag: 'html', cn: [{tag: 'body', cn: [{tag: 'h1 ',' Cn: ['test']}, 'some text', ...]}]}]}   

    Here is the code and the saying:

    Meditation Please note that the white space is not ignored and will be captured in the text nodes.

      var html = '& lt; Html & gt; & Lt; Body & gt; & Lt; H1 & gt; Trial & lt; / H1> Some text & lt; Div & gt; & Lt; P & gt; Text & lt; / P & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; '; Var parseHTML = (function () {var nodesStack = [], i = 0, len = html.length, stateFn = parseText, parseTree = {cn: []}, alpha pnmx = / \ w /, currentNode = parseTree, text = '', Tag = '', new node; function parsag (token) {if (token === '/') {return parseCloseTag;} i--; // backtrack first tag character return parases open tag;} function parseCloseTag (Token) {If (token === '& gt;') {if (currentNode.tag! == tag) {'throw the wrong closed tag around' + I;} tag = ''; nodesStack.pop ( ); CurrentNode = CurrentNode.parentNode; return parseText;} assertValidTagNameChar (token); tag + = token; return parceltote;} function pars openag (token) {if (Token === '& gt;') {currentNode.cn.push (newNode = {tag: tag, parent node: turnodode, cn: []}); nodesstakes pius (presentnode = newnode); tag = ''; return Parascript;} Internet ValidTagNameChar (Token); Tag + = Token; Return Pars OpenTag;} Function Pars Text (Token) {If (Token === '& lt;') {if (text) {currentNode.cn.push ( Text); text = '';} return passes ETag;} text + = token; Return parascript; } Function assertValidTagNameChar (c) {if (! AlphaNumRx.test (c)) {throw 'invalid tag name on char' + i; }} Return Function (html) {for (; i & lt; len; i ++) {stateFn = stateFn (html [i]); } If (currentNode = nodesStack.pop ()) {Skip the unbalanced tags: '+ CurrentNotTag +' is never closed. '; } Return Pursuit; }; }) (); Console.log (parse HTML (HTML);    

javascript - jQuery is not working in JSP -


I am trying to write a code that receives value from the database and slidetoggle ()

This database is a .html file without recovery, which works perfectly:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" src = "c: \ user \ captive desktop \ jquery-1.9.1.min.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body onload = "handleChange ();" & Gt; & Lt; Label & gt; & Lt; Input type = 'checkbox' onchange = 'handleChange ();' & Gt; Check box & lt; / Label & gt; & Lt; Script & gt; Change the Function Handle () {$ ('. Slide Togglebox'). Slide Toggle (); } & Lt; / Script & gt; & Lt; Div class = "slideTogglebox" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; Input type = "checkbox" & gt; Judge 1 & lt; / Li & gt; & Lt; Li & gt; & Lt; Input type = "checkbox" & gt; Judge 2 & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

Then I wrote a .jsp file above the jQuery with database recovery, but in output it is showing only the retrieved values, but slidetoggle () The function is not working

javascript - What is the correct syntax for this? -


I am trying to fade the images at the top of an existing image when I do not overwrite the mouse over them Lets function for each image.

I currently have:

  & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('picture'). Mousecenter (function () {// fade in hover image $ $ (this.getAttribute ("name").) FadeIn (500);} ); $ ('.hovarimage') .mousewat (function () {// fade out hover image $ (this). FadeOut (500);});}); & Lt; / Script & gt; ... ... & lt ;! - Base picture - & gt; & Lt; Img src = "image1.png" square = "picture" name = "hoverimage1" & gt; & Lt; Img src = "image2.png" square = "image" name = "hoverimage2" & gt; & Lt; Img src = "image3.png" square = "image" name = "hoverimage3"> & Lt ;! - When the hover over the image appears - & gt; & Lt; Img src = "image1_glow.png" square = "hoverimage" id = "hoverimage1" & gt; & Lt; Img src = "image2_glow.png" square = "hoverimage" id = "hoverimage2" & gt; & Lt; Img src = "image3_glow.png" square = "hoverimage" id = "hoverimage3" & gt;   

Assume that CSS is already present so that the hover image is placed above the original image. What my code tries to do:

  • When the mouse enters "image1.png" it will get the name "Hooverime 1" name attribute
  • Then it's a Element with ID "Hoverime 1" by executing original $ ('# Hoverime 1') Fadein (500);

    But the problem name attribute does not contain "#", and I do not want to type "name =" # hoverimage1 "because it is confusing for ID. Now my function is $ (' 1). 'Fadein (500); which is not the correct syntax. Can anyone help me with this? What is "$" (This.getAttribute ())? anything else?

    If you have a # , then you can just add the wire: < / P>

      $ ('#' + this.name)   

    But I would use it if possible, element index for:

      $ ('Picture'). Mousecenter (function () ($ ('.other_imes'). Eq ($ (this) .index ()) .stop (). Feedin (500);}). Mouseout (function () {$ ('. Other_size'). Eq ($ (this) .index ()). Stop (). FadeOut (500);});   

    In this way, you do not need to type the properties of the original image in the id of the second image in name .

javascript - DOM Get Element Outside the HTML Tag -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 1 उत्तर

    नमस्ते मुझे कुछ बड़ी समस्या है कृपया मेरी मदद करें ..

    मेरे पास इस तरह की एक html संरचना है:

      & lt; html & gt; & LT; बॉडी & gt; & Lt; div id = "getInher" & gt; मुझे & lt; / div & gt; & LT; आइफ्रेम & gt; & LT; html & gt; & Lt; शीर्ष & gt; $ ('# क्लिकमे')। क्लिक करें (फ़ंक्शन () {// मैं #getInHere div को प्राप्त करने के लिए यहां क्या रखा जाना चाहिए}); & Lt; / head & gt; & LT; बॉडी & gt; & Lt; a href = "#" id = "clickme" & gt; मुझे क्लिक करें & lt; / a & gt; & Lt; / body & gt; & Lt; / html & gt; & Lt; / iframe & gt; & Lt; / body & gt; & Lt; / html & gt;   

    मुझे #getInHere पर कुछ जोड़ना होगा और मुझे नहीं पता कि कैसे कृपया मदद करें।

    धन्यवाद।

    jQuery:

      $ ('# clickme') क्लिक करें (फ़ंक्शन () {$ ('# getInhere')। अनुलग्नक ('पाठ');});   

    jsFiddle लाइव उदाहरण:

Building and deploying from a remote server with Capistrano -


I'm new to Capistrano and I'm struggling to get started. A brief summary of what to do:

  • GIT pull The latest code from our GIT repo, the union builder on the union build server matches the environment of the deployment environment . I want the code to be made here I do not want to make a binary deployment on a Mac laptop, for example
  • Compile binary on this machine.
  • Deploy it from this machine to all target machines.
  • To build the build, we can do all the SSH on a build user build machine.
  • The build machine is behind the gateway machine, not directly from the reach.
  • It is also a shared user in all deployment target machines and behind the gateway.
  • The deployed binary is single executable, and there is an init script on the target machines. After deploying binary and changing the symlink, restart the service through the init script.
  • Agent forwarding for all required SSH keys and all necessary functions.

    So it seems very simple in principle, but Capisano thinks and is a bit magical, as a result, I am not sure how to accomplish all this. It seems that it wants to check my code and copy it to remote machines, for example without first having to make it

    I think I need to ignore the default SmartTrans of Capistranos and just command it on a shell appropriate server in the pseudo code:

    • Gateway Through SSH Buildmachine "CD Repos & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; "SCP BuildMasin: Repo / Binary." Through SSI TargetM (S); & Lt; MV & amp; Simplic ;; Service Fu Restart "

      Is I also the right tool for the job? It seems that there is a lot like a rock climb like a square hole.

      Can anyone explain to me what the content of the Captivrano configuration files should be, and the cap command is run to complete it?

      BTW, I have Around -Pass searches and see the questions like and

      Old is old, but you do not know when a person needs it ...

      First and formost, idea that Capistrano may not be the right tool for the job you want to do this .

      He said, it is not impossible to complete what you expect. While large files are deployed and modified in projects (eg CSS / JS Miniature, JS Build etc.) I I want to avoid Receive, in your case, you may want to consider running a "deployment stocks" and configure it as a source Constrino.

    • Upload the resulting binary to the deployment repository
    • Your operation will look like this:
      • Run the local build with whatever device you need
      • Upload the resulting binary to the deployment repository
      • Castistano will connect to the application server, bring fresh binary from the repository, require any server-side work and symlink to "current"

        As a side-effect you can Deployed binary Yes, you are finished with the full history

mongodb - Using Mongo: should we create an index tailored to each type of high-volume query? -


We have two types of high-volume questions that look at documents related to a 5 characteristics: a date (LTE) Values ​​stored in an array, values ​​stored in another array, an integer (GT), and a float (GT).

In the second, these five characteristics include two more two.

Should we make two campus pointer, one for each query? Assume that each attribute has a high cardinality.

If we do, because every query contains many arrays, it does not seem that we can make pointer due to Mongo's restrictions.

Thank you!

The Index for the query after the first categories in the query significantly reduces the value of the additional index field < / P>

Conceptually, I find it best to think about fields other than sorting the small sub-tree index from the query. Before a large branch, the range chops, second small, third small etc. My general rule of thumb is only the first class of queries in the index.

Warning This rule is that additional fields in the index can be useful to assist in sorting the result back.

For the first query, I will create an index on two array values, and then the limitations are the most documents. As long as you can not close the range (LTE and GTE), there is no possibility of providing a high exclusion of the date field. It is difficult to tell without knowing the integer and the float domain.

If two additional properties of the second query also use categories in the query and do not have a significant high exclusion value, then I only work with one index.

Rob.

Using regex in Python 2.7.3 to search text and output matches -


I'm trying to complete what the title says. The program means to read the .txt file from the specified path and match the words specified in the code. This is what I have done so far:

  import source = open ("c: \\ test.txt", "r") lines = [] for the line in the source: line = Line ('answer', line): print 'found:', line   

As you can see, I'm specifying the word again using the answer 'answer' But it restricts me to a word. I know that there is a way to specify a list or dictionary word for search, but my attempt has failed. I think it is possible to make a list with something like this ...

  keywords = ['answer', 'error', 'what']   < P> ... but despite what I've read on this site, I can not include it properly in the code. Any advice or assistance with this is appreciated!  

If I want to make search case sensitive to PS, can I use it ...

  ". (* * * (* R *)   

The only way : import re source = open ("input", "r") line = [] keyword = ['answer', 'error', 'do'] # or list with OR Join in, '|', operator # again. I add it to the case-irreversible exp = re.compile ("|". (Keyword), again. For areas: line = Lainkstrip () lines Kappend (line) if rediscovered (XP line): print found '', Line

css - DIV order and Z-Index -


I found the right way to show my background image the way I want for my photography website. (Through the search of Stackworflow posts)

What I did in my code before and it got me with some minor edits However, now the menu or anything does not work properly.

Ex can not be clicked on the link at the top of my page

I think the background is covering the entire page and that is why I have 'background' 'Tried to remove the DIV and all this worked again, but the image of the background is no longer the situation and the way I want it too.

I think it is related to the Z index, can anyone help me fix this? And tell me why this is happening, so I can not move further into the code.

Here JSFold (easy to view / edit)

  body, html {font Origin: 11px; Font-family: Verdana, Helvetica, Ariel, sans-serif; Margin: 0 px; Padding: 0px;} #background {position: absolute; Top: 0 pixels; Left: 0 pixels; Hidden flurry; Width: 100%; Height: 100%; font-weight: bold; Font-size: 30px;} .cover {status: absolute; Width: 100%; Top: 0 pixels; Z-index: -1;} # container {display: block; Clean both; Text align: center; Padding-top: 40px; }. Thumb {text-align: left; Display: inline-block; Margins: 5px; Padding: 10px; Background color: RGBA (102102102,0,5);} #Menu {top: 0; Left: 0; Margin: 0; Padding: 0;} # menu ul {list-style-type: none; Left: 0; Correct: 0; Status: Completed; Display area; Height: 33px; Margin: 0; Padding: 0; Top: 0; Left: 0;} # menu lee {display: block; Swim left; Margin: 0; Padding: 0;} # menu taken {float: left; Color: # A79787; Text-decoration: none; Height: 24px; Padding: 9px 15px 0; Font-weight: normal;} #Menu Li A: Hover {Color: #FFF; Background color: RGBA (102102,102,0.5); Text-decoration: None;} Toggle {Float: Right; Color: # A79787; Text-decoration: none; Height: 24px; Padding: 9px 15px 0; Font-weight: normal;} # toggle a: hover {color: #fff; Background color: RGBA (102102,102,0.5); Text-decoration: none;} & lt; Body & gt; & Lt; Div id = 'background' & gt; & Lt; Img src = 'http: //i.imgur.com/9dOAPlS.jpg' square = 'cover' / & gt; & Lt; / Div & gt; & Lt; Div id = 'navigation' & gt; & Lt; Div & gt; & Lt; Ul id = 'menu' & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Album & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Contact & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; Div id = 'toggle' & gt; & Lt; A href = '#' & gt; Hide all & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = 'container' & gt; & Lt; / Div & gt; & Lt; / Body & gt; Modify the following styles (I  z-index  to  .cover  to  #background ):  
  #background {position: absolute; Top: 0 pixels; Left: 0 pixels; Hidden flurry; Width: 100%; Height: 100%; font-weight: bold; Font-size: 30px; Z-index: -1;} .cover {position: absolute; Width: 100%; Top: 0 pixels;}   

When a full ly is located, it sits on other elements. So in your case, you tried putting offset the z-index on .cover . This will not work because .cover is a child of #background , and hence it is related to z-index #background (which already sits above everything).

ios - Why VideoPlayerViewController can be presented from iPad but not from iPhone? -


"itemprop =" text ">

I have a universal app and 2 storyboard (for iPad and iPhone). In a view controller, when I tap a button, a video is playing. I am doing that with:

  - (zero) playMoviesForItems: (NSArray *) shopItems {VideoPlayerViewController * movieplayer = [self.storyboard instantiateViewControllerWithIdentifier: @ "videoPlayerController"]; [Self presentViewController: animated movieplayer: not complete: zero]; [Movie player playmovie's force: shop items]; }   

In the iPad, everything works fine but in the iPhone, I can hear the sound of the film, but there is no visible sight. This is not shown in the iPad.

So where am I? Is this a good way to present a video controller?

I think that the video player is not set to frame your frame properly. You use the appropriate class Use video like or the current modal view controller. I am able to play the video in the iphone player. How come it will not work for you? I do not hope to make apple junk change.

iphone - messaging API in IOS -


This question is already an answer here

  • 18 answers

    I am an iOS developer For the demanding service in the ios messaging API, I did run through the internet and found that functionality in other potential domains such as Java, php, android but not in iOS Sector.so, you send messages to me for You can tell the solutions for the SMS API, other mobile

    Note that you do not automatically update user information You can send SMS without You can include the user & amp; After that it should work ...

    Sending an SMS to iOS is very simple. You will need action, we have 2 representative methods below - to create one's own SMS; . Other When the control comes back to you after the user's operation

      - (zero) SendSMS: (NSString *) bodyOfMessage recipientList: (NSArray *) Recipients {MFMessageComposeViewController * Controller = [[[ MFMessageComposeViewController Alloc] init] autorelease]; If ([MFMessageComposeViewController canSendText]) {controller.body = bodyOfMessage; Controller Recipient = Recipient; Controller MessageCompany = self; [Self current model view controller: animated controller: yes]; }} - (zero) messageComposeViewController: (MFMessageComposeViewController *) controller didFinishWithResult: (MessageComposeResult) Results {[self-dismissModalViewControllerAnimated: Yes]; NSLog (@ "Message Sent") and NSLog (@ "Message Failed"}}      P> To get you started online Online tutorials are full codes here Hope it helps ...   

ruby on rails - How do I add js within another directory in my assets/javascripts/ to the assets.precompile? -


मेरे एक विचार में, मेरे पास यह है:

  & lt;% = javascript_include_tag " पिग्गीबाक_विरियंट्स / पिग्गीबाक_विरिंट "% & gt;   

जिसमें piggybak_variants.js फ़ाइल शामिल है।

मैंने इसे अपने production.rb

  config.assets.precompile + =% w (piggybak_variants.js)   

लेकिन मुझे अभी भी हेरोोक में एक त्रुटि मिल रही है जिसके बारे में उस फ़ाइल को पूर्व-संकलित नहीं किया जा रहा है ।

मैं इसे कैसे ठीक कर सकता हूं, *। Js करने के अलावा? ऐसा लगता है कि एक स्लेज हथौड़ा का उपयोग करना है।

आपके शामिल पथ में मूल निर्देशिका अनुपलब्ध है। यह काम करना चाहिए:

  config.assets.precompile + =% w (piggybak_variants / piggybak_variants.js)    

multithreading - Couchbase Java getAndLock confusion -


I have two questions. I have a multithreaded Java application what happens when a thread gets call and lock on a key , And immediately after that there is another thread call and lock on the same key?

  1. Will the second thread lock automatically until the first thread is released? Or, will the function call return with blank CAS value? Or, will it throw an exception?

  2. If the first thread clears the key (the entire document), what will happen to another thread?

    P>

    It says that it will try to get the lock for three seconds and then return OperationTimeoutException . (As Mikvid tells) If a lock is already present, then it should be returned immediately and indicate that the key is present in the error message, but the documentation does not say which exception / error is there in this case.

    For the second question, if the first thread removes a key, then it should be returned as if that key has never existed; In this case null .

DotNetNuke integrated security to SQL Server -


I am installing DotNetNuke 7.0.4 for Windows 2008 R2 + IIS 7.5 + SQL 2012 machines. The initial database is trying to use integrated security on the setup page but always receives the message the SQL login fails. The SQL Server log shows the use of DN [domainname \ machinesname $] to connect to SQL Server. I created this account on SQL but still get this error message. (A login match can not be found).

How can I resolve this issue? If I want to use Advertising Certification for my site, then do I have to use this integrated security?

Thanks

The application pool IDnet for the application pool of your web application / website Change the name of the domain name that you want to use. Find a link below to navigate to where.



css - rgba is not working, when i had it working 5 minutes ago -


This is for my site, I need text that you can not see through the background image Which can be seen. It is not working on chrome or firefox; RGB will not work either, does it just say an invalid asset value? Why is it

This is my CSS:

  #top_box {background: rgba (208,206,195, .5); Status: Relative; Height: 400px; }    

I am trying to use it and it seems that < Code> RGBA and the left parenthesis, instead of:

  Background: RGBA (208, 206, 195, .5);   

Try ...

  Background: RGBA (208,206,195, .5);    

ruby on rails 3 - D3 Graph Example Using In Memory Object -


It seems that it should be simple, but I have really spent hours without any success.

On the D3 graph example. Example Graph Uses a local file called Jason, I have set up a rail app for the service of a similar graph, though I do not want to write a JSON file. Instead, I generate nodes and links in one object such as:

  {"nodes": [{"node_type": "person", "name": "damian", "id "{{" Source: ":" demian_piners "," "" "{" node_type ":" person "," name ":" grant "," id ":" grant-owner "}}}," link " Goal Now when I present the D3, call me  d3.json ("need to update graph.json)", function (jsn) {...});  Instead of local file (or url) in my in-memory ob For reference, I have tried to break my HTML / JavaScript, for example, for example I set the  var dataset = & lt;% = raw (@myInMemoryObject)% & gt ;; / /> , And he works to work (I had a warning on the dataset), although I can not get the D3 code to use it.  

I use my in-memory How can I change the d3.json call to use the object?

Thanks,

> Damien

Your idea of ​​using , For example, var dataset = & lt;% = raw (@myInMemoryObject)% & gt; ; The right way to go is, but you need to present your object in the correct format.

Nodes in the nodes node array specified in the link require numerical reference. For the first time, 1 for the second

  var json = {"nodes": [{"name": "damian", "id": "a"}, {"name" : "Link": ["source": 0, "target": 1, "value": 1}]}    P> or links to real objects that create nodes themselves:  
  var a = {"name": "damian", "id": "a"}; Var = "name": "Bob", "id": "b"} var json = {"nodes": [a, b], "links": [{"source": a, "target": B, "value": 1}]};   

The relevant discussion is given here:

Here the example:

Django Userena Customization -


I recently installed Django Userena on my Linux Apache server.

After fixing some errors, I started looking through the documentation. However, after searching for documents and many Google searches, I still do not know how the presence of pages could change! For example, how do I change the appearance of signin pages, signup pages, etc.? I know that each userena template is expanded to base.html , but where do I go from there?

I'm probably missing something very simple, so please forgive me, so the answer to this question is very much. itemprop = "text">

This is sign-in Userena () signature method -

  DEF sign-in (request, auth_form = AuthenticationForm, TEMPLATE_NAME = 'userena / signin_form.html', redirect_field_name = REDIRECT_FIELD_NAME, redirect_signin_function = signin_redirect, extra_context = none):   

As you can see, there is a template_name method that holds the template space. You can override it.

  URL (r '^ signin /', 'userena.views.signin', {'TEMPLATE_NAME' - in your  urls.py , you use it like this You can create  signin.html  inside your  templates: 'signin.html'}, name = "sign in"),   

Extend page folder and base.html . Returns the signin view login form in a variable named form . You can see. You can use the form on your template signin.html on {{form.as_p}} . If you can follow userena.forms, you can also format each field individually AuthenticationForm . Again, check that you can do the same for any scene. The user has given permission to impose this way.

When there is a doubt, read the source code. :)

javascript - Converting JS RegEx To PHP Not Working -


मुझे यह JS / jQuery था:

  $ (this) .text () प्रतिस्थापित करें (/ ([^ \ s] +) /, दिन);   

जिसने mar / 26/2013 05:00 pm जैसी एक पंक्ति ली और उसे 05:00 PM में परिवर्तित कर दिया।

लेकिन यह PHP किसी कारण के लिए उचित प्रतिस्थापन नहीं करता है:

  $ time = preg_replace ('/ ([^ \ s] +) /', '', $ dateStr);   

इसके बजाय मुझे एक स्थान वाली स्ट्रिंग के साथ छोड़ दिया गया है।

मैंने अपने सभी कोड को पहले से ऊपर की रेखा तक पूरी तरह बदल दिया। $ (this) .text () में $ dateStr के समान मूल्य है।

यदि आपका $ dateStr उस प्रारूप में हमेशा रहेगा और आप केवल 5:00 बजे घटक चाहते हैं, तो कोशिश करें:

  $ dateStr = "मार्च / 26/2013 05:00 पूर्वाह्न"; $ समय = विस्फोट ("", $ dateStr); प्रतिध्वनि $ समय [1]। ""। $ समय [2];    

ios6 - How to get list of existing entities(tables) in core data -


How to get a list of existing entities (tables) for a particular schema (managed object model) The concept has begun implementing and is stuck with these points, please

something like: SELECT COUNT (*) from info_schema.tables WHERE table_schema = 'dbName';

Thanks

You should read. To obtain organizations for a specific NSManagedObjectModel , you will use one of the following (assuming that you have NSManagedObjectModel named objectModel Is):

  NSArray * myEntities = [objects model entities]; // The array of all entities in the model   

or

  NSDictionary * myEntities = [Object Model Entry Binam];   

You can read more in.

It seems that you are coming from a SQL background (like I was). Core data has many concepts that are different - sometimes to get better, once you understand them, sometimes you need more work than a simple SQL statement, I think SQL is important to access core data without "stuff" and behave in the same way as if you are using a database for the first time - it will help to avoid frustration.

java - Passing Data From an Activity to a Fragment in Android -


I am very new to Java and Android programming. I am trying to explain that one activity is the variable How to pass a bundle that uses the setrent view in an XML file which is linked to a class that extends the list. Actually, I want to be able to access data from the first activity through the piece that has reached into other activity. I am trying to do research to take advantage of it so far, please forgive me if the answer is already present.

I have an activity called log, which does the following:

  intent = new intent (this, ListActivity.class); Bundle varBundle = new bundle (); VarBundle.putString ("companyKey", companyKey); VarBundle.putString ("techID", techID); VarBundle.putString ("user id", userID); VarBundle.putString ("STARTDATE", STARTDATE); Intent.putExtras (varBundle); StartActivity;   

In ListActivity.java, I still have this:

  Activity activity of the public category list {is spread to the public string company; Public string tech ed; Public string user id; Public string startup; @ Override protected void saved create (bundled Instansstet) {Suprknkret (saved Instensstet); Bundle Wars = Friendly (). GetExtras (); CompanyKey = vars.getString ("company"); Tech = vars.getString ("techID"); UserID = vars.getString ("userID"); StartDate = vars.getString ("Start"); SetContentView (R.layout.fragmentlist); } @ Override Public Boolean On Crate Option Menu (Menu Menu) {// Enhancing Menu; It adds the item to the Action Bar if it exists GetMenuInflater (). Flood (R.menu.list, menu); Back true; }}   

I have set the content view to fragmentlist.xml:

     

Fragmentlist.xml is attached to the order list.java. This is where I want the data of the bundle in ListActivity.java to be able to enter the list.

  Public Class OrderList Extends LiftFragment {// This is where I want to access the categories included in the list. Java public order list () {super (); // Todo Auto-Generated Constructor Stub} @SuppressWarnings ({}) @ Override Crate on Public Zero (Bundle Saved InstantState) {// Todo Auto-Generated Method Stub Super. Connet (Saved Instantstate); }}   

Is this possible? Again I apologize if this is a fraudulent question but I have not yet received the answer.

Thank you in advance.

You can call (from within your piece)

  String company's name = (GetActivity (ListActivity)) CompanyKey; String technique id = (getActivity (list activation)). TechId; Letter userId = (ListActivity) getActivity ()). UserId; String StartDate = (ListActivity) getActivity ()). StartDate;    

asp.net mvc - How do I setup a route to capture all subsequent URL segments after the controller as a parameter? -


I want to set up a route to the following form (such as in an HTTP handler)

/

I am new to MVC routes, but I want to set up a path where this is basically

MyController / {UrlSegments}

For example, MyController / assets / images / logo.png will find my controller and pass the "property / images / logo.png" as the parameter in the path

If you like your Setting mapping:

  routes.MapRoute (name: "default", url: "{controller} / {* stuff}", default: new {controller = "default", verb = "Default Action"});   

Then it will hit when you press

  / default / one / two / three / four   

DefaultController will have the default action and you will need a string parameter that will be the name of the item

  one / two / three / four    

animation - Javafx 2 - multiple view in a anchorpane -


I would like to show an animation with two views - Overview and close-up view in the same Aanchaparpen.

The overview will show the remaining trucks from B to Point A on behalf of a point and the Close-up View will appear which is happening on point B (i.e. the discharge of cargo etc ...). When we start the animation, both thoughts should be in action.

I'm not sure how to apply it in Jawfx-2, I have created an Anchorpan, GlobalPane, and have two children - (Anchrapane) OverviewPan and (Anchran) Close Weepens. I'm working on the overview pane. But to implement the close up, can we copy overviewpans, zoom it using the scale method, and present it in ViewPane?

Thank you:

Ps: I have found this link which shows the glass:

However, what is the best way to do this?

Itemprop = "text">

I did not find anything about the same anchoparpane twice about mirroring / copying / mirroring. Therefore, I personally had to resort to coding in my program.

html - How to create a button from an image with no click animation? -


I have an image that I want to use for a button, and currently the button is just a And is lieutenant; A & gt; When a tag with a single image and a click event is clicked, it does not make a slightly depressed animation that looks like it drowns in the page.

I use this behavior as the actual & lt; Input & gt; ?

  & lt; Button & gt; & Lt; Img src = "http://www.placekitten.com/150/150" width = "150" height = "150" /> & Lt; / Button & gt;   



Error: could not find function ... in R -


I am using R and tried some.function but I got this error message :

  Error: The function `some.function` could not be found   

This question comes very regularly. When you get a error: the task can not be found in R , how can you solve it?

Thank you in advance for your help.

This is a question of a frequently asked question, so please be possible as possible. Answer is the answer of a community, so if you think something is missing, then do not hesitate to edit.

This question is approved on the meta:

There are some things that you should check:

  1. Have you written the name of your function correctly? Names are case-sensitive.
  2. Have you installed the package that contains the function? install.packages ("thePackage") (This should only be done once)
  3. Have you added that package to the workspace? is required (package) or library (package) (this should be done every time you start a new R session)

    If you are not sure which package the function is located in, you can do a few things.

    1. If you are sure that you have installed and attached / loaded the correct package, then type code to get an info box ("some.function") or ?? some. Find the function, which can tell you what this package is about.
    2. If you do not have any clue about the package, you can use findFn and GetAnywhere
    3. RSiteSearch ("some.function") or in the sos package according to the search with alternative ways of finding the function.

javascript - ASP.NET User Controls Popup -


I am currently developing a fix for a website at work. It was created by another developer before coming to the company and so I am having some problem understanding about how his code works.

Originally here is the summary: There are pages called parents. Aspx, ChildControl.ascx, and MyPopup.ascx are some divisions in ChildControl.ascx that appear depending on where it will be used. For this matter we say that we have a lamp and a debug what the page is doing now. This is whenever ParentPage.aspx loads, it loads the DivC from the ChildControl.ascx page. Everything in the lamp is loaded on the webpage. Now there is a criminal in Diva, let's say that we have 3 rows which are generated in each of the items, there is a button, which is a Divi popup when it is clicked. Then Dob changes with pop-up data depending on which the repeater was clicked. This is the webpage's current design. Now my problem is on this, we have a new requirement where when a button is clicked inside the divab, we will see MIPOP. Popcup needs to popup.

I do not know that everything is fully understood, but this is how the current website is working and that's what the client needs to look like now I'm starting to flip out Because I do not know exactly where and how to start, we currently use javascript on website design.

It seems that you need to load an iframe inside the divab button is clicked. Iframe will call the ASPX page, in which the ASXX file is just enough, and whatever ASCX should drink data in the query string parameter.

Set the pid of a searched running process (ps -ea | grep }) in shell -


I am creating a shell script, where I run a process and I like this process as ps -ea Searching for Grep & lt; Search_term & gt; And I can get this process okay, but I want to set the PIN of that process in a variable in my shell script, then wait till the end of that process. I like this type of thing:

  pid = ("ps -ea | grep    



html - Regex to find a string within two strings but excluding anything that starts with http? -


I am currently using (? Lt; = href = ") (. *?) What is basically what I am doing? # Piece - [0- 9] "& gt;) which gives something between the href =" and # section - [any number between 0 and 9] " I want to exclude things like href = "http: //blahblah.com#fragment-1" or href = "https: blahblah.com # fragment-1", then I (. * ?) How can I change

thanks

  (? & Lt; = href = ") (?? https? :) (. *?) (? = # Piece- [0-9]" & gt;)   

Besides,.

android updated system app is not granted new permission -


मेरे पास एक ऐप है जो कि / system / app

जब मैं एक सिस्टम अनुमति जोड़ता हूं, जैसे android.permission.REBOOT , और सिस्टम ऐप में एक अपडेट स्थापित करते हैं, तो अद्यतित ऐप को अपडेट में नई अनुमति नहीं मिलती। < / P>

जब मैं एक गैर-सिस्टम अनुमति जोड़ता हूं, जैसे android.permission.INTERNET , ऐप करता है नई अनुमति देखें। < पी> हम यह समझने की कोशिश कर रहे हैं कि क्या इस बारे में सिस्टम ऐप को ओटीए बिना चारों ओर ले जाने का एक तरीका है

संपादित करें: यहां बताया गया है कि कैसे हम पैकेज को स्थापित कर रहे हैं,

  class & lt;? & Gt; [] installTypes = नया वर्ग [] {Uri.class, IPackageInstallObserver.class, Int.class, String.class}; InstallMethod = pm.getClass ()। GetMethod ("installPackage", installTypes); ... installMethod.invoke (pm, नया ऑब्जेक्ट [] {एपीकेफाइल, प्रेक्षक, INSTALL_REPLACE_EXISTING, नल});    

मेरे अपने प्रश्न का उत्तर दे रहा है ...

सिस्टम ऐप्स नहीं कर सकते एक नवीनीकरण के माध्यम से नई अनुमतियां दी जायेंगी। कारण, मुझे लगता है कि अगर आपने कभी भी सिस्टम ऐप को तंग कर दिया है, तो आप इसे अपग्रेड कर सकते हैं और आप चाहते हैं कि कोई भी अनुमति जोड़ने के लिए, जिसमें सभी खतरनाक अनुमतियां शामिल हैं, जो केवल सिस्टम ऐप्स के लिए दी जा सकती हैं।

आप चाहते हैं कि आपके सिस्टम ऐप को एक नई अनुमति हो, आपको ओटीए करने की ज़रूरत है, या अन्यथा एपीके के नए बिट्स को / system / app में प्राप्त करें।

java - Where does the server side of programs run? -


If I had a program and many clients were connected to only one server, then a good place to run from the server Will be

Is there any way to run the server side of the program from a website, because websites are servers and can always run the program? Running a server from a home computer does not sound like an option, which is due to obvious reasons most people are selected. For example: where a small indie online game will run its server side?

If I had a program and many clients were connected to only one server then Is there a good place to run the server from?

A computer?

Is there a way to run the server side of the program from a website, because websites are servers and can always run programs?

A website is a type of server running, not a server.

Do not sound like an option to run a server from a home computer That is, most people will have to choose due to obvious reasons.

There is no clear reason why many web services have hosted themselves, and have been created with internet service providers that are not in the datacenters. I host many services at home And they are accessible from the internet.

For example: How will Indie play a small scale online game from my server?

You have several options:

  • A server (with sufficient bandwidth and low latency) in your home / workplace / garage, with sufficient internet connection
  • A virtual server is hosted in a datacenter service provider,
  • A virtual server such as AWS / EC2, Google Apps, Azor ...
  • A dedicated server is a datacenter,
  • Grapes of dedicated servers and their cache etc.
  • ...

    It all depends on your money by working with many engineers!

SSL Certificate elucidation -


Sorry for the stupid question, but:

If I want to develop a website Login and Registration Purpose for https) and I want to test that I have to buy an SSL certificate or can I make it home for personal purposes?

Thank you to all

You must configure the application server for SSL The application server has different configurations that your application server should first choose.

Try this:



time - Display a countdown for the python sleep function -


I am using time.sleep (10) in my program. When I run my program, can I display the countdown in shell?

  & gt; & Gt; Run_my_program () worked, now sleeping for 10 seconds   

and then I want to do it 10,9,8,7 ....

Is it possible?

You can always do this

  # print some content ' Worked, sleeping for 10 seconds now 'I am in xrange (10,0, -1) : Time.sleep (1) Print I   

This snippet has a little disturbing feature, which is printed on each line on a new line, 10,0, -1) for i

  Import Sims: time.sleep (1) sys.stdout.write (str (i) + '') Sys.stdout.flush ( )    

windows runtime - How to does WindowsRT Data-binding do type conversion without TypeConverterAttribute -


In the previous question / answer I have learned how to bind data in Windows Phone string < I now see the same problem in the WindowsStore apps using Code> TypeConverterAttribute -> View

using ImageSource where TypeConverterAttribute .

If I use WinRT data-binding then explicitly the data binding layer is still managed to make the right conversion. Says:

This behavior is based on the underlying type conversion that processes the string as a URI, and makes a call equal to the bitmapimage (Uri) constructor.

However, I can not see any meta data anywhere how it converts.

I am trying to make my data-binding implementation - so it is able to think what WinRT would be useful.

Is there a qualified metadata prompt somewhere that tells Xaml data-binding to see which conversion applies? Or is this string to the ImageSource conversion somehow cooked in run-time, hidden from the CLR layer?

If it is hidden, can I cache my data binding implementation?

I discussed this question via WinRT devs (Tim Heuer) via Twitter

There was a basic summary of this conversation:

  • There is nothing like WinRT TypeConverterAttribute
  • In a small number of WinRT controllers internal conversion Li>

django - How do you place a variable inside a template tag's argument? -


Django मीडिया के साथ मैं निम्न कर सकता हूँ: भाषा <%> LANGUAGES% } & Lt; script type = "text / javascript" src = "{{MEDIA_URL}} ऐप / जेएस / jquery.ui.datepicker। {{Language.0}}। जे एस" & gt; & lt; / script & gt; {% Endfor%}

अब, मैं स्थिर फ़ाइलों पर स्विच करना चाहता हूं हालांकि यह स्पष्ट रूप से काम नहीं करता है: भाषा <% l भाषा में%}

क्या मैं हासिल करने की कोशिश कर रहा हूं?

[मैं निरंतरता के लिए स्विच करना चाहता हूं, क्योंकि व्यवस्थापक और मैं उपयोग कर रहा हूँ कई तीसरे पक्ष के क्षुधा स्विच है इसके अलावा, मैं चिंतित हूं कि भविष्य में कुछ समय से डीजेंगो मीडिया को हटा दिया जाएगा। ]

आपके पास दो विकल्प हैं सबसे पहले एक, जैसा कि सुझाव दिया गया है, {{STATIC_URL}} : भाषा में% भाषा में%} का उपयोग करें

I am working on something with a database and with PHP to manage my finances. From my homepage I want to select one month and execute a query so that only records can be displayed in this month's database.

Now I have this:

  if (isset ($ _gET ['january2013'])) // // Select the earnings {$ sql = 'SELECT Id, type, date, amount, statement, class from `transaction ', where type =" income "and month (date) ='. $ Month selection 'order by `transaction`.` ID` DESC limit 0,50'; $ Result2 = $ pdo- & gt; Query ($ sql); } //error handling. Hold (PDOException $ e) {$ output3 = 'Error getting record:'. $ E & gt; GetMessage (); Include '/errors/output.html.php'; Go out(); } // Display Record Foreach ($ result2 as $ row) {$ inJan2013 [] = Array ('id' = & gt; $ row ['id'], 'type' = & gt; $ row ['type' $ Line ['date'], 'zodiac' = & gt; $ line ['zodiac'], 'description' = & gt; $ line ['description'], 'category' = & Gt; $ line ['category']); }   

Instead of making this code every month, how can I make it more universal? I want to use the $ monthselect variable, but I do not know where to start from

on your webpage,

  & lt; Form action = "where_you_handle_your_requests.php" method = "post" & gt; & Lt; Select name = "mo" & gt; & Lt; Option value = "Jan" & gt; January & lt; / Options & gt; & Lt; Option value = "February" & gt; February & lt; / Options & gt; & Lt; Option value = "march" & gt; March & lt; / Options & gt; & Lt; / Select & gt; & Lt; Select name = "yr" & gt; & Lt; Option value = "2010" & gt; 2010 & lt; / Options & gt; & Lt; Option value = "2011" & gt; 2011 & lt; / Options & gt; & Lt; / Select & gt; & Lt; / Form & gt;   

even further.

Next, on your PHP script,

  if (isset ($ _ POST ['yr']) & Amp; isset ($ _ POST ['mo'] )) {$ Monthselect = $ _ POST ['mo']. $ _ POST ['yr']; } Else {// has not passed for an input script}   

If the user has selected January 2013, then the month's selection is january2013

HTML table has random spacing -


There are a lot of differences between the rows in my tables for some reasons and I'm not sure why I have the padding and spacing 0. Is set to ...

table cells = "0" cellpadding = "0" width = "460" range = "0"

. ..but there is a lot of difference between the lines of text, why should there be any idea? Here's a sample of the table ...

  & lt; Table cellpassing = "0" cellpadding = "0" width = "460" range = "0" & ​​gt; & Lt; TR & gt; & Lt; Td width = "12" rowspan = "17" & gt; & Lt; Img src = "picture / z_spacer.gif" width = "10" height = "10" /> gt; & Lt; / Td> & Lt; Td height = "30" colspan = "2" align = "left" valign = "top" & gt; & Lt; P class = "title" & gt; With date ... & lt; Br / & gt; & Lt; / P & gt; & Lt; / TD & gt; & Lt; Td width = "20" rowspan = "17" & gt; & Lt; Img src = "images / z_spacer.gif" width = "10" height = "10" /> gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "106" height = "20" align = "left" valign = "top" & gt; & Lt; P class = "bodybold" & gt; what? & Lt; / P & gt; & Lt; / Td> & Lt; Td width = "322" height = "20" align = "left" valign = "top" & gt; & Lt; P class = "body" & gt; Monday morning meeting & lt; Img src = "images / z_spacer.gif" alt = "width =" 10 "height =" 10 "/> gt; & Lt; / P & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;   

And I also have some CSS code ...

  table {border: 0 solid #fffff; Margin: 0; Padding: 0; Degradation: collapse; } Tr, td {border: 0 solid #FFFFFF; Margin: 0; Padding: 0; }    

There are margins on extra spaces material attempts to add the following style to the style sheet

  td * {margin: 0px; }   

This will erase the margins of the content. If necessary, adjust the price to make more space.

sql server - Performance Issue in While Clause -


OK Everyone,

In advance, apologies for the length. It's really fun, though.

I have written to a SQL script that I was proud of yesterday because I thought that it is very clever. It is extinguished, performance issues are wasted, and I can not even test it because of it, so it can not be that which I feel sigh

This problem is best illustrated with the example:

column A | Column B | Column C | Column D
  heart | K | 2/1/2013 | 3/1/2013 heart | K | 2/1/2013 | 3/1/2013 heart | K | 1/1/2013 | 3/1/2013 heart | K | 2/1/2013 | 4/1/2013 spade | 4 | 2/1/2013 | 3/1/2013 spade | 3 | 2/1/2013 | 3/1/2013 Club | 4 | 2/1/2013 | 3/1/2013   

With this table, I need to: 1. Start with the first time, then update the row with the data, if in column A match Value, 2. Delete if there was a match, then the second line after the update, and 3. proceed to the next line, if there is no match and the same process starts again.

If there is a match, then the top row update column A: nothing

  • Column B.: If both values ​​are the same, put the value in one, else type 'multiple'.
  • Column C: Keep the first date between two,
  • Column D: place the date between two,

    then I delete the lower line

    My example should result in the following:

    column A | Column B | Column C | Column D
      heart | K | 1/1/2013 | 4/1/2013 spade | Multiple | 2/1/2013 | 3/1/2013 Club | 4 | 2/1/2013 | 3/1/2013   

    To do all this I create two table variables, insert the same data into both, and then update the bicycle through the second (@ScheduleB) In the first table (@ScheduleA) in the search for the match, I was then removed from the row in @ A (because it is similar to B). In the end, when there were no matches, I went to start a process in AA in the front row. At least this is what the code should do - see below.

    Displaying the problem is dangerous I have considered using a cursor, but I do not know what the display will help there.

    Any suggestions? Announced @ScheduleA table (RowNumber integer, period nvarchar (max), program nvarchar (max), ControlAccount Nchar (50), WorkPackage Nchar (50), CAM Nchar (50), EVM Nchar (50), Duration of time, BLStart datetime, BLFinish datetime) declared @ScheduleB table (RowNumber integer, duration nvarchar (Max), program nvarchar (max), ControlAccount Nchar (50), WorkPackage nchar (50), CAM nchar (50) , EVM nchar (50), duration integer, BLStart datetime, BLFinish datetime) Include more than [ROW], Duration, Program, ControlAccount, WorkPackage, CAM, EVM as @ScheduleA ROW_NUMBER () , a Method, from which the Program = @Program and Period = @Period inserted probe @ScheduleB, ROW_NUMBER (greater than the order by workpackage desc) [ROW], period, program, ControlAccount, WorkPackage, CAM, Become a BLFinish from EVM, Duration, BLstent, Scheduled Data, where Program = @ Programs and Duration = @ Announcement @IntIt = 1, declare @JyInte = 2 - Create a loop, another variable which is counted as the last line of B table While @J.L.L.; (Select Max (ROWNUMBER) + 1 @ ScheduleB) - Match table by WorkPackage - If start (if you select WorkPackage from @ScheduleA (where RowNumber = @i) = (@ScheduleB, select workpackage where RowNumber = @ J) Begin updating @ScheduleA --Update Schedule CAM, BLStart, set a table (if necessary) of BLFinish = Episode of CAM - Case = ScheduleA @ScheduleA column B is based on the argument argument, in BLStart = Case - -set values ​​based on logic and column C, BLFinish = case - based on rationality @ schedule A column D value Define where to remove Rowenber = @ I @Schedule A where the rouenumber = @e + 1 set @ j = @ j + 1 - in the newest b end ELSE set in line @ i = @ e + 1 end

    EDIT: To clarify, Column B. is not an integer column, I was just using it as an example because the cards are pretty easy to understand. Since then, I am KK Updated columns to include.

    Based on your needs, I think such a solution will work:

      select [column A], in case when MAX ([column B]) & lt; & Gt; Minimum ([column B]) then 'multiple' ELSE cast (max [[column B]) NVHAR (10)) end, min ([column C]), max ([column D]) by table group [column A ]  Edit  

  • time - Version 5 UUID in Perl -


    offensive:

    I am new to overflow stack, and I say hello!

    on topic:

    I am creating 5 UUID for a version which requires creating and deleting random folders through a timestamp. Is time () via

      my $ md5_UUID = create_uuid_as_string (UUID_MD5, time. "$ Job");   

    These folders are created per run on each task, and are deleted after running. If the same UUID is generated in some way, then + -1000 can stop the jobs.

    Is there any information that I would like to have or any the possibility of conflict (different data generating the same UUID)? Are they really unique? Also, which version of UUID should be used between SHA1 and MD5?

    Use the OS tool

    Perhaps there is a pure Pearl solution, but it Can be overkill. If you are on a Linux system, you can capture the results of mktemp or uuidgen and use them in your Perl script. For example:

      $ perl-e 'print' mktemp - directory '' /tmp/tmp.vx4Fo1Ifh0 $ perl -e '$ folder = `uuidgen`; Print $ folder '113754e1-fae4-4685-851d-fb346365c9f0   

    The mktemp utility is good because it will create an atomic directory for you, returning additional directory name of the. You have the ability to modify the template in more meaningful names (see man 1 mktemp ); On the contrary, the UUID is not really good in the message of useful semantics.

    java - A couple questions regarding anagrams -


    I have followed some of the questions I asked earlier. Before that I asked how to use a method to determine whether the elements of a list are present in the other or not. Because of this I have done this because I want to define that a list has drawings of others - using user input and a dictionary list. I am having difficulty in determining this, I want to pass the lists in a list to determine whether one contains the elements of another, or not. Right now it only gives false false when I know that the actual anagram is present.

    Can anyone see my code and help me? Besides, how do I determine that the user input has many-word anagrams?

    My algorithm works by taking two lists and by describing the letters in each word, I read about this method in another post and decided to go with it - this work is in progress is. This is my code:

      Public class AnagramSolver1 {Public static zero main (string [] args) IOException throws {// scanner / reader scanner scan = new scanner (System.in); BufferedReader = In the new BufferedReader (New FileReader ("src / dictionary.txt")); // lists containing unordered dictionaries and inputs, and after the alphabetical order list & lt; String & gt; Dictionary = New Arrestist & lt; String & gt; (); & Lt; Four []> Dictionary: Source = New Arrestist & lt; Char [] & gt; (); & Lt; String & gt; Input List = New Arrestist & lt; String & gt; (); & Lt; Four []> InputSort = New Arrestist & lt; Char [] & gt; (); String line = null; // Read in the dictionary and then in the alphabetical order //// while (zero! = (Line = in.readline ())) {dictionary.add (line); } In.close (); Dictionary sort = sortlist (dictionary); // print statement / * for (int i = 0; i & lt; dictionary structure; i ++) {System.out.println (dictionary:} * / // user input, then sort alphabetically // // System.out.println ("Enter the word:"); string input = scan.next (); inputList.add (input); InputSort = sortlist (input list); // for print statement * = 0; I & lt; Input Asiose (); I ++} {System.out.println (inputSort.get (i));} * / // Define that user input is the fingerprint of any dictionary word boolean =Anagram (dictionaryResearch, InputSort); Println (isAnagram);} // Sort a string in four letters; Public static list & lt; char [] & gt; sortlist (list & lt; string & gt; sort) { List & lt; char [] SortList = new arreelist & lt; char [] & gt; (); for four [] letterSort; (int i = 0; i & lt; sort.size (); i ++) {letterSort = sort.get (i) .to Character (); Arrays.sort (letterSort); sortList.add (letterSort);} Return SorList;} // Determine if the user input is an anagram or not Public stable boolean isagraag (list & lt; four []> dictionaryartort, list & lt; four []> inputSort) {for (four [] c: dictionarySort) {if (inputSort.contains (c)) { Return true; } } return false; }}    

    Here's a big problem:

      (Four [] c: dictionary sort) {if (inputSort.contains (c)) // // bug!   

    It will not work as you think it will be. This test is included in the exact four [] item list; It does not test if a letter contains the same character.

    The way you intend to do it, char [] , store strings to do it.

    To convert a char [] to a string , do this:

      four [] ; String s = new string (s);   

    Once you solve your characters in an array, change the four arrays into a string and place it in your lists. This means that in all lists list & lt; String & gt; should be in the list.

    jquery - How to set Wijmo scrolling? -


    I need help for my grid There is no scrolling in it Anybody can help me add scrolling to the Wijmo grid

    The jquery grid table is as follows:

      & lt; Div id = "tabs-1" & gt; & Lt; Table id = "all_grid" data-bind = "wijgrid: {data: allow edit: correct, allow paging: correct, allowcrolling: true, permission denting: true, showfilter: true, page size: 20, // Column: [Header Text: 'Title'}, {Header Text: 'Pub Date'}, {Header Text: 'Sent'}, {Header Text: 'Link'}],} "& gt; & Lt; / Table & gt; & Lt; / Div & gt;    

    To enable scrolling, you need to set Wijgrid's scrollMode property According to your requirement "auto" or horizontal etc. By default, this is none, for more information about this, you can specify these links:

    Sample:

    Dock link: < / Div>

    java - Distinct function with Criteria -


    I want to execute this question with Criterias but it seems that it is not working as expected: / P>

      Select different details, ID, Family_Id, number-by-volume family details WHERE familia_id by group;   

    I have tried this

      public list getFamiliasPadre () {criteria cri = getSession (). CreateCriteria (Familia.class); Cri.add (Ban.InslL ("familia.id")). Setprogress (project names (projects "properties") .setProjection (Projections.groupProperty ("descripcion"); return cri.list ();}   

    but this is a result As I was executing this query

      select different details from the family WHERE familia_id by descriptor by IS NULL GROUP;   

    This only gives the column descripcion

    My question is, how can I say in hibernation that I want all the columns in my table But I do not want to repeat voices from the desaulpcion column?

    You do not do this in just plain SQL queries I mean, how can you possibly merge 2 rows that only share one column? For example, imagine this in your table:

    • familiaId - descripcion - Otro
    • 1) null - algo - foo
    • 2) blank - algo - bar

      There is no way that DISTINCT is just a column May apply to Zaki could leave aside, because you will only have one line for those two lines

    asp.net mvc - MVC 4 TreeView Menu -


    I tried to follow it, because it was cited as an example in many places:

    < P>

    ) {MenuDBContext db = new menu dbctext (); ViewData ["AllMenu"] = DB. Menu .Oolist (); See refund (db.Menus.ToList (). Where (C => c. PID == faucet)); }

    View category:

      @ {ViewBag.Title = "index"; } @model iInmerebel & lt; Geo.Models.Menu & gt; & Lt; H2 & gt; Index & lt; / H2 & gt; @ Varic (Miscellaneous items in the model) {& lt; Li & gt; @item @ {var kids = watchdata ["allmenu"]. Where (C => C.PID == item.ID);} if (kids.count ()> gt; { ul & gt; @ {Html.RenderPartial ("ItemControl", children) ;}  gt;}   

    I can not work for my life because I can not use it. Where children About "View" ["AllMenu"] or any device, where I am going wrong, it will be fantastic. "post-text" itemprop = "text">

    IEnumera as "videadata [" allmenu "] as IEnumerable & lt;

      var kids = (ViewData [" AllMenu "]) Ble & gt; GeomantApp.Models.Menu & gt;) where (C => C ....   

    data dictionary & lt; string, object & gt; , so when you try and obtain a property from that dictionary, then there is no way to know that ASP.NET is what it is before hand if you do not put your object first Compiler errors.

    java - Can someone tell me the regex for a dateTimeString like: "YYYY/MM/DD HH:MM:SS" -


    In addition, I really appreciate the explanation, sorry but I have never used regedx in my life And it can barely read.

      D {4} / \ d {2} / \ d {2} \s + \ D {2}: \ d {2}: \ d {2}   
    • < \ d is a number < Li> {4} is the amount of digits (just before the regexp part)
    • / is just a slash
    • < Code>: just one colon
    • \ s is any white spot
    • + one or more whitespace (The regexp part in front of it is correct)

      Note that this will be used for an early preliminary inquiry, but you will need to complete the date format such as SimpleDateFo Rmat Advertised Rohit Jain or John Skeet should use other ways to advertise.