Posts

Showing posts from March, 2015

optimization - Writing a piece of C code such that compiler uses SSE4.1 instruction for generating assembly Code -

I want to write some code such as gcc optimized using -msse4.1 flag Can it Actually I want to check whether the compiler is taking advantage of the directions of SSE4.1 or not. There are several SSE 4.1 instructions () but I can not write a piece of C code which is using those instructions in the demographic legislation. Thanks in advance. I suspect that the GCC will use the SSE 4.1 instructions easily. But you can take a look: Under the SPMD model, the programmer writes a program that appears to be mostly regular serial programs, although the performance model is actually that many examples of hardware programs Execute in parallel at (See a more detailed example that reflects this concept.) ISPC prepares C-based SPMD programming language to run CPU units; It often provides a 3x or more speedup on the CPU with 4-wide SSE units, without any difficulty in writing intrica codes.

Python Math Regex -

I am creating a programming language in Python and parsing a main component that I do not remember for the original language The ability to do mathematical equations has a function to parse math, but I need to check whether the input is a math equation. I'm looking for a regex to match something like 3 * x ^ (4 * y) + 1- (7 * y * z / x). You can not do what you want with regular expressions, this is not a regular language in Python Extensions are what you want to do to abuse what you do, but it will be unnecessary and you will not get anything to use parses. What you want is a parser, the library is very easy to use for Python. Here is a related.

SharePoint 2010 Email Event Handler produces error "Could not load file or assembly...", list stops working -

In the pursuit of many blogs, I have the code below. However, once I am registered with the event handler and the SharePoint Timer Service I resume, when I send an email to the list, it no longer displays emails and I get an error below. I tried: Restarting the IIS, SharePoint Timer Service. Did my IT department give "user" account rights to my assembly? In GAC (other blog's suggestion) Code : Public category EventReceiver1: SPEmailEventReceiver {/// & lt; Summary & gt; An email message has been received in the /// list. /// & lt; / Summary & gt; Public override receives zero email (SPList oList, SPEmailMessage, string strReceiverData) {SPListItem oListItem = oList.Items.Add (); Oliver's item ["Facsimber"] = Omease. Header ["subject"]; // OliveItem ["Body"] = Omease Html bd; Oliver's item ["messbie"] = Omease Header ["subject"]; OListItem.Update (); }} error : file or assembl...

TSQL: Updating multiple columns not working?? (ASP.NET C#) -

मेरे पास यह संग्रहीत कार्यविधि है निर्माण प्रक्रिया spEditInfo @username nvarchar (64), @ पासवर्ड nvarchar (64), @ फ्रिस्टामेन नर्वचर (64), @ मिड्लनैम नैवर्चार (64), @लास्टामेन नवरर्चार (64), @ईमेल नवरर्चार (64) जैसा कि यूजर अपडेट्स यूजर सेट पासवर्ड पासवर्ड @ @ पासवर्ड, फर्स्टनाम = @ फर्स्ट नेम, मिडलनेम = Middlename, lastname = @ lastname, ईमेल = @ ईमेल WHERE उपयोगकर्ता नाम = @ उपयोगकर्ता नाम; यहाँ समस्या है, यद्यपि। कोई फर्क नहीं पड़ता कि शेष मानकों के रूप में मैं क्या मानता हूं, केवल पासवर्ड बदल जाता है। कोई भी विचार क्यों? यह मेरा कॉलिंग कोड है: SqlCommand cmd = new SqlCommand ("spEditInfo", conn); Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.Add ("उपयोगकर्ता नाम", SqlDbType.NVarChar, 64); Cmd.Parameters.Add ("password", SqlDbType.NVarChar, 64); Cmd.Parameters.Add ("प्रथम नाम", SqlDbType.NVarChar, 64); Cmd.Parameters.Add ("middlename", SqlDbType.NVarChar, 64); Cmd.Parameters.Add ("lastname", ...

javascript - more efficient and expandable google search -

I have a large list of websites with checkboxes, which I want to use to narrow down a Google search. Now my script is limited to about 5 sites, which I think is that there is some length limit on Firefox or Google, and my script looks like this function_google () { Var cbs = document.getElementsByTagName ('Input'); Var txt = document.search.query.value; Var site = ""; For (var i = 0; i & lt; cbs.length; i ++) {if (cbs [i]. Type == 'checkbox' & amp; amp; amp; amp; amp; ; Amp; amp; amp; amp; amp; cbs; i.checked & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; cbs [i] .value! = "Yes") {sites = sites + "Site:" + cbs [i] .value + "OR"; }} Sites = sites.substring (0, sites.length - 4); Window.open ("http://www.google.com/search?q=" + "" + + txt + sites); } I noticed custom Google search but it seems that you specify all the sites ahead of time and then custom Google search is required mo...

.net - I need help with the design for many keyboard shortcuts assosciated with various methods -

I need to come up with several keyboard shortcuts and collect them in different ways. I need help with design in C # To use any specific dstrucs? Get started and then consider generic structures.

Is it possible to audit what javascript methods are executing on a page? -

Image
My goal is to see which Javascript functions have been executed since the beginning of the audit, it is most comparable to me It is that every javascript file is being loaded at the beginning of each method, which is being loaded, and then write a list of all the functions that have a breakpoint that was hit. Is this device present? If not, why do not developers need it? I see myself a page, I am seeing something happening, but what is happening is not able to handle it. In a big atmosphere, I could see this work being extremely disappointing. Cheers Yes. Firebug (for Firefox) is the most popular. Also, press F12 to bring IE9 and Chrome ... to the developer window. With all the tools outlined here, you can set JavaScript break points, view stacks, and view your script too. To help you see console.log - Google Chrome's Javascript Console (which is some good visual profiling) -

Regex and non-technical users -

Image
Given that: You have some major Value data that can be modified Modifications are done by applying a filter in the data. Filters that are controlled are controlled by non-technical people Filters are setup using regular expressions. An example of a rule described in the form of a filter can be "If a key matches something regex, replace the value with some other value" You How will: If the people of the business have to be prepared by the filter, who can not make regular expressions then can you submit your input to them which can be easily translated into regex Will you? There is a GUI editor to create regular expressions from plain English, I take a look at it I suggest and implement its own variation See screenshots for an example:

attributes - How to change column name in specific page template? -

I have ASP with dynamic data. Suppose I have an institution "student" and it has a required column "DateOfBirth". I can just put the required object in the DateOfBirth Metadata field, but I want to do better. At the top of the page, I have "* - indicates the required area." On field names, I want the column name to be "Date of Birth". But I only want to edit the additional "*" in the Insert and Description page template. I do not want to show this list in the template. How do I do this? I thought immediately after posting it. I just need to modify the EntityTemplates / Default_Edit.ascx.cs and Label_Init in Default_Idert.ascx.cs. Secure Zero Label_Init (Object Sender, EventArgs E) {Label Label = (Label) Sender; If (this.currentColumn.IsRequired) {label.Text = "*"; } Label.Text + = currentColumn.DisplayName; }

c# - XPath: Select from non-root node fails -

I am trying to start with nodes that are not the root nodes of XML documents The following code: foreach (XmlNode xmlIter .ctlect nodes ("/ refresher / refact1 [[id = 'parameter'] / variables / *")) {parameter p = new parameter (); XmlNode = xmlIter.SelectSingleNode ("varlistentry / word / parameter"); P.Identifier = xmlNode.InnerText; XmlNode = xmlIter.SelectSingleNode ("varlistentry / listitem"); P.Documentation = xmlNode.InnerText; } The XML document (here is only one snippet) is the following: & lt; Refsect1 id = "parameter" & gt; & Lt; Title & gt; Parameters & lt; / Title & gt; & Lt; Variablelist & gt; & Lt; Varlistentry & gt; & Lt; Period & gt; & Lt; Parameter & gt; Pipeline & lt; / Parameters & gt; & Lt; / Period & gt; & Lt; ListItem & gt; & Lt; Paragraph & gt; & Lt; / Paragraph & gt; & Lt; / ListItem & gt; & Lt;...

php - insert and select strings array from database.? -

I want to put all the string array databases in one line, and after that, somewhere else only the first part They (wire array) and they (first part string array) are displayed by loop forward. I use [ serialized or implode or json_encode or ? ]? Can you give me an example? Example: Data (string array): "input name = 'units []'" = value = & Gt; Hello, how, ou "input name = 'units []'" = value => Hello, What, Other I want this output: Hello Hello while and mysql_fetch functions: $ units = $ _REQUEST ['units' ]; $ Units = array_map ('mysql_real_escape_string', $ units); Mysql_query ("INSERT IN & lt; Table Name & gt; VALUES ('.' Implode (''), ('", $ units). "')"); then: $ q = mysql_query ('select & lt; by table name & gt;'); While ($ line = mysql_fetch_row ($ q)) {echo $ line [0]; Sometimes, however, serialize is a be...

c++ - why does fclose not set file pointer to NULL? -

I was writing an RAI wrapper for FILE *. I have seen that when the file is destroyed after being deleted * it leads to undefined behavior (sig mistake or errors somewhere else). I think the fclose file will be set * null *, which did not do it. smartFP {smartFP (const std :: string and name): fp (fopen (name.c_str), "r") {} ~ smartFP () {if (fp) {Fclose (Fp); // delete (fp); & Lt; - The cause of the accident is fp = null; & Lt; - Is this OK?}} Private: FILE * fp;}; Why does fclose FILE * not set to taps? The second question allocates the FP to the FP in the heap or the heap? I thought it was on the heap and so remove it after Fclose, so that the 4 or 8 bytes can be de-olotted on the heap for the FP. But it seems that it is not needed. Of course delete fp is causing an accident. It was not allocated with new . Call only Delete with something you've got a new or you have been asked to use it with some other documents. The document for fopen...

asp.net - IIS does not appear to be serving ANY .net apps. The logs show a sc-win32-status of 5. What access is being denied? -

ओएस विंडोज़ 2003 सर्वर है ASP.NET 3.5 SP1 का उपयोग ASP.NET MVC 2 के साथ करें। यह आपकी सामान्य सनकी घटना है मैं अपने डेवलपमेंट सर्वर में से एक पर एएसपी.नेट एमवीसी 2 आवेदन चलाने की कोशिश कर रहा हूं और ऐसा IIS कभी भी पूरा नहीं करता है। मैंने एक पूरी तरह रिक्त वेब प्रपत्रों का आवेदन बनाया है और यह वही काम करता है Iis लॉग इन सभी प्रयासों के लिए SC-win32-status 5 दिखाती है। ऐसा लगता है कि प्रवेश से इनकार किया जा रहा है, लेकिन मुझे नहीं पता कि क्यों सभी साइटों में एएसपीएनईटी उपयोगकर्ता को उनकी सुरक्षा अनुमतियों में जोड़ा गया है। यहाँ पागल बात है सभी पृष्ठों के लिए मैं लोड करने का प्रयास करता हूं, मुझे इस तरह से आउटपुट दिखाई देता है: यूआरएल ब्राउज़र में प्रवेश किया गया है: http: // & lt; server_name & gt ;: 90 / & lt; एप_नाम & gt; / & lt; एप_नाम & gt;। PlainURL: http: // & lt; server_name & gt ;: 90 / & lt; एप_नाम & gt; / & lt; एप_नाम & gt;। एस्पक्स फर्स्टपार्ट: http: // & lt; server_name & gt; LastPart:: 90 / & LT; app_nam...

php - how to check the login information for remote website -

I want to see login information for the remote website. I can do it with curl, but curl uses the server's IP (I do not want to use my script's server's IP, I want a script to use client's IP). For example: The client will use my form (username and password) and my PHP scripts will see if their account details are correct or not. The script will control whether its account credentials are correct or not. I can not use curl (server IP), get content (server IP), jquery + json + ajax (cross domain problem). Any advice? You are not able to use the IP address of the server The server is requesting that you are right that AJAX The solution will not work for XSS reasons. You can open a remote page in a hidden iframe, and control the iframe with jquery.

mysql - PHP Many to Many Set Ids -

For the purpose of this question, suppose we have many relationships to use three tables: In the syllabus, with courses and name enrollment with students of ID and name - course_id and student_id In the train, Code> course.student_ids = [1,2,3,4,5] And the railroad says that it will add / remove the ID as necessary. I want to do something similar in PHP. Something like this set_courses ($ student_id, array (1,2,3,4,5)); What was I thinking that if PHP is a good way to implement it efficiently, then I have 3 questions (to get an existing ID, to remove an unnecessary people, and I can think of a way to add a new people. Is there a way to do this in one or two questions? Thank you! If I understand you correctly, then you can do it in 2: Insert enrollment I use the transaction, though to ensure that both are executed

android - How to get multiple pages in Eclipse? -

It's very confusing I'm going to need too many more pages in my Android app But I do not think where I will do it .... This is how my eclipse looks: The image in the image is a graphical representation of a 'layout' file for a 'view', although in your case there is probably a 'layout' for a activity . To add another, right-click your 'Gamework' project icon in the 'Package Explorer' panel and select New - & gt; Select. Android XML file When the dialog appears, select 'Layout' radio button under 'What types of resources would you like to create'. And give it a file name in the "file" editing box like 'new-layout.xml'.

creating a smartphone client for windows phone 7 or android -

I am trying to design an Android or Windows Phone 7 app (a customer) who will get news from the website , That website has not provided an API or XML file. My question is, what is the best way to do this? Can I just parse my content by downloading html file? If my questions are a bit unclear then I apologize, but I am not asking for codes. I need some guidelines or approach to do this. Note: I will not violate any copyright, just a portal for my university website. If Windows 7 is a version of HTML Integrity Pack for WP7. Here is some sample code: Public zero hap () {HtmlWeb.LoadAsync ("http://www.mycollege.edu/news", on-callback ); } Private Zero On-Callback (Object S, HTML DocLock Loaded Complete HTMLDocumentLoadCompleted) {var htmlDocument = htmlDocumentLoadCompleted.Document; / / There is another way that any kind of service should be done, it actually acts as a scrapping and management of news, you can control the format that uses mobile devices. . S...

list - Capitalization of all characters string in a double loop in Python -

I have the following Python code, it caps the circle through each string and capitalizes each letter: str = 'abcd' l = list (STR) i. = Cap_char str1 = ''. (RL) joining the print str1 Which creates: Abcd ABCD ABCD ABCD I would like this code to increase the number of mutant characters until it reaches capitalization until it reaches the lane (L) -1 to generate this number: ABCD ABCD ABCD ABCD & gt; & Gt; - 1 Charged Capitalized ABCD ABCD ABCD ABCD & gt; & Gt; - ABCD ABCD ADCD & gt; - When I make indexes arithmetic, then understand that the idea should be wrapped, but can not generate an elegant code ( / p> After the text import itertools x = 'abcd' n = lane (x) for xrange (1, n): combination = Itertools.combinations (Range (n), i) For the combination in c: print '' .join ([k] m for the meter in the calculation of k.upper (in c), k (x)], Print 'gt; & gt; - four (s) capitaliz Output: Abcd ABCD AB...

Silverlight Navigation(PRISM) to show in Browser? -

I'm also not sure how to ask this question properly. I'm new to Silverlight and what I'm trying to accomplish is a web application that can be referenced in the browser using hyperlinks: myapp.com/MaintainUser?UserKey = 1 Therefore, I have already created a modular app with the prism and your regional manager. Request and passed the URL here. But the browser does not show what I am doing. URL always lives on myapp.com I do not even know what I am doing. And if it is, can you tell me in the right direction? Or at least the glossary .. I thought the navigation would take care of this. What you are looking for is called deep link and it Silverlight is supported by runtime since version 3. However, you should not confuse it with Prism Navigation, which is not integrated with the browser.

javascript - How can I prevent an external JS file from breaking my site? -

I am currently using the mixpell on my site. For some reasons they go down from time to time and disables my site loading. Is there any way that I can consider loading async or something else where it does not bring down my site downtime? Here is the code: & lt; Script & gt; Var mp_protocol = (("https:" == document.location.protocol)? "Https: //": "http: //"); Document.write (unescape ("% 3Cscript src = '" + mp_protocol + "api.mixpanel.com/site_media/js/api/mixpanel.js' type = 'text / javascript'% 3E% 3C / script% 3E") ); & Lt; / Script & gt; thanks Do not document. Write it on the page, add it. & lt; Script & gt; $ (Function () {var mp_protocol = (("https:" == document.location.protocol)? "Https: //": "http: //"); jQuery.getScript (unseaspeep (mp_protocol + "api. Mixpanel.com/site_media/js/api/mixpanel.js "));}); & Lt; / Script ...

ios - Does Apple scale down iPhone 4 resolution screenshots for iPhone 3 on your app page? -

When I'm presenting my iOS app, there's a place where I have the title of "iPhone and iPod Touch screenshots I can upload an under-screenshot "." If I upload the iPhone4 960x480 screenshot, then it will be excluded from the iPhone3's App Store listing because the iPhone3's 480x320 screen will Can not fit in the size of the? Or the apple downscale for me? The screenshot is scaled to fit on the screen, but the quality is not lost. This is basically the image@2x.png .

c# - DNS customization development on Windows? -

I want to implement my own policy for DNS on the Windows platform (Server 2008), in more detail, optimization I means that when the request is requested to view the IP for the host name, the DNS server comes in, my own optimization logic (inside DNS) will be called (for example, find a less work load machine) And return the IP address My purpose is to implement a load balancer using DNS optimization. Is there an API / SDK server 2008 that can implement my goal or is a way of scanning the DNS server and implementing DNS from host (if there is an open source lightweight DNS on Windows Which can be easily customized for my purpose, would it be good)? BTW: API / SDK / Open Source on C # or C / C ++ is OK for me either. Do not know how this will solve your problem properly, but you have checked it using Windows NLB? This probably supports custom load balance logic

java - More efficient way to find all combinations? -

Say that you have list 's strings or whatever , And you want to create another list which will include every possible combination of two strings from the original list (together Presented), is there any more efficient way to combine the string with all others to do this besides using the nested for loop? Some sample code: for (string s: bytes) {for (string a: bytes) {if (! (Bytes. Index (a) == Bytes .indexOf (s)) {if (s.concat (a) .length () == targetLength) {string combination = s.concat (a); ValidSolutions.add (combination); }}}} The time for performance is badly damaged because the size of the original list of strings increases. Is there a more efficient way to do this? You I! By setting J = j condition j = i + 1 . Also, bytes. Things like length () are evaluated on each iteration of both ends - save it to a value and reuse. Calling inside the loop a.length () often asks for the length of the same string - you can also save some runtime o...

JQuery ui widget inheritance -

I need to customize the jquery UI widget. I just wanted to change the "create" method I've written a new widget inherited from ui.automplete widget. It works fine but how do I add new events like select, click, change? Is not it possible to add an event to widget inheritance? $ Widget ("ui.my_autocomplete", $ .ui.autocomplete, {_create: function () {// This is my custom code}, select: function (event, UI) {// not working! Console .log ("test my_autocomplete:"); ui.item.option.selected = true; .....}, change: function (event, UI) {// not working! Console.log ("- test my_autocomplete change:"); .....}}); JQuery UI 1.8: $ Widget ("ui.autocomplete", {options} {minLength: 1, delay: 300}, _create: function () {...}, deleted: function () {...}, _setOption: function (key) { ...}, _initSource: function () {...}, search: function (value, event) {...}, _search: function (value) {...}, _response: function (content) {. ..}, close: func...

cocoa - NSView change type of property animation -

I have a NSButton , when I [button SetHidden: no]; However, I do not want the default fade animation, I prefer slides-to-left animation instead. I'm sure this is not complicated, but I'm struggling to find the right place in Docs. Any suggestions? You should change the frame via through an Animator proxy. NSRect aFrameMoreToTheLeft = â ?? | | [[Button Animator] Set Frame: Ephraimotor To Lift];

Android, ListActivity and subviews -

मेरे पास ListActivity है जो ListView को प्रदर्शित करता है। मैं अपनी मुख्य गतिविधि से गतिविधि शुरू कर रहा हूँ, और मैं सूची दृश्य के लिए मेरी मुख्य गतिविधि के दृश्य में एक सबव्यू के रूप में प्रकट करना चाहता हूं मैं यह कैसे करूँ? (अधिक सामान्य प्रश्न का उत्तर देने के लिए पर्याप्त है - आप एक गतिविधि को एक अन्य गतिविधि के सामग्री दृश्य में एक सबव्यू के साथ कैसे बांधाएं?) अपने ListView को एंड्रयूड में आईडी सेट करें: id = "@ android: id / list" के लिए Javadoc देखें: [Y] या onCreate () में setContentView () के साथ अपने खुद के दृश्य लेआउट सेट करके स्क्रीन लेआउट को अनुकूलित कर सकते हैं। ऐसा करने के लिए, अपने स्वयं के दृश्य में "Listand" ऑब्जेक्ट को "@android: id / list" (या सूची में कोड में है) के साथ होना चाहिए

implement the iOS round button in Android -

I'm trying to create an iOS round button in Android. As you can know, the Android button has a gray background While the iOS round button has a clear background, I should use the styles and themes to get it. However, I do not know how to piece things together. Can someone please give some advice? Thanks No need for style or theme. The trick with the buttons on Android is to use a different image for each state, and then combines them with a selector xml. You can put something like this in your doozleable directory and refer to it as an image: & lt; Selector xmlns: android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Item android: state_window_focused = "false" Android: state_enabled = "true" android: drawable = "@ drawable / btn_default_small_normal" /> & Lt; Item android: state_window_focused = "false" Android: state_enabled = "false" android: drawable = "@ drawable / ...

help converting algorithm to python code -

New in Python and I'm having trouble converting a script to another effective algorithm. Here is the Python Code: #! / Usr / bin / env dragon import itertools target_sum = 10 a = 1b = 2 c = 4 a_range = range (0, target_sum + 1, a) b_range = range (0, target_sum + 1, b) c_range = range (0 , Target_sum + 1, c) itertools.product (a_range, b_range, c_range) for i, j, if i + j + k == 10: print a, ':', i / a, ',', b , ':', J / B, ',', 'C', ':', K / C (This only makes 3 variables for example, but I end up having thousands I want to use it on the variable). Here is the result that I see (all combo results are 10): 1: 0, 2: 1, 4: 2 1: 0, 2: 3, 4: 1 1: 0, 2: 5, 4: 0 1: 2, 2: 0, 4: 2 1: 2, 2: 2, 4: 1 1: 2, 2: 4, 4: 0 1: 4, 2: 1, 4: 1 1: 4, 2: 3, 4: 0 1: 6, 2: 0, 4: 1 1: 6, 2: 2, 4: 0 1: 8, 2 A better algorithm was suggested in the question: 1, 4: 0 1: 10, 2: 0, 4: 0 But the hard times in implementing logic inside the python Used...

asp.net mvc - How i can use two optional object in c# when one of them is required? -

After I have found information on the page through the query string and I validate them through the data annotation feature. On the page I found PID or EID. In each of them, one of them is always one of them, how can I validate them in MVC. Can anyone tell me that I can do this in C # asp.net MVC via data annotation. Public String PID {Received; Set {eId = value; PID = value; }} Public string EID {get; Set; } If I understand you correctly, the situation is that you Allways Either a PID set or EID is needed - one of them can be empty / empty, but never both. And you want to do it with any type of data connection instead of any other kind of recognition. I do not know if it is possible what is there but I doubt it. But you can apply your own (as Phil shows in the great blog post): I want this because you want to validate your Id / PID in an Eid-class With the need to remove this work seems to be done for your annotated field. There is another way to apply -Inte...

c# - Traffic estimation of a website -

How can we get traffic estimates for a website ?? For example 200,000 to 1,000,000 visitors / month. I'm using asp.net, c # thanks You use the free service Google Analytics You can. Here's a link from Google Analytics Developer Docs: and link to Wikipedia article about this:

android - Unable to add contact in my device -

I have tried the following code to add new contacts in my contacts that is not working in my device. But it's working fine with the same code emulator. I am using the Samsung Galaxy Fit GT-5656. Code Style - 1 Content Value Value = New Content Value (); Values.put (people. NAME, "test contact"); Uri Uri = getContentResolver (). Enter (people. CONTENT_URI, value); Uri Phone URI = Faucet; Uri Email Yuri = Null; PhoneURI = Uri Expected Word (Yuri, Peoples. Phones. CONTENT_DIRECTORY); Values.clear (); Values.put (People. Phones, People. Phones. TYPE_MOBILE); Values.put (People.Phones.NUMBER, "0123456789"); GetContentResolver () Insert (phone Yuri, value); Email Yuri = Uri. Along with expected terms (Yuri, People's contact method. CONTENT_DIRECTORY); Values.clear (); Values.put (People contact. Method KIND, contact. KIND_EMAIL); Values.put (People.ContactMethods.DATA, "test@test.com"); Values.put (People contact method, people, people, contact ...

android - Changing the Emulator theme? -

I'm trying to change my emulator topic by default. You can change the skin. This will not change the theme though. You can see an article that explains how to set up skins.

ruby on rails - Why is web routing not always automated? -

What is the purpose of manual web routing? Why not all people automatically map between URLs and modules / method / functions names? I would argue that you can start with completely automatic mapping, and then you want to apache mod_rewrite or mod_redirect or whatever you can use, you want to refactor in any way that is current URL will be changed without breaking the URL. Due to using two main manual routing to do more than automatically. Manual routing allows you to use the rest as it is meant to be used. This means that the same URL can access up to 4 different tasks, which The used HTTP method differs from (Post, GAT, Put, Delayed). With automatic routing, you will highlight the method names of your underlying functions, therefore, you will have 4 different URLs. Manual routing also allows you to find more search engine friendly urls, usually using slugify method, but manual routing allows you to ignore this additional information. , And just focuses on the ID po...

security - Microsoft AntiXSS wpl using in asp.net mvc3 applicaton -

As far as I know asp.net mvc3 is quite secure, but anywhere Can I use Microsoft Antisocial Library to get more security? How can I find any where inside my application where I can use it? Maybe someone can find anything where this library is cold ASP.N.M. Can be used inside 3? OK, as the owner of AntiSSS, I say yes clearly. However, I am biased :) AntiSSSS gives you more encoding options - including encoding for CSS, Javascript and LDAP (you should ask AD from your code) A secure list instead of an unsafe list. It's naturally more secure but slow is the default .NET blacklist is quite good, depending on how it handles your system. Now, with AntXSS 4.1 you can easily plug the antxss into MVC and it can be used Default encoder This is just a beta, how to swap the code encoder Available for download with limited instructions about you should appear release before November.

asp.net - Httpcontext is null? -

Image
Is it right to say that when the HTTPXtext object is empty - then is IIS down? i Environment: The first request for AISP creates API manager. There is an application runtime in it. And With HTTOTX in the HTTP application with each, there are handler responses and requests. So when What do I mean if I get in asp.net HttpContext? I do not think you can run an IIS down ASP.NET application , Simply If you have a piece of code where HttpContext.Current is zero you are probably not running in the web server but in some way, in other ways, for example In S, we have a class library designed for the Web Library which is a Windows service, a console application or a unit The TT project refers directly to those assemblies and there is definitely no HTTP contact! Web services should also be served if IIS should be served, if directly called with assembly reference and there is no web context, then it can not reach any HTTPTTEX. Show your unsuccessful code and te...

Split three-digit integer to three-item list of each digit in Python -

I'm new to Python, what I have to do is, the three digit integer like 634 , And divides it, so this three-item list becomes, i.e. points = [6, 3, 4] Any help in this will be highly appreciated. You can convert the number to a string, then iterate over the string, and each character Convert back to an integer: & gt; & Gt; & Gt; [6, 3, 4] Or, as F. correctly indicates below, use: & gt; & Gt; & Gt; Map (int, str (634)) # Python 2 [6, 3, 4]> gt; & Gt; & Gt; List (map (int, str (634)) # Python 3 [6, 3, 4]

security - [algorithm/md5]: what is the detailed verification process in file sharing? -

I have read the wiki page of "cryptographic hash function" today. And I came to know that, MD5 has been implemented in the file verification. There is something that I can not understand, here it is. Suppose I want to download a file from a website (.exe, .iso, whatever) 1. Does the server first transfer the MD5 code of the file? If so, how do I store the MD5 code? Store the code in a file? 2. How do I start the validation process when it is downloaded? Do I automatically verify the verification or Downloader (this will be the Chrome Explorer download tool) Automatically Verify? 3. If I am downloading the file downloaded through some hackers on the internet, then the hacker will know what the file is? And how to prevent interception? Thank you. The purpose of the MD5 published on the download websites for the previous answers is to crackers (human-in-the- Middle Assault) has nothing to do with. This is to ensure that you have downloaded it correctly if some bits...

jquery - PHP mod_rewrite Anchors -

I have mod_rewrite work with all my URLs. But I have some anchor links, like reference #top at the top back I also have a jquery slider with a start stop button. This button uses href = "#" to trigger, but it does not start or stop the slider, instead it reloads the page and so the slider moves back to the 1st slide with the slider. Any thoughts? There is nothing with mod_rewrite. You need to stop the default functionality of a link. : Something in the lines of: $ ('a.slidertrigger'). Click (function (e) {E.preventDefault ();});

Embed Flash in Facebook status update -

Image
How do you create a Facebook status update that embeds Flash like this If you post http://www.adidas.com/campaigns/holidaycountdown/content/default.aspx?countryCode=us&dayID=18& ProductID = G17079 & amp; marketID = EU & amp; Cm_mmc = Facebook -_- Basic -_- Arrival -_- G-17079 On your wall, this also works See & Lt; Meta name = "video_width" content = "460" /> & Lt; Meta name = "video_height" content = "460" /> & Lt; Meta name = "video_type" content = "app / x-shock-v-flash" /> & Lt; Link rel = "image_src" href = "http://www.adidas.com/campaigns/holidaycountdown/content/assets/images/fb_wall_thumbs/130x130_day18.jpg?fbrefresh=2" /> & Lt; Link rel = "video_src" href = "http://www.adidas.com/campaigns/holidaycountdown/content/assets/swf/main.swf?domain=http://www.adidas.com/&configXMLURL = http : //www.adidas.com/campaigns/...

c# - Is it safe to share local variable between threads (via a callback closure)? -

I want to do something like the following - basically I'm calling an async operation that calls callback in another thread And I want to wait to complete the "inline". My concern is that the variables that are shared in the thread (bar and event) can not be synchronized due to being stored in the registers, for example if they Members were variables then I Could have marked the stability, but created on the stack can not be used volatility on local variables. I can use member variables, but I think my classroom is not messy by keeping its cleaner all this local. repeatedly = null; Manual Reset Event Event = New Manual Retset (Incorrect); Foo.AsyncOperation (New Action ((=) = & gt; {// This representative will be called in another thread bar = ... event.Set ();}); event.WaitOne (timeout); // Usage Bar Yes, this will work correctly read here The following implied complete fences generate: waiting for the signal to be created and in the signaling ...

check if a pointer has some string c++ -

I'm not good with c ++ and I can not find it anywhere, please apologize to me if this is a The bad question is, I have an indicator and I want to know that some name stores in this indicator starts with some special string. Something like a dragon (maybe this is a bad example): If 'pointer_name' has 'pre': I have it: double t = 0; (Size_t i = 0; i Pre-code in the string_name of python> Is: string_name.find ("pre")! = Std :: string :: npos // If string is std :: strstr (pointer_name, "pre") // if Python string_name.startswith ('pre') * ("starts with some specific string"): string_name.size ()> gt; = 3 & amp; Amp; Std :: equal (string_name.begin (), string_name.begin () + 3, "pre"); // If string is // less / less efficient using string_name.find ("pre"), but less standard :: strncmp (pointer_name, "pre", 3) == 0 // if char * In those two cases, in practice, ...

Many to many relationships in JSON -

Consider this scenario: You want to send some data to the customer in JSON format, and You do not want to go back to the server, there are 15 teachers with 100 teachers in the data. There are many relations between these institutions (each student learns many teachers and every teacher teaches many students) In the customer, the user is presented with a list of students. On the click of any student, the list of their teachers will be given to the user, and on the click of a teacher, the list of all the students of that teacher will be presented. As a result, the result of infinite click-through style navigation from students to teachers and vice-workers is the result of navigation. Now, as you know, JSON represents one-to-many relationships in this form only: ["T1", "T2"], "S2": ["T2", "T4"], "S3": ["T1", "T3", "T4"], ...} Do you have any ideas about doing this? As there is no ...

osx - macos standalone python -

Well I'm pretty sure this is a stupid question but everything else has failed (py2app and cx_freeze) . So my question is basically: On macode, you can choose "to select" some necessary files, from the Python framework, then you can use "your" python elsewhere? So now there is a type of "export dragon", so that you are like a collection, and then on another PC to do just one unzip and run that version of the dragon, a complete path Type (e.g., ~ / documentation / PythonArchive / Python )? Regarding, Bogdan Yes you can check out. You give it a path to your python script and it analyzes all your package imports, to remove any binary files and keep them in a collection, then you can only add OS X to another Can open it on OS X and run it. I have used it for quite a complex Python program, and it worked for me.

asp.net mvc - Telerik MVC Window jquery validator issue -

I try to validate my form, which is loaded in windows with Ajax. But, do not work: $ Validate. Anubtrusive. Pars ("#moform"); The problem is solved, if 1) I include the jquery.validate.unobtrusive.min.js files in partial view, where the form is 2) Or I include the JS file in DefaultGroup (but this is the old solution Q2 Q2) My question is how does this solve my problem better today thanks. Best relationship. No method is valid, because they are essentially doing the same thing, but it To make sure that you have the same JavaScript functionality in all the visuals, it may be easier to simply include the script in ScriptRegistrar manually. For more information on this, you can mention it.

Exit an Android app -

I have an Android app where I check user credentials in the first screen from the remote server. I have 10 seconds of timeout after the timeout app sends the user to the error page. There I have an exit button I android Os.Process.killProcess (android.os.Process.myPid ()) has tried to erase all logic to exit the app; In the click of the Exit Button I can not extract from the application. Please help me find a way out of the app. Why users just want to exit the app, because the user entered the wrong identity card or correct Not Credential? If I were you, seeing error / activity / "page" which will provide a creative solution to the problem there is no use in the user simply by saying "error" and the exit from the app. For your query, Google discourages the implementation of the removal button. Android will "get out" of your app when it looks fit and when it comes to the developer to implement the right behavior Depends.

Setting window width in Xcode -

Maybe a very clear question: I want to set the width of the code editor to be exactly 80 characters in Xcode 4. Where do I go to do this? Alternatively, if I can make a vertical line that points to 80 characters, then it will be okay. Thanks In Xcode 4: Xcode Menu - & gt; Preferences - & gt; Text editing tab - & gt; Check out the page guide on the column.

c# - Data binding question -

I have a database with 3 tables using a table to add two other tables (many-to-many relations) Is done for. I know how to use binding to seal some C # control on the table, but now I do not know how to tie the "middle" table into some control and show the data from both tables. Therefore, if the table A line from 1 relates to table 3 to 4, so is there a way to show that under some control using simple binding? itemprop = "text"> This is an excellent time to use a 'visual model' basically a visual model There is a 'middle layer' class that has some idea of ​​the 'flow' of your application. This visual model will expose three observational compilations and you will tell about these three collections. To associate the three collections in the underlying database tables, there must be logic inside your visual model class.

How to restrict a user to access objects of only one schema in SQL Server 2008? -

I want to restrict a user to only one schema and only select the privilege in that schema in SQL Server 2008 Want to Dennis and a combination of a grant, for example: Select Denny on Schema: [dbo] to [user_name] Select right on the schema: [other_schema] to [user_name] Select on schema: [safe_schema] to [User_name]

php - Creating canonical URLs with custom route-classes -

I am trying to implement the canonical url and to combine with custom route classes. URL-SACAME is something like this: / category-x / article / 123 / category-y / article / 123 I am creating a custom route - the expansion of the class Zend_Controller_Router_Route_Regex and checks that the article is 123 and the correct category-name is included in the URL. If the article is in 123 square-X and the user is reaching square-y, then I want to redirect to the correct URL. But there is no clear possibility to do this directly to the roads. What is the best practice approach here? I often do this in my action controller like something ... // Get / Category-Y / Article / 123 $ $ article- & gt; URL is generated, and it contains / category-x / article / 123 if (this-> --request-> getRequestUri ()! = $ Article-> URL) {return $ this- & gt; ; _helper-> Redirector-> GoToUrl ($ paragraph-> url); } In this example, $ article-> The url will need ...

c# - Using DataGridViewComboBoxColumn for distinct options -

I am modifying the Winforms application in .NET 3.5. I have a Datagrid view combobox column that is populated with some of the hard code options shown below. // // dgvCol_PropName // this.dgvCol_PropName.DisplayStyle = System.Windows.Forms. DataGridViewComboBoxDisplayStyle.ComboBox; This.dgvCol_PropName.HeaderText = "Property Name"; This.dgvCol_PropName.Items.AddRange (new object [] {"Option1", "Option2", "Option3"}); This.dgvCol_PropName.Name = "dgvCol_PropName"; This.dgvCol_PropName.Width = 150; I want to separate the selection of these options do so once there is a place in the grid, it can not be selected again (the user must edit the current line or removed pay should a quick way to do this? I thought I'd share my final solution because it helps anyone else. My Selvalititing event handler is down : /// & lt; summary & gt; /// bike handle verification event on the cell so only to those specific propert...

objective c - Pressing UIButton results in Unrecognized Selector error -

I have a button in my UIView that is created like this: UIBarButtonItem * editButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemEdit Goal: auto operation: @selector (toggleEdit)]; Self.navigationItem.rightBarButtonItem = editButton; [Edit Button Release]; And this is the action method: - (zero) toggleEdit: (id) this {} But I get this error 2011-09-02 15: 27: 13.362 blubb [15006: 207] - [DatabaseSelectionViewController toggleEdit]: Unfolded selector sent for example 0x5a29d80 2011-09 -02 15: 27: 13.365 blubb [15006: 207] * Unexpected exception 'NSInvalidArgumentException', the application ended due to reason: '- [DatabaseSelectionViewController toggleEdit]: Unrecognized selector example 0x5a29d80 Sent to ' Why is this happening? change @selector (toggleEdit) to @selector (toggleEdit :)

c - Get byte - how is this wrong? -

I get a named byte from 32 bit integer I am getting the wrong value but I do not know why. There are restrictions of this problem: The signed bits should be used, and I can not use multiplication. I especially need to know that the function What is wrong with Here is the function: int retrieveByteFromWord (int word, int byte) {return (word & gt; & gt; (byte & lt; ex: (3) (2) (1) (0) ------ Byte number in word: 10010011 11001100 00110011 10101000 I want To return byte 2 (11001100), get Gettended word (word, 2) ---- returns: 11001100 But in some cases it is wrong and it will tell me That's not the case. Any thoughts? Here's the problem: You have started working for a company that is implementing a set of procedures to work on the data structure where 4 signed bytes are packed in a 32 bit unsigned. Within the words, byte 0 (LSB) to 3 (MSB) are counted. You have been assigned the task of implementing a function for a machine using complement...

javascript - PreSaveAction is not firing -

Any idea why preSaveAction is redirected only should it add a record and then the user should take to the thank-you page of the survey . & lt; Script src = "http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.6.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {// old handler: var oldHandler = function () {if (PreSaveItem ()) return false; WebForm_DoPostBackWithOptions (New WebForm_PostBackOptions ( "ctl00_m_g_4bde870c_7fcd_4f61_b446_e287f846faf3_ctl00_toolBarTbltop_RightRptControls_ctl01_ctl00_diidIOSaveItem", "", "right", " ", false, true));}; // old moved to add a new handler: var newHandler = function () {if (PreSaveItem ()) return false; WebForm_DoPostBackWithOptions (new WebForm_PostBackOptions (!" ctl00_m_g_4bde870c_7fcd_4f61_b446_e287f846faf3_ctl00_toolBarTbltop_RightRptControls_ctl01_ctl00_diidIOSaveItem "," "...

android - Only top corners rounded in -

I am trying to be straight at the top corner of a shape and straight down, but I have a problem my size is saving Error! Unsupported Operation Exception: Zero I have Android: Android: radius = "10dp" Android: bottomRightRadius = "0dp" Android: bottomLeftRadius = "0dp" Android: topRightRadius = "10dp" Android: topLeftRadius = "10dp" /> I have tried to put 1 DP in the lower corners and take Android: Radius = "10 DP", but still gives me an error. Android 2.2 with Eclipse Can anyone help me? The tool in Eclipse is not perfect, put it on a real device and you should see that it is OK is.

iphone - Parsing large quantities of JSON data in iOS -

I am getting a large JSON string (11 MB) from the web service when I parse the data using JSONKit , Then my app reaches 70MB, I get memory warnings, and the app crashes. How can I parse this data? The easiest way is to reduce the size of the JSON size received from the server if you can not do it , The only way to parse large JSON is using lazy evaluation. I think there is a JSON lib for Objective-C which supports lazy evaluation though you can apply one.

sql server 2008 - Generate unique 9 digits values -

I have a table as shown below: group ---- --- -------------------- ID Number Name Age ----------------------- --- 424000000 Damine 22 2 324000000 Arshley 18 3 276000000 Tita 20 4 424000000 Helen 21 5 424000000 Mary 19 6 324000000 Cathay 20 7 324000000 Mark 188 276000000 Phil 22 I The call is unique Therefore, I need to create 9-digit numerical random values ​​for duplicates. Please help, thank you You set the num column as an identity field Set the number field to 100000000 or just one identification like a seed and print its value with the overloaded toasting method Update: Through this management studio (adding an identity column) Skip and the table will be re-prepared on a large table is not recommended

jquery - Set AJAX dataType using Vanilla javascript? -

मैं इस तरह से कुछ AJAX का उपयोग कर रहा हूं: xmlhttp = new XMLHttpRequest (); xmlhttp.open ( "GET", "http://example.com", झूठी); xmlhttp.send (); डेटा = xmlhttp.responseXML; XMLhttp.responseXML XML में वापस आ गया है, इसलिए यह एक जावास्क्रिप्ट ऑब्जेक्ट है। हालांकि, मैं इसे कच्चे स्ट्रिंग प्रारूप में पसंद करूंगा। JQuery के $। Ajax () डेटा प्रकार: "टेक्स्ट" Itemprop = "text"> responseText का उपयोग करें responseXML xmlhttp = new XMLHttpRequest () के बजाय करें; xmlhttp.open ( "GET", "http://example.com", झूठी); xmlhttp.send (); डेटा = xmlhttp.responseText;

php - Pass methods to the class from other class -

मान लें कि हमारे पास index.php है वर्ग Foo_class FOOBAR का विस्तार करता है {function __construct () {'Some_other_class.php' की आवश्यकता होती है; नया Some_other_class; $ इस- & gt; say_hello (); }} और some_other_class.php वर्ग some_other_class {function say_hello () {गूंज "वाह, यह काम करता है!"; }} मुझे यह चाहिए कि Foo_class वर्ग में some_other_class वर्ग को शामिल करके और कॉल करके, some_other_class वर्ग Foo_class इसके सभी तरीकों को दे देंगे क्या ऐसा करना और विस्तार नहीं करना संभव है? बेशक, मेरा कोड काम नहीं करेगा। PHP 5.4 की एक अवधारणा के साथ आता है, फिर से पूछ रहा है।

How to log outgoing http requests from PHP + cURL? -

I have a PHP script installed that cURL requests when performing any action on a site. The problem is that whenever the action moves, the information is being posted twice. I need to know that it is a problem on my end (the CRL is being played twice) or to post to the URL I feel like doing this The best way to see outgoing HTTP POST requests from the server. Is this the best option? If so, how do I go about it? Surely sensible you use the error_log function before calling curl , And ini_set ('error-log', 'filename'); Set the head of your file with ini_set ('log_errors') true); . Then, you run the page a few times and check the file, which will tell you how often the CRL request was made. The cURL is extremely reliable either your code is doing something wrong, and calling the curl twice or the service you are posting is stupid (I always doubt myself first , So log all errors and subscribe to the file's feed for live sites.)

django - SQLAlchemy EXISTS queryset -

I only use the Django Framework with my ORM And there is some code: User.objects.filter (user name = 'test'). Is present () This is true or false. This orm query generated SQL: "auth_user" WHERE "auth_user" as "SELECT (1)" "User Name" = E'test 'LIMIT 1 Please help. Thank you! I try to understand this page. / P> (ret,), = session.key (exists). Where (user.username == 'test'))

hibernate - NHibernate: Lazy loading of IUserType -

Say we have a system that stores details of customers, and a system that stores employees' details (fictitious status!) Employee employees use an employee, Client Information Client system applies to IUserType using WCF: NHibernate mapping: & lt; Hibernate-mapping xmlns = "kalash: nibinet-mapping2.2" assembly = "employee system" namespace = "staffsystem.intext" & gt; & Lt; Class name = "employee" table = "employee`" & gt; & Lt; Id name = "id" column = "` id` "type =" tall "& gt; & Lt; Generator class = "parent" /> & Lt; / Id & gt; & Lt; Property Name = "Name" /> & Lt; Property name = "client" column = "` client id` "lazy =" true "type =" employee system user type. Client type type, employee system "/ & gt; & Lt; / Square & gt; & Lt; / Hibernate-mapping & gt; IUserType...

sql - Count on DISTINCT of several fields work only on MySQL? -

I need a question to work on these three different database servers without any changes: MySQL, MSSQL , = Integer field_data = data-time Expression is inside a basic query, so if I try to get results with a sub-query approach, Stumble into: SELECT t0.description, from t0.depnum (count count (*) (select separate FII), F2, F3, from SETestable T1, where t1. Depnum = t0.depnum) A) SemesterTable T I get an error with this question, how can I get this parent query A common way to do this on any platform is: (*) from (select F1, F2, F3 from table) Edit for new information: What if you try to join a separate list (including the department) and then count? I have created some test data and it seems to work, make sure that COUNT is in one of the T1 columns - otherwise it will return by mistake instead of 1 to 1 when a corresponding entry in T1 Will not be SELECT t0 Description, t0.depnum, count (t1.depnum) join the semestible t0 left as 'numitems' (choo...

Cykod FlashWavRecorder PHP save - upload to server problem -

I believe that I am most definitely configured for the recorder because I can get Flash permission 1 - Start recording 3 - Listen to playback, but when I go to save the file So I can not get it in the upload directory nor on the temp dir. I know php is working because i have successfully tested a post-upload form here html and php: & lt ;! DOCTYPE html & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml: lang = "en" & gt; & Lt; Top & gt; & Lt; Title & gt; My Recorder & lt; / Title & gt; & Lt; Script src = 'http: //ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js'> & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "js / swfobject.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "js / recorder.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text...

Hadoop Code - Git and SVN -

All Apache Hadoop codes are hosted in SVN How does Git help in the hopop development process? This is not clear from the article below. Apache is the SVN repository for official location Hadop; GIT is also supported, and is useful if you want to make a lot of local changes - and keep those changes in some way or under private or public amendment control. The updated official location is now Apache GIT repository. A lot of people use the guit with the hood, because they have their patches for their head, and Git helps them manage it. Apache only works in read-only guit versions of its source. People can not make changes with Git; These lines make it very clear.

php mysql greater than issue -

I have two tables: users, pictures . Users have the column paid how many images they pay to enter this contest, this is a number .. In the images, a column has been entered There is no value of 0, and 1 for entry. I need the amount of money for each user. I am trying to inquire from all the users who paid more images than the entries. But it does not work properly .. What does print: bob@example.com 8 2 jcannon@example.com 3 3 jrcih@example.com 7 3 aerwqeerll @ Example.com 5 1 ray @ example.com 2 3 You can see that the jaccon @ and ray should not be in the list, because the paid entry is no more than Code here: $ SQL = mysql_query ("SELECT *, SUM (images.entered) users, images WHERE users.id = images.owner and users.paid & SUM (images.entered) 'Group by users.id'); while ($ sendto = mysql_fetch_array ($ SQL)) {print $ sendto ['email']. "". $ Sendto ['Payment'] "". $ Sendto ['SUM (images.entered)'] "...

swing - Issues Creating a Pen Tool with Java's Path2D -

"itemprop =" text "> I try to create a pen tool for my Java drawing program using the Path2D class in conjunction with mouse listeners Is doing, but I have done to provoke results. The tool will work for several seconds, but then the whole application will be freeze and close. (There is no exception here, the program still freezes). Here is an SSCE that reflects this issue: import java.awt.BasicStroke; Import java.awt.event.MouseAdapter; Import java.awt.color; Import java.awt.Dimension; Import java.awt.Graphics; Import java.awt.Graphics2D; Import java.awt.Point; Import java.awt.shape; Import java.awt.event.MouseEvent; Import java.awt.geom.Path2D; Import javax.swing.JFrame; Import javax.swing.JPanel; Public Class PendomapNalJPNL (Private Point Start; Private Point Stop; Private Size Size; Public Pendemo Panel) {setBackground (Color.white); SetPreferredSize (New Dimension (600, 600)) Path Listener Listener = New Path Listener () ; AddMouseListener;;;;;;;; Public ...

.net - How to fix length of characters in DataGrid cells -

I have a datagrid with columns, like IDs with values ​​of 1,2,3,4,5 .... 10, 11,12,13 ... I want all the values ​​to be two lengths, that means I want value 01,02,03 .... 10,11,12 ... how it is Do you? Edit I am using Winforms. Edit if (dg.Column [column.index] .name == "id") {try {// E.Value = String.Format ("{0: 00.0}", E. Vel); DataGrade View Seleastyl ca = New DataGrid Scene Style (); Ca.Forecolor = System.Drawing.Color.Red; Ca.format = "d2"; Dg.Column [e.ColumnIndex] .DefaultCellStyle = ca; E.formattingApplied = true; } Hold (Format Exception) {E. Formatting = wrong; }} Here I am able to replace Icolcolor and forecolor, but the text format is the same, what should I do. I tried to use the string.format (commented line) but it is not working but I also tried your code, it is not working is not known what is wrong. (DataGridView) For a DataGridView, Format setting like DefaultCellStyle : this.dataGridView1.Column ["CO...

multithreading - Java j2me get result from running Thread -

hedgehog, I know how to pass parameters in a runnab. But when my thread is running, then how to remove the result of this process? Classes to run some tools {int p; Int endresult = 0; Public Some (Int Ultimate) {p = Ultimate; } Public Zero Run () {// Some endresult + = p; // How to know the method that will execute this method now that the result is 2; }} = Something new (1); Thread t = new thread (s); T.start (); When the T is finished I want to get the 'endracebate' variable; You have to wait to finish your thread and then you can get the field value : t.join (); Y = s.endresult;

Java JDBC savePoint -

reading It has not been well written, Points are mapped to thanks -text" itemproc = "Text"> A savingspoint marks a point that can roll back the current transaction. Instead of rolling all its changes back, it can only choose to roll back some of them, for example, suppose: Start a transaction, Insert 10 rows in a table, Set a saving point, insert the other 5 rows, Save the point Rollback, Transaction. After doing this, the first 10 rows you entered in the table may have been removed by the rollback to the other 5 rows. Setting a saving point does not save any data to the database. This database change does not appear for any other transaction. A savingspoint is a marker that can roll back the current transaction.