Posts

Showing posts from January, 2013

deployment - What is the best practice to move my dockerfile and related files to the server? (private files) -

I have a dockerfile, a .sh file, a nginx config file and private key but on a clean server on the server How to add those files for the first time (before creating a docker image before filing)? Do I need FTP and put those files there? Can I pull my project? I'm not using the digital ocean, but I still need a key or I can use a password And I do not like a personalized Paid Docker repo You use physical server or VPS ? If you can do SSH on your server, then add files in many ways 1. The easiest way to do sftp (You can use some sftp client to do this or use ftp command line tools ), Only your SSI login permission is required, and you can upload these files to your files. home directory. 2. The CCP, used in other ways, is like the command: scp YOUR_FILE Username @ ipaddressORhostname: / home / username / This only allowed your SSH login Required only The git or ftp server is not a good way to push files to files.

twitter bootstrap - Enclosing radio button with a label in Laravel -

To display the radio buttons correctly with the bootstrap framework, you have to put them in the label. Like this: & lt; Div class = "radio" & gt; & Lt; Label & gt; & Lt; Input type = "radio" name = "gender" id = "gender-male" value = "m" & gt; Men & lt; / Label & gt; & Lt; / Div & gt; I have tried to complete it with Laravel but I can only make the label a different element. & lt; Div class = "radio" & gt; {{Form: label ('gender-male', 'male')}} {{form :: radio ('sex', 'm', true, ['id' => 'gender-male']) }} & Lt; / Div & gt; Generates this HTML: & lt; Div class = "radio" & gt; & Lt; Label = "sex-male" & gt; Men & lt; / Label & gt; & Lt; Input id = "gender-male" check = "checked" name = "gender" type = "radio" value ...

bash - Adding header to an ascii catalogue -

मैं ascii फ़ाइल को bash script using a header जोड़ना चाहूंगा / कोड>। अस्थायी टेक्स्ट फ़ाइल के बिना यह करने का सबसे छोटा तरीका क्या है? आप इस तरह से कोशिश कर सकते हैं sed '1 I \' हैडर फ़ाइलनाम उदाहरण: सीक 5 | आउटपुट: शीर्ष 1 2 3 4 5

python - Strange behaviour with nltk sentence tokenizer and special characters -

I get some strange behavior when using sent_tokenizer for German text. Example code: sent_tokenizer = nltk.data.load ('tokenizers / punkt / german.pickle') sent to sent_tokenizer.tokenize ("Super quality. Toll. Teil. ") Print sent This fails with error: traceback (most recent call final): sent_tokenize (" Super Quality: To be sent to Tolis Teil. "): File" / Library / Framework / Python. Framework / Version-2.7 / Lib / python2.7 / Site-Package / NLTK / TalkNews /__init__.py ", line 82 , The tow sent in Coniser Tokenizer (text) file "/ library / framwork works / python framework / version-2.7 / lib / python2.7 / site-packages / nltk / tokenize / punkt.py", line 1270, to identify return list (self .sentences_from_text (text, realign_boundaries) file "/ library / framework / python framework / version / 2.7 / lib / python2.7 / site-package / nltk / tokenize / punkt.py", line 1318, S_from_text return in sentence [ Fo...

SSL and TLS in Python requests -

In a few days, this service destroys SSL connections So, I will only connect through TLS. Does anyone know if the requests are allowed for TLS connection and how is it enabled? Requests use the Python standard library module under the hood - it's different versions of SSL and TLS Supports You can request to use a specific protocol (such as TLSv1) that optimizes the poolmanager instance that has been created. I had to do something like this, but it was bitten by the fact that we were also going through a proxy - in that situation, the init_poolmanager method is not called, I use it because it uses a proxy manager instead: class strengthlsv1 adapter (adapter.http adapter): "" for connection TLSV1 is needed "def init_poolmanager (auto, connection, max, b Ok = false): # This method has no proxy Self.poolmanager = poolmanager.PoolManager (num_pools = connections, maxsize = maxsize, block = block, ssl_version = ssl.PROTOCOL_TLSv1, def defoxy_manag...

java - Twitter Integration in android using twitter application -

I am trying to integrate Twitter into my application. If I'm installing in the device and not its current open browser, then the user has to authenticate using the Twitter Editor, like Facebook SDK is doing. I want to get the user's login token to post a Tweet, get the follower list. Currently I am using the twitter4j library. Any suggestions how can I get it. Twitter has an official SDK that you sign in with twitter work and all optional validation flows Check it out: Examples: Examples: Examples have been applied (twitter app installed, not installed, Pre> Private zero setApplicat Button () {twitterbutton = (twitter login button) findViewById (R.id.twitter_button); Twitterbutton.setclallback (new callback & lt; twitter session & gt; () {@ override public zero success (result & lt; twitter session & gt; results) {/ TODO: success flow} @ Override public zero failure (Twitter exception exception ) {// TODO: Failure to flow}}); } Th...

sql - how to get the char inbetween hyphen -

qa- राज- ra मुझे पाठ "> यदि आपको अपनी स्ट्रिंग के केवल एक हिस्से की आवश्यकता है, तो आप एमएस एसक्यूएल सर्वर में इनबिल्ट SPLIT फ़ंक्शन का उपयोग कर सकते हैं। सीमांकक को देखते हुए, यह आपके लिए स्ट्रिंग को विभाजित करेगा। नीचे दिए गए इस प्रश्न से आवश्यक परिणाम लौटा सकते हैं; DECLARE @string NVARCHAR (MAX), @ डीलीमीटर CHAR (1), @ स्टार्ट INT, @end INT को टेबल बनाते हैं # आउटपुट (आईडीआईआई आईडीआईटीआईटी (1,1) प्राइमरी कुंजी, स्प्लिटडेटा एनवीएचएआरएआर (मैक्स)) एसटीटी = 'qa-raj-ra' SET @delimiter = '- 'SELECT @start = 1, @end = CHARINDEX (@ डीलीमीटर, @ स्ट्रिंग) WHILE @start & lt; एलएएन (@ स्ट्रिंग) + 1 BEGIN यदि @एंड = 0 एसईटी @ एएंड = एलएएन (@ स्ट्रिंग) + 1 को # आउटपुट (स्प्लिटडेटा) वैल्यू में डालें (एसबस्टरिंग (@ स्ट्रिंग, @ स्टार्ट, @ एन्ड - @ स्टार्ट)) SET @ Start = @end + 1 SET @end = CHARINDEX (@ डीलीमीटर, @ स्ट्रिंग, @ स्टार्ट) अंत से # आउटपुट से विभाजन का चयन करें जहां आईडी = 2 बेहतर उपयोग के लिए, आप एक संग्रहीत कार्यविधि में क्वे...

Doctrine2 mongodb and Timestamp -

I use principle 2 to write mongodb and one unit looks like this: I do not know how to do this. Any help would be appreciated. for beginners In the ODM you actually see the type using BSN type, they are respectively @Timestamp and the @Date subset of annotations The industry. In the PHP driver, the relevant driver class are respectively and respectively. The BSN document is provided as the link above, the timestamp is intended for internal use (MongodiB uses it in a replication opplog) if you are accumulating the dates and time in your application The date time you should definitely use. Seeing the example in the documentation of the ODM, it is unfortunate that for example, it has been created in the $ field, we use less encouraging field names and add a note that the user You probably do not want to map any fields as @Timestamp . If you have field maps such as @ date , you should be able to use Query Builder, as you would any other field and operator (with a ...

regex - Creating structured hive table with unstructured GPS packets in csv format -

I have a CSV file as outlined below. VTS, 51,0071,9739 9 65515, nm, gp, inf 01, v, 19, 7 9, 19, 291014, 0000.0000, n, 00000.0000, e, 07 AE VTS, 01.0097 9 7 9 9 65515, SP, GP, 18,07,2253, V, 0000.0000, N, 00000.0000, e, 0.0,0.0,291014,0000,00,4000,11,999,169, B205 VTS, 51, 0071.9739965515, NM, GP, INF0l, V, 18,072311,291014,0000.0000, N, 00000.0000, e, C24E VTS, 01, 0097.9739965515, NM, GP, 19.072311 , V, 0,000.0000, N, 00,000.0000, E, 0.0,0.0,291014,0000,00,4000,11,999,171, B358 VTS, 51,0071,9739965515, knots away, GP, INF01, V, 18,072319,291014,0000.0000, N, 00,000.0000, E, 012F VTS, 51,0071,9739965515, Mono miles away, GP, INF01, V, 19,072326,291014,0000.0000, N, 00,000.0000, E, B2E6 VTS, 0170097, 79, 965515, nm, gp, 18,072326, V, 0000.0000, N, 00000.0000, e, 0.0,0.0,291014,0000,00,4000,11,999,173, EAA 00 VTS, 5l,007l 9 739 9 65 515 nm, GP, INF 01, V, 18,072333,291014, 0000.0000, N, 00000.0000, e 98 9 6 VTS, 5l,007l 9 7 9 9 65 515 nm, GP, INF 01, V, 18,072340,291014,0000.0000,...

Find what 'automatically resolved' conflicts were made in TFS -

I sometimes get the 'automatically resolved' message when the file is checked in TFS: Due to disputed changes, no files were examined. These disputed changes are resolved automatically. Please try the check-in again. I know that I can turn off automatic resolution, but I do not care about it. However, sometimes I should know what he did to solve these issues. Is there a way to get a list of these differences so that I can check the check-in before clicking again? Thank you. The easiest way I've found it to complete is to see the output window, "Source Control - Team Select "Foundation", and scan the list for all the files, which were automatically resolved. Then for each file you can see the question on history in the file, and see recent changes.

multithreading - Running perl subroutine in parallel with Coro -

I have a sub-root that I executed parallel with kero : I would like to use hard; Use warnings; Use Koro; Sub MySubub {my ($ in) = @_; Print "$ in \ n"; My $ i ($ 0.01 million) before $$ {$ i = $ i + 1; } Return 1; How can I make threads from to (async {mysub "A"}), (async {mysub "B" }}, {Async {mysub "C"}), (async {mysub "X"}), (async {mysub "Y"})) {$ _- & gt; contains;} However, threads have been created but how can I run them in parallel? The example shows that (or better AnyEvent :: socket ) makes parallel execution possible, but how do I In my simplest example can I? Apart from this (but this is the second question), the above-the-loop Why is the argument for mysub but not in the example below? my @letters = ("A", "B", "C" , "X", "y"); my @in = map {(async {mysub $ _}}} @ bars; (@in) {$ _- & gt; join}; Koro is a cooperative multitasking ...

mysql - SQl update and select in one query -

I'm having a problem with a SQL query job. The work is ongoing Product Prices: Product Products: Select as 'Product Id' prod_id, prod_name AS 'Product details', 'price of the product' as the value, on-house form In 'quantity', '% HP%' like 'WHERE Prod_id'% TA% 'or' prod_id 'from supp_id AS' Product ID 'products is the second part of the work where I have a problem. I need to update prices up to 10% - I can do this with a different query. However, this is part of my college course and I am being asked to keep both updates and selections (showing changes) in a query. This is where I got stuck. This is my code so far (I get an error in the part of the selection) Update products SET value = value + (value * 0.1) where 'product' Select '% HP' as the 'id' prod_id as' prod_id 'or' prod_id 'as prod_id' product details' as prod_name, value as' product value ...

turbo c - C Graphics Programming : Display X/Y Axis -

How to display X and Y axis in Turbo C for graphics programming I mean there is a known code for this Want to display in your program? You can start by getting acquainted with the available in Turbo C and Turbo C ++. You will want to read what you are trying to accomplish, allowing you to draw text on the screen in a particular place. In C. you can do something like four lessons [100]; Int xPos = 6; Int yPos = 10; Sprintf (text, "x =% d, y =% d", xps, yPos); Outtextxy (0, 0, text); will display the value of xPos and yPos on the top left hand corner of the screen as x = 6, y = 10 . See examples in the outtextxy link for full details, which includes header file, start display, and other function calls will come in handy.

Using prototype beans defined in a different java-based Spring config file -

मान लें कि हमारे पास दो स्प्रिंग कॉन्फ़िग फाइल हैं: ConfigA.java और ConfigB.java । यह कैसे ConfigA.java जैसा दिख सकता है: @ कॉन्फ़िगरेशन वर्ग कॉन्फ़िगरेशन {@ स्कोप ("प्रोटोटाइप") @ बीन पब्लिक फ़ू फ़ूप्रोटोटाइप () {नया फ़ू (पैराम्स) लौटें; }} और अब मैं ConfigB.java Foo के कुछ उदाहरणों को इंजेक्षित करना चाहता हूं >: @ कॉन्फ़िगरेशन @ आइपोर्ट (कॉन्फ़िगर क्लाउड) क्लास कॉन्फ़िब {@ बेयर्न पब्लिक बार बार () {नई बार लौटें (*** फू इन्सजेस को इंजेक्ट कैसे करें? ***) ; } @बीन सार्वजनिक बज़ चर्चा () {नई बज़ वापस (*** कैसे फू उदाहरण इंजेक्षन करने के लिए यहाँ? ***); }} अगर मेरे पास एक विन्यास फाइल होती है, तो मैं बस तारों में fooPrototype () से जुड़े ब्लॉक को बदल दूंगा। लेकिन , fooPrototype () को एक अलग विन्यास फाइल में घोषित किया गया है? यह वसंत दस्तावेज में उदाहरण के जैसा दिखता है। यह एक ही पृष्ठ एक समाधान देता है: आप autowire कर सकते हैं कॉन्फ़िगरेशन सेम। @ कॉन्फ़िगरेशन @ आयात (कॉन्फ़िगरेशन क्लास) वर्ग विन्यास बी {@ एटॉवर्ड कॉन्फ़िगरेशन कॉन्...

c++ - Algorithm, that removes duplicates from array doesn't work -

मेरे पास एक चार सरणी है, जिसमें कुछ डुप्लिकेट मान हैं: ABCDEFEA और डुप्लिकेट मानों को निकालने के लिए यह मेरा एल्गोरिदम है: चार सरणी [20] = {'ए', 'बी', 'सी', 'डी ',' ई ',' एफ ',' ई ',' ए '}; पूर्णांक लंबाई = 8; के लिए (int i = 0; i & lt; लंबाई; i ++) {for (int j = i + 1; j & lt; लंबाई - 1; j ++) {if (array [i] == सरणी [j]) {array [ J] = सरणी [j + 1]; length--; एपीसीडीईएफ़ मैंने कागजात पर इस एल्गोरिथम को चलाने की कोशिश की है, ऐसा लगता है जब मैं लिखित रूप में ऐसा करता हूं, लेकिन यह मेरे आवेदन में काम नहीं करता है । यदि आप नीचे दिए गए कोड की जांच करते हैं तो आपको अंदर लूप के लिए दूसरा जोड़ना चाहिए: चार सरणी [20] = {'ए', 'बी', 'सी', 'डी', 'ई', 'एफ', 'ई', 'ए'}; int लंबाई = 8; के लिए (int i = 0; i & lt; = लंबाई; i ++) {for (int j = i + 1 (सरणी [j] == सरणी [i]) {के लिए (int x = j + 1; x और lt; = length; x ++) {सरणी [j] = सरणी ...

vba - Retrieving numbers from SQL database with dot instead of comma -

I have a macro that extracts information from SQL Server 2005 database. There are some numbers from this information ... In these numbers the decimal part is divided by commas, ",". This is the intention situation, but the numbers on a certain computer are retrieved from "dot". Separate the decimal part. set rs = conn.Execute (".......") if not rs.BOF and not rs.EOF then RefNum = rs.Fields (0) if How can I change this behavior? I want to separate the numbers "," "decimal part" in all the computers, if I understand right By the way, you need to ... set rs = conn.Execute (".......") if not rs.BOF and not rs.EOF then RefNum Otherwise you can use decimal decimal the properties Define the separator and apply the application. Decimal separator = "." Application Thousands of ascenders = "" applications. Usesysimaspasparates = False

mouseevent - mouseenter and mouseleave events fires multiple times -

What I'm trying to do is that, when the mouse enters the anchor tag, this tanked anchor Displays a devil on the tag and leaves it that I hide the div only but the problem is that, enter the mouse and the mouse gets out of the fire several times because I give the mouse an indicator. I have seen that as I moved the pointer, it leaves the mouse and as I move it again. Below is an example of where JSN is. Please help. Thank you.

.net - Equivalent of LINQ in Java 8 -

इस सवाल का पहले से ही एक उत्तर है: 35 उत्तर क्या LINQ जावा 8 में? लैम्ब्डा अभिव्यक्ति क्या इस भूमिका को भरना है? जावा की सबसे करीबी बात है नेट के LINQ, अर्थ में यह आपको एक कार्यात्मक शैली में संग्रह / हेरफेर करने की अनुमति देता है।

tablesorter + bootstrap = no icons -

I am using this fork: And my code is: ({Theme: 'Bootstrap', widgets: ["Zebra", "Youthham"], Header Template: '{content} {icon}', widget option: {Zebra: ["asymmetric"]}}); What is this problem? If the following HTML is generated: & lt; Div class = "tableorter-header-inner" & gt; Compressed & lt; I class = "table-icon" & gt; & Lt; / I & gt; & Lt; / Div & gt; But, I think there should be some class classes in it:. Table-Bootstrap Bootstrap-icon-unsorted or .tablesorter-bootstrap .inon-white.bootstrap-icon-unsorted : ( You probably file and / or bootstrap 3+ CSS file.

php - return type of container from subclass -

I have a PHP library that I do not want to edit, and implementing my code by override / override some methods is. But I'm stuck with the sanity. For example: Expand the square moment PHHP moment {public $ unique settings; Public function format js () {return original :: format ($ this- & gt; unique settings); }} Class paint {public function startOf () {// some code returns $ $; }} I want to do this: $ momentphp = new moment PHH (); $ DateStart = $ momentphp-> Start ('month') - & gt; FormatJs (); And to return to yourself the way to do this, Moment is overriding all the child's methods within PHHP Is there any other easy way to do this? The way? Using _call or something else? Edit: found a way to do this: Remove Switch between classes Use the __ call method for. > Like this: Class Moment PHH {Personal $ Example = Zero; Public $ unique settings; Public function __ composition () {$ this- & gt; Example = new moment ();...

html - Finally got my navbar to center...now my effects won't work -

So I started floating my li item and used the property's display: inline; But I could not reach the center. Then I found a solution on the stack exchange using the extracting flax and using text-alignment and display: inline-block but now my effect will not work! Is it not possible to focus on the menu and still when the list links roam while hovering? Or is it one or the other? Thanks for your help! ul {text-align: center; } Li {List-style: none; Margin-right: 1 em; Font-family: 'special elitism', cursor; Font-size: 25px; Padding: 12px; Display: inline-block; } Ltd a {color: # D0903C; Background color: # 7A4909; Text-decoration: none; }. Left a: Hover {color: # 7A4909; Background color: # D0903C; -WebKit-transform: (-10 degree) scale (1.2); -MOZ-TRANSFORM: Rotate (-10 degree) scale (1.2); -o-transform: rotate (-10 degree) scale (1.2); Change text: uppercase; }. Correct: hover {color: # 7 A4909; Background color: # D0903C; -Widkit-Conversion: Rotate (10 degree) sc...

Modelling dice rolls in F# -

I'm doing some Monte Carlo simulations using the foos on the dice roll and I have a roll of a dice To represent the list of dice rolls, I want to be able to model dice roll instead of integer as a type of integer to represent the list of dice rolls. I am using only 6 sided dice and I have a kind of choice which is some of the nickname / synonyms and some discriminating association or qualities of enum. I would like to see my type in this I would like to treat type as an integer so that I can do max / minute / yoga / fold on lists. / Li> I should be able to specify an integer value. I must be compelled with type 1-6 type, so that there is no dice roll, there is no dice roll of a zero and seven. I have tried to combine the types listed above and everyone likes to draw some (which can understand myself rather than my use and understanding). I'm doing this for fun (not for profit) but would like to see an answer, as I can imagine using it in more serious data mo...

How to create instance in Asia Pacific for Google Cloud SQL -

How to implement the Google app engine app, make an example of Google Cloud SQL in the Asia region and enable billing for Asia ? You can not specify Asia for app engine app, only EU (due to their data laws ). . When you create a SQL instance, you can set the area. What does the billing mean for Asia? Billing is not for the project.

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -

I am trying to apply a stylesheet for QGroupBox (QT4.8), which works on the normal screen ( 96 dpi) high resolution screen (Yoga 2 Pro, 3200x1800, 275 dpi, windows 8.1). The following style looks good on the 275 dpi screen, but the top margins on a regular 96 dpi screen are far too big. QGroupBox {border: 1px solid red; Range radius: 7px; Margin-top: 12x; } QGroupBox :: Title {subcontrol-origin: margin; Subcontrol-position: left above; Padding-left: 10px; Padding-right: 10px; } Changing the top-margin has an effect, but I did not get a proper setting which works on both screens. If I shorten the value, the content of the group box overlaps with the title on 275 dpi screen. I was also playing with units "East", "PX", "MX", "PT". Reading the document I would have guessed, "2 X" was the correct solution, which should be scaled with different screen resolutions. Without the stylesheet, the groupbox works well on both screens. ...

python - Parse multiple date column combinations with pandas read_csv -

I am importing a CSV file to a "Date" column on which and after many (~ 20) other columns That's the time of day. I have tried to use = parse_dates with read_cv but when I combine more than 1 pair of columns, I get one "ValueError: Date column arrival was already in dict" Arrival is the second column to read in parse_dates = dictionary. Here's what I'm doing (brief example): DF = read_csv ('DH_timing_prep_stata_v4.csv' September = ',', index_col = 'pt_id', parse_dates = {'sch_appt_time_': ['Date', 'sch_appt_time'], 'arrival': ['date', 'arrival']}) If I change the name of column to parse properly: 'D_sch_appt_time _': ['date', 'sch_appt_time'], 'd_arrival' ['d_ar_image_', ' I just tried to rename the column after importing df.columns = [' Sch_appt_time_ ',' arrival ',' other ',' a Lam ... '] T...

docker - boot2docker shellinit command ended up in error "Error requesting socket: exit status 255" -

According to the instructions of boot2docker installed on OSX, after that the application started in the terminal, the boot2 docker shellnit command started and The error "failed to request the error socket: exit status 255" tried the boot2docker stop>> delete ---> download ---> init ---> did not help it above i used version V.1.3.1. Why any ideas might fail? Thanks! In the end, this solution worked for me, it seems that our host file is in 127.0.0.1 It is mandatory to have localized localhost (location / etc / host). The following line should be in the / etc / hosts 127.0.0.1 localhost and do the following. Finally, assign the variable as the console show. boot2docker init boot2docker download boot2docker up

c# - Copy data between different tables using BCP (bulk insert) -

My progarm will be found in two tables, e.g. T1 (A, B, C) and T2 (B, C, D) (Tables are on different SQL Server) An additional column (D) and a column missing (A) in T2. I need to copy lines from T1 to T2, as soon as possible (using Subscaleby). Column A should be omitted, column D should have some default values. What does my selection statement look like? How do I get the default value for column D? Is there such a second, easy way? Since you have marked C #, I can suggest using the here is a sample project

javascript - Slider Working in Firefox But Funky in Chrome/Safari -

Any ideas how can I get this slider properly? I'm using a slider I found here: This is a custom wordpress theme which is close to the end of development. When I load the internal page, which uses this slider, they do the right thing on Firefox. But when I load them on Chrome / Safari, they sit down loaded in a semi-transparent slide, then make changes around Alexander, then they start running well. But loading of the slider is quite cowardly, you can see that for example what I am talking about on the Dev site. "> Wrap the following function around your $ ('. Yourdiv'). clever (); : $ ('# div-containing-your-images'). Load (function () ($. 'Yourdiv'). Crawler ();} The difference between the document and the document.load is as follows: Document.ready will fire, once all HTML elements are presented, for example, the tag is sung once, it starts to fire, it does not matter if the image itself is already full. document....

c# - CsvHelper ignore not working -

I csvhelper to generate a CSV file based on the list CsvClassMap to specify the area that I want to ignore, however, the value is still Also being written in the file. Here's my class: public class person {public Ent ID (Receive); Set; } Public string first name {received; Set; } Public string middlename {get; Set; } Public String LastName {get; Set; }} Here is my CsvClassMap : Public Sealed Class PersonClassMap: CsvClassMap & lt; Person & gt; {PUBLIC CLASSSP () {MAP (M = & gt; MIID) Index (0) .name ("id"); Map (M = & gt; m.FirstName) Index (1) .name ("first name"); Map (M = & gt; m.LastName) Index (2) .name ("last name"); Map (M = & gt; m.MiddleName). rare (); }} and this is the code that I am using to generate output: var person = new list & lt; Person & gt; {New person {id = 1, first name = "Randall", Middle name = "Michael", LastName = "Perry"}, new person {id ...

javascript - TypeError: Cannot read property 'top' of undefined -

I am getting this error: 'Unkit type error: undefined' top 'can not read property' Does anyone Do you know what I'm doing wrong? I have only one end with two different values, but they do not execute, executes the first loop, but there is no rest. I'm new to jQuery so if someone can tell me what I'm doing then it would be nice. That would be pretty cool. for (i = 4, x = 1; x & lt; 16; i = 3 + x, x = x + 3) {var top = $ ('. Box-' +). Event (). Top + $ ('. Box-' + x). Height () + 10; Var left = $ ('. Box-' + x). Position (). Left; $ ('. Box-' + i). Css ({top: up, left: left}); } I continue this error: 'Unkot type error:' can not read the 'top' property of the undefined property. As mentioned by @dfsq, some elements may not be available on the target page as . Therefore, the following codes will only work on those: for (i = 4, x = 1; x

php - Changing field in Gravity form to a drop down list -

OK ... I have a form that lets users fill out unique stuff like address and what does not. Recently I wanted to change the "state" field to a dropdown list of states, instead of placing it as a field, which you can type here what I have now ... . & lt; Div class = "atl_form_row" & gt; & Lt; Service Category: & lt; Div class = "atl_left" & gt; & Lt; Span class = "mandatory" & gt; & Lt; / Span & gt; & Lt; Label class = "control-label atlFormLabel" service state: & lt; / Labels & gt; & Lt; / Div & gt; & Lt; Div class = "atl_right" & gt; & Lt; Input type = "text" placeholder = "service state:" id = "servicestate" name = "servicestate" class = "service_request_text" /> & Lt; / Div & gt; & Lt; / Div & gt; I have tried to do something like that but unfortunately does not work ... A...

c - Count from 1 to 1000 without using loops corver edge -

Follow a question: What was the question asked today and it is a duplicate of the old question, in which a code snippet was shown Repeat the main function: This code means counting up to 10 without any loops, it rearranges the main functions pointer and when it reaches the required amount of print, this indicator Varies with the exit function. #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Zero main (ent j) {printf ("% d \ n", j); (And main + (and exit - & main) * (j / 10)) (J + 1); } Note I have changed the number of values, the value will be printed, I think function subtraction is the UB, but still I compile and this function is given to this Type runs: ./ mainexit 547 For any reason, the values ​​considered to be printed are from 2 to 10. When I start the program from ./ mainexit 1 it will be printed until J 10 reaches and then the reference will be to exit, but when I start the program with 547 While addressing the fir...

java - Add a directory to a Target Platform dynamically on Eclipse -

I was using Eclipse 3.7 (Indigo) and was a plugin that added an active directory to the active target platform having had. ITargetPlatformService Service = (ITargetPlatformService) PDECore.getDefault (). AcquireService (ITargetPlatformService.class.getName ()); ITargetDefinition target = service.getWorkspaceTargetHandle (). GetTargetDefinition (); IBundleContainer [] Bundle = target.getBundleContainers (); String my directory = "c: \\ directory"; My directory = boolean in boolean; (IBundleContainer bundle: bundle) {if (bundle.toString ()) includes (myDirectory.toString ())) {MyDirectory = true; break; }} If (My directory in it!) {Bundle = Arrays.Copyoff (bundle, bundle.lamp + 1); Bundles [bundle. Length - 1] = service. New directory container (myDirectory.toString ()); Target.setBundleContainers (bundles); Service.saveTargetDefinition (target); LoadTargetDefinitionJob.load (target); } But now, we are migrating to Eclips 4.4 (Luna) and the code has not been compiled ...

multithreading - Implement your own Thread in C# -

I was told in today's interview that how do I implement my own formula. As an indication I was told that implication of Runnabal was to consider one thing, and what else? I was completely stumped but even after doing online research, I still do not know what the answer is, or whether it was a valid question, I am bowing towards the latter. So my question is: If you want to write your own implementation of Thread Class in C #, then what do you have to consider? First of all, runnable probably verb Refers . The task is a representative type that is used to store the reference of a method. You use a thread to tell which method to start. I hope they only want you to describe how you are; Start a thread with a representative (which is Set the time to work on a worker thread. I use the call for the Task (the new action (....)) For this, it is short and modern. I always do the following at the lower level until the instructions for expanding the thread ...

python - Django Orm Related Table Condition -

I have a table foo that is related to table bar, how can I filter it in Django Orm? Raw query: select from foo as a *, bar as b where a.bar_id = b.id and b.is_deleted = 0 Django Orm: Foo.objects.filter (& lt; bar_is_deleted & gt; = 0) Foo.objects.filter (bar__is_deleted = False)

excel - Searching worksheets to return True or False based on value -

Image
I have 2 Excel worksheets representing values ​​at 1 stop in the first worksheet representing 1 digit route numbers and 4 columns. (See below) The second worksheet contains columns representing the route number, latitude, longitude and stop number (see below). I use route numbers I want to find and want to find the matching room to stop numbers in the second worksheet. The first worksheet and value will be returned as correct or incorrect as to whether the value is 0. Using two of my examples, the results will be shown below. Let me search for it and What functions will be required to return? Assume your first sheet is sheet 1, you can use the following formula: = vlookup ($ A2, sheet1! $ A $ 2: $ E $ 6, match ("stop" and $ d2, sheet 1! $ One $ 1: $ E $ 1,0) , 0) = 0 The match will retrieve the column corresponding to your stop, and vlookup will match the line corresponding to your route.

jquery.cycle2 transition plugin with multiple captions -

I am trying to use the jquery.cycle2.js plugin to create a transitional carousel - I would like to show multiple images in this carousel at one time, as it appears in the demo, however, I would like to place my caption on each slide so that there is a caption below each picture. I am showing a caption on the screen at a time which I am doing, which I do not want Here's my code: & lt; Div class = "cycle-slideshow" data-cycle-fx = carousel data-cycle-timeout = 1000 data-cycle-caption = "# alt-caption" data-cycle-caption-templates = "{{alt}}" data -crack-carousel-visible = 3 data-cycle-carousel-fluid = true> & Lt; Img src = 'img1.jpg' alt = 'IMG1' / & gt; & Lt; Img src = 'img2.jpg' alt = 'IMG2' / & gt; & Lt; Img src = 'im3.jpg' alt = 'IMG3' /> & Lt; Img src = 'img4.jpg' alt = 'IMG4' /> & Lt; / Div & gt; & Lt ;! - Empty element for captio...

c# - List with items in the last hour -

I am assuming logging for a list type structure in memory, and only items collected within the last hour Would like to keep This is in an asp.net mvc app, so the list is stable and access by multiple threads. I am currently checking every 80 minutes and will only remove people over 60 minutes (just because it has not been done on every request). I have a lock around the code that runs through the structure to find the old values, takes them to the temporary holder, then they are removed from the original structure. I think there are some locking issues with this, so if there is any built-in structure or some bulletproof code that will help me do this, try to take the code in your hands Was eager for. . As you say that you are "logging" in your list, it seems that Remove items from the front Repeat it Remove all items from the list Performance (I suppose "some locking issues" means poor performance) If so, then just use one. This removes the nee...

sql - Calculated Field With Conditions -

I need your expertise on this problem. I have a vehicle / driver's inspection database and I have a traffic infringement point I am trying to create a system, this is a system when drivers humiliate some traffic offenses, they take driving and insulting points. System: All of the violations occurred within the last 12 months, another has been added together to calculate the point total. If the accumulated points have reached 14 points then the driver has been suspended so that the number will be removed or reduced after the suspension. Example: Date of crime - Number of marks August 6, 2013 - 6 August 6, 2013 - 6 February. April 25, 2014 - April 25, 2014 - May 2, 2014 - 2 Explanation: 4 April 2014 - 4 Two offenses were committed on April 25, 2014 and (August 6, 2013 - April 25, 2014) 14 points earned (6 + 4 + 4) and suspension is done, 14 points are removed. . On 2nd April 2014 the second offense will be forwarded and will be added to the 8th of May 2014 marks...

php - Filter products without images in Magento -

Requirement: We have a bunch of images and without images, only to showcase products with front-facing pictures the wanted. What did I do: I have tried almost all such resources: And Their different combinations with luck. I think some things have changed in the new version of Magento. I am using version 1.8.1.0 Can anyone put some light here? UPDATE: On my debugging, I found out that - & gt; Adatitatophilter ('small_is'), array ('nob' => no_selection)) Actually worked but there is an error in the layered value filter I was thinking It is not working before. I am receiving this kind of error: ... According to Roy's reply in response to the above question, I believe, we have to edit this file: Dana / Model / Layer / Filters / Price.php Did you try it? - & gt; Add AettyFolder ('small_is'), array ('nob' = & gt; 'no_selection'))

javascript - AngularJS module: this versus $scope -

इस सवाल का पहले से ही एक उत्तर है: 6 उत्तर मैं AngularJS के लिए नया हूँ । मैं यह जानना चाहूंगा कि अंतर निम्न दो कोड स्निपेट्स के बीच क्या है: I कोड जो कि इसका उपयोग करते हुए नियंत्रक को परिभाषित करता है: var ऐप = कोणीय। मॉड्यूल ('ग्रीटिंग', []); App.controller ('HelloCtrl', फ़ंक्शन () {this.name = 'हैलो वर्ल्ड';}); द्वितीय कोड जो कि $ दायरे का उपयोग कर एक नियंत्रक को परिभाषित करता है: var ऐप = कोणीय। मॉड्यूल ('ग्रीटिंग', []); App.controller ('HelloCtrl', फ़ंक्शन ($ दायरा) {$ scope.name = 'हैलो वर्ल्ड';}); धन्यवाद। दो कार्यान्वयन अलग तरीके से उपयोग किए जाते हैं राय। यह वाक्यविन्यास नियंत्रक के रूप में वाक्यविन्यास के साथ प्रयोग किया जाता है, जो अनिवार्य रूप से आपके नियंत्रक को आपके दृश्य मॉडल बनाता है उदाहरण के तौर पर नियंत्रक नियंत्रक में this.text = "नियंत्रक के रूप में उदाहरण " दृश्य ng-controller =" myCtrl नियंत्रक दृश्यमॉडल के रूप में "& gt; {{ControllerV...

How does a remote shutter for camera work on Android/iOS? -

I recently ran on a remote shutter for the built-in camera app using Bluetooth on Android / iOS I am Here's an example link to the product: (Understanding Technology / Mechanism, not here to advertise but) As far as I know, It is possible to send remote commands in in-built camera applications because there is no really app for in-app, apps have apps to control remote commands However, the above video Shows that Bluetooth remote Such a remote control has been achieved using the shutter. I found that there is no need to install an external app to use such a remote shutter device. Is the device only sending touch event action to the phone? I think my real question is, how would such a remote device send the existing in-built camera app to 'take photo' command? Thank you, itemprop = "text"> Safe stick remotes are just two keys, the original camera shutter of iOS To trigger is the key to a "volume up" and the second key to trigger Androi...

c# - How to Dynamically Populate Slider and Get Value -

I have a declared slider in XML, which I want to populate with the values ​​based on a certain selection of the user. One page is dynamically populated with many unique control items, called phototamlet, in which there are many properties, once to determine which photobatam was selected, I used to adjust some properties I want to show the slider to I have declared a single slider in XAM, and I am trying to use this same slider over and over again. Depending on the selection of a user, the slider will be populated with different minimum and maximum values, and the last value of the user's selection will apply to some settings. To illustrate this I have the following XAML & lt; Slider x: name = "sl" visibility = "collapsed" /> XAML.CS zero editable Ellipse_Tap (Object Sender, System.Windows.Input.GestureEventArgs e) {If (Sender! = Faucet) { DependencyObject Tape Element = E.OriginalSource as UIElement; // Find the Tippit Phototnm Phototamine ...

python - processing the data in forms.py django before saving -

This is a class in my forms - what do I have to do? There are two fields on this form - admin_time and execution time. I want to compare the data before saving. if admin_time: execution_time = admin_time This is what I want to achieve. class form.modelform: Keywords = (forms.CharField (help_text = _ ('Please use a comma to separate your keywords.'), Required = false, Widget = forms.TextInput (attrs = {'Class': 'Medium Field'}))) admin_time = forms.CharField (help_text = _ (enter 'more than 60 minutes'), required = false, widget = form. Defines = '' class': 'filling width'})) def __init __ (self, * args, ** kwargs): if kwargs ['example']: initial = kwargs.get ('initial', { }) Initial ['keyword'] = Kwargs ['Instance']. ['Initial'] = Initial Super (TaskForm, Self) .__ init __ (* args, ** kwargs) def _process_keywords (self, manufacturer): If 'keyword' in self.changed_data: K.K....

express - Node.js delete request -

I have a node. Js application that has Express for express and Mongoose for database access. I is an HTTP delete request that is deleting an entry in the database if some of the requirements are met. .delete (function (rick, rays) {Movie.findOne ({_ id: req.params id}, function (mistake, movie) {if (err) res.send (err) ); For (var i = 0, len = movie.actors.length; i & lt; len; i ++) {if (movie.actors [I] .actor == "Chuck Norris") {res.status ( 403) .Send ({Message: 'Can not remove Chuck Norris}');} And (Movie Removes ({_ id: req.params.id}, Function (mistake, movie) {if (err) res .send (err); res.json ({message: 'movie deleted'})}}}}}}})}} If I have a movie with a Send HTTP delete, check in the list of actors if Chuck Norris is in the movie and I will be removed from there I can. / P> The problem is that my console is returning me this error: error: can not set the header after sending So I think this is an issue with my callback. ...

windows store apps - WinRT - My animation doesn't seem to run -

I have written a control that creates a star formation, the configuration of the number of digits and length of each point through the dependency properties is . I can tie them in slider controls and do all this work. Now I have written a behavior that will put the star control in the visual tree of a loaded control, and then to disappear from the animation star in the code and disappear from a cartoon flash. My animation has not run Storyboard The event containing the fire is but the dependency property is never killed after its initial setting when a breakpoint page is loaded in the handler that changes for animated. I am using some of the double animation examples. (This Q / AI solves it after 3 hours) You must set the EnableDependentAnimation property on your DoubleAnimation s from MSDN: You create all custom animations in a Windows runtime app by default If the animation system determines that the animation may cause poor performance in your UI, then the...

java - Trying to draw to applet in another class -

Hi is a beginner for Java programming and I'm trying to explain how a shape (oval) Drag from second to square in a Java applet (I'm sure this is probably a simple problem) I want to attract the square with the applet: import java .awt. *; Import javax.swing.JApplet; Public Class Pulsatingballs Jeplette (Private Static Last Long Serial YearsUUID = 1L; Public Zero Init () {getContentPane (). SetBackground (Color.black); New Ball (20, 20);}} and ball class: import java.awt.Graphics; public class ball pulsating ball {int x; int y; public ball (int y, int x) {this.x = X; y; y = y; repaint ();} public zero color (graphics g) {g.draw oval (x, y, 50, 50);}} Try it out: Applet: Public Class PulsatingBalls extended to JApplet {Private Static Last Long Serial VERSIONUID = 1 L; Private Last List New Arrayist & Lt; ball & gt; (); @ Override Public Wide Init () {getContentPane (). SetLayout (new border layout ()); Last zipal jp = new zpinal () {@ Override p...

javascript - PHP freezes on sleep() -

I was voting for a chat script for a long time. I have designed it to work like this: Customer sends a request for server (php) The server is requested, and a loop (For 1 minute) On every iteration in the loop, the server checks the 'new' messages from the database If there is a new message, the new message The server with the list dies. (I used the die string function That response is received by the customer, and is processed. If there is no new message for 1 minute , The other dead () function looks like a code with a 'message' status: & lt ;? php while ($ time) & Lt; 60) {If (new message) (die (new message)} So (1); $ Time ++;} die (no new message); During 60 seconds (when this is any new message I'm unable to open a new page, nor are other users able to access any page (using xampp). How do I fix this problem? I know that this approach can not be so great, but I would like to know this problem, and how to solve it, rather it is...

java - Generic Types & the toArrayMethod -

मेरे पास एक वर्ग MyStack है जो निम्न को परिभाषित करता है सार्वजनिक टी [] toArray () {int s = आकार (); @SuppressWarnings ("अनचेक") टी [] परिणाम = (टी []) नई वस्तु [एस]; नोड n = पहले; के लिए (इंट आई = 0; आई & lt; s; i ++) {परिणाम [i] = n.data; एन = n.next; } वापसी परिणाम; } चूंकि यह एक सरणी प्रकार T देता है, मुझे लगता होगा कि अगर मैंने यह उदाहरण घोषित किया है: MyStack & lt; स्ट्रिंग & gt; S = नया माइस्टैक्स & lt; & gt; , यह पूरी तरह से मान्य होगा: स्ट्रिंग [] test = s.toArray () । मुझे लगता है क्योंकि s प्रकार स्ट्रिंग , toArray की वजह से स्ट्रिंग की एक सरणी वापस करनी चाहिए, क्योंकि स्ट्रिंग मूल रूप से इस वर्ग में प्रत्येक T के लिए प्रतिस्थापित किया गया है (केवल इस विशेष तात्कालिकता के लिए, मुझे पता है)। यह बिना किसी त्रुटि के चलने का एकमात्र तरीका है यदि मैं ऐसा करता हूं: वस्तु [] परीक्षण = s.toArray () । यह क्यों है? ठीक है, एक मिनट रुको। मान लें कि आपकी परिकल्पना सही थी कि स्ट्रिंग को प्रत्येक T के लिए प्रतिस्थापित क...

jquery - Error: Syntax error, unrecognized expression: dot (.) -

मेरे पास एक jquery स्क्रिप्ट है जो इस तरह से आता है: $ ('।' + Ajax_object.cartclass) .on ('click', 'a.add', फ़ंक्शन (e) {e.preventDefault (); // निकटतम पैरेंट डिवा var cpd = $ (this) .closest ('div.cartpn') प्राप्त करें ; Cpd.addClass ('code'); ... '।' किसी कारण के लिए समस्या होने लगता है त्रुटि: सिंटेक्स त्रुटि, अपरिचित अभिव्यक्ति:। किसी भी विचार क्यों? सुनिश्चित करें कि ajax_object.cartclass ठीक से परिभाषित है। var ajax_object = {}; Ajax_object.cartclass = "testing"; // जिस वर्ग को आप सुनना चाह रहे हैं। आपकी कोड को उसके बाद ठीक से काम करना चाहिए, यह मानते हुए कि आपके पास वर्ग Ajax_object.cartclass जिसमें एक a तत्व का वर्ग जोड़ें : & lt; div वर्ग = "परीक्षण" & gt; & lt; एक वर्ग = "जोड़" & gt; यह परीक्षण करें & lt; / a & gt; & lt; / div & gt; निम्नलिखित कार्य करना चाहिए: $ ('।' Ajax_object.cartclass) .on ('click', ...

c# - Joined SELECT blocking UPDATE inside WHILE loop -

All codes are found by table , but each separate select from the field table T1 Join the T1 Inner from the table (The maximum field imported in the table from Select field, Max (Created options) and status & lt; & gt; 'Error' group by field) AS T2 ON T1Field = T2 I have read this data inside the loop for a while. Finally, I try to update the same table - the same one. The record reads - and it gives me an expiration. I think this because table is blocked for changes. My question is this: How to work around it? Any way to 'fix' the query so that he can accept the update? Additional information: If I work perfectly without querying queries after each line of UPDATE Instead; A JOIN with a table and an update below [a sample; Not the exact question) Update t1 SET column_name = join tab.some_column_name from the table T1 (select t1.) Join the T1 inner from the table (select field, max (created) ) AS MaxDate FROM table where the imported zero...

What is the best way to find which pair of adjacent points in an arraylist a single point X is closest to in Java? -

I have 2D points in an array list (i.e. A, B, C, D), this includes an arbitrary number Which may store a line string together. Suppose that I had a point X falling between point B and C, how can I ensure that the output of the function is an array list with an "array" (or just point A Or point B is specified for "B" and "C") given the following two cases: 1-Point is close to B in comparison to X, but Yet between the B and C, the 2-point is closer to C than the X, but still It falls between V and B3 - Point is close to C compared to X (maybe because the line segment is arrayed like a string or something like the array), but the function should be returned Either point C and D or C and B, which is based on the nearest of pointX. My current code is as follows, let's say that pointX goes into a function that does the following: point-point A = faucet; Point point B = null; Int minDistance = Integer.MAX_VALUE; (Int i = 0; i & lt; pointlis...

javascript - PaperJs Adjusting width and height after rotation -

I have an item that has been rotated and I want to change width and height base without rotation. When I change the item width and height altogether and again the shape direction resides in north and south. How does it ensure that the width is updated based on the new rotation is there a setting that I need to change or knows any math formula , I can use the new shape to calculate the basis on the rotation. Any help or reference is much appreciated Thanks. path Bounds property is the limit of the object, even if it is rotating. It prepares directly what you have prepared. // Create an empty project for the canvas and a scene: paper.setup (document.getElementById ('myCanvas')); // Make the scope of paper global, by injection it in the window: paper.install (window); // Create original reclenical version point = new point (20, 20); Var size = new size (60, 60); Var rect = new path.Rectangle (point, size); Rect.fillColor = New Paper Color (1, 0, 0) rect.rotati...

jquery - Content not updating, because of cache -

Good evening everyone! So basically I get data from the file with AJAX and put it in the HTML div. The problem here is that if I change anything in the file, then saving it and reloading my page, the content is not updated in HTML, but still this is it. However, when I set the 0 in the Mozilla cache, it updates this information. $ .ajax ({url: "./Tasks/2014/10.09.2014/Task_100914.txt", async: true, cashew: false, success: function (data) {$ ( '#work'). Text (data); Pagexicute.philogram = data;}}); I tried with "case: false", but it does not work.

sql - proc giving mysterious results -

I have a process that someone else has written that the code is like the following: If 1 = 0 select cast (zero as ANL), cast (zero as int) as review_ID, end - then there is a real selection statement which is similar Pattern corresponds to Now, HP is reading the top selection statement in any way before it is stored when it is stored It executes, even if it should never be called. If I add columns to the actual result query without adding this hidden query as an empty column, then it will not work (in HP Extreme, in SQL Server, the proc is expected as it runs). Any ideas on how anyone can work it? How can HP pre-write this non-execution code? I do not know what this code is written in the base but I think this conversation script As the Xstream engine is based in C ++, my first question is on the syntax of the IF statement. IF 1 = 0 in C if IF 1 == 0 is not the same. The first one determines the example of the statement based on the success of changing the example on...

rabbitmq - How to pass supervisor an environment variable from the docker run command -

I am trying to pass a varibale to the supervisor from the docker run command so that it executes a script with variable scheme Could. We need to set it to runtime so that every developer can get his queue in the rabbit, so we do not queue each other during testing. Docker Run Command: Docker Run-I-P 5672: 5672-P 9200: 9200-P 9300: 9300-P 9001: 9 001-P15672: 15672 -E "PARENT_HOSTNAME = MACHINED58" - RM - Name shovel -t dtwill / blkmesa: shovel Docker CMD statement (After looking at the docs, I know why the error is happening ' T: Provide an Arbitrimum Perm): CMD / USR / bin / supervisor supervisor config: [Program: Update_rabbit_config] command = / src / update_rabbit_config.sh redirect_stderr = true priority = 200 startecs = 3 script supervisor runs: machineName = $ PARENT_HOSTNAME echo machine name = $ machineName sed -i .bak "s | | machine | / '$ machineName' / "/etc/rabbitmq/rabbitmq.config This error is: exited INFO: ...

python - pandas drop duplicates of one column with criteria -

I have such a datafile: AB 239616412 none 239616414 Name 2 239616417 None 239616417 None 239616417 None 239616418 Name 1 23 9 616418 None 23 9 616428 Name 1 23 9 616429 None 23 9 616429 None 23 9 616429 Name 1 I I want to delete the duplicate of column A, and I want to put that line in which there is a name in it (! = None, originally) in column B, but if there is no value in all duplicates, then I still want to keep it (like 23 9 616417 ). It should be reduced: AB 239616412 None 23 9 616414 Name 2 23 9 616417 None 23 9 616418 Name 1 23 9 616428 Name 1 23 9 616429 Name 1 df.sort ('B', inplace = True) DF out [24]: AB 5 23 9 616418 Name 1 7 23 9 616428 Name 1 10 23 9 616429 Name 1 1 23 9616414 Name 2 0 23 9 616412 Nain 2 23 9 616417 Nain 3 23 9 616417 Nain 4 23 9 616417 NAN 6 23 9 616418 NAN 8 23 9 616429 Nain 9 23 9 616429 Nain Then drop duplicate wrt column 'A': df .drop_duplicates ('a', inplace = true) df out [26]: ab 5 23 9 616418 ...

ruby on rails - Make a PATCH or PUT request using $resource -

I am trying to create an update function in an angle controller: $ Scope .update = function (product) {product. $ Save (); $ Scope.cancelEdit (); } There are two ways to update a resource in my backend: PATCH /products/:id(.:format) PUT / products /: Id (.: Format) However, I can not access any of these using the $ resource ! , I can either use these functions to send requests with some tasks: {get}: {method: 'get'}, 'save': {method: POST '},' Query ': {method:' GET ', isArray: true},' remove ': {method:' DELETE '},' delete ': {method:' DELETE '}}; So what does it mean to send me a patch or put request? How should I configure my APP Central? These are only the default, but you can define your own actions. $ resource (url, paramDefaults, {put: {method: 'PUT'}, patch: {method: 'PATCH'},});

java - Selecting individual parts of cell <td> using Selenium -

I started using Selenium to collect data from a website that uses JavaScript. I have worked at a point where I am able to select cells from the table, but now I want to be able to select the "personal" string from each cell, for example: A cell from this table: & lt; Tr data-ig = "x: 360964033.17: adr: 0: tag:" tag = "" adr = "0" type = "row" & gt; & Lt; Td idx = "0" adr = "0" type = "cell" & gt; 2014-11-02 21: 15: 00 & lt; / Td> & Lt; Td idx = "1" adr = "1" type = "cell" & gt; AMALT & lt; / Td> & Lt; Td idx = "2" adr = "2" type = "cell" & gt; 60007 & lt; / Td> & Lt; Td idx = "3" adr = "3" type = "cell" & gt; 107115 & lt; / Td> & Lt; Td square = "ig9a63765d" & gt; 1 & lt; / Td> & Lt; Td idx = "9" adr = ...