I have a situation where I have to set the price for a "data- *" on a div in a dual way What I'm really using is:
= tag ('div', {class: 'agile-carousel', data: {carousel_list: url_for (format :: json)} }, True) = "& lt; / div & gt;" Html_safe Which is awesome, besides rail one and lt; Div / & gt; Turns off the device in a fashion, which certainly does not like Chrome and other browsers (to create some disasters). So my solution is that one. I would like to ask that there is another way to do this.
Update 1: I have a small problem, this code:
Span class == I18n.locale == locale_used? "Disabled": zero = link_ to (I18n.t ('locale_name', locale: locale_used), \ url_ (locale: locale_US)) If I remove link_to this job Does. Note that if i | << Code> "<< P> instead of >
content_tag instead of> tags > , but you should not
you are using Therefore, the use of slim : .gile-carouesel data-carousel_list = Url_for (format :: json) < / Code> Output:
The whole point of Slim and Ham is that you have to write the tags There is a brilliant brief sentence that you should use it when they are not necessary, then they should use the Tag Tag Assistants. By using them, you are restarting all the punctuation marks they want to remove. .
On the web form, I have the Selection-Option field. I assume the value 'card' (without the quotation marks), or the zero value deposit Have to do.
Now, the code looks like this:
$ options = array = (= NULL = & gt; 'invoice', 'card' = & gt; '); Echo $ the-> Form- & gt; Input ('payment_messity', array ('option' => = option)); How do I define option AR to submit zero values in database table (and / or 'card' but definitely works) if that invoice Option is selected?
Thank you in advance!
The tap is an invalid key for an associative array, only 'integer' and 'string' valid array keys See the documentation:
To send an empty value through the form, you can use an empty string. To force a null value to be entered in the database, handle it inside your model or controller before saving it
$ options = array ('' => Invoice ',' 'Card' = & gt; 'payment card'); Echo $ the-> Form- & gt; Input ('payment_messity', array ('option' => = option)); Then inside your controller;
If ('' === $ this- & gt; Request- & gt; Data ['MyModelName'] ['Payment_method']) {This-> Request-> Data ['MyModelName'] ['payment_math'] = null; } alternative approach
However, why not use value for 'invoicing' payment method? Like this: $ echo-> gt; Form- & gt; Input ('payment_method', array ('option' = & gt; array ('' = '' 'select your payment method', 'invoice' = & gt; 'invoice', 'card' = & gt; Card ',))); In IMO, there are some benefits;
- It is more transparent, e.g. When looking inside the database, it is clear that the payment method is 'invoice' by using a 'special' value (zero), without the knowledge of your application, people will have to browse through the source code in order to work internally < / Li>
- It is possible to check that usage has chosen payment method; As if the value is empty, it may be that you have forgotten to select the payment method, in which case you can mark the field 'invalid' through a verification rule.
मैं Node.js v0.10.1 < / Sup> (एक त्वरित उदाहरण के साथ प्रदर्शित): इंटरैक्टिव कमांड लाइन में नोड चलते समय:
& gt; Global.require {[समारोह: आवश्यकता]। । । } & Gt; की आवश्यकता {[फ़ंक्शन: की आवश्यकता] । । } निम्न script.js चलाते समय मुझे अनपेक्षित परिणाम मिलते हैं: console.log (global.require); // 1. console.log (आवश्यक); // 2. अपरिभाषित // 1. 'global.require' अपरिभाषित है! {[फंक्शन: अपेक्षित] । ।} // 2. `` `` `` `` `` अपने आप को काम करता है, लेकिन काम करता है। मैंने ... द्वारा चिह्नित अतिरिक्त कोड निकाल दिया है I ऐसा होने के कारण क्या होता है?
नोड। Js में एक मॉड्यूल है जो आपको अपना स्वयं का रीड-इक्वेलेट-प्रिंट-लूप्स (यह वही है जो repl के लिए है) बनाने की अनुमति देता है। इस मॉड्यूल का उपयोग करना एक ऐसा फ़ंक्शन है जिसका उपयोग आप एक नया repl बनाने के लिए करते हैं। यह फ़ंक्शन एक विकल्प ऑब्जेक्ट लेता है जहां आप अपने repl कॉन्फ़िगर कर सकते हैं इनमें से एक विकल्प को उपयोगग्लोबल कहा जाता है इस विकल्प के लिए प्रलेखन के अनुसार निम्नलिखित वाक्य वैध है: यदि true पर सेट है, तो repl को global ऑब्जेक्ट का उपयोग करेगा , एक अलग संदर्भ में स्क्रिप्ट चलाने के बजाय झूठे के लिए डिफ़ॉल्ट। अब जब आप इंटरैक्टिव मोड में नोड.जे शुरू करते हैं, तो यह मूल रूप से कुछ नहीं है, बल्कि एक समान है जैसे आप < कोड> रिप मॉड्यूल मुझे लगता है (और कृपया ध्यान दें कि यह केवल एक अनुमान है!) यह है कि नोड.जेएस की डिफ़ॉल्ट रीप में उपयोग ग्लोबल को true पर सेट है। इसलिए आपके पास एक वैश्विक ऑब्जेक्ट, जो कि वैसे भी वैश्विक नेमस्पेस के समान है। इसलिए सभी कार्यों जैसे की आवश्यकता होती है जिसे आप वैश्विक नाम स्थान पर पा सकते हैं, आप फिर से वैश्विक ऑब्जेक्ट पर पायेंगे। एक बार जब आप एक नोड .js आवेदन गैर-इंटरैक्टिव मोड में है, कोई प्रतिलिपि नहीं है, इसलिए कोई वैश्विक ऑब्जेक्ट नहीं है। क्या आपको यह समझ है?
I would like to run a shell script (before converting markdown to html) mvn javadoc: javadoc is running. How can I add this shell script as a dependency of the javadoc function?
The command you are using is just calling the target javadoc but you need a life-cycle Where you can attach a shell script to run so that you need to call mvn site to run your shell script.
I am using the cotire () plugin for seamkak, which handles many good things related to compiling speed ( For example precompiled headers).
The problem is that I include several headers (Boost related or Protobuf) in the form of a system - in which warnings are disabled.
I do not think there are a built-in method to do this, when we compile "-w" To add a flag, the cotire function has modified cotire_add_pch_compilation_flags (line 1244 cotire.cmake version 1.5.1) precompold header we have GNU | To read the clang section
elseif (_compilerID MATCHES "GNU | clang") # gcc / clag option used to specify # -x source language # -compiled but do not link Set the file set (_xLanguage_C "c-header") in the # -o location output (_xLanguage_CXX "c ++ - header") if (_flags) # Add to list (append_flag "-x" "$ {_ xLanguage _ $ {_ Language}} "- $" _ $ {_ prefix} "" "$ {_ prefixFile}" -o "$ {_ pchFile}") and () # return string as set (_flags " X $ {_xLanguage _ $ {_ language}} -w - C \ "$ {_ prefixFile} \" -o \ "$ {_ pchFile} \" ") endif () It suppresses all warnings for us, we have many warnings going on - including terror, so it was a mandatory change!
Is it possible to include both (1) insertion and removal for the priority queue?
By using the priority queue pile and the time of running the Fibonacci pile, it seems that removing O. (LogN) copy is not possible to get better time. > I am trying to implement a data structure where n items are given, I have to be half in the maximum priority queue and half in the minimum priority queue. Then I want to remove all the n objects gradually.
I can include all N elements in O (n) time, but all the N objects will be removed and taken (n * logen), so I am thinking that another approach is more suitable Ho. If you remove the priority queue o (1) entry and O (1), you (n) that
In time, a list of n objects can be used to sort as explained, you can not sort into O (n) in the normal case, so the (1) entry without further assumptions on input and It would be impossible to construct a primary line with O (1) exit. / P>
For example, the priority queue in which o (1) insertion and o (k) (the maximum element which can be inserted) can be removed. Keep a table of Kashmir linked list. The inclusion of x puts one code in front of the x th list. Before deleting, you must scan through the table to find the non-empty list (then delete the first item in the list and return the indicator to that list). Only Kashmir lists, hence withdrawal (o) takes time if Kashmir is continuous, which works for O (1) eviction. In practice, using a table of calculations will work better. Increasing a variable-length integer is not persistent until you use refined analysis (that is why I used it in the previous paragraph Not used in), but in practice you will not need the same length anyway. In addition, in practice this will be bad for the big Kashmir, even though k is stable - you can quickly get out of memory and scanning for non-zero elements can take some time.
I have an input that contains 2 input texts when I submit an input text in which the value is "John & Smith "And" url "in my other input is the return of my URL
www.example.com/results.php?name=John&food=Apple < P> I would like to include John and Johnson. Smith's name because I use that for my search criteria
If you want them to query string For more information about being part of, see. Maybe it should be a post request, though request with paramomas in the body?
is a website that has a list of files that I want to download. To reduce the process, I tried to write a script to do this for myself. (Although I can choose multiple options at the same time, only by clicking on submitting the first file)
The webpage URL is different from the action in the webpage / list.FPP form. I'm not sure what the policy is posting the actual url.
& lt; Form action = "webpage / data.php" method = "post" & gt; & Lt; Table align = "center" & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Select name = "data []" size = "8" multi = "multiple" & gt; & Lt; Option value = "downloadable_file 1.tar" & gt; Downloadable file 1 & lt; / Options & gt; & Lt; Option value = "downloadable_file2.tar" & gt; Downloadable file 2 & lt; / Option & gt; & Lt; Option value = "downloadable_file 3.tar" & gt; Downloadable file 3 & lt; / Options & gt; & Lt; / Select & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; Input type = "submit" & gt; & Lt; / Form & gt; I have a script:
import urlib import urllib2 import modesty rake = urllib2.Request ( 'webpage / list.php') value = { ' data [] ':' downloadable_file1.tar '} req.add_data (urllib.urlencode (value)) resp = urllib2.urlopen (req) myfile = open (' downloadable_file1.tar ',' wb ') shutil.copyfileobj (Resp. Fp, myfile) myfile.close () While running the script, the server does not seem to accept the request and only gives me the service of the same webpage with the file list. Do not I have any choice? Maybe there is a problem redirect?
This information is what I get when using Chrome:
URL of the request: webpage / data. Php request meth: post status code: accept 200 OK: Text / html, application / xhtml + xml, application / xml; Q = 0.9, * / *; Q = 0.8 Acceptable-charset: ISO-8859-1, UTF-8; Q = 0.7, *; Q = 0.3 encoding-encoding: accept jeep, bend, SDC-language: SV-SE, SV; Q = 0.8, N-US; Q = 0.6, N; Q = 0.4 Cache-Control: max-age = 0 Connection: keep-alive Content-Length: 26 Content-type: application / x-www-form-urlencoded host: website Origin: webpage manual webpage / list.php User agent: Mozilla / 5.0 (Macintosh; Intel Mac OS X L0_6_8) Apple Vebkat / 537.22 (KHTML, like Gecko) Chrome / 25.0.1364.172 Safari / 537.22 data []: downloadable_file1.tar acceptable limits: bytes cache-control: private connections : Keep-alive Content-Settings: Attachments; Filename = "download Yogy_fail 1.tar.gz" Content-Length: 1043436 Content-Transfer-Encoding: binary Content-Type: application / x-Jijip Date: Tue Mar 26 2013 20:18:58 GMT End: Mon, Keep 26 Julai 1997 05:00:00 GMT-Elivः timeout = 5, max = 100 Pragः Private server: Apache / 2.2.9 (FreeBSD) mod_ssl / 2.2.9 OpenSSL / 0.9.7 e-P1 DAV / 2 PHP / 5.2 .6 Suhosin Patch with X-Power: PHP / 5.2.6
Should 'Request' Library Consider using the following:
I believe this request will be complete with the use of the library:
data = {'data []': ' File.write (req.content) as the downloadable_file1 file as' file.data ',' wb ') .tar'} req = requests.post ('webpage / data.php', data):
मेरे पास एक टेक्सटेरा है जो मैं पहले request.getParameter ("some_textarea_name") से आने वाले कुछ मानों को मुद्रित करता हूं । उपयोगकर्ता को उन मानों को संशोधित करने की अनुमति है और फिर मैं नए मानों को प्राप्त करना चाहता हूं और नए लोगों के साथ नए लोगों को बदलना चाहता हूं ताकि नए लोगों से पूछताछ हो और मेरे डेटाबेस तालिकाओं से परिणाम प्राप्त कर सकें। क्या मैं उस उपयोगकर्ता को एक नया पृष्ठ उदाहरण के बिना बिना किसी भी & lt; form method & gt; और request.getParameter ()
क्या मैं उपयोगकर्ता को पुनर्निर्देशित किए बिना ऐसा कर सकता हूँ
हाँ, आप एक एजेक्स लागू कर सकते हैं कॉल जो उपयोगकर्ता को रीडायरेक्ट किए बिना फॉर्म सबमिट करेगा और आप प्रतिक्रिया के साथ कुछ कर सकते हैं (शायद इसे पेज पर जोड़)। अगर आपको अजाक्स का पालन करने में मदद की ज़रूरत है, लेकिन यह जान लें कि यह शुद्ध जावास्क्रिप्ट में AJAX लागू करता है (इसकी थोड़ी अधिक फूला हुआ / जटिल)। यदि आप इसे सरल रूप में देखना चाहते हैं, और यहां भी एक है।
बिना उपयोग किए
नहीं, आपको फ़ॉर्म का उपयोग करने की आवश्यकता है सबमिट की गई, हालांकि यदि आप एजेक्स का इस्तेमाल करते हैं तो आपको उपयोगकर्ता को पुनर्निर्देशित करने की आवश्यकता नहीं होगी।
I would like to broadcast a message in every message to every customer (think of custom heartbeat system).
So the nods apps have started, the chairs are made and heartbeat messages are broadcast when I connect to the client app. I am still developing client applications and this means that every time we hit F5 and reload the application. When a new customer is loaded, SocketIo connection is made and it results in heartbeat messages coming in the client app with a rate higher than 1 message / sec.
There is nothing special about code-server side:
var server = http.createServer (app); Var io = Required ('socket.io'). Listen (server); Server.listen (8080); Io.sockets.on ('connection', function (socket) {... setInterval (function () {console.info ('broadcast heartbeat'); socket.broadcast.emit ('heartbeat', / * Custom heart beat * /);}, 1000); ...}); Client side:
var socket = io.connect ('localhost', {'reconnect': false, port: 8080}); Socket.on ('heartbeat', function (data) {console.log ('heart beat');}); Can someone give me some advice on what is wrong? Thank you
There is no need to start an interval every time you can archive the interval, and It can also clear with clear interval (INTERVAL); This is not required. var server = http.createServer (app); Var io = Required ('socket.io'). Listen (server); Server.listen (8080); Var INTERVAL; Io.sockets.on ('connection', function (socket) {... if (! INTERVAL) {INTERVAL = setInterval (function () {console.info ('broadcast heartbeat'); socket.broadcast.emit 'Heartbeat', / * custom heart beat * /);}, 1000);} ...});
मेरे पास कोई गतिविधि है
सार्वजनिक वर्ग ShowFileActivity FragmentActivity बढ़ाता है और जब कोई घटना होती है, तो इस वर्ग ने एक DialogFragment को कॉल किया है
सार्वजनिक वर्ग ConfirmDialog DialogFragment विस्तारित करता है यह एक साधारण पुष्टि संवाद है (" खारिज "और" ठीक "बटन)। यदि उपयोगकर्ता प्रेस को खारिज करता है, तो मैं
को डिसमिस () और ShowFileActivity पर वापस आ जाता हूं। अन्यथा, यदि उपयोगकर्ता ने कुछ ऑपरेशन किए जाने पर ठीक से संवाद किया है, तो कॉल को बहिष्कृत करने के बाद, मैं ShowFileActivity की मूल गतिविधि पर वापस जाना होगा। ऐसा करने का एक तरीका है? क्या DialogFragment किसी भी घटना को अपने माता-पिता को देखती है?
आप क्या कर सकते हैं टुकड़ा अंदर से गतिविधि युक्त किसी भी अन्य टुकड़े के अनुसार, आप getActivity () को कॉल कर सकते हैं जो उस गतिविधि को वापस देता है।
@Dismiss पर सार्वजनिक रूप से ओवरराइड करें (DialogInterface संवाद) {ShowFileActivity parent = (ShowFileActivity) getActivity (); parent.doWhateverYouWantWhenDialogDismissed (); } एक अन्य (अधिक फैंसी) दृष्टिकोण एक ईवेंट बस का उपयोग करना होगा जैसे कि या।
The function below dynamically adds content to a multi-select element (in this example the text #newItem has input and added I have been using it for # Example1, and it is based on this.
I am using it on 100 + elements and therefore I would like to modify the function so that the selectors need not to specify for each element Yes. '<'> Use both of the (this) and next () in the past. But this function is slightly more sophisticated compared to what I have done in comparison to earlier and I do not want to modify it to use the same selectors for the entire form. I Here's an example work done:
JS HTML & lt; Div & gt; & Lt; Input type = "text" id = "newItem" /> & Lt; Input type = "button" id = "add" value = "add" /> & Lt; Label & gt; & Lt; Input type = "checkbox" id = "selected" /> Selected? & Lt; / Label & gt; & Lt; Id = "example 1" name = "example-refresh" class = "multicolored" multi = "multiple" & gt; & Lt; Option value = "foo" & gt; Foo & lt; / Options & gt; & Lt; Option value = "bar" & gt; Bar & lt; / Options & gt; & Lt; / Select & gt; & Lt; / Div & gt;
Change this one:
& lt; Input type = "button" id = "add" value = "add" /> for a class, so we have a common starting point
Then do: $ (function () {$ ("Add.") (Function () {var el = $ (this Multiselect (), selected = $ (this) .siblings ('label'). ('Input [type =' checkbox "] '), newitem = $ (this) .prev () ('' Input ''), v = newItem.val (), opt = $ ('& lt; option / & gt;', {value: v, text: v}); if (selected.is (': checked ')) {Opt.prop (' selected 'is true);} opt.appendTo (el); el.multiselect (' refresh ');});});
स्क्रिप्ट कोड:
"कमांड" गूंज? उदाहरण के लिए command = echo "Hello world" पढ़ें
$ command & gt; Text.txt बिल्ली text.txt आउटपुट है "हैलो वर्ल्ड" (इन्वर्टेड कॉमा के साथ), लेकिन मुझे समान आउटपुट की आवश्यकता है जैसा कि सरल होता है
गूंजती "हैलो वर्ल्ड" & gt; Text.txt i.e। नमस्ते दुनिया। मैं इसे कैसे प्राप्त कर सकता हूँ? कृपया ध्यान रखें कि $ आदेश किसी भी मान ले सकता है, वर्तमान bash में निष्पादित होना चाहिए और फ़ाइल में सहेजा आउटपुट।
आप उपयोग कर सकते हैं
eval "$ command" & gt; Text.txt लेकिन सावधान रहें - क्या होगा अगर कोई rm -rf / ?
I am writing a rail app with an individual model that looks something like this:
Create_table "People",: force => Is true T | T.string "first_name" t.string "last_name" t.string "email" t.datetime "created_at" ,: null = & gt; Incorrect t.datetime "updated_at" ,: null = & gt; False end I have a two step process:
- With people's names, fill the person's records. For example, "Tim Smith" and "Tonothy Smith"
- Ask the API to get a potential email address match for those people, for example, surnames etc., people's names can be unknown duplicates Are there.
After that processing, I can have the data:
Record 1: first_name: Tim LastName: Smith Email: tim.smith@sampleemail.com
Record 2: First_name: Timothy last_name: Smith Email: tim.smith@sampleemail.com
What is the best way to model for the cars that are duplicates?
UPDATE: Clarification
After Phase 2, I know that these two records are duplicates (i.e. the same person), my question is how to represent in the model is? Can I add a "duplicate_of_Person_ID" type field and insert the ID of the record for that field in the second record? Is there a better way?
You can add all records at once. The first plan that comes to mind is to keep the record as the winner with the least ID and point to all the dumps. You can also have_and_belongs_to_many, which will contain a separate table, where each record says that these two people are equal, the latter quadratically increases with the number of people, though.
Or, just copy all the information from one to the other and delete the second.
I have a binary file that will be read in characters; each character has an unknown number (left with wrap) I wanted to be able to read in every character and then wrap the shift on the right (To make the change again and again I feel that I have to know manually, because I have no other way. In a).
So, my current consideration is that I read in one character, make a copy temporary and then use XOR:
four letters; // will be read in the letters; // will keep a copy of the letter while the file (file; and letter, size) Letter now Letter 00001101 {temp = letter; // temp now keeps the letter 00001101> = 1; / / 1 position Move to the right, the letter now holds 00000110 temporary and the lieutenant; It makes sense in my tired head, but it does not work And ... I can not do that, according to the figures, the size of the four is 1 byte, so I thought that I only have to drag it with 8 bits.
Any help will be appreciated.
Note the signature of four. It has been signed on several systems, so your letter> = 1 sign to fill the change. The rotating integer is usually done as follows letter = ((unsigned char) letter >> 1). (Letter & lt; <7); As Marc comments in the form of , you can either | You can use or XOR ^ . >
मैं फ्लास्क परियोजना Alembic
मेरा अनुप्रयोग संरचना लग रहा है project / configuration / __init__.py dev.py test.py कोर / # सभी स्रोत कोड डीबी / माइग्रेशन / __init__.py alembic.ini env.py संस्करण / जब मैं अपने db निर्देशिका से निम्न चलाने की कोशिश करता हूं, तो मुझे फ़ाइल "माइग्रेशन / env.py" , 55 पंक्ति, विन्यास आयात एप से, डीबी आयात ईर्रॉयर: कोई मॉड्यूल नामक कॉन्फ़िगरेशन मैंने इसमें उल्लिखित समाधान की कोशिश की, लेकिन यह मेरे लिए काम नहीं करता है
"ऑनलाइन" में माइग्रेशन चलाने के लिए env.py run_migrations_online () में मेरी विधि है def run_migrations_online (): "" " इस परिदृश्य में हमें एक इंजन बनाने और संदर्भ के साथ एक कनेक्शन संबद्ध करने की आवश्यकता होती है। "" "आयात ओएस आयात sys.path.append (os.getcwd ()) कॉन्फ़िगरेशन आयात एप से, डीबी एलेम्बिक _config = config.get_section (config.config_ini_section) alembic_config ['sqlalchemy.url'] = app.config ['SQLALCHEMY_DATABASE_URI'] target_metadata = db.metadata इंजन = engine_from_config (alembic_config, उपसर्ग = 'sqlalchemy।', Poolclass = pool.NullPool ) Connection = engine.connect () context.configure (connection = connection, target_metadata = target_metadata) कोशिश: context.begin_transaction () के साथ: context.run_migrations () अंत में: connection.close () यदि context.is_offline_mode (): run_migrations_offline ( ) अन्य: run_migrations_online () मैं इसे कैसे ठीक कर सकता हूं?
< P> मैंने
निर्यात PYTHONPATH = & lt; path_to_project & gt; किया और फिर से कमांड चलाया और यह सफलतापूर्वक चला गया
I am trying to get the karmic runner to produce the Corbettura Format Code coverage report during Jenkins Build. I can get it to generate an coverage.xml file, but it does not actually contain any coverage data (using the LOG_DEBUG ) that the preprocessor coverage is not running . There are pieces related to my karma.conf.js file: files = [Jasmine, JASMINE_ADAPTER, 'App / components / angle / Angular Js ',' ap / factor / angular-socks / angular-mocks.js ',' tmp / script / ** /*.js ',' tmp / spec / ** / *. Js']; Preprocessor = {'TMP / Script / ** / *. JS ':' coverage '}; // test result reporter // to use possible values: 'dots', 'progress', 'junit' journalists = ['dots', 'junit', 'coverage']; JunitReporter = {outputFile: 'test-results.xml'}; CoverageReporter = {Type: 'Cobertura', DIR: 'Coverage /', File: 'Coverage. Xml '}; (Junit report is generating a fine.)
Apparently I had thought more literally than my preprocessor configuration preprocessors = {'** / tmp / script / ** / *. JS: 'Coverage'}; (note the earlier ** / ) did the trick. I'm not sure why syntax is different for files array and preprocessor object ( 'tmp / scripts / ** / * .js' Vs '** / tmp / scripts / ** / *. Js' ).
I'm having trouble understanding an ArrayList I'm writing a program using 3 classes of client, video and invoice I am In the code given below, I am creating a new customer to add ArrayList to set up, but I think I am trying to treat it as it is an array, I want the user to have another customer object Wants to be able to add and run through a series of questions to use a counter "I" and add that client object. I know some of this is quite messy. Import java.util.Scanner; Import java.util.ArrayList; Public class Prog4 {public static zero main (string [] args) {scanner = new scanner (System.in); ArrayList & lt; Customers & gt; Customers = new ArrayList & lt; Customers & gt; (); Int i = 0; Cher Ens; Do {System.out.print ("Customer Name:"); String name = in.next (); Customer.add (i,) setName (name). System.out.print ("Street Address:"); String street address = in. Nxt (); D1.setStreetAddress (streetAddress); System.out.print ("City:"); String city = in.next (); D1.setCity (city); System.out.print ("state:"); String state = in.next (); D1.setState (state); System.out.print ("zipcode:"); String zipcode = in.next (); D1.setZipcode (zipcode); System.out.print ("Phone Number:"); String phone number = in.next (); D1.setPhoneNumber (PhoneNumber); Customer [i] = new customer (name, street address, city, state, zipcode, phone number); System.out.print ("Do you want to enter a new customer (Y / N)?"); String Answer = in.next (); Answer = answer.charAt (0); } While (ans == 'y'); First} I recommend setting the value for the customer object and then the customer. .add (customer object) Something like this:
import java.util.ArrayList; Import java.util.list; Import java.util.Scanner; Public class customer {personal string name; Private string street address; Private string city; Private string state; Private string zipcode; Private string phone number; Public string getName () {return name; } Public Zero Setname (string name) {this.name = name; } Public string getStreetAddress () {Return Street Gather; } Public Zero setStreetAddress (String Street audience) {this.streetAddress = streetAddress; } Public string getCity () {return city; } Public Zero Set City (String City) {this.city = city; } Public String Millstate () {Return State; } Public Zero SetState (String State) {this.state = state; } Public string getZipcode () {return pincode; } Public Zero Set zipcode (string zipcode) {this.zipcode = zipcode; } Public string received phone number () {back phone number; } Public Zero setphone number (string phone number) {this.phoneNumber = phoneNumber; } Public static zero main (string [] args) {scanner = new scanner (System.in); List & lt; Customers & gt; Customer List = New Arrestist & lt; Customers & gt; (); Cher Ens; Doing {customer customer = new customer (); System.out.print ("Customer Name:"); Customer.setName (in.next ()); System.out.print ("Street Address:"); Customer.setStreetAddress (in.next ()); System.out.print ("City:"); Customer.setCity (in.next ()); System.out.print ("state:"); Customer.setState (in.next ()); System.out.print ("zipcode:"); Customer.setZipcode (in.next ()); System.out.print ("Phone Number:"); Customer.setPhoneNumber (in.next ()); CustomerList.add (customer); System.out.print ("Do you want to enter a new customer (Y / N)?"); String Answer = in.next (); Answer = answer.charAt (0); } While (ans == 'y'); For (Customer C: Customer List) {System.out.print (c.getName ()); } (Int i = 0; i & lt; customerList.size (); i ++) {System.out.print (customerList.get (i) .getName ()); }}}
This would be a very common question, but my search for answers was unfortunately not a success
me What is the easiest way to match the two string objects in the extext, which is to know? I'm pretty sure that this should be possible, but how? I was looking to include a feature of this type in Xbase- if available- directly in the DSL built by XText
My initial point was that I wanted to compare the string attribute of two objects, using some EMFQuery models, but EMFquity does not support Boolean condition directly in its WHERE, Can be used with Cantons () or .regionMatches (); And the dizziness will be expensive, because I intend to use EMF only to test my perceptional model inquiries approach.
Thank you!
If you have a language built on top of Xbase, then you just use java.util.Pattern can do. Not sure I understand your question, though.
I have created a site using the Zurb Foundation 3 grid, each page has a big H1.
CSS
body {font-size: 100%} / * header * / h1 {font-size: 6.2em; Font-weight: 500; } HTML
& lt; Div class = "row" & gt; & Lt; Div class = "twelve column text-center" & gt; & Lt; H1 & gt; Large header tagline & lt; / H1> & Lt; / Div & gt; & Lt ;! - End tagline - & gt; & Lt; / Div & gt; & Lt ;! - End row - & gt; When I change the browser to a mobile size, then large font is not adjusted and causes the browser to include a horizontal scroll to adjust for larger text.
I 'We have seen that on Zurb Foundation 3 typography, the headers are browser friendly because it is compressed and expanded.
Am I really forgetting something? How do I get it?
font size will not respond, like resizing browser window instead They respond to browser zoom / type size settings, such as you press ctrl and + on the keyboard together in the browser. Media queries You will have to use some intervals to minimize the font-size, where it will start breaking your design and scrollbar Have to make.
For example, by changing the 320px width wherever your design is starting, try adding it to your CSS below:
@ Media only screens and (Max-width: 320px) {body {font-size: 2am; }} Viewport percentage length You can also enter vw , vh Click on vmin and vmax . Official W3C documents for this state: Viewport-percent lengths are relative to the size of initial block. The height or width of the initial block is changed, accordingly it is increased.
Then, from the same W3C document, each individual unit can be defined below:
VW unit - the width of initial block containing Equal to 1%
The VH unit - equals 1% of the initial block containing the height.
Varni Unit - VV or V.H. Equal to the smallest
vmax unit - VW or V.H.
and they are used like any other CSS value:
.text {font-size: 3vw; }. Other-text {font-size: 5 v. } Compatibility is relatively good as can be seen. However, some versions of IE and Edge do not support VMax. Apart from this, there is an issue with the VH unit in iOS 6 and 7, which was fixed in iOS 8.
I'm having a problem with two different pages on the same site both for the same JavaScript, line for line Running ... So far one person is throwing errors and not one please two please see the following URL ...
- Click on play in the left column - click any video link < / P>
When clicked, a fancybox link should be triggered, in which one Tube video should play.
Does any of the works as any idea, while another does not? While main URL is running on Magento / info / expression is anything below the engine.
Thank you!
मेरे पास एक साधारण सारणी है:
कीमतें (सेविक (int), newprice (int )) डेटा का उदाहरण: 1,20 3,21 10,30 तो एक एसक्यूएल स्टेटमेंट (एस) की तलाश में आई जो प्रत्येक हफ्ते में क्या देता है? ऊपर 3 पंक्तियों के अनुसार):
1,20 2,20 3,21 4,21 5,21 6,21 7,21 8,21 9, 21 10,30 ...
आप 1-52 सप्ताह से आबादी वाली तालिका बना सकते हैं। < प्री> तालिका सप्ताह (सप्ताह का अंत) बनाएं; सप्ताह के मूल्यों (1), (2), .... (52) में डालें; फिर आप परिणाम प्राप्त करने के लिए निम्न क्वेरी निष्पादित कर सकते हैं। यह एक देशी MYSQL क्वेरी है यदि आप एक अलग एसक्यूएल विक्रेता का उपयोग कर रहे हैं तो आपको इसे थोड़ा बदलना होगा।
ए से चयन करें। एईईक, बी के रूप में सप्ताह के रूप में, ए के रूप में कीमतें, जहां बी एफ्र्फ़मविचुक = (सी चुनें .fromwhichweek सी के रूप में सी जहां सी .fromwhichweek & lt; = A.week सी। Fromwhichweek desc सीमा द्वारा आदेश 1);
I need my GET verb action method to get two lists to be passed in order. There is a dropdown list so the selector list is OK. However, others have to be displayed as a checkbox, can someone advise to use the right / best list type?
// // GET: Change / create / create public actions () {ViewBag.StaffID = new selection (db.Staff, "Staff ID", "Full Name") ViewBag.BusinessAreas = New *? * (DB Business Area, "Business Area", "Buying Array"); See Return (); }
Create a custom class with all the assets you want and use it list list = To get all the data, see the new list view even you can also create HTML Helper class and generate one and use it in your view
Is there a hindrance on the key type in the hash map and hash tables? ---- Interview question I think we can customize it as necessary.
Technically, not usually, you want to use an object that is equal to ( ) And Hashod () applies although it is not strictly necessary. If you do not, then it will use the base implementation set by the object which compares the object identification. Many times, this is not suitable, but sometimes it's okay.
Technically, the key is not required to be irreversible, as long as the values used in the (and) hash code () implementation are irreversible. For example, if your class uses Foo string as a part of "foo" then that value should not be changed to "foo", that is because hash maps have the basis for the hash code () values for efficiency reasons But the keys are put in the left. If the hashcode suddenly changes, the hash map is unknown and the key now lives in the wrong bucket and you will get into the dirty bug because your map can have "duplicate" objects. Hope this makes sense.
I'm trying to do icanhaz / mustache loop, as defined in this and I get an error in the browser console Has been:
Uncheck error: syntax error, unrecognized expression: & lt; Option value = "1" & gt; First & lt; / Option & gt; & Lt; Option value = "2" & gt; Second & lt; / Options & gt; I do not know why I noticed that this line is causing the problem:
ich.myTemplate (listOfStuff); This is my complete code:
gt; script type =" text / javascript "src =" http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js " & Gt; & lt; / script & gt; script type = "text / javascript" src = "https://raw.github.com/HenrikJoreteg/ICanHaz.js/master/ICanHaz.js" & gt; & Lt; / script & gt; & lt; / head & gt; & lt; body & gt; & lt; select id = "mySelectBox" & gt; & lt; / select & gt; & lt; script id = " MyTemplate "type =" text / html "& gt; {{#stuff}} & lt; option value =" {{key}} "& gt; {{desc}} & lt; / option & gt; {{/ Stuff}} & lt; / script & gt; & lt; script & gt; $ {Document} .ready (function () {var listOfStuff = {stuff: {{key: "1", Desc: "first"}, {key: "2", desc: "second"}}}; var x = Ich.myTemplate (listOfStuff); $ ("# mySelectBox"). Attachment (x);}); Thanks for any suggestions!
Finally I got an error. This was a jquery version problem - 1.9.1 was returning error and was not 1.8.3. Compare those demos: 1.9.1 for version
- - jquery 1.9.1
- - jquery 1.8.3
See on javascript console.
In addition, if I
& lt; Script id = "myTemplate" type = "text / html" & gt; {{#stuff}} & lt; Option value = "{{key}}" & gt; {{Desc}} & lt; / Options & gt; {{/ Stuff}} & lt; / Script & gt;
& lt; Script id = "myTemplate" type = "text / html" & gt; {{#stuff}} & lt; Option value = "{{key}}" & gt; {{Desc}} & lt; / Options & gt; {{/ Stuff}} & lt; / Script & gt; For 1.9.1 , it worked fine too.
Edit: This is an open one if you wish, please help fix this bug!
I am trying to make the original socket call, and am trying to connect to google.com, but connect Call always fails and gives returns - 1. For any reason, it should fail
int main () {int sockfd; Struct addrinfo * ai; Four ports [4]; If (sockfd = socket (AFINET, SOCKRRM, 0) & lt; 0) {printf ("socket return -1"); } Sprintf (port, "% d", 80); If (getaddrinfo ("www.google.com", ports, faucets, & amp; AI) & lt; 0) printf ("- 2 \ n"); If (connect (sockfd, ai-> ai_addr, sizeof (* ai-> ai_addr)) lt; 0 printf ("connect failed-1"); I believe the problem is with the parameter sizeof (* ai-) I
. Ai- gt; Ai_addr returns a pointer to a socket ad string, and dereferencing brings you into the structure itself.
struct sockaddr {unsigned minor_familie; // Address family, AF_xxx char s_data [14]; 14 14 bytes of protocol address}; The sizeof is returning to the size of the whole stratus, not the length of the address.
Try making arguments ai-> ai_addrlen instead.
I would like to know that I can apply to communicate with the list of elements where I can choose only 4 box How can I do that? Any tutorials? I have something like:
Protect [zero showSelectMeasurementsDialog () {boolean] checkedMeasurements = new boolean [measurements.length]; Int count = Measurement Length; (Int i = 0; i & lt; counts; i ++) Checked measurement [i] = Selected measurement. Canton (measure [ii]); DialogInterface.OnMultiChoiceClickListener Mapandialaglistonr = new DialogInterface.OnMultiChoiceClickListener () {@Override on public zero (elected dialog interface dialog, Int, which Buleyn Measurement Chekarj) {if (Hakasesekted Measurements Checkered) selected measurements. Add (measure [joe]); Else {selectedMeasurements.remove (measure [which]); } On Change Select Measurement (); }}; AlertDialog.builder Builder = New AlertDialog.Builder (this); Builder.setTitle ("Select Measure"); Builder. Settlement ChoiceIits (Measurement, Checked Measurement, Measurement Dialog Listener); AlertDialog dialog = builder.scent (); Dialog.show (); } But I do not know how can I select an item when I select 4?
is in such a way as to try it.
public void dialog (View v) {string str [] = { "yyyy", "xxxx", "ccccc", "cxcxxc", "dadfssaas"}; Last AlertDialog. Builder WarningDialog = New AlertDialog Builder (main activity.); Layout Inflator Inflar = Milenite Inflator (); View View = inflater.inflate (R. diarrhea, vacant); ListView lv = (ListView) view.findViewById (R.id.listView1); ArrayAdapter & LT; String & gt; ADP = new ArrayAdapter & LT; String & gt; (GetApplicationContext (), android.R.layout.simple_list_item_multiple_choice, str); Lv.setAdapter (ADP); Last Boolean [] checked = new bullion [str.length]; alertDialog.setMultiChoiceItems (str, checkedItems, New DialogInterface.OnMultiChoiceClickListener () {@Override public void onClick (DialogInterface communicate, integer, boolean isChecked) {// TODO Auto-generated method stub int count = 0; (int i = 0; I & lt; checkedItems.length; i ++) {// checkedItems loop through array, if checkedItems // increments count * / if (checkedItems [i]) {count ++;} if (== 5 count) {// If the number of checked items becomes // four, the last checkedItems item is set to 'wrong' and the checkbox checkedItems correct marks [Joe] = false ;. ((Ale rtDialog) dialog) .getListView () setItemChecked (which is false); break;}}}}); AlertDialog.show (); }
I am trying to use a program that is part of a program. The result is that this figure does not exist. Code I am using as follows:
Library (existence)
Loading the required package: splines
Data (package = "existence")
Data (AML)
Warning message: In data (AML): Data set â ???? Amlâ ???? Not found
The command data (package = "existence") creates a list of data including the AML, even then the data (AML) provides the command data. Do I miss a required command or what Is it possible that there is a problem with the files in the package of existence? How can I find files and test mL existence?
I have tested this data for Emil and AM1 so that I can make sure that the text is not read incorrectly. According to the description in the list of data files neither one has worked, the name of this data file is all the letters.
In the case of existence , package authors aliadata , which means that you can access the data without calling data , it can already be found on the search path. Library exists ('AML') ## [1] TRUE head (aml) time position x 1 9 1 was maintained 2 13 1 maintained 3 13 0 maintained 4 18 1 maintained 5 23 1 maintained 6 28 0 maintained
This is a great way to use this plugin.
Issue:
& lt; Input type = "hidden" name = "tag" id = "mySingleField" value = "apple, orange" disabled = "true" & gt; Tags: & lt; Br> & Lt; Ul id = "mytags" & gt; & Lt; / Ul & gt; & Lt; Script type = "text / javascript" & gt; $ {Document} .ready (function () {$ ("# mytags"). Tagit ({singleField: true, singleFieldNode: $ ('# mySingleField'), AllowSpace: true, minnothing: 2, remove sync: correct, tags Source: function (request, response) {//console.log("1 "); $ .ajax ({url:" ..///GetList ", data: {word: request.term}, data type:" Jason ", success: function (data) {response ($ .max (data, function (item) {return {label: item.label +" ("+ item.id +") ", value: item.value}} });}}}}}}}}}; & Lt; / script & gt; tag when it selects the values Prices add value to CSV format in hidden fields in Atit. I want to do this instead of ID?
Here are some things. You can set the parameters to set the delimiter instead of a CSV, such as with an underscore:
$ ("# mytags"). Tagit ({. .. singleFieldDelimiter: '_', ... ... Then you can modify the tag-it.js file on the 1997 line to use the ID-attributeMay include.
Replace:
var tags = node.val (). Division (this.options.singleFieldDelimiter); be
var tags = Node.attr ("id"). Division (this.options.singleFieldDelimiter); So we say that you modify the hidden fields:
& lt; Input type = "hidden" name = "tags" class = "mySingleField" id = "Apple_Orange_Banana" value = "Apple_Orange" disabled = "true" & gt; You will modify javascript to get the desired output as:
$ (document) .ready (function () {$ ("# Taget (true: true, singleFieldNode: $ ('.mySingleField'), singleFieldDelimiter: '_', AllowSpace: true, minlanta: 2, remove sync: true, tag source: fu connection (request, response) {//console.log("1 "); $ .ajax ({url:" ../city/GetList ", data: {word: request.term}, datatype:" Jason ", success: function (data) {Response ($ .max (data, function (item) {return {label: i Tem.label + "(" + item.id + ")", value: item.value}}))))}}});}}); });
We are migrating to ColdFusion 8 to 10. Cold Fusion Only
Current architecture in ColdFusion 8 for .NET and CF integration: - The session is set when the user enters the app (cf). (We are using J2EE sessions.)
-
When a user is one. Clicks on the net link, the following steps have been taken to check the net code session inside the .net page via Jsessionid, CFID and CFTOKEN url: 2a Make a normal work call that will do a ColdFusion file request (chkSession.cfm) with the URL in jsessionid . 2b ChkSession.cfm will return the session. UID will return 1 if available, I session. UID will be available if the jsessionid is valid in the URL. 2 c If a valid UID has been returned then the .NET page will be loaded. If -1 is returned then the user will be redirected to the login page.
Continued in CF10:
In CF10, we always receive -1 I have read that the portion of the security increase in CF10 In the form, we will not be able to recreate the Cold Fusion session that passes through cfide , cftoken , jsessionid . In the URL I would like to get advice that what is the best way to work with our .NET functionalties in Cold Fusion 10. Is there a better way to stop NetViewion sessions from the Net? One option that I can think of is using the database. I am waiting for a solution that can be implemented quickly and is strong.
Do I think that JSESSID will serve as its cookie value in its request . Net client code has to be changed. In this way you have the functionality to work again.
It is worth noting that by exposing session IDs in the URL you may have to face some security vulnerabilities, so there may be something you want to see in future.
I have also used the database approach you mentioned. If you go this route, using a GUID as an identifier in the CF code and creating a timestamp for recording. Has been recorded. On the .NET side, look at the GUID and only accept the timestamp in less time than X seconds, so you do not create a token that will authenticate you for a long time. X should need maximum time, you think it will take the customer from the CF to redirect the redirect to the net pages, so 2 possibilities are quite large. You want to remove the used token and want to do a scheduled job to remove the 'unused' token.
I schedule a timer to read RSSI using the readRSSI function, but when my app goes into the background The timer stops, the app comes in the background, so the peripheral notification is a good way to get the RSSI price but I do not know how to do anybody can help me? Anyone have a better way?
I have a single problem, and I have two ideas.
1.
First of all, you should have some service that can be received from Core Bluetooth representatives from time to time. F or my example, I have a battery service that has been updated with me time code with didUpdateValueForCharacteristic The timely representative can be found. Second, set the readSSSSI function in didUpdateValueForCharacteristic . And do not forget to set background mode with Corebluetooth. Now you can update RSSI when updating. This works fine for me, but I got another idea from some sample code.
2.
Whenever you want to start an RSS reader, use the code below:
NSTimer * rssiTimer; [Invalid RSS timer]; RssiTimer = [NSTimer timer with timer: 1.0 Goal: Peripheral Selector: @Selector (Reid RSSI) userInfo: Zero repeats: Yes]; [[NSRunLoop currentRunLoop] addTimer: rssiTimer forMode: NSRunLoopCommonModes]; This works fine for me as well.
I have the var variable retl name which is equivalent to some queries. After some situations I want to make it identical with another query. But I get an error like the built-in cast type "System.Collections.Generic.IEnumerable & lt; AnonymousType # 1 & gt;" In "System.Collections.Generic.IEnumerable" & lt; AnonymousType # 2 & gt; "Impossible" . You can ask me why I do not want to define another var variable because it is used in a foreach cycle Take a look at the code: var retVal = from the resulting group item. AsEnumerable () where groupItem.SMS.First (). AmountOfParts == ((from the item in rawSmsList.AsEnumerable) Item.referenceNumber == groupItem.Sms.First (). Select the reference number item.) (Count) Select new {value = groupItem.Value, Sms = groupItem.Sms}; // Condition if (Retal ToArray ( ). Length == 0) { // Here I need a new query of retell quote retlal = as a result of the group item.f inkmemeble () where groupItem.SMS.First () .ZhoseAppeart == (from the items in RawSmsList.AsEnumerable ()) item.senderNumber = = GroupItem.Sms.First () Select Sender Number.) .net ()) Select new {value = groupItem.Value, Sms = groupItem.Sms};} Foreach (var item in retVal) / / FOREACH same Hopefully expect !!! How to insert different queries on the same var variable? Or how to find the var variable type and then insert it into a new defined variable?
means the type that is typed in the variable, that means its type will be set at compile time, That's why an anonymous type will be assigned on your first use, in your second you are trying to provide it with a different anonymous type, you can not do this.
You can modify your code to use a class instead of an anonymous object and then project it on it, then what you want to do now is to do it. You can create a class like this:
Public class Mylux {public int value {get; Set;} public string sms {get; Set;}} and then project it by modifying your selection statement:
var retVal = ...... select new MyClass {Value = groupItem.Value, Sms = groupItem.Sms};
Hey, I want to play a sound. I issue a command and it plays the sound, the user presses the key, let's say "h" and then the sound closes for 5 seconds, and returns after 5 seconds. What command can I use to do this? I thought the messy string could work, but I'm not sure. Play sound was on my way but there is no functionality in it.
Any code suggestions?
I was unable to enter the OpenX administrator since my OpenX server had been hacked by heavy traffic a few days ago. Page just time out The server is still delivering advertisements, Apache was restarted, and on server cluster, the RAM has been increased from 525MB per server (1.6 GB total) to 256MB (896 MB total) per server. I'm seeing errors in the log 'unable to allocate memory for many API-cache' pools.
The server is running 1ubuntu4.15 with PHP 5.3.2. OpenX version 2.8.9 PHP settings memory_limit = 64M max_execution_time = 90
Any advice on where and what to look for?
I was able to retrieve the Admin UI again by removing all files in the OpenX cache folder .
I am tracing a path on the GPU, and I have found some search results of pixel data (that is, float3 Is an array) on the GPU global memory, what do I do to display an array on the screen so that the CPU is archived for memory and openGL glTexImage2D call: glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_ UNSIGNED_BYTE, PixelEray); Then display texture is pixel data array for displaying pixelare as the GPU is the device that handles the rendering process, whether copying the CPU's data from the GPU Is there a way to display pixelare on the screen without doing it?
CUDA Use OpenGL Graphics Interop to map OpenGLOBAL texture as CUDA Global Memory . Either write your data directly to the texture or use cudaMemcpy2D.
Currently I'm working with the cake framework. My project consists of three tables (for example: menus, menu_positions, and men_position_lil). menu_id, status_id column
men_position_rel table in the menu
column p> menu, table_tight column p>
menu in the menu table < P> Using the HABT tables in kppp 2.x, what is the best way to use "soft removal" technique p> div>
make me an easy & amp; Primary solution here: p> div> html>
This background image in my website is working on slideshow. But I also need this for the body too. Can anyone help me?
.cb - slideshow li span {width: 100%; Height: 100%; Status: Completed; Top: 0 pixels; Left: 0 pixels; Color: Transparent; Background size: cover; Background-position: 50% 50%; Background-Repeat: None; Opacity: 0; Z-index: 0; Webkit-Backfiest-Visibility: hidden; Webkit-Animation: Image Animation 36S Linear Infinite 0S; -moz - animation: image animation 36 s linear infinite 0s; -o-animation: image animation 36 s linear infinite 0s; -MMS-Animation: Image Animation 36S Linear Infinite 0S; Animation: Image Animation 36S Linear Infinite 0S; }
If you want to resize your page, the media question (only the modern browser Support it) - or you can choose to use javascript (the third option is both), however your question indicates that you want to avoid javascript. I have given an example below with the questions of the media, when your screen size is between 800px and 1000px then CSS will be implemented. You can add a statement, as if you use only the minimum or the maximum at that time.
@ Media all and (max-width: 1000px) and (minimum width: 800 px) {.cb - slideshow li span {/ * css here}}} You can change any element with media queries. It is commonly used to create a responsive design.
My question is - how can you write calls to UCLink 2.6.21 synchronous, i.e. the end of sending the call Did not complete? Now I have the following code:
// ... fd = open (PORT, O_RDWR | O_SYNC) // ... FIO3CLR | = 0x30000000; // RTS = 0 (enable transfer) (FD, "A", 1) // Pass FIO3SET | = 0x30000000; // RTS = 1 (disable transfer) command FIO3SET | = 0x30000000; write () immediately after calling , this is undesirable for the work Thank you.
My guess is that you should set up TTI features and the Linux kernel rts / if you set the attributes If you do, see CTS handling for full examples. I think the part that answers your question is:
newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | Classic | CREAD; // CRTSCTS is set here ... tcsetattr (fd, TCSANOW, and newtio);
I am trying to parse a json file in perl. I want to remove the key "name" and its related value. {"Name": "ABC", "id": "123",}, {"name": "PQR", "id": "456",}, {"name": "XYZ", "id" : "789",}]}
I'm trying with code below:
# / usr / lib / perl using lib qw (..); LWP :: Simple; Use JSON; My $ filename = '/file.txt'; My $ data; If (open (my $ json_str, $ filename)) {local $ / = undef; My $ json = JSON- & gt; new; $ Data = $ json- & gt; Decode ( But I can not find any output.
Does anyone tell me wrong?
Your JSN file is invalid.
Lines 5, 10, 15 should not end with a comma because it is the last key / value pair of those hashes.
After you fix this, There is a version of code that gives you the expected results:
Use # / usr / lib / perl strict; Use warnings; Use Lib qw (..); Use JSON qw (); My $ filename = 'file.txt'; My $ json_text = do {open (my $ json_fh, "& lt ;: encoding (UTF-8)", $ filename) or die ("can not open \ $ filename \": $! \ N "); local $ ($ {Data- & gt; {data}}) for $; - $ json_fh & gt;}; my $ json = JSON- & gt; new; My $ data = $ json- & gt; decode ( $ Json_text); {print $ _- & gt; {name}. "\ N";} Some problems:
- You
$ Json_stream < $ data-> {Name} should be applied to all members of the array in the JSON file, not for JSN, so you have to initialize them first When debugging, make sure That your JSON is valid. Either comes from CAPN or utility.
JSON can describe complex data structure, when you parse it in Perl, you also get complex data structure. Or to see the data structure
I was dynamically adding a show to click on the table with a similar class name with JS / Junkery I'm ');});
Then once a column is dynamically added, when I click on each cell, I have a toggleclass () function to show a CSS add_week_bg class function, show it below Marking as
$ ("Highlight"). ("Click", function () {console.log ('clicked') $ (this) .toggleClass ("add_bg");}); A column has been dynamically added, and when my cell comes click once my problem comes to play. (Does not trigger on).
Here's a JSF
Thank you in advance.
You can click on event delegation ( Demo ------>
Yii अंतर्निहित मान्यन अमान्य हो जाता है यदि सरणी में वैदिकों का एक समूह विफल रहता है,
अमान्य ('ए', 'आवश्यक'), सरणी ('बी', 'आवश्यक'))
अमान्य वापस आ जाएगी यदि या तो ए या बी खाली है (और तर्क)
मैं इन मान्यताओं को गठबंधन करना चाहता हूं ताकि सभी अमान्य वैधकर्ता (या तर्क) वापस लौटाए, अगर यह अमान्य हो। ऊपर दिए गए उदाहरण अमान्य केवल उसी मामले में लौटाएंगे जो कि ए और बी दोनों खाली हैं।
क्या ऐसा करने के लिए एक सामान्य तरीके से बनाया गया है?
अगर मुझे उम्मीद नहीं है लाइब्रेरी का विस्तार करने के लिए निम्नलिखित जैसा कुछ संभाल करना होगा:
array (array ('', 'COVValidator', array ('A', 'required'), array ('b' 'आवश्यक')))
आप एक AnyValidValidator बना सकते हैं ताकि आप ऐसा कुछ करें:
सरणी (सरणी ('विशेषता 1, एटीआईब्यू 2', 'कोई भी वैध', सरणी ('अपेक्षित'));); समस्या
array (array ('', 'COVValidator', array ('A', 'required'), array ('B ',' अपेक्षित '))) यह है कि, सत्यापनकर्ता की कार्यक्षमता में कोई महत्वपूर्ण संशोधन किए बिना, कोई भी विशेषता (कोई विशेषताओं निर्दिष्ट नहीं) के लिए COVValidator सत्यापनकर्ता लागू नहीं होगा।
I am going forward and going forward between a SELECT and a textbox for the state area based on the country selected SELECT For the first time on my form the closed country of the US or Canada has changed, I have the functionality, however, when the country goes back to the US or Canada, it does not return to the selection any ideas?
$ (document) .ready (function () {$ ("# country"). ('Change', function () {var country select = $ ("# country") Val (); if (choose country == "ca"} select country == "US")) replace {// $ ("# state") ($ ("# state") .clone ((' 'Type', 'text')); $ ("# state").);}); thanks
I just posted an answer that I 'Going to edit with the following:
The function is $ ("# country"). ("Change" .....
Do you have id = "country" with element = id = "state" element? Because if you are, this function will never be called again. / P>
And in the light of the comment of MikilaAid, I will leave my original answer, okay.
if (choose country == "ca" || select country == "US")) {$ ("# state"). Replacewith ('& lt; input type = "text" name = "state" id = "state" />,);} other {$ ("# state"). Replace ('& lt; Select & gt; & lt; Option ... etc')}}
Starter: I was wondering if we could use the "use" keyword as an alternative in our applications.
I am using Laravel 4 in my application. I have a controller and function inside. I direct specific routes for specific tasks.
However, in this controller one function needs to use external class. I use the keyword "use" in this way:
PEM request \\\ CaptureRequest; Use PEM \ AuthorizeNet \ Aim \ PaymentFactory; This will work in the beginning of the controller, before opening the class, however, I was wondering if I can only activate these specific classes in this particular function for which these sections the wanted? I tried to do this, but apparently threw an invalid syntax error.
I would be happy to have this theory on this issue and behind it. I may also be asking a stupid question :) [Because I know that I can refer to the functions of these classes by using the complete reference such as Payum \ Request \ CaptureRequest \ Function . Or I can just write it at the beginning of the controller file because it will not cause any loading problem for execution.] Example of what I want to achieve:
// Use PEM \ request \ CaptureRequest; // Use PEM \ AuthorizeNet \ Aim \ PaymentFactory; ////// Instead of using context ... class MotawordController extends BaseController {function first () {...} function second () {Use Payum \ Request \ CaptureRequest; Use PEM \ AuthorizeNet \ Aim \ PaymentFactory; ...}
No, you can not: < Blockquote>
Use keywords should be declared within the outermost scope (global scope) or namespace declarations of a file. The reason for this is that the timing of the import is compiled and there is no runtime, so it can not be blocked.
Here's a very simple scenario that I would like to show:
Internal class program { Private static zero main (string [] args) {var uri = new uri ("http://myserver.com"); ServicePointManager.FindServicePoint (Yuri) Connection Lenin = 1000; (Web site), (for example i = 0; i & lt; 1000; i ++). (WebRequest.Create (uri). Baggent Response (a = & gt; {}, tap);} console. "Row" ("done" ); Console.ReadLine ();}} and related App.config:
& lt; system.net & gt; & lt; connectionManagement & Gt; & lt; clear / & gt; & lt; add address = "*" Maximum Connection = "1000" />
DefaultProxy & gt; & lt; Proxy ProxyDress = "Http://127.0.0.1:8888" /> & lt; / defaultProxy & gt; & lt; /system.net> Say myserver.com for 10 seconds Answers (I make it in Fiddler via AutoSponder). < / P>
In the proxy server (fidler) I only send 14 HTX requests when the application is started then the number of active connections is increasing but is very slow, work in 1-2 seconds in about 1-2 seconds After 1 minute the number of active http requests is approximately 50, but not 1000.
Is there any configuration that I can change to apply to the .NET to open 1000 real HTTP requests , But at least 200-300?
I think the best solution is to open each connection from the new thread < P> .NET 4 32-bit system in .NET 4 64-bit system has a limit of thresholds in 32768
If it does not work at the least, then you will be sure that there is a code in your code nothing is wrong.
I am a newbie for angularjs. I am creating an application where my home page will list the posts. I had thought of using Angularay for binding in two ways for that page alone. I started with a sample page but participated in issues here itself.
My sample page is using the ng-app for this part alone because I do not necessarily need angular to communicate with any other aspect of the page.
& lt; Div ng-app = "posts" & gt; & Lt; Ul class = "post_list" ng-controller = "post controller" & gt; & Lt; Li ng-repeat = "post in posts" & gt; {{Post.title}} {{post.description}} & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; I have an app.js file that contains
var app = angular. Module ('post', []); and
(define a controller in the form of the function (angel, app) {// constructor function}) with a post controller. Js file. Console.log (app); Console.log (angular); App.controller ("PostController", ["$ scope"], function ($ radius) {$ scope.posts = [{"title": "asdf", "description": "description"}, {"title": "Second one", "description": "second description"},];});}) (angular, app); I am getting my home page loaded
Error: The argument is not the "post controller" function. String [googlecdn path] angular.min.js: 16
What am I missing here Please help me because I am totally confused. I'm new to anjular and for javascript.
The problem is in the way that you are announcing your controller. You should show it below:
app.controller ("PostController", ["$ scope", function ($ scope) {$ scope.posts = [{"title": " Asdf "," description ":" description "}, {" title ":" second one "," description ":" second description "},];}]); Please note that the second argument is an array with both a string as a $ scope and elements of the array, it is a proper syntax, - Used to write secure code.
मेरे पास एक पेज लेआउट है:
& lt; div class = "layoutTable" & gt; & Lt; div वर्ग = "लेआउटटेबलरो शीर्षलेख" & gt; & Lt; div class = "लेआउटटेबलसीएल हैडर" & gt; & Lt; h1 class = "इंटरफ़ेसनाम" & gt; आइटम & lt; / h1 & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; div वर्ग = "लेआउटटेबलआरओ मेन" & gt; & Lt; div वर्ग = "लेआउटटेबलसीएल" & gt; & Lt; div class = "gridTableWrapper" & gt; & Lt;! - यहां एक बड़ी आंतरिक तालिका यहां - & gt; & Lt; / div & gt; & lt;! - ग्रिडटेबलवेपर - & gt; & Lt; / div & gt; & lt;! - लेआउटटेबलसेल - & gt; & Lt; / div & gt; & lt;! - लेआउटटेबलरो - & gt; & Lt; div वर्ग = "लेआउटटेबलरो पाद" & gt; & Lt; div वर्ग = "लेआउटटेबलसील पाद लेख" & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; / div & gt; हैडर और पाद लेख पंक्तियों की एक निश्चित ऊंचाई 49px है, और मध्य खंड, प्रदर्शन किया जा रहा है: तालिका-सेल, शेष स्थान भरता है। यह हिस्सा ठीक काम करता है, जब तक आप लेआउट "तालिका" divs के अंदर डेटा तालिका नहीं जोड़ते हैं।
क्या होना चाहिए, हालांकि लेआउट तालिका का बड़ा कक्ष है, उस आकार को रखना चाहिए, और डेटा तालिका , बहुत बड़े होने पर, स्क्रॉल सलाखों को भीतर लेआउट तालिका का सेल स्क्रॉल करना चाहिए। इसके बजाय, मैं जो भी कोशिश करता हूं, ब्राउज़र लेआउट तालिका को उड़ाने पर जोर देता है संपूर्ण डेटा तालिका सेल में फिट हो सकती है। नतीजा यह होता है कि स्क्रॉल सलाखों को पूरे पृष्ठ पर लागू किया जाता है, तालिका के बजाय तालिका के लिए।
मैं इसे पिक्सल में चौड़ाई निर्दिष्ट करके पूरा कर सकता हूं, लेकिन इसका लक्ष्य द्रव लेआउट ।
मैं इसे कैसे बनाऊं, तो सेल को जो स्क्रॉल किया जाता है, इसलिए पाद लेख और हैडर सभी समय पर दिखाई दे रहे हैं और बाएं-दायां स्क्रॉल पृष्ठ स्तर की बजाय लेआउट सेल स्तर पर भी है?
मैंने यहां समस्या का एक बेला बनाया है:
अगर
-
यह एक पूर्ण पृष्ठ लेआउट है,
-
कि आपका हैडर कंटेनरों (थ्रेड लेकिन शीर्ष पर नहीं) से अधिक कुछ नहीं है < / Li>
-
कि आपके पाद लेख कंटेनरों से अधिक कुछ नहीं है (नहीं पैट पर फ़ूटर)
-
उस शीर्ष लेख और पाद लेख की ऊंचाई ज्ञात है,
फिर आप किसी तालिका को एक पूर्ण कंटेनर में सेट कर सकते हैं <पूर्व> #tableContainer {स्थिति: पूर्ण; बाएं: 0; सही: 0; शीर्ष: 49px; नीचे: 49px; } यदि इन आंकड़ों को 2 डी में पढ़ने के लिए datas हैं, तो एक तालिका का उपयोग करें, अन्यथा एक मिश्रित सलाद ओ.टी. टैग है:)
I would like to know whether a sid ("currentSid") recovered with permission in the acl_entry table is of a principal or authorization.
for (int j = 0; j & lt; acl.getEntries (). Size (); j ++) {string currentPermissionPattern = Acl .getEntries () find (j) .getPermission () getPattern () .. String currentSid = acl.getEntries (). Get (j) .getSid (). ToString (); } I am currently storing the currentSID as a string. Let's say I store it as a syd, how do I know if it is related to any user or role?
You can do this:
if (acl.getEntries () .get (j) .getSid () for example valid authority) {valid authorization sid = (valid authorization) acl.getEntries (). (J) .getSid (); // This role is) and (principal seed sid = (Principalscid) acl.getEntries (). Get (j) .getSid (); // it is user}
Hello following is the model of my div when I open the modal without this piece of code then document.write (Webcam.get_html (320, 240)); The modal opens up successfully, but when I put the code mentioned above, it opens, opens the new page and document.write content in that page. Please tell me how I can modify the following div so that it shows the document.write (webcam.get_html (320, 240)); webcam.get_html (320, 240) inside the modal is a command of the jpegcam plugin that runs the webcam of the laptop or the similar, I also have a simple text document.write (" Abcd "); And when the modal opens, it shows ABCD on the new page. Please help, thanks, & lt; Div style = 'display: none' id = "modal-content" & gt; & Lt; Script language = "javascript" & gt; Document.write (webcam.get_html (320, 240)); & Lt; / Script & gt; & Lt; / Div & gt;
You receive the actual element like shoud to document.write Doing so, you are trying to add content, and enter HTML in it: document.getElementById ('modal-content'). InnerHTML = 'accessories to add here'; jQuery version:
$ ('# modal-content'). Html ('accessories to add here');
I have KHPHP installed on the root of a website and want to add a new directory with other content. So it looks like this now: www.cakephpsite.com and I also www.cakephpsite.com/directory.
But when I create a new folder on the root, the website does not go to it, instead it goes to the App / View / Wrong directory.
I have never used KKPHP, so I am sorry that this is very basic and some help will be helpful.
My .htaccess file looks like this:
& lt; Ifmodule mod_rewrite.c & gt; Rev. Rewrite Raul (. *) App / WebRot / $ 1 [L] & lt; / IfModule & gt; So the cake is expected to be in the files of PHP files / Webroot folder. Therefore, the .htaccess file is showing you the redirect to everyone for the app / webtrot. This means that you need to enter your new directory in the App / WebRoot folder, so this will be the app / webtrot / directory and it should work properly.
I had asked a question before, but I had to change my code a bit and I still could not understand that my database was an entry I am new to php and I am following a book where you can get the source code.
I do not get any error messages after running the code, but my code is the way I want it and I believe this is because the data is not being kept in the database, The rest of the code depends on it.
My code is where to send data to the database starting at line 66
For whatever reason my code posts anything to the database, I really helped anybody I appreciate
Here's my code:
" This image prints "} Catch (exception $ E) {Dead ($ e-> getMessage) );}} And {$ img_path = NULL;} // include database credentials and include in the database_on 'db.inc.php'; $ Db = new PDO (DBNXFO, DB_USER, DB_ PASS); "Image Path" resonates Is $ img_path, "& lt; //; go out; Go out; Do not echo "in the book" but here at source; // Edit an existing entry if (empty ($ _ POST ['id'])) {$ sql = "Entry Entries SET title =?, Entry =?, Url =? WHERE id =? LIMIT 1 "; $ Stmt = $ db- & gt; Ready ($ sql); $ Stmt-> Execution (array ($ _POST ['title'], $ img_path, $ _POST ['entry'], $ url , $ _POST ['id'])); $ Stmt-> closeCursor ();} // Create a new entry // Line 66 {// enter $ sql = "entries to save the entry in the database (Page, title, image, entry, url) value (?,?,?,?,?) "; $ Stmt = $ db- & gt; Ready ($ sql); $ Stmt-> Execution (array $ _ POST ['page'], $ _POST ['title'], $ img_path, $ _POST ['entry'], $ url); $ stmt- & gt; closeCursor (); // for successful URL usage Page key Store the information $ page = htmlentities (Strip_tags ($ _ POST ['page']); // Send the user to the new entry; "Hopefully we come here"; Header ('location: / simple_blog /' Page. '' ''.); Go out;}} and {header ('location: ../'); go out;}? & Gt;
You have to bind the results in the query using $ stmt-> bind_result, after which you have to execute without any arguments.
मैं
- नवीनतम धागा प्राप्त करने की कोशिश कर रहा हूं प्रत्येक मंच
-
- नवीनतम पोस्ट (आईडी, थ्रेड_आईडी, टाइमस्टैम्प, लेखक_आईडी) (आईडी, नाम)
- नवीनतम पोस्ट के द्वारा आदेश दिया गया , थ्रेड के सृजनात्मक पदार्थ से अप्रत्यक्ष।
क्यों? < / Strong> मैं इस तरह से विवरण प्रदर्शित करने में सक्षम होना चाहता हूं:
"फ़ोरम का नवीनतम उत्तर फोरम_आईडी प्रश्न $ धागा_आईडी पर दिया गया था। : $ post_id "
के रूप में forum_id f.id का चयन करें, f.name FORUM_NAME के रूप में, के रूप में thread_id, के रूप में thread_topic t.topic t.id, के रूप में t.ts thread_timestamp, p.id post_id के रूप में, p.content POST_CONTENT के रूप में, च मंचों, धागे टी, पदों पी कहां f.id = t.forum_id और t.id = p.thread_id ग्रुप f.id आदेश द्वारा से post_timestamp के रूप में p.ts द्वारा पी.टी.
कोई भी सलाह, इच्छित परिणाम प्राप्त करने के लिए एसक्यूएल को कैसे बदलना है संभव के रूप में NT? मैं उप-वर्गों से बचने की कोशिश कर रहा हूं लेकिन मैं खुले दिमाग का हूँ!
धन्यवाद अग्रिम!
चूंकि MySQL विंडो फ़ंक्शंस का समर्थन नहीं करता है, मुझे नहीं लगता कि यह एक सबक्व्यरी के बिना करने का कोई तरीका है:
SELECT f.id AS फोरम_आईडी, f.name AS FORUM_NAME, t.id के रूप में thread_id, t.topic के रूप में thread_topic, t.ts thread_timestamp के रूप में, p.id post_id के रूप में, p.content POST_CONTENT के रूप में, मंचों से post_timestamp के रूप में p.ts च JOIN (t2.forum_id का चयन करें, अधिकतम (p2 .ts) के रूप में पद से ts P2 पर p2.thread_id = t2.id ग्रुप t2.forum_id द्वारा धागे t2 शामिल हों) max_p पर f.id = max_p.forum_id पर max_p.ts = p.ts शामिल हों पदों पी एफ पर धागे टी में शामिल हों .id = t.forum_id और p.thread_id = t.id p.ts द्वारा आदेश स्वाभाविक रूप से, नवीनतम परिणाम कैशिंग आप मैक्स बुला के प्रदर्शन दंड के बिना यह कर देना होगा () है, लेकिन सही सूचकांक के साथ, यह एक मुद्दे के ज्यादा होना चाहिए ...
अद्यतन बिना धागे सहित के सबसे संक्षिप्त तरीके स्थिति
के रूप में forum_id f.id का चयन करें, f.name FORUM_NAME के रूप में, के रूप में thread_id t.id, t.topic के रूप में: के नियम व धागे के बिना मंचों वाम बजाय के एक आंतरिक मिलती मिलती है उपयोग करने के लिए किया जाएगा thread_topic, t.ts thread_timestamp, p.id post_id के रूप में, p.content POST_CONTENT के रूप में, p.ts वाम च मंचों से post_timestamp के रूप में के रूप में शामिल (t2.forum_id का चयन करें, अधिकतम (COALESCE (p2.ts, t2.ts)) के रूप में ts, COUNT धागे से POST_COUNT के रूप में (p2.ts) बायाँ शामिल हों पदों पर P2 t2 p2.thread_id = t2.id t2.forum_id द्वारा समूह) max_p पर f.id = max_p.forum_id बायाँ शामिल हों पदों max_p.ts पर पी = पी .ts बायाँ शामिल हों धागे टी पर f.id = t.forum_id और (max_p.post_count = 0 या p.thread_id = t.id) p.ts द्वारा आदेश
On an update called FHH, I get the following error:
Should be non-negotiable and less than the size of the collection. \ R \ nParameter's Name: Index
This is probably some bad mapping, what's the best way to diagnose it? I really want to see the update which is trying to issue it.
Here is the code:
Public Zero Update & lt; T & gt; {Ie.Update (value, tx); (ienumerable & lt; T & gt; value) {foreach (var value in values) {{var tx = session.BeginTransaction ()); Tx.Commit (); If you can post your mapping this will help, but this usually happens when you have a parent & gt; Includes a mapping for the foreign key column for the same relationship in the hair relationship using the flint context syntax and . The result is, mapping en hibernate twice in the area and as a result of the error that you are experiencing.
When you use the reference syntax, nHibernate takes care of the foreign key column for you, however, if you still want it in your object then just change the definition of your mapping in that area < Code> to read () There is an option to treat the problem if you do not need it, then you can completely remove it from your mapping definition.
To answer strictly to ask questions (to diagnose yourself) I suggest 2 options:
- Free option -
Install log4net and configure the nHibernate to output the logger component to all your SQL statements. In this way you will see abusive statements in log files and will be able to separate the problem. - Cost Options - Downloads and Trials / Buy by Rhino Hibernating It will give you full details of all the SQL statements sent to the database by nHibernate, will be completed with recommendations or warnings for improvements, and all a good In GUI
I have two apps: one app is asp.net and another window is running in a window service.
The Windows service running in the background is doing some tasks (reading and updating) on the database, while the user can perform other operations on the database via the asp.net app. So I'm worried about it, for example, in the windows I make some records that satisfy a condition and then I iterate over them, like something:
IQueryable & Lt; EntityA & gt; Collection = Reference.Entiss.way (& lt; condition & gt;) Agram (existence unit in the collection) {// some stuff} Therefore, if the user modifies that record Which loop is used later, the value for that record is taken in the EF account? When originally done:
context.EntitiesA.where () or modified by the new user and located in the database ?
As far as I know, during the repetition, EF is taken on demand for every record, I mean, one by one, so when the next record for next recurrence is read This record is linked to:
context.EntitiesA.where (& lt; condition & gt;) or located in database (user Has been modified now)?
Thank you!
There are some procedures that will come in the form of drama, how it will work in EF.
- Query is done only on calculation (this is sometimes referred to as query magnification) At this point the entire query will be done
- Your system is listed above Example:
So what does this mean in your case:
// There is nothing here. You are only describing that later / Execute one here to execute / query. .OARRA or similarly, to prevent people from adding to SQL / // as a result of this use. ANNIMERABLE IQueryable & lt; EntityA & gt; Collection = context.EntitiesA.where (& lt; condition & gt;); // When this first hit this foreach one // SELECT {Cols} FROM [YourTable] where [your condition] will be foreach (EntityA unit in the archive) {// data will start foreach from time to time (eg if you have database If you have updated during counting, you will have old data) // Do some things}
यह मेरी नियमित अभिव्यक्ति है:
$ pattern_new = "/ & lt; td & gt; ( \ n | \ रों) * (। & lt; अवधि (\ n | \ s |)? * & LT; \ / strong & gt; (\ n | \ रों) * \ $ (& lt;? कीमत & gt; ([0-? ।।? 9] *)) *) \ $ (*) (\ n | \ रों) *। & lt;? / "; यह नमूना पैटर्न है, जिसमें से मुझे एक मैच करना है:
& lt; td & gt; & lt; मजबूत & gt; .zx & lt; / strong & gt; & lt ; / Td & gt; & lt; td & gt; & lt; स्पैन वर्ग = "ऑफ़र" & gt; & lt; मजबूत & gt; एक्सस्री: & lt; br & gt; & lt; / strong & gt; $ 299 xxxxx & amp; एक्स; एक्सएक्स & lt; span class = "fineprint_number" & gt; 2 & lt; / span & gt; & lt; / span & gt; & lt; br & gt; डी में & amp; ईए की $ 399 & lt; / टीडी & gt; & lt; टीडी & gt; zxcddcdcdcdc & lt; / टीडी & gt; & lt; / टीआर & gt; & lt; टीआर वर्ग = "अंधेरे" & gt; & lt; टीडी & gt ; & lt; strong & gt; .aa.rr & lt; / strong & gt; & lt; / टीडी & gt; & lt; टीडी & gt; & lt; span class = "प्रस्ताव" & gt; & lt; strong & gt; xscre: & lt; br & gt; & lt; / strong & gt; $ 99 xxxxx & amp; x; xx & LT; span class = "fineprint_number" & gt; 2 & lt; / span & gt; & lt; / span & gt; & lt; br & gt; डी में & amp; EAE की $ 199 & lt; / टीडी & gt; & lt; टीडी & gt; xxxx & lt; / टीडी & gt; & lt; / टीआर & gt ; & lt; टीआर वर्ग = "बार" & gt; & lt; टीडी colspan = "3" & gt; & lt; / टीडी & gt; & lt; / टीआर & gt; & lt; टीआर वर्ग = "उज्ज्वल" & gt; & lt; टीडी & gt; & lt; strong & gt ;. vfd & lt; / strong & gt; & lt; / टीडी & gt; & lt; टीडी & gt; & lt; span class = "प्रस्ताव" & gt; & lt; strong & gt; xscre: & lt; br & gt; & lt; / strong & gt; $ 99 xxxxx & amp; x; xx & LT; span class = " fineprint_number "& gt; 2 & lt; / span & gt ; & Lt; / span & gt; & lt; br & gt; डु & amp; ee; s $ 199 & lt; / td & gt; & lt; टीडी & gt; xxxxxxxx & lt; / td & gt; & lt; / tr & gt; & lt; tr वर्ग = "अंधेरे" & gt; & lt; td & gt; & lt ; strong & gt; .qwe & lt; / strong & gt; & lt; / टीडी & gt; & lt; टीडी & gt; & lt; span class = "प्रस्ताव" & gt; & lt; strong & gt; xxx & lt; br & gt; & lt; / strong & gt; $ 99 xxxc; ओ & LT; span class = " fineprint_number "& gt; 2 & lt; / span & gt; यहां मैं PHP में क्या कर रहा हूं
$ pattern_new = "/ & lt; td & gt; (\ n | \ s) *? (& Lt; अवधि (\ n | \ s |।) * & LT; \ / strong & gt; (\ n | \ रों) * \ $?।? (& lt; कीमत & gt;) * ([। 0-9] *) *) \ $ (\ n | \ रों) * & lt (*।?); / ";? $ Source = file_get_contents ("https://www.abc.com/sources/data.txt"); Preg_match_all ($ pattern_new, $ स्रोत, $ match_newprice, PREG_PATTERN_ORDER); गूंज $ स्रोत; print_r ($ match_newprice); $ match_newprice एक खाली सरणी लौट रहा है। जब मैं एक regex tester का उपयोग कर रहा हूं या मैं एक परिपूर्ण मैच नहीं मिल रहा है मुद्दों पर बिल्कुल भी, लेकिन जब मैं php preg_match_all का उपयोग कर रहा हूं तो यह एक खाली सरणी लौट रहा है। मैंने pcre.backtrack_limit बढ़ा दिया है लेकिन इसकी अभी भी यही समस्या है मुझे समस्या को समझ में नहीं आता। किसी भी मदद की बहुत सराहना की जाएगी।
एक और समस्या जो PHP से संबंधित है: < पूर्व> & lt;? Php गूंज "\ $"। PHP_EOL; प्रतिध्वनि '\ $'। PHP_EOL; परिणाम:
$ \ $ ... दोहरे उद्धृत स्ट्रिंग्स में $ एक चर की शुरुआत को दर्शाता है, और अगर आपको एक बेअर $ मतलब है तो बचने की आवश्यकता है अपने रेगेक्स के आसपास एकल उद्धरण रखें & amp; यह संभवतः ठीक होगा (अगर आपने विस्तार से देखा नहीं है, तो आप / x विकल्प का उपयोग करना चाहते हैं और कुछ स्वरूपण व्हाइटस्पेस / टिप्पणियां जोड़ सकते हैं यदि आपको अब से आधा वर्ष डीबग करना है )।
Using chrome, I am trying to read and process a large (& gt; 4GB) binary file on my local disk.
This file contains a sequence of frames containing a 1-byte type identifier, a 2-byte frame length, 8-byte time stamp, and then some binary data that is format based on format . The contents of these frames will be stored, and I want to use HTML5 + Javascript to create graphics and display other metrics in the form of real-time playback based on the content of this file.
Anyone have any ideas?
Basically, files are blops and blobs are one piece method, which we capture small portions of large files Can use for
I wrote to filter large log files last week, but this pattern shows that you have loop sub-
file is a file object The Funnelline filter is a function that accepts a line of file and gives it the right to keep it - li>
- fnComplete is a callback where an aggregated lines form an array Is passed
Here is the code I used:
function fileF Ilter (file, FnLineFilter, fnComplete) {var bPos = 0, mx = file.size, BUFF_SIZE = 262144, i = 0, collection = [], lineCount = 0; Var d1 = + new date; Var balance = ""; Grab function Next Chunk () {var myBlob = file.slice (BUFF_SIZE * i, (BUFF_SIZE * i) + BUFF_SIZE, file.type); I ++; Var fr = New FileReader (); Fr.onload = function (e) {// run line filter: var str = remainder + e.target.result, o = str, r = str.split (/ \ r? \ N /); Balance = r.slice (-1) [0]; R.pop (); LineCount + = R. Lamps; Var Rage = R.map (Funnel Filter). Filter (boolean); If (rez.length) {[] .push.apply (collection, rays); } / * End if * / if ((BUFF_SIZE * i)> MX) {fnComplete (collection); Console.log ("filtered" + file.name + "+ + (+ new date () - d1) +" ms "); } / * End if ((BUFF_SIZE * i)> Mx) * / else {setTimeout (grabler, fickle, 0); }}; Fr.readAsText (myBlob, myBlob.type); } / * End grab Next Chunk () * / grabber (Chunk); } / * End fileFilter () * / Obviously, you can get rid of searching the line, and only hold pure categories instead; I was not sure what type of data you need to dig, and the important thing is that slice mechanics, which are well displayed with text-centric code.