Posts

Showing posts from May, 2014

android - How to set Default Cursor position to right of EditText -

Image
I have applied an edit text where I wanted to start it with text right, and I got it by the set gravity = true But the default cursor still appears on the left side of my text This is what I have done so far Have tried: & Lt; style name = "_ style_user_profile_editText" parent = "@ android: style / widget.EditText"> gt; item name = "and Roid: layout_width "& gt; mail_parente & lt; item name =" android: layout_hete "& gt; rap_community & lt; / item & gt; & lt; item name =" android: Item Name = "Android: Text Cursor Drawable" & gt; @ Drable / cursor_color_blue & lt; / item & gt; & lt; item name = "Android: Input Type" & gt; Text Not Suggestion, gt; Like Joe Jr. & Lt; / Item & gt; & Lt; Item name = "Android: Background" & gt; @Android: Color / Transparent & lt; / Item & gt; & Lt; / Style & gt; I tried & lt;...

bash - Shebang followed by rm command not a self deleting script -

I am referring to this tutorial to improve my knowledge, but I think that removing my script The script for the order is described in the website. Am I doing something wrong or is the code wrong? #! / Bin / rm # How to delete the script # It does not look like when you run it ... except that the file disappears. Until echo = 85 "This line will never be printed (beta!)." Eject $ $ $ # No matter the script will not be out here # Try echoing a $? After completion of the script, you will get a 0, not 85. I have also tried, #! / Bin / rm -f That too is not working. Shabang notation interprets interpreter when executed as script ( . / MyScript.sh ) is used. If you tell clearly interpreter - as, bash MyScript.sh - it overlays the Shebang line so I guess I am here that has happened.

spring - java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'addStudent' available as request attribute -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर यहाँ form.jsp और lt;% @ page language = "java" contentType = "text / html; charset = आईएसओ -885 9-1" पृष्ठ एन्कोडिंग = "आईएसओ -885 9 -1"% & gt; & Lt;% @ taglib uri = "http://www.springframework.org/tags/form" उपसर्ग = "फ़ॉर्म"% & gt; & LT;! DOCTYPE & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; meta http-equiv = "सामग्री-प्रकार" सामग्री = "पाठ / html; वर्णसेट = आईएसओ -885 9 -1" & gt; & Lt; शीर्षक & gt; छात्र जोड़ें & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; प्रपत्र: form action = "addStudent" commandName = "addStudent" विधि = "पोस्ट" & gt; & LT; तालिका & gt; & LT; टीआर & gt; & Lt; td & gt; & lt; फ़ॉर्म: लेबल पथ = "नाम" & gt; नाम: & lt; / form: label & gt; & lt; / td & gt...

java - Refreshing Caches while under load with Spring/EHCache -

I have a caching problem on Spring Multi-Threaded Web Services with database backend and earch-based caching Many customers in the service All repeat requests to the same object, with dozens of requests per second. There are only a few things that are requested that often a large number of other objects are requested with no time, the objects can change every two minutes, so the TTL of the cash is set to one minute. Loading objects from the database is slow and takes at least several seconds. At first I used a simple implementation to get the object: Check that the object is in the cache. If yes, then return it to the cache. If not, then load it from the database, keep it in the cache and return it. It was working well while testing it locally but performance tests on fast servers are shown very poorly loaded spikes a few times, each time a more frequently requested object Ends in the cache. When this happens, for the next 10 seconds, all requests for that object will r...

Nsis: Change Title bar for Two installations in one installer -

There are two installation the installer to me: How can I customize the title bar (Setup) for the two establishments Am I / p> ! MUI.nsh included! WinMessages.nsh caption ""! Set MUI_PAGE_CUSTOMFUNCTION_SHOW lic1! Insertmacro MUI_PAGE_LICENSE "$ $ {__ FILE__}"! Set MUI_PAGE_CUSTOMFUNCTION_SHOW INST1! Insertmacro MUI_PAGE_INSTFILES! Set MUI_PAGE_CUSTOMFUNCTION_SHOW lic2! Insertmacro MUI_PAGE_LICENSE "$ {__ FILE__}"! Defined MUI_PAGE_CUSTOMFUNCTION_SHOW inst2! Insertmacro MUI_PAGE_INSTFILES! Insertmacro MUI_LANGUAGE English message function l11 Send $ HWNDPARENT $ {WM_SETTEXT} 0 "STR: Foo $ (^ LicenseSubCaption)" Fnkshnand function inst1 SendMessage $ HWNDPARENT $ {WM_SETTEXT} 0 "STR: Fu $ (^ installing esab caption)" Fnkshnand function Lycée 2 Sendmesj $ Acdbludiapiaarti $ {Dblyuem_siti TEXT} 0 "STR: time $ (^ LicenseSubCaption)" function and function inst2 SendMessage $ HWNDPARENT $ {WM_SETTEXT} 0 "STR: time $...

javascript - Angular JS retain scroll position after reload -

I have an ul & gt; Li list of items with a reload button at the top. If I suppress the reload button, async is added to item data model. Each time an item is added to the model, it appears in the view, and the browser scroll is at the top. This is a Cordoba app (HTML5). I can definitely remember the scrolling position and scroll back, but it can be seen and IOO is just a hack. How can I ensure that the status of the scroll remains in one place? You can click on the reload button I think the problem is: I suggest a solution, track it by $ track $$ . Angular ng-in repeat

two dates in php, for each loop between dates but reverse? -

This is related to another question, which asks here, that works right but I need to contradict it, Do you have any idea how to implement it? The basic question is here You can use the + methods: foreach (array_reverse (iterator_to_array ($ period) as $ day) {...}

javascript - NodeJS - EMFILE Exception - request piped to writeStream -

Getting timely images from another server in a server Nodjes-time and store them in a specific folder. I am doing this with this command (a function that gets by the timer every 10 seconds): request (cameraRequestOptions) .pipe (fs .createWriteStream (". / Campics / cam" + Camera ID + "Picture" + latest camera featurenumber + ".jpg")); Changing the name of the target image file due to "the latest camera fixtures". I'm having trouble with an amiffeil exception, the strange thing is that this is happening only on some issues the server is running and it seems that it only happens after a long time. As I have already found, it means doing something wrong so many Failstrym or socket opening IM that it could be that I'm not sure that my pipe: I written Strit or Close the request? And when how? Documentation says: Readable Pip (destination, [options]) # Destination data to write destination writeable stream Option Objec...

android - Alternative of MonkeyTalkIDE Tool for mobile testing? -

I have installed the concrete device from I downloaded & amp; Installing the device, it is not working I removed twice & amp; Download again, but still is not working when I try to shut it down, but still gets stuck on the desktop, I'm unable to close this application. That's why I'm looking for any alternative to Capricorn talk tools which is open source & amp; Easy to use If anyone knows, answer it. thank you in advanced. I do not know why this is not working with you. If someone special you can tell me so that I can help you. Rororocks is one that you can use.

mysql - Convert Duplicate Finder Query to Drop All But the Newest Record -

मेरे पास डुप्लिकेट खोजक क्वेरी है ... चुनें लेखक, नाम, ट्रैकनम, शीर्षक_आईडी, लेखक, नाम, ट्रैकनम, टाइटल_आईड द्वारा डब्ल्यूटीबल ग्रुप से COUNT (*) होस्टिंग COUNT (*) & gt; 1 यह उन रिकॉर्ड को लौटाता है जो डुप्लिकेट होते हैं, और कितने की गिनती की जाती है। मैं इसे विस्तारित करना चाहूंगा ताकि वह सभी को छोड़ दें लेकिन नवीनतम प्रत्येक डुप्लिकेट का संस्करण मेरा मानना ​​है कि हम id या datetime फ़ील्ड का उपयोग कर सकते हैं जो कि मेरे पास रिकार्ड रखने की पहचान करने के लिए तालिका में उपलब्ध है या फिर एक और तरीका है? संपादित करें: मैं आधे रास्ते से हूं ... SELECT * FROM db.table ग्रुप द्वारा लेखक, नाम, ट्रैकनम, शीर्षक_आइड COUNT (*) & gt; 1 नाम का नाम, ट्रैकनम उपर्युक्त प्रत्येक डुप्लिकेट की एक प्रति दिखाई देता है। जब मैं उन्हें कार्यक्षेत्र में हटा देता हूं, तो मैं शेष शेष नवीनतम अनूठी रिकॉर्डों के साथ ही छोड़ा जाता हूं। मैं सिर्फ एक और कदम को स्वचालित करना चाहता हूं। इसके अलावा यह दो से अधिक समान रिकॉर्ड के लिए खाता नहीं है। प्रस्तावित समाधान # # चरण 01) अस्था...

robotframework - Robot Framework Get Text -

I am using robot framework selenium using python. I need help grabbing a certain part of the string, without getting an external library. It says that the text says "Your limit for your product is $ 0- 400", so I want to be able to get 400 and the paste is somewhere else in the test. The number is not always 400, sometimes it can be 55 or something, so I think I need a GET text, starting with a dollar sign, there will be two spaces of space and whatever is left out Take it. Or I can get the first number and add 10. Like this example, its 0 so I want to paste it. Please tell me! "Get it right" should cover it. You just have to identify the stop point, which in your example looks like it would be hyphen between two number values. For example: To remove the last five digits of this string, ABC12345 wants to create a variable for assigning the text. $ {number} = Get text (defined location of text, subtract bracket) Then to get the remainder of the strin...

startup - How to run an executable automatically Ubuntu 14 -

I know this is a common topic, but I can not find anything that I can use. I have one. CPP code in which I can see the video from IPCMERA. I am working with Ubuntu 14. I compile the code in the terminal like this: G ++ IPMAMPPO -O camera `pkg-config opencv --cflags --libs` And it's all over, and I've got an executable "camera" which I can run without problems, it seems that everything works out, and I can watch videos without problems. The thing is that I want to start this execution when Ubuntu starts, I am studying in many forums but nothing works for me, I think that because of me A GUI is required to run executable, but I do not know how to do it. Can someone help me? Many thanks I know that this thread is ancient, and this is Ubuntu 14, while my answer is Linux mint 17. I have successfully added the executable to the Windows partition (on my dual boot system) so that you can run at the startup of the mint, open the mint menu, type "sessi...

c# - Reactive Extensions SelectMany and Concat -

I understand that the behavior of SelectMany is to effectively merge the result of each value produced in a single stream, so that Nondeterministic How do I do somehow in C # in RCJs. var obs = Observable.Range (1, 10). Selection Mono (x = & gt; {Return Overview. Intervals (Timespace: Formsconds (10 - x)). Lo (3);}). Conceat (); This is what I want to do effectively, looking at a range, in order for each one to wait a bit so that they start. It is obviously a toy example but this idea is Use select , not SelectMany . concat overload which you can call a IObservable & lt; IObservable & lt; T & gt; & Gt; If you want to use the work on , then just project internal scenes, do not flatten them. var obs = Observable.Range (1, 10). Select (x => Observable.Interval (TimeSpan.FromSeconds (10 - x)). Take (3)) .Concat (); Note that each interval is deferred by using subscrition concat ; That is, when you subscribe, the first interval start...

php - Yelp API Integration based on location -

I am trying to integrate yelp api to find places. I succeeded in searching the name and place based on name and succeeded. But I can not filter results focused on latitude and longitude. The values ​​of the same latitude latitudes are the same every time. I had given the parameter as 'clubb' but 'center' values ​​are not being changed in my input values. Is it possible to use Yelp API? I am able to get results from Yelp. Yelip has a parameter called 'paragraph' where we can give latitude and longitude. This parameter will help in searching the location based on latitude and longitude. Please do not do that the option parameters will not take the 'Ll' parameter with 'location' or 'cll' as well as they indicate the location.

Google Script sort 2D Array by any column -

I was asked a question before getting a record from a database: I tampered the array It is quite easy to do and create your own sorting algorithm, but I want to use the current Array.sort () method to organize the data due to its speed. I think I can easily use it to sort the 2D array through the first column of data, but I can not get the syntax for sorting on the different columns of data other than the first data The closest I have found is:. However, these inputs have not worked for my Array, TableData: for tableData.sort ([[column: 1}], I get this for the following code; Type = error: (square) @ 4dde8e64 function, this is an object. (Line 49, file "sortableball") TableData.sort ([[Column: 1, ascending: true]]); = & gt; TypeError: (class) @ 4d89c26e is not a function, this is an object (line 50, file "Sortableball") Which column of data to choose What is the correct syntax for? The function argument to select the method is that The ...

unity3d - ShowAchievementsUI(); don't want to appear on Android -

I am using the official for unity, and I am following the installation at this point. Authentication works like a magic, but when I see ShowHivumentsUI (); I want to, no UI, no error, no accident. I've been googling around for a while, it seems that other people have solved this problem, but there is no solution in sight. My code is this moment: using GooglePlayGames; Using UnityEngine.SocialPlatforms; Zero Start () {PlayGamesPlatform.DebugLogEnabled = true; PlayGamesPlatform.Activate (); LoginSocialGamecenter (); } Public Fixed Zero Login SocialGamecenter () {if (Social.localUser.authenticated) {Social.ShowAchievementsUI (); Debug.Log ("Pancake!"); Return; }} and "Pancakes!" It comes out completely before the authentication UI also appears on the installation well, it fails in all of my devices, but the debug message is fully visible on Android. According to the documentation, it should work in the described form: Showing achievements UI T...

HTML code to JSON with help of php -

Hope you can help me solve a small problem. I saw this post but still found some errors: I created a PHP file that brings a post from WordPress with this format & lt; H1 & gt; & Lt; Img src = "category1.jpg" /> Category 1 & lt; / H1> & Lt; Ul & gt; & Lt; Li & gt; Some text & Lt; Strong & gt; & Lt; Em> AUTHOR 1 & lt; / Em> & Lt; / Strong & gt; & Lt; / Li & gt; & Lt; Li & gt; Some other text. & Lt; Strong & gt; & Lt; Em> AUTHOR 2 & lt; / Em> & Lt; / Strong & gt; & Lt; / Li & gt; & Lt; Li & gt; Some other articles. & Lt; Strong & gt; & Lt; Em> AUTHOR 3 & lt; / Em> & Lt; / Strong & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; H1 & gt; & Lt; Img src = "category2.jpg" /> Category 2 & lt; / H1> & Lt; Ul & gt; & Lt; Li & gt; Some new text & Lt; Str...

mpfr - python bigfloat installation issues -

My problem is similar to this poster and I'm using a Mac OSX version 10.9.5: When I try to install the "mpc-1.0.2" package, it does not compile and collects this collection: grep: / Home / case / local / lib / libgmp.la: There is no such file or directory: /home/case/local/lib/libgmp.la: No such file or directory liboot: no: link: `/ home / case / Local / lib / libgmp.la 'does not create a valid Liboot collection [2]: *** [libmpc.la] making error 1 [***]: *** [sub-recursive] making error 1: *** [All] error 2 is my configured command : ./configure --prefix = / User / Username / Local - with-GMP = / User / Username / Local - with-MPFF A If your goal is to compile bigfloat , you will see gmpy2 Or MPC do not need to be compiled. . From the process for compiling GMP , MPFR and MPC to use the first part of my instructions with GMP2 Was copied. In my examples, I usually use my local username case , a normal username , or sometimes a dif...

Android Java exception even after string null or empty check -

I really do not understand why java.lang.NumberFormatException: illegal long: "zero" is here. The problem snippet is like follow-up. try {userid = (JSONObject) msg.obj) .getString ("userid"); If (userid.equals ("") || userid.isEmpty () || null == user id) {onClickLogout (); Return; } And {client.setUserid (Long.Personal (User ID)); }} Grip (JasonXExpress E) {// Todo Auto-Generated Catch Block e.printStackTrace (); OnClickLogout (); Return; } Line Client.SetUsured (Long. Parsleyng (user-facing)); The following exception is received java.lang.NumberFormatException: invalid length: "tap" at java.lang.Long.invalidLong (long.java:1225) java.lang.Long.parse At (long .java: 362) at java.lang.Long.parseLong (long.java353) at java.lang.Long.parseLong (long.Java 319) at client.setUserid (long-term user ()); The issue is that there is a blank exception even after the user's idle and empty check in the code. what happened with me? Pleas...

ios8 - Adding a UISearchController to a Non-Table View -

There is a problem using the new UISearchController in IOS8. I've found that every instance of the search bar is used by UITableView Header View in the form of What do you do when you need to display the search bar elsewhere? For example, keeping the searchbar out of the table to prevent the scrollbar from scrolling? What about using it with something like UICallview? Am I missing something here? It does not seem that it should be complicated. in the titleView of the UISActbarbar navigation bar, You can prevent it from scrolling when the tableview is scrolled. self.searchController.hidesNavigationBarDuringPresentation = NO; Self.searchController.searchBar.searchBarStyle = UISearchBarStyleMinimal; // Include the search bar within the navigation bar Self.navigationItem.titleView = self.searchController.searchBar; Self.definesPresentationContext = Yes; UISearchController depend on searchResultsController that should be the view controller that manages the search r...

javascript - Update/Add data to Google Spreadsheet Database -

I'm trying to update data in a Google Spreadsheet / link which will act as a database my spreadsheets and my I can get information in Bella; However, I do not post more updates to make sure it data.feed.entry [4] [ 'Jisaks $ content'] [ "$ t"]; I do not want to see the setting for that value as easy, how do I do this? Thank you. The problem is that you have a 'Access-Control-Allow-Origin " You need to make a jsonp request so that your URL is changed to & amp; Callback =? adding and JQuery rest var url = "http://spreadsheets.google.com/feeds/list/1qPcO2SDbnyHcmxtbTb8DmG_f2_grEGIW1MaThSoFzFc/od6/public/values?alt=json&amp ; Callback =? "; This Regards!

three.js - Remove a group from scene -

I am using three.js, and I have created a group and inside another group pgrupo = new array (); Fgrupo = new array (); Scene.add (pgrupo [0]) pgrupo [0] .add (fgrupo [0]): pgrupo [0] .add (fgrupo [1]): How can I remove Am I a FGP from the scene? If I use it: scene.remove (fgrupo [0]); or scene.remove (pgrupo [0]); Nothing happened How can I remove these things from this view? Instead of using arrays and more. () And .remove () methods. Then pgrupo = new THREE.Object3D (); Fgrupo = = New three. Object 3D (); Scene.add (pgrupo); Also the method. The child gives you an array with the object's children.

ruby on rails - Mongoid Scope Check If Array Field Contains Value -

The solution to this question can be very easy, but I'm waving around with no answer. I am using quietly in my Rail 4.1.4 app. I have a model in which an array Field which will house string values. I want a Mongoyeds to get examples in the scope of the model , where it is specific in the array field String value, which is given as a parameter for the scope. Suppose we have this model: class Monogel in some models :: documents are included in the moguid :: timestamp field: some_array, type: array, default: array.non scope: some_scope, - & gt; field does not work, because obviously, MongoDB Em> $ elemMatch needs to get criteria as value . But, how to say benchmark that the element should be equal to the given value. ??? How to write a very simple scope but a clue? ?? Regards !!! thank you in advanced. You are working a lot more if a field contains an array, you can search it As if it was not an array. For example, if you have a doc...

symfony - FOSUserBundle One-To-One mapped Entity not saved -

Hi guys, I have a question about applying one-to-one in Entity FosUserBundle. User Mapping is a mapping with the entity unit unit I have overridden the original RegistrationFormType, as shown in the documentation of Faususerbundle. The record has also been saved in both tables. But mapping institutions show me empty data li> ProfileFormType Summary - Registry FormType Gist - The problem with your implementation is that you do not update the bidirectional union clearly: Check that the owner of the relationship has the foreign key in favor How is defined, Alika cart. In your case, the proprietary aspect is profile which you can automatically update to setUserId () in the form of folds: public function setUserId (\ XXXX \ Bundle \ UserBundle \ Entity \ user $ userId = null) {$ this- & gt; UserId = $ userId; $ UserId- & gt; SetProfile (this $); $ This return; } You can access the data from both sides of the relationship without proble...

php - MySQL select from table depending to other table values -

Sorry for bothering me, but I need a lot of help from you professionals ... I have table tables: ID, date, menu 1, menu 2, menu 3, menu 4 and table 2: id, name, something like, some alsy 2 Table 1 (menu 1, menu 2, menu 3, menu 4) have the ID of the table 2. I need the database query "date" value and from table 2 get four rows in the table (depending on the menu's menu value of 1 table) any suggestions, please? Read MySQL-Docs and see if it's included in a MySQL-tutorial. There you will find something like this: Be a spicy with a simple SELECT a JOIN and mySQL as the ID - colum: select Table 1. Add table 1 to table 2 from table 1 to Table 2. Id = table 2.ID where table 1.menu1 = "someValue" and Table1.menu2 = "someOtherValue" If it runs at a slow speed, then table id-call Try adding INDEX to any one: Alternate table Table 1 ADD Index My Index (ID) You can tell Select how many rows are being examined Sel...

automation - How to write script to download csv file of ideas for product category in google adwords -

I want to download search volume trends from Google AdWords based on the target location and product category. If download is not feasible, then share it with your designated name (category name) in your Google Drive account Edit: I have an AdWords - Trying to automate the process below for Keyword Planner Log in to AdWords Select target location Click on Input Category and get ideas Keyword ideas for CSV Download as and save it. Like a PHP bot Since you can write a script that can automate the process One way can be done, which is . And this is . Download file method (string address, string filename) . Scripts (CMDlets) are really specific. NET classes, which are called PowerShell Runtime and they are called when they are run. CMDlet is available either from CMDlet or PSCMDlet, when CMDlet is required to interact with PowerShell Runtime. Apart from this, the implementation of these CMDlet classes can refer to any .NET API and may be in any NATT languag...

css - changing textbox color bootstrap from white to Gray -

I am trying to color the text box to white the bootstrap white, like: texture {color: gray; } But that does not work. Thank you I have checked this, like this: Textera {background color: gray; } and this is a text box for example: But the texbox remains white. Use it textarea {background color: gray! Important; } for the text box input [type = "text"] {background-color: gray! Important}

python - Using a shared varibale to select from a matrix -

I am trying to select several elements from the matrix using a changing vector, The function is sent on. But when I try to run the code, I get the following error for the last line (W-selection) ValueError: Setting an array element with a sequence This announcement is: x = T.vector ('x', dtype = 'int32') y = T.vector ('y', Dtype = 'int32 ') Pure = Pure (rng = rng, x = x, n_in = dim * 5, n_out = 2, n_hidden = 100, y = y, n_tokens = len (txt), dim = dim) and then I use my input (x) as follows: W = numpy.asarray (rng.uniform (decrease = 0, high = 1., aka R = (n_tokens, dim)), dtype = theano.config.floatX) itself. = = Theano.shared (value = w, name = 'w', borrow = true) self.output = w [x,] intention is to run in run time x The index will be a simple vector x = [0, 1, 5, 98 ..] ..] thanks for help Matrix W is a type of ndarray type, so it is not known how to deal with x-x like thiano. If you want to index this numpy a...

metadata - Cannot set more than one Meta data with OpenStack Swift Object -

I am trying to set the metadata with an object stored in Swift Container. I am using the following command (Note that my container is' container 1 'and the object is' employee .json': curl -x post-h "x-orth-token: $ token" - h 'x -Abject-Meta-Metadata1: Value '$ STORAGE_URL / container1 / employee.json This works fine with a metadata. And whenever I'm trying to set more than one metadata, to issue several curl commands, only the last metadata value is actually set. I think there should be no limit That you can only set one metadata for a quick object. Am I doing something wrong? FYI: I am using OpenStacks Swift's Havana release. Thank you. I think, I have understood it ... It is my fault that I have not read the document honestly. It says [1], "A post request will remove all existing metadata with the last post / post." So, I tried to do it and it worked Done ... curl -x post-h "x-aeth-token: $ token...

Pass logged user to model field django -

I do not know how to get a username from the current user. I have an edit djano-crispy-forms : The form provided with the class RecepcionForm (forms.ModelForm): fecha_recepcion = Forms.DateField (widget = dateInput ()) def __init __ (self, * Args, ** kwargs): Super (RecepcionForm, itself) .__ init __ (* args, ** kwargs) self.helper = FormHelper (self ) Self.helper.layout = layout (field ('id_proveedor', 'anio', 'mess',' usury ', redone = true), field set (' ',' fade_recpson ',' number_kirvis', submit ('save ',' Gabra ')) class meta: model = datal reciprocation my views.py : @login_required (login_url = '/ login /') DF receptionist Weave (request): idp = request.GET .get ('i') anio = request.GET.get ('a') mes = request .GET.get ('M') if request.method == 'POST': r = DetalleRecepcion.objects.get (id_proveedor = Idp, anio = anio, mes = mes) form = reception form...

gmail api - Getting history events for just new messages? -

I want to monitor a user's Gmail account for new messages and take the appropriate action. Is there a way to bring events in history just for a new message, but not for things like changing e-mail or its labels etc? So I ended up using messages.list and stored the timestamp of the most recent message. Then on subsequent calls to messages.list, I supply a query of "after: theMostRecentTimestampIKnowOf", to find new messages since the last time we synced.

ios - Why is textInput.keyboardType nil in textDidChange? -

The I'm developing a custom keyboard Swift and I would like to know when the keyboard type of change (a number or decimal For example keyboard type) I believe this should be done in either textDidChange or textWillChange . This method gets a UITextInput , which has a property keyboardType . But when this method is called, that property is always happening zero because it runs the following code, even after I have entered a different input type (number). override function textDidChange (TextInput: UITextInput) {if the inputType = textInput.keyboardType {// here is never deleteKeyboardButton.backgroundColor = UIColor.yellowColor ()}} itemprop = "text"> its keyboardType property, no text should be obtained and the property of Use> TextInput . var proxy as = self.textDocumentProxy UITextDocumentProxy if proxy.keyboardType == UIKeyboardType.EmailAddress {// email add code here to display Input}

android - how do i make a timer continue counting down after the app stopped? -

I have a class with a timer in it. When the method starts the timer and it goes forever, but when the app is completely closed, it stops and when the app is opened again it does not fall down. Is there a way to check whether the timer was previously ticked and ticked it with shared preferences or something else? Method below Public int shipAdd () {if if not, I know not. (counter> = addSpend) { counter - = addSpend; AddSpend + = addSpend; CounterPerSec + = AddAmount; AddClick + = addClick; Test ++; // Under the new timer class count down the timer (Adetime, 1000) {Fineish on Public Zero () {Counter + = Admount; This.start (); } }.Start(); } And if (counter & lt; addSpend) {} ​​return addSpend; } A great way to do this is to serve one. Calculates Public Segment Enhance Timer Service {@ Override Public IBinding On Bind (Intent Intent) {// TODO Auto-Generated Method Stub Returns Empty; } @ Override Public Wide On Create () {// Enter your Timer Code here}} Y...

javascript - Best way to handle nested Promises (bluebird) -

इस सवाल का पहले से ही एक उत्तर है: 14 उत्तरों मेरे पास निम्न वादा श्रृंखला है नीचे और यह काफी गड़बड़ (प्रत्येक _create * समारोह एक वादा देता है) प्रतीत होता है: वापस नए वादा (कार्य (समाधान, अस्वीकार) {_this.database लेनदेन (कार्य (टी) {_this._createExternalAccount (भुगतान, टी) .then (फ़ंक्शन (बाहरी एसीसी) {वापसी _this._createExternalTransaction (बाहरी खाता, भुगतान, टी)। तब (फ़ंक्शन (बाहरी ट्रांसेक्शन) {वापसी _this._createAddress (बाहरी खाता, भुगतान , टी)। तब (कार्य (पता) {वापसी _this._createTransaction (पता, भुगतान, टी)। तब (कार्य (लेनदेन) {वापसी _this._createGatewayTransaction (बाहरी लेनदेन, लेनदेन, भुगतान, टी)। तब (कार्य (गेटवे लेनदेन) {T.commit (); संकल्प (पुलपैकेज जाहिर); }); }); }); }); })। आतंक (फ़ंक्शन (पुल भुगतान) {टी। रोलबैक (); अस्वीकार करें (पुल भुगतान);}); }); मुझे पता है कि वादात्मक कार्य हैं I all () और join () जैसा इस्तेमाल कर सकते हैं, लेकिन ये समवर्ती कार्यों को चलाने के लिए प्रतीत होते हैं जो मैं ऐसा नहीं कर सकता क्योंकि कुछ तालिकाओं के लिए प...

javascript - AngularJS ng-repeat track by not selecting initial value -

Still new to angular, please bear with me. I have a radio button list that I generate using NG-Repeat I am storing the selected object in a different variable on the same controller. Setting one of the objects in the selected object list with a different example. I thought that since the ID is identical, that using the expression "by track" will select the right item in the list, but it is not. If I select a radio button, then it will update the selected variable as expected. Am I doing something wrong? Is this a bad pattern? & lt; Form name = "myForm" ng-controller = "MyCtrl" & gt; & Lt; Label ng-repeat = "person tracked by person." & Gt; & Lt; Input type = "radio" ng-model = "$ parent.selected" ng-value = "person" /> {{Person.name}} & lt; / Label & gt; & Lt; / Form & gt; Here's my controller: Angular.module ('ngapdam', []). Controller ('microta...

java - Prevent AWT Event Queue from overloading -

I have coded the swing GUI, which uses key accelerator on the jammuites. To suppress the key, which triggers accelerator for a long time, causes EventQueue stacking commands and blocking GUI. I want the AWT event line to contain more than one (or two) content modifier with keyant should not be. I tried to do this: AWTEvent awtevent = Toolkit.getDefaultToolkit () .getSystemEventQueue (). PeekEvent (); If (awtevent! = Null) {string paramString = awtevent.paramString (); If ((paramString.indexOf ("modifiers = Ctrl")! = -1 & amp; amp; ((KeyEvent) event) .isControlDown ())) {(KeyEvent event) .consume (); } And if (paramString.indexOf ("modifiers = Ctrl")! = -1 & amp; amp; (paramchrring.indexOf ("keychhar = undefined")! = -1)) {(KeyEvent event) .consume ( ); }} But this is very unbelievable because sometimes programs are consumed which should not be consumed. You can not trust it from the outside outside This event-sending thread manipulat...

android - Custom PopupMenu (layout) -

Image
I'm trying to upgrade my popup menu so that it can come up with icons and custom styles. I have a new layout for this & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; RelativeLayout Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Android: Android: Android: Android: "Drawable / Share" Android: Padding Lift = "10.0 Dip" Android: Padding Right = "10.0 Dip" Android: Layout_width = "Wrap-content" Android: Layout_Hight = "50.0 Dip "Android: onClick =" Share "& gt; Android: text = "@ string / share" Android: drawableLeft = "@ drawable / share_button" Android: Android: Android: Android: DrawablePadding = "10.0dip" Android: layout_centerVertical = "true" /> & Lt; / RelativeLayout & gt; ...

ssis - Using BIDS to extract data from Informix ODBC source with parameters -

As I am in the title, I am trying to extract the data from the parameters with my inputs Odyssey source. I have two parameters which I am attempting to pass are both date times and I am trying to get the current start date for example 2014-10-10 00:00:00 and End date 2014-10-10 23:59:59 . If I do this with a normal query: SELECT * from tabline where 'start date between 2014-10-10 00:00:00' and ' '2014-10-10 23:59:59' ' Everything works well, however, if I have tried to use parameters that I have determined: SELECT * from tabline where is the start date? And? I get the following error: Open Database Connectivity (ODBC) Error State: '07001' Original Error Code: -11012 [Informers] [ Informs Odyssey Driver] Wrong number of parameters. I think that is to do this with my query, but I see and I do not get anything. Will someone be able to help me? Thanks! When you need to have parameterized query ('?') Binding, it is like...

c - How to display st_atime and st_mtime -

I want to display my two attributes from the structure state struct stat {dev_t St_dev; ID of ID / IOITT_iOON files; / * Inode number * / mode_t st_mode; / * Security * / nlink_t st_nlink; / * Number of hard links * / uid_t st_uid; / * Owner User ID * / gid_t st_gid; / * Owner's Group ID * / dev_t st_rdev; / * Device ID (if special file) * / off_t st_size; / * Total size, bytes * / blksize_t st_blksize; / * File system I / O * / blkcnt_t blocks for st_blocks; / * 512 b Block Allocated * * / time_t st_atime; / * Last access time * / time_t st_mtime; / Last revision time * / time_t st_ctime; / * Last status change time * / }; This is my code which I reached for the last time and the last modified folder / file struct tm * time; Four buffers [200]; Time = local time (file_info.st_atime); Stufftime (buffer, size (buffer), "% d.% M %% Y% H:% M:% s", time); Printf ("% s \ n", buffer); Time = local time (file_info.st_mtime); Stufftime (buffer, size (buffe...

linux - R RODBC package under Ubuntu -

When I try my code on Ubuntu / Linux R, I get an error & Gt; Library ('rodbc') & gt; Snm & lt; - "Blow" & gt; Dbname & lt; - "BB" & gt; Dbhandle & lt; - Warning message: 1: In odbcDriverConnect [RODBC] - odbcDriverConnect (Paste ("driver = {SQL Server}; server =", snm, "; database =", dbname, "; trusted_connection = true", sep = "")) Error: State IM002, Code 0, Message [unixODBC] [Driver Manager] The name of the data source was not found, and no default driver is specified: (Paste ("driver = {SQL Server}; server =", sname , ODBC driver connect (Paste ("driver = {SQL Server}} server =", in snam, ODBC connection failed but same code window I'm using RStudio on Windows Linux / Ubuntu & gt; Library ("RODBC", lib.loc = "~ / / / win-library / 3.1 ") when using the command prompt> & gt; & gt; Sn & lt; -" BLAH "...

Java GUI builder - How to make an irregular shaped button -

Image
I am working on Netbeans GUI builder and all I want to do is a picture of it (say a stick figure ) And a verb occurs only when I click the stick figure, not just its entire rectangle Edit: Mainly the question is how do I ignore transparent pixels on the button? package my.usefulness; Public class utility javax.swing.JFrame {expansion in public utility ()) (initComponents ();} @SuppressWarnings ("uncheck") // I was curious about this, so I tested to create a new component type. I have considered this approach when you click on this component to see the mouse event location with this image pixel data, if the pixel is transparent then the mouse event should not be registered. This implementation only applies the mouse to the events below and the class is completely away but it should give you a good start! I put it there in TODO tag public class transparency imagebutton implements JComponent MouseListener {Private BufferedImage image = null; Private file imag...

Adding a new object to a SQL Server database using LINQ C#/MVC does simply returns me to the same page without adding records to the database -

मेरे नियंत्रक [HttpGet] सार्वजनिक कार्यवाही बनाएँ () {वापसी देखें (); } [एचटीटीपी पोस्ट] सार्वजनिक ऐक्शनरेन्सल्ट बनाएं (ग्राहक ग्राहक) {if (ModelState.IsValid) {_db.Customers.Add (ग्राहक); _db.SaveChanges (); वापसी पुनर्निर्देशित करेंएक्शन ("इंडेक्स"); } वापसी देखें (ग्राहक); } मेरा मॉडल: सार्वजनिक वर्ग के ग्राहक {सार्वजनिक इन्ट आईडी {प्राप्त करें; सेट; } सार्वजनिक स्ट्रिंग प्रथम नाम {प्राप्त; सेट; } सार्वजनिक स्ट्रिंग LastName {get; सेट; } सार्वजनिक स्ट्रिंग पता {get; सेट;} सार्वजनिक स्ट्रिंग सिटी {प्राप्त; सेट; } सार्वजनिक स्ट्रिंग राज्य {get; सेट; } सार्वजनिक स्ट्रिंग ज़िप {get; सेट; } सार्वजनिक स्ट्रिंग फोन {get; सेट; } सार्वजनिक स्ट्रिंग ईमेल {get; सेट; } // सार्वजनिक आइकलेंक्शन & lt; ग्राहकडेटा & gt; ग्राहक {प्राप्त; सेट; }} मेरे दृश्य से: & lt; p & gt; @ Html.ActionLink ("नया बनाएं", "बनाएँ") Create.cshtml: @using (एचटीएमएल) .BeginForm ()) {@ Html.AntiForgeryToken () @ एचटीएमएल। वैधतासुंदर (सच) & lt; fi...

php - Reading $_GET after URL rewrite -

I do not know what URL to me I'm actually passing it correctly www.mydomain.com/openings.html?jobName=accounting-manager I should be URL www.mydomain.com/ openings / accounting-manager.html so, I added .htaccess RewriteRule ^ opening / ([^ /] *). $ Html /openings.html? \ Jobfilename = $ 1 [L] then serves as the URL intention now, I want $ _GET [ 'Jobnam'] reading this page so I print it on page Can do But the $ _GET variable is not present after the URL is rewritten. Is there any way to enter? Do I need to change the rewrite or should I do it any other way? Thank you. This is most likely because Maltivijh is enabled. Place it at the top of the .htaccess file. Options - Multi Views See also the flag for your rule.

c - Any reason why a loop wouldn't terminate even with an 'i' limiting value of repeats? -

I'm doing this assignment for college, it should be quite simple, but this does not seem like a loop in it. If finished, the code will not work properly; Even if I put one in the value of the value, it limits the amount of the loop. Try it with a loop for it, it still gets stuck. The code is considered to be in the values ​​of coefficients and is trying to find the middle point between the two major values ​​and to exclude the root for a cubic equation and to see if it is 0 If this does not happen, one of these borders should be changed to the midpoint value. Here is the relevant code: int main (zero) {int i, u = 1000, l = -1000; Float A, B, C, D, Middle, Y; Scanf ("% f% f% f% f", & amp; a, & amp; b, & amp; c, & amp; d); While (stomach (U - L)> 0.001 & amp; amp; & amp; & amp; amp; & amp;; 10) {Medium = (U + L) / 2; Y = One * Pau (Middle, 3) + B * Pau (Middle, 2) + c * mid + d; If break (y == 0); And if (Y & lt; 0) L = Mid; A...

java - Can not write all the data to txt file -

I have problems writing data to my .txt file. I do not write all the data in my .txt file. I have tried to put everything in the array, but it also does not work. My code: BufferedWriter author = faucet; {String line; Process P = RuntimeTet Timetime (). Exec ("ps -a -o pid"); BufferedReader input = new BufferedReader (new InputStreamReader (p.getInputStream ())); While ((line = input. Readline ()) = null () = author = new buffetter (new fleeter ("path ..")); Writer.write (line); Println (line); } Author. Close (); Input.close (); } Hold (exception mistake) {err.printStackTrace (); Println ("Sorry!"); } This only writes the last line of the console. By creating the object without loosing it during every repetition of the loop, whatever you have done so far Writing is leaving it (using the object you have to use the author to save what you wrote.) Before you loop, declare the author Required, so change it to BufferedWriter writer = nu...

signals - Comparing FFT of Function to Analytical FT Solution in Matlab -

Image
मैं फ़ंक्शन के विश्लेषणात्मक फूरियर ट्रांस्फ़ॉर्म, एक्सपी (- (- ( W ^ 2) / 4) / sqrt (2), आवृत्ति रेंज -3 से 3 पर। मैंने निम्न मैटलैब कोड लिखा है और इसे सफलतापूर्वक बिना कई बार फिर से चालू किया है। fs = 100; % नमूना आवृत्ति डीटी = 1 / एफएस; टी = 0: डीटी: 10-डीटी; % समय वेक्टर एल = लंबाई (टी); नमूना बिंदुओं की% संख्या% N = 2 ^ अगली पोज़ 2 (एल); %ज़रूरी? Y = एपीपी (- (टी। ^ 2)); वाई = डीटी * ifftshift (पेट (fft (y))); Freq = (-L / 2: एल / 2-1) * एफएस / एल; % Freq vector F = (exp (- (freq। ^ 2) / 4)) / sqrt (2); % विश्लेषणात्मक समाधान% Y_valid_pts = वाई (डब्ल्यू & gt; = - 3 & amp; डब्ल्यू & lt; = 3); % Freq के लिए तुलना = -3 से 3% npts = लंबाई (Y_valid_pts); % W = linspace (-3,3, npts); % फ़े = (एक्सपी (- (डब्ल्यू। ^ 2) / 4)) / एसक्यूआरटी (2); त्रुटि = आदर्श (वाई - एफ) त्रुटि के लिए% L2 मानक; साजिश (freq, वाई, 'आर'); साजिश (freq, एफ, 'बी'); Xlabel ('आवृत्ति, वा'); कथा ( 'संख्यात्मक', 'विश्लेषणात्मक'); रोक कर रखना; आप अभी देख ...

Need Help passing an instance variable to another method for insert in ruby on rails 4 -

I'm new to ROR and it has completed most of the day to work. I have tried to use the first_filters and I can not get my object inserted in the second method. The view index is selected in a file view, and then the button is clicked to validate the file which calls a method called 'evaluate_media' in this method, I look at the values ​​based on the selected name and I can successfully insert records with all the values ​​in this method. The problem is that I do not want to autosave when the 'evaluate_media' method is complete, then it displays the file with the save button or an update button when it is present in the database already present. Users can then save / update records or now. This button calls the 'save_file' verb The problem is that all the information saved in the 'evaluate_media' action for the file is not accessible to the save_file or update_file verbs. I believe the session variable may be my answer but I could not find a good ...

linux - Installing libraries in non standard location and using them to install a software -

I am trying to install a software on a cluster running Linux without any root. However, before installing software, some non-standard libraries are required. I installed the necessary library in my home directory when I had configured the software's source code to compile, I found an error message that states that it did not find library files. I tried to use CPPALAGS, LDFALGS, and LDILIBRARAGHAHHH where the compiler was located to find libraries, but it does not seem to work. How can I set up a non-standard library without administrative privileges and where does the compiler find that library? Should I do the same for other libraries? I am afraid that doing so completely creates the actual script of the software, and / or the makefile, and / Or depending on the code. There is no universal answer that works with every software package in existence. Each one's configuration script is unique and different. In some parts, it also depends on how libraries are installe...

converting json to java object giving wrong type of enum -

मेरे पास एक जेसन है जो निम्नलिखित जैसा है: [{"type": "chair" , "आकार": "अंडाकार", "मालिक": ["बी", "रंग": "लाल", "मालिक": ["ए", "बी"]}, {"प्रकार": "फूलदान" "सी"]}] जैसा कि देखा गया है, दोनों प्रविष्टियां अलग-अलग हैं इसलिए मुझे इस जेसन को डिसेरीलाइज़ करना होगा और 2 ऑब्जेक्ट्स चेयर और फूलदान देना होगा। उपरोक्त मालिकों को उपयुक्त वस्तु में एन्यूम की सूची होना चाहिए। Json के पास अन्य कई अलग-अलग प्रविष्टियां हो सकती हैं, जैसे और किसी भी क्रम में। इसलिए मैं यह कर रहा हूं: सूची & lt; मानचित्र & lt; स्ट्रिंग, ऑब्जेक्ट & gt; & gt; Things = objectMapper.readValue (जेसन, ऑब्जेक्टमैपर .getTypeFactory ()। कंसोल कलेक्शन टाइप (लिस्ट। क्लास, मैप। क्लास)); चीजों को नक्शे की सूची है और प्रत्येक नक्शे एक चीज़ के अनुरूप होगा। मैं सूची पर पुनरावृत्त करता हूं और प्रत्येक मानचित्र से 'प्रकार' को चेक करता हूं और उचित ऑब्जेक्ट को इन्स्त...

in app purchase - iOS 7+ server verified inapp purchasing sending many receipts -

I'm trying to get the new inapp purchase API (ios 7+) to work and I think that Receipt data is so much when I read such receipts: NSURL * receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; NSDTA * Receipt Data = [NSData DataWith Contents of URL: Receipt URL]; I am doing this inside: - (zero) Payment queue (SKPMcQ * *) Queued updated transaction: (NSARRA *) transaction So what I saw is that I send the receipt ""; And the data I am sending is much larger than the transaction. Transaction Recipe. In fact, in response to apples, there are dozens of receipts in the "in-app" array. Is this normal? I have terminated these transactions, yet there are so many receipts in the integrated receipt, is that right? Do my big expendants (buy thousands of IAPs) are sending huge receipts with thousands of transactions in them? In addition, what is the request for SKRETCITRPRESSER? Update! I came to know that in a live environment, all consumable re...