Posts

Showing posts from September, 2012

TextView- difference between setHeight and setTextSize: Android -

setHeight और setTextSize के बीच क्या अंतर है? मैं मान रहा हूँ कि आप एक TextView के बारे में बात कर रहे हैं। setHeight () दृश्य की ऊँचाई सेट करता है, और setTextSize () निर्धारित करता है कि पाठ दृश्य में कितना बड़ा होगा। इस प्रकार, एक दृश्य सिर्फ अपने पाठ की तुलना में अधिक स्थान ले सकता है, जो रिलेटिव लेआउट जैसे लेआउट का उपयोग करते समय प्ले में आता है।

c# - how to make a folder undeletable? -

How do I create a folder undeletable? Alternatively, I close the Windows user to remove it. Regards. You use the method. There is an example on that link, but here it is only in the case: Public Static Zero AddDirectorySecurity (string filename, string account, file system rights rights, AccessControlType ControlType) {// A new directoryInfo Object Create DirectoryInfo dInfo = New Directory Info (FileName); // Get a directory security object that represents the current security settings. DirectorySecurity dSecurity = dInfo.GetAccessControl (); // Add FileSystemAccessRule to Security Settings DSecurity.AddAccessRule (New FileSystemAccessRule (Account, Rights, ControlType)); // Set new access settings dInfo.SetAccessControl (dSecurity); }

.net 3.5 - multiple inheritance can't Support in C#. why? -

संभव डुप्लिकेट: सी # एकल उत्तराधिकार का समर्थन कर सकते हैं यह केवल इंटरफ़ेस का उपयोग करता है लेकिन क्यों यह एकाधिक विरासत का समर्थन नहीं कर सकता ..... गूगल के माध्यम से जा रहा है, पाया P>

java - Abstract class can't be instantiated but can have constructor - little confusing, please explain -

संभावित डुप्लिकेट: हम जानते हैं कि अमूर्त वर्ग को तत्काल नहीं किया जा सकता है लेकिन दूसरी तरफ यह कन्स्ट्रक्टर हो सकता है कृपया बताएं कि अमूर्त वर्ग के पास कन्स्ट्रक्टर क्यों हो सकता है? कंपाइलर इस स्थिति को कैसे संभालता है? एक अमूर्त वर्ग के कन्स्ट्रक्टर का इस्तेमाल अमूर्त वर्ग के डेटा को आरंभ करने के लिए किया जाता है सदस्य हैं। यह सीधे कभी लागू नहीं किया जाता है, और संकलक इसे अनुमति नहीं देगा। उदाहरण के लिए, एक पशु अमूर्त वर्ग पर विचार करें: वर्ग पशु {निजी इंट जीवन पूर्वानुमान}; निजी स्ट्रिंग का नाम; निजी बूलीयन घरेलू; सार्वजनिक पशु (स्ट्रिंग का नाम, इंट लाइफ एक्सपेक्टेंसी, बूलीयन घरेलू) {this.lifeExpectency = life पूर्वानुमान; This.name = name; This.domestic = घरेलू; } सार्वजनिक int getLifeExpectency () {वापसी जीवन पूर्वानुमान; } सार्वजनिक स्ट्रिंग getName () {वापसी का नाम; } सार्वजनिक बूलियन है घरेलू () {वापस घरेलू; }} यह वर्ग सभी बुनियादी पशु गुणों को संभालने का ख्याल रखता है। यह कंस्ट्रक्टर उप-क्लासेस द्वारा उपयोग किया जाएगा, उदा। : वर्ग बिल्ली का विस्त...

vb.net - LINQ .Startswith or .Contains problems in VB.NET4 -

This can be a newbie question ... In my code I can easily "Ob. See "Fade = String", but "Obj. Fails." ("A") does not work by using the following two functions: Public Function EntriesByFileName (Database ByRef () entry , As byval file name _ string as the name) IEnumerable (login) retarded results as IEnumerable (as entered) = from EntryObject in database- _ (EntryObject.FileName = File Name) Select EntryObject Return Results Expiration Function Public Function EntriesLikeFileName (Database () entry, ByRal _ as the name of the file as the name string) IEnumerable (login) as file name = Filename.ToLower Blind Result as the IEnumerable (Entry) = EntryObject in the database _ Where EntryObject.FileName.StartsWith ("A") Select EntryObject Return Result Ending Function The first function (ByFileName) works fine. Second function (eg Filename does not use the "Startswith" object that I receive is not set for an instance of an ...

Can't test the javascript regex correctly -

Hello, I have the following Reagax which can not be accepted on JavaScript If ($ (Collar) .attr ('value'). ToString (). Search ('/ (? = \ D * \ d \ D * \ d). {8,15} / g') == -1) Where $ (collar) .attr ('value'). ToString () = "fdsddfsd45" I have it -1 Also I try to test it with pattern if (pattern.test (! $ (Collar) .attr ('value'))) { Where pattern = / ^ (? = D * dD * d) {8,15} $ / me false $ (collar) .attr ('value') .tstring () = "fdsddfsd45" When I tried to test it through the desktop application, Which corresponds to this type of string "fdsddfsd45" expression (? = \ D * \ d \ D * \ D). {8,15} Do not I know this JavaScript bug? Regex in Javascript should either be a string or a regex literally in your case, should do this: .search (/ (? = \ D * \ d \ D * \ d). {8,15} /) == -1 Note that I have removed single quotes. I have also removed the / g flag - since you are...

c - Pthread lost signals / slow conditions? -

I am writing a simple thread for some small jobs (100 to 700 micronsense). I am working with only two threads (because there are only two jobs and there are only two cores in the processor). My problem is that most of the time both jobs are executed by the same thread. There is no problem with large jobs (some milliseconds) Expected behaviors (in this case, speeds are expected as follows: Thread 1 after cod_wait Job executed by: 1 Threads 0 Worked by Job: 0 Thread 1 before cod_wit / Li> The formula after the quote_white before the thread 0 cond_wait Thread 1 before cod_wight Or worse (Hint to lose another thread?): Thread out after cod_white Job executed by: 0 for pthread_mutex_lock (& ​​amp; pl-> mutex); (;;); / / Wait on the notification that a new job is available / / (Pl- & quot; Queue_head == faucet) {// printf ("Thread% d before condom \ n", thread ID); Pthread_cond_wait (& amp; Pl- & gt...

android - Alternate SMS Sender -

Is there a way to hook a plugin into the default SMS messaging app so that he invites our code to send the SMS . Can our app become an alternative SMS sender for sending default messaging operations? Yes, this is There is no difference between the built-in SMS-app and the preference with your app. However, the user must choose which SMS app is the default app. Feel free to correct me :)

doctrine2 - How to install Doctrine 2 on Windows 7? -

What is the best way to install Doctor 2 on Windows 7? I'm running WampServer 2.0. Thanks Step 1: Download Step 2: Configuration Once you download the principle, no installation is necessary - just make sure that the principle is clearly or in your path Is included and you can start using it. In order to use the principle in your app, you need to run certain commands when your app starts to load and configure the notification documentation of the theory about the steps and options for starting a theory in your app. Tells.

postgresql - Report Writer for Linux (XML, PGSQL, PHP, LINUX) -

I am a developer on an open source ERP project, it is web based and as you expect we have a requirement Print different reports We currently use EZPDF but this means that the ridiculous high memory limit / execution time is set, and it is still limiting us how many reports can print us. We liked it, making it an involuntary alternative to an inappropriate option, it can be said for the same. Our ERP application uses PHP and PostGreySQL running on Ubuntu server (10.04 LTS running). Does a report recommend the author, which I ran on the described platform, which takes an XML report definition and connects to a PGSQL database. I used and used PHP with

.net - Why Hashtable is not PascalCase? -

I try to follow the general rules in coding styles. But when I look at the .NET, I think some classes do not match the Pascal Casing rules. One of them is hashtable and the second I remember is stopwatch . I think there is more that I do not remember. Is there any reason to leave the Pascal Casing rule for those classes? Because they are both dictionary words. You probably need a technical dictionary for the hashtable, but this is a valid word. Pascal Casing is for cases where you combine different words in the name of your class (* and such), it is not related to the linguistic origin of the word.

c - how to calculate total no of iteration of innermost loop of nested for loop? is there any formula? -

उदाहरण के लिए int count = 0 (int i = 0; i & lt; 12 ; I ++) के लिए (int j = i + 1; j & lt; 10; j ++) के लिए (int k = j + 1; k & lt; 8; k ++) गिनती ++; System.out.println ("count =" + count); (Int j = i + 1; j & lt; j; j ++) के लिए या (int i = 0; i & lt; i; i ++) के लिए के लिए (int k = j + 1; k & lt; K; k ++)::: के लिए (int z = y + 1; z, & lt; z; z; ++,) गिनती ++; सभी पुनरावर्तन के बाद गिनती का मूल्य क्या है? क्या यह गणना करने के लिए कोई सूत्र है? यह समीकरण का एक गणित समस्या है असल में, कोई यह साबित कर सकता है कि के लिए (i = a; i & lt; b; i ++) गिनती + = 1 के बराबर है इसी तरह, के लिए (i = एक; i & lt; b; i ++) गिनती + = i count + = ba के बराबर है गिनती + = 0.5 * (बी * (बी + 1) - एक * (ए + 1)) उदाहरण के लिए आप वोलफ्रामल्फा (वुल्फ्रम के गणितिका) के प्रयोग से समान सूत्र प्राप्त कर सकते हैं यह प्रणाली आपके लिए प्रतीकात्मक गणना करेगा, उदाहरण के लिए, के लिए (int के लिए (int k = j + 1; k & lt; c...

c# - Why returning false ? new Person("james") == new Person("james")? -

मुझे ओवरराइड GetHashCode और equals और दोनों तरीकों को एक ही परिणाम प्रदान करते हैं अलग-अलग ऑब्जेक्ट्स के लिए लेकिन झूठे क्यों हो रहे हैं? क्लास प्रोग्राम {स्टैटिक व्हाईड मेन (स्ट्रिंग [] एजीआर) {कंसोल। विरसलाइन (नया व्यक्ति ("जेम्स") == नया व्यक्ति ("जेम्स ")); Console.ReadKey (); }} वर्ग व्यक्ति {निजी स्ट्रिंग नाम; सार्वजनिक व्यक्ति (स्ट्रिंग का नाम) {name = name; } सार्वजनिक ओवरराइड इंट होशकोड () {वापसी 1; } सार्वजनिक ओवरराइड बूल बराबर (वस्तु obj) {वापसी सच; }} क्योंकि संदर्भ के लिए == ऑपरेटर चूक समानता। यह आपके समानता विधि को कॉल नहीं करता है। यदि आप चाहें तो == ऑपरेटर को ओवरराइड कर सकते हैं। देखें: सी # में, दो समान प्रकार के समानताएं हैं: संदर्भ समानता (पहचान के रूप में भी जाना जाता है) और मूल्य समानता मूल्य समानता समानता का सामान्य अर्थ समझा जाता है: इसका मतलब है कि दो वस्तुओं में समान मूल्य होते हैं। उदाहरण के लिए, 2 के मान के साथ दो पूर्णांक में मूल्य समानता है संदर्भ समानता का अर्थ है कि तुलना करने के लिए दो वस्तुएं नहीं हैं। इसक...

html - Why tool tip is not displaying for page title in 'chrome'? -

मेरे पास html पृष्ठ है & lt;! DOCTYPE html public "- // W3C // डीटीटी एक्सएचटीएमएल 1.0 ट्रांसक्रिप्शन // एन "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; शीर्ष & gt; & Lt; meta http-equiv = "सामग्री-प्रकार" सामग्री = "पाठ / html; वर्णसेट = आईएसओ -8859-1" / & gt; & Lt; शीर्षक & gt; पृष्ठ शीर्षक & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; / body & gt; & Lt; / html & gt; लेकिन शीर्षक के लिए टूल टिप क्रोम में नहीं आ रहा है लेकिन यह मोज़िला में आता है। यदि हम पृष्ठ की लंबाई बढ़ाते हैं शीर्षक तो क्रोम में टूल टिप डिस्प्ले (जैसे: - & lt; title & gt; पेज शीर्षक शीर्षक 1 शीर्षक 2 शीर्षक 3 शीर्षक 4 शीर्षक 5 & lt; / title & gt; ) क्या कोई इसके लिए कारण कह सकता है? कोई भी ब्राउज़र मैं & lt; title & gt; & lt; / शीर्षक & gt; ...

resharper - What C# language features help you to reduce lines of code and improve readability? -

I came around the convenience of a C # language courtesy of ReSharper, today? Operator This helped to make the code even more condensed by my initial effort. See below to improve the line / length / readability of the code. The first attempt can be something like this .. if (usersEmail == null) userName = firstName; Else userName = usersEmail; refacted .. userName = usersEmail == tap? First name: usersEmail; In the beginning I thought that the most effective / concise version would be above, but one third step is ... userName = usersEmail ?? First name; ID wants to know if you have any examples where the features of the C # language help reduce the lines of code and improve readability? There are a lot of gems in this thread: (which you have mentioned)

c# - Silverlight page level activity detection -

मेरे पास एक सिल्वरलाइट 3 एप्लिकेशन है, जब पृष्ठ पर कोई गतिविधि होती है तो प्रगति प्रदर्शित करने की आवश्यकता होती है । मेरे पास पृष्ठ पर विभिन्न बटन हैं, कुछ ड्रॉप डाउन सूचियों और अन्य यूआई तत्व हैं, जिनमें से अधिकांश एक अनुरोध करने में सक्षम हैं। // संपादित और जैसे उनमें से प्रत्येक के लिए व्यस्त इंडिकेटर नियंत्रण दर्ज करना है जो मैं बचने का प्रयास कर रहा हूं। व्यस्त इंडिकेटर नियंत्रण पृष्ठ से किसी भी एसिंक कॉल के आधार पर स्वचालित रूप से काम करना चाहिए। मैं कोड-पीछे के अंदर IsBusy संपत्ति को बदलने के बिना पेज इंडेक्स के रूप में व्यस्त इंडिकेटर नियंत्रण को बाध्य करने की कोशिश कर रहा हूं। कोड-पीछे में IsBusy संपत्ति को सेट करना यह है कि मैं क्या करने से बचने की कोशिश कर रहा हूं। बस यह बताएं कि जब भी कोई पृष्ठ से अनुरोध किया जाता है, तो इसे किसी भी नियंत्रण से रखें, बसइंडिकेटर को उपयोगकर्ता को सूचित करना चाहिए क्या एसएल 3 में उपर्युक्त कार्यान्वयन संभव है? कोई भी सुझाव होगा की सराहना की। (शब्दों के अनुरोध, गतिविधि आदि का व्यापक अर्थों में उपयोग किया जाता है और मैं उन...

How can I find all controls within a control(WPF, C#)? -

I get interesting questions about this kind of thing, but I want my method to return all control within me Ho. It does not make any difference to the name of the control or its type unless the method returns all those possible controls. "> In these WinForms this is very easy ... just grab the WinForms container and then check 'Control' and return to the repository of the control archive . foreach (system.indows.Forms.Control ctrl in form.Controls) {if (ctrl.Name == "tab page control") {// 'tab page controller object' Do something with {} As you can see the deceased in WinForms easy, to get access to the global container to return a 'Control' Through or through depth if its panel or something happens.Once you find out what you want, you are simply making a list of the list that is anything with your list or your control. WPF , it is slightly different I do not have a comprehensive WPF experience, but I came with it after 15 m...

c++ - Memory corruption when using boost::shared_ptr in a multithreaded environment -

* glibc detected * malloc (): स्मृति भ्रष्टाचार (तेज): *** यह एक त्रुटि है जो मुझे मिलती है, जब एक बहुस्तरीय वातावरण में, मैं कोड के इस भाग को निष्पादित करता हूं: /// कुछ घोषणाएं typedef बढ़ावा :: share_ptr & lt; ऑब्जेक्ट & gt; ObjectPtr; ऑब्जेक्ट पीटीआर getObject () {ऑब्जेक्ट पीटीआर (नया ऑब्जेक्ट रिटर्न); } /// क्या वास्तव में एक धागा शून्य निष्पादन में निष्पादित किया गया है वर्क () {... ObjectPtr ऑब्जेक्ट = getObject (); / * & Lt; --- यहां स्मृति भ्रष्टाचार! * / ...} क्या आप मेरी मदद कर सकते हैं? मुझे नहीं पता कि यह आपकी विशिष्ट समस्या को कैसे मदद करता है, लेकिन make_shared का उपयोग करने के लिए कभी कभी वांछनीय है और new से बचें। ऐसा: रिटर्न बूस्ट :: मेक-शेरेड & लेफ्टिनेंट; ऑब्जेक्ट & gt; (/ * निर्माता के लिए कोई भी तर्क यहाँ / /); इसके अतिरिक्त, आप boost :: shared_ptr की बजाय std :: shared_ptr कोशिश कर सकते हैं। वे संभवतः वही हैं, लेकिन शायद नहीं? इसे TR1 के माध्यम से उपयोग करने के लिए, मेरा मानना ​​है कि आप #include & lt; t...

php4 - ftping only todays files only -

I am new to php for files containing files for more than a week only to remove today's files only The task is, how do I select or filter files based on date and FTP in my local folder? If you have a file name already, use The file was last modified, or returned incorrectly on the failure. Time is returned as a Unix timestamp, which is appropriate for the date () function. To compare today, you have the date ('Ym-d') compared to today's date code ('ym-d', filemate ($ Filename)) To get the file name, you can use to read each one in turn. & lt ;? Php if ($ handle = opendir ('/ path / to / files')) {resonance "directory handle: $ handle \ n"; Echo "files: \ n"; While (wrong! == ($ filename = readdir ($ handle))) {resonance "$ filename \ n"; } Close ($ handle); }? & Gt; There is also one in the manual which should show you how to get a file once the FTP is done. As such, by adding all this, you ca...

c++ - Replacing existing raw pointers with smart pointers -

Note: this may look dumb. I have an application that uses raw pointers and there is a lot of memory leaks in the application. Now my question is, how easy would it be to replace existing raw pointers with smart pointers and to help them deliver space, reducing memory leaks due to not being dynamically allocated memory free. To explain a bit further, this application is a legacy and there are very clear memory leaks where memory will be allocated and will be used in the same function. I have done a memory analysis using DevPartner and found in many areas. Wolgan is better than Deobaputra. Using Smart Pointers will definitely be a good start to clean your application, but they are not cures - all too many memory leaks may be negligent in another well-designed program, but more likely That you have important design problems and memory leaks is a symptom of that. When you switch to Smart Pointers, you will still need to make design options such as "Who is the owner of this o...

python - In Django, correctly making a queryset with multiple categories, multiple tags and search? -

I have a list of data in this data model for many-to-many categories of categories and a keyword model There are fields. The name and description of the data model is. The data can contain several categories and keywords. At the front end, the user can select several categories to filter the data or search ... if the data shown should be with any data, any of the selected categories Also, if the 'A' and 'Test Data 2' category 'B' is in 'Test Data 1', if the user chooses to watch 'A' and 'B', then both of the data will display fragments. Searching for keywords related to search title, description, and data means that if a class is selected, it will search what data is omitted after categories are asked. I'I am not an expert in jigs ... I am trying to prepare the best way to do this. I do not want to resort to using something like Haystack, because my data is actually very simple I have found that the filter on the object is bas...

php - Check if directory path ends with DIRECTORY_SEPARATOR -

In PHP, I am getting a string from the user for the local file directory $ path I want to know if they have not added the previous slash (/) or I would like it for a cross platform so that I use PHP continuous DIRECTORY_SEPARATOR Would like to do My unsuccessful attempts include preg_match such as preg_match ("/". DIRECTORY_SEPARATOR. "$ /", $ Path); I basically want a great way to test this if the string DIRECTORY_SEPARATOR . To fix your regexp: preg_match (" / ".preg_quote (DIRECTORY_SEPARATOR." $ / ", $ Path); But there are simple ways to achieve your goal: rtrim ($ path, DIRECTORY_SEPARATOR) .DIRECTORY_SEPARATOR;

mysql - Meaning of "n:m" and "1:n" in database design -

डेटाबेस डिजाइन में n: m और 1: n क्या मतलब है? क्या उसके पास कुंजियों या रिश्तों के साथ कुछ भी नहीं है? M: n का उपयोग कई-से-कई रिश्ते (दूसरे पर m वस्तुओं को दूसरे पर n से संबंधित करने के लिए किया जाता है), जबकि 1: n एक-से-कई रिश्ते ( 1 दूसरी ओर n से संबंधित दूसरी ओर वस्तु) को संदर्भित करता है।

facebook api: do i need to store each user's friends list in order to create a who's online component (between friends)? -

This is a general question about the creation of a Facebook application. I want the user to have the who is online component which shows who among his friends is currently using the application. Does this mean that I really need to store each user's friend list in my database and filter that user currently using my application? It seems like a lot of things. It also means that whenever I use my application, I should bring and store my friends Is there any other way? As you see, I did not explain what programming language I use, because I think it is irrelevant to the question. Thank you! No need to store a friend ID as you can get this information from Facebook ( Just run the FQL on the table) Just store the user id that is currently logged in (possibly the last_seen timestamp on the user table, then users are searching for the last 15 minutes Together with the app) Something like this: Every time a user updates the app with the user's previous_...

Why am I finding Javascript/jQuery so difficult to get right? -

My background is in C and I've picked PHP, mySQL, HTML, CSS without a lot of problems. But I'm having a Javascript / jQuery address that is difficult to obtain properly. very frustrating. Why does it feel like this? It seems that there is a violation of many traditional programming principles (like the scope of the variable) undefined variables begin to appear There are nowhere and already values ​​associated with them. For example (from jQuery Docs): $ ("a"). Click (function (event) {event.preventDefault (); $ ('& lt; div / & gt;') .append ('default' + event.type + 'paused') .appendTo ('# log' );}); What is actually "events"? Do I have to use this variable name? Should I just believe that this object has magically started with the right stuff and can I use any method list? A bunch of random rules (eg false reflection to stop default work, but sometimes it does not work?) Non-deterministic b...

Git merge different file names -

Here's my scenario: I work on bug fixing at file1 file1 in the reactor file2 . He has completed his work and merges back into the master and gives push. Now file1 is no longer present in the head. What happens when I pull and change my file1 to merge? Is GIT smart enough for this thing or will I be able to merge your changes manually? First, you do not merge files , then you Modification (or rather the lines of development) can merge. The second uses the equality based estimation for rename , so if the file2 is similar to file1 , Then git should automatically merge itself and its change into file2 . If not, you will get 'CONFLICT (modify / delete)' (I think) you have to solve manually.

function name(e) in Javascript -

As a full JavaScript innovation, I'm challenged to see what might seem like simple concepts for the Javascript JavaScript overlord My problem is not really a problem when I am doing my code editor in my code editor, so often I will see such content function name (e) {if (E.keycode) {....}} What does it accomplish? Is it different from just if (KeyCode) ? What is e? / Code? It seems that the function is called by the browser (Or whatever) when fireing a specific incident (in this case I think this keyboard is related, e is for event or event data). Once removed, caller event structure will be defined as a parameter (copying to e) Javascript will not define any local / global variable for a specific call, so define the encoding Will not be done, but they include variables in E.

c# - WPF, calling method with parameters in XAML's class -

I have a ObjectDataProvider in my code that is a method in my window Gives context -documented class. That is, I have referenced with NewForm.xaml.cs class newform and ObjectDataProvider with newform.xaml One method in NewForm . Currently, with the following XAML, I get a stack overflow error because the NewForm constructor is repeatedly called: & lt; Window x: orbit = "MyNamespace.NewForm" ... & gt; & Lt; Window.Resources & gt; & Lt; ObjectDataProvider x: key = "getTeamName" object type = "{x: type local: newForm}" methodname = "GetTeamName" & gt; & Lt; ObjectDataProvider.MethodParameters & gt; & Lt; Sys: Int32 & gt; -1 & lt; / Sys: Int32 & gt; & Lt; /ObjectDataProvider.MethodParameters> & Lt; / ObjectDataProvider & gt; & Lt; /Window.Resources> & Lt; / Window & gt; I'm guessing this because object type is set to NewForm , so it's New...

c# - string = string + int: What's behind the scenes? -

You can add a string in C # and say, an integer: string Sth = "something" + 0; My questions are: By assuming the fact that you can add a string and an integer, the cables like C # Does not allow it to start: string sth = 0; // Error: The source type 'int' can not be changed to target type 'string' How the C # # forms of string Is it 0.ToString () or (string) 0 or something else? How to get the answer to the last question? To make this call, such as: String sth = String.Concat ("some", 0); (Note that this particular line will actually be optimized by the compiler) This method is defined as follows: (Taken from Net Reference Source ) Public Static String Context (object arg0, object arg1) {if (arg0 == null) {arg0 = String.Empty; } If (arg1 == faucet) {arg1 = String.Empty; } Return concat (arg0.ToString (), arg1.ToString ()); } (This String.Concat (string, string) call ) To find it, , or Reflector (no ...

jquery - Is it possible to surround all my javascript file with one try catch? -

I wrote a bookmarklet, when a user clicks on it in his browser, it will do some work on the current website and show popup Some results in Some websites fail to load my booklet because the problem may exist in the current website. My bookmarklet code is using the jquery library. Errors in some cases are in Junkie Library, because I do not know about some conflicts or something. My question is this: Can I cover up all my bookmarklet codes with a try that will cause an error in all my code and the user Will any other page redirect to 'Error Page'? Errors will bubble stack towards the original calling function, so if you wrap your entire top-level code Try ... catch so jQuery errors will be caught.

vb.net - How can i calculate time duration between sunrise and sunset? -

My question is how can I calculate the period of time between sunrise and sunset? Then how can I divide this period (sunset from sunrise) into 8 equal parts (HR: minimum)? All are needed and every part ends. I and I have to write this code in VB.NET because I can easily design a GUI in VB.NET. Thanks A quick search for "Sunrise VB.NET" Came along, like

flex - Can I use a different ItemRenderer for different list items? -

I have a Flex list and a custom item renderer. I enable some objects in the list Want to use a different item renderer (say, depending on the class of items) is it possible? Example: & lt; S: List Data Provider = "{_ System}" Item Render = "myItemRenderer" /> Most of the items in _systems use myItemRenderer but if the element of the element is "special system" then the renderer will be "special ITMenderer". Is this possible? use one here is one. I also touch.

javascript - persistent data in php question -

Ive written this clean javascript 'thing' using jquery and ajax. All of this is based on the idea that there is a feature in a div that lets you write inside the div. (Contentedable = true). I thought it would be good to talk about a chatroom type, and the Holy Cow is doing some good things (*), but I have a problem. Using AJAX I have a php page I post which takes the posted data (X, Y, Text, ID) and brings it into a JSON-like object without writing a database (I think the redundancy), how can I create this data Am I See the problem? : Variables are essentially vapor in a php page after running on page, so NewJason will not get anything to retrieve my Javascript Ajax call. * I have used several text by jquery effects and setting colors, for scrolls and evaporation, matrix style, for example. Also, a cursor is placed in the div where the user clicks. You have to store the data somewhere. If you do not want to use a fully developed database, you can store them in fla...

php - How to install bcmath module? -

How do I install the BCMath module on a server? I tried yum update php-bcmath but he said that it did not get anything. please try yum install php-bcmath . If you still can not find anything, search package

Java template class that takes an array; any way to enforce that? -

I am writing a template class that should keep an array in its form. Public squares foo & lt; T & gt; {...} How can I do the best that "T" is an array type? (Int [], bar [], ...) Probably compile the time if possible, obviously, but otherwise the best way to debug is to throw an exception, either T is not an array? It is not possible to do this properly how you have said and the normal type is specified in array or primitive Please. Syntax allows such things to be: public square fu & lt; Az09 $ _ Expands MyClassOrInterface & amp; Serial & amp; Closeable & gt; {...} Where az09 $ _ is a valid identifier, which can also be parameterized with evenly formatted normal type. But az09 $ _ is restricted as being a Java identifier, so that you can see the public class Foo & lt; T []> {...} Anything you can do public class Foo [] {...} Typically you can use the t, i.e.: public square fu & lt; T & gt; {Public T [] P...

winforms - How can I detect when Control.PreferredSize changes? -

I'm using to determine what should be for the form. Whenever there is a change in the control's favorite sissy property, it will be necessary to determine, but does not seem to be a control. PreferredSizeChanged Event. Is there a way to find out when this property can change (potentially using it)? If the property can be avoided then I would like to avoid the elections. You can override online or onpaint. private size m_CurrentPreferedSize; Safe Override Zero Online (Layout Avenger ARG E) {base.OnLayout (e); Size newSize = preferred size; If (m_CurrentPreferedSize! = NewSize) {m_CurrentPreferedSize = newSize; // your code here}} The favorite call is calculated on each call.

iphone - Objective-C NSURLConnection -

Can I have all connection related functions on my own (singleton?) Class or possibly app representative? I've got too many code repeats ... e.g. This method is in at least 5 files: - (zero) connection: (NSURLConnection *) connection made FailWithError: (NSError *) error; Should I import a square with these methods in this method? Do I have to expand or use them? I do not recommend a singleton approach for a NSURLConnection handler, Mainly because each URL connection is different and it may be necessary to handle it differently. It seems that you have a lot of code repetition if you have simple requests, but as you begin to make more complex requests, and parsing different requests will give you different responses, you Soon, it will start to see that a general approach will not save you from writing more specific implementations.

windows - Codepage 850 works, 65001 fails! There is NO response to "call foo.cmd". internal commands work fine -

The question basically explains the problem. I am using Windows XP Pro Service Pack 3 ComSpec = C: \ wINDOWS \ system32 \ cmd.exe I started the console via Start ... Run- Dialog ... cmd.exe This is the "view" of my console: order, then output (and my // comments) C: \ & Gt; Chcp 850 Active Code Page: 850 // output is expected C: \ & gt; Echo @ CCP ^ & amp; REM 850 & gt; Test 850.cmd // no output; As estimated) C: \ & gt; Type test850.cmd @chcp & amp; REm 850 // output is expected C: \ & gt; Call test850.cmd Active code page: 850 // output is expected The above work is fine (as expected). Things are happy in Windows-Land, but when I codepage 65001 C: \> Chcp 65001 Active code page: 65001 // output is expected C: \ & gt; Echo @ CCP ^ & amp; REM 65001 & gt; Test65001.cmd // no output; As estimated C: \ & gt; Type test65001.cmd @chcp & amp; REEM 65001 / output is expected C: \ & gt; Call test65001.cmd // n...

iphone - How to show "Open In..." when a user tries to open email attachments in iOS -

I've seen this function for some iOS apps: when a user tries to open an email attachment, press and hold it Can be on attachment for a few seconds, and a popup menu will show two buttons. One button reads "Open in iBooks" (for example) when the user clicks it, the app will be run and open the attachment. I would like to know how to register my application to be associated with a particular document type. What happens after the document is opened? Is it copied to a place that can be read by the application, or does a document representing a document document receive? If anyone has to do this, please tell me THX too much. Set your app to CFBundleDocumentTypes plist . Here is an example. When you are the app, you can get information about the file in the application: didFinishLaunchingWithOptions: , which has passed a dictionary with the key You have to point to the file to open the URL. I think it's just for reading and if you want to change it, t...

amazon ec2 - How much will it cost if I use TeamCity + EC2? -

Do anyone have experience using TeamCity on Amazon EC2? How much will it cost on a monthly basis? I will run the manufacturing process in one day (most of the time). Or should I use another solution instead of EC2? We need online access to build servers. Thank you. use teamcity havent but if you have an estimated estimate of the application, you can use it :

ruby on rails - how to update_attributes with the conditions? -

I need to update the attributes but only for specific conditions such as rows [" How do I do this? P> It depends on whether you want to update a bulk SQL, or want to update on each model which also calls verification and normal callback series. if You Want to translate and run the callback chain: Model.find (: all, conditions => ["recipient_id =? And inbox_id =? And condition = 'unread'" , Current_user.id, @ inbox.id]) .org | obj | Obj.update_attributes (...) end If you want to update SQL: Model.update_all ("attr1 = 'something', Attr2 = true, ...", ["recipient_id =? And inbox_id =? And condition = 'unread'", current_user.id, @inbox.id ]) Be sure to to ensure that you properly avoid your SQL array of situations. Use the formula

.net - Use reflection to determine which base class constructor is called -

Using the image on the type , we can determine: a) It It uses the public class base class {public base class} {} public base class (string some parameter) {}} public class DerivedClassA: base class {public DerivedClassA () {}} public class DerivedClassB: base class {public DerivedClassB (): Base ("canWindFindThis") {}} a) Yes. If you read information from ConstructorInfo.GetMethodBody () but without a supporting library like Mono Cecil, technically, you can find out which other consultants are called, One decode will have to be byte array. b) In your case, yes, but generally no one can use reflection only to display on static data, runtime is not a dynamic state , So you will not be able to use it, to know which value was passed as a constructor in the form of a parameter, unless it is really specified as such, in which case you have ConstructorInfo .GetMethodBody () Received Mono.Cecil. with the same technique

In Perl, what is the difference between a .pm (Perl module) and .pl (Perl script) file? -

.pm (पर्ल मॉड्यूल) और .pl के बीच अंतर क्या है (पर्ल स्क्रिप्ट) फ़ाइल? कृपया मुझे यह भी बताएं कि हम फ़ाइल से 1 क्यों वापस करते हैं अगर रिटर्न 2 या कुछ और, यह किसी भी त्रुटि पैदा नहीं कर रहा है, तो हम क्यों पेर्ल मॉड्यूल से 1 लौटाते हैं? बहुत ही कोर पर, आपके द्वारा उपयोग की जाने वाली फाइल एक्सटेंशन में कोई भी अंतर नहीं है कि कैसे पर्ल उन फ़ाइलों की व्याख्या करता है। हालांकि, कोड> .pm फ़ाइलें एक विशिष्ट निर्देशिका संरचना के बाद होती हैं जो पैकेज नाम के अनुसार सुविधा प्रदान करती है इसलिए, यदि आपके पास एक मॉड्यूल उदाहरण :: प्लॉट :: फोर डी है और आप इसे एक डायरेक्टरी उदाहरण / प्लॉट / चार डीपीएम में एक पथ में रखते हैं, तब और उदाहरण :: प्लॉट :: फोर डी का उपयोग करते समय पैकेज का नाम दिया जाने वाला सही काम करेगा। फ़ाइल को सफल होने के संकेत के लिए अंतिम विवरण के रूप में सही होना चाहिए किसी भी प्रारंभिक कोड का निष्पादन, इसलिए ऐसी कोई फ़ाइल को 1; के साथ समाप्त करने का प्रथागत है, जब तक कि आप सुनिश्चित न हों कि यह अन्यथा सत्य वापस करेगा यदि EXPR एक बड़प्पन ह...

Portable .Net debugging tools -

There are times in the form of a pure developer when someone debugs apart from different machines (32 and 64 bit) To say that the developer machine itself is sometimes missing some important tools and I have to first install them to start debugging. Then I started collecting some portable tools in 1 GB memory stick. Currently Windbag 32 & amp; 64 bit portable ildasm FUSLOGVW.exe Windf graphedt.exe Remote Debugger 32 & amp; Sysinternal Suite Oleview.exe There are no other portable devices that I can add to the archive that debug one problem In a pure application will help What is your portable collection? I will add it to WinDbg and you should actually get it and should be supplemented by SOS.

forms authentication - Change the user data in FormsAuthenticationTicket programmatically -

I am using FormsAuthenticationTicket and filling out data and passing data to all pages I am here. And this will work if we are not changing any data. So, now if I want to change the data and pass it to the cookie and encrypt it, then the data is to be converted to program. Please give me the solution to change the data in the HPC program. This is an example of how I modify the previously issued form certified ticket: / P> http cookie cookie = formas. Var ticket = formattap.documentation (cookie.Value); // All the attributes in the synchronization for the Web, along with the form ticket, the urdest store / user data. New FormsAuthenticationTicket (Ticket version, Ticket .name, Ticket.Isadet, Ticket end, true, always always "user data", Tickets. CuckoPath); // Encrypt the ticket and place it in the cookie cookie. Value = formatting Encrypt; Cookie Exercise = Nutcracker Explanation.Edours (24); This.Context.Response.Cookies.Set (cookie);

I want to insert new contact into android contacts, that the account is not set -

The account is not set, how to insert a new contact, and after being inserted, the contact can be shown in the 'application ? Do not know if you are still looking for answers but it can help others account Try to empty the name and account type, it will insert the contact and display them in the native contact app.

realtime update text in javascript by same id -

मैं आईडी = "b" में टेक्स्ट कैसे अपडेट करूं? & lt; स्क्रिप्ट टाइप = "टेक्स्ट / जावास्क्रिप्ट" & gt; फ़ंक्शन updateb () {var a = document.getElementById ("a")। मान; Var b = document.getElementById ("b")। InnerHTML = एक * 10; } & Lt; / script & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" id = "a" name = "a" मान = "10" onKeyUp = "updateb ();" / & Gt; & lt; p id = "b" नाम = "b" & gt; & lt; / p & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" id = "a" name = "a" मान = "20" onKeyUp = "updateb ();" / & Gt; & lt; p id = "b" नाम = "b" & gt; & lt; / p & gt; & Lt; इनपुट प्रकार = "टेक्स्ट" id = "a" name = "a" value = "30" onKeyUp = "updateb ();" / & Gt; & lt; p id = "b" नाम = "b" & gt; ...

asp.net - load html text of https (SSL) -

Do anyone know how to load the HTML element of HTML in ASP.NET? Say .. You have the following URL:. How do I programmatically load html content of this url? You are looking for: / P> string source; (Var client = new webclient ()) using source = client.downloadString (url);

php - headers to force the download of a tar archive -

I have a tar archive on the server that must be downloaded via php. This is the code I used: $ content = file_get_contents ($ tar); Header ("content-type: application / force-download"); Header ("content-dispute: attachment; file name = $ tar"); Header ("content-length:". Refrain ($ content)); Unlink to ($ name); Die ($ content); The file has been downloaded, but it is broken and can not open it. I think there is something wrong with the header because the files on the server may be open without problems. Do you know how I can solve this problem? UPDATE I have tried to print an iframe like this: & lt; Iframe src = "& lt ;? php echo $ tar? & Gt;" & Gt; & Lt; / Iframe & gt; And the download works, so I'm sure something missing in the header. I used this code when I had to: Download the function _D ($ f_location, $ f_name) {header ('content-description: file transfer'); Header ('con...

How to read a user environment variable in C#? -

How can I read a user-specific environment variable? I know how to get a system wide, like environment. GETEnvironmentVariable ("SOMETHING"); Thanks advance! Use other surcharges it lets you specify. Environment. GETEnvironmentVariable (variable, target); The target can be: Environmental targets. Process , Environmental target.User , environmentally-friendly area Machine .

Jquery ul Submenu slidetoggle issue -

I am creating a store using oscommerce and using a single addon that has a menu Displays a noodle list. The UL list looks like this ... & lt; Ul id = 'suckertree1' & gt; & Lt; Li & gt; & Lt; A href = 'index.php? Cpath = 21 '& gt; Summer and lieutenant; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = 'index.php? Cpath = 21_23 '& gt; Bike & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = 'index.php? Cpath = 21_23_28 '& gt; E-bike & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = 'index.php? Cpath = 21_23_27 '& gt; Mountain Road & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = 'index.php? Cpath = 21_23_26 '& gt; Road Bike & amp; Nbsp; (1) & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; &...

php - how we put dynamic input such as timestamp when using selenium plugin in firefox? -

I am using selenium I am using it using the Firefox plugin. But I have a problem using it, for example, I need to copy the past command and change its property value without any 100 posts (I need them that ranges ranging from 1-100 different ranges) I am sorry if my description is very vague. In short, this unit is about making suits where the input is dynamic, is it possible to use the selenium plug-in? You have to export the Selenium Test case with the IDE, programming language of your choice and then tweak it . Recycled in Selenium IDE - Consider this sample, it navigates on some forums, clicks the "new post" button, clicks the title "Title 50" and then "Post" button. : open /viewforum.php?f=19 | | Click and watch | BTN New Post | Type | Topic | Title 50 Click and watch | BTN Post | | After that you export this test as a Java Junket (for example) and you get the following code: package com.example.tests; Import com.thoughtworks.seleni...

Postgresql php and bytesequence issue -

I have set the html meta tag on UFT 8, for the UFF 8 form charset also I am sure to be Uber I have php function utf8_encode () on abusive string Even after this I still get a postgrass error when the PHP function is executing the query via pg_query. However, when I copy it and it is corrected by the command line. Query (or at least the humiliating part): Enter locations (... alt_thorfare_name ...) Price (... 'Boundhar ghhalan / SHEIN' ...); Error: Question Fail: Error: Invalid Byte Sequence for UTF 8: 0xd354 Encoding: This error may also occur if the byte sequence does not match the expected encoding by the server, which is controlled by client encoding Problems of Fada (acute accent from the Irish language) on O and A. I have been stuck on what to do next to try to find a solution altogether, appreciate any help This error occurs because you actually have UTF-8 data to Pg_query . 0xd354 is not actually a valid UTF-8 sequence, it is an ISO-8859-1 sequenc...

c# - Replace dot(.) with comma(,) using RegEx? -

I am working on a C # application. I want to change the decimal decimal shape with a comma (,), where I have a dot (.) Using regular expressions. For example: value = 100,00.56 This is the international rule to represent numerical values ​​but I There are different ways for numbers such as value = 100.00,56 So I want to do dot (.) With comma (,) and comma ( ,) Should use RegEx in dot (.) May guide me in this. When the formatting number, the culture name for Swedish is "SV-SE", as seen Could. decimal value = -16325.62m; Console.WriteLine (value.ToString (CultureInfo.CreateSpecificCulture ("sv SE")); Edit : As @Oreganhost tells you - having the number of parsing numbers done with CultureInfo needed.

mysql - PHP search engine problem -

। मेरे सभी html / php पृष्ठों में यूआरएफ -8 के रूप में वर्णित वर्णसेट है और स्पैडर की खोज और परिणाम पृष्ठ में वर्णसेट = आईएसओ -885 9 -1 है, जब मैंने पहली बार स्पैडर "स्पाइडर" का इस्तेमाल किया था मेरी वेबसाइट को क्रॉल करते हुए मैंने अपने सभी स्थानीयकृत पात्रों को कुछ संहिताकरण में नहीं बनाया है: मुझे नहीं पता: "ç" बन जाते हैं और इसी तरह "एक", "ए" "के साथ" आदि जब मैंने MySQL में डीबी बनाया तो मैंने इसे यूटीएफ -8_जीजी_एसबी भी डीबी के लिए मेरी परिभाषाएं बनायी हैं: MySQL वर्णसेट: यूटीएफ -8 यूनिकोड (यूटीएफ 8) MySQL कनेक्शन मिलान: यूटीएफ -8_इनिकोड_सी यह एक है वास्तविक समस्या क्योंकि खोज ठीक से काम नहीं करती है, उदाहरण के लिए अगर मैं "diferença" खोजता हूं, तो यूआरएल में यह "? Query = diferença और search = 1" के रूप में दिखाई देगा, जो सही है, लेकिन "सुझाई गई खोज" में इसका कोई परिणाम नहीं मिलेगा के रूप में "diferen a" के रूप में दिखाई देगा नहीं vi में Sible, "ç" उस पर एक सफेद...

javascript - Table scrollbar without changing headers and provide sorting in headers -

Here's mytable and the headers need to stay in, while the result is only scrollbar and sorting by name Provides convenience. & lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; Id & lt; / TD & gt; & Lt; TD & gt; Name & lt; / TD & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt;% while (resultSet.next ()) {%> & Lt; TR & gt; & Lt; TD & gt; & Lt;% = resultSet.getString (1)%> & Lt; / TD & gt; & Lt; TD & gt; & Lt;% = resultSet.getString (2)%> & Lt; / TD & gt; & Lt; TD & gt; & Lt;% = resultSet.getString (3)%> & Lt; / TD & gt; & Lt; / TR & gt; & Lt;%}% & gt; & Lt; / Table & gt; For the scrollbar, I tried to use the div but, it showed the empty space. How can I do these two things? Try: & lt; Table height = "500" style = "overflow-y: scroll;" & gt;

c - Unable to Open Handle -

कृपया कोड देखें: int main (int argc, LPTSTR argv []) {हैंडल एचआईएनफ़ाइल; BOOL चेक; PLARGE_INTEGER फ़ाइल_ आकार; hinFile = CreateFile (argv [1], GENERIC_READ, FILE_SHARE_READ, शून्य, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, शून्य); If (hinFile == INVALID_HANDLE_VALUE) {printf ("INVALID_HANDLE_VALUE \ n फ़ाइल मौजूद नहीं है"); बाहर निकलें (0);} और {चेक = गेटफाइलसिसेजएक्स (एचआईएनफ़ाइल, फाइल_आकार); Printf ("फाइल का आकार% d है", file_size); } वापसी 0; } अब, उपरोक्त कार्यक्रम में क्या मैं निष्पादन योग्य की निर्देशिका में एक फ़ाइल खोलने का प्रयास करता हूं या मैं कमांड लाइन तर्क के रूप में पथ निर्दिष्ट करता हूं, केवल आउटपुट मुझे मिलता है: मैंने इसे काम करने के लिए थोड़ा अपना कोड संशोधित किया। #include & lt; windows.h & gt; # शामिल करें & lt; stdio.h & gt; # शामिल करें & lt; tchar.h & gt; Int _tmain (int argc, TCHAR * argv []) {हैंडल एचआईएनफ़ाइल; BOOL चेक; LARGE_INTEGER li; PLARGE_INTEGER फ़ाइल_ आकार; FILE_SIZE = & amp; ली; hinFile = ...

jquery textarea editors with spell check -

Do I need a jquery textarea editors with spell check any editors? Or any spell check plugin that writes itself when typing inline spell checks. is an interface for spellChecker.net. Have a demo. It is not on jQuery basis but works fine with it

javascript - php/ajax browser problem -

This can be considered a browser problem, it works in Firefox but not IE or Chrome: This posting PHP file is only outputting a number if you load it in Chrome then it loads to 99. So the question is, I do Chrome / i.e. this works ( In my version of Chrome) ... but the browser has been hanging for a while. doStuff ($ {. $ Ajax ({type: 'POST', url: / Ajax_html_echo / ', data: {i: i}, success: function {$ ("p"). Html (i);}, data type: "html", async: false});} var i = 0, timerId = setInterval (function () {doStuff (); if (++ i == 10) clear interval ();}, 100);

android - Login Screen blinks with Toast -

I created a login screen but before the screen on the screen I wanted an image to flash on the screen. For this, I use toast but the problem is for a while before the image login screen is shining, and then the image flash again appears in the login screen. I want to flash the image for the first time before any item appears in the screen. Here's my code: setContentView (R.layout.main); ImageView iv = New ImageView (this); Iv.setImageDrawable (.getResources () getDrawable (R.drawable.start)); Toast t = new toast (this); T.setView (iv); T.show (); T.setDuration (5); thanks lamp using handler class to catch you The current login window requires a few seconds, the handler class provides a method, which can be used before the display of the display image, if not possible with the handler method So, you can use on-start (such as on-start), much more activity methods Here is some useful code for u. Personal handler handler; Personal last static string DEBUG_TAG = ...

iphone - UISplitViewController - Dealing with memory warnings -

I have a UISplitViewController where the master VC is loaded (UITableViewController) and pressed using a table cell, it makes detail VC (two UIViewController with UIWebViews): @implementation MasterVC - (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath {UIViewController * detailViewController = nil; DetailVC * newDetailViewController = [[extensionclock alloc] initWithNibName: @ "DetailVC" bundle: zero]; DetailViewController = newDetailViewController; // Update the view controller array of the split view controller. NSArray * viewControllers = [[NSArray alloc] initWithObjects: self.navigationController, detailViewController, zero]; SplitViewController.viewControllers = viewControllers; [ViewControllers release]; [DetailViewController release]; } If I have to continue to simulate a memory warning, DetailVC (called didReceiveMemoryWarning, viewDidUnload, dealloc) but I get a "- [UIView _invalidateSubviewCache]: dealloca...

sql - Import database from File PROGRAMMATICALLY? -

What is a method to import a whole database from a file with a file from SQL ?? (Either C.CV, SQL and DB files are OK) Thanks! After clearing, edit: I'm interested in a solution, the database is independent (with all types of database (MySQL, SQL Server, Postgres, Oracle ...) SQL Server: Apparently there is command. You are not searching for a database-independent syntax for SQL commands, because there is not one. A wrapper around the database The library can be but I am not aware of it. (Or you can try to use the Odbi, but it is connection oriented and will not allow direct access to any file) Perhaps there is a software tool related to an interactive GUI, to do this. Also keep in mind that loading data directly from a file to a database on a database server is almost certainly Sector requires security privileges (o If it is a security risk).

jQuery $.post() doubt! -

I'm trying to use POST to pass the variable to try.htm in chat.php The code for try.htm is: & lt; Head & gt; & Lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> & Lt; Script type = "text / javascript" & gt; Function yo () {var text = $ ("# msg"). Val (); $ .post ("chat.php", message: text); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Input type = "text" id = "msg" onkeyup = "yo ()" & gt; & Lt; Div id = "display" & gt; Change & lt; / Div & gt; & Lt; / Body & gt; The code for .php is: The problem is that the 'msg' variable does not seem to be passed on chat.php! What is wrong? Change it to: $ Post ("Chat.php", {msg: text}); jQuery is expected to pass as a data object and {......

c# - Mixins and .net -

What is, exactly the mix? Is there any technique to achieve it? C # I'm not an expert, but this is what I found. From the MSDN blog: Some suggestions suggest that in the upcoming C # 3.0 extension methods are a type of mix, You can put functions in and you can tag it arbitrarily on the desired sections. In C # 2.0 specification section 20.1.3 it is explicitly said that the base class of the general category should be a building class type so that it can be used in C # using the above approach. I am also not sure why we choose to reject the obvious sub-class since C # does not support multi-heritage, so IOo should have supported the Mixin style coding.

tfs2010 - TFS 2010 Email Alerts - Filter by more than one Status Code? -

Image
I am installing my email alerts from TFS Power Tools using Alert Explorer in TFS 2010. When a build fails or is partially successful, I want to receive an email. I have created the filter as follows "TeamProject" = 'My project' and 'status code' = 'unsuccessful' or 'statuscode' = 'partially Successor ' But obviously it sends me an email whenever any project is partially successful. I really want that filter "teamproject" = 'my project' and ("statuscode" = 'unsuccessful' or 'statuscode' = 'partially successful') Is there any way to get this? Can I input these values ​​in such a way that it reads IN ('this' or 'that')? I do not have to create separate email rules for each situation that really interests me if I can help it. OK, I finally found the solution. On the warning definition tab, select only two or more rows and buttons above the table...

Microsoft ReportViewer - ASP.NET Session Expired -

is related to this question. Unfortunately, the accepted answer does not solve my problem. The report viewer is running in a farm, in which many worker processes run in each app pool. Session Mode is SQL I have implemented IReportServerConnection. I have the problem that the session is coming back immediately to end immediately. I can copy this on a box, so I think it relates to more than one worker processes. I am using RDL files and I do not think ReportViewer should also have the session enabled. So my question is: how can I get rid of this error? If this report is inactive for session session, how can I do this? I thought that implementing IReportServerConnection would have to handle it. The documentation seems sparse. Any help is greatly appreciated There is an exception and stack trace here:. Message: ASP.NET session has expired - Process name: Microsoft.ReportViewer.WebForms Type: Microsoft.Reporting.WebForms.AspNetSessionExpiredException StackTrace : Microsoft.Report...

asp.net mvc - Sign in as a different user using MVC.NET and Windows Authentication? -

How can I use it MVC.NET? I've got resources on the Internet about how to do in ASP.NET, but I have not found a way to do this in MVC.NET (I'm a MVC.NET novice, though). I can generate a 401 response using [authorized] attributes, but I do not have any information about what to do next. [edit] While playing around some time, I felt that if I could find a way to force myself to re-sign and apply for the login dialog, I would like to I might be able to. I think if I authorize something like authorization (authorize (user = "none")] then it should bring the login dialog. Is there another way to force it to re-authenticate, because the above Hack is too much waste because it will refuse access yet. You can register using the following code At the time of each user Roles: Crele roll (rollname); roles.Audousorol (user name, rollname); "Administrator" or "user" Or the name of the role as "employee" or "customer", or whate...

Bypass Data Annotations validation on ASP.NET MVC 2 -

I would like to know whether it is possible to bypass validation of a property which is using data annotation since I I use a model in many pages, so I need a check in some, but not in others, so I would like to ignore it. Tux! You can use fluvant validation, which uses an external valuer class. In this situation, you will apply a different verification class for each scenario. Example: Using FluentValidation; Public category subscribers: Abstraquitator & lt; Customers & gt; {Public Customer Validate (RuleFor (Customer => Customer Name). Notactic (); Rule Farm (Customer => Customer Foreman) .notEmpty (). With the message ("please specify first name"); }} Public Class Customer Wide 2: Abstraquitator & lt; Customers & gt; {Public Customer Validate (RuleFor (Customer => Customer Name). Notactic (); }} Customer Clients = New Customers (); Client Validator Validator = New Customer Visitor (); Validation result result = validator Validit...

Helper functions in Rails unit tests -

I am using this type of code in my code tests in my code. The test should be "amazing" really insists on the end I am using a factoryguir instead of fixtures. I think I am repeating myself very much and it will be very useful to do auxiliary work. What is the best way to create and call support functions in unit testing? Is there any such before_filter as it is in the controller (I tried to put it in, but this is just an undefined method). Any help is appreciated! You can add utility work to your unit tests without any problems. Unless you say them like "test_something" they will not run as a unit test, then you can call them in your actual unit testing methods (the format you use when you boil down to keep any method in the class ). should: test " The utility methods used in all places can be found in test_helper and they all You can optionally do a module that you combine in your tests to provide common utility methods. If you set...

java - JAI: Reading in 12 bit JPEG files -

I am new to Java Advanced Imaging, and I've read the first block that reached 12bit, single band, Grayscale JPEG file. I have seen that it is possible with JAI, but there is no code or suggestion about it. Can someone help me with a helpful link or short code snippet? I am using till now, but I have not been helped on this issue. Thank you. Je-ImageIO will register itself in Java's ImageIO API, so you should only be able to use it. The problem with JPEG can be that there is a default JPEG reader in the Ioarristics in Java, and you can Some images may need to manually select the image IO.getImageReadersForFormatName () manually. One more thing with more esoteric formats is that there are two implementations generally in JEEIIIIOO - libraries using a pure Java and other basic binary, so make sure that you * lib-wrapper .dll (or whatever is suitable for your specific OS) are included in LD_LiBRARY_PATH or in the working directory of your program. The basic implementatio...

php - Questions about orders table for mulltiple items with multiple options -

I am creating a new database for an online store and I am trying to explain how to order tables . There are many products and each product has many options. I'm just thinking the best way to track this. I am returning to a table with all the options of all the items. It sounds like a bad thing though does anyone have any ideas on how to do this? Any help is greatly appreciated. Each product is stored in a row of the table Products One or all products in each order (0 n) / Li> You need 4 tables to keep track of: Options, Products, Product_order, Order

java - Efficient 2D drawing in Android -

I have searched for a few hours and have not found a brief definite search for my question. I have an application where I have to draw a playground (including all pitch lines) on the screen. So far, I've increased Surface Weave and have copied the rest of the Lunar Lender demo. For all the data, the pitch needs to be pulled in the correct dimensions, which is obtained from a socket that works fine. However, in the minutes of the onDraw () function, I am depicting each frame in each frame which is generating very slow framerate in the emulator (eg ~ 10 fps). Here is my OnDown () function: @Orride Scared Public Zero (Canvas Canvas) {Canvas Davis (255,0,144,0); Canvas.drawLine (canvas, getFirstLine (), MPEP); Canvas.drawRect (canvas, getFirstRect (), MPEP); Canvas.drawRect (canvas, getSecondRect (), MPent); ... canvas.drawRect (canvas, getSecondRect (), MPP); DrawAnimatedObjects (); } Then I draw circles and different positions on this background. My question is how do I mak...

Using Hex numbers in css setting w/Jquery -

I have this code which acts as a post: $ ( '# Cs_tableVideoListingsTD'). The problem is that "gray" is very dark when it is dark ('function') {$ (this). CSS ('border-down', '2 px solid gray'}} The problem is that I try # 333 or a hex number, it does not work at all. I just need to apply border border, so use "border down": "2px solid # 333 "(note colon) does not work because syntax only works when applying multiple styles. Therefore, I'm thinking of applying hex color in the above code / o be funny about specifying the variable like. thanks Your code is okay unless you decide to add colon. You do not want colon unless you pass the object TD TD '). Each (function () {// is separated with a comma, you are passing 2 arguments $ (this) .css ('border bottom', '2px solid # 333')}}; Try it: $ ('# Cs_tableVideoListings tbody tr td 'each (function () {// Separate with ...