Posts

Showing posts from January, 2015

.net - Looking for ways to determine whether the machine is "overloaded" -

I have a setup where various agents have been assigned the task. My problem is that I Would like it to be "overloaded". I think the question is very ambiguous, so I'm going to expand a bit. A task usually gets something from the database, processes the data and then writes it back to the database (either one or the other). A lot of figures can come in some tasks and some - much less, are mostly main I / O bound, but some may include heavy CPU bound computation. The present agent architecture is such that an agent has a constant number of concurrent threads dedicated only to work - one thread per work (I know that this is bad, but this is a different story ). This type of thread is called the task thread Of course, they want the functions that worker threads are free to give any number of eggs work threads does not change in the number. However, when every task thread is busy performing some heavy tasks, then the agent nostalgic is busy. We recognize th...

android - How to determine XY of resized image -

Image
I have a dynamically-loaded bitmap in an image value and the user uses the FitCenter attribute to resize the screen I am doing How can I find the initial X, Y (left, top) of the original image after the size of the fit on the screen? Please refer to this annotated enclosed sample image, in this case I am looking for 'X', left side of bitmap Thank you! "Android: contentDescription =" @ string / white_balance "Android: scaleType =" fitCenter "Android: src =" @drawable / pichost "/>

php - Use mysql user variables in Zend Framework 2 -

I want to run a mysql query, including the variable. A simple version of this looks like this: $ sql = "update mytable, (SELECT @ counter: = IFNULL (@ counter, 0) + 1 as new_value, mycolumn byothertable ORDER By mycolumn) I SET mytable.counter_column = i.new_value WHERE i.mycolumn = mytable.mycolumn "; $ This - & gt; GetSlaveSql () - & gt; GetAdapter () - & gt; GetDriver () - & gt; Mill Connection () - & gt; Execute ($ sql); But the result value is always 1. If I run the query directly, then I have the correct line of numbers, I think the variable BE will not be able to unset the BE Zend, so that each line has a @ counter 0. I have used a stored procedure for this now.

c# - Saving factorial in long integer -

I'm using the following code to get the factorial, but it seems limited to me Private Int64 GetFactorial (Int64 value) {If (value> but it only allows values ​​of 66 values ​​on 65 , this is a 0 as a result and the result is negative even if the value is 65 or near. What can I do to work with more values, and get results with System.StackOverflowException ? You may want to check out BigInteger Stretch, because it allows an integer large size Returns:

Secure laravel hosting in shared hosting with ssh access -

I have access to Blowhost unlimited hosting, along with it contains many domains, including my own. i is SSH Access. I have positioned a Laval Web app by inserting app , bootstrap and vendor folders in my domain folder The main public_html folder outside the directory, and Larval's public folder contents adjusts the routes involved and it's working fine. 1) Now, I have all the larval related files in my domain folder, but I do not know how to make it safe, i.e. the domain's public my domain folder The folder inside of the folder, instead of the root of my domain folder, is blocking public access to app , bootstrap and vendor folders . I'm not sure that I have explained clearly, this is what I am trying to achieve: public_html / some_domain_folder / my_domain_folder / app / Bootstrap / public / vendor / / code> and pointing to my_domain_folder / public for my domain, so the rest of the files are not accessible to the public. How can...

sql - MySQL - Movie Database Query including Null Rows -

References I'm working on the Sakila rental DVD database here mentioning them (# 2): I am trying to find the sequence of all the science-fiction movies that have been performed in every actor, including those who have not been in a science fiction film. . I have a right query for what has been done in a science fiction movie, but I am having trouble adding all these actors even though the order is zero. Here is my query: select act.first_name, act.last_name, SUM (fm.length) Join the movie FM from within film_actor father at fa.film_id = fm.film_id on fa.actor_id = act .actor_id Join Actor Act fm.film_id = fc.film_id on the left fc.category_id = cat.category_id on the left Category Bill Join the movie_category FC where 'science-fiction' group by cat.name = act.first_name, act.last_name order by act.last_name This gives me all the 167 actors who are the least 1 science-fiction is in the movie. I think my segment is not allowing zero rows, but I do not know how t...

debugging - How to install `Hat` -

I'm trying to get the hat debugger. When I try: cabal install hat or cabal install hat -v Finally I'm getting: Configure: Error: `/tmp/terminfo-0.4.0.0-17745/terminfo-0.4.0.0 ': Configure: Error: Curved header could not be found, so this package was not created Can be configured for 'config.log' terminfo-0.4.0.0 cabal for more information: Error: Failed to install some packages: Haskline -0.7.1.3 Terminal -0.4.0.0 depends on which install In Failed. Hat-2.8.0.0 Termino -0.4.0.0 depends on which failed to install. Terminfo-0.4.0.0 failed during the configuration phase. The exception was: exitFailure 1 So I'm having trouble shooting: cabal install terminfo and Receive: Configure: Error: In `/tmp/terminfo-0.4.0.0 ': Configure: Error: Could not find the curved header, so this package can not be created More information See `config.log 'for Terminfo-0.4.0.0 Failed to install cabal: Error: Some packages failed to install: terminfo-...

html - Bootstrap Responsive Search Engine Layout -

I am trying to use a bootstrap and above a responsive input and a logo. I tried to do everything within my knowledge, the column (grid system), changing the shape etc. No matter how do I do it. It turns the buggy i.e. when I shape the browser window, it gets an opportunity to get out of order. Replace the results window again to see how everyone is fired from firepower This is done with Bootstrap 3. I'm out of ideas .. If you want to focus your image (assuming you In the image, add id = "main-img" ): # main-img {margin-left: auto; Margin-right: auto; } If you want to make the image a full width: # main-img {width: 100 %; } (updated as per the comment)

c - windows: how to stop irda dongle periodic auto detecting -

I am writing some code in the code for the IRDA project on a win7 32bit computer. I have another computer setup to display any data I have received through infrared. This part works, however, as soon as I add the IRDA dongle to the PC, it starts sending periodic data for the discovery of other IRDA devices. Does. I want to disable this behavior programmatically so I only send data as a result of my code. Any command to know which command to use? Is this WSASetService? I was not learning socket programming, it is not certain that "service frequency from Registry was removed within one or more namespace". have you disabled Infrared Monitor service manually? I encountered problems with Windows 7. Using Win7 functionality in Win7 to communicate with an embedded micro-controller based device that works well with Windows XP. I manually disabled the infrared monitor service and found that the windows were periodically voting on the IRDA! I do not have any documents av...

Equivalent of belongs_to through in rails model -

What do I have to do? My argument is that I do not want to generate too many DB calls while crossing my model structure . My example in pseudo-format: is the producer / machine: In order to get all the people in the factory factory factory, I want to meet those manufacturers, where those manufacturers The factory is: factory machines are present The only way I can think, is to walk through the manufacturer. Machines. The factory, and the factory is saying. People (or people call a representative using the phone), but I call it a call. Is there any way? In your manufacturer model you may have these relationships: is_mini: machines # You already have one that is: the factories, through: In machines: people, people: factories Assume that bob is a manufacturer . Now you can meet all the people in all the factories where machines of Bob are present. bob.people Note that I have the people model person name Given when I tested it You should try to ...

python - Forcing refresh/reload of url in one browser when url in second browser window is updated -

I have a website that's written using the Django, which contains text entry, voting, and serial listings from age and vote The table is displayed, all on one page: Now I have to see a separate entry, voting, and table page, and I have started from the polling page. It works well, and votes are added to entries in the built-in sqlite3 database, but I have to manually refresh the table page (index). Is there an easy way to update, or reload table data in the last resort, the voting URL or actions in the table in the table (index) URLs? DIF index (request): reference ========================================================================================== voting.html & lt; Div id = "vote" square = "high" & gt; & Lt; Div style = "text-align: center" & gt; To enter {% Voting_entry_list%} & lt; Li & gt; & Lt; A href = "/ entries / {{entry.id}} /" & gt; {{Entry} text}} & amp; {{Entry.score}} ...

html - How can i close my jquery menu -

I need to close it when I click on the link, but how? & lt; New class = "navigation" & gt; & Lt; A href = "" class = "menuIcon" & gt; & Lt; I class = "fa-bar" & gt; & Lt; / I & gt; & Lt; / A & gt; & Lt; Ul class = "nav" & gt; & Lt; Li class = "cleanfix" & gt; & Lt; A href = "# home" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# diensten" & gt; Dyesthen & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# over" & gt; Hat team & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# werkwijze" & gt; WorkViews & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# contact" & gt; Contact & lt; / A & gt; & Lt; / ...

linux - glassfish stops when i close putty window -

I have glassfish up and running on a Solaris machine. I'm using putty to connect to that machine. I have also enabled remote administration. I am currently able to log in to the admin portal. The screening window closes immediately, the example of a glassfish is no longer running. On a Windows machine can you start the domain as a service for Linux similar to that? If you do not use or system daemons (this is equivalent to service) to make sure you All programs that were started with the console have become different. You usually use "nohup asadmin start-domain" after the fact that you call it disown -h

objective c - Using an NSString as a Name of a Label For Loops -

I have a lot of labels and it would be easy if I could use a string instead of the name of the label. Property (e.g. center). This will reduce the number of lines typed. I have to change the same property of all the labels several times. If I have a loop similar to what is said something like this: NSString * For TheLabelName = @ "MyLabel #" (Int Thanembar = 1; The number & lt; some; The number ++) {TheNumberString = [NSString StringWithFormat: @ "% i", the number]; TheLabelName = [TheLabelName StringBeerPlalings OccurrenceOffString: @ "" with String: The Number String]; TheLabelName.center = CGPointMake ...} I did not find anything like this on Google or Stack Is there any possible way to use the string instead of the label name?

css - How can I freeze a button once it gets to maximum position height on the page? -

I have a button that starts at the bottom of the page ... when the user scrolls, just everything Otherwise, but I was wondering if there was a way to freeze the button when it was under the header? Use it in your CSS Status: fixed; // This is located at the bottom of your site, even if you scroll down: 10px; Correct: 0 pixels;

java - Is there any alternative solution when the return value of Future.get() is too large? -

I get large scheduled futures data in the form of return of the get. I believe the Schedule Future can only be returned when it gets () done. So it will always generate "java.util.concurrent.executionexception java.lang.outofmemoryerror java heap space" error on my machine. Is there any alternative solution that I can split my return in parts when I am using a schedule ExecutionerService? Thank you. Save your work result to disk, and get method Return that file , which was written as a result. Note that serialization will not help you to avoid memory problems, because you have the whole result stored in the first place (it does not use more memory than returning it). You will want to use the "Streaming" approach, where small portions of data are written on disk as soon as they are created. Similarly, the user in the result should stream the data, smaller parts should be processed in memory, and before reading more, discard the dereference it. Y...

java - Decode Base 64 and encode as Utf-8 still leaves encoded characters -

Image
I have a program that has to decode the base 64 string and then re-enter it as UTF-8. The program is pulling text from a .doc and then downloading it locally from dropbox (using tembo). There are still weird letters before and after the document. This is what Microsoft reveals a section of the page for Word 2011: I tried to keep the text online in the decoder and did not know what the encoding of the text above was, I like this, I am currently decoding text: encoded = encoded. All fixed ("\ r \ n", ""); Encoded = encoded.Rabel all ("\ n", ""); Encoded = encoded.Rabel all ("\ r", ""); // Decoding feedback decoded = StringTilities New StringWfF 8 (base 64.decodeBase64 (encoded)); In this textEdit.app looks like: Do anyone know what the encoding is and how can I decode these letters? The word here is the first part of the .docx file, in hex: 50 4B 03 04 14 00 06 00 08 00 00 00 21 00E1F8E BF 8D 01 00 00 0...

version control - Git - update only files existing in current branch -

मेरे स्थानीय रेपो - मास्टर (कोर फाइल) और master_with_adds (कोर + अतिरिक्त विन्यास) में 2 शाखाएं हैं स्वामी सिस्टम / लिब्स / master_with_adds सिस्टम / लिब्स / जोड़ता है सभी 2 शाखाओं में एक ही फाइल होती है लेकिन master_with_adds में अतिरिक्त फ़ोल्डर होते हैं अब मैंने master_with_adds पर स्विच कर दिया, कुछ बदलाव करें और इसे कम करें। मैं अपने मास्टर शाखा को केवल मास्टर में मौजूद फ़ाइलों के साथ कैसे अपडेट कर सकता हूं? अर्थात् मुझे केवल सिस्टम और libs , फ़ोल्डर जोड़ता है को कॉपी नहीं किया जाना चाहिए। समाधान: मैंने यदि आपने जो बदलावों को लाया है, उन्हें यहां जोड़ना और निकालना शामिल नहीं है, तो आप यहां उत्तर पा सकते हैं git चेकआउट मास्टर git ls-files -z \ | Xargs -0 git चेकआउट master_with_adds - और आप कर रहे हैं यदि आप अतिरिक्त जोड़ना चाहते हैं और निकाले जाने का आसान तरीका संभवतः हाथ से करना है, यहां से शुरू करना है, यद्यपि आप पूरी तरह से अपने कोड के एक साइडबैंड इंडेक्स का निर्माण करने के लिए GIT_INDEX_FILE पर्यावरण चर का उपयोग करके पूर...

c# - Use delegate to write a method to take another method as an input parameter and the delegate should have unknown numbers of parameters -

Sorry my title is a bit confused and confused. I explain here in the details. In my program, there are four ways in which I simplify my interface only. Private static zero method A (type 1 parameter 1, type 2 parameter 2) Private static zero method B (type 1 Parameter 1, Type2 parameter, Type 3 parameter 3) Private Static Type 4 Methion C (Type 1 parameter 1, Type 2 parameter 2) Private Static Type 4 Method D (Type 1 parameter 1, Type 2 parameter, Type 3 parameter 3) I for these methods I want to write a generic retrieval logic (I do not want to add every attempt again). Do something like (try the representative function break)} (exception preceding) {Thread.sleep} to do something like (for int retrieval = 0; retry What I am thinking is to write another method to use the function representative as an input and calculate the retry form as another input It's something like that. But these four ways signature are quite different. There are three input parameters (B, D) an...

javascript - Font Awesome icons not rendering in Phonegap iOS application -

Image
Instead, presenting the icons that I'm getting a small intersection: It works perfectly well within the browser, but when I used to see my app in the iOS simulator or mobile safari, the square was there. Thank you very much for your help! I had the same issue with my "Cordova" CSS directly in my Cordova IOX encode. File and I've written it in the "index.html" file saying this: & lt; Script & gt; $ (Document) .band ('mobileinit', function) ($ .mobile.loader.prototype.options.text = "loading"; $ .mobile.loader.prototype.options.textVisible = true; $ .mobile.loader. Prototype.options.theme = "p"; $ .mobile.loader.prototype.options.textonly = false; $ .mobile.loader.prototype.options.html = "& lt; span class = 'ui-bar ui-overlay -c ui-corner-all '& lt; i class =' ​​fa-spinner fa-spin fa-5x 'style =' color: # 000; '& gt; gt; ; / Span & gt; ";}); & Lt; ...

r - How to create a vector of sequences based on a vector of lengths -

I am hoping to make a vector of different length scenes (1: n). I am hoping to use the other vector to specify the length of these scenes. For example, for my length vector: length I want to return R: 1,2,3,4,5,6, 7,8,9,10,1,2,3,4,5,6,1,2,3,4, etc. I think there might be a loop in some sort of order, but I can not seem to work for it, maybe this is something like this: outside & lt; - For NULL (I Length (length)) {Out [i] & lt; - 1: Length [i]} I end up with this error: Warning message: outside [i] & lt; - 1: Length [i]: The length of the replacement is not an honor Any help is greatly appreciated! sequence (length) [1] 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 1 2 3 4 1 2 3 4 5 6 7

r - Matching a vector element with another vector values -

Does anyone correct me in trying to read the index of values ​​from a vector that matches my current value . Thanks in advance ... lat_array & lt; -c (seq (90, -89.95, = -0.05)) a & lt; -c (3.7, 90) match (a [1], late_re) # Returns NA, price 177. 3.7 matches (a [2], wave_are) # Surprising and return 1 One way to find the closest match is to: JoeMan (Ab (Lot_Are - A [1])) ## [1] 1727 Lot_Ere [1727] ## [1] 3.7

oledb - Is is allowed, by COM rules, to do reference count per Interface instance? -

I am having an accident with Excel, while this is an OLE DB provider that I am writing, and the reason seems, After digging through some disassembly, due to trying to call a method called IDBIfon, the provider was already destroyed (as if its reference number was below 0.) Now, in this provider, every call to QueryInterface on any of my interfaces Always returns a new (C ++) object (which represents all IUnknown methods for a normal object that excludes the whole COM object except IUnknown, for example, from my provider 'Live' given to IUnknown A (and believe QueryInterface is successful), For example, / P> ISIM Interface * B; ISOM Interface * C; A-> Query Interface (IID_ISome Interface, (Zero **) and B); // B.Refactant = 1. A-> Query In Rfes (IID_ISome interface, (void **) & amp; C); // C Rifount = 1, B Rifcunt unchanged. C & gt; Release (); // C refund = 0, C is lost, B is reflex unchanged. C & gt; SomeMethod (); // C will be an accident, even...

node.js - airplay-js no start streaming -

I am streaming a local file on Airplay Protocol with sub-title support, to do so that I am using Ffempey and The process is working really well, but the main problem is that when I try to start streaming after burning subtitles, Airplay does not work, but when I comment on those links which burning Works fine. What am I doing wrong? Here's the code. var fileSource = './source.mp4'; Var subtitle source = './source.srt'; Var http = is required ('http'), fs = require ('fs'), util = require (OS) = ('OS'), spawn = is required ( 'Child_process'). Spawn, airplay = is required ('broadcast-js'); Var Browser = airplay.createBrowser (); Var tmpDir = OS.tmpdir (); Var tmpFile = tmpDir + '/localTV.mp4'; Var Sources; Var tmpFileSize; Function init () {console.log ('local TV start'); Console.log ('burn subtitle' + file source); Var stat = fs.statSync (file processing); SourceSize = stat.size; Fs.exists (tmpFile...

ssl - Have Jmeter use different Certs from keystore to make to requests -

Jmeter HTTPS requests require the help of Jmter to use multiple curtts that require a JSS I am using different client certificates in Keystore, currently there are 2 client types / keys in it. Currently I have some HTTPS requests in the thread group that have some other HTTPS requests in CERT1 and another thread group that should be done using CERT2. I am using keystore configuration for these different thread groups to use nicknames or indexes to use different CRTs. In addition to setting separate aliases to add keystore configuration to thread group and choose different certificates, JMR is not using separate carats to request. I see that the same proof is being used. I have set -Jhttps.use.cached.ssl.context = false -Jhttps.socket.protocols = TLSv1.2 -Djavax.net.ssl.keyStore =% Keystore% -Djavax.net. Ssl.keyStorePassword =% KEY_PASS% And I am using HTTPClient4 in my HTTPS requests. Is there anything I'm missing ... any help will be used? Read document conte...

php - Array element returning null in laravel-4 -

I am trying to get a record from a table using a given ID, and I want to assign a specific column to another array I want to store in, but I my code: $ getOrder = array (); Foreach (invoices as dollar orders in dollar orders) {$ getOrder [] = array (array ($ points within orders), array (order :: where ('id', '=', between dollar orders Are located in) -> (-) -> Inventory ('tracking_id')), array (order :: where ('id', '=', are located between dollar orders) - & gt; Get;) - & gt; Notifications ('Shipper_rf_now')); } For those men, where $ ordersInWaypoint came, I received it from here: $ ordersInWaypoint = array (); OrdersInWaypoint = Transaction :: where ('waypoint_id', "=", $ firstport) - & gt; Receive () - & gt; Lists ('order_id'); Ignore $ firstWaypoint , as it is determined by user input. Every time I var_dump ($ getOrder); I get the following result set: array (...

design - Designing pizza shop : Change Ingredients or base after pizza is fully constructed? -

I'm trying to solve the problem of pizza shop. They will sell some pizza varieties in the pizza shop and they will also provide toppings in the menu. Now imagine a situation in which the pizza shop will have to get prices for each combination of pizza and toppings. This is an example of a decorator pattern and it can be prepared as a compliance: Public Abstract class BasePizza {protected double myprice; Public Virtual Double GetPrice () {this return.myPrice; }} Public Abstract Class ToppingsDecorator: BasePizza {Secure BasePizza Pizza; Public ToppingDecorator (Baspaeja Pizza Todcorate) {this.pizza = pizzaToDecorate; } Double Override GetPrice () {Return (this.pizza.GetPrice () + this.myPrice); }} Class program {[STAThread] static zero main () {// client-code Margarita pizza = new margarita (); Console.lightline ("plain path:" + pizza. Gatepress (). Toasting ()); Extra Chase is doing more Cheyes = New Extra Chase Tapping (Pizza); Extra Chasing Some More Academic =...

Search in the current line in Vim? -

I like incremental search ( / pattern> ) in vim, which is when I'm typing it. But this file is in the field. Is it possible to search in the current line and wrap it while reaching the end of the line? This will help speed up navigation in a row, so it would be great if no additional (more) major strokes are offered. You can do something like this. noremap & lt; F6 & gt; /\%<C-R>=line('.')<CR>l To match this current \% l atom Uses the line For example, \% 15l matches matches 15. It prohibits search for that line. See : h \% l . To get the current line number, we use expression register and line function.

java - LayoutPanel getOffsetWidth() returns 0 -

I can not find the actual dimensions of an object when she went the first time and expense by LayoutPanel. I'm using the layout panel for a widget of up to percent: MyClass displayObject = new MyClass (); Adding (DisplayObject); SetWidgetLeftWidth (displayObject, 0.0, Unit.PCT, 15.0, UnitPCT); SetWidgetTopHeight (displayObject, 0.0, Unit.PCT, 30.0, Unit PCT); class I onResize () override: implement public MyClass extends AbsolutePanel does RequiresResize {@Override public void onResize () {int maxWidth = getOffsetWidth ( ); Integer maxHeight = getOffsetHeight (); // ... here need to use maxWidth ...}} My problem is that onResize () until the browser is physically added to the given size , And when I need the correct dimension the object is displayed first. If I forceLayout () is called, it makes a call to onResize (), but getOffsetWidth () returns null. I need to force a call to execute onResize () after that the object is composed of pieces. You browser shou...

escaping - Using double quotes in Perl script -

Anyone can help solve it: Use strict; Use warnings; My $ teststr = "\" abcd \ ""; Print "\ nTestStr: $ teststr \ n"; `Echo" $ teststr "& gt; & Gt; \ / Home \ / folder \ samplequotes.txt`; Output of the above program: $ perl quotes1.pl TestStr: "abcd" $ cat samplequotes.txt ABCD The problem I am facing is that double quotes in the string are not found in the text file Ideally, the content of the samplequotes.txt file should be: "abcd" Can anyone tell me what problem would be here ?? Your problem is mixing Pearl and Shell; There are two identical, but not equal sets of quotes from the conventions, and it is difficult to understand the conversation between them (because you both have to understand separately, as well as how they interact). Extension of the Perl: `resonance '$ teststr" & gt; & Gt; \ / Home \ / folder \ samplequotes.txt`; In: echo "" ACD ...

java - Why static/member variable are slower than local variable? -

I have seen this thread: made your own class to check the speed public class questions {static long start; Static long time has passed; Static String Mastatic; Private string m public; Public static zero main (string [] args) {query q = new question (); Q.executeGlobal (); Q.executeStatic (); Q.executeLocal (); } Public Zero Execution Local () {string mLocal; StartTime = System.nanoTime (); For (Int i = 0; I Result: Type global: 45693028 ns Type Static: 43853723 NS Type Local: 2057505 ns found / putfield For getstatic / puttish is due to the bytecock, strong> Bytecode for member variables, it can be calculated through bit-transfer and some extra First of all I thought that only Object causes this, but the primitive result is the same local variables still Text "> You are the victim of Runtime Optimization: -) If you change your code a bit: question q = new question (); (Int i = 0; i & lt; 2; i ++) {q.executeGlobal (); Q.executeSta...

javascript - Positioning caret in contenteditable ReactJS components -

I am using contenteditable to present text values ​​in DOM nodes. Example: var data = [{value: 'hello'}, {value: 'world!' }]; Var component = React.createClass ({renders: function () {var pieces = this.props.data.map (function (slice) {return (& lt; span contentEditable = "false" & gt; & lt; span contentEditable = "True" & gt; {piece.value} & lt; / span & gt;; & lt; / span & gt;)}} Return & lieutenance; div material editing = "true" & gt; {pieces} Lt; / div & gt ;;}}); React.renderComponent (& lt; component data = {data} />, some container); For reasons) looks like this: ; When the user interacts with these editable spans, For example, backspacing in one before the other one, I can update the data by removing the last character from the first model, but in some way I would first have to span [contenteditable = "true"] My question: need to respond to t...

jquery - Cycle Plugin: Turn the pager thumbnail into a slider -

Image
I am trying to work on a circle image gallery and so far everything is working perfectly but I wanted to know what it was possible to turn on the pager thumbnail in a slider. I try this plugin and unfortunately it is not working. I do not know why that might be because there is a conflict between the two plugins. I just want to close the thumb of the image like: In this case I have found that the plugin used by you is better to replace So I came to know that this plug-in can make it easier. In the Ad gallery the thumbnails are sliding down and easy to use in the bottom of the image.

html - Angular.js select looses focues option when $scope.$apply() -

मेरे पास एक बिल्कुल सीधा तत्व चुनें तत्व है: & lt; select id = " SelectConvert "selectmodel =" currencyPair "class =" select "ng- मॉडल =" मुद्रा पीएआर "ng-options =" ​​ft.id के रूप में सामग्री में फीट के लिए ft.name "ng-change =" currencyPairChange (currencyPair) "& gt; & Lt; / चयन & gt; जब मैं चयन ड्रॉप डाउन करता हूं, तो किसी भी अन्य विकल्प पर पहले ध्यान दें और फिर नियंत्रक $ दायरे को कॉल करता है। $ लागू (), फ़ोकस पहले विकल्प पर स्वचालित रूप से वापस जा रहा है। / P> मुझे इस तरह के व्यवहार से बचने के लिए कोई सुराग नहीं है किसी भी मदद की जोरदार सराहना की। यह काम कर रहा है मुझे यह विचार मिला यहां है। & lt; div ng-app & gt; & Lt; div ng-controller = "SelectCtrl" & gt; {{Rate}} & lt; id = "selectRate" ng- मॉडल = "rate" डेटा-एनजी-क्लिक = "निलंबित (स्कोर) ()" & gt; & Lt; विकल्प ng- दोहराने = "दर चार्ट में फीट" मान = ...

multithreading - Using a thread with designer objects vb.net -

I have a big problem I'm currently preparing an antivirus, and it's coming very well. But having all the scanning engines running on the same thread, the IE main one is causing the app to become unresponsive during the process of interrupting the loading and multithreading to increase the overall performance of my application and overall performance. Have tried to implement. But, every time I try, I get an error of cross threading, I. E. I can not use the form designer progress bars, buttons and labels etc. I just want to know why this error has been thrown, and how it is decided. Thanks in advance! If you are not in the UI thread, then use InvokeRequired to check, then you are InvokeRequired True , And therefore you can safely turn a representative from the UI thread into control: public sub-set text (by text as string) if (M. invocaruair) then ' Invoke a representative from the UI thread Invoke (DirectCast (Sub () Label1.Text = "Test", MethodInvok...

zurb foundation - Aligning buttons on different views -

I have a button that I want to align on the desktop right, which is right Utility Class: & lt; Div class = "small-12 columns" & gt; & Lt; A href = "#" square = "button right" & gt; Bla & lt; / A & gt; & Lt; / Div & gt; But on a smartphone I do not want the button to float properly, so how can I get it? Basically this is not just using the correct class, but I need it for the desktop ... You can add custom class button to use media queries to style the smartphone / HTML: & lt ; Div class = "small-12 column" & gt; & Lt; A href = "#" square = "button mybutton right" & gt; Bla & lt; / A & gt; & Lt; / Div & gt; CSS: @ Media only screen and (max-width: 40m) {. MieboToon {Float: None! Important; }}

ActionController::UnknownFormat with format.js for ajax implementation (Rail 4) -

I try to use Ajax in my application with the railway. 4. The customer I use to my JS I send it to: Answer_ | Format | Format.js end But this error generates in my controller "ActionController :: UnknownFormat" Can I help my controller someone please me? main_controller.rb: class oweb :: mancontroller & lt; ApplicationController def index ..... enddef setmagsasstats start @mag = megasin.find (paramus [: id]) if @ megtatmagasin.lib == 'ovate' @ megtatmagcin = atatamagasin. Where (Lib: 'Fermae'). Second first @ mega.totmagasin = Atatamagasin Where (Lib: 'Overt') First end rescue ActiveRecord :: RecordNotFound logger.error (attempt to use "invalid Magasin # {params [: id]}") redirect_to_index ("Invalid Magasin") and @ mag.save @ mags = Magasin.where (user_id: Current_user.id) response_to do | Format | Format.js End of End End setmagasinstatus.js.erb: p.a. place_html ("bloc_magasin",: partial => ...

php get free space /dev/sda linux -

मेरे पास चरण कोड है $ totalspace = 74.5gb; $ Freespacespace = disk_free_space ('/ dev / sda') / 1024/1024; $ उपयोग किया गया स्पेस = $ कुल स्पेस - $ फ्रीस्पेसस्पेस; कुल अंतरिक्ष: 74.5 जीबी; नि: शुल्क स्पेसस्पेस: 1.46 जीबी; इस्तेमाल किया अंतरिक्ष: 73.04 जीबी; कमांड में मेरे पास नाम MAJ: न्यूनतम आरएम आकार का आरओ प्रकार माउंट पिन एसडीए 8: 0 0 74.5 जी 0 डिस्क | -sda1 8: 1 0 243 एम 0 भाग / बूट | -sda2 8: 2 0 1 के 0 भाग `-sda5 8: 5 0 74.3 जी 0 भाग | -उबनुतु - वीजी-रूट (डीएम-0) 252: 0 0 71.3 जी 0 एलवीएम / `-उबनुतु- vg-swap_1 (dm-1) 252: 1 0 3 जी 0 lvm [SWAP] dev_php @ उबुंटू: ~ $ df -h फाइल सिस्टम आकार उपलब्ध उपयोग की गई उपयोग% / dev / mapper / Ubuntu - vg-root 71G 2.8G 64G 5% / udev 1.5G 4.0K 1.5G 1% / dev tmpfs 301 एम 348 के 300 एम 1% / रन कोई 5.0 एम 0 5.0 एम 0% / रन / लॉक कोई 1.5 जी 0 1.5 जी 0% / रन / शेम / dev / sda1 236 एम 32 एम उस डिस्क डिस्क / dev / sda disk_free_space ("/ dev / sda1") का उपयोग करके किसी विभाजन पर निशुल्क स्थान प्रा...

testing - Upload file using webdriver -

मैंने कोड का उपयोग करके एक फोटो अपलोड करने का प्रयास किया है driver.findElement (by। xpath ( "xpath")) SendKeys ( "C: \\ उपयोगकर्ता \\ पथ \\ ben.jpg"।); लेकिन छवि अपलोड नहीं हो रही है। अपलोड बटन का html & lt; button id = "upfile1 "वर्ग =" बटन वर्ग "शैली =" कर्सर: सूचक "प्रकार =" बटन "& gt; फ़ोटो चुनें & lt; / button & gt; क्या छवि अपलोड करने का कोई अन्य तरीका है? मैंने भी WebElement का प्रयोग करने की कोशिश की है मुझे जावेवा में एक समाधान की आवश्यकता है। मैं । driver.findElement (By.id ( "upfile1")) पर क्लिक करें (); Thread.Sleep (2000); स्ट्रिंग चयन ss = नया स्ट्रिंग चयन ("सी: \\ उपयोगकर्ता \\ logo1.jpg"); Toolkit.getDefaultToolkit ()। GetSystemClipboard ()। SetContents (एसएस, रिक्त); रोबोट रोबोट = नया रोबोट (); robot.keyPress (KeyEvent.VK_CONTROL); robot.keyPress (KeyEvent.VK_V); robot.keyRelease (KeyEvent.VK_CONTROL); robot.keyRelease (KeyEvent.VK_V); robot.keyPre...

Mysql date table join alternative -

When there is data storage, and there is no data for a particular day, then dataset leave gaps in dates in mysql May Date Count 2014-07-09 1 2014-07-10 1 2014-07-11 1 2014-07-13 1 2014-07-15 1 When it is expected to appear: Date Count 2014-07-09 1 2014-07-10 1 2014-07-11 1 2014-07-12 0 2014 -07-13 1 2014-07-14 0 2014-07-15 1 It consists of a table prepared with a column with every single date from each date to every day Solution despite being can be done . Although I am thinking that there is no alternative to it in MySquel?

objective c - how to recieve local notification in ios when app is closed -

I am using local notifications for alarm systems, but I have to face some problem handling local information The app is launched when I click on the alarm notification, the app is launched, but the problem is that it should go to the didFinishLaunchingWithOptions function but it is appDelegate Not going into any function in (I check Breakpoints were used). I am using the story board with the navigation controller, I want to open a special view controller when the notification is closed. But when I launch that app, it's usually going to be inside didFinishLaunchingWithOptions please make a suggestion. pre> #import "DEMOAppDelegate.h" int main (int argc, char * argv []) {{@autoreleasepool UIApplicationMain return (argc, argv, zero, NSStringFromClass ([DEMOAppDelegate square])); }} DEMOAppDelegate.m #import "DEMOAppDelegate.h" @implementation DEMOAppDelegate - (BOOL) Application :( UIApplication *) applied FinishLaunchingWithOptions: (NSDic...

svn hooks - post commit failed on SVN tortoise -

मुझे एक एसवीएन पोस्ट कमिट मिल गई: त्रुटि msg है: पोस्ट-कट हुक असफल (बाहर निकलें कोड 255) कोई आउटपुट नहीं है। मैंने कुछ भिन्न scenerios की कोशिश की: 1) लॉगिन पुटीन के रूप में रूट और पोस्ट-प्रतिबद्ध में सीएमडी मैन्युअल रूप से चलाने, सीएमडी सफलतापूर्वक निष्पादित करने में सक्षम। 2) उपयोगकर्ता xxxx का प्रयोग करके लॉगिन करें और उसी सीएमडी को चलाने के लिए, सीएमडी रन विफल। तो, मैंने सोचा है कि अनुमति समस्या है। लेकिन मेरा सवाल यह है कि, जब भी हम एसवीएन एसवीएन कछुए का उपयोग करते हैं, तो क्या हम एक XXXX उपयोगकर्ता के रूप में कार्य कर रहे हैं? या रूट के रूप में? नोट: मैंने conf / passwd में उपयोगकर्ता xxxx को शामिल किया था। ============= पोस्ट कमिट में मेरी सीएमडी है: #! / Bin / sh svn चेकआउट svn: //mmmm.my/mstardev / home / mmmm / public_html / mstardev एसवीएन हुक में 255 निकास कोड (आमतौर पर) "अनुमति समस्या" या "फ़ाइल नहीं मिली" आप दोनों का शिकार हो सकते हैं: रिक्त वातावरण में हुक निष्पादित होते हैं, इस प्रकार - साइड svn बिना पूर्ण पथ के (हो सकता...

openshift create app ask for passwd -

Image
all. When I try the 'rhc create-app demo python-2.7', I get a problem that is not able to check the GIT repo. The system will ask for the cartridge or the password of some things, but in fact I have to open the lefthift Open-Diagnostic Check Pass Create App Then I remove the default files in /root/.ssh and well G extract the file from the Openshift console, and rebuild the ssh key, and run rhc setup again to upload the key. Then create the app again, but fail again. In the broker virtual machine, while running - oo-register-dns -h node -d DomainX.example.com XXX.XXX.XXX.XXX -k /var/named/domainX.example.com.key , proxy XXX.XXX. XXX.XXX Your IP address of the node virtual machine (As I think is most likely that you have used the IP address of the broker, change accordingly and this command Run it again, it will work.

matlab - How to Shift an array circularly on VBA -

I have an array (1,2,3) and I want to make a circular change to get the example (3,1,2) or (2,3,1) in Matlab I know how to use the following code: y = circuschift (A, K) Can you help me with this work? I appreciate any sample code ... code: private function RotateArrayRight (ByVal ArrayToRotate object (), ByVal iPlacesToRotate (as) as the object as a whole) object as dim objNewArray () in as dim iOldArrayPos, iNewArrayPos integer dim iArrayLength The integer check that ArrayToRotate has not been started to process the array is' Check that the number of place is rotated by the rotation More than that - the function of running the function with 'value' which is less than zero can cause problems, possibly due to the accident causing the iPlacesToRotate & gt; 0 then the length of the array to rotate ', we are using it a few times, so it' iArrayLength = ArrayToRotate.Length 'loaded into a local variable in the beginning of' Array ArrayLength...

android - ExifInterface - can't open '/storage/emulated/.../102214.jpg'" -

I'm trying to get orientation information from an image with the camera app installed on an Android phone. When I call ExifInterface exif = new ExifInterface (fileUri.getPath (.) ToString ()); I'm getting can not open / storage / insert / image / MacMera app / IMG_20140801_102214.jpg ' I set WRITE_EXTERNAL_STORAGE permission, can it be a problem with the KitKat version of Android? BTW., Among other things, file yuri is used, file mediaStorageDir = new file (EnvironmentalGetEstinestSTorporical Directory (environment. DIRECTORY_PICTURES), "MacMarape "); & lt; Use-permission Android: name = "Try to add Android permission. READ_EXTERNAL_STORAGE" /> .

python - The same regex pattern that works fine doesn't work implemented into a Class -

क्यों यह कोड एक परिणाम प्राप्त करता है: आयात पुनः input_file = open ("nota_simple Txt ", mode = 'r', एन्कोडिंग = 'यूटीएफ -8') text_to_search = input_file.read () पैटर्न = re.compile (" (? & Lt; = FINCA Nº:)। * ") परिणाम = pattern.search ( Text_to_search) प्रिंट (result.group ()) लेकिन यह दूसरा कुछ भी मेल नहीं खाता है? (कोई भी परिणाम नहीं है) फिर से सम्पत्ति का नंबर (ऑब्जेक्ट) आयात करें: regex_pattern = re.compile ("(? & Lt; = FINCA Nº:)। *") Def __init __ (स्वयं, str ): self.text_to_search = str self.text_found = "" डीईएफ़ search_p_number (स्वयं): matched_p_number = PropertyNumber.regex_pattern.search (self.text_to_search) प्रिंट (self.text_to_search) प्रिंट (matched_p_number) self.text_found = matched_p_number.group () डीईएफ़ मुख्य (): file_input = खुला ( "nota_simple.txt", मोड = 'आर', एन्कोडिंग = 'utf-8') property_report = file_input.read () PROPERTY_NUMBER = PropertyNumber (propert...

lldb not stoping on my breakpoint -

I have created a clag program from sources of complete debugging information (the default build type for clang IIUC), I check The debug info module has compilation units, keeping it in viewable in view: $ lldb / opt / bin / clang ++ (lldb) script lldb.target.module [/ Opt / bin / clang ++ '] GetNumCompileUnits () 1341 I used a file in the clag source tree, with lib / Sema / SemaExpr.cpp with Sema :: DiagnoseAssignmentResult There is a printf statement in the method (which is in my copy at line 10853) I know that this method is called on my test file test.cc , but I Debugger can not be found to stop the breakpoint! I tried to set breakpoints in two ways, $ lldb / opt / bin / clang ++ (lldb) breakpoint set-m diagnostic assurance breakpoint 2: Where = clang ++ `clang :: Sema :: DiagnoseAssignmentResult (Clang :: Sema :: AssignConvertType, clang :: SourceLocation, clang :: QualType, clang :: QualType, clang :: Expr *, clang :: sema :: assignmentAction, bool *) + 87 Sem...

javascript - Json associative array accessing in jQuery -

I am getting feedback in the format below for every product and there are several products in the same call. I'm trying to access via jQuery, but I'm not able to access it. product data ['someid'] = {"product Jason data"} I'm using jQuery in the syntax below but the data can not be found Please suggest please. Warning (product data ['something']]; It is not going to look like a JSON format. JSON is a key: value pair format; Then your product data should be in the format below: ProductData = {'someid': "Product Jason Data"}

android - how to add image view and text view to a linear layout -

Follow my XML I want to see the image and add text to programmically delivered XML. But I need output like programm, that is, a linear layout has image view and old text view and that the linear layout below add to the new text view. & lt; ? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" Android: Layout_width = "Fill_parent" Android: Layout_height = "Fill_parent" android: orientation = "vertical" android: padding = "25dip" & Gt; & Lt; TextView android: id = "@ + name" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: Layout_marginBottom = "L2dip" android: text = "@ string / app_name" Android: textSize = "24.5sp" / & Gt; & Lt; LinearLayout Android: layout_width = "wrap_content" android: layout...

Paypal PHP IPN Integration System -

The site is here www.web-preventivi.it, and I want to integrate PayPal for payment when the user Need to subscribe to my website At this address, I have an IPN listener, and when the exact URL is received from PayPal, the script returns only the WALID, otherwise it returns INVALID. I am using the IPN simulator to see if my code is working, and my code seems to not get the whole URL from the paypal, in fact I think that Attempted to get a code like this in my log file generated from my script: www.paypal.com/cgi-bin/webscr/cmd=_notify? -validate var1 = value1 & amp; Var2 2 = value & amp; Etc., but I only get in this log: www.paypal.com/cgi-bin/webscr/cmd=_notify-validate, why I have a foreach loop that controls the post field, and Specifies each variable on the urlchecker, but I do not? Is this my fault? Do I have to do something with PayPal, or just integrate some code? PS: My problem only is that my script does not receive payment variables from PayPal, tested diff...

android - 12 Buttons programmatically - How to handle each click -

I have created a custom linear layout view that generates 12 buttons, I would like to be able to handle each of those click events Here's my Qusum linear layout class: Public class Solution buttons liner layout (Private static id AMOUNT_BUTTONS = 6; Private static SIZE_BUTTONS = 130; Private static id PADDING = 13; Private Arrestist & lt; & Gt; Button; @TargetApi (Build.VERSION_CODES.HONEYCOMB) Public Solutions Buttons (Reference, attrs, defStyleAttr); in this ();} public solution buttons (reference references, attributeSet attrs) {super (references, attrs); in this ();} public Solution Button (Reference Reference); In this ();} Public Arrestist & lt; Button & gt; GetButtons () {Return Button;} Public Zero Init () {Button = New ArrayList & lt; Button & Gt; (); setOrientation (for vertical); (int i = 0; i & lt; 2; i ++) {liner layout lille = new linerlight (getContext ()); Ll.setOrientation (horizontal); For (int j = 0; j and lt; amOUNT_BUTTONS; J ...

Open a disconnected ADO Recordset in C++ -

I am trying to clone an ADO Reconcert Clone with a database query in the disconnected Recordset. The CIT code is based on the functioning function which I use in classic ASP and cloning work. Unless I try to open a new recordcase, I get an error message that does not allow connection to be used. ("Die Verbindunga Cannes Knit Works Varden, Um Deseen Wergeng Oszufueran. SIT antidar Grasloson Oder in Desamenman Hang Uniglitie.") Since it works in VBSPT, I have to reproduce the simple VBSP code code > R. Open without any arguments in c ++ What would be the correct syntax for opening this disconnected record, which was created without a connection in the database? _RecordsetPtr DataService :: CloneRecordset (_RecordsetPtr rs, bool withValues) {_RecordsetPtr newRs; HRESULT hr = newR Create (__Undoff (Recorcet)); If (FAILED (HR)) return nullptr; NewRs-> Cursor location = adUseClient; Try (for long periods of time; i rs- & gt; field-> calculation; ++ i) {Fiel...

java - Error trying to connect to MySQL Database in AWS RDS through tomcat server -

I want to create a web application using HTML, JSP and Java. I am working on Eclipse Kepler IDE and on my PC, Tomcat 7.0.34 is installed. My project is the type of "dynamic web project" and in my build path I have already set mysql-connector-java-5.1.31-bin.jar My database is on AWS RDS in MySQL When I was running my application as a simple "Java application" then I was able to easily access the database But when I tried to run it on the Tomcat server, I got the following error Is: type exception report type message Switch to line occurred processing an exception JSP page / WelcomeCustomer.jsp 53 description The server encountered an internal error which prevented from fulfilling this request. Exception org.apache.jasper.JasperException: @SuppressWarnings ("Resource") 51: An exception line 53 occurred on the processing JSP page /WelcomeCustomer.jsp scanner SC = new scanner (System.in); 52: String Cust_address, Cust_email, Cust_contact; 53: Conn...

bash - awk- print a column in different rows -

I have this simplified table of numbers formed by 2 columns and several rows. Here is the point for each column, take the value and sort them into rows so that each row has 4 values. This file.txt: 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 And this is the result I want : 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 I do the following, I am creating a script for clarity. Wk. awk -f script.awk file.txt where script.awk is {I = 1; I & lt; = NF; I ++) printf "% s" (NR% 4 == 0? RS: FS), $ i;} but it does not wok I know that the following command is a Works for columns, but I do not know why they do not work for loops in each column. {printf "% s" (NR% 4 == 0? RS: FS), $ 1;} If possible, then I I'm new to this language because I want an explanation of sommands being used. Thanks! I will post a common solution: awk '{s} For (i = 1; i & lt; = nf; i ++) a [i, nr] = $ i; } For end {} (i = 1; i & lt; = nf; i ++) {for (j = 1; j ...