Posts

android - How to initialize TypeFace in an interface class -

तो मेरे पास यह इंटरफ़ेस है: सार्वजनिक इंटरफेस Utils {static final typeface font = textface .createFromAsset (getAssets (), "फोंट / फ़ॉन्ट.टीटीएफ") ;; } मुझे getAssets () में एक त्रुटि हो रही है, यह कहता है विधि getAssets () प्रकार Utils के लिए अनिर्धारित है क्यों क्या वह? कृपया मदद करें धन्यवाद:) आपका Utils वर्ग में कोई विधि नहीं है getAssets () । मुझे लगता है कि आप एंड्रॉइड context वर्ग से एक का उपयोग करना चाहते हैं I इसका मतलब है कि आपको संदर्भ ऑब्जेक्ट कॉल करने की आवश्यकता है getAssets () । आपके सटीक ऐप डिज़ाइन के बारे में अधिक जानकारी के बिना, मैं आपकी सहायता नहीं कर सकता। एक संभावित समाधान एक गतिविधि उपवर्ग बनाना है जो आपके सभी अन्य गतिविधियों का विस्तार करते हैं। आपको जीवन चक्र की गतिविधि का भी सम्मान करना होगा: सार्वजनिक अमूर्त फ़ॉन्टएक्टिविटी गतिविधि को बढ़ाता है (निजी टाइपफ़ॉर्म फोंट; @ ओवरराइड पब्लिक ऑन क्रेट (बंडल सहेजे गए इन्स्टैंसस्टेट) {सुपर.नक्रेट (सहेजे गए इन्स्टेंसस्टेट); Font = Typeface.createFromAsset (getAssets (), "फ...

sql - How to count amount of data for each row -

मेरे पास यह तालिका है: आईडी का नाम 01 02 03 04 05 06 07 0000068 नाम 1 वी VX 0000069 नाम 2 वी VX VX VV 0000070 Name3 VVVVVV यह अनुपस्थिति की जांच के लिए एक तालिका है और मैं कॉलम 01 से 07 तक प्रत्येक पंक्ति से डेटा की मात्रा की गणना करना चाहता हूं, इसलिए मुझे उम्मीद है पहली पंक्ति 2 का परिणाम, दूसरी पंक्ति 5 और तीसरी पंक्ति 6 ​​देगा। और यदि संभव हो तो मुझे यह चाहिए कि नतीजा एक नया कॉलम के रूप में जोड़ा जाए क्या किसी भी तरह से काम करने का कोई तरीका है? यदि कॉलम की संख्या स्थिर है, तो आप सरल मामला अभिव्यक्ति। का चयन करें, मामला जब [01] = '' या [01] तब शून्य है 1 या 1 अंक + मामला जब [02] = '' या [02] नल तब है जब 1 ईएण्ड + मामला जब [03] = '' या [03] तब शून्य हो जाता है जब 1 या तो + मामला होता है जब [04] = '' या [04] तब शून्य होता है जब 1 ईडी + मामला तब [05] = '' या [05] है नल तब 1 या 1 ईडी + मामला है जब [06] = '' या [06] शून्य हो तो 1 या 1 + मामले का मामला है [07] = '' या [07] तालिका शून्य से 1 या तो [सीएनटी] नल है; ...

java - XA transaction for two phase commit -

Hi, If two resources are included in a transaction then the XA Transition setting should be weblogic The server should be enabled then the XA drivers should be turned down. This is an alternative way of transacting two resources without enabling the XA transaction Yes, you can use global transaction emulation. Weblogic has two modes: Logging Previous Resources - Weblogic creates a table in all your data sources and writes transaction data in this table. This is a preference option. From the official document: With this option, connection is used in transaction branch & gt; Transaction is processed as the final resource and in the form of a local transaction. & Gt; Record for two-step commit (2 pc) transactions is put into a table on record resources, and & gt; The result determines the success or failure of the prepared phase of the global transaction. & Gt; This option offers some performance benefits and two-step ambulatory & gt; Provides m...

c# - Identifying elements in Iframe after content change using Selenium -

problem I have an iframe that contains a form, Once upon a time, I present some of the content of the IFRM transformation on the basis of information. So I need to verify the results / elements as part of my test. What did I do I used the switch () is. The data for frame IFrame for submitting, and "WebDriveWit" is used to wait for the results (I'm waiting for one element) issue After submitting new elements Am I doing something and after time the "waiting element" fails, even if the result screen is visually impaired Are you loaded in IFrame wrong? Or can someone suggest me? I am working on the same scenario and for this To work, you can try: driver. SwitchTo (). Frame (frame); Driver.findElement (by.cssSelector ("input [name = \" login \ "]). Click (); // whatever you want to frame. Driver.switchTo () defaultContent (); Thread.Sleep (3000); driver.switchTo (frame). Driver.findElement (By.cssSelector ("Input [nam...

.htaccess - how to Change a GET method URL to clean URL in php? -

यह एक URL है जो gET विधि द्वारा php में बनाया गया है डेटा पैरामीटर को archives.html पृष्ठ भेज: http://127.0.0.1/archives.html?option=com_archive&diffate = 16-2-2014 क्या इस URL को साफ करने का कोई तरीका है? मुझे ऐसा कुछ करना है (और मैं भी पैरामीटर भी भेज सकता हूँ!) http://127.0.0.1/archives.html/16-2-2014 क्या मैं इसे mod_rewrite के द्वारा कर सकता हूं? (मैं जूमला 3 पर एक घटक विकसित कर रहा हूं) आप इस नियम को अपने रूट .htaccess में उपयोग कर सकते हैं: RewriteEngine On RewriteRule ^ (अभिलेखागार .html) / ([0-9 -] +) /? $ / $ 1 / विकल्प = com_archive और date = $ 2 [एल, एनसी, क्यूएसए ]

java - How to pass a List as parameter by using ActionForward? -

I am creating a simple project using Sturts 1.0 and Hibernate. The main task of the project is to take unit number from Welcome page and then query the database for information about the unit and show results on the Index.jsp page. Struts-config .xml & lt; Struts-config & gt; & Lt; Form beans & gt; & Lt; Form-bean name = "welcomeForm" type = "tutorial.truts.form.valcenform" /> & Lt; / Form-side & gt; & Lt; Action Mapping & gt; & Lt; Action Path = "/ ViewSetset" name = "welcomeform" type = "tutorial.Session. & Lt; forwarded name =" success "path =" / index.jsp "/> & gt; & lt; forward name =" failure "path = "/ Welcome Jsp "/> & lt; / action & gt; & lt; / action mapping & gt; public class extends viewAllAsset operation {@SuppressWarnings (" unused ") Public ActionForward executed (ActionMapping mapping, acti...

python - generate SEQUENCE on next day it will initialize using Psycopg -

Using PostgreSQL and Python We want to generate sequence based on daily basis as the next day begins with sequence 1. We are using the Tryton framework. Former: 201402170001 (Year 0001) Generates more than 100 sequences this day, next day it will start from 201402180001 . We produce the sequence but we do not know how it should be disabled on every next date? You can use datetime to get the date string .datetime.strftime and use the string string formatting for the pad for some enhancements counter for four digits: datetime from datetime counter = 1 ("% 1% 2" P> To update the counter daily, you will need to store the current day, then reset it to 1 when it changes, like: if current_date! = DatetimeToday ( ): Counter = 1 # recieve Counter Wartman_deta = Detataim