Posts

Showing posts from March, 2014

testing - Is it possible to set tests to continuously run on Android Studio? -

I want to know whether it is possible to continue testing on Android studios. I got an infinite device for eclipse / intel but there was no tool for Android studio. Since Android studio is based on IntelliJ, I thought there might be a way to do this on Android studios, is anyone capable of doing so? Thanks! This is an old question, so I think that OPP did not post any solution Was there. Currently, you can see on Infinitest website: I'm an IntelliJ fan Find Infinitest in Plugin Manager. And in fact, plugins can be found in the repository.

java - getY() returning 0 upon adding a JComponent -

I'm new to swing so that I read through the Java tutorial and the API. I am playing with the subclass of JComponent ( DTPicture -supports drag and drop). Actually I'll create a panel with GridLayout . Then I populate the panel with the DTPicture object I inherited the I code getLocation () . When you call it, the value is 0. When I run a GUI, then I see the DTPicture objects spread vertically, then why is returning getLocation 0? Thank you. Below is my code: * Everything else has been initialized, declared, implemented. Public class Rackbluilder tool extends JPanel {// maplake slot # for JPNL public static point [] slot IDARRE = new point [42]; Public RackBuilderTool () {Super (New Grid Layout (42, 1)); // DTPICTURE [] Rack slotare = new dcPicture [42]; For (int i = 0; i While calling this, the value is 0. When I run a GUI, then I have DTTexture objects spread vertically Layout Manager to determine the size / location of a component Is respon...

Javascript variable names in loop -

I have a function that creates 6 HTML input boxes to store my score values, the total score box 1 of var hole 1 = prompt ("enter 1 end"); Var Hole 2 = Prompt ("Enter Hole 2 score"); Var Hole 3 = Prompt ("Enter Hole 3 Score"); Var Hole 4 = Prompt ("Enter Hole 4 Score"); Var Hole 5 = Prompt ("Enter 5 Ends"); The complete work of addScore (): addScore function (var ni = document.getElementById ('myDiv'); Var numi = document.getElementById ('theValue'); Var num = (document.getElementById ('theValue'). Value -1) + 2; Numi.value = num; Var newdiv = document.createElement ('div'); Var divIdName = 'my' + number + 'div'; Newdiv.setAttribute ('id', divIdName); // Prompts the user for his score Distinguish 1 = Prompt ("Enter 1 End"); Var Hole 2 = Prompt ("Enter Hole 2 score"); Var Hole 3 = Prompt ("Enter Hole 3 Score"); Var Hole 4 = Prompt ("Ent...

mysql - Laravel - how to use foreign primary key that's not an integer? -

I have to set a string column as a primary key of a table, then mention as a foreigner That's the key I'm trying from another table. This is possible Documents per: Laravel assumes that each table is a numerical primary key (usually named a ???? ida ???? ) And ensures that the value of this column is unique to each new line added in the table. Laravel works really well until each table has a numerical primary key. Therefore, for your average large application, please make sure that you define the primary key using the scale () method. In my case, I do not want to define a id column because it will be useless. The string column that I want to define will act as the primary key. If this is possible, can I find a migration piece of an example? "itemprop =" text "> This is an old question, but for the sake of purity, I would like to continue that the present version of the eloquent You can actually use non-numerical primary / foreign key in ...

asp.net - How do i get my repeater results to appear line by line -

& lt; p runat = "server" id = "pServices" & gt; & Lt; एएसपी: पुनरावर्तक रनैट = "सर्वर" आईडी = "आरटीपी सर्वर" ओनटामेडाटाबाउंड = "आरटीपीएसवाइसेस_ऑनटाइटडेटाबाउंड" & gt; & LT; HeaderTemplate & gt; & lt; / HeaderTemplate & gt; & LT; ItemTemplate & gt; & Lt; asp: लेबल runat = "server" id = "lbl सेवा" & gt; & lt; / asp: Label & gt; & Lt; / ItemTemplate & gt; & LT; AlternatingItemTemplate & gt; & Lt; asp: लेबल runat = "server" id = "lbl सेवा" & gt; & lt; / asp: Label & gt; & Lt; / AlternatingItemTemplate & gt; & Lt; / एएसपी: पुनरावर्तक & gt; & Lt; / p & gt; और मेरे पीछे के कोड में निजी शून्य अद्यतन पृष्ठ के साथ उपयोगकर्ता उपयोगकर्ता डेटा (उपयोगकर्ता उपयोगकर्ता प्रोफ़ाइल) {this.pprofile.InnerText = UserProfile.About; RptServices.DataSource = UserProfile.Services; rptServices.DataBind (...

trigger javascript function using c# -

I have to write AC # class that triggers the contents of an html page (the page is public) and a javascript function One file that downloads is a file. My goal is to download the file and save it to a folder The page is a public HTML page, which does not require login. The link looks like this: href = "javascript: __ doPostBack (& ​​lt; spreadsheet & amp; # 39; & amp; # 39; & Amp; # 39;) "style =" font-weight: 700 "& gt; Export results & lt; / A & gt; )! = False)) {theform .__ EVENTTARGET.value = eventTarget; The form .__EVENTARGUMENT.value = eventArgument; TheForm.submit (); } When you manually click on the link, it submits the form and returns an Excel sheet, a dialog box will open to download it, where you have to save it . I want to automate it to get excel sheet and then want to process it. I found that I can find a link on a page like this: HtmlWeb Hw = new HtmlWeb (); HtmlDocument Doc = hw.Load (/ * url * ...

Javascript foreach array key values, output to html -

How do I loop through an array key to output my values ​​to HRM? Working with Layouts I thumbnail grid, 3 columns by 2 columns is a caption below each thumbnail. The selection of any thumbnail opens the hidden container, which also has 3 columns and 2 rows of a grid is. Many images and captions within that hidden container are going to be identical to the same duplicate HTML rather than being identical. I thought that I can put each one in an array and refer to those values ​​which Is connected with. I will make a loop at the moment but decide. var img = ['image01.jpg', 'image02.jpg', 'image03.jpg', 'image04. Jpg '] var Description = [' Aaaa ',' BBBBBB ',' CCCCC ',' DDDDD ']; $ ("#yin"). Click (function () {var img = [0,2]; var description = [0,1]; $ (step) .each (function () {document.getElementById ("img"). WinnerHTML ();} ); $ (Imgs) .each (function () {document.getElementById ("img...

Facebook + Android: Saving a score to user -

I was wondering how to call a request and use GraphAPI to save the user's new highscore score in my account. I had a look at the developer docs, but I am still unsure how to use the HTPP method 'POST' score public request (session Session, string graphpath, bundle parameter, html math hpmind) Any help multi An example has been posted in the Facebook Sample App "Friends Smash": How To Score Do: Take a look at the tutorial too:

xcode - Locate source project directory in Swift from compiled code -

I want to find a directory of my uncompressed source code (because I want to count my lines) project. Project Rippo = "/ User / Tomburorn / Workspace / SwiftGolf" // I've found the compiled location with the NSBundle.mainBundle (). BundlePath , but does not contain unrelated code in any ideas? Perhaps there is a way that I can write a temporary file during the build process? The challenge is getting faster Runtime versus location to estimate on collection time. The logic in Xcode suggestion works fine and can be accepted as a solution. I could not use this approach because I am using SPM without XM. Package in you. Swift Dependencies: [. Package .git ", version (1,8,0))] Then enter import files in your code projectrepo =" (Folder .home .path) / gitWorkspace / SwiftGolf "{Enter Model = Try Data (Content: URL (fileURLWithPath:" \ (projectDir) / \ (modelFile) ")}} Hold {Print (" Error: \ (error) " )} Another optio...

c# - Programming with speech recognition of microsoft. How could I close the speech recognition engine each time when it got a word -

I am programming using Microsoft's speech recognition I run an example and it works very well . But if I open speech recognition, the program will always be in. Every time when the engine recognizes the words, it prevents it, is it possible? My code is a bit like this: _trainer = new speech speech recognition engine (); _trainer.LoadGrammar (new grammar (new grammar builder (word)); // Load a word _trainer. Speech Recognized + = _trainer_SpeechRecognized; _trainer.SpeechRecognitionRejected + = _trainer_SpeechRecognitionRejected; _trainer.SetInputToDefaultAudioDevice (); // Set the input on the default audio device _trainer. Identify Sink (Recognize mode.Single); Thank you for your help. I tried to call _trainer.Dispose () but in the end, it will not work on the engine and gives me a break. SpeechRecognitionEngine Identify P> _trainer.RecognizeCompleted + = _trainer_RecognizeCompleted; _trainer_RecognizeCompleted inside _trainer.RecognizeAsyncStop...

navigation - NavigationHelper_SaveState vs OnNavigatedFrom -

Basic Page template for Windows Phone 8.1 has the following methods: private void NavigationHelper_LoadState ( object sender, LoadStateEventArgs e) private void NavigationHelper_SaveState (object sender, SaveStateEventArgs e) my understanding is that NavigationHelper above methods to save page data in NavigationHelper_SaveState NavigationHelper_LoadState is used is available. Of and the OnNavigatedFrom use is made of any of the final second, and OnNavigatedTo to use any preparatory work But also, the data contained in the previous frame in the OnNavigatedFrom method contains the Frame.Navigate () method. My question is, am I right in thinking that the first 2 methods are used to maintain the data in a single page, and the other 2 methods for transferring data between 2 pages Is used? Post-text "itemprop =" text "> I try to explain how it works and where it is useful. First of all, by you above all methods have been combined with each ot...

php - Is it good to wipe $_SESSION before using it? -

I'm still new to sessions wipe out $ _ session Is before using it? Example: $ _ session = array (); $ _SESSION ['id'] = 1; $ _SESSION ['name'] = 'any'; I am telling you people's opinions. Because I do not have many experiences in the session . In my strange logic, maybe I could write from logout to administrator session and login > Member Session Therefore, any $ _ session / value from admin will still be in the $ _ session array Extra: 1. I Admin user and logout from admin page was not 2. Now I go from admin page to member login page What should I do here? kick admin admin page because he is not a member? no In fact, very bad and your example code will make your sessions unusable. When you call session_start () you are given a blank $ _ session / > or you $ _ Sessions can retrieve data saved on For more information about sessions, check the PHP docs: About logging in and ...

mysql - save data into 2 tables in sql -

मेरे पास 2 टेबल हैं, अर्थात् sales और sales_item । इन तालिकाओं में सहेजे जाने वाले मान एक PHP फार्म से आ रहे हैं। बिक्री तालिका: srfno ग्राहक का नाम पता संपर्क क्रमांक sales_item तालिका: itemid srfno विवरण मात्रा serialno विवरण मेरी समस्या यह है कि मैं sales_item के लिए मूल्यों को सम्मिलित नहीं कर सकता मुझे srfno से बिक्री नहीं मिल सकता है ताकि वे संदर्भित हो। मैं केवल डेटा को बिक्री तालिका में सहेज सकता हूं। धन्यवाद, धन्यवाद! sales_item में डालने के लिए मेरा कोड: $ retitem = "sales_item से` srfno` चुनें; $ Psql = mysql_query ($ retitem, $ con); $ Reti = mysql_num_rows ($ psql); $ Reti = $ reti + 1; जबकि ($ वापसी = mysql_fetch_assoc ($ psql)) {ifet ($ return ['srfno'])) {$ retid = $ return ['srfno']; $ Retid = mysql_insert_id (); $ Addretex = "` विक्रय_टैम` (`sitemid`,` srfno`, `retqty`,` retdesc`, `रीसेटियर`,` एक्क्टीटी`, `एक्सडीसीसी`,` एक्सीरियल`) में डालें, मूल्य ('', '$ रेटिड ',' $ qty ',' $ desc ...

How to auto play iframe youtube on webview android -

I use Android webview your app to display videos from YouTube, it works well. But I want this to be an automatic game. It would add to my activity that I Veediouarel the "? Autoplay = 1" , but nothing changes, it will still auto play is not. Expands the public class LandVideoAct activity {WebView mWebView; String videoURL = ""; @ Override protected void saved create (bundled Instansstet) {Suprknkret (saved Instensstet); RequestWindowFeature (Window.FEATURE_NO_TITLE); SetContentView (R.layout.landfull); VideoURL = "http://www.youtube.com/embed/VYIi49czywo?autoplay=1"; MWebView = (webview) ViewById (RID. FullViewView); String vid = "& lt; html> body style = \" margin: 0; Padding: 0 \ "iframe width = \" 100% \ "height = \" 100% \ "src = \" "+ video URL + \" \ "type = \" text / html \ "Frembord = \" 0 \ "& Gt; & lt; / iframe & gt; & lt; body & gt; ...

java - Recursive object access to private methods -

क्यों निम्नलिखित कोड "यो" प्रिंट करता है? जिसका printYo () को बुलाया जा रहा है? मुझे लगता होगा कि यह कोड संकलित नहीं होगा क्योंकि printYo () निजी t । सार्वजनिक वर्ग टेस्ट {निजी शून्य प्रिंट ) {System.out.println ("यो"); } सार्वजनिक शून्य डबल ट्रबल (टेस्ट टी) {t.printYo (); } सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {टेस्ट टेस्ट = नया टेस्ट (); Test.doubleTrouble (नया टेस्ट ()); }} मैं यह सुनिश्चित करने के लिए क्या कर सकता हूं कि बाहरी ऑब्जेक्ट तर्क वर्ग को उत्परिवर्तित नहीं करता? printYo () टी नहीं के लिए निजी है यह विधि निजी वर्ग टेस्ट के संबंध में है टेस्ट में कोई भी कोड इसका उपयोग कर सकता है। मैं यह सुनिश्चित करने के लिए क्या कर सकता हूं कि बाहरी ऑब्जेक्ट तर्क वर्ग को उत्परिवर्तित नहीं करता? जावा में कोई भी तंत्र नहीं बनाया गया है ताकि प्रत्येक उदाहरण के आधार पर सदस्यों तक पहुंच मनाई जा सके। (यदि आप यही चाहते हैं।)

windows phone - Dynamic appbar icon with text -

I'm working on WP8.1 app. I have a circle in the appetizer, a button icon (transparent PNG). In addition to this I have a textbox on the app's screen. When I enter a number in that text box, can I show that number also in the middle of the circle in the appbar? In other words, I can have dynamic text content in the WP 8.1 app bar, a transparent app button button top or bottom of the icon? Yes, you can add that number to that AppBar . You should first get the value entered in the text box using the tag property. Then pass the value to the app's text property using the name given by you: sampleAppBar.Text = // value from the text box Hope it helps!

javascript - how to add thumbnails to dots of slick slider mentioning the current slide -

I am currently working on a new project for which the slider is required, I applied smart js for one of my projects Now I have to add a thumbnail which will be visible when we rotate the points which are linked to the slider For example, first click on the thumb and click on the slider Will move on the first slide. ... On the third slide, click on the third slide HTML & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; My amazing webpage & lt; / Title & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "crawl / slick css" /> & Lt; Link rel = "stylesheet" type = "text / css" href = "crawl / style.css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt ;! - This slider code is - & gt; & Lt; Div class = "center" & gt; & Lt; Div & gt; & Lt; Img alt = "slide2" src = "image / img1.jpg" & gt; ...

Should i use finalize() or not in java? -

इस सवाल का पहले से ही एक उत्तर है: मूल उत्तर- count-count "> 15 उत्तरों क्यों अंतिम रूप से () जावा में गारंटी नहीं है? अंतिम रूप () विधि का उपयोग नहीं किया जाना चाहिए कार्यक्रम के नीचे विचार करें। class test {protected void finalize () { System.out.println ("क्या मैं निष्पादित करूँगा?"); } सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग अरिज []) {टेस्ट टी = नया टेस्ट (); }} यह प्रोग्राम तब चलाता है जब एक खाली आउटपुट होता है। हम जानते हैं कि ऑब्जेक्ट कचरा संग्रहण के लिए योग्य होने से पहले अंतिम रूप () का उपयोग किसी भी बाह्य संसाधन को साफ करने के लिए किया जाता है; अंतिम रूप () को JVM द्वारा बुलाया जाएगा अंदर अंतिम रूप से () हम उन कार्यों को निर्दिष्ट करेंगे जो ऑब्जेक्ट नष्ट होने से पहले किया जाना चाहिए। अंतिम रूप से () विधि बुराई है ?? , क्योंकि कई उद्धरणों का पालन होगा। हम जानते हैं कि अंतिम रूप () ऑब्जेक्ट कचरा संग्रह के लिए पात्र होने से पहले किसी भी बाह्य संसाधन को साफ करने के लिए उपयोग किया जाता है नहीं ऑब्जेक्ट कचरा संग्रहण के लिए पा...

android - Fetching tweets from twitter -

I want to bring Tweets from the official IP page and display it in my Android app..how should I move on this? Before that, Twitter was never used on Android..I searched the Internet and found many articles related to making a Twitter login but did not find the study material about getting Tweets in Twitter from a particular page. If someone can say I have used the library for Twitter Twitter 4J is an unofficial Java library for Twitter API. With Twitter 4 J, you can easily integrate your Java application with Twitter service. Twitter4J is an informal library. The feature of Twitter 4J is: 100% Pure Java - Works on any Java Platform version 5 or later Android Built-in othe support Out-to-box gzip support Li> 100% Twitter API 1.1 compatible and foam dome twitter4j example

julia lang - Function signature not found despite showing with methods(...) -

I am new to Julia, so it can be trivial. I have a function definition that looks the module (using URI pcizer): add function (graph :: graph, subject: URI, prediction :: URI, Object :: URI ... and Out of the module, I call: Add ! (G, UriPerser. URI ("http://test.org/1"), URIPerser.URI ("http://test.org/2"), URIIPRSURUR ("http://test.org/1" )) gives me this error: Error: Add any method (graph, URI, URI, URI) in boot.jl There are: 238 included_in_fom_net1 loading.jl: 114 a / users / jabran / src / rdf / src / rdf.jl: 79 Strange because when I can see Milan's signature: julia & gt; Methods (RDF.add!) # 4 methods for the generic function "Add!": Addition (Graph :: Graph, Subject: URI, Prediction :: URI, Object :: Number) / User / Forcibly / src / RDF Add /src/RDF.jl29! (Article :: Graph, subject: URI, Uniform :: URI, Object :: String) / Add User / Jarbar / SRC / RDF / SRC / RDF.JL 36! User / Jarbar / SRC / RDF / SRC ...

load testing - Precompile C# method before executing -

मैं इस तरह की कोड गति उपाय: var sw = new stopwatch (); sw.Start (); कुछ करो(); sw.Stop (); AddLog ("विधि गति (एमएस) है:" + sw.ElapsedMilliseconds); लेकिन DoSomething () की पहली कॉल धीमी है, क्योंकि कोड संकलन है। वैकल्पिक हल इस तरह दूसरे कॉल की माप गति है: var sw = नया स्टॉपवॉच (); कुछ करो(); sw.Start (); कुछ करो(); sw.Stop (); AddLog ("विधि गति (एमएस) है:" + sw.ElapsedMilliseconds); वहाँ पहली कॉल के बिना DoSomethig () precompile करने के लिए रास्ता नहीं है? प्रलेखन स्पष्ट इसलिए राज्य नहीं है, लेकिन लेख (दूसरों के बीच) के अनुसार यदि आप एक विधि precompile करने के लिए RuntimeHelpers.PrepareMethod । मेरी टिप्पणी पर विस्तार करने के लिए (ऊपर उल्लिखित) यहाँ एक कोड नमूना है:। static void वार्मअप () {var संभाल = typeof (कार्यक्रम) .GetMethod ( "DoSomething") MethodHandle; RuntimeHelpers.PrepareMethod (संभाल); } अपडेट यहां है एक अधिक सामान्य (हालांकि कुछ हद तक भंगुर) समाधान है कि उदाहरण के सदस्यों के लिए भी ध्यान देगा: सार्वजनिक...

c# - How do I update the value of a complex object within another object? -

Considering the following two classes, which are representing tables in the database, I have a stack of MyClass I want to set the statetipe db has two predefined values. public class MyClass {[Key] public int id {get; Set; } Public string name {get; Set; } [Datatype (datatype multiline text)] public string description {get; Set; } Public virtual status type type {get; Set; }} Public Class Statutes {Public Ent ID {get; Set; } Public virtual iconging & lt; MyClass & gt; Receive {myclasses; Set; } Datatype (datatype multiline text)] public string description {get; Set; }} is a third table (MyClass_StatusType) that does not represent by an entity that acts as more than one intermediary. My code: MyClass MC = New MyClass (); Mc.Description = "description"; McStatusType.Id = 3; Db.MyClasses.Add (MC); Var id = db.SaveChanges (); There is a record in my status with an ID of 3. When I run this code, I get an empty reference exception on StatusType. What is ...

asp.net - Page_ClientValidate in undefined -

I have an asp.net user control, which is plugged in both asp.net and MVC pages When the control happens on the asp.net page, it works fine in client verification, but when a MVC page is controlled, the following call fails in JS verification; Page_ClientValidate ('ValidationGroup'); With Error in Chrome: Object [Object Global] does not have any way 'Page_ClientValidate' How can I get my client-side verification to work on my MVC pages? The hyperlink button is clicked on? Whatever solution I have to work on both MVC and ASP.NET, because our site is a combination of two Try doing something like this, $ ('# form'). Submit (function () {if (typeof (Page_ClientValidate) == 'function') {Page_ClientValidate (); if (Page_IsValid == true) {Warning ('form is valid')}} and {if ($ (this ). Valid ()) {Warning ('form is valid');}}});

Create Read-Only MySQL Database Connection in Django -

Is it possible to add a connection to a database, when only use questions are allowed to use it? Something good would be such: database = update to #, enter, etc ... 'default': {'engine': 'Django db. Select 'default_readonly': {'ENGINE': 'django.db.backends.mysql', 'NAME': As far as I know, to prevent database connection in Django "read-only" mode There is no option to provide. However, you can do this by creating a readable user in your MySQL database engine. Another idea on the DJ Code side, you need to create your own cursor, which you can see is called execute or executable .

c# - Windows identity creation using WCF -

I have a WCF REST service that came into the server machine as a Windows certified service. As the service windows is authenticated, I'm able to create the requested user's WindowsIdentity using the API ServiceSecurityContext.Current.WindowsIdentity . Issue: Now I have a client machine that is requesting windows authenticated service, the client machine is logged in as user ClientMachin / Testuser. The same username And with the password, there is another user in the server machine (servermachine / testuser), if the request comes from the client, then serviceaccess content. Present. Indizindenti is identifying the user's windows server machine (servermatch / testseer) instead of ClientMachine / Testuser, which is wrong, but if the password is different, then the windows' condition is alright. Am I doing something wrong in service or is this window behavior? Please help me, thanks in advance. Have you tried using impersonation, decorate your method w...

wso2 - can wso2ues 1.0 (carbon server) run as a web app? -

I am trying to run WSO2UES (Carbon) as a web application in Apache Tomcat. I have followed the procedure discussed. I've added web application folders to the Tomcat webapp folder, configuring the HTTPS listener of the tomcrack. The server log shows that the application has been successfully deployed and the OSGI console has started. When I try to connect to the application, I get a 404 error There is no exception in the server log. The Tommak error screen contains the references to BridgeServlet: CRBN / Carbon, so I know that the request has been forwarded correctly in Bridge Sevette. I think BridgeServlet can not find and run applications from OSGI bundles. How can I diagnose this problem, or is there any source of information available for the right process? Note: I am using WSO2UES 1.0, Apache Tomcat 7.0.40. I have tried Java version 6 and 7. WSO 2 is based on UES 1.0 Carbon 4.1.0. AFAIK They are not officially endorsed on web app mode. Handled the previous ...

c++ - X11: how to implement a global hotkey without focusloss -

I have a QT app that holds a key with XGrabKey . If I press the hotkey, then I want to hide and hide my app as well as hide it, if it loses focus it works well with a flaw: XGrabKeyboard which Used by the XGrabKey , the Focus creates these FocusAut events, this means that, if I see the app, I press the hotkey, Focus the event, hide the app and unexpectedly hide the hotkey event get Occurs and shows again. Can I somehow avoid the x server to generate these focus events? I do not think so, but you can see the "Mode" field in XFocusChangeEvent. It can be reported, Generic, NotifyWhileGrabbed, NotifyGrab, or NotifyUngrab grabbing keys should produce events in the last two ways, and therefore you can choose to ignore events with these methods, although I'm not sure How do you do with QT?

android - Difference between oncreate and onRestoreInstanceState method in activity -

Friends I got stuck in a problem with these two methods: - When I change orientation Set text after tooling the tool and the text with the bundle, it does not work. But this code is working on the Honeststore Instant Method. Please take a look at my code: - Expands the LifeCycleActivity Activity of Public Sector OnClickListener is called {/ ** when activity has been created first / Edit text user; Override public null on @reate (bundle saved instainstate) {super.naught (savedinstenstate); SetContentView (R.layout.main); User = (EditText) findViewById (R.id.et_user); If (Saved InstanceState! = Blank) {String S = Saved InstantState.Gate ("Key") ToString (); User = (EditText) findViewById (R.id.et_user); User.setText (. SavedInstanceState.get ("key") toString ()); Toast. Make Text (this, S, Toast. LNGHORART). Show (); } Toast. Maketext (this, "On Crate", Toast. LNGHHARART). Show (); Button B = (button) Find VVBIID (R.B. button 1); B.setOnClickListe...

ios - How to create auto scrolling UITextView in the Xcode -

When I start the press button, I try to create a UITx view with auto scrolling. And when a button is pressed, it will stop scrolling. Pressing the button is starting again and it will continue to scroll down. How to manage this function I have some code that works with me under this code - (zero) viewDidoadload {[Super Viewedload]; // Setup an additional after loading the view, usually from a nib NSLog (@ "% F% F", _ TxVentence Concentions. Width, _txvSentence.contentSize.height); If (scrollingTimer == zero) {scrollingTimer = [NSTimer scheduledTimerWithTimeInterval: (35.0 / 1000.0) Goals: Self Selector: @selector (autoscrollTimerFired :) userInfo: Repeats Not Equal: Yes]; NSLog (@ "% @", scrollingTimer); }} - (zero) autoscrollTimerFired: (NSTimer *) timer {CGPoint scrollPoint = self.txvSentence.contentOffset; // scrollpoint = cp pointmake (scrollpoint.ex, scrollpoint.i + 1); ScrollPoint = _txvSentence.contentOffset; ScrollPoint.y = scrollPoint.y + 1; [_txv Se...

java - Create a synchronize HTTP GET request in Android -

I am trying to get some text through HTTP and display it on the UI. I do not need an async function (i.e., the user will have to wait until I can get the text completely.) I tried to do it in the main thread try {string url = URL_HERE; HttpGet httpget = New HttpGet (url); ResponseHandler & LT; String & gt; FeedbackHandler = new basicshandler (); Text = Client.execute (httpget, responseHandler); } Hold (exception before) {text = ex.getLocalizedMessage (); } But I always see an exception. To get the lesson I just need a simple mechanism Can you suggest? Thank you very much, You should use asyncatsk but if you Try to use a sync method string result = execute (). Get () ToString (); This will freeze the UI (no application responds) until you get the message from httpget

c# - Access from a different classes to the RichTextBox of MainForm.cs (Windows Forms Application) -

For example, in the same class, I am using the word "this" but I am from another class in this RichTextBox How can I access Remove Private Zero Symbology Click (Object Sender, Event Argus E) {string text = this.dataTextBox.Text; This.dataTextBox.Text = text.Remove (0, 1); } The examples below are not working. MainForm MF = new mainform (); Mf.dataTextBox.Text = text.Remove (0, 1); or MainForm MF; Mf.dataTextBox.Text = text.Remove (0, 1); does not work try it, in its main form; Public MainForm () {InitializeComponent (); Main = this; } Internal Stable MainForm Main; Receive internal string position {return {return dataTextBox.Text.ToString ()}} set {dataTextBox.Text = value; }} from your calling class, MainForm.main.Status = "Your message"; :)

ios - loadDataSource issue when changing ViewControllers -

Image
My root view is a PSCollectionView (). In this class I have the method loadDataSource that loads data from my web service. - (zero) loadDataSource {NSLog (@ "Load Data Source"); NSMutableArray * Main Listings = [Utils getPosts: selectedCategory Start: @ "0" Date: @ "0"]; Self.waterflowViewData = Main listing; [Self. Waterflow Pulatorefreevase stop animating]; // This happens when I pull it to refresh to call. } This method is similar to rootView in viewDidLoad [in self loadDataSource] goes ]; and in the pullToRefresh method like this __compatible ViewController * weakSelf = self; [Weak self-loading data source]; My problem occurs when I use ViewController by self.navigationController this method loadDataSource being called . It is only being called in two places I have searched. Even when I return from the fourth ViewController to the third ViewController from 'loadDataSource' (I check with NSLog). Why is i...

Maintaining an array of pointers in C that points to two related types -

मेरे पास एक संरचना है struct चीजें {BOOL_T is_copy; / * झूठी है / संभाल 1 एच 1; संभाल 2 एच 2; Int n; शून्य * स्मृति; }; कभी-कभी मैं चीजों की वस्तुओं की एक प्रतिलिपि बनाते हैं नीचे संरचना struct copy_of_things {BOOL_T is_copy; / * सच है * / हैंड 1 एच 1; / * मुझे h2 और n की आवश्यकता नहीं है * / शून्य * स्मृति; / * चीजें ऑब्जेक्ट से कॉपी और चीजें ऑब्जेक्ट नई मेमोरी आवंटित करती हैं * / int another_member; }; इसके अलावा मेरे पास एक प्रबंधक में संरचना की एक सरणी है जो कि मेरे कार्यक्रम में रहने वाले सभी चीजें और copy_of_things संरचना को रखता है संरचना बातें * बातें_अरे [SIZE_OF_ARRAY]; )। मैं डिज़ाइन की आवश्यकताओं के कारण 2 एरे का प्रबंधन नहीं कर सकता (एरेज़ हैश के समान है) इसे सक्षम करने के लिए, मैंने इस सरणी के प्रकार को वस्तु * के रूप में बनाया और copy_of_things के प्रकार को नीचे बदल दिया गया है struct copy_of_things {struct बातें ths; Int another_member; }; अब मैं अपने सरणी तत्वों के is_copy सदस्य पढ़ सकता हूं और तय कर सकता हूं कि इसे things या copy_...

java - Chaining methods on a subclass object, methods that return this from both classes -

मेरे पास 2 वर्ग हैं: सार्वजनिक वर्ग A {निजी अंतिम सूची & lt; स्ट्रिंग & gt; सूची; सार्वजनिक ए () {सूची = नया अर्रेलिस्ट & lt; स्ट्रिंग & gt; (); } सार्वजनिक ए (स्ट्रिंग एस) {list.add (s)); इस वापसी; } सार्वजनिक एक दूसरे () {System.out.println (सूची); इस वापसी; }} पब्लिक क्लास बी विस्तारित करता है {सार्वजनिक बी bfisrt () {System.out.println ("asd"); इस वापसी; }} और मुख्य के साथ एक वर्ग, मुख्य कार्य में निम्न कोड बी b = नया बी (); बी। फास्ट ("संयुक्त राष्ट्र") .second (); b.bfirst (); लेकिन मैं एक ही ऑब्जेक्ट पर दोनों क्लास से चेन विधियों को पसंद करूंगा। क्या यह सही है? जैसे बी बी = नया बी (); B.first ("unu") .second () .bfisrt (); चलो इसे नीचे तोड़ते हैं। सार्वजनिक ए (स्ट्रिंग एस) {list.add (s); इस वापसी; } विधि का वापसी प्रकार ए है, इसलिए कॉलिंग नया बी ()। पहले ("हाय") एक देता है प्रकार का उद्देश्य ए । इसलिए जब मैं संकलन करने की कोशिश की, मुझे उम्मीद है कि असंगत प्रकार कहने में त्रुटि हुई। आ...

python - Why should classes with __get__ or __set__ know who uses them? -

I've just read it and it has been unknowingly felt that depending on who's class behavior it uses Could. __ set __ (self, example, value) go __ (self, example, owner) Do it the same way. They get in the example of the class that uses them. What is the reason for this design decision? How is this used? Update: I think about the descriptors in general form. Classes that use them as member types can easily be manipulated with the descriptors' side effects. Here's an example of what I mean, why does Python supprt? class age (object): def __init __ (value): self.value = value def __get __ (self, example, owener): instance.name = 'manipulation you received' return self .value class person (object): age = age (42) name = 'peter' peter = person () print (peter name, 'is', peter .g) __ go __ and __ set __ about someone who calls them Do not get information. 3 Logic is the narrator object, the object being used, and the type ...

android - Get DebugDraw working in JBox2D -

I try to run DebugDraw in a simple Android JBox2D project. I just expand DebugDraw are this way and put some log output: public class extends SimpleDebugView debug Drav {private static final String TAG = "SimpleDebugView "; Public SimpleDebugView () {Super (New OBBViewportTransform ()); } @ Override Public Wide Daipoint (VAC 2 Arjipiint Float Ajiaradiaonskrin, color 3 F Arjerolr) {Logkai (tag, "Draw Point"); } [@Override public void drawSolidPolygon (Vec2] corner, integer vertexCount, Color3f color) {Log.i (TAG, "solid polygon Draw"); } @ Override Public Wide Draw Verbal (VAC2 Center, Float Radius, Color 3F Color) {Log. I (tag, "draw circle"); } @ Override Public Blank Draw Associated Carrel (VAC2 Center, Float Radius, VAC 2 axis, Color 3F Color) {Log. (Tag, "Draw a solid circle"); } @ Override public spaces draw segment (VAC 2 P 1, VAC 2 P 2, Color 3 F color) {Logkai (tag "segment highlighted"); } @ Override Public W...

javascript - how to use Postmedia digital cordova plugin (DFP) -

I want to use DFP (for double click plus) for my Android app, I already have The scripts and markup are below: & lt; Script type = 'text / javascript' & gt; (Function () {var useSSL = 'https:' == document.location.protocol; var src = (useSSL? 'Https:': 'http:') + '//www.googletagservices.com/tag/js/ Gpt.js'; document.write ('& lt; scr' + 'ipt src = "' + src + '" & gt; & lt; / scr' + 'ipt & gt;');}) (); & Lt; / Script & gt; & Lt; Script type = 'text / javascript' & gt; Googletag.defineSlot ('/ ***** / **** _ APP_1024x66', [1024, 66], 'div-gpt-ad- ******** - 0'). AddService (googletag.pubads) ()); . Googletag.pubads () enableSyncRendering (); . Googletag.pubads () enableSingleRequest (); Googletag.enableServices (); & Lt; / Script & gt; Document body & lt; Div id = 'div-gpt-ad-********** style =' width: 1024px; Height...

QT Model/View Project doesnt show Strings from QList -

My QTableView does not show strings from a QStringList. I have QTableWidgetItems in QTableWidget. Should I set strings manually or show them the view automatically? In all tutorials I do not see "- & gt; setItem", they appear automatically. I have 2 quillin edits that give QStrings to my model: see zero: pushButtonClicked () {meinModel-> Setdata (txtname-> text (), txtvalue- & gt; text ()); } In the set data I push the string into two questions. names.push_back (name); Values.push_back (value); I emit a data, indicating with index - from lower and lower. QModelIndex topLeft = createIndex (names.size () + 1,0); QModelIndex bottomRights = createIndex (names.size () - 1,1); Data throwing changed (top left, right below); I have QAbstractTableModel and therefore I override the column, row, row, and data method. In my data () method I return my value and name: QString returnValue; If (0 == index.column ()) {returnValue = names.at (index.ro...

groovy removeAll closure not removing elements in list -

If I'm not sure how all deleted groovy job, but I [40289454470ea94601470ea977d00018] was expected to return def list = [ '40289454470ea94601470ea977b20014', '402894544709] Diaf list 2 = [' 4028 9 454 470 EE 9 9 4601470 AA 9 9 7 B 20014 '] list.removeAll {list2} println list but instead [] please enlighten: ( Remove all elements with a closer that closes the return list1 - = list2 / code >

sql - mysql update (in) more than 1 row -

update t join bin inner as tbl_bonuses as tbl_member V.E. B.recepient_code = V.user_id SET B.points = B.Point +15, BCTR = BCT +15 WHERE user_id IN (Tbl_member LIMIT choose from 10 user_id); Error: # 1235 - This version of MySQL is still available for 'LIMIT & amp; "Itemprop =" text "> Wrap your subcategory inside a derived table Join B Inner as UPDATE tbl_bonuses as tbl_member on VPPITCD = V.User_ID ST B PN = B.Point +15, BCTR = BCT +15 WHERE user_id IN (SELECT user_id FROM (select from tbl_member LIMIT 10 user_id));

gwt - MTextBox setFocus() not showing the focus on textfield on view load, MGWT -

I created an app with gwt, mgwt and gwtphonegap. Some text fields have one of my thoughts, I have a requirement that I need to set the default focus on my first field when I visit that view, first input field = new MTextbox (); FirstInputField.setFocus (true); // I'm not calling setFocus () on the remaining fields. But when my first input field is not focused, when the view is loaded. If there are any direct or alternative ways to do this, please provide me Thanks in advance, Arun Kumar. The box should be added to the DOM, if you only create a box, any of the browser HTML Without context, it can not control the focus. Add the box to your view and set your focus, if it is not working, try wrapping the set focus in the scheduled command: Scheduler gate (). Schedule Unlisted (New Scheduler.ScheduledCommand) {@Override Public Zero Execute () {firstInputField.setFocus (true);}}); The indexed commm will be removed, followed by renderlap, and all HTML elements ...

grails - Unit testing session variable in controller with spock -

I'm trying to test that a session variable is installed in a controller in a method that has a Grails controller Using unit testing in but it is complaining about establishing a readable property: Can not set asset to read: Session for class: MyController I have something like this: class MyController {def settion session = {session.var1 = "Hello world!" }} And this will be my test: class MyControllerUnitTest controller SEPEC {def "My test with session" () {when: controller.settingSession () Then: controller.session.var1 == "Hello world!" }} I am a guest that I should probably write an integration test but I would like to know if there is any possibility of doing this unit in the test. The following tests will pass along Grails 2.1.0 A controller: // Gilles-App / Controller / Demo / Mac Controller. Groovy package demo class MyController {def settingSession () {session.band = 'King Crimson'}} One unit test: ...

c++ - How to adjust this bubble sort -

The problem at this time is that this program only works by typing in the name of the text file. I am told that where he has gone to reduce it, where it simply opens the right text file with the bat and sorts the bubbles with it (which is in its present state). Example of text file: -14, -5, 7, 1, 7, 71, -3, 59 [Bubble abbreviation] -14, -5, -3, 1, 7, 7, 59, 71 #include "stdafx.h" #include & lt; Iostream & gt; # Include & lt; Fstream & gt; #include & lt; String & gt; # Include & lt; Iomanip & gt; # Include & lt; Cstdlib & gt; #include & lt; Vector & gt; using namespace std; Zero Babsport (Ent Ar []); Int main () {string file; Const int = 100, b = 10, c = 10; Int count = 0, count1 = 0, d = 0, swap = 0; Int clam [A] = {0}, r [b] [c] = {0}; Cout & lt; & Lt; "File type name:" & lt; & Lt; Endl; Cin & gt; & Gt; File; Ifstream data; Data.open (file); Of vector & lt; Int & gt; Array...

java - server and client chat over wifi in android devices.ex Samsung Duos, Galaxy -

I am a new bee for Android development, and I like a chat app between 2 or more Android devices like Samsung Duos I'm planning for or higher version, without using the Internet and using only WiFi 1) Is this possible? If so, suggest some code section or link to establish a connection between WiFi and transfer text messages between them. You must create the same app for two devices that use chat. Useful for putting in AndroidManifest.xml: & lt; Usage-permission Android: name = "android.permission.VIBRATE" /> & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_WIFI_STATE" / & gt; & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Usage-permission Android: name = "android.permission.WRITE_EXTERNAL_STORAGE" /> & Lt; Usage-permission Android: name = "androi...

java - Maven dependency with old version -

I need to compile a project with this dependency: & lt; Dependency & gt; & Lt; Group & gt; Com.wadpam & lt; / Group & gt; & Lt; ArtifactId & gt; Docrest-doclet & lt; / ArtifactId> & Lt; Version & gt; 1.21 & lt; / Edition & gt; & Lt; Scope & gt; Provided & lt; / Scope & gt; & Lt; / Dependencies & gt; (and so much more like this) There is no version 1.21 in the public Mewen repository, the oldest one is 1.22. Where can you get that jar? You can try and create a source from this Gitob repo: / P> From the command line you can: git clone https://github.com/sosandstrom/docrest.git cd docrest git checkout docost -1 1.21

file - how to set a temp upload directory in php -

I try to file a simple upload and I want to fix the upload directory to upload the file but IA Line I have tried many ways to do this and I got this error : failed to open the stream. I've tried this type of code like / html5unchained / imgs / ' and this is c: / wamp / www / html5unchained / imgs / and this c: // wamp // www // html5unchained // imgs // $ Upload Dear = 'C: \ wamp \ www \ Html5unchained \ imgs'; $ Uploadfile = $ uploaddard basename ($ _ files ['userfile'] ['name']); Move_uploaded_file ($ UploadFile, $ UploadDider); I have tried any help in all posiblities The files uploaded to the server can be configured with the location configuration option.

c# - Querying sub document Ravendb -

Image
int start = 0; Var चालू = _db.Query & lt; रिकॉर्ड & gt; ()। ले लो (1024) .छोड़ना (प्रारंभ) .ओलिस्ट (); यह ठीक काम करता है, एक सूची लौटा दी गई है जिसमें उप दस्तावेज़ / पॉको की सूची है, जैसा कि नीचे दी गई छवि में दिखाया गया है: यह कीवर्ड संग्रह को दर्शाता है, जो कि कीवर्ड पॉकोस की एक सूची है हालांकि, मैं सभी खोजशब्दों को वापस करना चाहता हूं, इसलिए मैंने ऐसा करने की कोशिश की: int start = 0; Var चालू = _db.Query & lt; कीवर्ड & gt; ()। ले लो (1024) .छोड़ना (प्रारंभ) .ओलिस्ट (); हालांकि कुछ भी नहीं लौटा है? सभी आयात ठीक है, सब कुछ संकलन और चल रहा है, कुछ भी सूचीबद्ध नहीं है ... एक स्थैतिक सूचकांक को लागू करते समय और नक्शे का उपयोग करके / कोड के follwing खंड को कम करने मानचित्र = रिकॉर्ड = & gt; रिकॉर्ड में कीवर्ड से.केइवेड्स // यहां विज़ुअल स्टूडियो उप-दस्तावेजों की अनुमति नहीं देता है, // केवल रिकॉर्ड के बाद सिस्टम। ऑब्जेक्ट विधियों की पेशकश करता है? स्क्रीनशॉट: आप केवल RavenDB में रूट दस्तावेजों पर क्वेरी कर सकते हैं अब, आप मूल ऑब्जेक्...

php - How to generate PDF with low memory on the server? -

I am converting PDF of my DB into table and I am using it. First I have to convert my table to HTML and then I can convert it to PDF, which uses a lot of memory and I have some resources on the server ( 256 m for php max). PhD can have thousands of records for PDF with 256 M memory max? Can I create a PDF page from the page and finally add all the pages? / P> pre> require_once ("tcpdf / tcpdf.php"); // ur workstation requirement_one ("fpdi / fpdi.php"); Class concat_pdf extends FPDI {var $ files = array (); Function Set Files ($ files) {$ this- & gt; Files = $ files; } Concrete () {foreach ($ this-> Files AS $ file) {$ pagecount = $ this- & gt; SetSourceFile ($ file); ($ I = 1; $ i & lt; = $ PageCount; $ i ++) for {$ tplidx = $ this- & gt; Import page ($ i); $ S = $ this- & gt; GetTemplatesize ($ tplidx); $ This- & gt; AddPage (A 'P', array ($ s ['w'], $ s ['h'])); $ This- & ...

ruby on rails - Polymorphic filter collection: records from 2 tables -

In ActiveAdmin, I enterable would like to include a filter for a Bhurupik Association, which in my case . You need to specify a collection for it, but - of course - have come to record several models in a Bhurupik Association, can add me to record more than one of the tables that is uncertain. This is clearly wrong but whatever you are trying to do: Filters: Accessible, Compile: [Reward. All, Challenge Total], Labels: "Prize / Challenge" Any thoughts appreciated. for an active admin & lt; 1.0.0, take a look at the bottom part of that section, it explains how to handle peerless associations. For Skriyadmin> = 1.0.0, see SO question about this ActiveAdmin.register entry & Active # lt; 1.0.0, which uses meta_search filter: enterable_award_type_title_or_enterable_challenge_type_title & to # Skriyadmin gt; = 1.0.0, which uses looting filter: enterable_of_Award_type_title_or_enterable_of_Challenge_type_title # would be a more Programmatik appro...

c# - asp.net | values sent trough ajax received as null in handler -

I am trying to send handler to the 'file' attachment (and send it with an email) This is the code that I am using to send handler (js) When I debug it, I see the correct values, including the file (debug in JavaScript). function sendCv_click () {var settings = {'data': getData ("sendCv"), 'url': "handler / sendwax", 'content type': 'wrong' , 'Processed': 'wrong'}; SendCV (settings); }; ('#fu_sendCv_upload') [0]. Files [0], 'Email': $ ($) ('# fu_sendCv_upload') '#txt_sendcv_email'). Val (), 'checkbox': $ ('# sendCv_chk box: check'). Length} function sendCV (settings) {$. AJAX ({type: "post", content type: settings.contentType, processData: Settings.processData, data: settings.data, url: settings.url, datatype: "json", success: function (data) {... }, Error: function (data, xhr) {...}); }) Always (function () {...}); }} How do I get...

android - export contacts from listview of my application -

I just want to copy the contacts Czech on the SD card as a vcf file items selected = "Selected items: \ n"; (Int i = 0; i & lt; lstContacts.getCount (); i ++) {view = lstContacts.getChildAt (i); Check = (checkbox) view.findViewById (R.id.cb2); If (check.isChecked ()) {itemsSelected + = lstContacts.getItemAtPosition (i) + "\ n"; }} Finally I got an answer to this question. In this, lv listview has a contact list just copy this code and you can see the contacts that you want to copy the SD card. long [id] = lv.getCheckedItemIds (); (Long id: id) {cursor phone = receptive (). Query (or exposure. For Comndetaind. Phone. Contransurai, blank, ContactContact. Comndetakindkpon. Contaksadiaidi + "=?", New string [] {id + "}}, null); phones.moveToFirst (); (Int i = 0; i & lt; phones.getCount (); i ++) {string Lukapake = Fonskgetstring (Fonkget column index (Snprkkaktraktkcontekt. LOOKUP_KEY)); Uri Uri = Uri. Sathapekshit post ( ContactC...