Sunday, 15 June 2014

asp.net web api - How to get transaction details on eBay API -


I use the API function to get seller transaction from eBay

This is my TransactionArray property TransactionArray property gives me an array of transactions in eBay.

Do I have an eBay transaction ID value (string like: 12345678900) a way to get a transaction type object. ?

OK, it seems that it is impossible to do this, / P>

but you will need to know the order id, item id or SKU values ​​

postgresql - Compute percents from SUM() in the same SELECT sql query -


तालिका my_obj में दो पूर्णांक फ़ील्ड हैं:

  (मूल्य_एक पूर्णांक, value_b पूर्णांक);   

मैं कितनी बार value_a = value_b की गणना करने की कोशिश करता हूं, और मैं प्रति अनुपात में यह अनुपात व्यक्त करना चाहता हूं। यह मैंने कोशिश की है कोड है:

  चुनें राशि (मामले जब o.value_a = o.value_b तब 1 और 0 अंत) nb_ok के रूप में, राशि (मामले जब o.value_a! = O Value_b तब 1 और 0 अंत) nb_not_ok, compute_percent (nb_ok, nb_not_ok) my_obj से ओ समूह के रूप में o.property_name;   

compute_percent एक संग्रहित कार्यप्रणाली है जो केवल (a * 100) / (a ​​+ b)

करता है लेकिन PostgreSQL शिकायत करता है कि कॉलम nb_ok मौजूद नहीं है।
आप इसे कैसे ठीक से कर सकते हैं?

मैं 9.1gb का उपयोग कर रहा हूं, जो कि उबंटू 12.04 के साथ है।

इस प्रश्न के मुकाबले ऐसा कुछ भी हो सकता है।

सरल संस्करण

यह अधिक तेज और सरल है:

  का चयन करें property_name, (गिनती (value_a = value_b या NULL) * 100) / गिनती (*) के रूप में my_obj ग्रुप द्वारा pct 1;   

परिणाम:

  property_name | Pct -------------- + ---- prop_1 | 17 prop_2 | 43   

कैसे?

  • आपको इसके लिए फ़ंक्शन की ज़रूरत नहीं है।

  • value_b (जो आपको आरंभ करने की आवश्यकता नहीं है) की गिनती के बजाय और कुल की गणना के लिए, count (*) का उपयोग करें < / कोड> कुल के लिए तेज़, सरल।

  • यह मानता है कि आपके पास NULL मान नहीं है अर्थात। दोनों कॉलम परिभाषित हैं नहीं नल । आपके प्रश्न में जानकारी गुम है।
    यदि नहीं, तो आपकी मूल क्वेरी शायद ऐसा नहीं कर रही है जो आपको लगता है कि यह करता है यदि कोई भी मान नल है, तो आपका संस्करण उस पंक्ति को बिल्कुल भी नहीं गिना जाता है। आप इस तरह से एक विभाजन-दर-शून्य अपवाद भी भड़क सकते हैं।
    यह संस्करण नल के साथ भी काम करता है गिनती (*) मानों की परवाह किए बिना, सभी पंक्तियों की गिनती का उत्पादन करती है।

  • यहां पर गिनती कैसे काम करती है:

     < Code> TRUE या NULL = TRUE FALSE OR NULL = NULL   

    गिनती () शून्य मानों को अनदेखा करता है वोइलो।

  • यह नियंत्रित करता है कि = से पहले या बांधता है। आप इसे स्पष्ट करने के लिए कोष्ठकों को जोड़ सकते हैं:

      गिनती ((value_a = value_b) या गलत)    
  • आप कर सकते हैं गिनती के परिणाम प्रकार

      गिनती NULLIF (& lt; अभिव्यक्ति & gt ;, FALSE)    
  • ) डिफ़ॉल्ट रूप से है bigint । एक डिवीजन bigint / bigint , आंशिक अंक को घटाता है ।

    आंशिक अंक शामिल करें

    <कोड> संख्यात्मक करने के लिए गणना करने के लिए मजबूर करने के लिए 100.0 (आंशिक अंक के साथ) का उपयोग करें और इस तरह से आंशिक अंकों को संरक्षित करें।
    आप इसके साथ उपयोग करना चाह सकते हैं:

      का चयन करें property_name, round ((count (value_a = value_b OR null) * 100.0) / count (*), 2) के रूप में pct FROM my_obj ग्रुप BY 1;   

    परिणाम:

      property_name | Pct -------------- + ------- prop_1 | 17.23 प्रोपेल | 43.09   

    एक तरफ के रूप में: मैं valueA के बजाय value_a का उपयोग करता हूं। PostgreSQL में अनक्ॉटेड मिश्रित-केस पहचानकर्ता का उपयोग न करें। मैंने इस मूर्खता से आने वाले बहुत से निराश प्रश्नों को देखा है यदि आपको आश्चर्य है कि मैं किस बारे में बात कर रहा हूँ, तो मैनुअल में अध्याय पढ़ें।

jquery - Call FancyBox with ID instead of class -


I have a link with a class that looks like a button, ie it has some basic style, padding and A background color etc

  & lt; A href = "mypage.html" class = "blue-button" & gt; Click me & lt; / A & gt;   

I have decided to use the FancyPPS / Fancybox (v2.1) in order to trigger a popup window in an iframe in return.

My issue is the actual code. FancyBox tells me to use ALSO , so I ended up with 2 sections applied on my link and my buttons and Fancybox popups To break the

    

Here is my Fencebox script ...

  $ (".backback"). Fancybox: False, click around: incorrect, 'Overlay color': '# 1C5093', 'Fancybox' ({maxWidth: 510, maxHeight: 510, FIT: true, width: '70% ', height:' 70% ', Overlayopathy ': 0.9}); Can anyone help me?   If possible, I would like to maintain my own "blue-button" class and then I would like to call Fancybox with an ID.  

BTW, I'm learning jQuery (Slow) and Visual Quarterstart Guide. I'm just starting out just really appreciate any help.

You can access your & lt; A & gt; & lt; A href = "mypage.html" class = "callback" class = "blue-button" data-fancybox-type = "iframe" element & gt; Request Call Back & lt; / A & gt;

Set up two squares within the same class attribute (each new class name separated by space) such as:

  & Lt; A href = "mypage.html" class = "callback blue-button" data-fancybox-type = "iframe" & gt; Request Call Back & lt; / A & gt;    

parsing - How to read specific part of large file in Python -


Given a large file (hundreds of MBs) I read content between a specific start and end index quickly How will Python use within the file?

Basically, I'm looking for a more efficient way to do:

  open (filename) .read () [start_index: end_index]    

You can find the file in the file and then read the file From there some amount of search allows you to get a specific offset within a file, and then you can read only the number of bytes in that range.

  With Open (filename): fin: fin   

It only reads the data that you are looking for. (start_index) data = fin.red (end_index -

php - mysql query within a mysql query -


I am trying to display information in a table in a table in my own loop, but for some information, I have referenced other tables when I try to get data from other tables, then any data will disappear. Here is the code I am using:

`

  // is the SQL query below $ listing = mysql_query (" Select from musicians "from selectors); / / This is showing the results of the SQL query while ($ row = mysql_fetch_array ($ list)) {? & Gt; html here ... ... echo ['name'];? & Gt; Repeat every [= 'Town']?? & Gt; Ke & lt;? $ Countyfront = $ line ['countyID']; $ county = mysql_query ("Select * From County where couient = ' $ County Rough ''); while ($ line = mysql_fetch_array ($ County)) {Echo $ line ['CouName'];}? & Gt; & lt ;? php echo $ row ['tool'];? & Gt; & lt ;? php echo $ row ['style']; ? & Gt; `  

My problem is, is there any other suggestion after the other that the loop is not displayed?

Thanks

You can do this with a single query:

  select *, (Select from CouName FROM County WHERE CouInt = mus.CountyId) as a country from musicians;   

You should look like the final code:

  & lt ;? Php $ listing = mysql_query ("SELECT *, (SELECT CouName from COUNTRY WHERE CouInt = mus Kondied) as the country from musicians;"); // This displays the results of SQL queries ($ row = mysql_fetch_assoc ($ listings)) {echo $ row ['name']; Echo ['Town'] per line; Echo ['country'] per line; // xD echo $ row ['instrument'] to all people; Echo ['style'] per line; }? & Gt;   

Saludo;)

sql server - How to get the Windows Group name when no user login exists -


I have a scenario where a user can log in to SQL Server through their Windows group. The user has no login and there is no user in the database.

Then I would like to get the name of the window group through which the user gets logged in. However, suser_sname () returns the actual user name suser_sid () does not help me.

Does anyone have to do this?

  announcement @ user sinnee; SET @user = SUSER_SNAME (); Xc xp_logininfo @ user, 'all';   

This user will return the rows for any group (in the rows permission path column will have zero-value) but this will be your own username (my case

You can return all the possible groups you see with the following question:

You will also return a line for permission path for that line). Can:

  SELECT * master.sys.server_principals WHERE type = 'g'; - type_desc = 'WINDOWS_GROUP'   

sub Ogkrta be a member of another AD group that are not registered with SQL Server. You will be advertising for it.

c# - How to populate a dropdownlist using a stored procedure without an objectdatasource -


I am working on a webpage for which different user information is required to be displayed. Many different users will use this page, so the data will be different for each account. I'm new to programming maintenance pages so be stupid with me.

This information is obtained through the stored procedures through the sole object.

I can not use an object data source because my SP DDL requires a parameter (UserId) (unless there is no way to do that, I will not know!) UserId has been caught on page load via aspnet subscription. This DDL needs to be populated as it opens the page. I did some research on populating a DDL but I can not find any examples which I am trying to do.

I need a normal DDL in which a SP should be populated (object and value) parameter (userId), when the page opens, nothing more, nothing less :)

My question will basically be;

This post was a non-typed - a stored procedure for listing datasets and a checkbox that The same principle (warning: your blog post) is: