Posts

Showing posts from May, 2010

html - How to make "configurable directives"? -

Say I have directive elements: & lt; Monkey-grid & gt; & Lt; // Monkey Grid & gt; Now, say that I want to include some "options" so that monkey-grid.tpl.html render in a specific function, and reuse it in different circumstances. can be done. & lt; Monkey-Grid Tabbed & gt; & Lt; / Monkey-grid & gt; & Lt ;! - Also tried - & gt; & Lt; Monkey-Grid Tocked = "True" & gt; & Lt; / Monkey-grid & gt; Then in my monkey-grid template, I want to do something like that, but it does not work, even if I have set it on the lie (hence the original element remains). I just want to show the appropriate div. & lt; Div & gt; & Lt; Div ng-show = "tabbed == true" & gt; Tab & lt; / Div & gt; & Lt ;! - Also tried - & gt; & Lt; Div ng-show = "vertical" & gt; VERTICAL & lt; / Div & gt; & Lt; / Div & gt; Is there a better way to create "c...

javascript - How Select text on mouseover and then put it into a variable for further use in php -

I need to fix as the web page When you hover over a paragraph , Has been placed in block variables with a share button and paragraph text. Can anyone help me with this? Here's what I got, but I do not understand why it does not work: $ ('. Line'). Hover (function () {$ ( '. Line'). RemoveClass ( 'hover'); $ (this). AddClass ( "hover"). Next (). AddClass ( "hover"). Next (). AddClass ( 'Hover'). Next (.) AddClass ('hover');}); $ ('. Line'). Hover (function () ($ ( '. Line'). RemoveClass ( 'hover'); $ ( "# shared-image"). Attachment (it); KappendTo ( "# Destination"); $ (this). addClass ( 'hover'). next (). AddClass ( 'hover'). next (). AddClass ( 'hover'). next (). AddClass ( 'hover');}); CSS: .line.hover {background-color: # 3333FF;} when you mouseover to get a group of speaking is applied to offset relative to the contai...

java - Convert an entrySet to an array -

मैं एक map & lt; स्ट्रिंग के entrySet () को परिवर्तित करना चाहते हैं, ऐप (या अर्रेइस्ट) के लिए आंकड़ा> । मानचित्र। प्रविष्टि & lt; स्ट्रिंग, सांख्यिकी & gt; [ ] प्रविष्टियां = स्टेटमैटिकमैप.इनट्रीसेट ()। ToArray (नया मैप। प्रविष्टि & lt; स्ट्रिंग, सांख्यिकी & gt; [0]); लेकिन यह कंपाइलर त्रुटि देता है: "नक्शा का एक सामान्य सरणी नहीं बनाया जा सकता है।" यहां तक ​​कि यह एक ही त्रुटि के साथ काम नहीं करता है: मानचित्र। प्रविष्टि & lt; स्ट्रिंग, सांख्यिकी & gt; [] प्रविष्टियां = नया नक्शा। प्रविष्टि & lt; स्ट्रिंग, सांख्यिकी & gt; [1]; लेकिन यह काम करता है: मानचित्र। प्रविष्टि [] प्रविष्टियां = नया नक्शा। प्रविष्टि [1]; कोई भी विचार कैसे इस तरह के एक सरणी या सूची बनाने के लिए? कोई भी विचार कैसे इस तरह के एक सरणी या सूची बनाने के लिए? आप ऐसा कर सकते हैं, हालांकि यह बदसूरत है। Map.Entry & lt; स्ट्रिंग, आंकड़ा & gt; [] प्रविष्टियां = (नक्शा। प्रविष्टि & lt; स्ट्रिंग, सांख्यिकी & gt; []) ...

scheme - Why do nested applications of cons construct improper lists? -

Do the nested apps of disasters create inappropriate lists? I am learning the plan and confused about it cons I have come to this answer: I know that when opposition is a list, then it adds the first logic to the top of the list (Opposition 1 (list2 3) => (1 2 3) I understand the following pair: (cons 2 3); 2.3 pair although I understand Can not find why the following expression creates inappropriate lists (1 1 2 .3); An inappropriate list I just can not express what is happening with the expression above Can you please expand on that? The illusion you are experiencing It's not unique. Just signaling is all this, and until you learn that notation, everything is confusing. First of all, let's begin with the proper lists. There are lists which are empty Chi would end with: (cons 1 (cons 2 (cons 3 '()))); = & Gt; (1 2 3) This list is a short story for (1 2 3) , indeed (1 2 3) : Originally a list where the last cons indicate...

Hibernate lucene search collections and enums -

I'm trying to implement a search feature in my application using Hibernate Search (Lucene). Simple searches are working correctly on string fields, but now things are more complete .... I hope you can give me some hints or samples. I have the following entities ... @Entity @ induced public class childclose {@Enumerated @Field (index = index.YES, analysis = analyze.YES , Store = store.YES) private enumetected eum type; .... // Hotter Setter} ============================== ========== @Entity @ Indexed Public Class Pantaclass {@ Index Embed List & lt; ChildClass & gt; children; // greater setter ...} =============================== ========= public enum EnumType {a, b, c} ========== ===================================== Now I search for example And try to find out: "Get a list of parents who have children. Child.enumtype = a" Can I do with the original SQL queries? You do not have to use @indaxed embedded on this code - I think y...

Refresh include page that load using forEach propertie in ZK framework -

I have to refresh the page in the included tag, but it is dynamically using it for every asset, it is my The code snippet is: & lt; Button onClick = "... include refresh page ..." /> & Lt; Tabbed ID = "TB" Orient = "vertical" & gt; & Lt; Tab & gt; & Lt; Tab; ForEach = "$ {vm.columnList}" label = "$ {each}" hflex = "true" /> & Lt; / Tab & gt; & Lt; Tabpanels & gt; & Lt; East = "$ {vm.columnList}" & gt; For TabPanel & Lt; Height = "90%" rc = "/ campaignss.zul" RCA = "$ {each}" date = "$ {vm.date}" /> & Lt; / Tabpanel & gt; & Lt; / Tabpanels & gt; & Lt; / Tabbox & gt; I want the button to be pressed when the button is pressed, the whole page will not reload, the whole page will not try to use the ID to use the invalid function, but the page An error is returned with the repeated ID using...

javascript - Angular: How to access parameters outside of $timeout callback? -

मेरे पास इस तरह एक टाइमआउट पाश है: var somedata = {autoRefreshInterval: 300, AutoRefreshInSec: 300, myTimeout: रिक्त, doRefresh: _doRefresh, onTimeout: फ़ंक्शन () {this.autoRefreshInSec--; अगर (this.autoRefreshInSec & lt; = 0) {this.autoRefreshInSec = this.autoRefreshInterval; this.doRefresh (); } This.myTimeout = $ टाइमआउट (this.onTimeout, 1000); }, StartTimer: फ़ंक्शन () {this.autoRefreshInSec = this.autoRefreshInterval; This.myTimeout = $ टाइमआउट (this.onTimeout, 1000); }, स्टॉप टायमर: फ़ंक्शन () {$ timeout.cancel (this.myTimeout); },} ऐसा प्रतीत होता है कि "यह" ऑन-टाइमआउट कॉलबैक फ़ंक्शन के अंदर काम नहीं करता है, जबकि यह startTimer और stopTimer के लिए ठीक काम करता है। इसे ठीक कैसे करें? अद्यतन करें: चूंकि यह नीचे दिए गए उत्तरों में से एक के आधार पर इन-टाइमआउट के अंदर खो गया है, मैंने इसे इस तरह से पास करने की कोशिश की: ऑन-टाइमआउट: फ़ंक्शन (स्वयं) {self.autoRefreshInSec--; अगर (आत्म। AutoRefreshInSec & lt; = 0) {self.autoRefreshInSec = self.autoRefr...

javascript - When can I user Meteor.call synchronously? -

The documentation says Finally, if you are inside the stub on the client and call Another method, the other method is not executed (no RPC is generated, nothing is "real"). If the other method has a stub, then the stub stands for the method and is executed. The return value of the method call is the return value of the value stub function. Client has no problem executing the stub with synchronous, and so it is okay to use the synchronous Meteor.call form from within a method body as described earlier in the client. But I do not know what it means, what is a stub? How can I run it in a stub? Is an Event a Stub? You can only use meteor.call synchronously on the server. A 'stub' is a Meteor.methods that runs on the client side. Usually it runs on server side. When it runs on the client, it does not really do anything, which is why it is a stub. It can be useful to simulate which can delay the effect of the compensation. For example you Meteor.cal...

debugging - IOS In App Purchase never leaves active state -

I have an app purchase in Swift with hosted content No errors. My download queue is as follows: function paymentQueue (line: SKPaymentQueue!, UpdatedDownloads download: [AnyObject]) {To: Download showed AnyObject {if degrade: as SKDownload = download? Download encode {switch down downstatestate {case}. Active: NSLog ("active% @% @", down progress, downtime remanning) break case. Canceled: NSLog ("% @", "Cancel download") break case. : NSLog ("% @", "Download Failed") productTitle.text = "Download Failed" break case. End: NSLog ("% @", "Download Finished") var source = down.contentURL.relativePath var path = NSBundle .mainBundle () pathForResource ("Config", ofType: "plist") on dict = NSDictionary (contentsOfFile: source.stringBeeAppendingPathComponent (Path)). If dict.objectForKey ("files") {SKPaymentQueue.defaultQueue () finishTransaction (Down.transaction) return} if i...

automation - Schedule automatic daily upload with FileZilla -

I want to use FileZilla to automatically upload PDF to the site of my goddess hosted, the previous day's By changing the sheets, is there any way to do this? I have read online that batch files can work, can someone post a sample version of a batch file that does the trick? FileZilla does not have any command line arguments (nor any other way) that will allow automatic transfers Allows Some references: However, Any other customer can use that allows automation. You have not specified, what protocol are you using an FTP or a SFTP? You will definitely be able to use WinSCP because it supports all protocols that FileZilla does (and more). SFTP) looks like: open sftp: // user: password@example.com/-hostkey = "ssh-rsa 2048 xx: xx: xx: Xx: xx: xx ... "C: \ mypdfs \ *. With FTP, simply replace sftp: // with Ftp: // and --hostkey = "..." delete the switch. WinSCP 5.9 can also be from one. For details, see. (I'm...

titanium - Invalid type passed to a function while trying to open a view -

Then I have simple tabbed titanium mobile application using alloy I have a new view through a button in the tax tab Trying to open: index.xml (see) & lt; Alloys & gt; & Lt; TabGroup & gt; & Lt; Src = "taxes" /> & Lt; / TabGroup & gt; taxes. Xml (see) & lt; Alloys & gt; & Lt; Tab id = "taxes" title = "taxes" icon = "number of taxes" & gt; & Lt; Window title = "tax" square = "container" & gt; & Lt; Down Toolbar = "0" & ​​gt; & Lt; Items & gt; & Lt; Button ID = "newcomer" title = "new record" onClick = "newreord" & gt; & Lt; / Button & gt; & Lt; / Item & gt; & Lt; / Toolbar & gt; & Lt; / Window & gt; & Lt; / Tab & gt; Tax. (Controller) var args = arguments [0] || {}; Function NewCord () {var new_record_view = Alloy.createController ('newrecord...

jquery - Understanding javascript arrays -

I'm quite new to JavaScript, and I'm not sure that I fully understand that with the code snippet below What's happening: if ($ ("filter-mark"). Length == 0) return; So I understand the if statement, but the part I can not fully understand is $ (". Filter-icon" ) is. Length . After going through the document I am a bit confused. How is $ (".filter-mark") an array? I thought it was just a thing that was a filter-icon class associated with it. I apologize for the original question, but I am very confused with this and it is difficult for Google with punctuation. This: $ (". Filter-icon") - A jQuery function call. The return value is actually not an array, but it does have the length property that is the length of the result of the call The point of the code is whether it is to check whether any element in the dom has a "filter-mark" class. It is not that Javascript is not unusual for program...

java how to convert string to icon to do setIcon -

मैं स्ट्रिंग spath को setIcon में डालने का प्रयास कर रहा हूं। पथ पहले से ही स्ट्रिंग के रूप में सहेजा गया है, ऐसा लगता है कि C: \ Users \ Aron \ Desktop \ 220i.jpg तब मैं सेट आइकन का उपयोग करके यह स्ट्रिंग पथ imagelabel.setIcon (spath) यह दिखाता है कि स्ट्रिंग आइकन में कनवर्ट नहीं कर सकता। मुझे इसे ठीक करने के लिए क्या करना चाहिए। इस बात को मौजूदा पथ का उपयोग करने की आवश्यकता है जो पहले से स्ट्रिंग में संग्रहीत है। मुझे क्या करना चाहिए? आपको पहले छवि लोड करने की आवश्यकता है ... बुफर्ड इमेज आईएमजी = इमेजओ। रीड (नई फाइल ("सी: / यूज़र्स / एआरओ / डीस्कटॉप -220.एजीपीजी")); nb: ImageIO.read एक IOException फेंकता , यह बहुत जानबूझकर है, क्योंकि यह अन्य छवि लोडिंग विधियों की तुलना में बेहतर प्रबंधन प्रदान करता है फिर आपको इसे ImageIcon class ... ImageIcon icon = नया ImageIcon (img) में लपेट करने की आवश्यकता है; तब आप इसे setIcon ... imagelabel.setIcon (आइकन) पर भेज सकते हैं; अधिक जानकारी के लिए और अधिक जानकारी के लिए एफवाईआई: सी...

wordpress - Get product permalink by product name ,Woocommerce -

I am trying to get Woocommerce product permit by the given product name, I know that given me this way Permalink can be found by product ID: $ url = get_permalink ($ product_id); But I can not find any code to get it by product name. I tried to do this: $ url = get_permalink ('title'); This does not work please help. This code works for me $ product = Get_page_by_title ('Product title', object, 'product') getchoermink echo ($ product-> ID);

ruby - Content-Type "application/json" not required in rails -

I have an API endpoint in the train, by default if you have a content-type header process in the parameter application / x-www-form-urlencoded Is there a way to take action on json string in the rail by a post request without specifying content type Article? In your routes.rb file you can post a namespace Define the format for the inner path and expectation of this type: Namespace: API, Default: {format :: json} Post 'Example' = & gt; 'Admin # Action' End In this case you will post your Jason Payload on '/api/example.json' and should not define the content-type. You may be able to define it for only one post line, but I have not tested it.

What is the Sherwood binary search algorithm in Java? -

I made my final decision on Java programming on Monday and passed it. I got a hard copy of the grade today and my instructor said that I should have used Sherwood binary search algorithms instead of regular binary search. Does anyone have a template for this algorithm? I have tried to search the web for this, but this does not mean just a copy of a real template or copy, so I can run it. Thank you Necromancer I had to do this work and see why he wants it. Sherwood Algorithm is a modified version of standard binary search. Search algorithms always have the best case scenario and the worst case scenario. When binary search is performed then there are always some places, which need to be failed to check. This number of unsuccessful investigations will vary greatly depending on the number of elements you are looking for. The argument due to these failures is due to the original description of a binary search: medium = (first + last) / 2; The main statement behind the Sherw...

html - How to keep my navigation stick to the top? -

I'm trying a different tutorial how to get my newbie stick at the top while not scrolling but receiving it To work: / I'm having trouble on this page: Thanks for helping me on this! Try this: #header {position: fixed; Top: 0; Left: 0; Correct: 0; }

Android distribute data in a ListView -

I'm having difficulties spreading data on ListView As the list matches: list (string category, string name, string description, string address) and I have list.add ("Drink", "Water", " Fresh Water ", false) is a list. Add ("Food", "Burger", "Homemade", False) ("Drink", "Cola", "8oZ", etc.) ... etc. .add now ... Now, when I call the adapter, the GetView method is called. I implemented it in this form: Public Class EntryRestaurantAdapter ArrayAdapter and lt; RestaurantMenu & gt; {Private context reference; Private Arrestist & lt; Restaurant Menu & gt; item; Private layoutInflator Wi; Private static final integer TYPE_SECTION = 1; Private static ending end TYPE_ITEM = 2; Public listing restoria adapter (reference reference, ArrayList & lt; RestaurantMenu & gt; items) {super (references, 0, items); This.context = context; this. Item = item; Vi = (Layout Inflato...

Set individual character/words to different font in Vim(e.g increase the font size of first word of a sentence) -

In the vim, we can set different fonts with command: set I would like to know whether we can set different fonts such as color highlight syn match mykeyboard / board \ W \ + / highlight Mykeyboard guifg = Green Content and title of your question are actually does not match . Anyway ?? | No, it is impossible to use more than one single font and a single font size at a time. The best you can get is bold or italic but it works only in the GUI Vim.

c# - Set row color of Telerik RadGrid -

I am using RadGrid to display data from the database I want to change the red color to red in RadGrid If the status column is displayed as "Disapproved" in the Status column, if the position is null then the row will be displayed as color white. I have tried this code, but the row still does not change red color. {{TableCell cell = (TableCell) dataBoundItem ["status"]; (== dataBoundItem ["status"]. Cell. Backallore = System Drawing Collar Red; DataBoundItem.BackColor = System.Drawing.Color.Red; If (e.Item is GridDataItem) {GridDataItem dataBoundItem1 = e.Item as GridDataItem; If (dataBoundItem1 ["status"] text = null.!) {Cell.BackColor = System.Drawing.Color.Red; DataBoundItem1.BackColor = Color.Red; Databoundime 1 ["Status"] ForeColor = Color.Red; DataBoundItem1 ["Status"]. Font.bld = true; }}}} {} Try something like this: Using the system. Drawing; Secure Zero RadGrid1_ItemDataBound (Object Sender, Telerik.We...

Greasemonkey script to remove parameters from youtube url's -

I do not know anything about writing scripts ... but I'm from YouTube Link & amp; List = parameter, or on the page where you watch the video, preferably both. Then it will become. You can do it in the address bar and get rid of the "uploads" from the "_USER_NAME_" playlist, but one script will be faster and easier. The US has researched me around the web and found the example script to change the parameter, but did not remove them, and my efforts to change them in my purposes have failed. This is my latest attempt: if (window.location.pathname.match (example.com)) {var url1 = url + .split ("& amp; ; ", 1); Window.location.replace (URL1); } And {var theurl = document.URL; Var link, thisLink; Links = document.evaluate ("// a [@heref]", document, blank, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, empty); (Var i = 0; i & lt; links.snapshotLength; i ++) {thisLink = links.snapshotItem (i); If this (theLink.match (thisLink) theurl...

how to code a for loop using a 2 dimensional array -

I am just learning Java and participating in a problem while completing an assignment. I need to use for the loop, but I have uncertainty about proper coding. I was able to compile my code to get the output for the first challenge, but I am unable to do this for the remaining challenges. Any tips / tips are greatly appreciated / Your trainer is in the bind, instead of his work, a new // technology project has been established, which will require remote access verification. // In addition to his username and password, he will have a "challenge" // Every sign-on will require that challenge that it depends on a number or / or letter that asks the security application. // But your instructor is lazy he wants an application that will tell him what he is / without telling them that without the proper numbers, what should they do to do them // should be shown every time. He understands that this film will help // remote hackers, but he does not want to be trapped in carrying ...

node.js - Adding PartitionKey propery when inserting an entity in Azure table storage for nodejs -

Image
This call is more for help with an exception when calling insertEntity () . I am using Nodejes at Ezur and editing in Monaco, and NPM has installed the latest version of blue storage. The exception I get is: (full stack trace below) Unneeded exception: Error: parameter unit Disk. For the Partition function unit, an object must be on the ArgumentValidator ._ extend.object I basically save my object and to create 2 new properties: PartitionKey And making RowKey . I value them string I am I am not using the unit generator because there are no samples here, whereas the Ezur node is the examples present on the Developers portal. I would not mind using the unit generator on storage-specific properties, but samples of node azar gitob repo suggest that you can use simple strings. The unit generator looks a bit ugly and cumbersome, because when you bring it back you need to do extra code around the unit. How can I adjust my code to solve this problem and call entry entity (...

c# - Can we use HttpHandler and HttpModule to change the content page div from the Master page? -

In my application, I'm dynamically creating a navigation menu when I click on anchor tag, Refers to, I want to capture anchor tags text and display it in a single page in the content page. How can I get it? Can it be done through HTTPHanders? Or do I need to see something ??? help please. Believing that you want your divider to look different or different places for each content The page you are located on and whatever you want to display in that device is the page URL that you can solve using a simple script which you can add to your master page: document.onload = function () {var TitleDiv = document.getElementById ("titleDiv"); TitleDiv.innerText = window.url; } The only hindrance is that all content pages in your device should have the same ID.

mysql - string conversion to array by commaseparated using php -

I am finding it difficult to get value from using curl from the URL doing online work fine, but the problem here it's like giving United string - the first URL was a value and the URL to return back with 5 values ​​total to six the values ​​such as, "testdata1testdata2testdata3testdata4testdata5testdata6testdata7" I How to separate strings from commas There is a need to insert these data for storage like mysql. function data ($ url, $ v) {foreach ($ url = & gt; $ key as in $ url) {$ curl = curl_init (); Curl_setopt ($ curl, CURLOPT_URL, $ key); Curl_setopt ($ curl, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ curl, CURLOPT_CONNECTTIMEOUT, 20); Curl_setopt ($ curl, CURLOPT_USERAGENT, $ useragent); $ Str = curl_exec ($ curl); Curl_close ($ curl); $ Html = str_get_html ($ str); Foreach ($ html-> Search ('.name') as $ element) {$ grab = $ element-> Internal text; $ Sql ​​= $ this- & gt; Db- & gt; Ready ("update table SET word = 'grab ...

Using Storm in Cloudera -

I'm using Hurricane, which is available with Hortonwork 2.1 installation, but by installing Hortonwork in addition to Claudera To survive the establishment (which sparks in it), I tried to find a way to use the storm in Claudera. If one can use both storm and spark on the same platform, then it will save the additional resources needed for both establishments on a machine of Clauda and Hortonwork. You can use storm with the Claudera installation. You have to set it up on your own and keep it. This claudera will not be part of the stack, but it should not stop you from experimenting with the headache, if you need it.

asp.net mvc - How to mock a function that returns a GUID using Moq.Mock() -

How can I write a mock for a method that gives GUID in the .NET mvc unit test. Eg: I have a service class that adds objects to DB and gives a GUID. I want to be fake in the unit test. Something like this should work for you: fake .setup (Foo = & gt; foo.AddObject (this. Any such & lt; some object & gt; ())). Returns (Guid.NewGuid ());

Android Grid View positioning -

A grid view of your application when I'm installing their application in Z, for a The letter contains a large size screen according to the size of the mobile screen, the grid view position is flowing. I am experiencing this problem with mobile big screen mobile and small screen, when the situation than the average screen is very good, so what I need is important that flowing or scrolling without all screen sizes for the grid view should be written which attributes to match before Thanksgiving & lt; GridView android: id = "@ + id / letter" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: layout_gravity = "center" Android: layout_marginTop = "250sp" Android: horizontalSpacing = "5sp" Android: numColumns = "9" Android: Padding = "5sp" Android: stretchMode = "columnWidth" Android: verticalSpacing = "5sp" /> Grid View should be the ...

What is prefered way to loop in Ruby? -

Why do each loop in ruby ​​ like for loop? Is there a difference in the complexity of time or are they just different sentences than creatively? Yes, they are two different ways but to walk again, but hopefully in this calculation Helps. 'Benchmark' is required a = array (1..100000000) yoga = 0 benchmark. Timetable {a.each {| X | Sum = = x}} This takes 5.866932 seconds a = array (1..100000000) sum = 0 benchmark. Real time {sum in x = = x end} it takes 6.146521 seconds. Although this is not the right way to do benchmarking, there are some other obstacles but on a machine, it looks a bit faster than each one.

android - Admob interstitial ads non clickable -

I have encountered a strange behavior of Admob interstitial ads. Application, but for some reason the click does not work. I got the same question on the StackWorflow: But the solution has been provided that does not fix the problem. Here's my snippet from the manifest: Has anyone seen such a problem? Any suggestions? OK, I've found a solution to my problem. It has come to our attention that I am trying to show interstitial ads after calling the Finnish () method while leaving the application. The advertisement was shown right because it was loaded immediately after opening the application. But the context of the application ended () was not available after calling the method, so when I clicked on the ad, nothing happened.

java - Make a xls file in a jsp and then send it to the server -

I have an application where the server sends data to a JSP file that gives the format and style and creates an XLS file . Using: response.setContentType ("application / vnd.ms-excel;"); Response.setHeader ("content-dispute", "attachment; file name =" "+ +" + "" ""); Then to open or save the user normally The problem is that the problem I want is to send the axle file to the server so that it can be worked with and saved there. Why do not you save the document before rendering the view when you are on the server side moment. If you want to remove the user, just need to tell you to remove the XML that you create. If I do not know the only way, you use JQuery to upload the JQuery file upload

Using PHP to "multiply" array values -

I'm a PHP novice and I'm sure I'm not using the right terms here. I am creating an automated product data feed using a set of SKUs provided, but the feed needs separate entry for the size of the product and gender variation. Is this an easy way to get: $ SKUs = array ('product1', 'product2', 'product3') and "multiply" each entry in the array with: $ gender = array ('M', 'F'); $ Size = array ('s', 'm', 'l', 'xl'); So I end up with this result: $ feed = array ('Product1M-S', 'Product1M-M', 'Product1M - L ',' Product1M-XL ',' Product1F-S '...) $ feed = array (); Foreign Currency ($ SKU as $ SKU) {foreach ($ gender as $ g) {foreach ($ s as $ s) {$ feed [] = $ sku $ G. '-'. $ S; }}} Print_r ($ feed); Perhaps a simple array function is present, but it is easy to read, and is ready for future "easy" changes. ...

How to call one controller to another controller URL in Spring MVC? -

Hello I'm new to Spring MVC, I want to call method from one controller to another, I can do this. Please see your code below @Controller @RequestMapping (value = "/ getUser") @ResponseBody public user getUser () {user U = new user (); // My Dao method is active here and I will get some user exchange; } @controller @ requestmapping (value = "/ updatePSWD") @ ResponseBody public string update PSWD () Here I want to call above the controller method and I want to update that user password. How can I return it ""; } Anyone helps me You never put a business logic in the controller, and less business logic related to the database, the transaction class / Method should be in service level. But if you need to redirect any other controller method, use the redirect @RequestMapping (value = "/ updatePSWD") @ResponseBody public string update (pswd) {"redirect : /getUser.do "; }

javascript - redefine ng-model using ng-if -

Image
Then I have a kind of forward that users can choose options after typing in the form if search data exists , Then the details of the data are automatically filled in text, however, if search data is not present, the details box is automatically filled with search data, which is what I do not want because it is an empty string, because it exists Not in. & lt; Input type = "text" required class = "formahead-regulated =" incorrect as treatment.service for treating "form control form control model" ng model = "newTreatment.async_selected_treatment" typeahead = "treatment searchTreatments ($ viewValue) "Type-based-selection =" search treatment ($ item) "focus =" true "placeholder =" CPT code "& gt; & Lt; Text area class = "form control required form control modal" rows = "3" ng-if = "newTreatment.async_selected_treatment.id == 'null'" ng model = "newT...

sql server - Will data compression produce less transaction logs? -

Data compression is now available in SQL Server 2008 and later. Therefore, it will also compress data size, storage for this server too. I wonder if this table is less compressed, then it will produce less transaction log through the same operation. used ROW compression in transactions log for transactions against compressed tables (It does not matter if you use a row or page in the table) See the "What happens to the assistive data structures" section for the reference:

perl - how to compare 2 overlapping ranges without any repetition -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं मूल्यों की तुलना करने की कोशिश कर रहा हूं @ Arr3 से लेकर श्रेणी के मूल्यों के साथ @ arr4 से लेकर, लेकिन मुझे वांछित आउटपुट नहीं मिल रहा है कृपया मुझे 3,4,5,6,7,9,10,11,12,14,15 के रूप में आउटपुट प्राप्त करने के लिए निम्न कोड में संशोधनों का सुझाव दें (मूल्यों को दोहराए बिना 5 और 10) और कुल मिलाकर = 11। फ़ाइल 1: परिणाम 3..7 9 .122 14..17 फ़ाइल 2: एनोटेशन 1..5 5 ..10 10..15 कोड: #! / यूएसआर / बिन / पर्ल खोलें ($ inp1, "& lt; परिणाम") या मरना "नहीं मिला"; खुला ($ INP2, "& lt; एनोटेशन") या मर "नहीं मिला"; मेरा @ arr3 = & lt; $ inp1 & gt ;; मेरा @ arr4 = & lt; $ inp2 & gt ;; मेरी $ लाइन 1 (@ एआर 4) को अग्रगामी करें (मेरी एक्शन 3 foreach $ 2 @) (मेरी ($ से 1, $ to1) = विभाजन (/ /।। /। /, $ पंक्ति 1); मेरा ($ 2 से, $ से 2) = विभाजन (/ / .../, $ line2); #print $ from1; प्रिंट "\ n"; (अगर $ $ i == $ j) के लिए (मेरी $ i = $ से 1; $ i & lt; =...

ssl - Emacs wanderlust IMAP password authentication -

In emacs / wanderlust, if someone selects the 'clear' method of sending the password, but SSL enables for IMAP, is the password protected by SSL encryption? Specifically, the worrisome information is generated from the following paragraph in the manual: There are two ways to use SSL, to start SSL communication only after a connection connection (normal methods) Second, In each session, start the SSL conversation using the STARTTLS command. What is the first method to transmit passwords before or after SSL encryption? If first, the second (STARTTLS based) method ensures encrypted password transmission? The password is safe, the difference between the two methods. The difference between these approaches is in another aspect: the first step starts immediately after a TLS connection TCP handshake, and before Any IMAP exchange starts. Therefore, it uses a different port compared to regular IAPAPs, but can be used with the IAPAP servers, that their traffic is not onl...

javascript - script for open all pages of my website -

I have a website with WordPress. I have installed the plugin "Quick Cash" to optimize it now it's fast I clear the cache I make a bit of change and upload it in a production environment. I clear the cache Now when every page, post, Wordpress is first visited, it loads very slowly ( First time ) Again, I try to cache all the links on the website, and therefore serve the users with the latest changes quickly. I have thought of creating a script to do this for me :-) Anybody can help me, please? One of the methods of rebuilding the cache is to write crawler commandline script, Reads the database and then uses curls to kill them. It may be that this script has been crooned for running hourly or even with intervals to save the ability of the server in between the hits. If you want to do it manually, then you can create a plugin that kills all URLs and after each other, the functionality actually is the same.

java - Automatically add "headers" and "produces" attributes to my @RequestMapping -

I have applied a REST API through Spring MVC. Here is an example of mapping: @ requestmapping (value = "/ video", method = RequestMethod.GET, header = "accept = application / JSON ", produces =" app / JS ") Many of them are there, so I wonder what factorize headers and output attributes, so I do not have to specify them in each mapping, so that my code is lightweight Possible? Best custom annotation will automatically set two attributes, for example: @JsonRequestMapping ( Value = "/ video", method = RequestMethod.GET) but I am not able to implement any such ... You can also insert (see) a code next to a method next to @RequestMapping . If you want globally available features, then a @RequestMapping is inserted on one class, then this method will be merged with one. @Controller @RequestMapping (header = "Your Controller {...} Your method only includes the method and URL. @RequestMapping (value = "...

windows - Excel-Addin with visible form -

I have any questions on the form of windows in the Excel add-in, application level. Objective Statement: Show customized window form controls, the way the chart is being inserted into Excel Custom panel I try the custom panel add-in But it seems that I want something at the worksheet level, I can not use the Tasks pane in the Add-in for the Tasks panel Thanks in advance for help It is difficult to find out from your answer whether you have a code solution here or some more high level, so I assume that you are looking for a code solution, please correct me if I am wrong. Did you have an OLE object or ActiveX? Here's an example of Microsoft (Here's something else that has been found to be helpful to me.) Just how to give you an indication (example above mentioned) Here's a screenshot of the compiled example that I can add by either the Excel sheet: ActiveX control, so I could think that you can also provide that Some buttons will be added t...

php - How to know whether a web link is redirecting to any other domain or staying at the same domain? -

I am trying to figure out the status of a page whether the page is redirecting to another domain or in the same domain Is living But this is not working for me. When I open this URL, I redirect to another domain and I want to know whether it stays on rebelmouse.com or opens another domain. I have tried curl_init () to know the situation, but this gives 200 it does not provide specific HTTP code to identify redirection. CODE: function file_get_contents_curl ($ url) {$ ch = curl_init (); Curl_setopt ($ CH, CURLOPT_USERAGENT, "Mozilla / 5.0 (Windows; U; Windows NT 5.0; N-US; RV .: 1.7.12) Gecko / 20050 915 Firefox / 1.0.7"); Curl_setopt ($ ch, CURLOPT_AUTOREFERER, TRUE); Curl_setopt ($ CH, CURLOPT_HEADER, 0); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ ch, CURLOPT_URL, $ url); Curl_setopt ($ CH, CURLOPT_FOLLOWLOCATION, TRUE); $ Data = curl_xac ($ ch); $ Httpcode = curl_getinfo ($ CH, CURLINFO_HTTP_CODE); $ UrlInfo = curl_getinfo ($ ch, CURLINFO_...

c# - Closing SQLiteConnection (SQLiteConnectionWithLock) -

I am using in my application. What is the best practice to manage the connection using a library of lifecycle? I can not find any examples where the SQLiteConnection.Close () method is used. But common requests are to close the connection after each request or bulk of the request. So should I make a connection to an application and it should never be settled? Personally I wrap my DB works using the using statement Which will settle for me for SqlConnection . (var conn = SqlConnection ()) {// SQL after calling this Will be closed) after calling } , as applicable: Protected Virtual Zero Disposing (Bull Displacement) {Close () ; }

three.js - Detecting the faces which are viewed through a rectangle div -

Image
Here I struggle to detect the face which are seen through Div. Rectangle is in Divi 2D, the model is in 3D space. Nobody can give me some clear suggestions. The following camera uses a border to make frustum and then test for intersections. var frustum = new THREE.Frustum (); Frustum.setFromMatrix (new THREE.Matrix4 (.) Multiply (camera.projectionMatrix, camera.matrixWorldInverse)); (Var i = 0; i & lt; objects.length; i ++) {if (frustum.intersectsObject (objects [i])) {// intersects} else {// intersection}}

asp.net mvc 4 - Magnific multiple popup strange behavior -

I have a menu where there are several links to the popup window with the form: & lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "/ hour / app / edit / 15" & gt; Ð ÐμÐ'Ð ° Ð ÑÑÑÑ ?? ÑNÑ Ð¾Ð²Ð ° Ñ ?? Ñ ​​?? Ð ° нкÐμÑ ?? Ñ ​​?? & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "? / Hours / PlaceUserInJobPopup applicationId = 15" class = "magnific form" type = "inline" & gt; D ¢ Ñ ?? Ñ ​​?? Ð'оÑÑ ?? Ñ ​​?? Ñ ​​?? Ñ ​​?? Ð¾Ð¸Ñ ?? Ñ ​​?? & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "/ hour / refuseUserApplicationPopup applicationId = 15?" Class = "magnific form" & gt; D ?? Ñ ​​?? кР° Ð · Ð ° N ?? Ñ ​​?? & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "/ hour / RenunciateUserApplicationPopup applicationId = 15?" Class = "magnific form" ...

java - SQLiteAssetHelper extension returns null -

I am getting a NullPointerException from my database handler. Here is my database suspender: Public class database bundler SQLiteAssetHelper extended {personal constant end-end DATABASE_VERSION = 1; Private static last string DATABASE_NAME = "cargrid", TABLE_CARS = "car", KEY_ID = "id", KEY_POSTCODE = "postcode", KEY_ADDRESS = "address", KEY_IMAGE = "image"; Public databashendler (reference reference) {// super (references, database ANN, blank, databasebasessns); Super (context, DATABASE_NAME, context.getExternalFilesDir (empty) .getAbsolutePath (), blank, DATABASE_VERSION); MyActivity.java: The error that is reporting which line: // start the database databaseHandler db = new Databasandler (this); // "this" refers to the reference I'm feeling that this is creating context, but I'm not sure what the context should be. I have just changed the error from the previous line from the SQLiteOpen...

php - How to get taggable_friends list with FQL? -

I want to know how to get taggable_friends list in Facebook v2.0 . How can I get all the Facebook Friends lists using FQL? Thank you. It is not possible, in addition, VQL is being phased out v2.0.

How to use jQuery with browserify? -

I have installed jQuery (v1.11.1) with npm. (I need 1x because I want to use it with glass which does not support 2.x). Then I try to import the jQuery object with the required object through the browser I am doing it, but it seems that the return thing is not expected, so I can not use it. var jQuery = require ('jquery / dist / jquery') (window); While trying to use it, I get the Unkot Type error: object function is not . What am I doing wrong? How can I use the browser with jQuery? In the main code> jquery.js , So you can do this: var jQuery = require ('jquery'); JQuery ('body'). Text ('Hello World'); Note that jQuery has its own factory export only if there is no global document property when used with browserfair, then the one which is exported It does not have a factory function, but regular jQuery objects.

uicollectionview - iOS CollectionView without cellForItemAtIndexPath -

I have a question, can I use the collection view cellForItemAtIndexPath , Because I align the cell item to use the archive, and redirect the cell to a different controller, if I use the normal cellForItemAtIndexPath and numberOfItemsInSection , then It can not drag different controllers to Ctrl + Right click If come UICollectionView You must implement Detasrs protocol and must use these methods. You should implement the didSelectItemAtIndexPath method and then a within this method to do "redirect" to a new ViewController Trigger performSegueWithIdentifier .

sass - Compass-core box mixin undefined -

I'm trying to use the Flexbox prefix. Include @ display box; or with any other box mixes when using the compass-core box mixer, it gives: unchanged mixin 'display-box' However, if I do @ opacity (1); @ Border-radius included; No compilation error. Compass version: Compass (1.0.0.alpha.19, 0.12.6) Compass -core (1.0.0.alpha.19) Compass-import- Once (1.0.4) What do I miss? The same here After taking a look at the Compass -0.0.Alpha.221 code I saw the line @warn "Compass / CSS3 / box module removed and removed it in the next release Instead use Compass / CSS3 / Flexbox. "; Then I was surprised that the box module is then listed in official documents. Bottomline: The default document resource on the Compass website covers only the old release version 0.12.2, while we are using the latest (not yet released) dev version 1.x. There is another doctor's version in it: (pay attention to "beta" subdomain!)

python - urllib2.Request check if URL is reachable -

Then I have the following code to correct some URL, I just need 200 responses, so I have a script But it's very slow (imported: import urllib2 import string def my_range (start, end, phase): while starting In this example I think that the following directories in my local hosts are with this result http: // example com / test / 2 200 Http://exemple.com/test/3 200 http://exemple.com/test/4 404 http://exemple.com/test/5 404 http://exemple.com/ Test / 6 404 So I came to know how quickly I get this code: import urll Ib2 request = urllib2.Request ('http: // www .google.com / ') response = urllib2.u Rlopen (request) if response.getcode () == 200: print "200" It looks sharp, but when I check it like (404) it gives me this Returns the result: Traceback (last most recent call): The file "C: \ Python27 \ res. Py ", line 3, & lt; module & gt; response = urllib2.urlopen (request) file" C: \ Python27 \ lib \ urllib2.py ", li...

php - add html page to codeigniter project -

मैंने एक साधारण HTML पेज mypage.html क्रेट किया है यह केवल upload.php को यह सब ठीक ठीक करने के लिए डेटा पोस्ट करता है। लेकिन अब मैं इस पेज को मेरे कोडिनेटर प्रोजेक्ट में जोड़ना चाहता था। लेकिन यह जोड़ा नहीं जा सका। मैं इस पेज को अपने कोडाइग्निटर प्रोजेक्ट में कैसे जोड़ सकता हूं। जैसे कि मैं केवल mypage.html यूआरएल में टाइप करता हूं। यह त्रुटि है 404 पृष्ठ नहीं मिला आपके द्वारा अनुरोधित पृष्ठ नहीं मिला। आपको एक नियंत्रक बनाने की जरूरत है, और उसके बाद उस नियंत्रक से .html टेम्पलेट लोड करें । उदाहरण: 'Page.php' नामक नियंत्रक बनाएं। Mypage () नामक इस नियंत्रक के भीतर फ़ंक्शन बनाएं Mypage () में, बस अपना टेम्पलेट लोड करें: & lt;? Php वर्ग पृष्ठ CI_Controller का विस्तार करता है {सार्वजनिक फ़ंक्शन mypage () {$ this- & gt; load- & gt; दृश्य ('mypage.html '); }} सुनिश्चित करें कि आपका HTML टेम्पलेट 'दृश्य' फ़ोल्डर में है। फिर बस स्थानीय होस्ट / पेज / मायपेज Codeigniter महान डॉक्स और ट्यूटोरियल प्रदान करके ब्राउज़र के माध्यम ...

go - Golang function call on template fails on a single struct -

मेरे पास निम्न कोड है func (w * वेअरहाउस) GetId () string {return W.Id.Hex ()} एक से अधिक कार्य सही देखें {{range.Data}} & lt; tr & gt; & Lt; td & gt; {{.Name}} & lt; / td & gt; & Lt; td & gt; {{।}}} & Lt; / td & gt; & Lt; td & gt; {{.Manager}} & lt; / td & gt; & Lt; td & gt; & lt; एक क्लास = "ब्लू" href = "/ गोदाम / शो / {{.GETId}}" & gt; दृश्य & lt; / a & gt; & lt; / td & gt; & Lt; / टीआर & gt; {{End}} एकल शो गोदाम में मैं ऐसा करता हूँ, लेकिन यह विफल रहता है, जबकि। Data.Name नाम ठीक से वापस {{। GetId}} कोई भी विचार जो मैं यहाँ याद कर रहा हूं? समस्या यह है कि मुझे इस तरह की मेरी संरचना का उदाहरण बनाना जरूरी है var वेयरहाउस = नया (मॉडल। वेअरहाउस) // काम के बजाय var वेयरहाउस मॉडल। वेयरहाउस // विफल रहता है

How to input HDFS file into R mapreduce for processing and get the result into HDFS file -

I have the same question as the link below in the stack overflow I, the location "/somnath/logreg_data/ds1.10.csv" read one file from HDFS to reduce the number of columns from 10 to 5 and then another place "/ somnath / logreg_data / reduced / ds1. 10 am tring to write. At least CDSV is using the transfer.csvfile.hdfs.to.hdfs.reduced function below in HDFS. transfer.csvfile.hdfs.to.hdfs.reduced ("HDFS: //10.5.5.82: 8020 / Somnath / logreg_data / ds1.10.csv", "HDFS: //10.5 .5.82: 8020 / Somnath / Logreg_data / low / DS1.10.rated.csv ", 5) The function definition is transfer.csvfile.hdfs .to.hdfs.reduced = function (hdfsFilePath, hdfsWritePath, reducedCols = 1) {# local.df = data.frame () # hdfs.get (hdfsFilePath, local.df) # to.dfs (local.df) # R .file & lt; - hdfs.file (hdfsFilePath, "r") transfer.reduced.mapped = function (., M) {label & lt; - M [, dim (M) [2]] weak. Plotter & lt; - M [, 1: reduced calls] less...

objective c - Parse string and NSLog array -

Good day! I tried to parse the string with such a format: {"code": 200, "serviceID": "53d22b10e46a5", "sender" : 1, "hapier": 0} code: NSString * strData = [[NSString alloc] initWithData: returndata encoding: NSUTF8StringEncoding]; NSR explorer range = nsmkrange (0, [length of strudata]); NSLog (@ "data from server =% @", strData); NSError * Error = Zero; NSRGular Execution * Rezx = [NSGruler Expression Regular Expression with Partarton: @ "(\ w +)? ([0- 9])" Options: 0 Error: and Addition; NSArray * matches = [regex matchesInString: strData options: 0 category: search range]; NSLog (@ "Content of the content is% @", matches); and the last NSLog is the content of the next arry ("Show & lt; NSSimpleRegularExpressionCheckingResult: 0x71a9e90 & gt; {8, 1} {É Nsregularekspression: 0x71a4370 & gt; (and +)? ([0- 9]) 0x0} "," & lt; Nsimpleregularekspressionchek...

c++ - Check template parameter of Base class in Derived -

मेरे पास एक आधार वर्ग है जैसे टेम्पलेट & lt; int पैरामीटर & gt; कक्षा आधार {सार्वजनिक: आभासी int getMaxParameter () = 0; } और मैंने एकाधिक व्युत्पन्न कक्षाओं में से एक को चुना जैसे टेम्पलेट & lt; int पैरामीटर & gt; क्लास DeriveA: सार्वजनिक बेस & lt; पैरामीटर & gt; {सार्वजनिक: int getMaxParameter () {वापसी 2; }} के माध्यम से const int p = 3; बेस & lt; p & gt; * आधार; स्विच (unreleated_input_int) {मामला 1: बेस = नया DeriveA & lt; p & gt; (); टूटना; मामला 2: बेस = नया DerivedB & lt; p & gt; (); टूटना; // ...} प्रश्न: मैं कैसे सुनिश्चित कर सकता हूं, कि बेस एंड amp के टेम्पलेट पैरामीटर; प्राप्त किए गए getMaxParameter () के बदले मूल्य से अधिक नहीं है? मैं DerivedA () {if (पैरामीटर> GetMaxParameter ()) // की तरह कुछ कर सकता है। ..} लेकिन मैं इसे हर व्युत्पन्न कक्षा में लिखना नहीं चाहता। क्या मैं बेस में ऐसा कुछ कर सकता हूँ? मैं शुद्ध आभासी कार्यों को कॉल नहीं कर सकता, लेकिन क्या कोई अन्य तरीका है? मुझे आभासी फ़...

powershell - Select unique items -

मेरे पास कोड का एक टुकड़ा है जाओ- Xasession - खाताप्रदर्शन नाम DOM \ UserA- कॉम्प्यूटर नाम XenA1 | एफटी क्लाइंट एड्रेस, सत्र आयडी, सत्र नाम, सर्वर नाम, खातानाम उस आउटपुट क्लाइंट एड्रेस सत्र आय सत्र सत्र सर्वर नामनामनाम ------------ - --------- ----------- ---------- ----------- 192.168.2.139 4 आईसीए-टीसीपी # 1 सर्वर ए यूजरए 192.168.2.88 13 आईसीए-टीसीपी # 11 सर्वरबी यूज़रए 1 9 20.168.2.88 13 आईसीए-टीसीपी # 11 सर्वरबी यूज़रए 1 9 20.168.2.139 17 आईसीए-टीसीपी # 15 सर्वर ए यूजरए मैं कैसे कर सकता हूं इस सूची / आउटपुट से अद्वितीय क्लाइंट एडेस्टर की सूची प्राप्त करें? यह है कि मैं सभी क्लाइंट एड्रेस की एक सूची प्राप्त करना चाहता हूं ' जाओ- Xasession- खाताप्रदर्शननाम DOM \ यूज़रए -कंप्यूटरनाम XenA1 | चुनें- ऑब्जेक्ट क्लाइंट अकादरी - अनिक

xmpp - multiple openfires on a single ip -

Would you please tell me how to configure two open fire on an IP I have used different ports in 2 ports, But for every operation, there is a list of ports in each open fire server (i.e. ex: 7070 port http bind, 9090 for admin console.). And creates a list of openfire tables (with tabline name "." Pre: ofxxxx). These generated table names are OK. But here for 2 openfires, I want to maintain a different set of tables and I do not want to mash the CRUD option of each openfire server. I need 2 open-ended servers in two different scenarios with a single schema in my PC.) If there is any idea in this scenario, please help me. Please help me. You can open Fire Administrator Console Server & gt; Server Settings & gt; HTTP bindings can edit the port for http-bind. P> Other ports server & gt; Server manager & gt; Server information can be scrolled from to "server ports" and edit prices accordingly.