Posts

Showing posts from April, 2013

angularjs - how to get results of my webservice with jsonp? -

I want to call one of my web server through jsonp. / code> code> $ http.jsonp ('http://example.com/files?callback=JSON_CALLBACK') .Service (data) {console.log (data); $ scope .folders = data;}); console.log is not showing up .... what am I doing? My Web service returns JSON_CALLBACK (["folder1", "folder2"]) ? Should I do it manually in my API? Browser does not do this automatically? You are currently returning ( ["folder1", "folder2"] < / code>) is not valid. The JSON result should be wrapped up with the Javascript function call to be JSONP. For example, when you use URLs like this: http: // example.com/files?callback=JSON_CALLBACK Angular function will replace the JSON_CALLBACK parameter with the function name (built internally) such as: http://example.com/ Files? Callback = angular.callbacks._0 Then your server will need to be able to read that callback parameter and

asp.net - Bring the users identity from the presentation tier to the application tier -

For our n-level application, we are looking for a way to use the identity level from the presentation level to the application level Are there. Our application is a classic 3-level application with low levels: UI - presentation level Application / WCF category Database level The app is not coming to the internet and can connect to the presentation-level local network. Our problem is that a user enters the presentation level and we want the presentation level to pass, although the identification level of user aspects is the level. How can this be done? Is it possible to do this with a claim based authentication? We are currently looking to implement IWSTrust13SyncContract in the STS service, but it seems that the user should be accessible to the application level for the browser. Can someone give me some suggestions about how to contact this You can represent the impersonation / delegation Or use reliable subsystem models - See Impersonation / Delegation works bes

root - Android L Preview: Attempting Task Locking By Rooting -

I am trying to test that the locking of workloads in Android L by removing the device instead of creating a custom ROM Can be completed or not. & lt ;? XML version = '1.0' encoding = 'UTF- I have created a' device_owner.xml 'file and placed it in \ data \ system. 8 '& gt; & Lt; Device owner & gt; Package = "com.ta.instrumentcontroller" name = "TA tool controller" & lt; / Device-owner & gt; On reboot, the Nexus 7 2013 tablet sits on the logo 'Sharing Android Balls'. If I go to TWRP and delete the file, then the boot sequence is completed. Do anyone know what's going on? I do not believe that what I am trying to do is possible, because this system is not in the image Was made. On this Google Git page, the function is installed (): Static Boolean is installed (string packagename, package manager, pm) {try {PackageInfo Pi; If ((pi = pm.getPackageInfo (package name, 0)) = null) {if ((p

nginx - Centos 7 SELinux Policy with Samba -

The Samba and NGN service is installed on my server under Centos 7 Web applications To allow / operate in / www based on www Nginx I use the command chcon -R -t httpd_sys_content_t / www But in this case it is impossible for permissions for the shared / www directory by Samba. P> Requires access to / www files. I do not know how it should work with full access by samba and ngnx. Please help, thank you! In this case you have changed the file reference due to the Nginx service / Www / Try to label the bar: chcon -R -t httpd_sys_content_t / www Then create a soft link for / www '# ln -s / www / mysambashare The use of semanage does not only reboot the link; Just Goal: '# Seminigas FactNext-A-samba_share_t / mysambashare

c# - A data structure like Queue with access to last element -

I need a data structure like a queue only at the end of the cue, only the first element can be extracted and new elements are added You can. And I also need access to the last element. System.Collections.Queue requires all but the last feature. I wonder if there is any kind of data structure built into it? The C # class is exactly what you need. See

mysql - Select rows with the same Item name and show lowest Price -

We have two tables: product IDs. Items | Supplier 1 | Harry Potter | Warner 2 | Harry Potter | Warner 3 | Throne game HBO 4 | The Simpsons | Warner 5 | The Simpsons | Warner and value ID. Price 1 | 10.9 9 2 20.00 3. 20.00 4 10.00 5 | 12.00 I am trying to get the lowest price item where there are two items with the same name and supplier. I can find those rows where duplicates are as follows: SELECT Products.ID, Products.Item, excluding products.Supplier, Prices.price products Prices at Price Id = product. Id where the product. ID IN (Item ID from the item where Supplier = "Warner" group item has been counting (*)> 1) How can I modify only this I duplicate item name ? I tried to order but it throws an error for me. The result should be: id. Items | Supplier | Price 1 | Harry Potter | Warner | 10.9 9 4 The Simpsons | Warner | 10.00 Thanks, Rick All your implementation of tables must be improved in the first place if your product table

Accessing variables in another file with PHP -

How can I get variable values ​​from another file in php? To get the value of $ name stored in file 1, I need a file and store it as a variable file1.php: $ name = "myname"; $ Name echo; file2.php: $ name = "" Add it at the top of the file 2.php: Include ('file1.php');

php - Whats wrong in regular expression -

क्या गलत है: $ pattern = '/ 9 [0-5 [7 -9]] {1} [\\ d] {10}) | ([0-2] \\ d {11} / '; $ विषय =' 971093342689 '; Php preg_match ($ पैटर्न, $ विषय) एक त्रुटि प्राप्त करने की कोशिश कर रहा है: preg_match ): संकलन विफल: ऑफसेट 22 में बेमेल कणों दो कोष्ठक बंद नहीं हैं: $ पैटर्न = '/ 9 [0-5 [7-9]] {1} [\\ d] {10}) | ([0-2] \\ d {11 } / '; ^^^^ यदि आपको यह संकेत है, तो आपको इसे बचाना होगा। अन्यथा आपको एक खुला और एक बंद कोष्ठक की जरूरत है जिसमें आप regexp हैं।

javascript - check null object in jquery each function -

I want a loop through every key value of the json element and printing it. But some keys are also null values. Therefore $ Each is giving error TypeError: obj is empty I do not want to remove an empty key from the object and the non object is html variable Do not want to print in I type the empty object to $ Each function Fiddle Demo - & gt; I want to look in "", "Authenticator": "{\" EmailAddress \ ":" TCS "," ID ":" 23 "," Type ":" Payment "," AccountNo ":" 1234567890 " Dfgsdfgsdfg \ ", \" MobileNumber \ ", \" UniqueID \ ": \" 9876-8975657-6 \ "}," AddBill ": Null," PARTNERID ": Null," sHORTNAME ": Null," token ":" 8FB91DE6 "}; Var html; . $ ('Div') HTML (getKeyValueJson); Function getKeyValueJson {$ .each (obj, function, key)} {if (typeof value == 'object&#

json - Have Model Save as Modified Value -

This is a piece of code that I'm working with now: Lt; Ng-model = "rule.platforms" ng-options = "platform for platform in platform" name = "platform" multiple required & gt; & Lt; Option value = "" & gt; - platform - & lt; / Options & gt; & Lt; / Select & gt; The default behavior of multiple selections in angular pairing is to model an array, for example: rule.platforms = ["twitter", "google" ] However, because of how it should be saved in the database, all the values ​​must be added together in a string. Right now, it seems to be parsing the value before saving / saving, but due to this, a lot of logic will be added because it will be necessary to go through all the data and check each rule. What I really want to do is, it is a means of changing how the ideal is started to bind into the model, so instead of the above it will be saved from this type of value: < pre> rul

php logical 'and' not logical. (what am I missing here) -

निम्नलिखित को देखते हुए समाप्त तिथि- & gt; 2014-10-14 तिथि- & gt; सूचित करें 2014-10-06 वर्तमान तिथि- & gt; 2014-10-08 ठीक समाप्ति तिथि- & gt; 2014-10-07 तिथि- & gt; सूचित करें 2014-10-06 वर्तमान तिथि- & gt; 2014-10-08 समय सीमा समाप्त तिथि- & gt; 2014-10-11 तिथि- & gt; सूचित करें 2014-10-06 वर्तमान तिथि- & gt; 2014-10-08 ठीक समाप्ति तिथि- & gt; 2014-10-05 तिथि- & gt; सूचित करें 2014-10-06 वर्तमान तिथि- & gt; 2014-10-08 समय समाप्ति और कोड फॉर लूप (प्रत्येक पंक्ति) अगर ($ की समय सीमा समाप्त तिथि & lt; $ current_date) {echo "expired & lt; BR / & gt; "; } अन्यथा (($ समाप्ति तिथि & gt; = $ notify_date) & amp; amp; amp; & amp; ($ समाप्ति तिथि & lt; = $ current_date)) {गूंज "चेतावनी & lt; BR / & gt;"; } अन्यथा ($ समाप्ति तिथि & gt; $ सूचित_डेटा) {गूंज "ठीक & lt; BR / & gt;"; } के लिए अंत क्यों परिणाम है ठीक समय सीमा समाप्त - ठीक समय सीमा समाप्त क्य

opensips-1.6: recv queue full -

I am using opensips-1.6 on CentOS-5.8. In some circumstances I am seeing a lot of packets which are queued in the RVV queue and are not being processed. I am monitoring the same using the "netstate" command I found that seeing the septresses can not respond to the incoming messages, and if the answer is given, it will answer for a long time is. How many parameters should I follow / optimize to handle such a situation (when there is a lot of traffic going on the switch) ?? Possible causes of slow UDP / TCP queue processing: Your OpenSpeps processes are in a deadlock (CPU utilization is 100%?) / Li> Not enough memory! See the logfile for any memory-related error! opensipsctl FIFO get_statistics shmem: = & gt; opensipsctl FIFO get_statistics tm: = & gt; To monitor shared memory usage. To see how many transactions are created Not enough process! Consider increasing the number of children In order to conclude, OpenSIPs 1.6 is outdated (sin

ios - How can I add a Number and Decimal keyboard into my Custom Keyboard on iOS8? -

I created a custom keyboard in Swift but it was rejected from the App Store because: "Number of keyboard extensions and Decimal does not include type ". How can I easily add these two keyboards? I tried to rebuild the original scene but it is not working properly. I'm sure there is a solution to create 2 or 3 different views and switch between them. How do I switch between keyboard types when the type of keyboard changes? You can detect changes to the keyboard type in textDidChange . You need to get the UITextDocumentProxy , then locate the proxy's keyboardType , and then you can make changes to the layout you can make. override func textDidChange (_ text input: UITextInput?) {// when document references change - theme or keyboard type change proxy = self.textDocumentProxy as UITextDocumentProxy if proxy. KeyboardType == UIKeyboardType.numberPad || Proxy.keyboardType == UIKeyboardType.decimalPad {// Add code here to display number / decimal input

javascript - Scaling text to fit in Famo.us Surface -

यहाँ सतह है this.gymNameSurface = नई सतह ({size: [true, जिम [1] "", " ''), संपत्तियों: {पृष्ठभूमि का रंग: 'काला', फ़ॉन्टआकार: "2em", लाइनहाइट: '72 पीएक्स'}}) ऐसे मामलों में जिम का नाम एक निश्चित # के अंतर्गत है वर्ण, '2em' सही आकार है उदाहरणों में जब जिम का नाम एक निश्चित # वर्णों के ऊपर है, तो यह बहुत बड़ा है। मैं सतह के अंदर पाठ के फ़ॉन्ट आकार को गतिशील रूप से कैसे बदलूं, कहना है, मुझे सतह की चौड़ाई होना & gt; window.innerWidth / 2? धन्यवाद आप इसे सादे जेएस के साथ कर सकते हैं : var fontsize = "2em"; // कम टेक्स्ट - बड़ा फ़ॉन्ट अगर (this.options.data.gymName.properties.gymName.length & gt; 32) {fontsize = "1.4em"; // अधिक टेक्स्ट - छोटे फ़ॉन्ट आकार} फिर आपकी सतह के गुणों पर: गुण: {... fontSize: fontsize, ...}

python - Modifying large csv in chunks? -

I get an error in 'TypeError:' TextFileReader does not support 'object item assignment' when I add columns and headers to My problem is that I am using a slow working laptop to process a very large file (10 million lines). I want to add some simple columns (1 or 0 values), add two columns to create a unique ID, change the DTP type for other columns, and change the name of some headers, so that they match the other files Are I. I could probably split this CSV (maybe select date date and make different files), but I would like to know how to select or deal with large files without running in memory issues. Is it possible to modify windows in the file and then insert them together later? I am cleaning a raw data that will be loaded into the plateau for the scene. Example (10 million lines read / modify): & gt; rep = pd.read_csv (r'C: \ repeats.csv.gz ', & gt; compression =' gzip ', parse_dates = true, usecols = & gt; [' etc ',

javascript - Is it possible to forward a stream from one function to another? -

Please take a look at the following sample code. As you can see, it uses parsing to write incoming form data and incoming files on disk. Let's say that these are just image files because my sample code uses imgur.com. (Does not require sending a content length header) uses the imgurUpload () function Is it possible to extend additional image files, without having to buffer them to complete Need .com? (Use it on the ImgurUpload () function and within node-form-data?) Server / Listener: var http = need ('http'), Basubi = ('Busboy'), formdata = is required ('form-data'), fs = 'required' ('fs') http.createServer (function (req, res) {if (req.method = ('File', 'file', function (field name, file, file name, encoding, mimetype) (Fs.createWriteStream ('1-' + filename)) // pipe the second time to file.pipe (fs.createWriteStream ('2-' + F) *) * * * How to connect things together? * Busby.on ('Res'wri

ios - How does one do a Native App to Web Browser Handoff? -

After I have read the documentation and I understand that using handoff I exchange data between a particular website and application can do. I have a curated list of items from various RSS feeds, which point to all the different websites. I want users to do Safari on their iPhone in Safari (like a "more" button on their Mac) Want to give the ability to open links for any item. Since all links will be from different domains, certificates are not actually implemented. Is it possible to open Safari on Mac with a specific url from the iOS app using handoff? I really can not understand the document if it was a possibility or not. After Create an NSUserActivity object and specify webpage URL attribute Use a special type of activity for your app com.company.acme @ ": which specifically supports the ActivityType but if Mac is not an application, Safari will take it NSUserActivity * myActivity = [[NSUserActivity alloc] initWithActivityType .. MyApp "]; MyActi

twitter - Slidable panel Control for Windows Phone -

I need to create a 'slidable panel' control for WP8. I used the old Twitter app on iPad (Landscape UI) Same as going one. It is very difficult to describe in words, here is a link to an article describing how to do it on iOS: Sorry, I post an image to give you a quick overview Can not (stackoverflow reputation ...) you will find something in the above article. As you can basically see Is there a third party control similar to Windows Phone 8.x? If you can not provide some guidance about implementing it? Probably this is not a good way to do WP, in this case what is the WP way to do this? PS: I'm new to WP development, iOS / Android background. Thx. I know that this is not what you are looking for but a very good one for your control May be the basis.

c# - Linq to sql stored procedure call wrong result -

I am using SQL in my project so that my stored procedures can be called. This is a stored procedure that returns a few lines `Returns DB.ProgramName (absolute 1, absolute 2, ......, absolute) .Oolist` This calls correctly stored procedure with the correct parameter. I can see that by running the SQL Profiler, when I run the stored procedure in the management studio, I get the right result. If I run SQL Profiles in running profiles, then I get the right result. The problem occurs when the link gets the data, basically the results returned by toList are not the same, the database was returned by me NULL Missing something about values ​​or when there is no primary , Linq talks funny, but I'm not sure what this is really about. Can anyone tell what's happening here? When Table 1 is executed in Management Studio and removes Table 2, the results obtained by the stored work when the Sql code from Linq is executed Table 1: OrgRef OrgCode DisplayName StockTakeId St

sql - Finding all users with specific attribute in a through relation -

See below for details. I am trying to write a line of code, search the database and show users who have specific skills. My clue is that I should use something like @ user.where ('skill =?', skillvariable). > Or a specific query Description : I have a user model, a skill model and a user_skill model. I have the relation in user.rb_m: skill, through: user_skills . I have a relationship with skill.rb Has_many: user_skills and has_many: users, through :: user_skills , and Then, in user_skills.rb, I have related_to: user and related_to: skills . / P> t.string "name" t.string "slug" You can do just that: User.includes (skills:). This will be lateral: All users with at least one skill named 'Archery' will be there (skill: {name: 'arrowy'}) Recover. Same question:

sinch - How can I create a group call? -

Our team is trying to use the system in the ongoing project, though we can not find anything on the group VoIP . Is it currently supported or employed? Jake, please contact us directly at dev @ sinch. Com today is not supported with group calling sync SDK

ios - UIScrollView + Centered View + Ambigous Scrollable Content Size + many iPhone sizes -

Image
I have: Application, which should work in Landscape and Portrait mode. Look at the top with a full-size scroll view. Some scenes of scroll view with fixed visual and elevation. (With added H and W constraints) Set to look inside the scroll view horizontally in the container. (Added according to the constraint) I have the warning in the interface builder "Unclear scroll content is width" The only way to fix this problem is to find out what I know - set tracing and leading barriers but different iPhones (5.5", " 4.7 ", 4"), I need to set various trailing and leading obstacles. How do I end this warning Can I do and still horizontally centered W and H-iPhone size? I make the Github repo to explain this problem: This duplicate But it is similar (and although not answered), but this question is especially related to the different sizes of iPhones. I thought with a fresh cup of coffee in the morning Therefore, for the simplest case

iOS App crashed when i try link swift framework with objective - c project -

I have trouble app crash when I try to link swift framework with purpose - c project < pre> Dyld: Library has not been loaded: @ rpath / libswiftCoreImage.dylib: /Users/arcilite/Library/Developer/Xcode/DerivedData/SamplesAdaptiveController-fpznutybiarsvsbwskrhgwflbcdo/Build/Products/Debug-iphonesimulator/AdaptiveController.framework/ AdaptiveController Referred to: / Pre> Do you have any ideas? Can I use the framework in Objective-C code? Thanks PS Xcode 6.0 Release Simulator I had to face a similar issue While trying to call the function with a pure swift framework in an existing purpose, the app was using XCode 6.1 and an iOS 7.1.2 device and tried all other suggestions on stack overflow. Create a dummy swift file in your objective-project (if you do not already have one swift file in your project) in that swift file, just add this line to import the UIKit: < / P> Import UIKit It seems that the encoding is being compelled to pack the required swift

properties - Look up a dynamic property at run-time in Spring from PropertySourcesPlaceholderConfigurer? -

The best way to do this is not fixed. We have created a jar which can be used by various projects. Other projects depending on this jar are required to provide specific properties defined in one of their spring properties. (Our jar should not be taken into consideration as to what those property files are called.) Using @Value ("$ {some.prop}") works great for most properties , Although now we need to see that the name of the property is dynamic for example: int val = getSomeVal (); String propNeeded = foo.getProperty ("foo." + Val + ".dynamic.prop"); To get my access, what should be "foo"? I saw the environment injecting the environment, however, with all my Goggles it seems that it does not load from an XML property-placeholder definition. (Even if the property is set as Bean Def for the site placeholder configuration.) You have to use @propertysource, however my main config is an XML file, so listen Not sure how the environment works

c# - Dispose works fine, but not on terminating -

I have a class that implements IDisposable , because this image resources ( bitmap class) I use it to wrap all the deceptive lockbits / unlockbits And it works fine when I use the Dispose () or statement statement. However, if I leave the program to end without exposing, I get a system.exvival exception . Simplicity, I think that GC calls me the dissection in the same way, and the object releases resources from envy, but it is not what is happening. Why? Here is the IDisposable code: private bool _disposing = false; ~ QuickBitmap () {remove (wrong); } Public Zero Extraction (Settle (True); GC.SuppressFinalize (this);} Private Wide Dispos (Bull Rifed Decis) {If (_discising) Return; SaveBits (); // UnlockBit Bytes = Private Cover for Null; // byte [] image bmpData = null; // bitmapdata object if (safe Depression & BM! = Tap) {BM.Desc (); // bitmap object BM = null;} _disposing = true;} This works fine when: using (var qbm = new QuickBitmap ("myf

string - SSRS choosing dynamic Columns -

For my report, I have to choose which columns are dynamically accessing the database < pre> FCST_Sales_2014_Q4_with_SF FCST_Sales_2015_Q1_with_SF FCST_Sales_2015_Q2_with_SF FCST_Sales_2015_Q3_with_SF I need: to be more precice: column in the database, thus named for the current year and quarter Report to choose, so I am using now () which I need to composite with expression For example: = year (now ()) and = switch (month ( Now ()) = 1, 1, month (now ()) = 2, 1, month (now ()) = 3, 1, month (now ()) = 4, 2, month (now ()) = 5 , 2, month (now ()) = 6, 2, month (now ()) = 7, 3, month (now ()) = 8, 3, month (now ()) = 9, 3, month (now ()) = 10, 4, month (now ()) = 11, 4, month (now ()) = 12, 4) results 2014 And 4 what exactly i want If I am using the following: = ( "field! Fsissisass_s +" + Sisarar (Year (Now ()) + "_kyu" + CSR (switch (Month (Now () ) = 1, 1, month (now ()) = 2,1, month (now ()) = 3,1, month (now ()) = 4, 2, month

Determine perforce users that have a file checked out -

मैंने ये प्रश्न पढ़े हैं: हालांकि उपयोगकर्ता के लिए सभी चेक आउट फ़ाइलों को खोजने के साथ ये दोनों सौदा यह बहुत उपयोगी है, लेकिन मुझे दूसरी तरफ जाने की जरूरत है; मैं वास्तव में क्या करना चाहता हूं जिसने एक विशेष फाइल की जांच की है देख रहा है। पढ़ने के बाद, मुझे ऐसा करने का कोई तरीका नहीं दिखाई देता है। क्या पी 4 में कोई रास्ता नहीं है, मैं यह देख सकता हूँ कि किसने एक विशेष फाइल की जांच की है? बेवकूफ़ मुझे जितनी जल्दी मैंने पूछा, उतनी ही इसे मिला। विंडोज़ में पी 4 के साथ, फ़ाइल पर जाएं (Ctrl + Shift + S के साथ आसान है पी 4 वर्कस्पेस दृश्य में) इसे राइट-क्लिक करें - & gt; प्रभाव - & gt; गुण। "चेक आउट आउट" टैब के तहत देखें आप टूलटिप को खोलने के लिए फ़ाइल आइकन पर माउस भी कर सकते हैं जो यह बताएगा। मैंने जो भी दस्तावेज़ से लिंक किया है, उसे यह भी दिखाता है कि यह कैसे कमांड लाइन ( p4 खोलता है - एक फ़ाइल नाम ), भले ही स्पष्ट रूप से प्रस्तुत न हो। डॉक्स कहते हैं कि यह निर्धारित करने के लिए कि कोई अन्य उपयोगकर्ता पहले से ही एक विशेष फाइल खोला है, p4 ख

objective c - Draw CAShapeLayer LAYER without the fillColor -

Image
Hello, I draw a line and find out that when it touches the "touch touches" it works fine, but The yellow part is taken as a part of the line I have to remove the yellow part of the image ... it is a component called the fillcolor of the component, I entrust this property to zero, but still be taken as a part of the line This is the code that I'm working on: self.path = [UIBezierPath bezierPath]; [Self-pawth movablepoint: CGPwontec (10, 150)]; [Self-Pot AdvertiToint: CGPointMake (110, 150) Controlpoint 1: CGPointMake (40, 100) Control Point 2: CG PointMake (80, 100)]; [Self-Pot Adwords Two Point: CGPointMake (210, 150) Controlpoint 1: CGPointMake (140, 200) controlPoint2: CGPointMake (170, 200)]; [Self. Path adrave to point: CG point make (310, 150) control point 1: CG point make (250, 100) control point 2: CG point make (280, 100)]; //[self.path addCurveToPoint: CGPointMake (310, 150) Controlpoint 1: CGPointMake (250, 100) Control Point2: CGPointMake (280, 100

C# Making an function(button) that can read an array number -

I need some help because I am confused. I have to create a button that can read the array of array I created. But my question is how? My form looks like I have to write a number between 7 - 1006 in search of bar. And then I click on "search" and it should get a number in "index" and write the index number in the index box on the right. So yes, I have to confuse now. Using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; System usage threading. Task; Using System.Windows.Forms; Nameshavan {public partial class} form 1: form {int [] minare = new int [1000]; Int indogagar = 0; // Pager PA ¥ Index or Public Form 1 () {Initialize Companent (); } Private Zero Form 1_load (Object Sender, EventErgus E) {} Private vide vScrolIndex_Scroll (Object Sender, Scroll EventAgge E) {indPeger = vScrolIndex.Value; TbIndex.Text = indPeger.ToString (); TbIndhold.Text = minArr

Oracle ODBC TNS-less connection string (for 64-bit Excel) -

Image
Is there a 64-bit Oracle ODBC driver that supports a TNS-less connection (or EZ-connect) conference? I used "Microsoft ODBC for Oracle", which allowed a TNS-less connection string, but it was screwed for a long time and there is no 64-bit version (i.e. this 64-bit office / Will not work for Excel). I have experience that the user has sometimes missing or invalid tnsnames.ora file in my organization. I want to use a DSN-less connection-string which requires tnsnames.ora which can be successfully executed on any computer that has the proper Oracle Driver installed. This is an example of my old DSN-less, TNS-less connection string, which uses the "Microsoft ODBC Driver for Oracle" driver (still works for users at 32-bit office): driver = {Microsoft ODBC for Oracle}; Uid = myun; PWD = mypass; Server = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = myhostname) (port = 1521)) (CONNECT_DATA = (SID = mysid))); I'm trying to connect to Oracleient11g_home1

How do I encode/decode HTML entities in Ruby? -

I'm trying to decode some HTML entities, like '& amp; Amp; Lt; ' '& lt;' is happening. I have an old gem (), but it seems that it has been left twice. Any recommendations? I will need to use it in a model. can: : jmglov @ laurana; Sudo gem installed friendly Successfully installed htmlentities-4.2.4: jmglov @ laurana; Irb irb (main): 001: 0> Required 'htmlentities' = & gt; [] Irb (main): 002: 0> HTMLEntities.new.decode "& amp; iexcl; I'm angry with high & amp; nbsp; character references!" = & Gt; "I am very worried about the character's references!"

glibc - Why would the same binary want linux-vdso.so.1 on one 64-bit RHEL 5.4 server and not another? -

I have a client running a file parsing program called cleanfileg, and as the last update, it receives the date format error Is parsing a file It is weird that both of us are running the same program, on the same file, with the creation of GCC, Pathrid, Library etc. Similar release of RHEL64 (5.4) and I can not repeat my problem, it can roll back the previous month version of cleanfile and everything works fine, so I'm pretty sure that the line-to-line The possibility of me will get an answer, but the deceptive thing to me is that on one wave it was asked to run an LDD on its executable, whether it was pulling in some different verions of the shared objects. Defense was. # ldd cleanfileg linux-vdso.so .1 = & gt; (0x00002ad4c98d1000) libmdGeo.so = & gt; /tools/clean_address/bin/libmdGeo.so (0x00002ad4c98d6000) libmdName.so = & gt; /tools/clean_address/bin/libmdName.so (0x00002ad4c9a70000) libmdPhone.so = & gt; /tools/clean_address/bin/libmdPhone.so (0x000

Couchbase on Heroku -

This may be a common question, but I have a "simple" Jim log "app, which is the node and I am using the couchbase as database, everything works when I run it on my machine. The problem arises when I call it Heroku > And try to run it when I check the log I receive an error that module couchbase was not found. Do I have to add an add-on to the myoku or define couchbase as my dependency in package.json To work on myoku for my app? Can someone give me some hints? Here is a link to all my code: "Module couchbase could not be found" means that your node app can not get Couchbase module. More likely "npm installed couchbase "Is installed locally, so it works on your machine. To work on Heroku, you have your package. Couchbase module dependency must be added in the JSON file. "Dependencies": {"Happy": "^ 6.0.2", "Joy": "^ 4.6.1", "Request": "^ 2.37.0", &qu

database - Understanding DB Connection Pools in python -

I'm not sure that I understand the use of the DB connection pool (eg: psycopg2.pool and mysql connector .pooling) It appears in Python that parallelism is generally achieved in Python using multi-process rather than a multi-thread approach due to GIL, and in the case of multi-process these pools are not very useful because Each process will start its pool and only A walk one thread at a time. is this correct? There is a strategy to share the DB connection pool while using multiple processes, and if multi-threaded Python applications do not have the capacity of pooling limited or are there other scenarios where you will use them? Keith, You are on the right track as outlined in the SO post ", ": Creating a separate pool for each process is redundant and opens a lot of connections See other SEO posts," " There is sample pooling solution. This post also discusses the limitations of DB-pooling if your application has to be multi-threaded: Building

sql - Modify result of a multiple column query with JOIN -

I work with postgresql 9.1 . I have two linked tables: one table event: eventid | Name --------- + ------------ 1 | Event 1 2 | DUCME3 | Triissime 3 and table images related to events like this: id | Path | Alt | Eventum | ---- + ------------------------ + ------ + --------- + 1 | /something/to/img.jpg | Alt | 1 | 2 | /something/to/img2.jpg | Alt2 | 1 | 3 | /something/to/img3.jpg | Alt3 | 2 | I want to return a list of all the events with Linked Path and Eltar. So far I have used this query: SELECT events.eventId, events.name, string_agg (different images, ',') AS path, string_agg (different images, '' , ') Ats At Its Events Byte Join Image In Images.Anvent Id = Events.Event Import Group In Events.EventIdid; But there is a problem, this returns: eventid | Name | Path | Alts --------- + ------------ + -------------------------- -------------------- + ---------- 1 | Event 1 | /something/to/img2.jpg,/something/to/img.jpg | Alt, alt2 2 | DUCM

ruby on rails - Paperclip not sizing correctly -

I am using a paperclip for my app and the images are not consistent with the sizes that I set them. I am using paperclip and ramagic and image magic is established. When I Convert C: \ Program Files \ ImageMagick-6.8.9-Q16 \ convert.exe C: \ Windows \ System32 \ Convert. Exe development.rb paperclip. Option [: command_path] = "C: / Program Files / ImageMagic-6.8.9-Q16 / Convert exe" Gemfile Mani paperclip 'Gem' rmagick ',' ~ & gt; 2.13.2 ',: platform = & gt; : Ruby User.rb is_teated_file: avatar, genres: {Medium: '210x260'; Large: "300x300" gt; "Thumbs:" 100x100> "}, Default_url:" /assets/default.png "Validities_itity_cent_type: avatar: content_type => [" image / jpg "," image / jpeg "," image / png "," image / gif "] view & lt;% = Image_tag @ user.avatar (** style **)%> < p> I am testing it on two different image

java - JDO - Determine entities affected by transaction commit -

मैं एक जावा वेब प्रोजेक्ट को एक JDO आधारित दृढ़ता से एक साथ रखने के शुरुआती चरणों में हूं यदि मैं अपने HTTPServlet और commit या रोलबैक में एक लेनदेन शुरू करता हूँ आउटपुट स्ट्रीम की प्रतिक्रिया लिखने से पहले सर्वोलेट, क्या वस्तुओं की सूची प्राप्त करने का कोई तरीका है (या सिर्फ आईडी) जो कि कमिट द्वारा बदला गया था? यदि हां, तो प्रदर्शन क्या होगा? अपडेट: मैंने अभी तक ऐसा नहीं किया है, लेकिन ऐसा लगता है कि एक InstanceLifecycleListener को जोड़ने से स्थिरता प्रबंधक चाल करता है। एक इंस्टेंस लाइफसाइकिल लिस्टनर जोड़ना से स्थिरता प्रबंधक अच्छी तरह से अब तक काम कर रहा है। एकमात्र पकड़ा यह नहीं था कि क्लासेस [] पैरामीटर को addInstanceLifecycleListener में छोड़ दें। इसके बजाय अगर आप सभी परिवर्तनों को सुनना चाहते हैं, तो स्पष्ट रूप से null पास करें।

How to programmatically move a tab to another window in a firefox Addon-SDK extension? -

It looks like you can change the order of a tab by updating the tab .index property, it does not appear that it directly supports moving to another window in a tab. Am I missing something? Is there a viable solution? This is possible through low level module window / utilities . The example below duplicates the active tab on every open window const {getMostRecentBrowserWindow, windows: getWindows} = ("sdk / Window / utils "); Const {ActionButton} = Required ("SDK / UI / Button / Action"); Var button = ActionButton ({id: "Duplicatetab button", label: "Duplicate Tab" icon "data: image / png, base 64, iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8 / 9hAAACUElEQVQ4jaWTTWtTURCGjzc33CCpbVKN4kexC9EUY1Hov + iqPyDrbgtuCrViKUERqsWVguBGQaW4UiKiaEVxoShFGgnuBMUqNW3zce49Z + ZxUWtwoRR8YXbzPswM7xj + JgVEiXGsYVknxgII4Ltt5p8AB8RArOAUVQfqQJNtAFA8QgvF6i9PR1Dt0KbVBTjncM4hIni / OZv3HsRB + wvefiP2LcQnJIkQe49FEJFNQLPZZHh4mEwmQyqVoqenh3K5TGvlK1dOlageH

R: Weird behaviour consistent with R specification? -

When working with large lists with the named field, I follow the following, and exceptionally incompatible behavior: & gt; L [[Regional ID]] [203] $ `112175100` [1] 0> [[Regional ID]] [["112175100"] [1] 93.98552 and & gt; Reduce ("+", L [[Regional ID]]) [1] 434005.8 & gt; S & lt; - 0 & gt; For (in the name (L [[Regional ID]] + + {+ S - S + L [[Regional ID]] [[Ann]] +}> S [1] 458813.5 You can have several elements of the same name, L <- list () field id & lt; - 1 L [[regionID]] & lt; ([112175100 ] = 0, "112175100" = 93.98552) L [[Regional IDE]] [2] L [[Regional ID]] [["112175100"]

python - Shampoo cycle loop -

I have trouble finding out how to stop the loop in my code: def shampoo_instructions (num_cycles): For num_cycles in the category (1, num_cycles + 1): If num_cycles & lt; 1: Print 'very low.' Eleph num_cycles & gt; 4: Print 'lots'. Else: Print num_cycles, ': stir and rinse.' Other: Print 'done'. Shampoo_instructions (2) My output will be: 1: stir and rinse. 2: stir and rinse. Done. How can I create this when shampoo_design (6) it just prints "lots." ? To move your class check out of your actual loop, example: < Previous> def shampoo_directories (num_cycles): if num_cycles & lt; 1: Print 'very low.' Alif New_ Psyllae & gt; 4: Print 'lots'. Other: For num_cycles in the category (1, num_cycles + 1): printed num_cycles, 'lather and rinse.' Print 'Done'

access control - Writing a sample ABAC authorization policy using ALFA and XACML -

I am new to XACML and am writing the policy using ALFA. The policy I want to write is to set the transfer limit for a bank of $ 2000 if the amount to be transferred is more than that, the operation must be denied. How do I do this? Thank you! In case of usage you have a lot easier I suggest that you write it in English first And then in alpha: A user can action == transfer to type == bank account on the account if and only then If the amount was transferred & lt; Zodiac limit (example 2000 in your case) ==> Permission All Other Matters == & gt; In / Li> type = string} attribute resource type {class = resourceCat id = "resourceType" type = string} attribute amount {class = resourceCat id = "zodiac" type = double} / ** * Can be 'action == transfer' on the resource of the user `` ===================================================== " Transfer Per * & lt; Amount Range `(For example 2000 in your case) =

javascript - Not "window" and not "window.innerHeight" but -

I have a site where I have a HEADER element, then a main element, and then a footer element I want I want to raise HEADER and MAIN elements whatever they naturally take, and then to take FOOTER to the remaining browser height (do not create a scroll) assume that there is the height of the remaining browser but when I use the browser I see the height "window" or "window.innerHeight" with height and then height If you remove the height and height of the foot from the height of the foot, then the height of the footer is as high as it should be and it creates a scroll here I have scripting: Height () + $ ('MAIN'). Height () + $ (height ()) {$ ('footer') height (window.Wirhite - ( $ ('HEADER') height () + $ ('main'). Height ());} Staging site is owned by, therefore it is expected that anyone can view my The flaw will appear in the code. footer {background-color: "post-text" itemprop = "text"> < P>

math - Javascript Rounding to the nearest 2 decimal (however 5 rounds down) -

All my values ​​are coming back from the server as 3 decimal places. I have to score 10, 2 decimal places in the nearest place, in the past. Grip from decimal (18,2) decimal (18,3) is that when it is a 5, then it needs to be rounded. I need to do this in javascript: D I can not guarantee that 3 decimal places will return, this is the maximum. ex 4.494 - & gt; 4.4 9 ** East 4.4 9 5 - & gt; 4.4 9 ** East 4.496 - & gt; 4.50 It seems that you only want special rounding, where the final digit is 5, so the exam is for him and in those cases differently Do the goals from: PreRound function ends in myRound (n) {// if .nn5, then round if (/ \. \ D \ d5 $ /. Test ('' + N)) {n = Math.floor (n * 100) / 100; } // apply normal spherical return n.toFixed (2); } Console.log (myRound (4.494)); // 4.49 console.log (myRound (4.495)); // 4.49 console.log (myRound (4.496)); // 4.50

php - How to append text to a file a 15 lines above its end -

I am trying to add the HTML to a file using fwrite () . My final goal is to add 15 lines from the end of the file. Even I have so far: & lt ;? Php $ file = fopen ("index.html", "r +"); // Explore Search ($ file, SEEK_END, 0); // Get that location and save $ filesize = ftell ($ file); // Find the length of the file length ($ file, SEEK_SET, $ filesize + 15); // Write your data $ main = & lt; & Lt; & Lt; MAIN // html here comes MAIN; FILIT ($ file, $ main); // File handler fclose off ($ file); ? & Gt; It just keeps overwriting at the top of the file. Thank you. The sample code in the question is not based on the lines, because the size of the file you are working with (Unless there is any notion about the definition of lines in the application which is not mentioned here). If you want to work with lines, you will need to search for new line letters (which separates the next line). If the target file is not a large file (so we can

arrays - Standard Deviation for row in table python -

What I'm trying to do is calculate the standard deviation of each line in the table row, everything is imaginable Have tried to execute it correctly, but it has not received it. The array looks like this array = [[4, 6, 1, -3, -12], [9, 14, -4, 32, 0 ], [3, 12, -2, 8], [4, 4, 4, 4, 4]] Python Code: array From file import array to row: mean = sum (line) / lane (line) print ("STD dev =", (amount x (x-mean) ** 2.0 for x in line) / float (lane STD Dev = 12.6237870704476 STD Dev = 9.286549412 99512 STD Dev = 0.0 STD Dev = 6.368673331236263 STD Dev = 12.6237870704476 STD Dev = 9.286549412 99512 STD Dev = 0.0 < / Code> Already like this To get the standard deviation of each line of the array which it does this: [16] In: [16] Import as NP: array = [[4, 6, 1, -3, -12], [10, 14, -4, 32, 0], [22, -3, 10, -2, 8], [3, 4, 4, 4, 2]] [18]: Np.array (array) .std (1) out [18]: array ([6.37, 12.61, 9.12, 0.8]) By chance, if we have Np.array (Array) .std (0) ,

Printf Assembly Language Stack pointer nasm intel -

Setup: Nasm Intel 64bit Ubuntu I'm getting a split error when I include the printf line without compiling it and running OK. Is printing on the stack pointer printed? When printf is called here, will the DD2 be on the stack pointer? I suppressed the last two items for stack returns in their initial position. All help appreciated, a great evening! section. Data DD: DB1DD2: DB "% d" Extinty print section .text global main menu: push DD push DD2 call printf pop racks; Pop rbx; The calling conference for 64-bit is very different, with whatever you use 32 bit. Scroll down to x86-64 It will tell you that the first 6 parameters have been passed in the registers: the first in RDI, the second in RSI, the 3 in the RDX , Fourth rcx, 5th r8, 6th r 9, and more and they have passed on stack; Floating point parameters are provided in XMM0. 7 Then, you must have a printf: mov rsi, ddv mov rdi, dd2 mov rack, 0 call printf Because we do not give anything in XMM Reg,

html - Refering to 2 css classes from within a textarea -

Is it possible to refer to 2 CSS classes in a text field like the following: There are classes from a CSS file with section 1 and section 2. I hope someone can give advice, thanks. Yes, you can use both the style sheet and your HTML, div for the purposes of display, but also applies to textarea .section1 {font-weight: bold;} Section2 {font-style: italic;} .section1.section2 {color: # f00;} / * will apply only if both classes exist * / & lt; Div class = "section1" & gt; I'm bold & lt; / Div & gt; & Lt; Div class = "section2" & gt; I use italic & lt; / Div & gt; & Lt; Div class = "section1 section2" & gt; I'm bold, italic and red! & Lt; / Div & gt; In HTML there is no difference between the two attributes to be included in many classes in your CSS with a single place

sql - SQLCMD is appending newline and "1" in the query results -

I am calling the sqlcmd utility from ksh script to recover dummy record and store it in a variable MY_VAR = `sqlcmd -s server, port-u username -p password -dbn-h-1-w -k" SET notation on; select dummy '; "` I hope to keep "codex" MY_VAR as "dummy" because it is the returned row with the query, and the use of -h -1 is the header To remove that And -वे to delete the back position but instead, output dummy 1 not me Know that 1 is coming. I am firing the query myself and rightly giving it to me as a "dummy" result. Use uppercase -Q and you can skip both ; I guess & gt; SQLCMD.EXE -E-S. Note SET on \ SQLEXPRESS -W -h -1 -Q "Select Dummy" "Dummy"

php using variable as actual argument in php function -

Below is my code. In the first half of my code you will see variable $ $ question and $ line. I get the value when I echo out the $ Question and / or $ line [0]. However, at the bottom of the code, I try to use the variable in the add_textbox function as the actual argument for the use of these I am However, the add_textbox function is functioning as they are variable nulls. Someone can tell me what I am doing. & lt ;? Php $ dbhost = 'localhost'; $ Uname = $ _POST ["uname"]; // *** Connection object $ connection = mysql_connect ($ dbhost, "bc572482", "dfdfdfs") or die (mysql_error ()); $ Dbname = "bc57"; Mysql_select_db ($ dbname) or die (mysql_error ()); // *** Select a random security question // session_start (session) requires session variants; // resonance ($ _SESSION ["legitimate user"]. '' ;); $ Uname = $ _ session ["legitimate user"]; // resonance ($ uname. '& Lt; br & gt;&#

javascript - How to save a file from webpage by prompting save as dialog box? -

In my application, after clicking on the hyperlink, this application creates a PDF file and save the file without any automatic Downloads form To motivate me to save the file locally, a save as the document box is required, in this way I can select a directory every time I download the file. Please help me in it. Thank you. I think this browser depends on support, if there is support for viewing the browser file You can see the file browser and click the Save button to download it; Otherwise, the browser will inspire a dialog box.

algorithm - Java Iterate over nested map -

कृपया प्रत्येक तत्व पर पुनरावृत्त करें और प्रिंट करें के लिए (प्रविष्टि & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, सूची & amp;; TicketDetailsDTO & gt; & gt; & gt; & gt; ज़ोन: ज़ोनऑर्डेडटैटलिस्ट.ेंट्रीसेट ()) {for (स्ट्रिंग स्ट्रिंग: zones.getValue ()) {}} TicketDetailsDTO ऑब्जेक्ट का नाम और आईडी फ़ील्ड के रूप में है यह प्रयास करें, के लिए (प्रवेश और लेफ्टिनेंट; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, सूची & amp; टीटी; टिकट डिटेल्स डीटीओ & gt; & gt; & gt; & gt; ज़ोन: ज़ोनऑर्डेडटैटलिस्ट.ेंट्रीसेट ()) {for (Entry & lt ; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, सूची & amp; लिट; टिकट डिटेल्स डीटीओ & gt; & gt; & gt; & gt; मानचित्र 2: zones.getValue ()। प्रविष्टि ()) {for (प्रविष्टि & lt; स्ट्रिंग, मानचित्र & lt; स्ट्रिंग, सूची & lt; TicketDetailsDTO &

Using atom text editor with the vim-mode package, how do I view commands in command mode? -

I'm just starting to use nuclear and I'm typing in the command, but unlike Vim, where you I see them under the window, I do not see them in atoms. Anyone knows that they do not show the command / text "itemprop =" text "> according to my experience, but in some instances the search (:?) Or (/) works. This text editor The main window is shown below. / P>

queryinterface - Getting the current inner window ID in a Firefox 32 extension -

I'm trying to maintain a Firefox extension and it depends on getting the existing internal Window ID. Window 31 has a query interface in Window object: element / foo.js: Foo.prototype = {window: tap, ... init: function (aWindow) {this.window = XPCNativeWrapper .unwrap (aWindow); Var util = this.window.QueryInterface (Ci.nsIInterfaceRequestor) .get interface (Ci.nsIDOMWindowUtils); Dump ('your internal window id is:' + util.currentInnerWindowID + '\ n'); }, ... shutdown: function () {}} window in firefox 32 The JQuery interface object has disappeared and I wonder how to get the current internal window id. Thank you. Calling XPCnetwrapper.unwrap removes the query interface from a window. if (aWindow.QueryInterface) {util = XPCNativeWrapper.unwrap (aWindow.QueryInterface (Ci.nsIInterfaceRequestor) .get interface (Ci.nsIDOMWindowUtils)); Dump ('your internal window id is:' + util.currentInnerWindowID + '\ n'); }

user interface - weka gui bug, some content keep blink or disappear in gui -

Image
When my mouse runs on some material in Gui, the material will partially disappear. And until I stop Vaica, the content will not be retrieved. My system is Windows 7 * 64 with Java 1.8 and I've got the Test 3.6 since all the version weka, they all have such problem for me, while 3.4 does not. Thank you in advance! I currently run Windows 7 64-bit with Weka 3.6 and 3.7 1.7, And the application runs fine. One thing I have seen from your screenshot is that the font used for your layout is different for I currently (see below). Maybe there's something with your default font or locale?

ruby on rails - http instead of https for heroku sites -

I have built a rail app and pushed it into the production through all its lock. The default address starts with https instead of http, can I force it to begin with http? My production rb In the file, I have the following: config.force_ssl = false I also have said that the line is tried out, but It still does not work Do I need to do something else? You'll need to take these basic steps: purchase an SSL certificate preferred SSL: endpoint Edition Herokok Adns: Add SSL endpoint Upload your certificate update your DNS config.force_ssl = true configure your rails application or for more information:

android - Error: file not found: arch/arm/boot/compressed/piggy.lzo -

I'm trying to create an Android project Error after setting the correct path for tooltips Is also being done under / bin / sh: lzop: arch / arm / boot / compressed / piggy.lzo.o arch / arm / boot / compressed / piggy.lzo.S Not found in the form: Assembler Message: arch / Arm / Boot / Compressed / Piggy Lzo.S: 4: Error: File not found: arch / arm / boot / compressed / piggy.lzo create [2]: *** [Arc / Arm / Boot / Compressed / Shooter Lzo.o] Error 1 making [1 ]: *** [Arc / Arm / Boot / Compressed / vmlinux] Make Error 2: *** [zImage] Error 2 Make: excluding directory / / home / user / workspace / android / kernel / exynos54xx 'build: error : Build-kernel failed and died !!! Here is a solution if you are using Ubuntu: Install $ sudo apt-get lzop Or you can see the lzop package of OS.

Mysql change date format mm/dd/yy into yyyy-mm-dd -

Hello can someone help me if I mm / dd / yy to How to change yyyy-MM-DD in MMDL My date table is in VARCHAR, so that when I import CSV, this can be a copy, but CSV date mm / DD / i.e. and as of August 1, 1992, I want both the formats to be in yyyy-mm-dd. Thank you. User will import your mysql date column as DATETIME, when importing CSV to this script Format used for change & lt ;? Php $ CSV format = $ variabletostorecvsformat; $ CSVTimestamp = Stratom ($ CSVFormat); $ MysqlCompatibleFormat = Date (Y-M-D, $ CSVTimestamp); ? & Gt; Now enter the varibale in the database

How to check the strings contains same characters in scala? -

I want to see the strings in the same characters, for example my strings are: BCE CE should serve me as a result, BEC = BCE // True ECB = BCE / True CEB = BCE / / True CBE = BCE / True EBC = BCE // true CE = EC // true strings Can be converted into the archives inherently, and in the collection a toSet Is the method that sets the content one, and the identity is independent of the set

python 2.7 - Using a dictionary that takes a list, a, as an argument and returns a list containing the elements of a that occur exactly once -

मुझे थोड़ी देर (पायथन 2.x) में फंस गया हूं dict , एक विधि केवल_ऑन्स (ए) लिखें, जो एक सूची, a को एक तर्क के रूप में लेता है और एक जो वास्तव में एक बार होते हैं तत्वों को उसी क्रम में a । def एक बार (ए): सूची = [] डी = {} रन = 0 में प्रकट होने चाहिए। I में एक: डी [i] = डी। एचएस_की (i) प्रिंट ([k के लिए डी.कीज़ () में) यदि नहीं तो [k]])) यह प्रिंट करता है पाठ "> आपकी कुंजी समस्या यह है कि आप शब्दकोश प्राप्त करने के लिए शब्दकोश की चाबियाँ (स्पष्ट .keys () अनावश्यक है, जैसा कि आप डिफ़ॉल्ट रूप से किसी शब्दकोश की कुंजी पर पुनरावृत्त करते हैं); शब्दकोश हैं अनॉर्डेड इसके बजाय, आपको इनपुट ऑर्डर का उपयोग करने की आवश्यकता है: def only_once (a): d = {} में आइटम के लिए: यदि आइटम नहीं में डी: डी [आइटम] = 0 डी [आइटम ] + = 1 रिटर्न [मद में आइटम के लिए अगर डी [मद] == 1] ध्यान दें कि आपका कोड कभी भी सूची का उपयोग नहीं करता है (जो, जैसा कि एक अंतर्निहित छाया, एक ऐसा नाम है जिसका उपयोग आप अपने चर के लिए नहीं करना चाहिए) और चलाएं , इसलिए उन्हें हटा दिया जान

asp.net - asp:calendar binds last value to date from database -

Let me have a & lt; Asp: calendar & gt; must be binded with data obtained from a database linq query here is the linux code public list & lt; AllCalander & gt; SearchCalender (int month, int zip, string type, cause of int) {var xyz = (meters from db to calendars where (m.DateFrom.Value.Month == month || mg = = zip} m New {caustitle = grp.Select (x = & gt; x.Caus.CauseTitle), datfrm = grp.Key by new {m.DateFrom} in group Active.type == type || m.CauseID == cause) Select .DateFrom, total = grp.Count ()}) .Olist (). Select (M = & gt; New Allen Calendar {DateFrom = Convert.ToDateTime (m.datfrm), CauseTitle = string.Join (",", m.caustitle), total = m.total}); My aspx.cs code is here list & lt; AllCalander & gt; Calmer = calbel. Searchcorder (mnt, zipstring, type, reason string); Forchcha (my item in the carrier) {string datetime = myItem.DateFrom.ToString (); Liberal myEventNameLiteral = New Literal (); MyEventNameLiteral.ID = I + m