Wednesday, 15 July 2015

tsql - How to automatically pad a SQL Server column -


मेरी SQL सर्वर तालिका में एक कॉलम परिभाषित किया गया है:

  टिकटन varchar (5) < / कोड>  

इस तालिका में पंक्तियों को विभिन्न स्रोतों से कुछ थोक लोड फ़ाइलों द्वारा डाला गया है।

अब, थोक भार इनपुट फाइल तैयार करने के आधार पर, कभी-कभी टिकटन के पास अग्रणी 0s है, कभी-कभी नहीं।

मैं तालिका में INSERTS को कैसे लागू कर सकता हूं ताकि टिकटन हमेशा अग्रणी शून्य के साथ सेट किया जा सके, कुछ ऐसा:

  टिकटनहीं = राइट ('00000' + टिकन, 5)    

आप एक चेक (सीआर) (5) कॉलम को चेक बाधा से उपयोग कर सकते हैं।

  टेबल बनाओ आपका टेबल (टिकिट नोज़ चार (5) चेक (पेटींडेक्स ('% [^ 0- 9]%', टिकन नो) = 0))   

अपडेट करें:

इसके द्वारा प्रयोग करने के बजाय यह सुनिश्चित करने के लिए कि केवल 0- 9 की अनुमति है, इसके बजाय इसका उपयोग किया जा सकता है।

  तालिका बनाना आपकाटैबल (टिकट नं चार (5) कोलाट लैटिन 1_General_CS_AS चेक ('पैंटइंडएक्स ('% [^ 0123456789] % ', टिकटनॉ) = 0))    

Combine jQuery functions to make simpler -


I have a simple task that changes the source of an image on mouseover and changes it back to mouseout. It works very well, but when I try to apply this effect to several pictures of the same category then the wrong images are being changed. So I have written different functions for each mouseover image. It is becoming a lot of code. Can anyone tell me some ideas how do I return all the images back to their proper hover image with a specific class switch I can summarize this code for.

  $ (document) .ready (function () {var passiveBio = $ ("# index_container img.bio"). Attr ("src"); var hoverBio = passiveBio.replace ( ".jpg", "_hover.jpg"); $ ("# index_container img.bio") .mouseover (function () {$ (this) .attr ("src", hoverbio);}) .mouseout (function ($ {This ($)} .attr ("src", passiveBio);}); var passiveSamples = $ ("# index_container.mg samples"). Etr ("SQL"); Were hover samples = passive samples. (".jpg", "_hover.jpg"); $ ("# index_container img.smplez"). Mouseover (function () {$ (this) .attr ("src", hoverSamples);}) .mouseout ( Function () {$ (this) .attr ("src", idle session);}); var passiveServices = $ ("ARTR" ("src") ARTR ("src"); Where Hover Services = Passive Services: Rellest (".jpg", "_hover.jpg"); $ ("# IndexX_ Container IMG.Services") .Mosovar (Function () {$ (This) .attr ("src", hover services);}) .mouseout (fu encryption () {$ (this) .attr ("src", idle services);})}} ;   

It has div with images.

  & lt; Div id = "index_container" & gt; & Lt; A href = "samples.html" & gt; & Lt; Img class = "index_box samples" src = "pictures / samples.jpg" /> & Lt; / A & gt; & Lt; A href = "services.html" & gt; & Lt; Img class = "index_box services" src = "pictures / services .jpg" /> & Lt; / A & gt; & Lt; A href = "about.html" & gt; & Lt; Img class = "index_box bio" src = "images / bio.jpg" /> & Lt; / A & gt; & Lt; Img class = "index_box" src = "image / gray page" /> & Lt; Img class = "index_box" src = "images / light_blue.png" /> & Lt; Img class = "index_box" src = "picture / dark_blue.png" /> & Lt; Img class = "index_box" src = "image / gray page" /> & Lt; Img class = "index_box" src = "images / light_blue.png" /> & Lt; Img class = "index_box" src = "picture / dark_blue.png" /> & Lt; P class = "clear" & gt; & Lt; / P & gt; & Lt; / Div & gt;   

I have tried to make all the images the same class and just change the .jpg to the hoover.jpg but they are not changing in the right image. They all do not change the same hover image of their own.

Thank you in advance for your help!

Target all images, or give them a normal class and use it as a selector, and Simply replace it inside the function on the fly:

  $ ('#index_container img'). ({Mouseenter: function () {this.src = this.src.replace ('.jpg', '_hover.jpg')}}, mouseleave: function () {this.src = this .src.replace ('_ Hover.jpg ',' .jpg ');}});    

sql server - Binding multiple items of data from SQL to label -


How do I bind many data items to a label from SQL?

This is my code:

It only adds one item to the data, I can add data to a particular column

You can create a string in the SQL statement and tie it on:

  String = "Select curriculum + '(' + Cursured + ') as" ASTLL1FROM tbl_course "as a slow str1   

.. < / P>

  lbl.DataBindings.Add ("text", dataset1, "course.lbl1")    

python 2.7 - How do I install software with an RPM (cx_Oracle) onto CentOS 6? -


I have RPM for software module that I want to install on a CentOS 6 system. I have this RPM to 'rpm is installed in the yum database through -ivh' command my understanding is that RPM can be used to install modules via 'yum install', but it did not work , That means I get the message "Nothing" to install it. So should I not do anything right? ? Can anyone give advice

FYI Here's what I've tried so far:

  $ rpm -ivh cx_Oracle-5.1.2-11g-py27- 1.x86_64.rpm Preparing ... ################################ [100%] 1: cx_Oracle ################################ [100% mirror.ash.fastserv.com * extras: mirror.symnds .com * update: cash went hostfile * is fastestmirror load based on mirror speed:] $ Yum looking cx_Oracle loaded plugins ftp.linux.ncsu.edu basis | 3.7 KB 00:00 ext. 3.5 KB 00:00 update | 3.5 kB 00:00 ============================ N / S Matches: cx_Oracle ========= == ================= cx_Oracle.x86_64: Oracle $ to Python interface loaded on through established cx_Oracle plug-in loading fastestmirror the hostfile went cache Mirror speed * Base: mirror.ash.fastserv.com * Extra: mirror.symnds.com * Update: ftp.linux.ncsu.edu Support | 3.7 KB 00:00 ext. 3.5 KB 00:00 update | Install 3.5 kB 00:00 set is nothing to $ Yum update plug-ins loaded on cx_Oracle process: loading fastestmirror the hostfile went cache mirror speed * basis: mirror.ash.fastserv. Com * Extra Artist: mirror.symnds.com * Update: ftp.linux .ncsu.edu Support | 3.7 KB 00:00 ext. 3.5 KB 00:00 update | 3.5 KB KB 00:00 Update no installation package for any package marked for update   

Thank you in advance for any suggestions, insights, etc.

You have already installed the package. You used rpm to install cx_Oracle-5.1.2-11g-py27-1.x86_64.rpm. "Cx_Oracle.x86_64" that the Yum Search cx_Oracle report is very one that you have installed on your machine through your RPM order.

config - Extjs configoptions vs properties -


There are properties and properties by adding those properties to a Java class. An ExtJS class has properties, methods and configOptions .
Conceptually, what is the difference between the configOptions and the properties? Why do we need both?

According to my understanding ...

Config - The constructor has defined, which defines the behavior of the class, the configuration should not be changed at run-time because it will have no effect, suppose you need to specify a title for the panel , Then you can add a configuration example {title: 'some title'} to use the panel's title time Used to set Nder time, but then, if you try to change the title, you can not change the property changed easily to the configuration options.

Properties - Used to store useful information for that class, it is usually not passed through the constructor, but it does not pass the recipient and setter methods You should change the property at run-time (if the setter method is defined) and class objects should detect this change, only properties can be read, which can be read by class objects. Modified, we should not just change all this.

More info

My answer to this question is a bit simpler and idealistic I am afraid that to give a complete answer , In which all the nuances are included, instead of clarifying the situation there is more chance of adding confusion.

Configuration objects are used to configure objects when trying to set them as property on the object when it is created, there will often be no effect.

  Ext.create ('Ext .panel.Panel', {// configuration options go here}};   

An object has many properties but only those people listed in the properties section should be considered public property. Although you have nothing to prevent from reaching private property, It should be done only in the form of the last resort, where there is probably a method of documenting them to manipulate Try to use.

  // is a public property presented to indicate whether the panel was provided If (panel.rendered) {// can be in the panel panel but this is not a public property, use getEl instead varel = panel.getEl (); ...}   

The only reason is that the lines are blurred, that the object is usually a copy of your configurations Award the copy you are:

  Ext.apply (This, config);   

This is the result of at least initially becoming a personal property in all configuration options, internally classes can manipulate those properties appropriately but externally Accessing properties violates encapsulation and should be avoided.

Windows Azure Websites Latency -


Run a website on the Windows Azure website for clients. I run in reserved mode and there are two medium instances. I run these PHP sites on Windows and I have a separate MySQL server (running on Windows) There is not enough memory, no high usage, but every minute or two minutes I have interpreted a high latency (instead of 3 seconds, 300 milliseconds).

Does one experience the same behavior, or recognize it?

All of them are within a Windows Azure Datacenter.

When I load it from a device, the tool thinks that my website runs in Redmond, how does it come?

I believe that what you see is a distortion of hot and cold websites. WindowsZoor websites use a concept of hot websites for an active connection and after few seconds when there are no active connections for websites, the website gets cooled down. And when a website is in a cold mode, it may take a little while for the first time to start, though the load time is much faster after the later connection.

Similar discussions have been found here:

php - What's causing this (phperror_reporting) -


यहाँ मेरे कोड का सबसे ऊपर है:

  & lt;? Php error_reporting (E_ALL);   

यहां तक ​​कि अगर मैं error_reporting (E_ALL) से पहले 100 खाली लाइनें करता हूं; (या कोई अन्य फ़ंक्शन), मुझे यह त्रुटि मिलती है:

  घातक त्रुटि: अपरिभाषित फ़ंक्शन को कॉल करें phperror_reporting ()   

यह क्या कारण है, और यह कैसे होता है मैंने इसे ठीक किया?

अपनी फ़ाइल एन्कोडिंग जांचें, सर्वर पर निर्भर करता है कि यह लाइन अंतराल को अलग ढंग से पार्स कर सकता है, अर्थात्, खिड़कियां उपयोग करती हैं एक सीआरएलएफ लाइन समाप्ति ( \ r \ n ) और लिनक्स / मैक सिर्फ एक लाइन फ़ीड ( \ n ) का उपयोग करता है। सीरियल को समाप्त करने वाली लाइन (आपके टेक्स्ट एडिटर में जिसे आप कोड लिखने के लिए इस्तेमाल कर रहे थे) को सीआरएलएफ में बदलने की कोशिश करें क्योंकि यह दोनों परिवेशों में सही तरीके से काम करेगा और देखें कि क्या यह समस्या को हल करता है।