Posts

Showing posts from March, 2013

- Where Developers Learn, Share, & Build Careers

I am trying to use strptime () to parse the date with a component variable - but there is a hold My dates (wrongly) list day and month as a single instead of double digits. For example, my date is 5/5/2012 14:02 instead of 05/05/2012 14:02. /% Y% H:% M ") Is anyone sure? capital y will: test & lt; - "5/5/2012 14:02" Stratum (test, "% m /% d /% Y% H:% M") [1] "2012-05-05 14:02:00"

- Where Developers Learn, Share, & Build Careers

Given a large array of numbers where: [1, 2, 3 , 4 ...] = & gt; & Lt; Tag attrib = "1" /> & Lt; Tag attrib = "2" /> & Lt; Tag attrib = "3" /> & Lt; Tag attrib = "4" /> ... Which is more efficient / fast: a) make them with scratch using the element ("name", attributes) or b) from fromstring (str) where str is the string representation of those tags in the instance Update Test: to xml.etree.ElementTree import element, XML, tostring Elit: eroot ERR = Element ('Route') for .append (element ("tag", {"attrib": "antib"): time for import from time to time in estist = [xchange (1000) E for test_normal () Elit E for AIT test_list (): eroot = Element ('root') [eroot.append (element ("tag", {"attrib": "% s"% e})) ] Print "etree:% .6f"% timeit (test_normal, number = 1000) from xml.etree.cElementTree import...

php - Send AJAX on click, but still go to URL of href -

I am trying the following: When a user clicks on a link, The column of a specific table in the database through a specific agenda but I still want the user to href = " link be redirected. I tried the false code returned without ; but then AJAX does not work. I tried to return return; Lake Neither the page clearly redirects to the URL as I wanted. Thank you in advance for your help. Make your AJAX call, then set the document .location when done. $ ('a'). (Function (e) e.preventDefault (); // $ .aex ({url: '/ path / to / site', from data: {anything: {some: data from {var href = this.href; // get href link} }, Success: function () {add document.location = href; // redirect browser}}); });

- Where Developers Learn, Share, & Build Careers

Image
I recently completed R # 6.1 (c # version, with StyleCop 4.7.34.0 (with R # plugin) No) installed. When a new class is added to a project, the file header information is automatically added. How do you disable it? I turned off the checkbox for "Insert text in the documentation and file headers" within the R # Option for StyleCop (Option> gt; Tools> Style Cop & gt; Header section) .... but there is still no luck. I have also closed the StyleCop rule SA1633 to SA1640, which requires header documentation. I have found this suggestion: Reese - & gt; Options - & gt; Tools section - & gt; Code Cleanup - & gt; Choose StyleCop Profile - & gt; Documentation section - & gt; Untick 1600 But I do not have the "code cleanup" node in my device section. Not sure if I'm using the "C #" version of R # To do. The problem is actually due to: Gt; Code Edit & gt; Code Cleanup & gt; StyleCop & gt; 1600 and 16...

selenium - "Element must be user-editable in order to clear it" error -

Elements should be user-editable, so that it can be cleaned (Selenium :: WebDriver :: Error: : Invalid ElementStart Error) (Eval): 2: In `attach_file` When I run my facility that contains attach_file step, this will give me this error is. Here is the line of my feature that fails: and "file_field" / "file / cake / 1.jpeg" file for "file_field" And here is my step definition: when / ^ (?: | I) attach the file "([^"] *) "To" ([^ "] *)" What is it? (?: "(":: "(" [: ":]" $ / Do | path, field, selector | with_scope (selector) enclosed_file (field, path) is within the end ( The body knows what the problem is? There is a problem in Capibara 2. See.

HMAC Implementation for Web Service Authentication in PHP -

I am trying to implement a web service and some (very) simple to restrict access to the service Authentication is required. I came to know about HMAC and I think how I implement it. But there are some questions in my mind. Say I have this HTML form on the consumer side. When making a GET / POST request on your server. Enough to create hash: public_key using secret_key ? Or, do I need to create a hash of the whole POST variables / array? I am thinking that this will be enough to send a hash of public_key , but only want to make sure and ask you. I am planning to do this: public_key one Create hash in a public field or a public URL (or client_id) with a hash in the URL as the ultimate post / gate variable. Confirm the hash against the database by retrieving the hash using the code of secret_key and get the code of public_key on your server. If the hash matches, I accept the POST / GET request. Your thoughts? Explanation: Public_key is lik...

- Where Developers Learn, Share, & Build Careers

I have to insert some text data from the form [70,165,531,0 | 70,166,562 | "Hi", 167,578. 70,171,593 71,179,593 | 73,188,609. "One", 1,3. The data contains a few thousand letters (around 10000 - 50000). I have read on various compression algorithms, but can not decide which key will be used here. The important thing here is: the compressed string should contain only alphanumeric characters (or some special characters like + - / & amp;% @ $ ..) I mean That most algorithms provide ambiguous ascii characters correct as compressed data? It should be avoided Can anyone guide me how to move forward here? In the PS, number , ' and | Characters mainly character other characters are very rare. Actually your requirement is to automatically set the output character for printable characters You will end up using 25% of your compression profit, as you use about 6 out of 8 bits. But if you really want, you can always produce base 64 or more...

- Where Developers Learn, Share, & Build Careers

I am using the XMLA4JS library. The XML service URL is on the second domain. I am getting an error message: the original tap is not allowed by access-control-permission-origin-odd ajax header I have not modified any of their code and I am using their samples. I have entered the URL of the OLAP cube which has been deployed to another server. I passed the User ID and Password in the URL but no luck ... Please suggest how should I connect it? Thank you This is a standard issue when requesting ajax cross domain I Xmla4js The wiki has a page that tells it, and also provides a solution: Another approach that might be working is to enable the Corus headers on the server side.

shopify - Api call to upload file for article or page -

Image
I'm new here, and trying to understand from docs how to write articles / blogs via API upload image. I can see the "asset" resource, is it working with me? How is the file structure of the store bucket? The image can be uploaded to the blog, such as the URI can be accessed Property resources will be the only API resource that lets you view images You can use to upload. The functionality to upload an image to an article through the Admin Interface, it is not appearing through the API. This means that you have to upload files in the 'file' bucket. Can not use API for Instead, you can use asset resources to upload files to the 'Assets' bucket. Under the heading: 'Create a new image by providing base64-encoded attachments', then you can use the 'public_url' attribute on the property and you can use it within that article.

- Where Developers Learn, Share, & Build Careers

Is there any way to draft the X / Y tick labels depending on the value of TC? I am estimating a format of the format set format y ((((> > 3> & amp; amp; amp; & amp; so that a log scale graph P> 10 ^ {- 4}, 10 ^ {- 3}, 0.01, 0.1, 1, 10, 10 ^ {2} and so on, numbers near 1 For more natural representation. I address this address clearly, ie, set xtics ("10 ^ {- 3}" 1e-3, "0.01" 0.01, "0.1" 0.1, "Can be done by declaring 1" 1, "10" 10, "10 ^ {2}" 1e2) But I would like to avoid being very specific, because the label's This set changes each time Graph changes I hope no answer to this question is 'No', but here is the hope. Good ... depending on how hard you want to make this plot Here is an example that you want. This is a bit difficult plot to make an automated fashion, (you need to adjust the margin for the title, etc.), but if you need a good looking conspiracy for a pre...

c++ - Android Building Toolchain can't find/missing STL header directory -

I have manually built Android NDK Toolchain. By the time I use the compiler, everything works, it can not be found like the original STL stuff. Therefore, it can not compile the STL code because it is not known where to look for the header by default. I have never had this problem before using custom or prebuilt toolchain, however, if you add manually added directories, then -i $ (NDK_TOOLCHAIN) / arm-linux-androidb / Incorporate / C ++ / 4.6 / Then it works just fine. It is a pain to manually add every important dior (this is more than one). Certainly some process is broken. This is the following steps for the actions I have made: download sudo apt-get git-core gnupg flex bison gperf build-essential zip curl download NDK pomegranate NDK Do / FTP / NDK / NDK_ROOT = / OPT / NDK / Download / MPC Tower / SRC / MPC / ./build/tools/build-gcc.sh --gmp-version = 4.3 by using / build / tools / download-toolchain-associates.sr src / download MPC 0.9 .2 - MPC-version = 0.9 - MPFR-...

How to make a clean .htaccess? -

I have a problem with htaccess and it's not quite good on that. I want to know how to clear the URL. Here is the original and I need this type of URL and how do I get p value index1 / index2 if I get this $ _ from the database is? Pattern is not included in $ 1 , but the remaining (. *) Has been captured in code> in $ 2 . RegAttengen ON # Does not rewrite existing existing files & amp; Directory (such as CSS, JS, IMG) revaccount% {REQUEST_FILENAME}! -f Revert count% {REQUEST_FILENAME}! -D # Add the .php to the first group (such as the page PHP) and the rest of the PRRRTRL ^ ([^ ^ /] +) / (. *) $ $ 1.php? P = $ 2 Within PHP, get through p : $ _ GET ['p' ]

javascript - How to change content of a span based on Drop down selection -

I have a label with a selection box and a span, I want to change the span content because users drop them Change the selection down box & lt; Select class = "text_select" id = "field_6" name = "field_6" & gt; & Lt; Option value = "- select -" & gt; - Select - & lt; / Options & gt; & Lt; Option value = "option one" & gt; Option A & lt; / Options & gt; & Lt; Option value = "option two" & gt; Option two & lt; / Options & gt; & Lt; Option value = "option three" & gt; Option Three & lt; / Options & gt; & Lt; / Select & gt; & Lt; Label class = "form_field" & gt; Your selected & lt; Span id = "aggregator_name" & gt; & Lt; / Span & gt; & Lt; / Label & gt; I am using this script This is the problem, whenever I refresh the page, instead of the span it changes with "- select...

- Where Developers Learn, Share, & Build Careers

I have a string array that actually consists of hex characters. We say that the content is - & gt; string array [] = {8C, D9, 26,1D, 69, B796, DB}; Now I want to define them as hex characters of 1 byte and not in the form of string, where each entry is 2 bytes. stringbuilder output = new stringbiller (); For (int j = 0; j & lt; array.length; j ++) {string tag = "\ u00" + array [j]; Output.append (temporary); } Tried to do something like that, but this is not possible because it complains about "illegal Unicode escape" to get around that error, "\ u00" Instead of "\ u00" (i.e. the first two backslashes of u, but the stack overflow shows only one), but then I do not see the real hex value in the array, instead of see a bunch of strings like I do - & gt; "\ U008C", "\ U00D9" and so on .. I want 0x8C, 0xD9, 0x26 ... after conversion values, thanks. Edit: I have updated this question, just to make ...

How to implement a HTTP Server in android which can be access by other device with browser? -

I have a new requirement for implementing a HTTP server that runs in Android devices. And this HTTP server is a PC with other devices like browser. I'm getting an example like this: the PAW server for Android but I do not know how to implement it. The PAW server for Android is very complicated. Is there any easy way to implement this requirement? I also read this article: Try Nano HTPD To implement the requirements, it needs to be enhanced. http://elonen.iki.fi/code/nanohttpd/

sitecore6 - Nesting Sitecore sublayouts/placeholders - possible? -

Image
मेरे पास दो कॉलम नामक एक Sublayout है जो इस तरह दिखता है: & lt; div class = "पंक्ति" & gt; & Lt; div class = "column span8" & gt; & lt; sc: प्लेसहोल्डर runat = "server" key = "left-column" & gt; & lt; / sc: प्लेसहोल्डर & gt; & lt; / div & gt; & Lt; div class = "column span4" & gt; & lt; sc: प्लेसहोल्डर runat = "server" key = "right-column" & gt; & lt; / sc: प्लेसहोल्डर & gt; & lt; / div & gt; & Lt; / div & gt; मैं आम तौर पर अपने प्रस्तुति विवरण के माध्यम से अन्य उपलब्द जोड़ूंगा, और प्लेसहोल्डर को बाएं-स्तंभ या दाएं-स्तंभ के रूप में निर्दिष्ट कर दूंगा। अब, कहें कि मैं सटीक समान चाहता हूं अनुपात कॉलम लेकिन बाएं कॉलम के अंदर। जैसे: मैं जोड़ सकता हूं दोगुने स्तंभों को छोड़ दिया स्तंभ पर खड़े हो जाओ ... लेकिन अगर मैं उन नेस्टेड प्लेसहोल्डर्स में से किसी एक को जोड़ना चाहता हूं, तो मैं यह कैसे करूँ? क्या प्लेसहोल्डर के रूप में ...

c# - Using Regular Expression for assigning multiple variables -

I have an XML duration in the format of "0H0M0.25S", where H, M, S stands for hours , Months, second. Now I want to parse this string and assign it to hours, minutes, and dual seconds of the integer. I.e. string s = "0H0M0.25S"; // Input int, minutes; Double seconds; // to assign Is there a way to get it using regular expression, which can specify all the variables at once? Try this: var results = reges. Match (S, @ "(\ d *) H (\ d *) M (\ d *. \ D *)"); Hour = int.Parse (result group [1]. Value); Minute = int.Parse (result group [2]. Value); Second = Double. Purse (result group [3]. Value); You may need to compensate for culture during the parsing of double.

CRM 2011 oData query confusion -

I am very new to CRM development, I was trying to, I am about the code below Confused slightly, please check: var xp = Xrm.Page; Function Onload (Reference) {var accountId = xp.data.entity.getId (); MostRecentQuery = "/XRMServices/2011/organizationData.svc/ContactSet $ ​​selection = FullName, JobTitle, EMailAddress1, Telephone1 & top $ 1 & $ orderby = CreatedOn desc & amp; $ filter = ParentCustomerId / ID eq GUID '' + ACCOUNTID + "'; GetContact (most recent," most "); ....} The Javascript function is implemented when AccountForm The first row gets the account ID The next line is the ODATA query ContactSet In this query, I get confused here, how can we get ContactEntity based on the GUID of AccountEntity I am doing this? Check after I got the answer to this question! Actually there is a look 'parent customer' representing Contact Identity, the unique identifier of the account or contact associated with this con...

- Where Developers Learn, Share, & Build Careers

In some sections of the Android source code, they import com.android.mms.R, but I do not later Can I try com.android.mms.r? Any method can be used to import if your class is already imported import com.android.r , clear it and clean up the reconstruction project. If you used any Res Res by R.XXXX, then your project R will be automatically imported or ctrl + shift + O In addition to this, if it does not work (right click on project), then select the target version of 4.0 here, then clear it. First remove import com.android.r from the line class

- Where Developers Learn, Share, & Build Careers

I'm trying to profile some C ++ code on my Mac (OS X Lion) and I do not know Have found something useful I am looking for a profiler who will tell me how the function is picking up my CPU time (similar to a matlab profiler). Whatever I have tried here gprof it is on my linux machine, but it only gives me empty output on my mac (apparently a known problem ) Equipment I can not understand how to profile anything in my compiled binary for my life. And I can not find any useful tutorials. (Shark detected by other searches, which is no longer available and Valgrind is for memory). Really appreciate the help! is the tool tool used. A complete description of the tool is outside the scope of this answer, but it is a quick introductory guide: Open Instruments. 1 "Time Profiler" template. Choose your app in the "Target" dropdown menu 2 Press the red circle ("Record") If applicable, do some things in your application that requi...

Second Ajax request doesn't work after the first one is successful in jQuery mobile/Phonegap -

I am new to jQuery Mobile & amp; Phonegap I'm trying to build an app that can run on multiple platforms. Actually, I have an HTML file that contains some DIVs (used as separate pages). From the Home screen, I have a button to link to another page: & lt; A href = "#getCategories" onclick = 'GetCategories (0);' Data-transition = "pop" data-roll = "button" & gt; Get Categories & lt; / A & gt; GetCategories (classid) Ajax request to return results based on the variable class. I have shown "#getcategories" "screen and all information properly without any problems. I have approximately 6 categories and each has a different category, from 1 to 6. I also get Get class classes in each category to get my sub-categories, but this is not work. Please note that the web service returns from In the DIV who use to fill all the information, I I set the ID for it (of course it does not work). If I use the ...

asp.net - How can we import .xls files into ssms and only those items must be copied in to the database which are new and the old must be deleted automatically? -

I need to manually import Excel files into SQL Server 2008 SSMS and only load those items in the database People who are new ones who are not existing are people. Please find me the SQL query for that I suggest that you can use SSIS in this situation I think there is no direct examination to handle this situation. First you have to load the data in the staging table and then you only need to move the new record. Please see here for T-SQL commands

php - Convert Array into Key Value Pair array -

I have a comma separated string that I am exploding in an array. If the array is of unknown length and I want to make it an important value in the pair array where each element in the array is the same key, then how do I do it? I'm assuming that I would have to use array_combine? Can someone give me an example using the array? For example: array ([0] => Zebra, [1] => cow, [2] => dog , [3] = & gt; monkey, [4] = & gt; ap) in: array ([animal] => ; Zebra, [animal] = & gt; cow, [animal] => dog, [animal] => monkey, [animal] => ap) You can not use the same key for each element in your array. You need a unique identifier to reach the value of the array. When you use animals for everyone, what price should be used? What can you do to create a 2-dimensional array that you have an array inside the array: array ([animals] => array ([0] = & gt; Zebra, [1] = & gt; cow, [2] = & gt; dog, [3] = & gt; monkey, [4] = & gt; a...

--user=root doesn't seem to override fabric env.user, how come? -

मेरे पास एक fabfile है: env.user = 'deploy' def infra ): "" "आप एक उपयोगकर्ता का प्रयोग कर सकते हैं जो स्वयं को जड़ कर सकते हैं, कोई पासवर्ड के बिना तैनात नहीं हो सकता है।" "('Conf.d / etc / nginx / sites-available / www.foo.hk', 'etc /nginx/sites-available/www.foo.hk ', use_sudo = True) sudo (' nginx -s reload ',) जो मुझे fab infra -Rservers जैसा चलता है । इसलिए मैंने सोचा कि मैं उपयोगकर्ता को - user = root या -u root के साथ ओवरराइड कर सकता हूँ जब मैं fab infra --user = root चलाता हूँ लेकिन यह अभी भी एक पासवर्ड के लिए मुझसे पूछ रहा है हालांकि यदि मैं env.user से env.user = 'root' को बदलता हूं तो यह नहीं है। मैं सेटिंग्स संदर्भ मैनेजर का भी उपयोग कर सकता हूं: def infra (उपयोगकर्ता): "" "आप को ऐसे उपयोगकर्ता का उपयोग करने की आवश्यकता है जो स्वयं को रूट कर सकती है, कोई पासवर्ड के बिना तैनात हो सकता है।" सेटिंग्स (उपयोगकर्ता = उपयोगकर्ता): डाल ('conf.d / etc / nginx / sites-ava...

- Where Developers Learn, Share, & Build Careers

Image
I decided to try social JRBell for an open source, personal project and I am not getting this work. I use the Eclipse Indigo IDE and I have downloaded JRBEL with Eclipse Marketplace and have activated JRBell with my free license. I set up the Glassfish application server with enabling JRBEL and auto-publishing. Here are my rebel.xml & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Application xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://www.zeroturnaround.com" XSI: schema location = "http: //www.zeroturnaround com http : //www.zeroturnaround.com/alderaan/rebel-2_0.xsd "& gt; & Lt; Classpath & gt; & Lt; Dir name = "D: / workspace / g / cati java / src / ro / cati / actions" & gt; & Lt; / Dir> & Lt; / Classpath & gt; & Lt; Web & gt; & Lt; Link target = "/" & gt; & Lt; Dir name = "D: / workspace / g ...

- Where Developers Learn, Share, & Build Careers

In my zend layout.phtml I am doing my navigation service like this: & Lt; ? Php $ userInfo = new Zend_Session_Namespace ('userInfo'); If ($ userInfo-> userType == 'admin') {echo '& lt; Li & gt; & Lt; A href = "/ adminhome" & gt; Home & lt; / A & gt; & Lt; / Li & gt; '; Echo '& lt; Li & gt; & Lt; A href = "adbook" & gt; Addbooks & lt; / A & gt; & Lt; / Li & gt; '; Echo '& lt; Li class = "selected" & gt; & Lt; A href = "about.html" & gt; Adapter book & lt; / A & gt; & Lt; / Li & gt; '; Look & lt; Li & gt; & Lt; A href = "logout" & gt; Adder & lt; / A & gt; & Lt; / Li & gt; '; Look & lt; Li & gt; & Lt; A href = "logout" & gt; Logout & lt; / A & gt; & Lt; / Li & gt; '; }? & Gt; In a normal page, I can get ...

regex - java - Why replaceAll is not working? -

I am starting to learn regex and I do not know if I understand it correctly. I have a problem with changing the function because it does not replace the character in a string that I want to change. Here is my code: public class TestingRegex {public static void key (string algos []) {string string = "hello% l and +++ o_wow _ + L% D & # "; Four special family [] = {'%', '%', 'and', '_'}; (Four SC: special caterers) {if (string contains (sc + "")) string = string.replaceAll (sc + "", "\\" + sc); } System.out.println ("new string:" + string); }} Output is similar to original nothing changed. I should have the output: Hell \% l & amp; +++ o \ _Wor \ _ ++ l \% d \ & amp; ## . Please help in advance thanks. The reason is not working: To create you need a four backslash in a Java string There is a single "real" backslash string = string.replaceAll (Sc, "\\\...

java - Retrieving data from a database .. -

I view the results by storing the database in the database and using the netbins program. But there is no output and there is no compilation error in it. Do I know what the problem is? Is there a missing jar file package database; Import java.io.buffferedReader; Import java.io.IOException; Import java.io.InputStreamReader; Import java.sql *; Public class database {constant connection conn; Public Database () {} Public Connection Connection Receive Public () {Return Conn; } Public static zero master (string [] args throws SQLException {try {class.forName ("oracle.jdbc.driver.OracleDriver"); } Catch (Klassnotfound exception e) {System.out.println ("Could not load driver"); } String user = "system"; // readEntry ("enter userid:"); String pass = "mevalou"; // readEntry ("Enter password:"); Conn = DriverManager.getConnection ("jdbc: oracle: thin: @localhost: 1521: XE", user, pass); String query = "Choose fro...

- Where Developers Learn, Share, & Build Careers

I have received a cf application that currently runs on fusebox 4. I'm thinking a lot about the time limit of application within the CF Administrator, and I'm not 100% locking and where seaflocks should be used. & lt; Cflock scope = "application" type = "unique" timeout = "30" & gt; & Lt; Cfinclude template = "fusebox4.runtime.cfmx.cfm" & gt; & Lt; / Cflock & gt; I can now see a CFLL around the main fusebox file. My instinct is telling me that this is not really a good practice. Can someone suggest that this is incorrect for the fusebox app? I'm sure there is nothing in it Lock Fusebox.runtime.cfmx.cfm Full App You need to check when you lock the entire "application scope" for each request, then you are affecting single-threading for that file. In other words, 2 requests can not run this file at the same time. Since it is a normal file for outline, so it greatly influences your scalab...

c# - Adding behavior to EF Entity classes -

To define an entity framework - the serializable class (EF code first) gives us the public virtual properties of data holders Need to be used in the form, which will later be used as a column in DB, it prevents the developer from initializing the instances of a unit from a producer, I want my institutions not to be Data "methods of getting the bucket", but also behavior, such as manipulation of data within the constructor Institeshn and object to the new object. I think I can have ways, but what should I do to overcome the controller limit? Should I present the wrapper class, which will institute a property property-property and use it instead? You can have the methods "as you want", as well as the properties of the Will not be mapped in DB or properties containing NotMappedAttribute , which will not be mapped ... Note: Only navigation properties (references and archives) should be virtual to load lazy. Not antique I think this is a NHnibernate require...

c - static function declaration inside a block -

A said Functions within block can not be declared stable . If applied to "> static function, this means that the Internal connection that is, it can only be accessed within this file. In other words it has file-scope , whether you have the function inside any other function or outside of all of them Declare it, even if it is applicable. Now, if you have meaning the function declaration inside any other block / function , you are trying to restrict the scope of the function to that particular block / function, which goes against the rules of the language which is static functions, even if the location of their declaration has a file-scope. And therefore, the standard may be prevent this type of announcement. / P> PS : footnote 30 in the latest C11 standard states 6.2.3 - Function In the announcement the storage-class specification can be stable ; only then the file radius;

set ToolTip for dropdownlist inside gridview from query from database asp.net C# -

I am writing the asp.net project in c # and I have a small problem. I have a dropdown list inside a gridview and both of them are initially filled with a database, but different tables (different selection queries). I want to set ToolTip to be the query for the list given below which is used to fill the gridview (datatelay 1) with the following code: & Lt; Asp: TemplateField HeaderText = "select supervisor" item style-width = "100px" & gt; & Lt; ItemTemplate & gt; & Lt; ASP dropdown list id = "dropdown list 1" Rnat = "server" Otopostbak = "true" on-selected index Chenjed = "DdlTest_SelectedIndexChanged" tooltip = & lt;% # ((DataSet1.DataTable1Row) (((DataRowView) container .dataitum) .ro)) .p_id% & gt; & Gt; & Lt; / ASP: DropDownList & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; But when I try to run the project, I get the following error...

jdbc - Is there any way to prevent Java from turning my double into exponential value? -

Does Java have to stop changing its double into exposition value? I am having trouble saving my database, it keeps telling me that it can not convert my warcurter to a numerical form. I do; amt = oldAmt - amt; AMT = Math ABS (AMT); Use the value as a setter in AMT ; jvd.setDr_amt (AMT); Then generate a query string using a function and it gives me; INSERT (1, 1.595545786E7) in jv (id, dr_amt) values; I'm very convinced that you do something like this: connection.createStatement (). ExecuteUpdate (enter "My_table VALUES ('" + myDouble + "')"); Do not do this for the following reasons: Adding a string will cause syntax errors String section causes SQL injection Write your statement to allow JDBC to handle data types: generated statement stmt = connection.prepareStatement ("my_table values ​​(INSERT My_table VALUES?) "); Stmt.setDouble (1, myDouble); Stmt.executeUpdate (); If you use sentences in double ...

asp.net mvc 3 - How to create a javascript string in razor -

I have seen some posts about this subject and some blogs, but no one is able to mention my output . / P> I have to create a Google map map with information about what I want. That part works to manually enter the information results in the correct information. Where am I stuck when I'm going dynamiccaly with the javascript array string information I want on my map. I have to get the HTML code: & lt; Script type = "text / javascript" & gt; Var Projects = [['Contour 4.1 Besthande Bu', 52.25446, 6.16024700000003, 'Devender', '', Consultant, 'Rating 30'], ['School Nyaya 4.0', 52.243161, 4.43677860000003, 'Nordwijk', '', Consultant ',' rating 30 '],]; Very simple JavaScript array, which I thought was: & lt; Script type = "text / javascript" & gt; Var Projects = [[Priority in Model] {@ HttpUtility.JavaScriptStringEncode ("[" + item.Gebouwnaam + "...

xml - Substitute default value for missing element -

मेरी स्कीमा का एक अंश: & lt; x: जटिल टाइप नाम = "foo" & gt; & LT; XS: अनुक्रम & gt; & Lt; xs: तत्व का नाम = "बार" प्रकार = "xs: सकारात्मक इन्टेजर" / & gt; & Lt; xs: तत्व का नाम = "बाज़" प्रकार = "बैक्स_प्रकार" minOccurs = "0" / & gt; & Lt; / XS: अनुक्रम & gt; & Lt; / XS: complexType & gt; & Lt; x: सरल टाइप नाम = "baz_type" & gt; & Lt; xs: प्रतिबंध आधार = "एक्सएस: एनएमटीओकेएन" & gt; & Lt; xs: गणना मूल्य = "कोई नहीं" / & gt; & Lt; xs: गणना मूल्य = "गर्भपात" / & gt; & Lt; / XS: प्रतिबंध & gt; & Lt; / XS: simpleType & gt; यही है, मेरे पास एक गणन प्रकार का एक तत्व है जो गायब हो सकता है। क्या निम्न व्यवहार प्राप्त करना संभव है: निम्न एक्सएमएल पर यह none के बजाय null के डिफ़ॉल्ट मान देता है - अर्थात foo.getBaz () == BazType.NONE यह XML पिछड़े संगतता के लिए मान्य होना चाहिए। ...

java - Asynchronous function - error status 0 -

I execute my async function and before reloading I reload the browser I get an error - the overloader is executed. The status error code is 0. This problem is on Firefox and Chrome. Can you tell me what this status code is? do (new Unsolicited Backlash () {@ Override Public Watch On Six (Boolean Result) {@} @Orraide on Public Video on Fellier (throbble throw) {do_sth ( );}}}; Boolean () {while (true);} also the status error 0 0 status code means that the request has been canceled (this network can also denote the error or the timing of the request may be terminated ). View and

Android: How I call in runOnUiThread method to onKeyDown? -

मेरे पास केडेडाउन पद्धति का यह कोड है: @KeyDown पर सार्वजनिक बूलियन ओवरराइड (int keyCode , कीइवेंट इवेंट) {if (keycode == KeyEvent.KEYCODE_VOLUME_UP) {int index = seekbar.getProgress (); Seekbar.setProgress (सूचकांक + 1); वापस सच; } और अगर (कुंजीकोड == KeyEvent.KEYCODE_VOLUME_DOWN) {int index = seekbar.getProgress (); Seekbar.setProgress (सूचकांक -1); वापस सच; } वापसी सुपर.कॉनडाउन (कुंजीकोड, घटना); } समस्या यह है कि मैं इसे asyncTask में, postExecute में करना चाहूंगा और मुझे लगता है कि runOnUiThread चलाते समय, लेकिन मैं डॉन संपादित करें: मेरे पास तलाश में एक तलाशकर्ता है जो एक एशिनटस्क में पोस्टएक्सटेक में बनाया और दिखाया गया है, और मुझे इस तरह की तलाशकर्ता थम्ब स्थिति अपडेट करने की आवश्यकता है: postExecute को runOnUiThread की आवश्यकता नहीं है आप अधिक जानकारी के लिए postExecute में UI तत्वों को अपडेट कर सकते हैं

while and for loop in c++ -

1) i = 0; जबकि (आई & एलटी; एन) {जे = आई + 1; जबकि (जे एंड एलटी; एन एंड एपी [आई]। प्रथम == पी [जे]। प्रथम और पी [जे]। सिकेंड - पी [आई]। सिकंड & एलटी; कश्मीर) जे ++; मैं = जे; रेस ++; } 2) के लिए (i = 0; i & lt; N; i ++) {j = i + 1; जबकि (जे एंड एलटी; एन एंड एपी [आई]। प्रथम == पी [जे]। प्रथम और पी [जे]। सिकेंड - पी [आई]। सिकंड & एलटी; कश्मीर) जे ++; मैं = जे; रेस ++; } पहला कोड और दूसरा कोड केवल 1 में लूप होने के कारण और 2 में लूप के लिए अलग है)। लेकिन मेरे अनुसार, दोनों के कारण आउटपुट समान होना चाहिए, लेकिन यह अलग है। उपरोक्त दोनों कोड केवल कुल कोड का एक हिस्सा हैं। लेकिन मुझे आपको 1) 2 की वजह से आउटपुट बता देना चाहिए। 2) 3 है। मैं जवाब क्यों नहीं देता, क्योंकि सब कुछ एक ही हो रहा है। पाश वेतन वृद्धि के लिए मैं दो बार एक बार में पाश परिभाषा के लिए ( i ++ ) और फिर अप्रत्यक्ष रूप से j के माध्यम से। जबकि लूप केवल j के माध्यम से अप्रत्यक्ष वृद्धि करता है । तो दो उदाहरण समान नहीं हैं। ml>

security - How to secure remote desktop access to windows azure instances -

I have successfully installed my Windows Azure Web role, but ideally I want to lock access so that it only Is not it safe to be protected by password? For example, restrict RDP access to specific IP ranges, require client certificates, etc. I know that you are advised not to enable remote desktop at all times but to enable it to troubleshoot. But if this security is enabled to troubleshoot the problem then it still remains (also annoying that till I can not remember anything, I will not enable / disable RDP access without re-publication. can). Thanks Edit on November 2013: You can use ACL to lock specific port categories for RDP using PowerShell. The new Ezoor Portal allows you to access the inside of the portal It allows you to do it with your PowerShell: You can use the OS software window You can use a firewall Go to another port instead of the default 3389. In the endpoint management portal, you can create an internal port 3389 internal port (i.e., 2400) point...

- Where Developers Learn, Share, & Build Careers

I can not detect any patterns, perhaps in every 1,000 edits of a specific model, at 1 one M2M field Gives an Integrity Arrayer Most of the time this area was not modified too. When a model is saved, I believe that the DJgo always wipes the M2M field and then adds the item again, right? I looked at the clear () call to Dijena and then show the plus () s item. My code then fails: Integrity: Duplicate key value violates unique obstacle "app_model_m2m_field_key" extension: key (model 1_id, model2_id) = (597) , 1009) already exists. It seems that the items are added before adding items, which is very strange. I have tried to reproduce it but it is very difficult, only sometimes it happens, by any idea what can this be? Maybe you can set yourself to solve this problem? Thank you in advance Most likely, you have two requests Request 2 starts a transaction and removes M2M lines with the same block where the blocks for the transaction of 1 request Waiting. ...

- Where Developers Learn, Share, & Build Careers

Visibility: hidden and using : Hover . However, I want the second state, with which the changed element will continue, even when the mouse element leaves. It would be easy to do with javascript, but is there a way to do it in pure CSS? CSS is stateless, so there is no way to change the state in a permanent manner. The only way I can think of approaching is to increase the size of the element (or the sub-element which is large) so that the mouse does not go, but it will blur the rest of the page and controls.

accordion - Bootstrap collapse not working properly -

I have created an addresser with bootstrap collapse. On the extension of click on a particular element, there are elements in the alternative parallel to the following markup Is: & lt; Div class = "accordion" id = "accordion2" & gt; & Lt; Div class = "accordion-group" & gt; & Lt; Div class = "aceion-heading" & gt; & Lt; Class = "accordion-toggle" href = "# collapse-0" id = "0" data-toggle = "collapse" data-parent = "# accordion2" & gt; User visit & lt; / A & gt; & Lt; / Div & gt; & Lt; Div id = "collapse-0" class = "adrian-body collapse" & gt; & Lt; Div class = "accordion-inner" & gt; Binding & lt; Br / & gt; Binding & lt; Br / & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "accordion-group" & gt; & Lt; Div...

- Where Developers Learn, Share, & Build Careers

Speech API is available in WinRT (such as Windows Phone 8). Can I use some third party speech instead of the API? I want to apply TTS to my Windows 8 / WinRT application, do anyone have some suggestions? Voice commands and speech recognition are only available on the phone. TTS is available for all WinRT devices.

scrollbar - jQuery jScrollPane Custom Styling -

Therefore, I am trying to work with jScrollPane and I can not do that I think a bit of a fool Like the website and everything I've seen, it looks simple though, my code does not change the scrollbar style at all. I've added a script (three in total, main one and two mouse wheel) and CSS, still do not go. Then I found the following fiddle: (Looking forward to doing this, maybe keeping it in normal width) And I tried to work with it My code: It seems that the following script is going to be used to trigger things (I have created a separate script file, which contains the downloaded scripts untouched): $ (function () {$ ('. ScrollPan'). JScrollPane ();}); Therefore, I have added the Scrollapana class, where I want the scrollbar, but none of the additional styles is captured as I had previously linked to Belle. I looked through HTML within some JScroll demo and I have been using a lot of extra classes, jspScrollable, jspContainer, and others. However, ...

- Where Developers Learn, Share, & Build Careers

This is a clone: ​​(currently no response) I try to create a form I am getting that value passed from $ _ request . A field is displayed only when the $ _REQUEST variable is present (done) The user The field can be modified The field is valid in any way (modified) value is used In this specific case, Using the user function, but I hope the solution applies to any drop form. Here is a simplified version of my code where there is an additional field to specify the user, they have a favorite result, if they want to register using the following URL: Freeware_user ($ op, $ edit, & $ user, $ category = NULL) {switch ($ op) {// Add additional fields if their case 'register' in $ _REQUEST The values ​​for: if ($ _ request ['fruit'] == 'pineapple') {$ fields ['user_reg_info'] ['Profile_fruit'] = array ('#type' => gt; Stfild '# Description' = & gt; 'your favorite fruit (if applicable)', '# L...

- Where Developers Learn, Share, & Build Careers

This is actually a two parter (I do not even know if I should divide the question). I am using Intellij as an IDE. This building is perfectly fine if I run it from when I use ant, though, things start to mess. In the process of writing an automated test for my application, I have two things Have searched. First of all, when dexguard runs I ant clean debug . Unexpected error: Second, when I do this, I get the following error, but completes creation "Successfully" [dexguard] class = [ Com / framework / notification / notificationDetailBuilder] [dexguard] method = [getScheduledNotificationDetail () Lcom / outline / base / notification / notificationDetail;] [dexguard] exception = [java.lang.IllegalStateException] (negative variable V -1 for education [iget V-1, V0, field_12165]) com.saikoa.dexguard.fs.b ([dexguard] at dexGuard.: 1219) etc etc etc So first of all, Or dumb thing I did to get the dexguard to run during the debug. And second, this error also means in t...

- Where Developers Learn, Share, & Build Careers

Depending on the Windows site, it indicates that the surface is coming soon with Windows 8 Pro. So the question is when it will be on the market Microsoft said two months ago that ground supporters will be available After 3 months of surface RT launch, it keeps the launch date in the last days of January or early February. Windows 8 is expected to begin about 90 days later, H Focal Points for the tech industry in the first quarter of 2013.

html - Should I add the _TrackPageview Snippet to the tag or somewhere in the JavaScript Container that fires when a link is clicked? -

When I click on the button hosted in a lightbox, then trying to set up a virtual pageview for I am here. I know that on the normal page, let me & lt; A & gt; The need to add the snippet to the tag, but it was thinking that the functionality is different within a JS lightbox. Do I need to add a tube anywhere in the container or do I need & lt; A & gt; Add tags to be right? I will add the following: I want to track clicks on the submit button on the basis of this form: I believe that I will send the code to & lt; A & gt; tag. But two other links are hosted on one side bar (accessible from any page) & amp; The second one which shows in the lightbox, when you click on "Send us a message," Please tell me that I just send everyone & lt; A & gt; Link to the snippet on the tag (because that is what I want to track is a click). Thank you very much, here's what I'll call these to & lt; A & gt; tag: &...

Android Today's date -

Hello I want to present the current date. I'm trying to do this: calendar c = calendar .get instances (); System.out.println ("Current Time = & gt;" + c.getTime ()); SimpleDateFormat df = New Simple Format ("yyyy-MM-dd HH: mm: ss"); String formatteddet = df.format (c.getTime ()); TextView txtView = (TextView) ViewById (R.id.tvDate); TxtView.setText ("Current Date and Time:" + Formatted Data); but it does not display dates in my text view. Is there a better way to display the same date? I like this: Monday, April 22 You SimpleDateFormat . Simple Data Format df = New Simple Data Format ("yyyy-MM-dd HH: mm: ss"); should be SimpleDataformat DF = New SimpleDateform ("EEEE, MMMMM DDDD");

php - Undefined index errors when using plus equal operator -

I am working on other developers old codes and there are many notifications: Unspecified index errors while using data + = operator The index is not necessarily set up so far, so that the error arises. Example: $ myArray = array (); $ MyValue = 1; For {$ myArray ['test'] + = 1; ($ I = 1; $ i & lt; = 10; $ i ++) } An error will occur on the first run because the trial index is not set up yet. I know that I can remove this error from the following code: $ myArray = array (); $ MyValue = 1; ($ I = 1; $ i & lt; = 10; $ i ++) {If ($ MyArray ['test'])) {$ myArray ['test'] = $ myValue; } And {$ myArray ['test'] + = $ myValue; }} However, there are about 50 things to change in this way. Do all these issuing statements deserve to be written or do not I know better? Edit: I should note that array indexes are not always equal and sometimes are not set, so I can not predict the pointer to avoid error in this situation. It is a little...

Google Maps Directions List Jquery Mobile/HTML5 -

I have a start and end card stored on client devices with HTML5 local storage. To use Google Maps driving list (not a map .. Directions in text formats) The application is in Jazzery Mobile. & lt; Div data-role = "content" & gt; & Lt; Div data-role = "content" id = "list" & gt; & Lt; Ul data-roll = "listview" data-inset = "true" data-filter = "true" id = "myList" & gt; Can I add my list of inventory to id myList? Function Pass Direction (geo) {var directionsService = new google.maps.DirectionsService (); Var Directions = New google.maps.DirectionsRenderer (); DirectionsDisplay.setPanel (document.getElementById ("MyList")); Var storedlati = localStorage.getItem ("text1"); Var storedlongi = localStorage.getItem ("text"); Var destilati = localStorage.getItem ("text2"); Var destilongi = localStorage.getItem ("text3"); Var Request = {Or...

javascript - Trying to create a div and center it, dynamically -

मेरे पास एक समारोह है: showModal (डेटा); जिसे बुलाया जाता है, उसमें दी गई सामग्री के साथ एक मॉडल बनाना होगा। मैं इसे केन्द्रित करने की कोशिश कर रहा था, लेकिन मुझे नहीं लगता कि यह 'सही ऑब्जेक्ट' का संदर्भ दे रहा है। सीएसएस ({"z-index": संख्या ($ ("# overlay1")। सीएसएस ("ई-मेल" (-) / 2 - $ (यह)। हल्का () / 2, बाएं: $ (खिड़की)। विथ () / 2 - $ (यह) .विड्थ () / 2}) .एंडेंड (डेटा) .appendTo ("body")। FadeIn (); } यह स्क्रीन पर 0,0 पर रखेगा। यह कैसे करें? इसे आज़माएं: फ़ंक्शन शोमोडल (डेटा) {var modal = $ ("& lt; div class = 'modal' & gt;"); Modal.css ({"z-index": संख्या ($ ("# overlay1")। सीएसएस ("z- सूचकांक")) + 5, शीर्ष: $ (खिड़की)। हल्का () / 2 - modal.height ( ) / 2, बाएं: $ (विंडो) .विड्थ () / 2 - modal.width () / 2}) .एपेंड (डेटा) .appendTo ("body")। FadeIn (); } अपने संदर्भ में, यह फ़ंक्शन showModal को लगता है लेकिन आप वर्ग "मोडल" के स...

- Where Developers Learn, Share, & Build Careers

I am running my Selenium WebDriver tests in parallel at the law level. Due to the high number of entry time, I have found a lot of intermittent 404, which results in failure of my test. I was browsing through the solutions to capture these 404s and came in a lot of HTMLUnit and Proxy options. All look good? Im a 404 test run (surrounded around reading, then assure: but before going into any of these options, I'm not sure which im is possible to take your mind related to the requirements of the following Needed for the WebDriver is there any way to do it currently?), How do I get past / near to pass my test? Until I go to 404, the only way I can think of refreshing the page? And then will continue? Not sure if this is an easy way to do this? I think it would be better to get the web application to fix or decrease the runtime of Selenium for. If the web application does not work, why should it pass the test? Note that there are "errors not found" errors in 4...

- Where Developers Learn, Share, & Build Careers

I hope to show a dynamic generating HTML page on my mobile application. This HTML file is structured in fixed format. Include forms, images, and buttons However, when it comes to various mobile platforms, such as iOS and Android and also separate cell phones, such as sumsung or other company from Android Display results are different, some of them are very bad. This problem is heavy for the Android system because there are many different companies using this system. For now I am using a method when the user applies the application, then the application cell phone model user use. And the server side will choose the right HTML template for that phone. This means that I have to write an HTML template for every phone. These days, consider the mounting models of phones, I do not think this is a wise idea. I hope if someone can face a solution to solve this problem. Either a solution that will make HTML templates based on the user's cell phone model, or a universal way of creatin...

c# - monodroid receiver PACKAGE_REMOVED java.lang.ClassNotFoundException -

I'm using monodroid I'm getting the java.lang.ClassNotFoundException error when PACKAGE_REMOVED action gets stuck. Stackflow and other sites have searched and tried, but it can not work any help would be appreciated. AndroidManifest.xml & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" Android: installLocation = "Internal Only" & gt; & Lt; Usage-SDK Android: targetSdkVersion = "10" /> & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Apps Android: Icon = "@ Drable / Icon" Android: label = "App Store" & gt; & Lt; Receiver Android: name = ". PackageChangeReceiver" Android: export = "true" android: enabled = "true" & gt; & Lt; Intro-Filter Android: Priority = "99 9" & gt; & Lt; Action Andro...

Can AutoMappers AllowNullCollections setting be constrained to a profile? -

Note: I On the question have asked my MVC There are basically two levels of mapping in the application (Simplified for this question): Repository object & lt; - & gt; Unit & lt; - & gt; We have created two profiles, that are going to handle the configuration for each appropriate mapping level. "Repository Objects" is finally sorted on XML and used in REST web services. . The problem we encountered was that an empty collection in the storage object would be sorted for an empty element in XML, and would cause a problem because the web service is neither an element nor data containing an element. We were able to resolve this by using the AllowNullCollections configuration setting. This (of course) will create an empty collection instead of a blank collection, which will then be exactly serial. Although I'm not entirely enjoyable as a global setting because it is not really the best practice. Send me this repository object & lt; - ...

flex - Setting text color in a StyleableTextField -

Please advise me how to determine the color in the text. The following does not work for me (the color is black): tf.setStyle ('color', 0xFF0000); And also: tf.setStyle ('color', 'red'); styledtextfixed in a textcolor Try to use that property ( tf.textcolor = 0xff0000; ). However, I found out that in my item renders, I ever need to use both the textcolor property and the set styling to replace the colors of StylableTextFields properly I do not know why, yet.

- Where Developers Learn, Share, & Build Careers

फ़ाइल SDL.h सी में है: /user/desktop/sdl-version/include/SDL.h (जहां एसडीएल .h फाइल है एक नया फ़ोल्डर नहीं है) और मैंने सी: / उपयोगकर्ता / डेस्कटॉप / एसडीएल-संस्करण / शामिल करने के लिए अपने प्रॉपर्टी पेजों को स्थापित किया है। हालांकि, जब मैं इसे संकलित करता हूं SDL.h पाया नहीं जा सकता क्या समस्या है? गुण पृष्ठ की स्क्रीन कैप: शामिल निर्देशिका पथ के आसपास उद्धरण अंक निकालें।

clojure - Emacs Live - Namespace not found -

I'm using because it looked good and saves me a lot of configuration work now it's okay for a few days Worked, but today broke some apparently. In particular, broke auto perfection (I believe this may be a problem) Actually, my minibuger is no longer just found "namespace." Shows me, I do not get actual autocomplete (only those words that are already present in the file) and when I run CCMN , then I have a blank * NREPL error * Buffer is found, when auto completion is usually kicked every time. EDIT: This is only when I start a nrepl-server with nrepl-jack-in just connecting to an existing one (such as created with a lenght symbol ) works fine. > namespace not found that nrepl is not about the namespace of current buffer This issue is with Nrepl-set-ns ( cc Mn ) which is running in-ns , which does not bring closure core dependency. In both cases, the work around is complete only with the ns s-expr eval or nrepl-load-current-buffer of the buff...

php - Connecting to MySQL Database with Code Hosted Locally -

When I try to run a php code working on my local host instead of a web server, Getting the error. WARNING: mysqli :: mysqli () [mysqli.mysqli]: [2002] Connection refused Any ideas how the MySQL username , DB, and password to work from my local machine? I'm using OS X Mountain Lion and Apache. Thank you! Itemprop = "text"> Unless you have the default password root to connect to the local host If not, then something like this will happen: connect_errno) {echo "failed to connect to MySQL: (" MySqli-> Connect_errno. ")". $ Mysqli- & gt; Connect_error; } Echo $ mysqli-> Host_info "\ N"; $ Mysqli = new mysqli ("127.0.0.1", "user", "password", "database", 3306); If ($ mysqli-> connect_errno) {echo "failed to connect to MySQL: (" MySqli-> Connect_errno. ")". $ Mysqli- & gt; Connect_error; } Echo $ mysqli-> Host_info "\ N"; ? & Gt;...