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:



c# - Named Pipes error 40 in windows server 2003 -


I wrote an application in C #. I use these wires to connect

  str = "data source = 200.1xx.2yy.1zz; initial catalogs = minofom; uid = SA; pwd = ablitta";   

and the same string for app.config:

  & lt; Add name = "MiniFinan.Properties.Settings.MiniFimConnectionString" connectionString = "data source = 200.1xx.2yy.1zz; initial catalog = minofoof; uid = SA; pwd = abilita" provider name = "system.data .sql client" / & Gt;   

Whenever I'm coming out of the local network, all apps and reports work right, but when I install the app in the server or in the app, the app shows me this error Network:

A named pipes provider, error: 40 - The connection to the SQL server could not be opened

Local server is a domain controller, I local Use this string for area network :

  str = "data source = 192.168.2.254; initial catalog = minoFom; uid = sa; pwd = abuelita"   

all forms work , But when I do not connect to any report, I use the same string for app.config. I have tested the same app in other server 2003 (not the domain controller) and the report works, there is no way to write the string for the domain, any idea to fix it?

I have tested the SQL Browser online, Protocol: Shared Memory / Named Pipes / TCPIPs are installed and work. I think there is something with the domain.

I have solved the form using two strings:

 < Code> str = @ "data source = torrere; initial catalog = minofom; uid = SA; pwd = ablitta";   

and other reports in app.config:

  connectionString = "data source = MyDomain \ TORRE; initial catalog = minoFom; uid = sa; Pwd = abuelita "  

Save more than one strings in the app.config,

How can I display social icons on my website with HTML and CSS? -


I'm trying hard to add some icons to my website, but they can not be displayed properly. What I want is just a container in which the images are included and display them in line, then I would like to add some padding between the containers and some pictures and this is it.

View my view here

In my HTML file:

  
div class = "mouse" & gt; & Lt; Div class = "email" & gt; & Lt; A href = "mail: example: @ hotmail.com" title = "email" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; Div class = "twitter" & gt; & Lt; A href = "http://www.twitter.com" title = "Twitter" & gt; Twitter & lt; / A & gt; & Lt; / Div & gt;

In my CSS:

  .ics (margin-left: 30px;) .onjan .mail {background: url (../images / social / Email Page) Top left on top;} .con .tit (background: url (../images/social/ twitter) left top header;}   

Note: This code I do not work for me.

I will create an image sprite for my icons and then for markup i I will use a list and icon image

HTML & quot; Lt; ul & gt; & lt; li & gt; & lt; a href = "class =" icon facebook "& gt; Facebook & lt; / a & gt; & lt; / li & gt; & lt; Li & gt; & lt; a href = "class =" icon twitter "> gt; Twitter & lt; / a & gt; & lt; / li & gt; & lt; li & gt; & lt; a href = "" Class = "icon Guptles"> Google plus

< Strong> CSS

  ul li {float: left; Display area; } .con {width: 25px; Height: 25px; Display area; Text Indent: -9999px; Background Image: URL (http://tridentdesign.com/wp-content/uploads/2012/12/gemicon.jpg); Background repeat: do not repeat; } .facebook {background-position: -140px-115px; } .tit {background-position: -185 px-115px; } .googleplus {background-position: -140px-265px; } There is a feed here to demostrate:   

Edit:

Strong> <

wpf - Unable to load a XAML resource from a project subfolder at design-time -


I used to duplicate the visual model used by a scene in a WPF application on Design Time (Visual Studio 2012, .NET) Has defined 4.5). The visual model refers to an image that is a part of the project material. Unless I have the image in the original project folder, it loads successfully at design time using the URI Conference:

  var Image = new bitmapImage (new URI (@ "pack) : //application:,,,/MyAppAssemblyName;component/MyImage.png "));   

The image has been marked as an embedded resource (I have actually tried to mark it as content and it has been loaded properly).

But I want to use it from the sample project subfolder, so I changed the code above it:

  var image = new bitmap image (new ury (@ " Pack: // application: ,,, / MyAppAssemblyName; component / samples / MyImage .png "));   

Then it stops working, whatever I try (content, embedded resource, etc.), nothing has been loaded from the project's subfolder. This is very strange because I look at the various examples of using subfolders, although I have not found examples of design time. I also tried to use the pack scheme siteforgeon, but then the designer tries to load images from the Visual Studio applications folder.

I

I thought that I was finally found, and this problem Had lied to the character cover. Here is my project structure:

MyProject - Samples - MyImage.png

The following URI works:

  pack: // application:, ,,,, / MyProject; Compponent / samples / MyImage.png   

Do not do this:

  pack: // application: ,,, / MyProject; Component / Samples / MyImage.png Pack: // Application: ,, / MyProject; Component / Samples / myimage.png   

UPDATE After more advice after the Microsoft Forum, I did more tests to restart Visual Studio after every URI change , And my above theory seems to be wrong. Character casing does not matter (all three versions work), but sometimes VS Designer does not catch the recent changes and the VS uses the designer to make the last change. Resume is required.

javascript - how do I clear the developer tools log console in safari? -


I have been using this code successfully in IE, FF and Chrome, but throws an error on the Safari console. Is there any way to do this in Safari?

  if (window.console & console.log) {console.clear (); Console.log ("console approval"); }    

Sadly, there is nothing like it "by hand" (or Use "Q + +" to clear the console.log some new lines;)

ruby on rails - Prawn PDF - How to get the height of a text box -


I have a formatted_tex_box with dynamic text that looks like the box spreads well when it is not specifically provided.

The problem is that the cursor does not seem to be moving to the bottom of the box, so my text overlaps with text in the formatted_tex_box.

If I can set the height of the text box, then I can use move_down in the same way.

Is there a way to set the height of the text_box on the page?

    1.   features_box = :: prone :: text :: formatted :: box.newe (feature_text .flatten, {at: [pdf.bounds.left + 3.in, @ pdf. 
    2. features_box.render

    3. Move cursor or start new box in another Height

  • javascript - how to open the info window after search and pan to the position on google map -


    I try to open the info window after searching and pan the status on Google Maps. Can someone help me? Thank you.

      var availableTags = []; For (i = 0; iLt; mapLocationsJSON.length; i ++) {Available Tugs [i] = Map Location JSON [i] .title; } // This autocomplete text field is $ (function () {$ ("#search"). Autocomplete ({source: availableTags});}); // function myFunc (searchTerm) {var validSearch = false; Enter the function here for what you want to do when searching; Var marker number; // To see if the word has been searched, whether or not matte data matches any of the matte data for (i = 0; i & lt; JSON.length; i ++ for the map); {If searchTerm == mapLocationsJSON [i] .title) {validSearch = true; MarkerNumber = I; break; }} If (valid search) {// status pan and zoom in map. Panto (marker [marker number] .getPosition ()); Map.setZoom (7); // I'm sure how to open the info window ....? //infowindow.open(map-markers[markerNumber]); } Else {// If the data does not match any word, ask them to search again. Warning ("Please try again")}; }   

    After searching the location, what should I do to open the info window

    Assume that you already have a click listener on the marker (you do not include your code which defines the marker), the simplest way:

      if (valid Search) {// position pan and zoom in Map.panTo (Marker [Marker Number] .getPosition ()); Map.setZoom (7); // Click marker google.maps.event.trigger (marker [marker number], 'click'); } Else {// If the data does not match any word, ask them to search again. Warning ("Please try again")}    

    javascript - How to make overlapping background for custom shape on link hover -


    छवि का उदाहरण:

     यहां छवि विवरण दर्ज करें

    मेरे पास 2 लिंक हैं: 1 और 2
    दो पृष्ठभूमि ढाल चित्र: नीला-हरा और पीला-लाल

    उनमें से एक (1 या 2) पर घूमने के बाद मुझे सही के साथ त्रिकोण होना चाहिए Extention background।

    उदा 1 पर मँडरा होने पर मैं नीला-हरा ढाल त्रिकोण की शुरुआत करना चाहता हूं, उसी के लिए 2 लेकिन ढाल की उचित स्थिति।

    शुद्ध सीएसएस आकृतियों को सीमा चौड़ाई के साथ अलग-अलग अस्पष्ट चीज़ों के कारण काम करना मैंने इसके साथ गठबंधन करने की कोशिश कर रहे एक बिट के आसपास खेले और उन्हें सहयोग करने में नहीं मिल सका (क्रोम में, वैसे भी) सीमा छवि सामग्री 9 बिट (4 कोनों, 4 किनारों और केंद्र) में छवि को फिसलने से काम करती है; यह हमेशा पारदर्शी और ओवरराइड लगता है; एंग्लिड किनारों कि कठिन आकार सीमा नियमों पर भरोसा करते हैं।

    यह सब कहना है कि मेरे पास आपके लिए कोई हल नहीं है, लेकिन आप संभवत: भाग्य से बाहर हैं, जहां तक ​​एक शुद्ध सीएसएस समाधान , यहां तक ​​कि CSS3 का उपयोग कर। आपको संभवतया कुछ जेएस या छवि चालान की ज़रूरत पड़ रही है ताकि आप जिस प्रभाव को देख रहे हों।

    symfony - How integrate phirehose lib to symfony2? -


    I write the app that should work with the Twitter Streaming API to interact with the Streaming API. ) It runs great as a separate php project. Phir file with phirehose lib is used as background process, which uses frequent tweets, now i want to save it in db, so Anyhow me There is a need to provide all the benefits that work with the Simmony framework of DMB in my simple php file that consumes tweets. There is a way to make the firehouse in Symphony's seller folder (I do not want to do this, in the manual that I think is not that easy, rename the file and rename the classes of Lib, Can cause problems within)?

    It is easy to use with library composer. Just take a look at the file.

    The following are your Symphony Composer Add to Jason Composer Update

      "FanNab / Firhoj": "Dev-Master"   

    When the Fahrhose class expanded So just go

      Square Twitter Stuff Expands \ Phirehose {.........    

    c# - Corner missing when drawing a square -


    I have no idea why I can not find an ideal class at the time of drawing. I have this PointF of :

    • [0] = {X = 1.80000067 Y = 101.8}
    • [1] = {X = 1.80000067 Y = 103.6}
    • [2] = {X = 101.8 Y = 103.6}
    • [3] = {X = 101.8 Y = 101.8}

      And I'm using this code to attract:

        bitmap photo = new bitmap (1000, 1000); Graphics G = Graphics.frame image (photo); G.DrawPolygon (Pens.Black, pointsUpThere);   

      I am using DrawPolygon () because they are not always the corner corners of a square. This can be a more complex shape.

      Therefore, instead of a class in this example, I get this:

      I do not get it, what does this problem mean?

      Best regards!

      OK, the x difference between points is 100 (hundred). Y is the difference 1.8.

      Seems like a veeeeeeererery long rectangle.

    How do I create a server-side template in Dart where I can set a different for each page? -


    First of all, I really like Dart and I'm trying to use it in real projects, but then I I am suppressing the problems where every other web structure has a clear solution but I do not know how to work it in dart.

    The problem is that I would like to present several pages using a single base template, where I can set the page title on the server and then serve the browser to the page.

    Something like this:

      and lieutenant ;; DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; {{Custom_title}} & lt; / Heading & gt; & Lt; / Head & gt; & Lt; Body & gt; {{Page_content}} & lt; Footer & gt; Hey, Seth Lad! & Lt; / Footer & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

    I will then pass the template variable which will change before {{custom_title}} and {{page_content}} Will be back on the browser. Is such a templating solution present anywhere in core dart libraries?

    I have seen the stuff, but it appears that these components are & lt; Body & gt; Tags I can easily change it on the client side, but this is a bit of a solution and raises some SEO concerns (since the title page is such an important indicator of content).

    Here's an example:

    With a comprehensive implementation in many languages Try a dart implementation of the templating syntax used in the form.

      import package: Mustache / mustache dart '; Main () {var source = '{{# name}} & lt; Div & gt; {{Lastname}}, {{first name}} & lt; / Div & gt; {{/ Names}} '; Var template = new template (source); Var output = template.renderString ({'names': [{firstname': 'Greg', 'Last name': 'Lowe'}, {'First name': 'Bob', 'Last name': 'Johnson'} }}); Print (production); }   

    Currently focused on client-side development, so many basic server-side features are missing in the Core Library. While taking a look, many community-made packages are available.

    See this similar package:

    php - Alter a part of an array -


    मेरे पास यह सरणी है,

      अर्रे ([0] सरणी ([ftid] 2 [एफएनए] हो प्रकार [फ्लैबिडी] ऐरे ([0] 1000 [1] 1001 [2] 1002 [3] 1003 [4] 1004) [फ्लैबल्स] ऐरे ([0] सभी [1] सीआईआईएफ़ [2] टूहो [ 3] कॉ को सह [4] मोब हो)) [1] अर्रे ([एफटीआईडी] 3 [एफएनए] ली प्रा [फ्लैबिडी] ऐरे ([0] 1000 [1] 1007 [2] 1008) [फ्लैबल्स] ऐरे ([0 ] सभी [1] 50 एम [2] 50 के)))   

    मैं हो प्रकार कैसे बदलूंगा fname को नष्ट किए बिना सरणी मेरा क्या मतलब है कि केवल उस विशिष्ट भाग को बदलना है? कृपया मदद करे। चीयर्स!

      $ सरणी [0] ['fname'] = $ new_value;   

    $ array पर विचार कर रहा है आपकी सरणी का नाम & amp; $ new_value नए मान के रूप में

    OpenCV conversion from C++ to C -


    I have a C + + OpenCV code that I need to convert to C. But I could not find a guide to check what I want instead, if you see any other problem in your code, can you tell me?

    cvScalar, cvNamedWindow, cvSmooth

    Use instead>

      #include "cv.h" #include "highgui. H "#include" cxcore.h "#include & lt; Stdio.h & gt; IplImage * range (IplImage * src) {IplImage * srcHSV = cvCreateImage (cvGetSize (source), 8, 3); CvCvtColor (src, srcHSV, CV_BGR2HSV); // BGR Convert HSV IplImage * Thresholdimg = cvCreateImage (cvGetSize (SRC), 8, 1); // Create a Threshold Image // HSV Traceholding CVInlines (srcHSV, CVSLAR (7, 107, 219), CVSLAR (11,148,255), Thresholdming); CvSmooth (Thresholdmig, Thraßhold, CV_ GAUSSIAN, 9, 9); // Smoothing CVRillage image (& amp; srcHSV) with a Gaussian filter (9 * 9 kernels); Return threshold } Int main () {CvCapture * capture = 0; Capture for USB Webcam = CVCCPEUFRUMCAM (1); // 1, 0 o / w If (! Capture) {printf ("can not be captured, no device was found \ n"); Return -1; } // Windows CVNIDW for "Threshold and Output" ("Tracking Output"); CvNamedWindow ("threshold"); While (1) // infinite loop (IplImage * frame = 0; Frame = cvQueryFrame (capture); // Do Dikanpres the frames captured if (! Frame) break; IplImage * finalthreshold = Threshold (frame); cvShowImage ( " threshold ", finalthreshold); // thresholded image show CvMemStorage * storage = cvCreateMemStorage (0); // to contour information CvSeq store allocate memory * circles = cvHoughCircles (finalthreshold, storage, CV_HOUGH_GRADIENT, 2, finalthreshold- & gt height (Float * p = (float *) cvGetSeqElem (circle, / 4, 100, 40, 20, 200); Int i; (I = 0; i & lt; circle-> total; i ++) I); Printf ("Ball! X =% fy =% Fr =% f \ n \ r ", p [0], p [1], p [2]); cvpoint center = cvpint (CRRand (p [0]), CRRand (p [1]); CVScalar val = cvGet2D (Fndlstrold, center, top, center. X); if (val Kvl [0] & lt; 1) continue; Sivisikrikl (frame, center, 3, Sivi_arjibi (0, 255,0), - 1, Sivi_aa, 0); CvCircle (Frame, center, Cr rounds (P [2]), Sivi_arjibi (255,0,0), 3, Sivi_aa, 0); CvCircle (Fndlstrold, center, 3, Sivi_arjibi (0, 255,0), -1, CV_AA, 0); CvCircle (FundralstrollHold, Center, CR Round (P [2]), CV_RGB (255,0,0), 3, CV_AA, 0); } CvShowImage ("Tracking Output", Frame); Int c = cvWaitKey (27); If break (C! = - 1); CvReleaseImage (& amp; finalthreshold); } CvReleaseCapture (and Capture); Return 0; }   

    Here are the errors:

      root @ ghostrider: / home / zero / desktop / deneme opencv # opencv untitled.c unchecked. .c: "threshold" in function ????: untitled.c: 17: 2: error: very few arguments to work in "cvScalarâ" file / usr / local / include / opencv2 / core / core_c .h_detail, from /usr/local/include/opencv/cv.h:63, without title: c: 1: / usr / local /include/opencv2/core/types_c.h:1224:22: note : Title declared here.: 17: 2: Error: Too few arguments to work are included in the "cvScalarâ ????" file /usr/local/include/opencv2/core/core_c.h_detail, / Usr / local / include / opencv / cv.h: 63, untitled. C: 1: / usr / local to /include/opencv2/core/types_c.h:1224:22: Note: here it has been declared. C: 19: 2: Error: Too few arguments to work include "cvSmooth" in the file /usr/local/include/opencv/cv.h:65x from untitled.c from: 1: / usr / local / include / opencv2 /imgproc/imgproc_c.h:81:13: Note: Announced unchecked here: C: Function "A" main: ????: untitled.c: 42: 2: Error: Too few arguments to work "cvNamedWindowâ? ??? File included /usr/local/include/opencv/highgui.h:47:0 in untitled.c: 2: /usr/local/include/opencv2/highgui/highgui_c.h:120:12: Note: Declared Uncharted here. C: 43: 2: Error: Too few arguments to work include in the "cvnmd window" file /usr/local/include/opencv/highgui.h:47cript from untitled.c to: 2: / Usr / local / include / opencv2 / highgui / highgui_c.h: 120: 12: note: declares output file = & gt; Anonymous   

    line 1224 /usr/local/include/opencv2/core/types_c.h

      CV_INLINE CvScalar cvScalar ( Double val 0, double val 1 cv_default (0), double val 2 cv_default (0), double val 3 cv_default (0))    

    The constructions you mention are present in C under their name. You can continue to use them using C API instead of C ++ API.

    Edit: Note that the implementation of C is not the default argument you will need to provide all the arguments on each function, even if Only you are sticking to the default ones

    See for more information.

    mysql combine multiple select statement results -


    I have two statements for two people to draw data from 2 tablets. I know they have one way to join , But I can not get the syntax to work for me

    Query 1:

      select SUBSTRING_INDEX (user name, '@ ', 1) Username, COUNT (user name) as count, ROUND (sum (CONVERT (SUBSTRING (contribution_score, -2), unsigned integer) + CONVERT (SU) BCC (Integrated integer) + CONVERT (SUBSTRING (prepared_score, -2), unsigned integer) + CONVERT (SUBSTRING (work_score, -2), unsigned integer)) / COUNT (username) / 76 * 100 ) Avg. From the project_rubrics group, type the username, range 0, 90   

    query2:

      select username, COUNT (username) ) Username   

    is the common link user name field by logon group as the day.
    I want to set a result, which gives usernames, days and averages for each student, but I can not get involved in joining or joining

    Any help appreciated She goes.

    You can do a subquery

      select SUBSTRING_INDEX ( Username, '@', 1) Username, COUNT (user name) as count, ROUND (sum (CONVERT (SUBSTRING (contribution_score, -2), unsigned integer) + CONVERT (SUBSTRING (focused_score, - 2), unsigned integer) + CONVERT (SUBSTRING (prepared_score, -2), unsigned integer) + CONVERT (SUBSTRING (work_score, -2), unsigned integer)) / COUNT (user name) / 76 * 100) in the form of average , (COUNT (Username) Select the logon.username = project_rubrics.username group by the user name as the day from the logon) as username_count from the user name range 0, 90    

    javascript - How to Limit Fixed-Position Element to Height of Browser Window? -


    I have a page with fixed-position sidebar, I would like to scroll the sidebar in this case where its content is in the browser window To be fit in is very high.

    However, when I do the sidebar style with overflow-y: scroll , the scrollbar is visible, but it is disabled because the sidebar is sufficiently able to catch all the contents It's too long, even though it's too long for the browser window.

    Is there any way to restrict the altitude of a fixed-partition element such that it will scroll when the browser expands beneath the bottom of the window?

    A jQuery solution is acceptable for my application. I note that the sidebar does not extend all the way up to the top of the window.

    : This version shows a header, which should be shown below the sidebar.

    You need to set the height of the sidebar Right now, your sidebar is as high as your text block and Runs under the viewport (but you can not see it). If you set its height to 100% (or something), the sidebar will display a scrollbar if its contents can not be displayed at all.

    So you need to change it:

      div # fixed-div {status: fixed; Left: 0; Top 80px; Width: 260px; Background color: silver; Overflow-y: scroll up; }   

    To do this:

      div # fixed-div {status: fixed; Left: 0; Top 80px; Width: 260px; Background color: silver; Overflow-y: scroll up; Height: 100%; }  Edit :  

    If you want a solution with maximum browser support (older browsers), then you will need JavaScript. Here's a solution that depends on jQuery:

    CSS:

      * {margin: 0; Padding: 0; } Html, body {height: 100%; } Div # header-div {height: 90px; Background color: lime; } Div # Fixed-div {Status: fixed; Width: 260px; Background color: silver; Overflow-y: scroll up; }   

    Javascript:

      var bodyHeight = $ ('body'). Height (); Var headerHeight = $ ('# header-div'). Height (); Var SidebarHyat = BodyHight - HeaderHight; . $ ('# Fixed div') height (sidebarHeight);   

    Working JSFDial:

    mysql - SQL how to group -


    I have a table as low as

      Barrier complaints Tim Slow John Waste Mike Dung Tim So Tim Charge Too Mike Lazy   

    Make a table where the most complaints are ordered by the waiters, but the complaint also shows? Pre-Below

      Barrier Complaints Tim Slow Tim Sleep Tim Charges Too Mike Lazy Mike Dung John Rudd 
    Post-text "itemprop =" text ">

    Just count the number of complaints per waiters and join your table:

      select t1.waiter, t1.complaints table Select the waiter to join t1; (1) Calculate by the waiter as a table group by num_complaints (T1) = T. 2. At the T2. 2. NAM_complants day, T1witer, T1complants;    

    database - MySQL db sync across locations -


    I have a web app that stores data using MySQL, the web app is internal (available through the internet is not).

    I now have to deploy this application in 3 (and possibly more) locations (branch offices) They need to be able to sync the data (entries made at one place should be available at other branch locations).

    Requirements

    • Local examples of web app + mysql database
    • Every location is read / written locally / on its own network < / Li>
    • The database syncs one day (one possibly through a script via SSH) so that each location has the same data.

      The only way I was able to understand it (to date) is to create a UUID (unique identifier) ​​and with each source a source bit (for original position) and sync bit To encode with (new = 0, synchronized = 1) to write a script where I add SSH and rows to every location = that is my source and 0 = synced in every place ... I know it's cruel and not flown He is elegant / reliable but I am not sure what else to do.

      The client feared that if the Internet connection fails, that app wants to be able to work locally, but between another branch (via a night script or otherwise ). As I said, there are already 3 locations in total and possibly coming later this year.

      Any advice on architecture would be appreciated.

      PS Because of security concerns I am not connecting the database to the Internet but all suggestions are open to the.

      Thank you.

      You are potentially spending the extra hardware, development, and with such an architectural decision Maintenance costs themselves a lot of money unless they have important data entry required of the mission, so it can be a very high expectation to replicate the hardware stack in all the branch locations.

      It is being said, they still migrate from the open Internet server to the server, as long as they do not have their own VPN, within which you are setting it to migrate Trying to do some daily process of doing / merge data should be a red flag in your mind and should be a total non-starter. This is a very complex problem. You need a master-master database replication cluster that needs you. Fortunately MySQL offers you the ability to do this. Unknowingly, installing it and getting it right can be complicated, perhaps something that might be a challenge for you if you have to ask this question here.

      As far as database security is concerned, there is no reason why you should be worried about being a hosted Internet MySQL database, as long as you are taking proper precautions to protect the server. This will probably start with the permission of the port-3306 (and 22 for SSH access) at the network level and only access to the IP address (SAS) of Web Application Server (S). It will include accepting traffic from only those specific known hosts to include MySQL user accounts from which you will access.

    c++ - how to reverse a stack -


    I have an assignment where I anticipate taking a stack, show the output and then reverse it to show the output.

    Looks Like

      Stack: 262 115 74 26 34 243 22 734 113 121 Stack Reversal: 121 113 734 22 243 34 26 74 115 262  Instead of my coming like this   
      Stack: 262 115 74 26 34 243 22 734 113 121 121 113 734 22 243 34 26 74 115 262 Stack Inverted: Can anyone see my code and see what's going on. I have tried a lot, but nothing can be found to work  
      #include & lt; Stdio.h & gt; # Include & lt; Iostream & gt; #include "linkedStack.h" using namespace std; Template & lt; Class type & gt; Zero Print Stacks (Linked Stack Type & Lt; Type & gt; Stack); Template & lt; Class type & gt; Zero Riversstakes (Linked Stack Type & Lt; Type & gt; Stack); Int main (int argc, char ** argv) {// declare stack variable linked stack type & lt; Int & gt; Pile; // Add some data to Stack Stack Peash (121); Stack.push (113); Stack.push (734); Stack.push (22); Stack.push (243); Stack.push (34); Stack.push (26); Stack.push (74); Stack.push (115); Stack.push (262); Cout & lt; & Lt; "Stack \ n \ n"; PrintStack (pile); ReverseStack (pile); Cout & lt; & Lt; "\ N Stack reversed: \ n"; PrintStack (pile); Cout & lt; & Lt; "\ N \ n ** Press any key to continue ** \ n"; Getchar (); Return 0; } Template & lt; Class type & gt; Zero print stock (linked stack type & lieutenant; type & gt; stack) {type item; LinkedStackType & LT; Type & gt; Tmpstack = stack; While (stack.isEmptyStack () == incorrect) {item = stack.top (); Stack.pop (); Cout & lt; & Lt; Item & lt; & Lt; ""; } Stack = tmpStack; } Template & lt; Class type & gt; Zero Riversstakes (Linked Stack Type & Lt; Type & gt; Stack) {Type Item; LinkedStackType & LT; Type & gt; TmpStack; While (stack.isEmptyStack () == incorrect) {item = stack.top (); Stack.pop (); TmpStack.push (item); } While (tmpstack.isEmptyStack () == incorrect) {item = tmpStack.top (); TmpStack.pop (); Stack.push (item); Cout & lt; & Lt; item; } Stack = tmpStack; Return; }    

    I'm not 100%, but I think if your code will work Riverstacks .

      template & lt; Class type & gt; Delete the second loop of Zero Riversstakes (Linked Stack Type & Lt; Type & gt; Stack) {Type Item; LinkedStackType & LT; Type & gt; TmpStack; While (stack.isEmptyStack () == incorrect) {item = stack.top (); Stack.pop (); TmpStack.push (item); } // while (tmpStack.isEmptyStack () == incorrect) // {// item = tmpStack.top (); // tmpstack.pop (); // stack.push (item); // cout & lt; & Lt; item; //} stack = tmpStack; Return; }    

    multithreading - Update SQLAlchemy field threadsafe from multiple processes -


    I have a database table that describes a job that is processing on a distributed system. Therefore, the whole work is divided into several small parts and each part is processed on a different machine in its own environment.

    I want to keep a simple log of how each process is displayed, so each node is connecting with SQLAlchemy to the same work table and its job number till the end of a Unicode text field And adds the situation. >

    I hope to see something like this:

      Part 1: Completed & lt; Br / & gt; Part 2: Completed & lt; Br / & gt; Part 3: Error & lt; Br / & gt; Part 4: Completed & lt; Br / & gt; ... etc.   

    I'm just doing a code process.log + = "part 1: full \ n" on each node when it finishes processing Does. Then a session.commit ()

    I know that part number will fall out of order and it is fine for my purposes, but what is happening instead That I am only getting some entries of the total parts; I think that is because many jobs are ending at the same time and appending + thread is not safe.

    I am not good with the session, so I have all the tricks to configure it, I tried to use a NullPool without any profit.

    Is there any way to secure the endand operation thread in such a distributed environment?

    If you want to update one - I believe - text field in parallel < / Em> It is running internally: Each example reads the original field, the object takes care of immediately ( sessionmaker , hence an example of a data-holding unit for each thread) And adds its part to the version of its field. After this, their own incidents occur. What you get as a result - Completely Thread-Safe - Previous Edition Last Object Written Wins

    If you want to all commit your data to the same area with the this data structure, then you have to throw a profit of threading , And synchronize instances of the organization to read and write, so that each thread can wait for the data to be read (for this) until its predecessor arrives.

    You should do do this: to convert the advantages of a SQL database to usages in the data structure and each your SQL Update the record.

    jquery - Change Opacity of an Unclicked Element -


    I have some elements on my webpage and I want to click on one of the elements when I click on it Is unchecked)

      
    & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "back" & gt; One class = "link" href = "# / portfolio / chicken.html" onclick = "gestionClic ('compteur11');" & Gt; & Lt; Div class = "element-image-back" & gt; & Lt; Div class = "element-image-back" & gt; & Lt; Img src = "./ Post thumbnail images / raspberrypyboard.jpg" /> gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; / Div> & Lt; / Div & gt;

    When I click on an element, it is class = "link" which is clicked.

    I tried to do this but it does not work:

      $ ('.link'). Click (function () ($ ('. Element'). Sister () .animate ({session acety: 0.4}, 300); $ ('. Link') (function () {$ no ( 'Element'). Stop (). Animate ({obscurity: 1.0}, 300);});});    

    First: Clear your HTML elements!

    Second: Work on my demo

      $ ('. Element> img'). Click (function () {$ (this). ({Opacity: 0.4}) Brother Sister (). Chetan ({obscurity: 1});});   

    After clearing your HTML ...

      & lt; Div class = "element" & gt; & Lt; Img src = "{SRC}" & gt; & Lt; Img src = "{SRC}" & gt; & Lt; / Div & gt;   

    Then you can use

    demo:


    if you're actually your impure If you want to use HTML, just do this ...

      $ ('Element img'). Find (". Element"). Find ("img"). (This) .mate ({opacity: 1}); $ (this) .met ({obscurity: 0.4});} );  

    Demo:


    Example in your case:

     < Code> $ ('. Element & gt; .back & gt; .link'). Click (function () {$ (this). Value ({opacity: 1}); $ (this) .parents (". Element") .find ("front."; Element-image-front "). ({Opacity: 0.3});});   

    One more click:

      $ ('. Element & Gt; Forte & gt; .element-image-front ') .click (function () {$ (this) .animate ({opacity: 1}); $ (this) .parents (". Element"). ( ". Back> .link"). Animate ({obscurity: 0.3});});   

    Should be done in a function, but your HTML is unclear. Code 2 Function for% Work and 100% Full Focus Elements

    Day Mo:

    wpf - DataGridCheckBoxColumn checkbox formatting -


    How do I add 1-pixel top-margin to the checkbox in DataGridCheckBoxColumn?

    Any help in this regard will be greatly appreciated ....

    You can try the following:

      & lt; DataGrade ItemsSource = "{Binding}" & gt; & Lt; DataGrid.Columns & gt; & Lt; DataGridCheckBoxColumn Header = "Checkbox" & gt; & Lt; DataGridCheckBoxColumn.ElementStyle & gt; & Lt; Style & gt; & Lt; Setter Property = "Framework Element. Margin" Value = "0,1,0,0" /> & Lt; Setter Property = "Framework Element. Horizontal Alignment" value = "center" /> & Lt; / Style & gt; & Lt; /DataGridCheckBoxColumn.ElementStyle> & Lt; / DataGridCheckBoxColumn & gt; & Lt; /DataGrid.Columns> & Lt; / Data grid & gt;   

    This works, and the exact checkbox gets the margin specified. See the article about ElementStyle property Also, if you enable editing in your DataGrid , you can change the application to apply the appropriate look.

    Elasticsearch initial configuration in Java code or in external script? -


    I am learning elastic search and I have started a new project. Now I wonder where to add mapping etc., where should I add initial code etc. Do you create an external script that holds different curl commands and then runs on it, or for example Java project has a self package where your configuration code is and then when you need to run it for? Which approach is most suitable and why?

    The mapping that I use the XContentBuilder

      {"Tweets": {"Properties": {"message" "Type": "String", "Store": "Yes" , "Index": "analyzed", "value_value": "not"}}}}    

      Public void putMappingFromString (string index, string type, string mapping) {div class = "post-text" itemprop = "text"> 

    indeseadmin client IACC = maltent (). Administrator () Index (); PutMappingRequestBuilder pmrb = New PutMappingRequestBuilder (iac); Pmrb.setIndices (index); Pmrb.setType (type); Pmrb.setSource (mapping); ListenableActionFuture & LT; PutMappingResponse & gt; Laf = pmrb.execute (); PutMappingResponse pmr = laf.actionGet (); Pmr.getAcknowledged (); }

    You can obtain mapping for an index from the cluster state (indirectly):

      public string mismapping (string index, string type ) Throws EsuException {ClusterState CS = getClient (). Administrator () Cluster () ReadyState () SetFilterIndices (index) .execute () ActionGet (). GetState (); Index metadata IMD = C Metadata (). Index (index); If (IMD == faucet) {new ESUIDXOntexExistException (index); } MappingMetaTata mmd = imd.mapping (type); If (mmd == tap) {new EsuTypeDoesNotExistException (index, type); } String mapping = ""; {Mapping = mmd.source (). Try the string (); } Hold (IOException e) {mapping = "{\" "+ e.toString () +" \ "}"; } Return mapping; }   

    If you store your mapping as a resource on your class path, then it allows your mapping to be processed with your source code < / Div>

    jquery - horizontal accordion tutorial css issue i think -


    I am following this tutorial on how I have gone through the horizontal coordinate code and that's OK. What is my problem? I think that is my CSS, when you click on a tab, the animations are animated in the last panel, but the next panel is dropped and does not do the etmat, someone can show me what is wrong , Either in my CSS or JPER Please give me some help for this. Please here is mine. I do not know what exactly is the problem, but I run all my elements on the left.

    PS 'visible' variable is the current content panel html:

        

    CSS

      .accordion {width: 460px; Height: 300px} .accordion .header {width: 40px; Height: 100%} .accordion .content {background: #dedede; Height: 100%} .accordion Title, accordion .content {float: left; Height: 100%; Clear: none} # Tab 1 {Background: # C90} # Tab 2 {Background: # C60} # Tab 3 {Background: # C30} # Tab 4 {Background: # C00}   < P> jQuery: <(': last'), width (':' '' 'H3' ',' visible '). = Visible.outwidth (); Tab.next () Filter (': no ​​(: last)'). CSS ({'display': 'none,' width ': 0}); Tab.click (function () {if (visible.prev () [0] == this) {return;} visible.animate ({width: 0}, {duration: rate}); visible = $ (this) Next (). Chetan ({'width': width}, {duration: rate});}; } Ardiion (350);    

    Sorry I do not have enough reputation to comment on this.

    Did you compare your code with the linked source code in the comment of the tutorial video?

    There are some important differences in your original post, the jacquery is different from your JSfield.

    Your jazzery should look even more:

      function erordian (rate) {var tab = $ ('.accordion'). ('Header'), visible = tab. New (). Filter (': the last'), width = visible.outerWidth (); Tab.next () Filter (': no ​​(: last)'). CSS ({'display': 'none,' width ': 0}); Tab.click (function () {if (visible.prev () [0] == this) {return;} visible.animate ({width: 0}, {duration: rate}); visible = $ (this) Next (). Animate ({width: width}, {duration: rate});}); }; $ (Document) .ready (function () {accordion (350);});    

    objective c - NSString isEqualToString won't return true, and unrecognized selector -


    I have a string dummyString that should be compared to 100. This is my code

      dmestressing = [prefix objectfore: @ "display size"]; [Self set disassembly: dummy string]; NSLog (@ "Display Controller is Preparing to Set With Values% @", Dummy Strasting); NSLog (@ "1 tried"); If ([Dmestressing excel: @ "5"]) {NSLog (@ "Loaded Preferences, Short Display"); DisplayChanged.selectedSegment = 0;} NSLog (@ "Tride 2"); If ([Dmestressing Excel: @ "40"]) {NSLOG (@ "Loaded Preferences, Display Made!"); DisplayChanged.selectedSegment = 1;} NSLog (@ "Tride 3"); If ([Dmestressing avest toastring: @ "100"]) {NSLog (@ "Loaded Preferences, Display Large"); DisplayChanged.selectedSegment = 2;} NSLog (@ "display% controller is trying to meet with value% @", dummy strasting); CopyBot [1011: 303] is being prepared to set display controller with value controller 100   

      2013-03-26 17: 22 : 49.101 -03-26 17: 22: 49.102 Trying to copyboat [1011: 303] 1 2013-03-26 17: 22: 49.102 Copyboat tried [1011: 303] 2 2013-03-26 17: 22: 49.102 tried copyboat [1011: 303] 3 2013-03-26 17: 22: 49.103 copyboat [1011: 303] - [__ NSCFNumber is extolstration]: Unexpected selector sent for example 0x64c7 2013-03-26 17 : 22: 49.103 copybott [1011: 303] - [__NFFNumber avestoString:]: A For example, 0x64c7 sent to the familiar selector   

    I have tried some variations to declare different stars, but it can never look like to enter an 'if' statement. Is any comparison for any comparison, is Aval or EqualToString any help is appreciated.

    According to your error your dummyString is not NSSTING In fact it is NSNumber .

    You compare your string with @ "5" to NSNumber and then compare:

      BOOL equals = [dmestressing Excel Number: @ ([@ "5" Integer Value]];   

    or convert the dammestring value to a string and then compare:

      BOOL equal = [NSString stringWithFormat: @ "% d", [dummyString IntegerValue]] is EqualToString: @ "5"];    

    asp.net - Can't share isolated storage file between applications in different app pools -


    I have under the default website has multiple web apps in IIS (WCF) services as long as they all have the same application pool they Running in a shared separate storage file can not use any problems.

    However, once I tried to reach individual is incapable of separate applications to carry the I "System.IO.IsolatedStorage.IsolatedStorageException: Mutks pool" when someone went by another file they are running under the NetworkService user I GetUserStoreForAssembly and GetMachineStoreForAssembly could all do not use any idea why they file sharing tried with the same results?

    I made sure that the closing of the currents and settling it is also holding someone in one case, but I am running a simple test where one service writes

    apart from this , I'm reaching a separate store from a signed assembly.

    Do anyone have any ideas?

    Anyone have any ideas? p>

    Here is the code: the

      try Private Sub LoadData () Dim filename = FullFilePath (_fileName) dim isoStorage as IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForAssembly () ' GetMachineStoreForAssembly, the same failure isoStorage. CreateDirectory (ROOT_DIRECTORY) if (isoStorage.GetFileNames (filename) .Length = 0) then return end if not drift as stream = new IsolatedStorageFileStream (filename, FileMode.OpenOrCreate, isoStorage) Section isnot something then dim formatter IFormatter = try as new BinaryFormatter then () dim app data like Hastebl = Dayrektkast (Formetr. Dayrerialaijh (stream), Hastebl) Daym Anyumretr as I DictionaryEnumerator = appData.GetEnumerator () while EnumeratorkMoveNext () End my (enumerator.key) = enumerator.value Try person while finally StreamkClose () StreamkDispose () Section = some other end not end even open stream End Sub Public Sub Save () Dim filename = Puarnfailpath (_fileName) 'IsolatedStorage. Separate storage file as dim ISO file: separate storage file.NETUserStorForAsdampon () tried 'GetMachineStoreForAssembly', in the form of a similar failure stream, dim stream = new separate storagefilestream (file name, FileMode.Create, ISO file) if there is no stream then some defraterfirmer Try IFormatter = New BinaryFormatter () formatter.Serialize (Stream, Direct Sext (m, hashtable)) Finally stream. Close () Stream. Forbidden () stream = try nothing end if end sub    

    It seems that There was a trust issue.

    GAC sets it as everything in Magical Gac to complete access to the separate storage file after adding assembly is fully trusted.

    This works for me, but it can not always be an option to do so for other solutions. If so, then see the .NET Framework caspol utility.

    Hope this helps anyone! It was a very large accessory.

    powershell - how to open power shell window from a batch file to a new window -


    I am writing a dos batch script file. My script will be doing the following:

    1. Make a directory with the mkdir command
    2. Divide a power shell command into a new window (not the same command window)
    3. I would like to open this power script in a new window
    4. Run Shell Monkey-P com.android.browser in the current window

      test.bat

        mkdir c: \ test_log_file powershell adb logcat & gt; & Gt; "C: \ Testdata.txt" shell monkey -P com.android.browser   

      I have a problem creating a power in a new window how do I have a power shell in a new command window Will open

      Regards,

        mkdir c: \ test_log_file START "powerhail window "PowerHead ADB Lockacket ^ & gt; ^ & Gt; "C: \ Testdata.txt" shell monkey -P com.android.browser   

      Duties ( ^ ) to avoid the command for your particular meaning The processor is essential. The first parameter quoted is the window title of the new window, if you wish, then " can be.

    iphone - Could anyone tell me why UIImage.ciimage is null -


    मैंने पाया कि IOS UIImage में CIImage को बदल सकते हैं। UIImage में एक संपत्ति CIImage है। और जब मैं UIImage का उपयोग करता हूँ, UIImage ऑब्जेक्ट रिक्त नहीं है, लेकिन UIImage.ciimage शून्य है, क्यों?

    अगर कोई मेरी सहायता कर सकता है तो मुझे मेरी बेवकूफी के सवाल को माफ़ करो, बहुत बहुत धन्यवाद


    ADD

    उदाहरण के लिए, नीचे की तरह शून्य कोड:

      UIImage * image = [UIImage imageNamed: @ "test जेपीजी "]; सीआईएमएज * सीआईआईजेज = इमेज। सीआईएमएज   

    लेकिन अगर इस तरह से सीआईआईमेज रिक्त नहीं है:

      UIImage * image = [UIImage imageNamed: @ "test जेपीजी "]; सीआईएमएज * आईआईमेज = [[सीआईएमएज एएलओओसी] इनिट वाईथ सीजीआईमेज: इमेज। सीजीआईमेज ऑप्शंसः नाइल];    

    यह इसलिए है क्योंकि यह UIImage वास्तव में एक सीआईएममेज नहीं है। दूसरे शब्दों में, UIImage का CIImage केवल तभी नहीं है यदि UIImage को पहले से ही सीआईएम द्वारा समर्थित किया गया है (जैसे कि imageWithCIImage: द्वारा उत्पन्न होता है)। आप इसका प्रयोग यूडीआईजेज को सीआईएममेज में बदलने के लिए नहीं कर सकते, क्योंकि आप ऐसा करने की उम्मीद करते हैं।

    दस्तावेज़ीकरण वास्तव में इस पर बहुत स्पष्ट है। हमेशा पढ़ने योग्य है।

    optimization - MySQL slow on SELECT WITH "OR" on multiple columns -


    I have a table that has 3 miles of rows and when I use this query to select:

      order_code, store_debit, where 4624603 TOTAL_PRICE order (ID, PID) and `status` = -6;   

    or this question (using OR )

      SELECT order_code, Store_debit, total_price command WHERE (id = 4624603 or pid = 4624603) and `position` = -6;   

    And he has & gt; 17secs was but when I separate the two questions:

      Where select order_code, store_debit, TOTAL_PRICE ordered id = 4624603 and `Status` = -6;   

    and

      select order_code, TOTAL_PRICE = 4624603 and `the store_debit, where PID command Status` = - 6;   

    This Instant returns

    Thank you all!

    Update: The table indexes

      cop_type payment_type, cod_type, cash_transfer, PID, position, normalized BTREE all_type payment_type Generic BTREE search_order_code order_code generic BTREE theodoi user_id, PID, payment_type, cash_transfer, status, report_atm, pay_status, normal BTREE item_lib item_id, status, pay_status, payment_type, generic BTREE search_phone generic BTREE search_order_email Email General BTREE order_work cod_id, status, district, payment_ Rkar, pay_status, cash_transfer, cod_type, free_ship general BTREE select_hot province, state, type, built, payment_type, pay_status, ITEM_ID general BTREE coupon_after_buy ID, PID, state, free_ship general BTREE search_ofice office, created, conditions, ship_status general BTREE SEARCH_ITEM ITEM_ID, Office of making, normal BTRI idx_ward_id ward_id general btri idx_street road_id normal btri idx_graphcode group code, with normal status ID General Bitiaar Aidiaks_pattaim Bhugtan_tim general Bitiarai Khoj_any PID, status, general Bitiarai Aidiakskountri_prkar country's typing General Bitiarai Aidiaks_buk_taim Buk_ time general Bitiari    

    How about using a union of the last two? Maybe / or maybe forcing a table scan.

    OpenCV C++ Drawing and Analyzing Line -


    I am working on an OpenCV program which is capable of detecting punches and categories of boxers. At the moment my program goes through all the different image processing, pulls the box containing the boxes on the ROI (regional interest), I get it and calculating these are some properties of each bounding box like area and center point

    What I want to do now is to draw a line from each bounding box starting from the center point and analyze that line for its angle and length. Take a look at the image shown to my purpose:

    Enter image details here

    So hopefully now you have a better observation ........

    My question is here that I have such a line in the position of position in a vector How to attract from starting from the end to the end? To analyze this ...?

    I did some research on several functions, which draw a line, but none of them seems appropriate for my purpose. Here are some research links:

    Apart from this, the arc length, fittlines, clip lines and also seen; Half Transformation

    Does anyone tell me which technology best fit my purpose ...?

    Hopefully my problem is now well understood

    An array Store the frame-by-frame of the tracked object in, store the centroid conditions, then feed it to the polylines () function.

    c# - Is there any way of knowing the content of an IQueryable object without using Reflection? -


    I have to work with a given class "QueryGenerator" that matches the dynamic queries And by using string connection and provider, the column by the user anyway, I do not need to know the implementation of the class, but I have to use it and I'm in stock.

    Finally, "query generator" returns the result of query as an object, the only thing I know (because I use the reflector on the square) Here is an example that I can put an IQueryable on that query result:

      var result = (IQueryable) myQueryGenerator.Result; To know the contents of   

    and results , I have to use reflection.

    So, is there a better way to know the contents of the results , and, for example, fill a dataset with it?

    No, no.

    IQueryable can return different types of objects (for example, if you query against an array of objects) in this extreme case you will need to determine the type of each individual item in the enumerated query .

    Example code to display this scenario:

      object [] Objs = new object [3] {"string", 78, datetime.now}; Var q = objs.AsQueryable (). Skip (1) Take (2); Forresh (Y in OQ) {var t = o.GetType (); }    

    embed - How to start jw player automatically? -


    यहां मेरा एम्बेड कोड है:

      & lt; embed width = "576" height = "432" फ्लैशवार्स = "& amp; amp = file = kgalive & amp; amp; streamer = rtmp: //5.77.33.107/kga" wmode = "अपारदर्शी" अनुमतिप्रमाण = "हमेशा" अनुमतिप्राप्त स्क्रीन = "सही" गुणवत्ता = "उच्च" नाम = "खिलाड़ी" आईडी = "खिलाड़ी" शैली = "" src = "खिलाड़ी.swf" स्वतः = "हमेशा" प्रकार = "एप्लिकेशन / एक्स-शॉक-वी-फ्लैश" / & gt;   

    यह काम करता है, लेकिन वेबपेज खोलते समय मेरा खिलाड़ी स्वचालित रूप से शुरू नहीं करेगा अपने खिलाड़ी को स्वचालित रूप से शुरू करने के लिए मुझे क्या करना चाहिए?

    असल में:

      & Lt; एम्बेड चौड़ाई = "576" height = "432" flashvars = "& amp; amp; फाइल = किलाइव और amp; amp; streamer = rtmp: //5.77.33.107/kga" wmode = "अपारदर्शी" अनुमति प्राप्त करें = "हमेशा" स्वीकार्यप्रक्रिया = "वास्तविक" गुणवत्ता = "उच्च" नाम = "खिलाड़ी" id = "खिलाड़ी" शैली = "" src = "खिलाड़ी.swf" autostart = "always" type = "application / x-shockwave-flash" / & gt;   

    की आवश्यकता है:

      & lt; एम्बेड चौड़ाई = "576" ऊंचाई = "432" flashvars = "& amp; autostart = सच & amp; amp; ; File = kgalive & amp; amp; streamer = rtmp: //5.77.33.107/kga "wmode =" अपारदर्शी "अनुमतिबद्धता =" हमेशा "अनुमतिप्राप्त स्क्रीन =" सही "गुणवत्ता =" उच्च "नाम =" खिलाड़ी "id =" खिलाड़ी "शैली = "" Src = "खिलाड़ी.swf" autostart = "हमेशा" प्रकार = "एप्लिकेशन / एक्स-शॉक-वी-फ्लैश" / & gt;    

    c++ shared_ptr with std::function or double (*SOME_NAME)(double); -


    Q1) यह देखते हुए कि हमारे पास

    typedef डबल (* function_t) (डबल);

    या

    typedef std :: function & lt; डबल (डबल) & gt; Function_t;

    हम कैसे परिभाषित करते हैं

    std :: shared_ptr & lt; function_t & gt; Ptr_func = ???

    कुछ फ़ंक्शन के लिए। मान लें कि हम एक वस्तु को shared_ptr चाहते हैं, जिसे पहले से परिभाषित किया गया है (अब के लिए भूलना यह उद्देश्य को हरा देता है - लेकिन मुझे इसकी आवश्यकता है)। एक उदाहरण के रूप में डबल

      struct null_deleter {void operator () (शून्य const *) const {} के प्रकार के लिए निम्नलिखित पर विचार करें; }; Int main () {// परिभाषित वस्तु डबल बी = 0; // परिभाषित साझा सूचक std :: shared_ptr & lt; डबल & gt; ptr_store; ptr_store.reset (एंड बी, null_deleter ()); // यह काम करता है और आप की अपेक्षा कैसे करते हैं)   

    यद्यपि हम shared_ptr प्रकार function_t के लिए ऐसा करते हैं, अर्थात

      डबल एफ (डबल एक्स) {// some_function + return} int main () {// परिभाषित साझा सूचक std :: shared_ptr & lt; function_t & gt; ptr_store; ptr_store.reset (& amp; च, null_deleter ()); // त्रुटि: काम नहीं करता है}   

    लौटाया त्रुटि निम्न जैसा है:

      त्रुटि: 'डबल' (*) (डबल) 'से' डबल (**) (डबल) 'आरम्भिकरण में   

    या std :: function

      त्रुटि: 'डबल (*) (डबल)' से 'std :: function & lt; डबल (डबल) & gt; *' initialization में परिवर्तित नहीं किया जा सकता   

    यह स्पष्ट नहीं है कि सही प्रकार पारित किया गया है , और शायद हमें ऐसा करने की अनुमति नहीं है (?)

    नोट: जी ++ 4-7-2 संस्करण -std = c ++ के साथ संकलित 11-ओ 3 विंडोज़ मिनजीड पर

    कुछ जवाब अच्छी तरह से काम करते हैं, मैं आज कुछ समय के लिए आपको उत्तर दूंगा। यह सुबह 6.30 बजे है और मैं अभी तक सो नहीं पाया। मैं जो लागू कर रहा हूं, उसके लिए मेरा पूरा डिज़ाइन पैटर्न शायद गलत है, उम्मीद है कि मैं थोड़ी देर बाद समझा सकता हूं। पाठ ">

    यह अनुक्रमित है, परन्तु सबसे अच्छा यह है कि मैं समझ नहीं पाया कि वास्तव में आप वास्तव में क्या करने की कोशिश कर रहे हैं:

      #include & lt; iostream & gt; Typedef std :: समारोह & lt; डबल (डबल) & gt; function_t; डबल एफ (डबल टी) {रिटर्न टी * 5; } Int main (int argc, char * argv []) {// आप आमतौर पर साझा सूचक को गतिशील रूप से आवंटित वस्तु std :: shared_ptr & lt; function_t & gt; से जोड़ना चाहते हैं। ptr; Ptr.reset (नया function_t (std :: bind (& amp; एफ, std :: प्लेसहोल्डर्स :: _ 1))); Std :: cout & lt; & lt; (* Ptr) (5.0); // लेकिन हम स्मार्ट पॉइंटर को स्टैक (बैड आईडीईए) function_t fff = std :: bind (& amp; एफ, std :: placeholders :: _ 1) पर एक स्थानीय फंक्शन ऑब्जेक्ट में संलग्न कर सकते हैं; ptr.reset (& amp; FFF); Std :: cout & lt; & lt; (* Ptr) (5.0); }    

    How to create an MVC form using MongoDB, Node.js(+express) and Jade -


    I have been working with creating a simple CRUD app using the up stack.

    However, with me lack of knowledge can be prevented from doing things in an easy fashion.

    My main concern with the update is that I have an object that is loaded from the database. The fields need to be mapped in one form, and when the contents of the form are modified and saved, then the database should be updated.

    I found it very easy to render, and dynamically populated using ZE, however, on the way back, I used jQuery to rebuild my "manually" object. I am sending a Strataced JSON presentation of the form; Before storing it back into the database.

    Is there an automatic device that mapped it for me? Looking at a JSON object and a form, it will handle the population and save the information back in the model.

    For reference, I'm coming from a SpringMVC + hibernate background.

    The tutorial for the tutorial or even a simple example would be OK. thank you in advanced!

    Like others, I would definitely recommend it to help me when I try to learn the same stack was doing. On the server you can have something like this:

      // defined schema var userSchema = mongoose.Schema ({name: 'string', Description: 'string', email: 'string', Date: {type: date, default: date, now},}); // Instant DB model var user = mongos Model ('user', user schema); // Post client export from Adds json from client post in addUser = function (req, res) {// req.body / unless that json field name is similar to schema field name, this data will automatically map new user = new user (req. Body); New user.save (error) {if (err) {return res.json ({error: "Error saving new user"});} else {console.log ("Success in adding a new user"); Res.json new user); }}); }; // PUT from client export Updduser = function (req, body) {// updated user json var updatedUser = req.body; // Here we can see that user by email field User.findOne ({'email': updatedUser.email}, function (mistake, user) {if (err) {return res.json ("error:" user Error in fetching "});} Else {//. We successfully found a user in the database, Update individual fields: user.name = updatedUser.name; user.save (function (err) {if (err) {return res.json ({Error: "Error updating user"});} other {console.log ("success in updating user"); res.json (updatedUser);}})}}}); }; Edit * Apparently, Mongoose actually has a search and update method that essentially does the same thing as I wrote above to update a model. You can read about it   

    android - Change of homeAsUpIndicator icon in ActionbarSherlock does not effect in ICS? -


    मैं ActionBar में homeAsUpIndicator आइकन को बदलने का प्रयास करता हूं। मैं पुराने कोडों के साथ संगत होने के लिए ActionBarSherlock का उपयोग करता हूं। मैं अपनी गतिविधि के लिए एक विशिष्ट विषय सेट करता हूं, जब ऐप एक डिवाइस पर आईसीएस और आईसीएस के पुराने संस्करणों के साथ चलता है, तो यह अलग-अलग रंग दिखाता है।

    यह वह शैली है जो मैं

      & Lt; शैली का नाम = "थीम। पीएम" अभिभावक = "@ शैली / थीम। शारलॉक। प्रकाश" & gt; & Lt; आइटम का नाम = "android: homeAsUpIndicator" & gt; @ ड्रॉएबल / बैक_साइन & lt; / item & gt; & Lt; आइटम का नाम = "होमएएसअप इंडिकेटर" & gt; @ ड्रॉएबल / बैक_साइन & lt; / आइटम & gt; & Lt; / शैली & gt;   

    आईसीएस के लिए इस तरह की छवि के नीचे देखें कि घर ऊपर के संकेतक काले रंग की तरह दिखते हैं।

     यहां छवि विवरण दर्ज करें

    आईसीएस के पुराने संस्करणों के लिए देखें कि घर में ऊपर सूचक सफेद रंग की तरह दिखता है।

     यहाँ छवि विवरण दर्ज करें

    मैं दोनों संस्करणों के लिए एक ही छवि का उपयोग कर रहा हूं, लेकिन यह आईसीएस पर अलग दिख रहा है। कैसे इस समस्या को हल करने के लिए ..

      & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "utf-8" & gt; & Lt; संसाधन xmlns: एंड्रॉइड = "http://schemas.android.com/apk/res/android" & gt; & Lt; शैली नाम = "कस्टम स्टाइल अप एहोम" पेरेंट = "थीम। शारलॉक.लाइट" & gt; & Lt; आइटम का नाम = "एंड्रॉइड: एक्शनबारस्टाइल" & gt; @ शैली / कस्टमएक्शनबारअपएम्सहोटल & lt; / item & gt; & Lt; आइटम का नाम = "android: homeAsUpIndicator" & gt; @ ड्रॉएबल / एरो_होम & lt; / item & gt; & Lt; आइटम का नाम = "होमएएसअप इंडिकेटर" & gt; @ ड्रॉएबल / एरो_होम & lt; / item & gt; & Lt; / शैली & gt; & Lt; शैली नाम = "CustomActionBarUpAsHome" parent = "CustomActionBar" & gt; & Lt; आइटम का नाम = "एंड्रॉइड: डिस्प्ले ऑप्शन" & gt; घरएप | उपयोगो लोगो | शोहोम & lt; / item & gt; & Lt; आइटम का नाम = "डिस्प्ले ऑप्शन" & gt; घरएप | उपयोगओलोोगो | शोहोम & lt; / item & gt; & Lt; / शैली & gt; & Lt; / संसाधन & gt; & Lt; गतिविधि एंड्रॉइड: name = "। Activity.Activity" एंड्रॉइड: स्क्रीनऑरियेंटेशन = "पोर्ट्रेट" एंड्रॉइड: थीम = "@ शैली / कस्टमस्टाइलउपआहेहोम" & gt; & Lt; / गतिविधि & gt;   

    यह कोड महान काम करता है। ऐसा कुछ करने की कोशिश करो हो सकता है कि यह आपकी सहायता करेगा।

    शुभकामनाएँ!

    android - emulator: emulator window was out of view and was recentered -


    I get this warning after starting the Android emulator: emulator: Warning: could not:

    Start OpenGlass emulation using the software renderer WglGetExtensionsStringARB can not be found Could not get wglGetExtensionsStringARB wglGetExtensionsStringARB Could not get wglGetExtensionsStringARB Could not get wglGetExtensionsStringARB Could not get wglGetExtensionsStringARB wglGetExtensionsStringARB Could not get wglGetExtensionsStringARB emulator: The emulator window was out of view and was recently

    Even after the keyboard is displayed without the adapter emulator, I select both the checkbox "Hardware keyboard present" and "Display a skin with hardware control"

    View this path C: \ user \ username Android \ avd ** Edit this file ** Emulator-user & amp; Set window.x = 0 window.y = 0 This works for me.

    order_by intermediate table for given relation in SQL with Django ORM -


     <कोड> वर्ग पोषक तत्व (models.Model): टैगनाम = models.CharField (MAX_LENGTH = 10) वर्ग FoodNutrientAmount (मॉडल। मॉडल): पोषक तत्व = models.ForeignKey (पोषक तत्व) खाद्य = models.ForeignKey (खाद्य) राशि = models.FloatField () वर्ग खाद्य (models.Model): पोषक तत्वों = models.ManyToManyField (पोषक तत्व, = FoodNutrientAmount के माध्यम से,)   

    तो, मैं फूड्स की राशि द्वारा आदेश दिया प्राप्त कर सकते हैं टैगनाम = FOL एक सूची समझ के साथ पोषक तत्व:

      ordered_fnas = FoodNutrientAmount। objects.filter (nutrient__tagname = "FOL") .order_by ( '- राशि') ordered_foods_by_most_fol =  [ordered_fnas में फना के लिए fna.food]  

    मैं मिल सकता है इस तरह के बिना एक क्वेरीसमूह के रूप में एक iterable पूरी बात को स्मृति में ले जा रहे हैं?

    शायद food.objects.anotate या अतिरिक्त का उपयोग कर एक अलग दृष्टिकोण है? मैं इस समय ऐसा करने का एक शानदार तरीका नहीं सोच सकता।

    मैं values_list के साथ मिल सकता हूं; लेकिन, मैं पीकेएस का आदेश दिया सूची और नहीं खाद्य वस्तुओं है कि मैं चाहता हूँ। के क्वेरीसमूह मिल

      FoodNutrientAmount.objects.filter (nutrient__tagname = 'FOL')। ऑर्डर-बी ('- राशि')। VÃÆ'à  एक € ™ ÃÆ'à ¢ एक, ¬ Å ¡Ãƒâ € SA, एक · alues_list ('भोजन', फ्लैट = सच)    

    संपादित करें:

    यह कई-से-कई रिश्ते हैं तो आप संभवतः इसका लाभ उठा सकते हैं कैसे के बारे में FoodNutrientAmount के लिए डिफ़ॉल्ट अनुक्रम जोड़ने और फिर आप बस सामान्य manytomany प्रश्नों कर सकते हैं

      वर्ग FoodNutrientAmount (models.Model):। पोषक तत्व = models.ForeignKey (पोषक तत्व) भोजन = मॉडल। विदेशी (भोजन) राशि = मॉडल। फ्लोटफ़िल्ड () वर्ग मेटा: ऑर्डरिंग = ('-एमएमटी',)   

    तब आप बस कॉल कर सकते हैं -

      पौष्टिक_फुड्स = खाद्य.ओब्जेक्ट्सफिल्टर (पोषक तत्वों_संबद्ध = 'एफओएल')। आदेश-द्वारा ('खाद्योत्तर आहार')    

    qt - How to support window.print() in a embedded web browser? -


    My owner asked me to add a "print" button for an HTML file. Well, the window. Print () But this does not work because the embedded web browser in the software was developed by my company. It can not support the print.

    However, I have to support it.

    This web browser was using WebKit, and I only knew about QT and WebKit.

    How can I apply this feature? For example, how does the web browser work with "window.print"?

    Consider sending content of HTML / CSS (or a link) via AJAX to a server side The print server, which then renders the HTML and sends it to the network printer. Another option is to create a browser plugin with NSAPI (C ++). Another option is to embed a Java applet, which takes the HTML, references it, and sends it to the printer.

    jquery - User is automatically logged in after doing a log out, with Facebook-JavaScript-sdk login -


    I can easily log in user to my site and get details of it on Facebook but I I'm not able to log out. On entering, I am landing members on the internal page for members. From there it presses logout from my web site. On pressing that it is sent back to the first page, which is definitely reloaded.

    I think the user who logged in when he presses the logout button, he is sent to the front page. But the login event is automatically lit up and it is logged in again.

    I am using the following code.

      & lt; Script type = "text / javascript" & gt; $ (Function () (var button; if (document.cookie.indexOf ("fbsr_myappid") & gt; 0) {// I'm checking whether the cookie value is set, I create a status in FB.init () false Var fb_status = false;} other {var fb_status = true;} window.fbAsyncInit = function () {FB.init ({appId: 'myappid', position: fb_status, cookie: true, xfbml: true, oauth: True}); if (response. At response) {FBP ('/ m', function (info) ($ .post ("/ Web / register / faceBookRegistration", {data: info}) done (function Data) {if (dataof! = Undefined) {window.location = "/ web / login / loadFaceLogin"; // I have my login controller having loadFaceMember function To post an AJAX.}} Login (feedback, info);}) button. Click on = function () {// I think I should use filing elsewhere for FB.logout (function ( Response) {logout (response);});}} and click on button = function () {show loader (true); fb.login (function) {if (res Ponse.authResponse) {FB .api ('/ me', function (info) {login (feedback, info); }); } Other {showLoader (wrong); }}, {Scope: 'email, user_bridade, user_out_me'}); }}} FB.getLoginStatus (updateButton); FB.Event.subscribe ('auth.statusChange', updateButton); }; (Function () {var e = document.createElement ('script'); e.async = true; e.type = 'text / javascript'; e.src = document.location.protocol + '//connect.facebook. Net / en_US / all.js'; document.getElementById ('FB-root'). Appendbill (E);} ()); Function login (feedback, info) {if (response.authResponse) {var accessToken = response.authResponse.accessToken; ShowLoader (wrong); }} Function logout (feedback) {FB.logout (function (feedback) {console.log ("user is logged out now.");}); ShowLoader (wrong); } Function sholoder (status) {if (position) console.log ("yes sholoder."); Else console.log ("yes no showloader."); }});   

    On the server side, the following function is called logout controller when pressing the logout button.

      function index () {$ isSessionExp = true; If ($ this-> Session-> User Data ('is_sess')) $ is session Ex = false; $ Login_session_id = $ this- & gt; Session-> User Data ('login_session_id'); $ This- & gt; Login_model- & gt; UpdateLogoutTime ($ login_session_id); $ This- & gt; Session-> Sess_destroy (); If ($ Session is the exp) redirect ($-> url. "/ Logout / session_start"); Other redirects ($ the-> url. / "Login"); }   

    I think if I am able to link the above work in logout controller with the following lines of JavaScript code.

      FB.logout (function) {logout (response)}}   

    My work will be done.

    Anyone Help will be highly appreciated.

    "post-text" itemprop = "text">

    Yes, what I had guessed was correct. There is a modified function here.

      function logout {response.log ("from logout" + response); if (! Response.authResponse) {window .location = "/ web / login /"; return;} FB.logout (function Reaction) {FB.Auth.setAuthResponse (null, 'unknown'); logout ();}}}}   

    Thanks to @GW for pointing me in the right direction. I hesitate to comment and improve it. I welcome that. My approach was based on this

    amazon web services - copying s3 bucket to another aws account with CarrierWave Ruby gem -


    I am trying to copy some content from a byte with a bucket in a different AAS account. I am loading the uploader object in a hash, then I tried to connect the other bucket and save the property using credentials for that bucket.

      Tasks: product_color_images = & gt; : Environment CareerWorld Configure | C. C.fog_credentials = {: Provider = & gt; 'AWS' ,: A VS_Acce_KiIID => ENV ['COPY_FROM_AWS_KEY_ID'] ,: aws_secret_access_key = & gt; ENV ['COPY_FROM_AWS_KEY']} c.fog_directory = 'orig-bucket' # image copied from # bucket image_storage = {} productImage.all.each do | Image | Puts 'product image storage' image_storage [image.id] = image.image end carrier Wave.configure do | C | C.reset_config c.fog_credentials = {: Provider = & gt; 'AWS' ,: A VS_Acce_KiIID => ENV ['COPY_TO_AWS_KEY_ID'] ,: aws_secret_access_key = & gt; ENV ['COPY_TO_AWS_KEY']} c.fog_directory = 'target-bucket' # Bucket copied image_storage.Elect | K, v | Image = product image.find (s) image.image = v 'saves product image' image.save end end   

    Try saving one image from one bucket to another in the console It is revealed that the target bucket address is not used.

      Ruby-1.9.2-P2902: 026 & gt; Image = Product Image.Fund (197) Ruby-1.9.2-P290: 027 & gt; Image.image = image_storage [1 9 7] = & gt; Http: //orig-bucket.s3.amazonaws.com/uploads/product_image/image/197/product_image.png ruby-1.9.2-p290: 028 & gt; Image.save ruby-1.9.2-p290: 02 9 & gt; Image.image = & gt; Http://orig-bucket.s3.amazonaws.com/uploads/product_image/image/197/product_image.png    

    A lot of things happen that the bucket will be allowed enough so that you have enough permissions for images so that you can actually download them.

    I have a better solution for you, what can you do to install and configure your S3 CMD and make a receipt between two buckets. He will do things fast, so your Ruby on Rails

    javascript - How to hide cursor blinker (caret) in wysiwyg editors on demand? (redactor.js) -


    I'm trying to hide the blinking caret when clicking on some elements in wysiwyg editors (in my case redactor.js) I am, but I think all are equal.

    I do not want to disable the whole input area, it is merely hiding the carat and does not allow any input when clicking on some elements. <

    You can set the care position when clicking on some elements.

    Set the cursor position in a specific state of an element:

      $ ('# redactor'). Redirector ('setCaret', element, 4);   

    Set the cursor to the end of an element:

      $ ('# redactor'). Redactor ('selectionEnd', element);    

    java - JSP exception when I try to import static file -


    I'm trying to import the JavaScript from a file in my Jesp used to be a line of script Can:

      & lt;% @ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"% & gt; & Lt; Script & gt; & Lt; C: import url = "/ path / to / file.js" /> & Lt; / Script & gt;   

    The above code works 99% of the time, but I Tnkt give such notice some errors in the log:

      Jun 20, 2013 1 : 25: 33 AM org.apache.catalina.core.ApplicationDispatcher serious call: org.apache.taglibs.standard at 304 /path/to/file.js: servlet jsp the Servlet.service (for) exceptions javax.servlet.jsp on .JspTagException threw .tag.common.core.ImportSupport.acquireString org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag (ImportSupport.java:171) (ImportSupport.java:329) org.apache. Jsp.WEB_002dINF at jsp.common.head.scripts_jsp._jspx_meth_c_005fimport_005f0 (scripts_jsp.java:182) org.apache.jasper.runtime at org.apache.jsp.WEB_002dINF.jsp.common.head.scripts_jsp._jspService (scripts_jsp.java : 85) On and organization .HttpJspBase.service (HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service (HttpServlet.java:728) (JspServletWrapper.java:432) on org.apache.jasper.servlet.JspServletWrapper.service . apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service (JspServlet.java:334) javax.servlet on org.apache.catalina.core.ApplicationFilterChain.internalDoFilter. on http.HttpServlet.service (HttpServlet.java:728) (Java ApplicationFilterChain: 305) org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:210) on org.apache.catalina.core.ApplicationDispatcher.invoke (ApplicationDispatcher.java:749) at org.apache.catalina at. core.ApplicationDispatcher.doInclude org.apache.catalina.core.ApplicationDispatcher.include (ApplicationDispatcher.java:544) on org.apache.jasper.runtime.JspRuntimeLibrary.include (ApplicationDispatcher.java:605) (JspRuntimeLibrary.java:954) on org.apache.jsp.WEB_002dINF.jsp.game_jsp._jspService (game_jsp.java:181) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service (HttpServlet.java:728) on .JspServlet.serviceJspFile org.apache.jasper.servlet.JspServlet.service on org.apache.jasper.servlet on org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:432) (JspServlet.java:390) (JspServlet.java:334) .......   

    I found the code that throws the above exception ImportSupport.java:

      // inappropriate to JSTL space Make foreplay reject code (irw.getStatus () & lt; 200 || Irw.getStatus () & gt; 29 9) {new Jesp Teng Akspesheshn (Irv .getStatus () + "+ + strip session (Lcshyuarel)); }   

    It seems that the servicelet response code is 304.

    Why is the question? Is this a bug or am I missing something?

    Update:

    The problem only occurs when the incoming request is modified-

    Update 2:

    I solved this problem - since removed the static files and removed the header from each request.

    itemprop = "text">

    I have been using ResourceHttpRequestHandler of Spring MVC (with MVC configured: resource) using my fixed resources By serving / processing / * and it returns 304 returns to incoming requests, which use-modified-as headers. If there is an import and incoming request since the modified header I get javax.servlet.jsp.JspTagException :: So when I include such a static resource with C Error 304

    I have a choice, including the dynamic @, is not an option, and uses resources in an illegal manner in JSP, in which the resource is attempting to incorporate the URLs operated by the HTTPPequesthandler. So I was included in my own writing which reads from the file and writes it in JSP:

      & lt;% @ page import = "org.springframework.web.context .support. SerialcontactRSourceloader, org.springframework.core.io.Resource "%> & Lt;% @ Page Import = "org.apache.commons.io.IOUtils"%> & Lt;% string path = "/resources/fileName.html"; ServletContextResourceLoader Loader = New ServletContextResourceLoader (getServletConfig). GetServletContext ()); Resource processing = loader.getResource (path); IOUtils.copy (contentResource.getInputStream (), pageContext.getOut ()); & Gt%;    

    objective c - exception thrown on CCSprite spriteWithSpriteFrameName -


    I am trying to create an animated motive class, in which to start and stop the animation. When I take my CCSprite variable from local to an Iver, the class throws an exception. In the local form, with the CCSprite variable, class work, this phantom is visible and animated.

    This project has been enabled ARC, in which all the Cox 2D files have been flagged with -fno-objc-arc. I used to make the texture to make the underlying files, but I do not think there is anything to do with the problem.

    What am I doing?

    Cocos 2D version 2.01.00Xcode version 4.6.2

    How the class is being called:

      CCSpriteBatchNode * animatedSprite = [[ Animatedprint alloc] init]; AnimatedSpact.power = CCP (winSize.width / 2, winSize.height / 2); [Add Yourself: Animated Site];   

    Category header

      #import & lt; Foundation / Foundation. H & gt; #import "cocos2d.h" @interface AnimatedSprite: CCSpriteBatchNode {} @end   

    works that class

      #import "AnimatedSprite.h" @ Interface AnimatedSprite () {CCAction * Action; // CCSprite * sprite; } @end @implementation AnimatedSprite - (id) init {if (self = [super init]) {[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile: @ "spriteSheet.plist"]; Self = [CCSpriteBatchNode batch nodewithfile: @ "Precise page"]; NSMutableArray * Animated Frames = [NSMutableArray Array]; (Int i = 1; i & lt; = 4; i ++) {[animatedFrames addObject: [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName: [NSString stringWithFormat: @ "Sprite% d.png", I]]]; } CCSprite * sprite = [CCSprite spriteWithSpriteFrameName: @ "sprite1.png"]; // sprat = [CCSprakash Spit with SprintFrameName: @ "Sprite 1Page"]; Cc animation * animation = [cc animation animationwrightframes: animated frames delayed by 0.1f]; Verb = [CCRepeatArrowAutverctionActionAction: [CC irregular action with animation: animation]]; [Phantom run action: Action]; [Add soul to child: phantom]; } Healthy return; } @end   

    The class which throws an exception

      #import "AnimatedSprite.h" @ Interface Animated Site () {CCAction * action; CCSprite * Phantom; } @end @implementation AnimatedSprite - (id) init {if (self = [super init]) {[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile: @ "spriteSheet.plist"]; Self = [CCSpriteBatchNode batch nodewithfile: @ "Precise page"]; NSMutableArray * Animated Frames = [NSMutableArray Array]; (Int i = 1; i & lt; = 4; i ++) {[animatedFrames addObject: [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName: [NSString stringWithFormat: @ "Sprite% d.png", I]]]; } // CCSprite * sprite = [CCSprite spriteWithSpriteFrameName: @ "sprite1.png"]; Phantom = [CCSprakash Spit with AsprintFrameName: @ "Sprite 1Page"]; Cc animation * animation = [cc animation animationwrightframes: animated frames delayed by 0.1f]; Verb = [CCRepeatArrowAutverctionActionAction: [CC irregular action with animation: animation]]; [Phantom run action: Action]; [Add soul to child: phantom]; } Healthy return; } @end   

    stack trace

      objc_release # 0 0x01efc0ab () # 1 0x01efcbd9 (anonymous name space) :: AutoreleasePoolPage :: in pop (zero *) () # 2 0x024ae468 (in _CFAutoreleasePoolPop) # 3 in 0x0156f8e4 - _PurpleEventCallback [NSAutoreleasePool release] (in _UIApplicationHandleEvent in) # 4 0x00abbc16 () # 5 0x03214df9 () # (in 6 0x03214ad0 PurpleEventCallback in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__) # 7 0x02481bf5 () # 8 in 0x02481962 __CFRunLoopDoSource1 () # 9 0x024b2bb6 __CFRunLoopRun () # 10 (in 0x024b1f44 CFRunLoopRunSpecific) # (in 11 0x024b1e1b CFRunLoopRunInMode) # 12 in 0x00ab717a - [UIApplication _run] () # 13 0x00ab8ffc (in UIApplicationMain) # 14 0x000dcc66 main In / iPhone Apps / Cocos / SpriteTest / SpriteTest / main.m: 15 # 15 0x000022b5 Initially ()    

    Why are you trying to create a square Does Phantom Animation? There are many things that work for you. Watch they do the animation for you automatically. There is no need to revise some of the things already existing for you :)

    javascript - Q.all() promises not resolving deferred promises correctly -


    I am calling a post several times to create objects on a server, the post is wrapped in a promise. I make many promises and pass it to Q.all, but when it is resolved, all objects in the array have a single ID and only one object is created on the server.

    Here my code is

     for  (var i = txArray.length - 1; i> = 0; i--) {txArray [i]. _ Action = 'update'; Promises.push (newVertex (url)); }; Return Q.all (promises) Then (work (result) {console.log (results);}); Function Newertex (URL) {var deferred = Q.defer (); Var xhr; Try {Xhr = new_xhr (); } Hold (e) {deferred.reject (-1); Refund refund. } Xhr.open ('post', url, true); Xhr.onreadystatechange = function () {if (xhr.readyState === 4) {if (xhr.status === 200) {deferred.resolve (xhr.responseText); } And {deferred .reject (xhr); }}}; Xhr.send (); Refund refund. }   

    Why does not the result give returns to all items with the same ID? Does anyone have any suggestions.

    I have succeeded in solving this issue. The post had the header with content type: application / jsn That's why the server is expected to pass some data to it. Passing some Jason data or even '{}' resolved the problem.

    For example:

      xhr.send ('{}');   

    Thanks to each body response, it all helps.

    Java library for map plotting? -


    I have some large datasets of timestamp GPS that I want to plot on the map.

    I want to conspirate a large number of points and also read the data from the files, Web APIs like Sheets and Google Maps are not suitable (I have tried).

    I also need a map to expand the level of the streets.

    Can someone suggest the Java Library to do this?

    minigeo, use the

    miniga Is a lightweight java library that lets someone make geographic data meaningful (i.e. lines between points determined by geographic coordinates.



    iphone - Mixing Auto-layout and non auto-layout views in iOS -


    I have a view that uses auto-layout and is configured in the interface builder. This scene contains two sub-ideas, each of which is occupying halfway on the screen. . To achieve this goal, I am setting the height of one of the scenes to be the height of the Super View of the program.

      NSLayoutConstraint * constraint2 = [NSLayoutConstraint constraintWithItem: bottomView attribute: NSLayoutAttributeHeight relatedBy: NSLayoutRelationEqual toItem: contentInner Attribute: NSLayoutAttributeHeight Multiplier: 0.5 Continuous: 0]; [ContentInner addConstraint: constraint2];   

    Issues I'm coming up, this view which is not used by another view controller is called auto layout ie

      - see main - - Scene 1 (status using auto-layout for children) ---- Topview ---- bottomView   

    I set it for manually and then the size of scene 1 Want to be able to update the kids using auto-layout rules, it's currently set in UIBuilder The new counts of sizes depending on the external frame size

    Is there a way to get it or what I'm going the wrong way about it?

    You can get it after loading View1 after loading < / Code> : You just need [Yes ViewTranslatesAutoresizingMaskIntoConstraints].