Posts

Showing posts from May, 2014

asp.net - Response Header Last-Modified not updating -

Image
I am having a caching problem with my site. I am making a change to the JS file and it's my development environment I am publishing this time in priceless). And I get stale version of my file. If I use the Page Speed ​​plugin for firebug, then I can see that the last date for the particular JS file in the response header is to say the revised date Tomorrow's date is not today's date because I can expect. Apart from "X-Power-To", what is the query of "Date" field? Thank you! date header is the date and time whose response was sent (to). I hate answering a question with a question, but is it a caching firewall between you and the web server?

flex - AIR/Flash Player connect to another machine without cirrus/stratus -

Is it possible to connect the air app running on another machine through socket (we believe IP) or Some other mechanism (which does not use cirrus / stratus)? If so, how can someone help me? Repeat the question again, I do not want to connect to the server on the socket. I would like to know that it is possible to connect to another AIR app on Machine B on Machine B without any beer from any AIR app on Machine A. I am not saying any other person to do my work, I could not find any documentation or possibility of the above mentioned matter. My conclusion is that this is not possible, but I want to verify it by other people (experts). Absolutely, supports AS3 chairs

performance - 2d drawing primitives and images: OpenGL, Cairo or Agg -

I am making a game and thinking about using vector shapes for UI. I want to know what is the best renderer for this, I think that Agri is faster than Cairo, but if Cairo can use hardware acceleration, if it is available and how about Open? What a good idea is that I use the global texture for images and lines for rectangular, spherical rectangle and circles? Or is it better that I hand over Kero surfaces in openness? I found that the other options are Google SkiA and SFML. What do you think about ski? SFML also pulls polygons. I can make round shapes using polygon. I am thinking about SDL or SFML controlling events. I can create an OpenCell theme in both of them and I have used them for their roles in the control of those incidents, which are crossplatites. I want a cross-platform solution, it should work in Linux, Mac and Windows. If you are already using OpenGL to present your game, You should not , use any kind of software renderer to attract the game's UI. So either t...

c - Reading from an Arduino tty with FILE* -

जहाँ तक मैं देख सकता हूं, / Dev / serial / by-id / * arduino * dev नोड यह लिंक है: हालांकि, उसका serialport_read_until संदिग्ध बदबू आ रही है serialport_read_until (fd, buf, '\ n') वैसे ही fgets (buf, bufsize, fptr) जैसा नहीं है? दूसरे शब्दों में, मुझे FILE * fptr प्राप्त करने के लिए फ़ाइल डिस्क्रिप्टर पर fdopen का उपयोग करने से रोकना है, और फिर fgets / का उपयोग करके Fscanf / fgetc ? मैंने इस दृष्टिकोण की कोशिश की है fputc काम की तरह कॉलिंग कॉल, लेकिन errno = 0 । के साथ पढ़ने की कॉल विफल हो गई है: init code: devfd = open (dev, O_RDWR | O_NOCTTY | O_NDELAY); Int devfl = fcntl (devfd, F_GETFL); // सीरियल / टर्मिनल विकल्प टर्मॉइस टॉर्पेट्स; अगर (टीसीगेट्टर (डेवफड, और टाईपॉप्ट्स)) थ्रो; // कोई समानता नहीं; कोई प्रवाह नियंत्रण नहीं; एक स्टॉप बिट // 8 डेटा बिट चुनें / स्थानीय स्वामित्व; सक्षम wordopts.c_cflag = CS8 | क्लासिक | CREAD; // कोई विहित विशेषताएं; कच्चा मोड; No गूंज termopts.c_lflag = 0; // कोई इनपुट प्रोसेसिंग फीचर्स नहीं; कच्चे मोड termop...

substring - Read More jQuery plugin failing with HTML -

I am using this code so that I only show the first 500 characters (and cut only after a full word) But it apparently fails when it gets some HTML code in the "500" threshold In that case, it just adds "..." and then the text continues (And it also shows the "see more" link). Example: Lorem & lt; Strong & gt; Impressum Dollar & lt; / Strong> Sit amet etcà © tera Suppose it should be cut between "empsum" and "dollar". The result is: Lorem & lt; Strong> Impsum ... & lt; Span class = "hidden" style = "display: none;" & Gt; Color and & lt; / Strong> Sit amet etcà © tera & Lt; A href = "#" & gt; See more & lt; / A & gt; It should be: Lorem & lt; Strong> Impsum ... & lt; Span class = "hidden" style = "display: none;" & Gt; Weeds & lt; / Strong> Sit amet ATC Ettera & lt; / Span & gt; & ...

taskbar - Why does the task bar appear when I display a self-drawn modeless dialog? .. sometimes? -

I have an interesting (but disappointing) problem I have an app that uses full screen (this one Third-party fullscreen POS application is to simulate). My application displays the sequence of the Modelless dialogue boxes at the top of the full screen application. It shows one, hides it, shows it to the next, hides it etc. After the third show, the Windows taskbar appears after about 1 second. I do not know why I have snatched my code properly to see if I am doing something in my NNCActivate handler (which I use to draw my skin window), but I do not think it's like the problem, I have tried to dump myself in Windows along with Detective ++, and I still do not see anything strange that I have no choice Will give the rage. In my logs there are some messages of ID 0x36, but I can not know what they should be, I have checked different message ID lists and they can not be found. Since WM_USER has not started up to 0x400, they should not have any of their own message IDs. I kn...

Django per-object permissions -

I have users who are connected to the list of all real estate properties, which they are allowed to access multiple users Can be allowed to view the same site. How can I set it up in the Django? I have: class UserProfile (Models.Model): user = models.OneToOneField (user) last_session_time_online = models.IntegerField () total_time_online = models.IntegerField ( ) Def __unicode __ (self): return self and class site (models.model): site_name = models.CharField (max_length = 512) ... other stuff ... def __unicode __ (self): return self.user These are many things: class site (models.model): site_name = models.CharField (max_length = 512) permission_useor = model. ManyToManyField (user) ... sam = User.objects.get (username = ' Sam ') frodo = User.objects.get (user name =' froado ') hobbithole = Site.objects.get (site_name =' The Hobbit Hole ') hobbithole.allowed_users.add (Sam, Frodo) frodo.site_set.all ( ) # Return the "Hub Hit Whole...

.net - Setting selected value in SelectList isn't working using DropDownListFor -

After text "itemprop =" text "> I'm creating a selectList for a drop public class EditDeviceViewModel {public selectList DeviceTypeList {Received; Set; } Public Utility Type Type {Received; Set; } Public EditDeviceViewModel (device device, IEnumerable & lt; DeviceType & gt; DeviceTypes) {... DeviceTypeList = new selectList (DeviceTypes.OrderBy (t = & gt; t.Type), "id", "type", device. DeviceType.ID); SelectedDeviceType = device.DeviceType.ID; }} So in my opinion I am using HTML Assistant @ Html.DropDownListFor (model = & gt; create a drop down; model .SelectedDeviceType, Model.DeviceTypeList, new {id = "devicetypelist"}) When the view is provided, the value selected by me when selecting selectList initialising is not. What am i doing wrong After the dropdown will use the value of the list SelectedDeviceType property as the selected value What you can do is set the property value when you build t...

c# - Create Hash Value on a List? -

I have a list & lt; MyRichObject & gt; There are 50 instances in each instance, each instance has 1 or 2 unique properties, but in a way they are all unique because there is only one place in the list, etc. I have a unique way "Hush" in this list, it is unique from all the other lists, what is a great way to do this. NET 4? The purpose is to make a type of "monikar" for the lists so that they can be thrown into a line and later found on the basis of their unique value. TL; DR public static GetSequenceHashCode & lt; T & gt; (This is the IList & lt; T & gt; Sequence) {const int seeds = 487; Const int modifier = 31; Uncontrolled {Return Sequence. Aggregate (Seed, (Current, Item) => (Current * Modifier) ​​+ Item. GetHashCode ()); }} Why bother with another answer? If you have multiple items in the list with the same hash code, then you can get the wrong results in a dangerous way. For example, consider these inputs: ...

Has anybody created a job with multiple inputs using the the ruby client for Amazon's Elastic Map Reduce? -

UI allows me to create jobs with many inputs by specifying multiple input lines through the framework of the Amazon. : - Input s3n: // Some-input s3n: // some-second Similarly, the Ruby EMR client has been very helpful to me so far: However, I am trying to work one night which requires many inputs and I can not find any way to do this. . This will not allow me to pass multiple-input parameters and when I use - or --garg, which is not a job-built input line, it is almost as much as it is taking out. Has anyone used this tool successfully for this purpose? You use --gargs on but it uses either the --stream or --bootstrap- The action option is to follow it can not be confined to the end of the command line: - Henry

java - Serialize a JAXB object via its ID? -

In my data model, I have something for this effect: @Entity Local Class Goal {@Id @GeneratedValue Private Long ID; / * ... etc ... * @} Entity public class dependency {@Id @GeneratedValue Private Long ID; @ManyToOne (optional = false) @ column (name = "target_id") personal target target; / * ... etc ... * /} I'm already sorting target , but I have to serialize dependence . Essentially, what I want is something like this: & lt; Dependency & gt; & Lt; ID & gt; 100 & lt; / Id & gt; & Lt; Targetid & gt; 200 & lt; / Targetid & gt; & Lt; / Dependencies & gt; Is there a way to do this in JAXB annotations without modifying my model? You can use the XmlAdapter for the case of this use: Package forums 7278406; Import javax.xml.bind.annotation.adapters.XmlAdapter; Public Category TargetAdapter Extends XmlAdapter & lt; Long, Goal & gt; {@ Override Public Long Marshall (goal target) throws exception {r...

asp.net - decoding cdata content within xml -

A customer has sent us an XML file with CDATA content that is XML encoded i.e. & amp; Lt ;! [CDATA [Some Content]] & amp; Gt; What is the best way to replace content in an XML file with A decoded version in ASPNX? Thanks This (without asking the customer to send us the correct file) It may be that you do not want to, but it will give you at least one start: Using the system; Using System.Collections.Generic; Using System.Text; Using System.Xml; Using the system. Security; Name space cssandbox {class program {static zero main (string [] arg) {string oldXml = "& lt; root» gt; child & gt; not cdATA here & lt; / child & gt; & lt; child & Gt; & lt ;! [CDATA [illegal xml & lt; & gt; 'Bobby Tables]] & gt; & lt; / child & gt; & lt; child & gt; & lt; child & gt; ; & Lt ;! [CDATA [more CDATA & amp; amp;]] gt; & lt; / child & gt; & lt; / child & gt; & lt; / root & gt;...

Creating Discount Code System (MySQL/php) -

We have a product, payments have been made by PayPal Before going to PayPal, we need to apply a discount, Where people want to get product free (i.e. 100% discount) you can enter a gift certificate code or you can enter some code to get a specific discount (i.e. sev 10 - 10% discount Please). Some codes will only be used for one usage (i.e. gift certificate), some can be used multiple times - i.e. SAVE10 will also have an expiry date. Is going to use MySQL and php to keep it together. Has anyone done this and has done anything together? Or can we use some code to save time? P> This is essentially the functionality of a class, actually In this case, you will need a class interface which will create a new discount code for product discount {/ ** *} and return the * $ @ discount code code for the ultimate $ code string * @ best $ Expiry float value adjustment% ex: * @param $ option array (optional) An array of options: * 'expire' => timestamp (optional) *...

directx - C# Capturing A Fullscreen Game With SlimDX -

I recently created an application that takes screenshots of the game. At first I captured GDI, but for this I had to disable the arrow on winter 7 / VO and I had some problems on Windows XP. With this I decided that by going with DirectX and Microsoft's DX is not working for me, I found this fantastic example of a SlimDex Screen Capture (http://spazzarama.wordpress.com/ 2009/02/07 / screencapture-with-direct3d /) Slimdex did great work! And also allowed me to capture a game without disabling the air on win7 / vis The only problem - when I switch the game to full screen, I get the "D3DERR_Vivilost: Device lost (-2005530520)". Can anyone recommend a way to customize the code, capture the fullscreen application? Note: I have a way that can determine whether the game is full screen or windowed. And I change this line: bitmap = new bitmap (SlimDX.Direct3D9.Surface.ToStream (surface, SlimDX.Direct3D9.ImageFileFormat.bmp, new rectangle (Area. Lift, area top,...

javascript - How to prevent user from entering decimals? -

I have an order page on my site. Some order items can have decimal quantities, nothing can do What is the best way to stop the user from entering the decimal quantity? (Except for a warning box and to set the area to zero)? Intercept key events for fields, find illegal characters on the input, by entering them in the field Stop and add a temporary message near the area (inserted in the page) which tells which characters or values ​​are allowed. There is a bad way to respond between pop-up alert typing. Then, please validate before submitting as there are other ways to get data in fields (drag / drop, copy / paste, etc.) that you can not catch everything is. With the temporary messages that appear when typed invalid keys, this is just a round and a jQuery example of decimal decimals: Working JSField: $ ("integer"). Keypress (function (e) {if (e.which & lt; 48 || e.which> 57) {showAdvice (this, "integer value only"); return (wrong);}}); $ (...

iphone - Retrieving image from salesforce for iOS -

I am working on iOS integration with Sales Force. I am using the @ "SELECT contact. Contact with first name" query to get the list of all the members stuck in the following points. Now I want to retrieve the image of the profile and the people of the company for the above mentioned person. How can I get these notifications? thanks @change / P> There is no image in the form of a standard field of contact object, so I do not know what you thought you were trying to retrieve. Using a user's record, you can retrieve the nonsense picture of a particular person, but I do not know about this kind of feature on contact unless you have it as a custom field. Do not add. If you provide some more information, then I can help you further. Paul

optimization - Best practice with MySQL -

I just wondered what is the best practice: I have a table and I want to hide a record so that I Can I use a column like visible = 1 or I should create another table and transfer data. Thank you! I would recommend adding a heavy field for this purpose. I usually use a little bit for it.

mongodb - Mongo Schema-less Collections & C# -

I am searching for Mongo as an alternative to relational database, but I have a problem with the concept of schemale archives I am walking in It sounds great in principle, but as soon as you tie a model for a collection, the model becomes your definition schema. You can not just add or remove fields from your model And hopefully it will continue to work. I see a problem here that manages the changes along with a relational database in your relationship, in which you need some type of script, so that one can migrate from one version of the database schema to another. Am I coming from this wrong angle? EDIT: It is worth noting that these problems are clearly also in the relational database, as well as to ensure that the items of their collection are stored in their domain model What approach do you take to stay in sync? But I'm specifically asking for strategies in schemaless database and reducing the problem especially using Mongo Thanks! Schema migration with Mojo DBB is ...

unit testing - Rhino Mocks: Stub & Mocks. What is the difference -

I am using Rhino Mox in my unit test. I want to know the differences between STUBS and MOCKS ( mocks.Stub > and mocks.StrictMock T & gt; ; () ). I think that was asked before. This is usually the same with the following differences: Dynamic mail accept unexpected calls and just Stubs are like dynamic mocks but by default the "property transaction" is returned by default (like .null) It is allowed to read and read properties like fields, but do not expect stub , and on AssertWasCalled properties. This behavior can also be configured on a normal mock. But this is the default for stubs. As the Rhino changed, it has been discouraged to use the strict Max, because they work very hard to maintain the test code. I do not get information about Rhino implementation, So I do not mark this question as a duplicate.

iphone - UITextView in UITableViewCell - Problem with Tags -

मेरे पास UITableViewCells में पाठ फ़ील्ड के साथ समूहबद्ध तालिका दृश्य है। - (UITableViewCell *) टेबलव्यूः (UITableView *) तालिका दृश्य सेलफोररावटिंडपैथ: (एनएसआईएसएक्सपैथ *) इंडेक्सपेथ {स्टैटिक एनएसएसटीइंग * सेलआईडेंटिफायर = "सेल"; UITableViewCell * सेल = [तालिकादृश्य] dequeueReusableCellWithIdentifier: CellIdentifier]; अगर (सेल == नीला) {सेल = [[[यूआईटीबलव्यूजेल आलोक] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: सेलआईडेंटिफायर] ऑटोरेक्ज]; } अगर (इंडेक्सपाथ.सेक्शन & lt; 6) {UITextField * textField = [[UITextField alloc] initWithFrame: CGRectMake (20, 10,580, 31)]; TextField.tag = indexPath.section + 22; TextField.delegate = self; [Cell.contentView जोड़ें SUBview: textField]; [टेक्स्टफिल्ड रिलीज़]; } रिटर्न सेल; } इसलिए जब मैं सेव बटन को दबाता हूं, saveItem विधि को कहा जाता है: - (शून्य) saveItem {NSMutableArray * textFieldArray = [[NSMutableArray alloc ] इस में]; के लिए (int i = 0; i & lt; 6; i ++) {[textFieldArray addObject: (UITextField *)...

c# - VS 2010 (and publicize.exe) create xxx_accessor.exe instead of .dll -

I have a strange problem with private accessories and VS 02010. Generally, create a xyz_accessor.dll and xyz_accessor.pdb, VS and publicize.exe. Universal tomorrow, my vs Also did this. But then I made a solution using the VS 2010 C # compiler through the command line, so nothing other than VS will be done. Solution built without any errors, but instead of getting xyz_accessor.dll, I found an xyz_accessor.exe. While trying to execute it, the window tells me that it will not be a valid Win32 application. I also tried to make tests to make the public public. XE, but its only one The strange thing about it is that VS is capable of running all the tests, but all tests with mstest.exe have failed because the xyz_accessor.dll is not found, which is connected to the UnitTit.dll test project Is compiled from / P> Does anyone know how to solve this behavior? Sincerely, Christian

javascript - Multi language support -

I'm developing an HTML5 application that uses jQuery. I want to make it multi language: To locate the user's language and to change all the literals in the language of the user. I think an HTML file is used for each language supported, but it is a waste of space to change all written words in the user's language Another approach could be the use of jQuery. But I'm not sure how to do this. What do you think? Is there a better way? Update: I have forgotten to say that I have some texts in javascript too. Do not you type any server-side query in user's language and then read the appropriate text Automatically load? CMS may also be suitable here For all JavaScript code, I will use string literals as a variable. Therefore you can load a different language file suitable for the user language. File English Js: var messages_siteA1 = "This is a warning."; Var message_siteA2 = "..."; // ... file german.js: var messages_si...

tfs2010 - visual studio corrupt projects in solution after TFS map -

मेरे पास TFS पर है जो फ़ोल्डर्स में प्रोजेक्ट करता है: \ root \ website1 \ website2 \ पुस्तकालयों वर्ग प्रोजेक्ट 1 वर्ग प्रोजेक्ट 2 वर्ग प्रोजेक्ट 3 जब मैं टीएफएस द्वारा स्थानीय हर फ़ोल्डर और प्रोजेक्ट मैप को मैप करता हूं, लेकिन इसके बाद खुला विज़ुअल स्टूडियो वेबसाइट 1 के नीचे सभी परियोजना वेबसाइट 1 फ़ोल्डर में ले जाया गया; / क्या कोई मुझे इस वी.एस. व्यवहार को समझ सकता है या इसे कैसे सुधार सकता है? ps करीब दृश्य स्टूडियो एसएलएन फ़ाइल मिस नहीं होने के बाद और मुझे हर चीज को फिर से मैप करना चाहिए; / संख्या को कम करने की कोशिश करें आपके द्वारा सेट किए गए फ़ोल्डर मैपिंग के - एक अच्छी परियोजना को केवल एक की आवश्यकता होगी, यह कहने के लिए कि स्रोत कोड के पेड़ के मूल फ़ोल्डर को आपके स्थानीय हार्ड ड्राइव पर संग्रहीत किया जाएगा। आपके मामले में, यह कुछ ऐसा होना चाहिए: $ / रूट - & gt; सी: \ MyCode आप जोड़ते हुए अधिक मैपिंग, कम पत्राचार जो आप स्रोत नियंत्रण फ़ाइल संरचना और आपके स्थानीय डिस्क संरचना के बीच देखेंगे, और चीजें बहुत तेज़ हो सकते हैं। (समस्या का कारण हो ...

mysql - Views are rewritten when I save -

When I save a view on MySQL, it is called "rewritten". How can this save? Example, when saving this view: SELECT * FROM `contas_users` it is written again for : Select `contas_users```````````````````````````````````````````` and ```````````` and `Contat_users` I want to avoid this behavior (maybe locally), because I need to do some tests, and copy / txt in a TXT and last too slow and Is boring. Do not do be aware that mysql is internally with your query What does it do. You are managing your SQL source should have any form of source control, but if you are not, then you should write your own SQL source (text) file only , then execute them as a script on mysql.

scroll - Is it possible to make a marquee using picture? -

Is trying to create a layout with a picture that is growing like a dead? Is this possible? Please help .. Thank you ... Yes, you can: & lt; Marquee scrolldelay = "100" bgcolor = "gray" & gt; & Lt; Img src = "img.png" / & gt; & Lt; / Marquee & gt; Edit: It works in all modern power, and even 6,7,8

hibernate - Spring MVC + JPA - Binding/Updating Associated Entities -

Some of these questions relate to J.A.A., but more about approach than technology, so hopefully no advice Will be able to deliver. I want to be in Spring MVC and Hibernate to bring a website into power which allows users to create products and make product descriptions. I have product edited, with bidirectional one-to-many relationships with ProductDescription. If a form adds a frequency of the product when submitting the form, and all its product specifies the description, then a malicious user can enter the fake ID for ProductDescriptions and other users' data Can 'abduct' One solution for this will always be to make the producers new, so remove them when the form is submitted, and make them new every time. Due to the extra deletion and write operation it seems disqualified that the product will need to be updated every time (even if the product descriptors have not changed). The 'ownership' of another option will be examined by the institutions before t...

multithreading - j2me Threading with video component -

Image
I have tried to implement a Java application, which has the following structure. My problems are When I say the quote thread video from the video player thread still plays at the top of the quote form. When I change the video URL with the action event, then it only adds an existing one to the player with the former. Video 2 is currently attached to Video 1 when I press Video 2 button . Class VideoPlayer Playable, Action Listener {Private Video App Middlelet; VideoComponent vc; Button video, quote, video 1, video 2, video 3; Form video player; Thread thread; Public Videoplayer (Video App Midlet Midlet) {this.Midlet = MIDlet; } Public run zero () {try {videoplayer = new form ()} video 1 = new button ("Video 1"); ....... vc = VideoComponent.createVideoPeer ("http: //localhost/video1.mpg"); Vc.start (); Quotes Addition Listener ((Actualist) This); ........ videoplayer.addComponent (vc); ........ videoplayer.show (); } Hold (exception error) {Sys...

Java Synchronization problem -- Chatting multiple chatroom applications -

I am developing a chat application. I have a function that processes chat messages. Each chat The room is identified by a unique shortcode Now I want to have a message waiting for the same shortcode when the message is being processed for a shortcode, while continuing to keep messages for other shortcodes needed. Please follow the peace of the code, what is the problem with it, as the messages of the same shortcode are being processed in parallel. I just can not guess the problem Private Hashmap lock = lock; lock = lock.get (shortcode); if (lock == empty) {locks.put (shortcode, object lock = Lock = new object ());} This block of code is executed outside any mute x, so many threads can run it at the same time, so each Threads (one shortcode) got its lock The simplest (but very efficient) way to fix this: Private Hashmop In this way you have a lock according to a shortcode It is possible to use some such computational conventionshashmap as a more efficient m...

c# - .net Castle Windsor how to specify component property to constructor parameter in xml? -

I can not understand how I can pass composite properties into constructor parameters. & lt; Component ID = "Notification Center Manager" Service = "Advice Notification. Control Manager, Exxure" Type = "Advice Notification Center Manager, Exclave" & gt; & Lt; / Component & gt; & Lt; Component ID = "Jobprocessor Configuration Session" service = "Advice .nojobprocessor .isobobprocessor configuration semester, advice .core" type = "advice.jobprosseer management.job processor configuration sensor, exsecurity" & gt; & Lt; Parameters & gt; & Lt; Notification Center Yuri & gt; $ {Notification Center Manager. Information Center Yuri} & lt; / Information Center Yuri & gt; & Lt; / Standards & gt; & Lt; / Component & gt; Where the Notification Center is the property of the Yuri Interface Inspiration Center Manager. Thanks Windsor does not provide out of that ...

Problems defining a new medium model (Modelica.Media) -

I am trying to set up a new medium model based on modelica. Media My model spreads from a partial mixture when imitating an open vessel (taken from modelica Fluid), which neither feeds nor grooves but is heated from the outside, the balance of mass is not met. Thanks in advance Timo I'm not sure that your problem is with the middle model if the composition Regarding the density or partial derivatives are incorrect (and used in the model), it is possible that the middle model causes the problem, but without more information I can not determine it. Other reasons may be, the open vessel is valid only for liquids, and if your liquid model is boiling or in the two-phase area, it may be outside the validity zone of the vessel model. Hubertus

python - How is http://shell.appspot.com/ executing code online? -

I am creating a website that allows you to write or write python code online. Can someone provide me some help so that I can get it? The first file you can browse them is only 321 lines! Actually, each user has a different global dictionary for the session, then uses compile and exec to run the code and The results will return. # # # # # # # # Log in. ('Compilation and evaluation: \ n% s'% statement) compiled = except compilation (statement, '& lt; string & gt;', 'single'): self.response.out.write (traceback.format_exc () ) Back and # runs! Old_globals = dict (statement_module .__ dict__) Try: old_stdout = sys.stdout old_stderr = sys.stderr Try: sys.stdout = self.response.out sys.stderr = self.response.out compiled_model_de_dll in exec statement : Sys Stdout = old_stdout except sys.stderr = old_stderr: self.response.out.write (traceback.format_exc ()) Edit: Google App Do not use the engine will make things even more complicat...

php - An upgrade from CakePHP 1.2 to 1.3 broke my routes, although they should be 1.3 compatible -

I am upgrading CakePHP 1.2.10 to 1.3.11 through "Guide" and I know that I It is important to be sure that I am compatible with root 1.3. Although my paths do not make anything inconsistent: It is no longer supported in the form of greedy stars in the middle path, unchecked, and complex path compile these two shores- Router changes in the outside and beyond features as was done in 1.2. The second edge is the case: The first path was removed from the sections using full regular expressions. How do my ways behave: On the home page, does not work However, on 1.2 this successfully route # 1 (Resolved by ivo) / lv / products * does not work *. Using the controller "product" and default action "index", there should be # 6 matching, but it thinks that "LV" is the controller (ignoring / Lv / products / index works! / lv / product / view / product name works! The cake provides errors similar to this error / lv / pro...

javascript - window.opener.focus() problem in FF5+ -

मैं अगले कोड के साथ नई विंडो खोल रहा हूँ: window.open (url, pageName1, "menubar = 1, Resizable = 1, scrollbars = 1, स्थिति = हाँ, चौड़ाई = 1050, ऊँचाई = 820 "); इसलिए खिड़की मोडल नहीं है नई विंडो में मैं ' आई कॉलिंग: यदि (window.opener) window.opener.focus (); IE में, Chorme, FF3.6 मूल विंडो में हो फोकस, लेकिन एफएफ 5 या एफएफ 6 में नहीं, कैसे मैं फोकस को मूल विंडो पर ले जा सकता हूं? एफएफ 4 + प्रीवार्नट विंडो डिफ़ॉल्ट रूप से ऊपर उठाने और घटाना, आप विकल्पों में सक्षम कर सकते हैं: टूल-> विकल्प- & gt; सामग्री- & gt; उन्नत ... ("JavaScript सक्षम करें" पंक्ति में) - & gt; चेक "उठाएं या कम खिड़कियां"

algorithm - Does MyISAM load all indexes into memory? -

Firstly you should know that the MySass Index does not actually contain data, its only its Know In both cases, the cache of Amount of information available on available space Depends if there is insufficient space then not all information is cached. Not like that, no, not always.

javascript - GoogleMap offsetWidth problem -

I have a problem displaying GoogleMap. Here is the website source code: When I'm trying to run this website, the map is not displayed. Firebug Console says, Do you have any idea what I am doing wrong? I know that there are many working examples on Pure but this code is generated from a special script and I am not able to interfere too much to it. Maybe I forgot to forget some variables? Thanks, Mike ================= Edit: This code is working only when I will put JS in function definition and call it in body overload param. Do you have any idea how I can work without using such functions and onload param? I know it's probably been a while - but hopefully it helps someone else Will not find: In your case the initial function is not firing, although it may also be due to the width and height of the container being set on the device if you do not want to add load events only to body tags. If you want to, you can use the following jQuery: // addload to b...

generics - The syntax <T extends Class> in Java -

I have some ideas about the following: Public Interface Maxstack & lt; T comparative & lt; T & gt; & Gt; The 1-class which applies MaxStacks should be written in such a way: Public class MaxStack class & lt; T comparative & lt; T & gt; & Gt; Maxstacks & lt; T & gt; Applies No more Public class MaxStack class & lt; T comparison & lt; T & gt; & Gt; Maxstacks & lt; T applies and comparative & lt; T & gt; & Gt; ? 2- Why do the personal variables in this class, when I use generic, only and & lt; T extends comparative & lt; T & gt; & Gt; Not with ? For example, Private list & lt; T & gt; & lt; What is the difference between T and comparative & lt; T & gt; & Gt; and and lieutenant ; T is comparative and expanded; - If I need to compare the twentieth element in my class, then both will be fine, will not it? EDIT: I think that the problem with 3 is that...

Sencha touch panel layout not taking up all available screenspace -

Image
मेरे पास एक पैनल है जो पूर्णस्क्रीन है; PortalDashboard.views.Dashboardcard = Ext विस्तार करें (Ext.Panel, {पूर्णस्क्रीन: सही, शीर्षक: 'डैशबोर्ड', html: '', cls: 'card5', iconCls: 'टीम', लेआउटः एक्सटेंशन.वियपोर्ट.अधिकरण == 'लैंडस्केप'? {प्रकार: 'Hbox', पैक: 'केंद्र', संरेखित करें: 'खिंचाव'}: {प्रकार: 'vbox', संरेखण: 'खिंचाव', पैक: 'केंद्र'}, मॉनिटर ऑरिएंटेशन: सच्चे, श्रोताओं: {ओरिएंटेशन: this.onOrientationChange, }, शैली एचटीएमएल सामग्री: गलत, initComponent: function () {Ext.apply (यह, {items: [{xtype: 'डैशबोर्डबॉक्स', आइटम: [rep1, rep2, rep3]}, {xtype: 'डैशबोर्डबॉक्स', आइटम: [ Rep4, rep5, rep6]}]}); पोर्टलडाशबोर्ड.दृश्य.डेशबोर्डकार्ड.superclass.initComponent.apply (यह, तर्क);}}) इसलिए पैनल में एक hbox लेआउट है 2 बच्चे पैनल बच्चे पैनल वास्तव में क्षैतिज स्थान की पूरी राशि लेते हैं, लेकिन खड़ी नहीं हैं। मैं सीएसएस में न्यूनतम ऊंचाई सेट कर सकता हूं, जो मेरे पीसी पर क्रोम और...

How to close one single tab in android tablayout without clearing all the tabs and adding again -

Clear all tabs as well as add tabs to TabHost There are no APIs to delete a single tab. Clear all tabs tried to tabwidget.removeViewAt (index); TabHost.getTabContentView () RemoveViewAt (index) After that the behavior is weird, I think the reason for this is that there is still a tabp reference in mTabSpecs mTabSpecs There is a personal variable in TabHost and there are no methods to get a handle on it. If anyone wants to close the same tab, and yes I have tried to clear all the tabs and add all tabspex back. This does not work for my use, where some scenes involve some information regarding the session. If I rebuilt those tabspeps, then I would go back to the starting point in those scenes. You can try the visible to the tab To set which you want to see close to . GONE .

database - Sitecore - moving items from Web to Master (Packages?) -

मैं साइटकोर 6.3 चला रहा हूं। मेरे पास एक साइटकोर पैकेज है जो मूलतः गलत तरीके से बनाया गया था मास्टर डेटाबेस के बजाय वेब डेटाबेस। डेटाबेस लंबे समय से चला गया है और मैं इस पैकेज को मेरे नए साइटकोर इंस्टेंस में आयात करना चाहता हूं, लेकिन समस्या में चला, जिससे कि पैकेज वेब डेटाबेस में सीधे हो जाता है - जबकि यह महत्वपूर्ण है कि इसे बजाय मास्टर डेटाबेस में आयात किया जाता है। मैंने फ़ाइल नाम और संदर्भों को बदलकर मैन्युअल रूप से पैकेज को संशोधित करने की कोशिश की, लेकिन पैकेज आयात करते समय समस्याएं हो गईं। I साइटकोर 6.3 की सीरियलाइज़ेशन सुविधा की खोज की, लेकिन यह केवल मुझे पहले से मौजूद वस्तुओं को डी-सीरियल करने की अनुमति देता है, और मेरे मामले में मास्टर डाटाबेस में आइटम नहीं है। आगे बढ़ने का सबसे अच्छा तरीका क्या है वेब डेटाबेस से वापस मास्टर करने के लिए आइटम धन्यवाद आप " एक अन्य डाटाबेस में सुविधा बदलें, जो कि आप "नियंत्रण कक्ष" में पा सकते हैं - & gt; "डेटाबेस" मेनू। बस साइटकोर डेस्कटॉप पर लॉग इन करें, वेब डेटाबेस पर स्विच करें और उल्लेखित...

jQuery - chart animation in theory -

I am planning to develop simple chart generators. 80% will be based on jQuery - and I'm looking for some answers from more experienced jQuery users. My animation will be based on: JQuery CSS Background Images > For example: creating animation for every two MS Change background-position for? Change the background position of 'top right' from easiest 'left', but on PX basis by PX? Have you ever seen such use? Any examples, suggestions, technics examples greatly appreciate. You can do animation in jQuery. I would recommend the animation stack before each call.

javascript - Greasemonkey with jQuery, how to write the greasemonkey script to modify page DOM elements? -

ग्रीसमुन्दी विकी पृष्ठ से, एक उदाहरण jQuery के साथ greasemonkey है। कोड नीचे सूचीबद्ध है और पृष्ठ का स्थान है // == यूज़रस्क्रिप्ट == // @नाम jQuery उदाहरण // @require http://ajax.googleapis.com/ajax /libs/jquery/1.3.2/jquery.min.js // == / यूज़रस्क्रिप्ट == // जेडीएल लाइब्रेरी का इस्तेमाल करते हुए आईडी के कुछ तत्व के साथ कुछ पाठ जोड़ें। $ ("# कुछ पाठ")। अनुलग्नक ("अधिक पाठ।"); यह उदाहरण स्क्रिप्ट DOM को सीधे संशोधित करता है क्या मुझे jQuery फ़ंक्शन जैसे कोड को चारों ओर घूमने की आवश्यकता है // == यूज़रस्क्रिप्ट == // @name jQuery उदाहरण // @require http: //ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js // == / यूज़रस्क्रिप्ट == // जेडीएल पुस्तकालय का प्रयोग करते हुए आईडी के कुछ तत्व के साथ कुछ पाठ जोड़ें। संलग्नक ("अधिक पाठ।");}) मैं यह सवाल इसलिए पूछता हूं क्योंकि मेरी हर बार greasemonkey कोड निष्पादित नहीं होता है पृष्ठ ताज़ा है इस मुद्दे पर कोई विचार? धन्यवाद। नहीं, आपके स्क्रिप्ट कोड को jQuery () में लपेटने का कोई मतलब...

ios - Automatically copy property values from one object to another of a different type but the same protocol (Objective-C) -

I have two classes with the properties of the same set, declared in the protocol using the @ Property Directive, they both execute Now I was thinking that with the values ​​of second class (and vice versa) with values, it is possible to automatically populate an example of the first class. I would like to strengthen this approach, so that if I change the declared properties in the protocol, there will be no need to add additional code in the copying methods. Yes, there may be different approaches to this problem. I can think that the properties of all source objects for the first time, then use the setValue: value for Key: key to set the value on the target object. Code to retrieve all custom properties: - (NSSet *) Property Name {NSMutableSet * propNames = [NSMutableSet set]; Unsigned int outCount, i; Objc_property_t * Properties = class_copyPropertyList ([self class], & amp; outer number); For (i = 0; i & lt; outCount; i ++) {objc_property_t Properties = Pro...

PHP: Maximum number of form (FILE) fields -

I want to upload 50 files at the same time (well, a customer wants this 'amazing feature') . However, PHP only processes 20 form fields; After that, they are not present for PHP only. I have come to this problem before, but the document has not been properly fixed. I believe this is a PHP setting, but I can not find it. In php.ini, change max_file_upload = 20 whatever value you have the wanted.

how to wake lock using powermanager class in android -

Hi, I am trying to wake up the lock for a particular amount but I can not find the result, I have a power manager class But I'm not getting any results I'm using to lock this code PowerManager.WakeLock wl; PowerManager pm = (PowerManager) getSystemService (event.pOWER_SERVICE); Wl = pm.newWakeLock (PowerManager.PARTIAL_WAKE_LOCK, "My tag"); Button B = (button) Find VVBIID (R.B. button 1); B.setOnClickListener (New OnClickListener () {@Override Click Public Zero (see ARG0) {wl.acquire (); wl.release ();}}); } Here I am trying to invite lock when I click on the button but it is not working to stop me using special broad receiver Please thank me first You should 1. First hold a wakelock; 2. Do something else; 3. Release the wakelock. So you should test it: button b1 = (button) findViewById (R.id.button1); B1.setOnClickListener (New OnClickListener () {@Override Click Public Zero (see ARG0) {wl.acquire ();}}); Button B2 = (button) Find VVBIID (R.B. but...

How do I detect a test has failed in Selenium html test? -

We have a bank of such tests, which all start by entering. Although sometimes something goes wrong and tests fail. When this happens, the logout is not available at the end of the exam, then the next exam tries to re-enter - Open. Use / Login If you have logged out then works fine even if you have not logged out because the test is unsuccessful, then the command puts you in a different path and then In that suit, the remaining examinations fail If the test fails, how do I tell Selenium to log out? Or how will I tell Selenium whether the logout link is available logout and ongoing? In my eyes, I like the following steps All test cases Build Lib with Create a suite that will call the required function from the libraries. Use the following flows in the suite Call Log If the login function returns zero calls to execute the required function. Returns the zero call logout if the function is called. :::::::::::::::::::::::::::::::::::::::::::::: ::::: :::: If one ...

php - Is the HTTP request URL not part of the HTTP request header? -

यहां एक विकिपीडिया लेख से एक उद्धरण है: GET अनुरोध विधि के विपरीत केवल यूआरएल और हेडर सर्वर को भेजे जाते हैं, पोस्ट अनुरोध में संदेश बॉडी भी शामिल होता है। उस आधार पर, ऐसा लगता है कि यूआरएल शीर्ष पर से भेजा गया है, लेकिन अगर ऐसा है तो , हम यूआरएल को रीडायरेक्ट करने के लिए PHP में क्यों हैडर () विधि का उपयोग करते हैं? हैडर ("स्थान: http://google.com" ); जब आप अपने ब्राउज़र से URL ब्राउज़ करना चाहते हैं तो आप URL टाइप करते हैं ब्राउज़र यूआरएल को इस तरह एक HTTP अनुरोध के अंदर डालता है: प्राप्त करें / path / to / resources.php?var=data1&othervar=data2 HTTP / 1.1 होस्ट: example.com कनेक्शन: रखें "रिक्त पंक्ति" को बंद करें फिर एक वेबसर्वर आपको इस तरह एक उत्तर देता है: HTTP / 1.0 200 ओके दिनांक: शुक्र, 02 सितम्बर 2011 14 : 37: 36 जीएमटी सर्वर: अपाचे कैश-कंट्रोल: निजी, एस-मैक्जेज = 0, अधिकतम-आयु = 0, पुनः-संशोधित सामग्री-एन्कोडिंग: gzip भिन्न: स्वीकार-एन्कोडिंग सामग्री-लंबाई: 149 सामग्री-प्रकार: पाठ / जावास्क्रिप्ट; Charset = utf-8 कनेक्शन:...

events - binding to form submit click with jQuery and waiting for validation panels to be shown before proceeding -

I'm hooking up in HTML form submissions where a specific class using $ (". FormSubmitTypes") in the Submit Buttons is. ('Click', function () {do stuff here}); However - I have to wait to run the client-side verification routine because I have to wait for a particular validation summary to be visible before processing any action - At this time, the first click will be revealed that there are no validation errors, because immediately after clicking, different verification divisions and spans are not shown, obviously because The initial phase of the page is clear from a user input and therefore no error. After the second and every time the Submit buttons, Divisions and Spaces appear and the logging process works - but it is almost useless because I handle this initial click And almost "wait" for the other stuff before I will continue. Is there a better way to do this? Can I share with anything other than "click", I need an incident almo...

asp.net - Free Record / Replay Web Testing Tool -

I have an asp.net application that is configured to run on my local IIS. Does anyone know any free record / re-run web testing tool so that I can test with the examples of pages 10 concurrent users? (I do not have access to Visual Studio Test / Final Edition to use my Web Testing Tool.) Thanks You can check the suit.

What/Any libary for cgi in C -

What are the use of Library C for C? Or should I be a man who can parse it on all of himself? (I am a bit afraid of overflow) See the following webpage:.

How to use jQuery.tmpl() plugin passing in just a string[], not an object -

I have a simple template, I am using a plug in (), and I just have an array of stars I pass in and set up my template to display those stars. I am using these beautiful passes in objects but if you are not passing in an object and only passing in the string, then I will find the syntax Or are unable to understand. Example: var years = {2011, 2012, 2013} $ .tmpl ('blah', year) .appendTo ("# somediv"); $ .template ('blah', & lt; div & gt; (this is where I want a string value) Then template for me. The correct syntax is actually {$ data} which will give value to the template item. / P> Some serious discoveries were finally found that it was unable to bury doctors with any examples.

linq - Query Object's elements in c# -

I have a problem when I try to get series results in Object C. I returned the Linq query object and I want to get all the elements in C # (server side) ... I can not do this and I know Why not! I tried: forech (var x in element) {string titolo = x.title.ToString (); } and dynamic floating = (dynamic) element; String titolo = temp.title.ToString (); and others .... I can see that the object type is: {System.Data.Objects. ObjectQuery & lt; & Lt; & Gt; F__AnonymousType26 & lt ;? Integer, string, string, bool, integer, system.linq.IQueryable & lt ;? & Lt; & Gt; F__AnonymousType25 & LT; String & gt; & Gt; & Gt; & Gt; } How can I get value of an object? Thanks a lot! If you are searching for properties related to an element, then you can do something like this: foreach (element in var item) {foreach (property in property. Gatetype) GetProperties ()} {// property.Name = property name // property.GetValue (...

oop - 2 elements in 1 v.add vector java -

For example, I'm calling a scanner from the user. Double Second = sc.nextDouble (); Double Multiplayer = sc.nextDouble (); V.add (second); V.add (multiplayer); And when I display vector output, these 2 inputs are displayed in 2 lines. Can these two elements be placed in the same vector? For example input second 5.0 input multiplayer is 1.4. The display will be vector: 5.0 1.4 Anyway, in the same vector 5.0 to make like 1.4? Please help: ( First, do not use Vector Use an ArrayList (see why this). list & lt; double & gt; v = new arrelist & lt ; Double & gt; (); v.add (5.0); v.add (1.4); toString () of the list Usage: From v.toString () to [5.0, 1.4] . As you can see that some "extra characters" , ] , , to delete them. You can replace replaceAll with [\\ [ \],] by calling . system.out.println (v.toString (). ReplaceAll ("[\\ [\\],]", "")); Using Loop: For (double e: v) sys...

javascript - Why does null keep coming back when getting nodeValue even though it displays properly? -

This is driving me crazy I'm going to insert code into a page via Ajax code after I put a Running a function to capture the text of the div and am displaying it on the page in another place. Can anyone tell me why I am saying a javascript error that current text is zero, even if the text is displayed properly in the second place in the page ?? var currentText = document.getElementById ("current-text"), updated text = Document.getElementById ("update-text-here"); UpdatedTextHere.innerHTML = currentText.firstChild.nodeValue; This is the code that is receiving text value, which is inserted through Ajax in the main page: How it looks: getDate = function {var currentText = document.getElementById (" Current -text "), updated text = document. GetElementById (" update-text-here "); UpdatedTextHere.innerHTML = currentText.firstChild.nodeValue; }, Htmlready = function () {myDiv.innerHTML = xmlRequest.responseText; get Date(); }, ...

JavaPos on Android Devices? -

I'm looking for a solution to print an app to POS printer from Android device and any kind of help is required. So am I right that Java POS is the right solution in this case? I found this example. So I think I have to use JavaScript to create a printer connection in some way and then send specific orders? Does anyone have any experience in doing this and can I get a little help in starting this? Thanks alot from the very first time! I do not think any printer companies have Java POS currently available for Android utilities. In my experience, it is best to use the API because you get total control over printer behavior without the complex nature of javaProze. If you do not have any experience with Java POS, then it is definitely easy to use the well-written printer manufacturer's custom API, although you go with support for that manufacturer's printer, this is not a bad thing. , Considering supporting a type of printer is much easier than supporting the pr...

video - Reliability of videoView in Android -

I have a problem when using a video view to play progressive streaming MP3 video. , The scene does not change accordingly and just hangs there. This is strange because the time of the video power is still going on, which means that the player is running. I test it on Android 2.2 device. Is this problem due to videoview? Thanks Since Android emulator plays. The video footage of MP3 and .3GPP format video and Android is not so good to play or to hang out any pixelate video, but if you try to play the same application on Android phones, without the video without picscletting and hanging Let me run the same problem with the emulator before, but when I run the code on Android phone it works very well

iphone - Does Apple allow the use of ad APIs other than its own? -

Will the applet allow an application that uses only 3 party ad APIs such as http: // code Google.com/ Mobile / Ads / Docs / iOS / Fundamentals to pass in your App Store? Yes, they do, many applications use non-IAD ads Moblix can also check. Edit: And yes, as W. Dyson says, you can maximize your revenue by using multiple networks at one go, so that you always have an advertisement (IAds filling rate is not 100%, so if you only use it, then You will not often leave an ad often). If you are watching some popular apps - like words with friends - you will see that they sometimes show an IAD, but sometimes (perhaps more often) they are non-IAD ads , or even show their own home ads about their other games.

java - getView from overloaded ArrayAdapter is not beeing called from AsyncTask / onPostExecute -

Hi My first post here is a little more advanced app for my Android phone a little earlier ... I know That this topic was mentioned here, Google knows many examples, although they are not fine, which are the visible formats; ( I agree that in the case of Android coding ... a few days ago, please forgive me :) The problem is that my list view is not populated The app compiles and runs without errors, but this lunch does not see get the food. What I have read on the web ... I need to display my sweet list view with my content ... Please help :) Package Com.test .stackParser; Public class StackParser extends activity activity {/ ** is called when activity first created * / personal progress DIOL PD; Crate on Public Zero (Bundle Saved Instantstate) {Super. Secret (Saved Instantstate); SetContentView (R.layout.main); // Last TextView TV = (TextView) Find VVBID (RIDTEXView1); //tv.setMovementMethod (new scrollingmountment); Button Button = (Button) Find VVBIID (R.B. button 1); Bu...

c - Internally capture/redirect stdout? -

It looks like a computing system 101 question, but I've been stumped. I am integrating existing code from Project A to C / C ++ Project A in my own project. Both A and B will be connected to an executable, threaded process. The use of printf is widely used for code A of the project A. That's fine, but I also want to capture that production in my buffers. Can printf calls be written once, can I read from studs? I can not process or pipe fork and my efforts for the choice () stdout, or dup () have not been successful (I am doing something wrong). You can use to change the descriptor. # include & lt; Stdio.h & gt; Main (int argc, char ** argv) {FILE * fp = freopen ("output.txt", "w", stdout); Printf ("hello \ n"); Fclose (fp); } If you run you will see printf output in output.print and nothing will go to your screen. Now you can open the file to read the data or you can bring it in your memory space and process it like this....