Posts

Showing posts from September, 2014

php - MySQL- Unable to jump to row 0 on MySQL result index -

I have found an old site that is displaying an error which is strange because it is untouched for a while Used to be. I get the following: Unable to go to line 0 on mysql result index 8 What is the reason for this and how should I fix it? This is a PHP / MySQL site. If I remember correctly, this error is usually like a code segment: // You probably have the same code as $$ var = mysql_result ($ result, 0, 'column_name'); Where either the query fails or the column is not present, check that $ result is a valid MySQL resource to ensure that SQL is valid , Then make sure that you are actually getting results from the database before calling mysql_result . Or, even better, use mysql_fetch_array instead of getting every column value manually (if many columns are returned from your query).

Recursion in Python without using a local/internal variable -

I am not posting my exact problem in order to avoid space sake and confusion, but instead of identifying one I In the Python, print the sequence of numbers backwards. Restraint is that I should use recursion, and I should not have any local variables inside my function. For example, if the number 8 is given for the given function, then I want to print it 1,2,4,8. Also assume that the input is an integer, please. def function (x) If (x! = 1) x = x / 2 I have dispelled my mind for a while, But I can not find anything that will actually print the final value (i can only achieve it to output 1,2,4) def function (x) if (x! = 1) x = x / 2 function (x) print x, code above 1,2,4 Prints, given that x is 8 in the beginning. However, if I put a recursive call anywhere in front of the "x = x / 2" line, then the value of x is constant 8 How can I accomplish everything I am trying to do? I'm sure there is something simple that I see, but I do not know how it is.

Couchbase share views among developers (import/export functionality) -

First of all, this question really proves to be a lot for me for a Stackoverflow post requirement. However, after executing several Google searches for information, I was lost while trying to learn about Couchbase . In Couchbase (I'm using 2.2 Community Edition), how do I share ideas among developers? Is import / export functionality available? If not, what does the purpose of Couchbase mean for developers to share ideas that are used without manual copy / paste? It is clear that the code, which will be written by a development team for the question of Couchbase, will require the correct visual names. How can it be possible to develop a Couchbase DB with a Couchbase locally as a team without having to send a view file to the developer? I'm sorry, if I'm a bit disappointing or harsh here, but if it's not possible to share ideas between many developers, then I do not know that developers trying to share Couchbase database configuration How to be a viable DB solut

java - What is the equivalent of an hdp:configuration in Spring Boot annotation? -

I want to be able to use HBase with spring. I can see that there is something in the documentation that says: & lt; Hdp: Configuration & gt; fs.default.name = $ {hd.fs} mapred.job.tracker = $ {mapred.job.tracker} hbase.zookeeper.quorum = $ {hbase.zookeeper.quorum} & lt; / Hdp: Configuration & gt; How can I use this program in my application.java? Using HBaseTemplate does not seem to be a sample or document to connect to the hbase. There are no hbase-related examples by looking at the following repositories recommended in any other post: "post-text" itemprop = "text"> Currently I have not got an annotation-based configuration for the HDP: configuration, but instead for my Spring-HDP project, I used a thup-context for an XML for the headop configuration. XML is created in the form of and it has been imported like Config.java @configuration @portal resources ("Thup-context.xml") public class conference {@ Etowar Pvt. Or

jquery - datatables 1.10 add.row() not working within ajax response -

डोम निर्मित तालिका के साथ एक डाटाबेस 1.10 का उपयोग करना। मैं एक एजेक्स प्रतिक्रिया के भीतर डेटा की एक नई पंक्ति जोड़ने का प्रयास करता हूं, फिर भी कुछ भी नहीं होता। वही कोड स्वयं (कोई एजेक्स नहीं) पूरी तरह ठीक काम करता है। हां, response.success 'सत्य' लौट रहा है। // यह काम करता है और तालिका में नई पंक्ति जोड़ता है $ ('# परीक्षण')। ('क्लिक', फ़ंक्शन () {dt.row.add (['td0', 'td1', 'td2', 'td3']) .draw ();}); // समान कोड एक एजेक्स प्रतिक्रिया के भीतर काम नहीं करता ... $ ('# dtCreate')। पर ('क्लिक', फ़ंक्शन () ($ {।। एएक्सएक्स ({प्रकार: 'पोस्ट', यूआरएल: '/ टेस्ट / प्रोसेस / पी_ डी बी_एरेपी.पीपी'}) किया गया (फ़ंक्शन (प्रतिक्रिया) {// डबल चेक रिस्पांस console.log (प्रतिक्रिया); यदि ( Response.success) {// पंक्ति जोड़ने के बाद से यह सर्वरसाइड dt.row.add (['td0', 'td1', 'td2', 'td3']) नहीं है। ड्रॉ () ... ... नीचे और कोड ... टीडी को डेटाटाले द्वारा शुरू किय

c - Is naive ladder logic better than factored logic? -

एसएसबी newb यहाँ ... मैं एक नियमानुसार दो कार्यान्वयन का परीक्षण कर रहा हूं जो नेस्टेड लॉजिक : एक सरल कार्यान्वयन और एक जहां मैं चालाक रहा हूँ, कुछ शाखाओं को हटाने का प्रयास करने के लिए। मैं जीसीसी विकल्पों के साथ 'जीसीसी (उबंटू / लिंडारो 4.6.3-1 बुन्तुउ 5) 4.6.3' एक्स 86 मेरॉम का उपयोग कर रहा हूं '-फ़ीटक-गणित-फोमेट-फ़्रेम-पॉइंटर -मिसेफ़ेम्प- mfpmath = sse -msse2' कोड निम्नानुसार है: #define math_sign (a) ((a) & lt; .0f? -1.f: + 1.f) इनलाइन फ़्लैट math_interp_clamp (फ्लोट ए, फ़्लोट ढलान, फ्लोट लक्ष्य ) {#if 0 // 5 instr, 1 शाखा फ्लोट बी = ए + ढलान; वापसी ढलान & gt; 0. एफ? (बी & gt; लक्ष्य? लक्ष्य: बी): (बी एंड एलटी; लक्ष्य? लक्ष्य: बी); # एल्स // 1 9 इंस्टा फ्लोट बी = ए + ढलान; वापसी (बी - लक्ष्य) * math_sign (ढलान) & gt; 0. एफ? लक्ष्य: बी; # एडीआईफ़} मेरे ifdef सक्षम के साथ मुझे मिल रहा है: math_interp_clamp: .lfb505: .cfi_startproc comiss .LC7,% xmm1 एडीएसएस% xmm1,% xmm0 jbe .L44 minss% xmm0,% xmm2 movaps% xmm2,% xmm0 ret .L44: maxss% xm

java - Handling ANSI codes in JTextArea -

I am implementing a new tool that supports serial communication using the RXX library. My environment is here: The user interface has been given to execute the command and display the input from the serail connection. Here's my problem: When I'm reading data from a serial port, it was printing some sample characters like: 0 [m, & lt; -m ... which I do not have to print in the terminal. Then how to restrict those values ​​from my serial reader. This is my code to read data from inputstream which is in the serial port (serial port event and) function. int length = input.available (); Byte [] array = new byte [length]; int numBytes = input.read (array); For (int i = 0; i Thank you in advance You need to set up from the environment variable TERM your system knows that your terminal is a very basic one

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

I have performed a linq query using Entityframework as below GroupMaster getGroup = Null; GetGroup = DataContext.Groups.FirstOrDefault (item = & gt; keyword.IndexOf (item.Keywords, StringComparison.OrdinalIgnoreCase)> = 0 & amp; amp; item.ISNAmd) I found an exception like the method when executing it LINQ units do not recognize the 'Inter 32 index of (system string, system. String compromise)' method, and This method can not be translated to Store expression. Includes () method is sensitive by default, then I need to convert to minimize. Is there any method in which a string match match is examined and whether there is any method to solve the index question of the method? You actually have four options Databases globally Change the colon of it can be done in many ways, a simple Google search should reveal to them. Change the mix of individual tables or columns. Use a stored procedure and specify the call statement on your query Perform

awk - Unix: Grabbing dates from file and sorting them -

I have several files that look like this: // file start $ Thing1 = {'item1' = & gt; '0', 'item2 = & gt; '3', 'MadDet' = & gt; '2013-10-01'}; $ Thing2 = {'item1' = & gt; '0', 'item2 = & gt; '3', 'MadDet' = & gt; '2012-11-01'}; $ Cheese3 = {'item1' = & gt; '0', 'item2 = & gt; '3', 'MadDet' = & gt; '2014-12-01'}; // File Termination Using Unix, what is the best way to catch all the items in a file of stars? I know that the item that I am looking for in the file {somethingDate = '1111-11-11'} From this' 1111 -11'11 'file will contain more than one file requesting entries, and two files will contain many' fileTwoDate 'entries etc. My goal is to take all these dates, which are '* dated', remove duplicates, and sort them into the output file, which is quite easy using sort com

How to implement Google Drive and Google Plus sdk in ios project -

I am starting in iOS. Is there a way to integrate both Google Plus and Google Drive in iOS? Thanks Of course, at this time there was a Google Developer Live Video sometime ago :

javascript - Binding radio buttons to array of objects -

मेरे पास मेरा दृश्य मॉडल है: फ़ंक्शन (डेटा सेवा, व्यक्ति) {var लिंग = ko.observableArray (); Var भाषाओं = को.ओब्सबलएर्रे (); Var person = ko.observableArray (); फ़ंक्शन सक्रिय करें () {dataservice.getGenders (लिंग); dataservice.getGenders (भाषा); } Var vm = {लिंग: लिंग, भाषाएं: भाषाएं, व्यक्ति: व्यक्ति}; } फ़ंक्शन व्यक्ति (व्यक्ति) {var firtstName = person.firtstName; Var familyName = person.familyName; Var लिंगआईडी = व्यक्ति.genderId; Var languageId = person.languageId; } यह स्पष्टता के लिए सरल है उसके बाद मेरे पास मेरे 'लिंग' डेटा सर्वर से है, ऐसा लगता है: [{$ id: "1", लिंग आईडी: 2, लिंग नाम: "महिला मेरे पास भी भाषाएं है जो इस तरह दिखता है: कोड> [{"$ id": "1", "LanguageId": 2, "भाषानाम": "अफ़ार", "भाषाउद्देशन": "अफ़ार", "लैंग्वेज कोड": "एए"}] मैं जो प्राप्त करने की कोशिश कर रहा हूं वह डेटा दृश्य के रूप में मेरे दृश्य मॉडल से लिंग सरणी को बाध्

c++ - Release Interface pointers -

I, in some smart signal class desiccator, have declared the member variable within a class to free this interface The code, which is better, is: Members varible CComQIPtr & lt; IMyInterFace & gt; m_pMyInterface; constructor m_pMyInterface.CreateInstace (CLSID_MyInterface); Destructive in if (m_pMyInterface) m_pMyInterface.Release (); Or should it be if (m_pMyInterface.p = zero!) M_pMyInterface.Release (); The above form which is a better one and the way I am using interface pointsers there is a flaw. Tom ~ CComQIPtr The Destructor takes care of everyone to explicitly release you There is no need to do so, if you want, to reuse the variable, you can do either of the two: m_pMyInterface.Release (); m_pMyInterface = Zero; With zero (operator = CComPtr , with CComQIPtr may be unclear) Works) check is not required, the CComQIPtr :: release method does this anyway.

java - How to use CONCAT_WS() in Hibernate HQL -

एकाधिक स्तंभों को एक के रूप में संयोजित करने के लिए, SELECT id, CONCAT_WS (',', Field_1, field_2, field_3, field_4) `तालिका` से सूची; यह क्वेरी SQL में ठीक काम करती है लेकिन यह मुझे HQL में त्रुटि देता है: त्रुटि है (java.lang.IllegalStateException: नोड के लिए कोई डेटा प्रकार: org.hibernate.hql.internal.ast.tree.MethodNode) मेरी मदद कृपया क्या गलत पता लगाने के लिए मैं पता करने के लिए किया था, मेरी मदद करो नीचे HQL में CONCAT_WS () का उपयोग करने के लिए कैसे कैसे मैं अपने HQL क्वेरी लिखा का चयन करें C1._URI, C1.HEALTH_FACILITY, C1.DISTRICT , CONCAT_WS ( ',', C1.BLOCKS_OF_BHUBRI, C1.BLOCKS_OF_GOLAGHAT, C1.BLOCKS_OF_HAILAKANDI) Block_name रूप GapAnalysisWashInHealthFacilitiesCore सी 1 से किसी भी मदद सराहना करेंगे CONCAT_WS मेरे एसक्यूएल के लिए विशिष्ट फ़ंक्शन है HQL एक सामान्य भाषा है और मूल एसक्यूएल फ़ंक्शंस और सिंटैक्स से अवगत नहीं है। यदि आपको वास्तव में फ़ंक्शन की आवश्यकता है, तो आपको स्थानीय SQL के लिए हाइबरनेट के एपीआई का उपयोग करना चाहिए

qt - QtQuick2: Applying GLSL shader/graphical effects to Window elements? -

I'm testing the GUI possibilities using QtQuick and QML, but I'm looking for information in implementing the GLSL shadow effect The problem is happening in the window itself, for example, suppose I want to create a full-screen application that simply blocks everything behind the window; As you move the application window in front of your desktop, everything behind the window will be affected by the shader, and if you maximize the app, the whole screen will be affected. In the official QtQuick5.2 documentation, they specify to apply an image element to do so, they make a version and use the image from the id. I have tried to mention the 'id' property of my 'window' QML element, but it does not work (the result is in a black window because the shader fails to process properly). There are also modules in which some good effects are produced, but I do not have much luck to apply those effects on the window. So, with QtQuick2.2 and QML, is there any way to &#

html - White lines between divs -

Image
I'm trying to do a basic layout for a website. But I have two problems: I am getting empty space between my devices, I have already set margin and padding to 0. I can not use% to set up weeks, I have to use VH for some divisions and I do not understand why. Bella: HTML: & lt; body & gt; & Lt; Main id = "stora" & gt; Stora & lt; / Main & gt; & Lt; Navigation ID = "Navigation" & gt; & Lt; Ul & gt; & Lt; Li id = "ettan" & gt; & Lt; A & gt; InDeningsPepread & lt; / A & gt; & Lt; / li & gt; & Lt; Li id = "tween" & gt; & Lt; A & gt; Instagram & lt; / A & gt; & Lt; / li & gt; & Lt; Li id = "trean" & gt; & Lt; A & gt; Contact & lt; / A & gt; & Lt; / li & gt; & Lt; Li id = "fyran" & gt; & Lt; A & gt; Levance & lt; / A & gt; & Lt; / li & gt; & Lt;

c# - Send complex data from Javascript -

I have a WPB application with a WebBrowser control that displays the webpage with JavaScript. Javascript, I can call the C # function. I do not use "Window.External" because I will use Xeramin to make cross-platform. window. Works with external webbroader objects. On iOS, that window will be another object (UIWebView I think) that window. Does not support external. So I call the function via URL: window location.href = 'myApp: // myFunction? Ultimate 1 = '+ Ultimate 1; It is working, but now I have to do complex data parameters (for example a config file.), But the URL size seems limiting ?? | Is there any way to do this? Do you know how this is done with PhoneGap for example? Is it possible to modify the webpage header using javascript? You can use AJAX, which is a javascript feature, which allows you to connect to your server and Allows to transmit data interactively. To make it easy for you, you can add the jQuery library to your webpage, whi

ruby - How to dynamically and efficiently pull information from database (notifications) in Rails -

I am working in Rail application and need a solution below. I am taking some time consuming processes in the background using the Sidekiq and saves related information in the database. Now when each process is completed, we will get the Would like to show the notification in a different area that the process is complete . Therefore, the information sector needs to actually pull things from the back (this information area will be available in every page) and show it dynamically, I thought Ajax should be an option . But, I do not know how to trigger it for a particular area or there is another option through which the client can efficiently obtain dynamic content from the server without much traffic. I know that this will be a broad topic that tells about it. But any relevant information will be appreciated. Thank you :) You are viewing an endless connection (either using SSE or Websockets) You are looking for "live" connectivity: > "Live"

c# - How to check if message has attachments (MailKit) -

I am using IMAP4 client: mailkit. It does great work, but I have a problem knowing that there are attachments in the message or not. I have tried: var summary = inbox.fet (message id, message notification body, cancel token) .FirstOrDefault (); Var body multipart = summary. As BodyParty Multipart; If (BodyMulti Part = Faucet) {foreach (Body Multipart. Participate in bodyparts, where (x => is bodypartic bassic)) {BODYPART BASIC BASIC PARTY = BODY PARTY BODYpartBassic like; If (Basic Page. Content Disposition! = Null & amp; Basic Page Content Dispute.IsHment) {// Add Original Part as Attachment}}} But some messages (Example : Message content is null . message notification using Try to do the bodystructure instead of MessageSummaryItems.Body. Compared to body body, know more information for each body part. I think that the dissection header is one of those extra things, which comes from the body of a body of physiology. Hope that helps.

html - Get contents Attribute Value pairs using BeautifulSoup or XPATH -

For the following XHTML snippets, I use the attributes value combinations with structured HTML, using BS4 or xpath to get the attribute name The H5 is present in the tag and its value is either low in the SPAN tag or AP tag. For the code given below, I should get the following output as a dictionary: Husband management: 'Animals: Cow farmer: Mr. Smith,' < p> Milk range: 'milk supply' Services: 'cow's milk, ghee' Animal color: 'red, brown ...' & lt; div id = "animalcontainer" class = "container last fixed height" & gt; & Lt; H5 & gt; Husband management & lt; / H5> & Lt; Period & gt; Animals: Cows & lt; / Span & gt; & Lt; Period & gt; Farmer: Mr. Smith & Lt; / Span & gt; & Lt; H5 & gt; Lactation category & lt; / H5> & Lt; P & gt; Milk supply & lt; / P & gt; & Lt; H5 & gt; Services & lt; / H5> & Lt; P & g

xslt - make sth in/visible in XML/XSL -

मैं एक तालिका अदृश्य बनाऊँगा, जब कोई विशिष्ट td पाठ से भरा नहीं होता है। / P> यहां मेरा XML है: & lt; weitereAnmerkungen & gt; & LT; तालिका & gt; & LT; thead & gt; & LT; टीआर & gt; & Lt; th & gt; वीइट्रे अन्मेरकुंगन & lt; / th & gt; & Lt; / टीआर & gt; & Lt; / thead & gt; & LT; tbody & gt; & lt; tr & gt; & lt; td & gt; गहहिलफ़ी, रोलस्टहल आदधुस डफ़ुएएसएसएफ फॉर सफ़ल फ्रेड एफ asdf एडी एफएएस एफ एस एसडी एफएसएएफ एडी डीएफ एडीडी एएसडी एजेडी के रूप में ghjffjjfjjjjfjjfjjffjghjgfhjghjgfhj ghjf ghj ghj gh gf & lt; / td & gt; & Lt; / टीआर & gt; & Lt; / tbody & gt; & Lt; / तालिका & gt; & Lt; / weitereAnmerkungen & gt; मेरा XSLT: & lt; xsl: टेम्पलेट मैच = "n1: weitere anmerkungen" & gt; & Lt; xsl: यदि परीक्षण = "एन 1: तालिका / एन 1: टीडीआई / एन 1: टीआर / एन 1: टीडी" & gt; & Lt; xsl: लागू-टेम्पलेट / & gt; & Lt

XSL Transformations in CouchDB -

क्या XSL ट्रांसफ़ॉर्मेशन में एक list function में करना संभव है CouchDB ? इसके बजाय असंभव लगता है, क्योंकि var xsltProcessor = new XSLTProcessor () जैसा कोई ब्राउज़र के संदर्भ के बाहर नहीं किया जा सकता। क्या कोई तरीका है? अगर आप कोचडीबी सर्वर को नियंत्रित करते हैं, तो निश्चित रूप से एक तरीका है। CouchDB प्लगेबल क्वेरी इंजन का समर्थन करता है, ताकि आप एक क्वेरी इंजन को कोडित कर सकें जो किसी प्रकार के XSL रूपांतरणों का समर्थन करता है। मुझे लगता है कि डिफ़ॉल्ट स्पाइडरमॉकी-आधारित क्वेरी इंजन बॉक्स के बाहर इसका समर्थन नहीं करता। मुझे लगता है कि एक प्रयोगात्मक नोडजेएस-आधारित क्वेरी इंजिन फ्लोटिंग है जिससे बेहतर हो सकता है।

php - Reorder list of locations, based on distance to current GPS position -

I have a website that has a list of locations. I want to keep the default selection as the location closest to the user's current location. I know how to use the current GPS location Javascript, but the problem is that getting the location takes some time, and I want to display the form immediately, and just re-order / Select the closest item when (or if) the location is retrieved. I have never used the jacquery - can anyone give me some initial help? / P> The locations are stored in a MySQL DB and I use PHP to retrieve data. If you want to receive it, then you should follow these steps: Select all the locations in the database with their coders. In user location cord store session Select all the locations from the database in an array and rearrange it by using the function below (Sessions from User Cores and Databases Select the new display from Arra y result original post var rad = function (x) ) {Return x * Math.PI / 180; }; Var getDistance = func

php - Autocomplete in yii2 -

In Yii2 I want one of my input fields to be auto-complete, when the user starts typing Please. Below is my code which joo autocomplete . & lt ;? Php $ items = ArrayHelper :: Map (Company :: Search () - & gt; All (), 'c_id', 'name'); Copy autocomplete :: widget (['model' = & gt; $ model, 'attribute' = & gt; 'company', 'customer option' => ['source' => $ item,] ,]) ;; & Gt; This is not working. When I printed my array, I Aare ([1] => abc [2] => CIG [4] => pqr) I had to work while setting it manually $ items = ['abc', 'xyz' 'pqr']; Could it be that my c_id's order has not been given? But I have to submit the c_id value! Any ideas how to fix this? This can be solved with the help of a hidden field input. anyone! & lt ;? Php use yii \ web \ JsExpression; $ Data = company :: search () - & gt; (['Name as name', 'name as l

driver - Failed to debug via android device -

Image
Why I tried to launch my app through an Android device, I got an error like the image below 1º Re Driver Driver 2D Active Debug Mode (Device) Allow 3D DBB Debugging

python - Django Rest Framework ModelSerializer Set attribute on create -

When creating an object I initially use the logged-in user to specify the model field 'owner' I am Model: class account (models.Model): id = models.AutoField (primary_key = True) owner = model. Forwardkey (user) name = model.carfield (max_length = 32, exclusive = true) Description = Model.Carfild (Max_Langu = 250, empty = True) To set owner Serializer: Class Account Operator ModelSerializer): Class Meta: Model = Model. Account field = ('name', 'description') def restore_object (self, attrs, example = none): example = super (). Restore_object (attrs, example) Request = self .context.get ('request', none) Setter (example, 'owner', request.user) Example of return In my system It is possible to update the account of another for a different user, but the original user should be owned. Obviously the above breaks down because with the currently logged in user the ownership over the update will be overwritten. So I updated it like thi

jquery - Javascript change colour of divs, and then colour of the div's focus -

I am creating an html forum and using javascript to change the color of the stage, I have three divis Is a blue, green and red When every div is clicked, the color of the javascript elements will change I have the .css in javascript I want to change the focus of the submit button with the () function, but the focus portion does not work this Not my javascript code: $ ( "# green"). Click (function () {$ (".mailheader"). CSS ("background", "# 3d300"); $ ("submit.") CSS ("background", "# A3D 300 "); $ (" Submit: Focus "). CSS (" Background "," # 98 CFF 00 ");}); css ("background", "# 00b4ff"); $ (". Submit") CSS ("background", "# 04A6A9");}); css ("background", "CSS" ("background:", "submit: focus" Css ("background", "# ff0000"); $ ("Submit: Focus"). CSS (

android - Titanium Appcelerator push notification callback called more than once -

I have been able to register mobile devices and subscribe to a channel in titanium. When the mobile device receives 2 push notifications and the user clicks on any of them Callback is called twice How do I know which notification was clicked on Was or did I know that the total number of push notifications is pending? var needs cloudpipe = ('Clappash'); //CloudPush.singleCallback = True; // Start the module cloud pipe. RetrieveVisionCon ({Success: DeviceTokel Security, Error: DeviceTrackerError}); // Enable push notifications for this device // Save device token for later API call function DeviceToolSoot (E) {//CloudPush.enabled = true; Device Tokens = E.Device Talk; subscribeToChannel (); // sendTestNotification (); } Function deviceTokenError (e) {// warning ('Failed to register for push notifications!' + E. terror); } // trigger when the push notifications are in the tray, when app cloudPush.addEventListener ('trayClickLaunchedApp', function (evt) {

html - How to make panel header clickable with bootstrap? -

Image
I am trying to create a website for mobile, and I want to click the collapse box and not only the text . I uploaded the site. Thanks in advance OK Here's an alternative solution, the easiest way Display: Block is assigned to its a element, and then click the area to be clickable on width and & amp; height in pixels but the fixed width and height can affect sensitive nature. A more advanced and flexible way is to change a little HTML structure so that the value of a is inside the panel and then add display: block Instead of setting the width and height you can use percentages, because the size of the clickable zone handles the panel. with fixed size.

mysql - Best structure for memorizing user details and preferences -

I have a domain where each user has some information such as height , weight < / Code>, eye color , hair color , ... about yourself, and your ideal partner ( favorite height Very similar data about) , preferred hair color , ... ). I have to respect the user's characteristics and their preferences, keeping it in mind, what is the best structure in terms of functioning? I mean, I can design like a table: Description (ID, height, weight, eyes, ...) and a user table: A table extension (ID, type, value) and an included table like user (id, ..., description_id, preferences_violence_id) or . There are also other ways. What do you choose and why? is a little late for a comment. I decided to stop this question in particular because you are asking for an opinion and explanation. You should review the question on the stack overflow. In addition to that, you have crushed in the area which can almost be a subject of religious zeal. Strong "relatives&

css - Customizing Datepicker JavaFX 8 -

How do I customize CSS in datepicker JavaFX 8? I need to remove light blue shade or define brown light. Thank you. datePicker is a comboboxbase when the background of the light blue shadow is centered: . Combo-box-base: centered {-fx-background-color: transparent; } Will make a job. By T

mysql - Confusion regarding INNODB locking -

When I run 'Select from the table' on an INNODB table, does the table lock become insensitive? Does this mean that during the time, MySQL takes the result set back, can not I issue an update statement in the table? The entire table will be locked in shared mode as I have understood, until the result is not returned to the set, the update command can be executed only after that. INADB uses a feature. Locking in shared mode is not necessary, because MVCC will keep the version of the previous version of your SELECT statement if necessary Be able to Then the answer is 'no', while updating a SELECT statement, there will be no need to lock a row while updating. This is, as long as this particular SELECT statement like SELECT .. FOR UPDATE is.

facebook - What is the nomenclature for idpost Fb? -

Where can I get naming for FB ID posts and comments? Why is it sometimes an ID id? How can you do this? You can (in part) mention the FQL table documents for: Post: If post_id has underscores, then the first part is the user's user ID which has the second part ID of the object < / Li>

java - Return random boolean and use to guide an "if" statement -

I'm researching how to return a random boolean and then "if" to make the statement "if" i understand Can not come out how to use the structure or the sentence structure. Private random random; Public zero mousePressed (MouseEvent e) {fixed Hit (); If (random = true) {// display correctly //} and {// display false} // private boolean fixed hat () {random.nextBoolean (); } How can I get my method of returning to boolean and then plug it back into the main body of that method? Thanks private random random; Public Zero Mouse Mouse Pressed (MouseWave E) {Boolean Hit: Results = Fixed Hate (); If (hitResult) {// actual display //} else {// display false} // private boolean fixed hit () {random.nextBoolean (); } Since a if () requires a Boolean result, then the == true lies in it, obviously Code is not required Just make sure that you have done the random in the constructor for an example before using it.

How to increase brightness in a particular region in android -

The Bwlow code is increasing the brightness of the entire screen but I am taking a special area in XML (like taking a 100 * linear layout * 100), and I do not want to increase the brightness of that particular (linear layout) area only on the whole screen I am getWindow () SetAttributes (l); WindowManager.LayoutParams l = getWindow (). GetAttributes (); Lll8.screenBrightness = 1.0f; . GetWindow () setAttributes (L); Use two layouts and set two different alpha values ​​for them so that different brightness Levels can be achieved by a single screen. Another way is to use the gradient texture (shade with color in color, which you want less brightness), place it in a drawer folder and insert it in XML and align it on top mother-father. Hope you have code to set the brightness.

cross browser - What is Universal Google Analytic custom dimension character/byte limit -

मुझे पता है कि सामान्य GA डेटा को 1 पिक्सेल .gif अनुरोध डेटा जहां कस्टम मान [चाबी, मान] जोड़ी की संयुक्त लंबाई अधिकतम निर्धारित आकार था एक सीमित कारक या तो पुराने ब्राउज़र्स थे जो अधिकतम बाइट थे (यकीन नहीं, लेकिन मैंने मान लिया था कि यह सभी मानों के लिए 2048 बाइट था)। मैंने यह भी मान लिया है कि इसे यूटीएफ -8 (वेरिएबल-लम्बाई मल्टीबाइट एन्कोडिंग) में एन्कोड किया गया था, जहां वर्ण लंबाई में 1-4 बाइट्स ले सकते हैं। कुछ समय बाद मैंने पढ़ा है कि कस्टम मान के लिए अधिकतम वर्ण सीमा 150 वर्ण है। उस समय मुझे किसी भी बेहतर जानकारी की आवश्यकता नहीं थी। यूनिवर्सल जीए कुंजी भाग GA सर्वर में संग्रहीत है और कभी भी नहीं भेजा है। अगर मैं गलत नहीं हूं, तो प्रत्येक कस्टम मान में एक अलग अनुरोध होता है। ga ('create', 'UA-xxxxxxxx-x', 'xxx'); जीए ('सेट', {'आयाम 1': '...', 'आयाम 2': '...', 'आयाम 3': '...', 'आयाम 4': '...', 'आयाम 5' : '...'}); Ga ('भेजें', 'पृष्ठदृश्य&

ruby on rails - How set external gem into project using svn? -

Image
I need to add gem to the vendor folder as an external folder. The path to add gem / vendor / gem_name . I try to do this, but it removes all the other exterior and adds my gem :( I need to add this gem to the existing external list. How can I ? I use external RubyMine: Right click in the folder , Then select 'Subvision' and 'Edit Property', and add gem with its SRN path. and run svn up after this action. PS but I still do not know that I use the terminal How can I do this?

Java Swing create a Text Area for the Output -

Hello, I'm really new to Java programming and I've created a Java menu with a few options as well as the file selector. So in my IDE, I print the file name and path of the file that the user chooses. Is there any way that I can create text fields on my frame so that the user can see the actual output? This is how my file selector looks and how I output the results on my console. Jeffile Chupper Selector = new Jeffile Closer (); Filef = new file ("C: /"); File named; File namespace; Chooser.setCurrentDirectory (F); Chooser.showOpenDialog (zero); Chooser.setDialogTitle ("Choose File to Play"); Chooser.setApproveButtonText ("Play"); Named = chooser.getCurrentDirectory (); Namepath = chooser.getSelectedFile (); System.out.print ("The name of the directory is" + nomir.getName ()); System.out.print ("The name of the path is" + namepath.getAbsolutePath ()); And here is the code for my menu JFrame frame = new jframe ("menu

ruby on rails - "Template is missing" error in the official RoR tutorial -

Please help understand this rendering error at section 5.3 to get official Ruby on Rail Initial tutorial () Make plain to create a DRF: Paramos [: Articles]. End end This code should refer to a hash of the parameter as mentioned, but it is an object for the existence of a related template. template is missing error looks like missing template article / create, application / {: locale = & gt; [: En],: format = & gt; [: Html],: handlers = & gt; [: Erb, builder: raw,: ruby, jbuilder, coffee]}. Search in: * "C: / Site / Blog / App / View" < Code> Render Text: of the equation ?

ios - is it possible to play avaudioplayer in background mode? -

I am applying an alarm, after app eating in the device, I save an alarm in my app after app And I'm closing the app. When the alarm is coming, its bell does not ring, but at the time the update is calling the method that I am getting the information. After that I set another alarm and I keep the app open at that time, even after watching the alarm sound and a warning, all alarms are coming in background mode with sound. I changed the required background mode to info.plist and I am doing this even in coding NSError * setCategoryErr = nil; NSError * activationErr = zero; [[Avidio Session Shared Instance] Set Deliaget: Self]; [[Avidio Session Shared Instance] Set Category: Evaluation Character Playback Error: & amp; Set category ARR]; [[Avidio Session Shared Instance] Set Active: Yes Error: & amp; Activation ARR;]; Please tell me what should I do?

scala - what's the difference between {} and () when using filter? -

To filter a list using the function of the filter, if it uses {} , But if it is used () then it has failed, but why? scala & gt; Sea Race 25: List [(Int, Int)] = List ((1.0), (3,2), (5,4)) Scale & gt; D res26: list [(int, int)] = list ((1,0), (3,2), (5,4)) scale & gt; Val d = b.philter {case (x, y) = & gt; Y% 2 == 0} d: list [(int, int)] = list ((1,0), (3,2), (5,4)) scale & gt; Val d = b.philter (case (x, y) => y% 2 == 0) & lt; Console & gt ;: 1: Error: Valid start of valid expression val d = b.filter (case (x, y) = & gt; y% 2 == 0) ^ You are not using a simple expression. Your first form with {} scala> Is a shortcut for D.filter ({case (x, y) => y% 2 == 0}) res177: list [(int, int)] = list ((1,0), (3, 2), (5, 4)) You can leave () but not {} . It is not necessary to use edit case . You can see the scala.Tuple2 : scala> Can reach. D.filter (t = & gt; t._2% 2 == 0) res182: list [(int, int)] = list ((1,

Illegal string offset when printing array values in PHP -

Many similar problems and solutions did not help me. I'm getting a strange error message WARNING: Invalid string offset in 'officeName' ... and var_dump of variable variable generates looks like this: Array (10) {[officeId "] => string (5)" 11237 "[" officeName "] => string (37)" Pro Office Inc. "} The code that generates errors is: foreach ($ objects $ key => $ value) {var_dump ($ value);} Then $ value is an array what I am doing and how can I fix it, its What is wrong with? each , because one of these items There may be an array, but there can be something that is not. In such cases, it is always better than var_dump () whole $ objects array instead of each item , Because it is easy to find any errors. In addition, invalid string offset error usually indicates that Ing do are trying to behave as an array and / or use of the keys, which are not present.

java - OpenJML with generics? -

I have a class Edge.java . When I run it through OpenJML, this happens: Error: An internal JML error occurred, possibly recoverable. Please report bugs as much as you can with reason: com.sun.tools.javac.code.Symbol $ TypeSymbol can not be entered for com.sun.tools.javac.code.Symbol $ ClassSymbol The strange thing is, My jdk is 1.7, openjml is turned on (to make sure both have been downloaded again). This is the command to use for running openjml (after example from the site): java -jar "E: \ Downloads \ openjml \ openjml.jar" -esc -prover z3_4_3 - Exec "e: \ Downloads \ z3-4.3.0-x64 \ bin \ z3.exe" -noPurityCheck Test.java EDIT: I can confirm that with a lot of generic Simple classes can also cause this error: Public square test & lt; T & gt; {TI; } Edge.java Public square edge & lt; K & gt; Applied comparative & lt; Edge & lt; K & gt; & Gt; {Public K N1, N2; Public full weight; Public Ultimate IT Tiebraker;

sharepoint - xslt condition for multiple line of text column -

I have a problem displaying description column data from the list in the data view web part. In fact, a column in the name of the description type of this column in my list has several lines of text that I want, if the length of text in description columns is more than 20 characters then only 20 characters should be displayed or otherwise all characters are not displayed Will be done. I have written the following xslt to do this. & lt; Xsl: select & gt; & Lt; Xsl: when test = "string-length (description) & gt; 20" & gt; & Lt; Xsl: Select Value = "Substring (@ Description, 1, 20)" /> ... & lt; / Xsl: When & gt; & Lt; XSL: otherwise & gt; & Lt; Xsl: Select value = "@ description" disable-output-escape = "yes" /> & Lt; / XSL: otherwise & gt; & Lt; / XSL: Select & gt; The same thing is working for the column whose type is a line of text, someone can tell me how to get this co

c# - Thread has exited with code 0 but not finished it's work -

I'm new to multi-threading in C # and would like to know that it's going to behave Why: I have one thread is asynchronous file thread to load 2 always going to do the thread still have to check if thread 1 is stopped running, then it updates the UI Have to do. Now, I know what I want to achieve or other mechanisms, but once I have to face this problem, I need to know that it is better to do Before learning the methods, I am doing what is wrong using this implementation. The problem is that sometimes it is perfectly executed and at other times the thread only exits the code 0, without informing it to update my UI Updates for The actual code: // call the file manager (Singleton) async file loader method Menvandu CS Class Fmklodframdiaisaiansisi (new director Info (dialogue Selected path)); // This method File Manager singleton class public Wide Lodfromdiaiarsiaiansi (Nirdeshikainf D) {loadFiles = new Thread (() = & gt; full Dairilist (D, "in *. Mp3&quo

jquery - AngularJS - Loading icon whilst waiting for data/data calculation -

मेरे पास एक सरल अंगुल्य http.get है: app.factory ('countriesService' , समारोह ($ http) {वापसी {getCountryData: फ़ंक्शन (किया गया) {$ http.get ('/ resources / json / countries.json') .सुविधा (फ़ंक्शन (डेटा) {done (data);})। आतंक ( फ़ंक्शन (त्रुटि) {चेतावनी ('एक त्रुटि हुई');})}}}}); उदाहरण:। जेएसएएन: {"नोसीटीज़": 66, "बैलेंस": 2103, "जनसंख्या": 63705000, "सिटी इन्फो": [ "सिटीनाम": "लंदन", "सिटी पॉपिलेशन": "7825200", "तथ्यों": {"सबफ़ैक्ट 1": "एक्सज़ी", "सबफ़ैक्ट 2": "एक्सज़ी", "सबफ़ैक्ट 3": "एक्सज़ी", "सबफ़ैक्ट 4": " "" "" "" "" "" "", "सबफ़ैक्ट 5": "श्याम",}, "सिटीनाम": "मैनचेस्टर", "सिटी पॉप्युलेशन": "2584241", "तथ्यों": {"सबफ़ैक्ट 1": "एबीसी"

bitbucket - How to get full list of repositories that allowed for user? -

मुझे बिटबकेट एपीआई मिल गया है: https://bitbucket.org/api /2.0/repositories/{teamname} लेकिन यह कड़ी 301 की स्थिति (स्थायी रूप से ! Api / 2.0 / repositories / {teamname} पर लाई गई है)। ठीक है, लेकिन यह शून्य शून्य रिपॉजिटरी के साथ स्थिति 200 देता है। मैं उपयोगकर्ता और पासवर्ड के रूप में दो पैरामीटर प्रदान करता है, लेकिन कुछ नहीं लगता "पाठ"> एटलसियन दस्तावेज़ीकरण - रिपॉजिटरी तक कैसे पहुंचें, इसके बारे में एक विस्तृत दस्तावेज़ीकरण प्रदान करता है। बिटबकेट में उल्लिखित URL को किसी खाते के लिए रिपॉजिटरी की सूची प्राप्त करने के लिए है : GET https://api.bitbucket.org/2.0/repositories/{owner} यदि आप ऊपर दिए गए यूआरएल का उपयोग करते हैं तो यह हमेशा प्राप्त करता है वह खजाने जहां आप मालिक हैं उपयोगकर्ता के सदस्य होने की पूरी सूची को पुनः प्राप्त करने के लिए, आपको कॉल करना चाहिए: GET https://api.bitbucket.org/2.0/repositories?role=member आप अपनी आवश्यकताओं के आधार पर भूमिका के लिए फिल्टर के निम्न सेट को लागू कर सकते हैं। लौटा खजाने के स

javascript - How to combine two json properties into one array -

I have a Jason data: var data = [{"" RM_name ") : "No Phone No", "RCPhone": "No Phone", "Stateman": "Magnificent": "Cloud Striif", "Division": "Avalanche", "RMPhone": "No Phone", "RCName" "No RC", "RCPhone": "No Phone", "RC", "NBC", "Ringtones", "Cliff Eastwood", "Division": "Hollywood", "RMPhone": "No Phone", "RCName" , "Statewoman": "Barry Wallen"}, "Barrett Wallace", "Division": "Snow "RM": "RM", "RC", "RC", "RC", "" Barry Allen "," RCPhone ":" No Phone "," North Korea "," North Coral "}," RM_Name ":" TIFA Lockhardt "", "Division": "Avalanche", &

How to write 2 controllers in spring MVC -

Is it possible that 2 controllers such as DispatherServet in Spring MVC write more than one time when we develop spring MVC applications Are there. Yes .. !! it's possible. You must set a @RequestMapping annotation at the class level, the value of that annotation will be the prefix of all the requests that come with that controller. Example: For 1 admin: @controller @ request mailing ("test") public class test controller {} < / Code> For the second controller: @Controller @RequestMapping ("demo") public class DemoController {} If there are different / different methods of the two controllers, then you can reach & lt; Your server & gt; / Test / & lt; Request Method Mapping & gt; & Lt; Your server & gt; / Demo / & lt; Request Method Mapping & gt;

java - What is difference between Vector and Linked List? -

इस सवाल का पहले से ही एक उत्तर है: < / पी> 16 उत्तर क्यों Primitives के लिए समर्थन है डेटा प्रकार जब जावा में सब कुछ वस्तु है हालांकि जावा सभी प्राइमटाइव्स डेटा प्रकार के रैपर वर्ग प्रदान करता है हम प्राथमिकताएं का उपयोग करते हैं क्योंकि वे तेज़ हैं .. यहां त्वरित संदर्भ के लिए पोस्ट से जवाब दिया गया है यहोशू ब्लॉच के में, आइटम 5: "अनावश्यक वस्तुओं को बनाने से बचें", वह निम्नलिखित कोड उदाहरण पोस्ट करता है: सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {लंबी राशि = 0 एल; // लम्बा, लंबे समय तक नहीं (लंबे समय के लिए = 0; i & lt; = पूर्णांक.एमएक्स_एव्वान; i ++) {sum + =; } System.out.println (sum); } और इसे चलाने के लिए 43 सेकंड लगते हैं। आदिम में लांग को लेकर इसे 6.8 सेकंड तक लाया जाता है ... यदि यह कोई संकेत है कि हम प्राथमिकताओं का उपयोग क्यों करते हैं। मूल मूल्य समानता की कमी भी एक चिंता ( .equals () < / Code> biziclop के लिए == की तुलना में काफी शब्दबध्द है): वर्ग biziclop {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] args )

Google Glass: Why Get Directions card require glass to connect with the MyGlass app on Android or iPhone? -

When Google Glass does not link to the MyGlass app, the directions card is disabled in Glassware, but When connected, it becomes capable, why Google has implemented such dependency, even though it has a GBS facility in Glass? I did not find any satisfactory explanations when googled After Built in a GPS radio Google does not have the glass, it depends on the connected Android or iPhone in the iPhone. . In addition, instructions need to be connected to the internet (using WiFi or Bluetooth to connect through your Android or iPhone).

c++ - How to handle very large matrices (e.g. 1000000 by 1000000) -

My question is very common..and its not a duplicate .. When we like something Announce this as int mat [1000000] [1000000]; It is certain that this will give an error by saying the matrix size is too big. I have seen many problems on many competitive programming websites where we need to declare a 2D matrix with 10 ^ 6 rows, columns, I know that to reduce the matrix size, always its There are some tricks attached to it. That's why I just want to ask what can we do in the case of possible ways or tricks to reduce the size in such cases .. This means what type of algorithm is like a DP or someone else Need to solve ?? int mat [2] [1000000]; Code>. After calculating the existing row, you can immediately leave the previous row and switch the current and the previous. Sometimes, it is possible to use the std :: map instead of the 2D array. I have got many questions in programming competitions and the solution is substituted on a case-by-case basis, so if you

javascript - how to make slider that get image from mysql last 5 images -

I'm new to php and I do not have any information about jQuery. I have created a slider using "slider identifier", but I want to call images from my database. What should I do, please give some tips on how to get the database from the database to the slider? & lt ;? Php $ link = mysql_connect ("localhost", "root", "") or die ("can not connect .."); Mysql_select_db ("shop", $ link) or die ("can not connect to database ..."); $ Sql ​​= "Choose from book order * b_id desc range 5"; $ Race = mysql_query ($ SQL); ? & Gt; & Lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = utf-8" /> & Lt; Title & gt; Max slider & lt; / Title & gt; & Lt ;! - & lt; / Head & gt; Put in your webpage before - & gt; & Lt; Script src = "sliderengin

Why my android app stops when i set the text value of a TextView -

मेरे पास दो लेआउट हैं पहले एक: & lt; LinearLayout xmlns: एंड्रॉयड = "http://schemas.android.com/apk/res/android" एंड्रॉयड: अभिविन्यास = "क्षैतिज" एंड्रॉयड: layout_width = " Match_parent "android: layout_height =" wrap_content "& gt; & Lt; EditText एंड्रॉइड: layout_width = "match_parent" एंड्रॉइड: layout_height = "match_parent" एंड्रॉइड: id = "@ + id / edit_text_val" & gt; & Lt; / EditText & gt; & LT; बटन एंड्रॉयड: आईडी = "@ + id / जारी रखने के लिए" एंड्रॉयड: layout_width = "wrap_content" एंड्रॉयड: layout_height = "wrap_content" एंड्रॉयड: layout_weight = "1" एंड्रॉयड: पाठ = "जारी रखें" एंड्रॉयड: onClick = "newConfirm" / & gt; & Lt; / LinearLayout & gt; और दूसरा एक: & lt; LinearLayout xmlns: एंड्रॉयड = "http://schemas.android.com/apk/res/android" एंड्रॉइड: अभिविन्यास = "क्षैतिज" एंड्र

c# - Add MapIcon to MapControl in Universal app using Caliburn Micro -

Kalibrn use Krkmicro I'm building a universal Windows Phone app (8.1). On the page I intend to show a map with a Mccinon position in the center. & lt; Map: MapControl MapServiceToken = "XXXXXXXXXXXXX" height = "560" center = "{biting Mancitrkentr}" zoom level = "15" Margin = "0,0,0,0" /> & Lt; / Map: MapControl & gt; It works well, but I do not know how to add the map in the map. Msdian shows that Mapaicon how to add to the back of the code: private void AddMapIcon () {MapIcon MapIcon1 = MapIcon new (); MapIcon1. Location = new Geopoint (new Besikjioposn () (latitude = 47.620, Longitude = -122.349}); MapIcon1.NormalizedAnchorPoint = new point (1.0, 0.5); MapIcon1.Title = "Space Needle"; MapControl1.MapElements.Add (MapIcon1) ;} how can I do this with Kalibrn Mirko doing?

Starting a python script on boot (startx) with an absolute path, in which there are relative paths -

I know that this question may already exist, but what I have found, I have not worked and my Have a little different setup nearby. I have a Python file /home/pi/python_games/frontend.py when I try to start loading lxde by entering @ python / home / pi I am /python_games/frontend.py in the / etc / xdg / lxsession / LXDE / autostart . It does not run and there are no error messages. The home / pi / python_games / image.png is called from image.png . Obviously one solution would be to give these resources a complete path, but the Python program calls other dragon programs in their directories, which also have relative paths, and I do not want to change them all. Any You change your existing working directory inside Before the script you start making your relative import calls, use os.chdir ("the complete path to where your script remains").

php - Increment a variable name in for loop -

I have a variable that I want to set based on some submitted form data. On the form I have a set of fields which can increase the number of user numbers (i.e. they can add more to the same type of fields), and therefore I need to set this script which handles submitted data is. So far I have it: while ($ i & lt; = $ totalproducts) {$ product. $ I = $ _POST ['Product' $ I]; $ I ++; } $ Totalproducts holds the total number of areas As an example, let me assume that I have 3 items, I want to get it from the code: < Pre> $ product1 = $ _POST ['product1']; $ Product2 = $ _POST ['product2']; $ Product3 = $ _POST ['product3']; I'm sure that I am near, just can not do it together slots ... You can use: while ($ i & lt; = $ totalproducts) {$ variable = 'Product' $ I; $$ variable = $ _POST ['product' $ I]; $ I ++; } But better use will be ARAR: $ products = array (); While ($ i & lt; = $ totalproduc

java - What does each element do ("(.)\\1{1,}", "$1") in this code? -

आयात करें java.util.Scanner; पब्लिक क्लास रेडिएजेज {सार्वजनिक स्टेटिक व्हाइड मेन (स्ट्रिंग एजीआर []) {स्कैनर स्कैन = न्यू स्कैनर (सिस्टम।); System.out.println ("इनपुट पाठ!"); स्ट्रिंग teksts = scan.nextLine (); System.out.println ("परिवर्तन के बाद पाठ!"); System.out.println (teksts.replaceAll ("(।) \\ 1 {1,}", "$ 1")); }} यह समान अक्षर के अनुक्रमों से मेल खाता है और उन्हें केवल एक ही घटना में गिर जाता है। / P> उदाहरण: "aaaaabcccdd" -> "abcd"

Ruby on Rails - Unable to see the console message -

This is probably a really silly question, but I'm Ruby on Rails Novice ... . In some of the RB files, I put in "Hello" Where can I write something? I am running Rails console and message is not visible in the shell when code runs. It is also not visible in Chrome console Thanks! Edit I think there is a problem with my code, so I have: login.html. Erb: & lt;% @page_title = "UserAuth | Login" -%> & Lt; Div class = "sign_form" & gt; & Lt; H1 & gt; Sign in & lt; / H1> & Lt;% = form_tag "/ login" ,: session = & gt; : Login Connect% & gt; & Lt; P & gt; Username or Email: & lt; / Br & gt; & Lt;% = text_field_tag ​​(: username_or_email)% & gt; & Lt; / P & gt; & Lt; P & gt; Password: & lt; / Br & gt; & Lt;% = password_field_tag: Login_password% & gt; & Lt; / P & gt; & Lt;% = submit_tag ("Sign In")%> & Lt;

javascript - Very simple js calculator doesn't work -

मैंने क्या किया? HTML < पूर्व> & lt; फ़ॉर्म का नाम = "कैल्क" & gt; & Lt; BR & gt; इनपुट प्रकार = "टेक्स्ट" नाम = "1" आकार = "20" & gt; * & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "2" आकार = "20" & gt; = & lt; इनपुट प्रकार = "टेक्स्ट" नाम = "योग" आकार = "20" & gt; & Lt; BR & gt; & Lt; इनपुट प्रकार = "बटन" नाम = "कैल्क" मान = "गणना" onClick = "calcsum ()" & gt; & Lt; / प्रपत्र & gt; स्क्रिप्ट फ़ंक्शन calcsum () {sum.value = 1.value * 2.value; } आपको उपयोग करना चाहिए प्रयास करें: फ़ंक्शन कैल्सेसम () {document.getElementsByName ("sum") [0] .value = document.getElementsByName ("1") [0] .value * document.getElementsByName ( "2") [0] .Value; }

php - Laravel 4 NotFoundHttpException controller routing why? -

I am trying to do a link work in Larval 4, the link is: < Code> & lt; A href = "innovate" & gt; Nevev Tak & lt; / A & gt; This link will be the result of LARWAL / TUDUO / PUBLIC / NAVUTEC My routing is: Root :: find ('netwatch', 'showwhite @ navewecok controller'); My Controller: Class NieuweProductController Expands BaseController {Public Function ShowView () {Return View :: Create ('New Task'); } } But somehow when I click on the link it gives a NotFoundHTTP exception your class is NieuweProductController , while your root says NieuweTaakController I think That you should correct it (or change the name of the class): Root :: find ('newtech', 'newviewprint controller @viewview'); BTW, the name of the controller goes after , this is className @ method

Which datatype shall i use to store image in database(PostgreSQL)? -

I am using the PostgreSQL database. Here I need to store the image in the database, in which there are many thousands in number for example. So I need to know what dataset is the use of "Bitia" or "Big Binary Object"? Normal bytea is a better option (I think). The only advantage is that in "Big Objects", it is that you can access parts of binary data through a streaming interface. Rarely you will need images

sql - How to create a column in MYSQL which automatically SUMs the values from other columns within the same row -

Can someone tell me whether it is possible to have a column in MYSQL in the table, which is automatically assigned to a given device For SUM function does the number of columns As a comparative example in Microsoft Excel, it is possible to have a cell that SUM functions for cells of a particular category and automatically updates ie (= SUM E4 : E55) Is there a column that gets the same function in MYSQL? To expand more - I have several types of columns that are related to different sizes of our products i.e., quantity_size _ * and want A column that will be the value of the quantity column and automatically updates if any price has changed. Any advice will be great thanks Normally you can do this Do not fly-in-fly and do not store them in your chosen query. select some_calumn, col1 * col2 as your_table some_calculation_result but if you have a good reason to do so, then you can use it Triggers to calculate those data. You need an Update Trigger to capture

sql server - MSNodeSQL query error results or misunderstanding of JavaScript variables -

When an MSNodeSQL query fails, I'm confused with callback arguments. I am new to JavaScript, so this is a simple JavaScript Problems can be there. The database is a simple query: conn.query (stored procedure, parameter, function (error, result) {if (err) {console.log ("err =" + err); Console Log ("err =" + JSON.stringify (mistake));}}); I have given the name of a stored procedure, so it will not be found and an error will be compelled. The logic of the error shows a meaningful description of the error: err = Error: [Microsoft] [SQL Server Native Client 11.0] [SQL Server] stored procedure 'dbo.me3_MsgQueueIn_AddMessage'. When I return this variable to the customer and show it in a browser which it appears as a JSON object and when I display it on the server as shown above , Then it is a JSON object and I see err = {"sqlstate": "42000", "code": 2812} Such a typical error code is also good for a meaningful