Posts

Showing posts from March, 2015

javascript - hasClass jQuery isn't working -

I am working on a navigation system where the left and right arrows extend the LIs. & lt; a href = "#" square = "icon-arrow-left active" & gt; & Lt; / A & gt; & Lt; Ul & gt; & Lt; Li class = "contracted" & gt; & Lt; A href = "#" & gt; 1 & lt; / A & gt; & Lt; / li & gt; & Lt; li class = "extended" & gt; & Lt; A href = "#" & gt; 2 & lt; / A & gt; & Lt; / li & gt; & Lt; li class = "active placement" & gt; & Lt; A href = "#" & gt; 3 & lt; / A & gt; & Lt; / li & gt; & Lt; li class = "extended" & gt; & Lt; A href = "#" & gt; 4 & lt; / A & gt; & Lt; / li & gt; & Lt; Li class = "contracted" & gt; & Lt; A href = "#" & gt; 5 & ​​lt; / A & gt; & Lt; / li & gt; & Lt; / Ul & gt; &

jquery - Change image upon click, revert on click anywhere -

I am trying to create a script which: the image changes when the image is clicked , br> Then return back to the original image, whenever clicked anywhere on the screen. Currently, my script only changes when the exact image is clicked. Changes to Image Clicks: & lt ;! - Cardstats - & gt; & Lt; Img src = "toggle-on page" class = "img-swap" /> Click the jQuery script to change the image: / * ToggleOn & amp; Toggleoff * / $ (function () {$ (".img-swap"). Live ("click", function () {if ($ (this) .attr ("class") == "img-swap" } {This.src = this.src.replace ("toggle-on", "toggle-off");} and {this.src = this.src.replace ("toggle-off", "toggle-on") ;} $ (This) .toggleClass ("toggle-on");});}); Here is an updated code that can be used by .bind ( ) as suggested by Joel , as it is right, its best support if the image is clicked, then it

c++ - ERROR: cannot open source file x11\xlib.h -

I am using OpenCV 2.4.8 and Visual Studio Express 2012. I have included all environmental variables PATH and additional libraries etc. I get this error when I run the code: Error: source file x11 \ xlib.h p> Can not open I tried in Google but I can not be able to get the proper solution. #include & lt; X11 / Xlib.h & gt; #include & lt; X11 / Xutil.h & gt; You can not just use that code on windows While OpenCV itself is very portable, the code is not clearly above it. Instead of using cv :: imshow (), jujojujo2003 was using the native XWindo call for the pirate.)

How to connect Oracle Advance Queue (AQ) from Oracle ADF? -

How do I connect to Oracle Advance QEW (AQ) from Oracle ADF? I want to show advance QE data (ie Payload XML) in table format on ADF UI page. Is there an adapter available? You may want to use messenger beans (as is the implementation of Oracle AIM JMS) . I think these links can help you: (Here you will get a sample of ADF Fusion App)

remove view duplicate data in sql database -

SELECT टिकट_आईडी, धागा_प्रकार, ost_ticket_thread से where thread_type = 'एम' यह मेरा एसक्यूएल स्टेटमेंट है नीचे की तरह एसक्यूएल स्टेटमेंट से परिणाम। ----------------------- | ticket_id | thread_type | ----------------------- | 4 | एम | | 4 | एम | | 5 | एम | ----------------------- मैं उसी ticket_id और thread_type के बिना डेटा को कैसे देखना चाहता हूं? मैंने ग्रुप द्वारा स्टेटमेंट किया है लेकिन मुझे एक समस्या का सामना करना पड़ता है जब मैं सभी टिकट_आईडी की गणना करना चाहता हूं यह 2 होना चाहिए। लेकिन यह 3 लौटता है। कोशिश करें GROUP BY : SELECT टिकट_आईडी, धागा_प्रकार से ost_ticket_thread WHERE धागा_प्रकार = 'एम' ग्रुप द्वारा टिकट_आईडी, धागा_प्रकार OR का प्रयोग करें DISTINCT : का चयन करें टिकट टिकट_आईडी, धागा_प्रकार से ost_ticket_thread जहां thread_type = 'M' परिणाम: < / P> TICKET_ID THREAD_TYPE 4 M 5 M नमूना परिणाम। संपादित करें: गिनती प्राप्त करने के लिए: SELECT टिकट_आईडी, थ्रेड_प्रकार, COUNT (टिकट_आईडी) ost_

python 2.7 - Scrapy Request callback method never called -

I am creating a crawlpidder using Scrapy 0.22.2 for Python 2.7.3 and I request that The callback method that I have never referred is called. Here is a snippet from my parsing method that initiates a request within an alief block: elif current_status == "Superseded": # There is a lot of work to do here. It is to check whether the replacement unit is available or not. If not, download whatever is the outline # where we have a & lt; Td> The element in which "has been installed by" and update the link, which is updated_unit = hxs.xpath ('/ html / body / div [@ id = "page"] / div [@ id = "layoutWrapper"] / div [@ id = "twoColLayoutWrapper"] / div [@ id = "twoColLayoutLeft"] / div [@ class = "layoutContentWrapper"] / div [@ class = "external"] / div [@ class = "fieldset"] / div [@ Class = "display-row"] / div [@ class = "display-row"] / div [@ class = "display

asp.net mvc - Error displaying database values in dropdown box in c# -

I have a problem on how to display a dropdown list of values ​​in my database in my database table (Categories) There are 2 columns, which are category IDs and titles. The goal is to provide a dropdown list where a user can select the title stored in the table. Model: received a public partial category category {Public Entity}; Set; } Public string title {get; Set; }} Controller: Public Action Index () {Private Reference DB = New Context (); ViewBag.Category = new selection list (db categories, "id", "title"); See Return (); } See: @ Model MyApp.Models.Category & lt; P & gt; Categories: @ Html.DropDownList ("ID", "Choose a Category") & lt; / P & gt; The error I get is in the scene that says: 'IEnumerable & lt; SelectListItem & gt; ' There is no ViewData item of type, whose key is 'ID' strong> viewbag and you see that the "id" is going through you class

sapui5 - Get the model when clicking a button on a table row -

I have a SAPUI5 table tied with simple model, I am printing data using the SAPUI5 table control . I am binding the name field with the name of the table on the control name and on the next column I have a button. When you press this button I want to do some operation on the model (Read) However, I can not understand the way to get a model example in the callback function for the button. Here is the problem to reproduce. The answer to this problem is thanks to a user from the SAP community. Press is the updated code for event handlers which resolves the current model var button = new SAP .ui.commons.Button ({text: "button", press: function (e) {var model = this.getModel (); var path = e.getSource (). GetBindingContext (.). GetPath (); Var obj = Model.getProperty (path); console.log (obj);}});

symfony - Symfony2/Doctrine - Get tags by blog -

I am trying to remove a way to get the tag through blog I know that you can get all the blogs just And can use the loop to get every blog tag, but using this method I am unable to select a different tag, instead of just selecting one tag, there is an end to all tags. What I'm trying to do here: Tags are set as blog strings in the blog entity. I am trying to work together ceramically, it does not work - what's missing in it? public function getTagsByBlog () {$ blogTags = $ it- & gt; CreateQueryBuilder ('B') - & gt; Select ('BID') - & gt; Where ('baid =: tag') - & gt; Setpamator ('tag', 'betags'); Return $ blog tag- & gt; GetQuery () - & gt; GetResult (); } / ** * set tag * * @lost string $ tag * @ return blog * / public function set tag ($ tag ) {$ This-> Tag = $ tag; $ This return; } / ** * Get tag * * @ Return string * / public function getTags () {return $ this- & gt; Tag; } You must choos

node.js - Error deploying a node/Express app on Windows Azure -

I currently have an Express / Node on Python. Trying to deploy JS app without success - Error I'm getting low: Remote: & gt; Libxmljs@0.9.0 Install D: \ home \ site \ wwwroot \ node_modules \ libxmljs Remote: & gt; Node-Jeep Remote Remote: Remote: Remote: D: \ Home \ site \ wwwroot \ node_modules \ libxmljs & gt; Node "D: \ Program Files (x86) \ npm \ 1.3.11 \ node_modules \ npm \ bin \ node-gyp-bin \\ .. \ .. \ node_modules \ node-gyp \ bin \ node-gyp.js "Remote Reboot: To enable the parallel build to build projects in this solution, please add" / m "switch Remote: MSBUILD: Error MSB3428: Visual C ++ component" VCBuild.exe "can not be loaded To fix this, 1) Install the .NET Framework 2.0 SDK, 2) Install Microsoft Visual Studio 2005 or 3) Component in System Path Add the place if it is elsewhere. [D: \ Home \ site \ wwwroot \ node_modules \ libxmljs \ build \ binding.sln] remote: gypnpm ERR! Strange Error 1 Remote: Failed exitCode =

c++ - Time complexity of Random Gaussian Function -

I have implemented the Cross-Entropy Minimization Method in C ++ while referring to the Ruby Code given to me < P> I can not understand how the random_gazy function is associated with normal distribution and what it really is doing. Apart from this, I am unable to know the complexity of this ceremony. Please help me with these two things dual random _gasian (double meaning, double staidew) {double u 1, u2, w; Do {u1 = 2 * ((double) rand () / RAITMX) - 1; U2 = 2 * ((double) rand () / RAidmx) - 1; W = u1 * u1 + u2 * u2; } While (w> = 1); W = sqrt ((-2.0 * log (w)) / w); Return means + (u2 * w) * stdev; } Here the C ++ code is to solve the program Ax = B and it is working fine. ... while block corners (and; 1, and ;; 1) makes a point in the square until the point becomes root in a circle of radius centered in the original. The expected number of iterations is the ratio of regions, which is in absolute 4 / π or o (1) large-o-notation. How is this process relate

angularjs - AngulaJs-facebook-sdk works only when refresh the page -

I tried to integrate facebook share and added buttons like a button to a single page. They have mentioned that by putting those code inside body tags, it will work fine and when I manually refresh the page then it works fine so I searched a bit and tried Angel's-Facebook-SDK. But the problem is still the same, it only works when the page is manually refreshed. Here is the code part that I used in the config section. . Config (Facebook Conferencing Provider) {facebookConfigProvider.setAppId (285290671625269); Facebook Config PROVIDER .Set language ('N-US'); Facebook Config PROVIDER.SetDabub (true); Facebook Config Providers. Autoin (True); Facebook Config PROVIDER. Set option ({status: true});}) And here is the html page I used on the page. & lt; Afb: like href = "http: //www.linkedin.com/in/pranjutgogoi" layout = "button_count" action = "like" show-faces = "true" share = "false" on-edge-created = "onEg

android - Sms intent not working in sony xperia -

I am sending MMS from my application, it is working correctly in all devices, but when I have Sony Xperia I am using it, neither its recipients nor the SMS body is included. intent = new intent (intestinal action_asm) intent.setType ("vnd.android-directory / MMS-SMS"); Intent.putExtra ("address", "9412121212"); Intent.setData (Uri.parse ("SMS")); Intent.putExtra ("sms_body", "sample"); StartActivity; Try this type ... Intent = new intent (android.content.Intent.ACTION_SEND); Intent.setClassName (info.activityInfo.packageName, info.activityInfo.name); Intent.setType ("vnd.android-directory / MMS-SMS"); Intent.putExtra (Intent.EXTRA_TEXT, final_sms_txt); StartActivity;

popup - Android:New pop-up style for enter an amount -

Image
Optimize pop-up to enter an amount like any image below Anybody can help I any help Is appreciated. I had the same problem recently this library should help you:

objective c - Model View Controller example in iOS -

I am learning MVC iOS I read some articles on Google I can understand what is MVC but many tutorials In the case of MVC, no sample code has been mentioned to them. Please use me a sample code or simple example MVC concept. Please tell me how to work on models based on coding part and view and controller. I think this is useful for many people, please help me anybody thanks in advance. This usually leads to Msivi to learn iOS I strongly suggest you take a look at the iOS Developer Library . And in particular, see their guide. This tutorial goes through some design patterns ( including MVCs ). This is a great start and you will see that people of Apple want to write code for you iOS. This is a complete tutorial with a code that you want to write, and everything explained . And there are other tutorials and sample code for every framework, it is definitely worth reading and there is something to check all the time while coding for iOS just check the whole.

c# - How to handle a BitmapImage when giving a image URI that doesn't exist? -

I am trying to download an image and it is a source of a bitmap image I'm setting in But there is potentially a case where the image does not exist, that is, the reaction is a 404. I am currently doing this: Bitmap image bitmap image = new bitmap image (new yuri ("link_ to_ iTage")); Although there is no error, I prefer to show the message or something instead of handling the case and displaying a blank code BitmapImage Is there a way to get the code? Or is there a different approach? Subscribe to the bitmap image. accident. The reason for the failure can be read from the event handler.

objective c - How to make charge using stripe in iOS? -

Image
I have read all the details about the integration of the bar in the iOS app and download and run a sample sample application. When running this app, I am receiving the error while testing on the iPhone Simulator. The following method is calling after the token (" error ", @" error "message): Recipient :: Please tell me how to solve this problem and pay a credit card on the iOS app as this sample code contains information about payment. You are using example.com . Change it before your own server address.

C# code to obtain Maximum SQL Server 2012 Write Performance -

I want to know whether we are already performing the fastest SQL EEE for our application. We have created a sample application that performs a bulkopy operation in the local SQL Server database. Bulk CoP writes 100,000 rows of data from the dataTable in the Operation Memory. There is no index in the table inserted. The reason for this is that we want to achieve the maximum write speed of SQL Server only. The schema of this table that we are putting in: create table [dbo] [history score values] [[history paramatid] [bininata] null, [sourstimestamp] ] [Datetime2] (7) no tap, [architaimstamp] [datetime2] (7) no tap, [valutas] [int] tap, [arcastastas] [integer] no, zero, [integer] [int] Double walled] [float] spare null, [stringvalue] [varchare] (100) special null, [ennomedetext] [courtesy] (100) [Primary] We measure performance from our C # code on [Pure null, [anumumericvalue] [int] spare noal, [enumerative value] [varchar] (256) special noise) . Public Double Display Ba

regex - What is the meaning of the following expression in scala? -

I am trying to understand a source code .. (originally a regedx parser) .. but I can not understand I am the following expression: DRF quotes = a "???" Line ~ & Gt; "[^ '] +". R & lt; ~ "'" So I think [^'] means that everything except a single quote is found? right?? But what are the double quotes next to it .. And what are the double-quotes squawwed arrows inside the double quotes? "'" ~ & gt; "[^ '] +". R & lt; ~ "'" matches a single bid block: Single quote ( "'" " ) + Multiple non-single-quote characters ( "[^ '] +". R ) ends with a single quote ( "'" ). P>

php - MySQL update 1 row of table, previous table is being updated -

$ sql = "set up paper paper $ field = '$ data' where paper_id and user_id = ''. $ _SESSION ['edit2'] "'"; I encountered a problem when I update the title (column in the paper table) for Paper_ID2; User_id 1 Paper_ID1; User_id 1 is also being updated Can anyone give me an idea? Try it: $ sql =" set up paper $ field = '$ data' Please, where the paper_id = ". $ _ Request ['peppid']. / / * Comes from your request * / and user_id = '. $ _SESSION [' edit2 ']"' ";

jsf - dynamic datatable using inputs from an xml -

I want to create a nested table using JSF for which I have to dynamically charge. Basically a template jsf will work for any xml provided. node1 node 1.1 node 1.1.1 node 1.1.2 Node 2 node 2.1 Each node will have a table in JSF, actually a value from a nested dynamic figure is getting xml please How to do You can programmatically create datatable and populate. Balussey has already written an article about how to use datatyals programmatically. Please see:

php - WordPress - Add Numeric Pagination. -

I am using numeric post navigation code in my WordPress theme. I have set the Blog Page Show to a maximum of 24 pages so that page navigation displays 8 pages. Ex: 1 2 3 ... 8 . But does page navigation actually show me 1 2 3? 8 . Now my question is, what is the error in the code given below instead of its dot? is showing, please help me anybody. My code is, function wpbeginner_numeric_posts_nav () {if (is_singular ()) return; Global $ wp_query; / ** If only 1 page * / if ($ wp_query-> max_num_pages & lt; = 1) stop execution on return; $ Paged = get_query_var ('paged')? Absint (get_query_var ('paged')): 1; $ Max = interval ($ wp_query-> max_num_pages); / ** Add existing page to the array * / if ($ paged & gt; = 1) $ links [] = $ paged; / ** Add pages to the array around the current page * / if ($ paged & gt; = 3) {$ links [] = $ paged - 1; $ Link [] = $ page - 2; } If (($ paged + 2) & lt; = $ max) {$ links [] = $ paged + 2; $ Link [] =

java - android reshape all resource file string -

I'm working on a Android app and want to translate it into Persian language. All string values ​​in the project are saved in a resource XML file in some string values ​​in the layout files and in some sections (R. string) is done. When using Persian text in Android , it needs to be resized to display correctly. I want to redesign all the resource string values ​​without calling the reciep method for every string value Can anyone tell me how to do this? Some ideas: string class override override resource class Android provides functionality for a multilingual app already. It's better to use the framework function to change your text and instead of different versions of your app for each language. In that case, the App Tools chooses a suitable language from the available languages ​​based on locale settings. So basically you will start by creating the necessary directory structure (link above): MyProject / res / values ​​/ strings.xml value- fa

Onscreen keyboard on Android does not send correct keycodes for second language -

I have an application with native activity. I want to show the onscreen keyboard and hear the pressed key. When I'm typing in English, everything works fine, but when I switch the keyboard to the keyboard, I only get zero for the keycode, metastet etc. I use this code to show the keyboard: Input-method manager imem = (input-method manager) activity. Gate system system service (reference. INPUT_METHOD_SERVICE); View view = activity.getWindow () .getDecorView (); Imm.showSoftInput (see, 0); I get a keyboard event on the inInputEvent function in the native activity: int32_t eventType = AInputEvent_getType (event); If (eventType == AINPUT_EVENT_TYPE_KEY) {int32_t keyAction = AKeyEvent_getAction (event); Int32_t keyCode = AKeyEvent_getKeyCode (event); Int32_t will repeat = AKeyEvent_getRepeatCount (event); Int32_t keyFlags = AKeyEvent_getFlags (event); Int32_t keyScanCode = AKeyEvent_getScanCode (event); Metatet of int32_t = AKA EventGate MetaTest (event); LOGW ("E

phonegap Jquery check data connection before request -

I have jquery code for the server every 30 seconds to send the current coordinates. It is good in areas with good data coverage signals However, it crashes when the signal is fluctuating (data coverage is available and frequently disappears). After some time the app simply crashes without any warning ... catching section. I have to check whether data coverage is available or not, then send coordinates to the server continuously, otherwise do not just check again Data coverage is available. Here's my code: & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" charset = "utf-8" src = "cordova-2.0.0 js" & gt; & Lt; / Script & gt; & Lt; script src = "jquery-1.5.2.min.js" & gt; & Lt; / Script & gt; & Lt; script src = "main.js" & gt; & Lt; / Script & gt; & Lt; Script src = "jquery.mobile-1.0a4.min.js&qu

vb.net - How to fix a function that isn't calling (No error alerts) -

This is a code for my computing coursework to create a seat booking system, to which the user has a desired line input and the adjacent Seats are required, and then the form shows the message that does not have enough seats in that seat, whether seats are available or a warning. The main problem is that I do not have any errors, but after clicking on the submit button there is nothing that is not suggesting the "Seatblok" function, and I was thinking that Someone can give me a solution Personal sub-listbox objects, and events as senders in the form of ARG) handles the box. The selected index changes the end sub Private Private button to 1_Click (the sender in the form of the object, and event as ARG) button 1. Click the Dim row number as integer if ListBox2.Text = "A", then the row number = 1 other listbox 2.Text = "B" then the row number = 2 other list Listbox2.Text = "C" then the row number = 3 Other listbox 2.Text = "D" then

python - subprocess.Popen gets stuck for long time? -

When I run the Python Script (Bootstrap.py) on white, it runs correctly, but when I switch it to another medium Try to run from script (automation.py) it gets trapped // automation.py #! / Usr / bin / env dragon import system import option select subprocess global flag failcount = 0 def infra-fill (): global failaccount failaccount + = 1 debit watchfile (): fp = open ('BootStrap.log', 'r') print " Press #_input () at any of the #_input () in the fp.readlines () for "If" Boot Script Score: 3010 "contains: #import pdb # pdb.set_trace () global flag flag = 0 fp.close () parser = Optparse.OptionParser () parser.add_option ('- c', '- count', Dest = 'counter', help = 'Time should be rebooted' (options, args) = parser.parse_args () #counter = 1 If options No one. Counter = 1 Other: Counter = Option Counter Count = 0 Output = "" mylist = ['--cfgfile = "BDXT0_PO_0.cfg"', '--cfgfile = &qu

textmining, Export clusters in Rapidminer -

I'm working with about 300 articles (txt-files), and my cluster-analysis has been successful yet Now I want to save / export these 5 clusters separately, so that I can do further analysis on each cluster. How is this possible? I appreciate any answers! / lk You can export the results of the clustering operation in Excel and Check out the results using it. Alternatively, you can use the filter example operator with an appropriate filter to create an example set for specific values ​​of the cluster attribute.

c# - How to translate a lambda expression into English? -

I am a VB.NET programmer who also knows some C #. I recently came to Lambda quote which: a = function (b) b However: < Code> A = & gt; B + C; (That sounds like a bizarre indicator expression from C) The problem is that when I read the C # code I used to mentally Parsing words in English Then a = b + c; becomes "Add B and C and assign one" though I have the parser in the = & gt; There is no mental translation for the operator a => B + C; Either "points equal to B and C" which does not make any sense or "A is Lambda B and C" which is frightening. I am convinced that language creators mean that the operator should stand for a concept and be capable of reducing that concept in a word or very short phrase. then = & gt; Operator? ps Note that I have tried to simplify the instances as simple as possible so as not to be trapped in particular details. How about 'A return b plus c'?

upgrade - Upgrading Cassandra -

My Cassandra version is 1.2.4 and I try to upgrade it to I'm 2.0.5 and I know that in the first part I have to upgrade it to 1.0.14 and then upgrade it to 2.0.5 Try When I try to run nodetool -h localhost remondode host id then gives me this: "main "Exception in java.lang thread. Unsupported operation exception: can not delete itself on org.apache.cassandra.service.StorageService.removeNode (StorageService.java3199) ..... Before trying that command I tried Nodetool upgradesstables What's the problem? And how can I solve it? OS: Ubuntu 12.04 LTS Update Download the version 1.2.13 and the cassandra of 2.0.5 from the official site. Open Cassandra.yaml in both versions Cassandra Download Turn off the recording unit (the reading task will continue): Nodetul Dellies Stop the old Cassandra. Copy the data from current (old) Cassandra to a new version 1.2.13. Run it (1.2.13). Cassandra 1.2.13 update for the command table format: n

c# - Unable to check if PDF file is created correctly -

I am unable to open my PDF file, it says that some other process is using it. However, I stopped stopping my program. Am I doing something wrong? My button runs process , stores it in the data table Secure zero btnPrint_Click (object sender, EventArgs e) {Connection Con = New Connection (); SqlDataAdapter da; Datatelle DS; Con.con = New SqlConnection (con.str); Con.cmd.CommandText = "Select a process"; Con.cmd.CommandType = CommandType.StoredProcedure; da = new SqlDataAdapter (); Da.SelectCommand = con.cmd; DS = new datatable (); Try {con.con.Open (); Da.Fill (DS); } Hold (Exception Pre) {} Finally {con.con.close (); Con.con.Dispose (); ExportToPdf (DS); }} I'm printing data table here: Public Zero ExportToPdf (DataTable dt) {string pdfFilePath = @ "D: / myPdf .pdf "; Document Doctor = New Document (iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35); PDFDriver wri = PDF Writer. Get instant (doctor, new filestream (PDF file path, filemod. Creat)); D

java - stanford cs106a Bouncing Ball code questions -

I am a new learner of public sources of Stanford CS 106A checkForCollision is the method code for the bottom of this page, when I was given the reading bouncing ball, then I \ To do code ball.move (0, -2 * diff) , especially execute -2 * diff , I can not understand this math code. Is it OK for the ball ball.move (0, -diff) ? What is the difference? What is the bounce argument? Anyone here can help me understand this code, I am not good at mathematics Thank you very much / * * File: Bouncingball.Java * -------- ------------------ * This program graphically a bouncing ball * / import acm.program. *; Import acm.graphics *; Public class rant ball extends the graphics program {/ ** ball size (diameter) * / personal fixed end-end DIAM_BALL = 30; / ** quantity Y velocity gravity * / personal constant final dual = 3 each cycle increases as the result; / ** Animation delay or break time between call moves * / personal fixed final interval = 50; / ** Initial X and Y position of

java - 2 Different web applications - how can one recognize \ authenticate the other -

I have 2 different web applications that use spring and are running in a single trick (maybe That it should be separated for different collisions later) My first webapp is a straight forward web application that users can create, log in and make accessories. Other webapps are actually being executed from time to time HTTP requests (the rest of the APIs) to the first app My problem is to make sure that these requests are actually valid Is being executed by webpage # 2 and not from any other adverse requestor. 1) How can I do this? How can I ensure in webpage # 1 that he should only request webpage # 2? I do not want to trust single IP addresses. 2) Can spring protection help me achieve this? 3) Verifies web application # 2 against webapp # 1 # Is a viable solution through standard spring safety authentication mechanisms? "itemprop =" text "> For a login you have a The service can face the most web portals, and once the authentication is done successfu

sql server - Trigger in SQL to count a column and give a error if it is more than a specific value -

I need a trigger to avoid putting a specific value for the column, for example, in the booking table I have Booking is an ID and invoice id I want to count the booking ID for each invoice and compare the numbers in the airline table, which is called MaxBooking. If the number was higher than MaxBooking, it means that I can not book with that invoice number now | Booking id | Invoice id Traveler iid Flight ID | | | 1 | 101 | 20 | 99 | | 1 | 101 | 20 | 99 | | 1 | 101 | 20 | 99 | | 1 | 101 | 20 | 99 | | Flight Id | Airline id | | 99 | 500 | Airline ID | Airline-name | MaxBooking | | 500 Birtish Airway | 4 | This is the right solution, you are searching for I have accepted the names of the table: 1. dbo.fllightbookings 2.dbo.Flights 3.dbo.Airlines According to their appearance in their question Create Triggers [DBO]. [Trg_restrictMaxBooking] ON [dbo]. [Flightbearing] Start as the starting of INSERT; BEGIN transfer notification @ flight iid is selected @fliteaid = iFlig

c++ - Finding path in a char array -

Image
I am working on a project and I am in a situation where I have nxn four array of signs a, b or c I must check whether the path of b is between the first and the last row. Example Yes Input: I I got stuck at this point? Should I optimize some famous algorithm for graph searching or is there a better way to solve this problem? Should I add the bool array to mark the room I have seen? Thanks in advance for your time! Yes, you must adopt a graph algorithm to find a path from a source to the path target. In your case you have many sources (all in the first line of 'B') and many goals (in the last line of 'B'). The smallest route can be easily applied on the graph without any fluctuation. The difference in handling multiple sources is to initialize the queue only with all 'B' on the first line (and not one node). Every b cell in your graph is a node, one edge between the two adjacent 'B' cells. Note that BFS is completed (always g

gridview - Getting Previous State of Android Fragment on Back Button -

In an Android application, I have several pieces, in one piece (piece A), I switch between two sets Number of pictures in gridview by clicking the button using the Boolean variable Th Grid View item leads to a second piece (the piece B). On pressing the back button on the piece B, the gridview inside the slice A is loaded with the default set of images, not on the images set before moving on to the next piece of piece B. Please guide how I can reset the previous set is not the default set of images? In the main activity, I have implemented it in Backspace: @BackPressed on OwnerID Public (Zero) (if Settings for SettingsFragment) LoadGridViewFragment (); Else If (the example of a piece of the singulavigagrafragragment) {Boolean keyIsfaVSL = sequence of new shared pages (read.) (SingletonClas.KIISFflection, Incorrect); if (keyIsFavSel) loadDuasListFragment (); Else loadGridViewFragment ();} and if (piece frequency Of DuasListFragment) {Booley No key ISFVSL = sequence of new sha

Multiple notification wrong content on click android -

I get many notifications successfully using notification notifications. But when I click on any notification, every The last notification received once. Can anyone tell me how to open a similar notification? I mean every notification has its own content. Public blank override at @Receive (reference reference, intent to intent) {// TODO auto generated method stub / * * Clearly specify that GcmIntentService will handle the intent. Component component comp = new component name (context.getPackageName (), GCMIntentService.class.getName ()); Start the service, start it while keeping the device awake. startWakefulService (context, (intent.setComponent (COMP)); SetResultCode (Activity.RESULT_OK); * * / GCM Notification Utility NotiMsg = intent.getStringExtra ("msg"); GCM Notification Utility.NotPodad = ChopGeson (Int. Gate String Extra ("Date Published")); GCM Notification Optimization.NotDescription = ChopGeson (Int. Gate String Extra ("Description")); GCM N

python - what is the most pythoic way of indexing a file? -

(Warning: I am a newbie for Python language) What will be the most dragon way Here is an example text that I will use in my script. It was the best time, it was the worst time, it was the age of intellect, it was the age of foolishness, it was an age of faith, it was an age of incredibility, it was the light of the season, it was It was the spring of hope, it was the spring of hope, it was winter of despair, we had everything with us, we had nothing, we were all going to heaven, we were all going on the other path-- In essence, this period was like the period so far, that its Some astute officers insisted on their getting, for good or evil, in the comparative level of comparative only. The cola Season module is your friend for this question. I use a default word, I'll use words as keys in the text and the value will be the number of lines where the word has occurred. default defaults import d = defaultdict (list) for index, line enumerate (txt.splitlines ()): for w

c# - XML - Serialize class - Some questions -

I have the idea of ​​serializing the properties of a class in an XML-file and then uploading this file to the server The reason for this is that I want to download this file again and read the serialized content. Then this kind of structure: file exists (myfile.xml) - & gt; Serialize the file in data from class (myclass.cs) - & gt; Upload file. Now the content may look something like this: Now the problem is, I do not know how to walk. I want the new data to be serialed in the next way, but it should be linked to that XML-file, not a new one. So I download this file and then I serialize the new data as an attachment so that it will look like this: And it should be repeated many times as I want: download file, serial new data and attach it together, then upload it again. Now, the second issue is, I want to read it. I also use XML-class for this. For the type of ultimate type, the data should be serialized, I set the square in which the assets are. But now,

From Telerik to Kendo Treeview ItemDataBound -

I am currently changing a website, where the company wants to change everything from Teleik to Kendo. And I have now gone into some difficulties. There may be some mapping in the BindTo method, and .emdatabound . And in it, you can set a value Here is a complete example:. @ (Html.Kendo () TreeView () .Name ("MenuTree") .Checkboxes (correct) .ExpandAll (true) .DragAndDrop (Incorrect). Events (Events = & gt; events.Select ("onChecked"). BindTo (enumNames, Mapping = & gt; {mappings.For & lt; string & gt; (binding = & gt; binding.ItemDataBound ((item, menuGroup) = & gt; { Item .text = this.GlobalResource ("EnergyLine", menuGroup); MenuGroup Result; Enum.TryParse (menuGroup, true, outside results); item.Value = ((int) result) .toString (CultureInfo.InvariantCulture); .. But there are no attribute value in the keyndo. What is the related attribute for the condo? item.id to item.Value instead of> in.

printing - How can I print out in columns in java -

This is where I'm printing and I need to print in the column. aLeaderboard is an array list with a custom category. It has many different instances System.out.println ("played the state team home wins home draw home loss home goal is to win away for home goal" Goal goal for goal goal targets total score "); (Int counter = 0; counter TeamName.size (counter ++) {System.out.print (+ 1 counter) + TeamNameGet (counter) + "(aLeaderboard.get ( Counter)) .getGamesPlayed () + "(aLeaderboard.get (counter)) getHomeWins () +" (aLeaderboard.get (counter)) getHomeDraws () + ""); System out.print (aLeaderboard.get) (Counter)) getHomeLosses () + "(aLeaderboard.get (counter)). GetAwayWins () + "(aLeaderboard.get (counter)) GetAwayWins () +" "(ALeaderboard.get (counter)) GetAwayDraws () +" "); System.out.print ((aLeaderboard.get ( Counter) GetHomeGoalsfor (++) "(aLeaderboard.get (counter)) GetHomeGoalsAgainst () +&quo

c++ - Binary Tree with std::unique_ptr -

I'm actually using std :: unique_ptr to make binary trees. Actually, I use an algorithmic tour, which calculates the distance from the distance matrix, at least! In my algorithm, I encountered myself with the problem of std :: move () with std :: unique_ptr . My tree has been created, but do not just "make the branch" on the root node and Here is the code where I have a problem: Node = std :: move (node.get () -> addChild ()); The function addChild refers to the new child (= std :: unique_ptr & lt; node & gt;) . I really need to change the "node" to complete my algorithm, so how can I fix it? addChild to return unique_ptr Instead of returning a reference, the result will be a rvalue without the need of an artist with the result std :: move . In your current code, you pass an original reference for std :: move , which resulted in it still being a real reference and the copy constructor instead of std :: unique_ptr&#

javascript - Choose file, set image and upload without blocking UI -

समस्या मैं निम्नलिखित चरणों को सफलतापूर्वक प्राप्त कर सकता हूं, लेकिन यूआई 2 एमबी या अधिक की फ़ाइलों के लिए अनुत्तरदायी हो सकता है ये फ़ाइलें उनके कैमरे या डेस्कटॉप से ​​जो अपलोड हो सकती हैं, उनके आकार की सीमा में हैं, इसलिए मुझे उन्हें संभालना होगा। उपयोगकर्ता फ़ाइल को मानक फ़ाइल इनपुट HTML तत्व : & lt; इनपुट वर्ग = "रद्द करें" प्रकार = "फ़ाइल" नाम = "userFile" id = "userFile" स्वीकार = "छवि / *" /> क्लाइंट साइड पर मैं फ़ाइल का आकार बदलता हूं ताकि चौड़ाई 500 पिक्स या उससे कम हो (विशेष रूप से बड़ी फ़ाइलों के लिए छवि आकार को कम करने के लिए) और छवि दिखाएं। क्लाइंट साइड पर मैं रीसेट की गई छोटी फ़ाइल अपलोड कर रहा हूं I डेमो देखें। वहां आप देख सकते हैं कि बड़ी फ़ाइलों को अपलोड करते समय - चलती रोकता है फ़ायरफ़ॉक्स की तुलना में क्रोम में देरी अधिक महत्वपूर्ण दिखती है, लेकिन यह फ़ायरफ़ॉक्स पर अभी भी ध्यान देने योग्य है। अवरुद्ध करने का कारण डेटा यूआरएल img src पर सेट है यह आवश्यक है ताकि छवि

android - What is the focal length of the Nexus 4 rear camera? -

According to the Android-API call "getFocalLength ()", the focal length of Nexus 4 is 4.6 mm and the most Google search results . According to the focal length of 3.51 mm According to my own calculations with the following equation, the focal length should be between 3.3 and 3.4 mm. If you consider some inaccuracies due to the height of the object in pixels, then there may be 3.51 valid values. Distance (mm) = (Focal Length * realHeightOfObject) / (Pixel WhiteOffAbjectImage * Physical Pixel Size) The equation can be found in PhD- thesis: (P 121F). This sensor works for the highest resolution of the chip. It seems that the result of the API call "getFocalLength ()" is incorrect for Nexus 4 and maybe for other devices too! It affects what you do with this API-call, anybody is facing the same issue, or am I missing something? Edit: I did the same calculation with the Galaxy S3 which is focal length 3.7 mm and this result is valid. Just created a

java - Is there a way to enforce a deployment order in tom 7 and tom6 ? -

There are several battle files for me to deploy, for example coll.war , Egg.war , etc., each one will specify the application module. In our application, I have some specification which should first decipher cold wire and the rest will be deployed in a specific order such as Coll. War EggWare Girl Can someone help me is. Server inside server folders. This will add an entry for each war you added to XML . Delete those entries. Then create those XML files that contain the following content and keep the xml files in the order in the conf \ Catalina {server_name} folder. Example: coll.xml & lt ;? XML version = '1.0' encoding = 'UTF-8'? & Gt; & Lt; Reference dockbase = "$ {catalina.home} / deploy / collwar" crossContext = "true" & gt; & Lt; / Context & gt;

drupal - getting all ImageFields associated with a node -

How do I get all the image fields associated with the content type on a full node without knowing the field names? Just out of curiosity, can we get all the fields of a specific type? I am developing a module that requires image zones related to a specific node and I am using hook_node_view to obtain node data. I have already seen the following post and it was very relevant but I was having difficulty understanding it. This can be done by checking all the fields of your content type & amp; Check your "Type" field If the field is an image then you can render it

jquery - javascript populate iframe, modify source in one -

Contain content of 2 iframes with the same HTML preview. However for one of the iframes, I need to modify the data / html by removing images. $ Ajax ({url: '', datatype: 'text', success: function (data) {if (data) {var iframe = document.getElementById ('preview'); Iframe.parentNode.style.display = "block"; Iframe = (iframe.contentWindow)? Iframe.contentWindow: (iframe.contentDocument.document)? Iframe.contentDocument.document: iframe.contentDocument; iframe.document.open (); Iframe.document.write (data); iframe.document .close (); var iframe = document.getElementById ('preview-noimgs'); iframe.parentNode.style.display = "block"; iframe = (iframe.contentWindow)? iframe.contentWindow: (iframe.contentDocument.document) ? Iframe.contentDocument.document: iframe.contentDocument; iframe.document.open (); var $ data = $ (data); $ data.find ("img"). RemoveAttr ("src"); iframe.document.write ($ Data.html ()); iframe.

Separate two loops in java -

I must write a program that reads the balance and interest rate, and in 10 years the account value is calculated simultaneously, monthly Displays and daily compounds I have written for the annual agreement and monthly. In the second loop for the monthly rate, the program reads the value of "balance" after compounding yearly, whereas I need to read the primary value. How is it possible to separate the two loops, so they do not affect each other? Here's my code: import java.util.Scanner; Public square BankInterest {public static zero major (string [] args) {System.out.println ("Please enter your balance:"); Scanner Keyboard = New Scanner (System.in); Double balance = keyboard.nextDouble (); Int year = 0; Int month = 0; Int day = 0; System.out.println ("Please enter the annual interest rate in decimal form:"); Double interest rate = keyboard.nextDouble (); While (years and lieutenant; 10) {double interest = balance * interest rate; Balance = bala

sql - PostgreSQL automatically update row at specific date -

Once I update one line, I want to reach the specific timestamp in that line. For example, there are deals in an auction site which ends in one day. After that time the deal ends automatically. Is there a feature in PostGrace SQL, where I can set a line to automatically update when it reaches a specific time period? Otherwise how do I apply this example bargain feature? One view can work for it Suppose a table T < Code> Create table T (deal_ID integer, deal_time timestamp, end time interval); Enter T (deal_id, deal_start, expiry_time) values ​​(1, now (), '1 day'); If this deal is over, then a view will be Caletrack Select View vs. *, now ()> At the end of T, deal_start + expiry_time; Choose from V * Deal_id Deal_start | Expiry_time | Ended --------- + ---------------------------- + -------- - --- + --------- 1 | 2014-04-22 13: 26: 32.319394 | 1 day | F

css - How to set auto as min-height using jQuery for div? -

मेरे पास डिवेल तत्व है जो पेज लोड के समय min-height प्राप्त करता है। & lt; div id = "main_div" शैली = "न्यूनतम-ऊंचाई: 2000px" & gt; & Lt; / div & gt; लेकिन मेरे पास एक ही पृष्ठ पर एक चयन बॉक्स है और इसके बारे में बदलें मैं main_div div तत्व में अन्य सामग्री लोड कर रहा हूं। अब समस्या न्यूनतम-ऊंचाई हमेशा 2000px पर सेट होती है और मुझे पहले से नहीं पता है कि मुझे min-height:? पर क्या सेट करना चाहिए? जब $। एजेक्स कॉल समाप्त होता है? मैं सफलता () $ .jax पर नीचे की तरह कर रहा हूं ({type: 'POST', url: '/ path / to / url /', डेटा: {परम: परम}, कैश: गलत, सफलता: फ़ंक्शन (html डेटा) {$ ("# main_div")। html (html डेटा ); $ ("# मुख्य_डिवाइस")। सीएसएस ("न्यूनतम ऊंचाई", 'ऑटो');}}); लेकिन यह काम नहीं कर रहा है अपने फ़ंक्शन में आप बस न्यूनतम-ऊंचाई को खाली करने के लिए सेट कर सकते हैं, जैसे: $ ("# main_div")। सीएसएस ("न्यूनतम-ऊंचाई" '');