Posts

Showing posts from January, 2014

javascript - Does Opera capture events by default and what is the correct behaviour? -

I had some event code that failed in Opera and I snatched it down Actually The problem is that the event handler does not run in opera if the third parameter of addEventListener is not set. In Firefox and Chrome, the value in the Taxcake Internal is when the "Use is not used" - Button is clicked, but not in Opera. This (old) article indicates that Opera is different from WebKit & amp; Lizard Browser: I'm not sure what to do about it though MDN says that the useCapture should be the default on false . The default is true in Opera, this parameter is optional, or what am I missing? What is the right behavior? If there is any doubt, see the device originally and still the current spec is W3C, seeing that It seems that the useCapture parameter is required because it is not an optional reference. DOM Level 3 Event, although I do not think so Note: useCapture became optional only in more recent versions of major browsers; For example, it was no...

c# - Different ways to parse / visit Expressions when traversing -

Expression is a basic question about parsing trees. Is there any difference in using the statement from determining the node type of an expression, and accordingly handling it, versus the expression, do different visitor methods? This is also the correct way to send: Travel member of protected override expression (Member Feedback Me) {If (m.Expression.NodeType == Expression Type. Constant) {Expression E = (M. EXPRESSION as Constant Express); This.Visit (e); // Discriptions to VisitConstant ()? }} versus: Protected Override Expression Member (Member Experiment M) {if (m.Expression.NodeType == ExpressionType.Constant) {/ To handle specific code /}} By the way it is in the context of parsing the following: dbContext.Products.Where (x = Gt; X.id == user.ProductID). ANAnemerable () // user.FooID is 'Member intent' The connection between the node type and what is the type of expression just? For example, I have seen that nodtaps, which are not in the most de...

iis 7.5 - Multiple Site (Application) Windows Authentication (IIS 7) -

We have multiple web sites that need to process DOMAIN authentication in Windows. I only have multiple sites on one server. For example: s1.domain.com s2.domain.com s3.domain.com All of which have a single sign-on Want to do Any thoughts? As far as I can tell, doing this Impossible. IE is the only one that is capable of approaching, but it seems that it is a lack of a browser. Instead, we created redirects from S1, S2 and S3 and configured virtual applications of the same domain.

c++: Format number with commas? -

I want to type in a method that will take an integer and std :: string this integer comma Is formatted with. Example Announcement: std :: string FormatWithCommas (long value); Example Usage: std :: string result = FormatWithCommas (7800); Std :: string result2 = FormatWithCommas (5100100); Std :: string result3 = FormatWithCommas (201234567890); // result = "7,800" // result 2 = "5,100,100" // result 3 = "201,234,567,890" C ++ method of formatting a number string (The bonus will also have to handle double s). Experiment with #include & lt; Iomanip & gt; #include & lt; Locale & gt; Template & lt; Class T & gt; Std :: string FormatWithCommas (T value) {std :: stringstream ss; Ss.imbue (std :: location ("")); SS & lt; & Lt; Std :: Fixed & lt; & Lt; value; Return ss.str (); Disclaimer: Portability can be a problem and you should probably see which location is used when "...

iphone - Is there a way to identify the cell selected in the parent uitableview -

I'm trying to load a different set of data in a single UITableView depending on which was selected in cell tableView am: didSelectRowAtIndexPath: method that We request that I have to do the last scene I'd set a value within the scene pushed Neo can change what I selected PHP script Are what For example, if I can pass my new push to see a number I would have a statement or perhaps a switch, the switch statement would then use my ASIFormDataRequest cover if I usnig my request NSObject Saying PHP script to execute I have related to this cell selection, data passes back. I hope that it makes sense, if you have any experience with what I am trying to achieve and I would be happy to know this is a better way to do this. . You will be determined by didSelectRowAtIndexPath details that can make a property in the view controller method. It assumes that your data has been stored as an array of numbers in NSARR. Your implementation will be different from this, but this ide...

html - HTML5 nav tag content -

In Html5, & lt; Nav> Contrasting documents appear to be related to documents related to tags. Examples I've seen use: & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Neo & gt; But I am thinking that this is only because people are used to using Divas. I have seen examples that just do this & lt; Nav> & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Neo & gt; The other way seems cleaner for me more meaningful is t...

plone - Disabling automatic suggestions on not found page -

I noticed that the page was too much processing by dragging automatic suggestions on "the item you are looking for could not be found" The power on our site is using What is the best way to disable these suggestions and just the user has "nothing to see here. (Without users, my life will be better) / P>

sh - find a command on $PATH -

I am writing a script, and I need to see the command at the user's $ PATH command The problem is that I do not know what the user's login shell is, or what strange stuff can be in their file, I am using Bourne Shell for my simple script because some older Solaris platforms are needed to run on That is, that can not be bash. Some implementations of "Which" and "since" files will be the source of the user's dot, and this is not really portable for all users. I like a simple UNIX utility that is executable The original work of scanning the path and reporting the full path of the first match will be done. But I have any / bin / sh solution which is stable for all users. I'm looking for a solution that is better than writing a / bin / sh loop that closes $ PATH and searches for it at a time. It appears that it is a common practice to have a reusable way to do this. "Long way" My first approximation is: IFS =: $ I in path; If [-x $...

objective c - How do I use a new framework I have built? -

I had some problems with the AWS IOS SDK framekit because it was not created to work with OSX apps . I found one. The directory structure looks something like this: AWSIOSD Frameworks / src / --Amazon Order-time / - amazon.3 /. - AWSCocoa / ---- AWSCocoa_Prefix.pch ---- AWSCocoa.xcodeproj ---- etc - included / So if I I go to the encoded project, and builds the aduccoco. But when I look at Timestamp on AWSiOSSDK.framework, it has not changed. So I do not know what compilation of this adcukah I get, or where I can find the files I created, assuming that Building Axcosa.xcodrew should make a new version of the configurable framework with OSX development, Where do I think I have made and linked? The AWSiOSSDK.framework bundle is a precompiled framework, probably left from its earlier experiments in making a Mac version of this (since you can not use such a framework with iOS, only Static libraries) Do not ignore it. If you are using ExCode 4, your built-in framework will b...

Drupal: Cannot save any nodes of certain content types, used to work -

Whenever I save or create a fixed user type of node, I'm in the edit window instead of switching first View labeled tab. All of my fields (body, title, etc.) are not visible and no messages appear, neither on the straight page nor in the watchdog database log. Verification is working though, because I see those essential messages as soon as I Try to save without the title for example. The odd thing is that when I make a new content type or use predefined story and page types I can edit the nodes. In the latter case, with a 302 redirect, while with the pipelatic content type, only 200 HTTP status is returned. This problem is either javascript (or off, No difference) Chrome and Firefox are not related to the browser) or WYSIWYG (with and without input formats being used) I am using Drupal 6.22 and CCK. I have around 7 content types, some of which are the I rules, but there are a lot of modules, which are all up-to-date. I will post a list if this issue can not be resolved. ...

asp.net mvc 3 - MVC3: proper place to add a dependency on a logger class? -

I have an MVC3 app with a simple log service. Use Microsoft's Unity Dependency Injection Container to access all of my services is applied. For most of the ways, I ignore exceptions; They are caught in the top-level error handler, which classifies them and decides whether they want to log on or not, causes HTTP response and I return the action method on the error controller to your custiom error page Call me Sometimes, though, I do not want to do this; I want to handle the exception where this happens, e.g. In that case in my controller, I want to log the error before replacing a proper default value and continuing with the argument of the controller. I did the same place: In my controller, I said: var logService = DependencyResolver.Current.GetService & lt; ILogService & gt; (); Try {/ * hold some uncertain * /} (exception pre) {logService.LogException (category, pre); / * Do something else instead * /} Now I want to do this second time in that controller (...

iphone - SMS style Toolbar -

संभव डुप्लिकेट: ठीक है, इसलिए मैं एक चॅटिंग अनुप्रयोग पर काम कर रहा हूं, और मुझे एसएमएस टूलबार के समान एक टूलबार बनाने में परेशानी हो रही है, विस्तार योग्य पाठदृश्य और भेजें बटन के साथ। क्या कोई भी जानती है इसे कैसे प्रोग्राम बनाने के लिए या इंटरफ़ेस बिल्डर के साथ? आपको इस प्रोग्राम को तैयार करना होगा, और यह काफी कुछ कोड की आवश्यकता होगी। सौभाग्य से, वहाँ बहुत सारे ओपन सोर्स घटकों है जो सिर्फ इतना ही करता है। देखो, या यदि आप मुझसे पूछें, तो SSMessagesViewController बेहतर बनाया गया है।

php - Can you suggest a simple url-friendly two-way hash/unhash without mcrypt or base64? -

I want to make a super simple / fast encrypt / decrypt function for non-critical pieces of data. I like the encrypted string to be user friendly (bonus points for pure alphanumerics), and should be more than that. Ideally, there should be some type of key or other mechanism to make the cipher random. Due to server constraints the solution should not use mcrypt. Ideally it should be easily saved from the base 64 due to decrypting. Example string: sample@email_address.com Shortstring two words or three words 555-123-4567 capitals possible? You probably have to code it, but you might want to code it, but a winger cipher letter AZ, az, 0-9 should satisfy your needs. With careful key output and a long key (ideally longer than the encrypted text) VigenÃÆ'à ⠀ ™ Ã⠀ šÃ, © You have to use it carefully to make sure.

Queue3 Chapter 19 in Programming in Scala 2nd edition Question -

I'm reviewing a code for example QA 3 in programming in Scala 2 version by Odarsky et al. And I think I'm stuck Here's the code: Object Queues3 {class queue [T] (Head of Personal Val: List [T], Private Val follow: list [t]} {private def mirror = if (leading .isEmpty) new Q (trailing.reverse, zero) and it def define = mirror.leading.head def tail = {val q = mirror new queue (q .leading.tail, q.trailing)} Def N (x: T) = New Line (Key, X :: Indexed) Override def toString = Leading ::: trailing.reverse mkString ("queue (", "," ")"}} Object Q {// prepares a queue with the initial element `xs' def [T] (xs: (*) * New line [T] (Exits list, zero)} Def main (args: array [string]] {val q = que [int] nq1nq 2 printlen (q)}} Therefore, it is trying to implement the queue in a functional programming manner whose speed is inevitably. To do this, it will split the queue into two halves so that we can The whole queue is basically: Leading: :...

html - Implementing a horizontal sub menu with Javascript -

I'm looking for some examples that I used to implement horizontal sub menus in javascript (not horizontal) Can i I would like a menu that would be SEO-friendly. Here's an example of what I'm looking for: opt2 opt3 opt4 opt1a opt1b opt1c opt1d opt1 opt2 opt3 opt4 opt2a opt2b opt2c opt2d So when the user exceeds opt1 at the top level, opt1a, opt1b, opt1c, and opt1d options appear on the second level menu below. When the user exceeds opt2 at the top level, opt2a, opt2b, opt2c and opt2d options will appear at the second level. Has anyone seen any code example for this? What I am thinking is that there are four different DIVs for the second level menu and after that there is no way to look at these DIVs at different levels. It sounds easy, but I think it's not that easy. A good way to create a horizontal menu that has minimal cross-browser problems are the following pattern & Lt; LI & gt; and & lt; LI & gt; What is the key of the style ins...

cocoa - Animated rotation of NSView contents -

I'm trying to rotate the contents of NSView ( NSButton In-Place (from IE center I want to convert - to | / />). This can be done with setFrameCenterRotation: â ?? | However, I am trying to animate it, and [[MyView animator] setFrameCenterRotation: 90]; First cause the control to jump right, and then rotate at the bottom of the bottom left corner (0,0). Some people have suggested setting before anchorpoint : [[myview layer] setAnchorPoint: NSMakePoint (0.5, 0.5)] ; But for some reasons the animation cancels it and it gets reset (0, 0). So, did anybody have thought that these- one NSView If you add, this does not happen to control the interface builder and rotate it using its IBOutlet. You do not have to use the "setAnchorPoint:" method; The "SetFrameCenterRotation:" method will work itself, though the same thing happened to me when I tried to rotate NSBetton, I have a subview in NSCL. See a NSView the Anssisel subclass Con...

tools for obfuscating html and css -

I like something or what does this Rewrites squares and IDs in CSS, HTML, and JavaScript files, for something like .a or #id to ensure the class is very good to use javascript obfo (I do this to google I like to shut down) but HTML and CSS have a question. Is there any alternative? Google can rename your class names. It works in conjunction with HTML and Javascript. Closer stylesheets have made it possible to rename CSS class names in the Generated Stylesheet, which helps to reduce the size of CSS, of course, to its users, especially useful Not until the name of the class is changed to the name of the HTML and JavaScript files that use CSS. Fortunately, you can use the Closer Compiler to update the class names in your JavaScript and Closer templates to update the class names in your HTML.

MongoDB: atomically pop random element -

There is no way on which temporarily populate a random element of the Mongodebi - like radis (remove and retrieve) pop ? I have read, but now I need to make sure that the element is removed even when it is received, and it should be done atomically. I think that as an alternative I was able to push data into an array before the field was sorted, but I really like to get it a random record. Looking at the document of $ pop , it seems that it can not be argued, so it either removes the first or the last element of an array. If there are atoms updated within the collection in Mongo, then with a randomly approach approach findAndModify combination: var rand = Math.rand (); Db.collection.findAndModify ({query: {random: {$ gte: rand}}, remove: true}); Just make sure to query for random: {$ lt: rand} when returns above null . PRIPIP: Some drivers have findAndRemove , which remove with findAndModify : true .

.htaccess - How do I remove a trailing slash? -

I just want to remove the following slash from a directory, for example I / p / page / I want to show it as / p / page it just looks better, is not it? Although I have tried many different types of mod_rewrites, but none has worked or something happened. I just want that any folder in the folder in a folder like subfolders ( / a / b / c ), / p / No, because it can affect my other parts of the site in a negative way. You can try adding the following line to your .htaccess file: Previous> Close the directory The problem was solved for me a while ago. If the path is only / , then I do not think you can get rid of it.

iphone - Text getting blur on zoom-in -

I have a tableview in which there is an overview of imageview. Now when the user is zoomed in, inside the tableview The text is blurring. Is there any way to manipulate this at the time of the zoom-in? Please follow the steps given below. Do not statically define the status of the position, I mean by coordinating. Dynamically set the position or at the current time it will take a position based on the current window or zoom out in the status label, I'm not pretty sure because I did not face this situation before but as I think It is possible that this case case scenario may be used to resolve your problem. Thanks

iphone - UIPageControl with scrollview -

In my app, I have to use two pages using the UIGAZ control. Now my question is what is the need to use UIScrollView to use page controller? There are two separate components that have a scrollview and page control when you scroll through the scrollview, Control status is required to change. Page control is only a series of dots. If you want an easy way to integrate more than one view with page control in the scroll view, you can use it that will reduce this process and many more things automatically Will do

java - output param on simplejdbccall -

The output a single integer to me the ultimate and 5 varchar input parameters, no matter what I tried I with a stored procedure output are not seem to get the ultimate back I ran sproc on DR and it came back with the data, so I can not see what I was doing wrong. Anyone know how to get an output ultimate from simplejdbccall I have something like this: SimpleJdbcCall simpleJdbcCall = New SimpleJdbcCall (getDatasourceForEnvironment ()) .withProcedureName ( "_Get_Id") .declareParameters (new SqlParameter ( "MyID", Types.VARCHAR), new SqlParameter ( "MySourceID", Types.VARCHAR), new SqlParameter ( "MyLocationID", Types.VARCHAR) , New SqlParameter ("MyVisitID", Types.VARCHAR), New SqlParameter ("MyVisitDate", Types.VARCHAR)); HashMap & LT; String, string & gt; Input = new hashmop & lt; String, string & gt; (); Input.put ("MyID", myObj.getMyID ()); Input.put ("MySourceID", myObj.getMySo...

java - Problem with Closing newly opened JFrame -

I am developing a desktop application using NetBusiness IDE. 1) When I open a new Jeffram, click one button while closing any of the opened frames stops, both are closed. 2) And after clicking the button I want to update a new tabbed JPNL on GeFrom. thank you in advanced. Perhaps you are using the wrong logic I guess for JFrames that you have the entire application Close without closing: jFrame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); In fact, only close the desired frame without closing the rest of the frames: jFrame.setDefaultCloseOperation (JFrame.DISPOSE_ON_CLOSE);

Set HTML id attribute in Rails form select box -

How do I set ID attributes in my drop down box? Here's my part of the question in question: & Lt;% = builder.link_to_remove "Remove this item"%> & Lt;% end% & gt; the: id = & gt; The "Quantity_field" method works for text fields, but to see the HTML source for the selected fields I'm getting an ID of "estimate_items_attributes_0_material" for the content text box. This is a strange incompatibility Any help would be greatly appreciated. There is a parameter between the possible option and the HTML option. Then you have to do this: & lt;% = builder Selection: Thickness, @ letters.map {| L [L.thickness, l.thickness]}, {} ,: id = & gt; "Thick_field"% & gt; You can find a doctor here: And it can also be helpful:

visual studio 2010 - Parallel Processing/Parallel Programming in C# -

I need to process more than one function that returns results returning the same type of archives. I am considering my work, using Visual Studio 2010 under C #: class search {public list & lt; Wrecords & gt; GetrecordsofAAA (string word); Public listing & lt; Wrecords & gt; GetrecordsofBBB (string word); Public listing & lt; Wrecords & gt; GetrecordsofCCC (string word); } And so caller to work like this list & lt; Wrecords & gt; Record 1 = Search Gaterecordafaaaa (heart); & Lt; Wrecords & gt; Record 2 = Search Getrecords BBB (heart); & Lt; Wrecords & gt; Record 3 = Search GetrecorstsFCCC (Heart); This series is processing. I need Records1, Records 2 and 3 records, if possible, to be filled up together. // Make a list of search functions that you want to call. Var Search = New List & lt; String, funk & lt; String, IEnumerable & lt; Wrecord & gt; & Gt; & Gt; {A = & gt; GetrecordsofAAA (A), ...

Difficulties translating Matlab to C -

I have some matlab functions that I have to translate to C but I do not understand the syntax or the behavior of making . / P> I have this call and the following implementation: {... vSolution, sReturnVal] = Funka 1 (10, @ (x) funk2 (x, hour_of_de_de) );}} Function [SolutionVector, ReturnValue] = Func1 (IterationsTermination, FuncToUse) function [ReturnValue] = Func2 (TestedSolution, shour_of_day) I thought '@ (X) 'There was an ordinary function to define an unknown function (a simple pointer to the function), but here the parameter is used with a designated function, and X The value defines the parameters in the list. How can I understand this and translate it into C? This is an anonymous function defined but that anonymous function has to call Func2 . Anonymous function is equivalent to: function y = myFunc (x) y = throw 2 (x, hour_of_de_de);

c# - Using Dotfuscator for 32 bit and 64 bit setup -

I am working on an epic in vs08 for both x86 and x64 platforms i have x86 and x64 for both Both the configurations are made on the platforms but when I add the Dotfuscator project to the solution of the project and then I am unable to design two above given configuration for Dotfuscator project, write the .exes for both platforms. I want to do this because both .exes are required to make the project after construction of the project, no one can help me do this at different places. Bit or 64-bit machine code. Operating system type and platform + target settings in project + property, guided by the Build tab.

php - Can a Controller have database queries (MySQL)? If yes, when? -

I'm reading a lot of tutorials on MVC, so my question, can do database queries in an ideal PHP MVC framework controller Are you As I understand, the most comfortable way to put all database queries in the model is right? And if I have any post or mess, then I pass that post with the model and it covers all and etc. Or am I missing something? And if the controller can have a database query, what will happen in that situation? No controller can be any db related code - MVC architecture in any db questions model Can be stored in - Controller works only with model, but not directly with DB Edit: Most frameworks allow SQL to call SQL directly - but then MVC is not , But the bunch of objects

mysql - How to define a date interval in a compatible way? -

I am trying to create SQL query, which is both on HSQL V2 .2.4) and MySQL (v5.1.36) server (if this can also run on DB2V9, this would be a wonderful bonus!) is the query: Select the document count (*), where current_data - cast (date indexed as date) & lt; =? (here current_date is a standard HSQL / MySQL function and indexing_date is a column type datetime Parameter ? is replaced by integer 20 ). The problem is that MySQL gives the difference between the date while HSQL returns Additionally HSQL supports this syntax (but not MySQL): Select the count (*) from the document where the date (indexing_date as date) is current_data - between 20 days and the current date While MySQL does not do I have information in MySQL Let me, but as I said the solution should be interoperated. HSQLda also supports it: (*) Where current_data - cast (indexing_date as date) & lt; Select cast (*) from = cast (in the form of interval day) and document where ...

android fragment backstack issue -

मेरा लेआउट संरचना निम्नानुसार है लेआउट ए -------- ------------------------------ | ------------------------------- | | | लेआउट बी | | | | | | | | | | | | | | | ------------------------------- | | | | | | | -------------------------------------- नीचे लेआउट बी एक और दृश्य है लेआउट ए में एक टुकड़ा एफ 1 होता है जो बदले में लेआउट बी में एक टुकड़ा F11 जोड़ता है। अब कभी-कभी मैं टुकड़ा F11 में टुकड़ा F11 को प्रतिस्थापित करना चाहता हूँ, F12 और कभी-कभी मैं किसी एक टुकड़े के साथ लेआउट ए में टुकड़ा F1 को बदल देता हूँ F2 जब तक मैं बदल रहा हूँ लेआउट बी के अंदर टुकड़े यह ठीक है। लेकिन मुख्य समस्या तब आती है जब मैं F2 के साथ F1 को बदल देता हूं। परिदृश्य पर विचार करें जहां F1 के अंदर मेरे पास F11 है अब मैं एफ 2 के साथ एफ 1 को बदलता हूं। अब जब मैं वापस कुंजी F11 हिट अब और दिखाई नहीं है। यहां समस्या क्या है और मैं उसे कैसे प्रबंधित कर सकता हूं नेस्टेड टुकड़ों का व्यवहार अपरिभाषित है, @ हैकबोड का उत्तर देखें

jpa - Eclipselink caching problem (one database for two systems) -

I have two online-systems running both of them using eclipsealic. The first system is an administration system, where value of other applications is managed. The second system is an online shop where customers can buy articles. Both run on the server and use the same Oracle database. To provide quick access, value items are cached by Eclipsellic. If I want to flush the cache to the shop system to get a price in the administration system, to get the value of the new system. What is the best way to solve this problem? I have a similar problem but it is with user credentials 1) Configure caching in store-side You can configure eclipse link caching for the duration of the expiry. You can configure it so that the timetololyval or value expires on. For example, you can configure the expiry of prices after 1, 5 or 10 minutes. Not immediately, but very quick and very easy to implement. View catch cat annotations in EclipseLink 2) Contact the admin app to the shop app ...

SWI Prolog , how to assert data to txt file -

This is my sample source code, I am using SWI Prolog, can someone tell me how to data To be implemented in which the user's key txt.file I want to save the data in txt.file. Start: -display_menu Write ('\ n1. User Information Enter'), type ('\ n0.exits'), enter ('\ n enter your choice:'), read (choice), selection (choice), choice = 0 Selection (1): - get_userinfo. Selection (0): -! get_userinfo: -write ('\ n * enter user information '), ('\ nEnter the name:' Write (name), write ('\' gender: ''), read (gender), write ('\' enter age: '), read (age), no (age group) ('\ NGet properties'), get_attribute (attr), emphasis (userInfo (name, gender, age, aTTR)). get_attribute: - type ('enter height \'), read (height), attr = [height]. Age (age): - Age & lt; 18, write ('enter valid age.'). check; You probably want to open / close 3 and close / use one fil...

Rearrangeable ordered list with Ruby on Rails -

I want to apply a favorite favorite list. Take a playlist for this example: song a song de song b songs c The order of the songs should be saved and the user should be The order is rearranged and able to insert new elements into an arbitrary point in the list. My idea is to use a field "position" and reset it for all the elements in the list, when the list will be saved. I think what Java Hibernate does. Another idea is to use position numbers with 1000 digits, to say that there is still room for modifications: song 1 1000 song D 2000 Song B 3000 song C4000 The location will be inserted between A and D with the C 1500: Song A 1000 Song C 1500 Song D 2000 Song B 3000 Any better ideas? Why not use it?

c++ - In which cases does compiler create a new temporary local value while comparing two types? -

टेम्पलेट & lt; typename T & gt; इनलाइन टी const & amp; अधिकतम (टी const & amp; a, T const & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; एक; & lt; बी? बी ० ए; } इनलाइन चार कॉन्स्ट * अधिकतम (चार कॉन्स्ट * एक, चार कॉन्स्ट * बी) {return std :: strcmp (a, b) & lt; 0? बी ० ए; } टेम्पलेट & lt; typename T & gt; इनलाइन टी const & amp; अधिकतम (टी const & amp; a, टी const & amp; amp; amp; b, टी const & amp; c) {अधिकतम अधिकतम (अधिकतम (ए, बी), सी); } Int main () {const char * s1 = "frederic"; Const char * s2 = "anica"; Const char * s3 = "lucas"; :: अधिकतम (एस 1, एस 2, एस 3); } उपरोक्त कोड के लिए, पुस्तक (सी ++ टेम्पलेट्स- वेस्ले) कहती है: समस्या यह है कि यदि आप अधिकतम सी (तीन) के लिए कॉल करते हैं -स्ट्रिंग्स, रिटर्न अधिकतम (अधिकतम (ए, बी), सी); एक त्रुटि हो जाती है इसका कारण यह है कि सी-स्ट्रिंग्स के लिए, अधिकतम (ए, बी) एक नया, अस्थायी स्थानीय मान बनाता है जो फ़ंक्शन द्वारा संदर्भ से वा...

php - Serialized proxy classes Doctrine 2 -

Is the principle "2" likely to get a "full" object rather than a proxy class? Because I am sorting the organization (and relations), but when I deserialize, I just get a proxy class back. What I'm querying: > public function getSnippet ($ id) {return $ this- & gt; GetEntityManager () - & gt; GetRepository ('GvnSnippetryBundle: Snippet') - & gt; FindOneBy (array ('id' = & gt; $ id)); } Never tried anything individually (but they were able to dictate 2 on the fingers No), but should move, you'll always load those related objects in this way. Alternatively, try accessing the affiliated institutions before serializing. Just like if you follow the advice to finish the related object collection (and you really should follow it), you can simply access it with $ snippet-> gtc:, didYouCallFunctionThatReturnCollection () can do. The principle has blocked the request of archive check that it is full of proxy a...

python - How to delete entities not found in feed on GAE -

I'm updating items from a feed on datastore 200 items at a time (which can be approximately 40000 items) Problems It is that the feed can change and some items can be removed from the feed. I have this code: Class FeedEntry (db.Model): name = db.StringProperty (required = true) def updateFeed (offset, number = 200): response = fetchFeed (offset, Number) FeedItems = parseFeed (Feedback) feedEntriesToAdd = [] Items for items in feed: feedEntriesToAdd.append (FeedEntry (key_name = item.id, name = item.name)) db.put (feedEntriesToAdd) How can I find out which items were not in the item feed and they were removed from the datastore? I thought about creating a list of objects (in datastore) and just remove all those items that I updated and wanted to delete. PS: All items. IDs are unique to that feed item and are compatible. If you add a DateTimeProperty with auto_now = true The last revised time of each unit will be recorded. Since you update every item in the feed, w...

email - Java Mail API send mail with another mail attached -

I want to ask how can I attach an attachment to another mail with the Java Mail API. MimeBodyPart Attachment = New MimeBodyPart (); AttachmentPart.setContent (mail, "text /?"); Thank you in advance! javax.mail .Multipart multipart = new MimeMultipart (); Javax.mail.internet.MimeBodyPart MessageBodyPart = new javax.mail.internet.MimeBodyPart (); Multipart.addBodyPart (messageBodyPart); Javax.activation.DataSource Source = New FileDataSource ("C: \\ Notes \\ new mail.msg"); MessageBodyPart.setDataHandler (new DataHandler (source)); MessageBodyPart.setFileName ("new mail.msg"); Multipart.addBodyPart (messageBodyPart); Msg.setContent (Multipurpose); MimeBodyPart part = new MimeBodyPart (); Part.setText (text); Multipart.addBodyPart (part);

tsql - T-SQL update with switch-case statement -

I want to implement this pseudo in T-SQL UPDATE processing SET [ Path] = case ([path]. Substrings ([path]. Let index ('.'))) WHEN '.jpg' THEN '/image.jpg' WHEN '.png' THEN '/image.jpg' WHEN ' . AVG 'THEN' / Video.jpg 'WHEN' .mkv 'THEN' /video.jpg ' For this I use this solution UPDATE RESOURCES SET [path] = CASE (SUBSTRING ([path], LAN ([path]) - Cherrindx ('.', Reverse ([path])) + 1, 3) WHEN '.jpg' THEN '/ image .jpg 'WHEN' .png 'THEN' /image.jpg 'WHEN' .avi 'THEN' /video.jpg 'WHEN' .mkv 'THEN' /video.jpg 'END But it is Try it instead: SUBSTRING (path, LAN (path) - chordix ('.', Reverse (path)) + 1, LAN (path) ( LEN ( Path) as the length of reading; OK If it allows for ND and N-character extensions of E string)

java - Web-Worker with GWT -

What is the easiest way to get a web-worker thread loaded with the GWT module? I am not referring to getting support for the web worker in GWT (there are libraries for this) but how will a GWT module be used to load into the Web Worker? I suspect that I need a special linker - is there anywhere available? I did not lose deep but it seems that "special linker" is looking for you (The linker is then used for the module of "Hitlett engine" and "brake" speedtracer)

perl - Returning value from foreach in subroutines -

सरल उदाहरण का पालन करें: # ! Perl -w का उपयोग सख्त; उप अधिकतम {my ($ a, $ b) = @_; अगर ($ a & gt; $ b) {$ a} और {$ b}} कुल कुल {my $ sum = 0; विदेशी मुद्रा (@_) {$ sum + = $ _; } # $ Sum; # जानबूझकर टिप्पणी की} प्रिंट अधिकतम (1, 5)। "\ N"; # रिटर्न 5 प्रिंट कुल (qw {1 3 5 7 9}) "\ N"; के अनुसार (पृष्ठ 66): एक ???? अंतिम मूल्यांकन अभिव्यक्ति ???? वास्तव में अंतिम अभिव्यक्ति का मतलब है कि पर्ल मूल्यांकन करता है, उपनगरीय इलाके में अंतिम वक्तव्य के बजाय। क्या कोई मुझे समझा सकता है क्यों कुल doesn वापस 25 सीधे foreach से (जैसे if ) की तरह नहीं है? मैंने अतिरिक्त $ sum को जोड़ दिया है: foreach (@_) {$ sum + = $ _; $ राशि; } और मेरे पास ऐसा चेतावनी संदेश है: शून्य संदर्भ में निजी वैरिएबल का बेकार उपयोग ... हालांकि वापसी का स्पष्ट उपयोग अपेक्षा के अनुरूप काम करता है: foreach (@_) {return sum = = $ _; # रिटर्न 1} से: यदि कोई रिटर्न नहीं मिला है और यदि अंतिम वक्तव्य एक अभिव्यक्ति है, तो उसका मान वापस आ गया है। यदि अंतिम...

jQuery collapsible panel (my own) problems -

I am trying to create a jQuery open panel, and plug-ins are all around for this, but let me I do not really get what I want, I'm trying to roll myself using my various examples. Although it works for the most part, there is a bit which does not and why can not I. (An example page is) How it works (or it HTML javascript (function ($) {$ .fn. Extend ({CollapsiblePanel: function () {return $ (this) .each (initCollapsiblePanel);}});}); Function int callspible panel (if ($ (this). Child (). Length = = 0) {$ (this) .wrapInner (" ");} $ (this) .Kids (wrap) all ("& lt; div class = 'Cpa $ ("Nelcontent '& gt; & lt; / div & gt;"); $ ("& lt; div class =' ​​cpanelTitle '" & gt; "$ (this) .attr (" title " css # container {width: 300px; Height: 300px; }. CollapsiblePanel {width: 100%; }. CpanelTitle {Status: Relative; Width: 100%; Cursor: indicator; Cursor: hand; }. Cpanel toggle ...

objective c - Array not retaining properly? -

After I get the following error when running my application: 2011-09-02 15 : 38: 44.157 TheApp [9973: 207] - [NSCFNumber isEqualToString:]: 38 :: 44.160 TheApp [9973: 207] *** End Unrecognized Selector Example 0x4b28990 2011-09-02 15 The application sent for 'NSInvalidArgumentException', due to reason: - '[NSCFNumber isEqualToString:] Non-recognized selector example sent for 0x4b28990' and Xcode in green color Line marks in this function: - (zero) E) oneCheckAndSetStrokes {playerOneScoreNum.text = [playerOneScore objectAtIndex: (11)]; } So I think that something has been messed up with the arrows. After som research I came across a lot of such posts. Which is inticate that error occurs when the array seems to be properly maintained (hence my title) Then I'm trying to maintain the array in the file being started (The way the above file is not the same as the code. The arrays are also defined in other files, and then imported), in the following ma...

How to cast a value from one enum to another in Java? -

How do I add Enum1 to Enum 2 value in Java? Here's an example of what I'm trying to do: Public Enumum Enum1 {ONE, TWO, THREE; } Public Enum Enum2 {Four, Five, Six; } So I want to do something like this: Enum2 en2 = (Enum2) A; Is this possible and how can I do this? Thanks in advance! You can not put one value from one in the other, although each enum is a guaranteed order, and you can easily One can translate from enum to another (order of protection). For example: enum E1 {ONE, TWO, THREE,} enum E2 {ALPHA, BETA, GAMMA}} We can translate E1.TWO to / from E2.BETA By: Fixed E2 E1toE2 (E1 value) {return E2.values () [Value.ordinal ()]; } Fixed E1 E2toE1 (E2 value) {return E1.values ​​() [value.ordinal ()]; }

Insert images to powerpoint slide using python (win32com.client) -

I have been working with powering several hundred images and resizing them. I have to use a special source format which is similar to the other power points used by our company. I am actively playing with Win32com API and I have come to know how to open a file and a blank slide. My question is how would I go about writing an image and shaping its size (images will be the only thing on each page). Apart from this, I am trying to use the theme of my company for the background and title page but it is not important to get images on the page and re-size. Any help would be greatly appreciated, thanks! I found this address from Xavier page: Pict1 = Slide1 This will work if your original image is square; Otherwise, it will distort them. Better to specify -1 for width and height then the PPT will put them in their "natural" shape (whatever the PPT can decide ... is not important for current purposes). After that you can determine the aspect ratio of your aspec...

wpf - how to sort ObservableCollection -

मेरे पास एक अवलोकन संकलन है और एक WPF UserControl इसके लिए डाटाबाउंड है। नियंत्रण एक ग्राफ है जो ऑब्ज़्ववेबलक्लुशन में हर प्रकार की बारडेटा के लिए एक ऊर्ध्वाधर बार दिखाता है। ObservableCollection & lt; BarData & gt; क्लास बारडेटा {सार्वजनिक डेटटाइम स्टार्टडेट {प्राप्त; सेट;} सार्वजनिक डबल MoneySpent {get; सेट;} सार्वजनिक डबल कुलमनीसेंप टिल यहबार {प्राप्त करें; सेट;}} अब मैं स्टार्टडेट पर आधारित ऑब्ज़र्वबल कलेक्शन को हल करना चाहता हूं ताकि बारडेटा संग्रह में स्टार्टडेट के क्रम में हो जाएगा। फिर मैं हर बारडेटा में TotalMoneySpentTillThisBar के मूल्यों की गणना कर सकता हूँ - var संग्रह = नया ऑब्ज़र्वबल कलेक्शन & lt; बारडेटा & gt; (); // संग्रह संग्रह के लिए कुछ बारडेटा ऑब्जेक्ट जोड़ें। सर (बार = & gt; बार। स्टार्टडेटा); // यह आदर्श प्रकार का कार्य है जो मैं देख रहा था जिसके लिए डबल कुल = 0.0 मौजूद नहीं है; संग्रह। के लिए सूची ()। पूर्व (बार = & gt; {बार कुल मुबारकदार टिल यह बाड़ = कुल + बार.मॉनीसेंप; कुल = बार कुल मुनीस्पेन तक यह बड़;}); मुझे पता है ...

iphone - Disabling Video Out of App Videos on iOS devices -

I have an iOS app that I am developing, this app contains videos that contain copyrighted material. They are allowed to use to watch, but can not be seen on connecting on TV i.e. Instead, via HDMI or component - when someone plays a video and takes a TV out of the device then I need to show a splash screen on the screen, as if it is not allowed ... So my question is how can I capture when a TV out device is connected to the device? Or how can I know when a TV MPMoviePlayerController has been requested (which is what the video is using to display)? I have searched everywhere for this and no answer is available! Thank you. Check out what you need to do here: UIScreen * aScreen; NSArray * screens = [UIScreen screen]; (On the screen in the screen) (If the answer to the ASKREEN (Tresellator: @Signer (mirrored screen)) and [A screen mirrorscin] == [USScreen main screen]) {/ Main screen being mirrored Is} Else {// main screen is not mirroring, or // you are not running on an...

ruby on rails - Getting ActiveRecord association id in callback function -

मेरे पास दो संबंधित मॉडल, कर्मचारी और चिकित्सक हैं: वर्ग कर्मचारी & lt; ActiveRecord :: बेस है_ऑन: डॉक्टर, आश्रित = & gt; : नष्ट ... अंतिम कक्षा डॉक्टर & lt; ActiveRecord :: बेस is_to: कर्मचारी का अंत जब चिकित्सक पहले से ही बनाया और सहेजा जा चुका है। मैं कर्मचारियों के डॉक्टर आईडी तक पहुंच प्राप्त करना चाहता हूं: क्लास कर्मचारी & lt; ActiveRecord :: बेस ... after_save: save_picture ... निजी def save_picture अगर डॉक्टर file_name = 'doctor_' + doctor.id.to_s + '.jpg' ... end end end मैं किसी भी डॉक्टर विधि तक पहुंच प्राप्त कर सकता हूं और उनमें से कोई भी ठीक काम करता है, लेकिन "आईडी" - यह "शून्य" देता है। क्या मैं गलत कर रहा हूं? क्या आपके डॉक्टर मॉडल में आईडी एसेसर है? doctor.id के बजाय कोड>, एक डेटाबेस क्वेरी कम:)

inheritance - Ignore Base class with Sharp Architecture and Fluent NHibernate -

तीव्र आर्किटेक्चर 1.9 का उपयोग मेरे पास एक बेस क्लास है जो तीव्र आर्क एंटीटी क्लास से प्राप्त होता है सार्वजनिक वर्ग LineItem: EntityWithTypedId & lt; Guid & gt; {// विभिन्न गुण} और उसके बाद दो वर्ग हैं: सार्वजनिक वर्ग बास्केटआईटीम: लाइनआईटीम {सार्वजनिक आभासी बास्केट बास्केट; ...} पब्लिक क्लास ऑर्डर आईटम: LineItem {सार्वजनिक वर्चुअल ऑर्डर आदेश ...} मेरे डेटाबेस में मेरे पास दो टेबल हैं बास्केटआईटीम्स और ऑर्डर आईटम्स। मेरी समस्या: लचीला NHibernate (ऑटो मैपिंग) LineItem को मैप करने की कोशिश कर रहा है मेरा प्रश्न: मैं LineItem मानचित्रण को अनदेखा करने के लिए NHibernate को कैसे बताता हूं कि मैं अभी भी EntityWithTypedId संपत्ति को टोकरीआईटीम्स और OrderItems तालिका में मैप करना चाहता हूं? यह टोकरीटीम और ऑर्डरिटम की तालिका संरचना क्या है पर निर्भर करता है। क्या आप तालिका प्रति कंक्रीट वर्ग या तालिका प्रति वर्ग पदानुक्रम का उपयोग कर रहे हैं?

javascript - Trying to change 'margin-top' attribute -

This is what I am trying to do: $ (function ( ) {$ ('Div.item'). CSS ('margin-top', - (closest ('IMG'). Altitude ()) / 2 + 'px';}); me ' style = "margin-top: XXXXXX; top: 50%" to get where 'XXXXXX' is equal to (('div. Item an img '). Height ()) / 2 =================================== ============================= :

c# - Notify user from ViewModel and cancel navigation -

I have a view that has a list of items, a textbox and a save button. The current selected item in the text box list is bound to property T & gt; in ViewModel is now, when the user does not select an item in the list and saved data source list is ObservableCollection & lt bound to a the Changes to the text box should be asked if they want to discard changes made by them or not. The items selected in the list should be changed only if they answer it yes. The problem I have is: I need to implement the inquiry for changes in Vyododal, but I do not know where, as seen, modell is not informed, when the selected items change I came with the following method, but it does not look clear: A list is on the Selected Selected list. I can use the EventToCommand behavior and pass the CancelEventArgs as the parameter of the command. In order, I changed the address of the object and if so, I can use Messenger to send a message, see to see. View the user will communica...

Oracle not providing osuser when there is a connection from a java program -

I am trying to connect to my remote Oracle database, and it is closed and users and a white pc The list may be linked to it, however, Oracle OSUSER is not providing when I try to connect, so I have been refused. How do I connect here: public static final string CONNECTION_STRING = "JDBC: Oracle: thin: @myip: port: db"; Public static final java.util.Properties CONNECTION_PROPERTIES = new java.util.Properties (); Fixed {CONNECTION_PROPERTIES.setProperty ("password", "password"); CONNECTION_PROPERTIES.setProperty ("user", "dbuser"); CONNECTION_PROPERTIES.put ("v $ session.osuser", System.getProperty ("user.name"). ToString ()); {CONNECTION_PROPERTIES.put ("v $ session.machine", try InetAddress.getLocalHost (). GetCanonicalHostName ()); } Hold (unknownHostException E) {System.out.println ("Failed to set hostname. Trying with localhost, it is unlikely to succeed."); E.printStackTrace (); CONNE...

android - binding [row,col] value to a textView -

This is my first Android app and I have problems with choosing the best adapter for my application, I like the table The table is, I want to bind the specified rows of the VALUE column, my question is: 1- How can I bind [line 1, 3] TextView _ID | NODE | Value 1 | Link | Google.com 2 | Details | Search MyDataBase mDB = New MyDataBase (this); Cursor cursor = mDB.all (this); String [] from = new string [] {mDB.VALUE}; Int [] to = new int [] {R.id.text1View1}; Simple Cursor Adapter Adapter = New Simple Carrier Adapter (It, R. Layout.man, cursor, from, to); You can use "view.setTag (object)", your cases The footage in is TextView and the object will probably have a string with row and column information.

logging - Logger for stdin stdout -

To debug external processes by Macs, I need a wrapper to log all the message flows. Enter the string wrapping the stranders, wrap the cover and send it to the external process. Then the external process send back the output, log the wrapper and send it to the amax. I hope that knowing is too small so I ask questions, are there already standard tools for this purpose? My question is not answered! I do not understand the situation. What are all things through staden and studout? Does T (1) not meet all of your requirements?

HTTP Responses - Android -

I am trying to post my application on my webserver (located at IP 10.0.2.2) and get feedback . I am using an HttpHelper object to perform all server-interaction methods. Currently, my feedback variable is not getting something back through debugging I know that loop: while ((Line = rd.readline ()) = null {{code> is never recorded, but Thank you very much for your help! The webpage code is just: / P> header ("HTTP / 1.1 200 OK"); The Java code is: list & lt; NameValuePair & gt; Data = new arreelist & amp; Name; Valuepayer & gt; (); HttpHelper httpHelper = New HttpHelper ("http: //10.0.2.2/", data); Stringbinder feedback = httpHelper.postData (); ... public class HttpHelper {Final HTT client client; Last HTTPS Post Post; Last list & lt; NameValuePair & gt; Information; Public HTTPHelper (String Address, List & Name; NameValuePair & gt; Data) {Client = New DefaultHttpClient (); Post = new HTTP post (add...

JQuery DataTables: adjust column size without redrawing the table and making a new ajax call -

Using the jquery datatable plugin on a project by using server-side processing for a data project I am here. I am also using the jquery UI layout plugin, so I am trying to resize a panel to change the column size on the call back. It's working, but when I check the firebug, I think fnAdjustColumnSizing every call is calling my AJAX servlet, I think it is through calling the FNDRO method, but I'm not sure . Is there a way to repair it without making a new AJAX call? I really want to get hundreds of thousands of rows if the user decides to memorize the servlet for this purpose, then perhaps a big waste, any help of time for the user will be greatly appreciated! - You can pass the false as the first parameter to reproduce it, but New shapes will not be effective until a draw is made ... You can do the same way (internal function such as calling _fnScrollDraw) however: Do you have hundreds of thousands of rows each time? With server-side processing (which I believe you ar...

vba - How to assign paragraph / character styles automatically in word 2010 -

Hello, I have 200 Purge fully formatted word documents. The person who worked earlier did not apply any style to the whole document and he did it manually, although the formatting was done very well, it was meant to assign characters / paragraph styles to each and every paragraph. My work has become. Does any script know which characters / paragraph styles automatically specify the existing Word 2010 document? You can better use Word VBA to deal with your problem. What you should do: Find the style you want to change (see or) Apply style to the selected selection (See this very soda) If you want to check the correct style, you can record the macro and customize it. / P>

How to avoid inserting duplicate values in a HashMap? -

मान लें कि हमारे पास है: map hm = new hashMap (); डुप्लिकेट मान (एपीप्सी) इस हाशमैप में? मुझे लगता है कि आप जावा में कोडिंग कर रहे हैं, इसलिए: यदि (! MyMap.containsKey (myKey)) {myMap.put (myKey, myValue); } हैशमैप के साथ अच्छी बात यह है कि में की विधि की संख्या को ध्यान में रखते हुए निरंतर समय (या निरंतर परिशोधित समय) लेता है अपने नक्शे में तत्व ताकि आप इसे उस समय की परेशानियों के बिना कॉल कर सकते हैं! यदि आप किसी दूसरी भाषा का उपयोग करते हैं, तो तर्क समान ही रहता है।

c# - Why does parallel this code work sometimes? -

I wanted to paragraph a piece of code, but code actually slowed due to the overhead of the barrier and block collection . There will be two threads, where the first piece of work will be found, which will do the other thing. Both operations are not working much, so the overhead of switching safely will quickly overlay the two threads. So I thought I would try to write some code, which is lean as possible, without barrier etc. Does not behave coherent, but sometimes it works, sometimes it does not happen and I do not know why This code is used to try to synchronize only two mechanisms The mechanism is there. It does not do anything useful, you just need a minimal code to reproduce the bug. So here's the code: // Elements of work in the node class worksheet {public int value; Public Work ITM Next; } Fixed zero testing () {WorkItem fst = null; // First element create action = () = & gt; {Tentative stream = faucet; For (Int i = 0; I This is a linked list of function...

Reading a form-field in sencha touch extjs -

I have a form field and I want to read the text recorded in it, I tried the following code: this.searchButton = new Ext.Button ({// button press search will apply the verb text: 'go', handler: this.searchButtonTap, scope: this}); This.topToolbar = new Ext.form.FormPanel ({item: [{xtype: 'textfield', name: 'search', placeholder: 'search'}, this.searchButton]}); SearchButtonTap: function () {// console.log (this.topToolbar.items.items [1]); Var current text = AsApp.views.AsListView.getRecord (); Console.log (currentText); }, You can try: This.searchField = new Ext.form.Text ({displayField: 'name', valueField: 'name', editable: true, forceSelection: true, trigger action: 'all', empty text: 'Search ... ', Select onfox: true}); This.searchButton = new Ext.Button ({// button will apply the search action text: 'go', handler: this.searchButtonTap, scope: this}); This.topToolbar = New Ext.Toolbar ({item: [{x...

c# - BinaryWriter problem - "code adds some byte between Write() method" -

Image
I'm trying to use some code BinaryWriter and then BinaryReader. When I want to write I use method () but the problem is that there is a new byte between the two types of writing method which is in the ASCII table in decimal 31 (some 24). You can see it on this image: You can see that the byte ASCII decimal value is 31 by index 4 (5th byte). I did not include him there . As you can see that 1 4 bytes are reserved for a number (int 32), the next is the other data (mostly some text - it is no longer important). As you can see from the code I type: 1 in the row - 10 in the line text "This is some text ..." How come Is that between 5th byte (31st December) ?? And this is the code I got: Fixed zero main (string [] args) Send {// ///// - Receive: // sending data (); Console.ReadLine (); } Private Static void SendingData () {int [] commandNumbers = {1, 5, 10}; // is for 10 users (when they send some text)! For (int i = 0; i New {value = A, Index = B})) {if (...

unicode - Python: UnicodeEncodeError: 'latin-1' codec can't encode characters in position -

मुझे यह त्रुटि मिल रही है: फ़ाइल "run.py", पंक्ति 37, & Lt; मॉड्यूल & gt; प्रिंट str1 UnicodeEncodeError: 'लैटिन -1' कोडेक स्थिति 24-29 में पात्रों को एन्कोड नहीं कर सकते हैं: सीमा (256) में नहीं क्रमसूचक जब बस कुछ जापानी पाठ मुद्रित करने के लिए कोशिश कर रहा। वास्तव में ऐसा लगता है स्ट्रिंग इस तरह दिखता है: \ u5149 \ u66dc \ u65e5 \ u3067 \ u30e9 \ u30c6 \ u30d4 \ u30af \ u30b7 \ u30fc \ u4e71 \ u7372 \ u884c \ u304d \ u307e \ u3059 \ u5e0c \ u671b \ u8005 \ u52df \ u96c6 \ u4e2d \ u3067 \ u3059 \ uff3e \ uff3e जो एक JSON फ़ाइल से में आता है। मैं इसे कैसे मुद्रित कर सकता हूं? कोड: url = "http://www.blah.com/json" प्रयास करें: परिणाम = सरलजान.लोड (urllib2। urlopen (यूआरएल)) को छोड़कर IOError: प्रिंट "नहीं खोल सकता यूआरएल" परिणाम में संदेश के लिए डेटा = "error" [ "संदेश"]: str1 = msg [ "चरित्र"] ":" + msg [ "संदेश"] प्रिंट str1 रेपर (str1) है u'Anys: \ u5149 \ u6...

php - how to attach a file so it generates into a url? -

I made this second thread a little while ago and a problem was solved, which is uploading the image and it A url Unfortunately, it works only for images, so I would like to ask here that if a person knew the method of uploading a file to a form, so that the file should be automatically created in a URL, If there is a script then I can upload photos to my webhost folder in the backend and see that URL This will not be a bad idea .... If you work with images Be able to (they are files), as long as you modify your code, any file should be fine about it, which should be hard to accept only images.

jquery - Select element matching ID after a certain element, or create it if it doesn't exist -

& lt; div id = "foo" & gt; FOO & lt; / div & gt; & Lt; div id = "nextfoo" & gt; & lt; / div & gt; मैं कैसे एक $ ('# foo') से #nextfoo का चयन कर सकता हूं। प्रत्येक () ... फ़ंक्शन, और यदि यह मौजूद नहीं है इसे बनाएं? var nextFoo = $ ('# nextfoo'); If (! NextFoo.length) {nextFoo = $ ('& lt; div id = "nextfoo" / & gt;')। InsertAfter ('# foo'); } आप ऐसा कुछ मतलब है?