Posts

Showing posts from July, 2013

javascript - Setting inline css transition style with string alters the true value. Bizarre -

I have a stylesheet that sets up a CSS transition property such as (prefix versions for short): Infection: Opacity 1s; Then I have several elements on the page, and I want to modify the transition-delay property of each element through javascript, giving a conflict effect for . I am using jQuery like this: $ (element). Css ('transition-delay', delay + 's'); However, the above code adds an inline transit-delay: x to the No element, instead, the result is: / P> & lt; Div style = "transition: xs;" & Gt; But that's okay, because it works as expected, the browser knows that transition: Xs actually means that just the code To process, set transition-delay and retain the rest. However: If I now meet the inline style of that element through the $ (element) .attr ('style') , and After that it is re-applied to the element, $ (element) .attr ('style', style) , HTML exactly looks identical, but the tran...

How to stop powershell Job in different cmd instance -

I am currently writing a power-shell script which continually monitors system performance on many infinite servers, just an infinite loop Through this. register-scheduled-job -name $ machine_name -scriptblock $ cmd -Assetment list $ ip_address, $ machine_name, $ cred -RunNow start-job -name -name $ machine_name This is the code that I use to register the fixed jobs, and it is located in the initial script to me. Another example of CDD / PowerShell (aka pitch in another script) Call stop-job There is no way? I have to hook up a powerhole for a web interface, and ideally clicking a button on that interface will run a small script which is called stop-job at the beginning of the previously mentioned work. apaike, you can not do this You can not share the status between two different console instances / sessions Even if you look at the Windows PowerShell background jobs running in Current Sessions , then Go to the Go-Job Commandlet in MSDN. Therefore, if you run a j...

ios - Create "Sprites" to Reduce iPhone App Memory -

Currently all my icons and buttons on my iPhone app. PNG loads as pictures, which takes considerable memory, are there any other format or means of loading multiple images, such as the amount of memory used by my app, is greatly reduced? What specific UIImage method do I use to load images? Thank you! Disclaimer: So far the iOS is not super familiar, probably the best answer will not be . But I am familiar with some more spratings, so maybe it will help you. A traditional approach that can save some memory (based on iOS device process images; I'm not sure) to add your prints to the spread sheets For example, instead of 16 different 32x32 PNGs, it stores a 128x128 PNG (4 to 4 sprites), and you display your sprites through pixel offsets. Normally, offsets are expressed as an index, multiplying by 32 in the assist method to find the actual pixel offset.

rust - String append, cannot move out of dereference of '&'pointer -

I'm having trouble combining two stars, I'm new in battle so that if there's an easy way to do this Please feel free to show me A functional string of Tuples (string, string) my function loops through, what I want to do is combine these two string elements in a string here What do I have: for bump.bitmap_picture.mut_iter () for tup (and xfarf, ref y) = tup; Let_string = x; Res_string.append (y.as_slice ()); } But I got the error: error: for line '& amp; - can not go beyond dereference of pointer : res_string.append (Y.as_slice ()); I also tried res_string.append (y.clone (.) As_slice ()); But the exact same error happened, so I'm not sure that this was also right. The function definition of the append is: FN attached (self, Second: & amp; RR) - & gt; The string plain self indicates the sub-word semantic takes the BY-val receiver to the method, unless the receiver does not apply the copy (which is the string No). So you h...

java - Service not starting when button is pressed? -

I know that a hundred times before it has been asked, but nothing is working for me I have a There is a service in a different category that requires a push button after launch from a launch entity . Long story short, here's my goal: Wait three seconds for the running commands & gt; Launch app & gt; Start Service Monitor the service CONFIGURATION_CHANGED broadcast. Reveal (parts which are important): & lt; / Activity & gt; & Lt; Receiver Android: name = "MyReceiver" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.CONFIGURATION_CHANGED" & gt; & Lt; / Action & gt; & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; & Lt; Service Android: Enabled = "True" Android: name = ". MyService" /> & Lt; / Application & gt; & Lt; / Reveal & gt; MyService.java: import android.content.Context; Import android.content....

mysql - PHP OOP - best way to implement 2 classes -

I have a simple DB with user data table, controller data table and user controller table, which contains the controller ID and userId. In my PHP OOP (first time) implementation I have a Class User and a Class Controller. The functionality is simple for the user - he can login and logout all its controllers I have an admin user who can see all users and their controllers, add / remove the controller to a user / Can edit and add users \ delete \ edit / add / add / edit users. Login functionality has been applied (DB class), user class and auxiliary class) My problem is how to add user and controller, I should create the functionality . The administrator has an ID (unique), a name (not unique) and a password. Users are private areas: private $ _ db, $ _data, // all this user data $ _sessionName, $ _cookieName, $ _isLoggedIn; and control class: private $ _ db, $ _data; // I have tried to implement the controller: create public functions ($ fields = array ()) {if (...

c# - Validate that string is relative url not working -

I am trying to validate that the string representing the URL is relative, but it seems that the Uri.TryCreate () will accept any URL without the relation of the protocol (i.e.: www.domain.com/something/else.aspx). But I only need /something/else.aspx/ For example, this test string always throws an exception when trying to get uri.PathAndQuery on the line Be there Even if TryCreate () return is correct. string test = "/something/else.aspx"; Bool isValid; Var url = getPathAndQuery (test is out, isalid); Private string getPathAndQuery (string url is valid outside bool) {Uri uri; IsValid = Uri.TryCreate (URL, Uricund. Relative, Out Yuri); Try {return isValid? Uri.PathAndQuery: string.Empty; } Hold (exception e) {isValid = false; Return string Empty; }} Example Input / Output: Input: /something/else.aspx ==> Output: /something/else.aspx Input: www.domain.com/something/else.aspx == & gt; Output: /something/else.aspx Input: ==> Ouput: string.Empty ...

Ogg metadata - Vorbis Comment end -

I want to apply a class to read vorbis comments. I know that the field will start with a field name followed by equal sign and value . But how does it end? The documentation I think will end a semicolon area, but I checked an OG file with a Hague editor and I do not see anyone. It seems that I should look like a file: TITLE = my super title; Field Name is Title followed by equal sign and then value is my super title and finally semicolon to end the area but instead of inside my file, the fields look like this: TITLE = My super title .... This is almost as above but there is no semicolon . There are letters of that can not be displayed. I thought that's fine, it seems that the point represents a value that " this is the end of the field!" "But they are almost always different. I saw that there are always exactly 4 points, the first dot is always a different value, the other is usually the value of 0. But not always ... Now my que...

python - Pandas DataFrame - delete rows that have same value at a particular column as a previous row -

I have a panda dataframe, I want to check for each row if it has the same value (call it in a particular column This porduct_type), and if it does, remove it. In other words, from a group of rows continuously with the same value on a particular column, I want to keep only one. Example, if column A is the one we do not want to duplicate constantly: input = ab 0 1 1 2 2 2 1 1 2 2 20 0 11 100 5 2 200 Output = AB 0 1 1 2 1 10 0 11 100 5 2 200 It is a bit tricky, but you can do something like & gt; & Gt; & Gt; Df.groupby ((df ["a"]! = Df ["a"]. Shift ()). Cumsum (). Value). First () ABC 1 0 1 1 2 2 1 10 3 11 11 100 4 5 2 200

html - Insert after the nth sibling element using jQuery -

अगर मेरे पास निम्न HTML है & lt; div id = "example" & gt; & Lt; div & gt; & lt; / div & gt; & Lt; div & gt; & lt; / div & gt; & Lt; div & gt; & lt; / div & gt; & Lt; div & gt; & lt; / div & gt; & Lt; / div & gt; और मैं jQuery का उपयोग करने के एचटीएमएल संलग्न करना चाहते हैं & lt; div & gt; हैलो & lt; / div & gt; तीसरे भाई के बाद div मूल HTML को & lt; div id = "उदाहरण" & gt; & Lt; div & gt; & lt; / div & gt; & Lt; div & gt; & lt; / div & gt; & Lt; div & gt; & lt; / div & gt; & Lt; div & gt; हैलो & lt; / div & gt; & Lt; div & gt; & lt; / div & gt; & Lt; / div & gt; मैं कक्षा संदर्भ के आधार पर यह कैसे कर सकते $ ( "# उदाहरण") । आप और के संयोजन का उपयोग कर सकते हैं: $ ( '# उदाहरण div') eq ( 2) .after ( '& lt; div & gt; ह...

javascript - How do I output log messages to the console -

I'm working on a sails.js web app, so I'm starting the web app using the command line . I'm trying out the output objects in the browser console but instead, they are displayed in the command line. Is there any way to change this from which there is output in log console? You can not output anything from the browser side code to log in directly. To do this, you will put JavaScript code in the feedback page, which will be executed in the browser and will write the log.

osx - JavaFX: Right click on Mac (Control + Click) not being detected. Any fixes? -

I have a list view with those items, which I allow to double click and right click ( To remove the item). Why not control the Mac? thank you in advanced. Edit: My code listview.setOnMouseClicked (new event handler & lt; mouse Event & gt; () {@Override Public Zero Handle (MouseEvent Event) {if ( Event.getButton (.mobButton.PRIMARY) {if (event.getClickCount () == 2) {System.out.println ("double clicked"); Clicked on system.out.println ("" + List view .getSelectionModel (). GetSelectedItem ());}} if (event.getButton (.) Equals (MouseButton.SECONDARY)) {System.out.println ("right click");}}}); My trackpad is set as a secondary button through two finger naps. Looking for someone else it is right that two finger clicks are registered as mousebutton Will go SECONDARY event, but I think you should also check for Ctrl + MouseButton. If the primary control is a common method to emulate the right click before control, then the statement shoul...

asynchronous - F#: Equivalent to OCaml Async -

Is F # equivalent to the Ascink library of Okam? In particular, the ability to easily create deferred values ​​and perform functions when they are full? Specifically, I want to wait in a specific context, and then do something. In the Okam, I can do this by making an ivar and calling my reading function; How can I do this in F #? short answer Yes, my Library Jane Street's non-essential library and many others Among people there are close relatives of both of F #. Based on HOPAC (CML) and arguably (according to the technical terms compared to the point of view) currently offers a more expressive programming model than the two. Long answer Jane Street is very much like a net. Both are essentially abstract with a monadic layer written on top. In Hopac, one of the closest relatives of Defredding is actually one. However, HOPKAC does not provide a monadic layer directly for the promise. Of course, you can easily write one, but I will advise him to sit on it for a whil...

oracle - Remove query from spool output in SQL Developer with variables -

I am trying to spool results directly into CSV using some replacement variables. I have this question: set off the echo set response set off pagesize 0 set termout defined define StartDate = '12 -JAN-14 'defined ENDDATE = '01 -JUN-14' vpath =. C:; & Amp; \ 14-0724_Spool \ test \ 60_testupdate_subvar 'def def =' csv 'SPOOL & amp; dt = defined' vpath & amp; & Amp; DT & amp; & Amp; Select Ext / * csv * / table1.SOURCE_DMS_ID, COUNT (table1. AMOUNT) from table1 to table1.DATE TO_DATE (between '& amp; StartDate') and TO_DATE ('& amp; ENDDATE' ) - and Table 1_DIM.SOURCE_DMS_ID by table '01 -JAN -14 'and '31 -JAN-14' between table1_DATE; ... is being called with this script: @ "\ Results_Feed_Spooled.sql" I specifically call it with a script (and set many other items) so that the resulting CSV file does not query the file. However, the selection query appears in the CSV fi...

visual studio - Version Control Proxy with Multiple Servers TFS -

Is there a way to set up TFS to use multiple proxy servers? This is apparently one of the exam questions for MS 496 exams, but I do not see any solution on the web. You can set up as many proxy servers as you want. You simply use the TFS install media to install the proxy server and configure it to point to the appropriate TFS server. Installation instructions can be found here:

go - Add unaltered lowercase headers to golang http request -

I am trying to set all lowercase titles in the Golland program and Canonical MIMEHeaderKey is scaling the first letter upper . The API I'm consuming only takes this special header in all lowercase at this time. It is not the option to change at this point in time. Is there any way to override it? For example, the header I want to add is: req.Header.Add ("myheader", "myheadervalue" ) But it is as follows: req.Header.Add ("Myheader", "myheadervalue") Can anyone help please? Thanks I do not see any way to protect it, but If you really have to use lower-case header names, you can work with your own http.Header with the following-case key Example (): import "fmt" import "wire" import "net / http" // ... req, _: = http.NewRequest ("GET", "http: / / Foo", zero) req.Header .add ("myheader", "myheadervalue") lowerCaseHeader: = create for key (http.He...

javascript - Scale floating divs not relative to their parent without position:absolute -

Image
मुझे मिला: " every_one "" category_container "को छोड़कर प्रदर्शित किया गया हर एक छोटा सा डिवी है जो कि सभी" प्रत्येक "divs के माता-पिता है। मैं स्क्रीन के ऊपरी भाग में अपेक्षाकृत प्रत्येक प्रतिशत प्रतिशत का उपयोग करना चाहता हूं, फिर भी मैं category_container div को केवल सभी को प्रत्येक सफलता में शामिल करने के लिए पैमाने बनाना चाहता हूँ (जैसे कि यह अभी भी होता है) दूसरे शब्दों में, मैं बस प्रत्येक बच्चे की ऊंचाई को कुछ हद तक बड़ा बनाना चाहता हूं। मैं इसे कैसे करूँ? आप या तो .category_container या पूर्ण स्थिति के लिए एक निश्चित ऊंचाई (जैसे ऊंचाई: 600px ) का उपयोग कर सकते हैं: । Category_container {स्थिति: पूर्ण; शीर्ष: 0; सही: 0; नीचे: 0; बाएं: 0; } ध्यान दें कि इस मामले में मूल तत्व को & lt; body & gt; तत्व होना चाहिए या वह पूरी स्क्रीन ऊँचाई में फिट होगा। यहाँ एक बेला है।

Chrome console: "Refused to autofill iframe with different origin" -

I Chrome (but FF) JS console is not getting above error (standard "Embed" button "@ Follow usernames ") are considered related to twitter widgets, because it disappears when I think of commenting them out. The widget markup is just a & lt; A & gt; , and such a process does not completely understand I change into an iframe, especially since this error persists when I comment out Twitter JS probably makes such a move. Error in full: iframe with different origins onloadwff.js refused to auto-fill: 78 console_error onloadwff.js: 78 fillfield onloadwff.js : 183 receiveBG onloadwff.js: 125 EventImpl.dispatchToListener Extension :: Event_bindings: 397 publicClass (anonymous function) Extension :: utils:. 89 EventImpl.dispatch_extension :: event_bindings: 379 EventImpl.dispatch extension :: event_bindings :. 403 publicClass (anonymous function) extension :: utils: 89 dispatchOnMessage extension :: Messaging: 304 LastPass extension was causing it to...

c++ - Why Create An Exception Object That's Derived From stdexcept Header? -

I was wondering why, and if so, what's the benefit, you will create an exception object to throw an exception, which I can actually find out why Stdexcept headers, such as an exception object that is received from runtime_error, can actually find out why you do this, you can use the 'functional' key to get a suitable error message. But you can not simply pass the error message in runtime_error as an argument, and you can use 'what' anyway? class divide_by_zero: public runtime_error {public: divide_by_zero (): runtime_error ("this is a runtime error") {}; } If (...) {Feng divide_by_zero (); } How is it different from doing something like this ... if (...) {std :: runtime_error ("This is a runtime Error is "); } {...} Catch (std :: runtime_error & amp; e) {std :: cerr & lt; & Lt; E.what () & lt; & Lt; Std :: endl; } "post-text" itemprop = "text"> Retired ninja commented that "you can ca...

jquery - setTimeout return false on submit button click -

मेरे पास इस तरह एक कोड है सबमिट बटन बटन [type = 'submit] के लिए फ़ॉर्म: $ ('# submitbuttonId')। क्लिक करें (फ़ंक्शन () {setTimeout (फ़ंक्शन () {वापसी झूठी;}, 100);}); लेकिन फ़ॉर्म को जमा करना अब भी जारी है। मैं क्लिक सबमिट बटन पर एक समय देरी के साथ वापस लौटाने द्वारा फॉर्म को सबमिट करने से कैसे रोक सकता हूं? हमें कुछ UI उद्देश्यों के लिए समय की देरी की आवश्यकता है। क्या यह हासिल करने के लिए एक अलग दृष्टिकोण है? मैं एक आधुनिक (अप-टू-डेट) ब्राउज़र के लिए jQuery v1.11.0 का उपयोग कर रहा हूं। इस UI परिवर्तन के संदर्भ को नहीं जानती, मैं सुझाव देता हूं कि आप e.preventDefault () पहले का उपयोग करें उदाहरण $ ('# SubmitButtonId') क्लिक करें (फ़ंक्शन (e) {e.preventDefault (); var $ form = $ (this); setTimeout (फ़ंक्शन () {$ form.submit (); वापसी झूठी;}, 100) ;});

wordpress - How to show author image on post homepage -

I am a newbie in the programming world and I am working on a WordPress blog. What I want to do, shows the image of the author on behalf of my respective posts on the homepage. Here's a screenshot I'm mentioning: compliment any support. In WordPress it's a function to easily complete. You need to add it to the template which you want to show the author's photo. & lt ;? Php echo get_avatar (get_the_author_meta ('ID'), 32); ? & Gt; 32 The image is about to be resized. More information on codecs:

c# - Trying to find correct way to infinitely loop in my code-behind file -

I rotate sequentially in the C # code-behind section of a master content page through a series of numerical images I'm working with a project I am trying to start with 1, move it to 5, and then start the process again. This is what I have so far. This does not work because you need additional conditions in the if section. int i = 1; Restart: While (i & lt; 6) {Image1.ImageUrl = "~ / Images /" + i.ToString () + ".png"; I ++; If (i == 5) {restart; }} Edit: After trying to include the label in "Goto", I can not find the page to load. Here is the rest of the file: using the system; Using System.Collections.Generic; Using System.Linq; Using System.Web; Using System.Web.UI; Using System.Web.UI.WebControls; Name Location Clark (Public Partial Class Home: System.web.ui page) {Secure Object Page_load (Object Sender, EventAurge E) {if (IsPostBack) {SetImageURL}; // To ensure image load on page load}} Secure timer 1_Tick protected (object sende...

java - Which data structure should I use to search a string from CSV? -

I have a CSV file that contains some 200,000 rows, two column names and names; work. The user then writes a name, user_a says, and i have to search the whole csv to find names that are pattern user_nA and finally print on the output screen. I implemented it using Java in Araliaist, where I put the full name from the CSV to Arreist and then searched for the pattern in it. But in that case, the complexity of the whole time for search is (N), is there any other data controller in Java that I can use to make it more efficient than O (Logan) or AreliIst? I can not use any database approach from the way. Apart from this, if there is any good data structure in any other language that I can use to accomplish my goal, please give me this suggestion? Edit - The output should be named in the CSV in which the pattern user_name example as the previous part: If my input is "son" then it should return "jackson" etc. Now what I have done, a string called the name of the CSV i...

excel vba - why vba combobox blank unless I type -

I created a UserForm ComboBox with a list of items, when ComboBox appears blank when I run UserForm As long as I do not try to type something, and only then one item appears in the combo box. Is there something that I'm doing wrong that does not show the text in my combo box until I type? After adding items you can set ListIndex to believe your combo box "cb" Given, VBAProject-> Form- & gt; The code placed in the UserForm1 module will add 3 elements to the combo box and automatically the first combo box). Personal sub UserForm_Initialize () cb.AddItem "item1" cb.AddItem "item 2" cb.AddItem "item 3" cb.ListIndex = 0 and sub

javascript - Game physics simulation: accelerate based on energy -

Countless times I have implemented the simulation of physics using the Euler integration for small toy games: press the arrow keys And it sets an acceleration, then integrate acceleration and add to velocity, then integrate velocity and add to the position to get the last position. I see it everywhere. But when I thought of kinetic energy, I realized that it is not "realistic". If something is given like a car, then the engine produces power (kilowatt), does not force / acceleration, with constant acceleration, increases the power velocity of the virtual engine increases. In my case this is a space shuttle, but I want to use continuous power in one direction instead of constant motion. Is my assessment right that tracking energy is more realistic than speed? If so, does it really make sense to keep track of the energy vector rather than the velocity vector? But then I have to change in velocity to integrate. So I did this for 1D simulation and it works, of course i ca...

javascript - Scrolling marquee text wrap on IE9 -

Image
I've been using have been working on a scrolling marquee SharePoint Web Part I Web Part Here cycle plugin () The text will scroll down below and appear again at the top. Although it works as expected in IE8, in IE9, there will be problem in some string. (Eg UAT test on 9th May) When the text reappears again, it will wrap up for unknown reasons. Here Bella link: See the picture below: part of the script here: & lt; Div id = 'ticker_10eb4222-addd-4f86-8d84-94926eae0aa2' square = 'ticker' style = 'position: relative; Width: 530px; Height: 60px; Overflow: hidden; '& Gt; & Lt; Ul class = "list-style1" & gt; & Lt; Li & gt; & Lt; Period & gt; UAT test on August 1; / Span & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () to {(var i = 0; i & LT...

javascript - How to count - using .each() in jQuery? -

मैं प्रत्येक ली की संख्या की कोशिश कर रहा हूँ 1 of 2 n 3 N ...... n का n मैं प्रत्येक ली की संख्या 1, 2, 3 की संख्या में सक्षम हूं, लेकिन 3 में से 1 को कैसे बना यहाँ है आप के साथ उपयोग कर सकते हैं : पूरा कोड: var len = $ ("ul & gt; li") लंबाई; $ ("Ul & gt; li") प्रत्येक (फ़ंक्शन (i, n) {$ (this) .prepend ("& lt; span & gt;" + (i + 1) + "का" + len + "& lt; / span & gt ; ");});

sockets - How can I overload a built-in module in python? -

I am trying to bind the host to my dragon program. Just affect it in Python program, so I'm not going to modify the / etc / hosts file. I tried to add a bit code to the create_connection function in socket.py for host-IP translation: host , Replace the original code in port = address # socket.py #: ifadd == "www.google.com": getaddrinfo (host, port, 0, SOCK_STREAM) res = host = target_ip: # root in socket.py Code I found that it works fine. And now I want to know that host-ip translation works only in this dragon program. So my question is: How can I do this socket.py importing my Python program when using import socket ? To make it clear, this is an example. Suppose 'test' is my work directory: exam | --- main.py | --- socket.py In this case: How do i / socket import socket What can be the main.py Usage Test / socket.py? Import socket How do I test another module / socket? Can I use py? help. But I found out that ...

xcode - Save image in asset catalog on runtime -

I have to download new images from the backend in the background process and I have to save them in the app for later use. On the other hand, the original app images are in the asset list and when I add new, all images must be accessed with the asset catalog I want to add images to the directory app. I try, but when I have to load any image, then the app does not discriminate between the property catalog and the other, and I am not the best solution for this. I do not know That ends at runtime End how to add images in the catalog or if I want to try other ways to support this. Any help I am so thankful Many thanks! The asset catalog is a resource file . All files inside your bundle mean that it is not writable. Files inside the bundle read only permissions You must store in one of the sandboxed folders (documents, libraries and templates)

Spring form submit validation for foreign key -

itemprop = "text"> My project is a Spring MVC project. In my project I have a domain technology that has foreign key reference. When I submit the form it throws the error .... For the part of the view (JSP), I am using the form: Viewing in the field of technology Select for How can I validate a foreign reference ????? I tried the code below Domain @ Entity @Table (name = "technology") Public category technology {Private IIT; @n private letter's name; @Department of Private Department; Personal date created date; Private Boolean is Dell; } message.properties NotEmpty.technology.department = Required! technology.jsp & lt; Form: form method = "post" action = "add-technology" commandName = "technology" id = "technology format" & gt; & Lt; Label & gt; Technology name & lt; / Label & gt; & Lt; Form: Input path = "name" /> & Lt; Form: Errors path = "na...

javascript - On click submit a form the redirect to a URL is not working -

I have a list of items, for each item I have a button, clicking the button, I submit the form I am here. Div style = "float: left; margin top: 4px," class = "enroll_onload" data-content = "local host / action / event_calendar / manageonal & event_id = 40117 & amp; group_guid = 40129 & Amp; user_id = 2 & amp; amp; amp; course_id = 12 "data-id =" 40117 "id =" enroll_btn "& gt; & Lt; A href = "javascript: zero (0)" category = "to enroll" & gt; & Lt; Span class = "enroll_button" & gt; Nominate & lt; / Span & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; Form method = "post" action = "http://10.0.1.22/firstplanet/fpin/dev/learn/amfphp/services/data/rest/enrollCourseOnLoad" id = "enroll40117" & gt; & Lt; Input type = "hidden" value = "2" name = "user_id" & gt; & Lt;...

Can we have single trigger for multiple tables in MySQL -

Can I trigger a single for multiple tables in MySQL? After inserting any topic like Table 1 or Table 2, I have to do the same thing: Create Trigger Triggers - 1_4_ Task 1 after INSERT on `Table_1` for each line. .... task1 END // Create triggers trigger-2_4_ Task 1 after INSERT for each row `table_2` ... The same task as task1 END // I have two above triggers like: after INSERT on `Table_1` or` table_2` for each line trigger trigger_bin_task1 O ... function 1 END // thanks Can I have a trigger in MySQL for several tables? But many triggers can apply equally.

regex - Remove leading zeros only in IP addresses -

I need to remove all the leading zeros in CSV from all the major addresses, but others (such as hostname). I got the following, which removes everyone s / (? sample CSV: 192.168.001.000, any comment, host0003.zone.com 010.001.100.000, any long 000 string, host004.zone Com should be 192.168.1.0, no comment, host0003.zone.com 10.1.100.0, 000 string any longer, host004 .zone.com Any ideas? Try Regexp :: Common and net :: ip If you do not use CPAN module $ New ($ 1) - & gt; Ip / ge '

How to find the drive letter of Tomcat installation in Windows -

My webpage is running from Tomcat, which is installed on Windows machine. I should find out the drive letter (eg: C: or D: etc) programmatically on the servlet, on which my tomcat is installed. To know the installation directory of an application. You can see the registry I use.

Easiest frameworks to implement Java REST web services in 2014 -

Many structures have grown up on the JVM platform and in my opinion there is something dirty that I was involved in some J2EEE projects Almost many configuration files were in the form of source code files, of course, anybody can argue that the developer is always there, but I prefer framework and tools with a clear structure and maybe some limitations, to ensure that Everyone has the same style and architecture Uses art What is the best framework for implementing the framework of server REST + in Java? I'm struggling to make the solution easier to use. Jerseys and restlets look like good options, but I have read the old thread before learning, to make sure that there is nothing important new tools? I want to create a simple rest api (for android) and website Update 2017-01-26: Two years later, I can accept the spring with confidence What I wanted to do is boot The purpose of the spring boot is to make it easy to create spring-powered, production-class applications ...

Android google analytics integration error -

When I'm trying to get a tracker in my activity, then this error shows that this method is " Gettype () "has not been defined Analytical v4 // Get Tracker Tracker T = (get the AnalyticsSampleApp) getActivity (). GetApplication ()) .gettracker (TrackerName.APP_TRACKER); If you have not already done so, create a class MyApplication is your app, And make sure you add it to your manifest below (property which is Android: name here, I have removed other XML properties for clarity) Then, in your MyApplication class, create a method getTracker according to the Google Analytics v4 document then, Use = (MyApplication) getApplication ()) .gettracker (TrackerName.APP_TRACKER);

python - Output the results of an RE -

मेरे पास निम्न कोड है: आयात फिर से targetFile = open ("test.txt" ") .read () प्रिंट (पुनः खोज ('(& lt; \\ / nesting_tag & gt;)', targetFile)) यह विचार है कि मैं इनके बीच में सब कुछ वापस करता हूं। जैसे टेस्ट "टेस्ट" मैं & lt; _sre.SRE_Match ऑब्जेक्ट के विरोध में "टेस्ट" कैसे लौटा सकता हूं; Span = (56, 70), मैच = '' & gt;? यह प्रयास करें प्रिंट (पुनः खोज ('(& lt; \\ / nesting_tag & gt;)', targetFile) .group ())

java - Modify a list while it is being iterating -

When I was checking my answer to get the output for the question, then given the following output to the given list content Found: // Add some wire to the list list. Add ("Item 1"); List.add ("Item 2"); List.add ("Item 3"); List.add ("item 4"); Output: Item 1 item 2 in the exception thread "Thread-0" java.util.ConcurrentModificationException at java.util.ArrayList $ Itr.checkForComodification (ArrayList.java:859) at java.util.ArrayList $ Itr.next (ArrayList.java:831) on Com. Com.akefirad.tests.Main $ 1.run (main.java.3) at java.lang.Thread.run (Thread.java:745) But if any of the following lists Uses: // Add some string to the list list. Add ("Item 1"); List.add ("Item 2"); List.add ("Item 3"); Output: item 1 item 2 There is no exception in output and only two first items printed Will someone be able to explain why this happens? Thank you Note: The code is. Edit: My question i...

PHP pecl inclued: How to compile and install very latest version -

The installable version of the PECL extension 'INCLUDED' is apparently incompatible with the latest versions of PHP (I'm using 5.5 9). A bug report has been reported and a fix is ​​noted with updated sources. Through Svn, I've downloaded the updated files. How can I compile and install the latest sources? This standard EC is on Ubuntu 2 example. A little more googling found the following: A pecl extenstion gives quite straightforward instructions on compiling and installing. I did not have the name of the file and was using 'php -i' to find the extension directory, besides restarting Apache but installing it.

android - Every file of Project Unfortunately Blank while deleting .metadata folder -

Now I'm stuck with the biggest problem. After removing my .metadata folder, I have tried to import again but all the projects are going to be empty. There is no file. What can I do? help please. If you have removed the workspace folder and you do not have your own (I accept? How to recover it (have you tried Recycle Bin / Trash, deep data recovery methods, etc?), Then your work might be lost right now. It takes a good time as your regular workflow is especially a very popular system these days.

ios - UIImagePickerController - turn video preview to landscape -

Image
I am currently developing an application to record and edit the video. The hole application only supports landscape mode - so I would like to use the camera controls in the landscape but the preview screen always switches back to the portrait I tried several ways: I first saw UIImagePickerController - Preview was ok because I want, but the video image (during recording) was wrong (again). - (BOOL) StartCameraController {if ([UIImagePickerControllerSourceType is available: UIImagePickerControllerSourceTypeCamera] == No) {Not return; } Self.cameraUI = [[UIImagePickerController alloc] init]; Self.cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera; Self.cameraUI.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, zero]; Self.cameraUI.allowsEditing = No; Self.cameraUI.delegate = self.parentViewController; [Self.parentViewController addChildViewController: self.cameraUI]; Self.cameraUI.view.frame = CGRectMake (0, 0, self.frame.size.width, sel...

javascript - How to get a property from another property in JS? -

निम्न कोड काम करता है, लेकिन मैं यह जानना चाहूंगा कि क्या var a = {b: {x: true}, c: {check: function () {var test = abx; // बी.एक्स मैं एक का उल्लेख नहीं करना चाहूंगा। यह काम नहीं करता। चेतावनी ('मान है' + परीक्षा); }}} A.c.check (); ठीक है आपको a को निर्दिष्ट करना होगा ) {Var test = this.bx; चेतावनी ('मान है' + परीक्षा); }}} A.c.check.call (a); या आप a पर जांच कर सकते हैं: var a = {b: {x: true}} ac = {चेक: फ़ंक्शन () {var test = this.bx; चेतावनी ('मान है' + परीक्षा); } .बिंद (ए)} a.c.check (); या b से लिंक: var a = {b: {x: true}}; A.c = {b: a.b, चेक: फ़ंक्शन () {var test = this.b.x; चेतावनी ('मान है' + परीक्षा); }} A.c.check ();

extjs - Create application using sencha cmd but deploy it without "building" it -

I got the following status: I started making an extjs 5 application using the CNSm CDD line tool Lots of likes in). The problem: Customers want to maintain their application after delivery, but Sinha is not ready to learn the CMD Line Tool (and to set up a workstation for it). Question: How can I handle it? I want to develop an application using Sina CMD and would like to deploy it without "building" (this means: not to use the "Senka App Build" command). Of course I can put this project together "hand", but this is not really a great way, I think ... any suggestions? thanks a lot! It really depends on the need for your build. If you have SCSS Theme Settings, then you need CECM if you need to make custom theme changes, then you can create a theme project and run the CNN CMD for the customer as needed. I have developed many apps, using eclipses you can create a dynamic web project. Place ext in a directory (extjs) and include all JS and pac...

startall.sh command does not start NameNode in Hadoop -

श सभी सेवा शुरू करता है जैसे जेपीएस, सेकेंडरीनामनाम, टास्कट्रैकर & amp; NameNode को छोड़कर जॉबट्रैकर केवल एक ही तरह से मैं एक NameNode को मैन्युअल रूप से शुरू कर सकता हूं। इसके अलावा मैं hnname: 50070 / का उपयोग करने में असमर्थ हूं / जब भी NameNode शुरू होता है। I कृपया मदद करने के लिए एक पूर्ण नौसिखिया हूँ। अपने टेम्पके फ़ोल्डर को हटाने से पहले नामनोद प्रारूप करें (डेटानोड और नामनोद) हैलोप नामनोद-प्रारूप

How to format a timestamp in android Webview using javascript -

I want to format a timestamp such as 1406270888 on Sunday, July 25, 2014 at 12:48:08 PM A WebView Android device My JavaScript code is as follows: & lt; Script & gt; Var chatTimestamp = parseInt (1406270888); Var date = new date (chattimestamp * 1000); Var LocalTime = Date.TolokelDetting () + "+ + date. Tolokel Timestrying (); Document.getElementById ("Demo"). InnerHTML = Local Time; & Lt; / Script & gt; But the output I get is as follows: Sunday, July 25, 2014 12:48:08 So basically AM is PM Source: Any help is appreciated. Thank you Try this script & lt; Script type = "text / javascript" & gt; Var chatTimestamp = parseInt (1406270888); Var date = new date (chattimestamp * 1000); Document.write (date.toString ()); Dokyumentkwrite (Detkgetfullyear) + '-' + Detkgetmonth () + '-' + Detkgetdte () + '' + Detkgethors () + ':' + Detkgetminutes () + ': '+ Date.getSeconds ()); ...

C# struct non-static struct member cannot have initializer -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब क्या कारण है स्क्रीन पर त्रुटि? सार्वजनिक रूप से व्यवस्थित करें योककीइपीसी लिस्टीसी {सार्वजनिक बाल STOKGUNCELLE = false; सार्वजनिक बाउल STOKSIL = गलत; सार्वजनिक बाउल STOKLISTELE = false; } गैर-स्टैक्टिक स्ट्रक्चर सदस्य में प्रारंभकर्ता नहीं हो सकता सी # प्रारंभकर्ताओं को अनुमति देने के लिए struct को अनुमति नहीं देता है, इस कारण से पहले क्यों बहस हो रही है, यहां देखें: () बस = ध्यान दें कि बूलियन फ़ील्ड डिफ़ॉल्ट रूप से false हैं, अपने असाइनमेंट को पूरी तरह अनावश्यक बनाकर। यदि आपको फ़ील्ड को गैर-मूलभूत मानों के लिए आरम्भ करने की ज़रूरत है, तो आप अभी भी एक अतिरिक्त कन्स्ट्रक्टर परिभाषित कर सकते हैं जो उन मानों को सेट करते हैं, हालांकि यह डिफ़ॉल्ट (पैरामीलेबल) कन्स्ट्रक्टर नहीं हो सकता। एक वैकल्पिक विकल्प तो, एक स्थिर कारखाना विधि का उपयोग करना है।

c# - ASP.Net Razor view uses cached value -

I have a problem with my ASP razor ideas. I take one model, it manipulates and then uses to display results PartialView (used for partial view postback is the same as a ). The model is well updated, but visual engine offers the old values ​​and gives new value EditorFor does not use the new model price, but instead value That used to be the model when it was posted. I applied OutputCache attribute my action: [OutputCache (NoStore = true, period = 0, VaryByParam = "*")] But it does not change anything. Alternatively, I know that this is not a client caching problem, because the result is already set to false value by the result EditorFor . Edit There is an update to the code of action that protects basically und a service data model calls [HttpPost ] [OutputCache (NoStore = true, duration = 0, VaryByParam = "*")] Task's & lt async public; ActionResult & gt; Edit (StaffingCostRatesForYearViewModel VM) {(ModelState.IsValid) w...

delphi - LiveBinding value can not be set by code -

There is a TToolbar, which is the value it is bound to a TText.Text. I change the TToolbar value, the text has changed as well. So far, everything works fine. If I have set the TToolbar value manually, the binding does not affect: The TToolbar value changes, but the text does not. Is there a way to trigger london banding? Code Of course, I can set TToolbar.Value and TLabel.Text to separate the manual, decommented in the code below, but this would mean as - Failure to install Label1 Due to the risk of getting unnecessary code. Lesson - Not very intuitive in more complex lively bonding situations Sample Delphi FMX code: unit unit 1; Interface, System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, using FMX.StdCtrls does Data. Bind. Angest, Fnkskbadkdbengest, Sistmkrtti, Sistmkbindingskautputs, Fnkskbad.aditrs, Detakbadkkanponents, Fnkskobjekts; Type TForm1 = Class (TForm) TrackBar 1: ...

Android TextView setText results in empty text -

I try to set the text of a text message programmatically within one piece. The SIC code for the class: public abstract class AbstractFragment extends Piece {@Override protected void onActivityResult (integer requestCode, integer resultCode, the final effect data) {this.setFileName (); } Protected abstract zero settingFileName (); } Public class ImplementingFragment AbstractFragment {@Override public view onCreateView (LayoutInflater inflater, ViewGroup container, bundle savedInstanceState) {piece View = inflater.inflate (R.layout.fragment_layout, extends container, false); Return piece; } @ Override Secure Zero SetFilename () {string filename = "Test.txt"; TextView TextView = ((TextView) getActivity (). FindViewById (R.id.text_file_name)); TextView.setText (file name); }} The layout is as follows: & lt; linearLayout xmlns: android = "http://schemas.android.com/apk/res / Android" xmlns: device = "http://schemas.android.com/tools" Android: l...

ipad - using card reader to input into webpage -

I have a normal card reader that is connected to the tablet (iPad or Android) via USB cable on my webpage. After navigating, when I swipe a credit card, I want to fill in the details of the card in the text box. How can I get this, without making the original application . Set focus on your card Post field Post-back a field when card swipe is received or Post Ajax Store swipe data in a hidden form field Update the UI to show the user that the card was accepted (in the input field **** 1234 Show, Time Expiry Date etc.) and it can continue the checkout

how can a visitor share a picture on instagram from my php website through android and iphone? Is it possible in php? -

I am looking for code through which a visitor can use 'install-a-village' from my website Can share links and images. Share button on your android and iPhone mobile 'Can someone please explain with examples? thank you in advanced. Instagram API does not allow you to post pictures. You still need to post pictures using the Instagram app. Please check the Instagram API documentation. There is no endpoint to create media

How to put condition in hibernate -

I have two squares. College and Students, as the bottom class college {int id; @OneToMany (fetch = FetchType.EAGER, cascade = {CascadeType.ALL}) @ FET (value = FetchMode.SELECT) @Join column (name = "id") list & lt; Students & gt; STD; Public zero is eligible () {// some code here}} I continue these two items for this tables. I now want to continue in the student table only then, If that qualified returns are correct How can I keep that situation? Can I use filters? First of all, your mapping may seem a little bit for me, it should look something like this: class college {// ... @OneToMany (mapped = "college") list & lt; Students & gt; Students; // ...} class student {// ... @ManyToOne (columnName = "college_id", ...) college college; Second, about the conditional firmness of the students, that your persistence layer (or trade logic level, if you have it) should be treated, not your model layer (the definition of your base orga...

datetime - How to change displayed time by OS on android? -

I know that I can not change the system time on Android But I need to revise the time that the screen clock (in the corner) reaches. Is it possible to do this? There is no way to edit the system / OS time program even though you can not change date / time activity You can call settings to open, but the user will have to change the time. current activity (new intent (android.provider.Settings.ACTION_DATE_SETTINGS));

Error 5 : Acces is denied when moving files in python -

I am working on a program for a few days now, and I got stuck on an error last night. I have already seen other questions here but no one is working. I'm taking files from 1 drive to second place, and in the beginning it worked, but now it started to say this error: Edit: Just seen that this fact transfers files, and then it gives me an error traceback (most recent call final): File "C: \ user \ DC \ Desktop \ prototype \ prototype ", line 9, & lt; Module & gt; Shutil.move (src, dst) file "c: \ Python27 \ lib \ shutil.py", line 300, in the rmtree (src) file "C: \ Python27 \ lib \ shutil.py" in line, rmtree (Error 5) Access denied: 'E:' (error: 5) rmtree os.rmdir (path) in line (ARMDR, path, sys.exc_info ()) "C: \ Python27 \ lib \ shutil.py", line 254 And here's my code snippet. Import import time = time.strftime ("% H% M% S") src = "E:" dst = "C: \ Users \ DC \ Desktop \ Data_...

Messaging feature disabled by default for a Twilio number -

I created an evaluation free account, my purpose was to test the service and to check whether it meets our needs . I have read that sending a message is available in free of charge accounts. I verified a Spanish phone number and in the support url in the country I saw the country supported to send domestic messages to Spain. I went into account settings and enabled Spain as a messaging country. But, when I manage the number page, messaging is disabled. I thank you in advance for any help to review the Docs and FAQs without any success. Explained with the support of the similio. There are two types of numbers: In national and local Spain, only local numbers can be used but they are not available in the evaluation free account.

spring-social-linkedin only retrieved two current positions and no past positions -

I am using Spring-Social-LinkedIn 1.0.1.RELEASE and after the call, I will go again: .getUserProfileFull (). GetPositions () This does not give only two current conditions and no previous status. P> On the API documentation of per linkedness, "Only current status Available to others other than authenticated members. " Otherwise there is no way to configure it.

java - Center a block of two Views in Android -

Image
I want a block of two labels to focus horizontally in the screen, I currently have the following code: Android: layout_gravity = "center" android: orientation = "horizontal" & gt; & Lt; TextView android: id = "@ + id / TextView02" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: Ellipsaij = "end" Android: singleLine = "true" android: text = "Lorem Ipsum" Android: Textcolor = "# FF0000" /> & Lt; TextView android: id = "@ + id / TextView01" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: singleLine = "true" android: text = "Test 2" Android: textcolor = "# 00ff00" / & Gt; & Lt; / LinearLayout & gt; This is fine when text is small (see image below): But when the red text is long (or the screen is narrow) green text is unavail...