Posts

Showing posts from September, 2010

Performance Problem with Clojure Array -

This piece of code is too slow on execution by mud-copy on my netbook takes a few minutes . (def-test-array (make-array integer / TYPE 400 400 3)) (doseq [x (range 400) On the contrary, This code runs really fast: (maximum (one max) (max (map (Fan [W] (apply maximum (map # (first%) w))) Test -Are) (Def max-2 (max (map (FN [w] (map # (second%) w))) Test-array (def maximum-three (maximum apply (map (FN [W]) ) (Maximum (Map # (Last%) W))) Examination -Are))) Is it selected Have something done with scenes? Is my first example just written wrong? You hit Java reflection This blog post has an alternative solution:

javascript - How do I escape backslashes in JSON? -

I am using Firefox's original JSON.parse () to parse some JSON strings, including regular expressions Values ​​are included, for example: var test = JSON.parse ('{"regex": "/ \\ d + /"}'); In the above, '\ d' throws an exception with JSON.parse (), but when I use eval (which I'm trying to escape) works fine is. What do I need - to protect '\' in regex - are there some other JSON-friendly methods to avoid it? You already need to avoid the backslash that escapes from there :) Like this: var test = JSON.parse ('{"regex": "/ \\\\ d + /"}'); You can check it out here:

posix - Using sqlite from vala without dependence on glib -

I need to use Sqlite Vapi without any fraud on GLib is I Skyuelit non-library, so it possible. However, when I try to compile the following file using the - profile posix option, Sqlite; Zero Main () {stdout.printf ("Hello, World!"); } I get an error message: sqlite3.vapi: 357.56-357.59: Error: The symbol `GLib 'could not be found in public int Bind_blob (int index, void * value, int n, gliib, destyotitit nietity nntf); ^^^^ sqlite3.vapi: 362.68-362.71: ERROR: Symbol `GLib 'public int bind_text (int index, owned by string, integer n = -1, GLib.DestroyNotify destroy_notify = GLib.g_free) could not be found ; ^^^^ sqlite3.vapi: 411.42-411.45: ERROR: Symbol `GLib 'public void result_blob could not be found ([] data? Uint8, GLib.DestroyNotify destroy_notify = GLib.g_free); ^^^^ sqlite3.vapi: 420.59-420.62: ERROR: Symbol `GLib 'public void result_text (? String value, int length = -1, GLib.DestroyNotify destroy_notify = GLib.g_free) could not be fo

jquery - Find an element by class name, from a known parent element -

I have to find an element by the class name. I know that it will appear in a particular parent device, instead of searching the entire dom, I just want to find a specific device. I'm trying it, but it does not seem to be the right syntax: < Code> var element = $ ("# parentDiv"). ("MyClassNameOfInterest"); What is the correct way to do this? Thank you You were close to you: var element = $ ("# parentDiv"). Find ("MyClassNameOfInterest"); .find () - Alternatively, you can: var element = $ (". MyClassNameOfInterest", "#parentDiv"); ... that sets the context of the jQuery object's #parentDiv . Edit: Additionally, if you select div.myClassNameOfInterest instead of just .myclassNameOfInterest , Then it may be faster in some browsers.

SHA1 Using php and .net -

Can I get help for the problem below? I have the sha1 value in the mssql table (password algorithm is encrypted using SHA1 which is provided in the Microsoft .NET Library.) I created a PHP application It requires me to compare these encrypted values. Thank you I think that you compare the password given by the user to the database Want to do with hashed values ​​from In that case, just use the basic php sha1 function: if ($ hashes passwordformdb == sha1 ($ plainUserProvidedPassword)) {echo "accept!"; } And {echo "disapproved!"; }

java - How to format the date into words -

I "java.util.Date" for "October 26" for October "lower ninety three" -10-1993. You have to date (day, month, year) ), And just change each gradient. For the day, you will need the number in the words converter. You get a general general or an alternative form Can do it Because your numerical limit is limited, you can write a simple one which only works for the day limit. For the month, just map it to the name of the month. It should be straightforward. For the year, you have to be more specific about the need. What is 2010 "twenty ten"? What about the 2009 ? In the same case, for y = 19xx , 18xx , etc., you can enter y% 100 and y / 100 The reason for this is that when y = 1234 , y / 100 = 12 and y% 100 = 34 . In this context, the / integer division is there, and % is the remaining operator to ensure all special cases, eg When y% 100 == 0 , for example 1800 should be eighteen hundred , 1907 (perhaps ) ninetee

iphone - NSInvocation making app crash -

I am using NSInvocation as follows: In my init, I see this ViewDidLoad: SEL mySelector; MySelector = @selector (initParsersetId: Type :); NSMethodSignature * sig = Zero; Sig = [[Self class] example: MethodSignatureForSelector: mySelector]; My invocation = zero; My Invocation = [NSIWocation Innovation With Method: SIG]; [My Inventory Settag: Self]; [My invocation set selector: mysite]; And I'm calling it this way: Idea * tempIdea = [[Idea Alok] init]; TempIdea = [Generic Array ObjectAtindex: IndexPath.ro]; Idea.ideaId = tempIdea.ideaId; [TempIdea release]; Nsnm * _id_ = [nsnumber numberthat: idea.isaid]; [My invocation setup: _id_ atIndex: 2]; // Crossing on this line My application is crashing on the indicated line Can someone help me? This is not very clear from your code; However, I find something suspicious. Hopefully, this could provide some useful hints to you. First of all, I do not think you maintain this example (An example of auto issued by [NSINWoc

Reading server-side XML with JavaScript and jQuery -

Hope this is a fairly easy question Our customer currently offers a flash banner ad on their site So that they can change the size, color, position etc. of the text by editing the XML file. They want to scrape flash and use javascript and jquery. Now, as long as the XML file is on a readable URL, I should make an AJAX request for the file and should use it is correct? Many thanks Yes. Edit: Of course I forgot about the same basic policy:

algorithm - Selecting items from events, as evenly spaced as possible -

If I have an event that is 15 times a second (numbered 1 - 15), but I only process it Wish 3 times I can choose [1], [6] and [11], . It is important that the procedure that I take, is as equally as possible and wrap the account-around, ie events are consistently 13, 14, 15, 1, 2, 3 etc. If I want to do the 4 best items I can do, [1], [5], [9] and amp; [13] . Is there a general algorithm that calculates which events let me count the total number of events ( total ) and the number of processed ( processAmount ). You can try to use this basic approach - for the partition equal non-integer parts Take the nearest integer event index for your interval and each event: int gaps = total + 1; Double Phase = 1.0 * Interval / Processing Amount; For (int i = 0; i

wordpress - How to remove list from <?php the_category() ?> -

I am using WordPress and I wonder how to get a post category campaign and name when I use it. : & lt ;? Php the_category ()? & Gt; There is a list in the above list and I can wrap the permalink and category in my own markup

How to convert many thousands of lines of VBScript to C#? -

मेरे पास लगभग 10,000 छोटे वीबीस्क्रिप्ट प्रोग्राम्स (प्रत्येक में 50-100 पंक्तियाँ) और बड़े लोगों का एक छोटा संग्रह है, और मैं इन्हें कन्वर्ट करने के लिए एक रास्ता तलाश रहा हूं- बिना लिप्यंतरण के सहारा लेकर। कार्यक्रम एचपी / मर्क्यूरी के क्विकटास्ट प्रो के लिए लिखित एक वेब एप्लिकेशन के लिए स्वचालित परीक्षण मामले हैं, और मैं उन्हें सेलेनियम के लिए परीक्षण के मामलों में बदलने की कोशिश कर रहा हूं। सौभाग्य से, परीक्षण ब्लॉकों और मुहावरों (बड़ा कार्यक्रम) के पुस्तकालय का उपयोग करते हुए, अच्छी तरह से लिखे जाने वाले परीक्षणों में दिखाई देते हैं, इसलिए परीक्षण मामलों वास्तव में एक डोमेन-विशिष्ट भाषा के समान होती हैं, वे VBScript करते हैं और QTP- पुस्तकालयों के अंदर दफन कर दिया। आदर्श रूप से, जो मैं खोज रहा हूं वह एक ऐसा उपकरण है जो वीबीएसपीटी से सी # के लिए डीएसएल-ईश परीक्षण मामलों के लिए और अधिक जटिल भवन-ब्लॉक पुस्तकालयों के लिए वाक्यविन्यास परिवर्तन कर सकता है । यह मुझे पुस्तकालयों की मैनुअल सफाई के साथ छोड़ देता है, और परीक्षण के मामलों में संभवतः बहुत कम काम करता है। अगर मुझे एक VBSc

How can I make python be more friendly regarding reading and writing Unicode text files? -

I have found that even modern Python version (such as 3.x) detects BOM on text files Not able to. I would want to know whether there is a module that Place the can open add this feature missing Python () are and codecs.open () read more Work files to write text The suggestion of the solution still sounds good for me (here is the modified version of that code, however example of the Python 2, Python 3, and using a): # / usr / bin / python # - * - coding: utf-8 - * - import Codex, Access, cis logging .basicConfig (level = logging.INFO) bomdict = {codecs.BOM_UTF8: 'UTF8', codecs.BOM_UTF16_BE: 'name of UTF-16BE', codecs.BOM_UTF16_LE: 'UTF-16LE'} def read_unicode (file ): The_text = open (file name, 'r'). Read for Baum (), Bombed in encoding Items (): If The_textkstartswith (Bom): logging.info ( 'got BOM,% using S, encoding) the_text = the_text [len (Bohm):] Break: logging.info (' No, BOM, UTF-8 ') encoding = "UTF-8" Retu

java - How do I get the IPv4 subnetmask on interface with both v4 and v6 address? -

I have an interface address that gives an IPv4 address (4 octets). However, the network prefix length is for the IPv6 address associated with the interface (it is returning as 128). How do I get the correct network prefix length? enumeration & lt; Network Interface & gt; For NetworkInterface.getNetworkInterfaces () (; interfaces.hasMoreElements ();) {From the last list & lt; InterfaceAddress & gt; InterfaceAddresses = interfaces.nextElement () getInterfaceAddresses (); For (Last Interface Address Address: Interface Attachments) {Insert (Address Gateadder (.) GetAddress (). Length == 4); // [sic] emphasis (address.getNetworkPrefixLength () <32); // & lt; - Failure actually, I think this is a bug in the original code. In fact, 128}} Both of you JVM's v4 for the same interface When v6 addresses, it gets confused. / Html>

disassembling - Assembly instruction address -

Why every time I'm the same. Exe sends the same instructions to the file, then is the same address? And what is it (RAM? HDD? Virtual?)? The basic idea is to allow programs portability and separate programs without any conflicts Allow to run, which is basically you are looking at relative addresses, which is translated for the actual address of the OS while running the program. All addresses are required for instructions such as other instructions such as jump references.

regex - PHP, what is the better choice for removing a known string? -

I'm looking for another string to search and replace a known string. Should I use str_replace () or preg_replace ()? The string to be replaced will be the same as [+ qStr +] , [+ bqID +] , or [+ AID +] Searching for a code in Chuck: & lt; Li & gt; [QStr +] & lt; Ol class = "mclfa" & gt; & Lt; Li & gt; Input = "radio" name = "[+ bqID +]" id = "[+ bqID +] _ [+ AID +]" value = "[+ AID +]" /> & Lt; Label = "[+ bqID +] _ [+ help +]" & gt; [+ Astr +] & lt; / Labels & gt; & Lt; / Li & gt; & Lt; / Ol & gt; & Lt; / Li & gt; I would like to change the strings with a result from a MySQL query, and at 200 times this verb. Which function would be the fastest way to take str_replace () or preg_replace () the easiest and / or faster way. If your string is fixed, and you do not need regular expressions, always str_replace Use it because it will be faster

android - OBDKey Bluetooth -

I want to connect my Motorola Dried with Bluetooth to OBDKey I use BluetoothChat as an example to connect to Bluetooth, as the KWP protocol then I byte [] command [/ p> < Code> command [0] writes = rawToByte (0x02); Order [1] = rawToByte (0x85); Order [2] = rawToByte (0x05); Order [3] = rawToByte (0xc7); Order [4] = rawToByte (0x33); Order [5] = rawToByte (0xf1); Command [6] = rawToByte (0x00); Order [7] = rawToByte (0x00); Order [8] = rawToByte (0x00); Command [9] = rawToByte (0x00); Order [10] = rawToByte (0x00); Order [11] = rawToByte (0x00); Order [12] = rawToByte (0x00); Order [13] = rawToByte (0x00); Order [14] = rawToByte (0x76); Where the function is "rawtoobyte": public static byte rawtoobayte (int b) {return (byte) (0xff & amp; b); } This value is the first command sent to the OBDKey device byte 0x02 in the result, so this value copies. what I have done? OBDK is an ELM327 based Bluetooth OBD adapter. This deal is similar to the

code analysis - Resharper 5.0 slows down VS 2008 after license is added. Especially ASPX pages -

I just bought a license for ReSharper 5.0 and editing ASPX pages is almost impossible. I have read somewhere that I can disable code analysis on a single page with "Ctrl + Shift + Alt + 8" with the following command. But this is not working too. Is there any way to disable reverse code analysis on all ASPX pages? Try Resorrect 5.1, this is better optimized in specific ASP.NET scenarios.

paint - Straight Line Equation between two points -

I need to paint the line that combines two points. I am doing it in Java, I get two points in the form of parameters and I have to calculate that the direct line between them is inside the black shape. I developed my own solution using the straight line equation, but my result was "professional" program (like GIMP or MS Paint). Here is an example that I want to: But my algorithm does this: * Green color is out of figure and this is not possible. Any thoughts? Anyone knows what code is using this in the "professional" application? Thank you! Daniel. Edit: Images It looks like you're sorting instead of the intersection Hard to see on those small black ink splotches to the nearest pixel. Can you post code?

jquery - How to do REST with PUT and DELETE -

यह विधि के प्रकार विकल्प के बारे में बताता है ("पोस्ट" या "प्राप्त") करने के लिए अनुरोध के प्रकार, डिफ़ॉल्ट "GET" है नोट: PUT और DELETE जैसे अन्य HTTP अनुरोध विधियों का भी यहां उपयोग किया जा सकता है, लेकिन वे सभी ब्राउज़रों द्वारा समर्थित नहीं हैं। तो ... क्या इसका मतलब यह है कि पुट और डेलेटे काम नहीं करेंगे यदि ब्राउज़र इसका समर्थन नहीं करता है, या सिर्फ उस पुट और डिलीट को ब्राउज़र में उपयोगकर्ता द्वारा मूल रूप से नहीं किया जा सकता है? अगर मैं उन लोगों का उपयोग नहीं कर सकता या नहीं, तो लोग आम तौर पर इसके बजाय क्या करते हैं? इसके बजाय विधि को एक GET या POST पैरामीटर के रूप में भेजें? या? पुट और हटाएं काम नहीं करेगा अगर ब्राउज़र नहीं करता इसे समर्थन नहीं सामान्य समाधान एक अतिरिक्त फ़ील्ड के साथ एक पोस्ट अनुरोध करना है जो विधि को धारण करता है (उदा। POST मानों में _method = "PUT")। कुछ वेब ढांचे (स्प्रिंग एमवीसी, रेल पर रूबी) आपके लिए इस तरह की चीज़ करेंगे

RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' -

मुझे एक रन टाइम अपवाद मिल रहा है java.lang.RuntimeException: आपकी सामग्री चाहिए एक ListView जिसका आईडी विशेषता 'android.R.id.list' है मुझे नहीं पता कि क्या गलत है। @Override सार्वजनिक शून्य ऑन क्रेट (बंडल सहेजे गए इन्स्टैंसस्टेट) {सुपर। कॉन्टेट (सहेजे गए इन्स्टेंसस्टेट); setContentView (R.layout.newslist); mDbHelper.open (); fillData (); } प्राइवेट व्हायर फिलडाटा () {बंडल एक्स्ट्रास = मिलनेंटेंट ()। GetExtras (); लंबे कैटआईडी = एक्स्ट्रास.गेट लाँग ("कैट_आईडी"); कर्सर c = mDbHelper.fetchNews (catID); startManagingCursor (ग); स्ट्रिंग [] = नए स्ट्रिंग से [] {DBHelper.KEY_TITLE}; Int [] से = नए int [] {R.id.newslist_text}; सरल कर्सर एडाप्टर नोट्स = नया सरलकर्त्ता एडाप्टर (यह, आर। लेटाइट.टेक्स्ट_एनसलिस्ट, सी, से, से); setListAdapter (नोट्स); } newslist.xml & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt ; & Lt; LinearLayout xmlns: एंड्रॉइड = "http://schemas.android.com/apk/res/android" एंड्रॉइड: layou

Can TextMate be changed to "shift text to right" by highlighting text and pressing Tab? -

Can "change text to right" by highlighting text text and pressing tabs? Right now it actually replaces the entire selected text with a tab character, but I did not want to do almost anything like this, I think some other editors like Notepad ++ will do. CMD +] will move the text to the right. If you really want to use the tab for that, then create a new order in the bundle editor and paste it into: #! / Usr / bin / enw ​​Ruby $: & lt; & Lt; ENV ['TM_SUPPORT_PATH'] + 'Escape' for '/ lib' Df ASC (SRR) E_SS (SR) Need to avoid inside GHB (/ \} /, '\\}' #Placeholder & S = STDIN. S.empty? Then print "\ t" other print "\ t # {e_sn s}" end then set the equivalent key of the tab.

sql - question about frequency of updating access -

I have a table in the Access database This access database is used on a regular basis, Originally from 9 to 5 Someone else has a copy of this exact table. Sometimes records are added, sometimes deleted, and sometimes data is updated within the record. I need to update the Access database table with either the offsite table every hour. What is the best algorithm for updating the data? Have approximately 5000 records Will it lock the table for a few seconds every hour? The impression is that this question will be given to your previous questions. Together: To find out the presence of a new file "listener" and do something with it Some extensions in a folder To delete file data in your database, doCmd.TransferText Delete records in imported, updated, table based on an imported set of records < / Ol> can be We give you time to give a more detailed picture of it. Tony asked whether both sites are on the same van Wide Area Network). You said t

c++ - question about copy constructor -

मेरे पास यह क्लास है: class A {निजी: int player; सार्वजनिक: ए (int initPlayer = 0); ए (कॉन्स्ट ए और;); & Amp; ऑपरेटर = (कॉन्स्ट ए & amp;); ~ एक (); शून्य foo () const; }; और मेरे पास फ़ंक्शन है जो इस पंक्ति को शामिल करता है: ए * pa1 = नया ए (ए 2); क्या कोई कृपया बताता है कि वास्तव में क्या हो रहा है, जब मैं ए (ए 2) संकलक कॉल को कंसट्रक्टर या कन्स्ट्रक्टर को कॉपी करता हूं, तो पहले से धन्यवाद < / Code> मान लें कि a2 यह a का एक उदाहरण है, यह प्रति कॉल कहता है कन्स्ट्रक्टर। ऑब्जेक्ट के लिए डायनामिक मेमरी पाने के लिए यह ऑपरेटर नया पर कॉल करेगी, फिर यह एक नया ऑब्जेक्ट को मेमोरी में कॉपी कर देगा, फिर उस मेमोरी पर एक पॉइंटर लौटेंगे।

javascript - Safari 5 Extension XMLHttpRequest Error: INVALID_STATE_ERR: DOM Exception 11 -

I'm experimenting with the new Safari 5 extension JS API and I have a problem with ground up, I want to cancel Failed to load the resource: Cancel Then use the XMLHttpRequest, looking at the XMLHttpRequest object, though to get an RSS feed from a website. Situations say: error: INVALID_STATE_ERR: DOM exception 11 I do not know why, but this is my code, I hope I can get some advice if I am wrong: < Pre> var xml = New XMLHttpRequest (); Xml.open ('GET', 'http://year3.gdnm.org/feed/'); Xml.send (); Thanks in advance. Be sure that you have access to your extension on the site in the extension builder. Set the entry level to "All" under the "Extension website access" title or set it to "anything" and provide "year3.gdnm.org" as an allowed domain pattern.

java - question on rss feed application -

इस सवाल का पहले से ही एक उत्तर है: < / P> 1 उत्तर मैं सिर्फ एक बनाना चाहता हूँ सरल अनुप्रयोग जो उपयोगकर्ता को आरएसएस फ़ीड में एक यूआरएल इनपुट और उपयोगकर्ता को सामग्री प्रदर्शित करने की अनुमति देगा। मुझे आरएसएस फीड्स पढ़ने में सक्षम करने के लिए एक अच्छा जावा लाइब्रेरी क्या होगा? < पी - चीयर्स रोम - आरएसएस फ़ीड को पार्स करने के लिए लोकप्रिय जावा लाइब्रेरी है

c - Generating Fibonacci Numbers Using variable-Length Arrays Code Compiler Error -

Compile the error in vs2010 (Win32 console application template) for the code below. How can I fix this? Unsigned long-time sole Fibonacci [numFibs]; Error C2057: Expected Stable Expression Error C2466: Can not allocate an array of continuous size 0 Error C2133: 'Fibonacci': Unknown size Full code is attached (This programming is a sample code in the C-3i book. None modified) Int main () {Int i, numfibs; Printf ("How can you make Fibonacci numbers (between 1 to 75)?"); Scanf ("% i", and numfibs); If (numfibs & lt; 1 || numfibs> 75) {printf ("bad number, sorry !!"); Return 1; Unsigned long time F. Fibonacci [numFibs]; Fibonacci [0] = 0; // Definition Fibonacci [1] = 1; For // (i = 2; i & lt; numfibs; ++ i) Fibonacci [i] = Fibonacci [i-2] + Fibonacci [i-1]; For (i = 0; i & lt; numfibs; ++ i) printf ("% 11u", fibonacci [i]); Printf ("\ n"); Return 0; } Which compiler are you using? And are yo

sql - Getting data from the next row in Oracle cursor -

I am creating a nested tree and I have to get data for the next line in the cursor using Oracle. And I still need an existing line, so proceeding is not a solution example: open emp_cv for sql_stmt; Loop Fetch emp_cv in v_rcod, v_rname, v_level; Remove when emp_cv% NOTFOUND; / * Here v_next_level * / if v_next_level & gt; The code to get is V_level then / * code here * / elsif v_next_level & lt; V_level then / * here code * / else / * here code * if / end; End loop; Close emp_cv; Use lead and leg actions Seed has the ability to calculate an expression on the next rows (the rows that are coming after the current line) and return the value to the current line The general syntax of the lead is shown below: Lead (sql_expr, offset, default) Over (Analytic_clave) sql_expr is the expression to calculate the leading line Offset is the leading line index relative to the current row. Offset is a positive integer with the default. The syntax of the lag is s

Get data on the basis of conditions in entity framework 3.5 with include -

I am using Entity Framework 3.5 for my application. I need load data based on some condition var data = reference from e.employee.Include ("Employee. Projects") where e.IsActive E Choose; Using this, I will get all the employees who are active with their project details. But I only want to load those projects which are active. So, how to load only active projects using the query? Thanks Ashwini No conditional version is included. Take a look at these links and hope they will help.

ide - about HTML code -

Which editor or IDE can I use to write HTML code? I mean, I write my C ++ code in Visual Studio, for example ... so where can I call the HTML code? Read about information about HTML Whatever text editor you want it You can write in it, for example try apatana studio. Just save the file with the .html or .HTM extension and open the file in the browser.

Set focus to textbox in ASP.NET Login control on page load -

I am trying to set the focus of the user name text box inside an ASP.NET login control. I have tried it in some way but no one is working. The page is loading, but not going under control. Whatever code I have here I have. SetFocus (this.loginForm.FindControl ("UserName")); and text box tbox = (TextBox) this.loginForm.FindControl ("UserName"); If (tbox! = Null) {tbox.Focus (); } // if Are you using a ScriptManager on the page? If so, try the following: Public Zero SetInputFocus () {Text box tbox = this.loginForm.FindControl ("username") as text box; If (tbox! = Null) {ScriptManager.GetCurrent (this.Page) .SetFocus (tbox); }} Update: Never used multiview before, but try: Protected Zero MultiView1_ActiveViewChanged (Object Sender, EventArgs e) { SetInputFocus (); }

How can i assign xml scripts in to a php variable? -

मैं एक XML स्क्रिप्ट को PHP चर में निर्दिष्ट नहीं कर सकता। मेरा एक्सएमएल पाठ : & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8"? & Gt; & lt; आरएसएस संस्करण = "2.0" & gt; & lt; चैनल & ​​gt; & Lt; title & gt; coolajax.net & lt; / title & gt; & LT; लिंक & gt; http: //www.hotscripts.com/listings/feed< / लिंक & gt; & Lt; विवरण & gt; कूलजैक्स लिपियों लिस्टिंग विवरण & lt; / description & gt; और मैं इस पाठ को $ xml_header चर में निर्दिष्ट करना चाहता हूं। क्या कोई मेरी मदद कर सकता है? । आप इसके लिए उपयोग कर सकते हैं: $ xml_header = & lt ; & lt; & lt; XML & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8"? & Gt; & lt; आरएसएस संस्करण = "2.0" & gt; & lt; चैनल & ​​gt; & Lt; title & gt; coolajax.net & lt; / title & gt; & LT; लिंक & gt; http: //www.hotscripts.com/listings/feed< / लिंक &am

asp.net mvc - Switched to windows authentication in MVC and screen goes blank! -

Switch to debug mode for window authentication, set NLTM in project options, but when I press it So it only gives me a blank screen! Any thoughts that I can now do? Thank you! If anyone put [authorization] instead of saying [authorized (Roles = "Administrator")] The blank screen has some sort of 401 response. If you are logged in, you will get temporarily through the [authorize] filter Right appears to be a difficult field to be correct

jQuery Tools - make tabs collapsible -

I am using the basic integration of the jQuery tool "tab" function and it's completely I am working with, but this one thing is less on jQueryUI, that there is no way that I can make the tab constraint. This means that you need to add the jQueryUI tab function to collapsible: true . Does anyone know $ ("ul.main_tabs"). Any advice appreciated! ("& gt; Manpane"); answered here:

I want to get the value of an id from a nested div - jquery -

मैं # inner2 का .text () प्राप्त करना चाहता हूं & lt; div class = "बाहरी" id = "बाहरी" & gt; & Lt; div id = "inner1" वर्ग = "इनर" & gt; test1 & lt; / div & gt; & Lt; div id = "inner2" वर्ग = "इनर" & gt; test2 & lt; / div & gt; & Lt; div id = "inner3" class = "इनर"> test3 & lt; / div & gt; & Lt; / div & gt; यह jquery फ़ंक्शन है जिसका मैं उपयोग कर रहा हूं $ ('। Outer')। बाइंड ('क्लिक', फ़ंक्शन () {var one = $ ('# भीतर' + x) .attr ('id'); चेतावनी (एक);}); समस्या यह है कि पहले #id मान अलर्ट में दिखाया गया है। धन्यवाद जीन < P> आप .each का इस्तेमाल वर्ग नाम के साथ divs के माध्यम से फिर से करें और फिर आईडी को प्राप्त कर सकते हैं। यदि आप क्लिक किए गए का आईडी चाहते हैं तो event.target जैसे $ ('। बाहरी') का उपयोग करें। .bind ('क्लिक', फ़ंक्शन (ई) {चेतावनी (e.target.id)

How to register a model in django-tagging anywhere not in the applications? -

Is it possible to register a model in the tagging app or dojo-tagging in my app? The app / map / model is standard way to edit: Tagging tagging from app import. Resistor (mimodel) I want to keep both applications without changes, for example, to be able to pull new versions and replace them, so I tried to do it at the end of the project settings.py, but of course it fizzled out. myappel / Code> (It fails when importing MyModel.) Any other way? You can not do this in settings.py, because the models have not yet been set. One possibility is that urls.py - already exists in admin.autodiscover , so it can also be a good place to call tagging.register . There has been a lot of discussion about this kind of place in the Diego-Developers group, but no firm policy has been reached so far.

geospatial - Unable to retrieve computed distance in Spatial Solr queries -

I agree to use this plugin I have followed the steps involved in the documents and I get the local question OK Do the work. Now I want to get the calculated distance I have added these lines to the solrconfig.xml file: And I've added the standard request handler to "Geostastense" component: & Lt; Arr name = "component" & gt; & Lt; Str & gt; Query & lt; / Str & gt; & Lt; Str & gt; Geodistance & lt; / Str & gt; & Lt; / Arrival & gt; & Lt; / RequestHandler & gt; Then, when I run a query such as "q = {! Spatial lat = 41.641184 tall = -0.894032 radius = 2 calc = arc unit = km} cafeteria" it works , But only for the first time. When I run the same query again, I get this error: Grave: nl.jteam.search.solrext.spatial.DistanceFieldValueSource.getValues ​​at java.lang.NullPointerException (DistanceFieldValueSource .java: 57) nl.jteam.search.solrext.spatial.GeoDistanceComponent.process (g

php - New line before header() -

I am working with a custom Joomla script which generates an image from a blob in a database. However, when we take it from the Apache server to the IIS server, the script is breaking. In the investigation, it seems that now there is a line break that is being added before the header function is run (when I comment on the image part, and "echo" an echo The exam is printed on line 2 of source code. I have gone through the script repeatedly, and through the many files in the component, it may not be known that this new line Where is it coming from. Absolutely. I have tried B_start () and many similar functions, but nothing seems to work. I'm completely out of ideas, and I do not know where to change. This page can be detected, any ideas on the next steps? At the end of PHP files For the extra white space, the PHP file ends with a single return after the last ? & Gt; , inserting the same file in the file / file It is a common error sources in large PHP

c# - DataGridView Autosize but restrict max column size -

In my C # 4.0 application, I have DataGridView of displaying some data. I want the size of the column according to the content, so I'm setting the autistic volume mode to AllCellsExceptHeader. But I want to limit the column to proceed from a certain value. There is a MinimumWidth property ... but unfortunately no MaximumWidth property. Any ideas for how to solve it? In advance, Frank The only way I have this, is that columns To check the width, it has managed to check the width after adding the rows, and if it is above the size of your max, I set it manually after changing the AutoSizeMode column to DataGridViewAutoSizeColumnMode.None foreach (MyView.Columns in DataGridViewColumn c) if (c.Width> myMax) {c.AutoSizeMode = DataGridViewAutoSizeColumnMode .None; C.Width = myMax; } Naturally, you will need to remove AllSellsExceptHeader from AutoSizeColumnsMode when you add / update the process again and again to set / delete lines and what to do.

AMF call vs Javascript call to facebook -

I have a flash application that will be on facebook I was thinking that I currently have two options which I have Javascript calls which will make AJAX calls and will flash the data or return directly to AMFPHP calls and get data in flash. Which will be faster? More importantly, a better approach? amfphp is very compact and calls faster in "transit" than AJAX call, Will also save the round trip The better option depends on what really is, that you are more comfortable.

audio - iPhone 3.5mm jack based application -

I want to encrypt the data through a DTFF encoder and send it back to the iPhone via 3.5mm jack . Is it possible to send data back into 3.5mm jacks? The traditional audio signal is sent to the iPhone 3.5mm jack? Does the DTMF and iPhone's external accessory framework have any provision to deal with 3.5mm jack based input applications? Yes, this is possible. You have to record the input sound and use the DTMF receiver, which is a trivial and low-CPU task nowadays. This subject is not included in the iPhone minor specification. However, users have better ways to communicate with the installed app ...

Flattening hash into string in Ruby -

Is there a way to level the hash into a string, in which the alternate delimiter between keys and values, and key / value Are you? For example, print {: a = & gt; : B, C = & gt; : D}. Fletton ('=', '& amp;') should print a = b & c = d I wrote some code to do this, But I was wondering if there was a clear way: class hash df flatten (keywildmeter, entry delimiter) string = "self" Ish, key, value | Key = "# {entrydelimiter} # {key}" If the string! Fleeton ('=', 'and') = => C = d & amp; a = b ' thanks I can not override .flaton , Which is already defined: Returns a new array which is a one-dimensional flat of this hash, that is, for every key or value, which is an array, Remove in the array. Unlike array # flatten, this method does not flatten by default if it is alternate. That level determines the level of recycling to level the argument. This is the easiest way of doing this that

python - How can I have multiple navigation paths with Django, like a simplifies wizard path and a full path? -

Let's say I have a structure in which there is a structure: system set Set date set name to set some other set Death Ray targets and I want the "back" and "next" button on one page. If you are going through the "wizard", then I want the nav path to be something like the "path" set -> "direct red target" -> "set name" if you have advanced options menu I just want to intersect the options ... "set date" -> "set name" -> "set something" -> "set dead target" -> check. So far, I am thinking that I have to use a different URI, but this is it. How can any ideas be done? Thank you. Take a look at this

data structures - Java and Different Types of Stacks -

Currently only the stack I know is anything about vector, I usually use it instead of the array But I think other types of stacks and they all correspond to different jobs. I am currently working, for this project, I need to put objects inside a stack in a certain position, not always in front of the stack and I have the impression that vector this job Can not be the best class for. Can anyone give me a brief description of the other types of stacks available to me with Java language and their advantages and disadvantages? These names are homogeneous? As if they use only in Java language or do they use computer science as general terms? Thank you You mention that you have things in your 'pile' Are putting in the middle. ' Then I would recommend using the LinkedList If you already got the condition that you need to enter a new element, then it's time to insert it < Code> O (1) . For vector it is o (n) because you need to copy the backing array.

Installing and using django-registration -

Before that I am using some older version of the degogeno-registration which is now disliked because my server Does not allow installing plugins, so I have to use 'Registration' as a separate app for the Django application. Now my question is that I need to amend the registration to run as a DJENGO-AP? Can I just copy 'Registration' in my own Denggo project list, add it to the settings and it should work? There was no such thing as 'backend' defined, now the function is the backend init with get_backend, which takes 'path' as ​​the argument. I think this path is sent through the URL? url (r '^ active / (? P & lt; activation_key & gt; \ w +) / $', active, {'backend': 'Registration Backends.default.DefaultBackend' }, Name = 'registration_activate'), Within this list there is also a init file with default default class, activate and register classes They use both signals. Do I need to bother these si

Ruby on Rails workaround for the mySQL max int: 2147483647? -

I'm trying to use this number: 294670251400 This number will be a feature in a model that keeps the counter tab on the membership card. There are three four digit proud sets in the membership papers. But when I update_attribute to include it, the maximum number of mySQL reset is reset: 2147483647 < P> Does anyone have an alternative solution on this? In your stay, an integer like you: t.integer : Actually_big_member ,: border => gt; 8 Here's a useful one about it.

sql - What is the best practise for relational database tables in mysql? -

I know, there is a lot of information on mysql out there but I do not really answer this specific and really simple question I was able to: Say I have two tables: USERS (with many areas, such as name, street, email, etc.) and group (with many areas Too) relationship (I think?) 1: n, this user can be a member of many groups. What I'm doing is creating another table named USERS_GROUPS_REL. This table has only two fields: us_id (the unique key of the table users) and gr_id (the table GROUPS unique Key) In PHP I do a query to join. Is this "best practice" or is there a better way? Thanks for any indication! Hi all, Thanks for your quick and helpful support, knowing that I was on the right track, enhances my mysql-confidence. : -) Many people commented, my example is not 1: n but many people just as a quick SQL-text: -) Is this the correct word? 1: n many many n: 1 a lot n: many people many? You describe a lot of relationships with that relat

youtube python api gdata.service. requesterror -

I have the following code that is trying to add a set of video to a YouTube playlist < Pre> import urlib, import again gdata.youtube import gdata.youtube.service class reddit (): def __init __ (auto, rssurl = 'http: //www.reddit.com/r/chillmusic.rss' ): Self. URL = rssurl self._downloadrs () def _downloadrss (self): If self.URL.endswith ('.sys'): # Download RRS feed subreddit - Try saving as "feed.rss": print "From RSS Download Reddit ... "urllib.urlretrieve (URL," feed.rss ") Except exceptions: print eDF clean (self): playlist = open (" feed.rss "). Read () links = re.findall ('http: //www.youtube.com \ S +)' for link in the link, playlist): firstpass = link.replace ('& amp; quot; and & gt; [Link] & amp; lt; / a & gt; ',' ') secondpass = firstpace ('& Amp;; Amp; amp; FMT = 18', '') Thresep = secondspace.rele ('& amp; convenience = related', '&

WCF fault logging and SQL Exception 4060 error -

I try to compile / run a sample WCF application from Juval Lowy's website (author of programming WCF services and founder) I'm IDesign) for several days. The example app uses Juval's ServiceModelEx library which logs errors / errors in the "WCFLogbook" SQL database. Unfortunately, when sample application defects, I get the following error: SQL exception 4060: "Could not login" database requested by login "WCFLogbook" Login failed. R \ nLogged user failed for 'Bill-PC \ Bill'. " I have confirmed that the SQL WCFBlogbook database has been created and all of my (Bill-PC) \ Bill) Access to the database Additionally the Port 8006 and Port 1433 Fire Bengal have opened. TCP / IP is enabled and "Allow remote connections from this server" has been checked. I am using the following end point in App.Config file: & lt; Customers & gt; & Lt; Endpoint name = "LogbookTCP" address = "net.tcp: // Bi

c# - What new features are planned for c#5? -

संभावित डुप्लिकेट: सी # 3 LINQ शुरू की सी # 4 शामिल नामांकित और वैकल्पिक पैरामीटर गतिशील समानांतर समर्थन भिन्नता क्या कोई कह सकता है कि सी # के अगले संस्करण में क्या है?

c# - PropertyInfo SetValue and nulls -

If I have something like this: object value = zero; Fu fu = new foo (); Property Info Property = Foo.GetProperties (). Single (P => P. Name == "Intraparty"); Asset .set value (eff, value, blank); then foo.IntProperty is set to 0 , even if value = null . It appears that this is doing something like IntProperty = default (typeof (int)) . I would like to throw InvalidCastException if IntProperty is not a "faucet" type ( Nullable <> or reference). I am using reflection, so I do not know the timing of time if you work on PropertyInfo , how do I do it? You can check for . Property Type ; If . IvValueType is true, and if is Nullable.GetUnderlyingType (property.PropertyType) is zero, then this is a non-empty value-type: (Value == blank & property type.yesweeppe & amp; amp; amp; amp; amp; amp; amp; amp; GetUnderlyingType (property.PropertyType) == faucet) {new invalid CastException (); }

iphone - Populate tableView with more than one array -

short version: A table is a way of populating a specific row with one value from one array, then a Populate the second See the row in the same table with a value from a different array? For example, in cell 1 the first value of the array A will be, the first value of array B in cell 2 will be, the cell 3 will be the first value from the array, etc. Long version: I hope that it is not very misleading. I have an array of names, and then with the work associated with those people, three more arrays, for example, in the name array, Jim, Bob , And there is a lawsuit, and then there is an array for eating, reading and sleeping, which makes every person one of these things every time (all these arrays are populated with MySQL database). The name table is used to populate the root table view. Tapping on one of the names is an extension view controller that has another table view with only three rows, this part is working fine. What do I have to do, when I tap on a name, it goes to see

javascript - redirection follow by post -

Just wondering how the air ticket booking website redirects the user to the airline booking website and then fill out (I think Posting) required information so that the user will be selected as the original page / destination / date? Is the use of technology to open a new browser window and post an Ajax from there? Thank you. It can work like this: on the air ticket booking system you have HTML form < / Strong> If the user submits data, by pointing to some airline booking website (by the action parameter), then the airline booking website has data land and this website issues a request. Generally people want to go back to the first site. This request can be done by sending back url with data. Of course, to handle such URLs, there should be an API on the airline booking site. When you pay online, all kinds of reservations, etc. Not sure how to use AJAX calls, the simple HTML form here is quite considerable. Note that attempts to reach the restricted url can

how to turn off Register_globals in php.ini? hostgator wordpress server -

I'm running an ecommerce topic on the hostgator server, and coming up with this error. Security Warning: set register_globals to off in php ini !! This topic will not work otherwise. I can not find php.ini in any folder. Any recommendations? Otherwise. You should put in your root folder the file is not php.ini But .htaccess . Ensure that this line contains: php_flag register_globals off If it still does not work or generates a 500 internal server error, then your Contact the nearest Hostgator and see what they say.

c# getting a string within another string -

I have such a string: some_string = "SMS text is a simple Demo messaging. \ R \ n + CMGW: 3216 \ r \ n \ r \ n oak \ r \ n \ " im coming from vb.net and in c # Need to know, if I know the status of CMGW, how can I get 3216 "" from there? I know that my starting should be the situation of CMGW + 6, but how will I stop it soon Again, my last result should be 3216 Thanks! index \ r at the beginning of the place where you are interested , And use it: / / Product code: Add verification here. // (check for each index -1, which means "not found") int cmgwIndex = text.IndexOf ("CMGW:"); // just a helper variable; The code below creates a little pretty int startIndex = cmgwIndex + 6; Int crIndex = text.IndexOf ("\ r", startIndex); String middlePart = text.Substring (startIndex, crIndex - startIndex);

Rewriting a simple Pygame 2D drawing function in C++ -

I have a list of 2D vectors (say 20x20 / 400 points) and I want to put these points on one screen like this Dragging: For the line in the grid, : for the row in point: pygame.draw.circle (window, white, (particle.x, particle.y), 2, 0) Pygame.display.flip () #REDRO to the screen It works perfectly, but it is very slow I hope. I want to rewrite it in C ++ and hopefully some stuff is doing a unit on C ++ ATM, this will help in this way. What is the easiest way to approach this approach ? I have seen Direct X, and so far have followed a set of tutorials and pulled some basic triangles. Even though I can not find a simple dot point. DirectX does not have a function for drawing, only one point is running on top and index buffers . If you just want an easy way to make a point, then you have to write a cover. You will need to use DropPrintive (, ...) to draw points lists. However, there will be no easy way to plot just one point. You have to prepare the buffer, lock it, fill i

.net - Search images using c# in local images folder -

We have such a picture folder in which it has approximately one million images, we have to write the program that is the user Will receive the image on the basis of. When searching for the correct image we need to match the file names. Based on the operating system looking for any suggestions, I recommend that you use Indexing Service, Windows Desktop Search, or The latest version of Windows Search fixes the problem of files based on the search of your keyword, it addresses performance issues in relation to the number of files in a folder, it is scalable, and easily expanded. DSearch sample is almost exactly what you want and easy to implement. For example, if lakh files are being checked and you need to move the file to increase performance in subfolders, you can simply create folders and move files. You will not need to change any code. If you need to change how keywords are applied, such as using the keywords of the file's summary properties, then you only need to ch

php - Compute column widths in a HTML-like manner (based on cell contents) -

I have a grid of data that I want to export in RTF, PDF etc / generator. What I am missing is that the HTML table is automatically adjusted for the width of the column based on the length of the stars in the cells (string is a line break which makes things a little complicated, Because they should be protected). I need an algorithm, that the contents of cells (plain text), the total width of the table and an average width of a character will return the width of each column. If something is already available then I do not want to replace the wheel again. Certainly this can not be true when the font width is complete, but an approximation must be corrected only. Or maybe there is a configurable table with width for each character. Any sign will be appreciated It is not easy. In PHPExcel, when a cell is set to Autowidth, we use the gd library's imagettfbbox () function // font size actually supplied in pixels in GD2 But since GD 2 72 takes the DPI, pixels and dig

documentation - should I use LaTeX and why (not)? -

I am a student, and just finished this last semester. This summer I am working on a project whose There will be a lot of documentation and reports needed, and whenever I think of style in Word or OpenOffice, I tease every time. I want to learn Latex for a while, but I think I can not help; it's worth it? Is anyone really using it except for academics? Is it appropriate to take the time to use it efficiently? What are professional and cons? This is definitely worth the time, I see it in this way, even if you have all available Discontinue modules that make things easy, will you spend your time formatting your content or creating your own content? After finishing the initial learning phase, you feel that using traditional word processing is less skilled than latex.

Visual Studio 2010 Themes, change Parameter Help background color -

Image
Recently I installed Visual Studio 2010, it was working very well, though my text color theme () With the problem, and the colored parameters of Extension feature. Since the next color of the subject text is gray, when the power tools extension shows the parameter help tooltip using my text colors, it is not readable: What is the method to change the color of the parameter help background? OK, I found the answer: Aikel Burgess Hi, You can customize the background color of the parameter help tooltip by using the option on "Tools-> Options-> Environment-> Fonts-and-color-> .signature help tooltip background" by modifying the background color This feature should be better with your dark subject. I hope this helps! Akil I hope it helps! Akil I did yesterday and now it looks great!

postgresql - postgres too slow -

I'm testing extensively on a postgraduate database ... So basically I have 2 tables where I put 40,000,000 records, let's call Table 2 at 1 and 80.000.000 After that I have removed all those records. Now if I select from Table 1 * I do not understand what is happening? Can anyone help me on this? If you delete all the rows from a table, then mark them as deleted But actually, the disc is actually not actually removed from the disk. To remove them, you need to perform a "vacuum" operation - after such a large deletion, after some time it should be brought in itself. However, it will take only a small amount of space without leaving "vacuum full" in empty space, leaving pages blank. If you want to delete all the rows regularly from the big table, instead of "sorting", which simply chants the table data file.

visual studio - A way to "improve" write coding in vs2008 experience -

I want to try automating some recurring jobs to develop the asp.net application For example, for every & lt; Asp: button & gt; For , I would like to insert classical code onomouseover = "... some" onmouseout = ".. some-again .." Is this code to automatically add "piece" in 2008? Some important combinations to add a "pre-made" piece of code? Thank you Try to use code snippets.

jsf - Validating a wrong date entry in rich faces -

In one of our functionality we have some date fields for inline editing where we have enabled manual input if rich: The calendar component, if we manually enter the wrong date or junk data, this action method will not call either. According to our requirement we need to display an error message for date verification for these types of fields. Is there a way to find that the date entered in the calendar field is inappropriate with this component. Code for reference: & lt; Rich: calendar id = "actualOpeningDtCal" is provided = "# {! Blank aProgram.id}" value = "# {aProgram.actualOpeningDate}" placeholder = "Dd-mmm-yyyy" inputSize = "20" enabledInnual input = "Right" date pattern = "dd-MMM-yyyy" button symbol = "..// content / images / calendar" showWeeksBar = "false" showFooter = "false" & gt; & Lt; A4j: support event = "onunputblur" render = "alight"

mysql - calculate a sum of type time using sql -

How to calculate the timing of this column called "TimeSpaint" in my colon: HH: in MM SQL? I'm using MySQL. The type of my column is time. Contains this structure from time to time 10:00:00 12:00:00 02:00:00 from time to time 08:00:00 09:15:00 01:15:00 time total time spent 03:15:00 SELECT SEC_TO_TIME (SUM (TIME_TO_SEC (`timeSp`)) YourTableName as time has worked for me Hope this helps.

c++ - Does any compiler support constexpr yet? -

I want to play with constexpr , does it still support a compiler? Apache is in the Stdcxx project, it has been updated on a regular basis and most modern C ++ compilers Is covered. According to this, only GCC 4.5 supports constexpr (note that this support can be experimental). What is said in this list and comments, it seems that the answer is "no".

user interface - How do I export GUI mockups to Python GUI code (e.g. wxpython)? -

I want to take my mockup and export them into any code using Python GUI library (wxpython, pyqt, etc.) Want to do For example, this capability already exists for mockup-> html / javascript: tool such as Boa Constructor. Is there a combination of a tool for a mocking / exporting python? You can use the tool to make your mock-up and then pyuic4 < Using the / code> command line tool, you can convert .pro to python code. If you get stuck, then here are some references:

iphone - How can I restore the back button in UINavigationController? -

मैंने अपना खुद का बाएं बर्न बटन बनाया है: UIBarButtonItem * homeButton = [[UIBarButtonItem alloc] InitWithBarButtonSystemItem: UIBarButtonSystemItemBookmarks लक्ष्य: स्वयं कार्रवाई: @selector (homeButtonClicked :)]; Self.navigationItem.leftBarButtonItem = homeButton; मैं मूल वापस बटन कार्यक्षमता प्रोग्राम को कैसे पुनर्स्थापित कर सकता / सकती हूं? वापस बटन UINavigationController 's popViewController को कॉल करेगा, ताकि आप अपने homeButtonClicked पर: चयनकर्ता को कॉपी कर सकें।

iphone - How to get the title and subtitle for a pin when we are implementing the MKAnnotation? -

I have implemented the Mk animation as below. I will keep a lot of pins and information about all those pins is stored in an array Is performed. Each member of this array is an object whose property will give value to the pin's subtitle and title. Every object matches a pin but when I click on the pin, how can I display these values? @ Interface user annotation: NSBJack & lt; MKAnnotation & gt; {CLLocationCoordinate2D Coordination; NSString * title; NSString * subtitles; NSSTING * city; NSSTING * Province; } @ Property (Nonatomatic, Assign) CLLocation Coordinate 2D Coordination; @property (nonatomic, retain) NSString * header; @product (nontomic, retten) nsstaining * subtitles; @protecti (nanatomic, retten) nssting * city; @property (nonatomic, retain) NSString * province; - (id) initWithCoordinate: (CLLocationCoordinate2D) c; More. M is @implementation UserAnnotation @ synthesis coordination, title, subtitle, city, province; - (NSString *) Title {Return Title;

Ruby on Rails and Domain Driven Development -

As I know that Ruby on Rails are using active record tables per class strategy < P> I wonder if it is possible to use rail in a domain driven design style, which requires an ORM, which has a high level of data model like NHibernate. Best regards, Alexey Zakharov You may want to check It works with Ruby and Ruby on Rail, and here's the support for changing ActiveRecord in Rail 3:

sql - What do C# Table Adapters actually return? -

Stack Overflow ! I am working on an application that manilates the SQL table in a windows form so far, I am only using pre-generated fill queries, and remove auto-generated updates and queries (Which does not return anything). I am interested in accumulating the value of a single value in a single column (a 'Nature (15)' name), and although I can easily get that code back for application, It's written, I do not know what will be returned to it like . Contact [name before contact] contact where [contact id] = @ current installer what results directly as a string Can be stored? Do I need to put it? Call a toString method? Thank you: Interestingly enough, the following tasks: string first name = this.contactSkillSetTableAdapter.GrabFirstName (userKey); The joys of the Visual Studio Data Wizard, I think A TableAdapter is used to fill a DataTable The result of your example query will still be datatable but with a single column in a single row. You ca

c# - How to call wcf methods from client proxy -

I have created a WCF service, which is working fine, now I want to consume it in the client application. Using SVCutil.exe, I used to get the proxy and app for that service. The settings have been generated and the client is added to the SNN (console application) But the problem is that I am unable to reach WCF methods. System. Using the service model; Namespace WCFClient {class program {static void main (string [] args) {program p = new program (); P. // wcf methods are not found}}} What am I doing wrong? depending on where your service is. When you make service references, you have given it a name space name - in that namespace, a class (your name) client - one of the instantiante and walk it out. You should find those files below service reference - If you click on the "Show all files" button in the Solution Explorer, then you will start seeing a ton of files in your service context - especially one reference.cs should be. Those sections are defined in

android : how to run a shell command from within code -

I am trying to execute a command from within my code, the command "echo 125" / sys / devices / Platform / Flashlight.0 / leds / flashlight / brightness "and I can run it without problems with ADB open I am using runtime class to execute it: < Pre> runtime.) .exec ("echo 125> /sys/devices/platform/flashlight.0/leds/flashlight/brightness"); Although I have a I get the permission error because the sys directory I do not have access. I have also tried to place the command in a string [] if the problem happened due to the empty space but it did not make much different. Find out the solution? The phone needs to be rooted, after that you can do something like this : Public static zero DoCmds (list & lt; string & gt; cmds) throws exceptions {process process = runtime .Greattime (). Exec ("su"); DataOutputStream OS = New DataOutputStream (process.getOutputStream ()); For (String TMPCMD: CMDS) {OIITTITITES (TMPCMD + "\

linux - Bash: Is it ok to use same input file as output of a piped command? -

Consider something like this: cat file | Order & gt; File Is this a good practice? Can this input file overwrite the same time as we are reading it, or does it always read in the first memory, then it is piped in the second command? Obviously I can use temp files as an intermediate step, I'm just thinking .. T = $ (mktemp) cat file | Order & gt; $ {T} & amp; MV $ {t} file No, that's not okay. Perform all orders in a pipeline at the same time, and prepare the redirection before executing the shell command. Therefore, it is possible that the cat will overwrite the command file before being taught the file. You need more than that.

equality - Unexpected results with OCaml != -

What can I say, = and! = OCaml is supposed to work on strings. I'm seeing strange results, though I want to understand better. When I compare two stars = I get it, then I hope the result will be: # "steve" = "steve" ;; -: bool = true # "Steve" = "line" ;; -: bool = false But when I try! = I do not: # "steve"! = "Rowe" ​​;; -: bool = true # "Steve"! = "Steve" ;; (* Unexpected - should not it be wrong? *) -: bool = true Can someone explain? Is there a better way to do this? ! = is not = Disclaimer & lt; & Gt; is a disapproval of = that you should use: # "Steve" ! = == is rejected, and if you are starting an orcham, then you should not use any of them yet. They can be a little tricky, and they are officially underspecified (only guarantee that if there are two values ​​ == they are = ).

java - Add an Expires or a Cache-Control header in JSP -

How do you add a ending or cache-control header? In? I would like to add an end-of-future expiration date for my static components such as images, CSS, and javascript files. In this way you do not need to copy it on all JSP pages and they are cluttered with scriptlets To enable browser cache, add static components such as CSS and JS to a common folder such as / static or / resources Create Filter , which is mapped on url-pattern / static / * or / resource / * and basically nim Not doFilter () Method: httpResponse.setDateHeader ( "> / Ul>

permissions - Access to a oracle Database -

I have created a database in Oracle, say "Temp" is the name of the database created. I created a user DWH. Now I have user I would like to give access to TEMP for DWH. How do I do? When you say that you have created a user DWH, do you have operating system level or database Are at the level? If you have created a database user Anyway, there is a command to create a user in the database create a user DWH identified with password; Now if you want to be able to connect to the database and create a table, then you need the following to make the session a DWH session ; Change User DWh Default Tablespace User to Quota 100m; Grant for creating table for DWH; You can also give other permissions. You can also create permissions in the role and create the role.

Symbian/S60 audio playback rate -

I would like to control the playback rate of a song, while it is playing. Actually I want to play it a little bit fast or slow when I say to do this. In addition, it is possible to playback two different tracks at the same time, recording in a track with tools and asserting a different track in a different track. One of these tracks should be able to change the playback rate in "real-time". Is this possible on Symbian / S60? This post is possible, but you have to: Converting the audio data to PCM, if it already has this Format This PCM stream process in the application to change playback rate Render audio through CMdaAudioOutputStream or CMMFDevSound (Or, if you use QT ) In other words, no API is available to change the platform automatic audio playback rate - Your application will need to be processed directly on the audio stream. To play multiple tracks simultaneously on the basis of the device, the audio subsystem gives you one or more streams togethe

How to edit subviews of a custom cocoa plugin -

If you add a custom view to an xib, add a text field, you can select the textfield and add properties Can edit If I am creating a custom view as a plugin and it has a text file as a child view, how can I edit textfield values ​​when I use the plugin?

c# - In .NET, How can I draw shapes on a picture? -

I am doing a software where I need to put square border areas on a satellite map (.pgg image) Can be clicked on. What is the best way to add images to the pictures and add them to the data? Overlay Custom-Draw UserControl at the top of the image control. Make it transparent to reveal the underlying image, but still be able to capture mouse interaction. You must calculate the precise location of your control (pixel offset from the top-left corner of the map) overlay the appropriate map area. How do you calculate the offset and the actual size of your custom control map zoom level Depending on and you use GPS coordinates or image detection, to determine which area should be overlated.