Posts

Showing posts from September, 2010

java - Vaadin 6.8 create chart with vaadin add-ons -

Hope you are doing awesome at the end but I need a little help. I am working on the Vadain Portlet and I need to make a Vaideen Chart (sample). I downloaded the required jar (Vadine-chart-vadin6-1.1.7.jar and G.SN 2.2.1.Jer) and made it as an application given below: < code> @SuppressWarnings ("serial") public class extends UserloginchartApplication application {public zero init (windows) = window (new window); setMainWindow (window); Chart chart = new chart (chart type .bar); window.setModal (true); window.addComponent (chart); }} After compiling and deploying on the Tomcat server, I get the following error on the UI Implementing com.vaadin.addon.charts.Chart on the widget Is not included, check your @Centlivet Mapping widgetset GWT module description file and compile your widget again. If you have downloaded a Waideen add-on package, you would want to refer to the add-on instructions. Unrendered UIDL: -United UIDL-com.vaadin.addon.charts.Chart (A Client Imp

python - Write data to excel template -

I need to create some Excel tables, but these tables do not look like simple, there are some pictures, some special fonts etc. . But complex parts are stable, it always means the same. So I thought, I will create an excel-template with these difficult parts and then the python just insert dynamic data in this template. I am working with the framework of Pandas, but I could not find a way along with this framework or without it. Any thoughts? This is not an easy way to do this with any normal "direct file manipulation" libraries in Python (Xlrd, xlwt, xlsxWriter, openpxl; these are the ones that use panda) The reason for this is that the structure of a workbook file is such that it is impossible or prohibitively difficult (depends whether you .xls or talking about xlsx) To do anything like "in-place" editing, Implemented Excel lack self. So whatever you are trying to do, your best option is to work with Excel. (I'm assuming that you can run excel b

java - Call getFragmentManager() without extending Fragment -

I have a class that should handle databases in my Android app when the database changes, then I display information from frogment I want to update the piece to do. My approach has been to give a tag to the piece and find the piece with the following code: FragmentManager manager = getFragmentManager (); Piece slice = manager.findFragmentByTag ("schedule"); If (example of a piece of timetable) {ScheduleFragment fr = (ScheduleFragment) piece; Fr.scheduleUpdated (); } However, as long as my database class is not an extension of the piece, the compiler is refused to recognize getFragmentManager () . There is no point in expanding this section for me, because the database class is not a piece, but there is a simple helper class for managing the database. Is it possible to get reference to my piece without expanding the piece? Or is it bad behavior and should it be done in any other way? Besides, is it possible to get reference to the piece from a static method? T

how to pass data from python to an HTML page -

I am currently working on a program in Python that keeps track of many builds. This progress is given in an HTML file which is currently deleted and I have been re-written with new data to update it. Although I know that this idea is not an approach, although I have never worked with HTML web pages at any degree. But I want to make it right, but every time I search for something, I just have to get data from the HTML page with a program. So whatever I am asking is some guide lines that I need to see how I get it. There is also a suggestion as to how the right approach will be. I have to pass the data on the html page from my running Python program. If advertising can be lucky that someone posseses a very simple example exsample. Just like a dragon can ever be on a text box or any html page. #! / Usr / bin / python3 __author__ = Urlib import request 'adan' goog_url = 'http://real-chart.finance.yahoo.com/table.csv?s=GOOG&d=8&e=2&f=2014& g = d

C++ sizeof operator before and after extending -

अब मैं C ++ sizeof ऑपरेटर के परिणाम का परीक्षण कर रहा हूं: < कोड> वर्ग एस {}; वर्ग ए: सार्वजनिक एस {आभासी शून्य मज़ा () = 0; }; वर्ग बी {}; वर्ग सी: सार्वजनिक बी, सार्वजनिक ए {}; int main () {cout & lt; sizeof (ए) & lt; & lt; endl; // परिणाम 4 cout है & lt; sizeof (सी) & lt; & lt; endl; // परिणाम 8} लेकिन अगर मैं वर्ग के विस्तार को हटाता हूं: class A {virtual void fun () = 0; }; वर्ग बी {}; वर्ग सी: सार्वजनिक बी, सार्वजनिक ए {}; int main () {cout & lt; sizeof (ए) & lt; & lt; endl; // परिणाम 4 cout है & lt; sizeof (सी) & lt; & lt; endl; // परिणाम 4} क्या कोई भी उन दोनों उदाहरणों में sizeof (C) के आउटपुट के अलग-अलग व्याख्या कर सकता है? क्लास एस सिर्फ एक खाली वर्ग है (मुझे पता है, sizeof (S) == 1 ), तो यह क्यों एक फर्क पड़ता है या नहीं A एक आधार वर्ग है? खासकर जब से यह sizeof (A) , sizeof (सी) ऐसा लगता है कि वीएस एक स्थिति से ठीक से संभाल नहीं सकता है जब एक से अधिक खाली बेस कक्षाएं हैं। आपके पहले उदाहरण

ruby on rails - Saving check box values to the database -

I allow users to group groups together using checkboxes in new and edit forms: & lt;% current_user.contacts.all.each do | Contact | & Gt%; & Lt;% check = group @contacts.include? (Contact)% & gt; & lt;% = check_box_tag "Contact []", contact.id,% checked & gt; & Lt;% = f.label contact.name% & gt; & Lt;% end% & gt; So far, I was able to use the following code to create a group: def creategroup = current_user.groups.new (group_prem) @ Contact = contact.fund (param [: contact]) @ group.contacts & lt; & Lt; @ Contact if @ group.Save ...... end To ensure that the checked values ​​are not added to a group during the update action I have a hidden tag form. & lt;% = hidden_field_tag ​​"contact []", "%" & Lt;% current_user.contacts.all.each do | Contact | & Gt%; & Lt;% check = group @contacts.include? (Contact)% & gt; & Lt;% = check_box_tag "Contact []", contact.id,

ios - Access GCDAsyncSocket read queue -

I am using GCDAsyncSocket Library for my iOS messaging app with twisted server in backend. Everything is fine setup and works fine, but I have learned about a specific situation when it does not work right. Therefore, my server is architecturally in such a way that when a user is offline, his message is cached on the server and when he is searched online, the server sends out all his cached pending messages once. Now, GCDAsyncSocket uses internal reading and written queues, so here, the pending messages sent by the server are queued by the read queue until they are representative method - (zero) socket Is read by: didReadData: withTag: Now, in my app, this delegate method processes incoming messages and displays them in one tableview one by one, hence the issue of problem is that when If you suspend app, you are losing all unrestricted messages in the reading queue, so to combat this, I want to reach the reading queue so that I can suspend the app before suspending it. So that

c++ - 2 dimensional array in pointers -

# शामिल हैं & lt; stdio.h & gt; शून्य मुख्य () {int a [] = {1, 2, 3, 4}; Int b [] = {5, 6, 7}; Int * p [2]; पी [0] = ए; पी [1] = और amp; बी + 1; प्रिंटफ़ ("% d \ n% d", & amp; पी [1] [0], पी [0] [1]); } यहाँ p पॉइंटर्स के एक 1d सरणी है, फिर कैसे एक 2d सरणी printf स्टेटमेंट में उपयोग की जाती है इसके अलावा आउटपुट 1 2 । सबस्क्रिप्ट ऑपरेटर [ ] सूचक संकेतों के साथ-साथ सरणी अभिव्यक्तियों के लिए भी परिभाषित किया गया है (जो सर्वप्रथम लागू होने से पहले सूचक अभिव्यक्ति में कनवर्ट किया जाता है)। अभिव्यक्ति एक [i] को * (a + i) के रूप में मूल्यांकन किया जाता है; a एक सूचक है, और a + i सरणी के i 'th तत्व का पता देता है ( पॉइंटर अंकगणित को इंगित-टू टाइप पर आधारित है; यदि a एक int को इंगित करता है, तब a + i मैं 'th int एक a द्वारा इंगित किया गया है)। तो संकेतकों की अपनी सरणी दी: int * p [2]; अभिव्यक्ति p [0] में एक सूचक प्रकार है, ताकि आप परिणाम ऑफसेट और डीरेफर जोड़ सकते हैं: * (p [0] + 1) , जो p [0] [1] लिखने के

windows - Batch script issue with the current directory -

I have used a batch file in which I am setting the full path variable below < Strong> code snippet (batch file: brk_validation.bat) SET ABS_PATH =% ~ dp0 echo% ABS_ PATH% assumed the values ​​of files Run the batch program at the command prompt: D: \ files & gt; brk_validation.bat. Verification of files completed Output: D: \ Files \ Problem: I have put the batch file in a separate directory and then the bat file is running after giving it the full path as shown below: D: \ Files & gt; D: \ work \ brk_validation.bat. Verification of files in Output: D: \ work \ Expected output: Validated the files contained in D: \ files \ I want the path where the files are present i.e. D: \ files for example above. So any help is appreciated. Thanks! / Code>

methods - Difference between }; and } in C++ -

New to C ++. Vocational on a project for assignment, and some examples found in end-ended methods with in i}}; Typical (expected)} instead of: Circuit buffer :: Circumbfer () {cout & lt; & Lt; "Named Constructor \ n"; Cout & lt; & Lt; "Buffer" & lt; & Lt; Buffer Size & lt; & Lt; "Elements \ n"; For (Int i = 0; I & lt; = Buffer Size -1; I ++) {Buffer [i] = 0; } ReadIn = WriteIn = 0; SetDelay (0); }; Thank you, Louise I am not getting any information why this will be done online < P> / div> that runs under that name; In the name space, an empty declaration is seen as your compiler in the code given above circuit buffer :: circuit buffer () {...} // & lt; - 'Circuit buffer :: Circbuffer' definition ends here; // & lt; - An empty declaration which declares nothing I.e. Law definition is actually }; does not end with the compiler's approach it ends with } , and ;

ios - How to get host's app object from app extension? -

I have a custom keyboard extension and I need to know when my keyboard has been shown / hidden I I read: register (empty) registerbookboard notification {[NSNotificationCenter defaultCenter] addObserver: self selector: @sillector (keyboard WasShown :) name: UIKeyboardWillShowNotification object: zero]; [[NSNotificationCenter defaultCenter] addObserver: Self Selector: @Selector (KeyboardValbHead :) Name: UIKeyboardWillHideNotification Object: Zero]; } // When UIKeyboardDidShowNotification is sent - (zero) Keyboard noise: (NSNotification *) An alert {} / when UIKeyboardWillHideNotification is sent - (zero) keyboard WillBeHidden: (NSNotification *) An alert {} But this code applies to the application. addObserver logic itself means that. So, to pass for register notifications, how can I get an object from my host app (this app can be any app with the field)? Or there are three other options that the keyboard has been shown / hidden? Even with the IFirstResponder extension

reporting services - Adding First Values Grouped by ID from record set; report builder 3.0 -

I have a dataset being returned in which there are monthly prices for different 'targets'. Goals have unique IDs and month / date values ​​will always be identical for goals. Sometimes the difference does not have value as the other target of all values ​​of the same month in a target because it can start at a later date, and I 'first' the results based on the initial statements 'consolidated' And I want to add them together. Each goal example will be dataset; Target ID Month Start Fill 1 1/1/2014 10 1 2/1/2014 15 1 3/1/2014 22 1 4/1/2014 30 2 4/1/2014 13 2 5/1/2014 29 What do I want to do 'first' (initial month / year) on the basis of value, these consolidated (summer) values ​​are displayed in each table The goal will look like a result; Start of the year Campaign 2014 23 This is because the 'first' value for the goal id of 1 is 10 and the target id of 'first' 2 The value of '13' is, but when I year (field! Mo

How to change data inside an mdf file in localdb -

My question is similar to this, but I do not have just "local" server with Microsoft SQL Server Express: I have a closed device that I need to export the data so that it can be imported with jerobvi in ​​web application. Instructions to download the "Microsoft SQL-Server Express 2012 LocalDB" I installed it and everything works fine, I was never asked to enter the DB name, username or password. Now I have to change some data inside the MDF file, but I do not know that I have never worked with any Microsoft SQL product. Originally a standard SQL console would be enough for me. In the linked question it was suggested to link this file into Microsoft SQL Server Management Studio, although I have been asked for a server name and can not connect to it Local Host. Can I add management studio to localdi? Or is there any way to execute ordinary SQL commands on an MDF file or what I can do? Mark B was right: Mark B was right: Both "Microsoft SQL-Ser

javascript - Clicking on One Button Cancels a Click Event of Another (Outer) Button in jQuery -

I have a post that allows users to comment, but the comment's textarea default Comments are hidden from the user comment button in the comment texture send and cancel buttons are cancel Hides the button textarea , but after that, clicking on the comment button does not work until F you do not refresh the page. HTML : & lt; Div class = 'post' & gt; & Lt; Div class = 'p_body' & gt; & Lt; Div class = 'comment_body_wrapper' & gt; & Lt; Div class = 'comment_wrapper' & gt; & Lt; Textarea class = "comment_content" rows = '2' maxlength = "480" name = "comment_content" placeholder = "your thoughts on this ..." & gt; & Lt; / Textarea & gt; & Lt; Div class = 'comment_buttons_wrapper' & gt; & Lt; Div class = 'comment_buttons' & gt; & Lt; Button class = "submit_comment btn" type = "submit" &

PostgreSQL, sum data from row of table? -

xabcd ---------- A 1 2 3 4B5 6 7 8C6 7 8 9 I want my sum to A = 1 + 2 + 3 + 4 and B and C, is there any command which can add a line of data to PostgreSQL? There is no such built-in function, but you can just do the following: < Pre> select x, assuming that the data type of a , b , c and d are numerical.

c - How do I subdivide a triangle in three dimensions? -

I have a function which takes 3 digits and I will use these points to draw a triangle, like I The glVertex was using the function. But since I want to make this triangle a texture while avoiding perspective distortion, I have to divide it and use it for computation of texture mapping and normals. I can not understand how to do this for a managed rectangle, spherical, cylinder and taurus, but for me, how to understand the triangle, for my life. I have found every example of triangle mapping only for 2D space and by using glVertex, with predefined digits. In the form of a rectangle, the code I am using is: zero rectangle: draw float tex, float texts) {float x 1, X2, y1, y2; X1 = v.at (0); X2 = V.Att (2); Y1 = v.at (1); Y2 = v.at (3); // glRectf (x1, y1, x2, y2); Int _numDivisions = 100; Float _xDim = abs (x2 - x1); Float_yadim = ab (y2 - y1); Float textsmulti, taximultity; Tech Multitas = _xDim / texs; // / _xDim; Texmaltity = _yDim / texT; // / _yDim; GlPushMatrix (); GlT

c# - Laying out forms in WPF -

I refer to tabular forms mainly with columns of labels and related input controls. In HTML we can see the & lt; Ul & gt; , & lt; ol & gt; , or my favorites, & lt; Dl & gt; , some labels and inputs can be used to make them integral input devices (in WPF) I do not have anything but a grid with two columns control, one For labels and for one input many of these monsters are often required to complete a form layout. Is WPF not an integral functionality for the form layout? It was designed for windows UI window, a great, many of which are simple forms, not fancy graphics or animations. There are several containers in your disposal. There is a list explaining each one of the containers that you are probably interested in. You are able to specify the road definition and column define to create a grid to move to other controls.

git - How to write TeamCity build counter into FILE_VERSION_INFO of dll -

We have a project in git repository that is created by teamcity in mylib.dll TeamCity In the counter build and we also want to label the commitment created with this counter and to set this counter / label in mylib.dll as FILE_VERSION_INFO (Right Click -> Properties -> ; Description). Is there any facility in TeamCity? We examined the meta-runner-power-pack, but we could not find any way to do this. You can use the labeling sources to create a specific construction team in which the assembly version Allows to add.

php - Add custom customer address attribute in sales order grid collection in magento -

Hi I want to show in the Sales Order Grid some custom customer address attributes. How to get that ? Below is my archive I have successfully included table areas from another table, but unable to add properties to customer / address protected function_prepareCollection () {$ Collection = Dana :: getResourceModel ('sales / order_grid_collection'); $ COLLECTION- & gt; getSelect () - & gt; JoinLeft (array ('sfoa' = & gt; 'sales_flat_order_address'),' main_table.entity_id = sfoa.parent_id and sfoa.address_type = "shipping" ', array (' sfoa.street ',' Sfoa.city ',' sfoa .company ',' sfoa.customer_address_id ')); $ COLLECTION- & gt; AddFieldToFilter ('CUSTOMER_ID', Dana :: Registry ('current_customer') - & gt; getId ()) - & gt; SetIsCustomerMode (true); Dana :: Log ($ Collection); $ This- & gt; setCollection ($ Collection); Return parent: _ prepareCollection (); }

MySQL Max is not selected the maximumn value with multiple joins -

I am trying to find the latest activity for our PBX grave reporting from some crashes. I have the following code that gives me a brilliant view of all the tasks for every agent today: select e.`event_id`, event_time` like event_time, eg_event_id, p. Agent_id`, `a_name`,` a_number` to `c2g` .`events` and 'event_parties` in the form of' p_event_id` = p.`g_event_id` Leave p 'agent` in the form of p.agent_id Skip = A.agent_id, where p.agent_id is not zero and p.agent_id & lt; & Gt; 0 order event_time desc; and the following code which will give me the latest event for each agent: Select e.`event_id`, MAX (`event_time`) such as- Event_time, eg_evant_id, p. Rajendra_i, `a_name`,` a_number` as `c2g` ._events` and when joining 'event_parties`, e.` P_event_id` = p.`g_event_id` left p` agent` p.agent_id = a. Join as agent_id, where p.agent_id is not empty and p.agent_id & lt; & Gt; A_name 0 Group by ACA order by ACA; Although I'm not really get

python - Converting Pandas groupby.groups result into dataframe, using index tuple value as row and columns name of dataframe -

मेरे groupby.groups रिटर्न के रिसेट्स: {(2014, 36): [2], (2014, 41): [3, 4], (2013, 10): [0], (2014, 48): [5], (2014, 37): [1]} मैं इसे एक डेटाफ्रेम में परिवर्तित करना चाहता हूं जो इस तरह दिखाई देगा: 2013 2014 10 1 0 36 0 1 37 0 1 41 0 2 48 0 1 - जोड़ता है - यहाँ groupby.groups के परिणाम के लिए मेरा कार्यप्रवाह है: def tr_epoch (युग): y, wn, dn = epoch.isocalendar ( ) वापसी y, wn d = [1362826800, 1410260400, 1409828400, 1412766000, 1412769600, 1417262400] l = नक्शा (लैम्ब्डा x: tr_epoch (datetime.datetime.fromtimestamp (x)), d) df = pd.DataFrame (एल, कॉलम = ['वर्ष', 'सप्ताह_एक्स']] res = df.groupby (['year', 'week_idx'])। समूह - जोड़ता है - पायथनिक तरीके से, का उपयोग करके पुनरावृत्ति, मैं करूँगा: def to_dict (k, v): yr, wk = k वापसी {'सप्ताह': wk, yr: len (v)} डेटा = नक्शे (लैम्ब्डा ( K, v): to_dict (k, v), res.iteritems ()) df = pd.DataFrame.from_records (डेटा, अनुक्रमणिका = 'सप्ताह')। भरना (0 ) .sort () लेकिन

silverlight - Check if file exists in folder in c# -

I'm moving files from the source folder to the destination folder. Before transferring files, I am checking that the directory is OK or not. This issue is with my second investigation, where I have to ensure that the folder is not empty before running files, but it is not giving me the correct result. String SourceFolder = (twitterDO.Path + "\\" + msgDate.Year.ToString () + "\\" + msgDate.Month.ToString () + "\\" + msgDate.Day.ToString () + "_Temp" ).To change("\\", @"\"); String Destination = Folder = (twitterDO.Path + "\\" + msgDate.Year.ToString () + "\\" + msgDate.Month.ToString () + "\\" + msgDate.Day.ToString ()). Change ("\\", @ "\"); String pattern = "* .txt"; {Directory.Exists (sourceFolder) {if (File.Exists (pattern)} {foreach (new directoryInfo (sourceFolder) .GetFiles (pattern)} {file.MoveTo (Path.Combine (destinationFolder, file.Name)

How do I determine which file(s) generate which dependencies for my rpm build? -

I am trying to decide which files in my package produce each dependency for my package . For example, I have a subset of the need for my build: rpm -qp - mypackage.rpm libc.so.6 libm.so.6 perl (strict) ... << Code> libm.so.6 > One way is "rpm -qp --filerequire * .rpm". Another way is to "echo / path / file with some short scripting / file | / usr / lib / rpm / rpmdeps -R".

jquery - Using @HTML.Action with Parameters to C# controller -

In the view, user will check 1 or more names from what is shown ... & lt; Form name = chkAttend method = post onsubmit = 'return valid (this)' & gt; & Lt; Div & gt; @if (Model.evModel.Participants! = Null) {foreach (participated in model. Avimodel, partner) {& lt; Div & gt; @if (@ fi.AttendedFlag! = True) {& lt; Input type = "checkbox" id = "c_@fi.EnrollmentId" name = "MyCheckboxes" value = "@ fi.EnrollmentId" /> & Lt; Label for label = "c_@fi.EnrollmentId" aria-multiselectable = "True" & gt; & Lt; / Label & gt; & Lt; Period & gt; & Lt; / Span & gt; @ Fi.EnrollmentId @ fi.ParticipantName} & lt; / Div & gt; }} & lt; Input type = submit value = "confirm presence" & gt; & Lt; / Div & gt; & Lt; / Form & gt; After selecting names, call the function to check names. The name checked is required only to pass the c

Simple case of using Google Analytics for android doesn't works -

I'm really having a hard time using Google Analytics in my Android app. T requires complexity, all that I want to do is get general information about my users, and to get the report whenever the application crashes. I followed the following steps: I created an actress class that had a private tracker object. Inside the intricate function I started it. Increases the public class MyApplication application {Private Tracker googleAnalyticsTracker; @ Override Public Empty on Create () {Super. Connet (); GoogleAnalytics Analytics = GoogleAnalytics.getInstance (this); GoogleAnalyticsTracker = analytics.newTracker (R.xml.google_analytics_tracker); googleAnalyticsTracker.enableAutoActivityTracking (true); googleAnalyticsTracker.enableExceptionReporting (true); }} I created an XML file to generate the tracker (google_analytics_tracker.xml), as you can see here: < pre> & lt; integer name = "ga_session timeout" & gt; 300 & lt; / Integer &

c# - Using ProtoBuf-net to deseriailize a derived type (dictionary) does not properly set object fields -

I am attempting to deserialize an object whose class meets the dictionary & lt; String, int & gt; with string member field Public class TempClass: dictionary & lt; String, int & gt; {Public string version; Public Tempelas () {}} I have written a unit test to capture the problem in which I am running: member field is not set, either serializing or deserializing ( / With a byte []) this test with the protofuf-net fails in the last assurance when it is verified that the deserialized version is set correctly it is always appropriate is set to null instead of "someVersion" . [testclass] Public class serial exam {[TestMethod] Public Zero TestMethod1 () {string newVersion = "someVersion"; TempClass Basic = New TempClass () {{"a", 2}, {"b", 3}, {"c", 1},}; Original. Version = new version; Byte [] serialized = serial (original); TempClass deserialized = desialize (sorted); // validate foreach (original pair orig

Description format for partial uploads of byte data using HTTP PATCH method -

I want to use the HTTP Patch method to add the possibility of partial uploads to the rest of the interface. Me and other methods of describing patch instruction are used to partially update (and extend) the existing JSON and XML resources through the loop mechanism, e.g. JSN does not comply with the format for patching - I look at the formats that comply. TL; DR : How to describe patches for byte data? Is there an existing RFC or semi-standard to describe those current money, especially the data attached? As far as I can tell: No one has ever written it, defining the media type and Should submit internet drafts

Targeting a g id in an SVG for rollovers -

I am working with a SVG file which is output from Adobe Illustrator, so there is probably some unnecessary code. After searching and searching I was able to come up with it. & lt ;? Xml-stylesheet type = "text / css" href = "SVG_css.css"? & Gt; Path: Hover {fill: # 005289; } that gets rollover to work with an external stylesheet, but certainly targets each path in the form of rollovers. For example, I need to target routes. A group therefore exposes three elements when rolled over here is the code structure with Illustrator. & lt; G id = "WIRE_ROOM" & gt; & Lt; Path = "#BcBCEC0" D = "M357.3, 24.4c0,0.6-0.6,1-1.4,1H-8.1C-0.8,0-1.4-0.5-1.4-P-8.9c0-0.6,0.6 -1.14 -1h8.1c0.8,0,1.4,0.5,1.4,1 V24.4z "/> & Lt; Path across = "# BCBCEC0" D = "M357.3,51.4 c0.6-6.6,1-1.4,1H-8.1C-0.8,0-1.4-0.5-1.4-P-8.9C0-0.6,0.6 -1.14 -1h8.1c0.8,0,1.4,0,5,1.4,1 V51.4z "/> & Lt; Path across = "#

javascript - Cannot detect click on link in table -

I am trying to detect a click on a link in the table td element, the warning has not been raised on click I have added a JS file to my property and added necessary to my application.js application.js ... // = album is required .js $ (function () {$ ("# owner tr TD A"). Click (function () {return warning (click);});}); html is inside a modal window & lt; Div class = "modal-body-content" id = "myModalBody" style = "display: block," & gt; & Lt; div id = "owner_list" & gt; & Lt; Div class = "endorsement bridge-right" & gt; & Lt; Ul class = "endorsement endorsement-SD" & gt; & Lt; li class = "active page" & gt; & Lt; A data-remote = "true" href = "#" & gt; 1 & lt; / A & gt; & Lt; / li & gt; & Lt; Li class = "page" & gt; & Lt; A data-remote = "true" href = "/ backoffice / users.j

osx - Hammer for Mac constantly rebuilding -

When using the hammer for Mac (v1.6.12), after saving a file, the app rebuilt the whole project However, continuous reconstruction has started without stopping it. It does not really rebuild a project because it is cycling through its rebuilding cycle. Only if I manually click "Reconfigure now" then it stops the cycle and actually rebuilds and stops. Does anyone know why this can happen? The topic you described above is similar to a problem that is now We are looking at the pre-release of El Capitan. It is related to FSEVents and the way the message is sent about the changes in the file system, it is something we have seen sporadically in the last few days, but for the latest issue in the preparation of the public release of El Capitan Working on a fix. Disclaimer: I'm the new owner and developer Hammerformac Best Steve

c++ - Linking to dynamically available functions at compile time -

मान लीजिए मेरे पास निम्न मुख्य वर्ग है: class कोर {सार्वजनिक: टेम्पलेट & lt; typename टी & gt; शून्य स्वीकार (टी ऑब्जेक्ट); } अब मैं इस तरह से तरीके लिखने में सक्षम होना चाहता हूँ: शून्य हैंडल (int par); और कहीं भी लिंक / संकलन चरण के दौरान उन्हें पंजीकृत करें और कोर में कुछ टाइपनाम के लिए पंजीकृत सही विधि को कॉल करें स्वीकार करें (टी) विधि उदाहरण के लिए Core.accept (5) को 5 से हैंडल (इंट) फ़ंक्शन को किसी तरह पंजीकृत होने के बाद हाथ में डाल दिया जाता है। ऐसा कुछ (संगत उदाहरण नहीं): टेम्पलेट & lt; typename T & gt; शून्य कोर :: स्वीकार (टी बराबर) {// constexpr std :: map & lt; std :: type_info, फ़ंक्शन & gt; type_func_mapping; स्वतः इसे = टाइप_फंसी_मैपिंग.गेट (टाइपिड (टी)); // स्थिर होना चाहिए static_assert (यह! = Type_func_mapping.end), "टाइप नाम के लिए कोई हेन्डलर नहीं मिला" + टाइपिड (टी) .name ()) ऑटो फंक्शन = * यह; // भी constexpr समारोह (बराबर); } क्या इस दृष्टिकोण के साथ कोई समस्या है / बेहतर है? नोट: मैं एक तरह

javascript - Conflict between setTimeout and clicking outside the element detection -

I have the code below it slides a mobile menu, in which only 500 MB of clicks to prevent excessive clicks There is a timeout function to allow, it also closes when the user clicks outside the menu area. These two functions are conflicting with each other at the bottom of the script. This happens only on a sensitive site in a special case - If I click outside the first page load menu area on when the mobile menu is still hidden, and then shrink the browser window, the menu appears as already declining in TogglerWidth = jQuery ('# Mobile-Menu Toggler') CSS ('minimum-width'). // Get width of Toggler // left slide function slideLeft = function () {var menuWidth = jQuery ('# mainmenu-mobile') width ();; // Get the width of the main menu jQuery ('# Mobile-Menu-Tuggler'). Amymate ({width: menuWidth}, // what are we animate of 500 property, // how fast are we animating 'swing', // seamlessly the type of work () {// callback }); JQuery ('#menme

forms - File upload validation Tornado Python -

I have found this example to upload files to a server using the Tornado Python Web framework, but the thing is If there is no error in handling, if there is no file attached then it returns a 500 error. The idea is to set the upload file field as optional, not mandatory. Can you give me a hand? I think it can be an easy solution, but I am a very newbie. Thank you in advance! Googleing I found this solution: Import Tornado LOLOP import taranto. WEP UPLOAD_FILE_PATH = 'Main article:' / path / to / files / 'class mainhandler (Tornado.web request handler): Def find (self): args = dict (user name =' visitor ') self.render (' Home.html ', ** args) Category UploadHandler (Tornado.web Request Handler): def post (self): user name = self if self.request.files.get (' uploadfile ', none) .get_argument (' File name = uploadFile ['filename'] FileObj = open (UPLOAD_FILE_PATH + username + filename, 'wb') file: obz Written (u

php - Wordpress matching page title to pull up tagged stories -

I'm trying to create a custom page template in WordPress, where title = cars, this will pull the latest stories Related this is the line with which I need help; Div class = "topposts" & gt; & Lt ;? Php query_posts ('tag = $ page_title & showposts = 3'); ? & Gt; & Lt ;? Php while (is_pause ()): the_post (); ? & Gt; & Lt; Li & gt; & Lt ;? Php woo_get_image ('image', '165', '115', 'thumbnail', 90, $ post- & gt; id, 'img'); ? & Gt; & Lt; H3 & gt; & Lt; A href = "& lt ;? php the_ermelink () ;? & gt;" & Gt; & Lt ;? Php the_title (); ? & Gt; & Lt; / A & gt; & Lt; / H3 & gt; & Lt ;? Php echo excerpt (20); ? & Gt; & Lt; / li & gt; & Lt ;? Php timeline; ? & Gt; & Lt; / Div & gt; Basic PHP syntax: ' -String string No variable: & lt ;? Php query_posts ('tag = $ page_title

ruby on rails - RubyOnRails4 How do I exclude properties from a has_many relationship when rendering JSON -

Is there a way to exclude properties: jobs like I have done with the database @? I am new to Ruby and Rail so I doubt (Read: hopefully) that my syntax is wrong and it's an easy problem to fix. wants.json {rendere: json = & gt; @ Database ,: included = & gt; [: Jobs],: = Excluding & gt; If your @ "post-text" itemprop = "text"> <: id: created_at: update_at]} < P> Database Object Model class is_maya: Jobs Then, you can: Render: Jason => @ Database: (= & gt; {: jobs = & gt; {: except = & gt; [: created_at, updated_at]}}, except: => [: id, created_at, updated_at]) < / Code>

python struct pack displaying ascii -

उपयोग करते समय आयात संरचना struct.pack ("& gt; H", 31001) आउटपुट 'y \ x19' है, जब मुझे उम्मीद थी '\ x79 \ x19' मुझे पता है कि \ x79 एएससीआईआई में है, लेकिन क्या जानकारी समान है? ऐसा क्यों है कि एक बाइट जब दूसरे नहीं है, तब क्या हुआ? मैं एक modbus कमांड भेजना चाहता हूं और सोच रहा हूं कि क्या यह एक संचार समस्या पैदा कर रहा है। मैं modbus के लिए नया हूँ और मुझे यह पता चलने में परेशानी हो रही है कि दास स्वामी को क्यों नहीं जवाब देगा। आप repr () फ़ंक्शन के परिणाम को देख रहे हैं, जो पायथन इंटरैक्टिव दुभाषिया सभी परिणामों पर उपयोग करता है जो None नहीं हैं। पायथन स्ट्रिंग सामग्री ASCII के लिए प्रिंट करने योग्य, \ r , \ n और \ t के लिए ASCII टेक्स्ट का उपयोग करके दिखाया जाता है कैरेज़ रिटर्न, न्यूलाइन और टैब वर्ण क्रमशः, और \ xhh हेक्स शेष के लिए बच निकले हैं। और हाँ, '\ x79' सटीक समान है बाइट के रूप में 'y' : & gt; & gt; & gt; 'Y' == '\ x79' सच है लेकिन प्रतिनिधित्व करते समय,

copy a file to a table in postgresql using C# npgsql driver and how to get a single \ when using path names -

I am trying to do a per-tab-delimited text file in a # e-drive from a server in # post in postgresql. My SQL command NPGSQL COMMAND CMD = "NPGXLL COMMAND" ("Copy scrap (glove_post_date, stock_number, stock_description, reasoncode, adjusted_tk, unicast, extended_host, week, cost , Catch_Ol) "+ Filename +"; ", Conn); Here is my path code string r = @ "e: \"; String t = txtFileName.Text; Filename = r + t; I check my filename variable and it returns the path with a double backslash which I want to return to e: \ file.txt I p < p> Thanks The backslash has a special meaning in the string in C #, for example \ n is a new line, \ t is a tab ... and \\ is actually a backslash; these combinations of backslash and a character are esec The sequence is called. However, in your example, you used the so-called literally string literally. At the beginning of the string, @ means that a backslash should be considered as any oth

knockout.js - How to update corresponding UI using Knockout? -

The same function has two controls in my format but the control type is different from each other, there is a text box Dropdown is a list. In my case if the user selects an option from the dropdown, the text box value is updated dynamically, but the problem occurs when I type the value in the text box, dropdown list It is not updated if it has typed a single character, it will work fine, but I have trouble, where I had typed more than one character code. Here Js Fiddle: jsfiddle.net/rohit421991/c38hkdag/32/ I think I have a wrong incidence Is used and I am using the keyboard event. Please tell me what is the best way to do this and how can we achieve it? OK I think I have found a solution :) Please note that I too New to The first thing to do ... is the wrong way to do this in connection with the keyboard binding, something like a subscription becomes more understandable .... Then Here's my solution: jsfiddle.net/2kx9g6es/8/ I've changed some small

excel - Pivot Table Chart Macro -

I have a chart that I should put in a chart. I need a macro which will get every pivot table and their Will create charts for Here is what I have so far. What this is doing is making chart based on the first pivot table data reference is a number that changes in 1 to 2 3 etc. As it goes from different table to table. Set the ActiveSheet.PivotTables.Count = 0 if the sub CreateChart (I, V, SHEETNAME) dim objPivot PivotTable, objPivotRange as the boundary, objChart charts, set subdomain objPivot = ActiveSheet.PivotTables (I) objChart = set charts. Add objPivotRange = objPivot.TableRange1 with objChart .SetSourceData objPivotRange .ChartType = xl3DColumn .Legend.Delete .ApplyDataLabels. XlLocationAsNewSheet, SheetName & amp; Finished with "Chart" ActiveWorkbook.ShowPivotTableFieldList = False ActiveWorkbook. ShowPivotChartActiveFields = false end subs then f'ing stackoverflow wont answer me any comments, which is the bull that's $ hit Left to answer But anyw

PHP Function for Comparing Elements in Different Arrays -

I have two arrays such as (although 2 or more may be less than (any amount)) < / Strong>: [0] = & gt; Array ([assessedUsers] = & gt; Array ([0] = & gt; array ([score] => array ([0] => 10 [1] => 10 [2] = & Gt; 10 [3] = & gt; 10)) [1] = & gt; Array ([score] => Array ([0] => 9 [1] => 10 [2] => 0] [3] => 9))) Where the length of the score array is always the same in both arrays. I want to take every element from each array For example, the output of my desired function will look like this: [1] = & gt; Array ([score] = & gt; Array ([0] => 9.5 [1] => 10 [2] => 5 [3] => 9.5)) < / Pre> Is there any such thing that can do this or do I need a nested for () loops? If I need to use for l loops then how would I go about doing this? I'm a bit confused on the logic behind it I currently have what: for ($ i = 0; $ i And I'm a bit confused that to go to the next key. thank you in

php - SQL ID value auto move up -

I have a table that is an auto-inferit ID column. I want my database to automatically update the ID value To be changed, so that always have an ID value of 1. For example: id first name last name 1 John Smith 2 Charlie Jacobs 3 Jason Young I want it so much that if I enter the line ID 1 If I remove it, then I changed the ID in ID1 and ID 2 to ID id 2. This way: ID Firstname Last Name 1 Charlie Jacobs 2 Jason Young I would like to add a name followed by ID3. Preferably I was wondering if there was any setting in SQL which could do this automatically, if this is not possible then a PHP script would be the second best thing. This is not the right thing to do. Why do you want to do this? If this corrupts your primary key values ​​then do not do it so come for the solution If you are displaying it within a form, then just select one line number for each row in your selection statement Create There will be no difference between this SELECT @row_number: = @ row_numbe

optimization - MATLAB script gives me NaN even for setting variables to integers -

Image
After running this script everything is set to NaN and nothing happens. I'm just trying to do a second method on a 2-D function where a variable is set to 0. hi = @ (x, y) exp (-3 * ((x + 0.5). ^ 2 + 2 * y ^ 2)) + exp (-x ^ 2 - 2 * y ^ 2). * Cos (4 * x) - 1e-3; Tol = 1e-10; Yi = 0; X0 = -2; X1 = 2; F0 = hi (x0, yi); F1 = hi (x1, yi); For Jj = 1:24 x2 = x1 - f1 * (x1-x0) / (F1-F0); F2 = hi (x2, yi); If (stomach (x2-x1) & lt; tol) root = x2; Break x0 = x1; X1 = x2; F0 = F1; F1 = F2; End of End Here are two problems: I have been in the first line: x2 = x1 - f1 * (x1-x0) / (f1-f0); The function decreases when x2 with f1-f0 with every code will cause the forum to blow it up Can abs (f1-f0) & lt; By adding tol with x2 = x1 - f1 * (x1-x0) / (f1-f0 + tol) or tol ; However, this will not find the route you want. Your function reveals the graphing problem: You start the search on x0 = -2 and x1 = + 2 , which are two values ​​that force three ro

Python: split a large text file by many headers -

I have a large text file, which looks like this: latitude height Pressure 3 lines data group BSAS 2.3 4.5 45.0 875 5.6 6.5 46.2 676 3.4 3.4 48.2 565 6 Line data group SDAD 3.4 4.5 56.1 535 5.6 6.5 46.2 676 3.4 4.5 56.1 535 2.3 4.5 45.0 875 5.6 6.5 46.2 676 3.4 3.4 48.2 565 50 Line Data group asdasd 5.5 6.6 44.5 343 ... 3.7 8.4 56.5 456 ... and so on I want to split the whole text file to isolate the data group, every data The group is stored in 2D Or the array. So far, I have tried two ways to do this. The first route is going through each line and thus the data is being obtained: # Objects define the object class called the wave # There are 4 attributes in each object: latitude, loan, height, pressure wave_list = [] with Open (file name, 'R') as F: except the next (F) # headline wave = wave (), enumerate In line (f): If 'data' is in line: If the wave is not empty: wave_list.append (wave) Every = wave () and: wave.lat.append (line.split () [0]) wave.lon.a

Python histogram from unsorted data -

Image
I'm trying to parse some data to create a histogram In many columns of data But for me, only the columns below the relevant column are only for AB with the AB I want to plot the histogram in the column of X <2. So histogram should be sorted and plotted: 33 - 3 42 - 2 (Even though 42 starts before, I First, I want to conspiracy 33). I have lots of columns but it needs to be overcome by 'AB' character and search only those lines. Can anyone help? Update: Data is in a CSV file and there are several columns. EDIT: I now have data in a CSV file in this format. From AP, 42 AP, 42 from AAP, 33 TOEP, 77 FromAP, Toap, 42 fromAP, 42 from SEE, 42 TOAP, 33 TOAP, 42 FromAP, 42 SEE, 33 If I use code from dranxo, import pandas as pd import as the matplotlib.pyplot Plt df = pd.read_csv ('data.csv', sep = ',') df_useful = df [df ['addresses'] == 'fromAP'] df_useful.hist () plt.show () I get the following

ruby on rails - Act as paranoid is not recovering records -

I was trying to recover the object from my admin mode and it is not working Select Admin.only_deleted.first.recovery Admin Load (1.9 mms) "Admin". * "Admin" order by WHERE ("admins" is not "deleted_at") "Admin". "ID" ASC Limit 1 NodeEp: # & Lt; Administrator: 0xa57f10c & gt; `Recover 'the undefined method for' Any ideas? is expected to recover, but this is not a true record which is a real pain

html - Tranparent div in div with background image with rounded corners -

I have a transparent div on the bottom of the div with the image background. Everything is fine, but in the round corners of the transparent part The background image "shines" There is a link to Bela: My html is: & lt ; div id = "zkus" & gt; & Lt; Div id = "zkus_popis" & gt; & Lt; / Div & gt; & Lt; / Div & gt; My CSS is: #zkus {background: url ('test.jpg'); Width: 200px; Height: 180px; Background-shaped: 100%; Box-Shadow: Inset 0px 0px 20px # d1cfcf; / * Box-Shadow: 0 0 10px # 5c5c5c; * / Border-radius: 12px 12px 15px 15px; Status: Relative; Hidden flurry; Display: Inline-block; / * Range: 1px solid # 8d8d8d; * / Margin: 0 12px 10px 10px; } #zkus_popis {width: 200px; Height: 35px; Background color: # 000000; Status: Completed; Bottom: 0; Opacity: 0.9; Boundary-radius: 0 px px 12px12px; Hidden flurry; } thanks .. :) I found success or Then out of two different ways: Apply #zkus_popis :

How to interrupt loop/process using terminal input in C++ on a Linux application -

I am writing a Linux command line application that eventually leads to data acquisition from a piece of hardware. The nature of data acquisition is that it will feed data to the program continuously at some defined data rate. Once the user enters the RxData (Receive the loop), we want to stop receiving no command from the terminal to close it. I think the problem is that while using the getchar () the loop keeps every move of the loop as this program will expect the user to enter the input. Am I wrong in this behavior? On one note, I know that when you work with an embedded device, you can simply see a register that the buffer has increased or not, to determine that Does buffer read or not? I do not have a luxury on Linux application (or what?). Does such a thing work (let's call it making available), which I can run, check why the data is in the input, and then my program is prompted to stop receiving data? I just can not use the signet because I signal the hardware to pre

php - .htaccess 301 Redirect Folder and Subfolders -

I want to redirect an original folder to a different location than the subfolders. When I use code instead of / cat1 / page_title under / new-cat-1 / page_title , / new-global-cat / page-title I'm . 301 / cat1 / new-cat-1 redirect 301 / cat1 / page_title / new-global-cat / page-title Redirect 301 / cat2 / new-cat-2 redirects 301 / cat2 / Page_title / new-global-cat / page-title It seems that the redirect for the parent folder is taking precedence over the redirect for the subfolder. I have a long list of redirects under cat1 and cat2 that I need to redirect How can I do a redirect? Am who works for parents and sub-folders without interfering with each other? Additional information: This is a Wordpress website. To fix this problem RedirectMatch here for your regex capabilities : RedirectMatch 301 ^ / cat1 /? $ / New-cat-1 redirect match 301 ^ / cat1 / page_title /? $ / New-global-cat / page-title RedirectMatch 301 ^ / cat2 /? $ / New-cat-2 redirectm

c# - WPF installation path Variable? where are my installation files -

I installed the gradient to make an installer for my program, while I was working with Visual Studio, I Very important file was created on a folder on my desktop, this folder is now inside the installed path. Is there any way in terms of current installation path? Example: Get the icon from the environment. Installation path, or something for that effect? Like how can I reference my installation folder without writing a longer string path, assuming the folder? The following code will give you the folder that contains the WPF application, which was installed at that place It was established. string path = path.gate directory name (assembly; gate excursion accordion). Location); You must include the following namespaces using System.IO; Using the system. You can do anything like this string path = path.comb (path .gate directory name (assembly. "Resources ");

gmail api - Getting a users mailbox current history Id -

I would like to start moving forward a user mailbox so that I need the most recent history of users' mailboxes. There is no way to get it with an API call. The gmail.users.history.list endpoint contains a history ed that is what I want, with the docs: History unsigned long mailboxes The current ID history record of However, in order to obtain a valid response from this endpoint, you must provide startHistoryId as a parameter. Request a list of the messages of users, the only one option I see, get the most recent history ID from it, then request for gmail.users.history.list that history Make available to get the latest version. Other thoughts? Did you check out? Depending on the case of your use, to avoid the race between your current situation and when you start to forward the synchronization, you must provide a suitable history. If any "current history Get ", then something else between your previous state and when you will lose these results if

java - How to save file.txt with JFileChooser? -

I'm developing Notepad project, know how to save file.txt, my problem is, I Keep the file after opening JFileChooser, select local, where is the intent to save, but if saved after JFileChoose will open again again. I do not save as I want to save Jeffery Fleur FC = New Jeffiele (); Int resp = fc.showSaveDialog (FC); If (resp == JFileChooser.APPROVE_OPTION) {PrintStream fileOut = null; Try the file {file file = fc.get}; FileOut = new printstream (file); FileOut.print (txtArea.getText ()); } Hold (FileNotFoundException pre) {Logger.getLogger (frmNotePad.class.getName ()). Logs (level SESEE, ANNEL, X); } Finally {fileOut.close (); } Change the workflow to you Actually, when you first save the file, you need to keep the context of the file that you saved ... < Code> public class ... {private file currentFile; Now, when you save the file, you will need to check whether currentFile is null or not Null , you ask the user to select a file, otherwise, you ca

c# - Looping How can I make the barking 5 times and the dog running 10 -

सिस्टम का उपयोग कर; System.Collections.Generic का उपयोग कर; System.Linq का उपयोग कर; System.Text का उपयोग कर; नेमस्पेस असाइनमेंट07 {क्लास डॉग {सार्वजनिक शून्य से छाल (स्ट्रिंग कुत्तेनाम) {इंट बार्किंग = 5; जबकि (भौंकने वाला & gt; 5) कंसोल। WrightLine (dogsName + "भौंकने"); } सार्वजनिक शून्य चलाने (स्ट्रिंग कुत्तेनाम) {int चल रहा है = 10; जबकि (चल रहा है; 10) कंसोल। WrightLine (dogsName + "चल रहा है"); }} वर्ग कार्यक्रम {स्थैतिक शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {कुत्ते fido = नया कुत्ता (); fido.bark ( "Fido"); fido.run ( "Fido"); कंसोल। लिखें ("बंद करने के लिए कोई भी कुंजी मारा"); Console.ReadKey (सही); }}} कोड काम नहीं करता है मैं इसे पाश नहीं पा सकता यह काम नहीं करेगा। मैं उन्हें 10 या 5 बार जाने के लिए समझ नहीं सकता क्या मेरी मदद करने में कोई और अधिक सक्षम है? मुझे यह समझने में प्रसन्नता होगी क्योंकि मैं एक घंटे या उससे अधिक समय तक रहा हूं यहाँ है भौंकने के लिए सही कोड, आप उस के साथ चलने को ठीक करने में सक्षम होना चा

c - Basic Food Bank program help needed -

I have a problem with the code given below for the option 2, which is the request every time I have given the user pending Instead of showing the requests, I print a request table, gives me a random high number. Can anyone help me find this problem? This code should be similar to 1 option, but it should not add user input, if there is only one request. Example output: 1 milk 20 1 milk 20 2 milk 10 2 milk 5 4 donation: milk 40 request: milk 10 milk 5 this is mine Code int main () {int don_count = 0, don_amt [100], found, i, don_quant, option, req_count = 0, req_amt [100], req_quant; Four words [20], don_in_ppr [100] [20], rake_world [20], rake_inw_prop [100] [20]; Printf ("Welcome to the Food Bank Program!); Printf (" 1. Enter a donation \ n2. Enter a request \ n3. Complete the request soon \ n4. Print status report \ n5.Exit \ n " ); scanf ("% d", and option); while (option! = 5) {// submit the deposit. (option == 1) {scanf ("% s", word);