Posts

Showing posts from April, 2014

javascript - How to draw circles around markers with the specified radius value using mapbox.js -

Hello, I want to show the value of quantity with the help of a mill around the marker. Actually if the circle is big, it means that the available quantity at that place is more than the smaller circles. I am able to display the marker on the map. But I am trying out the display circles. The radius value for the circle is in the value variable. I want to convert the available quantity values ​​on the basis of the radius of the earth and then want to display the circle. Here are the code snippets // var map = L.mapbox.map ('map', 'example.map-i86nkdio') var map = L.mapbox .map ('map', 'hexample.j1m1kko7') .setView ([42.274260, -83.365717], 9); (I = 0; i & lt; lats.length; i ++) {var marker = L. Marker ([lathes [i], long [i]], {icn: l.map.marker.con ({'marker-color': '# e80000'})}) .bindpop ('& lt; button class = "Trigger"> gt; + fcam [i] + '& lt; / button & gt;'). ADTO (map); L. Cerclemarker...

javascript - jQuery selecting checkbox by class name in TWO separate divs -

I've made a bela of what I'm trying to do: I have two columns And in each column I basically have a replica of the Nested Uncharted list which has many checkboxes. As I have checked and unchecked the check box given in the right column This idea is really to keep the element on the right side, as long as They are selected on the left, then the right side should show only what is chosen (not all elements). I am taking one step at a time and I have been done once, after checking or unchecking there is a problem getting the checkbox on the right hand side. Works, but after the first time, it is not. The code addressing for checking and unchecking is here: $ ('.md-left (' 'check' '). ET (' check ', false). Change (function () {var sel = $ (this) .data ("val"); if ($ (this) .is (": chec cad")) {console.log ("check" + sel); $ ('.md-right input.wf-check-' + sel + '[type = checkbox]'). Et (...

objective c - Can a custom keyboard extension communicate with the companion app at runtime? -

Can a custom keyboard interact with the companion app on runtime? Can custom keyboards dynamically display content based on states set in the companion app? If so, which API / documents are available for this communication between the extension and the app? Here is a good article from the documentation that can start to share data with your affiliate app. Is: I have to work with today's extension and collaborative app. They both share the same NSUserDefaults so they can communicate each other in real time. If NSUserDefaults are looking for you, here's a good tutorial:

ios - How can I escape the *s and %s in this string without breaking the URL? -

मुझे यहां यह क्रिया है: - (IBAction) खोजबटन: (आईडी) प्रेषक {NSString * textString = self.symbolSearchField.text; एनएसURL * sourceURL = [[एनएसआरएल आलोक] इनिटविथस्ट्रिंग: [एनएसएसटीइंग स्ट्रिंगवैटफॉर्मैट: @ "http://query.yahooapis.com/v1/public/yql?q=select%%20*%%20from%%20yahoo.finance.quotes %% 20where %% 20symbol %% 20in %% 20 %% 28 %% 22% @ %% 22 %% 29 और amp; env = store: //datatables.org/alltableswithkeys ", टेक्स्टस्ट्रिंग]]; NSXMLParser * पार्सर = [[NSXMLParser alloc] initWithContentsOfURL: sourceURL]; Parser.delegate = self; [पार्सर पार्स]; मैं इसे खोज फ़ील्ड से टेक्स्ट लेना चाहता हूं, उस टेक्स्ट के साथ यूआरएल को संशोधित कर, और यूआरएल से एक्सएमएल को पार्स करना चाहता हूं। हालांकि, जब मैं * s और% s से बचता हूं, ऐसा प्रतीत होता है कि यूआरएल "टूट" हो जाता है, और यह पार्स नहीं करता है। अगर मैं यूआरएल को छोड़ता हूं क्योंकि यह बचने के बिना था ... NSURL * sourceURL = [[एनएसURL आलोक] initWithString: [NSString stringWithFormat: @ "http://query.yahooapi...

buddypress - jQuery Change Function'Unexpected Token ILLEGAL' -

some time has passed: I use a jQuery function to add data to / On the input field form I am trying to get "Unwanted syntax error: Unexpected token invalid". My Function: & lt; Script type = 'text / javascript' & gt; JQuery (document) .ready (function ($) {$ (input "signup_username"}. Change (function () {$ ("input # field_1" ²) .val ($ (this) .val ()) ;});}) & Lt; / Script & gt; I am trying to follow the follow-up to hide and replace expo data on the BuddyPress registration form. Suggestion: Hide the Xprofile Name field on the registration form (CSS display: none) and a JavaScript listener to change the profiler name field Place the (change) function in the WP user name value. This form will take care of verification. The XProfile name field is required. See reference. | Reference: jQuery (an "input # signup_username"). Change (function () {jQuery (an app input # field_1 ²?) .val (jQuery (this) .val ...

android - How to force device to get new GCM ID? -

I'm having a strange oscillation with my app - I have two devices on which I test it. One is 4.4.4, the second is 4.0.4. I have created an app that used GCM, it worked on both phones without a problem, then I made a second one, which had GCM module that was pasted without the first one, without any changes. Now, when I send a GCM message to KitKat, it gets without problems but I can not see it on another phone. This does not register at all (the broadcast receiver does not receive anything) All the while the first app is still working properly, both phones have the right APK installed through ADB. I store the GCM registration ID in the phone, even when I run the app on KitKat, get an ID, get the app, erase data, run it again - I get the second time the second time. It does not happen with other phones, which makes me believe that there has been an error from Google. I stumbled on this thread, probably dealing with the same problem. I tried to re-install the app, but he di...

python - Mapping non-ascii, long column names in SQLAlchemy fails with NoSuchColumnError -

Could it be that the key of the RowProxy object is shortened to some length? I have a legacy. MSSQL database has some column names with letters with accented letters I am mapping it with the following code for the Python property: @ event.listens_for (table, "column_reflect") def column_reflect (inspector, table, column_info): If table.name == 'D_Allomanylista_Komplex_V': # set column.key = "attr_ & LT; lower_case_name & gt;" Colm_to_chenj = { 'Olpot' "Elepot 'Bijhteniv' 'Bijhttoyo_ave, U'levlejh \ xe 9siC \ xedmUtca': 'Levelejhsi Simayutaka, U'sjerjh \ u0151d \ xe9sSorsz \ xe1m': 'Sjhejhods Sjham, Colm_info [ 'key'] = columns_to_change.get (column_info [ 'name'], column_info [ 'name']) komplex_table = inspect_komplex_table () class BiztositasokModel (base): __table__ = komplex_table __mapper_args__ = { 'primary_key': [ komplex_table.c [u 'KTVSZAM'], k...

uibutton - iOS Custom Animated Button does not scale back after pushing a page -

My iOS custom animated buttons do not revert back after pushing the page. Is it a way to scale my buttons before too late is? Because when I come back to the original page, I think my button is still small. @interface CustomButton () @property (assign, nonatamic) BOOL is small; @end @implementation Custom Button - (ID) Init With Code: (Encoder *) Decoder {if (Self = [Super Init With Coder: Decoder]) {self.isSmall = NO; } Healthy return; } - (id) initWithFrame: (CGRect) frame {if (self = [super initWithFrame: frame]) {self.isSmall = NO; } Healthy return; } - (zero) touches: (NSSET *) touches the event: (UIEvent *) event {if (!self.ssmlL) {self.isSmall = YES; [Self-scale tasal]; } [Super touching: left with event: incident]; } - Added the (zero) touch: (NSSET *) touches the event: (Uiivent *) event {if (self.ssmll) {self.IMSSLL = no; [Self scale tbbig]; } [Super touchend: Event: touches with event]; } - (Zero) ScaleToSmall {CABasic Animation * Animation = [with CABasic Animation A...

python - Proper use of Flask-ldap -

I am currently trying to use Flask-LDAP for Sandman's authentication purposes, unlike normal python LDAP where The documentation is pretty straight forward, it is very offbase. Examples from the document. flask.ext.ldap Import from flask import bottle to , flask.ext.pymongo from login_required Import PyMongo app = bottle (__name__) app.debug = true app.config ['LDAP_HOST '] =' Ldap.example.com 'app.config [' LDAP_DOMAIN '] =' example.com 'app.config [' LDAP_SEARCH_BASE '] =' OU = domain user, dc = example, dc = com 'app.config ['LDAP_LOGIN_VIEW'] = 'custom_login' app.config ['MONGO_DBNAME'] = 'simpledb' Mongo = PyMongo (app, config_prefix = 'mongo') ldap = LDAP (app, Mongo) app. Secret_key = "welfhwdlhwdlfhwelfhwlewfelwehflwefwlehflwfwlefjfhwfjfwlehflwefhlwefhlewjfhwelfjhweflhweflhwel" ap.ed_url_url ('/ login', 'login', ldap.login, methods = ['gET', ...

hashrocket - javascript object in rocket syntax -

I want to get value from this hash in Java: hash = {: hash . User_authenticated] hash ["user_authenticated"] hash [: user_authenticated] Nothing works, I get this error: SyntaxError: Invalid property id Javascript objects did not express the rubbish ashes on rocket cement Can go. Like ECMAScript 6 is adopted, Javascript implementation has the same symbol for anonymous function definitions ; = & gt; , although they are referred to as arrows instead of hash rockets instead of fat arrows Does. For simple tasks, there is no difference between the definitions and arrays with the arrow syntax and the traditional functions. var foo = function (s) {return s.toString ()} and function fu ( S) are equal to {return s.toString ()} : var foo = (s) => {Return s.toString ()} Additionally, these are equal to both: var foo = (s) => S.toString () Also: const foo = s => However, while using this , selection between traditional a...

ios - How to mark conversation or message to be unread in a messaging app using ios7 and parse.com? -

I am creating a messaging app for iPhone using parses as my backend and I am sending messages to the inbox view How can I mark (no message view) because there are unread messages here? But I want the receiver to see it and not the sender ... Since push notifications are not always reliable, I should get a way to find out that the user has an unread message in some conversation threads. Any input is highly appreciated. Edit: I have two classes, a conversation class that holds an array that keeps messages in the message class. This set up was thanked by the stock overflow member some time ago. I have not tried to code any code here ... I do not even know how this will work ... I am trying to have new messages if I have So to flag the conversation, apply a method with my current setup, I thought about adding a column that indicates new messages inside this thread, and depending on it, I could possibly change the color of the cell in the inbox. I have this flag set, but then it...

javascript - jquery calculations. Multiple div totals and grand total calc -

I'm trying to calculate the value * input value for many div, but not to ensure that How to do (.each) with? ??) This is my bella: You can see that I have commented on the part that is not working properly with it: & gt; // HAVING Trouble here !!! $ ('Total p span') each (function () {$ (this) .html ($ ('total p span'). Nearest (". Info") .html () * $ ('total p span' ). Nearest ("info"). (Find 'ticket input'). Val ());}); Most of the parts have to work well, when you keep some integer in different input fields and choose a different radio button, the individual calculations are closed. Especially because I have very limited knowledge of .each () or coping in calculating the specific things of specific things in each object. I know that this was not clear, originally there is a problem running .each () under // right here. Also, if anyone can guess this answer for me I could not reproduce this bug for any rea...

android - How to handle "keyDown" events that occur when options menu is opened in Google Glass app -

I want to prevent users from being able to take a picture with an external camera button on Google Glass inside my app. I am currently holding any camera button event in my main activity by overriding the "onKeyDown" method. However, I found out that if a Google Glass option menu is opened within my app, when the user needs to select a menu item (for example, when the method "OpenOptems menu" is applied), the main avents My activity is controlled separately, and the user can accidentally take a picture. Is there a way to capture key-down events inside the Options panel? Is there a way to gain access to "view" which has the options panel, and adds another listener to it? I have seen this scene trying to get through the "Create Panelwell", but this method is still empty. Alternative options for me are to override the creative view and create my own custom panel view, but I have a solution that avoids it and lets me add an onDowndown lis...

python - read a text file and interpret the data -

I have to write a program that reads in a text file named "terms.txt" and then changes the file and It prints it with reference to the first page number. This is what the file looks like: 3: degree 54: connected 93: impending 54: top 19: side 64: neighboring 72: path 55: at least on the route 127: Tree 99: Spread Trees 19: Path 28: Connected 3: Degree 55: Graph 64: Approx 44: Width First Search 77: Neighborhood 55: Degree 55: Depth First Search 19: Degree 27: Neighborhood 16: Tree Tree And after running through the program, it should do this: imminent, 64 at 9.3 o'clock ago, 44 ​​added, 28, 54 degrees, 3, 19, 55 Deep search before depth, 55 edges, 19 graphs, 55 neighbors, 27, 64, 77 paths, 19,272 minimum routes, 55 spreading trees, 16 trees, 127 trees, 127 tops, 54 Right now, I have it and this page is printing a list of numbers and a list of contexts ... I'm not sure where to go from here to the file in the file: ==] = [] File = open ('terms.txt...

javascript - ui-router in ionic framework issue -

I have a problem getting my routes to match with my ideas I have the following routes: / P> .state ('tab.account', {url: '/ account', abstract: true, views: {'tab-account': {templateUrl: '(' Tab.account.order ', {Url:' / order /: id ', view: {' order-view ':}' order-view ': {Template URL:' Template / Order-View HTM ', Controller:' Order Controller '}} }) I have this templates / tab-account & lt; ion-view head Logic = "Account" & gt; & lt; ion-content class = "has-header padding"> account & lt; / h1 & gt; & lt; h2 & gt; your order & Lt; / h2 & gt; div class = "card" ng-repeat = "booking in booking" & gt; div class = "item-text-wrap"> gt; & lt; b & Gt; & lt; a ng-click = "view order (booking.id)" & gt; {{booking.carpark.city}} & lt; / a & gt; & lt; / b & gt; Lt;...

c# - ASP.Net Print PDF directly to Printer With Preferences -

I am working on a project for which we need to send a PDF to the printing press. We have done this before with a desktop app and acrobat, but I would like to switch to an ASP.NET app, to give us more flexibility about what the device is using the end user (only any For the user is working well to send PDF - Printer prints documents, decent quality, etc. I have found that there is only one issue, that Hama The files may need different printer configurations - like someone might have to add a booklet, while the next can not be done. We previously set them up in pre-configured drivers (i.e. "MyPrints 1" set in the booklet Has been "MyPrinter 2" - both point to the same physical printer). Sending raw data, however, seems to ignore them, I'm assuming that this Some header data is not included, or something like that; I have not got any information about how to add it. I am open to other methods I have tried GhostScript, But it throws errors about files PDFS...

java - How to use a lambda expression to pass a method as a parameter when calling another method? -

Say I have two ways different from zero fee (integer zodiac, difference account) and Zero ChargeCompany (int sum, int account) . Say I have another method which is called zero processale (string item, customer C) . What can I do, I can either pass in-charge person or chargeToCompany as the argument for the processSale and I can How do I call? if (IG (some customers)) {PROCESSIAL (one item, some customer, charge to individual)} and If (iCompany (some customers)) {processSale (anItem, some customer, charge, customer)} and inside processSale () how will i actually call chargout person or chargeToCustomer () ? You have two functions: zero charge (Int amount , Int accounts); Zero Incharge Companie (integer amount, int account); What is their likeness that they take both the two int parameters and do back zero . There is no functional interface in java.util.function that matches this size but it is easy to define ourselves: interface IntIntConsume...

Java - convert buffer to string (economical way) -

I read something to buffer: char buf [] = new cell [4096]; Int found = Reader. Reid (Buffet, 0, 4096); readLine () is not okay because the stuff can contain "\ n" characters. Then I want to convert the Buff [] to string. String.valueOf (buf) size will be buf.length () == 4096 and will eventually include junk. I need a string of shapes found There are 2 distorted ways to do this first way - create new array of sizes found , copy the byte to a new array and string Valveoff Another way - to add four axes to the string, add the string by adding letters. Is it a better way to avoid odd actions? / Blockquote> You can use the String Constructor (buf, 0, found); Sample code: four buffs [] = new four [4096]; Buf [0] = 'one'; Buf [1] = 'b'; Buf [2] = 'c'; Int found = 2; String s = new string (buff, 0, found); Println (s); // ab

iphone - iOS XCode getting IDEPseudoTerminalDomain error 1 -

I am trying to prepare an app for iOS using XCode. The app works fine on the iPhone simulator but throws the error "IDEseseudoTerminalDomain Error 1" before running it If I try to run everyone on the iPad simulator, then it does not exactly open the simulator. Can not do the operation? (IDEPseudoTerminalDomain Error 1.) Please tell me why this error is coming and how to protect it. Thanks in advance. By doing this try increasing the maximum number of pseudo terminals Do: sudo sysctl -w kern.tty.ptmx_max = 999 To permanently make permanent changes from the current terminal session, do this: Sudo Touch /etc/sysctl.conf sudo chown root: wheel /etc/sysctl.conf sudo chmod 644 /etc/sysctl.conf echo "kern.tty.ptmx_max = 999" | Go to bartoszj on Sudo tee -a /etc/sysctl.conf credits

sql - JOOQ: Result.getValues() returns list with null entry -

I have a many-to-do interrogated several relatives and to map the many results of an entry in an object the wanted. To do this, I bring results into groups by using a unique identifier and extract the required data from each grouped result. For many-to-many data, for all the available values, general data, I only get access to the data of the first entry: Maps & LT; String, result & lt; Record2 & LT; String, string & gt; & Gt; groupedResults = create.select (LOC.NAME, GROUP.GROUP_) .from (LOC) .leftOuterJoin (LOC2GROUP) .on (Tables.LOC2GROUP.LOC_ID.eq (LOC.LOC_ID)) .leftOuterJoin (Group) .on (LOC2GROUP. GROUP_ID.eq (GROUP.GROUP_ID). .Fetch () InGroups (LOC.NAME); Collection & lt; Loc & gt; Rate = New Arrestist & lt; People & gt; (); (Results from & lt; Record2 & LT; String, String & gt; & gt; Results: groupedResults.values ​​()) {loc. Loc = new loc. (Result.getValue (0, LOCATION.NAME) , Result.getValues ​​(Tables.GROUP.GROUP_))...

Python / Tkinter keep window in back -

In Python with the Typnator, if you use the command: somekapp Overrreadyirect (True) This will create a typical window which has no boundaries from the window manager. However, at least on my window system, the tanker window then stays above all the other windows. Is there a way to send a typewriter window back in a way so that it always remains below all others, some system window manager decides which window is top or bottom? You can resign from your services by using overrider (true) - on some systems it is not a drawing border, which runs up / down (maybe not a fresh window) , Do not send any events (key pressed, mouse move). I think you can not do anything with this using Tkinter or even pure Python. Maybe other modules could do something.

c# - Check if 2 Types are the Same -

I have an object of an unknown type. I am trying to see if it is a special type. I have tried: obj.GetType () == type (object) and obj. GetType () .tostring (). Equals (typef (oz). Ostring ()) But none of them works. How can I see what this is is an object of a particular type? I need to know that this is the exact type, not superclass / subclass of that type. In the Windows Phone 8.1, I am trying to see from which class the sender was sent. You were very close. If you want to see that an object is of type of widget type, you will check in this way: if (thisObj.GetType () == type (widget )) Objects should be ok are checking for. If you are searching for any lineage subtype, you can use syntax easily: if (this is the oz widget) (When you are trying to find out who is the event sender, the second creation is probably more useful)

Using a QCompleter in a QTableView with Qt and Python -

I'm reading, and it looks very straightforward. But how can I set up an editable cell to use QCompleter? Do I have to tell it to QTableView to use the QLineEdit widget in any way? How can I do this? Edit: Hmm, I think there is something with it, but I do not know anything about it or how to use them. In Edit: I like to try to solve the RobbieE, is something that works, but it is the geometry of the wrong popup combo box and dragon crashes when I press Enter class CompleterDelegate (QtGui.QStyledItemDelegate) .: def __init __ (self, parent = none, CompleterSetupFunction = no): Super (CompleterDelegate, self) .__ init __ (parent) self .completerSetupFunction = completerSetupFunction def createEditor (auto, parent, option, index): Return QtGui.QLineEdit (parent) def setE ditorData (Self, Editor, Index): Super (CompleterDelegate, self) .setEditorData (Editor, Index) self._completerSetupFunction (Editor, Index) I _completerSetupFunction looks like this: def setupFun...

android - How to attach an image from an app to gmail -

Text after "div class =" itemprop = "text"> The application to take a picture and attach it to the screen and attach to the second screen, 1 button on the 2nd Gmail Photo on; Send it to someone I am using this code for the second button View public void onClick (v) {// TODO Auto-generated method stub Intent intent = new Intent (Intent. ACTION_SENDTO, Uri.fromParts ("mailto", "test@gmail.com", tap)); Intent.putExtra (Intent.EXTRA_SUBJECT, "test"); Intent.putExtra (Intent.EXTRA_TEXT, "text"); Intent.putExtra (Intent.EXTRA_STREAM, imageUri); StartActivity (Intent.createChooser (meaning, "Choose an Email Client:")); } But this does not attach the photo to Gmail. It may be wrong here is the rest of the code. The public class increases the main activity activity {Private Static Ent TAKE_PICTURE = 1; Private Uri image Yuri; @ Override protected void saved create (bundled Instansstet) {Suprknkret (saved Insten...

java - Using Gson to elegantly handle nested json objects? -

I am using GSS to parse responses from a server on Android. In every response I have some useless data (for me) that makes my GSN model complicated. Here's back in the general hierarchy of Jason: Feedback: {date: 1406253006807, other users1: "This is some useless data", other Useladata 2: "This is some useless data ", Useful JasonObject: {& lt; ---- It really is the object that I care about}} Everything could be done without the usefulJsonObject at the same or the same level. The waste data is returned for every request, and the actual response is given as useful JasonObject , this will not be a big problem, but it is actually closing down my GSN model objects is. For example: Let's say I have 3 requests that I can do: A, B and C for each response me less Need to create less than 3 custom squares. Public class ResponseA {@SerializedName ("response") ResponseObjectA responseObject; Public Static Class Answer ResponseObjectA...

cocos2d x 2.x - Error with Spine Atlas file -

I am using cocos2d-x 2.2.3 and spine 1.9.07. I have exported "Vendor" ATLAS "", "Vendor Jason" and "Vendor Page" by Spine and put them in the Resource folder of my project. Then, in the init () method I add these codes to use the skeleton animation skeletonNode = CCSkeletonAnimation :: createWithFile ("spine / seller.json", "spine / seller Atlas "); SkeletonNode-> Debugslots = true; Skeleton-gt; Timezone = 0.5f; Skeleton-gt; Set animation ("walk" is true); SkeletonNode-> DebugBones = true; CCSize windowSize = CCCCRR :: Shared Directive () - & gt; GetWinSize (); Skeleton-gt; Setposition (CCP (Window Easy / 2, 50)); AddChild (skeletonNode); but it throws out an error like this: zero ccobies :: release (zero) {CCAsert (M_URFrance> 0, "more in reference number Must be 0 "); --m_uReference; If (m_uReference == 0) {delete it; }} This means that the blanket is taped, so it should be so...

Git Pull command really do -

I'm just confused, what does GIT actually do? I have a local branch with the latest code repository, and drag the GIT that meets a new file test.txt (remote), but this is not the latest code repository, whether it overwrites all the files in my local branch by remote Does the cast? git pull a git fetch after that A git merge FETCH_HEAD . It does not replace the code of your local branch.

how to return Custom Json in http 404 ASP.NET Web API -

WebApiConfig.cs सार्वजनिक स्थिर शून्य पंजीकरण (एचटीटीपी कॉन्फ़िगरेशन कॉन्फ़िग) {config.Routes MapHttpRoute (नाम: "DefaultApi", मार्गटैम्प्लेट: "खोज / {नियंत्रक} / {आईडी}", डिफ़ॉल्ट: नया {id = RouteParameter.Optional}); // JSON प्रतिसाद सेटिंग config.Formatters.Clear (); Config.Formatters.Add (नई System.Net.Http.Formatting.JsonMediaTypeFormatter ()); config.EnableSystemDiagnosticsTracing (); } उत्तरकंट्रोलर.cs सार्वजनिक वर्ग जवाब नियंत्रक: एपीआई नियंत्रक {[एचटीटीपीगेट] सार्वजनिक एचटीपीआरपीएसपेज संदेश प्राप्त करें () {...}} और मैं नीचे json रिटर्न कस्टम त्रुटि कोड लिखता हूं: 401 बुरा अनुरोध - {मेटा: {code: 401, msg = 'invalid params'}} मैं 404 HTTP स्थिति के लिए जेसन रिटर्न कोड लिखना चाहता हूं। मैं कहां लिखा? नियंत्रक वर्ग? webconfig.cs? ग्लोबल.एएसएक्स? इसलिए आपके पास उस कोड लिखने के लिए कुछ विकल्प हैं: आप एक वैश्विक फिल्टर जोड़ सकते हैं जो कि OnError स्थिति को संभालता है, और उसके बाद उस फिल्टर को उचित JSON प्रतिक्रिया वापस आ...

c# - ERROR : make sure that the maximum index on a list is less than the list size -

यह मेरा कोड है निजी शून्य बटन 1_Click (वस्तु प्रेषक, EventArgs ई) {string To_date = dateTimePicker2.Value.ToString ("yyyy / MM / dd"); Console.WriteLine ( "एक"); स्ट्रिंग [] नाम = नया स्ट्रिंग [3] {"015", "017", "005"}; के लिए (इंट आई = 0; आई & lt; name.Length; i ++) {Console.WriteLine ("नाम है" + नाम [i]); कॉनरडेट (to_date, name [4]); } Label9.Text = "अब संसाधन ... कृपया प्रतीक्षा करें"; label9.Refresh (); Console.WriteLine ( "डी"); } सार्वजनिक शून्य conairdata (स्ट्रिंग to_date, स्ट्रिंग नाम) {Console.WriteLine ("e"); स्ट्रिंग पथ = "एच: \\ सेंट \\ कॉन \\ टीबी \ mdata" + + नाम + "। Rpt"; // nofcol और nofrows हमारी टाइल सरणी int nofcol = 0; Int nofrows = फ़ाइल। रीडलाइन (पथ)। देश (); स्ट्रीमरिडर sReader = नया स्ट्रीमरिडर (पथ); स्ट्रिंग लाइन = sReader.ReadLine (); स्ट्रिंग [] टाइल नहीं = पंक्ति। नमूना (','); Nofcol = टाइल नं। गणना (); मैं 'एच: \' ​​ड...

python - using a dictionary to cut down a list of tuples -

I am trying to use a dictionary to reduce a list of tuples, the starting point is shown below I have also included a dictionary - the dictionary has the values ​​that I am trying to use to cut the list of my tuples start = [('Brian', ' ('David', 'Lucy')] DIC = {'Brian': 4.9, 'Lucy': 7.5, 'David': 8.0} ( In the case of the dictionary, the value should be removed) In this case the desired output will be [('David', 'Lucy']] B / C The full value of David - Lucy = 0.5 Try my (unsuccessfully) to solve my problem in the category (0, Lane (start)) end = []: If stomach (DIC [Start [I] [0]] - DIC [Start [I] [1]]) & Lt; 1.0001: End. Any help would be greatly appreciated = "Text"> Understanding a list can help you. for e (o, o) o -1 if at first -1 if the lt; Dyke [E] -dic [o] & lt; 1]

c++ - dynamic bitset initialized and called from other method gives segmentation fault -

I am initializing a dynamic bitset in a class constructor and then filling it with some values ​​that square Call a method of: I get a split mistake, it does not matter what bitset I want to use. MyClass :: MyClass () {boost :: dynamic_bitset & lt; & Gt; Occupation (200000); // all 0 by default std :: cout & lt; & Lt; Occupancy.size () & lt; & Lt; "\ N"; Std :: cout & lt; & Lt; Occupation [1234] & lt; & Lt; "\ N"; Fill_occupancy (); } Zero MyClass :: fill_occupancy () {std :: cout & lt; & Lt; Occupation [1234] & lt; & Lt; "\ N"; } The printer prints 200000 and 0 correct output, but when entering the fill_occpancy method, it returns a siffault. I checked it, but I do not think it is applicable, BC produces bits properly because I see the correct output from the constructor. I have found a way to do this work if I just use method__bitset type & gt; & Gt; And then call it to fill it...

Google Drive API Share event -

I have an application that provides protection against encryption. One of my clients requested that they add the capability of their Google Drive to protect the documents after downloading them from their account. The scenario is as follows: - My customer uploads files to my Google Drive account (documents, Excel sheets, etc.) - My client invites their colleagues to invite shares - my client can view the associate files online, and download the file. You can. - When my client's colleagues have tried to download files, I have to capture a download event, have to secure the file and then continue the download process. I search everywhere, but I can not even answer it. As long as they are not downloading files through your application, you can not stop the requests in this way. Your only option is to protect it in the drive before sharing / downloading them.

file - What is the best practice using Android Logger -

I am new to Android, I'm new to Android, please help me know about the best practice to use Android logger File should be placed in Android and should be logged in, or it is not necessary to write logs in the file. What could be the best practice. This is my real intention: once we are live, our customers come back and tell us that if something has crashed or is not working in our Android, then how do we debug We do? In the web application, I will ask my server administrator to provide the log file. When there is no server error, what do we do with the Android application, but some phones failed. There is no way to get the logs from the phone. Thanks Sun Depending on the requirement of you, Debugging requires logging, with it you can easily use the build log functionality. You can view logs through logs. // Tag a tag string = "some activity"; // Log Log D. (Tag, "Hello World"); // debug log.e (tag, "hello world"); // Error If you wan...

bash - Can the Unix/Linux shell be considered an Operating System in addition to a programming language? -

When comparing it to DOS it seems that its similar functionality is more, therefore, I was thinking whether I Shell or bash like shell can be considered equal to DOS and it is considered to be a type of operating system. Or are these words mutually exclusive? Besides, what is interpreting all my orders in the Assembly language? If the shell is a programming language (a scripting) then when you create a program in C, you are still executing them using commands through the shell (i.e. script), so I It seems that you are starting an obstacle at this point, which limits a slight movement against a non-script mediator. The defined attribute of an OS is that it manages your hardware for you. The shell does not do this, the kernel does. Since you have brought DOS, it is equivalent to shell command dot com , command interpreter. DOS "Kernel" msdos.sys , io.sys , ibmdos.com or choice of DOS Ibmbio.com was found in , depending on your taste. According to the s...

asp.net - jquery Autocomplete does not show float datatype values -

I am retrieving some multi-column data in my jquier autocomplete. Everything is working fine but the problem is autocomplete, only showing values ​​that do not have float or double value. For the past, if the product name is jquery 2.0, then it only recovers (or show) only 2 jquery. I tried to format this kind of query of my web service as a format (product name, '0.00'), product code, productive from Sreep as product ratio, packingname As a product code, format (& amp; "ProductName @SearchText +"% '), format (sales rate,' 0.00 '), but nothing changed. What changes do I need to make, please help, thank you in advance! Here is my jquery code

Facebook share og:image can't load larger size image? -

I am using the Open Graph for Facebook sharing but I have a question about sharing. If the pictures are too big, Facebook can not read the picture in the page. I had added the sentence given below in the page, and the debugger was successfully loading photos in the table but this is not shown in the stock dialogue. & lt; Meta property = "og: image" content = "http://c.glassbean.com/images/uploads/abc.png?t=1" /> Is there a size limit in this situation ?? (Picture 1800-2500 x 1400-1700 px) thanks Try the full image example so you can customize the dimensions: & lt; Meta attribute = "and: image" content = "http://example.com/Ogp.jpg" /> & Lt; Meta attribute = "and: image: safe_arnal" content = "https://secure.example.com/ogp.jpg" /> & Lt; Meta property = "and: image: type" content = "image / JPEG" /> & Lt; Meta attribute = "and: image: width" c...

wxwidgets - Event Table and Connect -

By curiosity, I have announced an event table in a .cpp file, is it possible to use connect in it Is the cpp file on other function calls? Yes, of course, why not. It is possible to use both the incidence table and connect () or bind () for the same object, and when it is not recommended, because it can be confusing, Work in a well-defined way: First of all, dynamic (i.e. connected or linked to related function) is considered event handler and if any of them handles events, then search with event table entries will continue. Staying Is.

struts2 - Displaying total number of sub groups in a group -

After text "itemprop =" text "> I am using struts2 jqgrid if i use there a way in which i show the number of sub groups in Want to know a group For example -grp1 Total records 8 total sub groups 2 + subgrp1 total records 4 + subgrp2 total records 4 -grp2 total records 6 total sub groups 1 + subgrp1 total records 6 + grp3 total records 6 total sub groups 2 How can I display the number of subgroups in a group I Total records 6 can be obtained by using the total records: {1} How can I not seem to get a total of the sub grid After Thanks for Oleg, my problem is solved and the solution is Function groupFormater (cellval, does not, rowObject, action) {var groupIdPrefix = opts.gid + "ghead_", groupIdPrefixLength = groupIdPrefix.length, name = {}, data, i, l, item; If (opts.rowId.substr (0, groupIdPrefixLength) === groupIdPrefix & amp; amp; amp; amp; typeof operation === "undefined") {data = $ (this) .jqGrid ("getGridPa...

python - How to limit number of Linux processes spawned per minute? -

My application needs to interrupt any fork bombs created by Python / Bash. I use the ulimit program that determines the number of processes per user. Can someone suggest me how can I limit the number of processes, instead of per minute , per user? There is no default way to determine the number of processes per minute. As you said, the limit will be for each user instead, instead you can work around, ps -aux | Wc -l With this you can give the number of processes currently running. Write a script that will continuously check for every minute and update the result.

Ember.js + JQuery-UI Tooltip - Tooltip does not reflect the model / controller changes -

context I have a small amber app, which among many other things, And, when hovering an element of the page, their names appear as a list. Everything, it works very well. The application drages data from one endpoint to every two minutes, because the backend does not allow data to be pushed The content of the tooltip is calculated in the Controller, with a function that is in the original form According to the context, the string combines in different ways. So this & lt; Img & gt; The data attribute of is bound to the tooltip, when the view is ready and didInsertElement is removed, the tooltip will have this data-bindet value Is generated on the basis of (if necessary). Question When new data is pulled from the backend, except the tooltip content, everything is updated accordingly. (When browsing the DOM of a page, the data-bindette value is also updated.) What can be the reason for not refreshing the tooltip? Does not it re-calculate JQuery-UI? Some ...

javascript - Backbone script to read from external JSON -

I want to display data from JSON using a backbone script. This is the html page: This is my Jason data: document.json [{"id": "p1", "name": "aaa", "title "", "Background": "FFFF"}, {"ID:" "P2", "Name": "DDDD", "Title": "EEE", " "Id": "P3", "name": "GGGG", "title": "hHHH", "background": "IIII"}] Giving page Am I missing something? I am trying to get printed JSON data on the div element in the specified HTML. But nothing is being displayed, I tried to debug the code, I could insert a warning statement inside the backbone.model.extend in the document .ready in jquery Am But when I made a vigilant statement inside it, it is not coming. Therefore, the code should go wrong somewhere within backbone.model.endend./ . Does anyone help me? You need to ...

android - onCreateOptionsMenu for imageview -

I am an Android app that tablet I have a Gridwuv a view pager I I want to do this, I want to add a menu to imageview like Google in Gridview Please refer to this image for reference I have to keep it Try Div> You must use PopupMenu : a Popapmenu setup is required to pay as an anchor + menu recourse to specify which will be used here of course it is a OnClickListener to view it . anchorView.setOnClickListener (new OnClickListener () {Do @Override on public void (views) {Popapmenu Popapmenu = new Popapmenu (reference Ankrviv); Popapmenu Ksetonmenuitemkliklist (new Popapmenukonmenuitlklilistr () {public boolean Prmanuitemklik (Menuitm item) {switch (Aitet. Aitimaidi ()) {case Arkaidkaitim_on: // item one click return true; case R.id.item_two: // item Click returns True;} Mr. false;}); Popapmenu. (. Define a standard Menu resources - this is your popup_menu.xml : Menu xmlns: android = "http://schemas.android.com/apk/res/android" & gt; ...

c++ - Using new standards -

I have been told (properly or incorrectly) that I used many older standards of C and C ++ should do. For example, in Uni module I did it on C. This year, we had to use ANSI C (which I believe is C8 9?). The second time I was asked to use the C 99. Every time I have been told any of these, the reason for this is that due to the new facilities, C11 is not safe to use, which can not be supported by every compiler etc. (I'm not a huge expert on this, so this explanation would be great). I think a standard still is not widely used after 3 years of its release. Are these people wrong or is it a bad idea to use CA11 and C ++ 11? Neither, both ... are made of heritage. No You should use the latest tools available on your platform and it is compatible with other elements of the system. New equipment allow for "better" programming, safe programs, more concise programs, etc. Yes You should use the old tool, okay, very simple, there is a lot of work to do. Some of ...

Getting derived class name statically in python -

I can apply to how to achieve stable method get_class_name () expected results. I need to get a Instaling without the name of the class (I know it can be done with an example) Python version 2.6 class Base_class (): @staticmethoddef get_class_name ():. Return & lt; ?? & Gt; Class sub_classA (base_class): pass class sub_classB (base_class): pass print sub_classA.get_class_name () # 'sub_classA' should print sub_classB.get_class_name () # should print 'sub_classB' Print base_class.get_class_name () # 'base_class' should print instead of a make classmethod : class base_class (): @classmethod def get_class_name (CLS): return cls .__ name__ class sub_classA (base_class): pass class sub_classB (base_class): Print sub_classA.get_class_name (pass) # - & gt; Sub-class one print sub_classB.get_class_name () # - & gt; Sub_classB print base_class.get_class_name () # - & gt; base_class Of course you do not need a function / method ...

javascript - click event not firing in IE11 -

I have this JS file: function firecrack (node) {if ( Document. CreateEvent) {var evt = document.createEvent ('MouseEvents'); Evt.initEvent ('click', true, incorrect); Node.dispatchEvent (evt); } And if (document.createEventObject) {node.fireEvent ('onclick'); } And if (click on node type == 'function') {node.onclick (); }} Select function avatar () {var fileSelector = document.createElement ('input'); FileSelector.setAttribute ('type', 'file'); FileSelector.setAttribute ('Accept', 'Image / GIF, Image / JPEG'); FileSelector.onchange = function (event) {var fileList = fileSelector.files; //alert(fileList.length); If return (fileList.length == 0); Reader.readAsDataURL (FileList [0]); } Var Reader = New FileReader (); Reader.load = function (e) {var dataURL = reader.result; // warning (dataURL); Var Container = document.getElementById ("avatart-container-div"); Var backgroundIMgString = 'url (...

javascript - Prevent parent event fire on Jquery -

I have a lot of trouble in my code. When I change a checkbox status, the click event also fires in the form of parents as I have tried various ways to solve this problem: event.stopImmediatePropagation (); event.stopPropagation () event.preventDefault (); Return false Unfortunately, no one does the work (probably not related to the "Event Widening" issue is). HTML & lt; Div class = "sortable" & gt; & Lt; Span & gt; Hello All! & Lt; / Span & gt; & Lt; Br / & gt; & Lt; Label & gt; Click me & lt; Input type = "checkbox" check = "check" /> & Lt; / Label & gt; & Lt; / Div & gt; jQuery $ (function () {$ ('. Sortable input [type = checkbox]'). ( Event (events) {event.stopImmediatePropagation (); event.stopPropagation (); event.preventDefault (); Warning ('checkbox changed');}); $ ('. Sortable') Click (function () {warning (...

c# - How to parse this json in List? -

I am developing a Windows farm in Framework 4.0. I am using JSON.NET I have the following json in the string variable. I have 10 classes in JSO. How to parse the following JSN and convert it to list [ "{{" Id ": 1," OEPTitle ":" Algebra "}, {" Id: "," ClassUrl ":" Engineering Soviser 12014A "," OepTital ":" Engineer "," Subject ": {" Id " "Engineer", "OEPTitle": "Mathematics"}], "Earsquaked": True}, {"Classroom": 7, "Classroom URL": "Engineer 2014 A", "OEPTital": "Engineer", "Subject": [ {"Id": 1, "otitillate": " "Class": "engineer, 22014A", "OEPTITAL": "classified": "", "octetal": "mathematics"}} "{{"} ": {" class " ["Id": "," "topic...

javascript - Multiple prompts with nsIPromptService -

Can we show several prompt windows with Firefox Adon SDK? I was looking at promptUsernameAndPassword () and I want to ask the user a prompt and selection dialog in the same box. How can this be achieved? Use either nsIPromptService if this is your Or create, which is not, of course, no actual dialogue. Or apply your own XUL dialog, (which is not easy at all).

c# - Upload files in RadAsyncUpload control from CodeBehind -

I would like to know whether the files are possible in controlling the codebihund in RedSync Upload. Instead of pressing the RadSyncUsload control select "button" and selecting and uploading files, I would like to upload a list of files in a directory from CodeBeHand to RadaSyncEnload control. If we can upload files from the file backwards, is it possible for me to show a demo? Please note, I have RadSinkload control as a registered user control in a page. Thank you. Uploading process via codebihind is not allowed. RadaSync is based on upload, which allows only uploading the file from the customer's machine to the user, selecting a file from his machine and uploading the input element through the selection file dialog.

android - Gradle dependencies update -

One advantage of using griddle in Android studios is that it helps in dependency management so if I use my Build.gradle file, then how will I force it to update the dependency version when a higher version is available? Some dependencies in my build.gradle are specified as dependency {compile project (': facebookSDK') compile files ('libs / picasso-2.1. 1.jar files) ('Libs / crouton-1.8.1.jar')} The advantage of the use of griddle in an Android studio is that it helps in dependency management. The way you are using it. So if I used a special version of a library in my build.gradle file, how do I force it to update the dependency version after having a higher version available? In your case, you download a new jar, put them in lbs / , and match your build.gradle Update. A favorite is the approach to removing those jars and for changing your two files details that depend on the reserves of Maven Central or any other artwork Pull down ...