Posts

Showing posts from February, 2012

Using JIBx to generate XSD from binding.xml -

Is there a way to automatically create an XSD document from bindings used by JIBx? This will be primarily indestructible to allow offline verification of XML documents. I checked the JIBX homepage, in which the device named Schema Generator is mentioned: But the jibx-genschema.jar file looks like now Not part of the package, as if I was thinking that there is an option thanks! There is a link to the original package.

Inheritance of from_ in Python -

Edit: There was some confusion, but I want to ask a general question about object-oriented design in Python . class datamap: pass P> Now consider sub-squared which allows you to create a histogram from a list of data: class histogram (datamap): def __init __ (auto, list_of_false): # 1. Suitable Super ...) Call it if necessary: ​​Make a map of the values ​​counted in self-pass. Now consider a class that creates a suspicious prospect table, which is the histogram . Class ProbabilityMaster (Datamap): Pass What's the best way What is Maybe Histogram can be created from or list of values? I have "grown up" programming in C ++, and in this case I use one overloaded constructor in Python I have thought about doing this: Constructor takes many arguments (all but none == none) I define from_Histogram and in_list methods In the second case (Which I believe is better), allow the from_list method to use the shared code from What is the b...

Cannot Post to site using Xcode. -

OK, I can actually use a little help. I'm very new to coding in xcode (this is also the first time I've asked for help on any site). I need to make a call on the ASP page which is with its previous variable I have tried the code below, but nothing is working. When I type it in URL then it works fine. Although I have tried the variations of the code below and nothing is working NSString * post = @ "longitude = "; Post = [post stringbapping string: longte]; Post = [post stringbapping string: @ "& latitude ="]; Post = [post stringbapping stringing: late]; Post = [post stringbapping string: @ "& device ="]; Post = [post stringbafing string: device id id]; Post = [post stringbapping string: "" & user name = "]; Post = [post stringbuffing string: username. Text]; Post = [post stringbapping string: @ "& service ="]; Post = [post stringbapping string;: subject.text]; Post = [post stringbapping string: @...

algorithm - SPOJ Problemset (Classical): 9386. Re-Arrange II #[MAIN112] -

समस्या का विवरण (सुविधा के लिए यहां उद्धृत): एन पूर्णांक के अनुक्रम के लिए, ए 1, ए 2, ..... ए हम स्थिरता कारक पी की गणना कर सकते हैं, जैसे P = sum सभी में (एआईटी-एआई -1) * सी [आई]) जहां 2 & lt; = i & lt; = N सी [i] एक संख्या डाल करने की लागत है स्थिति i आपका कार्य उन सभी अलग-अलग क्रमपरिवर्तनों पर विचार करने के लिए दिए गए एन नंबरों के लिए न्यूनतम पी खोजता है। मुझे सिर्फ सही दिशा में एक कुहनी से ढंकना चाहिए इस समस्या को हल करने के लिए सामान्य दृष्टिकोण (स्यूडोकोड के छोटे बिट्स का स्वागत है, लेकिन एक बार समग्र एल्गोरिथ्म सामान्य रूप से स्पष्ट हो जाने पर मुझे समाधान के लिए बहुत अधिक कोड पर भरोसा है) मैंने इस बारे में थोड़ी देर के लिए सोचा है, लेकिन अभी भी किसी भी समाधान पर पहुंचने से, जो इस समस्या (N & lt; = 15) की बाधाओं को संतुष्ट करता है एक क्रूरता बल दृष्टिकोण केवल N = 10 तक अच्छा प्रदर्शन करता है। सबसे पहले, सबसे बड़ा संभव परीक्षण का मामला एन = 15, मुझे विश्वास नहीं है कि आप सभी 15 की गणना करने और समझने में सक्षम हैं! आपके उत्तर को पर्याप्त समय ...

php - mysql_insert_id for a query? -

I am trying to add a record to a MySQL database and am retrieving that record ID immediately. I'm looking to use mysql_insert_id (), but I'm wondering if it can drag a very last record or past record that you have entered? I am thinking that if two users of the website run both queries then the previous record may have been added that if the user does not have the record, then what mysql_insert_id () differentiates between the two or just the last Can I record the record? Thank you. have you entered the very last record or final record? The latter one is clearly on the Manual page of this function

authentication - X-FACEBOOK-PLATFORM inconsistency using different applications -

मैंने X-FACEBOOK-PLATFORM प्रमाणन समर्थन के साथ एक XMPP ग्राहक को सफलतापूर्वक लागू किया है, और वर्तमान में चैट करने के लिए किसी भी उपयोगकर्ता को कनेक्ट कर सकता है। इसके बाद, मुझे चैट एक्सेस के साथ एक अलग एप्लिकेशन बनाने की आवश्यकता थी और मैंने नए ऐप के ऐप आईडी और ऐप सीक्रस को बदलकर कोड का पुन: उपयोग किया। मेरा आश्चर्य है कि कुछ ऐसे उपयोगकर्ता जो सफलतापूर्वक मेरे पुराने ऐप के साथ लॉगिन कर सकते हैं, उन्हें ऐसा करने में सक्षम नहीं हैं। (अजीब)। मैंने दोनों एप्लीकेशन कॉन्फ़िगरेशन की जांच की है और एक जैसे अंतर है, "ओअथ कॉल और एथ। लॉगइन के लिए लॉगिन रहस्य का उपयोग करने के लिए बल" नए आवेदन में उपलब्ध नहीं हैं , जब इसे पुराने में "अक्षम" पर सेट किया जाता है दोनों ही फेसबुक खाते का उपयोग कर बनाया गया था। क्या कोई यह बता सकता है कि यह विकल्प कहां गया और अगर चैट के काम करने के लिए यह कुंजी है? इसके अलावा, और क्या गलत हो सकता है पर कोई विचार? धन्यवाद! क्या आप वहां मौजूद हैं! मैं यह समझ गया! ऐसा लगता है कि "असंगति" बहुत सुसंगत है। ऐसे उपयोगकर्ता जो अभी ...

local python simple http erver sends wrong mime type in windows but not in linux for.svg -

I created a simple HTTP server in Python (I did not touch the do_GET function) Linux In (Ubuntu) everything works well, but in windows when I want to open the .svg file in Firefox (hence) it asks me if I want to download or save it. It has been determined that in the last question on this site, this is because the server sends the wrong mime type The response header in Windows has the content type: 'App / octet-stream ' The content type in the response header in Linux is:' image / svg + xml ' The local server used is similar in both cases. Do anyone know what I should do to fix this (in other words SVG send with the correct mime type)? I have tried to use meta tags in the svg file to specify the content that does not help you. tnx Edit: How to read the documentation better is a extension_map attribute in the class (simpleHTTPServer.simpleRequestHandler) which is a dictionary that is a dictionary of mam extensions For the MAM extension, this is exac...

php - phpmyadmin issue in accessing text data stored in a table -

I am using an L (inux) A (pache) M (ysql) P (hp) installation site and There are some issues arriving in the data stored in the text of my database as text. I created a table with 2 fields: id: type / P> $ query = "SELECT text_field FROM` table_name` WHERE (id = '$ id')" ; $ Query_result = mysql_query ($ query); Echo $ query_result; The output table will not contain the stored text, but the following: "Resource ID # 5" Any ideas on what I'm doing wrong? Thanks in advance! Matio You must first obtain the array $ query = "SELECT text_field FROM` table_name` WHERE (id = '$ id') "; $ Query_result = mysql_query ($ query); $ Result = mysql_fetch_array ($ query_result); Copy $ result ['text_field'];

linux - PHP application to replicate websites from single code source -

I am trying to create an application in PHP to help configure new websites. New sites will always be based on a specific "codebase", which includes all the necessary web files. I want my PHP scripts to copy those web files from one domain's webspace to another domain's webspace. When I click on a button, an empty webspace is populated with files from another domain, both domains are on the same Linux / Apache server. As an experiment, I tried to use shell and exec commands in PHP to perform actions in the form of "root". (I know it can open the main security hole, so this is not my ideal method.) But I had similar permissions problems and that method could not work too. But I'm running into permissions while dominating the domain / ownership issues may be that a CGI script is a better idea, but I'm not sure how to contact it. Any advice is appreciated. Or, if you know about a better resource for this type of information, please point me t...

algorithm - What is a good way to iterate a number through all the possible values of a mask? -

Looking at a bitmask where the set bits are described where the second number can be one or zero and without set bits that number Should be zero in What is a good way to recycle through all possible values? For example: 000 returns [000] returns 001 [000, 001] 010 returns [000, 010] 011 returns [000, 001, 010, 011] 100 Returns [000, 100] 101 Returns [000, 001, 100, 101] 110 Returns [000, 010, 100, 110] 111 Returns [000, 001, 010, 011, 100, 101, 110, 111] The easiest way to do this would be to: zero f (int m) {int i; {If (i == i & amp; m) printf ("% d \ n", i) for (I = 0; i & lt; = m; i ++); }} But it runs again through several numbers. This 32 should not be in the 2nd ** 32 order. A bit-twitching trick (This description is detailed in detail that Knuth "Computer Programming Art of "Vol. 4A.7.1.3; see p. 150): A mask mask and the current combination bits , you bits = (bits - mask) can make the next combination; Start the mask ....

php - CMS and Displaying custom 404 page -

This is just a random question. I have heard of some CMS which can be easily managed where the root site 404 pages can display if the administrator asks them to display it instead of the website, then the user just wants to put the site down for maintenance. I was just trying to see, so I could understand how this work was completed. if ($ Down_flag === true) {header ('http / 1.0 404 not met'); ('404.php'); Go out; }

Use Ruby hash value inside of hash -

Is there any way to do something like this: number = {"one" = & Gt; "Two", "three" = & gt; Number ["a"]} I know that I can just make a hash and can generally set anything like "numbers" ["a"] I'm ... but ugly ... No, because number right now Not defined, but you can create items assigned more than one variable: # looks strange, but ok ... def_num = "two" numbers = {'one '= & Gt; Def_num, 'two' = & gt; Def_num}

c# - .NET or MySql or other solution for millions of lookups a day (to stop duplicates) -

I have a client / server architecture that is written in the network, where hundreds of customers send data to a server. Each item has an ID and it is possible to send the same ID multiple times to different customers. The IDs are long and the server needs to know whether something has already been received with an ID. Every day, with 10,000,000 duplicates, the server will get 10,000,000 ids every time it receives an ID, it will be necessary to look for any kind of information to see whether it is already related or not. My current ideas for the solution are: With a background thread, the id's memory dictionary contains more than 3 days after being in the dictionary for someone Also to remove items MySQL database with an indexed column for ISC and a column for the entry date. The issue I raise can be a speed like the Mykkil database, because I have to ask ~ 10,000,000 questions in a day. I am not going to use fancy hardware for this particular issue (typical dev...

java - Can I manually override inherited methods? -

यह एक बहुत ही असीम शीर्षक है ... सार्वजनिक वर्ग ए में सारणी सार {सार्वजनिक बूलियन AddAll (इंट इंडेक्स, संग्रह & lt; E & gt; क्या) {}} लेकिन एक्लिप्स मुझे संकलन त्रुटि देता है नाम संघर्ष: विधि addAll (int , संग्रह & lt; E & gt;) प्रकार डायनामिकअरेरे & lt; E & gt; ऐड ऐल (इंट, संग्रह और लेफ्टिनेंट; विस्तारित ई & gt;) प्रकार सार ऐब्स्ट्रेललिस्ट & lt; E & gt; लेकिन यह ओवरराइड नहीं है मैं समझता हूँ कि क्या विलोपन के साथ समस्या है, लेकिन मुझे समझ में नहीं आता क्यों addAll (int, संग्रह & lt; E & gt;) doesn यह विरासत में मिली विधि को ओवरराइड कर रहा है जिसके साथ संघर्ष हो रहा है (यदि दोनों को एक ही कक्षा में परिभाषित किया गया था, तो मैं इसे देख सकता था, लेकिन समस्या यह है: "जब किसी पद्धति में विरासत में मिली पद्धति के समान विलोपन होता है, तो हम विरासत में मिली विधि को ओवरराइड करते हैं। क्या कोई संकलक को AbstractList.addAll (अधिलेखित, संग्रह & lt ;? ई और gt; फैली) को ओवरराइट करने के लिए मजबूर करने का कोई तरीका है साथ डायन...

HTML5 drag and drop to move a div anywhere on the screen? -

The title is very self explanatory. I've found that all the demos included in a div are included at a certain location. I need to create a dragable diva which can be left anywhere on the screen. Is it possible to do with HTML5? If not, how should I do this? This is actually quite straightforward: Draft Calculate the offset of that dragable element in the event and the offset that is clicked at the top left corner Make sure dragover is the event drop event , Use the offset calculated with clientX and where I drop to know the status of the position For the clientY bonus issue, you have the upper and left position of the elements Can update the asset, it is not useful if you move went plot the elements allowing the pull.

javascript - Google plus one : Does anyone know how it specify which image to display? -

When I press the button + google, I have a thumbnail (a site's picture) randomly generated Does anyone know how to specify which picture to display? Google has a support response for this. Actually, it's like microdata, open graph, meta and everything else, like the page content.

jquery - Custom styled checkboxes - problem with my JavaScript logic (an else branch is not getting hit) -

I am creating some custom "checkboxes" and what does it mean that I only styling the labeling elements Position the checkbox from the screen. It was the design / functionality which had come, so I thought I wanted to go it using the Mean checkbox. What do I want when you click on one of these custom "checkboxes" (to actually trigger the stylized label), "checkbox" should change the color and all the "checkboxes" Behind the background divisions should also be "light". I have got all this work. When you uncheck the "checkbox", the "checkbox" is undeclared, but you are marked any "checkbox". When you uncheck that last "checkbox", then and should close that background div color this is where I have problems . The best image with the example! I have a console statement and if you see them, you will see that when I close the last checkbox I am not executing that third branch. I just k...

Loading a Partial via Ajax in Rails 3 -

I'm having trouble getting the page to update. I'm completely lost and do not know where from To start, type a : Remote => for my form. True Page Initial loads written in partially wrapped in a div tag, which is called a comment, I do not know whether to create a controller or file, or even how to create, partial Submit to the user when clicking on the form. Thanks for any help. travis, I'm not sure which action you actually are here If you are trying to demonstrate, then suppose you want to create a new resource. Suppose that your resource has posted if you have used the rail to generate your postcontroller You will have a method created . This might look like this: def @ post = post.new (param [: post]) response_to do | Format | If @ post.save format.html {redirect_to (@ post,: notice = & gt; 'Post was created successfully.')} Format.xml {render: xml = & gt; @Post ,: Status = & gt; : Created: Location = & gt; @post} a...

jquery - Select all checkboxes with a text link -

I have created a form with a "Select All" checkbox that selects all other checkboxes in that form is. I want to modify it, so all the functions will be selected below with a text link, such as: link & lt; A href = "# 'id =" check ALL "& gt; Select all checkboxes & lt; / a & gt; Currently, to select all other checkboxes, Form form action = "#" method = "post" id = "Myform" & gt; Fields & gt; & lt; div class = "radio" & gt; & lt; input type = "checkbox" name = "check ALL" id = "check ALL" & gt; = "Check ALL" & gt; Check all & lt; / label & gt; & lt; / div & gt; & lt; div label = "checkbox 1" & gt; checkbox & lt; / label & gt; & lt ; / Div & Gt; Check & lt; div class = "radio"> input type = "checkbox" name = "checkbox2" id = ...

C++ ifstream on XCode: Where is the default directory? -

OK, so this is the first time I have coded the encoded (I have been used for OBC) Has started a programming course in. I am trying to open a file (with hard work in the console or from user input) and whatever I try, open T (through error checking) I'm assuming this because I do not have the test.txt file in the root directory, so if so what is the root directory? So far my code is: // Includes files #include & lt; Iostream & gt; # Include & lt; Stdio.h & gt; # Include & lt; Fstream & gt; using namespace std; // Global Variable Short Impact [512] [512]; Small output image [512] [512]; // function prototype zero getInput (four *, four * out); Zero initializeArray (ifstream * input); // main int main () {// local variable char inputFile [32]; Four output files [32]; Instream input; Offstream output; GetInput (inputFile, outputFile); Cout & lt; & Lt; Input file & lt; & Lt; Endl; // test which was sent back from input input. Open (in...

Mysql Local server hardware -

In anticipation of a live scenario, I am creating my entire site, which has a 500 MHz processor with 256 MB A very large 100 MHz RAM I have loaded my database with 200k + rows of garbage data, trying to test my queries. I have seen - obviously because of this, a large display hit all my FAQ using the index, although some 15+ to join (using all indexes) using MySQL To enable 16MB cache, which brings down the query times to nothing but what results? With a dynamic website, I can not see how the cache can help completely when I allow unique queries such as a search feature. I am also using the eaccelerator for PHP. When I use the COUNT (*) total with multiple code JOIN and WHERE , then 10 + There are other queries. Other queries that only get the same line or two do at the same level when I had only a few lines I also noticed that almost 99% of the CPU in CPU CPU stress during a query Comes. Basically I do not know whether the software is on the fault or too much of the h...

Building a Android application for website developed in JSP and MySQL -

I'm developing the original Android application. I am projecting a BE on web application which is a resort management portal. I will offer room bookings, cancellations and many services using JSP. In addition to this, I have to build an Android application Would the user be able to book a book (this would be a registration form, and later the data will be sent to the JSP page), even then to update the status of the booking status Sector should be page .. I know, we can use to view the webpage Android to Vebvri but it requires a specific layout of a webpage? I am a little confused .. Your layout is needed to be mobile optimized , That you need to consider the solution of the device, consider the user experience for mobile devices. For a great example, see Mobile versus Gmail in desktop or Stakeoverflow in both desktop and mobile. They both offer the same functionality but have their own mobile optimized layouts. Additionally, in creating webpages, you might want to ...

.net - What is a good method to determine when an entities data has been changed on the database? -

Say, I have retrieved one unit from the database using the unit framework. Is there any way to check that there is only one specific unit changed by another user in the database? The method I used before (in WinForm applications) was: DB to save the unit The unit type, unique identifier , And add a listing in the transaction table with date change time When refreshing the same unit, check the rows of the current table after the transaction table. If an entry is found, then act accordingly (reload the unit from the database, stop editing, save collision, etc. depending on why I am checking the change). For this reason, I want to do this: Avoid reloading the entire group of units and refresh only those items Check conflicts of conflicts on Save Resolve concurrent opposition when editing begins. To do this, I need to make an entry in the transaction table when a user starts to edit and update the same transaction table row when user saves / cancellation. Does...

Interpreting python segment -

I'm new to Python and came into this section of code. Can anyone help me with syntax here? Maybe give some comments on each line how it is working? xs is a list that includes dates. for data = {}, tmpdata.items () in d: data [title] = [x and d [x] [statid] in x or x for x] Data [Title] [- 1] = Max [statid] If I think , Then I would say that someone should be the most complicated line for the dragon: data [title] = [xd and d [x] [statid] or x for x X] There's a lot going on here, and some of it uses a style, though in this example Secure, now is not recommended here is a more active form: x [x] in x [data] = []: if x in d and d [x] [ Statid]: data [title] .append (d [x] [statid]) Other: data [title] .append (0) build position and value-if- The situation is true or value-if-condition is false SeaTrontary form is an old style form of condition? Value-if-status is true: value-if-condition-is-false . The given Python expression hides a secret bug which i...

save session in database by CodeIgniter -

I want to save the database. In session CodeIgniter User Guide, create an example to store some data in the database. If the table does not exist, then subscribe (session_id varchar (40) DEFAULT is not '0', ip_address varchar (16) DEFAULT '0' is not, usergent varchar (50 ) Faucet, last active int (10) unsigned default 0 no tap, user_data text default '' tap, primary key (session_id)); Now I want to store an extra data from the session in the database, for example request_token value. $ this-> session-> Set_userdata 'request_token', 'test'); How should I do this with a session? Go to itempop = "text"> Set your configuration.php under the application folder and set the session database option to true. As you import SQL structure and use sessions like yours, it will store session variables in DB. You can also enable session encryption.

android - Twitter not working on Motorola Xoom -

I am developing an application for the Android tablet, which has Facebook and Twitter integration. Samsung Galaxy 7.1 inch devices are working well in all the amilators. But Twitter is not working on Motorola Xoom 3.2 tablet device . I am receiving the following toast message. Authorization failed (server replied with 401) Any ideas? Thanks This could be if the user key was not correct or signature I assume that you are using Twitter4j . I had a similar problem, and I did not find any solution. I noticed that if you are logged into your phone from the Twitter app , then the Twitter authorization fails. If you do not have a twitter app installed on your phone, the Twitter authorization will work. That's why I'm thinking of something received from the twitter app and mixed in any way or something like this ... maybe someone else knows more. Good luck.

javascript - Uplodify jquery problem with variables -

I am working in a small project that wants to raise everything, everything is working well, There is a small problem with me and I do not know where the problem is. What I'm doing here is dividing Reposon. Then I use detailed information to create links for Websites and HTML code for BBCODE and add them to texture. The problem is that my html_code variable is not working because it has a syntax problem BBCODE is doing great work and is being shown in a text, but HTML is not. Using the Uploadify code under one part. Please take a look at the html_code variable. 'On-Oxide One Time': Function () {$ ('# fileQueue'). Show (); $ ('# Mfstart'). Show ();}, 'On allcomplete': function () {$ ('# fileQueue'). Hide (); $ ('# Mfstart'). Hide ();}, succeed: function (event, qiid, file obje, feedback, data) {aa = response. Split ('||'); Var Emurral = AA [0]; Var thumb = jQuery. Trim (aa [1]); LINK_URL = '' + imurl + ...

html - IE , Firefox mismatch with div attribues -

In Firefox, div provides the whole space horizontally and if we do not float a new row Begins with: Left , while IE does not have it, can anyone suggest anything on this? Have you set your doctor type in the IE header? Example & lt ;! DOCTYPE html public "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1 /DTD/xhtml1-transitional.dtd">

javascript - Running a jquery mobile web app in a disconnected state? -

I'm working with writing a web app using jquery mobile which uses forms (cehckboxes, text) Field, combo boxes). The app that is required is quite trivial, but the information needs to be updated and sent to the server. So my question is, someone has used the app, gets a bunch of data from the server, then loses connection. Does the browser still remember the form field input, and the user can still navigate between the pages? I think jquery mobile places all its pages in the same 'webpage', so it is not that it needs to constantly load new data from the server. I think that I will run some scripts to check connection to a server in the background and when this connection is received it can forward and sync the data with the server. Is it possible or is it a pipe dream? For jquery mobile it attaches all data to the same page so that the user only uses those links Users who do not yet touch that link that are already clicked will still cause problems

css - javascript syntax mismatch in firefox , IE -

The following code works for Firefox but shows an error in IE. document.getElementById ('Zip_container'). Style.borderLeft = '1px solid #D9D9D9;'; Where zip_container is a div. Can any suggestion on this Invalid value : A document.getElementById ('zip_container'). Style.borderLeft = '1px solid #D9D9D9;'; When you modify style attributes using style. Some, " ; " is not required but if you modify it like this: document.getElementById ('zip_container') . Style.cssText + = "border-left: 1px solid #d9d9d9;"; " ; " can not be lost if corrected: document.getElementById ('zip_container'). Style.borderLeft = '1px solid #D9D9D9';

jpa 2.0 - How to log SQL values sent to my DB using EclipseLink? -

I use EclipseLink as my JPA2 firmness layer, and I would like to see the values ​​sent to DB in the log. I already use SQL queries ( & lt; property name = "eclipselink.logging.level" value = "ALL" /> in my persistence.xml) I have been, however, for example You receive a SQL statement with your values ​​instead of a placeholder or by a JDBC proxy driver Have to use. This approach works well, you are using the Eclipse link with a connection pool whose URL is derived from persistence.xml (where you get the JDBC recognized by the proxy driver rather than the actual URL can be specified), but is useful in a Java EE environment (for at least), unless you can not obtain the JNDI data source to use the proxy driver.

dynamics crm - Delete Relationship between Contact and Marketing List CRM 4.0 -

Can anyone tell me how do I get contact regarding marketing list in CRM 4.0? Marketing list ("Blubala") - & gt; Contact (Adam Meyer) I will know whether the contact with a specific good is in the marketing list. Hope that you stop me ... Is stored in a hidden unit named code> listmember . However, you can not retrieve those records directly. You must retrieve the contact unit, the subscriber should be included in the list, and then filter it based on the listid of the marketing list. To remove someone (as you mentioned in the headline), you will need to execute a Remove Mail List List .

Fire javascript/jquery in jQuery dialog after .load -

I have a jQuery dialog that I set in a jTemplate with a list of items: & lt; A href = "#" square = "view-map" id = "{$ T.Address.AddressCity.Lat} | {$ T.Address.AddressCity.Lon}" & gt; & Lt; IMG src = "/ image / pattern / short-map.png" width = "16" height = "16" alt = "see this address on map ..." title = "check this address on map ..." Gt; & Lt; / Img & gt; & Lt; / A & gt; jQuery: $ ('View-map'). Live ('click', function () {$ ('# map'). Data ('id', $ (this) .attr ('id')) .dialog ('open'); return;}); $ ('# Map'). Dialog ({autoOpen: incorrect, recombine: wrong, location: 'top', model: true, width: 650, open: function () {var location = $ (this) .data ('id'). '|'); $ (This) .load ('/ component / google / map.aspx? Lat =' + location [0] + 'and loan =' + location [1]);}, butt...

Best performance strategy for converting dates from MySQL format to Excel with PHP -

I'm still new to PHP, MySQL (and Zend Framework). I have this function that I have marked the main execution killer of this particular script, I need to convert the stars into wires in the dated MM / DD / YYYY format. When the result set is small enough (40 or 50 lines), it lasts less than one second but when more records are recorded, then 4000 says this function takes about 4 minutes. Public Functions ConvertAtexExcelformat () {$ sql = "fil_id, select BIRTH_DATE, WILL_DATE, What is the best strategy for such cases? LAST_CODICIL_DATE, Added from TRAST_DATE, POA_DATE "; $ Result = $ this- & gt; GetAdapter () - & gt; Get all ($ sql); Foreign currency ($ $ rowset = & gt; $ line) {foreach ($ line & amp; $ val) {if (strpos ($ val, ':')) {$ val = preg_replace ('/ [0-9] +: [0- 9] +: [0- 9] + / ',' ', $ val); $ Val = preg_replace ('/ - /', '/', $ val); $ Val = substr ($ val, -6, 5). '/' Substr ($ val, 0, 4)...

ruby on rails - question about application.html.erb -

मेरे पास मेरे application.html.erb.like तालिका है: & lt ; बॉडी & gt; & Lt; तालिका की चौड़ाई = '100%' सीमा = '3' & gt; & Lt; tr & gt; & lt; td ऊंचाई = "100" & gt; & Lt; / टीडी & gt; & lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td चौड़ाई = "10%" & gt; & lt; / td & gt; & Lt; td width = "80%" & gt; & lt; / td & gt; & Lt; td चौड़ाई = "10%" & gt; & lt; / td & gt; & Lt; / टीआर & gt; & Lt; / तालिका & gt; & Lt;% = उपज% & gt; & Lt; / body & gt; मुझे & lt; td width = "80%" & gt; & lt; / td & gt; में अन्य पृष्ठ की सामग्री डालनी है, लेकिन मुझे पता नहीं है कि मैं वो करें? आपकी मदद के लिए धन्यवाद & lt; body & gt; & Lt; तालिका की चौड़ाई = '100%' सीमा = '3' & gt; & Lt; tr & gt; & lt; td ऊंचाई = "100" & gt; & Lt; ...

codeigniter - Jquery post with codeignitor -

I'm moving from WordPress to codeignitor but I'm struggling to call a controller function from a jquery post here. Here are my files I have this in my home view & lt; A class = "add_playlist" href = "5657584" & gt; & Lt; Img src = "http: // icon .iconarchive.com / icons / dryicons / simplistica / 32 / add-icon.png" alt = "playlist" /> & Lt; / A & gt; and in the footer & lt; Script type = "text / javascript" src = "http://code.jquery.com/jquery-latest.js" & gt; & Lt; / Script & gt; & Lt; Script type = 'text / javascript' & gt; $ ('.add_playlist'). Live ('click', function () {warning ('add'); var video_url = $ (this) .attr ('href'); $ .post ("http: // localhost /code/index.php/home / Add_playlist ", {video_url: video_url}, function (response) {console.log (response);}); return back;}); So what I'm trying to ...

javascript - Weird jQuery and HTML implementation -

OK, so what am I trying to do, a user has to click on a link and a The box is down the slide. I have main work, but the box looks a little strange. If you click on the specified box (in this case, "About Blogger"), the box slides. Then if you click anywhere in the area under the navigation, the box is also slid. How do I stop this? relevant coding: CSS: .panel_button {margin: 0; Padding: 0; List-style-type: none; List-style-image: none; List style: none; } .panel_button a {-webkit-transition: All 1s Easy; -Mozy-infection: All 1s easily; Transition: All 1s ease; Background: # F5A564; Color: # F5CBAF; Display area; Status: Relative; Top: -160px; Font-size: 255%; Width: 50%; Height: 160px; Text-decoration: None; } .panel_button a: Hover {background: # 808080; Color: #FFFFFF; } #toppanel {margin-top: 0 pixels; Margin-left: 48%; Status: Completed; Width: 48%; Left: 0 pixels; Z-index: 25; Text align: center; } # Panel {width: 100%; Status: Relative; Top: 1px; Height: ...

html - Fixed width div in center of screen with two either side of it to fill rest of screen? -

Image
So, I have this wonderful image here: And what is this There is a header for a website - click it to see it full size .. I need to recreate it using HTML / CSS / images and I do not know this That is how it should be 100% width, the point from which it has been changed from one type to another, its size should be in the same place, which The car. For example: The area is not black, it should stay at the center of the page all the time and should not move forward. The width of the screen should be increased to 100% in the area of ​​black and there will be a tiled background gradient. How can this be done? I have tried to do something like this: Where there is a fixed width and centered yellow in green, it is the 'rotation' gradient and Then there are red / blue color tiling gradient. But this does not work because the tiling gradient does not match the position of the 'rotation' at the time the shape of the browser changes. Note : This should sup...

where is the path of opConfig.reloadPrice(); in magento -

I need to customize the opConfig.reloadPrice function (); In Magenta Can anyone tell me where is this work? This function is executed on the custom attribute drop down on the Product Details page. i Special price calculation needs to be changed, I think this function needs to be customized. This method can be found in the following files: grep 'Reload Process:' -RSN ./js/varien/configurable.jsociety71: Reloading Process: Function () ./js/varien/product.js:463: ReloadPrice: Function () ./skin/frontend/base/default/js/bundleJS : 83: Reload value: work ()

What are the major differences between the mysql and oracle sql dialects? -

I am a software developer. I have used mysql for years and now I have to do my first match with Oracle in a project. I'm about. I was just told that I should be careful that in some cases SQL is behaving very differently. I have no idea what to expect. I am mostly looking for clear stuff and typical beginner mistakes. For example, I was told that the Oracle does not have any auto increment. This is the stuff I am looking for. I would be grateful for any further knowledge which helps in avoiding new solutions to solve problems in advance. A company with all the differences between Oracle and MySQL, both of which are owned by: -) Be careful when googling, there is a lot of old information on the net, whatever is more than 3 years old. Let's disorganize him.

html - Is there currently a problem with LIKE box_count style? -

I used the box_count style for some time, for the past few days it has not been working properly, the button Displays only, but it does not seem to count. Yes it's a global problem, while doing some maintenance on Facebook :)

android set image as contact icon/wallpaper -

Image
I have written my own imageviewer and now I have the set as functionality in the Android country . image viewer. Now this is possible because Facebook has it. I have attached a screenshot to make myself more clear PS I want to give a more detailed description of what happened wrong. After selecting the "Contact icon" in the menu, a list of my contacts appears, when I select a contact, the application stops the force. If I choose "home / lock screen wallpaper" then it opens my phone gallery. Here is my code snippet: Bitmap icon = mbitmap; Intent setAs = new intent (Intent.ACTION_ATTACH_DATA); SetAs.setType ("image / jpg"); BytereonOperputsTream Bytes = New ByteOrthroughs (); Icon.compress (bitmap compoforat.jpg, 100, bytes); File f = new file (environment .getExternalStorage directory () + file. Separator + "/my_tmp_file.jpg"); Try {F.createNewFile (); FileOutputStream fo = New FileOutputStream (f); Fo.write (bytes.toByteArray ()); } H...

c++ - std::string operator+() memory leak? -

I'm getting very worried because I wrote a little application and it seems that there is a memory leak if I'm actually Valgrind Definitely damage 1 record 1 = 1 = = 9321 == 0x402569 A: Operator new (unsigned integer): (Vg_replace_malloc). C: 255) == 9321 == 0x40D3D05 by: std :: string :: _RP :: _ S_create (unsigned int, unsigned int, std :: allocator & lt; char & gt; const & amp; (/usr/lib/libstdc++.so ) .6.0.13) == 9321 == 0x40D4977 By: std :: string :: _ Rep :: _ M_clone (std :: allocator & lt; char> const & amp ;, unsigned int) (/ usr /lib/libstdc++.so.6.0) 13) == 9321 == by 0x40D57AC: std :: string :: reserve (unsigned integer) (/usr/lib/libstdc++.so.6.0.13) == 9321 = = 0x40D5EE6 by: std :: string :: operator + = (four) (in /usr/lib/libstdc++.so.6.0.13) == 9321 == by 0x804E113: xl2 :: textparser :: affability () (textexers CPP: 162) == 9321 == by 0x804BFD5: xl2 :: UsbTree :: parseStringInfo (XL2 :: textpaster & std :: string & amp ;, std ...

List of Exchange 2007 Mailbox attributes(properties) using by powershell command? -

I need to list Exchange 2007 mailbox attributes (using PowerShell), which is the command of the Pashchell command (enabled-mailbox) Can be set using. Do you know how I can do this? I know that the list of parameters is given here, can there be a custom parameter that is not listed here? Try using: mail-mail Edit after comments: Set-mailbox mailboxname | Go-to member ? {$ _ Member member-eq "property"} # To get all the features useful with all mailbox commandlets Get-Mailbox | Go-to member ? Provide a list of all the properties available from {$ _ member member-eq "property"} # this get-mailbox cmdlet

c++ - How to test connect timeout on RHEL c/cpp application -

I have an application that talks HTTP over the server I have written a code to control the connect timeout (The server will wait before the reply). But I'm having difficulty creating a test case to test my connect timeout code. could you help me please. In fact, TCP sends a TCP synchronized packet to host A in host B in a handshake Host B receives an SN of the S Host B A SYNchronize - receives a receipt Host A gets the SYN-ACK of B Host A sends a knowledge Host B receives AC TCP socket connection is established. In my application, if the server does not complete TCP handheld in X second, then the application goes to the next server. But to test this code, I need a server stub, which is probably the client SYN will accept the packet from but the client will not set the SYN + ACK packet. Thus the client is waiting for the server to respond. Can you please help me create a small server stub that will listen to the particular port but will not complete the handshake...

mysql - Count only unique terms based on inner SELECT JOIN -

I'm just trying to calculate unique words as a total number. This is the original query and it works fine - & gt; Select ('DISTINCT search_tags.term AS t_name, nbr', FALSE) - & gt; From ('search_tags LEFT JOIN (SELECT term as tk, COUNT (search_tags .term) AS NBR FRI search_tag_tag_groups Search_TagTerms) Search_tag on SR SearchTROM = TR.TK') - & gt; Where ('search_tags.dt_added & gt; =', '2011-08-01 09:48:54') - & gt; Where ('search_tags.dt_added & lt; =', '2011-09-02 09:48:54'); // Returns: [Twitter, 12], [Facebook, 6] ..... The thing is that this code runs a datatylet (datatable.net) so that the data labels are removed Go to the selected line and change it to: select COUNT (*) LEFT JOIN (from search_tags as numrows (word T, COUNT) (select as search_tags.term) As SR by search_tags.term from the search_tags group) as SR on search_tag.TRM = TR.kk) where `search_tag`.` `Dt_dad``> gt; '2011-0...

content management system - Sitecore - how to persist a Layout change -

I have developed a sitcom control, I want to put a layout on one page. In this case it is a registration page, and my control is defined as acceptance. What did I do in the Page Editor interface, and lifted control in one of the placeholders. What I want to do now is to create only that package, which is on this particular page, such as the content or subtitles of this node without affecting it. Can you suggest the best way to make such packets, what is to choose in the package designer? Thank you

how i do this in oracle pl/sql -

मेरे पास तालिका का पालन है: उदाहरण: नोड्स: id_node id_parent---- ---------------- 1 3 3 2 2 -1 मैं अन्य तालिका में वंश के स्तर को सम्मिलित करना चाहता हूं। उदाहरण के लिए: पूर्वज: id_node id_parent स्तर ------------------------- 1 3 1 3 2 1 1 2 2 ऐसा कुछ होना चाहिए: SELECT id_node, id_parent, नोड्स से स्तर START WITH id_parent = 1 पहले id_node = id_parent के साथ कनेक्ट करें

android - JSON Java check element is a JSONArray or JSONObject -

How to check how an element is a JSONArray or JSONObject I have written to check the code, if (jsonObject.getJSONObject ("category"). GetClass (). IsArray ()) {} else {} In this case if the element 'category' JSONObject So it works fine, but if it has an array it throws an exception: JSONArray can not be converted to JSONObject. Please help. Thank you. Yes, this is because getJSONObject ("category") which Trying to convert string to JSONObject, which will throw JSONException , you should do the following: Check that using an object JSONObject is: JSONObject category = jsonObject.optJSONObject ("category"); will return JSONObject or null if the category object is not a Jason object. Then you do the following: JSONArray categories; If (category == zero) categories = jsonObject.optJSONArray ("category"); will return your JSONArray or tap if it is not valid JSONArray .

url - Redirect to a new page from within a Drupal site -

I am working with a Drupal site, and we want to set up a special URL that redirects to an external site Does. In other words, if we have a Drupal site, then we have to redirect to an external site. I have very little experience with Drupal and I do not know how to set it up. Any help is appreciated! If you want everyone to redirect users to the same site, when they link to a link Follow that which moves them, you can execute using the code like: function mymodule_menu () {$ items = array (); $ Items ['external'] = array ('title' = & gt; 'redirection', 'page callback' = & gt; 'mymodule_redirect', 'use callback' = & gt; TRUE, 'type' = & Gt; MENU_CALLBACK,); Return $ items; } Function mymodule_redirect () {drupal_goto ($ url, array ('external' = & gt; TRUE)); } If the URL to which the user is redirected depends on the value provided in the URL, then you can use the same code as the followi...

osx - AF_PACKET equivalent under Mac OS X (Darwin) -

I am trying to compile a program on Mac OS X which uses apiette sockets and libpap , Which is equivalent to OS X? In Mac OS X (and in other BSD-Square OS, nearest equivalent of AF_PACKET socket, FreeBSD, NetBSD , OpenBSD, DragonFi BSD, and so on) is BPF, but it does not work much like AFIFTAT sockets; See "man bpf" Mac OS X (and other BSD-square UN * Xes) is equal to LibPak, OK, LibPak. (Libpcap is also equivalent to libpcap in many other UN * Xes, but it is not a ship as a standard part of all those UN * Xes, while it does standard part of the ship As Mac OS X and other BSD-square UN * Xes.)

actionscript 3 - timer method wont add textfield to sprite -

When I press the button below the keyboard, the text field is added to the phantom, but not through timer event calls. Why is it like this? Package {import flash.display.Sprite; Import Flash.events.KeyboardEvent; Import Flash. Text. Textfield; Import Flash. Import flash.events.TimerEvent; Expands Public Class Test Sprite (public function test) {var timer: timer = new timer (3); Stage.addEventListener (KeyboardEvent.KEY_DOWN, On Kidadown); Timer AddEventListener (TimerAventTMER, OnTime); Timer.start (); } Function on Kidadown (Event: Keyboard Event): Zero {// graphics.line style (10, Math.Randem) * 10000, 10); // graphics.drawCircle (100, 100, 80); Var txtFld: textfield = new textfield (); TxtFld.x = 200; TxtFld.y = 200; TxtFld.width = 25; TxtFld.height = 15; TxtFld.text = "90"; AddChild (txtFld); } Festival onTime (Event: Timer): Zero {var txtFld: TextField = New TextField (); TxtFld.x = 100; TxtFld.y = 100; TxtFld.width = 25; TxtFld.height = 15; TxtFld.text = "80...

CSS - Percentages or Pixels? -

I've been using CSS for many years, and I've always been a 'percent' type man, as I always define the heights and the width as opposed to pixels (for example, when setting things like margin, padding, etc. in which I use pixels). I will do something like this: body {height: 99%; Width: 99%; Margin-top: 10px; } But I often see such examples: body {height: 300px; Width: 250px; Margin-top: 10px; } My question is: Is there any benefit to using one on another overall , and if so, what are they? Thank you. Mick itemprop = "text"> The mobile webpage is for Rock that it is (obviously ) Will adjust to suit. However, when you want a certain width for an example, for example an article of text that you want to display in a certain way, then PX is the winner. Both plus and minus other are :)

c# - How to create an XML document from xpath -

I need to convert my domain object to an XML document for a third party data exchange. I have a mapping document with the location of the data from my domain and xpath where this data exports to the XML document. What I'm going to do is create an engine that reads this mapping file, data of my domain object and the creation of proper XML document. My current difficulty is while taking xpaths to create, I need to make sure that the XML sequence is placed in the correct order. How to approach this approach? ** I am trying to avoid bringing classes representing XML documents in my code base. In this way we can add a new export to the project again with compiling. I'm going to give some suggestions which is a bit different from what you are asking, because I'm excited It is a little load and when I first started using LINQ from XML, it was a small revolution of happiness within me. Here's a benefit that if you ever decide that you want to sort different...

ruby - AbstractController::DoubleRenderError with my respond_to in rspec -

I've got this Rail 3 action: DIF Export to Reply | Format | Format.tdl {Render: xml = & gt; @ Template.export_as_tdl and return} format.json {render: json = & gt; @ Template.export_as_json} End End and filter before exporting: def find_environment @ environment = KTEnvironment.find (params [: environment_id]) Enhanced HttpErrors :: NotFound, _ ("Environment '# Parameter [: Environment_ID]}' '' can not be found if '@ environment.nil? @ End of Environment and this rspec Describe "Export" should call "Export" call "get @ tpl.should_receive (export_as_json): export, id = & gt; TEMPLATE_ID end it" export_as_tdl " Should call at @ tpl.should_receive (: export_as_tdl ) Get: export, id = & gt; TEMPLATE_ID, format = & gt; TDL & end I have also defined the following mime type: Mime :: Type.register "application / tdl-xml" ,: tdl When I try to run my RSPEC tests, I am constan...

install - Correct way to do vc10 runtime installation -

I want to extract my hair from installing VC10 runtime! I have two applications, each with its own installer to ensure that everyone can be sent as standalone, in each installer, VCDIDEX. Includes XE stuff which installs VC10 runtime. Now, an installer includes 'SP0' runtime - this is a while ago - it is called 'i0', and one also includes 'sp1' runtime - it is now being created - Call it 'i1' If my user installs alone or alone i1, then everything is great if my user first installs i0 and then i1, everything is great. However, if my user installs i1 first, then runtime installation fails when he tries to install i0. Redists by hand I see that the SP1 installer gets bothered when it sees that SP1 is already installed. Apart from this, the fact is that the culprit seems stupid, how will I score it? Is there a 'force' flag, can I give the SP0 installer? Is there a way to 'properly' check the runtime - and which version of it -...

sharepoint - Share point web part, asynchronous processing on the server -

I am developing a web part, which is to parse the list of files on the server side and output a report. The problem is that this opperation can last for a large amount. I have decided to load the web part content immediately with a message for processing of files in a separate thread and "Loading ...." When the results are purse then an event Will be removed and content of the Web Part will be updated. I have got many posts with the following solutions (this idea is similar) The problem is that my solution does not have an .aspx file in which I can adjust the @ page directive in the async = "true" parameter. Does anyone know where this file is or how it can be handled, mainly by the Web Part. PS I have tried to execute the work with BackgroundWorker but this increases with the same error as Page.RegisterAsyncTask . The error is: "Asynchronous operation is not allowed in this context. In order to start the asynchronous operation, the ...