Posts

Showing posts from September, 2010

c# - What is the best way to make shared libraries available to multiple applications? -

Like most shops, we get a team of people working on various projects, all of whom have the same basic information and Access to the works that are related to our business, usually in C # We are currently copying normal sections from project to project, but everyone is starting to taste their own and we want to strengthen it. We use Turtle SVN and we are not sure about a separate project, but it is the best way to deploy this common code for our various applications. We work for an internal IT store that can tell users all about access to applications, we are not concerned about releasing our products in the real world. We have some ideas: Compile sections in a DLL and place it in a center Collect the classes in a single DLL and include it in each project Start the project Time just the most recent room Do not bring a central shared library (our interpretation of this :) External SVN I know that this is a common problem, and if you Or spend time using any other option...

c# - How to add quotes around each list element after .add? -

मेरे पास एक सूची है निजी सूची & lt; string & gt; AdditionalHeaderMeta = नई सूची & lt; स्ट्रिंग & gt; (); और मैं उसे सीएसवी फ़ाइल में आउटपुट करना चाहता हूं। जो सभी काम कर रहे हैं, लेकिन यह कुछ तत्वों को जोड़ता है जो अतिरिक्त मैं हेडरमेटा में जोड़ रहा है, उनमें कभी भी अल्पविराम हो सकता है जो स्पष्ट रूप से एक सीएसवी फ़ाइल को खराब करता है मैंने कोशिश की additionalHeaderMeta.Select (i = & gt; "\" "+ i +" \ ""); लेकिन कोई भाग्य नहीं है। यदि आप संशोधित करना चाहते हैं सूची में जगह, बस उस पर लूप। के लिए (इंट इंडेक्स = 0; इंडेक्स लेफ्टिनेंट; सूची.काउंट; इंडेक्स ++) सूची [अनुक्रमणिका] = / * आइटम को संशोधित करें * / आपने जो किया है, वह एक क्वेरी परिभाषा बनती है जो कि लाज़िली मूल्यांकन की जाएगी, लेकिन वास्तव में आपको क्वेरी पर पुनरावृति करने की आवश्यकता होगी। यदि आप वास्तव में सूची को असम्बद्धकृत छोड़ना चाहते हैं तो क्वेरी का उपयोग करें, लेकिन बस डेटा को संशोधित रूप में प्रोजेक्ट करना चाहते हैं। var query = additional...

Android Run Java everytime page accessed -

I currently have a home screen of my app where it displays a number, all this show is how many questions Answers have been given. Another button takes you to answer the questions and it updates the value of the database. I've found that the home page number updates for the first time only when the app is opened. This price does not update if you go back to a page. What should I do to ensure that it is run every time? I believe that the main method of the onResume The bar will be displayed again.

php - MySQL count rows where a=b and b=a -

This is the first time I have asked a question. This is the first time that I can not find what I am seeing and I think I am being mad because it should be simple! Assume that you have a MySQL table, 'T' with two columns 'A', 'B'. AB --- 1 2 2 1 1 3 3 1 2 4 I like to count a variable given interrelationship. Therefore if I should X = 1 return it 2 Because 1, 2 and 2, 1 is present, and 1, 3 and 3, 1 exists, however, supply x = 2 It should be returned 1 because 1, 2 and 2, 1 exists but no other rows, where 2 = n AND N = 2 I hope this is clear! And sorry if it is easy, I think the brain is getting freeze .. Cheers! This will work (but if you have a line with (n, n) then also Will be counted as a mutual relationship): select count (*) Join TT1 t1.B = T2.A on T2 where t1.A =? And t2.b =? (assign values ​​to both standards)

Difference between C# and VB.Net custom classes -

I have been out of VB.Net for a long time, I have a custom class in C #, which is converted to VB Would like to know the main difference between the net and the two Some things in C # can not seem to accompany classes as used in Vb.Net: Public domain name or public [classname] (Datatable DT) in VB.net My class looks like the following Is: Public Sector Subcontractor {Public Ink Organization_Id {Received; Set; } Public difference subcontractor_id {find; Set; } Public int project_id {get; Set; } Public List & amp; Evaluation; Evaluation point & gt; Number {get; Set; } Public Subcontractor () {} Public Sub-Data (Datatelle DT) {organization_id = Convert.ToInt32 (dt.Rows [0] ["organization_id"]. ToString ()); Subcontractor_id = convert toint32 (dt.rows [0] ["subcommand_id"] .toastring ()); Project_id = Convert. ToInt32 (dt.rows [0] ["project_id"]. ToString ()); Number = new list & lt; Evaluate & gt; (); Foreign Currency (Detrore DR in D...

Develop for android with Visual studio -

I just got an Android phone and now I want to create an app in Visual Studio for this. Is this possible? I have got a subject about this but since 2010, this topic can be that now it is possible? Native Android applications Java and related text files Visual Studio is definitely capable of editing them, And with some setup work, launch the appropriate build tool or an ant script. But this is probably not particularly favorable for such a work. As others have mentioned, some alternative development languages ​​/ paths may be a more natural fit for visual studios, but less natural fit (less native and / or less supported) running on Android devices - Though the results may be sufficient for a given purpose.

math - Which branch applies more to programming: Calculus or Linear Algebra -

I am a computer science and I need to fill my math electives. What would be more applicable to programming and computer science? Hell, which would be more useful? Primary calculations or linear algebra? There are two second level classes (level two) and I can only choose one. If this one coin rises in the toss, then I will go to that which fits better in my program ... but in reality, I want to know which is the best ... Thank you! I have worked in advanced linear algebra for more than a decade, so you can think that I In line with the recommendation of linear algebra, I recommend the calculus: The reason is simple: If someone has not learned linear algebra, then I can read them basically very quickly, assuming that they already know from stone. If they have not mastered mathematics, then they are job Will not be competitive and they do not know enough to start many different customization procedures, which can be applied to a variety of tasks, not just those that ari...

Passing a JSON document in Python -

I am trying to pass a policy document to be encoded in base64. The policy document is located on ~ / policy_document on & gt; & Gt; & Gt; Policy = base64.b64encode (policy_document) What do I need to do to pass it in Base 64 to get the policy_document ? Thank you. # Open the first file # Then read all contents in memory & gt; & Gt; & Gt; Policy_document = open ("/ absolute / path / to / policy_document", "r"). Read () # Then Base 64 Encoded Content. & Gt; & Gt; & Gt; Policy = base64.b64encode (policy_document) # If you are using Python 2.7, you can clear the files to # with # statement to make sure # (see @ Nickels' comment); & Gt; & Gt; Fp: ... policy_document = fp.read () ... with open ("/ absolute / path / to / policy_document", "r") ... policy = base64.b64encode (policy_document) # fp Alternatively, if you need it current to the user's home folder, you

eval - Ruby: How to use generate HTML with dynamic values? -

I am writing a ruby ​​script which will generate a big flat HTML menu for my website, I can fly this menu But every time a page loads, I think that doing so is a waste of resources, especially when it will almost never need to be changed. I want to effectively do the following (in semi-Sudoku): part_of_my_menu = eval% {& lt; Script type = "text / javascript" & gt; Var Mapper = New Array (); & Lt;% parent_categories.each_with_index | Parent_category, i | -% & gt; Mapper ["# {parent_category.name}"] = & lt;% = i -%>; & Lt;% end -% & gt; & Lt; / Script & gt; } and then part_of_my_menu be able to type the string variable in an HTML file (I can do it). I know that Ruby but does anyone know how it can achieve the same "cover" functionality? (PHI - I want to wrap my "AQUAL" function, this code is too high, I am posting just a small snippet to teach it that I am trying to achieve Am) Thank you! ...

python - Using Urllib instead of action in post form -

I have to allow users to upload content directly to Amazon S3. This form works: & lt; Form action = "https://me.s3.amazonaws.com/" method = "post" enctype = 'multipart / form-data' class = "upload-form" & gt; {% Csrf_token%} & lt; Input type = "hidden" name = "key" value = "video / test.jpg" & gt; & Lt; Input type = "hidden" name = "AWSAccessKeyId" value = "& lt; access_key & gt;" & Gt; & Lt; Input type = "hidden" name = "ACL" value = "public-read" & gt; & Lt; Input type = "hidden" name = "policy" value = "{{policy}}" & gt; & Lt; Input type = "hidden" name = "signature" value = "{{sign}}" & gt; & Lt; Input type = "hidden" name = "content-type" value = "image / jpeg" & gt; & Lt; Input type = "s...

jquery - Menu style "...." - fill in with periods -

I want to find the best way to create "....." effect in the dinner menu: It is not certain if it is to be added in its own time or if there is a way to fill jQuery or CSS3, it is just curious. Any ideas what I can do? Or in the old fashioned way of adding the old period. Try it HTML: & lt; Ul & gt; & Lt; Li & gt; & Lt; Span & gt; Soup & lt; / Span & gt; & Lt; Period & gt; ¬ 2.99 & lt; / Span & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; Span & gt; Ice cream & lt; / Span & gt; & Lt; Span & gt; ¬ 5.99 & lt; / Span & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; Span & gt; Steak & lt; / Span & gt; & Lt; Period & gt; ¬ 20.99 & lt; / Span & gt; & Lt; / Li & gt; & Lt; / Ul & gt; CSS: ul {width: 400px; List style: none; } Li (bottom border: 2px dotted black; height: 20px; margin-bottom: 6px;) li span {status...

R - get all variables created from function call -

It's crazy, and only with intellectual curiosity: can I run a function in R such that after the function Can I get all the variables created when the function is executed? So the ability to see a function before coming back? I do not mean to enter the function in debug mode. I'm not sure what it is you want, but maybe close to you Trace can embed an intermediary expression: & gt; Trace (Lm, exit = function). Last_env & lt; & Lt; - "LM" tracing function "statistics" in parent.frame ()) package [1] "LM" & gt; LM (y ~ x, data.frame (x = 1: 10, y = 10: 1)) LM on exit call (y ~ x, data.frame (x = 1:10, y = 10: 1)) Tracing: LM (formula = y ~ x, data = data. Frames (x = 1:10, y = 10: 1)) Coefficient: (interception) x 11 -1 & gt; LS (.last_env) [1] "cl" "contradiction" "data" "formula" "m" method "mf" model "" mt "" na.action "" offse...

SQL Server 2005 - Reaching Table Row Size Limit -

8060 byte limit before adding a new column? For example, if the length of the table line is currently 8055 bytes, and I want to add a datetime (8 bytes), it will end because it will go to 8063 bytes (except for the blank mapping ). However, if I add an integer (4 bytes), then it will give it 805 9 bytes, which fits inside the table size (except zero mapping). I am currently capable of getting the size of the table, yet I find it hard to do a SQL function to get the size of the data (int, datetime, etc) and whether the datatype is unnecessary mapping Requires an extra byte Is there a function that I can use / develop which accepts two variables: tabanam and datatype: fnIsEnoughStorage ('table1', int) and a scalar function with boolean (yes / No) gives. If true, then after the trial I will proceed with the optional table command. This query here will determine which tables are extremely dangerous and possibly the maximum size of the queue which is 8060 bytes Can ...

c++ - Haar create sample parse error -

Creating samples in opencv 2.1 by "Opencv_createsamples.exe", but I got a parse error on line1. file positives.txt includes: C: \ haar \ positives \ PosImg_0.jpg 1 175,120,275,240 c: \ haar \ positives \ PosImg_1 Jpg 1 175,120,275,240 c: \ haar \ positives \ PosImg_10.jpg 1 175,120,275,240 ... (- and so on) And what have I done in CMD: C: \ HigherC> C: OpenCVI 2.1 Bin \ opencv_createsamples.exe -info positives.txt -vec Posi tivesMany.vec -num 15 -w 24-h 24 PAUSE information File name: positives.txt Img file name: (NULL) VAC file name: Positivis.me.bg file name: (NULL) Number: 15bg Color: 0bg thresh Wold: 80 Inverted: Wrong maximum intensity deviation: 40 Max x Angle: 1.1 Maximum Y angle: 1.1 Maximum Z angle: Show the samples: Wrong Width: 24 Height: 24 Create training samples from the picture collection ... positives.txt ( 1): Parsed Error Don 0 Samples Created All information files paths are correct. I had only one problem, and in my case I explaine...

Maintain session in grails -

How to maintain a session in my grails application here is my requirement. I have to generate session ID (in the server side) based on the username (which comes from the client side in the log-in). For each request, the client should pass the session ID to the server so that the server is enabled to check whether the session is live or not based on the timer. If the session is valid, then the server should act on the request and increase the timer. If the session is invalid, the request should not be processed on the server. Please let me know if you have any ideas / tutorials / suggestions. Thank you in advance ... It looks exactly how http Session behaves, so you have out-of-box functionality. To use session attributes, simply use the session variable (). And tells you how to configure timeout.

WPF - How to get rid of false design time errors -

In the design time, I have two false errors which are unable to estimate the value of items due to WPF. Actually it runs flawlessly at run time without actually running them. The question is how can I get rid of these errors? Here's an example: I have the following two in a class: public static bool iSab (get; set;) public Fixed BULL ISEC (return)!}} The following converter works perfectly well: public object convert (object value, type Goal type, object parameter, system globalization. Culture input culture) {If (HubbCostOfferPage.IsHubb & HubbCostOfferPage.CarObj.TestApprovedDate == blank) Visibility is visible; Return to visibility again; Collapsed;} The following however (although very similar) is not set for an "Object reference an instance of an object." Error, whose The meaning is that there is only one thing that I can see at design time without commenting outside of the StaticResource definition. It is a big mistake: Change the public o...

Making html table use 100% of available width -

Image
I have a strange problem that is really embarrassing to accept me. See the whole thing here: My problem is this: The second (very small) table should spread to the full width of the container. When I see it with firebug (hence the blue box on the right, which is actually the background color of the table), but the rows are spread to itself, as if they have to adjust the content Since I do not want a big blue box next to my tables, how do I get this thing to spread the entire width? No amount of setting width for tabulars has brought me nothing, and since I can not already know how many columns are near my desk, determining a width for cells is also out of the question. The only solution I am writing a little javascript so far, which goes through the tables, calculates the columns and sets the width of each on the flight, but of course I have a pure CSS The solution should be very good. Edit: According to the request, an image of how it should look: I believe the ma...

Transfer MySQL data from machineX to machineY -

I want to collect MySQL data from one of 10 different machines in a large MySQL db on a separate machine. All machines are Linux-based. If I want to do this from time to time to collect "Delta" data then what is the "mysqldump" syntax? What are some other ways to achieve this? This is basically not supported in MySQL You can use replication, but in a copy There can be only one master, not 10 masters I know of two practical options: 1) A script is meant to do some sprays which switches the replica among the masters in round-robin fashion. is. You can refer to it or 2) To use an ETL tool. If you get stuck, then we (Percona) can help you. This is a common request, but not easy, because each case is different.

how do i enter the value in one EditText and get answer in other EditText android -

I have two edit text fields, whenever I add value to an edit text, the answer for the other one count Itemprop = "text"> You can do this by using the EditText's OnKeyListener event, even when you press the specific key, the results can still show up Are

c# - Binding two collections with a common parameter -

I would like to display the content of two differents ObservableCollection in the same grid. They have a parameter in common (an ID) and I want to add this collection to two IDs. I think I should use a multi-bond, but how can I say that I want to "link" ID? If I'm not enough, just tell me. Thanks, M. No multi-binding help in this case If one If you have a relation then you can add the property in the first class of the second class, which returns the right object and gives it access to the other object in binding, such as { Binding class.propby .name} Another way I can do this now is to see, make a druppier class. Wraps both the one who is, and who are the new collectibles collection makes property including stored collection Hope this helps

Is it possible to have jQuery throw an exception when an element isn't found? -

I am new to jQuery and I would like to simplify the handling of those elements which can not be found, The code shows what I mean: var class = $ ('select # category'); Now, I can inspect the returned variable to see if it did not get it, but I definitely like the exception being thrown automatically in this case . Is it possible with all jQuery? If not, what is some general phrase to apply such automated error checking on top of jQuery? To do this, is not sure about any existing functionality, but I think that You put it at the top of the page before using jQuery, but after loading it: (function () {var _ $ = $; $ = function} {var $ Res = _ $. Apply (0, arguments); if (! $ Res.length & amp; amp; type arguments [0] === 'string') 'No element found:' + Logic [0]; $$ return;} $ = $$ extension (true, $, _ $);}) ();

php - Compression array values from input in database -

I use the new input of jQuery, each row in the table = & gt; Tr, which has many inputs, and I want to add data to Arya in database: Tr 2: & lt; Tr & gt; & Lt; Input name = "you []" value = "phone" & gt; & Lt; Input name = "you []" value = "chat" & gt; & Lt; Input name = "you []" value = "business" & gt; & Lt; / TR & gt; & Lt; / Table & gt; "Value is tr 1": Translate & amp; Search & amp; Email "Value is Trance": Phone & amp; Chat & amp; Business I have a question: Q1: How to structure all values ​​in "tr 1" and "tr 2" together with database table row of? Q2: How to select (choose from my_table .... ) Only the first part value ("tr 1 = Code> foreach ) and "TR2 = 'phone' ') I want this output: Translate & amp; Phone Maybe it will suit your query ...

asp.net - Call JSON wcf service via jQuery -

I have json according to the json WCF methods from the aspx page with questions according to the questions. This is my test method: [Public Service Interface] WebMessageBodyStyle.Wrapped, UriTemplate = "Test")] for response & lt; String & gt; testing(); } [AspNetCompatibilityRequirements (RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] Public Category EParcelServiceImpl: IEParcelService {Public Response & lt; String & gt; Test () {Return WebServiceHelper.Execute ((= => "Test Message"); }} This service is posted on IIS. When I call this method from chrome: everything is fine and I can see the result but when I call it from jquery, there is an error in: nETWORK_ERR: XMLHttpRequest exception 101. I try to find a solution in Google . But the result was not successful, how can I solve it? jQuery Call: & lt; Script language = "javascript" & gt; $ () Ready (click on function () {$ ("# myButt")...

web services - Integrating WebService (JAX-RS) with Java Stripes -

I have a web application developed in strips. Now I should use a permanent web server (maybe JAX-RS) in the same app. How do I integrate my Strippers application to include these webservices, is there any sample available or any other way than JAX-RS? As the strip is a web application framework (i.e., mainly presentation level), while JX-RS is standard I To make blank web services (i.e., mainly the professional logic level), I will strongly entice two different servlets, one for strips part and one JX-RS part. Part of the strips will reach the JX-RS portion for its back-end. It is possible that it is possible to appoint both parts in the same container, but I do not have much experience with it. / P> (You want to select which JAS-RS implementation you are using. Jersey and CXF, which I know about, and they have enough difference to run from different sets. Use the ones you do not want to switch between them.)

how to count 3g traffic in android mobile? -

What do I want to do so that 3G traffic and WiFi traffic can be counted gradually? Now I know how to do with WiFi below is the source code for WiFi. In this way I can count all the WiFi traffic for all Android phones of manufacturing. But I have not got such a way for 3G, do anyone know? Private string obtained getProp (string prop) {string output = ""; to obtain wifi interface; {Class & lt;? & Gt; Sp = Class.forName ("android.os.SystemProperites"); Get the method = sp.getMethod ("get", string.class); Output = (string) get.invoke (empty, prop); } Hold (exception e) {e.printStackTrace (); } Return output; } // To get traffic from the system file ... ... if (connectinTpe == connectivity manager. TYPE_WIFI) {string wifiInterface = getProp ("wifi.interface"); If (wifi interface == blank. "" .. equal (wifi interface) wifiInterface = "eth0"; RxFile = "/ sys / class / net /" + wifiInterface + "/ statistic...

Python dynamic class names -

संभव डुप्लिकेट: मेरे पास फ़ाइल नाम और वर्ग के नाम के साथ एक शब्दकोश है मैं इस वर्ग के नामों को कैसे आयात कर सकता हूं और मैं यह वर्ग कैसे बना सकता हूँ? उदाहरण: classNames = {'MCTest': MCTestClass} मैं एमसीटेस्ट आयात करना और MCTestClass बनाना चाहता हूं। आपको __ आयात __ फ़ंक्शन का उपयोग करना होगा: डॉक्टर पृष्ठ से उदाहरण: & gt; & gt; & gt; आयात सिस्टम और gt; & gt; & gt; नाम = 'foo.bar.baz' & gt; & gt; & gt; __import __ (नाम) & lt; मॉड्यूल 'foo' से ... & gt; & Gt; & gt; & gt; Baz = sys.modules [name]> gt; & gt; & gt; बाज़ & lt; मॉड्यूल 'foo.bar.baz' से ... & gt; बज़ से एक वर्ग को इन्स्तांत करने के लिए आपको ऐसा करने में सक्षम होना चाहिए: & gt; & gt; & gt; कुछ क्लास = गेटैट (बाज़, 'कुछ क्लास') & gt; & gt; & gt; Obj = SomeClass ()

flash - Sprites not moving in sync... look jittery/shakey -

I have added 2 sprites on the forum, a bitmapdata (background / land) and other movieclips (characters) To create a top-down scene of As the player moves around this world, the second movie clip starts moving in a shady way, not completely synchronized with the background clip. I have seen that when I set the quality of the game through this quality, then the instability disappears ... Unfortunately I can only set a phantom for my quality, is not it? Is there a way to solve this problem? In the eyes of my novices, it seems that the background is growing easily, but pixels are running with top-notch pixels or some things. Thanks in advance for any help, you can provide! This can solve your problem: bitmap PixelSnapping = false; Set this property on whatever object (background or character) is a bitmap.

How to Host Silverlight App in IIS -

I am using Silverlight 4.0 and to host a Silverlight application to process a Silverlight application in IIS Need to know. Thank you in advance Here's a small guide:

How to release two android apps with same source code but different package names without refactor -

I'm looking for ways to release two Android apps without any changes with the same source code, but With two different package names without refactoring. How do I do this? You need to do the following: Package name in IDE To change the reactor code (such as Idea or Eclipse) Change the package name in Android Manifest.Xml Make the app a mark. / Li> Is there really a problem?

vb6 - vb 6.0 program on windows 7 -

I am trying to install and run a program written in vb 6.0 on Windows 7. It was running properly and running Windows XP. After installing and running the error message says that run-time error 33 9 ": component voice.ocx or any of its dependencies have not been registered correctly: any The file is missing or invalid. The program has a voice recording thing. I manually register that OCX component but still error which module failed to load "voice.ocx". and I run VB run-tie I try to install and still show the same error. I believe that the Windows 7 support vb 6.0 program. One thing I'm not sure here is that I have an OCX component 16 or 32 bit Version or not. I do not think we can register the 16 bit version of the OCC in Windows 7. And I also install and run in compatibility mode or even as administrator. I think this is a Is there a platform related issue? And this could be some other thing. So, I appreciate your hints or clues on this program...

seo - Hiding products behind a form -

Let's make a mile that sells tires. I think it will be the best user friendly - to hide my products behind the search form, where you can select the tire dimension, price range etc. I've been told that Google never submits a form when crawling a site, so if I want to hide one, products by using a form, is Google ever indicating my products ? If not, how can I do the best thing around it? I was thinking about doing a regular menu with category submenus (brand, price range, speed limit etc.) so that Google could crawl my links and then use the JavaScript menu to change with a form . Then Google will crawl the link and the user will browse through the form. But if I have 3,000 products, can it cause duplicate content, the flag for link spam, (if there is any such thing) etc.? If the only way to find your products is to complete and submit a form, then not , Google and no other search engine will be able to find and point to that content. You have a few options to get ...

arrays - Matrix to string in Matlab -

I have a m6 matrix in matlab and I want to display it in a string without white space and semicolon. I used the mat2str function but output would be [1 2 3; 4 5 6; ...] Is there no work or effective way to do any string with spaces and semicolons? Kind regards, str = sprintf ('% d ', MTX);

apache - Serving Django application from relative path -

I am developing a Django application which works fine at the local level. In production, a relative path will be applied, such as www.example.com/app / . I am using Apache with mod_wsgi, and I have configured Apache to serve the application from a relative URL: WSGIScriptAlias ​​/ app / Path / to / my / modwsgi.py WSGIDaemon Process app display-name = app_wsgi Unfortunately, I get a 404 error. Debug info, however, is very mysterious. If I try to get www.example.com/app/myurl/ , then what ango says url = in this order: ^ myurl / $ ... current URL, mural /, does not match any of these It looks like Django - correctly guesses that the path is myurl / , and not app / myurl / . However, although myurl / clearly matches ^ myurl / $ , this is not a match. I have also tried to add the setting FORCE_SCRIPT_NAME = '/ app' but nothing changes - error The message remains the same. The information about the debug is: - Trying with more acceptable regexs ...

ruby - Why does the Array allocation my_arr[0,3] work while my_arr[3,0] fails? -

I want to draw two values ​​from one array based on their parameters. My_array [1,2] # = & my_array = ["a", "b", "c", "d", "e", "f", "g"] Why is the final allocation failing to remove elements of 2 and 0? I suspect that my operation really is not what I think is actually doing, because by connecting the third index, the whole thing fails: My_array [1,2,3] # = & gt; ArgumentError: Wrong number of arguments (1..2 for 3) What am I really doing with syntax [var1, var2] and what should I do? piece syntax: This is a small syntax for my_array.slice (start, length); You should do this instead: my_array.values_at (2, 0) => ["C", "A"] and

How to use face detection in iphone sdk -

How to use face recognition for face image using the I camera camera ? I want to develop an application for the iPhone in Exodus and show the face image in use but I do not know how it is possible to use face detection in my application. Any ideas? You can take a look at openCV here is a link P>

c# - Is static variable shared between class instances -

I have the square below _commandLine variable is declared as static whether this variable is between instances of the WkHtml class Will be shared? p.s It would be good for the device that is VS Will show such information in For example select developer variable and get information about variables, variables to be shared between classes, this thread is secure and etc. public class WkHtml {personal fixed string _commandLine; Public Zero AddCommandLine (object value) {AddCommandLine ("{0}", value); } Public Zero AddCmdWithCond (String Value, Bull Position, Object Comparison Value) {AddCmdWithCond (value, status, comparison value, ""); } Public Zero AddCmdWithCond (string value, bool condition, objection compareValue, string defaultValue) {if (compareValue = Null & amp;! Amp;! String.IsNullOrEmpty (compareValue.ToString ()) & amp; Helpers.GetBool (CompareValue) = = position) AddCommandLine ("{0}", value); And if (default value = zero) AddComma...

How I will access a table from another Databse in cakephp -

My project has two databases. I have declared two connection variables in database.php I like the following: var $ development = array ('driver' = & gt; mysql ',' persistent '= & gt; wrong,' host '=> gtxxx', 'login' = & Gt; 'xxxx', 'password' = & gt; 'xxxx', 'database' = & gt; 'yyyy', 'prefix' =>;); Var $ production = array ('driver' = & gt; 'mysql', 'persistent' = & gt; wrong, 'host' = & gt; 'xxxxxx', 'login' => 'xx', 'password '= & Gt;' xx ',' database '=> gt;' xxx ',' prefix '=> gt; Now I am using development as the default connection. In a controller function, I need to get some value from some DAB. How do I get other DB data out there? If any body can help in this, I will make it very strange. Thank you in advance. You can define whi...

python - Check sum in list comprehension -

Is it possible to check the number of digits in the same sense and if the outstanding amount is more than 50? Try k = input ("input points different from the spaces"): (i) the issplit ()] in ValueError: print ("input only digits") The main thing is that it does not have to break the block with two, but to make it as simple as possible, make sure that the sum of the list is not more than 50. for yoga ([int (i) k.split ()]) & Lt; = 50 and enter the code: > : k = input ("input points different than spaces:"): claim yoga ) Except for value = error in KSplit ()]) for & (i): = 50 "Input only digits" except print "entry error": print "Number of digits is greater than 50" However I should say that I have found a bad design ...

c# - RFID tag, Android Format -

I am writing C # applications for reading / writing RFID tags that are formatted by Android Episode (NXP). I found the basic key (AA AA AA2A3A4A5 and D3F7D3F7D3F7) and I can read all the data from the tag, but the problem is that I have something about it The other strange thing is that the key block looks like this [00 00 00 00 00 00 78 77 88C 00 00 00 00] and this block key [A0 A1 A2 A3 A4 A5] My question is authenticated is the permission to write area? Let me understand this problem - you have Android with NDEF / RTD information (URI or other) NFC By using the phone, do some NFC tags (which are one-Megafire Ultralight, Topaz or others?) Now you have a USB NFC Reader (which is a?) Connected to a desktop PC and you are trying to read the data from the tag ? Is it true? Please confirm and enter the information there. BR STeN

javascript - Dynamic Table Row Deletion Problem -

I am creating a dynamic table via javascript. I'm not taking lines and columns from the user and create the table. The second time the user logs in, I am removing all existing rows and creating new lines. Everything is working fine, but when I'm using the comment code, it does not work, while someone else is doing fine. Does anyone tell me what is the reason behind this ?? // Delete the previous lines: - for (k = tblObj.rows.length; k & gt; 0; k--) tblObj.deleteRow (k -1); The above argument is working fine but why is not working under one ??? ( The tblObj.rows.length value is calculated for each brush execution, And the array is decreasing every time. Try var len = tblObj.rows.length; For (k = 0; k

iphone - set UIButton's Image by array of Images randomly -

I need your help because I do not know how I can set the background image of my UIButtons with an array of images I am I have an array of 10 UIButtons and 10 images. I randomly want to set the images from the array. Please tell me how this could be possible. This may require a little tweaking, I have not tested it, but the concept is fine should be there. NSArray * arr = [NSArray arrayWithObjects: @ "1.png", @ "2.png", ...., zero]; Int Index = ARC 4 RRM ()% 10; UIImage * img = [UIImage imageNamed: [arr objectswithoutx: index]];

user experience - Vibrate pattern for incorrect input (Android) -

I know how to create a vibration pattern: vibrator vibrator = ( Vibrator) getSystemService (Context.VIBRATOR_SERVICE); Long pattern [] = new long [] {0, 200, 100, 200}; Vibrator Vibration (pattern, -1); But I do not know which pattern will communicate "incorrect input", are there any guideline or predefined patterns? EDIT: Looks like my question is a bit confusing, what do I mean there are voices that you can identify as success or failure, they are very common, but are there any vibration pattern for success? Can most of the people understand or be unsuccessful? don 't. No other Android apps do this so use a visual signal instead.

osx lion - Installer built with PackageMaker only sometimes shows destination select screen -

I have created a simple installer with packagemaker 3.0.5. It installs some support files in / in a package / library and in applications. The distribution is set to easy install, only the system volume is allowed to allow custom space for all content is set to allow the app downgrade and does not allow restoration. The installer installs correctly, but occasionally when I run the installer it displays a 'Select a Destination' screen and has 'Install Change Location' in it. . Click the button, and sometimes it goes directly to the 'Installation Type' screen. I like the other behavior, my anxiety behavior is an unknown change in Bevien's run. Does anyone know that this is the cause and how to stop it? To determine where I am capable, what to do with the version of OS X Is where the installer is being run. I have created my installer using the packagemaker 3.0.3 on Mac OS X 10.5 and I have all the same settings that you do. When installing o...

objective c - Get security type of currently connected wifi network for Mac OS X using cocoa -

I need to find the security type of the currently connected network (ex-WPA2, WEP) on Mac. I'm targeting OS 10.3. It seems that this can be done using the SCDynamicStore API. However, I am unable to find my way around it. Apart from this I need to submit an app to the Mac App Store and therefore do not want to go for any private code. Any signal or sample code would be very useful thanks in advance. #import & lt; Core WLAN / Core WLH & gt; CW interfaces * WIFI = [[CWY WiFi client shared WiFi client] interface;]; NSString * securityType = [wifi security]; // This is given to you enum (some numbers) and you can do y function which returns the correct string according to this enum this ENUM: typedef NS_ENUM (NSInteger, CWSecurity) {kCWSecurityNone = 0, kCWSecurityWEP = 1, kCWSecurityWPersonersonal = 2, Keseedblyuesakwaiwupasrnl mixed = 3, Keseedblyuessitiapiapi 2 individual = 4, Keseedblyuesakryunikeshnl parcel = 5, Keseedblyuessiakwayriteedanikavap = 6, 7, kCW...

c# - Reference type is changed in proxy class that generated from WCF -

I know that the title is a bit confusing, so here's the explanation: I try streaming Having a big file with WCF and I like to know how to do it. When I wrote a method: [Operation Contact] zero sendStream (System.IO.Stream _StreamSource); There, in the Proxy class generated system in my client app. IOstream type input will be correct as paper. But if I create another category: and the service interface is: [OperationCractracta] zero-dispatch (MyData_Stream Source); In the My Client class, the stream type service reference namespace from Myadata will be under the namespace. i.e.: MyServiceRef.stream Pass the stream into WCF who has not made me. But this is not for string and int accessories. I wonder, why do I know the type of stream type string and int? Or is there any remedy? Thanks in advance! known type attribute to add WCF to type definitions in the service context Provides instructions. It appears that to use a service-generated type,...

mysql - Find rows that have 3 out of 5 fields in common - how to speed up query? -

The questions below work great but are slow to execute around 7500 lines in a table of approximately 30 Decade takes place. How can I raise it? The goal is to find "almost duplicate" rows in the same table when we get 3 out of 5 fields, then we have a hit. SELECTArealTable.id, the original Table.lastname, originalTable.firstname, originalTable.address, originalTable.city, as the original from the originalTable.email address, address as address, the table WHERE # The same record is not original Table.id! = CompareTable.id and # should match at least 3 of those 5 (Basic Table.firstname = compareTable.firstname) + (OriginalTable.lastname = compareTable Last Name) + (Original Reader.Pattern = comparisonTable.Edress and BasicTable.Edress! = '') + + (Original Tablet.City = ComparisonTable.City and MentalTable.City! = '') A + (Original Table.Email = CompareTab.Email and Original Table.email! = '') = 3 GROUP Original Table.lastname ACC by the original...

Syndicating custom fields in Wordpress via RSS -

I wonder if I can ask a Wordpress / RSS question, I can not find any answers here. could have, is trying to syndicate posts via RSS in Wordpress using the FeedWordpress plugin as an RSS aggregator, which includes five custom fields for each post in the original blog Your theme performance (original and syndicated / subscribe to the same subject) Industry are important for the receiving blog). The original RSS these custom fields in 2 feeds as no different from an enclosure, which is defined in the default RSS feed template (act WP rss_enclosure). It is written in the original feed: RSS to add the rest of modifying 2-Feedkpeepeepi template, so they can show at the end of each segment in the current RSS feed 2, so for example they Included: ... However, if I'd update syndicated post, or delete posts and receives modified feed again with Feedwardpres am not in any syndicated of these posts Shows Is there a way to include these custom areas, so they are recogni...

java - Image Browser in blackberry -

I want to create an image browser for my application where the user can select the image that he wants from the phone I am reading each image from the phone like this: file connection file connection = (file connection) connector. Open (string) imm.elementAt (i)); Inputstream input stream = file connection. OpenInstream (); Byte [imageBytes = new byte [(int) file connection. File size ()]; InputStream.read (imageBytes); InputStream.close (); FileConnection.close (); Encoded image image = encoded image. Create encoded images (imagebits, 0, -1); Encoded Image Image 1 = Scale Image Encoded. Scale Image (Image, (Int.) (Display Gate Width) / 4) -10, (Int) (Display.Gate Wideth) / 4) -10); BrowseBitmapField field = (BrowseBitmapField) manager.getField (i); Field.setBitmap (image1.getBitmap ()); Field.setEncodedImage (Image); When there were many pictures in the phone, this process was done very slowly by BCOM and the phone needs a lot of time to get them. Is there a faster way to re...

delphi - What's the workflow for creating an iOS app -

What is a workflow to create an iOS app using Delphi-XE2 This Actually there is a reference question and I will answer it as soon as it gives me, but I thought it would be good to have the answer here FireMonkey iOS applications are written in Delphi: / P> file & gt; New & gt; Other & gt; Delphi projects & gt; Firemoon IOS HD Application File & gt; New & gt; Other & gt; Delphi projects & gt; Firemoon IOS 3D Application Projects for iOS are not a target platform node in Project Manager; They only target IOS iOS Forms Extra Delphi forms are combined with Windows and Mac OS X as the target platform iOS , And the production execution is created with free Pascal compiler, the declaration is different for form units: uses SysUtils, type, class, type, FMX_Types, FMX_Controls, FMX_Forms, FMX_Dialogs, FMX_ExtCtrls, FMX_Ani; iOS workflow Both windows and a Mac have to be developed by firefighters. The first iOS project, y...

c# - Good way to select multiple rows with non-scalar list of keys using Entity Framework 4 -

I am using EF4 and I am trying to find a good way to select those records where The primary key uses multiple columns and using a list of items to search Here is no luck with what I have taken here: I have a list of the type of Foo type . Fu has two properties, A and B The primary key on the order table is A and B columns. var order = (In the context of O.O. order where FooList.Contains (select new Foo {A = OA, B = OB}); It throws an error that I can only use one scalar value, which I can tell, I will need a full list of scalers. I have also tried to join my object list, but he Either has not worked either: var order = (in context from O.Foo.A, foo.B) select new {oA, oB} Obviously, I can only repeat through all the values ​​in the FuList, I should get the order that I want and update it, but this is my current status (FooList). In about 6000 values). Any ideas? You should still be able to use (a version) that was required before EF4. As a result the SQL will be ...

html - DeviceMotion event in javascript for the mobile web -

To capture the accelerometer on mobile safari, see how to use the DavisMotion event in javascript across the web For iPad or iPhone I just want to know how I can implement it in a website or if anything please give me a good description of how it works. iOS API Here's a sample:

c - Calculate the number of bytes used by a CFStringRef / CFMutableArrayRef -

I am trying to track memory usage in my program, and use it for the array of string data Should know the total amount of storage. My string is displayed as CF string reef, and my array is a CFM filter array. In the string I get CFTringGetLength () to get the number of UTF 16 code pairs in the string but the Apple String Storage Guide tells that the string can be stored in more compressed formats [1] Suppose that A UTF16 is 2 bytes, it will definitely give me a conservative upper limit, which is a good start. For the unstable array, I could assume that storage is the power of 2) size size (zero *). What is the better way to calculate the size? Is there a function to get the allocated bytes for the item obtained from CFTEP? If I do not believe this, I am planning to write a CFLocortor which proxies all calls to the real CFALOcter, but I am using it allocation. [1] You can use malloc_size () : //www.manpagez.com/man/3/malloc_size/) To get the size of the allocation fo...

c++ - Advantages of typedef over derived class? -

Simply put, what are the differences (or anyone) to say class MyClassList : List & lt; MyClass & gt; {}; versus typed list & lt; MyClass & gt; MyClassList; The only benefit that I can think of (and its reasons motivate me to ask this question) is that with the derived class, I can now easily move MyClassList forward. Class MyClassList; instead of compiler error class MyClass; Type-Ff list & lt; MyClass & gt; MyClassList; I can not think of any differences, but from this I am wondering, is there a case in which a typed file can be used, which is a simple Can the derived class not? Or to keep it in any other way, is there any reason why I should not change all my typefifs list Good, a typedef only suggests its name, while the derived class is possible : There may be a completely evolving change in its base (s), so long as the compiler is concerned, there can not be any difference unless the compiler is concerned, by then you wi...

python - How to double buffering a WebKit page using QWebView and PySide? -

I'm playing with PySide and QWebView to provide a webkit version of a webapp on Windows. Simple and easy to install in a complex working Windows environment where only Internet Explorer exists. More than using QWebKit it's quite simple: #! / Usr / bin / env Python # - * - Coding: UTF-8 - * - # hellowebkit.py# Copyright 2009 Patrick Malia ?? Ski, riklaunim@gmail.com ## & lt; Under the GPL license & gt; Import from PySide.QtCore import * from PySide.QtGui import * from PySide.QtWebKit import * app = QApplication (sys.argv) web = QWebView () web.load (QUrl ("http://myapp.example.com") ) Web.show () sys.exit (app.exec_ ()) I would like to enable double buffering so there is no drawing until the next page is fully loaded. / P> Do you know how I should do this? I suppose that possibly using the web.loadFinished () hint? Cheers, Natim you do this You can use QStackedWidget and a QSignalMapper for: PySide.QtCore Import * from PySide....

Android button doesn't react -

I am facing a difficult problem about the simplest thing: a button. I have a large application where I need multitouch capabilities embedded in a custom JoyPad interface. I have custom joysticks and buttons for this interface. The problem is that these buttons receive touch events but do not give normal view responses (change color while touching). These buttons are simple extensions of the base button class. Why does this happen but any thoughts? I am separating events for Multitouch myself but this is not a problem because the button receives the event expectedly. If the code is required, please comment. Thanks, JQCorreia To create and use custom the wanted.

PHP XSS Question / Clarification -

Previously asked, but I need 100% clarity on this issue because it is very important to be right for me is. Status: A messaging system on the website enters a message in a text box, then it submits the form and it enters the database. This data can then be called from the database and & lt; Span & gt; can be displayed to another user in the tag. What protection process do I need to prevent this data from being malicious? I already use mysql_real_escape_string to prevent any injection and strip_tag seems useful but I have mentioned many other names. & lt; Span & gt; What do I need to use to keep this data safe due to appearing in tag ? The incorrect assumption is that you want to avoid input, which is wrong. You must filter out the output (and the database is also output) This means that when the form is stored, you can use the mysql_real_escape_string () to send the database (output) data , And you use htmlspecialchars () to output the content on ...

entity framework - Linq to Entities Select clause with lambda -

I am working on a new project and we are using unit framework and god leads when lambda Would like to use questions. One thing is that we want to take a hard time to choose how to choose two columns in addition to how to choose differently, we have a table in which there are many entries for a vendor but we only list the vendors and a dictionary Want to load in the object. This fails because it is trying to add a significant value in writing that has already been added. Take the following query Dictionary & lt; Int, string & gt; Dict = new dictionary & lt; Int, string & gt; (); Dict = GetWamVendorInfo (). AsEnumerable (). Where (x => x.vendor_name! = Null & x.vendor_id! = Null) //. Selection (x = & gt; x.vendor_id). (Undoubtedly). (2). Todoquin (o => gt; purse (o.vender_id.ToString ()), o = & gt; o.vander_name); What I would like to do, only select vendor_id and vendor so that we can only get specific records. Any help would be greatly appr...

javascript - How to write a custom formatter for Google DataTables (for use on visualisation api) -

I am looking to format my data in which I change the numbers with the mouse. As far as I can tell that Google does not currently have the format to do this: A brief mention in the documentation about custom formats But I can not find any such document Can anyone tell me in the right direction? There is a similar question on stack overflow:. However, the question was used only by using the built-in formats (which I think that I can not do). I do not think make you able to do the current format as you wish You can, but you will be able to make your own format easily enough. I put the iconFormatter together for a sample - it can be adjusted to whatever you need, to do it. & lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" src = "http://www.google.com/jsapi" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" &...

javascript - get value customize of output json_encode() by jQuery.? -

I insert the data into the database with json_encode () , just get the value Name_units in line in the units database? This code is the output database in php (by json_encode () ): my_table = & gt; = "Gtc: mediawidth =" gtc: mediawiki-xid = "33" gtc: suffix = "" & gt; "Checkbox_units": ["mini bar", "mobleman"]}, {"name_units": "Mokhles", "price_units": "4,851,269", "checkbox_units": ["mobleman", "TV"]}, {" Name_units ":" "" "" "" "", "check box_notes": ["minibar", "mobile", "tv"]}]}]] var DataObj = $ (this) .closest ('form'). Serialize (); $ .Azax ({type: "post", datatype: 'jason', url: 'url', data: data obj, cache: fraud, success: function (data) {/////////// ///////// * HERE ///////////////////// $ .eac...

c++ - Calling a const function rather than its non-const version -

I tried to wrap something like Qt's Shared Data Points for my purposes, and on the test I came to know that when const Function should be called, its non-current version was chosen instead. I am compiling with the C + + 0x option, and here is a minimum code: struct data {int x (const const}; }}; Template & lt; Class T & gt; Straight container {container () {ptr = new T (); } T & amp; Operator * () {puts ("non-contact data PTR"); Return * PTR; } T * operator-> () {Puts ("non-contact data PTR"); Return PTR; } Const T & amp; Operator * () const {puts ("const data ptr"); Return * PTR; } Const T * operator- & gt; () Const {puts ("const data ptr"); Return PTR; } T * PTR; }; Typeffe container & lt; Data & gt; TestType; Zero test () {testType test; Test & gt; X (); } As you can see, Data.x is a constant function, so operator - & gt; The const is supposed to be one and when I comment about non-constan...

ios - CALayer vs CGContext, which is a better design approach? -

I'm experimenting with iOS drawing. To practice practical, I wrote a barchart component in the following class diagram (OK, I was not allowed to upload images) Let me write it in words I have an NGBarChartView that is inherited from UIView 2 Protocol NGBarChartViewDataSource and NGBarChartViewDelegate And the code is To attract the bar chart, I have made the chat every time as a separate caspeller because of which I double it twice, first I can just create a UIBezierPath and one I can enclose the Caspelier object and two, I can easily track if the bar is touched by itam or the component works very well by using the [Layer hitTest] method, however, let me come to twelve chart I am not comfortable with the approach I have taken to be charmed. So this note requires expert opinion on the following me I'm not really using UIGraphics content by using caspler and by creating baritties, is this a good design? Many of my viewers CALayers inside a UIView. Depending on the perf...

c# - LINQ newbie question for 2 dimensional set -

मेरे पास एक LINQ क्वेरी है जो पूर्णांक के साथ ID मान खींचती है: var data = from एस में बेसडेटा का चयन करें नया s.rooid, s.Tid}; ? डेटा .ओएआरआरए () {& lt; & gt; f__AnonymousType0 & lt; int, int & gt; [14]} [0]: {Roid = 2384, Tid = 1} [1]: {Roid = 2384, Tid = 2} [2]: {Roid = 2384, Tid = 3} [3]: {Roid = 2385, Tid = 4} [4]: ​​{Roid = 2385, Tid = 5} [5]: {Roid = 2385, Tid = 6} [6 ]: {Roid = 2386, Tid = 1} [7]: {Roid = 2386, Tid = 3} [8]: {Roid = 2386, Tid = 6} [9]: {Roid = 2386, Tid = 7} [10]: {Roid = 2387, Tid = 1} [11]: {Roid = 2387, Tid = 2} [12]: {Roid = 2387, Tid = 4} [13]: {Roid = 2387, Tid = 9} मैं क्या करना चाहूंगा, केवल एक रोध के लिए परिणाम सेट को क्वेरी और केवल टीड मानों को निकालने के लिए है। इसलिए मैं रओड = 2387, जो 1, 2, 4, 9 लौटाएगा, जो मैं एक सरणी में कनवर्ट करना चाहता हूं। क्या ऐसा कुछ संभव है? // *** संपादित करें *** var आइटम = डेटा.ToArray ()। जहां (s = & gt; s.RepairOrderId == 2387); // मुझे करीब ले जाता है, लेकिन मैं अभी भी केवल TID का...

Submit dojo editor contents with form submission -

Currently the editor content is presented because of "onchange", if the content of the editor changes Code snippet: & lt; Td> How do I make sure that Dojo Editor content is submitted every single form whether it changes or not? ; & Lt; Input type = "hidden" name = "editorcontent" id = 'editorcontent' value = "replaced by dijit. Editor onsite submit" /> & Lt; Div dojoType = "dijit.Editor" id = "content" onChange = "dojo.byId ('editor content'). Value = this.getValue ();" Plugins = "['forecolor', '|', 'bold', 'italic', 'underline', '|', 'createlink', 'unlink']" Additional plugin = "['dijit._editor.plugins.AlwaysShowToolbar '] "& Gt; & Lt; / Div & gt; & Lt; / TD & gt; You can write a simple onsmart handler to do this, even though you have The way code is struct...

java - Importing big XML file (100k of records) into database -

Problems with the problem of parsing the XML I have 47% of its cosuming CPU and its very slow speed It seems that DOM has loaded XML into memory and from there it starts reading the XML tree node from the node. I am reading a node and dumping it into the database. I I am using JDK 1.4.2_05. Look at SAX parser, the only way to do this with XML without creating a complete DOM in memory It has some limitations but it may be in line with your needs.

Java assert disables execution of Map.remove() -

Hi I was trying to remove the object from the map and I was testing it using this operation // Map definition of private map & lt; String, map & lt; Long, Object & gt; & Gt; Group = new hashmop & lt; String, map & lt; Long, Object & gt; & Gt; (); // This does not remove items from the map Delete groups.get ("key"). Remove (ID)! = Null; // This map is removed from the groups. Get ("key"). Remove (id); The above methods were tested on the same data. Why does Map.remove () do not work lightly? emphasis statement either based on the way you start VM Executed or not. You should put side effects in not parties. From: A claim is either enabled or disabled If the claim is enabled, the evaluation of the boolean expression is evaluated due to the evaluation of the claim and an error Is reported if the expression evaluates false. If the candidate is ineligible, evaluation of implantation has no effect. and in the discu...

javascript - Resizing and centering an img in an "overflow: hidden" div -

I want to create a javascript / jquery function which will be used for any set dimension IMG (when the aspect ratio should be maintained) This will fill the size of any set dimension, without any interval, the parent div (which is overflow: hidden set) How far was it far: This image should change the size of the parent, in whatever dimension (width or height) the biggest difference between the self and the parent And is, P> $. Create a memory copy of the image in the image ($ (".img_for_video_thumbnail"), function (index, value) {$ ("& lt; img / & gt;") // to avoid CSS issues .attr ("src" , $ (This) .attr ("src")) .load (function () {var pic_real_width, pic_real_height, width_difference, height_difference; var pic_real_width = this.width; // note: $ (this) .width () var pic_real_height = This.height; // will not work in memory images var parent_width = this.parent (). Width; var parent_height = this.parent (). Height; var...