Posts

Showing posts from August, 2015

bash - (AWK) Creating a username column using the characters from first name and last name columns -

After trying to achieve the output of a new column after the last, which is the first letter of the first name and the rest Uses the last name. Vincent Nguyen David Pham Bobby Hill Vincent Nguyen vnguyen David Pham dpham Bobby Hill bhill You can: awk '{print $ 0, tolower (substr ($ 1,1,1) $ NF)} 'file Vincent Nguyen vnguyen David Pham dpham Bobby Hill bhill Some can be reduced: (but Less robust) awk '$ 0 = $ 0FS tolower (substr ($ 1,1,1) $ NF)' file Updated to support more names: Bobby B Gigut Hill gives Bobby Bigfoot Hill Billy

javascript - Displaying a 'hidden' form once the first form is filled and submit button clicked -

I have two HTML forms where the second form 'display: none;' And so when I do not load the page (only the first form loads) This idea once was filled in the form for the first time and its button is clicked, to display the second form The latter is not displayed, which is filled after the display and it has been deposited on a 'thank you page' This is the first form, which is displayed when the page is loaded: & lt; Form id = "form1" & gt; ; & Lt; Table class = "tbl" & gt; & Lt; TR & gt; & Lt; TD & gt; Title * & lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Input type = "text" name = "title" category = "title" required & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; First Name * & lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; &am

angularjs - Selecting option under dropdown using angular JS -

मैंने .js फ़ाइल में निम्नलिखित कोड लिखा है var appMod = angular.module ( 'appMod', []); ऐप मैड। कंट्रोलर ('डोमेन' CTRL ', फ़ंक्शन ($ दायरा) {$ scope.admins = [{"प्रकार": ["केर्बरोस", "विभाग", "कार्यालय"], "कार्यालय": ["NA", "बैंगलोर "," NY "," NJ "]}}]}); अब मैं टाइप और ऑफिस के ड्रॉप डाउन से एक विकल्प चुनना चाहता हूं। मैंने निम्न कोड .html में लिखा है & lt; label = "typeOfAccess" class = "col-sm-2 control-label" & gt; एक्सेस का प्रकार: & lt; / label & gt; & Lt; div class = "col-sm-1" & gt; & Lt; चयन करें नाम = "typeOfAccess" डेटा-एनजी-मॉडल = "newDomain.typeOfAccess" & gt; & Lt; विकल्प डेटा-एनजी-दोहराने = "admin.type में typeOfAccess" value = "typeOfAccess" & gt; {{typeOfAccess}} & lt; / विकल्प & gt; & Lt; / चयन & gt; & Lt; / div & gt

php - Symfony 2 Doctrine LEFT JOIN -

In DB I have 3 tables: task_estimation_fields: create tab 'work_stimation_filand' (`id 'int (11) faucet atonement,` name' varchar (45) null, primary key (`id `), Unique key 'name_tip' (` name ')) engine = indodebi; task_estimations: CREATE TABLE `task_estimations` (` id` integer (11) No NULL AUTO_INCREMENT, `task_id` integer (11) No NULL, `Task_estimation_field_id` integer (11) not NULL,` description` bob, `summary` bob,` effort` integer (11) not null, `created_at` datetime not null,` created_by` integer (11) null, primary key `Id`), key`g1` (` task_id`), key`g2` (`created_by`), key` g3` (` task_estimation_field_id`), barrier 'g1` foreign key (`task_id`) reference` tasks Any action from DELETE (`id`) update, block 'g2` foreign key (` created_by`) Any action by updating the reference `users` (` id`), no action on the 'g3` foreign key no action DELETE (`Task_estimation_field_id`) reference` work_stimation_flames` (`id`) Update any action N

c - wrong in initialize shared memory with global memory in CUDA -

I have recently written a simple program, the kernel function is below: #BLOCK_SIZE16 #define RADIOUS 7 #define SM_SIZE BLOCK_SIZE + 2 * RADIOUS __global__ static void DarkChannelPriorCUDA (constant name * R, size_t LDR, constant name * g, size_t ldg, constant name * b, ldb size_t, name * d, size_t Define ldd, int n, int m) {__shared__ float R [SM_SIZE] [SM_SIZE]; __shared__ Float G [SM_ SIZE] [SM_SIZE]; __shared__ float B [SM_SIZE] [SM_SIZE]; Const int tidr = threadIdx.x; Const int tidc = threadIdx.y; Const int bidr = blockIdx.x * BLOCK_SIZE; Const int bidc = blockIdx.y * BLOCK_SIZE; Int i, j, tr, tc; For (i = 0; i & lt; SM_SIZE; i + = BLOCK_SIZE) {tr = bdr-radia = i + tider; For (j = 0; j & lt; SM_SIZE; j + = BLOCK_SIZE) {tc = bidc- radius + j + tidc; If (tr lt; 0; tr & gt; = n || tc & gt; = i) {r [i] [j] = 1e20; J [i] [j] = 1e20; B [i] [j] = 1e20; } Other {r [i] [j] = r [tr * ldr + tc]; G [i] [j] = g [tr * ldg + tc]; B [i] [j] = b [tr * ldb + tc]; }}} __synct

c# - Handler Loading Images From DB - Empty Images -

I load images from database I have a simple handler (.aaxx) file for loading purpose in the collar page The image URL simply indicates the handler below. image myImage = new Image (); MyImage.ImageUrl = "/../MyHandler.ashx?imageid=" + myImageId; The handler image is processed in system.Drawing.Ige the requested image = System.Drawing.Image.FromStream (MemoryStream); RequestImage.Save (context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Png); When there is no image in the database, an empty image (cross) is displayed in the calling ASPX page for the requested image ID. The possible option is to set the view = false; But I am unable to do this because of calling nature in the ASPX page I like this How can I hide the image in the scenario?

protocols - Can I use leading zero in case of day in the Date field in SMTP -

Can I use leading zeros in daytime in SMTP field? I mean smth like 03 Apr 2014 13:10:22 +0000 Do you refer to RFC , please? There are no dates in the SMTP protocol, but you are referring to the email header field described by RFC 2822 Internet Message Format . We have 3.3 date and time description with the following selected fields: date-time = [day-of-week ","] date FWS time [CFWS] Days of the week = ([FWS] day name) / Obs day-day-day-day = "Mon" / "Mars" / "Mercury" / "Guru" / "Venus" / "Saturn" / "Sun" date = month of the year = 4 * DIGIT / Obs-year month = (FWS month name for FWS) / month of month of month = name "Jan" / "February" / "Mar F "/" May "/" June "/" June "/" July "/" August "/" September "/" October "/" Nov "/" Dec "day = ([FWS] 1 * 2 DIEGIT) Obs DAY ..

2D vs 3D FFT in Matlab/Octave -

says that I have this matrix in memory and I want to calculate 3D FFT T = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 44 45 46 47 52 53 54 55 56 57 58 59 60 61 62 63 Actual (FFT2 (T)) ans = 2000 -32 -32 -32 -128 0 0 -112 0 -128 0 0 - 144 0 0 -128 0 0 -112 0 -128 0 -144 0 -128 0 0 -112 0 -128 0 -144 0 0 -128 0 -112-000-2018 0 real (fftn (t) ans = 2000 -32 -32 -32 -128 0 -112 0 -128 0 -144 0 -128 0 0 -112 0 0 -128 0 0 0 - 144 0 0 -128 0 0 -112 0 0128 0 -144 0 0 -128 0 0112 0 -128 0 0 0 Why do I miss the same results Losing? How can 3D FFT be done in Matlab / Octave? A 3D-FFT should be implemented in a 3D -array. If you apply 3D-FFT to 2D-Oraure, then you get the same results as 2D-FFT, because there is no third dimension in the array. Think of it this way: An en-dimensional FFT is just N1-dimensional FFT, with each dimension. If there is no third dimension in the array, then FFT doe

Dealing with CheckBoxList in Asp.net Mvc4 -

I want to implement a simple employee registration where employees enter their name and use their check box list Set select I problem when posting this data when the user clicks on the submit button, I am going to @ html.Checkbox with the input type = "checkbox" Instead of using it and I need to retrieve posts Details of the names and skill sets of employees Ddhti, I was hoping to use the built-scene because I input type = "Czech box", but I'm not satisfied with it. class public class employee {public string name {receipt; Set; } [Display (name = "select your skill")] Public IList & lt; String & gt; Proficiency Set; }} Public Sector SkillSet {Public Int ID {get; Set; } Public string skills {get; Set; } Public Child Selected {get; Set; }} Public Execution Register () {IEnumerable & lt; Skillset & gt; Langset = new list & lt; Skillset & gt; New Skillset {ID = 1, selected = true, Skill = "ASP.Net"}, New

angularjs - Angular JS - multiple ng-grid in one controller : Master /detail -

All examples which I call the ng-grid mater / extension , such as master / extension in official demo Shows, but they do not show up with two ng-grids. How can I do this? I do not even know how to start it seems that the grid is bound to $ scope.gridOptions and the $ scope is bound to the controller, so I do not know That's how a controller has two ng-grids. Does it mean that I need two controllers (connected to a service)? HTML & lt; Body ng-controller = "MyCtrl" & gt; & Lt; Div class = "grid style" ng-grid = "fooGridOptions" & gt; & Lt; / Div & gt; & Lt; Div class = "grid style" ng-grid = "bargid option" & gt; & Lt; / Div & gt; & Lt; / Body & gt; JS: var app = angular Module ('myApp', ['ngGrid']); App Controller ($ micron), Function ($ radius) {$ scope.foo = [{Name: "Moroni", Age: 50}, {Name: "Tianmum", Age: 43}, {Name:

c# - Extenion Method for ObservableCollection -

I am trying to add the Accionation Method to ObsavableCollection which will help all < Code> Delete Collection Delete Customers Here is the code HOwever I get some error because I am unable to access GetInvocationList from CollectionChanged. How can I do this? Public Static Zero RemoveCollectionChanged & lt; T & gt; (This overviewCLT; T & gt; COLLECTION) {NotifyCollectionChangedEventHandler_event = collection.CollectionChanged; If (_event! = Null) {foreach (NotifyCollectionChangedEventHandler in Handler Collection, selectGong.GetInvocationList ()) {if (object.ReferenceEquals (Handler. Target, archive)) {CollectionChanged - = Handler; }}}} Is there any alternative to achieving this? You can not access the orientation list of any event list from outside the classroom. What you can do is wrap the original collection and maintain the event within this class: MyObservableCollection & LT; T & gt; : Collections & lt; T & gt;, INotifyC

unix - Add floating numbers in bash -

I'm trying a little bit easier, but I'm trying to make sure that all the code does not work. Float numbers have to be added. I am doing this: result1 = `$ curl -o / dev / null -s -w% {time_total} $ url1` result 2 =` $ curl -o / dev / null - S -w% {time_total} $ url2` result3 = `$ curl -o / dev / null -s -w% {time_total} $ url3` total = 'exproded $ result2 + $ result3` transcribe $ total | $ GAWK -F: '{print} connection_1.value "$ 1}' But I'm getting this output: ./ Http_response_2 : Line 12: 0,018 + 0255: Command not found connection.name I also try to do this: result1 = `$ curl - O / dev / null -s -w% {time_total} $ url1` result2 = `curl -o / dev / null -s -w% {time_total} $ url2` result 3 =` curl -o / dev / Null - S -w% {time_total} $ url3` total = `result2 + $ result3 | BC` Thanks in advance to get the same result! There are 3 problems: Should total = & Amp; $ result2 + $ result3 There is a comma in your input in

html and css bottom margin doesn't work -

इस सवाल का पहले से ही एक उत्तर है: < / P> 4 जवाब मुझे पता नहीं क्यों नीचे मार्जिन मेनू बार पर लागू नहीं होता है मैंने सभी प्रकार के पैडिंग, मार्जिन और सब कुछ की कोशिश की। मेरे पास कोई सुराग नहीं है कि क्या जोड़ना है या बदलने के लिए ताकि वह इसके लिए आवेदन कर सके। मैं #header से संबंधित स्थिति को बनाने की कोशिश कर रहा था और .menu के लिए निरपेक्ष था और फिर सभी तोड़ दिया मुझे नहीं पता कि मैंने क्या गलत किया? मेरा HTML: & lt; body & gt; & Lt; div id = "wrapper" & gt; & Lt; div id = "header" & gt; & Lt; div id = "header_left" & gt; & lt; / div & gt; & Lt; div id = "header_right" & gt; & Lt; div वर्ग = "मेनू" & gt; नास्लोवाना & lt; / div & gt; & Lt; div वर्ग = "मेनू" & gt; पीवीसी स्टोलारीजा & lt; / div & gt; & Lt; div वर्ग = "मेनू" & gt; एएलयू स्टोलारीजा & lt; / div & gt; & Lt; div वर्ग = "म

Improve the performance of Java Web Application -

I am working with a 3-level web application that has the following technology stack: Service 3.0 3.0 JSP 2.4 Spring 3.0 MySQL Database Tommak Web Server < / Li> We launch this application using the Mozilla Firefox browser. My problem is that, while having large data on the database, the application is facing the problem. We have about 10 JSPs while each JSP database is related to a particular table. The problem occurs when loading special JSP, which is in large numbers in the table. Entering the app also showed the problem of display and it takes a very long time to show the Home Page. I need this app to work with the best performance. Due to performance issues, we do not want to lose our precious customers. I do not know where the barrier is, and what to do to tune the performance of my application. Some suggestions: Some advice: Make sure you have your connection manual Instead of opening the form, you are using a database connection pool. Be sur

Phone call in background of my android app -

I know how to make phone calls from my app using an app, but Android dial UI is shown. Is there any possibility of doing an Android dial UI when it is shown on my app and having a phone call on the background? You request permission SYSTEM_ALERT_WINDOW () , Allowing you to display a screen with "always-on-top" behavior that will be shown on -col screen. Facebook uses this permission for their chat head facility.

javascript - augular-ui-router state will not match with query parameter -

I'm stuck. I can not find UI router for Angiians to match any state with query parameters, but my other situation is working properly with query parameters. Here is the problem situation. $ stateProvider.state ({name: 'sources-show', url: '^ / source / {id: [0- 9] +} /: key; page and channel', Controller: ctrlFunc, templateUrl: 'boards.show'}); The following URLs will be matched. http://example.com/sources/100/title but this URL should be otherwise in $ UrlRouterProvider will trigger. http://example.com/sources/100/ Title? Channel = test I do not know what I'm doing wrong, what's more is this other state works perfectly well. $ stateProvider.state ({name: 'source', url: '^ / sources? Page & search', administrator: controller, templateUrl: 'boards. By.Type'} ); The only thing I can conclude is that you can not query query parameters with URL parameters.

javascript - value is changing before save- angular js -

I have created an application in angular JS, in which I am getting JSN from a factory, on which it has two controllers < The code taken in Ctrl1 and Ctrl 2 is working fine but in the structure I have canceled and saved the button, in which I cancels when I have previously saved changes It has to be done again and when I click it, it should update json. html & lt; Div ng-app = "app" & gt; & Lt; Div ng-controller = "ctrl1" & gt; & Lt; Form & gt; & Lt; Br> & Lt; / Br & gt; {{}} User & lt; / Form & gt; & Lt; / Div & gt; & Lt; Div ng-controller = "ctrl2" & gt; & Lt; Input type = "text" ng-model = "user.name" /> & Lt; Br> & Lt; Input type = "button" ng-click = "save ()" value = "save" /> & Lt; Input type = "button" ng-click = "cancel ()" value = "cancel" /> & Lt; / Div &

javascript - Creating color pallet list loop issue -

इसमें, आपको निम्न कोड दिखाई देगा: & lt;! DOCTYPE html & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; मेटा वर्णसेट = "यूटीएफ -8" & gt; & Lt; शीर्षक & gt; जेएस बिन & lt; / title & gt; & LT; स्क्रिप्ट & gt; फ़ंक्शंस बनाओपेटलेट () {आर = अर्रे ('00 ',' 33 ',' 66 ',' 99 ',' CC ',' FF '); जी = अर्रे ('00 ',' 33 ',' 66 ',' 99 ',' CC ',' FF '); बी = अर्रे ('00 ',' 33 ',' 66 ',' 99 ',' CC ',' FF '); फूस [=]; J = 0; के लिए (एक्स = 0; एक्स & lt; R.length; x ++) {के लिए (y = 0; y और lt; जी। लांघ; y ++) {for (z = 0; z मुझे 258 रंग मिले हैं, लेकिन सफेद विकल्प के शीर्षक में दिखाए गए सूची में दोहराया अनिर्धारित नीला मूल्य बी हैं मुझे विश्वास है कि ऐसा इसलिए है क्योंकि नेस्टेड लूप में कुछ गड़बड़ है, मैं इसे समझ नहीं पाया। दूसरी बात, मुझे उम्मीद है कि यह 256 रंगों को वापस नहीं करे

PHP complex regex -

If you have some time for me, then my problem is: Example string : {= $ test-> {$ Test- & gt; Exam} () "This is a test" {= $ Test2-> {$ Test2- & gt; Examination} () "This is another test" ("}" Chilo has been found once again. According to consultation and consultation the affiliates have been included. {= $ Test3} {= $ test-> gt; {$ Test-> {$ test-> Exam}} () "This is an exam" {= $ Test2-> {$ test2-> Exam} () "This is another test "{}: {}} Chile has been found once again, according to consultation and consultation the affiliates have been included. Example of expected results with the preg_match_all function: < Ul > $ test -> {$ test-> test} (). "This is an exam" ( $ test2 -> {$ test2-> test} () "This is another test $ test3 I need to find all between "{=" and "}"; "{}" Is found in the form of a pair However, it may be a

How to add column data as listbox items using access vba -

I am trying to add table column as data list item, I see table column names in the list box item Attempted to add in But how do I add table columns to data list items? I have a table column 1 abcde I tried adding column column names as list items, vba sub item 1 () resume on error, integer as the 'integer index' in the form of i. For loop with the MeLostbox. Set the type of rowsource type = "value list" 'lines'. Clean combo content for resets = ""' Ends CurrentDb.TableDefs ("(I-1) with I = 1. Name) Ended with the Next End End How to do list box item I have A, B, C, D, E. Just type the combo rowsource table / query and either use RowSource for table name or line. with the Me.lstbox. Set source of rowsource type = "table / query" 'rows. Resource = "Select field 1 from table 1" end You set the right bound column, column catalog, and column width. For the most part, there is no need for codes wi

php - echo string with special chars doesn't appear correctly -

सही स्ट्रिंग Culto Mensal एरिया विला मारियाना है लेकिन यह Culto Mensal Ãraa Vila Mariana प्रकट होता है .... Gratidão = Gratidà £ o मैंने पहले ही htmlspecialchars फ़ंक्शन के साथ कोशिश की है & lt; php शामिल हैं "mysqlconecta.php"; // Conecta ao banco de dosos $ result = mysql_query ("CDEventos से चयन करें"); गूंज "& lt; तालिका की चौड़ाई = 900 सीमा = \" 2 \ "& gt;"; गूंज "& lt; tr & gt;"; गूंज "& lt; td & gt; Titulo & lt; / td & gt;"; गूंज "& lt; td & gt; स्थानीय & lt; / td & gt;"; गूंज "& lt; td & gt; डेटा & lt; / td & gt;"; जबकि ($ पंक्ति = mysql_fetch_array ($ परिणाम)) {गूंजती "& lt; tr & gt;"; गूंज "& lt; td & gt;"। $ पंक्ति ['titulo']। "& Lt; / td & gt;"; गूंज "& lt; td & gt;"। $ पंक्ति ['स्थानीय']। "& Lt; / td & gt;"; गूंज &

unix - How do add a file to directory without modifying the directory's modify timestamp? -

Is there a way to copy a file into a directory while preserving the timestamp in this directory? No directory is too much really a file that lists the names / inodes of the files stored in it To add a new file to a directory, or to rename just one file, it is necessary to rewrite the directory file to update the information such as adding / deleting / removing a file in a directory , Directory your timestamp Will be updated.

java - Disappearing default constructors -

I have received several crash reports with the following stack trace (name change): Reason by: java.lang.InstantiationException: Class can not start com.example. My application; No empty creator on java.lang.Class.newInstance (Class.java12319) on android.app at android.app on Java.lang.Clang.newInstanceImpl (Basic Method) android.app.Instrumentation.newApplication (Instrumentation.java:997) . Instrumentation.newApplication (Instrumentation.java:982) ... 11 and java.lang.RuntimeException on Android.app.LoadedApk.makeApplication (LoadedApk.java:496): Unable to instantiate the application com.example. MyApplication: java.lang InstantiationException: Class can not start com.example. MyApplication; There is no empty manufacturer on Android.app.LoadedApk.makeApplication (LoadedApk.java .0101) android.app.Application is a manufacturer with a clear parameter : public application () {super (blank); } MyApplication inherited from android.app.Application and no explicit con

php - Allowed memory size of 134217728 bytes issue not solved by increasing memory limit -

Then I'm getting 500 internal server errors, after looking into the Apache 2 error log, I get that error. PHP: 2248] [Customer 94.197.122.74:54243] PHP Fatal Error: 134217728 Bytes Acceptable Memory Size Tired (tried to allocate 18 bytes) < / Code> My code makes many requests to large databases (1 M + rows) - so I think the problem is. I changed my memory usage from 128 BM to 500 BM in php.ini, unfortunately I'm getting the same error ... Any thoughts? If you have any in your MySQL database then the "Post-Text" itemprop = "text"> from LONGTEXTS Change to code> TEXT I had the same problem and resolved it by changing LONGTEXTS to TEXT . You can do this within your PHPMYADMIN if you have reached one besides, use VARCHAR Use long text instead of if / where possible TEXT . Do not drag the amount of data from the database at once. Optimize your PHP and query execution in your PHP files

paypal - Shipping Address is not getting transferred -

I have encountered a problem with PayPal integration on my site that was created using ExpressionEngine. I am using the PayPal Express and PayPal Pro options. Some orders are working fine, while some orders are facing problems related to seller protection. This is showing the following information. Payment Type: Website Payment Pro API Solution Surcharge: N / A Card type: Visa. Besides, how do I check and confirm it? Seller protection is offered to sellers as courtesy to paypal transactions. These are non-pro, transactions that have been processed by Paypal through PayPal network. To ensure that you receive seller protection, there are some guidelines in it < Br /> > < " Go this transaction Necrption must be passed in PayPal. All PayPal Payment Pro transactions are not eligible for vendor protection All digital goods or non-tangible objects (provided services) are not eligible

html - Firefox ignores border top left radius on table-cell -

मेरे पास CSS3 के नियम हैं: .acpTable thead tr th: first-child { सीमा-ऊपर-बायां-त्रिज्या: 9 पिक्सेल; } .एपीपीटबल thead tr th: अंतिम-बच्चे {सीमा-शीर्ष दाएं-त्रिज्या: 9px; } डोम में मेरे पास वर्ग acpTable के साथ एक तालिका है और jQuery के माध्यम से एक tHead तत्व जोड़ा गया है वर्तमान क्रोम ब्राउज़र में यह वर्तमान फ़ायरफ़ॉक्स में काम करता है। मैं क्या कर रहा हूं? चयनकर्ता काम करते हैं, मैंने "पृष्ठभूमि: हरे रंग" के साथ परीक्षण किया है और सही कोशिकाएं रंगीन हो जाएंगी। क्रोम: फ़ायरफ़ॉक्स: डेवलपर उपकरण पट्टी से पता चलता है कि यह गणना की गई है। मैं क्या कर रहा हूं? आपको माता-पिता पर त्रिज्या परिभाषित करना होगा: .acpTable, / * तालिका * /। CpTable thead, / * हेड * / .acpTable thead tr: प्रथम-बच्चा, / * पंक्ति * / .acpTable thead tr th: प्रथम-बच्चे {/ * सामग्री * / सीमा-शीर्ष-बायां-त्रिज्या: 9px; } आपको अपनी तालिका को सीमा-पतन: पतन; (): पर सेट करना होगा, लेकिन यूए की आवश्यकता नहीं है तालिका के लिए लागू करें अनलाइन-टेबल एलिमेंटे जब सीमा-पतन आइटी प

java - How to include JSP from jar lib -

I have a lot of obe project, which is normal for other applications. I want to put one of the few JSP files and then include and or & lt;% ... but I do this Not able to. Is there any way to get this? If there is one, which is better, include instructions ( @include file ..) or verb ( & lt; jsp: included page ...)? thanks I only know one way Put JSP in the /ETA-INF / Resources folder. Create a 'Lib' folder inside the web-ins folder War. Keep jars in the lib folder of the war (containing JSP in the / META-INF / resources folder). The main JSP where you want to keep this external JSP in jar, use the following statement: & lt; Jsp: include page = "/ myJSP.jsp" & gt; & Lt; / Jsp: include & gt; Note that JSP requires a 'JSP file name' in front of a pure path for JSP (and hence in the jar in the liberation folder), rather than in the current path where the main JSP is lying . This will definitely work.

php - ZF2 Serialize data from Instagram API -

itemprop = "text"> Since the Instagram API has a limit of requests per hour (not sure how many) you have data stored from the Instagram feed To use serial to advise? If not, what else would you advise? If so, I am not sure about the structure and where I wrote my code for the serial part. So far, I'm using Instagram code inside my footer (layout.phtml). Should I create a module to store that data and reload the data once a day? What can I do if you do not advise that solution? You can make a stand-up through your memcached server and proxy through your API request you limit your API With the ability to balance the freshness of the data, TTL can easily configure the cache. It all depends on cardinality of all unique API requests. If you are making too many similar requests for Instagram, then this will be an ideal setup Storage in Memcached will be trivial if you are using PHP as you can write objects directly (any Clear ordering is not required):

xcode - Misplaced view warning -

Image
मेरा दृश्य स्थिति: मेरी बाधाएं: पिछले दो बाधाएं 0 के बराबर हैं। चेतावनी: " कार्यक्षेत्र की स्थिति 428 होगी रन टाइम पर कैनवास में 420 है। " एक नकली चेतावनी की तरह लगता है, क्योंकि जब मैं इसे लॉन्च करता हूं, मेरा बटन सही जगह पर होता है। मैं कैसे चेतावनी को ठीक कर सकता हूं या इसे छुपा सकता हूं? अगर आप सभी बाधाओं को हटा दें और फिर उन्हें वापस डाल दें । यह काम करना चाहिए। ऐसा कभी-कभी होता है जब आप अपनी बाधाओं को रख देते हैं, तो दृश्य को गलती से खींचकर देखें। यह पहले मेरे साथ हुआ है स्टोरीबोर्ड के निचले भाग में आपके दृश्य पर नीचे क्लिक करें और आपके पास कुछ बक्से हैं उनमें से एक अपनी बाधाओं को रखने के लिए था, अगले एक (दाईं ओर) उसके पास दृश्य पर सभी को हटाने का विकल्प होता है। जब तक दृश्य का चयन किया जाता है, तब तक आप उन सभी को केवल दृश्य पर हटा देंगे। फिर उन्हें जिस तरह से आप चाहते हैं, उसे वापस डाल दें और चेतावनी दूर हो जाएगी। हो सकता है कि आपने बिना थोड़ी सी दृश्य को झुकाया हो। हमें बताएं कि यह काम करता है। संपादित करें # 1 यह बहुत अजीब है मैंने एक नमू

node.js - nodejs actionhero download picture file trouble -

I am creating a simple image file upload / download server and I'm following it. In this section I am passing the xpath parameter which is the name of the file and it works fine for all text files, but I am getting 404 when trying the same for images. renderFile: function (API, connection, next) {// Any pre-rendering etc. connection.rawConnection.responseHttpCode = 200; Connection.sendFile (connection.params.xpath); Next (connection, wrong); }, Run: function (API, connection, next) {var self = this; If (connection.params.xpath == tap) {self.render404 (API, connection, next); } Else {var file = api.config.general.paths.public + '/' + connection.params.xpath console.log (file); Fs.exists (file, function (found) {if found} {self.renderFile (API, connection, next);} and {self.render404 (API, connection, next);}}); }} Do I have any settings or configs? Everything looks right for me in the empty ActionHero project, I can use the action given below Am and http: //

ide - JavaScript Intellisense -

Is there an IDE with a fully documented base library? I mean objects like "console" and "window"? I want to see a tooltip with the details of the object and its functions, but it does not have IDE. I have checked VS 2013 and it only provides intellisense.js files for jquery and some other popular libraries. I checked webstorm 8 and this is the only thing is an important feature for beginners. I'm astonished. Under the NetBeans column, HTML5 & amp; PHP

mysql - Android: Error Converting string to JSONObject -

I am trying to retrieve data from my database as JSON, and with that result JSONObject Which then sets up a Textview. Here is the code: Private class ShowDBActivity3 AsyncTask expands & lt; Zero, zero, string & gt; {Secure string doInBackground (zero ... voids) {string = ""; ArrayList & LT; NameValuePair & gt; NameValuePairs = New ArrayList & lt; NameValuePair & gt; (); NameValuePairs.add (New BasicNameValuePair ("username", user name)); {HttpClient httpclient = Try New DefaultHttpClient (); Http post httppost = new HTTP post ("url"); Httppost.setEntity (new UrlEncodedFormEntity (nameValuePairs)); HttpResponse response = httpclient.execute (httppost); HttpEntity unit = response.getEntity (); Is = entity.getContent (); Logs. E ("pass 1", "connection success"); } Hold (exception e) {Log.e ("failed 1", etsting ()); Toast. Make Text (getApplicationContext), "Invalid IP Address", Toast.LNN

performance - Overhead of rethrowing Java exception vs. using instanceof/cast -

I know that the overhead of Java exceptions has been done to death on SO, but I did not know anything Was addressing my situation. I have a future, which can put an execution exception () on the call, in which any application-specific exception occurs. I was wondering if it is an important overhead to use the effort-catching block rather than the example-then-cast pattern. For example, this might look like this: Private response handle exception (execution exception e) throws my excuse to remove {try {throw e.getCause (); } Hold (ApplicationException1 e1) {// known error MyApplicationException.convert (e1); } Hold (ApplicationException2 e2) {// Create error response Return new response (E2); } Hold (Throne T) {// Unknown Error New Runtime Exception (T) Throwing; }} Personal feedback handle exception 2 (execution exception e) MyApplicationException throws {throwable cause = e.getCause (); If (ApplicationException1 for example) {ApplicationException1 e1 = (ApplicationException1) r

php - Trim a full string instead of using trim() with characters -

While using a specific delimiter in the data string, I often want to trim it to the final example before exploding. I have always thought of this: PHP trim () will skip the white space or some characters but if I want to trim the whole string: $ data = 'cookieDELIMITERchocolateDELIMITER'; $ Data = trim ($ data, 'DELIMITER'); The above will not actually work, because this will not trim the string "DELIMITER", rather instead "D, E, L, I, M, T, R". What I need is: $ data = 'cookieDELIMITERchocolate'; I appreciate your suggestions! $ data = 'cookie DELIMITER chocolate DELIMITER'; $ Data = preg_replace ('/ ^ (DELIMITER) * | (DELIMITER) * $ /', '', $ data); Var_dump ($ data); // string (24) "cookie DELIMITER chocolate" The regular expression 0 + ( * ) matches the beginning of "DELIMITER" ( ^ ) or string ( | ) of the string ( $ ) will take these matches and replace them wi

python - Django Custom Admin Block For center of admin -

So I'm overriding change_form.html to add some features to my admin page. Everything is working fine, I am currently using the "after_field_sets" block, but I want to put content between this field in my field_sets, not after that. I set the field above and below the new set, but I can not understand which block is used to put them in the middle of field sets. There is a list of all blocks text "> After reading the code referenced by the link you posted I reached the conclusion that the block you are looking for does not exist in it called content There is a block but more than just that "main content" but this is not the end of the world, you still have to make the template IR order to "make some space" for your content. Remember Padit can. And very important, keep in mind that you can css and js edit files as well.

mysql - SQL Count Columns in Row Equal to Specific Value -

I have a registration table in which many columns have values ​​like "in progress" or "submit". I am trying to count how many of these columns are equal to "submitted", so I can set a percent completion for the user. Returns the query below only 1 or 1 because it only asks one column, but how can I include others? For example, I should count how many of the following columns are "submitted" or "acceptable": network_user_status work_ed_status chores_status class_schedule_status registration number (ID) with registration WHERE user name = "Ajaxan" and nomination_progress_all = "approved" or nomination_grad_state = "submit" firstly , Your query is not doing what you think is doing it. Username condition is only applying for "Approved" I'm pretty sure that you mean: WHOSE username from registration = 'ajaxen' and ' Nominated ',' Submit '' 'from nom

debugging - VHDL Code for Binary Division bug -

I have written the code for a binary dividend that takes in 8 bit dividend, 3 bit divisor, and 5 bit quotient ( 3 bit balance) I have spent hours trying to fix a bug that gives wrong results but I did not recognize it. Any help would be greatly appreciated! I basically get the wrong answer for my inputs, but I do not understand why a bus is taking the values ​​and on the first clock cycle where there is St 1, the dividend register is filled. After the second clock cycle, the separator register is loaded and calculated for the next three clock chakras. The V signal indicates that an overflow has occurred (the result can not be fit in five pieces of the quotient), my sign is the starting signal to start the process, for registering shifts Shift is the signal, subtraction is subtractor for subtraction signal. Library IEEE; Use IEEE.STD_LOGIC_1164.all; IEEE.STD_LOGIC_ARITH.all; Use; Use IEEE.STD_LOGIC_UNSIGNED.all; Unit dividers port (bus_in: std_logic_vector (8 down down); cents,

configuration - What's the appropriate strategy to remotely assign static IP addresses to a bunch of embedded devices in an un-managed network -

My company is currently developing an embedded device running uClinux, in both non-managed and managed networks Should be deployed. We are looking for the best strategy to assign static IP addresses (and subnet masks) to those devices (from Windows computers on the network) when no DHCP (or BOOTP) server is available and Saves those values ​​for a configuration file in the device. This strategy should be avoided using SSH, Telnet or any similar interface. The device will be set with factory default IP address and netmask (such as some object like 19 2.168.1.1). Ideally, Strategy Woudel also enables us to activate or deactivate DHCP support in those devices. MAC addresses of devices will be given a known information that can be used in any device running on any Windows computer. Does anyone know that there is a standard way to do this? Any recommendations for ensuring potential future portability on the other platform are more welcome than UCILLINX. A combination of standard s

install - Python requests library -

I'm not familiar with all of Python, but I'm trying to write a simple script to scrape NYTimes articles . I started using urllib2 and received 403 errors and I do not know what header configuration can do. So I thought maybe using the request library would be better. I have installed it from the general: python setup.py install . Should the code be specially anywhere? I keep it in a temporary directory and believe that it will set up my right place in Python 33 installation. When I try: import request I get, among other things ,: Code> importError: any module is not named 'requests.packages.urllib3.util' Any ideas? Most of your errors are likely because requests require additional libraries is. Try setting it up pip install request Take a look at this:

javascript - All buttons in list returning same ID -

I have several buttons in one line, with all classes add-btn . When you click on one, I want to login the ID of my encoding span. However, what do I know is that all the buttons are logged in the first add-btn in the list. $ ('add-btn') ('id'); $ .ajax ({type: "post", url: "http: //www.domain.com/includes/follow.php", data: {id: id, shop_name: shop_name}, success: function (data) { Console.log (data);}});}); follow.php: $ shop_name = $ _POST ['shop_name']; Var_dump ($ shop_name); change $ ('add-btn') $ (this) inside click signaling. $ ('add-btn'). Click (function () {var shop_name = $ (this) .classest ('span'). Attr ('id'); $ .ajax ({type: "post", url: "http: //www.domain .com / include / follow.php ", data: {id: id, shop_name: shop_name}, success: function (data) {console.log (data);}});}); What you are currently doing is the first .add-btn id.

storage.objects().compose() not working -

I am using the GCS JSON API via Java. To insert objects, delete my objects, objects, copy objects do all great work, but for some reason I can not get the storage. Oject () Compose () does not matter if I get 400 or 500 errors for working. Even when I'm going to use the "try it now" feature to write on the Google website, then I get the same error. I should have something unmatched. Here is my code: collection object metadata = new storage object (). SetMetadata (ImmutableMap.of ("OriginalFileName", OriginalFileName) .setContentType (contentType) .setAcl (ImmutableList.of (New ObjectAccessControl). SetEntity ("allUsers"). SetRole ("READER")); // List for list of lists & lt; SourceObjects & gt; SourceObjects = New Arraylight & lt; Source objects & gt; (); {SourceObjects.add (New Source Object.) SetName (objectName + "Spry" + i) for (Int i = 0; i & lt; = chunkNumber; i ++); } Composerext Compose Reich = Ne

vba - How to specify a different file path for a saved Excel import -

I use the doCmd.TransferText to use a saved text import specification several times However, I think that I select a file to select that file from a application.FileDialog (msoFileDialogFilePicker) file Can easily save the path. One way to do this with Excel file is to save the Excel import specification, but there is no way to use saved import using the DoCmd.TransferSpreadSheet method. There is no option to specify a file path in addition, as well as DoCmd.RunSavedImportExport . Is there any work for this except for using any other file type (for example .csv) CurrentProject.ImportExportSpecifications Collections are stored in the ImportExportSpecification items stored in the "saved item import" and "saved export" and "saved export" access excel import Details of something like the following XML will appear, which I manually import excel spreadsheets and the end of the import wizard "Save import steps to re page created by"

ios - How to change UITableViewCell Image to Circle in UITableView -

My code works for the most part. The problem I have is to start the image as a square, and when I scroll to the table or refresh it then the cycle changes. What am I missing? Here's my code: cell .imageView.layer.cornerRadius = cell.imageView.frame.size.width / 2.0; Cell.imageView.layer.borderWidth = 3.0; Cell.imageView.layer.borderColor = [UIColor colorWithRed: 157.0 / 255.0 Green: 34.0 / 255.0 Blue: 53.0 / 255.0 Alpha: 1.0] .CGColor; Cell.imageView.clipsToBounds = Yes; NSDictionary * tweets = (auto-result) [indexPath.row]; Dispatch_queue_t queue = dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_async (queue, ^ {NSString * imageString = [View valueForKeyPath: @ "user.profile_image_url"]; NSData * imageData = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: imageString]] ;! if (imageData = null) {dispatch_async (Dispatch_get_main_queue (), ^ {cell.imageView.image = [UIImage imageWithData: imageData]; [cell setadleslayo

django rest framework - What's a simple way to raise ValidationError in action-decorated method? -

I think my decoration work may be able to increase the validation error in some cases. How do I return 400 error with json in a simple way, or at least error? OK, I thought it: I should take an APIException, which enclose detailed message in Jason is.

java - equals on objects that contain different types of collections -

I have an object that looks like this (I am just using the equivalent of just my equals and hashod Method): Public class micro {private collection & lt; Integer & gt; Integers; Private collection & lt; String & gt; Wire; // Gates and Sets ... @ Override Public Boolean Parbar (object o) {if (o == this) {returns correct; } If (o == blank = getClass ()! = O.getClass ()) {return false; } MyClass = (MyClass) o; Return objects. Equal (integer, that.integers) & amp; Amp; Objects.equal (strings, strings); } @ Override Public Ent Hashod () {Objects Returning Objects (Strings); }} The issue I am running is a code that essentially does this (this would be a normal test case): / / Product is a new example of MyClass that the user ArrayLists MyClass expects = new MyClass (); Expected.Set Integer (Arrays.asList (1, 2, 3)); Expected.Setting (Arrays.asList ("a", "b")); // I do not normally create the actual object, // but I have included the code so

mysql2 - Get ActiveRecord MySQL Query result as a hash, not array -

एक mysql क्वेरी को ActiveRecord के साथ Class.connection.execute ('query here') के साथ चलाते समय , परिणाम सरणी है, क्योंकि पोस्टग्रे में एक हैश के विरोध में। यह mysql और mysql2 एडेप्टर के साथ परीक्षण किया गया है, भले ही mysql2 के लिए डिफ़ॉल्ट क्वेरी परिणाम को हैश के रूप में वापस करना है। मैं कैसे एक हैश के रूप में क्वेरी परिणाम लौटने के लिए कनेक्शन पर कॉन्फ़िगरेशन विकल्प बदलने के लिए ActiveRecord प्राप्त कर सकता हूं? क्या मैं इसके लिए ActiveRecord का उपयोग नहीं कर सकता और मुझे कच्चा mysql2 ग्राहक का उपयोग करना चाहिए? मुझे एक ऐसी ही समस्या थी और मुझे इस पर समाधान मिला: आप data = Class.connection.exec_query ('query here') कर सकते हैं एक प्राप्त करने के लिए फिर, आप एक हैश के लिए data.first कर सकते हैं या डॉक्स में उल्लिखित किसी अन्य विधि का उपयोग कर सकते हैं।

multithreading - Difference between multi-core and hyper threading -

I am trying to understand the obvious similarities in the processor, but how the multi-core processor Concepts vary in concept from Symmetrical Multi Threading (Marketing as hyperthreading). Multi-core There are several physically separated processor cores on the same chip in a multi-core processor. Here only one chip is used so it is cheap Chip contains additional I / O registers. There may also be hyper-threading in multi-core processors.

iOS and Cordova for geolocation tracking and monitorSignificantLocationChanges and other questions -

I write a Cordova plugin for background tracking in iOS, I understand the following: I use startupdatingLocation to begin tracking This location will send that my app is in the foreground or in the background if I have background Take a moment to position and process it, iOS For this reason I will also use startMonitoringSignificantLocationChanges Slia if my app is executed will open IOS then didFinishLaunchingWithOptions That's right? I also have two other questions: Monitoring important location changes I call startMonitoringSignificantLocationChanges If killed then my app relaunches. I have read that in this case, the latest position method has been given in the given options, but to keep the geographical location again to both startupdating location and startMonitoringSignificantLocationChanges Calling is coming, is this right? In addition, if we have to call startupdatingLocation , and (I assume) it creates a new call to the location handler

c++ - Couldn't match the template method using boost enable_if -

#include & lt; boost / type_traits.hpp & gt; #include & lt; boost / utility.hpp & gt; नेमस्पेस बूस्ट का उपयोग करना; सर्रिअलजैबेट {}; स्ट्रक्चर्ड व्युत्पन्न: सीरियलज़ेबल {}; क्लास सीरियललाइज़र {सार्वजनिक: टेम्पलेट & lt; typename ValueType & gt; शून्य ऑपरेटर & amp; (कॉन्स्ट टाइनामनाम सक्षम_इफ & lt; is_base_of & lt; सीरियलाइजबल, वैल्यू टाइप & gt;, वैल्यू टाइप); टाइप और मान) {; }}; Int main () {Serializer serializer; व्युत्पन्न तार; धारावाहिक और amp; टार; वापसी 0; } मैं जी ++ 4.4.7 का इस्तेमाल कर रहा था, जिसने मुझे एक संकलन त्रुटि दी: त्रुटि: 'ऑपरेटर' के लिए कोई मेल नहीं 'सीरियलाइज़र' में; टार ' कैसे विशेषज्ञता बनने के लिए? सही साइड मान ऑपरेटर का & amp; प्रकार का होना चाहिए ValueType इसलिए, enable_if भाग एक (नकली) परिणाम प्रकार बनाएं: #include & lt; boost / type_traits.hpp & gt; #include & lt; boost / utility.hpp & gt; नेमस्पेस बूस्ट का उपयोग करना; सर्रिअलजैबेट {}; स्ट्रक्चर्ड व्युत्पन्न

xamarin.android - Background of ActionBar in mono android -

I'm referring to the example. I want to use Fragment Change Activity from this example in my app. I only want to tie the background of the actionbars for this activity, but I want to keep different background colors for this activity's executive and sliding frame. How can I make a topic for this activity? Simply use: ActionBar.SetBackgroundDrawable (); You can not change the entire theme for the activity on the runtime without reloading the app However, ActionBar is sufficient for SetBackgroudDrawable Should you want to change the appearance of ActionBar

python - How to use scikit-learn to predict the rate of change in a site's hit counts -

I want to predict the change in the hit count of a website, using the rate of change. For example, if the site hits a couple of times (5,000 to 10,000 in a day), the rate of change is 2. If the hit increases to one half (5,000 to 7,500), the rate of change is 5. The rate of sampling and change will be calculated daily. I am fine with using raw hits instead of change rate, but it seems more difficult to work with. I want to learn science-less to predict the change in future rates. Looking at a set of previous data points, how do I predict future changes? Should I Use A Logistics Regression? A vector vector machine? anything else? Thank you for your help! I am new to know more about science - learning, so feel free to comment. Edit: I forgot that you were looking for scalin solution, but I think that Simple weighted moving average can be a good start. I usually try to start something simple and only if they do not give me the desired results and go to more complex things.

Get Comment HTML For Ajax - Wordpress -

I have set up an AJAX request to submit a comment (based on the tutorial) and I at least Retrieve a comment as a JSON set using get_comment ($ id, $ output); But even better, I want to use normal HTML Just said how get a comment with HTML, nothing else ?

ruby on rails - Add ssl certificate on heroku -

I am trying to add an SSL certificate to my password, but I am still showing this message. Text "itemprop =" text "> Default error message if something goes wrong with add / update certificate call in Headoco. This may be some misspellings or wrong orders. / P>

asp.net - How to pass checkbox id inside gridview from vb.net to javascript -

I have Gridwu which box I header and item templates to pass I now I check ID vb JavaScript Want this as follows. Protected Sub RowDataBound (ByVal as the object, as ByVal e GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow then dim headerchk new checkbox headerchk = DirectCast (gridview.HeaderRow .FindControl ( "chkheader"), box) dim childchk Czech box = DirectCast as (e.Row.FindControl ( "chkRow"), box) as childchk.Attributes.Add ( "onclick", "javascript: Selectchildcheckboxes ( '' + headerchk.ClientID + '') ") 'but this line gives me error finally end Sub will JavaScript function, <> function SelectheaderCheckboxes (Headerchk) ​​pre {i F (headerchk.checked) {// code}} I'm getting error "object not set for an instance of an object". Instead of adding attributes on the server side, at the top of your javascript while adding and designing the onclick event Add the follow

javascript - How to smooth this search bar animation -

I tried to modify the code that I took for the use of my use: CSS: < / P> .search-bar {width: 200px; display none; } .searchbox {display: inline;} .trigger {display: inline} HTML: & lt; Div class = "search-bar" & gt; & Lt; Input type = "text" name = "s" class = "search box" value = "search" onfocus = "this.value = ''" & gt; & Lt; / Div & gt; & Lt; Button class = "trigger" & gt; Search & lt; / Button & gt; js: $ (document) .ready (function () {$ ('trigger'). "(Function () {if ({:: 'Search-bar "). ($:' Search-bar '). Animate ({width:' toggle '}). CSS ({' display ':' inline ' }};} And {$ ('search bar'). Animate ({width: 'toggle'}). CSS ({'display': 'inline'});}});}); It does the required work, but animation is not easy how to make animation flow smoothly.