Posts

Showing posts from April, 2012

selenium webdriver - return value false from isDisplayed method -

बूलीयन पाठ = ड्राइवर.फिक्स एलेमेंट (by.cssSelector ("। sr_ctext> gt; b"))। isDisplayed () ; Println (पाठ); जब कभी .sr_ctext & gt; b नहीं मिला है, सूट बंद हो जाता है और जब तत्व सफलतापूर्वक मिल जाता है तो true वापस आ जाता है। / p> मुझे लगता है कि जब तत्व नहीं मिला है, तो इसे टेक्स्ट वैरिएबल में गलत होना चाहिए न कि कोड को रोकना। फिर आपको पहले चरण में वेब एलेमेंट मिलना चाहिए और केवल यदि आप एक परिणाम प्राप्त करते हैं तो डिस्प्लेड की जांच करें, जो शून्य नहीं है एक और समाधान एक प्रयास / पकड़ ब्लॉक में अपना कोड डालना होगा: बूलीयन पाठ; {text = driver.findElement (by.cssSelector ("। sr_ctext> gt" बी) देखें)। isDisplayed (); } पकड़ (नोएसचएलिमेंट अपवाद ई) {text = false; } System.out.println (टेक्स्ट);

c# - Asp.net when i publish my aspx file it's not fully going on server -

Image
All of my ASPX files are working properly on a local machine, but when I publish my file to a remote server So compare my picture of my aspx file so my file is not going completely. This is why im is an exception to remote - & gt; The content ('Y') does not match any properties in 'X', make sure it is well-formed. As you can see that I'm living here ... What did I do I republished my solution from VS - not working Done I uploaded my aspx file from Flamzilla - did not work. I have only re-published this file - did not work. Any help would be appreciated ... I After hours and hours it has solved again .... Because I am connected to the Internet through VPN when I try to upload my file to FTP, do not go to me Know why, but if I disconnect from VPN, then everything works as expected. Thanks anyway.

android - onListItemClick method is not called -

I am working on a code snippet where onListItemClick calls to an item Not being list view. I am using ListFragment and I have implemented the following code Public category InboxFragment ListFragment {protected list < ParseObject & gt; MMessages; List view list; @ Override Public View Crate View (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {See Routview = Inflator.In Flat (R. Fragment_Inbox, Container, Falls); Return root view; } @ Override Public Wide On Rhesus () {Super. Rebirth (); . GetActivity () setProgressBarIndeterminate (true); ParseQuery & LT; ParseObject & gt; Query = new parquetter & lt; Parse object & gt; (Pars Consultants. CLASS_MESSAGES); Query.whereEqualTo (ParseConstants.KEY_RECIPIENTS_IDS, ParseUser.getCurrentUser (). GetObjectId ()); Query.addAscendingOrder (ParseConstants.KEY_CREATED_AT); Query.findInBackground (New FindCallback & lt; ParseObject & gt; () {@Override Public has been canceled (lis

how to compare mobile number with country code and without country code in php codeigniter -

How to compare the mobile number in PHP For example, The first number is 9999999999 and the second number is + 9 99 99 99 99 99 Now it is equivalent to matching this number 2 or not. Assume that all mobile number 10-digit ( Even that has not come, which is not), just the comparison of the last 10 characters will not be easy, two strings?

objective c - UI for finding files on mac -

Maybe because I do not have the proper terminology, I can not find anything on the Internet about my question. I want to have a navigation window that opens on a button click (in fact, what we see when we say that we want to add files to the project and the encoded us have the option to search through a computer to find that file Which gives No!). How can I get this behavior? If this is a duplicate, please comment and I will remove the question. What you're searching for is NSOpenPanel Example usage: - (NSInteger) showFilepanel {self.filePanel = [NSOpenPanel openPanel]; [Self File Panel Set Alvezmalti Selection: No]; // This will allow the user to select multiple files [self.filePanel setCanChooseDirectories: NO]; // If you want the user to select a way to save a file, you should enable it so that he can select the directory [self.filePanel setCanChooseFiles: yes]; // To select only files (such as in an open file-scenario) return [self.filePanel runModal]; // If t

Text output file not instantiated -

I have two newbie questions. I am trying to bring data from an array into the text file on vhdl . Even though referring to many online guides to do this, I've always come up with the "file does not exist" any suggestions on what's going wrong? Secondly, when I try to use the array sign below as an argument for the task of writing, then it gives an error that I have no continuous data form of an operand How can i use The unit is Top_Module Port (CLC: STD_LOGIC); Finally Top_Module; The behavior type of the architecture Top_Module array_1 is the array (0 to 127) integer range of -112 to 127; Signal sample_1: array_1: = (104, 40, -40, -104, -128, -104, -40,40,104,127,104,40,40, -4); Constants: std_logic_vector (3 below): = "0111"; Initial Process (CLK) - The process to write output to "* .txt" file file result_file: text "fft_output.txt" is out; Outline of the variable: line; Constant tmp_fft: integer: = 0; Then start (clk'event

ruby on rails - friendly_id and rspec controller tests, finding the correct id -

I have a simple RSPEC controller test for basic crud functions. I recently added Friendly_id for my controller - now all tests are failing Describe "Patch Update" before the reference "Where the record is found" (Model) Allow. To obtain (.search) .and_return (example) Allow the end reference "where the record is a root" (for example) (example). ("Root"). And_Reiton (true) End before the end of the reference "where the record is updated" (example). To get (. Save) .and_return (true) Patch: Update, instance.slug Finally "flash notice should set" Flash [: Notice]. Answer: If you do not have Shield_net, answer it as "Redirect to the panel page". Redirect. (Direct_Corporate_page_path) and end end and end all of which fail with the following error, 1) Administrator: Corporate PageAuthorized users Receive Administrator Edit for HTTP Success Failure / Error: Receive: Edit, Id: corporate_page nomethodError: # &am

automation - AutoHotKey Array Confusion -

I want to ask that the following codes are two different arrays? Or is it the same array? In AutoHotKey I am confused how to create two different array I use an older version of AutoHotKey, see 1.0.47.06 ... ; Keep track of the number of discharge cases date_array_count: = 0; Keep in mind the date of discharge cases date_are_moth_ = 0 array% date_array_count%: = "01/01/2014" array @ case_arecon%: = 1001001 And besides, if I have a variable , I use the = to specify it in the array? Or use: =? discharge_date: = "01/01/2014" array% date_array_count% = discharge_date These are not real " arrays ", they are called pseduo-arrays and this is an old way to create an array of them. Can read more. In your case, these are the same array, yes. You are using array as your array-variable and index as date_array_count and case_array_count which are both zero, so you Both values ​​are being put in the same index, which means that you will over

html - Overlap of text on SCSS Transitions -

(works only for web-kit browsers) I am creating a navigation with those links that become widespread and show the text once you hover over them. All this works correctly except for an issue; If the mouse is taken away from the button, the text will not be adequately disappeared and the second part will be pushed under the button (and looks very ugly!). I am struggling to find a solution to this problem, I have tried to set the width and height of the spans to 0, as well as speed up the transition from which the text disappears quickly But do not work .. HTML: & lt; NAV & gt; & Lt; ul id = "item" & gt; & Lt; Li & gt; & Gt; & Lt; Span class = "extra" & gt; View & lt; / Span & gt; & Lt; / li & gt; & Lt; Li & gt; + & lt; Duration class = "extra" & gt; And added lt; / Span & gt; & Lt; / li & gt; & Lt; / Ul & gt; & Lt; div id = "search" & gt;

android - Update SeekBar in Fragment with value from SharedPreferences -

I have an app with the action bar, it has a "main" piece and "preferences" piece. last main key = new main (); Final Preferences = New Preferences (); Drawer Ksetonmatikklelist (new Onitemkliklist () {@ Override public Whoid on Aitemklik (Adaptrwu & lt ;? & gt; args 0, ARG 1 See, Int conditions, prolonged AG 3) {piece = null; fragment manager slice Manager = See Smrthnfrejment Manager (); switch (status) {case 0: piece = main; break; case 1: section = preferences; break;} fragmentation manager. Bibititinsnpadn () Krevl (Arkaid. Frag Meant 1 piece) Kcommit (); Drovrleaut. Close dryers ();}}); There is an explorer in the "Preferences" section that has been updated with value from the shared options. ; @Override public view onCreateView (LayoutInflater inflater, ViewGroup container, bundle savedInstanceState) {container.removeAllViews (): see the relevant code that makes this within the "Preferences" piece of footage = inflater

ios - NSURLCache does not clear stored responses in iOS8 -

I call the sample function when I need to clear the cache and make a new call to the URL - (zero) clearDataFromNSURLCache: (NSString *) urlString {NSURL * requestUrl = [NSURL URLWithString: urlString]; NSURLRequest * dataUrlRequest = [NSRR request request with url: requestUrl]; NSURLCache * cache = [NSURLCache sharedURLCache]; NSCachedURLResponse * cacheResponse = [Cash Cached ResponseAndest: Data URL Request]; If (Cash Response) {NSString * dataStr = [NSString string withUTF8 string: [[Cash response data] bytes]]; NSLog (@ "data SR R =% @", data STR); NSLog (@ "url str r =% @", [[[Cash response response] URL] full string]); [Cash store cached response: Request for zero: data url request); [NSURLCache setSharedURLCache: cache]; } [[NSURLCache shared URLCache] removeCachedResponseForRequest: dataUrlRequest]; // Check that the respnase data from the cache NSURLRequest has been deleted / deleted * finalRequestUrlRequest = [NSURLRequest requestWithURL: requestUrl

internet explorer - IE Changing .twbx file to .zip when downloading -

I am trying to create a link for users to download .twbx files. In Chrome, it works just fine, in IE, extension of the zipit is expanded while trying to download the browser. The server is using IIS 7 and I added an MIM type for the application / octet-stream for .twbx .... It is still not resolving the problem when I used Fidler to monitor the click for download, it does not show content type. On a different web server where this link works correctly, Fideleller is showing content type as text / plain. I got a single issue. My SP administrator changed the MTME type to .twbx and now it downloads those files as if it is While waiting to change the mime type, I was able to create links with some javascript for .twbx files so that they could download this way. Visit the SP Library which keeps your .tbdx file and inspects the element using FF or Chrome is the code for the "copy of the download" element, which you see Should look: & lt; span type = "option&q

c# - WPF basic binding -

I know that it has been asked many times but no matter how many tutorials I read, I can not understand it . I have a three column defining grid that can be resized through two grid spplers. What I need is another grid with three errors below which size changes because the size of the top grid is changing (UI is very similar in programs like iTunes). The reason I want a separate grid is because ultimately, each grid will be its own object and the qualities will need drag and drop. Written here is Xaml, if someone wants to see me what I am looking for. & lt; Canvas width = "400" height = "15" background = "antique white" & gt; & Lt; Grid horizontal alignment = "statch" vertical alignment = "statch" width = "400" name = 'mairidrid' & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; Column width = "140" minwid = "50" /> & Lt; Column width of width = "116"

c# - Search List for Records with matching value for a Class Property? -

Image
I have created a Model class in my ASP.NET forms which have been called by Years_Of_Service : using the system; Using System.Collections.Generic; Using System.Linq; Using System.Web; Namespace project.models.default {public class years_off services {public in the year}; Set; } Public String Fiscal Year {Received {Return Year + "-" (+ 1 Year); }} Public Decimal Services {get; Set; } Public Decimal Salary {Received; Set; } Public String CoveredEmployer {get; Set; } Public String TotalService {get; Set; } Public String PurchasedorReinstatedService {get; Set; }}} I am successfully inquiring with my database through my custom control and refunding the fair value within this model class, although in some select cases, Returned those who have the same [year] value: What I need to do now is through every unit in my list, and if I have 2 or more institutions near the [year] A is a matching value, please add them together and turned into [dependent employer] the value

nose 1.3.4 and logging with custom handlers -

I am trying to put different handlers for different subpages of my project, however, when I add a console (I.e. the streamrader for stouting), due to some reason, the nose is not holding any logging output going on that handler. I do not have any special nose configuration, except that I am loading logger for each unit test as logging.getLogger (__name__) and < Code> logging.dictConfig . Set the configuration of logging through. In summary: Using Expected behavior: - nologcapture should show all logging Observed behavior: there is no difference between that I use - nologcapture or not Tell me if you want more baggage ground. I would suggest to debug the structure of many loggers just logging_to import imported from Add

python - MongoDB search for each dict in list in collection -

I have archive where list has dicts < / Code> and I want to find if a particular word has two specific key: value . For example, I want to find find_one where my name is a word which includes a specific first and last name: {"name "," "", "First name": "alias", "first name": "bob", "last name": "jones", "age": "34", "gender": "m"}, "Last name": "56", "gender": "F"}, {"first name": "Bob", "last name" is a record with "Bombay's Smith" or not To see that "Smith", "age": "19", "gender": "m"},]} and last name, I am: ago = 'Bob' final = 'Smith' nameExists = db.user.find_one ({'$ and': [{'names.first name': First, ' Post-text "itemprop =" text "> Alt

Objective C to Swift header file with multiple targets -

I have successfully called my swift classes with objective switch (for target 'MyApp') through import switching: I have created a new goal called "MyAppLite" When I compile the new target, I get errors because "MyApp-Swift.h" code is required, but the compiler is " MyAppLite-Swift.h "is making Therefore, I need to create a conditional swift / objection heading #import I am compiling it for that goal How can this be done, or is there any better way? Also set this product module name setting to settings It is possible to be the same in your module (I have set it to $ (PROJECT_NAME)), so that & lt; Project & gt; -Swift.h file that is generated by the same name in all J. module terminates the need to add / check the preprocessor macros

java - ParseImageView on Android not displaying image -

I have a strange problem with ParseImageView. I have a ParseImageView defined in my layout: & lt; com.parse.ParseImageView Android: id = "@ + id / view1_imageview" Android: layout_width = "match_parent" Android: layout_height = "match_parent" / & gt; And I'm calling the method: imageView = (parse image view) Rootview.findvibidid (RIDV1_iagetage); pff = (ParseFile object.get ("favimg") ); Log.d ("ParseFile", pff.toString ()); ImageView.setParseFile (PFF); Image view is not set I have confirmed that ParseFile pff is set up. Any hints are appreciated thanks! You really need to use loadInBackground () to fetch the file: imageView.loadInBackground (New GetDataCallback () {@Override Public Zero (Byte [] Data, ParseException E) {// Is Not To Do (E! = Zero) e.printStackTrace (); }});

angularjs - Token Authentication and XSRF / XSS protection -

I'm reading the possibility of XSRF and XSS attacks to get token authentication and authentication information. I understand that to stop XSRF attacks, it is a popular way to read a custom authentication token from a cookie and then add it to a custom request header before making any AJAX request. The server can run verification on the request header instead of the cookie. I believe AngularJS uses this approach: $ http My confusion comes when XSS stops attacks, it is best to ensure that any user input is injected to Javascript Not able to do, but to get a blame, there is a need to read to set its value in the cookie request header mentioned above, it is not weak for XSS attacks? Since the cookie can not be set to HTTP only, can an attacking author not read the cookie to get the token and then make a request? If so, how can it be stopped? Any information is appreciated. The cookie will only be weak for XSS attacks if your site is weak for XSS attacks. So you have to

ios - If I want to create one of three similar types of cells in cellForRowAtIndexPath, how do I set the "common" properties? -

Say that I have three different cell types that look different but some are present in three areas, so they all come from the same super class, say, animal . But some animals are very different, and this is where the three different types of cells come in. I want to introduce the right kind of cell, what kind of animal I am, on which I am working. So I can just check the animal's code, type the property, decode the cell, set it up and return it. But like the name and height, with all the animals and I want to set it in the center without the code being repeated inside the check of every animal. By using polymorphism I have declared an example of parents, then create each subclass and set specific properties, then set the general people. var cell: cattle animal = animals to animals [index.text] switch cattle. Type {case "cat", "dog": cell = table view. PetTableViewCell case "Lizard" as DequeueReusableCellWithIdentifier ("PetCell",

c++ - Given process ID, find environment variables -

I should be able to read the environment variables of another running process in windows. The code I am writing to, I need to read before running the code process. I Say that there are two applications. I run the application # 1 for the first time, when I run the application # 2 Application # 1 will read the other application (only read them) prior to running the second application's code before you can read the environment variable. Notes: 1. Create application # 1 for application # 2 does not call process. 2. Application # 2 can be any application specified in user application # 1 3. App # 2 can be launched through shortcuts on the desktop through other applications and launchers. 4. You can use PsSetLoadImageNotifyRoutine to get application # 1, full image, process ID, imagephone. If you use your PsSetCreateProcessNotifyRoutineEx in your driver component, callback Routine receives a pointer Here you can find an indicator for the Environment Block: process-&

java - How to send a mongodb shell function on jongo insert functions -

I am trying to use a MongoDB shell function, such as date (), a jongo driver function on my files The code is as follows: collection.insert ("{date: date ()}"); But does this seem to work? These errors are exception in the thread "main" org.bson.io.PoolOutputBuffer.write (PoolOutputBuffer.java:89) org.bson.LazyBSONObject.pipe At java.lang.System.arraycopy (Native Method) on java.lang.ArrayIndexOutOfBoundsException (LazyBSONObject.java:474) com. On com.mongodb.InsertCommandMessage.writeTheWrites (InsertCommandMessage.java45) at com.mongodb.BSONBinaryWriter.encodeDocument (BSONBinaryWriter.java:339) on org.jongo.bson.BsonDBEncoder.writeObject (BsonDBEncoder.java39). Com.mongodb.BaseWriteCommandMessage.encodeMessageBody (at BaseWriteCommandMessage.java) at com.mongodb.RequestMessage.encode com.mongodb.baseWriteCommandMessage.encodeMessageBody (BaseWriteCommandMessage.java:69) at mongodb.InsertCommandMessage.writeTheWrites (InsertCommandMessage.java.2) (R

c++ - Why does this double-free error happen? -

मेरे पास एक आधार और व्युत्पन्न वर्ग है: में: // वर्ग A {protected: static std :: string a; // अन्य डमी कोड}; A.cpp में std :: string A :: a = "bar"; // अन्य डमी कोड में B.h: #include "a.h" // अन्य शामिल हैं वर्ग B: सार्वजनिक ए {सार्वजनिक: int c; // अन्य डमी कोड}; main.cpp: #include "a.h" #include "b.h" int main () {printf ("foo"); वापसी 0; } अब मैं "सी" और "बी.एस.यू." के रूप में दो अलग-अलग साझा पुस्तकालयों में ए सीपीपी और बीकपीपी को संकलित करता हूं और फिर उन्हें मेन सीपीपी के विरुद्ध लिंक कर रहा हूं। जब मैं प्रोग्राम चलाता हूं - यह दूषित-डबल-लिंक की गई सूची त्रुटि से निकल जाता है Valgrind के साथ चल रहा है मुझे लगता है कि एक अमान्य मुक्त त्रुटि है। ऐसा क्यों होता है? मैं समझता हूं कि प्रत्येक .इस फ़ाइल में स्थिर ग्लोबल वैरिएबल की अपनी प्रति होगी, लेकिन तब क्या होता है जब कोई व्युत्पन्न वर्ग एक अलग साझा लाइब्रेरी में होता है जब बेस क्लास अलग होता है साझा लाइब्रेरी और बेस क्लास में स्थिर

php - Magento - Retrieve specific XML Debug File -

I have a problem with the debug option inside Magenta. First of all, I tried to ignore all the debug string with error_reporting (E_ALL & amp; ~ E_DEBUG); inside index.php but without success, I've installed firegento to try a deep glance (and still try to hide lines). I am getting such lines in the system.log file now: User Agent: Mozilla / 5.0 (Windows NT 6.3; WOW64; rv: 32.0) Gecko / 20100101 Firefox / 32.0 File: Shop / Lib / Variant / Simplexil / Configuration: PHP: 511 & lt; Config / & gt; So I tried to view that file and this line is 511: if (! $ Xml) {Dana :: log ($ string) ); } This public function is part of the loadstring . I am surprised to show that the file which debugs the line Error on XML file, localized in an "Etc." directory of the module. You can test formatting with an XML validation online tool. Try to remember that what is the last installed module or parse your changes and parsed your XML file. Gene

uiscrollview - iOS nested scrollview — keep scrolling past top into superview? -

Then I have a table view with several cells, which is the last tableview when I scroll down to the original table view I wish to continue scrolling nested meekwas. Essentially, when I go to the end of the original scene, I want to scroll it the velocity for the nested view. Moreover, if a user is pulling the scroll view, when it reaches the end, it will start drawing the nested view. Events for nested UITableViews / UIScrollViews If you do not find performance issues , You always have the last cell length to show all the cells in your table view. This means that you can not benefit from dequeueing table cells, but if you have some rows for embedded table view, then this is the easiest way to resize embedded table view content as the height of the container table. . See the last room.

java - Generate reports in netbeans with windows 8.1 -

I am trying to create a report using NetBeans and my OS is Windows 8.1 ... I did the Jepers reports Have tried but it is not updated for Windows 8 and now it has been changed to Jasperstadt studio .. And I'm goggling and many say that it only works in eclipse. is it true? And what other report generator can I use? Thank you I think you are talking about iReports here. You have tried whatever you mentioned () And of course, the JUSTARY STUDIO is an eclipse based device, so it can not be carried out outside the eclipse.

angularjs - Angular ng-if not true -

यह काम क्यों नहीं करता। & lt; li ng-if = "! & lt; li ng-if = "क्षेत्र" & gt; & lt; / /> li & gt; बस ठीक काम करता है। 'क्षेत्र' को गुंजाइश के रूप में परिभाषित किया गया है जैसा कि सही / गलत है इसके लिए कोई भी उपाय? मैं एनजी-शो / एनजी-छिपाने का उपयोग नहीं करना चाहूंगा क्योंकि इससे दोनों ही डीओएम में आइटम प्रस्तुत करते हैं। इस का उपयोग करें एनजी-अगर = "क्षेत्र == गलत" OR एनजी-अगर = " क्षेत्र == सही " यह किसी को मदद कर सकता है

Confusing attributes in angularjs directive's link function -

I am writing an angular.js directive, which will hide the condition conditionally. So it will look like this: link: function (scope, amm, ethers) {... elem.hide ()} I found lots Examples that were actually doing, but somehow my element attribute is not an array element, so there is no hidden () method in what I am missing? Thank you! Most people are loading jQuery before that load angle, which jquilite to its full jquilite Expanded. Hide The method is not part of the jqLite API (), so such a method has not been revealed. / P> This does not mean that you need jQuery, but this is not the right way to handle your problem. If you can already use the ng-show and ng-if instructions to hide an element based on the controller, can not you use them? In your HTML, & lt; Add div ng-show = "isDisplayed" & gt ;, and scope.isDisplayed = false in your linking function

groovy - CliBuilder: First option or second option -

मैंने निम्नलिखित क्लिबइल्डर विकल्प परिभाषित किए हैं: #! / Usr / bin / env groovy आयात करें org.apache.commons.cli.Option def cli = new CliBuilder () cli.with {d (longOpt: 'डेटाबेस', 'डाटाबेस', आर्ग्स: 1, आवश्यक: सत्य) यू (लंबे ऑप्शन: 'उपयोगकर्ता', ' यूजर ', एल्ग्स: 1, जरूरी: सच) पी (लोंगओप्ट:' पासवर्ड ',' पासवर्ड ', आर्ग्स: 1, जरूरी है: सच) _ (लोंग ऑप्ट:' डूफू ', आर्जनेम:' फू परम ', आर्ग्स: 1, "फू बनाओ") _ (लोंगओप्ट: 'डारबैर', 'बार बार करो।')} डीईपी opt = सीएलआई। पीआरएसई (एल्ग्स) अगर (ओप) रिटर्न अगर (ऑप्ट एच) सीएलआई। यूजेज () प्रिंट्लएन "हुर्रे " पैरामीटर डी, यू और पी को आवश्यक के रूप में परिभाषित किया गया है। doFoo और doBar को नहीं परिभाषित की आवश्यकता है, लेकिन इनमें से एक होना चाहिए कम से कम परिभाषित है, अन्यथा प्रोग्राम विफल होना चाहिए / विधि उपयोग को निष्पादित करना चाहिए। इसका समाधान करने का सबसे अच्छा तरीका क्या है? क्या एक तरह से या हालत (doFoo या doBar) को लाग

ios - UILabel value is empty when I tap a button in basic calculator code -

According to the fragment of my ordinary calc code: when I tap on number 1, then the UILB value will be 1 followed by I'll tap the button to add and the first variable will be 1 and the UILBL value and UILBlow screen will be blank (due to MyLabel.text = ""). On the other hand, the basic iOS calculator is different from working logic. When someone add a Tap button, the first variable is missing from the value label and when you change the operator or something else. The first value of the variable is still in memory, what is the logic behind it? I am searching for a lot of code in Java, but every sample is mine Please provide a clue? @Iboutlet var MyLabel: UILabel! @abouting funk number onipad (Sender: UIButton) {If MyLabel.text == "0" {MyLabel.text = "1"} and {MyLabel.text = MyLabel.text! + "1"}} ... IBAction func addTapped (Sender: UIButton) {Operant = "add" var var1 = "\ (MyLabel.text!)" As NSString num1 = var1.do

asp.net mvc - MVC Disabled SelectListItem property not working -

Image
चयन सूची बनाना सार्वजनिक SelectList डमी लिस्ट () {सूची & lt; SelectListItem & gt; सूची = नई सूची & lt; SelectListItem & gt; (); list.Add (नई SelectListItem {मान = "0", पाठ = "--- चुनें -", विकलांग = गलत}); list.Add (नई SelectListItem {value = "Uno", Text = "Uno", Disabled = false}); list.Add (नई SelectListItem {Value = "Dos", Text = "Dos", Disabled = true}); list.Add (नई SelectListItem {Value = "Tres", Text = "Tres", Disabled = false}); सूची। जोड़ें (नया चयन सूचीइमेट {value = "Cuatro", टेक्स्ट = "कुएटर", विकलांग = गलत}); नई चयन सूची लौटें (सूची, "मान", "पाठ", "--- चुनें -"); } मॉडल को चुनें सूची बाध्य करना मॉडल। प्रोडक्ट्समॉडेल.मोल्ड = नया डमीडाउनडाउनडाउन ()। डमी लिस्ट (); दृश्य प्रदर्शित @ html.DropDownListFor (मॉडल = & gt; model.Model, Model.Model, html सामग्री: नया {@class = "dropdown", @style = "w

java - Audio Buffering in Android -

Image
I am trying to implement efficient audio buffer for radio streaming. Regularly, I was trying to buffer: initially I have my inputstream which is taken from HTTRL connection . The data is being read from circular buffer from input stream which fills buffers. In this case I have 3 buffers but the volume and size of the buffers can be easily changed. So after filling all the buffers I start writing data from my first buffer with the output output which is connected to InputStream , so whenever I use OutputStream It can then be read from InputStream is responsible for reading the data from MediaCode to InputStream and decoding that data then Passing on AudioTrack The problem with this set up is that after some time the outputstream eventually reaches the end of the circular buffer, so "OutputStream.giveMeNextBufferWithData" and "CircularBuffer.readDataFromInputStreamAndCreateBuffer There is no additional "extra buffer" in between "

reportbuilder3.0 - How do I add a Parameter for Multiple Customer Numbers? -

I have a cube with the account number stored in the form of text numbers. I need to create a report with a parameter You can enter a list of user account numbers. I have created my query and I have "account number" operator "is equal" and I checked the parameter check box. If I just run the report, then I can choose multiple account numbers, but we have more than 40,000 accounts, so it can take some time to find it and tick all those on which I I want to report. I want to be able to type or paste a list of accounts. If I go into parameter properties and set the value available for "none", then I can enter my list of accounts, but when I try I found this error report See. The restrictions imposed by the short flag in the STRTOSET function were violated. I'm feeling that does anyone have any ideas? Do not have any ideas p> thanks David In the @CustomerAccountNumber parameter, make sure that its type is text and allow mult

Solving for Roots in R- 3 variables -

I am trying to solve an equation with three variables in R. The equation is: 59991348 * x ^ 2 - 13958305552 * X + 992000000 + (6000000000 - Q * P) / (x * (.03 + 6000000000 - Q)). Is there a way to symbolically solve it (X = etc), or find the roots, in R? I've downloaded deSolve, but I'm sure which command would help, thanks for any help. I have not checked it at all, but it seems that this riaakas Package: FF < - "Solution (59991348 * x ^ 2 - 13958305552 * x + 992000000 + (6000000000 - Q * P) / (x * (03 + 6000000000 - Q)), x)" Resolve then: Library ("Ryakas") ans0 < - yacas (ff) ans1 & lt; - gsub ("({{}}, $)", "", strutsplit (ans0 $ YacasForm, "x ==") [[1]] ans1 & lt; - ans1 [2: 4] grepl ("Complex" , Ans1) ## Wrong TRUE Sqrt & lt; - Function (x) sqrt (Complex (real = x)) Complex & lt; - Function (R, I) Complex (actual = R, Image = I) Zapi & lieutenant; - function (x) if (

testing - hiding your password in java class file for a test case -

I am making up. public static zero main (string [] args) {WebDriver driver = new firefox driver (); Driver.get ("http://somesite.com"); . Driver (domain) (maximize window) () .; Driver. Management (). Time ranges (). Vested VAT (10, time unit. SENDS); WebElement userName = driver.findElement (By.xpath (".//*[@ id = 'username']")); userName.clear (); UserName.sendKeys ("someName@somecompany.com"); Web Element Password = Driver. Find Element (Bypass. (".//*. [ID = 'Password']")); Passwordclear (); password.sendKeys ("password"); Password.submit (); driver.quit (); What do I want to do, there is no "password" displayed, I do not want other employees to see my password. Is there any way I can do that? You can always encrypt it or base 64 or something like this can be done at least plain text , But honestly any kind of hardcod password encryption can be reversed, if they can see the

javascript - Remove all facebook -

I have a hard time trying to kill all the Facebook features, do not have to, do not have a waiter Then I try to use gresemonkey to do it, but by now I can not try to try it every time, when I get the document ID, " Content "works fine when I think like" FB-like "Nothing Te me what you've got so far, I hope we can keep up with me correctly. // Because of this part, there are crazy-like classes and none id var killerface = document.getElementsByClassName ("like-box"); (Var i = 0; i & lt; killerface.length; i ++) {killer [i] .setAttribute ("id", "like-box"); } This child should be removed, but this is not ... var killerface2 = document.getElementById ("like-box"); Killerface2.parentNode.removeChild (killerface2); Any ideas? This idea clearly removes all pages using greasemonkey while following some ads and everything else like Facebook, Google Plus, and others, do not you like to conceal just do not h

python - Converting panda's dataframe group iteration into groupby with apply -

I need to split a dataframe into groups, and for those groups, which is a strange number of lines, Needing to pull is the first row whose column corresponds to a certain position and then I need to collect all the first rows (hence the only ones in the odd number of groups matching a situation). I can do it in a loop (it works) as below, but with this implementation it can not work again in a group Can you help? grp_by_cols = ['A', 'B'] new_df = pd.DataFrame (column = grp_by_cols), group txn.groupby (grp_by_cols): if len (group)% 2! = 0: new_df = new_df.append (group [group ['c'] == 'some')]. Head (1)) Interesting problem that I solve by writing a function that you Then pass to apply. Suppose you had such data on PD import random DF = PD. DataFrame ({'key': [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7], 'Data 1': [' A ',' B ',' C ',' A ',' B ',' B ',' B ',' C 

ubuntu - New host key while EC2 server is turned off -

I have a server on EC2 which I was connecting via FileZilla SFTP. Suddenly this is telling me to trust a new host key even when the machine stops. Is it a man in middle attack? If the machine is off, then how does it send a new host key? I think your example IP address has changed (such as due to restart) and your The original IP address was assigned to a different instance. These two separate host keys and the way you can connect,

javascript - MVC controller's string[] parameter is null when posting JSON data -

I post data with jQuery but I have problems with array data. The values ​​given for the MVC controller are always zero. This is my JavaScript code: var FilterCategory = $ ('input: checkbox: check'). Map (function () {return.value;}). (); Var posting = $ Post (url, {cursorid: lastid, CatFilter: FilterCategory}); Form data from network: cursorid: 5434cdc84ba4dd0c40396851 filter [1]: 1 filter []: 3 filter []: 4 Here is the C # side: Public action results GetDataTweets (string cursor, string [] catfilter) {bla bla} Cursorid < P> This code is here: var posting = $ .post (url, {cursorid: lastid, catfilter: filtercategory}); This is sending a class from MVC perspective, so to package the data you need reciprocal C # class. Create a class to handle that data, for example: I assume that your catfilter array is a string array: public class data {public string cursorid {Get; Set;} public string [] CatFilter {get; Set up;}} Then change your co

xsd - In XML Schema, why does an element group tag even exist? -

In my opinion, use group to create nominated sequence (likes, sequence, all) It can be referenced later. However, why is it also necessary when the complex type can be used to accomplish the same task, and besides, is more powerful? Is it very non-dry? It is not mentioned that the group tag essentially acts as a type of definition, and at the same time, it may be in that context, depending on whether you have the Ref or name attribute is not terrible and unnecessary? Or am I missing something important? "post-text" itemprop = "text"> named element and attribute group ( xs: group and xs: attributeGroup ) Very important. Basically, they allow the definition of a surrogate complex type, without the real complex types of boundaries. Limitations of XS: complex type Suppose you define your base complex type like this: & lt; X: complex type name = "base" & gt; (Base element model) & lt; / Xs: complex type & gt;

php - Fatal Error in PHPMailer -

There is a beginning here I have already tested the forum to find the answer but I Was not successful, other questions were especially on some parts of PHPMailer, but I'm more normal, so I hope no one will mark my question as a duplicate because I'm in a learning curve. I am working on a PHP project. How does it work that the user goes to the page and clicks any comments or issues in a form (such as text editor) and send button I should be able to get my message in my email. Is set here for testing purposes, but later it will be my real email with my own domain. Here is an error that I am getting when running on the local host: Fatal error: The unsolicited exception of the message 'phpmailerException' 'could not be executed : / Usr / sbin / sendmail 'in C: \ xampp \ htdocs \ PP \ classes \ class.phpmailer.php: 1100 Stack Trace: # 0C: \ xampp \ htdocs \ pp \ classes \ class.phpmailer.php (1026): PHPMailer-> Sendmail Send ('Date: Master, 9 OC ​

How can I get url parameters from a google sites page -

For a Google site, I want to display content based on a page url parameter. Example. Then I want to make an HTTP request using ID and want to display results on the page. Or I want to use an app script to do something and display results on the page. How can I do this? Use on Google Apps Script function doGet (e) {// ID example in your ur: http://sites.google.com/../mypage?myidok=123 var element - e.parameters.myidok // code // your app}

How to generate an array of arrays in Javascript? -

तो दिया गया: var person = {name: "", address: "" , फोनयन: ""} मैं उपयोगकर्ता इनपुट प्राप्त करने के लिए एक लूप बनाना चाहता हूं (जब तक कि वे यह निर्णय नहीं लेते कि वे अब और जानकारी इनपुट नहीं करना चाहते हैं या इनपुट रद्द नहीं करें)। मैं भी व्यक्ति वस्तु को एक प्रोटोटाइप के रूप में इस्तेमाल करना चाहूंगा। इसलिए मुझे लगता है कि किसी भी व्यक्ति की मनमाना संख्या के नाम / पता / फोन नंबर को स्टोर करने के लिए कोई वस्तु है। इसके लिए मेरा तर्क गतिशील रूप से मेरे लूप की हर आवृत्ति के लिए एक ऑब्जेक्ट में एक पूरी सरणी जोड़ना होगा। मेरा कोड ऐसा कुछ दिखता है: var person = {name: "", address: "", phonenumber: ""} var ग्राहक = []; // प्रत्येक व्यक्ति var इनपुट = "x" को स्टोर करने के लिए इस्तेमाल किया; // इनपुट के नाम / पते / फोन नंबर के लिए उपयोगकर्ता को लूप करें (var i = 0; इनपुट! = ""; I ++) {var input = prompt ("कॉमा से अलग इनपुट"); // उदाहरण इनपुट: माइक, मुख्य, 123456789 var परिणाम = input.split (

recursion - recursive function to convert string to integer ML -

I have to write my own recursive function in mL that in any way to convert the string of numbers to integer types Ord is used. I can use the helpful function, but apparently I should be able to do this without using it (according to my professor). I think the input is valid, and it is a positive integer Then, call str2int ("1234") output to 1234: int me It seems that there will be a need to use explosion and rotation at some point as the ED is running on the character, and my input is a string, any direction will be highly appreciated. You can define an auxiliary function charstoInt Processes on the left side. In each step it converts the leftmost digit c to a number and with 10x-multi, n (which is the median amount of all the precursors in the past) ... Fun Characters ([], N) = N | CharsToInt (c: cs, n) = charsToInt (cs, 10 * n + ord c-48) val n = charsToInt (explosion "1024", 0) gives you: val n = 1024: int As you are seeing, interme

rotation - How to get the angle to rotate a line in python -

Image
I have a line with two points [x1, y1, x2, y2] and I have a new point (nx , NY) on which I rotate the first line and then move it forward. Here's the picture to get it: I have tried with this function but I can not manage to complete the rotation, using I''tteter and Python: DEF rotate line (Self, Dx, DI): There are differences between # X and Y x1, NX and Y1, NE angle = mathematics.Tan 2 (DI, DX) print "angle", ang NewX = ((X1) * Math.cos (angle) - (y1) * math.sin (angle)) newy = ((x1) * math.sin (angle) + (y1) * math.cos (angle)) self.panel. Coouls (self, robot, newx, new, new + 10, new + 30) # I always add 10 in X and 30 in the wi so that the line size is maintained. Panel. Update () I'm not familiar with TkInter, but it looks like an educated guess That for the input itself Panel. There are handle and four coordination for the calls line. By setting coordination (x, y, x + 10, y + 30), you always make a line segment of the same length and

How view image from database by using php -

I am using the local host I insert the image into the database blob I am trying to show the image but I failed I do not show the image Three fields in the database are id, name, image . This code is trying. uimage.php & lt; Php mysql_connect ("localhost", "root", ""); Mysql_select_db ("task_database"); $ Image = mysql_query ("Choose Image WHERE ID = 1"); $ Image = mysql_fetch_assoc ($ image); $ Image = $ image ['image']; Header ("Content-Type: Image / JPEG"); Echo $ image; ? & Gt; Use this code in the and index.php page: "Uploaded Image" echo & Lt; P / & gt; Your image: & lt; P / & gt; & Lt; Img src = uimage.php & gt; "; But the picture was not shown. Crypto help me. The simplest type of images to handle images in PHP-based websites is to save images:

ios - iPad UIWebview showing all contents in top-left corner (1 fourth of screen)? -

In my universal app when I'm opening a new view controller with the click button 2 xib (for an iPad and The second is the iPhone. Auto layout is enabled for both xib). Trying to load an HTML string as the URL in the iPhone and iPad. Its true (full screen) is coming in the iPhone and the iPad has its top-left corner. This is my code - (zero) viewDidoadload {[Super Viewedload]; NSString * str = @ "a class = 'twitter-timeline' href = 'https: //twitter.com/hashtag/afrsindia' Data-Widget-ID = '501341258330025985' & gt; #frsindia Tweets & lt; / a & Gt; & lt; script & gt;; function (d, s, id) {var js, fjs = d.getElementsByTagName (s) [0], p = / ^ http: /. Test (d.location)? ' Http ':' https ', if {js = d.createElement (s); js.id = id; js.src = P + (d.getElementById (id)!)': //platform.twitter.com/widgets .js'; fjs.parentNode .insertBefore (JS, FJS);}} (document, 'script', 'twitter-wjs'); &

How to store permanent set max_allowed_packet mysql variable -

इस सवाल का पहले से ही एक उत्तर है: < / P> 10 उत्तर मेरे पास MySQL संस्करण 5.5 है। मुझे डेटाबेस पैकेट आकार को स्थायी रूप से बढ़ाना है। मैं अपने पैकेट आकार को स्थायी रूप से mysql में कैसे संग्रहीत कर सकता हूँ? my.ini फ़ाइल में बदलें। आपकी फ़ाइल में [mysqld] के तहत एक पंक्ति शामिल करें max_allowed_packet = 500M अब MySQL सेवा को पुनरारंभ करें और आप कर चुके हैं। अधिक जानकारी के लिए दस्तावेज देखें .....

Python Webapp2 call Handler function from within separate Handler -

Python 2.7, webpage 2, ginja 2 I call a handler function by calling another handler I am trying to get the final goal of providing a landing page with a passing argument before, I used myself. Rdirect (/ Landing) But now the arguments have to be passed. Simple example: Class landing (handler): def render_index (auto, error ("Index.html", error = error) Get DEF (self): self.render index () Category login (handler): def post (self): try: except verify_user (): #self.redirect ('/ landing') error = "error message" - & gt; # landing page I'm not sure how to do this - any advice is appreciated. what is landing.get (landing (request = self request)) what are you looking for? < / p>

Gradle: Failed to apply plugin [id 'groovy'] -

When implementing my own custom plugin that implements the groovy (plugin), this plugin Failed to apply [id 'groovy'] which is caused by java.lang.IllegalStateException: model 'task' is finalized removed from org. Gradle.model.internal.registry.DefaultModelRegistry.assertNotFinalized Is it impossible to apply groovy to another plugin? Or am I missing here? This project is where my plugin applies: buildscript {repositories {mavenCentral () maven {url file ('../ .. / maven-deploy') }}} Dependencies {// will be loaded with Ménen-deployment, no mavenCentral () Classpath 'se.toxbee.robospock: gradle-plugin-robospock: 0.1.0'}} Apply the plugin: 'robospock' and the code where groovy is applied: def applyGroovy (roboSpockConfiguration cfg) {def p = cfg.project (! P. Plugins HAsplugin ('Groove' )) {P. Application plugin: 'groovy'}} stacktrace: GIT repo: (here README.md is not accurate, it is not read ...) Th

java - "Too few parameters" error, even when I enter compatible datatypes -

I am applying a test using JDK 7, Access 2007 and Microsoft Database Engine 2010. When I enter a table with Java 'real' datatype field and entering float or double through Java, it says that the [Microsoft] [ODBC Microsoft Access driver] has very little parameters Expected 1. But if I enter straightforward numbers then it accepts. Which field type do I use? A column defined by using DLL as " REAL Number (single) ", which corresponds with float in JDBC. Therefore, you need to set your parameter value to .setFloat () for that column, as String SQL = "Include the Territory Name (Realfield) values ​​(?)"; Prepared place PS = con.prepareStatement (SQL); Ps.setFloat (1, 3.14F); This is a complete test code that works for me: import java.sql *; Public class JDBCATT {Public Static Zero Main (String Algos []) {String Connection String = "JDBC: ODBC: Driver = {Microsoft Access Driver (* .mdb)};" + "DBQ = C: / Users / Public /