Posts

angularjs - Angular UI-Router nested tabs, switch and switch back to where we left off -

please click on "left" "Link 2 "to expand Click" right " Click" Left "- link 2 is no longer expanded Q: How can the left tab "Remember" that was displaying "Link 2" when we tab away from it and then come back to it? (I also want to do this for the right tab) Please note that I do not want to hack the official angular (UI router, etc.) code by any means. Also, I like that Link 1 stands first by default when Left is displayed or selected (with the same default on the right). But can it be a subject for a different question? You can do it very easily. Set different states for each tab at the same level 1) Register the $ stateChangeSuccess listener on $ rootScope . If the state .includes ("left") or .includes ("right") , then keep track of the destination status and its states. 2) Change a $ state on the $ rootScope change listener. If the state is at .is ("left")...

Unbound variable in python -

I'm trying to create a toy singleton in Python for learning the language and simultaneously running into a problem. I am declaring such a class. class error logger: #include which provides logging in file instance = a df getInstance (): # Our singleton " Constructor "for example no one is: print" foo " when I file "/ home / pal / call Projects / Space / SRC / Error Laggar ", line 7, if there is no example in getInstance: unbound local error: local variable 'example' referenced before assignment what's happening here , Should be assigned statically as an example? What would be the right way to do this? This is a static variable in the form of the ErrorLogger prefix. Class error: Homeless: # Singleton which provides a file instance = any logging @staticmethod def getInstance (): # If our singleton "constructor" error logger .instance is none: print "foo"

db2 - SQL UPDATE A COLUMN = 'XYZ' WHERE SELECT (MULTIPLE ROWS TO UPDATE COMPARING DIFFERENT TABLE) -

नीचे एसक्यूएल देता है -811 या नौकरी रद्द हो जाती है अद्यतन दर एक SED.D_PROC_RATE_END = '1234' कहां मौजूद है (A.C_PROCEDURE का चयन करें, A.C_SPECIALTY, A.C_PROV_TYPE, A.C_PROCEDURE_MOD प्रोक बी वाम बाहरी से A.N_PROC_RATE शामिल हों दरें एक पर A.C_SPECIALTY = '181' और A.C_PROV_TYPE = बी C_PROV_TYPE और A.C_PROCEDURE = B.C_PROCEDURE और (A.C_PROCEDURE_MOD = B.C_PROCEDURE_MOD या A.C_PROCEDURE_MOD IS NULL) और (A.D_PROC_RATE_END शून्य है या A.D_PROC_RATE_END = '12 / 31/9999 ') और A.N_PROC_RATE = क्या इस एसक्यूएल को प्रत्येक रिकॉर्ड को कम से कम क्वैरीटिया में अपडेट नहीं किया जाएगा? हम जवाब नहीं दे सकते कि यह हर पंक्ति अपडेट करेगा या नहीं। हमें डेटा नहीं पता है अगर EXISTS () विचलित हर बार एक 'सच्चा' मान देता है, तो यह हर पंक्ति को अपडेट करेगा; अन्यथा यह नहीं होगा। इस क्वेरी को पहले चलाएं: SELECT A.C_PROCEDURE, ए.सी.विपेतिटी, एसी_PROV_TYPE, A.C_PROCEDURE_MOD, A.N_PROC_RATE दरों से एक कहां मौजूद है (चयन A.C_PROCEDURE, A.C_SPECIALTY, A.C_PROV_TYPE,...

python - Recursive Function for drawing a tree in Turtle -

I am trying to attract a tree using a recursive function. This is my best shot I know I am away, but there is a problem in trying to fix it. Any help would be appreciated! Def svTree (trunkLength, level): "Turtle" uses the drawing function to return a tree with input of a certain level: two integer, trunk length and level " NewtrunkLength = trunkLength * .5 if level == 1: Penup () Other: Forward (trunk langement) left (45) svTree (trunk langang * 0.5, level -1) right (90) forward (trunkLength * .5) svTree ( TrunkLength * 0.5, Level-1) Left (45) Backward (trunk length) Right (trunkLength) Right (45) svTree (trunkLength * 0.5, Level-1) Left (90) svTree (trunkLength * 0.5, Level-1) Right (45) backward (trunkLength) svTree Return (newtrunkLength, Level-1) Here's my new attempt: I think it's close because I can make Y but then I think my recursive step Faulty ... please help! Thanks! Def svTree (trunkLength, Level): Uses turtle drawing functions to return a tre...

jQuery check .hasClass('[class*="myclass-"]'); -

मेरे पास एक वर्ग की कक्षाएं शुरू होती हैं, जैसे myclass-s1 , myclass-b10 , myclass-ss1 आदि। क्या jQuery के क्लास की जांच है अगर क्लास का नाम 'myclass-'? आप का उपयोग कर सकते हैं ($ ('div')। है ('[class ^ = myclass]')) {// अपने सामान यहां हैं }

linux - CDbConnection failed to open the DB connection: ORA-12541: TNS:no listener -

Then I'm trying to connect to db Oracle using oci8 from php application. It works fine in Windows Ora-12,541: TNS: Any listener CDbConnection Tried to fail to open the DB connection p> I have oci8 installed in Linux machine (RHEL6) Oracle server is running in windows In my tnsnames.ora, the listener. Ora are the hosts 'localhost'. listener = (DESCRIPTION_LIST = (Description = (ADDRESS = (Protocol = IPC) (key = EXTPROC1521)) (ADDRESS = (Protocol = TCP) (Host's Like = * * localhost **) (port = 1521))) Is this a problem? Or else how to fix it? Is your Oracle listener running? The most common cause of a listener error is not due to the Oracle listener running in the background You can do this in Linux by ntsysv Areas can be configured via

Clear specific asp.net validation group in javascript -

मैं एक विशिष्ट सत्यापन समूह को Page_ClientValidate ('validationgroup') का उपयोग करके मान्य कर सकता हूं; अगर मैं किसी पृष्ठ में सभी मान्यताओं को रीसेट करना चाहता हूं। Page_ClientValidate (''); यह ठीक काम करता है लेकिन विशिष्ट सत्यापन समूह को कैसे साफ़ करें? आप सभी मान्यताओं को साफ़ करने के लिए निम्नलिखित जावास्क्रिप्ट का उपयोग कर सकते हैं फ़ंक्शन स्पष्ट ValidationErrors () {var i; (I = 0; i & lt; Page_Validators.length; i ++) के लिए (पेज_वैलिडेटर्स [i] .style.display = "none"; }}