Posts

Showing posts from June, 2012

ruby on rails - The email body is missing when I send mails with attachements using ActionMailer -

Content is not being displayed in the scene. Only the attachment being sent will be appreciated! def> subject = "state of PIS app" @recipients = "ssg@gmail.com" @from = APP_CONFIG [: email] @sent_on = time.nh # @ content_type = " Text / html "content_type =" multithread / optional "attachment: file name = & gt; "Report.html" ,: content_type = & gt; "Text / html" ,: body = & gt; File.read ("/ home / shreyas / repos / mysorepoc / app / model / new1.html") end When using an attachment, you need to specify a separate text portion: def Send topic = "PIS app status" @recipients = " Ssg@gmail.com "@from = APP_CONFIG [: email] @sent_on = time.new # # content_type =" text / html "content_type =" multipart / mixed "section: content_type = & gt; "Text / plain" ,: body = & gt; "Body content" attachment: file name = & gt; "...

domain name prefix 'www' -

In the domain name, most of the prefix 'has started with' www '. Is it used like standard? Ifnot, I know, why? stands for www World Wide Web

sysadmin - MYSQL ADMIN TASK -

Any MySQL administration can help me with the task, I want to know how Maintaining the database is space, index, cache etc. .. MySQL secure information related. Thanks in advance thanks !!!! Riddi What kind of maintenance are you doing? Your question is not very clear. I suggest doing something that will support all your basic MySQL administrator functions. It is also free to download and use, and is quite well supported.

Attaching Files to Email in App Engine? -

How do I add files located on a web url in an email using Google App Engine (Python)? I have a file that says: I want to add it to the email and send it to a user on the app engine. How do i do this To send the attachment, you must fill the attachment area of ​​an email message with two filenames and file content Google.appengine.api import urlfetch from google.appengine.api import mail url = "http://www.abc.com/files/file.pdf" results = urlfetch from Get (url) if result.status_code == 200: document = result.content mail.send_mail (sender = "youremail@yourdomain.com", to = "receiver@hisdomain.com", subject = "the file you wanted ", Body =" here is the file you have found ", attachment = [(" file name .pdf ", document)])

gcc wont compile and run MySQL C libraries -

#include & lt; my_global.h & gt; # शामिल करें & lt; mysql.h & gt; Int main (int argc, char ** argv) {printf ("MySQL ग्राहक संस्करण:% s \ n", mysql_get_client_info ()); } ~ $ gcc -o mysql-test MySQL-Test.c इस टर्मिनल से इस परीक्षा कार्यक्रम को निष्पादित करने की कोशिश कर रहा हूं लेकिन मिल निम्न त्रुटि संदेश: /tmp/cceEmI0I.o: फ़ंक्शन में main ': MySQL-Test.c :(। पाठ + 0xa): mysql_get_client_info' के लिए अपरिभाषित संदर्भ क्या गलत है? मेरा सिस्टम यूबेंट्यू MySQL एक विशिष्ट स्क्रिप्ट के साथ आता है जिसे mysql_config । यह आपको अपने MySQL ग्राहक को संकलित करने और इसे MySQL डाटाबेस सर्वर से जोड़ने के लिए उपयोगी जानकारी प्रदान करता है। पास - libs विकल्प - MySQL क्लाइंट लाइब्रेरी से लिंक करने के लिए आवश्यक पुस्तकालय और विकल्प। $ mysql_config --libs विशिष्ट आउटपुट: -L / usr / lib64 / mysql -lmysqlclient -lz -lcrypt -lnsl -lm -l / usr / lib64 -lssl -lcrypto अब आप इसे अपने कंपाइल / लिंक लाइन में जोड़ सकते हैं: जीसीसी-ओ माइ...

c# - Mail header "From" sometimes not encoded with System.Net.Mail and .NET Framework 2.0 -

Greetings. I have seen some other question entries here, like, but not as soon as I am getting the same problem. Perhaps a guru has experienced such a thing in the past. Actually, I'm building an ASP.NET 2.0 web application, which sometimes needs to be sent to an e-mail (using System.Net.Mail), and I'm curious And I am facing incompatible behavior. Sends it for all e-mail messages, it's a single e-mail address, display name and encoding ("code" encoding UTF8 ) For which an MailAddress object has been created). The display name is always a word, in which there is a non-ASCII character. Each type of message has its own way MailAddress and MailAddressCollection before they come from a common method, such as, from, to topic, body ( Who actually post a message using a mailsize object and a smtpClient object). / Li> Most message types are generated correctly, base 64 and UTF-8 encoded headers (including "to"). For a specific type o...

wpf controls - DatePicker day colors WPF 4 -

I have the following style for the text block in the dictionary & gt; Style target type = "{X: type text block}" & gt; & Lt; Setter property = "horizontal alignment" value = "left" /> & Lt; Setter Property = "Workspace Tracing" Value = "Center" /> & Lt; Setter property = "margin" value = "5,0,0,0" /> & Lt; Setter Property = "Foreground" Value = "White" /> & Lt; / Style & gt; After setting it up in the Resource dictionary, the foreground color in the text block used in my project is white which I have set, now the problem is that the datapicor control Displays the selected date when open, as I set the white color foreground color for the text block in above style, date picker is not showing control dates. Please help me get trapped in this problem as soon as possible: ( You can use additional style For your DatePicker: Date picture &...

linux - Python Fuse calling 'readlink' 6 times in a row -

I am implementing a file system using Python fuse. In a directory, there is only symlink and as such I return back to S_IFLNK | 0777 getattr method on. Now, when I do a ls on the directory, I think the Linux call notice in the directory every method is 6 times in a row for em> entry. Is this a bug on my side or general behavior? Well, it definitely is not more than once called readlink ls. Unless you are calling with this unusual flag $ ls share $ ls -l total 0 lrwxrwxrwx 1 entropy users entropy 14th August 8 14:26 entropy - & gt; / Home / entropy / LR vSvarVix RWX1 entropy user 11 Aug 8 14:18 Share - & gt; / Usr / share / $ ltrace ls 2 & gt; And 1. Grep readlink $ ltrace ls -l 2 & gt; And 1. Grep readlink readlink (0xbfdbb6c0, 0x9549b90, 15, 0, 0xb75ceec8) = 14 readlink (0xbfdbb6c0, 0x954a148, 12, 0xbfdbb992, 0) = 11 $ Looks of things here with ls No flag is ever called the redlink, and it is called only once per link if the long flag ...

java - Display Manifest properties in JSF2 -

What would be the best way to reach a in the manifest attribute (/META-INF/Manifest.mf) ? Net JSF2.0 application? Pre> @PostConstruct is public init () {try {InputStream = FacesContext.getCurrentInstance (). GetExternalContext (). GetResourceAsStream ("/ Meta-INF / MANIFEST.MF"); Manifest = new manifest (); Manifest.read (is); } Hold (IOException ioe) {logger Terror ("Unable to read MANIFEST file from classpath.", Ioe); }}

apache - Redirect URL to another URL -

I have the following scenario and it is unsure about how to solve it. Actually there is the following page that a user can go where this URL exists in their email. For example: http: //www.abc.example/yourdetails.html My question is, I have now been told that this The entire web app is moving to a new domain, i.e. http: //www.xyz.example/yourdetails.html assume There is no problem with accessing two domains within that network (intranet), when I click on a link in a user, how can I redirect the user who actually calls the right to call New URL: http: //www.abc.example/yourdetails.html I basically want to make sure that Even if the user has the old URL in his email, when clicking on this old URL, then actually pull on the right URL. Hope this makes sense. Thank you. "post-text" itemprop = "text"> If the site structure is not changing, you will see the abc in the DNS. Can point to the xyz.com domain at com. I think that you ca...

C++ Prime number task from the book -

I'm starting a C ++;) Find all the major numbers between the code below 2-1000 How cool is the way: int i, j; For {I = 2; i & lt; 1000; i ++} {for (j = 2; j & lt; = (i / j); j ++) {if (! (I% j)) break ; If (h & gt; (i / j)) cout & lt; & Lt; I & lt; & Lt; "Prime \ n"; }} You stop when j = i have to stop a first simple optimization when J = sqrt (i) (because there can be no greater number of factors than its square root). A very fast implementation is for example. Edit: The code looks something mysterious, so here's how it works: The ending condition for the internal i / J , j (which is very clear), since the end is j == i , then we have i / j == 0 and Will break for. Next check if (j & gt; (i / j)) is really bad; in fact it only checks whether the position of the end of the loop is killed (hence our If we hit for the end, then j == i + 1 (think about it) => i / J == 0 => This is a key if we hit a b...

winforms - Scrolling PictureBox in .NET? -

I have a photo box that is taking 512x512 upwards. This is a big way, I can make it 256x1024 which is better but how can I scroll it out? "post-text" itemprop = "text"> class scrollable image box: picturebox {public picturebox picture = new image box (); Public Picture Box Picture = New Picture Box (); HScroller HScroll = new HScrollbar (); VScrollBar vScroll = new VScrollBar (); Int w, h, scrollAmount; Public scrollfile box (integer w_, int h_, image image, int scroll amount) {AddControls (); Set (w_, h_, img, scrollAmount); } Public ScrollBarb (Box) () {AddControls (); } Public Zero ScrollEvent (Object Sender, MouseEventArgs e) {if (e.Delta == 0) Return; Var v = vScroll.Value + (e.Delta> 120? -scrollAmount: scrollAmount); V = v & gt; VScroll.Maximum? VScroll.Maximum: v; V = v & lt; VScroll.Minimum? VScroll.Minimum: v; VScroll.Value = V; } Zero AddControls () {picCorner.BackColor = Color.Gray; VScroll.ValueChanged + = Vert_EventHandler; This.C...

PHP variable variables in {} symbols -

I get the basics of variable variables, but I have just figured out a syntax, which is a little bit of my brain Will speak. $ this-> {$ ToShow} (); I really do not know what those signs are doing there. Do they have any special meaning? PHP's variable analyzer is not greed {} uses that indicates what part of a variable reference Should be considered and what is not. Consider this: $ arr = array (); $ Arr [3] = array (); $ Arr [3] [4] = 'Hi there'; Echo "$ arr [3] [4]"; Note the double quotation marks. You were expecting it to be output Hello there , but in fact you are seeing Ara [4] because it is the non-redistribution of the parser, it's only a level The array will check the indexing, while the variable will be inserted into the string, then what exactly was seen: $ arr [echo] [3], "[4]"; But, echo "{$ arr [3] [4]}"; Forces all braces as a reference in the treatment inside the braces, and you end wit...

site not found for few seconds in sharepoint -

For two seconds (15-30), sites are not found in SharePoint every day and after that everything is okay. The site is right now It's also going well. I checked all the WFE to check any errors in the event log and I do not see any errors .... Any ideas how can I troubleshoot this problem? I am not sure why this happens, but I think that you have some type of hot script Is required which runs in the morning:

regex - Question about regular expressions -

मैंने इस कथन को देखा $ name = ereg_replace ("[^ A-Za- Z0-9।] "," ", $ नाम); [^ A-Za-z0- 9।] के बीच का अंतर क्या है?] और [A-Za-z0-9।] ? नियमित अभिव्यक्ति की मेरी समझ के आधार पर, [] फ़ंक्शन ereg_replace में replacment के लिए सभी मान्य वर्णों को शामिल करने के लिए उपयोग किया जाता है। तब ^ को [] में शामिल करने का क्या उद्देश्य है धन्यवाद प्रारंभिक ^ एक चरित्र वर्ग के अंदर [...] वर्णों का सेट अपरिवर्तित करता है वर्ण वर्ग के अंदर वर्णित हैं। जबकि [A-Za-z0-9।] ए-ज़ा-जे 0-9। द्वारा वर्णित वर्ण सेट के एक अक्षर से मेल खाता है। , [^ A- Za-z0- 9।] ए-ज़ा-जे 0-9। द्वारा वर्णित वर्णों में से एक को छोड़कर किसी भी अन्य वर्ण से मेल खाता है। क्या ये अन्य वर्ण स्ट्रिंग के साथ परिभाषित मूल वर्ण पर निर्भर करता है। तो [abc] से मेल खाता है a , b , या c और [^ abc] a , b को छोड़कर किसी अन्य वर्ण से मेल खाता है, और ग । आपका उदाहरण कोड उन सभी वर्णों को निकाल देगा जो कि [A-Za-z0-9।] द्वारा वर्णित नहीं हैं। इससे केवल [A-Za-z0- 9।] के । ...

Howto check if a char* points to a string literal in C -

मेरे पास एक स्ट्रेट स्ट्रेट अनुरोध {int code; चार * संदेश; }; कि मैं ठीक से खाली करना चाहता हूं। मेरे पास ऐसा करने के लिए निम्नलिखित फ़ंक्शन हैं: शून्य free_request (struct अनुरोध * रिक) {if (req- & gt; संदेश! = NULL) {नि: शुल्क (अनुरोध- & gt; संदेश); } निशुल्क (रिक); रेक = नल; } समस्या यह है कि जब मैं एक स्ट्रिंग का उपयोग कर बनाया गया अनुरोध को खाली करने का प्रयास करता हूं, तो मुझे "मुक्त (): अवैध पॉइंटर" / सेगफ़ॉल्ट त्रुटि संकलक से मिलता है: संरचना अनुरोध * अनुरोध; Req = malloc (आकारफ (संरचना अनुरोध)); Req- & gt; संदेश = "परीक्षण"; free_request (अनुरोध); चूंकि मैं अलग-अलग स्थानों पर अनुरोध स्ट्रैक्ट्स बनाना चाहता हूं, एक बार शाब्दिक (क्लाइंट साइड पर) का उपयोग करने के बाद और एक बार * सॉकेट (सर्वर साइड पर) से पढ़ते हुए * वर्णों का उपयोग करते हुए मैं था सोच रहा था कि क्या यह सुनिश्चित करने के लिए कोई फ़ंक्शन है कि मैं अभी भी लिखित भाषा को मुक्त करने की कोशिश नहीं करता, जबकि मुझे अभी भी एक मॉलोक का उपयोग करके संदेश को मुक्त करने की इजा...

http - Using Cucumber/Capybara in Rails 3, how do I set a custom User-Agent string? -

In my Rail 3 app, I have different layouts for the iPhone vs. desktop browser. I use cucumber / capebara I'm trying to test the iPhone layout. Until now, all attempts to set an iPhone user-agent string in the HTTP header of the request have failed. I followed the tutorial but requested not to set user-agent string in HTTP. If I only browse my rail app using my iPhone app, then I get the right layout. I am using to set up Rail Request. Iphone How to do this work but any thoughts? I'm about to go back to Capybara ditch and Webrat. Here's what I have till now :. Feature: Browser Detection Ranking To Keep Different Layouts For iPhone vs. Desktop Browsers As a Developer I want to show different layouts for different browsers. Scenario: Show the home page with the desktop layout, I'm using "a desktop browser" when I go to "home page" then "Desktop Browser" scenario: Show the home page with the iPhone layout I "Mobile Safari ...

Can I delete repositories from mercurial-server? -

I created a repository in the form of a test some time ago but now I want to make a separate repository with the same name - Is there a way to remove an existing repository using the mercurial-server, and create another with the same name? Or perhaps there is a way to overwrite the contents of a repository? Mercurial repo bus file system paths, so you can remove repo and rebuild that new location It should not be the place which should be enabled. It appears that the Mercurial-Server wraps the standard repo with a special restricted shell, which controls access. I have never used Mercurial Server, but I do not know why you can not backup the directory at the file system level, then RM start it and start.

javascript - getelementbyid vs index -

In my intranet web app there is a table of those items, which is currently used to select the line ID On selection, the choice is 5-10 selection / second rate due to the nature of ASCIN nature, some discrepancies can be a reason of time and it is very difficult to properly coordinate. The question is by selecting index by fast (via eq tag in jquery) selection from ID (via getElementByID) ? I did some tests and showed that the ID is slightly faster, but I thought I would ask the community for confirmation. I think that despite your conclusions, JLEF has been made up of JavaScript, although I do not know anything To answer this question, jquery is essential. Javascript boils over a layer vs raw javascript and in itself Javascript will always be king in this contest.

difference between binding and binding extension in wcf -

WCF में बाध्यकारी और बंधन विस्तार के बीच क्या अंतर है? WCF में बाइंडिंग का उपयोग करने के तीन अलग-अलग तरीके हैं। आप निम्न कर सकते हैं: WCF के साथ आने वाली डिफ़ॉल्ट बाइंडिंग का उपयोग करें (उदाहरण के लिए wsHttpBinding, webHttpBinding, आदि); एक डिफ़ॉल्ट बाइंडिंग अनुकूलित करें ताकि आप इसे विभिन्न सेवा समापन बिंदुओं (जैसे बाइंडिंग कॉन्फ़िगरेशन) में उपयोग कर सकें; और, अपने खुद के कस्टम बाध्यकारी बनाने के लिए बाध्यकारी एक्सटेंशन का उपयोग करें जो अमूर्त बाध्यकारी वर्ग से प्राप्त होता है जो आमतौर पर पूर्व-परिभाषित बाध्यकारी एलेमेंट्स (जैसे कि आपके ट्रांसपोर्ट और संदेश एन्कोडिंग) से बना होता है। इसलिए, बाध्यकारी और बाध्यकारी एक्सटेंशन के बीच का अंतर अनुकूलन की डिग्री है। 'बाध्यकारी' का उपयोग करना, जैसा आपने कहा था, वाकई पहले से परिभाषित बाइनिंग्स का उपयोग कर रहा है जो WCF के साथ आते हैं। शायद आपकी स्थिति के 60-70% के लिए, जो आपके लिए काम करेगा। एक बाध्यकारी विस्तार के लिए आपको अपना बाध्यकारी वर्ग (सार बाइंडिंग से प्राप्त करना) बनाने की आवश्यकता होती है और आप विभिन्न बाध...

python: generating a histogram -

यह: numpy.histogram ([1,3,2,3,1 , 1,1,1,2,3,2,5,6,6], डिब्बे = एमएमपी.रेंज (0,7,1)) पैदावार: (सरणी ([0, 5, 3, 3, 0, 3]), सरणी ([0, 1, 2, 3, 4, 5, 6])) क्यों यह तीन 6 की गिनती है? केवल 2 हैं! क्योंकि डिब्बे बिन किनारों को परिभाषित करता है एक और बिन जोड़ें numpy.histogram ([1,3,2,3,1,1,1,1,2,3,2,5,6,6], डिब्बे = Numpy.arange (0,8,1))

Simple PHP Screen Scraping Function -

I am using WordPress with autoblogging (i.e., RSS-based blog postings), and all that is missing One component is automatically fill the content of the post with the content that is linked to RSS's URL link (irrespective of RSS resolution). By using standard PHP 5, I get the fetch HTML ([URL]) which is & lt; Body & gt; ... & lt; / Body & gt; tag , I know if there is a pre-order "included" thank you. assuming that it is always & lt; Body & gt; will not be & lt; Body & gt; or & lt; Body style = "width: 100%" & gt; or and body & gt; and & lt; / Body & gt; , and with the warning that you should not use regex to parse the HTML, even if I am about it, here itself: & lt;? Php fetch HTML ($ url) {$ feed = '& lt; Body & gt; There are so many things & lt; / Body & gt; '; $ Content = file_get_contents ($ url); Preg_match ('/ & lt; body & gt; ([\ s \ S] ...

android - Get the alpha of an ImageView -

How can I do this? There is a set alpha, but no getAlpha. There is no easy way to do this. The reason for this is that ImageView is set with bitmap , a StateListDrawable , a ColorDrawable , or something else May have been completely. There is only one color of one of those classes; The alpha varies for every pixel on any other drawable (pixels are in ARGB format, w / 1 bytes each for alpha, red, green and blue). I am pretty sure that the setAlpha () method only works on measures that support it, as outlined above by Sephy. What do you need to know about the transparency of the image? If you know that the image view will be filled in advance, you might already be able to extract the alpha if you do not have direct access to alpha, but you are able to set the color, then alpha color> gt; & Gt; 24 .

php - how do i convert this array? -

मेरे पास निम्न सरणी है: ["addToCart"] = & gt; सरणी (3) {[1] = & gt; सरणी (5) {["aantal"] = & gt; Int (1) ["film_id"] = & gt; स्ट्रिंग (1) "1" ["zaal_id"] = & gt; स्ट्रिंग (1) "1" ["डग"] = & gt; स्ट्रिंग (7) "मादाग" ["सीटें"] = & gt; सरणी (4) {[0] = & gt; स्ट्रिंग (2) "67" [1] = & gt; स्ट्रिंग (2) "68" [2] = & gt; स्ट्रिंग (2) "69" [3] = & gt; स्ट्रिंग (2) "70"}} आप देख सकते हैं कि मेरे पास "addToCart" सरणी के अंदर "सीटें" नामक सरणी है। "सीटें" सरणी में 4 आइटम हैं मैं क्या चाहता हूं कि 4 अलग सरणियां हों, उन्हें सभी एक ही सामग्री होनी चाहिए, लेकिन उनमें से प्रत्येक को "सीटें" के 1 मान होने चाहिए। मुझे यकीन नहीं है कि मुझे ठीक से मिल रहा है कि आप क्या करना चाहते हैं, लेकिन इसका परिणाम सरणी की एक सरणी जहां प्रत्येक में केवल एक सीट होती है: $ seatArrays = array (...

Using the Google Maps Javascript API v3, How do I produce the default infoboxes on click? -

यह है जो मैंने अभी तक किया है। function init_map () {var places = [{नाम: "प्लेस 1", कॉओर्स: नया google.maps.LatLng (30.728752, -73.995525)}, {नाम: "प्लेस 2", कॉओर्स: नया google.maps.LatLng (30.733673, -73.990028)}, { नाम: "प्लेस 3", कॉओर्स: नया google.maps.LatLng (40.725778, -73.992249)}] var myOptions = {ज़ूमः 14, केंद्र: स्थानों [0]। कोड्स, मैप टाइप इंप: google.maps.MapTypeId.ROADMAP, } Var नक्शा = नया google.maps.Map (document.getElementById ("map_canvas"), myOptions); (Var x = 0; x & lt; places.length; x ++) के लिए {var स्थान = स्थानों [x]; Var मार्कर = नया google.maps.Marker ({position: place.coords, title: place.name, icon: icon, clickable: true, infowindow: new google.maps.InfoWindow ({content: "hello world"}}} ); marker.setMap (नक्शा); Google.maps.event.addListener (मार्कर, 'क्लिक', फ़ंक्शन () {marker.infowindow.open (मानचित्र, मार्कर); console.log (मार्कर);}); }}; मुझे अपनी डिफ़ॉल्ट विंडो के बजाय Google मा...

c# - Firing events at microsecond resolution for midi sequencer -

Is there a way to fire incidents in C # on some Microsoft resolution? I am a MIDI sequencer to build, and for this there is an incident on every MIDI tick, which will then run any notes registered at that time. 120 beats per minute and 120 PPKN (beat / quarter note per pulse), that incident should be set fire to every 4.16666 milliseconds. Modern Sequencers have high resolutions such as 768 PPNN, which can be fired every 651 microsounds. The best resolution I found is 1 millisecond resolution, how can I go beyond it? This problem should already be solved by any C # MIDI sequencer or MIDI file player. Maybe I am not seeing this problem right from the right angle. Thank you for your help. Most midi sequencers / MIDI players either change the wave of big time (to play through a computer speaker) or midi A large block of instructions (for an external device connected to an external port). By any means, a block of data is copied to the sound card, and the sound card takes care...

python - Find max length word from arbitrary letters -

I have 10 arbitrary letters and need to check the maximum length of the word file I have started learning RE a while ago, and are unable to find the appropriate pattern The first idea that came was using the set: [10 characters] but It also repeats that the character and I do not know how to avoid I tried to learn dragon recently but RE Before and maybe RE is not required and can be solved without it "Using this:" the itater looks inappropriate, but it may be easy to do (With whom I am not familiar) I think the solution is also known for novice programmers / scripts, but do not thank me I'm guessing that one of the scrabble tiles Magistrate is to discover possible terms given something, so that a letter be repeated several times because it is repeated in the original list. This trick is to test each character of each word in your word file efficiently against its source letter set for each character, if found in the test set, then test it Re...

How to replace multiple strings in a file using powershell -

I am writing a script to customize a configuration file. I want to change many examples of strings inside this file, and tried to use power shield to get me a job. It works well for one place, but doing so is very slow because every time it is complete The file has to be re-parsed, and this file is too large, the script looks like this: $ original_file = 'path \ filename.abc' $ destination_file = 'path \ filename.abc .new '(found-content $ parent_file). Fortech-object {$ _-places 'some 1', 'some 1 NU'}. Set-content $ destination_file What I need is something like this, but I do not know how to write it: $ original_file = 'path \ filename .abc '$ destination_file =' path \ filename.abc.new '(found-content $ parent_file). Fork-object {$ _- replays' some 1 ',' some 1a '$ _-place' some 2 ',' some 2bb '$ _-place' some 3 ',' some 3cc '$ _-' Change some 4 ',' some 4 '...

c# - How to get the parameter declarations as well as the SQL calls of NHibernate? -

When I'm working with NHibernate (I'm starting betting it) I am able to get SQL call in DB. I My production but I can not work after copying and pasting it in Management Studio Because this parameter declarations are missing. I get something: SELECT this_.PK_Product as PK1_1_0_, this_.ProductCode ProductC2_1_0_, Product_3_1_0_ as this_.ProductName, this_. ProductCodeISO2 Manufacturer 4_1_0_ has not been used as this_.NotUsed1_0_, it has been confirmed. The confirmation has been confirmed as 1_0_, this label. LabelReq7_1_0_ as the label tProduct_ here (this_.NotUsed = @ p0 and this_ has been confirmed = @ P1 and this_.labelaruped = @ P2); @ P = = wrong [type: boolean (0)], @ p1 = true [type: boolean (0)], @ p2 = wrong [type: boolean (0)] 'enter code here' > When I execute it in my SQL Management Studio, I get an error: Message 137, Level 15, State 2, Line 1 Scalar Variables Must have to declare "@ p0". Can I tell NHibernate to add param...

datagridview - c# add values/show to DataGridViewComboBoxColumn -

I have a datagroup view that has different rows and columns and when I add value to it, it works perfectly That's why I have a Datagram view of DGV and the following line is working perfectly dgv.Rows.Add (settings [0], string-endanger (setting [1]), setting [2], setting [3], setting [4]); Now there is a new change setting [0] This was a text cell, now it's the DataGrid view combobox column and the value that I have to work on, not working, ... and this new Things Future! How to solve How to add a text value, which will show it as a combo box in the DataGrade Weibo Combobox column ?? Cheers Use one, By the way you can bind a value to a new object (in this case a checkbox) a function trough

postgresql - Values missing in postgres serial field -

I run a small site and postgreSQL 8.2.17 (only the version available on my host) to store the data I use In the past few months there were 3 accidents of database system on my server and every time this table was lost in a table with a serial field (primary key). Now 93 IDs are missing. Tables: create table "registry" ("id" serial not zero, "stewid" character different (11), "strxml" text, "intestatus" integer , "Strideorg" character different (11),) It is very important to me that all ID values ​​are what you can do to solve this problem? You can not hope to keep the serial column in the hole You can apply the inherent key by sacrificing the concurrency, like this: create table registry_lest_id (value int tap); Enter in Registry_last_id values ​​(-1); Become a function next_registry_id () $ int contains the int flawless return value of the registry_last_id set value = value + 1 return value $$; Make the ...

javascript - Will domain sharding of content become redundant? -

Therefore, currently IE 7 can handle images simultaneously from only one domain, so deleting domain is domain shading. What is the future of the future, can new browsers get more flexibility in rendering unnecessary connections? itemprop = "text"> Another advantage of this "domain-shanding" is the cookie information for the request of static content To avoid sending it is to avoid.

mysql - How to verify list of items in a test -

I am writing a test case, where I send a list of strings to save to the database. Then I will retrieve those people from the database and they have to verify that everything is fine. I have written assertNotNull (list) assertEquals (listSize, response.listSize ()) Confirmation is the same but I believe that by the time they are returned, the list of strings is not in the same order. How do you usually verify this type of thing? er ... why not compile the order by creating the initial list alphabetically (or using one) And then use the ORDER BY section in SQL? He said, you may need to iterate through the elements in the list and compare them (as the keys may differ in your original list and which have been obtained from the database) .

opengl - how to compile glblendequation in visual studio 2010? -

How to compile glBlendEquation () in Visual Studio 2010? It says: error C3861: 'glBlendEquation': identifier not found It seems that glBlendEquation is unavailable You must use this to work for Gl.h's header which is provided by Microsoft.

visual studio - code highlighting -

I want to highlight like visual studio. If the user is attaching a code snippet to the article, I how can we get it? For example if you are not talking about the code included in a website, but eg . In the desktop application, you should clarify your question.

Spring NamedParameterJdbcTemplate + an array of Integers + Sybase -

Suu .. We found a bug and the stack was very similar to com .sybase.jdbc2.jdbc.SybSQLException: Class [java.lang.Integer not found. Check and make sure the class is installed, and an entry exists in Sysxtypes. Then I thought, come, I have to change them in priority. int [] id = ArrayUtils.to Feather (set.orise (new integer [set.size ()])); and then the query was plugged in to the ID Named ParameterJdbcTemplate.query ("ID in ID where ID selects different ID: ), Collections.Singletonmap ("id", id), new parameteredRomapper & lt; integer & gt; {} throws public return (ResultSet rs, int rowNum) SQLException {return rs.getInt ("id"); }}); Okay so I found this; com.sybase.jdbc2.jdbc.SybSQLException: class [I did not find it. Check and make sure the class is installed, and an entry exists in Sysxtypes. When I am adding spring jdbc template to sybase, I have not had any problem using the integer or integer. Any ideas? Instead of ...

Efficiently typecast elements of a vector in Java -

What is the more effective way (preferably o (1) than o (n), but at least speed Type ) Type the elements of this sector? public vector & lt; String & gt; TypecastVector (vector & gt; Object & gt; objects) {vector & lt; String & gt; Wire = new vector & lt; String & gt; (); For (object o: objects) string. Add (string) o); Return strings; } note Anyone who is running in a clear requirement of the vector or other generic class type: acceptable answer points As outside, this is probably one and you probably need code in your class hierarchy. especially , if you do not already have it, you should consider creating those sections which are said to be vector or other Generic classes themselves use when I did this in my code, so I completely eliminated the need for the function in my code which was in accordance with the above work. If you have never implemented the generics in your code, keep an eye out for the "Generics" link abo...

semantic markup - How to mark up caption for HTML lists -

AFAIK, is not a dedicated element - such as & lt; Captions & gt; For tables, & lt; Figcaption & gt; For data, etc. - Which markup should I use to mark the top of a list? In HTML 3.0, but it has now been disliked. To use the website, an important aspect of the job is the use of dexterity claim for pregnant women and dogs in the well at the well; Raspberry P> made / Li> I know how, exactly what I am doing is not easy for only one time or for you it may be easy for you to ask about integer or any kind of pelaredesk magna For some time, other people do not know about life. It seems that you want an HTML5 response It looks like you want an HTML5 response If all of your lists have headers, then I have a gt; & Gt; with header & lt; Dl & gt; (Now the description will mean the list) & lt; Dd & gt; List Items as & lt; Dl & gt; & Lt; Dt & gt; I like the fruit: & lt; / Dt & gt; & Lt; Dd ...

data structures - What questions should be asked before making a .Net application ready for communicating with SAP? -

One of the projects I work for said to check the possibilities of communication of our application with SAP applications goes. The person who has no experience with SAP, what steps should I follow and what questions should I ask to come up with a useful report? Can you recommend a road map to get me such an output which can show me what to do to prepare our application for such requests? Thanks, Sorry, I do not have a roadmap to check is. However, I can be given some pointers to look at you: For Application Structure: Isolation between components and intangibles is a matter of main concern. Has it been adequately applied to allow the introduction of new DAO or BOs: If you separate access objects from others, then objects that manipulate your application include a SAP system, one With the web service or a database unclear abstraction, (and if this topic allows this permission), you can get objects from various sources (real life example: an A Obtaining an object from...

properties - Controlling the sort order of property pages in a eclipse property dialog -

वर्तमान में, जब मैं org.eclipse.ui.propertyPages एक्सटेंशन का उपयोग कर ग्रहण के लिए संपत्ति पृष्ठों का योगदान करता हूं बिंदु, व्यक्तिगत गुण पृष्ठ पृष्ठ नामों के आधार पर वर्णानुक्रमिक क्रम में गुण संवाद में दिखाए जाते हैं। क्या संपत्ति के पन्नों को सूचीबद्ध किए जाने वाले आदेश को नियंत्रित करने का कोई तरीका है? मैं मूल संपत्ति पृष्ठ को हमेशा पहले दिखाना चाहता हूं, उसके बाद कम महत्वपूर्ण पृष्ठ के साथ। मैंने पृष्ठ का आईडी बदलने की कोशिश की है, लेकिन यह किसी भी प्रभाव में प्रकट नहीं होता है। कोई सुझाव? एफडब्ल्यूआईड्यू: ऐसा लगता है कि बेस एक्लिप्स यह कर सकता है ... में योगदान RegistryPageContributorPropertyPage विधि, यह PropertyPageNode -1 की प्राथमिकता सेट करता है अगर संपत्ति पृष्ठ आईडी "org.eclipse.ui.propertypages.info.file" है यह ठीक है मुझे क्या करना है। इसे समझें! मुझे क्या करना जरूरी है मेरी योगदान कॉमपॅरेटर मेरे वर्कबेनक एडवाइजर वर्ग में उपलब्ध कराते हैं। योगदान कंपोपाटर की तुलना विधि है जो मुझे संपत्ति पेज सूची में वस्तुओं के सॉर्ट क्रम निर्धा...

windows - Globals.Ribbons empty on Outlook addin startup? -

After I am creating a plugin for Outlook 2010 using XML method using VSTO 2010 and Net 4. To design my ribbon because I should hook up the context menu Unfortunately, although the startup event handler of the ad before the ribbon is removed, I use the Globals.Ribbons.MyRibbon in the ribbon handler. Can not use tax! I have included the following in my Ribbon.cs code: Partial class ThisRibbonCollection: Microsoft.Office.Tools.Ribbon.RibbonReadOnlyCollection {Internal MyRibbon MyRibbon {{return return this.GetRibbon & LT; MyRibbon & gt; (); }}} But it seems that RibbonReadOnlyCollection empty when I try to access it from the startup event handler. On the other hand, if I use a designer, then I can use the collection with no problem. How do I add my new ribbon to the collection? I do not see any set methods or ribbon collections that are tweakable. ribbon XML globals created with "text" itemprop = "text"> after . go over the answers. ...

postgresql - INSERT or return row if entry already exists in a table with UNIQUE constraint -

Greetings, I have this table, which is on PostGrace SQL Server 98: create a table tag (large number of primary keys, not name text, value text not unique, unique (name, value)); Normal INSERT behavior is to throw an error when the new value breaks the specificity barrier. I would not like to throw the error for it or return the new tagad if the insertion has been successful, or the taglessness of the specific entry will match the specification. I use this function to do this: enter the enter function (my_name text, my_value text) $$ returns as DECLARE retval bigint; Tag from the beginning of the tag from where name = my_name and value = my_value; If returned again; end if; Include tags (name, value) values ​​(my_name, my_value) Returning tagging in return; Returns the returns; End; $$ LANGUAGE plpgsql; See two tables before the inclusion in the worst case. Is there a better way to do this possibly in a lookup? Simply handling INSERT and some exceptions: Inse...

c# - Select top 5 from a merged list (MVC) -

I have two lists that are merged after the order of the Linux statement, I would like to select the top 5 from that entire list . I was thinking about using the linq statement to select the top 5 from the list. var ListSort = List entry by listing from NewList in the list. Select listing list; // Tried to select Top 5 from here Any other suggestion on how to do this? If you are going to use the link, then use myList.Take (5)

c# - Specifying constructor constraint for Generic Parameter -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मेरे पास वस्तुओं का एक संग्रह है जो मैं एक अन्य प्रकार की वस्तुओं (एक के लिए) बनाने के लिए पैरामीटर के रूप में पास करता हूं। मैं यह कई जगहों पर कर रहा हूं (मूलतः डेटा ऑब्जेक्ट्स से बिजनेस ऑब्जेक्ट्स में परिवर्तित) मैं इसे पूरा करने के लिए एक सामान्य एक्सटेंशन विधि लिखना चाहता हूं लेकिन मैं फँस गया हूं क्योंकि मुझे नहीं पता कि मैं कैसे बाधा को निर्दिष्ट कर सकता हूं कि व्यापारिक ऑब्जेक्ट के पास कंस्ट्रक्टर डेटा ऑब्जेक्ट पैरामीटर के रूप में ले रहा है निम्नलिखित मेरे फ़ंक्शन का कोड है: सार्वजनिक स्थिर IList & lt; T & gt; कन्वर्ट करें & lt; ए, टी & gt; (यह IEnumerable & lt; ए & gt; सूची) जहां टी: नया (ए) / * यह समस्या है PART * / {var ret = नई सूची & lt; T & gt; (); विदेशी मुद्रा (सूची में विभिन्न आइटम) {ret.Add (नया टी (आइटम)); } वापसी रिटर्न; } दुर्भाग्य से, यह सी # में अनुमत नहीं है। आपके पास एक नया () प्रतिबंध हो सकता है जो कि एक डिफ़ॉल्ट कन्स्ट्रक्टर के लिए प्रकार को बलों करता है, लेकिन य...

sockets - bind() error with errno == ENOENT? -

Can anyone help understand what is the wrong value of the ENT when the bind () socket function fails? Man page means "file does not exist" what file? I tried to call bind () with a bad file descriptor and which sets EBADF as expected, so it is not so. This is almost certainly a bug in your code, if I think what I do, So I would say that you got a bad unix socket path in the address that you have to bind. It is also possible that the error code is not coming from the check - check your thread protection.

php - Loop through an array of data and print an 'incrementing' letter -

I need a loop through an array of data and print an 'incremental' letter for each array value. I know I can do this: $ array = array (11, 33, 44, 98, 1, 3, 2, 9, 66, 21, 45); $ Array = array via $ Array = array ('a', 'b', 'c', ...); // array of letters to reach $ I = 0; Exchange currency ($ value as $ value) {$ $ [+ i ++] resonate letters "- $ value"; } It seems that there should be a better method than creating an alphabetical array. Any suggestions? Note - My Loop can never be found through the entire alphabet, so I'm not worried about running out of letters. $ letters = category ('a', 'z');

objective c - NSString and NSUrl not converting properly -

So I'm trying to retrieve data from an XML stream coming from a URL. This URL is configured on a search string that is user input. Is there any reason why this code should not work? NSString * searchString = "Geoff"; NSString * updatedURL = [NSString stringWithFormat: @ "http://mysearchpage.com/searchQuery=%@", search-string]; NSLog (updatedURL); NS URL * URL = [[NSURLLock] InitvastString: Update URL]; Now this single word works well for searches, but as soon as I try and search for the first and last name, the url returns zero every time whether it is the string Is there any behavior with which can be caused? I also tried to replace "" with "% 20" when the search string was added to see if this was a problem. I did this: NSURL * url = [[NSURL alloc] initWithString: [updatedURL stringByReplacingOccurrencesOfString: @ "" withString: @ "%% 20"]]; Any ideas? thank you in advanced! You should use the -s...

iphone - iTunes Connect uploading issue -

Very bad that iTunes Connect has recently changed its behavior. I am providing an update for an existing app. On the first try I presented a new binary using the loader without the problem, and then I came to know that it is different from the other, someone has to reject the binaries to change the screenshot . It is very bad that the update is in the "in review" condition, okay, I have rejected my binaries and have started uploading new screenshots, because I did not show screenshots of previous versions Want to do New screenshots have been uploaded but I'm stuck in the "Developer Reject" status. Meaning I can not upload the binary and not able to change the screenshot from that time. "There was an error saving the changes. Please try again later or contact iTunes to connect to support at itunesconnect@apple.com." I checked the source of error page and is thinking that this error is id = "lcboxox reader" .0.9.7.7.1.1 .1.1 ...

internet explorer 7 - jqGrid IE7 hover nightmare -

I have wasted too much time on this and I beg for help, beggar , I'll tell you, StackHowflow community for help! I am a new jqGrid user, and want to work as my grid, but for now, one row can not be highlighted in IE7 because the mouse is on top of it. Our shop is currently running IE7, so there is no possibility of changing the browsers / versions. Hover works very well in Firefox, does not work in IE7. I use "Jackgird ID7 hover", "jquery ie7 hover", and any of "id7" and "hover", and "css" and all this I have tried many forms of DOCTYPE announcements, it is not strange. I have tried reverse engineering on the demo page until my fingers are in pain. Yes, Hover does not work on demo pages, it is not working on my own page, I have tried to manually go through UI hover CSS classes with different features and! Important flag just to see if I get something. nothing. Now what happens here when I hover over a jqGrid row with...

asp.net mvc - How can I validate a ViewModel in jQuery Dialog? -

My address is a bunch of attributes that mark in EditViewModel [Required (error message = "My error message here ")] and / or [DisplayName (" etc. ")] . Performance Name Features Functions: model.Field)%> , and I think essential features are also working, but I do not know how to provide feedback on the form (jQuery UI Dialog). This form is deposited through $ .a.x (), and in the action method: [htmlpost] public action result edit (addressAdvetyvailmodel address) {var addressTitit = DC adressers. FirstOther Default (X => X.AddressID == Address. AddressIDDIT); If (ModelState.IsValid) make sure that there is at least one active address (if! Address.ActiveEdit and address adobeit! = Blank & amp; adressiveActive) (if (DC Edres. (X = & gt ; X.ProfileID == addressToEdit.ProfileID) .net (x = & gt; x.actactive) == 1) {address.ActiveEdit = true;}} Try {// TryUpdateModel SUCKS!} / Usage prognostic address. ToEdit InjectFrom & lt; VMToAddr...

asp.net - Why is IIS 7 showing me a default 403 page? -

I have an asp.net 4.0 site, where someone tries to reach an authorized area, sign them in The page is redirected to position 403. On my local machine, it redirects to the sign in page with 403 status. On IIS 7, I get a dirty 403 prohibited page instead of the signin page. How can I get it to work locally on IIS 7? There are default pages for all HTTP error codes in IIS. You can override them in IIS to redirect them to your own page. IIS also recognizes the ASP.Net tag in web.config file and uses it before it is available, so you will need to set up your custom errors tag as follows: & lt; CustomErrors defaultRedirect = "defaultError.aspx" mode = "on" & gt; & Lt; Error status code = "403" redirect = "my403page.aspx" /> & Lt; / CustomErrors & gt; Hope you are what you are after. You can also use form authentication in ASP.NET to get it, it uses cookies, but works well with the scenario you describe, unles...

javascript - prototype js invoke with custom function -

I have an array of div names, from which I want to switch to loading. I read from both Prototype API and another website which usually likes if anyone has to do the same thing for each item from the list. // I have this switch_off function function switch_off (div) {Effect.SwitchOff (div)}; } // And this array div_names = ['notice', 'status_bar', 'word_count'] // Please tell me that this is not the best option: div_names.invoke ('switch_off'); But it does not work. Do I need a second parameter that I want to ask? Can it be this ? Added: Here is the firebug output // value [method] is undefined // [break this error] return value [method] .apply (value, Args); Thanks! the effect of the invention to unlimited each The item has to call a member method and as you are not suitable for that type of result, unless you want to extend the prototype of the string. Some work should be provided to do any of the following: function...

c# - When to use each of T[], List<T>, IEnumerable<T>? -

I usually get to do something like this: string [] things = ArrayReturningMethod (); Int index = cheese. Toolist & lt; String & gt; INDIDEX ((s) => gt; s.Equals ("FOO")); // Do something with index return thing Disting (); // which is an IEnumerable & lt; String & gt; gives. And I find this kind of interface / interface a bit confusing and it tickles my potential performance problem antenna (which is not right until I prove it right). Is this idiomatic and appropriate C # or is there a better option to avoid back and forth molding to reach the proper ways to work with the data? Edit: The question is really double: Whenever either IEnumerable interface or an array or a list (or any other IEnumerable implementation type) Usage is right (when accepting parameters)? Do you want to move freely between IainumSharshals (Implementation Unknown) and lists and IEmerebureables and arrays and arrays and lists or what is non idiomatic (there are be...

shell exec - If PHP shell_exec() works too long or executed program hangs... how to catch error? -

If I execute shell_exec () with an external program (Unix) and more than that Works 30 seconds, PHP dies with fatal error. This is the reason why the external program hangs up / crashes or I do not know. I want to catch this error. Try {} .. hold {} does not work here. How can I tell that the external program is hanged? Usually my external programs run under 2 seconds. You can use this function system_with_timeout "run-test. Defined in the "FTP" script, included in source distribution: (the key is sent to stream_select ) function system_with_timeout ( $ Commandline, $ env = null, $ stdin = null) {global $ leak_check, $ cwd; $ Data = b ''; $ Bin_env = Array (); Forex (array) $ env $ key = & gt; $ Value) {$ bin_env [(binary) $ key] = (binary) $ value; } $ Proc = proc_open ($ commandline, array (0 = & gt; array ('pipe', 'r'), 1 = & gt; array ('pipe', 'wa'), 2 = & gt; array 'Pip', 'wa...

configuration - Why can I not override make's environment variables in FreeBSD's apache port? -

I am trying to configure Apache 2.2 in ports (Free BSDS). I have written my desired structure with the option of your desired compilation and as far as I can tell, everything starts to check. I.e .: Make-We & lt; Env_var & gt; What do I expect except __MAKE_CONF = ~ / mk / make.apache22.conf PERL5 and USE_PERL5 I have tried to try both variables in setting the environment in combination with make.apache22.conf : export PERL5 = / usr / Local / bin / perl export USE_PERL5 = 5.12 + and yet create-e-USE_PERL5 -V PERL5 returns yes /usr/local/bin/perl5.10.1 (I also override at -E bsd.perl.mk , but the way I am Grocarring bsd.perl.mk and create utility I do not understand why my methods are not working. What am I missing? So, in a nutshell, the answer is in the port system. From /usr/ports/mk/bsd.port.mk : Note: The difference between USE_ * and WANT_ * variables, and with_ * and WITHOUT_ * variables, is that the inside of the ports of...

In Bash, why can we set some environment variable by PS1='something' and others need to be export SOME_VAR='something'? -

और क्यों एक export की आवश्यकता है? यह कहां निर्यात कर रहा है? निर्यात किए गए चर नई प्रक्रियाओं पर लागू होते हैं। ए = 1 को सेट करने का प्रयास करें, फिर "bash" दर्ज करके एक नया शॉ डालकर, फिर $ achoose - एक खाली पंक्ति। करो एक ही है, लेकिन फिर निर्यात ए = 1 , एक नया खोल खोलें, फिर प्रति एचेस $ A - वॉयला! संपादित करें तकनीकी तरफ, और अपने प्रश्न को देखकर, बी = 1 वास्तव में एक वातावरण चर सेट नहीं करता है अपने शेल (लिनक्स में) का वास्तविक वातावरण प्राप्त करने के लिए, $ xargs -n 1 -0 गूंज & lt; / Proc / $$ / environ जो export के आउटपुट से अलग है। और एक sidenote के रूप में, bash के internals और इसके पर्यावरण से निपटने पर छूता है।

android - Can I use my current SharedPreferences tag to store the values from a PreferenceActivity? -

Currently, I want to store application level variables and move value among my all activities in my app The activities using the following code in the prefs = this.getSharedPreferences ("MyPrefs", Context.MODE_PRIVATE); I had no prioritization before, but now I do and I am trying to store some user prefoms in the "Myofrefs" with the same shared priority tag. I know that I can use PreferenceActivity SharedPrefs from my activities prefs = PreferenceManager.getDefaultSharedPreferences (this); But I would like to save those values ​​in my current shared private tag, "MipFrends", but I'm not sure how to do this. Thanks in advance. You can not preferneceManager always this.getPackageName () + name as the priority name " + Preferences " . Sorry to break bad news. It is also important when you want to use it. You definitely change MyPrefs with this.getPackageName () + "_preferences .

jsp - page pagination jquery -

I have tried a jquery to score on the page page. The following example is showing: & lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "quickpager.jquery.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; / * & Lt ;! [CDATA [* / $ (document) .ready (function () {$ ("ul.paging"). QuickPager ($); $ ("ul.paging2"). QuickPager ({Pager Location: "Both"}); }); / *]] & Gt; * / & Lt; / Script & gt; & Lt; Body & gt; & Lt; H1 & gt; Simple page demo page & lt; / H1> & Lt; P & gt; & Lt; A href = "http://www.geckonewmedia.com/blog/2009/8/14/jquery-youtube-playlist-plugin---youtubeplaylist" & gt; Back to blog post & lt; / A & gt; & Lt; / P ...

iphone - Question related to API -

What is the API? What is its importance? Let me give an example of this? How can developers use APIs? You can view Wikipedia for a comprehensive answer to your question: An API is an intuitive one that describes the interface for interaction with the use of the functions of the software API, providing the functions described by the APIs by the components of a software system. Is called for.

PHP MySQL order by day and month -

$ query = mysql_query ('सेलेक्ट * आरबीएफ_एडेड_ऑन्यूज आदेश से महीने डीईएससी'। $ Limit। ''); महीने और दिन अलग-अलग क्षेत्रों में हैं, कोई भी विचार, क्या यह संभव है? $ query = mysql_query ('SELECT * महीने से आरबीएफ_एडेड_ऑन्यूज आदेश से और डीईएससी '। $ सीमा' ''); धन्यवाद! आप 2 फ़ील्ड के साथ आदेश का उपयोग कर सकते हैं । यह काम करना चाहिए: $ query = mysql_query ('सेलेक्ट * आरबीएफ_एडेड_ऑन्यूज आदेश से, महीने डीईएससी'। $ Limit। '');

objective c - Searching NSArray for an object -

मेरे पास NSArray जिसमें NSDictionary वस्तुओं मौजूद हैं ऑब्जेक्ट के NSArray में NSDictionary में मिलान करने वाले कुंजी नाम के साथ सूचक को खोजने की आवश्यकता है। शब्दकोश में केवल 1 तत्व है ऐसा करने का सबसे तेज़ तरीका क्या है? भविष्यवाणी के साथ फ़िल्टर करें और फिर indexOfObject का उपयोग करें? यह तरीका निश्चित रूप से काम करेगा, लेकिन अगर आप गति, आपको अपनी संरचना बदलने की आवश्यकता है। इस तरह से खोजे जाने के लिए एरेज़ का मतलब नहीं है हालांकि, यह वही है जो NSDictionary के लिए बनाया गया था। यदि आपके पास एक अनूठी कुंजी है जिसके लिए आप खोज रहे हैं, तो अपने कोड को एक एनसियेटिशन में क्यों न रखें और बहुत ज्यादा तेज़ objectForKey: विधि? यदि आपको एक आदेश को बनाए रखने की भी आवश्यकता है, तो आप अपने शब्दकोश में एक NSMutableArray की चाबियों का उपयोग करके एक कस्टम "आदेशित शब्दकोष" वर्ग बना सकते हैं।

c# - How to refactor this routine to avoid the use of recursion? -

I was writing exercise in C # and although it Works, looking back at the code, was the place for improvement. Basically, the second part of the algorithm to merge two sorted lists is a regular requirement. My method is very long implementation which can use some refactoring: Private static list & lt; Int & gt; MergeSortedLists (& lt; integer & gt; sLeft of the list, & lt; integer & gt; sRight from the list) {if (sLeft.Count == 0 || sRight.Count == 0) {sLeft.AddRange (sRight); Return SLAF; } And if (sLeft.Count == 1 & amp;;; .right.Count == 1) {If (S left [0] 1) {for (int i = 0; I & lt; sRight.Count; i ++) {if (sLeft [ 0] & lt; = sRight [i]) {SRight.Instert (i, sLeft [0]); Return sRight; }} SRight.Add (sLeft [0]); Return sRight; } Else if (sLeft.Count> 1 & amp; & amp; amp; sRight.Count == 1) {if (sRight [i = 0; I & lt; sLeft.Count; i ++) for {if (sRight [ 0] & lt; = sLeft [i]) {SLeft.Insert (i, sRight [0]); Return...

Best way to implement multiple roles and permissions in c# web app? -

I want to implement the roles and permissions on a web app on which we have created and I'm looking at using the system Am Web .Security To apply this, SqlRoleProvider my problem is that each customer wants to be able to configure what action can and can not do in the system and no two clients want the same , Which will not be enough to complete the basic administration, user, manager roles. What I am proposing to do for each screen, thus creating roles screen 1 creature, screen 1 update, remove screen 1, screen 1 screen Read, screen 2 update, remove screen 2, screen 2 read and so on. Then I allow the customer to select rows per user, which will be stored in the cookie when entering the user. I could read the cookie and use user.isinrole to check that each method can be called by the current user. I know there is a size barrier with cookies about which I should be aware of. Besides, this sound probably does, is there a better way to do this? Many thanks for any ...

regex - Escaping [ in Python Regular Expressions -

This reg exp searches properly to see if a string contains Harry text: re.search (r '\ bharry \ b', '[harry] blah', re.IGNORECASE) However, I must ensure that The string contains [Harry] I have tried to avoid with different numbers: re.search (r '\ b \ [Harry \] \ B ',' [Harry] blah ', re-introxes) Re.search (r' \ b \\ [Harry \\] \ B ',' [Harry] Blah ', re-NINICACA) Re-search (R' \ 'B \\\ [ Arry \\\] \ B ',' [Harry] Blah ', again. Introresej) it does not work to find a work of these solutions. What do I need to do? Thank you! The first one is correct: r '\ b \ [ Harry \] \ b ' but it will not match [Harry] blah as [ is not a word character And therefore there is no word limit in [ foobar [harry] blah