Posts

Showing posts from August, 2010

python - Setting $PATH variable with Fabric 1.6.0 -

I am trying to run a command that I have installed in my home directory on a remote server in this .bash_profile Already have been added to my $ PATH. I am able to use it while logging in remotely via a normal SSH session, but do not drag the cloth into my $ Piath. Thus, I have tried to use it as a fabric in my packet form: def test_path (): print ('My env.path setting:% (path) s' Running '($') run ('Dush') The answer with the fabric: / usr / bin: / usr / local / game: / usr / games out :: execution 'test_path' My env.path settings: play: $ PATH out: / Usr / local / bin: / usr / bin: / bin / run: echo $ PATH out: / usr / local / bin: / usr / bin: / bin: / usr / local / games: / usr / games: / path / To / sources / Dash out: Run: Dash Out: / Bin / bash: drush: Mand not done while executing Fatal error: Run () nonzero return code to get 127! Requested: Draft executed: / bin / bash -l -c "Export Pat = \" \ $ Path: \ "/ path / to ...

xslt - Add CDATA to an xml file -

मैं कुछ XML टैग्स के आसपास कुछ CDATA टैग जोड़ना चाहूंगा XML स्रोत (यह मेरी फ़ाइल का केवल एक छोटा सा हिस्सा है) & lt; teasertext_fr & gt; & Lt; div xmlns: xlink = "http://www.w3.org/1999/xlink xmlns =" ​​http://www.coremedia.com/2003/richtext-1.0 "& gt; & lt; पी & gt; 2012 आईएसटी एफएआई वाइले Länder ein wichtiges Wahljahr Reihe fühlt der weltweiten Demokratie auf den Zahn के & lt मरो;।। / p & gt; & lt; / div & gt; & lt; / teaserText_fr & gt; क्या मैं चाहूँगा & lt; teasertext_fr & gt; & lt;! [CDATA [& lt; div xmlns: xlink = "http://www.w3.org/1999/xlink" xmlns = " http://www.coremedia.com/2003/richtext-1.0"><p>2012 IST für viele Länder ein wichtiges Wahljahr मरो Reihe fühlt der weltweiten Demokratie auf den Zahn। & lt;। / p & gt; & lt; मेरा xslt & lt;? Xml संस्करण = " 1.0 "एन्कोडिंग =" आईएसओ -8859-1 "? & Gt; ...

Is it possible to connect to Apache on my desktop from my phone while using Chrome Remote Debugging? -

Image
I'm doing this (Chrome Remote Debugin): I want to be able to Is there any way to do this? Thank you, so use a local host from my phone or any of my vahost (via Apache on my desktop). а lot! Do I really understand that you are running Apache on the workstation and your phone is a website Hosted on? Yes, this is possible. The easiest way is to include your phone in the same network (WiFi) as your workstation and connect your phone to http: // ip-adra-of-workstation . Then normally use remote debugging. Alternatively, you need to configure your WiFi router to enable port forwarding. The basic idea is that there is wifi router control traffic between your personal home network (where is your workstation) and public internet (where your phone is), and port forwarding allows the inbound traffic to the internet to route to your private network. . Here is the configuration page for my wifi router. My workstation's private IP address is 192.168.1.5 and I am runni...

shell - Bash scripting, multiple conditions in while loop -

I am trying to get a general position while using two situations, but different syntax forums, I Error can not stop throwing what I have here: while [$ stats -gt 300] -o [$ stats -eq 0] I Also tried: while [[$ stats -gt 300] || || [$ Figures -Ece 0]] ... as well as many other constructions I have to continue this loop, while $ stats & gt; 300 or $ stats = 0 . The right choice (increasing in order of recommendation): Single POSISIS test commander with #Oo operator (now not recommended) # It is strongly recommended to keep quotation free from blank or undefined variables, while ["$ statistics" -gt 300 -o "$ figures" -ece 0] # Two POSIsi joined the list with test orders || # It is strongly recommended to keep quotation from blank or undefined variable while ["$ figures" -gt 300] || ["$ Statistics" -ece 0] # Two hardcore conditional manifestations joined a list || While [[$ figures - gt 300]] || [[$ Figures - EC 0]] # S...

How do I add autocomplete to Drupal's core search form? -

I'm talking about some things like jQuery UI's AutoComplete, enabled on core search form The handler should return the suggested words from the database query (I already have a short title saved in an existing field). I know that there is a bunch of contrib modules that allow you to create an autocomplete field, but they do not apply in such a core search form even though I may be wrong. These are two articles that I have found which seem most useful: Is anyone else otherwise received it ? Thank you Have you tried that you have to do some configuration I did not get it completely, but With this, the initial game gets the idea that it will solve your problem. Just check your document for more details.

sql - How to get top 5 selected items with mysql query? -

मेरे पास एक तालिका सबमिट की गई है और एक तालिका उत्तर आईडी है, और ans फ़ील्ड ans एक varchar (255) फ़ील्ड है "18,19,20,22,23,25" जैसे अल्पविराम से सीमांकित डेटा शामिल हैं ये सभी नंबर आईडी से उत्तर तालिका में सहसंबद्ध होते हैं उदाहरण तालिका संरचना submitted_answers आईडी (पूर्णांक) ans (varchar (255)) 1 "18, 19" 2 "21, 22" उत्तर आईडी 18 "मनी" 19 "गोल्ड" 20 " जो कुछ भी "21" जो 2 " मैं इन तालिका में कैसे शामिल हो सकता हूं और देखता हूं कि कौन सा शीर्ष 5 आइटम सबमिट किए गए_सॉवर में सबसे अधिक दिखाई देते हैं। ans फ़ील्ड। बेशक, आपका डेटाबेस संरचना भयावह है। आपको किसी संबंधपरक डेटाबेस में अल्पविराम-सीमांकित स्ट्रिंग के रूप में आईडी की सूची का प्रतिनिधित्व नहीं करना चाहिए। उस ने कहा, आप पर क्लॉज के एक चतुर उपयोग के साथ क्या कर सकते हैं: कॉन्टैक्ट (',', साई, ',') जैसे कंसैट (' %, ', A.id,',% ') समूह a.id द्वारा, a.ans आदेश cnt desc सीमा 5

java - App Engine: Keep Socket Open more than 2 Minutes -

Using the App Engine Trusted Tester Socket to connect with APNS. Writing in the socket works fine. But the problem is that the socket is retrieved after 2 minutes of inactivity. It has been said in the Trusted Tester website that a socket operation is responsible for the socket for 2 minutes. As long as the APNS decides to close the connection, it is good to keep the socket open. After trying the socket API methods after typing in the output stream, the socket closes after 2 minutes. you can not keep the socket connected to the artificially open APNS ; The only way to keep it open without sending the actual push notifications is to send some arbitrary data / bytes, but the result will immediately stop the socket; The APNA closes the connection as soon as it detects something that does not conform to the protocol, that is, there is no real push notification. SO_KEEPALIVE What about SO_KEEPALIVE ? The app engine clearly states that it is supported. I think this mean...

jquery - Exit Pop Javascript not functioning properly -

I'm trying to pop out this work. So far, I can work on Mac in FF, Chrome and Safari, but I am struggling with IE, FF, Chrome for Windows. These are two snippets I have tried to do so far: & lt; Script language = javascript & gt; Function thanks () {var win = window.open ("[url.com]", "_blank", "left = 20, top = 20, width = 500, height = 500, scrollbars = 1"); Win.focus (); } & Lt; / Script & gt; & Lt; Body onUnload = "thankYou ()" & gt; and & lt; SCRIPT & gt; Function Thanks () {var ConfirmStatus = Confirm ("We want to get your feedback on your experience on this page. Do you want to complete our short survey?"); If (ConfirmStatus == true) {window.open ("[url]", "win", "left = 20, top = 20, width = 500, height = 500, scrollbar = 1"); } And {window.close (); }} Window.onunload = thankYou; & Lt; / Script & gt; Windows is not sure how it works, thanks...

backbone.js - Object [object Object] has no method 'on' -

I am very new to the spinal cord and I'm studying, to follow her example to create a todo list for. I can not understand why this code does not work: var Todo = Backbone.Model.extend ({default: {title: "", completed: false}, start: function () {Console.log ("model started"); this.on ("change", function () {console.log ("values ​​for this model have changed.");});}}) ; Var todo1 = new Todo (); The library I have added is jQuery, underscore and backbone. What's wrong with this? Why ".on" is not available? Thanks on only included in backbone 0.9.0. You need to update it.

mysql - Selectig a row with a column value that exists only when another column has got just certain value -

कृपया, निम्न MySQL तालिका पर विचार करें | ---- + --- ----- + ---------- | | आईडी | परिणाम | संदर्भ | | ---- + -------- + ---------- | | 1 | ठीक | 33 | | 2 | ठीक | 46 | | 3 | को | 55 | | 4 | को | 55 | | 5 | ठीक | 55 | | 6 | को | 47 | | 7 | को | 89 | | 8 | ठीक | 91 | | 9 | को | 47 | + ---- + -------- + ---------- + मैं पंक्ति का चयन करना चाहता हूँ जिसका परिणाम = को और संदर्भ = 47 क्योंकि संदर्भ 47 किसी भी पंक्ति में मौजूद नहीं है जिसका परिणाम = ठीक है इसके अलावा मुझे यह पंक्ति सिर्फ एक बार चाहिए, क्योंकि यह मामला दो बार (आईडी = 6 और आईडी = 9) होता है, हालांकि यह एक बार हो सकता है वास्तव में क्वेरी के लिए मैं पूछ रहा हूँ, आईडी = 89 के साथ पंक्ति भी दिखाई देनी चाहिए, संदर्भ = 89 के रूप में, परिणाम = को और संदर्भ = 89 और परिणाम = ठीक के साथ कोई अन्य पंक्ति नहीं है। आप पहले से बहुत बहुत धन्यवाद! आप उपयोग कर सकते हैं: पृथक परिणाम का चयन करें, संदर्भ से [डीबीओ]। [संदर्भ] एक्स के रूप में नहीं है, जहां से मौजूद नहीं है (SELECT * FROM [dbo]। [संदर्भ] वाई वाईएआरईआरएआर = एक्स। रेफ...

nsdictionary - Mutable deep-copy of a NSMutableDictionary -

First of all I found something similar. But this does not solve my problem I have it. A NSMutableDictionary as a template NSMutableDictionary * mutableDictionaryTemplate = [NSMutableDictionary dictionaryWithObjectsAndKeys: @ "obj1, @" key1 ", @" obj2, @ "key2", zero]; Now I copy this dictionary, then change some parts and later. NSMutableArray * savedIterations = [NSMutableArray want to save in a new NSMutable array]; // Some loops that usually change objects i int = 0; (I & lt; 5) {NSMutableDictionary * copiedDictionary = [mutableDictionaryTemplate copy]; [CopiedDictionary set object: @ "obj3" for: @ "key3"]; [Saved change addObject: copiedDictionary]; I ++; } My problem is that it is now variable once I copy the NSMutableDictionary "mutableDictionaryTemplate". But I need to copy it because otherwise I will have the same NSMutableDictionary in my index of each of its NSMutableArray "savedIterations...

F# on SharpDevelop and command line arguments -

I was trying to use Perceptual Development 4.3 as F # IDE. I asked questions on the rapid development forum, but it has been a week and I have not received any response. When I want to debug the program, how can I actually pass command line arguments for the program running through IDE? I went through the project options menu items, and all tabs were included, but I did not recognize any location for command line agreement. I also tried to use Zaviri, but when I try to create an F # application F # addin that is included with SharpDevelop, there is currently no way to set up command line arguments. You run your F # application. There is no debug tab available under Project Options currently available The only option needs to be modified.

r - Barplot with significant differences and interactions? -

Image
I use a Barplot with your data and ANOVA statistics would visualize the joints, it is important that significant differences Get a signal of the conversation. How can you create such a conspiracy by using R? This is what I would like: Important difference: key interactions: the bACKGROUND I currently Using the barplot 2 {ggplots} at the plot time and confidence interval, but I would like to use any package / process to do the job I'm ready. To get the data I currently TukeyHSD {stats} or pairwise.t.test {for stats} difference and ANOVA functions ( aov ezANOVA {ez} , gls {nlme} ). Just to give you an idea, this is my current conspiracy: As you type the function barplot2 () from the library Gplots , give examples using this approach. First of all, the barplot2 () function in the form of a barlot given in the help file. The duplicate confidence interval value is ci.l and ci.u the barplot must be saved as an object. hh If you see the o...

html - Making part of an image clickable -

मेरे पास इस तरह से एक पृष्ठभूमि छवि लागू है HTML & lt; div id = "background "& gt; & Lt; img src = "stock.png" वर्ग = "खंड" alt = "चित्र" / & gt; & Lt; / div & gt; सीएसएस # बैकग्राउंड {चौड़ाई: 100%; ऊंचाई: 100%; स्थिति: पूर्ण; बाएं: 0 पिक्सेल; शीर्ष: 0 पिक्सेल; Z- सूचकांक: 0; }। स्ट्रेच {चौड़ाई: 100%; ऊंचाई: 100%; } मुझे क्लिक करने योग्य छवि के एक क्षेत्र का एक हिस्सा होना है, ताकि यह मुझे अगले पृष्ठ पर लिंक कर सके, ऐसा करने के लिए कोई आसान तरीका? आप हमेशा इसे रिश्तेदार और z-index लिंक बना सकते हैं उचित स्थिति: & lt; div id = "background" & gt; & Lt; img src = "stock.png" वर्ग = "खंड" alt = "चित्र" / & gt; & Lt; a href = "पथ / प्रति / url /" class = "link" & gt; & lt; / a & gt; & Lt; / div & gt; फिर कुछ ऐसा: # बैकग्राउंड {चौड़ाई: 100%; ऊंचाई: 100%; स्थिति: पूर्ण; बाएं: 0 पिक्सेल; शीर्ष: 0 पिक्सेल;...

ruby on rails - Error Installing RVM through Cygwin in Windows -

After I am trying to install RVM via Cygwin, the following. After creating the directory and closing the Git repository, I need to run ./osx_or_cygin_kick_off to start the installation process. This is the error message I'm getting: $ ./osx_or_cygwin_kick_off ./automation/rvm/rvm_install: Line 2: $ '\ r': Command not found. / Automation / rvm / rvm_install: line 3: syntax unexpected token 'error with' $ '\ r' '' / automation / rvm / rvm_install: line3: `install_rvm () ./automation/rvm/rvm_install_some_rubies: line 2: $ '\ R': Command not found ./automation/rvm/rvm_install_some_rubies: Line 3: Unexpected token 'Syntax error near $ `\ /' automation / rvm / rvm_install_some_rubies: line3:` install_some_rubies () I have read somewhere that the files are unix self To convert through the dock in Form 2 can solve the problem, but it is only made more error messages. Any suggestions? edit: The problem is that Some Sig...

javascript - Check dropdown before submit -

Before using this I will use this code to select the dropdown opton. On my page I have 3 dropdown menus, but only the first job is right. Is there a way to extend the function to the second and third dropdowns? My script: & lt; Script type = "text / javascript" & gt; Click (function () {var year = $ ('# option option: selected'). Val (); if (year == "") {$ ("# Msg"). Html ("Please select one year Do "); return back;}}}};}); & Lt; / Script & gt; My HTML: & lt; Div id = "msg" & gt; & Lt; / Div & gt; & Lt; Form method = "post" verb = "" & gt; & Lt; Select id = "year" & gt; & Lt; Option value = "" & gt; OLLA & lt; / Options & gt; & Lt; Options & gt; 1991 & lt; / Options & gt; & Lt; Options & gt; 1992 & lt; / Options & gt; & Lt; Options & gt; 1993 & lt; / Options ...

cron - Processing a large amount of data using jobs in php -

We have a website that has 'project' on it with a certain number of people subscribed to each project. On 'End' of a project, all subscribers gather and process. In this case, there are about 1,000 subscribers whose data needs to be dragged and processed. There is also some related data that is stored in any data with each data set. The last time we processed a large order, ~ 300 items were exited from PHP memory, we increased memory and it was able to process it. I do not think this time will be the case. We currently employ those jobs that drag the project to process the customer. In this work, the SQL query is executed to pull all the 'subscribers' and store them and their related data in the array. My question is: Is there a way to do this 'block' or something else? Or better way that the effect on memory will be reduced? Now it flows: The project ends Prevent the array of data from MySQL (Subscriber) Given, and a separate jo...

CouchDB - how to fetch older revision of documents, within _revs_limit ,after compaction -

Then I read it on the couchdb wiki page - * _revs_limit defines an upper limit of document modifications that can be used for couchdb Keeps track, even after compaction. * But when I try to recover an old amendment (after compaction) which is within the _revs_limit range - I did not get a 404 doctor. I am doing GET only on Doctorate and Old_Ravid Can anybody advise about the number of older versions of 'N' about the advice / advice of the document No, coincidence removes all previous revisions, and can not be configured. No, coincidence removes all previous revisions, and can not be configured. It should also be noted that revision number is not a mechanism of version control, instead it is completely concurrency control / conflict-prevention. You will have to use another method to get the document version, such as those listed or

Rails and jQuery: saving states in sessions -

I'm trying to save a jQuery toggle position in a Rail app with little success How do I store? Or will I store it in a cookie? Thanks for your help. Here the toggle handles jQuery: $ (function () {function showHideDocuments () {$ ("# accordion"). Toggle ("blind", 500 );}; $ ("#define-document"). Click (function () {showHideDocuments (); return false;});}); I do not really know how to proceed from here thanks! For anyone else who is struggling with it, here is a solution: jQuery Cookie Plugin Use: $ (document) .ready (function () {$ ('# finalized-documents') click (function () {if ($ ((': hidden' ) $ (': Hidden')) {$ ('# amperian'). SlideDown (500); $. Cookie ('vismaymount', 'showing');} and if ($ ('$' ('' Slowup (500); $. Cookie ('awkward', 'hidden');}}); ($ cookie ('forgetmeow') == ' Hidden ') {$ (' # accordion '). Hide (); };}); ...

PHP converting my floats to integers in my array -

मेरे पास यह कोड है: $ val = (float) $ desc; यदि (! ($ रनपेज ['सांख्यिकी'] [$ कुंजी])) {$ रनपेज ['सांख्यिकी'] [$ की] = (फ्लोट) 0.0; } $ रनपेज ['सांख्यिकी'] [$ की] + = $ val; जहां $ val एक फ्लोट है। लेकिन जब मैं अंत में सरणी मुद्रित करता हूँ तो सभी मान पूर्णांकों के रूप में समाप्त होते हैं I उदाहरण के लिए, यदि वही $ की के लिए 1.5, 1.5, 1.5 है, तो यह 3 से 4.5 की बजाय प्रिंट होगा। मुझे यकीन नहीं है कि यह ऐसा क्यों कर रहा है संपादित करें: यहां सरणी का आउटपुट है [statistics] = & gt; एरे ([जादू प्रवेश] = & gt; 9 [क्षमता प्रति स्तर] = & gt; 9 [आंदोलन की गति] = & gt; 3 [जादू विरोध] = & gt; 9) क्षमा करें, मैं अपना प्रश्न भूल गया $ key एक फ़्लोट था। $ val के मामले में? मुझे नहीं पता। यह मूल्यों के लिए ठीक काम करना चाहिए, इसलिए समस्या का स्रोत अन्यत्र हो सकता है PHP में यह पूर्णांक जोड़ने और एक साथ फ़्लोट करने के लिए सुरक्षित है और इसका परिणाम फ्लोट होगा। यदि $ की एक फ्लोट था: यह सामान्य, व्यवहार Arrays को फ्लोट्...

java - awt eventqueue 0 nullpointerexception error -

Well I'm getting error awt eventqueue 0 nullpointerexception error . When I removed the Jepinl try to remove me What does confuse me when I have another JPanel , it works perfectly fine But it's not like this one. The first code below shows the JPanel that it does not remove JPanel when I click on JButton . implement public square buttontime ActionListener does {// timebutton make the action list for implementing a Knbokoboks public void action to click on (ActionEvent clickTime) {value object = New Price (); PriceObject.getPricepanel (); Delete (priceObject.getPricepanel ()); PriceObject.getPricepanel () re-verified () .; Add (timeObject.getTimePanel (), Border Layout. EAST); TimeObject.getTimePanel () re-verified () .; }} // This gives me 0 errors I public class Btnpriks ActionListener implements {// Klikpris a Knbobaks public void Akshnprrfed (Action event to make Akshnlilder to click on Taimbtn) {Price Price object = New Price () ; PriceObject.SelectPrice ...

ios - Top-aligning text of different sizes within a UILabel -

Image
How to align the text of various sizes within the UILB? For example, small-sized whistle zodiacs are top-aligned with the value-banner equivalent to a large-sized dollar. IIS6 supports UILB NSAttributedString so that I can get the text of different sizes in the same UILBL. Although there is no attribute for top-aligned text. What are the options to implement this? It seems that it may be best to provide custom drawing logic for top-alignment based on a custom string key, but I do not know how it is known about it. I was able to get my desired results by using a label. By using a little math you can offset the baseline of small text to achieve your desired result. (NSString *) salePrice withFont: (UIFont *) font {if ([salePrice rangeOfString: @ "."]. Location == NSNotFound} {return It yields the following:

javascript - Email address validation of Top Level Domain -

Our QA has filed a bug that states that the top level domain of the email address can not be of one character. foo@bar.z Seeing the standards, I have a hard time finding whether someone can confirm that the minimum level of the top level domain is determined Is the right thing to do? The rules are as complex as the email address to validate, the more complicated as they are buggy in their implementation Are likely to be. Instead of validating an email address, consider checking it directly instead: The problem with your case is that there is a very real possibility that ICANN will be the one-on-one -performed domain names, and individual DNS labels can be be of length 1, in fact "bar.z" is a valid email address domain name if a DNS tree / organization Sent from within, where it is a sub-domain of fun (Like mailerver smtp.mycompany.org and I have also defined an MX server for the bar .z.mycompany.org ).

c - scope of struct pointers in functions -

अगर मेरे पास फ़ंक्शन में निम्न है: struct उदाहरण * A = malloc ( आकार (संरचना उदाहरण)); क्या नोड / मेमोरी स्पेस बनाया जाता है जहां फ़ंक्शन समाप्त होने / पत्तियों के बाद एक अंक नष्ट हो जाता है? या क्या ढेर में रहना है? नहीं malloc द्वारा आवंटित स्मृति मुक्त 'd। इस तरह से करने से पहले आवंटित रहेगी: char * फ़ंक्शन (शून्य) {char c = 'a'; वापसी और सी; } दूसरी ओर, , बुरा है, क्योंकि यह ऑब्जेक्ट गुंजाइश से बाहर जाता है जब फ़ंक्शन समाप्त हो जाता है। malloc आवंटित स्मृति ढेर पर घोषित करने वाले चर स्टैक पर स्थान आवंटित करते हैं। ढेर क्षेत्र से प्रभावित है, ढेर नहीं है। पॉकेटर्स के उपयोग के बारे में अतिरिक्त जानकारी के लिए, जैसे मेमोरी लीक ( malloc 'ऐसी स्मृति जो हमेशा के लिए बनी रहती है), यात्रा करें।

android - java.lang.Void vs void vs Null -

What is the difference between zero , zero , and I Rather than null ? I am asking this because I am looking at the sample Android code where they used zero but eclipse errors (this can not be solved in zero in a variable ). My code that breaks public class MyAsyncTask asyncTask and lt; Zero, zero, boolean & gt; .} I use it like this MyAsyncTask myAsyncTask = New MyAsyncTask (); MyAsyncTask.execute ((zero), blank); // It breaks "zero can not be solved in a variable" You have an extra comma in your code myAsyncTask.execute (zero, zero); // ^ Additional comma right here In addition, there is no need to insert null to zero because (1) zero does not have any examples and thus there is no zero object, and (2) casting null anything is useless because of any The zero valid value for the object data type is The code should rarely be: myAsyncTask.execute (null);

Index out of range. Must be non-negative in VB.NET -

I'm a newbie here, I'm getting an error regarding unable to resolve with myself (delete DataGridView part) So come here, ask for the guide and help me .... appreciate your help! Load Data Incident `Public Sub-Load DDGV () New SqlDataAdapter as Stable = Sqlcmd as DM sqlq as Dim tbl. Connection with Sqladpt = conn end Select = sqlcmd Select = sqlcmd Fill (tbl) with DataGridView1.Rows.Clear end () I = 0 for tbl.Rows.Count- 1 with DataGridView1.Ro Add (tbl.Rows (i) ("ChatConttentID"), tbl.Rows (i) ("title"), tbl.rows (i) ("chat content"), TBL.ro ("chat date time" "), TBL. ROS (I) (" User Name ")) and the next conn with the signal. Close () End Sabba Delete Part Error Error `conn.State = ConnectionState.Closed then conn.Open () end if I = 0 DataGridView1.Rows.Count for - 1 Dim Deletemore Integer = DataGride View 1. Selected (I). Game (0). Value and lieutenant; ------ {error in line} String = as the squared square ...

java - Analyze / Filter all variables without declaring each one? -

Say you have 70 different variable variables, and you want to analyze them all and want to set any one equal to zero to 1, If for each variable two Let's write statements, can you just write one? Is there a way to do something like this: if ("anyInt" == 0) {"thatInt" = 1;} ? Use the code> int [] then repeat them using one for the loop int [] nums = new int [70]; // Put all your numbers in the array, that is [0] = 5;

objective c - How to implement the magnifier glass on color picker of Mac OS? -

Image
यह शीर्ष बाईं ओर मैग्निफायर ग्लास है: मैंने 2 तरीकों की कोशिश की है, लेकिन दोनों विफल हो गए हैं। एक बार आवर्धक गिलास क्लिक किया, एक नया कर्सर (मैग्निफायर ग्लास छवि वाला कर्सर या कोई क्रॉसफेयर, जो भी हो) बनाएं और उसे पुश करें, फिर अगला ए्वेट मैचिंग मास्क कॉल करें: डेटेड: इनबॉक्स: डेक्यू: of NSApplication जब तक हम एक NSLeftMouseUp ईवेंट प्राप्त नहीं करते सभी घटनाओं को खाने के लिए यह काम करता है, लेकिन पूरी तरह से नहीं, अन्य खिड़कियों या ऐप का आदेश दिया जाएगा जब क्लिक बिंदु मूल विंडो से बाहर हो जाएगा एक NSColorPanel बनाएँ, पैनल में एक नकली माउस क्लिक ईवेंट भेजने का प्रयास करें। यह रंग व्हील पर काम करता है, लेकिन जब मैं ईवेंट स्थान को मैग्नाइयर ग्लास बटन में बदल देता हूं, तब इसका कोई असर नहीं होता। [1] में प्रश्न: मैं सभी सिस्टम को कैसे रोक सकता हूं जब उपयोगकर्ता बाएं बटन पर क्लिक करता है तो प्रेषण करने वाली माउस इवेंट्स? प्रश्न [2]: क्या यह संभव है? अगर हम चाहें तो क्वार्ट्ज इवेंट्स सर्विस का उपयोग किया जा सकता है सैंडबॉक्स के तहत क्वार्ट्ज इवेंट सेवा...

javascript - How do I make it so people can't save my JSFiddle over my own? -

I am having a problem with JSFiddle, when I go to my dashboard and open the ownership of JSFD I am working on, this 52 (my rev 43 was) improved and fully edited. As all my code went in and it was replaced with some random code, which has nothing with my original Bedle Am I doing something wrong with my JSFiddle setup method? Or is there something that I can do? If you are logged in jsFiddle, then only the logged user owns the base version. Sharing the versions may create their own versions, but the original version can not be changed unless I set a new version in the base. "Use Base, Luke" If I need to share more than one version, then I just hit the fork and make a new base version to share. In this way my version that I have created and shared is always the base version. I also have to remember which version is my version because it is always just the base version.

Union type in ActionScript? -

Do you know that action script support is the union type? For example, something like this: function fu (x: class union union) {// x class A or class b / something}} Thanks in advance ActionScript does not support 3C ++ compile class hierarchy Uses the AS3 rather than the Interface approach used in many object-oriented languages. Generally, an interface is an abstract template of functionality, which allows communication between objects, which is unrelated to class hierarchy. Like: public interface IBox {function addContentToBox (contentName: string, content: *) boolean; Function Box Resource (contentName: string): Boolean; Function getContentFromBox (contentName: string): *; } When you define a square in the AS3, if you want to implement the IBox interface, then class YourClass is of another class Expands IBox { (if you are expanding another class then another class is required) Now you IBox your class So what's the catch? Well, first of ...

PHP JQuery document ready adding an IF statement breaks .show( ) -

The following code has been placed in (document). Functions and functions to display the order form properly: No insight? The top code works and displays all the sections, I just want to hide below three, but jquery does not like it for some weird reason Finally, it was detected that this problem took place because the selector actually put in the top section. Added ("slow"); $ ("# cam-command-guides"). Hide ('slow'); At the top, if the block has allowed behavior due to the nesting of divs. One more thing when show or hide unexpected results Be careful to hide: divs Check nesting which you want to show.

c++ - virtual function, -> operator, inheritance SO CONFUSING -

ठीक है यह एक सरल उदाहरण है जो मुझे बहुत भ्रमित करता है ... class first {सार्वजनिक: शून्य फ़ंक्शन (cout & lt; & lt; "फर्स्टफ़न्क";}}; कक्षा द्वितीय: सार्वजनिक पहले {सार्वजनिक: शून्य फ़ंक्शन (cout & lt; & lt; "secondfunc";}}; कक्षा तीसरा: सार्वजनिक द्वितीय {सार्वजनिक: शून्य फ़नक () {cout & lt; & lt; "थर्डफंक";}}; Int main () {तीसरे * तीसरे पटर = नया तीसरा (); दूसरा * सेकंडप्ट्रर = तीसरापन; प्रथम * firstptr = secondptr; firstptr- & gt; समारोह (); // बाहर प्रिंट करता है FirstFunc secondptr-> फ़ंक्शन (); // बाहर प्रिंट करता है SecondFunc thirdptr- & gt; फ़नक (); // तीसरे संस्करण को प्रिंट करता है; और यह आभासी फ़ंक्शन के साथ है class प्रथम {सार्वजनिक: वर्चुअल शून्य फ़नक () {cout & lt; & lt; "FirstFunc";}}; कक्षा द्वितीय: सार्वजनिक पहले {सार्वजनिक: वर्चुअल शून्य फ़नक () {cout & lt; & lt; "सेकंडफंक";}}; वर्ग तीसरा: सार्वजनिक द्वितीय {सार्वजनिक: वर्चुअल शून्य फ़नक () {cout & lt;...

codeigniter - correct way to use this function -

मैंने इस फ़ंक्शन को 'is_post' इस वेबसाइट पर देखा है: वर्ग MY_Controller CI_Controller का विस्तार करता है {सार्वजनिक फ़ंक्शन is_post () {वापसी $ _SERVER ['REQUEST_METHOD'] == 'पोस्ट'? सही गलत; }} क्या मैं इस फ़ंक्शन का उपयोग करने का सही तरीका जान सकता हूँ और कैसे? धन्यवाद। अपने मूल अभिभावक नियंत्रक का उपयोग करने के एक लाभ यह है कि आम जांच की जांच की जा सकती है केंद्रीय स्थिति में इसलिए जब आप एक नियंत्रक बना रहे हैं / परिभाषित कर रहे हैं, तो आप अपने खुद के नियंत्रक से वारिस प्राप्त कर सकते हैं, जैसे मूल वर्ग के तरीकों का इस्तेमाल करने के लिए: वर्ग User_Controller My_Controller का विस्तार करता है {सार्वजनिक फ़ंक्शन लॉगिन () (यदि ($ यह- & gt; is_post ()) {// लॉग इन चेक करें और यदि सफल हो तो रीडायरेक्ट करें। } $ This- & gt; लोड- & gt; देखें ("लॉगिन"); }}

php - is it possible to generate a screenshot of an HTML section? -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं एक रास्ते की तलाश कर रहा हूँ गतिशील रूप से एक HTML & lt; अनुभाग & gt; से एक स्क्रीनशॉट उत्पन्न करने के लिए क्या यह संभव है? यदि ऐसा है, तो कैसे? मेरा मानना ​​है कि ऐसा करने का सबसे आसान तरीका PhantomJS का उपयोग कर रहा है। 2 लिंक देखें और मिश्रण करें और मैच करें! // rasterize.js // इसे में हैक करने के लिए सामान गुड लक दोस्त !

clojure: If I am creating an operator staircase, how do I define the identity for the operator in general? -

I was wondering how you made * out of + In the end, then going to the other direction, using the following function (fb) b, and + is out of + By applying the same pattern, get a staircase of hyper-hyper-quality work of more hyperense, so I decided to try an infinite list of increasing hyperparators and try to code. Or. I came with this, which is very close! : (operator-stair [defer operator-ladder [] (repeat (fn [f] (fn [ab] (loop [bottom b result a] (if (> = 0 Below) Results (recurring) (below the DEC) (FA results)))) (FN [AB] (APB))) (DEF OPS (operator-ladder)) ((NHPS) 3 5); ; - & gt; 6 (inc is an arity one so it should ignore one args?) ((Nth ops 1) 3 5) ;; - & gt; 8 (right knee) ((nth ops 2) 3 5) ;; - & gt; 18 (Oops, one stop! Otherwise correctly multiply.) Is basically applicable (fn [a b] (* a b)) ((nth ops 3) 3 5) ;; ---- & gt; 10 9 2 (wow) The only thing I do not know is how to define the initial results in a normal way! I've made it...

c - Passing an array to execvp() from the user's input -

I am trying to pass the arguments entered by the user in execvp () . So far, I have divided the string if the user type saved as ls -a , temporary as "ls" and "-a" After that, there is a tap character, I am not sure how to properly point it out in execvp . In the examples I have seen it using the execvp (temp [position], temp) . I know that the time I am trying to do it is wrong, but I am not sure how to do it properly! At the moment I am getting a division error. int main (int argc, char * argv []) {char line [124]; Int size = 124; Char * temp = NULL; While (fgets (line, size, stdin)! = Null) {if (strcmp (line, "exit \ n") == 0) {exit (EXIT_SUCCESS); } Temp = strtok (line, ""); While (temporarily! = Null) {printf ("% s \ n", floating); Temp = strtok (NULL, ""); } Execvp (temp, & temp); } Return EXIT_SUCCESS; } Your problem is that temp is a pointer , And give you an array of the indicator execvp ()...

c++ - cv::Mat memory allocation and releasing memory -

मैं cv :: Mat डेटा की पंक्ति का उपयोग float * dataptr = data .ptr & lt; float & gt; (0); पाशन के बाद, क्या मुझे float * dataptr को हटाए गए डेटाप्रतिर का उपयोग करना चाहिए? धन्यवाद उस सूचक स्थान को Mat संरचना से संबंधित है और Mat वास्तविक मालिक है।

c# - The ipaddress string is returning ::1. How can i get the full ipadrress of the user testing from localhost -

I want to retrieve the user's IP address, which is logged using C #. I have written the following code var ipaddress = System.Web.HttpContext.Current.Request.UserHostAddress; but ipaddress contains :: 1 . How do I get the full address? I'm just testing the code in the local host. IIS7 is installed. :: 1 according to the specs is actually pointing to the loopback A valid address if you want a computer to get a public IP address, you must use a domain name (DNS returned to your local computer with DNS) or the location of localhost in the URL Use your public IP at Edit Your code is good (some to change there O Is) Although you must translate back into trying to get your public IP wrapper (No 1 or 127.0.0.1) Call http other interface you must (meaning that IP to the DNS query). You will not be able to do that offline. I hope it helps, sorry that I can not be clear. This is more programming of a networking problem.

Django 1.5 - Cannot find the defined view when using TemplateView -

I am creating index.html and I use TemplateView. When I'm trying to use my index, I get an error that my index view is not defined. I do not know why, I follow this method These are my codes: urls.py Import pattern from Django.conf.urls, import view urlpatterns = pattern ('', url (r '^ $', views.IndexView.as_view (), name = 'index') from url) Traceback views.py from Template: Strong> (updated) Environment: Request method: Request URL: http: // localhost: 8000 / Django Version: 1.5 Python Version: 2.7. 3 installed Application: ('django .contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles' "Djangokcontrib Kadmin 'Djangokcontribkadmindocs' accounts',' set up ') Middleware: (' django.middleware.common.CommonMiddleware ',' django.contrib.sessions.middlew...

iphone - Cannot perform a segue from my class -

Image
I am working with the library KYCircleMenu You can finish it I am also working with the storyboard. I have been taken from a class MenuViewController KYCircleMenu that @interface MenuViewController:. KYCircleMenu Next I have implemented my initWithCoder like this - (id) initWithCoder: (NSCoder *) aDecoder {NSLog (@ "called" ); If (self = [self initWithButtonCount: kKYCCircleMenuButtonsCount menuSize: kKYCircleMenuSize buttonSize: kKYCircleMenuButtonSize buttonImageNameFormat: kKYICircleMenuButtonImageNameFormat centerButtonSize: kKYCircleMenuCenterButtonSize centerButtonImageName: kKYICircleMenuCenterButton centerButtonBackgroundImageName: kKYICircleMenuCenterButtonBackground]) {} return self; } And finally I have applied a method from the kickstart menu runbutton action . This method tells me what button is pressed in the menu. So in this method I am trying to do a SEG for another view controller. I am doing this like this. NSLog (@ "Tag is% d",...

actionscript 3 - Scaling for Android devices with starling causing some layout issues -

I am using multi-resolution technic number three as written in and scale To determine the factor of the platform size, I am basically using this piece of code written by Jeff: if (Capabilities.screenDPI> = 200) { If (Capabilities.screenDPI> = 280) {AssetFactory .contentScaleFactor = 2; } Else {AssetFactory.contentScaleFactor = 1.5; }} And {AssetFactory.contentScaleFactor = 1; } Var mViewPort: rectangle = new rectangle (0, 0, stage. Fullscrew, stage fullscreen); MStarling = new starling (startup, stage, mvuiport); MStarling.stage.stageWidth = stage.fullScreenWidth / AssetFactory.contentScaleFactor; MStarling.stage.stageHeight = stage.fullScreenHeight / AssetFactory.contentScaleFactor; This technique works great When I do the test with most devices but then we have tools like Barnes and Noble Nook Color The device has 600x1024 resolution of 170 dpi. This means that it is going to take a small property (320x480) and limit it to 600x1024. Any idea about how to a...

cron - Cronjob firing at wrong schedule. -

I have two chronobes, I want to run two chronozes at a small interval of ten minutes. Once in two days, 0100 hours and 0110 hours This is what I am trying to do. 0 1 * / 2 * * job1.sh10 1 * / 2 * * job2.sh Job 1 is not working as expected It runs twice daily according to the expectations of 2 runs (once in two days) - Am I doing wrong? You also have to add binary to the execution of the script: the complete path to your file: 0 1 * / 2 * * / bin / sh /route/to/your/file/job1.sh10 1 * / 2 * * / bin / sh / route / to / your / file / job2 Sh / bin / sh can be another thing, just get it from which is sh .

Reading a xml file remotely -

I have a standalone Java based desktop application. This application uses a property file (in plain text format), which requires updating from time to time. To do this, this application should be connected to a remote server, read an XML file located there and update my property file based on the data in XML. How can I do this? use square url url = URL (new URL) "Http://yourremoteserver.com/file_to_be_read.xml"); URL Connection URL Connection = url.openConnection (); InputStream = new BufferedInputStream (urlConnection.getInputStream ());

Segmentation fault in C, can't seem to find the cause -

I can not find the reason for the segmentation fault in the code given below (code) With the code in the line crashes, I saw this code with GDB, and it seems that everything is fine, within the evaluation of the function - the output is correctly filled, though I return after returning to the main memory Can not reach anything in. "PJ" returns a memory missing error in GDB, as if trying to print any other variable I checked that there were probably many values ​​in the stack, but the stack size did not increase. The crazy thing is that I can solve this error, but I do not know why it changes anything. If I add, anywhere in the evaluation (), an int declaration (such as int iAmNotUsedEver; ), then the code is not always the cause of a split error and works perfectly in gdb Edit: Dynamically assign node [116] ( int * node = malloc (116 * size); also resolves the problem, but then I do not know why? Evaluate the function: (I have removed the part of the code, otherwis...

jquery - how to limit the number of items added to basket in fly to basket plugin? -

I am referring to the previous question here. I was implementing a fly for the basket effect in the shopping cart implementation in my web page, all this is working well, but one problem is that we can click the link in the cart as many times as we want, I I want to restrict it or else I want to limit the number of items to be added to the basket of 20, how can I get it? I have just given a limit when adding items to the basket via AJAX, one. But when it quickly clicks on its crashing when the items cross the 20th limit, then it closes the animation and the AtcoBask function so that more than 20 links are added to the item in the database : I think you can disable the button as if you reach a certain number. I have small tests:

database - How to replace last occurrence of a substring in MYSQL? -

How can I change the last occurrence of a substrings with an empty string in MYSQL? MYSQL String: "American Corp National Corp" Search String: "Corp" Expected Output: "American Corp National" Can someone suggest? Try: reverse (concat (left (reverse 'American Corp National Corp'), Instar (Reverse ('American Corp National Corp'), Reverse ('Corp') - 1), Upstroke (Reverse ('American Corp National Corp'), Instar (Reverse (American Corp Result ('corp')) + Length ('corp')) Results ()

How to extract facebook email from facebook ios sdk 3.1? -

मैं एक webview ios app का निर्माण कर रहा हूं जो फेसबुक ईमेल का उपयोग करता है मैं अपनी समस्या के लिए googled और उन सभी जवाब इस समारोह से कुछ कर रहे हैं: NSArray * अनुमतियाँ [[NSArray arrayWithObjects: @ "ईमेल", शून्य]; वापसी [एफबीएसएशन ओपनएक्टिवसेशनविड्थ रीडमिशनः अनुमतियां अनुमति दें यूआई: अनुमतिओगिनयूआई समापनहैंडलर: ^ (एफबीएसएशन * सत्र, एफबीएसएशन स्टेट स्टेट, एनएसईआरआर * एरर) {[सफ़ेशन सत्रः परिवर्तनः सत्र स्थितिः राज्य की त्रुटि: त्रुटि]; }]; लेकिन मैं इस से ईमेल नहीं चाहता हूं। क्या ऐसा करने का कोई तरीका है? यदि मैं इस फ़ंक्शन का उपयोग कर रहा हूं, तो मुझे दो बार प्रवेश करना होगा जो कि कष्टप्रद है अगर इसके अलावा ईमेल पता प्राप्त करने का कोई तरीका नहीं है, तो क्या लॉगिन प्रक्रिया दो बार से बचने का कोई तरीका है? आप इसके लिए + requestForMe का उपयोग कर सकते हैं: - (शून्य) getUserEmail {[[एफबीसी अनुरोध अनुरोध] शुरूआती समाप्तिहैंडलर: ^ (एफबीसीएसीसी कनेक्शन कनेक्शन *, NSDictionary & lt; FBGraphUser & gt; * उपयोगकर्ता, NSError * त्रुटि) {if (! त्रुटि...

java - Unknown SMTP host -

I am running a Java web application using Tomcat to send users the reports generated via email. I am able to send emails, but after few hours the server stops sending the email with the following error. javax.mail.MessagingException: Unknown SMTP host: mail.mydomain.co.uk; Nested exception is: java.net.UnknownHostException: com.sun.mail.smtp.SMTPTransport.openServer (SMTPTransport.java:1970) mail.mydomain.co.uk on com.sun.mail.smtp.SMTPTransport.protocolConnect (SMTPTransport java: 642) javax.mail.Service.connect (Service.java:317) javax.mail.Service.connect (Service.java:176)) com on javax.mail.Service.connect (Service.java:125 on .turnkey.email.SendEmail.sendMail on javax.mail.Transport.send0 (Transport.java:194) javax.mail.Transport.send (Transport.java:124) (SendEmail.java:119) on com. mail.mydomain.co.uk on java.net.PlainSocketImpl.connect (PlainSocketImpl.java:195) on java.net: java.net.UnknownHostException: due to turnkey.thread.CommunicationThread.run (CommunicationThrea...

c# - Calling from a controller to a manager which parameter choose -

I am making a method, in the manager (such as Reich Manager) that is being called by a controller ReqController And it is implemented, Public Zero LockTransDetai L (Iro Descriptionline, Dataset Data, String FieldName, Bull Lock YN) {IDecorator Decorator = GetDecorator (Data); ......} Or the other option is in the controller: IDcorator decorator = GetDecorator (data); and then call the method, ReqControllerInstance.LockTransDetail (detailRow, Decorator, Field Name, Lock YN) So what is the better way to pass the parameter as a dataset or a de-decorator method? Not entirely sure that I understand your question, but if I did, then you Asking whether it is better to call a monolithic method on the manager ( Manager.DoSomething ) for administrator or breaking it down into several steps ( manager.ConvertData , Manager.GetDecorator , and then Manager.DoSomethingWithDecorator ). It will be what this step is but depending on the example you brought, I would pr...

java.lang.NoClassDefFoundError: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential -

I am trying to implement Google Drive in my Android app, and get the java.lang.NoClassDefFoundError I am: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential error, so anyone knows how to solve it. I still tried Import all the necessary .jar files to Google Drive Import Google Play Service Lib Client id with API key or Google ID or Play service for Android Li> Already go to some solution And try it as Here's my login - 03-21 15:03: 55.194: E / AndroidRuntime (940) : Severe Exception: Chief 03-21 15: 03: 55.194: E / AndroidRuntime (940): java.lang.NoClassDefFoundError: com.google.api.client.googleapis.extensions.android . gms.auth.GoogleAccountCredential 03-21 15: 03: 55.194: 03-21 E / AndroidRuntime (940): com.example.alltaskass.GoogleDrive.onCreate (GoogleDrive.java:53) 15: 03: 55.194: E / AndroidRuntime (940): android.app.Instrumentation.callActivityOnCreate 03-21 15 at (Instrumentation.java:1048): 03: 55.194: e / on...

java - Update table field value to null programmatically -

It's well known how to clear field values, such as with a simple query - Set your_ table your_column = NULL WHERE id = 1; but pro-grammatically, which is the correct way to update field value for zero - db.execSQL ("your_state update Your_column = '"+ blank +" WHERE id =' "+ myid +" ''); OR db.execSQL ("your _table set your_column = NULL WHERE id = "+ myid +" ''); thanks I will go together string query = "set your_table your_column =? WHERE id =?"); Statement made stmnt = conn.prepareStatement (query); If (colyouAretryingtopass == faucet) {] stmnt.setNull (1, type .VARCHAR); }

Combinatorics: Trying to figure algorithm (about subsets) -

I'm trying to solve a problem at TopCoder. Basically I need algorithms for this: Let's have a sequence [1, 2, ..., N]. Let's be less than m 1) Find all the later sizes of S. Me (which is easy - N ^ m). 2) After all the sized elements, find the elements where the elements are not allowed to be repeated (which is easy - (n!) / ((Nm)!). 4) Find all sorts of shapes, where the elements are in the order of nature and are not allowed to be repeated. Still Part 2 Edit: Basic Problem: / P> to solve 4), note that w / o repetitions 'non-decreasing' means 'increasing' its Set all scenes of s created from m without repeating the elements in the symmetry squares based on the set of elements that occur in a later version. Within each equivalence class, there is a rising sequence (elements sorted by ), the number of permutations of the size elements of each equivalence class. 4) - so the result is (n!) / ((Nm)! * M!) = N \ select m . Adv...

java - fail in "mvn clean install"? -

I'm new to learning Java programming! I want to make a gazer in a Maven project. After running this command, mvn clean install , I get the following error message: The target org.apache.maven.plugins failed to execute: maven-compiler -plugin: 2.3.2: Unable to detect JAVAK compiler in project wps-demo (default-compile): compilation failure : C: \ Program Files \ Java \ jre7 .. \ Lib \ tools jar Please make sure that you are using JDK 1.4 or above and do not require a JRE (com.sun.tools.javac.Main class) In most cases you P> As your error, you are wrong in the system settings in the JAVA_HOME variable The value is ... something like C: \ Program Files \ Java \ jre6 how you can set it for example.

Why doesn't this Java calculation return a floating point value? -

Just wanted to know float percent = 1 + (25/100); // percent value is 1.0 and not 1.25 returns result 1 but not 1.25 thanks sqt I think Java looks at it like this: (int) 1 + (int) 25 / (int) 100) = (Int) 1 And then it is stored in a float. Try it with 25 instead of 25.0 .

.htaccess - htaccess redirection and rewrite from php to html -

I'm stuck with the .htaccess modification, requires a little help. First, it inside my htaccess RewriteRule ^ (. *). Html $ $ 1.php [nc] For example, I've created a file named test.php and uploaded it to my server. I want my server to behave this way. http://example.com/test/test.html - & gt; Http://example.com/test/test.html It is like this) http://example.com/test/test.php - & gt; Http://example.com/test/test.html But with .htaccess I have just now, I still have both .php and .html which are considered as file duplication Like Google Robot, by search engine crawler (is not it?). Any help appreciated. Try this .htaccess code # # Friendly friendly URL rewriter ^ test / (. *) \. HTML $ test / $ 1 \ .php [re-enable Engine Restart Engine] OR Rewrite% {REQUEST_URI} ^ (. *) \. Php $ RewriteRule ^ (. *) / $ 1.html [L] OR Options + Foloamilink -maltiaiwug # turn mod_rewrite /test/test.html Reedaitkand% on .html # externally /test/te...

How to add a repeating pattern to vector with different length in Matlab -

प्रश्न मान लीजिए मेरे मनमाना लंबाई के दो वैक्टर हैं I एक पैटर्न और अन्य श्रृंखला को कॉल करें। अब मैं अपने दोहराया पैटर्न को एक स्वचालित तरीके से अपने श्रृंखला में जोड़ना चाहता हूं। आमतौर पर एक यह मान सकते हैं कि pattern श्रृंखला से कम है, लेकिन वैकल्पिक रूप से काम करने पर यह अच्छा होगा। इस मामले में पैटर्न के पहले कुछ मानों का उपयोग किया जाना चाहिए। उदाहरण pattern = 1: 3; श्रृंखला = 1:10; देना चाहिए 2 4 6 5 7 9 8 10 12 11 मुझे क्या करना है अब तक क्या मिला है? मैंने चारों ओर खोज की है लेकिन मुझे क्या हासिल करने का एक शानदार तरीका नहीं मिला। मैंने पाया सबसे आसान समाधान Padarray , लेकिन मेरे पास यह उपलब्ध नहीं है मेरा अपना समाधान, जिसे मैं सुरुचिपूर्ण नहीं मानता, वह पैटर्न को दोहराकर repmat का उपयोग कर रहा है पर्याप्त समय की अवधि और फिर अंत काटने। आप अनुक्रमण के बजाय का उपयोग कर सकते हैं Repmat: परिणाम = श्रृंखला + पैटर्न ([mod (0: (numel (श्रृंखला) - 1), अंक (पैटर्न)) 1);