Posts

Showing posts from January, 2014

Using url_helpers inside lib class in rails 4 -

A lib class is used to get an email in my Rail application. The email receiver parses the square email and posts it to an application controller using an HTTP response. Code is displayed for: uri = 'http: // localhost: 3000 / incoming_mail' body = {'from' = & gt; From, 'to' = & gt; For, 'topic' = & gt; Subject, 'message' = & gt; Message} response = net :: HTTP :: post_form (URI.parse (uri), body) The problem is that I do not want to specify the full URL. Is there a way to use 'incoming_mail_path' instead of 'localhost: 3000 / incoming_mail'? I tried to add it: contains rail. Application Light_url_holder but it is not working and returns the following error: Can anyone suggest a solution for it? I am posting the entire class here (the included statement has been updated): Required 'Mail' Requires 'Net / https' Requires 'Net / http' required 'uri' category Em...

spring - Tomcat requires restart to take Jasper Reports changes -

I am using Jasper Report as part of my spring application. I am deploying my application on the Tomcat 6 server via eclipse, so my project is WTP project. The problem I have is that when I change the Jasper Report file (jrxml) I want to send the server to publish the changes I have to restart I have already checked on the deployment folder and .jrxml has been updated, but for some reason the browser remains the old report , I have already made it clear the browser cache without luck. Any ideas about how to solve it, it is very upset when developing. I think you use Eraport to change .jrxml, when you change the changes in it Saves, eclipse will not be immediately notified. So you need to refresh your project in Eclipse, if necessary, clean and rebuild the project, and re-deploy it for tomcat. In addition, you can set eclipse for Auto Build project (Porject -> Test automatically generated) and will continue to refresh the project. When you see the 'synchronized' ...

Regex match string with possible spaces -

I am trying to create a RegEx that will get the string 02075517 [ Although this string sometimes contains spaces, I'll need a match 020 75517 [ and 0207 5517 [ and 020 7551 7 [ etc. I tried to use this site here: but there is not enough. Thank you very much ed Can define to match. ([0-9] + \ [] will match multiple numbers or spaces that will be after a square bracket.

oauth - Linkedin Login work via browser but not in the WebView -

I've followed it, and tried to include it in my webview. Why? Is it possible to login through LinkedIn on webvanson or is it impossible? Thank you in advance. Grace Please try it: it is to ignore and leave https Sample for webView = (WebView) findViewById (R.id.webView1); Web settings settings = webView.getSettings (); Settings.setJavaScriptEnabled (true); Settings.setDomStorageEnabled (true); WebView.setWebViewClient (new MyWebViewClient ()); WebView.loadUrl ("http://www.Linkedin.com"); Private class MyWebViewClient WebViewClient extension {@ Override public boolean should override URL loading (webview view, string url) {webView.loadUrl (url); Back true; } @ Override Public Zero Reciprocal SSLLR (WebView Visualization, SSLERHurdler Handler, SSL Error) {Super. Revised SSLR (see, handler, error); Handler.proceed (); }}

powershell - Filtering Search-ADAccount -

I am thinking that there is a way to filter it: search-adaccount - Account Internal -Datetime ((Received-date). ADDESSE (-90)) - By adding pipeline to user form: | Where-Object {($ _ SamAccountName -notlike "* _ua1") - and ($ _.memberOf like "* UserAdminL1 *")} It seems to freeze and Perhaps there is a right way to do this? Search-ADAccount group does not return membership. If you want to filter it, you can pipe it in the first get-AdUser to get the memberoff property. You are missing the where-object part of your filter and should be $ _.memberOf $ _. MemberOf . Compilation errors were trying to correct it for you, so there may be a copy paste problem with your question. Search- ADAccount-AccountInactive-DateTime ((Received-Date) .adddays (-90)) -Userosterli | Go-Advertiser-Properties | Where the object {($ _ SamAccountName -notlike "* _ua1") -and ($ _ Member Member as "* UserAdminL1 *"}}

ETL - Pervasive to SQL Server -

I am a SQL Server developer and I have been asked to write some stored procedures so that the database is connected to the (comprehensive) website. Before I was asked about this, I was completely unfamiliar, so I had to make a SQL Server database (perhaps express) to work best and some ETL was running on the go. For Microsoft data, then I can write all website code on SQL Server instead of live website. Is anyone planning to get familiar with free / cheap methods / software for ETL every day? What would be an option with SSIS SQL Server Express? Let's go to the opposite way .. If you use SQL Server for your website Using Express I will offer some more: Use / for website. If you do this, you can use SSIS to make your ETLs widely -> .. If and only if your ETL logic is simple and you just want to get rid of widespread, instead of SSIS, you can write your own NIT application form to handle data transfers. In that case you can use SQL Express.

Need suggestion on one small thing about soap web service in cf -

Please suggest to me what is the correct way to get method arguments with SAP in CF web service Below is my sample code for web service method, where i & lt; cfargument > but parsing xml request & lt; Cffunction name = "method1" displayname = "method name" description = "method description" access = "remote" output = "true" returntype = "xml" & gt; & Lt; Cfset is SOAP = isSOAPRequest () & gt; & Lt; Cfif is SOAP & gt; Get the first header as a string & lt; Cfset reqxml = GetSOAPRequest () & gt; & Lt; Cfset reqxml1 = XmlParse (reqxml) & gt; & Lt; Cfset responseNodes = xml search (# reqxml1 #, "soapnavi: envelope / soap: body") /> & Lt; Cfset responseNodes = xmlparse (response node [1]) /> & Lt; Cfif structKeyExists (responseNodes.xmlroot, "AgentID") & gt; & Lt; CFSET AgentID = trim (responseNodes.xmlroot.AgentID.xmltext) & ...

asp.net - Sending Email using Sendgrid Fire and forget -

We are running an ASP.net MVC4.5 web application, and we have this API and point which does the following Send an email using SendGrid (normal sync code) Send notification using Azure Notification Services Third Trigger another endpoint in the party soap service (We are using blue storage queues here and a worksheet, because the endpoint of the third party is insensible I may need to redo the call) My question is, will it be (1) and (2) to use the Ezoor storage queues for one Overkill, I have another idea because, for example, when sending an email using their SDK, I suspect that there is immediate action when sending e-mails, sending the endpost, they are probably going to have any type of queue Please also use Hey, and are sending votes to him to vote. For example, for notification centers, the message is also added in their queue, so why do those people apply blue rows to them?

numpy - ValueError in simple Python calculation -

This is my work and the variable track is a list and each element of the list is nx 3 array: For the category (j + 1, n) in the range for j (n-1) category: temp = np.array (np.zeros ((n, n))) : For brain = np.zeros (LAN (tracks [j])) in range (lane (jane)): brain en [i] = np.linalg.norm (min (np.fabs (np. Array) (Tracks [w]) - tracks [j] [ii])) temporary [j] [w] = np sum (brain) / lane (tracks [j]] I am trying to calculate the minimum distance between the array of inventory which represents 3D lines in the space, but I am getting the error: Value error: With more than one true value of an array, an element is unclear. Use either A.any () or a.all (). The error is probably related to the call min () but I can not solve it. Traceback error is: Traceback (most recent call final): File " because the error occurs It can not determine whether a complete array is true or incorrect . What will be the boolean state of an array, where all elements are true ...

java - Why the second value is null when I tried to pass two value through intent? -

I tried to pass two values ​​from one activity to the other through intents, so I did: intent to intent = new intent (set alarm. This, show category); Bundle bundle = new bundle (); Bundle.putstring ("t", things); Bundle.putString ("Pa", PicturePath); Intent.putExtras (bundle); And then I tried to get all these values ​​in the target activity, so I have written these codes below: Bundle Extras = Millennant (). GetExtras (); String s = extras.getString ("t"); String path = additional .getString ("pa"); The first value is fine, but the strange thing is that the path is zero. So what's wrong with this code?

ios - MPMoviePlayerController sometimes plays audio, not video when fading in -

I got an issue where I have many views in a UIScrollView (the video controller below) that works The page for the video content (initially a thumbnail view is shown). Occasionally (but not always) When I scroll to the next page, audio plays for the video but I do not get any views. This does not seem to happen when I am not extending this scene. The Video Init Code is: MP4 Player MP4 Player Movie Player = [[MP3 MPV Player Controller Illock] INS]; Self.movieplayer = movieplayer; [Movie Player Set Control Style: MPMVE Control Stylon]; [Movie Player Set ReplayMod: MP3 MP4RipPadMod on]; [Movieplayer.view setframe: CGRactMake (0, 0, self.vi.fr.width, selfview.frame sizeHight)]; Movie player Background View.backgroundColor = [UIColor clear collar]; Movie player.movie source type = mpmv sourceotype streaming; MoviePlayer.contentURL = [NSD URL URL with string: [videoData.video src]]; [Self. Video Controller See Adsviewview: Self Movie Players. Weave]; [Self. Video Controller See Lao...

vba - Cannot Set Properties on MailItem -

Image
To run yuno on anything with the subject "test1" as my subject A rule has been created (I restarted after setting it): My code looks like this: SubUnno (MailItem as ByRef mymail) mymail.MarkAsTask olMarkToday mymail.TaskDueDate = now mymail.ReminderSet = True Debug.Prinint " YU NO? " Receiving an e-mail with the subject "Test 1" as the subject is printed "You You No", but it does not get a little red flag in Outlook. It is said that this code will flag the right object here: But it appears that the problem is running as a rule. I recommend that there is missing mymail.Save

php | Search in array -

Do I have an array and search the object with a maximum rating? Array ([0] = & gt; stdClass object ([created_by] => 905 [ratings] => 1) [1] => stdClass object resembles the following: ([Created_by] => 906 [Ratings] = & gt; 2)) Thanks! I have tried to do something like this: stable work maxValueInArray ($ array, $ keyToSearch) {$ currentMax = NULL; Forex currency ($ sir as $ arr) {foreach ($ arr $ $ key = & gt; $ value) {if ($ key == $ keyToSearch & amp; ($ value & gt; = $ currentMax) $ $ CurrentMax = $ value; }}} Return $ CurrentMax; } Since your array has not been sorted (I think), you All values ​​will need to be read. $ maxobject = null; Foreign currency ($ line as $ line) if (is_null ($ maxobject) $$ maxobject-> rating & lt; $ row- & gt; rating) $ maxobject = $ row;

c# - Modify properties when class is created -

I have a number of controllers that remove the same value from the input value stdo , as seen In the controller below. // Controller Public Action Gateways (Statistics DTo studo) {var startDate = DateTime.Parse (stdo.Timespan.Substring (0, 10)); Var Enddate = DateTime Purse (stdo.Timespan.Substring (12)); // The rest of the controller functions ...} What do I want to do, these two actions are done in the manufacturer of the StatisticsDTO object, and then any other Added to property. I tried to move lines into two separate constructors but the TimeSpan value is always empty, is it possible or is there any other way to refact it? public class statistics dtO {public string timespane {received; Set; } Public string country {get; Set; } Public string AppName {get; Set; } Public DataTime StartDate {Received; Set; } // new property public date expiration {received; Set; } // New property public statistics DTO () {this.StartDate = DateTime.Parse (TimePan. Substring (0, 10))...

sql - How to protect 1 column in table from updation/deletion? -

अपडेट / हटाए जाने से तालिका में 1 कॉलम की सुरक्षा कैसे करें केवल पहुंच पढ़ने की बजाय, क्या इस मामले में ट्रिगर काम करेगा? आप एक एकल स्तंभ के लिए अद्यतन विशेषाधिकार रद्द नहीं कर सकते हैं, लेकिन आप कॉलम को अद्यतन कर सकते हैं जो परिभाषित कर सकते हैं : मान लें कि आपकी तालिका में तीन स्तंभ हैं: column_1, column_2, column_3 और आप some_user को column_3 को अपडेट करने से रोकना चाहते हैं। आप निम्न कार्य कर सकते हैं: चुनना अनुदान, some_table पर some_table पर डालें; Some_user पर some_table पर अनुदान अद्यतन (स्तंभ 1, स्तंभ 2); उपयोगकर्ता सभी डेटा देख सकता है, नई पंक्तियों को सम्मिलित कर सकता है ( column_3 के लिए डेटा शामिल करें), लेकिन some_user में स्तंभ_3 ।

need to explode tags to array in php language -

मेरे पास मेरे टैग हैं: word1 word2 word3 "word4 word1" word4 " Word7 word4 "word7 word56 word1" word7 को सरणी में सब कुछ प्राप्त करने की आवश्यकता है: शब्द 1 शब्द 2 शब्द 3 शब्द 4 शब्द 1 शब्द 4 शब्द 7 शब्द 4 शब्द 67 शब्द 7 शब्द 1 शब्द 7 इसे विस्फोट ("", $ इनपुट) के साथ करने की ज़रूरत है और विस्फोट ("\" "$ input") संयोजन, या कुछ और है, लेकिन मुझे नहीं पता कि कैसे .. / P> मुझे लगता है कि सबसे अच्छा तरीका उपयोग करना है उदाहरण: var_dump (str_getcsv ('word1 word2 word3' word4 word1 "word4" word7 शब्द 4 "" शब्द 67 शब्द 4 शब्द 1 "शब्द 7 ',' ',' '')));

javascript - How to use only one element of array for xAxis in jquery.flot.js? -

I have a line chart (which has been created), which I want to internationalize and for this I have a number of xAxis labels. Languages ​​are required. [3, ["Card", "Carte" [3] ["Card", "[Help", "Hilf", "Eder"]], [3,, "Carte"]], [9, "Something like this: Help, Hilf, Eider [Separate with a comma]" Where do I pick up the element / index? "," Deschouch "," Frenchyz "]]]} needed? And I also want that the user can change the language (such as with a selection box) and also change the label. It already works for the rest of the page that works with the global variable language , which I set on the desired language indicator. I tried to set up a formator on xx, which had no effect: plot = $ .plot ($ ('# graph-bars'), Series, {... xaxis: {ticks: itemTicks, autoscaleMargin: 0.02, labelWidth: 300, labelFormatter: function (label, series) {return label [0];}}, ...}); Your ...

Selenium IDE decrement value of var -

Hello I'm trying to bring a simple reduction in selenium but it is decreasing, returning it in return . Follow my code: & lt; Tr & gt; & Lt; TD & gt; Shop & lt; / TD & gt; & Lt; TD & gt; 2 & lt; / TD & gt; & Lt; TD & gt; Contador & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Shop & lt; / TD & gt; & Lt; TD & gt; $ {Contador} - & lt; / TD & gt; & Lt; TD & gt; Contador & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Echo & lt; / TD & gt; & Lt; TD & gt; $ {Contador} & lt; / TD & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; / TR & gt; Expected: 1 but get: 2 - I've found it! Any example "" & lt; Tr & gt; & Lt; TD & gt; Shop & lt; / TD & gt; & Lt; TD & gt; 2 & lt; / TD & gt; & Lt; TD & gt; Co...

java - How to inject an object via annotation and set an attribute value on this object -

I'm using @Resource annotation to inject an object that works fine Used to be. Although I would like to set an attribute on this injection object and I'm not sure it is possible using annotation. For example, I have a class test that has an installation using the MyClass injected @Resource annotation. There is a feature in MyClass , myAttribute , which I want to set when the MyClass example is injected. Does anyone know if this is possible? "post-text" itemprop = "text"> You should use the @PostConstruct annotation, from to Javax.annotation : public class test {@Resource Private MyClass myClass; @PostConstruct Public Zero init () {myClass.setMyAttribute ("test class"); }} Public Square Extreme {@ Resource Private Michelle Miklass; @PostConstruct Public Zero init () {myClass.setMyAttribute ("Another test class"); }} This method will be called after the spring has started your object (i.e. all the depend...

mysql - Php 5.5 hash API and hashing plain text passwords already in a database -

I have found a solution to the problem referred below, which can help people in using PHP PDO. I tested it and it works, but I'm not sure whether this is clean code or best. No improvement is welcome. There is a basic problem here for reference: I haveh The password is already in a MySQL database. I can already use a new password using the HP 5.5 hashing API, but I want to know whether there is any way to get all the old plain text passwords and convert them into a bereavement hash. I am now thinking of copying the password into a new line called 'hash' and checking that they have copied them correctly, they have turned them into hash. I'm not sure how to copy the password line and rename it in the same table, or how to haveh how to do it the most efficiently. Any insights will be appreciated. Here's the solution: Set to setFetchMode (PDO :: FETCH_ASSOC); // $ hash variable set for a row related to hash (from the database) ($ row = $ stmt-> Get ...

c++ - Determing caller ID from DoDataExchange in MFC -

I want to apply a function that behaves differently for different IDs from my menu resources. For example: ON_COMMAND (ID_1, function) ON_COMMAND (ID_2, function) ON_COMMAND (ID_3, function) zero function () {switch (ID) case ID_1: // break it; Case ID_2: // Break what to do; ... Is there any way to identify calling processing? ON_COMMAND_RANGE Consider using a macro in the message handler UINT nID parameter: afx_msg void Func (UINT nID); ON_COMMAND_RANGE (ID_1, ID_3, Func) Note: This macro is not supported by the MFC Application Wizard, you must add it manually. The resource ID category should be nearby.

gradle - Install project built jar to local maven repository -

I am trying to establish my project built jar in my local Mewen repository. I've been using Grade 2.1 with the Android Studio IDE, but I did not work for it here I have my own build.gradle Pre> Apply the plugin: Apply 'maven' plugin: 'android' ... Install the group 'com.my.app' {repositories .mavenInstaller {pom.artifactId = 'MyApp' pom.packaging = 'jar '}} When I create gradle, I found an error message: The Gradle DSL method was not found:' install () ' Why my grade is set to install () The method can not be recognized? How to install Project Jar in the local Mewen repository? I think the documents that you are seeing and here The relevant piece of code is: Apply the plugin: 'maven' uploadArchives {repositories {mavenDeployer {repository (url: "file: // localhost / tmp / myRepo /"}}}}

python - Add optional fields to django's built-in comments app -

I want to add a thumb and counter thumb as comment areas and I called 'MyComment' in models.py Add two inteferer to a class. And I also use such forms.py: Import from blog.models CommentForm Import MyComment class MyCommentForm (CommentForm): THUMBS_UP = forms .IntegerField () THUMBS_DOWN = forms.IntegerField () def get_comment_model (auto): return MyComment def get_comment_create_data (auto): data = super (MyCommentForm, self) .get_comment_create_data () data ['THUMBS_UP'] = self.cleaned_data ['THUMBS_UP'] Data ['THUMBS_DOWN'] = self.cleaned_data ['THUMBS_DOWN'] return data After that, when I submit a comment, say THUMBS_UP And THUMBS_DOWN are required Not. How do I make them optional, just like the default field "user url"? Import django.contrib.comments.models from Comment class Mycomment (comment): thumbs_up = Model. Text after the integerField (default = 0) THUMBS_DOWN = models.IntegerField (default = 0) you MyC...

python - Using random.choice() with preference and uniqueness -

I have a list: decisions = ['yes', 'no' , 'Unknown'] I write a file using this list: X (0, 100) in the range: file.write (Random Options (Decision)) What would be the most effective way to ensure that 70% of values ​​are written as "unknown"? I want randomness to an extent, but I also want to ensure that the 70 values ​​written in the file are a certain type. I am planning to get this percentage from the user so that he can change every run. If I had another list which was too large and to ensure uniqueness (no repetitive values, but randomly respectively) is the best way? If using NumPy is an option for you, then it is quite simple to implement: np.random.choice (['yes', 'no', 'unknown'], p = [0.15, 0.15, 0.7]) The second array indicates the amount and probability for the P one that is selected in the first ARA related entry. The above ensures that 'unknown' is chosen with the possibil...

c++ - Performance of placing the value of an object field in a variable -

यहां दो कोड स्निपेट हैं c ++: some_previously_defined_array_object_class object1; Int nrows = object1.rows; Int ncols = object1.cols; Int ऑब्जेक्टिज = ऑब्जेक्ट 1.size (); Int some_metric1; Int some_metirc2; Some_metric1 = nrows * ncols + 2 / (3 + एनसीओएल); Some_metric2 = ऑब्जेक्टिज़ + 0.5 * एनकॉल; // मेरे इंटैगमेंट के क्षेत्रों के मूल्य वाले कुछ इंट को परिभाषित करने के बजाय, क्या मैं हमेशा ऑब्जेक्ट 1। सीधे सीधे (और दूसरों को भी) का उपयोग करना चाहिए? इस तथ्य के अलावा, मुझे लगता है कि एक स्थान पर इन्टस के मूल्य को बदलने में आसान है, पहले मैंने सोचा कि यह हर बार फ़ील्ड तक पहुंचने के बजाय इनट्स में मूल्य रखने के लिए और अधिक कुशल होगा। । अब, मैं काफी अनिश्चित हूँ कि यह roes और cols के लिए मामला है। दूसरी ओर, "object.size ()" के लिए, क्योंकि यह एक फ़ंक्शन है और यह मान संभव नहीं है अक्सर बदल जाते हैं, क्या यह हर बार कंप्यूटिंग के बजाय एक बार गणना करने के लिए और बाकी प्रोग्राम के लिए इंट का उपयोग करने के लिए सुरक्षित शर्त है? ठीक है, इस मामले में मैं अपनी कक्षा में एक फ...

svn - Parameter variable not substituted in ssh plugin in Jenkins -

Image
I'm trying to checkout a svn on a remote machine Parameter is missing the script Replaced on walking But if I specify the value directly without parameters, then checkout is happening. 09:07:31 CD / Home / DDK / 09:07:31 PWD 09:07:31 https: // ##### / project / branches / Release / $ version /. 09:07:31 VERSION = v200: Command not found 09:07:31 Version: Undefined variable Parameterized jobs do not have parameters Try to inject the plug-in that is available as the available variable for the build steps and configure the version parameter for the injection of the build. I did this for some jobs in my Jenkins instance

Umbraco & Razor: If CurrentPage/Model is a Child, condition -

My navigation / node structure is as follows: Home - About Us - Our services ----- Finance ----- Insurance - Lies my current code through nodes and lists them in one. When there are children on 'Current Page', children are included in the menu. The problem with this loop is that when a child (finance or insurance) is the 'current page', then 'if' condition fails in 'our services' node because currently the child is now on the page Not so, therefore 'finance' and 'insurance' will now remain in the menu. I want to 'if', '' I have to add '' gt; The code given below @ourch (@nantpage on var page. Unstourself (1) children.) {& Lt; Li class = "menu itts @ (page.instore and (current page)?" Selected ": blank) & gt; & Lt; A href = "@ page.Url" & gt; @ PageName Testing & lt; / A & gt; & Lt; / Li & gt; {(Current page) • "selected" child ...

c# - How can I find out what kind of exceptions can be thrown by a method? -

मैं कोड लिख रहा हूँ जो कि Windows.Networking.PushNotifications / P> // सारांश: आप पुश सूचना चैनल को / से Windows पुश नोटिफिकेशन सर्विसेज (डब्लूएनएस) से पुनर्प्राप्त करने के लिए उपयोग की जाने वाली ऑब्जेक्ट्स बना सकते हैं। ये चैनल // एक ऐप या माध्यमिक टाइल के लिए बाध्य हैं [ThreadingModel.MTA)] [संस्करण (100794368)] सार्वजनिक स्थिर वर्ग PushNotificationChannelManager {// सारांश: // एक वस्तु बनाता है, कॉलिंग ऐप के लिए बाध्य है, जिसके माध्यम से आप Windows पुश सूचना सेवा से एक // धक्का अधिसूचना चैनल प्राप्त करते हैं (WNS)। // // रिटर्न: // ऑब्जेक्ट, कॉलिंग ऐप के लिए बाध्य है, जिसका इस्तेमाल विंडोज पुश नोटिफिकेशन सर्विसेज (डब्लूएनएस) से पुश नोटिफिकेशन चैनल / अनुरोध करने के लिए किया जाता है। [अधिभार ("बनाएँपूट नोटिफिकेशन चैनल एफ़िप्लिकेशन एसिंक")] सार्वजनिक स्थिर IAsyncOperation & lt; पुश नोटिफिकेशन चैनल & ​​gt; CreatePushNotificationChannelForApplicationAsync (); } मैं सभी मामलों को कवर करना सुनिश्चित करना चाहता हूं जहां अपवाद फेंका जा सकता है और प्रत्येक के ...

spring - How to disable count when Specification and Pageable are used together? -

The methods that come with are inadequate, none of them can give me: page's & lt; T & gt; Search all (Specify & lt; T & gt; Specific, Page-worthy Page Eligible) List & lt; T & gt; Search all (Specification & lt; T & gt; spec) list & lt; T & gt; The first method performs the paged query and counting query (Specification & lt; T & gt; spec, sort sort) Panning on the next 2 pages does not happen at all. What I want is one of the following: slice & lt; T & gt; Search all (Specify & lt; T & gt; Specific, Page-worthy Page Eligible) List & lt; T & gt; Without expanding the JApaSpecificationExecutor, I was able to execute both questions, but this was also a counting query. In my case, it is important to avoid the counting query because it is very expensive. The question is how? see findAll (Specification, Pages) and reading Pages (typed diplomacy, page qualified, specialty) Methods It seems that th...

r - Creating a column with differences based on another column -

I have a data frame that looks like this (simplified from 699 treaties): TRT & lt; - data.frame (T.ID = c (1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,8), treaty = c ( "Hungary Slovenia 1994", "Hungary, Slovenia 1994", "Nicaragua Taiwan 2006", "Nicaragua Taiwan 2006", "Ukraine Uzbekistan 1994", "Ukraine Uzbekistan 1994", "Brazil, Uruguay 1986," "Brazil, Uruguay in 1986", "Albania Macedonia 2002 "," Albania, Macedonia 2002 "," Albania, Moldova 2003 "," Albania, Moldova 2003 "," Albania, Romania 2003 "," Albania, Romania 2003 "," Izmir 1977 Treaty "," Izmir 1977 Treaty "," Izmir 1 9 77 of the Treaty "), CK = C (" Hun 1 9 4 "," SLV 1 9 4 "," NIC 2006 "," Tiaa 2006 "," Ukear 1 9 4 9 " "Uzbl994", "Brl986", "Urul986", "Alb2002", "Ma...

html - Change meta viewport and reload page reset scale -

I see the web page's meta-viewer & lt; Setting in Meta name = "Viewport" content = "width = tool-width, initial-level = 1.0, max-scale = 1.0, user-scalable =" /> Then after reloading of the same page, with a set of cookies, I can see the meta viewport and lt; Meta name = "change in viewport" content = "width = 1024, user-scalable = yes" /> But for some reasons reloading the page (and so on "width = 1024, user-scalable = yes" I see the page scale and zoomed, instead of looking at the whole layout in 1024px. I'm testing it on iPhone 4S / 5/5 S with iOS 7/8 Your Help Thanks in advance! I have solved. I'm calling the page's reload as a JS window.location.reload (true); By doing this, it was scaling the previous VoAport. window.location = window.location.origin; This scaling resets. And all work fine.

php - Download Excel file using PHPExcel -

Image
I am trying to download the excel file using PHPExcel, it seems that this excel file is well downloaded But the data in the Excel file is everything Crap .. What I do not expect is that I have passed very basic ways to test my Excel sheet data output here the code I'am Trying else if ($ request- & gt; p ['type'] == 'excel') {$ report_type_name = "Graph all Report "; $ ExcelReport = New ExcelApExport ($ classes, $ group_definition, $ questions, $ sample_corrections); $ ObjPHPExcel = $ ExcelReport- & gt; Export ($ set, $ disp_filter); Header ('content-type: application / vnd.ms-excel'); Header ("content-dispute: attachment;". Escape_for_content_disposition ("{$ report_name} - {$ report_type_name} -" .date ("Y-M-D.H."). ".xls")); Header ('cache-control: max-age = 0'); $ ObjWriter = PHPExcel_IOFactory :: createWriter ($ objPHPExcel, 'Excel 2007'); $ ObjWriter- & gt; Save (...

java - How do I reverse my array to print out the array in reverse? -

इस सवाल का पहले से ही एक उत्तर है: 32 जवाब सार्वजनिक वर्ग BubbleSort {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {int [] मान = {45, 67, 12, 34, 25, 39}; इंट पास, तुलना, अस्थायी; स्ट्रिंग परिणाम = ""; के लिए (पास = 1; पास & lt; = values.length - 1; pass ++) {for (तुलना = 1; तुलना & lt; = values.length - pass; compare ++) {if (values ​​[comparison - 1]> gt; values ​​[ तुलना]) {temp = मान [तुलना - 1]; मूल्यों [तुलना - 1] = मान [तुलना]; मूल्यों [तुलना] = अस्थायी; }}} के लिए (इंट आई = 0; आई & lt; values.length; i ++) {परिणाम + = मान [आई] + "\ n"; } System.out.print (परिणाम); }} यह मेरा कोड है यह प्रिंट करता है: 12 25 34 39 45 67 मैं इसे उलटा कैसे दूं, यह प्रिंट करता है: 67 45 39 34 25 12 इसके अलावा, कैसे क्या मैं सरणी को सामान्य रूप से प्रिंट करता हूं: 45 67 12 34 25 39 मैं उन्हें कैसे मुद्रित कर सकता हूं। आपको इसे स्वयं पर वापस करना होगा आपके लिए यह बॉक्स के बाहर विधि नहीं है। के लिए (int i = 0; i & lt; values...

jquery - How can I trigger my login modal (popover) when authentication is required? -

I am creating a Rail 4 app and using the device for authentication. When the user tries to access a URL, which requires authentication, Devise redirects the user to the login page to create a new session. I decided to keep AJAX login requests confidential for things by configuring Devise and allowing the user to log in through a model form. Its work is far too great when the user navigates to the 'login' button in the user navbar, the model is displayed, the user enters his credentials, the AJAX request is processed, and the model is dismissed. However, the modal login form can only be triggered by clicking on the 'Login' button in my nav bar. Whenever the user tries to reach such a URL for which authentication is required, the user is still redirected to the Divis login page. Instead of being redirected to the login page, I would like to display the login modal. Authentication is required, so how can I trigger my login mode (popover)? Here's a quick ove...

rest - Apache Camel Restlet Producer body key -

I have a problem to recycle the body. My passage in Apache camels is: from ("timer: msgGen? Period = 2000") .setBody (simple ("one test") .to ("restlet: http: // Local host: 8888 / restletMethod = "post"); Localhost: 8888 is Fitzler () There is race-response on intelligence: A% 20 test and breadcrumb id = ID-W530-60491-1415112773228-0-11 and removed time = Mars% 20 Nov% 2004% 2015% 3A 53% 3A 066% 20 CETE 202014 Better reading Encoded for: A test and breadcrumb id = id-W530-60491-1415112773228 -0-11 and removed time = Tuesday Nov 04 15:53:06 CET 2014 But I think it should be: body = a test & amp; BreadcrumbId = ID-W530-60491-1415112773228-0-11 and removed time = Tuesday, November 04 15:53:06 CET 2014 The key "body" is missing, or am I Do I know incorrectly? Is this a bug or a feature? How can I solve this? To get a key-value pair? Thanks OK, I solved this problem: From ("timer: msgGen? Period...

php - Grant access to module in Yii2 -

Is it possible to set permissions with RBAC methods (role, permissions) to reach the module in Yii2? To allow users of a specific role to be used for one of their modules I use filters for this purpose: 'Module' = & gt; ['Roles' = & gt; ['Class' = & gt; 'AJ \ Admin \ Module', 'Access' = & gt; ['Class' = & gt; 'Yii \ filters \ AccessControl', 'Rule' = & gt; [['Permission' = & gt; True, 'roles' = & gt; ['Admin'],]]],]

arrays - Trouble Writing to file -

I'm having trouble eliminating this model. This concept is for questions asked for a category of turtle . Each turtle represents the same domain of knowledge and each question should have many random domains of knowledge. The turtle whose ID matches the domain in question is called to answer it. Their answer was then evaluated on the basis of the capabilities and expertise of the tortoise. I hope I have code bones but I am unable to verify it unless I can not get Excel to get some output. Can someone tell me that I am wrong in my writing directions? When I run the model, no file is updated or created. And can you see any other flaw in the code? Thanks, John Globals [answer to question] Clear the turtle's [capacity expertise] to open all the files / users / johihithase / profile file. CSV "Set-Turtle 500 Set Questions [] Set [] Set [] Turtles [Pre-Turtles] Set-Question Set Answer [] Turtle [Tha-A-Answer] Evaluate (List" Relevance Quality "answer) if tic...

unreachable code detected c# forms -

इस सवाल का पहले से ही एक उत्तर है: 14 उत्तरों मैं सी # के लिए नया हूँ और मैं क्यू + ए फॉर्म एप्लीकेशन बना रहा हूं मुझे "txt.acceptesReturn = true;" लाइन में एक "पहुंच योग्य कोड का पता चला" चेतावनी मिलती है मैंने लाइन पर # प्रगामा चेतावनी अक्षम करने का उपयोग करने की कोशिश की है, लेकिन यह कोड के उस टुकड़े निष्पादित नहीं करता है। किसी भी मदद की सराहना की जाएगी, धन्यवाद! नाम स्थान WindowsFormsApplication11 {सार्वजनिक आंशिक वर्ग c1l1: फ़ॉर्म {int cLeft = 1; सार्वजनिक सी 1 एल 1 () {इनिशियलाइजमेंट (); } निजी शून्य बटन 1_Click (वस्तु प्रेषक, EventArgs ई) {पाठ बॉक्स टी = नया पाठ बॉक्स (); T.Text = "श्रेणी 1, स्तर 1 के लिए प्रश्न दर्ज करें"; स्ट्रिंग टी 2; टी 2 = टी। पाठ; MessageBox.Show (टी 2); AddNewTextBox (); } सार्वजनिक प्रणाली.विंडो.फ़ॉर्म। पाठ बॉक्स AddNewTextBox () {System.Windows.Forms.TextBox txt = नया सिस्टम। Windows.Forms.TextBox (); this.Controls.Add (txt); Txt.Top = cLeft * 25; Txt.Left = 100; Txt.Text = "टेक्स्टबॉक्स" + this...

reshape - r- cumulative frequency when every combination doesn't appear always -

I need to call everyday calls to the compounded client. The example table is: & gt; Data die clay llam elegios kalamam 1 1-11 a1 1 1 2 3-11 a 1 2 3 1-11 b 2 1 2 4 2-11 b 1 1 3 5 2-11 c 2 0 2 As you can see, the client did not call 2-11 in a day, so the combination client does not appear in the + 1/2 day table. If I run: series & lt; -data.frame (dcast (data, elegios + diia ~ cumllam, length)) I get: & gt; Series elegidos diameter X1 X2 X3 1 0 2-11 0 1 0 2 1 1-11 1 1 0 3 1 2-11 0 0 1 4 1 3-11 0 1 0 But If you call the second day how many clients have been called once, the customer should be seen and this is not because I have no line in the table for the combination table and in the previous table of Table 2-11. The table should be visible: elegidos diameter X1 X2 X3 1 0 2-11 0 1 0 2 1 1-11 1 1 0 3 1 2-11 1 0 1 4 1 3-11 0 1 1 x1 is the number of customers who were included in that right in the same call and that day. The x2 is the number...

Share image and text on instagram using Android API -

In my Android application, I want to share the image and image without using intents. Is there any way of doing it? Actually, I discovered an Instagram SDK on Google, but I could not find any such thing. Is there an API that has image and text sharing functionality?

couchbase - Sqoop import for hadoop 2.5.0 -

समस्या: sqoop प्लगइन के गलत संयोजनों के कारण Sqoop आयात विफल , हाउओप और काउचबेस कनेक्टर। विवरण: मैं Sqoop 1.4.5-cdh5.2.0 से हडोपॉप 2.5.0-सीडीएच 5.2.0 , काउचबेस प्लगइन 1.1.dp3 का उपयोग करके काउचबेस से डेटा आयात करने के लिए जावा 6 वाले एक Linux मशीन पर है। लेकिन सैकूप कार्य विफल हो जाते हैं। मैंने एसक्यूप 1.4.3 और 1.4.4 जैसे पिछले संस्करणों के साथ कोशिश की है। इन संस्करणों में पासवर्ड से संबंधित समस्याएं हैं इसलिए किसी भी बाल्टी का पासवर्ड होने पर, आयात विफल हो जाता है। कृपया सबसे अच्छा & amp; किसी भी व्यक्ति के लिए काम कर रहा है जो Sqoop संस्करण, हैलोप और काउचबेस प्लगइन का काम संयोजन पिछले कुछ दिनों में उपरोक्त संयोजनों को चलाना और कहीं भी नहीं जाना। किसी भी मदद की सराहना की! धन्यवाद। इस मुद्दे को काउचबेस 2.2 और 1.4.4 की चौकोर के साथ लाइव देखा था। मैंने काउचबेस पुस्तकालयों को उन्नत किया और इसे काम करने के लिए स्रोत कोड को संपादित किया। मैंने संपूर्ण फ़ोल्डर में git हब में पोस्ट किया है।

php - XML parsing error : no element found -

I'm quite new, so I'm seeing something clearly, I'm making a curl Post like this: $ import = '& lt; Client & gt; & Lt; Full name & gt; Space ada & lt; / Fullname & gt; & Lt; / Client & gt; '; $ Ch = curl_init (); Curl_setopt ($ CH, CURLOPT_URL, "https://www.examplesecure.com/clients.xml"); Curl_setopt ($ CH, CURLOPT_USERPWD, "12343223434fkgnfd: x"); Curl_setopt ($ CH, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); Curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, incorrect); // curl_setopt ($ ch, CURLOPT_SSL_VERIFYHOST, incorrect); Curl_setopt ($ ch, CURLOPT_SSLVERSION, 3); // fix http_code 400 curl_setopt ($ ch, CURLOPT_CUSTOMREQUEST, "POST"); // curl_setopt ($ ch, CURLOPT_POST, true); // curl_setopt ($ CH, CURLOPT_VERBOSE, 1); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ ch, CURLOPT_HTTPHEADER, array ('Accept: app / xml', 'Content-Length:'. Strlen ($ import)); Curl_setopt ($ CH, C...

javascript - After angular filter on options if only one option is left, select it -

I have two selected boxes, one takes the box which the other has chosen and its as a filter for myself Sometimes the filter leaves only one option. I'm looking for an option to choose that option only if it's the only one in the list. If this is very unclear then I can put an example. Thanks in advance. This is not an angular related question. But here's the answer using jQuery: var numitems = $ ('# myselect'). Children ('Options') Length; If (numitems == 1) {$ ("# myselect option: first"). Ether ('selected', 'selected'); // just select the first} If you know the value $ ('[name = myselect]'), then you can also choose from the price. Val (3); // Choose from a value == 3 You can also select by text.

Rails Query with embedded jQuery -

There are options to select a section based on the previous selections in my form once I select the section And show how many questions are there in the section. I am trying to count questions but can not understand the syntax. Every time a section is selected I am trying to update a @ counting variable. Then to add a line, specify the table name in the hidden field in my table. How do you query this? The $ ('# question_section') is the wrong syntax. $ ('# query_section'). Change (function () {{lt;% @ count = question where (section: $ ('# query_section')) Calculation% & gt; $ ('input [name =' question_count "] '). Val (& lt ;% @ Count% & gt;);}); More information needed I basically do not think of the code in your view that you will have to write any rail query inside your jacket. It has become very easy. So far I have assumed that the user with your form Get options for section for questions You must follow the...

A Beginner Trying to Use Else Statements C#? -

I am sitting in a course for computing for the first time and I am trying to 'crack' it for one age ( I am very new to this ... sorry!). I can not build a simple if / other statement, in which the conditions are found, it writes a positive response, and if not, then negative feedback. But I'm getting errors: Invalid expression word 'other' Only assignments, calls, increments, decreases and new object expression can be used as a statement Forgive If it does not make any sense, I am confused! : ( Fixed zero main (string [] ARGs) {console.wedlines ("Do you prefer bananas?"); Console.readline (); if (console .readlines () == "yes"); {Console.WriteLine ("Thank you for your time!");} And; {Console.WriteLine ("Oh OK.")}}}} } You need to delete the semicolon that you have, usually its if (condition) {// code} else {// code} and if you have more than one condition that you can get then if (condition) {// code}...

Types and rounds in SQL Server -

I have the following query: numeric as DECLARE @ A (36, 14) = 480 DECLARE @ B as Numeric (36,14) = 1 Select @ B / @ A cast cast (decimal as of B) / Cast (decimal as @) Why the first calculation returns 0.002083 and the other one 0.00208333333333333 ? is not numeric (36,14) enough enough for a good precision (just as a second query)? If I only use numeric , instead of numeric (36,14) , I is again a good precision: select cast (@ b numeric) / cast (numeric as @ A) You can calculate the exact and scale using the documentation from SQL Server Books Online . I tried to make accurate calculation and scale for your case (operation = division, p = 36, s = 14) and I got a very strange result ... Accurate of result: [P1 - S1 + S2 + max (6, S1 + P2 + 1)] - & gt; 36-14 + 14 + max (6, 14 + 36 + 1) = 36 + 51 = Result of result: [Maximum (6, s1 + p2 + 1)] - & gt; Maximum (6, 14 + 36 + 1) = 51 In this situation, precision is greater than 38 and in this c...

ios - NSInvalidArgumentException when passing array to uitableviewcell -

Hello, when I'm in trouble for putting Utifetiv in Mekviwu cell would try to keep it in tableviewcell I have created a new view for tableviewcell, I put utility in the cell and made a new class for tableviewcell and filled it in the table. But I've always got an error [cell set newsletter: newsletter]; . Line 2014-11-04 19: 20: 15.881 Peşindeyiz [6272: 317,992] - [UITableViewCell setNewsList:]: unrecognized selector for example 0x78ec00f0 2014-11-04 19:20 sent: 15.884 Peşindeyiz [6272: 317,992] *** neither came exception 'NSInvalidArgumentException', due to the end because of the application: - (0 CoreFoundation 0x0097b946 __exceptionPreprocess: *** first throw the call stack '[UITableViewCell setNewsList:] unrecognized Selector Example Sent for 0x78ec00f0 '+ 182 1 libobjc.A.dylib 0x00604a97 objc_exception_throw + 44 2 CoreFoundation 0x009835c5 - [NSObject] doesNotRecognizeSelector:] 277 3 CoreFoundation 0x008cc3e7 ___forwarding___ + 1047 4 CoreFoundati...

git - take everything from a branch regardless of conflicts and other changes -

I'm merge a GIT and I'm merged with this branch and it's merged. Consider the code of the branch with the code of B. Today with the code today I want to merge branch B into the branch. If there is a conflict, then I want to take it from Branch B. If any file changes (auto-merge), then I want to ignore them and want to take them again from the branch There is no way that I can force all the files which have been converted into branches, the contents of the files on the branches GIT has merged and did not file, so I'm not sure that this is possible. Otherwise I would compare and compare and replace each file. (There are 1000 eekk!) thanks edit Thanks for the comment @AndrewC I want to be the opposite of us. From the documentation Our - It solves in any number, but the result of the merge is always the current branch head. It is used to eliminate the old development history of side branches. I am at branch A and want to merge with the branch and wan...

What is the maximum upper limit on number of Columns in a SQL Server view? -

I am creating a scene that I will have in some tables and where I write 14K I need more columns than I am not sure about the Maximum Number column in a SQL Server view Assume that I have two entities, Unit A and Unit B are now multiple values ​​for unit A Like Aid, BID, value (A1, B1, 5) (A1, B2, 6) (A1, B3, 7) (A2, B2, 7) (A2, B1, 8) (A2, B3, Nouvel) (A1, B4, TL) I want a list of A where B 1 is 5 and B2 is 6. BTW My B Table has a record of 14 4,0 9 According to the answer is

python - How to check if the state.highstate is applied on a minion? -

How can I tell if the State Highway is implemented for a Minion? Is there a salt-call, I can see if salt. Does the heatstate apply? I found out how ... find that lookup_jid returns results for every state to be true or false, in fact what I was looking for. bash [root @ localhost ~] # salt-run jobs .lookup_jid 20141105195906794185 10.0.2.15: ------- --- pkg_ | -apache_ | -httpd_ | -installed: ---------- __run_num__: 0 changes: ---------- NOTE: package httpd has already been installed. Duration: 1671.884 Name: httpd Result: True Retcode: 1 start_time: 20: 16: 06.942403 service_ | -apache_ | -httpd_ | -Rayee: ---------- __run_num__: 1 Change: ----- ----- Note: The service httpd is already disabled, and in the desired state period: 653.679 Name: httpd Result: The right ratecode: 1 start_time: 20: 16: 08.614446 You State.highstate to call from test = true : salt '*' state. Histate test = true

Do Scala Sparc RDDs allow objects with reference members -

I started the initial stages of designing an app using SPARC RDD (which I still do not understand) Is in. There will be a large number of objects in RDD, which will consist of references to a small number (100) of some large (0.5 MB) objects. The functions that will be mapped on the RDD will call the member functions on the objects, which alternatively calls the references on the member. Is this possible in theory? Spark (not spark) data will normally be passed around the use of Java serialization ( Unless you configure it to use the Kyoto). I think it will work right with big objects if you are ready to adapt your data a little bit, then it may be best to use it for large invariant items.

android toolbar for pre lollipop devices -

When I changed from ActionBar to Toolbar, I had to face many issues. I listed them here 1 ) I have several pieces that have been changed / using backstacks. Everything was working fine when I pressed the back button, but when I switch to the toolbar, the application closes when I press the back button. 2 ) The background of the popup menu is black & lt; Item name = "Android: popup menu style" & gt; @ Style / popup menu & lt; / Item & gt; & Lt; Style name = "PopupManu" parent = "@ Android: Style / widget. Popup menu" & gt; & Lt; Item Name = "Android: Popup Background" & gt; @Android: color / white & lt; / Item & gt; & Lt; / Style & gt; Even this did not work. If I use AppCompat. The light theme, the background color of the popup menu is white, but then the navigation indicator icon and black 3 ) This is my menu style, the item "add" is not shown here with id. Instead, I...

xcode - How to show user location on a custom image without a mapview -

I have a custom Photoshop image of a region. This is mostly rectangular, so I've got the coordinates of 4 corners using Google Maps. I would like to translate these 4 corners into X and Y axis on that image and then use the core space to display the user's location within those 4 corners (something important outside of it is not). Can I do this without using a map view? I do not really need any other functionality outside that small area or do I have to overlay a custom tile on the MapKit, limit visibility and zoom to that area and work from there? (Which is more resource than if Mercator coordinates this way) Appreciate any good tutorial! However, it is possible to translate the latitude and longitude to the latitude and longitude at x, but on an image it is possible to translate the latitude and latitude on the x Coordinate, it is usually more beneficial to use MKOverlayView (as you are described in your question) due to the free functionality you get: current s...

java - glTranslate error in simple JOGL program -

I'm trying to create a simple JOGL program, and I've gone into a problem. I have so far imported all the necessary package into my class file, however now, whenever I use the glTranslate function, it is being flagged as red as an error, for example this code At the end of the block Public Zero lab2a (GLAutoDrawable drawable) {GL gl = drawable.getGL (); Gl.glTranslatef (-1.0F, -1.0F, -6F); // First rectangular (blue) gl.glBegin (GL.GL_QUADS) drawing; Gl.glColor3f (0f, 0f, 1f); // set color blue gl.glVertex3f (-0.5f, 0.5 f, 0.0f); // top left top gl.glVertex3f (0.5 F, 0.5 F, 0.0F); // Top right angle gl.glVertex3f (-0.5 F, -0.5F, 0.0F); // lower left gl.glVertex3f (0.5 F, -0.5F, 0.0F); // bottom right gl.glEnd (); Gl.glTranslate (1.1f, 0f, 0f); The flag reads: "The symbol can not be found", and I am present for every use of the use of glTranslate. Does anyone know how to fix this? Please visit JOGL 2, but go on. Replacing GL.GL_QUADS with GL2.GL_QUADS, rep...

php - Send powershell results to HTTP -

Sorry to be a newbie in this, but later on to show me a positive result in a PHP page for processing There is something to learn in I tried this code: $ test1 = "test" $ postParams = @ {test = $ test1} Avai-WebsterWest-URI http: // bu01 / Stats /input.php - Method Post - body $ postParams which works fine, receives string test in PHP $ _POST ['test'] But when trying to parse more data like this: $ test1 = get-WMIobject win32_logicaldisk | Selection-Object Device ID, FreeSpace, Size $ PostParam = @ {Test = $ Test 1} Invec-WebUuVest-URI http: //bu01/stats/input.php- Law Post - Body $ Post Parameters All the results I have found are "System.Object []". How to send PHP? Thank you! UPDATE: Thanks for your suggestions, I created the following script with a foreach to post each "line" in a different web request. Which works fine for now, has not been tested with HD space, but with whitepaper in Exchange DB, but the idea is the sa...