Posts

Showing posts from August, 2012

mysql - php code to get sum value and display max value from sum value -

तालिका नाम --- मतदाता क्षेत्र का नाम मतदाता प्रकार पूर्णांक मैं इस तालिका से अलग मानों का चयन कर रहा हूं, मतदाता फ़ील्ड का योग प्राप्त कर रहा हूं, और इस फ़ील्ड को एक पाश में गूंज रहा हूं। मुझे ऊपर नमक वैरिएबल में मान का परिणाम और इस योग फ़ील्ड से अधिकतम मान प्रदर्शित करें। मैं यह कैसे कर सकता हूं? यह मेरा कोड है: & lt;? Php $ party = $ rowco ['पार्टी का नाम']; $ जिला = $ पंक्तिको ['जिला']; $ निर्वाचन क्षेत्र = $ पंक्तिको ['निर्वाचन क्षेत्र']; $ Sqlvotes = "SELECT SUM (वोट) वोट के रूप में, मतदाता के लिए लोकसभा क्षेत्र जहां राज्य = '$ राज्य' और पार्टी का नाम = '$ पार्टी' और जिला = '$ जिला' और निर्वाचन क्षेत्र = '$ निर्वाचन क्षेत्र'; $ परिणाम परिणाम = mysql_query ($ sqlvotes); जबकि ($ rowvotes = mysql_fetch_array ($ परिणामस्वरूप, MYSQL_ASSOC)) {? & Gt; & Lt; th & gt; & lt;? Php echo $ rowvotes ['वोट']; ? & Gt; & lt; / वें & gt; & Lt; th & gt; & lt;? Php प्र

javascript - how to send json data to serializable class -

There is a problem when sending json data for the serial class. This is true when I check data on the browser on the client side, but on the server side, the field of serialized class is zero. Client side (using dojo): ticket object is assigned to debugger line field var ticket = {product ID: product ID, type: ticket Type}; DataService.xhrPageMethodJson ("API / Tickets / MyTickets", dojo.toJson (ticket), {Success: Function (Data) {Debugger LoadShoot Page (getRoot ("help / ticket.spacks? Mode = list"));}, Error: Function (mistake) {LoadingOverlay.hide ();}}}; Web method: Ticket on this method. Product ID, Ticket The default value or zero in the typed field [AcceptVerbs ("POST") [Actionemem ("mitits")] [Authorized] Public Zero Mititensus ([Body] Ticket Ticket) {Datatile Mitrix = DB Ticket. My ticket (globals logon user .username id, ticket.product id, ticket type); WebContacts Session ["ticket"] = myTickets; } ; Set; }

ARM OpenCL support for cl_khr_fp64 extension -

I am using OpenCL on the Mali GPU. There is no support for double types, there is no alternative way to use double ? Does the ARM intend to support it in the next release of its OpenCL implementation? ARM recently supports this extension. OpenCL Mali drivers release it anywhere in public form But it is available in binary drivers.

Generate Oracle reports xml using java -

I have a customer who wants to keep their oracle report XML for printing their statement, I am using reports, PDF reports go to the third party for XML printing, is there any way to get started or through development, I can generate the same Oracle report XML. I have not used any advantage of this Oracle report XML startup: Edit Strong> Try this: : < Img Src = "https://i.stack.imgur.com/4L21e.gif" alt = "Enter image details here">

case - Why cant we use Any or Nothing in scala pattern matching? -

I have seen that in the following circumstances, the type "type" can be used, but none or nothing, Can not user match {case int = & gt; "ScalaIt" Case Any = & gt; "?" } Why does Scala case class differentiate between these types is not really anything at all (no such examples are present) to match anybody with only _ Can be used

cakephp - how to upload image in cakephp2.5+ and store it in webroot folder -

मेरे नियंत्रक सार्वजनिक फ़ंक्शन जोड़ें () {$ this- & gt; helpers = array ( 'TinyMCE.TinyMCE'); $ this- & gt; लेआउट = 'adminpanel'; अगर ($ this- & gt; अनुरोध- & gt; है ('पोस्ट')) {$ this- & gt; भ्रमण- & gt; बनाएँ (); अगर ($-> यह- & gt; यात्रा- & gt; सहेजें ($---- ;--> डेटा->)) सहेजें {$ this- & gt; सत्र- & gt; सेट फ्लैश (__ ('आपकी संभावना बचाई गई है।')); $ $ -> (- 'नियंत्रक' = & gt; 'एडमिन', 'एक्शन' = & gt; 'टूर') रीडायरेक्ट करें;);; } $ This- & gt; सत्र- & gt; सेट फ्लैश (__ ('अपना शेड्यूल जोड़ने में असमर्थ।')); } मेरी दृश्य फ़ाइल प्रतिलिपि करें $ this- & gt; फॉर्म- & gt; बनाएँ ('यात्रा'); ईको $ इस- & gt; फॉर्म- & gt; इनपुट ('vartitle', ऐरे ('वर्ग' = & gt; 'फॉर्म-कंट्रोल', 'लेबल' = & gt; 'टूर शीर्षक')); // आदि ................. प्रतिध्वनि $- इस- & gt; फॉर्म- &am

javascript - Toggle display-state with jQuery -

I want to toggle the visibility of a div through jQuery's CSS, but it seems that it's working Stops something for The device has a Google map which I am also starting, but I do not think this is a problem. Javascript: Initialize the function () {var map; Var map option = {zoom: 8, center: new google.maps.LatLng (-34.397, 150.644), type the map: google.maps.MapTypeId.ROADMAP}; Map = new google.maps.Map (document.getElementById ('map_canvas'), map options); } $ ("Show-map") .click (function () {$ (". Display-toggle"). Css ("display", "block"); initialize ();}); $ ("# Hide-map"). Click (function () {$ (". Display-toggle"). CSS ("Display", "None");}); CSS: #map_canvas {height: 100%; Border: 1px solid red; }. My-map-section {Display: Block; Height: 200 pixels; Width: 100%; }. Display-toggle {display: none; } HTML: & lt; Script src = "https://maps.googleapis.com/map

ios - custom filter won't update live results on iPhone -

Update: I have a basic search field that matches the name Shows from the JSON array of employee data: & lt; Form & gt; & Lt; Label & gt; Enter name: & lt; Input type = "article" ng-model = "search" & gt; & Lt; / Labels & gt; & Lt; / Form & gt; & Lt; ul class = "result-container" ng-if = "search.length & gt; 1" & gt; & Lt; li class = "results" ng-repeat = "employees in staff | filter: {full_name: search}" & gt; & Lt; / Ul & gt; It works fine, but because it is mobile, I wanted to reduce the size of the JSON download as much as possible. Since the full_name field on-the-fly has been created as a combination of first_name and last_name , so that's why I I have created a custom filter: app.philter ('first andlastname', function () {return function () archive , str) {return collection.filter (function (el) {// javascript array.fi

dependency injection - Laravel Repositories inside other repositories -

So I have recently started using repository patterns in my work projects. I will continue to follow the same question that I can not answer: Is it OK to inject any other repository into an existing repository? What are the negative effects of doing this? For example : class crawl repository tool crawl rhesosity interface {public function __ composition (archive repository $ collection) {$ This- & gt; Collection = $ archive; } ... ... public events with getCrawlList () {// $ $ stuff - crawl $ // with luggage-> archive}} Archive There are some methods within the CrawlsRepository to use the model, which means that to maintain this pattern, ArchiveRepository is required to be used Thank you for any direction you can provide! :) Technically it's okay to do this really it's really good because you can not have dependency injection You are using, so you are not bound to just one implementation. Conceptually, the repository represents the wrapper

html - Is it possible to access google Chrome's theme? -

Image
It should be asked somewhere, but can not be found there: ( I was reading someone The person was also using on html. My site uses' Theme '(Dave Xpace' black glass) and wondering if one has access to Chrome's current theme when logged in Method. I understand that it has the potential to be an huge venture, but if this is possible, then the chromosomic theme (Obviously it will only be applicable when user is using Chrome?) I am currently writing a project in MVC, but no HTML / The CSS approach will be beneficial here. For example: Is it possible to gain access to CSS 'grass' topic (please note, this is just an example, many others were I'm available)? As far as I know it's not possible, and so Does not work like CSS You need to get the JSON file, because I do not think it is possible with the CRX. Here's what a JSON file looks like for the GC theme: {"" "" Theme ":" "" "Theme

c# - Load interface from remote assembly -

I am currently developing a client-server application, it should load the interface from the module and show it inside my window needed. But sometimes I need to plug the remote module. Can I run the module on the module without loading the module file (working with all functions)? Thank you. Yes, you can load the assembly sent from a remote computer (I do not discuss here I will want to - about the implications of security, at least - check a signature): var data = new webmail Download Data Data (URL); // For example ... var assembly = assembly.Load (data); In C ++ / CLI (it is not clear in your question what language you are using): array < Byte & gt; ^ Data = (gcnew WebClient ()) - & gt; DownloadData (URL); Assembly ^ assembly = assembly :: load (data); You now have a assembly and you can load something from it, for example (for example): var plugins = assembly. GetExportedTypes () Where (x = & gt; type my (IYourContract) .IsAssignableFrom (x) &

html - defining margins and line spacing of ordered and unordered lists using css -

क्यों इस HTML + सीएसएस करता है: & lt; DOCTYPE HTML & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; मेटा http-equiv = "content-type" content = "text / html; charset = utf-8" / & gt; & Lt; शैली प्रकार = "टेक्स्ट / सीएसएस" & gt; पी {मार्जिन: 4 एएम; } उल {मार्जिन-बाएं: + 2em; मार्जिन-दायें: + 2em; } ली {मार्जिन-बाएं: + 2em; मार्जिन-दायें: + 2em; } & Lt; / style & gt; & lt; शीर्षक & gt; परीक्षा & lt; / title & gt; & LT; बॉडी & gt; & Lt; p & gt; पैरा - पहली पंक्ति & lt; ul & gt; लीटिंग; लि & gt; आइटम 1 & lt; / li & gt; & Lt; li & gt; आइटम 2 & lt; / li & gt; सूची ट्रेलर & lt; / ul & gt; पैरा - अंतिम पंक्ति & lt; / p & gt; & Lt; / body & gt; & Lt; / html & gt; असल में यह प्रकट होता है: पैरा - प्रथम पंक्ति सूची शीर्षक & amp; बू; आइटम 1 & amp; बू; आइटम 2 सूची ट्रेलर पैरा - अंतिम पंक्ति (जहां & am

How can I call multiple PHP scripts with AJAX/JQuery? -

I'm new to AJAX and JQuery I'm trying to use it to call two PHP scripts. I got some examples online but to call the function. I'm just trying to call scripts, so it will load everything on my main PHP file, which will then show results on screen. Bold example here, it works if I put all my PHP scripts in a file: Thanks in advance, your help is greatly appreciated. ! main_php file (where I want to call my other PHP scripts): display_desk.php (I want to call scripts): & lt; Include php 'db_conn.php'; // Query to obtain X, YDES coordinates for $ DESKS desk_coord_sql = "SELECT coordine_id, x_coord, y_coord FROM coordinates"; $ Desk_coord_result = mysqli_query ($ conn, $ desk_coord_sql); // See if the query is good ($ desk_coord_result === incorrect) {dead (mysqli_error ()); } // didsplay maps desk stations ($ line = mysqli_fetch_assoc ($ desk_coord_result)) {// naming x, y value $ id = $ line ['coordinate_ID']; $ X_pos =

android - Fragments - onGlobalLayout() called twice -

सार्वजनिक वर्ग QuadPadFragment टुकड़ा विस्तार {int w = 0; int h = 0; सार्वजनिक देखें क्रिएटिव्यू (लेआउटइनफ्लेटर इन्फ्लाटर, अंतिम देखें ग्रुप कंटेनर, बंडल सहेजे गए इन्स्टेंसस्टेट) {अंतिम दृश्य दृश्य = inflater.inflate (आर। लेट। क्वैडपैडलेआउट, कंटेनर, झूठे); Container.getViewTreeObserver ()। AddOnGlobalLayoutListener (नया ViewTreeObserver.OnGlobalLayoutListener () {@Override सार्वजनिक शून्य पर ग्लोबल लेआउट () {h = कंटेनर.जेटअमित (); डब्ल्यू = कंटेनर.जेटमेटेडवेथ (); लॉग। W ("क्वाडपैड फ्रैग्मेंट: --- --- "," विंडो की चौड़ाई: "+ w +" विंडो की ऊँचाई: "+ एच); दृश्य.सेटलेआउटपारम (नया लेआउटप्रारम्स (1, 1));}}); वापसी दृश्य; }} मेरे पास लिखित वर्ग से ऊपर है, सब कुछ ठीक है, लेकिन मुझे क्या परेशान है, क्यों कि ग्लोबल लेआउट को दो बार कहा जाता है? मैं लॉग से ये आउटपुट प्राप्त कर रहा हूं: डब्ल्यू / क्वाडपैड टुकड़ा: ------ (27180): खिड़की की चौड़ाई: 1080 विंडो की ऊँचाई: 1 डब्ल्यू / क्वाडपैड टुकड़ा: ------ (27180): खिड़की चौड़ाई: 1080 विंडो की ऊँचाई: 1 म

aggregate functions - Time series in PostgreSQL - list changes -

I have a table in PostgreSQL with some time-series data, which is showing the change of values ​​in the parameter - we There can be no difference and there is date_from related to each date_to (excluding the last course): select date_from , Date_to, xx yy orders from date before date; Date_from | Date_to | Xx ----------- + ------------ + ------------------ 2014-05-01 | 2014-05-21 | 0/05/2014 | 2014-06-02 | 10 2014-06-02 | 2014-06-05 | 10 2014-06-05 | 2014-06-10 | 10 2014-06-10 | 2014-06-26 | 0 0 0 0 0 6 2014-07-01 | 10 2014-07-01 | 2014-07-08 | 10 2014-07-08 | 2014-07-23 | 0 2014-07-23 | 2014-08-04 | 10 2014-08-04 | 2014-08-20 | 10 2014-08-20 | 2014-09-02 | 20 2014-02-02 | 2014-09-03 | 20 2014-09-03 | 2014-09-22 | 02 2014-09-22 | 2014-09-24 | 10 2014-09-24 | 2014-10-02 | 20 2014-10-02 | 2014-10-08 | 20 2014-10-08 | Infinity | 0 My goal is to collect data based on the time interval, and it indicates which code xx remains on a given value: from date_ | Date_to | Xx ---

How to get project to use JRuby instead of Ruby on Windows -

I am trying to create a JRBB / Ruby-on-Rail environment on Windows VM. As a result, I installed Ruby, Rails and items from the download. When I install it again, when I do jruby -v and ruby ​​-v , everything gets installed and I see both. How do I get my rail project, rather than ruby ​​to identify JRuby? Can I get it without installing RVM? Should I just install RVM on Windows VM (which I was trying to avoid but, maybe I should not have)? Will I just put a line in the jifffile ? (My very limited experience with JRuby / Ruby-on-Rails is using RVM on a Unix environment.) When I Mani env : RubyWiz Environment: - Ruby's Version: 2.1.9 - Ruby Version: 1.9.3 (2014-09-25 Patchlevel 392) [Java] - Installation Directory: C: / jruby- 1.7.16 / lib / ruby ​​/ gem / shared - executed Ruby: C: / jruby -1.7.16 / bin / jruby.exe - Executable instructions: C: / jruby-1.7.16 / bin - Speak cache directory: C : / Users / User / Village / SPEC - RUGS Platform: - Ruby - Universal-Java

In current C++ and Java, double type and float type : if (x == 0.0) is correct? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 3 जवाब मेरे पुराने में ज्ञान : जब हम यह देखना चाहते हैं कि डबल या फ्लोट 0.0 के बराबर है या नहीं, तो हम नहीं चाहिए इस तरह से लिखना चाहिए: डबल एक्स = 0.0; यदि (x == 0.0) System.out.println ("हाँ"); Else system.out.println ("नहीं"); लेकिन कुछ मिनट पहले, मैंने इसे जावा (1.7) और सी ++ (ऐप्पल) एलएलवीएम संस्करण 6.0) , ऐसा लिखने में कोई समस्या नहीं है! मैंने क्रमशः जावा और सी ++ के तहत "डबल" प्रकार और "फ्लोट" प्रकार की कोशिश की है। मेरा प्रश्न: क्या मुझे याद आया कुछ, या हम वास्तव में जावा या सी ++ के तहत डबल या फ्लोट की जांच कर सकते हैं। अगर हम कर सकते हैं, क्या हम इसे जावा और सी ++ के शुरुआती संस्करण के तहत कर सकते हैं? निष्कर्ष (सभी मदद के आधार पर): हम नहीं चाहिए "फ्लोट == फ्लोट या डबल == डबल का उपयोग करें "यह जांचने के लिए कि दो फ्लोट या दो युगल के बराबर हैं ( अगर हम सही जवाब प्राप्त करना चाहते हैं ), कारण सभी उत्तरों और टिप्पणियों में हैं नी

ruby on rails - Cant install Jekyll on windows..certificate verify failed -

इस सवाल का पहले से ही एक उत्तर है: < / P> 36 जवाब रूबी और जेकाइल को स्थापित करने की कोशिश कर रहा है जब तक मैं jekll स्थापित करने की कोशिश नहीं कर रहा था सब कुछ अच्छा रहा ... तब मुझे निम्नलिखित त्रुटि मिलती है $ gem install jekyll त्रुटि: एक वैध मणि 'jekyll' (& gt; = 0) नहीं मिल सका, यहां क्यों है: https://rubygems.org/ से डेटा डाउनलोड करने में असमर्थ - SSL_connect = 1 errno = 0 state = SSLv3 पढ़ें सर्वर प्रमाण पत्र बी : प्रमाणपत्र सत्यापित विफल (https://rubygems.org/latest_specs.4.8.gz) < P> SSL प्रमाणपत्रों के कारण यह एक त्रुटि है और आपको रूबी के लिए मैन्युअल रूप से एक SSL प्रमाणपत्र निर्दिष्ट करने की आवश्यकता होगी। इस समस्या को ठीक करने के लिए यहां सटीक कदम हैं: फ़ाइल डाउनलोड करें और इस फ़ाइल को C: \ RailsInstaller \ cacert.pem में सहेजें नियंत्रण कक्ष में सिस्टम खोलें उन्नत सिस्टम सेटिंग्स पर क्लिक करें पर्यावरण चर एक नया SSL_CERT_FILE के साथ सिस्टम चर = सी: \ RailsInstaller \ cacert.pem अपने कमांड प्रॉम्प्ट को बंद करें

neo4j - Cypher: find a path that satisfies a condition between steps i and i+1 -

I am trying to write a cipher query that returns a path with that condition that with value in each step The timestamp property should be less than or equal to the previous step which is what I have not yet done. matching path = (a: NODE) ​​- [: parent *] - & gt; (B: NODE) ​​WHERE a.name = 'SOME_VALUE' and B. Names = 'SOME_OTHER_VALUE', the path in the form of relationships (path) where all (I in range (0, length (phase) - 1 ) Where step [i]. Timestamp & lt; = steps [i + 1]. Timestamp) Return path I think what I have but the neo4j web console is telling me That I have a syntax error. Invalid entry '': Expected white space, '[', '=' ', IN, IS,' ^ ',' * ',' / ','% ',' + ' ',' - ',' & lt; ',' & Gt; ",", ",", "," = ", AND, XOR, or ')' (line 4, column 60)" WHERE ALL "in range (0, length ( Phase) - 1) Where

driver - Why does this device_create() call not create a /dev/ entry? -

I am porting the platform driver code to a PCIe version and I do not understand why I do not < Enter the code> / dev / entry The platform driver code has been modified: stable dev_t first; Stable structure class * square; ATTRIBUTE_GROUPS (my); Fixed int __init my_pci_init (zero) {int ret; Create a class entry in /Sysfs * / if ((class = class_create (THIS_MODULE, "test_driver")) == NULL {pr_err ("Structure class structure" could not be created.); Ret = -ENODEV; Goto exhaust; } Class-> dev_groups = my_groups; To ignore the return value of / * / / / *, create / dev / file system entry: 'Structure Device' is a 'Structure Class' for mapping / (if device (Square, Faucet, First, Faucet, KBUILIDMODAI) == faucet) {Pr_err ("Entry could not be created in '/ dev /' file system. '); Ret = -ENODEV; Goto exit;} else {pr_info (" Created / dev / entry. "); } If ((ret = pci_register_driver (and pci_driver)) If the name of th

How can I output back slashes and double quotes in a Ruby string? -

मैं आउटपुट की कोशिश कर रहा हूं [fish] \ "aquatic animal \" \ n लेकिन निकटतम मैं आया हूं: [मछली] \ aquatic animal @ entries.each do | key, value | "" ["+" + +] "+" \\ "+ value +" \ n "end @entries = {" zebra "= & gt;" पट्टियों के साथ अफ्रीकी भूमि जानवर "," मछली "= & gt;" जलीय जानवर " "सेब" = & gt; "फल"} टीएल; डीआर आप इसे रूबी और उसके सहायक साझेदार का उपयोग करके यह वास्तव में कम और आसानी से पढ़ सकते हैं: @entries = {"zebra" = & gt; "पट्टियों के साथ अफ्रीकी भूमि जानवर", "मछली "= & Gt;" जलीय जानवर "," सेब "= & gt;" फल "} टेम्पलेट = '[% s] \"% s \ "\ n' @ प्रविष्टियां.ईच करें | कुंजी_और_मूल्य | डालता है टेम्पलेट% key_and_value अंत # = & gt; [ज़ेबरा] \ "पट्टियों के साथ अफ्रीकी भूमि जानवर \" \ n # [मछली] \ "जलीय जानवर \" \ n # [सेब]

csv - Ignoring embeded spaces with AWK -

I am searching in an easy way to print a specific field with the permission of the embedded spaces in the field. Sample: field 1 field 2 "field three" field 4 I was able to equalize to 'code' awk '{print $ 3}' Want to be but do not give "Field Three" as a single field. Update: More specifically, the fields should not be received later on $ 3, but the location in # 3 is messing things up $ 3 in the number of spaces between the quotes is the variable What is between quotes as a field, even if not all areas have been cited, I want to be able to cure it. Therefore, if among the quotation marks the fields are ignoring the spaces as a separator. You can do this if there are double quotes always there: awk -F \ "'{print $ 2}' Specifically, I am saying awk that the field is separated from double quotes , The point at which you want it is easily available as field 2. If you want to go to the latter areas, you can split

c++ - Why did visual studio lose all my code? -

I did a CS Lab on the second day and I was working on Visual Studio using the school's public computers. It was in VM on Linux. I ended it, saved it, zipped it and sent it. Now a week later I suddenly got a notification that my source CPP was empty. I have downloaded it from the school's website, which I submitted it and made sure that it is completely empty what happened? It's really bad, can I recover it? I saved it many times, while I was working in a computer lab. I spent the whole day on that lab! Why did not this properly save? Why was it completely empty? Maybe you can go back and try to open it on Linux in VM. (Update) But I think the problem is in return. You said that you have sent your code to the school's website and that place only keeps your copy. We did not know whether there was a problem when the data was transmitted to the server, or when the server was collecting its data on its disk, the next time you work on a public computer, you can us

Shared styling in WPF -

I believe this can be done very easily, but I am a simple newbie, so bare with me . What if I want to create all the TextBlock elements of UserControl, or UserControl, then FontWeight = "bold" and TextAlignment = "Right"? Is there some style that I can set for a TextBlock element within a certain radius, so I do not have to repeat all those properties? If you keep it in your resources, then all your textboxes are the same. style target type = "{x: type text block}" & gt; & Lt; Setter property = "fontwhite" value = "bold" /> & Lt; Setter Property = "Textilement" Value = "Right" /> & Lt; / Style & gt; Alternatively, you can also sub-class from TextBlock (say, BoldTextBlock ) and use it as the target type As can. This is because you can use regular text blocks in the same control as special text blocks & gt; Style TargetType = "{x: Type BoldTextBlock}"

ios7 - Unbalanced calls in iOS 8 -

When I present a Model View Controller on a Navigation Controller in iOS 8, I get the following warning . It works fine on iOS 7. Unbalanced call to start / end transition to be present for UINavigationController This is what I am doing. - (BOOL) Application: (UIApplication *) Application FinishLaunchingWithOptions: (NSDictionary *) launchOptions {... [self. Windows and knowledgeable]; ... [self. Navigation controller present ViewController: self Model View Controller Animated: Not Complete: Zero]; } Before I present the model view in IOS 8, I can see the Navigation Controller for a split second. In iOS 7, I look at the Immediate Model View Controller without warning. How do I get the same behavior in iOS 8? To get rid of the alert, you need to move the code to your first view controller view DIDAppear To see it better, you can consider doing some tricks I had the same problem, and I solved it by displaying my full screen image of the Model View Controller on my

javascript - Fire function after each image is loaded -

Image
I am trying to fill a bid with images and give the size to fit images properly in their size I am The problem is that when the image is not loaded, then the dimension x, y can not be added to the sample from the element. After seeing some examples on stack overflow, I am trying to do this. It does not work ... $ .each (data.data.children, function (i, items) {// some images come with busted links. ..if (item.data.url.indexOf (".jpg")> gt; {var imgTitle = item.data.title; imgTitle = imgTitle; $ ('& lt; div id = "C' + i "ATR" ("Class", "IMGDIVI"). Apendo ("#photo"); $ ("& lt; img / & gt;") etter ("src", item data. ("Id", " Picture "+ i) .attr (" class "," pics "). AppendTo (" #c "+ i) .load (function () {$ (this)) Fidin (" slow "); if (iWidth & gt ; IHeight) {$ ('# pic' + i) Wide (270); $ ('# pic' + i). Hi

SQL how to do a pivot of one column regardless of the data -

I basically need to change more than one line in a line So the basic form Follow me with the result << East> myId apple beer tiger and I want to convert it to apple Bear | Tiger but how can I do this with a pivot, to find out what the outcome of the data is going to be? I tried SELECT * (myTable from SELECT TOP (3) myTable) src PIVOT (myId) myId IN ([1], [2], [3]) PIIT ; but the data is not [1], [2], [3] You can use ROW_NUMBER () for the number of rows, and they can be used to manually convert the fields into fields; with cte as (SELECT myId, ROW_NUMBER) ORDER BY MYId) from RAM mytable) Select MAX (case when RN = 1 then my IDEnd) field 1, max (case when RN = 2 Then my IDEnd) field 2, max (in case RN = 3 then mineind) field 3 whistle; .

ruby on rails - bundler does not vendor/bundle :git source gem -

I am using Bundler version 1.3.5 and Ruby 2.0.0-rc2. When I install command bundle - all my gems are copied to the seller / bundle on my production server, except that the GIMP source has a GIT source. I did not get any errors and the gem is listed and even downloaded when run this command, but it is not in the vendor / bundle folder. All the resources I found are related to the out-date version of the bundler which is this feature, why is it happening at 1.3.5, though? Your "git" gem is stored and loaded from the cache directory I think it's an implementation description is. I found the following note: When setting up gems, the bundler will check the seller / cash and then your system's gems. If no gem is cached or installed, then the bundler will try to install it from sources declared in your jamfile. Then the gem will be downloaded from the seller / cache , then the bundler is going to install it, but it already has vendor / cache , then p

javascript - run bower install for target bower.json file -

Assume that my working directory is c: \ foo \ during script execution. From there I'd like to take the bower from the c: \ foo \ bar \ bower.json file. It is available on NPM by running NPM install - prefix c: \ foo \ bar . Is there a proper command in BOVER? Add a . Bowerrc with the following content from c: \ foo \ : {"cwd": "bar} This will set the working directory for c: \ foo \ bar \ to bover.

prepared statement - JDBC PreparedStatement, UNION Select and parameter passing -

OK, I know the answer is simple and I am feeling very dumb but ... Java JDK 1.7, Sybase JDBC Driver Code snippet: string by & lt; blah blah & gt; Where date1 =? UNION Select & lt; blah & gt; from & lt; blah blah & gt; where date2 =? ';;; Connection conn = ConnectionManager.getConnection (); Prepare the settings stmt = conn.prepareStatement (SQL) ); Logger.info ("Permanent count:" + stmt.getParameterMetaData (). GetParameterCount ()); Stmt.setDate (1 new java sql.Date (date.getTime ()); stmt.setDate (2, not Or java.sql.Date (date.getTime ()); results set rs = stmt.executeQuery (); while rsnext ()) {// the rest of code} So why parmeter only count 1? Program throws an error complaint: java.sql.SQLException: Invalid parameter index 2. If I reduce SQL to any piece Let me decrease the setdate in 1 and then it works fine. With the union SQL runs fine in an interactive SQL session (just filled with a certain date) I just ran int

NSImage's drawingHandler and retina screens -

I understand that to use the following snippet to create images and to assign the contents of the layer of the view , The render block is executed automatically, then when the backing properties of the view were changed, i.e. the window was moved to or from the retina display. [Size with NSI image image: Size is flipped: No drawing handler: ^ BOOL (NSRKR) {CGContextRef const context = NSGraphicsContext.currentContext.graphicsPort; .... back yes; }]; Inside this rendering block, I am trying for another NSIMage center standing. I want to focus it on focusing on the high resolution display, but non-retina does not want to fade on the screen. So I would like to know what is the way to know whether the image is being presented with content scalefactor. It should really be straightforward, but I did not find even after the internet efforts and hours of searching to find out if the image is being provided for retina screen or not. From: CGContextRef The preferred way of

mysql - Design considerations to using Foreign Key as Primary Key -

Any common design idea (good / bad / neutral to use foreign key as a primary key for a table )? Another table? For example, consider the following tables as part of a movie catalog: titles ------ id episode ------- - The episode can be clearly done with both an ID and a title_id, where the id PK and title_id will be unique, but because title_id is already unique, and technically, the episode recognizes, whether the form of PK Will it have anything to use in this? What about general? Your question is basically a description of the technique known as "shared primary key" Accordingly, I have changed two tags about primary key and foreign key with a tag sharing primary key. The shared primary key is a design where PK of a table is also an FK that references the PK of another table. Since the tag wiki indicates a shared primary key, it is useful for one-to-one relations, whether they are compulsory or optional. These relationships are sometimes called IS-A relation

java - StaleElementReferenceException: stale element reference: -

I need to use the folder id from the code: {"folderType" : 3, "Folder": "02.09.2014 11: 57: 28.UTC", "Revised Date": "02.09.2014 11: 57: 28.UTC", "Folder Name": "Enterprise", "Folder ID": "Baebc0fb- 38cb-4300-9bd1-9b98fa622e4a", "widgettype": blank, "enterprise id": "366fc1f1-670d-41bc-905e-bc80accd2537", "parentfolder id": "",} {"folder type": 3 , "Date Created": "02.09.2014 11: 57: 28.UTC", "Revised Date": "02.09.2014 11: 57: 28.UTC", "Folder Name": "Submit", "Folder D ":" 6671c49-9637-488e-9a0e -f7dbf415a542 "," widgetType ": null," enterpriseId ":" 366fc1f1-670d-41bc-905e-bc80accd2537 "," parentFolderId ":" ",} < / Pre> I need to access the folder of 'Enterprise' and 'Enter' f

css - How do I display:none the Feature Image of all my posts for RSS? -

I currently set the feature image for all the positions on my website at display: none When a new post goes to RSS, this feature shows how do I stop it? If this is not possible, then my next question will be, how do I add captions to a post for the feature image? I assume that you are using Wordpress (by the fact that you post "phrase" "And" Featured Image "). It is not possible to apply the CSS rules to your RSS, then the answer needs to be removed by using the filter / verb. The last time I checked that Wordpress did not feature the featured image in the RSS feed by default , So maybe your theme or some plugin is adding it. Disable that feature and you must have all the sets ...

javascript - google geocode address closest to latlng or bounds -

Using geocoder JS objects, trying to search for the closest address of a landing in the I example For, I am passing an address for landing portraits for Ireland and should return an Irish address to another country (or within any county, etc.), but returning a Spanish location ... Can anyone help with this Is? function code address () {var address = document.getElementById ('address'). Value; Var latlng = new google.maps.LatLng (53.2734, -7.778320310000026); geocoder.geocode ({'address': address, 'latLng': latlng}, function (result, status) {if (status == google.maps.GeocoderStatus.OK) {map.setCenter (result [0]. homometry location ); Map.setZoom (15); Marker = new google.maps.Marker ({Map: Map, Location: Results [0] .geometry.location, draggable: true});} and {alerts ('geocode was not following Successful for reasons: '+ status);} document. GetElementById (' lat '). Value = marker.position.lat (); document.getElementById (' long 

html - Stop DIVs wrapping around...> -

I am trying to create project controls like those for Microsoft Project who know it. I have a container div, and then two sub containers are as follows: Each sub container has many internal divisions, for example, for my first sub container The division is: - id, - wbs, - description - start date, - end date, - resource, - etc This is for this. The second sub container will have a gantt chart, so for several days the project can be more than 300 days per day in one day per day. The problem I have is that the sub-container next line when they reach the right hand side of the window how can I stop wrapping it? I have tried: in main container: overflow: auto; Overflow: visible; And then for the sub containers: Display: Inline-block; But as you can see in JSFiddle, it just wraps around the next line. I have gone here on the stack through related posts and it has also gone Gogal but the proposed answer (Mainly overflow and performance) do not work for me: (

r - ggplot within function can't find dataframe passed to function -

I have the following functions that I want to use in datasets to generate density histogram of various features: fraudsplitHist & lt; - Function (dataframe, stat_col, sign_col = 'fraud') {hist_data & lt; - Data Frame [, C (stat_col, sign_col)] colnames (hist_data) & lt; - c ('stat', 'fraud') hist_data $ stat & lt; - winsor1 (hist_data $ stat) # Remove outliers ggplot (hist_data, AES (hist_data $ stat, fill = as.factor (hist_data $ fraud)) + geom_histogram (alpha = 0.5, AES (Y = .. density ..), This error always gives me this error by running fraudSplitHist (dataframe = data, stat_col = '' = 'id =' detection ', binwidth = 1)} However, it works with qplot <('state', 'some_column_of_values') errors in excal (expro, envir, enclose): object 'hist_data' not found "State", "Fraud"), (hist_data & lt; - dataframe [, c (stat_col, fraud_col)] coln hist_data $ stat &

parsing - Using Jodd Lagarto to parse XML -

I am using some HTMLs to parse. In some cases I also use it when I need the process of HTML quickly, but now, I have some XML which I need to process from TagVisitor It looks like Lagorto Can also work as XML (which would be great for me), but ... I'm not sure how to do this. Did anyone use Jodiad LaGorto for XML processing and how? Yes, it is possible to use lagarto for XML. I acknowledge that this is not so clear in the document, but there is a way to enable for parsing. Here's a brief example: LagartoDomBuilder lagartoDOMBuilder = New LagartoDOMBuilder (); LagartoDOMBuilder.enableXmlMode (); Document Doctor = Lagrododbilder. XmlContent; It's all! The method sets several flags to create xmlMode Lagarto parsing XMLs. Anyway, you can also use to parse XML XML! Here's how: Jerry Parser jerryParser = Jerry.jerry (); ((Lagortodambilder) jerryParser.getDOMBuilder ()). EnableXmlMode (); Jerry Doctor = JerryPerson. Pars (xlcctant); Now you can use

How can we take a backup of the application data from the Google App Engine DataStore? -

I have read about the datastore administrator, but it can not be found in the console. Besides, the doctor says that Is the feature experimental? More Explanations: We have an enterprise application, and we should be able to back up our data at a certain frequency. Since we are using Google App Engine, we should be able to back up the App Engine Datastore. When I go to admin console, I can see the option of looking at institutions, I see "dashboard", "query" and "index", but nothing to backup datastore data, something like cloud storage Say it. Also, when I go to the local host: 8000 / datastore, I see it the same. The Datastore Administrator is only available for Python applications - or instead, the application with Python version. If your app is Java, you can put an empty / trivial app on a non-default version. There is a note in the document on this.

google apps script - Condensing similar and repeating code -

I am quite a amateur coder but I have a solution and nothing has come. I am working in Google Sheet and what I am trying to do, adds values ​​of the same rows together in two separate columns. I have tried arrays, but in Array B. I did not get the first Aero to add the first element, so I prepared the code, it works fine, but it is very futile (there are 21 rows to connect with me ) looks like. Would you at least be able to guide me to the right place to dilute it down? var bd1 = data.getRange ("K3"); Var bn1 = data.getRange ("H3"). GetValue (); Var bo1 = Data. GetRange ("K3"). GetValue (); Var BS1 = BN1 + B1; bd1.setValue (BS1); Var BD2 = data. GreyRenz ("K4"); Var bn2 = data.getRange ("H4"). GetValue (); Var bo2 = Data. GetRange ("K4"). GetValue (); Var BS 2 = BN2 + B2; bd2.setValue (BS2); ... One way to know about this is: var add2Cells = function (labelA, labelB) {var cellA = data. getRange (labelA); Va

android - what makes my map fragment loading slow? -

प्रदर्शन संवर्धन: पहले मैंने ALL ड्रॉएबल फ़ोल्डर में छवियां, यह हो सकता है कि यह कारण पहले कि मैप धीमा हो जाए, जब स्क्रीन पर मार्कर खींचें, तो छवि स्क्रीन के आकार में फिट नहीं हो सकती। अब मैंने ड्रॉबल-एमडीपीआई , ड्रॉबल-एचडीपीआई में छवियों को बचाया है और इसी तरह, ऐप पहले की तुलना में चिकनी काम करता है। आशा है कि यह मदद करता है मूल प्रश्न: मैंने एक टुकड़ा में एक नक्शा बनाई है, स्रोत कोड नीचे पाया जा सकता है। नक्शा टुकड़ा सुस्त होता है जब पहली बार यह लोड होता है। अगर मैं किसी भी दूसरे टुकड़े को जाता हूं और मैप के टुकड़े को फिर से दबाता हूं, तो इसे तेजी से लोड होता है और अब कोई स्लग नहीं होता। क्या कोई मुझे बता सकता है कि यहाँ क्या हो रहा है? धन्यवाद! fragment_map.xml, आईडी नक्शा & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8" है? & gt; & Lt; टुकड़ा xmlns: एंड्रॉइड = "http://schemas.android.com/apk/res/android" xmlns: नक्शा = "http://schemas.android.com/apk/res-auto" एंड्रॉइड: id = " @ + आईडी /

authentication - PHP LDAP connection with AD LDS -

I'm trying to write some PHP to ask an AD LDS / LDAP (2012 R2) example and I do not I can get the thing to connect I currently have it installed as an unencrypted connection (Prod will be SSL / TLS). Current Troubleshooting: I can connect and perform with my LDAP example via LDAPark. I can connect via LDP to my windows box I can ping the LDAP server and telnet from my nix box to port. Efforts have been made Tryed URI (LDAP: // Lidsource: 50001 or port is your own) < P> I have rewritten the code in a million times thinking it was a syntax error or something was not passing properly $ Ldapconn is returning "Resource ID # 2", which appears to be correct per PHP manual. I am stumped at this point, can any additional debugging be operational? Here is an error that brings it back: WARNING: ldap_bind (): Unable to bind to server: can not / usr / share / Contact nginx / html / logintest3.php on line 20 Here is the relevant code: & lt; php /

linked list - Java Programing Data field "head" -

In the Java class and in the next program, we need to edit a list, though I understand a part of the instructions. Does not come. Instructions from the homework: In this there is a data field "head" with the data type of the minoid, which is defined as follows: public class Minod & lt EE comparative & lt; E & gt; & Gt; {E element; MyNode & LT; E & gt; the upcoming; Public MyNode (e-commodity) {element = item; Next = null; }} It contains a non-logic constructor which is zero to start the head. I do not understand what my instructor means "head"? Does he mention the list as "head"? Any ideas will help thank you. This looks like the implementation of a linked list where each item (or node) has a next item (Or node) is often referred to as the first item 'head' in a linked list. The instructions are asking you to write a class that contains a variable type MyNode head . Something like this: Public cla

First char of string to upper case: what is more costly to the server? C# -

I have two ways to get the first letter of the string in the upper case, but I would like to know who uses more Server resource? (MVC 5, C #) string test1 = test.ToUpper () [0] + test.Substring (1); or string test1 = cultureInfo. Contentculture. TextInfo.ToTitleCase (test.ToLower ()); Add it to your ExtensionMethods.cs Public Static Class Extension Cases {public static string uppercase suffix letter (string value) • The first letter uppercase in the string is called on this extension. // if (value.Length & gt; 0) {char [] array = value.ToCharArray (); Array [0] = char.ToUpper (array [0]); Return new string (array); } return value; }} According to : This is faster than your first method because it only assigns a new string in the return statement. The first method allocates two strokes: substrings (1), and then a new string with the string. Connaught.

angularjs - How to get a directive's original content when using a template? -

Looking at an instruction with a template, How could the original material get? For example: HTML: & lt; div my-directive & gt; & Lt; Input type = "text" & gt; & Lt; / Div & gt; Directive ('my directive', function () {return {template: '' app '', []): { & lt; Div & gt; Template & lt; / Div & gt; ', Compiled: function (element) {console.log (element.html ()); // output & lt; Div & gt; Template & lt; / Div & gt; // I & lt; How to get input type = "text" & gt ;?}};}); Since you are now It is necessary for display purpose and do not really use it with binding and other materials and it is touched by angular before you need it. You can use the property expression syntax of the template directive. Example: - var content; Template: Function (Lm) {content = elm.html (); // html returns' & lt; Div & gt; Template & lt; / Div> Save;

javascript - Toggle individual divs in a loop -

In submitting data within HTML, which prints a div in the page, for every row found in the database , Clicking on each button to toggle every design, trying to find a way to allow each button to sit (with the default of display: none when loading the page) - Something like this: function toggle_dive (id) {var divelement = document.getEleme ntById (id); If (division.style.development == 'none') divelement.style.display = 'block'; Other divelement.style.display = 'none'; } An example of the last markup: & lt; Div & gt; & Lt; Div class = "virtual" & gt; Word & lt; / Div & gt; & Lt; div class = "numbers" & gt; 1 & lt; / Div & gt; & Lt; div class = "definition" & gt; Definition & lt; / Div & gt; & Lt; Button class = "button" id = "show_example" onClick = "toggle_div ('example')" & gt; Show example & lt; / Button &

ruby on rails - Test failing when trying to run Rspec with Factory Girl -

I am running in an error while trying to add a factory girl to my project which I do not seem to solve Happen. I wrote a test that would check whether my user's first name was empty: # spec / models / user_spec.rb is required 'rails_helper' RSpec.describe user, : Type = & gt; : Models do this 'without first name is invalid' user = factorial Build (user, first_name: zero) is expected (user). (1) .Resource_on (: first_name) End end When I try to run this test with a failure, I get this error: 1) Without the first name the user is invalid Failure / Error: Expect (user). (1) .errors_on (: first_name) 1 errors are expected: first_name, found 2 # ./spec/models/user_spec.rb:7:in 'in block (2 level)' < P> Here's what my factories.rb file looks like: # spec / factories.rb factorygear.Define factory: first_name "John" Last_name "doe" sequence (: email) {| N | "Johndoe#{n}@example.com"} Password "Secr

corona - How can I put a timer in my game? -

I am trying to make a scorer for my game in Corona SDK, but it has no advantage. How can I make a score keeper that connects every second, then saves higher points? I don 't normally just give you such solutions, your problem is small for the future Start with trying to break into problems, how can I show text on my screen? After this, how can I update the text on my screen? And then start looking for ways to update each other. e.t.c. It makes it very easy. - local local score = variable local = score = display. ScoreTxt: setFillColor (1, 0, 0) - The listener, the update score and the update text for your timer local function scorecipper (event) score = "new score" ("Score:", 100, 200, original. Score + 1 scoreText.Text = "Score:" .core end - timer timer.formiform (1000, scorer, -1)

c - What's Causing This Strange Warning When I Compile My Kernel? Passing incompatible pointer type, expected struct * but got struct * -

I hope someone can explain this to me. I am writing my own OS, and writing to the memory manager. When I compile my kernel, I keep getting a strange alert. Warning is quite contradictory for me. The function is getting the type of parameter that is expected, but otherwise if you are complaining. Everything is going well, and I'm able to get information that needs to start my memory manager. Can you tell me what is the reason? $ HOME / opt / cross / bin / i686-elf-gcc -c -ffreestanding -O2 -Wall-extra -std = gnu99 -ggdb- System src / h -o build / kernel .co src / c / kernel.c src / c / kernel.c: in function 'kernel_main': src / c / kernel.c: 29: 2: WARNING: 'memory_manager_initialize' Passing the argument '1' memory_manager_initialize (mboot_ptr); // wtf is the reason for this warning? from src / h / system.h: 39: 0 to the file, from src / h / multiboot.h: 4, from src / c / kernel C: 1: src / h / memory.h: 35: 6: note: expected is 'std mult