Posts

Showing posts from August, 2013

What is practical uses of stream_wrapper_register in php? -

I am a new learner in php. And I found the 'stream_wrapper_register' function in the php document. Here's the link. Can someone help me understand the exact use of this function in projects? I could not find any real time for this. Here is an example, how to use data from the variable function that reads only from the file (Method image FPDF class by 'replaced' method by MemImage ). is required ('fpdf.php'); // Stream handler class for reading from global variable class VariableStream {var $ varname; Var $ position; Function stream_open ($ path, $ mode, $ option, and $ positions opened) {$ url = parse_url ($ path); $ This- & gt; Varna = $ url ['host']; If (! Isset ($ globals [$ this- & varname])) {trigger_error ('global variable'. $ This-> varname. 'Does not exist', E_USER_WARNING); return false; } $ This- & gt; Condition = 0; Back true; } Function_stream_read ($ count) {$ ret = substr ($ global [$ th...

javascript - Infinite scroll js with backbone -

I am constantly stuck with this issue for 3 days, I used to scroll in my spine project I am trying. I tried to find an answer to my question with the search engine but I was unable to do this, I am the initiator developer with backbone.js . View item list: var ItemList = Backbone.View.extend ({initialize: Function () {}, render: function () {this. $ El .empty (); this.collection.each (function (_itemData) {var itemList = new item view ({model: _itemData}); $ .append (itemList.el);}, this);}}) ; View of item list views: render: function () {var _itemList = _template (ItemListTem); . This $ el.html (_itemList); Var _itemObj = Find _item.getItem (this.options.key); Var itemcallions = new item collection (_itemObj); Var itemListView = new item list ({archive: item collation, L: '.itemListContainer'}); ItemListView.render (); }); Item collection: var itemCollection = backbone.collection.extend ({Model: itemModel, url: RootWebsite}); And I divided the item ...

android - Send list of objects which contain other custom objects from one activity to another -

This is my class whose list I want to send to another activity. Public class posts comments {from public user; Public string message; Public string creation time; Public string like_count; Public boolean user_likes; } This user group whose object is used in the PostComments class the public class user extends BaseEntity {public string photoUrl. } and this basepoint class public square baseInte {public string ID; The name of the public string; } How can I send this object from one activity to another PostComments [] MyData = ClickedPost.comments.data? Content postcomments = new (getActivity), PostCommentsActivity.class); . GetActivity () startActivity (PostCommentsActivity); The above is the code to open PostCommentsActivity and I want to send a MyData object to PostCommentsActivity. I have searched a lot about this problem but every question and tutorial that explain only one class for simple string, integer or boolean variables try:. ArrayList ...

javascript - How to download few files in iphone via JS? -

I have a website where a user can download some files automatically, I used it in JS, which is hidden Creates a iframe tag: & lt; Iframe src = "/ path / to / file1.jpg" /> & Lt; Iframe src = "/ path / to / file2.zip" /> & Lt; Iframe src = "/ path / to / file3.exe" /> In response content-type: attachment header. It works in PC browsers, but does not work in the iPhone. Is there a way to download some files in the iPhone? Safari does not allow file downloads on iPhones. So (the iPhone is not a jailbreak) you have no chance. You can only display images (in the browser) and save them locally on your phone.

ruby on rails 3.2 - capistrano failed exit status 1 -

Running Capistrano to deploy in order to cap staging deploy fully returning to the early conclusion Runs through the process. While en route, listed under the file or directory: set: linked_dirs,% w {bin log tmp / PID of the tmp / cache tmp / socket vendor / bundle / public system} the following examples are causing errors Running / usr / bin / env [L / home / DEP / application / releases / 20141009195446 / bin] xx.xx.xx.xx debug [6d6a56cf] command: [L / home / DEP / applications / releases / 20141009195446 / bin] debug [6d6a56cf] (failed) with exit status 1 Ends in 0.428 seconds Gaya. Debug [77ffc21a] Ongoing / usr / bin / env [-d / home / DEP / applications / releases / 20141009195446 / bin] xx.xx.xx.xx debug [77ffc21a] command: [-d / home / DEP / Application / release / 20141009195446 / bin] DEBUG [77ffc21a] with position ending in 0.254 seconds, position 1 (failed). I have tested under ~ / DEP / application / share / tmp / pid's touch 'application / curren...

vb.net - FormatNumber replace Decimal with Comma using SpreadsheetGear dll -

I want to apply the formatting number to Excel cell using VB.net using the SpreadsheetGear DLL below 2.22.222,00 My job: in the worksheet 2,22,222.00 Need to convert. Range (number range) .numberformat = "[= 0] 0; ###, ### 00" I am implementing this format for the English language, likewise I want number format You can try it. cultureInfoGetCalcherInfo ("PT"). Number Format

java - Empty list in SAX parser endDocument after successfully parsing elements to the list -

I am trying to parse an XML containing geographical nodes and connecting nodes using the SAX parser methods of. I have a in Arreemap & lt; Long, MapPos & gt; and ArrayList & lt; ArrayList & lt; MapPos & gt; & Gt; I archive parsed nodes in . When somehow parsed, I refer to the ArrayList & lt; MapPos & gt; I and add it to the ArrayList manner. After debugging an application, I see that startElement () and endElement () for successfully ArrayList Ways to add, but there is no bunch of empty code in endDocument () method methods ArrayList . Here is the Java class: Public Class ParkingDataCactactor {Private Static List & lt; Arrest & lt; MapPos & gt; & Gt; Roads = new arreelists & lt; ArrayList & lt; MapPos & gt; & Gt; (); Public static list & lt; ArrayList & lt; MapPos & gt; & Gt; GetWaysFromXML () throws pars configuration exception, SAXException, IOException {SAXParser saxParser = ...

ios - RestKit doesn't like mapping a different object for a POST response -

I am using Restkit to post a type of object and the reaction should be an object of the object. I have requested the correct answer and mapping, but the restqueter is complaining that he has found the objects of B. in place of A. Since this is the behavior that I want, one way to say that restkit is fine and go ahead and map it to me? You need to do some extra work to tell Restkit that the Object object of POST source object To do this, you need to type the zero to targetObject of the action requested (which means that there is clearly an operation in the first place). And after that it is encoding): RKManagedObjectRequestOperation * Operation = [ObjectMan Ready appropriate Objectoreksestopreshnvidth object: Objektotost method: Arkearkvenstmthipost path: @ "XXX" parameter: any Param]; Operation.targetObject = Zero; Operation.targetObjectID = Zero; [Object manager nuke object rescue operation: operation];

python - Extract tags from media received from Instagram API -

GitHub में अजगर-instagram प्रलेखन से उदाहरण: instagram.client आयात InstagramAPI ACCESS_TOKEN से = "YOUR_ACCESS_TOKEN" एपीआई = InstagramAPI (ACCESS_TOKEN = ACCESS_TOKEN) recent_media, next_ = api.user_recent_media (user_id = "उपयोगकर्ता id", = 10 गिनती) recent_media में मीडिया के लिए: प्रिंट media.caption.text # यह प्रत्येक मीडिया से कैप्शन पाठ हो जाता है लेकिन, जब मैं इस (केवल अंतिम पंक्ति परिवर्तित) का प्रयास करें: instagram.client आयात InstagramAPI ACCESS_TOKEN = "YOUR_ACCESS_TOKEN" एपीआई = InstagramAPI से (ACCESS_TOKEN = ACCESS_TOKEN) recent_media, next_ = api.user_recent_media (user_id = "उपयोगकर्ता id", = 10 गिनती) recent_media में मीडिया के लिए: प्रिंट media.tags प्रत्येक मीडिया के साथ जुड़े टैग प्राप्त करने के लिए # प्रयास यह कहते हैं कि मीडिया में "टैग" विशेषता नहीं है मुझे लगता है कि Instagram एपीआई से प्रतिक्रिया में "टैग" कुंजी शामिल है। मुझे क्या याद आ रहा है? मीडिया के टैग कैसे प्राप्त करें? ...

android - input type="file" accept="image/*" capture="camera" not working for mobile -

I have found a simple form that uploads some basic information and an image to my farmtole database. It works perfectly on the desktop but not on the mobile. When I test on my Android phone it asks me to select the camera or file browser, I have tried both the camera and the file browser and I take a picture / upload an image that looks like , Then you load the thank you page, but when I why is not anyone doing this work? Here's the form & lt; Enctype = "multipart / form-data" id = "competitionform" class = "uniForm cmxform" name = "competitionform" method = "post" action = "/ formtools / process.php" & gt; & Lt; Input type = "hidden" name = "form_tools_form_id" value = "110" /> & Lt; Header & gt; & Lt; H2 & gt; Upload your image & lt; / H2 & gt; & Lt; / Header & gt; & Lt; Label & gt; Your name & lt; / Label & gt; & ...

javascript - How to get value from span and put it into variable using php -

ठीक है, यह मेरा HTML कोड है: & lt; span id = "d" & gt; & lt; / span & gt; और यह मेरा जावा स्क्रिप्ट कोड है: & lt; script & gt; document.getElementById ('d')। InnerHTML = (date.format (' डीडी ')); & lt; / लिपि & gt; अब अवधि का एक मान है, मैं यह मान स्पैन से प्राप्त करना चाहता हूँ और इसे चर में डालकर डेटाबेस में डालें, लेकिन मुझे पता नहीं है कि कैसे अवधि से मूल्य प्राप्त करना है। लेकिन मुझे पता नहीं है कि अवधि से मूल्य कैसे प्राप्त करें। बस उसी संपत्ति का उपयोग करें, जिसे आप तथाकथित "मूल्य" को भी प्राप्त करने के लिए प्रयोग किया जाता है। var value = document.getElementById ('d')। InnerHTML; उपरोक्त काम करने के बाद आप इसे अपने बैकएंड को एजेक्स के साथ भेज सकेंगे।

c# - Declaring an IsInDesignMode Property for use in wpf using vb.net -

performance as one of your blog posts Laurent Bgniyn by means of detection desingtime mode Dblupif the following code snippet Done Private Stable Bull? _isInDesignMode; /// & lt; Summary & gt; /// A value indicates that the control is in design mode (running in Blend /// or Visual Studio). /// & lt; / Summary & gt; Public Static Bull ISIDISINIDIDAdstatic (Receive (! _IsIDIDMADHSViews) {#If Silverlight_ICIDIDMed = Designer Properties. #else var prop = DesignerProperties.IsInDesignModeProperty; _isInDesignMode = (bool) DependencyPropertyDescriptor. Property (Prop, Type Frame (Element)). Metadata. DefaultValue; #endif} Return _isInDesignMode.Value;}} As I started working in VB, I did it with Telerek's online code converter Set about to translate and ends with the following: private share _isInDesignMode right system. Bullion ( 'boolean') '' & lt; summary & gt; '' ' this indicates that the control is in design mode or not (B...

lastinsertid - Last inserted _key in ArangoDB with AQL? -

How do I get the last entered _key in ARDDDB with Aango query? I kept the item in the archive, the following element should have an _key build element, how do I get this _key? Update on this question: Since ArangoDB 2.4 it is possible to retrieve it only with AOCAD query Document (or document). The syntax for the single document INSERT was with the previous versions of Arogo DB 2.3: INSERT {value: 1} IN archive There is no way to recover a system entry ( _key , _rev etc.) to insert the document. Since 2.4, the following is also possible: INSERT {value: 1} result in the collection = new return result Returns given above are specific attributes Document (including value ) and system attributes in the above case. It also works to insert multiple documents, e.g. FOR I IN 1. 1.10 INSERT {value: i} Result in IN collection = New return result To return all inserted documents

php - how to integrate whole html template in codeigniter? -

मैंने भी codeigniter में एक एकल वेबपेज किया है। लेकिन "href" काम करता है। कोडिग्नेटर में पूरी साइट को कैसे शामिल किया जाए इसका समाधान दें। मुझे लगता है कि मुझे प्रत्येक दृश्य के लिए नियंत्रक (निर्देशिका में) बनाने की आवश्यकता हो सकती है ( निर्देशिका में)। नोट: मेरे पूरे टेम्प्लेट "दृश्य / पृष्ठ" फ़ोल्डर में हैं। मैंने पहले ही "pages.php" नियंत्रक फ़ोल्डर में बनाया है। मार्ग बदलने के बाद.पीपीपी यह केवल index.php पर काम करता है अन्य सभी पृष्ठों के लिए नहीं जब इंडेक्स पेज से लिंक करते हैं। मेरा pages.php कोड नीचे है & lt;? Php if (! परिभाषित ('BASEPATH')) बाहर निकलें ('कोई सीधी स्क्रिप्ट प्रवेश की अनुमति नहीं है'); क्लास पेज्स CI_Controller विस्तारित {फ़ंक्शन व्यू () {$ this- & gt; लोड- & gt; दृश्य ('टेम्पलेट्स / हैडर.एफ़पी'); $ इस- & gt; load- & gt; दृश्य ( 'पृष्ठों / सूचकांक'); // $ इस- & gt; load- & gt; दृश्य ( 'पृष्ठों / लॉगिन'); $ इस- & gt; load- & gt; दृश्...

How to reference a model in Ember.js? -

I am working through the DOOMVC and in the code given below, just do not understand that It refers to var model = this.get ('model'); . Does it refer to controller or root if this is the controller , then where do we go from Does the model work with x controller y ? Todos.Dad Controller = Amber.Object Controller Adended ({complete: function (key, value) {var model = this.get ('model'); ...} .property ('Model.isCompleted')}); I Usually this inside amber.office function means that Ember.Object (code Todos.TodoController An example of ). / P> Example: App. Some RURTE = M. Route.ex ({active: function} (this; // this is the app. Some root frequency reference.}}); App.SomeController = Em.Controller.extend ({someMethod: function () {this ; // This is the app. Some controller example referees.}};; App.SomeView = Em.View.extend ({someMethod: function () {this is; // This app is a example example ref.}}); and so on. II. this...

winapi - WH_KEYBOARD_LL hook only in my process main thread -

Is it possible that WH_KEYBOARD_LL is called hook hook only when my app / thread focus is on? I am currently receiving calls even when the application is not active. There is no way to set up a hook and filter to prevent firing in some states Some of the forms also apply. After installing it, it will set fire. Therefore, do anything in your hook function, when your app is inactive, or remove the hook when idle. Or, stay away from the hook completely, and respond to messages in your message queue.

oracle - SQL query for all the days of a month -

मेरे पास निम्न तालिका किराये है (book_date, copy_id, member_id, title_id, act_ret_date, exp_ret_date)। जहां book_date दिन दिखाता है पुस्तक बुक किया गया था। मुझे एक प्रश्न लिखना है कि महीने के हर दिन (1-30 या 1-2 9 या 1 से 31 महीने के आधार पर) के आधार पर मुझे पुस्तकें बुक की संख्या से पता चलता है वर्तमान में मैं जानता हूं कि टेबल में आने वाले दिनों में किराए पर पुस्तकों की संख्या कैसे दिखानी है चुनें count (book_date), to_char (book_date, 'dd') से किराया समूह to_char (बुक_डेट, 'डीडी'); मेरे प्रश्न ये हैं: मैं शेष दिन कैसे दिखाऊँगा (यदि मेरे डेटाबेस में किसी कारण के लिए कहें तो मेरे पास किराए पर कोई किताबें नहीं हैं 20 वीं या 1 9वीं या कई दिन) और वहां नंबर 0 लगाया? मैं केवल वर्तमान महीने के दिनों की संख्या कैसे दिखा सकता हूं (28, 29, 30,31, ये सभी 4 संभवतः महीने या वर्ष के आधार पर) ... मैं खो रहा हूं यह केवल एसक्यूएल क्वेरी न पीएल / एसक्यूएल या अन्य सामान का उपयोग करके किया जाना चाहिए। SYSDATE को अपनी दिनांक कॉलम से बदल सकते हैं और इस प्रश्न के सा...

web services - web.config vs. text file for storing a comma-separated value -

We have a collection of VB.NET / IIS web services on some of our servers, and they have web. The config file is the original directory of the website from which they are already reading the configuration, there is a new configuration that must be added, which will be quite a bit more than the others, and it will only stand up to grow; it is essentially comma The price is, and I want to put it in some type of configuration file specifically. At first I had started doing this with a text file, but there was a problem in it. Web file threads and processes are underway, while the contents of the text file can change, so they must read the file again every time to reach their values. I had thought of using any type of caching, but until the file is updated, until the web services are completely restarted, prevent the update from being used immediately in the caching file. But every time reading from a text file is slow ... Then the web The idea of ​​inserting that value into config,...

MySQL indexes to SQL SErver -

I have the following script that I want to convert to SQL Server, but how? MySQL: Create a table metabelete (AUTONCrment of ID Integer Unsigned Null Primary, Yuri Verbenary (1000), Index (Yuri (100)); How does this index look like in MSSQ ?? Create table memables (ID integer null primary key identification (1,1), Yuri Verbenary (1000), - indexes ???); There is no inline index creation block to create table Syntax However, you can do this later: Make Table Mebattable (ID Integier Faucets Primary Main Identity (1,1), Yuri Warrenery (1000),); Create my_table_uri_ind index on Meritable (Yuri); Edit: To address the comments given below, you can use only to get the indexing of only one part of your uri : Make Table Mbtables (ID Integrator Faucet Primary Main Identity (1,1), Yuri Warrenery (1000), asbesturing as Yuri 500 (Yuri, 1, 100)); Create my_table_uri_ind index on Meritable (Yuri 100);

java - Class implements two interfaces with the same method but different checked exceptions -

"ओरेकल प्रमाणित व्यावसायिक जावा SE 7 प्रोग्रामर परीक्षा 1Z0-804 और 1Z0-805 ए व्यापक ओपीपीपी 7 प्रमाणन गाइड" एसजी गणेश और तुषार शर्मा द्वारा, यह कहा गया है "यदि एक विधि 2 या अधिक इंटरफेस में घोषित की जाती है, और अगर उस पद्धति ने फॉरेज़ क्लॉज में अलग-अलग अपवाद फेंकने का घोषित किया है, तो कार्यान्वयन सभी को सूचीबद्ध करना चाहिए इन अपवाद "(पृष्ठ 347) अच्छा, फिर मैंने यह कोशिश की है सार्वजनिक इंटरफ़ेस I1 {सार्वजनिक शून्य x () I1Exception फेंकता है; } सार्वजनिक इंटरफ़ेस I2 {सार्वजनिक शून्य x () I2Exception फेंकता है; } पब्लिक क्लास I1Exception अपवाद {} सार्वजनिक वर्ग I2Exception विस्तार करता है अपवाद {} सार्वजनिक वर्ग नमूना लागू करता है I1, I2 {@Override सार्वजनिक शून्य x ()) I2Exception फेंकता {नया I2Exception (); } @ ओवरराइड सार्वजनिक शून्य x () I1Exception फेंकता {नया I1Exception (); }} बेशक, अपवाद विधि हस्ताक्षर का हिस्सा नहीं है, इसलिए संकलक शिकायत करता है कि दूसरी विधि दोहराई गई है। दूसरी ओर @ ओवरराइड सार्वजनिक शून्य x () I1Exception फेंकता है, I...

wordpress - Based on the following MYSQL query how can I write an UPDATE statement to update a value? -

I am using the following SQL query to get a record from a WordPress database. select p.id, p.post_title, m.meta_key, m.meta_value, t.slug wp_posts p at p.id = m.post_id and m.meta_key = wp_postmeta meter Join '_ subscription_sign_up_fee' internally as wp_term_relationships p.id = tr.object_id on TR included in the form of TT tr.term_taxonomy_id = tt.term_taxonomy_id on the inside wp_terms tt tt.term_id = t.term_id t on t wp_term_taxonomy. Slug = 'bundle' is included in the form My problem is that I need to increase the value of _subscription_sign_up_fee to 100. I tried the following wp_postmeta set up wp_postmeta.meta_value = wp_postmeta.meta_value + 100 INNER JOIN wp_postmeta wp_posts.id = m.post_id and m.meta_key = Join '_lib_sign_up_fee' inner wp_posts.id = tr.object_id as tr in inner wp_term_taxonomy Join tr.term_taxonomy_id = tt.term_taxonomy_id as tn.term_id = t.term_id at t as ASNER JOIN wp_terms t.slug = ' The bundle is saying 'col...

activex - Callout in Rectangle tool -

Just want to know how I can add callouts to the rectangle tool. Below is the code that I have added but arrows have not been drawn. Only one dot (0,0) appears on m_ctrlChart.GetTools (). GetItems (0) .GetAsRectangle (). GetCallout () SetVisiblâ ???? One ???? E (TRUE); . M_ctrlChart.GetTools () GetItems (0) .GetAsRectangle () GetCallout () GetBrush () SetCâ ???? One ???? Olor (rgb (255,0,0)) ... . M_ctrlChart.GetTools () GetItems (0) .GetAsRectangle () GetCallout () GetPen () SetColâ ???? One ???? Or (RGB (0,0,255)) ... M_ctrlChart.GetTools (). GetItems (0) .GetAsRectangle (). GetCallout () GetArrow () SetCa ???? A Olor (rgb (0, 255,0)); Thank you Akshay I think the property you are searching for That is callout.Arrow.Visible : m_ctrlChart.GetTools (). GetItems (0) .GetAsRectangle (). GetCallout () GetArrow () SetVisible (TRUE); GetCallout (). SetVisiblâ ???? One. E is TRUE for pointer

How Can i use Gridview instead of textbox -

Can I use a Gradeview as a textbox? Actually, I want to show value from the database in the texbox in my project, but I want the user to click on the + button to add a text and add the notice I should do it with Gridview but I do not know really how? I work on ASP.NET and C # You probably add rows in grid view Should be seen as the user clicks the button Your initial gridview must have a column with the text box. Here's an example you can follow:

types - Calling closures from an array in Rust -

How can I be repeated on an array of ports, calling each one in return? With the task, I have found that I can do this by just turning it on the array, and by removing the values ​​which produce: fn class (X: int) - & gt; Int {x * x} fn add_one (x: int) - & gt; Int {x + 1} fn main () {let's funcs = [class, add_one]; For Func () in Funcs.iter () println! ("{}", (* Func) (5i));}} However, when I do this with Closer Try, I get an error: fn main () {close = [| X: int xxx | x + x + 1]; closures.iter () {Println! ("{}", (* Off) (10i));}} produces: & Lt; anon & gt; 4: 24: 4:34 Error: `& amp;` context & lt; unon & gt ;: 4 printlen! ("{}", (* Ending) (10i)); ^ ~ ~~~~~~~~ Note: in the extension of format_args! & Lt; std macros & gt; 2: 23: 2:77 note: extension site & lt; std macros & gt;: 1: 1: 3 : 2 Note: of println In detail! 4: 9: 4:41 Note: Extension site & lt; anon & gt;: 4: 24: 4:34 n...

Which is better for use Theano on Linux or Windows? -

Which is better for using Thine on Linux or Windows? I want to try some intensive learning methods by Thano. It works fine on both, but I'm getting better support for the CUDA and much more it is easy to install the Scientific Python Stack (usually Ubuntu) on Linux.

locking - skype log out when screen lock in ubuntu 14.04 gnome -

When I lock the screen in Ubuntu Gnome 14.04 LTS, then the logout is logged with the Skype account. I do not like it, how can I fix this problem? I have not been used with Ubuntu, but this problem can occur in Windows when the PC is off Power management closes the network connection. Have a look at the network configuration to not allow computers to stop it.

excel - How to export SAS dataset to XLSX, by category, using macro variable? -

I have a large data set, which has around 100 managers, now I have to export data with the manager name so that I There is a dataset for each manager. I am able to use a macro to create a different dataset for each manager (essentially, one category) using code: % macro brake (bawl); Data and bawl; Last set (where = (Project_Manager_Name = "& byval")); Run; % improvement; Data_null_; Last set; By Project_Manager_Name; If the first.progress_or_name then execute the call (% nrstr ('% break (' || trim (Project_Manager_Name) || '))); Run; This is where I get stuck. I just need the .xlsx files of each and like, the names of the manager at the end of each file name include: proc export data = final dbms = outfile xlsx = "& amp; ; Output. \ Final_Report_ManagerName.xlsx "Replace; Run; I think I get anywhere in the name outfile & amp; Byval has entered the macro variable, but I still get errors that this reference is not. Any insight...

asp.net - How to reset this span's text generated from a regularExpressionValidator at asp with javascript -

itemprop = "text"> I block this HTML on an aspx page: Td class = "normalbold" & gt; & Lt; ASP: text box runat = "server" id = "txtSendSummary" ClientIDMode = "static" CssClass = "NormalTextBox" style = "width: 170px;" Enabled = "wrong" & gt; & Lt; / Asp: text box & gt; & Lt; ASP: RegularExpressionValidator id = "txtSendSummaryValidEmail" runat = "server" ClientIDMode = "static" ControlToValidate = "txtSendSummary" errorCare = "*" ValidationExpression = "\ w + ([- + '.] \ W +) * @ \ w + ([-.] \ W +) * \ \ w + ([-.] \ W +) * "/" & Lt; / TD & gt; I tried to restore it with "*". document.getElementById ('txtSendaryValidEmail') value = ""; but still "*"! How can I reset this period of validation? Thanks in advance! You have two problems here at the ...

mysql - SQL updating tables recursively with PHP -

मेरे पास वार्तालाप तालिका और वार्तालाप उत्तर तालिका है: वार्तालाप तालिका: + ------- + ------- + -------- + | सीआईडी ​​| U_1 | यूआईडी_2 | + ------- + ------- + -------- + | 1 | 8 | 3 | | 2 | 8 | 5 | | 3 | 8 | 2 | + ------- + ------- + -------- + वार्तालाप_रेली तालिका: + ------- + ------- + -------- + -------- + | Cr_id | उत्तर | Uid_fk | Cid_fk | + ------- + ------- + -------- + -------- + | 1 | | 8 | 1 | | 2 | | 8 | 11 | | 3 | | 8 | 11 | + ------- + ------- + -------- + -------- + मुझे होना चाहिए वार्तालाप तालिका को एक नया रिकार्ड के साथ अद्यतन करने में सक्षम है, अगर कोई नया उत्तर बनने पर मौजूद नहीं है, तो मुझे निम्न त्रुटि मिलती है: एक बाल पंक्ति को जोड़ या अपडेट नहीं किया जा सकता: एक विदेशी कुंजी बाध्यता विफल (`_db`।` रूपांतरण / रिप्ली`, कॉन्स्ट्रैनट `वार्तालाप_रेली_आईबीएफबी_` विदेशी कुंजी (` cid_fk`) संदर्भ 'बातचीत' (`सीआईडी`)) कोई भी मदद बहुत सराहना की !! !! संपादित करें मैंने नए कोनो क्वेरी बनाने में कोनो उत्तर क्वेरी डाल दी है, यह एक नया कन्व...

node.js - Invalidating all of a single user's sessions in express.js -

For security reasons we can invalidate all user active sessions, for example if they change their password, or Just want to be able to log out of your second session. We node Using the JS, Express, Express-session and Radisson session store. We have (coffee script) in our app: App. Usage Express Cookie: MaxAge: 5 * 24 * 60 * 60 * 1000 # 5 Days in MS Store: New Radisson Store (Client: Rclient) Key: "Secret-Key" Redis The data store that stores in the store works by mapping the unique session ID. For example: # gets an HTTP request req.session.user = {_id: "user-id"} in Redis: & gt; "Get the cass: & lt; session-id & gt;" '' User '': {"_id": "user-id"}} ' We have a way to track all sessions that are consistent with each user ID, So that if we want to invalidate a user's session, then the following alerts may be removed from radis: gave the session to TCL as the maximum amount of ...

jquery - How can access the control that we have it's id -

I have a hidden input in my web page in which it has another input control ID, now how to the specific input controls Can I access this code to cache JQuery in my hidden input value? & lt; Input type = "hidden" id = "edBuyMeal" runat = "server" value = "btnid" enabled viewstate = "wrong" /> function setbuyert (s) {debugger wher etter = es. s. Lit ('^'); Var btn = "'#'" + $ ("#" + $ ("# edBuyMeal"). Val ()); $ (Btn) .css ("color", "red"); } I am starting in junkery. .NET and standard JavaScript in ASP will give you hidden fields like this: var btn = document.getElementById ("& lt;%: edBuyMeal.ClientID%>"); Your code is unclear, but it appears that you are getting a value from the hidden field, the value is the ID of a button, then setting the CSS class of that button. It will look like this: var hidden = document.getEl...

javascript - Painting Cells in Grid -

I have an installation of JSFDial here. I am pulling a canvas grid and want to allow a user to select a color and grid cells like 'pixel art'. Can anyone point me in the right direction? var c_canvas = document.getElementById ("c"); Var reference = c_canvas.getContext ("2D"); For (var x = 0.5; x & lt; 501; x + = 20) {context.moveTo (x, 0); Context.lineTo (x, 381); } For (var y = 0.5; y & lt; 381; y + = 20) {context.moveTo (0, y); Context.lineTo (500, Y); } Context.strokeStyle = "#ddd"; Context.stroke (); OK, it should take you closer. function getMousePos (canvas, EVT) {var rect = canvas.getBoundingClientRect (); Return {x: evt.clientX - rect.left, y: evt.clientY - rect.top}; } Function getNearestSquare (status) {var x = position.x; Var y = position.y; If (x & lt; 0; y and lieutenant; 0) returns empty; X = (Math.flur (x / 20) * 20) + 0.5 y = (Math Flower (y / 20) * 20) + 0.5 returns {x: x, y: y}; } $ (C_canvas) .click ...

How to extend existing constructor function in javascript? -

Let's say I have the following object function: function A (option) {html> ..} Then I want to create a new function (B) which is the owner of the prototype of A. These are the conditions I am looking for: The prototype of B, if modified, do not call the A as a constructor B function Should be A Constructor of A B should look like this: Function B (aOptions, bOptions) {...} var b = new B ({}, {}) just a constructor to this function b (an option, bioption) {a.call (this, AOptions) Call up area. ; // do bops stuff here ...} Now to set the prototype B.prototype = Object.create (aprototype, { Manufacturer: {value: b}}); Now B will have prototype methods from A. There will be some other changes in prototype of A in any new way to be added to the prototype of B, which is your life Can also make it easy. function A (option) {// make` new` optional if (! For example A)) {return new A (option); } // do stuff with options here ...} and ...

sqlplus: command not found on Ubuntu -

I have now installed OBACU Database 11GR2 in Ubuntu. I received this message: sqlplus: command not found this $ ORACLE_SID, $ ORACLE_HOME and $ PATH are the values ​​ Objectives Localhost: /u01/app/oracle/product/11.2.0/dbhome_2/bin$eco $ ORACLE_SID aimad @ localhost: / U01 / app / oracle / product / 11.2.0 / Dbhome_2 / bin $ echo $ ORACLE_HOME /u01/app/oracle/product/11.2.0/dbhome_2/ Objective @LostalHost: /u01/app/oracle/product/11.2.0 / Dbhome_2 / bin $ $ PATH / usr / local resonance / Sbin: / sbin: / usr / sbin: / bin: / usr / bin: / usr / bin / x11: / usr / local / bin: / usr / bin: / Usr / X11R6 / bin: / root / bin I resolve this problem How can I do? Add path variable = $ path: /u01/app/oracle/product/11.2.0/dbhome_2/bin Export Path

html - element following emty inline-block div has strange padding at top -

Image
इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मैं खुद सोच रहा हूं, क्यों एक खाली डिव, जिसमें डिस्प्ले है: इनलाइन ब्लॉक शैली एक div से भिन्न ढंग से व्यवहार करती है जो पाठ को जोड़ती है यह किसी भी तरह से निम्नलिखित तत्वों के लिए कुछ टॉप-पैडिंग जोड़ता है, जिसे हटाया नहीं जा सकता। HTML & lt; p & gt; & Lt; div वर्ग = "ए" & gt; ए & lt; / div & gt; & lt; div class = "b" & gt; बी & lt; / div & gt; & Lt; / p & gt; & Lt; p & gt; & Lt; div वर्ग = "ए" & gt; & lt; / div & gt; & lt; div class = "b" & gt; बी & lt; / div & gt; & Lt; / p & gt; सीएसएस .a {width: 20px; ऊँचाई: 20px; display: inline-ब्लॉक; पृष्ठभूमि का रंग: लाल; }। बी {पृष्ठभूमि रंग: नारंगी; line-height: 20px; font-size: 12px; display: inline-ब्लॉक; } आउटपुट क्या कोई इस व्यवहार को समझा सकता है? इनलाइन तत्व लंबवत-संरेखित करें: आधारभूत डिफ़ॉल्ट रूप से ...

java - How to generate a customized DAO using hibernate tools -

I would like to generate an optimized DAO that increases the class and implements the sample interface. There is a method in the sample interface, which should be implemented during the formation of the DAO. And naming conventions generated by the DAO should be the DAO in the name of the class, but should not be "HOME", because the Hibernate equipment produces DOO classrooms with DOO classes by default on the home. My table name is employee, address, pay and I have my organization and they are in the com.mycompany.model package. Currently I have address, employee, salary unit with all annotations and mapping. I want to generate OO, ampleADOo and Saladio by using the reverse engineering strategies below. Below is my reverse engineering strategy class public class DAOReverseEngineeringStrategy DelegatingReverseEngineeringStrategy Expands {public DAORverseEngineeringStrategy {ReverseEngineeringStrategy Representative} {Super}; // Tudo Auto-Generated Constructor Stub} ...

javascript - Show only one overlay on hover -

I'm having trouble with my jQuery code, instead of displaying the overlay on hover, then all of them appear When I hover on one I have made JS bin: if you hover over the images, all the overlays are visible, but what is the purpose of this, how can this code work for touch users other than the ones you are moving to walk on Am I The problem is that you are not right to animate the element - you have It must use and find the overlay that is related to that element ..., function () {$ (this) .find (".overlay"). Animate ({opacity: 1, top: "3px"}, 150);}); SaveAlement.On ("mouseleave", function () {$ (this) .find (".overlay"). Animate ({opacity: 0, top: "-23px"}, 150);}); });

wxpython - copy and past of HTML codes in Python -

I am trying to get an HTML code when a user tries to copy and paste from the web browser. As such, if you copy and past a text editor from a webbrover, then only the text is copied, not the HTML code. But, if you do it in MS Word, then you can see that the layout information is protected I am using wxPython, what is possible to get an HTML code in WxPython when a user gets the HTML file Tries to copy and paste? Thank you, Do you want to get the source code of a webpage? Try this in Python: import urlib codeSrc = urllib.urlopen ('http://www.google.fr') .read () print (codeSrc Find ('google'))

javascript - How can I quickly count occurrences of a string on a webpage? -

Looking at a local URL, how quickly do I get the number of string abc on the page Can I count using javascript and / or jquery? Example: For given URL: How often can this code be on ABC (case insensitive)? Answer: 795 (count of HTML tags) 455 (counting only visible text) Does the same results of JavaScript and / or jQuery generate? You can do this in Konsole or in JavaScript on the page: $ ("*"). Html () Match (/ abc / gi) This will get you just text nodes on the page *: var count = 0; $ ("Body") Content () Return to filter (function () {this.nodeType == 3} each (function () {var match = this.wholeText.match (/ abc / gi); if (match) count = match = lang;}); The only issue I see is that the javascript code between the tags appears in the form of text nodes, so even if it's included in your script tags in your tag, Explores.

java - File processing design suggesstion -

I am developing an application to process several CSV files using Apache camels. There are many changes and assumptions in processing. The format of the files can be dynamic, but we will always get the csv header before it comes. I do not want to add a new model every time I come to a new format, instead I want to create a map with key values ​​added. But for simple assumptions and complex rules, I had to convert it to bean (since using the drolls and bean verification). If I create a lot of models for incoming files, then the camel processor has a possible example (bad idea) or type based strategy to choose a correct strategy for a number of processes. Selection. Can someone recommend me a design approach to deal with this? Use the component where you get a list with the map containing the key values: last CsvDataFormat format = new CsvDataFormat (); Format.setUseMaps (true); Format.setDelimiter (","); ("Direct: Start"). Enormous (Format). Process...

resolution - Fonts are blurry / big in Android Studio -

Can I change the resolution of Android studio? I have settings- & gt; Appeared in appearance but it seems that there is no official way to change it. I have a 1920x1080 display and full window and the text looks a little blurred. I'm running a Windows machine on Windows 8.1. Thanks! You have to set a compatibility option for the "Disable display scaling on high DPI settings" application . Right-click on the taskbar button, then right-click the name of the app, select Properties, Compatibility. Set options, save changes, restart the studio. These instructions are for a Win7 machine, but Win8.1 should behave in the same way. To explain what is happening: Apparently, the studio is not "High DPI Awakening", that is, "I know how to handle myself on high DPI screen "And tries to scale the windows window so that its elements do not get too low. You can override it on an app-by-app basis, but be prepared for potentially leased / short UI ...

lvm - resize2fs: Bad magic number in super-block while trying to open -

I am trying to resize a logical volume on CentOS7, but I am running in the following error: resize2fs 1.42.9 (28-Dec-2013) resize2fs: The valid file system superblock could not be found by attempting to open the bad magic number / dev / mapper / centos-root in the super-block. I have tried to add a new partition (using fdisk) and using vgextend to increase the volume group, then resize the logical volume by using Lvextend OK worked fine, but it failed on resize2fs. I have also tried to remove an existing partition (using fdisk) and try to rebuild it with a big end block, then change the size of the physical volume to Lvm pvresize, lvm lvresize After the size of the logical volume using Hopefully some of the following shades will be some light fdisk -l [root @ server ~] # fdisk -l disk / Dev / xvda:. 32.2 GB, 32212254720 bytes, 62,914,560 areas units = areas 1 * 512 = 512 bytes area size (logical / physical) of: 512 bytes / 512 bytes I / O size (least / optimum): 512 ...

java - Why is getEntityManager() not defined? "Cannot resolve method getEntityManager" -

I'm building an Android app that integrates with Google Epegine Datastore without using GDO. I am trying to create an endpoint that will allow me to access the data in my datastore. The function I am writing is below, but I am having a strange problem by putting this code in the endpoint java class ... The error I get is not resolved by the method Can getEntityManager () In every example I see online, all this is called this function. That's why it should be a way of working, or I have to do some stupid. What am I missing? How can I resolve it? @ API (name = "getPostsApi", version = "v1", namespace = @ API namepace (ownerDomain = "endpoints.myModule.myCo.com", Owner name = "Endpoints.myModule.myCo.com", PackagePath = "")) Public class GetPostsEndpoint {/ ** * This method lists all the organizations inserted in the datastore. * It uses the HTTP GET method and paging support * * @ Return A Collection Response Clas...

ruby on rails - Where should background job logic go -

I am using rail and rushes but it is more of a design question, where real logic with background jobs should go. I have a class like this: class ticket # 1) should the method go here? End and a BG job like this: Module jobs class Patient # 2) Or should the method go here? End End Then there is a method that operates the billing for the ticket. It makes two network calls (one of which will be slow), so it is clear that we need a background job def pay_ticket # call stages and other network call end should go. Whether there are some common ideas on fats background jobs on people or if this argument usually remains in the model. Or if it depends on each situation thanks! It really depends on how you want to cover your code. I'm a strong believer Intel fat is a model design pattern, but it is actually dependent on each developer in any way it seems like circumstances will be cured, so I think my first question is, do you share project Are developing in (...

Convert Autocad (DXF) file to transparent image -

I would like to convert an autocatet file (DXF) into an image based on the following criteria: I would like to specify the viewport from the AutoCAD file. I would like to specify the width and height of the resulting image in pixels. The resultant image needs to be transparent PNG. I am not an experienced autoxide user, therefore, please explain in a simplified manner, if other tools (for XMAP in Java) that can do the same thing, please let me know. Thank you. You can convert your DXF to SVG, which is a Java based converter. You can use batic for SNG from PNG to SNG, depending on your input files, it can be the easiest solution to convert DXF into non-transparent PNG and replace all white with transparent.

php - Get a value from a echo json_encode -

I have to echo json_encode ($ return); In a model file using Codeigniter In addition, I need to get a value from echo in the controller file that calls this model. Is this possible? How can this be done? Thanks in advance Try it out: echo json_encode (array ("name" => gt; "test"));

parse.com - javascript variables not getting passed to function -

For any reason on line 54 (which is starred ************) error My 'RandUsers' array is saying that 'push' is not popping up can not be undefined but the array which was initially empty should not have been properly passed. Why the RandUuer is not being passed properly? This cloud code on Parse.com is being triggered by an AfterSave function. I've declared variables so that they can be global variables, but if the idc is a cloud code and does not have a regular implementation file, then it affects. var leanBody = ""; Var leanSenderName = ""; Var leanSenderId = ""; Var randUsers = []; Function varReset (LeanBox, LinuxSender, Lean SenderID, RAND User) {leanBody = ""; LeanSenderName = ""; LeanSenderId = ""; RandUsers = []; Console.log ("variables were set"); } Parse.Cloud.afterSave ("lean", function (request, leanbody, leanseader name, LAN sensor id, rand user) {varReset (Leanboody...

python - Searching for a word in a nested list -

I am trying to write a function that specifically searches in the list: DEF Search (Inlist, Matches): In Li In Inlist: For M In Match: If M: Lee: Returns Le Returns Any El [[("Daniel", "20 November", "Tenochtitle") , ("Anturo" 17, "17 October")] Here, for example, looking for Daniel's date of birth. I have to define this search but I am not sure how to go from here. I got this code from: but you need to be more specific if you have a Want more specific answers.

Does a file have to be updated in some way for Java? -

So I start with a text file; In the beginning, the number 3 (winning zodiac) in this text file is 3 Wenningen. I can read them without errors, with a scanner I can add voning without errors, if any voning is added then the number above the file has increased by 1. The problem is as follows: If any voning has been added, the file has changed. The number is now 4, and a voning has been added. However, if I want to read all Vaughan, then Java gives exception to the 4th voning. So for some reason I can not read the fourth voning. What could be the reason? Do I have to save the file in some way after the file has changed? Help is greatly appreciated!)! Edit Note: The Dutch word for the voning house is the code to read the file: read public static PortFill (String Infil) {Try {scanner sc = new scanner (new file (infil)); ArrayList & LT; Woning & gt; Wlijst = New Arrestist & Lt; Woning & gt; (); Portiftville P = new portiff (); Int woningen = sc.nextInt (); In...

Python - search for string in array -

मेरे पास तार की एक सरणी है: ["aaa 1", "aaa 2 ", बीबीबी 2", "सीसीसी 3", "डीड 4"] मुझे इस सदिश में कुछ स्ट्रिंग की खोज करने की आवश्यकता है, लेकिन केवल पहला भाग। उदाहरण के लिए, मुझे "aaa" से शुरू होने वाली तार की स्थिति की आवश्यकता है (इस उदाहरण में, वह 0 और 1 होगा)। मैं यह कैसे कर सकता हूं? आप इसके साथ उपयोग कर सकते हैं और: & gt; & gt; & gt; Lst = ["aaa 1", "aaa 2", "bbb 2", "ccc 3", "ddd 4"]> gt; & gt; & gt; [एक्स के लिए एक्स, वाई में एन्यूमरेट (एलएसटी) अगर y.split () [0] == "एएए"] [0, 1]> gt; & gt; & gt; y.split () [0] रिक्त स्थान पर स्ट्रिंग को विभाजित करेगा और पहले तत्व वापस करेगा। इस प्रकार: यदि y.split () [0] == "aaa" केवल प्रत्येक स्ट्रिंग का पहला भाग जांचता है। यदि यद्यपि तार हमेशा आपके उदाहरण में दिए गए लोगों की तरह होते हैं, तो एक सरल होगा: [x के लिए x, y में गणना (lst) अगर "aaa...

java - How to approach probability type of programming challenge? -

You have given 17 cards from 52-card decks. On average, what is the longest straight flush in your hand? A straight flush is a set of cards that are continuously and also of the same suit. 2 is low, Ace is high, and you can not wrap around. Do not solve this mathematical ... Guess about this program. I am not able to think about the right approach to this type of question. Do I have to apply any algorithms? This is an example called "Monte" after Carono Resort, Carlo "Program This idea is just a random The process is often to get angry and to see the statistics. Actually, you should write a program that takes 17 cards from the deck and flush it for the longest time, Or 100,000) calls and take the average.

javascript - Extending bootstrap dropdown to bottom of visible page -

There is a dropdown on my website that I would like to extend to the visible bottom of my webpage. This is because I do not have to set a max-height on all the dropdowns, when actually the user can be pushed forward to choose their option to give more options. The 100% height will not work on it. So, my HTML is very basic, it just hangs a bootstrap ul> gt; ; & Lt; li role = "presentation" & gt; & nbsp; & lt; a class = "btn btn- default dropdownBtn" role = "MENUITEM" tabindex = "- 1" data-dam = "html: name" Gt; D & lt; / a & gt; & lt; / li & gt; li role = "Presentation" & gt; & nbsp; & lt; a class = "btn btn- default dropdownBtn" role = " MENUITEM "tabindex =" - 1 "Data-Bind =" HTML: Name "> Married gt; & lt; / li & gt; & lt; li role =" Presentation "& gt; Amp; nbsp; & lt; one class = "btn b...

c++ - Boost.Regex linkage error LUbuntu 14.04 g++ 4.8.2 -

सुप्रभात! मुझे सी ++ 11 में नियमित अभिव्यक्ति के साथ समस्या है जी ++ (उबंटू 4.8.2-19ubuntu1) 4.8.2 कॉपीराइट (सी) 2013 फ्री सॉफ्टवेयर फाउंडेशन, Inc मैं आज बढ़ावा स्थापित इस तीन आदेशों का उपयोग करते। sudo apt-get स्थापित libboost सभी-देव sudo apt-get स्थापित योग्यता योग्यता खोज को बढ़ावा देने जब मैं यह सरल प्रोग्राम संकलित करता हूं: #include & lt; iostream & gt; #include & lt; स्ट्रिंग & gt; #include & lt; boost / regex.hpp & gt; नेमस्पेस बूस्ट का उपयोग करना; नेमस्पेस एसटीडी का उपयोग करना; Int main () {string text; रेगेक्स पैटर्न ("\\ w * to \\ w *"); वापसी 0; } इस कमांड का उपयोग कर: g ++ main.cpp संकलक रिटर्न: /tmp/ccOdFz7f.o: समारोह में `बढ़ावा देने :: basic_regex & LT; चार को बढ़ावा देने :: regex_traits करें & lt;, चार को बढ़ावा देने :: cpp_regex_traits & LT; चार & gt; & Gt; & Gt; :: आवंटित (चार स्थिरांक *, चार स्थिरांक *, अहस्ताक्षरित int) ': main.cpp :( text._ZN5boost11basic_regexIcNS_12re...