Posts

Showing posts from September, 2015

utf 8 - Change encoding from UTF-8 to ISO-8859-2 in Javascript -

I would like to change the ISO-8859-2 string encoding from UTF-8 in Javascript. How can I do this? I need this because I have designed a widget that the user just copies & lt; The script> Tags from my site and puts it on itself creates this script Div and puts it into the div widget content with text. If the target website is in UTF-8 encoding - it works fine but when it is encoded in text in ITO-8859-2 that is encoded in UTF-8, ISO-8859-2 on site Is displayed along with and consequently I see garbage. Instead of using the example "Ĉ" in your Javascript code, escape Unicode such as "\ u0109" ".

Problem with java socket, won't listen for more than one datagram package -

I am creating a server (which is now called a server) which is communicating with another server which is I have received (which is now called Server 2). Sends a datagram package to Server 1 on Server 2. Server 2 is supposed to send back two Datagram packages, but I get only one back. Server 2 is not a problem, and sends two packages. I use VirusHark to sniff the package which comes on cards and server 1. Package One): "5955 11 99 4.023 9 74 192.168.1.3 192.168.1.2 UDP Source Port: 50000 Destination Port: 50,004" Package Two (from wireshark): 5958 11 99 4.045830 192.168.1.3 192.168.1.2 ICMP destination not accessible (port not accessible) The server runs a thread that is listening to the Datagram package. Code Server 1: while (m_keepRunning) {try {term msg receive messages = null; Received Messages = Received (); (If received (ReceiveMessage.getMsgType ()) (TermMsgType.ACK)) {println ("This is a acknowledgment!") // See this function and b

unix - Listing all shared memory segments used by a process on AIX5.3+ -

I would like to find all the shared memory segments used by a given process I am particularly interested in detecting shmid That's why I can use it in call (shmctl). On Solaris I will just read / proc / $ PID / map to find that information (field pr_shmid) The content of that file is defined by struct prmap_t in the sys / procfs format. Ax also has a / proc / $ PID / map file. Any project is a primate, but unfortunately it has been projected in pr_shmid field. Any ideas how can I get it on AIX5.3 +? I do not particularly know about AX, but I think that ipcs command is quite standard where SysV IPC is supported, so I want to get the ipcs -m command to give the appropriate code; If you can not find a better method, then there may be an option to parse its output.

Java, executing a method when object's scope ends -

I have an object with a fixed position passed to the object and this state has been temporarily replaced. is. Something like this: Public Obligation (MyObject obj) {obj.saveState (); Obj.changeState (...); Obj.use (); Obj.loadState (); } It is possible to use the scope of the object to run some code while constructing and destructing in C ++, such as << p> NeatManager (MyObject obj ) {Obj. Save the state (); } ~ NeatManager () {obj.loadState (); } and call it delete something (MyObject obj) {NeatManager mng (obj); Obj.changeState (); Obj.use (); } This simplifies the work, because the save / load is tied to the NeatManager object, is it possible to do something like this in Java? Is there any way a way to call a method, when the object goes out of the scope, which it has been declared? There is no point in the closest possibly one attempt / ultimately block: try {obj.changeState (...); Obj.use (); } Finally {obj.loadState (); } ensures that

objective c - iPhone and it's wireless area -

Is this a way to find other iPhones in the category of wireless areas? So I give an example. I'm staying at the airport somewhere I have an iPhone too. I and the other iPhone owners are playing the same game. Is there any way to warn me and the other player that we are close to each other? Does this work even if we are not on the same wireless network, or there is no wireless? And if there is any way to do this, can you give me some starting point? Like a link where I can learn something like this or maybe this is probably the name of this process, because I do not know how to search about this topic in Google. Thanks in advance! Can be completed with peer-to-peer discovery and connectivity you are describing Game Kit Framework Originally I thought it works only through Bluetooth, but after watching it immediately, it seems that WiFi is also supported. Hope it helps!

tsql - Correct sql/hql query (aggregate in where clause) -

I want to query the query as below but the question is wrong but describes my intentions. select name, date time, data from record, date time = maximum (date time) Update: OK The description of the query intentions is not very good. My bad I want to select the latest record for each person. i like Mickey's answer and quosnoye (and upyoyed miki), but if your needs are similar to me , You should keep in mind some limitations. First and foremost, this works only when you are looking for the latest record or latest record for the same name. If you want the latest record for each person in a set (a record for each person but the latest record for each), then the above solutions are small. Second, and less importantly, if you work with a large dataset, then it can be slow for a long time. So, what's around the work? Whatever I do is to add a small field to mark the "latest" in the table. Then, when I store a record (which is done in the stored procedu

.net - Self Tracking Entities (STE)'s and partial updates with EF4 and mVC2 -

I have an MVC2 app where I'm starting to use 'I'm looking for some explanation How updates should work. Background: If I have a blog entity with related category entities and related posts / comments, In MVC I am providing a view with main blog unit and categories but not related posts. When I post back the blog unit to the server, then I can see the related categories but not the post (because they were not in the view) back in the unit ordered on the server. In addition, there is a changing state of the blog unit's 'edited'. Then I'll try to call the implementer () and SaveChanges () to make an update to the unit and post it With FK fails due to relationships and the fact is that there are related posts in the database but I am returning back. With some more trials ... if I take a current example of the blog unit (with all related FK entities), while connected to the server (state = unchanged), modify the property (State = modified) and i

configuration - How to configure web proxy for Jing -

Jing is great but it will not start unless the mother can call the ship. Through my internet access corporate web proxy, Jing does not offer any way to configure its connection to the Internet. You thought it would only use windows internet connection settings that work for browsing but no dice. Does anyone solve this problem? Maybe some configuration files or registry settings that will fix this? Thank you! I know that you thought why you were not working, but using a proxy here How to configure zing to create a jing.exe.config file inside the c: \ program files \ techsmith \ jing directory and put it in: & lt; Configuration & gt; & nbsp; & Lt; System.net & gt; & nbsp; & Nbsp; & Nbsp; & Nbsp; & Lt; Default proxy enabled = "true" use default credentials = "true" & gt; & Gt; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Lt; Proxy ProxyIDS = "http://proxy.

shell - LaTeX: Which OS am I running on? -

I am writing a latex package for which it is necessary to use \ write18 . Some shell commands I give are system-specific (e.g., rm vs. del ). Is there a way to decide which system I am running? It will be enough to be incompatible with Windows and other (Unix-like) systems. Take a look at the LaTeX ifplatform package. There have been lots of discussions about reliable methods in many platforms, and current releases work very well.

c# - Using iTextSharp to save to file the fonts used in a PDF file -

This is quite a duplicate, but hopefully anyone can now find out and be helpful. I am looking for the capability of some NIT code which removes the embedded font in PDF in a font file. I am currently using iTextSharp, but I am open to other .NET libraries (eg, PDF boxes, PDF clicks, etc ...) I basefont I am able to iterate the information from the gate document font (), but I am not clear on the font file to stream the font. Thank you, Kenny itemprop = "text"> @himastastone - This is actually really simple font name, at least iText / In iTextSharp (PDF box too - but I do not have a code around now) but in iTextSharp, you will do the following: PdfReader reader = new PdfReader (strFileName); & Lt; Object [] & gt; StrFonts = BaseFont.GetDocumentFonts (Reader); And it is, most libraries have been written for simple extraction of the font (name in any case).

Google Charts: chxl and bhg -

http://chart.apis.google.com/chart?cht=bhg&chd=t3771.5 , 3220 | 5508.25,5366.75 & amp; chs = 400x200 & amp; chds = 0,9000 & amp; chxt = एक्स & amp; chxr = 0,0,9000 & amp; Chm = N * cUSD2s *, 000000,0, -1,11 | N * cUSD2s *, 000000,1, -1,11 & amp; chco = 4D89D9, C6D 9FD लेबल कैसे लगाएं प्रत्येक समूह के लिए? chxl = 1: मध्य माध्य - ऐसा कुछ करना चाहिए, लेकिन परिणाम कुछ भी नहीं है समूहों द्वारा मेरा मतलब यह संख्या: 1 = { 3771.5, 5508.25}, 2 = {3220, 5366.75} इसे जोड़ने की कोशिश करें: < chxt = एक्स, वाई, आर एंड;> & amp पूर्व chxl = 2: | मतलब | माध्य | हो सकता है कि यह ठीक वही न हो जो आप चाहते हैं, लेकिन जब मैंने कोशिश की तो यह ठीक काम करता है।

tomcat - Where does Eclipse deploy web applications using WTP? -

I have a web application (war file) when I deploy it via eclipse 3.5 using WTP tools I am able to start the Tomcat server within Eclipse and I look at all the pages of the application. Although I do not see my war file in the webapps folder in the Tomcat Home Directory (or for that case for its explosion format), I was under the impression that Tomcat has allowed its web applications to be used by its < Em> WebAp folder reads how Tomcat has read my application in this case? I am using Tomek 5.5.17 as my application server. This is just Context.xml given to eclipse tomak if you If you want to configure this behavior, click the Tomcat instance twice to view the server and see the Server location section. In order to get you the desired / initially, you need to select Use the Tomcat install and specify Deploy Path Path if necessary.

sql - How to do multiple aggregated columns in a select statement -

To stop instant-ripplers, I tell that I am not using MySQL so I use it Can not GROUP_CONCAT, and I have already seen it already. Example (This is not the data with which I am working, but it accurately describes my case) The individual table, With ID, name column Person_Countries PersonID, Table Visited with Country Columns (1.m. Linking Table) Person_StatesVisited Table, with PersonID, State Columns (1.minking table) Obstacles I can not modify the DB. I can not modify the code as much as possible. So, therefore, it should be done in SQL, not later run the query code. desired result Set a result with the column Person.ID, person .name, [List of related person's list Country], [List of related people: Prop. Protected.], This can also be filtered by a normal search term that applies to all columns. My attempt Now, my SQL-Foo nowadays is not fast, but what I'm doing is based on examples of what I do I am here. 1) I have tried to use a scalar s

excel - Nested If Statements Returning zero if nothing entered in cell -

The formula listed below. I would like to go back to zero if nothing is recorded in the cell. How do i do this = IF (E6> 0, F6 / E6, "") = IF (ISBLANK (E6), 0, IF (E6 & gt; 0, F6 / E6, "")) < / Html>

SSL with Ruby on Rails -

Why do I need to get rail traffic on the Ruby app to use the train app? I have a certificate set up and if I manually type in "https: //" in the address bar to reach the site, a little lock icon appears, but manually www.example-app Goes to http and sends traffic through http in your browser: //. Is there a one-line configuration or is it more complicated than that? I had never compromised before the SLL, so forgive me if I think I do not know what's going on. I'm hosting a MediaTemle on (GS), if this is the case or Check this gem. This lets you specify in your controllers which actions should be served on https and which action may be It will then take care of redirection from http to https. From the document: class ApplicationController & lt; SslRequirement End Class Account Controller in ActiveRecord :: Base & lt; ApplicationController ssl_required: signup, payment: ssl_allowed: index def signup # Non-SSL access will be redirected to

asp.net - Parse Credit Card input from Magnetic Stripe -

Does any magnetic card know how to parse the credit card string input from swipe? I never tried to work on javascript parser. The input looks like this. % BNNNNNNNNNNNNNNN ^ ^ DOE / JOHN ^ 1210201901000101000100061000000 ?; Nnnnnnnnnnnnnnnnn = 12102019010106111001? There are N credit card numbers. see: Format code = " B "- One letter (alpha only) Primary account number (PAN) - up to 19 characters Field Separator - One Letter (usually '^') Name - Normally on the name of two to 26 characters, but does not always match the credit card number. Field separator - One letter (usually '^') Expiration date - four characters in the form of YYMM. Service code - Three letters Discretionary data - Pin verification key indicator (PVKI, 1 character), PIN verification value (PVV, 4 characters), card verification value or card verification code (CVV or CVK, 3 characters) PINs may be included Longitudinal redundancy probe (LRC) - A cha

iPhone reverse geocoding: give all possible streets/suburbs? -

I know the core space is not always accurate on the iPhone, in that area, possibly catching all the points of the suburbs / streets Is there any way to use space (late / tall) with accuracy? So instead of using reverse geo-codeing and estimating the way 'the best possible suburban / street, is it possible to create an array of all possible suburbs / streets (or any other format)? Which can be considered? Thank you! So, the best way to do this is using the Google Maps API, for example See the following URL: As you can see, for this pair (latitude, longitude) you have 10 potential placemarks for this coordinate. Here you can find: You can see that you get the information in XML, JSON, CSV. Take a look at the status code, it is important to verify whether was easy. = Coordinate Double longitude = coordination. Lame; NSString * urlString = [NSString stringWithFormat: @ "http://maps.google.com/maps/geo?q=%f,%f&output=xml", latitude, longitude]; NSUR

asp.net mvc - Testing user role , Authorize attribute in VB.NET -

I am using ASP.NET MVC to create a site. I am using VB as a programming language. I have some questions. 1 I have created a role "Manager" How should I check that the user belongs to this particular role? For now I'm using if My.User.IsInRole ("Manager") then 'see another option for direct one other view Is this the right way? How to use the authorized attribute to restrict access to 2 functions? I know that in C # this happens [authorized (roles = "manager")] but not sure in VB besides , I can define that user to redirect, at which point there is no "manager" role for a particular view while trying to access this function. Thanks in advance. This will be in VB: & lt; Authorized (roles: = "manager") & gt; _

packet marking(IP Traceback) in C# -

I am looking for implementation of IP traceback using packet marking algorithm in C #? I google it > Not even because C # is not for hardware programming !!!!

actionscript 3 - Synchronize the Playing of Multiple Video Files in Flash AS3 -

I would like a controller to sync and control multiple video objects (start / stop simultaneously). Is this possible? I think I understand your question. If I do, then the answer is yes. You can act as the controller of many videos (FLVPlaybacks, JW Player, FlowPlayer) as a class ... Basically you can control your 1 controller Use any calls to proxy so that you can make a video on all your videos. Then you will have something like the following: Function play (): for zero {{var i: number = 0; i & lt; video.lamp; i ++} {video [I] play (); }} or even function play (): zero {var playvideo: function = function () {this.play () }; Map (playvideo, departures); }

PHP: Functions have no idea variables even exist -

I have seen an annoying feature in PHP (running 5.2.11) if one page contains another page ( And both have their own variables and functions), both pages are aware of each other's variables. However, their actions are not known about any variables (except those declared within the function) My question: Why does this happen? How can I not , or what is a better way to go about it? I describe this type of example is an example. Home page: & lt; Php $ myvar = "myvar."; ('Page2.php'); The echo says "the main script says: $ somevar and $ myvar \ n"; to work(); DoMoreStuff (); Function doStuff () {echo "main function says: $ somevar and $ myvar \ n"; } "End" echo. ;; ? & Gt; page2.php: & lt; Php $ somevar = "success!"; Echo "contains the script: $ somevar and $ myvar \ n"; Function doesMoreStuff () {echo "function" includes function: $ somevar and $ myvar \ n "; }? & Gt

java - Strategies for designing a database (being accessed by hibernate) which will have a lot of archivial data -

I am developing an application that will be integrated with thousands of sensors that send information every 15 minutes intervals. Assume that the data for all sensors is the same as the format. What is the best strategy to store this data, so that everything can be stored (accessible) and due to the large size of mounting data it has no negative effect. This question is related to general database design. I suppose, but I would like to say that I am using hibernate (with spring rupees), so maybe something is already addressing it from there is. EDIT: The sensors are dumb and are not far from the shelf, it is not possible to expand them. All information is lost in case of network outage. Since the sensors work on GPRS, this scenario will not be possible (as the GPRS provider is not good at here in Sweden, but yes it can go down and no one can do anything about it). A amount of penalty was the most important, and provides easy spring to work with prototype codes based on STVMM

iphone - asynchronous stateless API -

Imagine the table view listing some recipes, each time a user taps on a recipe, a new table view Loading Listing Acquisition Content To get the information, I am doing a REST API using an asynchronous phone: NSURLRequest * request = [NSRR request request with url: URL cache Policy: NSURASTRLOD unauthorized local cachedata timeout interval: 30]; When a user taps on a recipe, a phone recipe for the API is done to get the content. However, once more answers are received in the new view (list list content), the user can go back and choose a new recipe. In this case, I repeat the two answers; One problem for each request is that I do not know what the response is, and I will refresh the URL with the wrong content from the wrong answer. I'm not sure what is the correct approach in this matter. I am thinking about adding in response to each request parameter. So, for example, if I am using API to search for a certain period, then we say "Foo", I will also include

encryption - Java: ssl certificates for testing on windows? -

I see a very simple server in coding using an SSL connection - but there are two questions How can I use Java keytool in windows to create a certificate, can I use it for testing? I can see most tutorials (for teachers etc.) I recommend running the following command, which works at the command prompt (running 7 wins)? Keytool -keystore mySrvKeystore - Consider also some of the basic AES and RSA-based encryption ill- - There is no use in using bouncy castle instead of tool. Given to the shelf in JCE? Many thanks, If JCE Supports algorithms you want to use (and it supports AES and RSA), then switching to Bouncy Castle does not have any problem in addition to being of no use. If you want something like ECDH, or if you want to use its S / MIME or PGP libraries then Bondi Castell will be a great option.

C++ container/array/tuple consistent access interface -

क्या कंटेनरों में काम करता है? की तर्ज पर कुछ: element_of (std_pair)। Get & lt; 1 & gt; (); element_of (boost_tuple) .Get & LT; 0 & gt; (); element_of (pod_array) .Get & LT; 2 & gt; (); सिद्धांत रूप में मैं खुद को लिख सकता हूं, लेकिन मैं wheel.thanks को फिर से नहीं बदलना चाहता हूं मुझे ऐसी चीज़ों से अवगत नहीं है। आप शायद उन प्रकार के लिए एक मुक्त मिल समारोह को लागू कर सकते हैं। बूस्ट.Tuple पहले से ही है std :: pair इसमें सी ++ 0x है और बाकी को बहुत जटिल नहीं होना चाहिए। उदा। #include & lt; iostream & gt; # शामिल करें & lt; उपयोगिता & gt; # शामिल करें & lt; vector & gt; # शामिल करें & lt; boost / tuple / tuple.hpp & gt; नाम स्थान प्राप्तकर्ता {टेम्पलेट & lt; आकार_टी सूचकांक, वर्ग कंटेनर & gt; टाइपनाम कंटेनर :: संदर्भ मिल (कंटेनर और सी) {रिटर्न सी [इंडेक्स]; } टेम्पलेट & lt; आकार_टी सूचकांक, वर्ग कंटेनर & gt; टाइपनाम कंटेनर :: कन्स्ट्रैरेफरेंस मिल (कॉन्स्ट कन्टेनर & amp; सी) {रिटर्न सी [इं

ruby on rails - Mongodb: What to know before using? -

I am starting a hobby (non-revenue) project using rubies on tracks. I have done a fair amount of development in Rail Rail using PostGrussle, and I can make a very good copy of the generalized schema. However, what is better for something new than a hobby project that looks prominent and new to the Mongergod? When you start using Mongodb, what techniques did you write later, which tells you, "If only I knew when I started!" Did the plug-in know that you have used it since the beginning, if you are known only? You will definitely be the second to recommend MongoMapper, if you want to 'bookmark again.' Then going to use MongoDB with railways. I warn you, however, there are no documents (yet) in addition to some blog posts, if you are not excavating in the source code, to see how things work, it is not for you yet . If you are working outside the railroad, then I would advise to stay away from the Mongomapper. Since it expects MongoDBee from SQL enabled ORM, simil

c# - How to offer application settings to an end user of your library, at design time, in .net, winforms -

I have a library with a set of sections with a common property that I want to be able to an end user I override all classes without overriding. The important thing is that the property has to be overridden at design time. For simplicity, it is said that this is the background color of the UITypeEditor. I can do this by putting this setting in the Application Settings dialog in ide. However, I can not see how the end user can use my settings that are wrapped in a dll. I tried to import DLL in the second app and tried to add a setting with the same name in the application settings, but this setting does not override in DLL - which I think is the behavior expected. I have to put this setting in an external file that the user can edit with Notepad? seems to be related to the question, basically it seems that if you want to use the default mechanism , You can only configure one file, otherwise you will have to implement your own.

Controlling cursor and keyboard with C++/Visual C++ -

This time I have a question about C ++, I am using Dev-C ++ for programming , But I also have Visual C ++ Express installed, so both are good. I'm making a program like automated tasks, is this macro? But as I am a noon in C ++, because I started it a week ago, I need help. Please keep the answer simple: - D is a part of my learning-progress in C ++. In addition, I tried Google for a long time without success, so I do not like to hear the answer related to the search. How is it possible to move the cursor around the screen? It should be possible, as everything is, but there is no easy way to do this / function. I also need to click the mouse button. It should be a simple: by pressing the key. P> If you are writing in the console, Will use.

.net - What is the proper PInvoke signature for a function that takes var args? -

एक मूल फ़ंक्शन है: int sqlite3_config (int, ...); मैं PInvoke को इस समारोह में करना चाहता हूं। वर्तमान में, मुझे यह घोषणा है: [DllImport ("sqlite3", एंट्रीपॉईंट = "sqlite3_config")) सार्वजनिक स्थिर बाह्य विकल्प कॉन्फ़िगर (कॉन्फ़िगरेशन विकल्प); (परिणाम और कॉन्फ़िगरेशन फार्म का enum के परिणाम हैं: int {...} ।) मैं वास्तव में केवल दिलचस्पी है इस फ़ंक्शन के एकल पैरामीटर संस्करण में और अन्य तर्कों की आवश्यकता नहीं है। क्या यह सही है? मैं भी उत्सुक हूँ कि आप कैसे दो तर्क फॉर्म घोषित करेंगे (शायद यह 2 इंटप्टर होगा?)। आपको __ रैगर कीवर्ड (जो कि undocumented है) का उपयोग करने की आवश्यकता है, बार्ट # का उदाहरण वर्ग कार्यक्रम {[DllImport ("user32.dll")] स्थिर extern int wsprintf ([आउट] StringBuilder lpOut, स्ट्रिंग lpFmt, __arglist); स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {var sb = नया स्ट्रिंगबिल्डर (); Wsprintf (एसबी, "% s% s% s", __ कलाकार ("1", "2", "3")); Console.Write (sb.ToString ()); }}

there is a way I can bind a flex property to a flash property? -

I am wondering if there is a way that I can force the property to be flanked? Flash property is a swc file created in Flash with a Flex component kit for a Flash Professional, I can manipulate the flash component as a regular flex component, but I want to attach their property, is there any way? Thanks! Yes, you can use it to fulfill it. Linked Documentation contains BindingUtils category and reference to LiveDocs for some simple samples.

Flex TabNavigator: When screen is left and returned, selectedChild is set, but tab bar highlights wrong tab -

I have a tab navigator, which has a handful of children, the application's flow gives the user the possibility to leave the screen with tabinigator, Is coming back then. When this happens, a method has been set on the canvas show, which has been selected on the first tab. When actually checked, Tab Navigator displays the text on the first tab, but the tab which is highlighted was already before the user left. Here are some pseudo codes that look like I have: gt; & Lt; / Mx: VBox & gt; & Lt; Mx: VBox id = "tab3" label = "tab3" & gt; & Lt; Mx: label text = "third tab text" /> gt; & Lt; / Mx: VBox & gt; & Lt; / Mx: TabNavigator & gt; & Lt; / Mx: canvas & gt; So what I'm experiencing, for example, has been on Tab 2, going to the second canvas with the application, then to see the text "First tab text" Returning to the canvas The tab highlighted on top is "2 tabs." I have tr

.net - how to get the current opened applications in windows using c++ or vb.net? -

I need the currently opened applications (which appear in the taskbar) and are not currently running processes. Thanks Calculate all the top-level windows (with the task) To do; You have to leave: Invisible windows (check the return return function or check the WS_VISIBLE style directly in the window); Extended style WS_EX_TOOLWINDOW, unless they have WS_EX_APPWINDOW extended styles. Everyone else should be shown in the taskbar (full story). Then, if you want to take each window near the process / thread, you can use the function.

Silverlight WCF service consuming inherited types in datacontract -

I'm trying to consume a WCF service in Silverlight ... Something that has to be done The assembly in which all my types Data are marked with contracts, P> a silverlight assembly, which is related to files in the first assembly. This means that my .Net app assembly can refer to assembly 1 and my menopause app assembly. It works fine and I can communicate in service. Problems occur when I try to transfer classified classified into heritage. IFlight - There is an interface for all types of flights. BaseFlight: IFlight - Imports a baseflight flight IFlight AdhocFlight: BaseFlight, IFlight - An Adihoke Flight flies off the Basflite and also executes IFlight. I can successfully transfer base flight based on the service. However, I really need to transfer the objects of IFlight to the interface because I want an operation contract that can transfer many types of flights ... Public IFlight GetFlightBooking () {AdhocFlight Af = new adhocFlight (); Come back;

python - how do I change 'username-password login' to 'email-password login' on django-registration -

How will I change 'username-password login' to 'e-password login' on the Dejaanga registration < / Div> You can not easily store email in django.contrib.auth.model.User Name field, so you will need a different auth backend. Place the following somewhere and add your AUTHENTICATION_BACKENDS to its code. Import the user class email backend (object) from Django.contrib.auth.models : "django.contrib.auth.models.user.user's e-mail field" Certified "DF credentials against (self, email = none, password = none): Try to use email if this email is given: For user in user.objects.filter (email = email): If user.check_password (password): return user def get_user (auto, user_id): try: user.doccuts Return any user. Objects.jet (pk = user_id), none. Again, in your thoughts, django.contrib.auth.authenticate . < / P> Two things to note: You may want to put the default AUTHENTICATION_BACKEND in there, especially if you want to use t

python - Using Django's Model API without having to *include* the full Django stack -

Currently one of my applications is using SQLAlchemy , but I consider the possibility of using I am Django Model API . The Django 1.1.1 is about 3.6 megabytes of size, while SQLAlchemy is about 400 kilobytes (as reported by POPM - which basically has python install.py install / Install / code>). I would like to use the Django model (to do so, other developers do not want to learn any other-ORm yet), but do not want to include 3.6 megabytes of material, most of which are not needed . Itemprop = "text"> Django ORM is automatically usable - You can use "settings.configure ()" to set the database setting. He said, you have to snatch and repeat yourself, and you have to experiment with it so that you can actually strip how far I am convinced that you can contrib /, forms, template /, and perhaps many other unrelated pieces You can ditch. The ORM is definitely dependent on conf /, and the core / and the use / is likely to be as well. Through DB / *, som

html - What are cons to use % over em in terms of accessibility? -

What's the problem to use% over in case of access? I do not think there is more to it. In the olden days, Internet Explorer will not let you zoom in one page sizes were specified in pixels, but if they allow users or users to see content at a suitable size for% Recommended to stay away from pixels. Nowadays, all modern browsers have zoomed a whole page, which units you use I often use pixels when things are completely ready, And when fonts and paragraph margins etc need to be shaped to keep a vertical rhythm.

c++ - private inheritance and composion, which one is best and why? -

Assume that I have a class engine and I get a class car from the indin class < Pre> class engine {public: engine (int louoscillilander); Zero starting (); }; Class car: private industry {public: car (): e (8) {} zero start () {estart (); } Private: engin e; }; Now the structure can be done, the question is which approach would be best and most of it is used in programming, and why ??????? I like to think about heritage because is a kind of derivative basis , which originally meant the public succession. In the case of personal heritage, this is a more derivative basis , which IMHO does not speak right, because it is not the work of creation for any kind of heritage. Therefore, because private heritage and structure are compulsory What is the meaning of the same thing in the logical form, which is to choose? For example, if you have posted, I will definitely go for the structure. I think of all types of heritage as a type of relationship, and have posted with ex

php - How to define certain posts as featured posts in WordPress? -

I need to include the content slider for four posts, but not with the latest 4 posts. Instead, I want to define some of the specially displayed posts, now I know that I can create a new category as a featured and add it in the post as a special category, which I have I want to define and can be done using something similar in the same way. But I was thinking that someone could have a different view here without needing me to create a special category or tag, which would be great. If someone has a solution, please know. Thank you. All help is greatly appreciated. Make these posts.

Javascript timelapse-effect: displaying 30 images/second (read for more detail) -

I have a customer who has made pictures 'visual diary' which took it once a day for 365 days For that, the portfolio site wants me to put them in a time-consuming effect. I thought about using Flash, but finally chose JavaScript. What is the need to do this: the cycle of images is really a variation or nothing, only image-image-image etc. About 30 / FPS or something like when you click flashing images, it stops the image you choose, so the user can keep an eye. When you click again, the slideshow starts playing again. My problem is that I am a PHP / XHTML / CSS block which is not really about Javascript. I can happily integrate it into any page, but this is just javascript coding that is bothering me. On my homepage, I am used to display an original slide show of this code - transition effects etc. This HTML but you can understand the code I'm sure of: & lt ;! - Code of slideshow - & gt; & Lt ;! - http://www.webdeveloper.com/forum/showthread.php?t=8

hadoop - STREAM keyword in pig script that runs in Amazon Mapreduce -

I have a pig script, which activates another python program I was able to do this in my own environment But when I run my script on the Amazon map, I always fail. The log says: org.apache.pig .backend.executionengine.ExecException: Error 2090: While processing less error received, processing: '' With exit status Failed: 127 org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce $ Reduce.runPipeline (PigMapReduce.java: 347) org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce $ Reduce.reduce On org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce $ Reduce.processOnePackageOutput (pigMapReduce.javamore8888) at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce $ Reduce.reduce (PigMapReduce Java: 142) at org.apache.hadoop.mapred.ReduceTask.run at (PigMapReduce.java:260) (ReduceTask.java: 321) at org.apache.hadoop.mapred.TaskTracker $ Child.Main (TaskTracker.j Ava month 216) Any ideas?

Can we create multicolumn unique indexes on MS access databases? -

We want to prevent duplication of records in our MS Access database by using a multicolumn unique index. Due to how data is sent (through the network), duplicate data is sometimes received. The data source does not send a unique ID, so the easiest option is to prevent duplicate records from being placed. According to : With multicolumn unique indexes, the index guarantees that each combination of values ​​in the index key is unique. For example, if a unique index LastName , FirstName, and MiddleName columns, any two rows in the table can not have the same combination of values ​​for these columns. This is for SQL 2005, so I'm not sure that it is possible to use MS Access. I think a choice is probably to use the query (pseudo-code): ('x', 'y', 'z') where (a & Lt; & gt; 'x') and (b & gt; & gt; 'Y') and (c & lt); & Gt; 'Z') ... but I think an index would be better. Open the table in the Design v

jquery events do not recognise js-added html components? -

I am using js to add form elements to HTML elements. For example, I have an entire & lt; Form & gt; Adding to a table cell example: & lt; Form class = "add-comment" & gt; & Lt; Input type = "submit" / & gt; & Lt; / Form & gt; I try to use JS to invite events based on elements of that newly created form but nothing happens. I should get a warning box What am I doing wrong? $ ('add-comment') Submit (function () {Alert ('form submit!');}); Thank you I have explained it adequately. Are you adding the element after registering the submitted event handler? If you do not use a live method to add an event, you must register the event after each new element. $ ('add-comment') Live ('submit', function () {warning ('form submit!');}); It adds an event to all selected elements, even if they are added in the future.

iphone - Open UIPickerView by clicking on an entry in the app's preferences - How to? -

I'm wondering how and how to open UIPickerView due to the push of entry in the user's and ap's preference pane . / P> Thanks! I'm talking about iPhone development. If you are in the iPhone's built-in settings app in the section of your app, Impossible.

css - How to modify the facebook share button? -

How can I modify the width of that fricken button? I have a retweet button that I like, but I think there can be no documentation about reducing the width in CSS for the Facebook share button. If you look at the post buttons, you will see it on the site. You will see that the Facebook button is just a bit bigger, then it seems strange to create a retouch button. Does anyone know where I can get the CSS of that button without modifying the actual plugins code? Thanks in advance. Try changing this CSS. You can tweak the right button padding to make it a little smaller. I used 4px in Firefox and it looks good hope this will help you. If you do not want to mess with the plugin code, then you probably have to overwrite this CSS in your CSS file. The plugin is simply easy to update the CSS. FBConnectButton_Small .FBConnectButton_Text {margin-left: 17px; Padding: 2px 4px 3px; }

regex - negative lookbefore for a blackslash in ruby 1.9 -

I want to match every '[' or ']' which is not in ruby ​​before backslash 1.9 I try Key: /? & Lt ;! \ 134 [\ [\]] / and /? & Lt ;! Post -text "itemprop =" text "> Take a negative look in the brackets. (? & Lt;! \\) [\ [\]]

Access values of static closure in Groovy -

I would like to store some properties in a static closing and later would like to use them during a method call: class person {static someMap = {key1: "value1", key2: "value2"}} So how can I write a method within the person , Who stored this data? For a simple matter, you're better off using a map. If you really want to evaluate it as closing (possibly to make your own DSL), then you have to change your syntax a bit as John says. This is a way of using a builder class to evaluate "some" closing to block and block calls with Gravy Metprograming method / property to save them: SomethingBuilder {Map valueMap = [:] SomethingBuilder (object) {def callable = object.Something callable.delegate = this callable.resolveStrategy = Closure.DELEGATE_FIRST colebabel ()} def proportmings (string name ()) { Return valueMap [name]} def PropertyMacing (string name, value) {valueMap [name] = value} def methodMi Ssing (string name, args) {if (args.size

What are the advantages of DB2 over VSAM? -

ओवर के फायदे क्या हैं? लिंक आपको अच्छे स्पष्टीकरण के लिए ले जाता है, लेकिन यह डीबी 2 को संदर्भित अखंडता और एसक्यूएल का प्रयोग करने की क्षमता प्रदान करता है। उस डीबी 2 के अतिरिक्त प्रक्रियाओं, विचारों और ट्रिगर्स जैसी चीजों का समर्थन करता है डीबी 2 तालिकाओं के बीच संबंधों को समझता है Z / OS कार्यान्वयन में डीबी 2 तालिकाओं को वास्तव में रैखिक वीएसएएम फाइलों के रूप में संग्रहित किया जाता है।

iphone - How to use an image taken in the 1stViewController in the 2ndViewController? -

User can choose whether he wants to use an existing image or takes new to use as background is. Everything works until the first scene controller is concerned. Unfortunately the image is no longer being set as a background, when the second VUI controller is displayed. How do I enable the use of the image in the form of a background for the second controller? I used this piece of code (in second view controller): NSUserDefaults * prefs = [NSUserDefaults standard user default]; Int BLA = [Prefix integerfori: @ "background_key"]; If (bla == 1) {self.view.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @ "1.mac.jpg"]]; } And if (bla == 2) {self.view.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @ "black.jpg"]] ;; } And if (bla == 3) {self.view.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @ "pinn.png"]]; } And if (bla == 4) {self.view.backgroundColor = [UIColor colo

javascript - Can someone help with this self invoking function stuff? -

I was trying to debug this script all day and I have not found anything that much help was appreciated Will go. I get an error that it is a curly brace or a square brace or a parent is missing and whenever I try to get the value of my options, it is said that x is undefined , But when I input 0 as my index, I can retrieve the opts.value, my question is why x is undefined and what is missing from this script Prices = (function () {table = document.getElementsByTagName ("Table"); Select = Table [0] .getElementsByTagName ("Select"); (var x = 0; x & lt; = 10; x + +) Opts = new array (); opts = selects [x] .getElementsByTagName ("option") [select [x]. Selectedindex];} return {value: (function () {val = new array}; Var i = 0; i OK, if that script & lt; Head & gt; Trying to prepare the DOM elements of your document before reading it, unless you are calling it through onload, which you are not showing. Your second option is & lt;

Looking for C# HTTP Component/Class -

I know that HTTPRequest and responses are available, but I am looking for an HTTP component / class cover that I can directly I can plug in code with less trouble. Is there any free or paid components / classes like this? It is not clear what you are trying to accomplish. I think you want to download the URL through the HTTP protocol. If this is true, then I suspect that you will find some easy to use because of the use, because it is a line of code: string html = new WebClient (). DownloadString (url)); Byte [] data = new webclient (). DownloadData (url); If you need to display a web page in a Windows Forms application, you can use the WebBozer control.

delegates - UITextField, automatically move to next after 1 character -

परिदृश्य: मेरे पास 4 UITextFields हैं जो केवल 1 वर्ण स्वीकार करते हैं। । आसान समस्या: बाद मैं 1 चरित्र दर्ज करते हैं, मैं अगले TextField स्वचालित रूप से (अगले दबाए रखे यानी मैं UIKeyboardTypeNumberPad उपयोग कर रहा हूँ बिना सक्रिय करना चाहते हैं, और कोई अगला बटन theres (मुझे पता है। मैं वास्तव में एक अगला बटन प्रोग्राम के रूप में बना सकते हैं, लेकिन मैं जाने के लिए है कि अब तक, बस अगले क्षेत्र की जरूरत सक्रिय बनने के लिए स्वचालित रूप से करने के बाद 1 चरित्र दर्ज किया गया है चाहते हैं न #define MAX_LENGTH 1 -। ( BOOL) पाठ फ़ील्ड: (UITextField *) textfield shouldChangeCharactersInRange: (NSRange) रेंज replacementString: (NSString *) स्ट्रिंग {NSCharacterSet * myCharSet = [NSCharacterSet characterSetWithCharactersInString: @ "0123456789"]; के लिए (int i = 0; मैं & LT; [स्ट्रिंग की लंबाई ]; i ++) {unichar ग = [स्ट्रिंग characterAtIndex: मैं], अगर ([myCharSet characterIsMember: ग]) {कोई वापसी;}} NSUInteger newLength = [textField.text लंबाई] [स्ट्रिंग लंबाई] - range.len

C - How to write linked list pointer contents to a text file -

मेरे पास एक प्रोग्राम है जिसमें पॉइंटर्स की एक सरणी है: INTLIST * myArray [countOfRows]; प्रत्येक myArray पॉइंटर एक लिंक्ड सूची में इंगित करता है, मूलतः यह एक एम * एन मैट्रिक्स बन जाता है। उदाहरण के लिए: 3 2 1 2 1 0 9 8 अतः myArray [0] एक लिंक्ड सूची है जिसके साथ 3-> gt ; 2- & gt; 1 और myArray [1] एक लिंक्ड सूची है जिसमें 2- & gt; 1- & gt; 0 .. और इसी तरह से। मेरे पास एक फ़ंक्शन है जो मैट्रिक्स प्रिंट करता है, जो मूल रूप से यह करता है: के लिए (int i = 0; i & lt; countOfRows; i ++) list_print (myArray [i]); और फिर मेरी list_print फ़ंक्शन ऐसा है: void list_print (INTLIST * list) {/ * यह फ़ंक्शन केवल लिंक्ड सूची को प्रिंट करता है * / INTLIST * temp = NULL; / Temp = सूची के प्रत्येक नोड के माध्यम से / टेप पॉइन्टर / अपने आंकड़ा मूल्य को प्रिंट करने के लिए * / (temp = list; temp! = Null; temp = temp- & gt; अगला) {printf ("% d", temp) - & gt; गृहीत); // प्रिंट डेटामूल} printf ("\ n"); } यह सब बहुत अच्छा और

Beginner Rails Queston : Controllers and Route -

I am very new to rail Question 1 What is the path between the controller and the scene? Say I have a controller named store_controller . I have no way in that controller, but I have a view called "list" Then, I am able to call the local host: 3000 / store / list ... Why can I call without a list action in the controller? What will happen if I add the list method to the controller below? If I call on the local host: 3000 / store / what will be the list? From the controller to the list method and then, to see? Or see the first and list method from the controller? Or will the inventory method never be called from the controller? DEIF list logger at the end of the controller. Write "list" On the basis of my trial, the inventory method from the controller is never called. I'm not sure why I'm following the Azley Web Development with the book "Rail, Third Edition" and I'm stuck in "Task Sea: Cart Creation". How to call the

titlebar - How do I completely change the appearance of a Win32 title bar from Perl? -

I'm learning to add a GUI to my Perl program. Now I can change the icon of a Win32 title bar like this: $ myicon = new Win32 :: GUI :: Icon ('myicon.ico'); $ Myclass = new Win32 :: GUI :: class (-name = & gt; 'myclass', -icon = & gt; $ myicon,); $ Mydialogbox = new Win32 :: GUI :: dialog box (-name = & gt; 'mydialogbox', -class = & gt; $ myclass,); But what about other stuff, what is said, background color, at least the button looks and what does it feel? I goggle this topic and found many potentially relevant articles. They talk about stuff like paiting non-client area etc. But pieces of code seem to be written in all C, with which I am not a good acquaintance. I was wondering if anyone could here please share some of the code snippets written in Perl that are related to the situation like this? Or, what is the hope, a Pearl module that can provide work facility? Thanks for any guidance :) **** UPDATE1 **** was the origina

ruby on rails - How to hold submitted form data until it's been reviewed? -

I am quite new to ROR. I am trying to create my first web app as an experiment which is a job The posting site is The biggest feature and much more convenience is to create a posting for only one user, review and pay for it before posting. I run a punctated order to get the original CRUD functions. This is where I get stuck (yes, I do not know). I do not need to tell the app basically that unless it has been reviewed and paid, do not deposit it, but submit it, then submit it. It's like a shopping cart, but not really, since a company is making "products", then it will buy it. Thank you

hosting - Hide extensions of the pages when hosted -

All, I had a question on the host. I have pages that are written in php or JSP and hosted on one server. And if a user says in the browser, the main.php or main.asp page will be displayed. My question is one way to hide the extension. Thanks ........... Option 1 mod_rewrite / ISAPI rewrite the filter For mod_rewrite on Apache, it will use the following content in your website's root directory The .htaccess file is as simple as adding ... The following rules will direct all URIs in this format: http://yoursite.com/Content From / page / to http://yoursite.com/Page.php The last bit of IE URI is converted into a PHP file with the same name. ^ Content on RewriteRuleRewriteRule =([^/\.]+)/?$ $ 1.php [L, NC, QSA] < Strong> Opt Ion 2 directory structure This is where you have a folder structure to represent your website and each folder has an index.php file. For example, http://yoursite.com/Contact-Us/index.php In this example, http://

php - Drupal 6 Validation for Form Callback Function -

On my node display page there is a simple form with a selection menu: Is there a simple way to validate the form in my callback function The easiest way? By verification, to find out that the advanced value appears in any form, in fact the value is present in the array. For example, without AJAX, if there are 3 items in my selection menu and I add 4th item and try to submit the form, then Drupal will say an error that "An illegal election was made, please admin contact them." With AJAX, you have saved this 4V item in the database. So do I have to write like verification (if $ select_item> 0 & amp; amp; $ select_item & lt; = 3) {// insert in db} Or is there an easy way to ensure that the item actually exists in the form array? I am hoping that without Ajax, the droplet will not submit the form if it has been tampered with. Thank you. Edit: So why do I need this in the original callback function? $ form_state = array ('storage' = & gt;

php - Single SignOn using OpenSSL on Apache Server -

I am new to the OpenSSL world and am trying to implement SSO on my PHP based application. I have already set up the OpenSSL library and the PHP openssl extension. Now, what I need to know, what steps I have to take and where I can find that reference are my requirements 1- The user will be given a certificate , And using the browser SLL, the client will submit that certificate for authentication. 2- The user will not need to go through the long authentication process of logging, but rather the certificate must be joined with the server. 3- The certificate will be self-signed or my company will be CA for each certificate. Please follow me on how to set up all these things on a PHP based application, please guide me. It is easy to configure your client-side certificate, to validate client certificates on your webserver Configure, then point your browser at: ... and you will see how the details will be received and how they are formatted / referenced. (The PHP OpenS

python - No plot window in matplotlib -

I have installed maplotibs in Ubuntu 9.10, using the Synaptic package system. However, when I try the following simple example gt; & Gt; & Gt; From the conspiracy of imported papoos; & Gt; & Gt; & Gt; Plot ([1,2,3], [1,2,3]) [& lt; Matplotlib.lines.Line2D object 0x9aa78ec & gt;] I do not find any plot window. Any ideas about how to get the plot window to show? You can type import Pyalab pylab.show ( ) Or use better, ipython -pylab .

How to get rid of special characters at the beginning, while using File.ReadAllLines in C# -

मैंने कोशिश की string [] file = file.ReadAllLines (file_name) एक शब्द फ़ाइल पढ़ने के लिए। डीबग मोड में मुझे पता चला कि स्ट्रिंग एरे फ़ाइल के पहले कुछ आर्गुमेंट में " ࡱ 0 \ 0 \ 0 \ 0> 0 \ 0 \ t \ 0 \ 0 \ 0 \ 0 \ 0 " । मुझे इससे कैसे छुटकारा मिल सकता है। कुछ फ़ाइलों में फ़ाइल के पहले 3 तर्क [] इनके साथ भरे गए हैं जबकि कुछ फ़ाइलों के लिए केवल पहली तर्क इन अक्षम पात्रों से भर गया है। समस्या क्या है और मैं इससे कैसे छुटकारा पा सकता हूं।? लेकिन मेरी शब्द फ़ाइल की शुरुआत में एक रिक्त पंक्ति भी नहीं है। समस्या यह है कि आप फ़ाइल को सही एन्कोडिंग के साथ नहीं खोलना Word documents खोलने और बनाने के लिए सी # से एक गाइड है।

Can you make valid Makefiles without tab characters? -

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