Posts

Showing posts from April, 2013

javascript - Script works fine in any WebKit based browser but doesn't in Firefox -

I have a script (using WordPress) header.php which looks like this: window.addEventListener ( "DOMContentLoaded", function (event) {fixedMenu.init ( "Title-container", 0); fixedMenu.init ( "event type-cover", 20); window.addEventListener ( ' Fixed menu.txt ("Event-Type-Cover");}); var session = "& lt ;? php $ _SESSION [' Lang ']? & Gt; ";}); After this script I include a long script with the script scr = "" tag. window.addEventListener ("DOMContentLoaded", function (event) {Today = document.getElementById ("Today-Events");; = Document.getElementById ("Upcoming events"); past = document.getElementById ("past-events"); Texter = document.getElementById ("Event-Type"); Changesme ();}); This works fine in any webkit browser, the code is launched, but Firefox does not load other event listeners (I do not know how it loads or not, But if I need i...

using __gte in django queryset -

I have a search where this is doing. Template & lt; Input class = "category-slider-3" type = "text" name = "year" & gt; see yrs = request.POST.get ('year') user = user.object.filter (years_of_exp__gte = yrs) This returns years_of_exp to all users regardless of the queryset numbers, if I put 100 or 40 or 44 or 78 in the search box, I get all the users Even if they have DB in years_of_exp 2. Why is this happening? Maybe something is wrong doing You are retrieving yrs as a string and the integer is the comparison of the value , Which will result in comparisons like this: '2' & gt; = 100 Unfortunately (for you) is true in dragon 2. X You must enter yrs for an integer: yrs = int (request.post.get ('years'))

php - Does Laravel's Validation class Sanitize? -

I was unable to find any information in the document or not whether the validation class has cleaned the data or not. Everyone uses verification classes for obvious reasons, but I do not see any hygiene. For example, take a form with 2 input fields, names and details. In this case, only the name is required to handle form submissions: Verifier :: create (Input :: All (), array ('name' = & gt; 'required | Minimum: 2 ')); Assume that according to most tutorials (and documentation), there are no errors with verification, I will use the bus; SomeModel :: create (array ('name' => Input :: get ('name'), 'description' => Input :: get ('description') ); Will this class clear the data? Or can I expect that the exact data entered in the data form will be the same? At least 2 characters are not required Any direction is appreciated. As far as I know Laravel has not sanitized add it to composer.json "frozenn...

java - Call a method when fragment is visible to user -

I need to execute a method when the fragment is visible (for the user). Example: I button 2 (button 1 and button 2), 2 pieces (piece 1 and piece 2) and method loadImages () within square pieces 2. When I want to change "2 button" to piece 2 with Piece 2 and then user after the slice 2 (to call) loadImages () . I the ribs in the fragment square () but this method calls the method before the fragment appears and it does some delay in infection. I tried setUserVisibleHint () also did not work. A good example is the Instagram app when you click on the profile, it first loads the profile activity and then imposes all the images I hope someone I can greatly appreciate your help Thank you. I'm a little confused about what I'm trying to do with you. It looks like the images are loading too fast for you ... Does this mean that your pictures are ready to be displayed? And this is a bad thing? My guess (and this is just an estimate) is that Instagra...

javascript - Why must ".text(x)" and not ".text = x" be used in jQuery? -

इस तरह से असाइन करें $ ('# myelement')। Text = 'कुछ पाठ '; नेत्रहीन कोई प्रभाव नहीं है क्या उपरोक्त jQuery द्वारा अनदेखा किया गया है? इसके बजाय, यह होना चाहिए $ ('# myelement')। पाठ ('कुछ पाठ'); क्लाउडियो के संदेश में मेरी टिप्पणी का विस्तार करते हुए, आप वास्तव में परीक्षण की जगह ले रहे हैं। () संग्रह के भीतर समारोह। अगली बार जब आप $ ('# myelement') को कॉल करते हैं, तो एक नया संग्रह बनाया जाता है, शायद आप कभी इसे नोटिस नहीं करेंगे, लेकिन अगर आप संग्रह को संग्रहीत करते हैं, तो आपको समस्या दिखाई देगी: & lt; span id = "myelement" & gt; सामान & lt; / span & gt; Var mye = $ ('# myelement'); Mye.text = 'बकवास'; mye.text ( "बकवास"); उस कोड को देखते हुए, पाठ का पाठ बदला नहीं जाएगा। मध्य रेखा को बाहर कीजिए और यह हो जाएगा।

Matlab - Text file names from Cell array -

I have created a cell array that passes through 50 text files which I need to analyze. However, Example: Example: Nickel = {'file1.txt' 'file2.txt'}; Vec = textread (nickel {1}, '% n', 'headerline', 23); If I input the actual file name ('file1.txt') into the treaded function, then I get the vector that I want, but it does not reference the cell can. Thank you!

filepicker.io drag and drop with images over 2 meg -

Whenever I use filepicker.io, I get the following error with the images that use the drag and drop method Doing more than 2 meg. / P> Unfair reference references: DIALOG_URL is not defined Thus html is. & lt; Div class = 'draganddropimage uploadhelp' id = "exampleDropPane" & gt; & Lt; / Div & gt; and javascript is filepicker.setKey ('xxxxx'); Var option = {"multiple": true}; Filepicker.makeDropPane ($ ('# exampleDropPane') [0], {multiple: true, mimap: 'image / *', maximum: "10485760", dragent: function () {// $ ("# pb"). AddClass ('show'); $ ("drop to upload");}, drag: works () {// $ ("# pb"). AddClass ('show') ; $ ("# Files" dropdown). Html ("leave file here");}, progress: work (percentage) {$ ("# exampleDropPane"). Text ("uploading (" + + "+"% ") ; // Alert (percent); // $ ("# pb...

android - Ship an application with a database -

If your application requires a database and it comes with data created, then the most What's the best way? What should I do: Improve the SQLite database and include it in .apk Include it with SQL commands, and does it make the database and insert data on the first use? I see that there are drawbacks: Probably too long time It may seem to create and generate databases on the device. Any suggestions? Documents regarding any issue will be highly appreciated. I have found a way to do this by resigning the blog into an article titled Basically You prefer your database, put it in your property directory in your APK and on the first used copy in the "/ data / data / YOUR_PACKAGE / database /" directory.

java - DBUtils cannot convert string to date -

I am using apache dbutils in it is an object with a java.util.Date attribute I when I use the following code If I execute, it fails for SQL select the name, start with myTable try {QueryRunner run; Run = new queryman (); ResultSetHandler H = new BeanListHandler (clazz); ArrayList & LT; T & gt; result ; Result = (Arrielist) run.query (Connection, SQL, H); Return result; } Grip (before eclipsection) {LoggerGetLogger (AbribbetaDataMar.clash.GetNanam ()). Logs (level. SESEE, ANNEL, X); Throw New App Abuse ("SQL Fetch Fail:" + Esquilla, East); }} I saw the code and found that the beanprocessor is going through all the properties with the exception of the process column date. For the date, this is saying rs.getObject (index). This gives ACC my debugger string and causes the set to fail. any idea? Change the driver? I am using 1.25 jtds. What should be the date for getObject method? I tried to change the jtds driver version, it was not working. Once I ha...

sorting - Java - Comparing unrelated objects with a custom order -

I want to sort a list containing objects that are unrelated by providing a custom order. For example, the list that I want to sort in, which includes classes animals. I type an object in a animal object that can be a cat, mouse or dog. I have a custom order mouse & lt; Cat & lt; dog. How can I find that the list of animals is sorted by my custom order? In particular, the following codes are given, I do not know how to implement a comparator, apart from this it is a simplified example, I can not modify the dog, cat, mouse nor the animals in classes. // Cat and mouse similar public square dog {...} public class animal {object type; Public animal (object aType) {type = aType; } // matching, setter etc.} comparing public class {list & gt; Animals & gt; Animals; Public comparison (dog) = dog (new dog); Animal animal 1 = new animal (dog); Animals.add (animal1); Cat cat1 = new cat (); Animal animal 2 = new animal (cat); Animals.add (animal2); // Type dog, cat or other ...

c# - Using dropzone need to add additional values -

I'm using the DopZone to upload files and images in DB which works right, I have dropzone div Builds and dropzone jquery function A webmath has been received in C # and the file is being uploaded in the database. Now I need to send several IDs, but I would like to avoid implementing AJAX calls to send these IDs. After reading the documentation on Dropzonejs I could not find a simple solution to do this. My webmap does not accept parameters for now, but when I have a good way of implementing it on the client, I can add it to the webmoot. Did I miss something or am I able to do this only with Ajax? I'm not sure if I understood your question correctly, before every file was sent FormData is available. Sending from Dropzone.js: Each file was called before it was sent. Excerpt and FormData objects are found in the form of second and third parameters, so you can modify them (for example to add CSRF token) or add additional data. Sample usage: send: function (fil...

javascript - Passing values between functions and jquery -

I'm assuming the difficulty jib in jQuery, so most of jQuery is done in an external script as, and I am not sure that when I am in functions and not in functions, it is difficult to say that when global wars are set and not set. This one especially bothers me, and I'm completely stumped, logically I should work on it, but at some point it seems something capping, and I think those values I'm ignoring the ones I am trying to store. I have concluded this, because the error I am getting is inside the second getJSON call, I'm getting 'val' undefined problem, but javascript console is not showing any javascript errors , Just when I log on to the console and print the object in a warning. Just need a new eyes, it seems that this is probably something simple, but I see the code for so long that I do not know this. > Any help is greatly appreciated. var post_ids = new array (); Var i = 0; Var Val; $ .getJSON ("/ client-ajax / last-ten posts.php...

winforms - Not sure if I'm using "using" correctly c# in tftp app -

I am trying to use the pre-manufactured C # tftp server app with my Windows C # form. In the author server example, which works great, it uses the console app. When I try my console instance with my form in the app then it does not work (no error, just not connected) and I believe my problem is in the "use" statement: By using (Var Server = New TftpServer ()) {server.OnReadRequest + = New TftpServerEventHandler (server_OnReadRequest); Server.OnWriteRequest + = New TftpServerEventHandler (server_OnWriteRequest); Server.Start (); Console.Read (); } Not sure I understand correctly but I believe that console is Read () If this is the case, how do I apply equivalent to any form app? I just can not find my head around "use" Sorry, I'm new to C #. The Windows Forms will always be open until they are explicitly closed. They always keep a thread to read the message queue for user input, so they will not exit the same way from an unnatural console applicatio...

c++ - how to display a Mat in Opencv -

Image
For a matched archive of images, it is easy to use imshow . But if the data type of mat is CV_32FC1, how can I show this mat? I have tried, but the display shape is completely white and when I zoom zoom, it is still completely empty, and I can not see the float number in the mat. Is there anyone who knows to show the matrix completely? PS: Thank you for answering. I'll post some code and statistics to show more details: Code: mat mat1; Mat1 = Mat :: ones (3,4, CV_32FC1); Matte 1 = matte 1 * 200; Imshow ("test", matte 1); WaitKey (0); Mat dst; General (matte 1, dst, 0, 1, nommmmmmmx); Imshow ("test1", dst); WaitKey (0); Mat1.convertTo (DST, CV_8UC1); Imshow ("test2", dst); WaitKey (0); Return 0; Output: After zooming in to 150%: Then after zooming up to 150%, we can see that 'test' is completely white and we can not see its element values. 'Test1' is completely black and we still can not see its element values....

storyboard - How to Assign a class to a custom UIView in Swift? -

I am trying to create a custom framework so that I can use the @IB design to present my view in the storyboard Can I Generally you can click on the view of the storyboard and select a class from the drop-down in the inspector since I will have to assign my custom framework by hanging, now I can create a custom subview within my framework And to have my class allocated is also that (which is a square from the graphical cycle counter downloaded from cocoapods JWGCircleCounter ..) How do I do this in Swift XCode 6 Yak There is no code here for my custom framework: Import UIKit @IBDesignable square CircleTimer: UIView {Override Work Layouts SubViews () {SuperLatesBuivius () var Outer Circle = Uviqualor ( JWGCrackQuent) (frame CGRactam: 22, 137, 125, 125) // How can I decide how to assign a square, I'm not even sure about reducing the frame after specifying the T work. / Code> You have code> JWGCircleCounter as JWGCircleCounter UIView . As should be made of inti...

html - Bootstrap 3 Table inside a panel overflowing -

Image
& lt; div वर्ग = "col-xs-6 col-sm-4" & gt; & Lt; div वर्ग = "पैनल पैनल-प्राथमिक" & gt; & Lt; div वर्ग = "पैनल-शीर्षक" & gt; हाल ही में फ़िल्टर किए गए & lt; / div & gt; & Lt; तालिका वर्ग = "तालिका तालिका-धारीदार" & gt; & LT; टीआर & gt; & lt; टीडी & gt; सेंसर आईडी & lt; / टीडी & gt; & lt; टीडी & gt; तापमान & lt; / टीडी & gt; & lt; टीडी & gt; वोल्टेज & lt; / टीडी & gt; & lt; टीडी & gt; दिनांक & lt; / टीडी & gt; & LT; टीआर & gt; & lt; टीडी & gt; सेंसर आईडी & lt; / टीडी & gt; & lt; टीडी & gt; तापमान & lt; / टीडी & gt; & lt; टीडी & gt; वोल्टेज & lt; / टीडी & gt; & lt; टीडी & gt; दिनांक & lt; / टीडी & gt; & LT; टीआर & gt; & lt; टीडी & gt; सेंसर आईडी & lt; / टीडी & gt; & lt; टीडी & gt; तापमान & lt; / टीडी & gt; & lt; टीडी ...

How do I expose a TaskExecutor over JMX in Spring Boot? -

Text after " A similar question was asked and responded to spring forums when using XML configuration: I want to avoid using XML I am using Spring Boot 1.1.4, and it includes Spring-Boot-Actuator. My application class looks like this: @Configuration @EnableAutoConfiguration @ComponentScan @EnableConfigurationProperties public class Application {// ... // This method preserved MBeanExporter mbeanExporter (@Bean) called {MBeanExporter Has never been exporter = new MBNXPorter (); Click the & lt; String, Object & gt; Bean = new hashmap & lt; & Gt; (); Beans.put ("org.springframework.boot: type = executor, name = taskExecutor", taskExecutor ()); Exporter.setBeans (beans); Return exporter; } @Bean AsyncTaskExecutor taskExecutor () {ThreadPoolTaskExecutor Examiner = New ThreadPoolTaskExecutor () remains secure; Executor.setCorePoolSize (5); Executor.setMaxPoolSize (200); Return executor; }} Perhaps another bean "mbeanExporter" said you...

Python Blackjack game - referenced before assignment -

So, my personal challenge to make a simple Blackjack game Dragon this way I went about it : singlePlayerCard = random.choice (availableCards) singlePlayerCard2 = random.choice (availableCards) if (singlePlayerCard == [1,2,3, 4,5,6,7,8,9 , 10]): singlePlayerCardValue = singlePlayerCard if (singlePlayerCard2 == [1,2,3,4,5,6,7,8,9,10]): singlePlayerCard2Value = singlePlayerCard2 singlePlayerCardValueTotal = singlePlayerCardValue + singlePlayerCard2Value print when it comes to print singlePlayerCardValueTotal this tells me either (% singlePlayerCardValueTotal "your Ard Total% I values ​​") that singlePlayerCalValue or singlePlayerCard2Value has been referenced before assignment. This is a bit confusing as I have taken this issue with another simple program in the past, but the structure is different here. In addition to the above issue, it was working fine. If you have the time, please provide me a better solution for some areas if necessary. As always, thanks i...

c - Cannot get switch() to repeat itself after -

is called as the title. I have tried to do everything and I can not get it to work & lt; Iostream & gt; I do not have the ability to set it as required (my codeboxes are telling me its mistake) I have tried things with var, cin, COAT, boolean And I can not get this F ******* to repeat myself. I have been crawling through countless forums while reading the instructions and I can not do anything. Can you edit it in such a way that if a user omits anything then the user is presented again with the menu and the option to enter the number will be really appreciated. Can not do it yourself #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; Int main () // main work {printf ("airport reservation system \ n"); ("Menu" ; Switching (menu_number) // Making Navigation Menu {Case 1: printf ("flight"); breakdown; Case 2: printf ("passenger"); breakage; case 3: printf ("reservation"); breakdown; defaults; ;}...

asp.net - sql query or command tool to append mdf file to windows azure SQL DB -

I am trying to migrate my Azp.net MVC app to Windows Azure, but on my code I have a The module that does import data from the ".mdf" file hosted on the server of my SQL-server db using SQL-server " sp_attach_db " and " sp_dettach_db " commands And this refers to the table with {databasename}. {Owner}. {Table} , now it is not possible to do this with Azer, but I can not understand any idea, an alternative solution? Thank you Added: Conclusion It seems that "on the fly" from a DB to SQL blue and other databases It is not possible to share data with

multithreading - retrieve data from a thread in python -

I have a python that receives the OSS packet ... I have to get data from the OSC in my main function. How can the thread get data from a thread? Here's the code to demonstrate my problem: Try the YIH class, but so far "data is not set import osc import threading import atexit # ------ OSC server ------------------------------------- # get_address = '127.0 .0.1 ', 7402 # OSSC servers are three different types of servers. S = OSC.ThreadingOSCServer (receive_address) # This receives a' default 'handler (for mismatched messages) s.addDefaultHandlers () class: def print_handler (ADR, tags, data, source ): If addr == '/ data': self.data = data.pop (0) s.addMsgHandler ("/ data", print_handler) returns data def main (manually): # OSCServer #Main start function ... I want to get 'data' from the OSS thread, print here, "OSCsRark start" st = threading.Thread (target = s.serve_forever) st.start () reception = received () recepti...

java - org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup -

I'm doing it in Java XML parser, then I get an error when parsing an XML file ... [fatal error] jira.xml: 1 9 2: 64: went well-formed content elements appear to be data or markup. Org.xml.sax.SAXParseException: The contents of the elements should contain well-formed character data or markup. Com.sun.org.apache.xerces.internal.parsers at On Com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse (Unknown Source) at javax.xml.parsers (Unknown Source) Com.icomteq.ReadXMLFile.main (ReadXMLFile.java20) DocumentBuilder.parse (unknown Source) Any sign can be what can be the problem? Thank you used code here -> This is my Jira.aksm -> & lt ;? XML version = "1.0"? & Gt; & Lt; DATA_RECORD & gt; & Lt; Description & gt; & Amp; Lt; & Lt; Inside & amp; Amp; Description Tag & amp; Amp; Lt; & Lt; & Lt; / Description & gt; & Lt; / DATA_RECORD & gt; Temporary Solutions -> I have found t...

Fixing performance issues when looping through MySQL results in PHP -

I am working on a virtual game board style game in which the players get points on a fixed area of ​​the board. (Make it easy for me, because I'm doing it only as a hobby, so I can do it in the worst possible way) I have 3 tables, information about all the players (examples Id, screen name). All points of each other area (such as ID, X, Y) and one-third store each player (eg ID, player, regional, points) are the number of points of each player. To make a "leaderboard", I'm piping through all the players, then in that loop I am looping all the areas, then in the second loop in the end, I get the leaders of that area and see Whether the current player in the first loop matches, if so, then I raise a counter, then store it in an array. (See the code below with some commenting) I looked in MySQL caching, but I do not have access to many server options, as well as would like to keep as much live results as possible, so caching is on the right track Can not go My ...

android - can anyone give a good definition of what a sub activity is? -

I have seen the definitions for sub activity but I got the definition for the activity. Can anyone give a quick working definition of what a sub activity is? When you use startActivityForResult activity to B, then activity B is generally known as the "sub-activity" of the code> activity A. All this is for this. It is not yet the official Google vocabulary. For example, or.

mysql - Geodjango and Innodb, mixed innodb and myisam models -

I'm hearing that INODB is better for data integrity, unfortunately MySQL 5.6 as it has not yet spotted the Spotlight Index Not to give support. A fast special index is very important for my app, though what is good about my model, it is a very stable result (write once, read many) of the table (id, digits), so I could use myasam I do not care and I do not care too much. I just want to restrict the use of MySam on that table, and MySQL complains when InnoDB support is ready for psychotherapist to migrate to: Error 1217 (23000): The problem is, if I migrate my model to the table to migrate (by being an app / sql / app_model.sql) then an option tab. A basic line can not be removed or updated: A foreign key constraint is unsuccessful It is understandable, my other models look at this one and Django automatically updates those models Between the foreign key creates obstacles and this one is What is the best strategy here? Should I abandon InDebbi and return everything to M...

android - Displaying continuous chats from a user in a same bubble -

Image
I am working on the chat app .. I have done so far. Now what I want is: > Please I'm stuck and know how to work on this UI .. ie If a user views the view chat again, then if the user continues the message from a user, then show them in the same image in the second image. This chat thing is that all local, no service or The server is not used. I am giving my code. MessageActivity.java The expansion of public class MessageActivity list is called {/ ** when the activity was created first Override public zeros at * Arreelist & lt; Message & Messages; AwesomeAdapter Adapter; Edit Text; @Create (Bundle Saved InstanceStat) {Super.New (Saved Instantstate); setContentView (R.layout.main ); Text = (editing text) this.findViewById (R.id.text); this.setTitle ("Harish"); Names = New Arrestist & lt; Message & gt; (); Adapter = new AwesomeAdapter (this, message); SetListAdapter (adapter); } Public Zero Send Message (View V) {String Newmessage = Text .get...

c# - How to implement a dbContext in multiple classes -

code I'm not sure that DbContext a way " " 2 DbContext objects are the classes I have a general Siarudi functions, and each insert / edit, I while connected using those changes - Log_History unit I instead of repeating the same code in multiple classes, I became a public static method for adding a new Log_History unit E. My initial thought was that it might not be a good idea. Will there be a concurrency issue using the 2 DbContext object? I'm not sure if I understood correctly, but the question was answered that many references are fine. In my DbContext as an argument of CreateOrder () , AddHistoryNote () ; Can that be an acceptable approach? public class Log {public static void AddHistoryNote (Guid UserId, string type, string extension) (rsContext repo = using {new rsContext (for)) {Log_History trans = new Log_History { UserId = UserId, Description = Type, Extension = Extension, HistoryDate = DateTime.Now}; Repo.log_History.Add (trans); Repo.S...

javascript - Web Speech API not working -

& lt;! DOCTYPE html & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; मेटा वर्णसेट = "यूटीएफ -8" & gt; & Lt; title & gt; परीक्षण & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; textarea id = "textarea" पंक्तियाँ = 10 cols = 80> gt; & lt; / textarea & gt; & Lt; बटन आईडी = "बटन" onclick = "टॉगल स्टार्टस्टॉप ()" & gt; & lt; / button & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; Var पहचानने; Var मान्यता = नया भाषण मान्यता (); मान्यता। रीसेट(); मान्यता। मान्यता। आनुवांशिक = समारोह (घटना) {for (var i = resultIndex; i & lt; event.results.length; ++ i) {if (event.results.final) {textarea.value + = event.results [i] [0] .transcript; }}} फ़ंक्शन रीसेट () {पहचानने = गलत; Button.innerHTML = "बोलने के लिए क्लिक करें"; } समारोह toggleStartStop () {यदि (पहचानने) {मान्यता.स्टॉप (); रीसेट(); } और {मान्यता।...

css3 rotate image preserving its left top position -

I have an image which can vary in width and height, I rotate the image that preserves initial top and left positions I want to be able to I am using the transform: rotate (270deg); The problem is that the image is moving on the left. I know that conversion can solve the basic CSS property problem, but how do the top left values ​​be calculated for this property? Maybe there is a formula for this? The example is showing that the image is moved to the left, from the initial left position. & lt; img src = "https://dl.dropboxusercontent.com/u/31490359/e001420737da443b0fb75abfaddc5f22.jpg" style = "transform: rotate (270deg); -webkit-transform: rotate (270 °); -mms-transform: Rotate (270 degrees); "& gt; this rotation - note : Image size has been modified due to improved visibility! html & lt; Img src = "https: // dl.dropboxusercontent.com/u/31490359/e001420737da443b0fb75abfaddc5f22.jpg"> css img {width: 40%; Height...

c# 4.0 - c# How delete txt file 1st line? -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब textbox4.Text पहले ही दिखाते हैं। मेरे कोड StreamReader objstream = new StreamReader (नया स्ट्रीम रीडर) "ई: \\ lastname.txt"); TextBox4.Text = objstream.ReadLine (); var पंक्तियाँ = फ़ाइल। पढ़ेंअली लाइन ("ई: \\ lastname टेक्स्ट"); फ़ाइल। विलय सभी लाइनें ("ई: \\ lastname.txt", लाइनें। स्किप (1) .ओएरे ());

java - Automatically Add Appropriate Exception Handling in Eclipse -

I have an interesting question that I have a large Android project in Eclipse when I run my application, some exceptions arise. Such as NullPointer, OutofMemory, Filenotfoot, and it crashes. I want to handle all the exceptions properly, but adding exception to each line one by one is a very difficult task for such a big project. Is there any way to do this quickly in Eclipse? Elypus is just and IDE IDE can not catch the error or exception of your project. This is what the developer has to take care of it. Now what you are seeing is catching up with a dissatisfied exception handler. Try I have my own code snippet. There are so many tools for payment / free are available, which you can integrate in our project and stop the hassle force . This will catch the degraded exception of any of your activities. You can modify it according to your requirement. Note: This does not mean that you do not want to write / grab in your code /

linux - Changing camera exposure on frame by frame basis -

Is it possible to change the exposure of a webcam based on frame-to-frame with proper synchronization? My operating system Ubuntu 14.04 Webcam's - Logitech HD Pro 920 I'm sure this is not possible with OpenCV. And of course it will also depend on the webcam being used What I need is a callback mechanism that notifies me when the exposure changes settings have an impact. Moreover, to be able to synchronize the exposure changes setting command on the correct frame boundaries (just need to be done by this user). I think that using V4L2 would be my best bet? Please guide me. You can use v4l2-ctl to terminal commands or OpenCV to do this. You can use it in OpenCV: VideoCapture.set (CV_CAP_PROP_EXPOSURE, value); You can use it in a Linux terminal: v4l2-ctl --set-ctrl = exposure_absolute = value --device = / dev / Video1 In both ways, you can see the current command like this

go - Golang: goroutine infinite-loop -

When a fmt.Print () row is deleted from the code given below, So the code runs infinitely. Why? package main import "fmt" import "time" import "sync / atom" func main () {var ops uint64 = 0 i: = 0; I & lt; 50; I ++ {go func () {foromic.AddUint64 (and ops, 1) fmt.print ()}} ()} time Sleep (second time) opsFinal: = atomic.LoadUint64 (and ops) fmt. Println ("ops:", opsFinal)} this: // Allow other goroutines to proceed Runtime.Gosched () fmt.print () plays a similar role, and it allows the main () to move forward. An export GOMAXPROCS = 2 can help end the program even in the case of an infinite loop, as explained in "". fmt.Print () clearly passes some control over syscall stuff Yes, , a gorgetin that was always looping, could starve other gourdins on the same thread, a serious problem when GOMAXPROCS only one user thread was provided In 1 1.2, it is partly addressed: the scheduler is sometime...

c# - binding difficulty in datagrid -

I am facing some difficulty in binding data in the grid. My data : & nbsp; & Nbsp; & Nbsp; Time & nbsp; & Nbsp; & Nbsp; & nbsp; & Nbsp; & Nbsp; & Nbsp; 1 & nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & nbsp; & Nbsp; & Nbsp; & Nbsp; 2 & nbsp; & Nbsp; & Nbsp; & Nbsp; & nbsp; & Nbsp; 00: 00 & nbsp; & Nbsp; & nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & nbsp; & Nbsp; 00.30 & nbsp; & Nbsp; & nbsp; & Nbsp; & Nbsp; & Nbsp ;; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & nbsp; & Nbsp; & Nbsp; & Nbsp ;, & nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & nbsp; & Nbsp; 01: 00 & nbsp; &...

php - how to write .htaccess for subdirectory files? -

This question may be duplicated. What is the original .htaccess file for a sub-directory website with a newbie php programmer? Ex: The index page of my website can be easily opened. But when I try to open www.example.com/subdirectory/post1.php, it will give me www.example.com/index Will show .php Thank you in advance. You can enter the .httaccess file in that subdirectory to close the redirect for that folder . In the file, you will need to enter the following line: the revivet engine off or you can rewrite that .htaccess file to leave that folder.

ios - How to fill a CGPathRef overlap like this? -

Image
I want to create a single path, which can overlap myself What do I want to have a picture on the bottom side Is: Do I have to Can I fill a single CGPathRef on iOS? I made two paths, one gray and red one below: There are two overlaps on the gray line, one for the same and red line. Red overlap, you can see it clearly, gray (above or below) is one but gray overlap has just been merged. Moves trace line is a single line, probably not implemented by a single path or by a stroke. Here's my code: [[UIColor colorWithWhite: 0.0 alpha: 0.3] setStroke]; CGFloat Lineview = 10.0; UIBezierPath * Path = [UIBezierPath bezierPath]; Path.lineWidth = lineWidth; [Path-driven point: CGPXMake (300, 50)]; [PathAdlineTotpoint: CGPointMake (20, 400)]; [Path adline tape point: CG pointmake (300, 400)]; [Path Adeline Totpoint: CG PointMake (20, 50)]; [Path stroke]; [[UIColor color vithrid: 1.0 green: 0.5 blue: 0.5 alpha: 0.5] setstroke]; UIBezierPath * anotherPath = [UIBezierPath bezi...

java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:8081 connect,resolve) - main reasons -

What are the main reasons for reporting an exception? The same trusted signature applet works on some PCs and does not work on the other. Exception happens when I URLConnection I try to get an attachment stream where it does not work, I grants {permission permissions} .security.AllPermission; }; java.policy but I would like to avoid updating every PC. An port (8081) issue? What should I check? You must add "all-permissions" in the manifest.mf example "sandbox" and Sign your jar file with the code signing certificate.

javascript - AngularJS directive with template having ng-repeat and ng-bind-html -

मैंने ng-repeat वाले टेम्पलेट के साथ एक डायरेक्टिव बनाया है और ng-bind-html जैसा नीचे दिया गया है app.directive ('customField', फ़ंक्शन ($ संकलन) {var getTemplate = function (customType) {return '& lt; Span ng-repeat = "custom.options में विकल्प" ng-bind-html = "option" & gt; & lt; / span & gt; '}} var linker = समारोह (क्षेत्र, तत्व, attrs) {element.html (getTemplate (scope) .custom.Ttype)। शो (); $ संकलन (element.contents ()) (गुंजाइश);} वापसी {प्रतिबंधित: "ई", rep1ace: true, link: linker, scope: {custom: '='} };}); लेकिन यह त्रुटि देता है: त्रुटि: [$ sce: असुरक्षित] किसी सुरक्षित संदर्भ में असुरक्षित मान का उपयोग करने का प्रयास करना । इसमें सामान्य परिदृश्य मैं इस प्रकार के मुद्दे को हल करने के लिए $ sce.trustAsHtml (html_code); का उपयोग करता हूं, लेकिन एनजी-दोहराने के साथ निर्देश में यह कैसे हल करें?

encryption - Can't check signature: public key not found -

I try to decrypt the file using the following command: gpg The --output file.txt file has been successfully decrypted but I get an error: "gpg: signature can not be checked: public key not found" Any idea, why did I get this error? You receive that error because you do not have the public key of the person who signed the message Done GPG should give you a message in which the ID of the key was used to sign it. Obtain the public key from the person who encrypted the file or imported it from the public key server and in your keyring; You should then be able to verify the signature.

css - media query in bootstrap -

I want to set the image width to 350px if the desktop size exceeds 1200px bootstrap . I can do this, if the desktop size is greater than 992px but I can not do this when it & lt; 1200px. I tried to do something like that, but it is not working for me @ Media (max-width: (screen-LG-1) and (Max-width: (@ screen-LG))) {& gt; IMG {width: 350px; }} Note: When the size of the screen is greater than 992 then I have to set this image to my image. (This includes approximately 1200 px) Can anyone help me in this? Thanks Yes I tried and got it to work. . This code is: @ media (minimum-width: (@ screen-md)) {& gt; IMG {width: 400px; }}

firebird2.5 - Firebird.Select columns from table.Some column may not exists -

मेरे पास एक समान क्वेरी है: एक, बी, सी, डी, ई, (Differenttable से somevalue चुनें, जहां report.a = two.a) दो के रूप में, (अन्य रिपोर्ट से somevalue चुनें, जहां report.a = three.a) तीन के रूप में, ("चयन करें" (कोल * CAST (BIGINT मूल्य के रूप में)) से "अन्यरेपोर्ट "रिपोर्ट (" 01.01.2010 ', '01 .10.2010') से राशि के रूप में "('01 .01.2010 ', '01 .10.2010') यह प्रश्न अपने मूल में काम करता है प्रपत्र, लेकिन समस्या यह है कि कुछ डेटाबेस (पुराने संस्करण) में जो कि मैं 'रिपोर्ट' संग्रहीत कार्यविधि के परिणाम में कुछ, ए, बी, सी, डी, ई के बारे में पूछता हूं और मुझे एक त्रुटि मिलती है.क्या इसे संभालने का सबसे अच्छा तरीका क्या होगा? मैं रिपोर्टों से चयन * के बारे में सोच रहा था, लेकिन मैं उपश्रेणी नहीं जोड़ सकता। हो सकता है कि मुझे ऐसा करने के लिए सही सिंटैक्सिस नहीं मिल सका। अन्य तरीकों से यह पता लगाना होगा कि स्तंभ पहले मौजूद हैं या नहीं चयन करें ... कई चीजें हैं जो आप कर सकते हैं: एक उपनाम SELECT * का उपयोग करे...

php - Can't connect to MySQL server on 'IP' (4) -

The connection has already been done, but sometimes I cron job script MySQL server can not connect to 'MaHost' (4) My script was running for 3 months. I received the above response from yesterday. My script is working properly Sometimes the connection is successful, but sometimes it fails with the above response Please tell the correct reason with the solution. It may be time expired on connection. Try expanding it with: Also, try this code to check the connection time and if the time is ending. For {$ start = time (); ($ I = 0; $ i & lt; 100; $ i ++); // mysql connection // check connection and output success / error message $ end = time (); The resonance is "Time ended for connection $ i" ($ start $ end). "Seconds."; }

matlab - What is the meaning of the addition at the end of this array declaration? -

I have been assigned the task of implementing an algorithm that was supplied as Matlab in our C ++ ( Which is none of us) app The declared array is: encrypted = [18 10 20 13 6 25 21 13 17; 2 26 4 29 22 9 5 29 1; 19 11 21 12 7 24 20 12 16; % ... many rows of this kind ... 13 21 11 18 25 6 10 18 14] +1; What is the meaning of +1 at the end of the array announcement? just add 1 to each entry: & gt; & Gt; [1 2 3; 4 5 6] ans = 1 2 3 4 5 6 & gt; & Gt; [1 2 3; 4 5 6] + 1 ans = 2 3 4 5 6 7 If you have MATLAB, you can understand that just by trying, if you do not, then I hope That you have this code very clear what the code is doing and write a good test suite, because you will not be able to compare the output of your new code to MATLAB one.

c++ - compile error with parallel package -

itemprop = "text"> The environment is Ubuntu 12, I tried to compile a pnnet-read-only package, as shown in this link: mkdir build cd build cmake .. I have this problem: - Boost version: 1.53.0 - Found the following Boost libraries: - Thread - Serialization - Adding files to create a library - Adding files to create a library CMake error: The following variables are used in this project But they are set to tell the note, please set them or make sure they set the right set in the seamkey files and check the following: Boost_SERIALIZATION_LIBRARY (Advanced) Target / pub / Link / Home / Bone / Pnet-read-only by "target" in "pann-shit" directory / pn-read / only / src / pannnet-read-only / src / pann-shit Boost_THREAD_LIBRARY (advanced) linked by link to pann Linked to "pann" in / src / pann Has been done in the "shit" directory / home / bon / pnnet-read-only / src / pann-shit update: I have libboost1.54-dev After setti...

android - genymotion inside virtual system without opengl, is it possible? -

पोस्ट देखें वर्चुअल पीसी जानकारी: विंडोज 64 बिट के साथ हाइपर-वी वर्चुअल रिमोट डेस्कटॉप पीसी, 7 जीपी रैम, 8 कोर और एक वीडियो कार्ड जो ओपनजीएल का समर्थन नहीं करता है। वर्चुअल पीसी के अंदर ईक्लिप्स के लिए जेनोमॉशन और न ही ब्लूस्टैक्स और न ही जेनोमोशन प्लगइन काम करता है, और एंड्रॉइड स्टूडियो वर्चुअल फोन अगर मैं सेट करता है यह एंड्रॉइड एल पूर्वावलोकन करने के लिए है, लेकिन यह आंदोलन धीमा कर रहा है और कोई बटन नहीं दिखाता है, जिससे नेविगेट करना असंभव हो जाता है। किसी भी स्मार्टफ़ोन प्रकार को करना होगा, मैं बस फोन-जैसी वातावरण में विशिष्ट अनुप्रयोगों का परीक्षण करने में सक्षम होना चाहता हूं। मैंने 32 और 64 बिट दोनों में कस्टम मैसा पुस्तकालयों को संकलित करने की कोशिश की, किसी भी वीडियो कार्ड सेटिंग्स या वर्चुअल पीसी पर कोई ड्रायवर अपडेट करें। प्रश्न 1: यदि आपके पास आभासी वीडियो कार्ड है जो ओपन जीएल का समर्थन नहीं करता है, तो मुझे वर्चुअल ओएस? प्रश्न 2: लोग कौन से विकल्प जानते हैं कि एंड्रॉइड स्टूडियो फोन एमुलेटर के अलावा ओपनजीएल समर्थन की आवश्यकता नहीं होगी? मुझे डर है कि मैं ...

rest - Get last absolute end time for time series in KairosDB -

I'm looking for a way to get the last absolute term for a time series stored in KairosDB. Is there a way to get it with the REST API? Many thanks, Greg I just found a solution here: To get the last complete end time, you can ask for data from 1 January 1970 and add "border": 1 and "order": "desc" in your query. Cheers, Greg

email - What was the reason that my header section for php mail function was not working -

मेरा पिछला शीर्ष लेख अनुभाग था। $ headers = 'MIME-Version: 1.0' । '\ R \ n'; $ हेडर। = 'सामग्री-प्रकार: टेक्स्ट / html; वर्णसेट = आईएसओ -885 9 -1 ' '\ R \ n'; $ हेडर। = 'To: & lt; abc@gmail.com>' । '\ R \ n'; $ हेडर। = 'से: xyz & lt; info@gmail.com>' । '\ R \ n' 'वापसी पथ: info@gmail.com \ n'। 'उत्तर दें: info@gmail.com \ n'; और मैं इसके साथ उपरोक्त स्थान बदलता हूं: जो मेरे लिए काम कर रहा है। $ headers = "से: xyz & lt; info@gmail.com> \ r \ n "; $ हेडर। = "जवाब दें: xyz & lt; info@gmail.com> \ r \ n"; $ हेडर। = "माइम-वर्शन: 1.0 \ r \ n"; $ हेडर। = "सामग्री-प्रकार: पाठ / html; वर्णसेट = आईएसओ -885 9-1 \ r \ n"; अब मेरा सवाल है: 1. मेरा पुराना कोड पहले ठीक से काम कर रहा था और 2. मेरे पुराने और नए शीर्ष लेख अनुभाग में तकनीकी अंतर क्या है? '\ r \ n' और "\ r \ के बीच का अंतर नोट करें । डबल उद्धरण लाइन ब्रेक क...

sql - sqlite replace() function to perform a string replace -

I have a column in a SQL database that I need to modify. The array that looks like this: 0.021460.04419,0.04551,0.02734,0.011,0.005 A comma between the first and second values ​​in the array Is missing, so the array should look like this: 0.02146,0.04419,0.04551,0.02734,0.011,0.005 Data value never greater than 0.9 That's why I'm trying to create an updated query Number two "0." To replace a string, it will use the replacement () function to replace. And by changing it from ", 0", but I do not know how to do it. Just all 0 incidents : (TheColumn, '0.', ', 0') Then delete the duplicate: Replace (cc, '0.', ', 0'), ',', ',') and commas in the beginning: Substr (replace, copy, '0.', ', 0'), ',', ',', '), 2)

haskell - Caching intermediate states of a series of computations -

So, this is a solid idea: I'm writing a Scrabble Game A, and in the process of calculating all possible steps, However, I have to calculate a bunch of intermediate values ​​of the board square. I want to cache these intermediate values ​​in a way that is composable. So, more logical: Without caching, I have f :: w a - & gt; WB , G :: WB - & gt; WC , where w can be a factor, but in my case Scrabble board is the datatype. After adding i caching, I have f ':: m (wa) - & Gt; M (wb) , and g ':: m' (w b) - & gt; M '(WC) , where m and m are monad datat type * cached state but now i f ' and g' I'm not super familiar with the Moned Transformer, but it seems like I used it here, depending on the frequent lift my monedic functions are required. That's how deep the cached-functions were in the series of compositions. Like if I had a f 'g' h ' , h' my execution would require some lift lift up . Am I ...

osx - Grails auto-compile on edit -

I am writing grails applications on Windows, and when I am editing and saving .groovy files, they Auto-compile applications are running and changes are available without restarting the app. This is not happening on OSX, neither is it in the interactive mode or in the application with Geral run-apt. I could not find any reason for this online search, and I also know that other people working on OSX where this feature works what is the reason for this Could? Grails 2.3.7 OSX 10.9.4 Java 1.7.0_55 If you If you are not running in recovery mode, you will need to explicitly specify - reloading . Starting at some point, the initial JVM is reloading and with a given specification, grails.project.fork = [...] in a new JVM in BuildConfig.groovy . As an option to pass -reloading every time, you can modify the startgrails scripts included with the distribution and the following The option might be considered incorrect: DISABLE_RELOADING = false For me, startGrails ...

java - Installing Zest 2 from GEF4 -

I need to move from GEF4 to ZST2. I've got Zest 2 from Eclipse market placement. But when I run a program that uses it, I get the following error by reason: java.lang.ClassNotFoundException: org.eclipse.gef4.geometry.planar.java. References on net. Java.lang at $ 1.run java.net.URLClassLoader $ 1.run (unknown source) at java.security.AccessController.doPrivileged java.net.URLClassLoader.findClass (Native Method) (unknown source) URLClassLoader at Java.lang.ClassLoader.loadClass (unknown source) at sun.misc.Launcher $ AppClassLoader.loadClass (unknown source) on classloader.loadclaus (unknown source) ... 8 more I 'I am assuming that I need geometry pack of GeF4 and I am trying to download it - but this is not allowed because it says that I am missing the package javafx.collections . Install can not be completed because one or more required items can not be found. Software being installed: GEF4 geometry JavaFX conversion 0.1.0.201407251903 (org.eclipse.gef4.geometry....

c# - Copy everything in a Directory and rename copied Files -

I try to copy everything in a folder, in this case "sourceFolder" to "targetFolder". Let's say that "sourcefolder" will contain two files and 2 subfolders with an additional file: (I try to show it) // sourceFolder //├File1.txt / /├File2.txt // ├Subfolder1 // | └File3.txt // | // └Subfolder2 // └File4.txt Now I'm trying to copy all the files and subfolders of "targetFolder" from "sourceFolder", subfolders will be title and files But I'd like to add "a" in front of "file" (Exaple: "aFilex.txt") that you want to meet: // targetFolder // ├aFile1.txt // ├aFile2 .txt // ├Subfolder1 // | └aFile3.txt // | // └Subfolder2 // └aFile4.txt Current code: string [] sourceDirectoryFiles = Directory.GetFiles (sourceFolderTextbox.Text); String [] sourceDirectorysubfolders = Directory.GetDirectories (targetFolderTextbox.Text); String sourcedirectory = sourceFolderTextbox.Text; String targetdi...

ravendb - Raven Index creation gets compilation error CS1977 when using FindLastIndex -

I am trying to write an index that looks at our logs that are looking for those institutions that are unavailable. The process is but not the second part of the process, which then provides them. Our import process is first, then our clean process is considered to be available to the organizations that went through our clean process. I came up with this potential map: AddMap & lt; EntityLog & gt; (Docs = & gt; docs. Where (Doctor => doc.Details! = Null). Where (Doctor => doc.Details.Any (d = & gt; d.QueueMessage! = Null & amp; ; & Amp; amp; amp; amp; amp; amp; amp; amp; D. QimeszotadoConnectes (JobTypeEyPort) & amp; amp;; D. Finnish! = Null). Where (Doctor => doc.Details.Any (d = & gt; Qimes! = Null & amp; amp; amp; amp;; d.QueueMessage.JobsToDo.Contains (JobType.Clean) & amp; D.Finished! = Null) where (doctor => doc.Details .FindLastIndex (d = & gt; D. QueMessage.JobsToDo. (JobType. Clean & amp; amp;; D.Finished! = N...

grails - How to search using a domain class instance? -

I have a domain class user with all the instances [user: 1, user: 2, user: 3, user: 4, user: 5, user: 6, user: 7, ...] and a frequency list User Instance List with only a few items, [user: 3, user: 4] my Search Users: 4 and Users Something In The object is in. SEARCHTERM User using user . How do I find the object in the userInstanceList if you want to ban You should only be able to use the section of the section at the time of searching for the only things in the user's instincts. User.findAll {searchTerm & amp; ID User User List * .id} or User.Features {Search in Inventory List ID, User Instance List * .ID}

symfony - Embeded entity as collection in form symfony2 -

मेरे पास उपयोगकर्ता की तालिका है id | email | ... 1|example@example.com तालिका के लिए डायनामिक फ़ील्ड के 'पसंदीदा' तालिका और 3 तालिका 'पसंदीदा_उज़र' के मापदंडों को स्टोर करने के लिए आईडी | नाम 1 | रस 2 | पुस्तक आदि तालिका 2 आईडी | उपयोगकर्ता | क्षेत्र | नोट 1 | 1 | 1 | याज 2 | 1 | 2 | क्लासिक 2 तालिकाओं से प्रत्येक फ़ील्ड और 2 तालिका के प्रत्येक मान के लिए 3 तालिका के इनपुट फ़ील्ड 'नोट' को बनाये जाने वाले फॉर्म को बनाया जाना चाहिए, लेकिन यह इकाई के फ़ॉर्मबिल्ल्डर संग्रह के माध्यम से किया जाता है कुछ भी प्रदर्शित नहीं करें पसंदीदा_यूसर के लिए कोड फ़ॉर्म: $ निर्माता -> gt; जोड़ ('पसंदीदा', 'संग्रह', सरणी ('प्रकार' = & gt; 'एक्मे \ डेमोबंडल \ फ़ॉर्म \ पसंदीदाफॉर्मटाइप ',)) - & gt; जोड़ें (' नोट ') - & gt; जोड़ें (' बटन ',' सबमिट '); पसंदीदा के लिए कोड $ निर्माता - & gt; जोड़ें ('पसंदीदा', 'इकाई', सरणी ('वर्ग' = & gt; 'एक्मे' डेमोबंड...

soundmanager2 - Best and most lightweight javascript for play sound in mobile devices -

I want to apply my web-app voice notifications with the volume control and selection of sounds. Therefore, when the user receives an example message, the webpage will execute the selected sound with the currently set volume level. Requirements: No jQuery dependency Lightweight as possible Compatible with all mobile browsers Li> I've got some JavaScript: I have no experience with those scripts No, so I want to ask if there is a better solution or which script is better to mention? Thanks for any feedback. SoundJS is the best and works everywhere, but I am biased because I work. / P> Hope that helps.

java - Gson string with key -

I am using GSO to convert an object to Jason string, and its work is fine but when I I'm sending Jason to the webservice method using the post service, I have to add the parameter name of the post method in the string. Example: jsonString I'm getting new GSN from GSON ToJson (requestDataDTO) : {"Req1": {"AppId": "" 33 "," UserId ":" 1 "," UserToken ":" 4 "} , "Req1": {"AppId": "-33" "3", "UserId": "1", "UserToken": "4"}} jsonString I want to: "" "", "User ID": "1", "usercut": "4"}, "rake 1": {"request": {"request": {"blank": {"APID": "2", "third party": {3} "APIID": "-33", "thirdparty": "3", "user-id": "1", "usercuton...