Posts

Showing posts from February, 2014

iPhone UItextField add image? -

I have to add a picture (PNG) to UITEPlayfield. Anyone have any ideas? Thank you! Balaz UITextField * myTextField = [[UITextField alloc] init ]; [MyTextField setRightViewMode: UITextFieldViewModeAlways]; MyTextField.rightView = [[UIImageView alloc] initWithImage: [UIImage imageNamed: @ "image.png"]];

html - Resizing content with the browser window -

I have a UK map as Flash / SDF movie. This map is embedded in a development tag and a left It is okay in 2 column layouts with columns, a header and a footer I want to change the size of the map when the browser is resizing by the user or I want to resize it as the height and height of the left column. In fact the map should follow the width of the browser / height or height on the left. How do i do this Many thanks to every cat's skin, there are many different ways, But at the very least you need to make sure that your SWF material container size is scales. If it is a fixed size, then all the stakes are closed. The real challenge is to do something in the left column in order to conform to the changes in the right column, especially when only using CSS and DIV I'm not sure that some unnatural and Is possible without complex gymnastics A simple, more direct, and possible old-school method is to use one table and two columns with just one row as your column structure. Fo...

asp.net - Show a message for few seconds and then reload the page -

Click on the button after successfully saving the record, I click on the "Save successfully" message on a single label on one page Thank you in advance You can add a meta refresh tag Are: & lt; Meta http-equiv = "Refresh" content = "5; url = SomeURL" & gt;

jquery - MediaWiki: getting content only -

Hi all, I am creating web applications with Python / Pilanes / jQuery and I implemented a help system, but there was no population. Each application "page" has a support link in the footer compared to opening a ColorBox popup with a special link, to populate it. I want to use MediaWiki to supply help content, but I do not want the full mediawiki interface, just page content I be able to edit help users of help systems, just see them In this way, I can create, edit and maintain those pages from MediaWiki and the page can be displayed in the colorbox popup. Does anyone know if this is possible, and if so, can you give me some hints or reference about going about it it would be great if the URL is colored box Sent to MediaWiki so that MediaWiki can be told to suppress the editing interface. In advance, Doug You should create a CSS style page (i.e. MediaWiki : ContentOnly CSS) which contains only content, sidebar, headers, footer, title, want to remove it set by de...

c# - Paging and Sorting Grid in ASP.NET MVC -

I am trying to apply the paging and sorting list in ASP.NET MVC without using the MVContrib grid or Javascript (Should be SEO friendly). I have created my action with the following actions: Actionless list (anti-page, string sort, string direction); I have problems though paging and working layoffs are both available. For example, say I have the following code: & lt;% = html.ActionLink ("title", "list", new {sort = "title", direction = "ASC "}) & Gt%; I expected this to generate a URL that contains all the existing root values ​​(including the current page), but it is not. So when you click on the link, the page is set to an empty space. I have seen all overloads for the ActionLink helper but nothing seems like it will help. What I need to do effectively is generating links with url / current page value (or potentially any other root value) and new types of parameters. I appreciate it if someone can help thank you. ...

c# - Aproaching singleton connection class -

नाम स्थान ए.वी.. कनेक्शन (संरक्षित वर्ग MyConnection) सुरक्षित कनेक्शन कनेक्शन सेटिंग्स सेटिंग्स {प्राप्त करें {return configurationManager.ConnectionStrings ["mySQLConnection" ]; }} संरक्षित DbConnection कनेक्शन {get new OdbcConnection (connectionSettings.ConnectionString); }} सुरक्षित DbCommand आदेश {get {return connection.CreateCommand ()); }} संरक्षित DbParameter पैरामीटर {get {return command.CreateParameter ()); }}}} मैं सिंगलटन क्लास बनाने की कोशिश कर रहा था जो कनेक्शन ऑब्जेक्ट्स के साथ-साथ अन्य संबंधित ऑब्जेक्ट्स भी वापस कर सकता था। उपरोक्त दृष्टिकोण मैंने सोचा था कि था। मुझे यकीन है कि मैं किसी तरह गलत हूँ कृपया बताइए कि कैसे? या यदि नहीं, तो इसके लिए सबसे अच्छा तरीका क्या है। यह सिंगलटन नहीं है .... मैं समझता हूं लेकिन मुझे लगता है कि मैं क्लास स्थिर घोषित नहीं कर सकता क्योंकि इसमें कनेक्शन शामिल हैं I इसलिए मैं वास्तव में इस स्थिति के बारे में उलझन में हूं। यह एक सिंगलटन नहीं है (जब तक कि इसे किसी फैक्टरी वर्ग इस वर्ग के केवल एक उदाहरण को बनाए रखने के...

sql server - SQL Date Compare by only using Date not Time -

It was a basic question of how to implement it because I was stuck in a certain part, but now I'm curious Why was this happening in the first place? I did not have to comprehend the time compared to the dates only, which is not a problem, if the bar is no different. The code below I was basically trying to select a worker involved in e tourist OT_Hours o o.Emp_ID = position P in internal position on e.Emp_ID. Position_ID = e.Position_ID Join the signup_sheet at S.Employee_ID = e.Emp_ID on these where E. Qualified_aut = 1 and s. Di_shift = 1 and p. Position_Name = 'controller' and convert (considered (20), Skdet, 101) = '07 / 26/2010 and convert (Worker (20), Okdet, 101) & lt; = '07/26/2010' and Convert (Worker (20), O.Det, 101) & gt; '07 / 26/200 9 'and Okdeta Diissi No option will not have any effect on me not by when I run the query, but when I put one out last In line, it returns 12 results (& lt; =) and when I had removed the la...

html - Floating left and parent height -

This is probably the first answer, but I have spent some time and can not find the correct answer. I have a parent's A in which two divs are B and c. Both B and C are left left, there is no height of C (increases w / text volume in it). Problem: Parents do not grow in AC size. I know that doing something with floating is not part of the normal document flow, but I do not know how to fix it (does not help determine the height of A because it depends on the height of C) . property add overflow: hidden div a

java - How to verify whether a record with certain field values exists in a DB with JPA? -

जेपीए के साथ मौजूद खंड को कैसे व्यक्त किया जाए? पहले (हम ओरेकल पर हैं और एक डुएल तालिका है): @Entity () @Table (नाम = "DUAL") @ReadOnly सार्वजनिक कक्षा दोहरी {@Id स्ट्रिंग डमी; सार्वजनिक स्ट्रिंग getDummy () {वापसी डमी; }} तब: मानदंडबिल्डर सीबी = em.getCriteriaBuilder (); CriteriaQuery & LT; दोहरी & gt; Cq = cb.createQuery (Dual.class); सबक्वेरी & LT; ProtokollSatz & gt; Sq = cq.subquery (ProtokollSatz.class); रूट के & lt; ProtokollSatz & gt; Root1 = sq.from (प्रोटोकॉल्स्त्स्। वर्ग); Sq.where (cb.and (cb.equal (root1। & Lt; पूर्णांक & gt; मिल ("फ़ील्ड 1"), पूर्णांक.वल्यूओफ़ (फ़ील्ड 1)), सीबी.एम्बल (रूट 1। & Lt; पूर्णांक & gt; मिल ("फ़ील्ड 2"), Integer.valueOf (field2)))); cq.where (cb.exists (वर्ग)); TypedQuery & LT; दोहरी & gt; क्वेरी = em.createQuery (cq); बूलियन ifExists = query.getResultList ()। आकार () & gt; 0; आप प्राप्त करते हैं: SELECT t0.DUMMY से दोहरी टी 0 जहां मौजूद है...

c# - Is it possible for the .NET WebBrowser control to use IE9? -

I know that this is an initial release and unstable. I do not dream of swapping the default webbrower control for IE9 in any other project, but in this case I especially need IE9 to compare it with other versions. I have to do this. NET WebBrowser uses IE9 instead of the default version of IE on the control machine. I have complete control over the machine, so there is no problem hacking system files or whatever can be done. Generally, this can be achieved by installing IE updates, but in the case of IE9, it installs a separate application, which keeps the current version of IE untouched. This means that the webbrowser control continues to use the current version (which makes sense and was a clever move by MS because IE 9 is still under development). But in my (edge) case I need to use Web 9 control to use IE 9. Is this one? Is it possible to embed IE9 in NET forms? Edit I'm moving a bit further. IE9's prod file is going to be very interesting within the direc...

php - Any idea why Wordpress's inCategorgy tag is not working? -

So I'm trying to add "-one" to a class for a post if it's in Wordpress Is in special category. As if I am seeing a post on which there is a category ID of 7, then I have to say that "example" in "Example-None" is a definite class of change. Here's my code: '? & Gt; " The strange thing is with the code, when I see all the posts in a specific category, it works in one page. But when I am in an internal category If the code is in a specific category, the code does not work. I am using the in_category ('7') tag to get it on a WordPress sidebar. Any thoughts on what I am doing wrong? I am surrounded by id The quotes will be removed from the category: in_category (7) This should be a number, not a string.

mysql - insert record if not exists in sql, duplicate column name -

I wanted a solution to insert a record, if it was not there, then I searched here and found a solution but I have Second problem Include in closed goals (Question_ID, subject_id) SELECT * from (SELECT 2, 2) where TMP exists (select the question from the close_resources WHERE Question_id = 2 and subject_id = 2) LIMIT 1 Output is # 1060 - Duplicate column name '2' If I If I use any 2 numbers I am not equal, this will work but the problem arises when it is 2 characters. The smallest change is to add nicknames in your selection statement to your SQL work: Insert in closed buttons (Question_ID, subject_id) SELECT * FROM ( SELECT 2 AS question_id, 2 AS subject_id) where AS TMP is not present (Select Question_ID closed_sessions from WHER E Question_ID = 2 and topic_id = 2) LIMIT 1 However if you have a unique barrier at (question_id, subject_id) , you can change the INSERT IGNORE : Sign in closed buttons (Question_ID, subject_id) value (2, 2)

php - Setting up a proxy server -

So I have a server set up (LAMP) server, this proxy has access to the internal network and give it to me For example, you should be able to call that proxy with a POST request with the correct parameter and the proxy should return the status of that post. Now we say that the post is being done in a php script (something.php) in the main folder of that proxy how can I access the world to use that proxy? I hope it is clear, sorry, I could not explain it very much but if you have any other questions for explanation, please tell me! To set up a reverse proxy with Apache, you must use mod_proxy With the mod_proxy_http you must use the proxy HTTP request is manual. There is a basic configuration directly from the manual: Proxy request closes Now when the proxy server receives the request for / Foo / whatever , it will download itself http://foo.example.com/bar/whatever and upload it back to the customer.

php - Explode datalist into array -

I've found a list of data in the following format: data \ ndata \ N data \ n data \ n data \ n now I $ array = explosion ("\ N", $ data list); What happens next is that there is no key with any data, I think it's finally \ n. Is there any way to explode it so that the last key was not set? Thank you! After you explode, use the last item to pop: $ array = explode ("\ n", $ dataList); Array_pop ($ array); If you can add by using a statement and if you want to see that there is something other than a lineback character in the last thing, but you should do what you need.

java - How to make a client/server game using Google App Engine -

I use my first client / server game as my last end (specification requirement) using Google Apps Engine I'm trying to 'tutorial' (java), but it all seems very browser-centric. Actually, I would like my app (Mobile, not this important): To log in with that account, No allow your Google account!) create. "Marco" button to send an account-identification request to the server. Receive "polo" feedback from the server Data (such as a JSON object, XML-DOM or similar), not in the form of a web page. Do any point to me a good tutorial / sample project / reading detailed To help me get this for myself? I'm pretty sure that, once I get that job, then I'll do everything else But I'm having a "stuck at the starting gate" problem, the basic account is not able to login, and non-HTML data exchange. Thanks! Unfortunately all my AppEngine knowledge is using its Python SDK but it should be translated into "Java...

How do I know that an Android app has been loaded for the first time? -

How can I find out, if an app is loaded for the first time after downloading, I mean when the app Is bought / downloaded from the market for the first time, how can I find out that this is the first time (has never been played on this phone) it is going to run, so can I remove some registration activity? Yes, I had thought of declaring a table which is checked to see if it has any lines or not. If the rows are then it was because it was loaded and we had inserted a row. But I want to avoid this, it has an API that can tell me that the user had used this app before. Android has an API to store preferences. In the context you shared a flag, read

.net - MSBuild 3.5 produces different IL than MSBuild 4 for the same code -

Can not compile a working dll to point to VS'08, though I basically said It was We have a piece of VB code which is compiled differently depending on which devices are used to compile. I have tried to compile this code on many different computers using Visual Studio '08, '10, and MSWલ્ડ 3.5 and 4.MsBuild 3.5 (which uses our build server ) And VS'08 always produce a broken DLL, while MSWilled 4 / VS'10 produces a working DLL. I compare the only difference (/ nodstdlib, / sdkpath, / langversion: 9) of the Vbc command line parameters between MSBuild 3.5 and 4 that all Vbc 4s seem to be related to compiling 3.5 compatible dll. The broken version, if throws an error to the code located inside the statement, then can not be the representative 'tap' for an example method. There is a snippet of the related code: Dim foldedList as folder = FolderManager.Instance.GetFoldersSorted (portalId) Dim list new list (FolderInventoryItem ) Folders.Values ​​i...

ajax - Any dedicated servers that serve up JSON? -

I'm looking to recover json from a dedicated server in my Ajax Monitor application to verify the client in server communication Will be used for. [edit] LOL! Even I can start to not answer this unclear question. Sorry was in the crowd asking questions. Reference: ajaxmonitor program wraps the JQuery.ajax function. This is a plug-in This monitor will be used to monitor AJAX communication between the client and the server. The first thing is that a jsonp request will be sent to a server so that the communication function between the client and a known good, trusted server (Google, MSN, Yahoo, or Government) can be verified. This way if the first ajax request errors do not apply to a server-side problem again. I hope this will improve my question. Amendment in reply after renewal of the question: I'm not sure Which kind of server will offer a JSON response that you can use .. I'm guessing any kind of free webmaster-over-jason thing should be talk abo...

android - MediaPlayer not playing sounds on DroidX -

I have some very simple sound applications on the Android Market that works on LG collaborator, Motorola Drodd and Nexus One But recently I received an e-mail from a user of Motorola Dododox, claiming that most of the voice does not work, I have exchanged some e-mail with him, claiming that the soundboard is the only application Is going on He checks twice to ensure that the media volume was not set to a minimum. I have been stumped in such a way that it will be okay on other phones, but not the DroidX I actually do not have access to one to play around for the application to run the sound is not doing anything cosmic down A code snippet may be due to the hanging, any insights is greatly appreciated. Public Zero Play (sample sample) {log. V (tag, "playing:" + getstring (sample.getButtonTextResId ()) "+" ("+ Sample.getSoundResId (+ +") "); If (mPlayer! = Null) {mPlayer.stop (); MPlayer.release (); } Media Player Player = Media PlayerCredit (this...

objective c - Using an object other than File's Owner for IBOutlets and IBActions -

I have a currently working program that owns IBotlotte and IBSection connection file from the interface. I created a new square, and said that in the document window in the interface builder. Then I took everything from file owner class files to new class files. I removed the old connection and added everything to the new object again. My program runs without any error information, however, after the program starts, it just exits. Why is it like this?

android - How to make real time log for incoming/outgoing/missed calls on phone -

How to make real-time call log? I want to create real time logs for incoming / outgoing / missed calls in my phone, but I am unable to do this because it is impossible to have a call running account. I am getting the last call in call history, but not running. Sorry, I may have replied late but the answer is easily found through googling Is: The keyword "CallLog.Calls" and w

Python - PHP Shared MySQL server connection info? -

I have some MySQL database server information that should be shared between a Python backend and a PHP frontend. I can always force it with a bunch of str.replace () calls, in the way the information can be read easily and in Python If there is no solution, or I only maintain two separate files, then it works, but if I can do it automatically it will be easy. I think it will be easy to store the variable in PHP format and directly converts into Python, and I know that Python modules exist for serializing and unserializing in PHP, but I have all of it Did not understand Any help is appreciated! Store the shared configuration in a plain text file, preferably in a standard format. You can consider yaml, ini, or json I am pretty sure both PHP and Python can read and parse all the three formats very little.

javascript - HTML 5 canvas font being ignored -

I am trying to write some text in a canvas element, but it seems that the font option which I completely I am doing defamation. It does not matter how I change them, it all goes out, which I believe is 10px sans-serif default. I have (this function runs on load) start the function () {canvas = document.getElementById ('c'); Ctx = canvas.getContext ('2d'); Ctx.fillStyle = "white"; Ctx.font = "12px monospace"; Ctx.textBaseline = "top"; } It does not work in Firefox or Chrome. It may also be that if you reset the canvas size at least, Today is seen in Chrome 23. context.font = 'bold 20px arial'; Canvas Wide = 100; Canvas Heights = 100; Console.log (context.font); // '10px sans-serif'

Any hierarchical Data Support in Doctrine 2? -

In principle 1, I think it supports sequential data support? Is there anybody in principle 2? UPDATE 1 OK, so I used to experiment. I have some questions insert one node // $ 1 in the document; new1 (new) square; $ Child 1- & gt; Name = 'child category 1'; $ Child2 = new square (); $ Child2- & gt; Name = 'child category 2'; $ Range & gt; AddChild ($ child1); $ Range & gt; AddChild ($ child2); It seems to me that $ root = $ nsm-> Make something like Root ($ category); $ Root- & gt; AddChild ($ child1); $ Root- & gt; AddChild ($ child2); Similarly, to add sub children $ child2wrapper = $ root- & gt; Add Chald ($ child2); $ Child2wrapper- & gt; AddChild ($ newChild); There are more trees except 2 root areas. Say I want many trees, I see that the extension does not populate my root field? You can view this link:

language agnostic - How is it possible for Boruvka's algorithm's complexity to be O(E*logV)? -

1 An associated graph begins with G in which there are different weight edges, and one of the edges is empty Set T2 is different from the corner of the G while connected by T: Start with an empty set of 3 edges. E for each component: start with an empty set of 5 edges: for each head in 6 components : 7 Add the best edge from the top to the component S8 in a separate component in the second Add the top edge from S to the fastest edge in E9, set the edges to 10 by E. As a result of the edges, set T is the least spaced tree. From Wikipedia, I think the external loop is logavi because you are joining the set. But then the inner loop comes. If you use affinity relationships to keep track of sets, this means that you are only getting the elements representing the set, so you can not set the edge to the smallest The weight between the two sets because you do not have all the elements. If you modify the structure to keep the references of children, then you should still get all the c...

Editing prompt in javascript -

In my web application, I have a page with many input values, and want to confirm that the user wants to leave it The page tries to leave the user with unsaved notifications without saving (like prompting to exit Microsoft Word with unsaved changes on the document). I would like to display a custom message that "You have made changes that have not been saved. Do you really want to leave the page?" How can I go about doing this? You change Events on Inputs This event is not bubble, so you have to attach it individually to each input, then you need to use the window object's beforeunload event to signal the user Will be. & lt; Script type = "text / javascript" & gt; Var anythingEdited = false; Function input changed () {anythingEdited = true; } Window.onbeforeunload = function (evt) {if (anythingEdited) {evt = evt ||.} Window.event; Evt.returnValue = "You have edited something. If you click OK, your changes will be lost."; }}; ...

html - integrating a new component in an old website? -

I have an old website and I have been asked to apply a small platform to display in a specific website block . I have implemented this forum with Drupal and now I need to integrate it into the old website. I was wondering how to integrate it: Do I just make 1 to 1 copy of the old website page and add Drupal Forum Or should I use an iframe to include my Drupal work in the original old page? What is the best way I'm not sure that old website and new droplet installation is going to be stored on the same server. Thanks But this is just one advice, in order to give an appropriate answer, I will need to know more about my old site - what is this technique is using etc. It is also possible that in Drupal it is possible to reduce redundancy rather than copy the main site's navigation.

java - Using the Eclipse AST -

I recently came across a need to modify some Java code (adding methods, changing signatures of certain areas and methods Removal) and I think that all this may be accomplished, though the use of AST using Eclipse SDK. I know from some research that how a parse is done in a source file, but I do not know what I mentioned above. Does anyone know a good tutorial or can someone give me a brief explanation about how to solve this issue? Thank you very much, Extreme Coder Edit: I now have JavaScript I have started to see more and I think it can be very easy to use, but I do not know the existing documents can be loaded in it. text "> I will not post the whole source code here because it is quite long but I I will start. Also the document you need here: Document document = new document ("import java.util.List; \ n \ n class X \ n {\ n \ n \ tpublic void deleteme ( ) \ N \ t {\ n \ t} \ n \ n} \ n "); ASPPers parser = ASTPerser.NEPper (AST.J...

c# - Silverlight. Bind style items to datacontext -

I have a custom style button and I want to paste the style item into the button datacontext. How to do this? My attempts: & lt; UserControl.Resources & gt; & Lt; Style x: Key = "ButtonStyle1" TargetType = "Button" & gt; & Lt; Setter Estates = "Template" & gt; & Lt; Setter.Value & gt; & Lt; ControlTemplate TargetType = "Button" & gt; & Lt; Grid & gt; & Lt; TextBlock TextWrapping = "wrap" text = "{binding reference text}" datacontax = "{TemplateBinding DataContext}" /> & Lt; / Grid & gt; & Lt; / ControlTemplate & gt; & Lt; /Setter.Value> & Lt; / Setter & gt; & Lt; / Style & gt; & Lt; /UserControl.Resources> & Lt; Grid X: Name = "Layouts" background = "White" & gt; & Lt; Button content = "button" height = "131" width = "103" horizontal alignment = ...

Is it possible to do replication of only one table with different mysql databases in different hosts? -

I am trying to replicate a table in a remote host in my database Suppose that a change in the remote database Has come and I want to be committed or duplicated for my database so that it can maintain it with the latest updates without any dumps, cron scripts or something similar. Is there a way to copy a table into a table in a table inside the database in a host, which I am working on? By the way, I am using mysql database in both a freebased based system. A possible solution is the FEDRated engine (Possibly with the event scheduler to update your local table)

scala - Type inference question using Scalaz.ListW.<^> -

I was playing around, its definition is as follows: def & lt; ^ & Gt; [B: Zero] (F: Noneptist [A] = & gt; B): B = value Match {Case Neal = & gt; ∅ Case H: T = & gt; F. (Scalaz.nel (h, t))} I do not know how to select option as zero Type this example for scala> Case class CC (V: int) defined square cc scale & gt; List [CC] = List (CC (2), CC (5), CC (1)) Pre> So now I have a list of these things. The goal is to get the option [CC] for at least Poisson , where I get any none if none is zero Less than and equal to max. scala & gt; Import scalaz._; Import Scalaz._ Import scalaz._ Import Scalaz._ scala & gt; Built-in valid ccdor = new order [cc] {| Def order (v1: cc, v2: cc) = order by ((v: cc) => v.v) .order (v1, v2) | } CCOD: java.lang.Object scalaz.Order [CC] = $ anon $ 1 @ 1e48d65 scale & gt; Posns.filter (_. V option exactly zero type I Wanted! Can anyone explain that how does option choose? List...

c# - How to check for existence of an element with XElement? -

Information in this code Before I select it, I am trying to check the existence of the rdfs: range element. I do this to avoid the possible tap reference exception at runtime Private Readonly XNamespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax- Ns # "; Private Redoni XNamespace rdfs = "http://www.w3.org/2000/01/rdf-schema#"; Private readonly exhibit otology; Public listing & lt; MetaProperty & gt; Metaportiques {Receive (Select the new Metapapti with P. Elements (RdF + "Property" in Otolology} {About = P. Feature (About "RDF +"). Value, Name = P. Element (RDFS + "Labels) ") Value, range = p.Elements (rdfs +" range "). Calculation () == 1? P.Element (rdfs +" range "). Attribute (Rdf +" resource "). Value: null}}. ToList ();}} This is kind of annoying to me, what I really want to do is something like this: p.HasElements ( Rdfs + "range")? Property (rdfs + "ray Value (...

python - Getting BeautifulSoup to catch tags in a non-case-sensitive way -

I want to capture some tags with beautifulapps: some & lt; P & gt; tag, & lt; Title & gt; tag, some & lt; Meta & gt; tag but I want to catch them regardless of their case; I know that some sites do meta like this: & lt; Meta & gt; and I want to be able to catch it. I saw that Sundersoop is case sensitive by default, how can I catch these tags in a non-case-sensitive manner? You can use what should match case-insensitive: Import beautiful suits html = '' '& lt; Html & gt; & Lt; Top & gt; & Lt; Meta name = "description" content = "free web tutorial on html, css, xml" /> & Lt; Meta name = "keyword" content = "HTML, CSS, XML" /> & Lt; Title & gt; Test & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; / Body & gt; Result: & lt; Meta Name = "Details" Content = "Free Web Tutoria...

Fortran assignment on declaration and SAVE attribute gotcha -

In Fortran 95, if you specify a variable on the declaration integer :: Var = 0 this is equal to integer, save :: var = 0 and so the variable Is protected after routine execution (C code has constant ) and it is not restarted when it is called again. (IMHO Dangerous) What is the logic behind the behavior / technical problem? I do not think there is some logic behind such behavior. But as far as I know, Stepheno, you used the wrong terminology. integer :: var = 0 type declaration & amp; Initial integer :: var! Type declaration var = 0! Assignment It seems that this was just a committee design decision if we have such an expression (type declaration statement in parallelism), then this is not an initial assignment. And the initial program only happens once during the program (and processes) not executable. However, there may be some historical reasons for such a decision. Take a look at the thread. Today such behavior is dangerous because many oth...

iphone - How can I break the "navigation stack" in a Cocoa Touch App? -

I am currently trying to create a navigation based application, pushing ideas to change the screen content . I'm trying to set a button that can allow me to "restart" from the first screen, but I can not figure out one way to do this. If I had the first scene "push", there would be a "back" button, and I would just have another piece on the scene stack. In fact, I want to start that stack again. Is this possible? (Am I clear? English is not my first language :)) 1 to navigate in view For the navigation stack (i.e. for the root controller) you can do just one call with: [self.navigationController popToRootViewControllerAnimated: Yes]; If you also want to change the root controller, then I think you can do that setViewControllers: animated: method

json - Validating input with jQuery autocomplete plugin -

I am using the standard Autocomplete plugin. I have my text, two text boxes on the item name and item ID. The idea is that I want to find the item by name to the user, but to actually submit it on the form, the wanted. I am refunding JSO with an ASP.NET MVC action which is Autocomplete. The user starts typing the name of the item, the autocomplete list appears and the Jason object is formatted to show the name of the item. Users can then click on a name from the list and item IDs will come in another text box (which will actually be the hidden field when everything is working). Then I can check that there is a value in this second textbox before submitting the form. Everything works great in the above scenario but I have two big bugs in such a large number: 1) The user actually returns the result function To click on the item for the list in the fire. Therefore, if an item is Apple , and the user simply writes Apple in the text box, the item ID is not populated. 2)...

asp.net - How to call javascript function of child page from master page javascript -

I am writing an asp.net application I am using this master page in I have many There are children, which includes some java script functions; We say; function childpage function () {// do something; } and master page as the Java Script function; function masterpage function () {// ChildPage function is required to call; Here} Is it possible to call the childpage function () from the masterpage function ()? If someone knows how to do this, please help me. thank you in advanced. Yes. Simply childpage function () on the masterpage; Call and it will fire. function masterpage function () {childpage function (); // This will work fine} It works in another way, so that you can call masterpiece function () from your child's page and also Eirere This is because, when provided, html of each master page and child page is added, so both pages share the same javascript. MasterPage is a template that wraps around your content page.

push - Git Reverting a big PUSHed file -

I accidentally added a grip repository (git add *) to a large file (200+ MB). I commit the changes and push it. When I tried to make a change on some other transcript, it was taking too long. I canceled the bridge, removed the file (git rm file), committed, and pushed again. So, how to remove it completely from the main repo? Thank you, Imran The object is still in repo, and remotes this object Trying to download while dragging. This object should help remove from the history of the repo.

java - Skipping a nested <a4j:region> -

I have JSF file with a large format, form has 3 parts: user data (set audit calendars and data) Input), user items (a small table with a data table and some input and a button that adds a new entry based on the information given in the small table), the other (something like user data). I have a large and every part nested (because I want to validate it by pressing the "add item" button for example). But when I press the "Register" button which should handle the whole form of the form (all 3 parts) is a way of leaving a nested? Because when entering a new user I do not really need to validate the field in the data table, which is used to add new items. So basically something like this is done: & lt; H: form & gt; & Lt; A4j: area & gt; & Lt; A4j: area & gt; & Lt; / A4j: area & gt; & Lt; A4j: area id = "skipMe" & gt; & Lt; / A4j: area & gt; & Lt; A4j: area & gt; & Lt; / A4j: area & gt; ...

sql - MySQL: hourly average value -

I have a 'timestamp' column and a 'value' column where the value is approximately 3 seconds. / P> I am trying to return a table whose daily average value is So, there is something I'm looking for. | Timestamp | Average | | 2010-06-02 | 456.6 | | 2010-06-03 | 58 9.4 | | 2010-06-04 | 268.5 | Etc ... Any help on this will be highly appreciated. DATE (timestamp) by the table group from SELECT DATE (timestamp), AGG (value) Since you want days instead of every timestamp

deployment - Is there a better way to deploy web applications using Visual Studio 2010? -

I am using Visual Studio 2010 and IIS 7.0. Currently when I want to apply a website to my web server, I follow these steps - Right-click on the website and publish it. Copy the entire site to a local folder Ask to do 2. Only the files copied using the next filezilla should be sent to the web server. The problem is that I have to deploy the entire website at all times, since I can not keep track of the changes. Although I find my way easier and without problems I do not want to be fully configurable and deployment package, unless it really is not worth it and it is not easy to do, is there a better way of deploying me? Any suggestion would be appreciated! You can use the web deployment tool, it also needs to be installed on the webserver and even so That the idea of ​​publishing a SQL Server database can also be done. Do not use the Web Platform Installer to install this package.

.net - Detect laptop lid closure and opening -

Is it possible to find out when the laptop lid open or closed? It is not possible to read what I have read, but before that I have got help with impossible. Whatever I've found can be in the right direction is one. Is OS possible to call them "sniff"? I am VB I am using Net, but will take suggestions in any language. Thank you for your time and advice. In Edit : My software will eventually override the actions (based on user preference), when stops the lid, then listen to suspend and other actions which generally Forms when the lid closes is not an option. full working C # code for WPF application that shows how the lid to open / close To hear the events: Using the system; Using System.Diagnostics; Using System.Runtime.InteropServices; Using System.Windows; Using System.Windows.Interop; Namespace WpfApplication1 {/// & lt; Summary & gt; /// MainWindow.xaml for Interaction Logic /// & lt; / Summary & gt; Public partial class main window: ...

date_select tag doesn't get stored in my rails app -

I'm trying to select the user's birthday: & lt ;% Form_for: user ,: url = & gt; Users_path do F | | & Gt%; & Lt;% = f.date_select: Birthday, start_year = & gt; 2010,: &_ur => 1920, DISCARD_DE = & gt; True% & gt; & Lt;% end% & gt; The problem is that it has not been saved ... The user has a date of birthdate in the table and I call to save it @ User = user.new (param [user]) @ user b ave What could be the problem? Thanks Macketty The problem is that the day you choose Leave it See the HTML code of date_select tag. You will get clues from there.

Automated SQL Server Unit Testing -

I know how to automate the SQL server "unit test". But my question is a bit different. While validating the requirements, we write a series of SQL scripts that do not return anything successfully then basically like this Execute the query Perform another query Run SSIS Package Run Query. Example with a little more context Required # 1 Description: Then show my problem Questions to check if the goal Run the ETL SSIS package Check the query that the data is correct Questions to insist on business rules Let us query SQL queries Writing a custom program to run, to load essential data, to run SSIS package has found a way to automate this process, etc. And then if we have a result (which shows test failure) It's changing like a wheel ... but I'm not getting anything like this. Particularly one who integrates with SSIS. Edit: Someone has suggested that SSISunit does not have any documentation on it. If we wanted to use the SSIS unit th...

How to download Android SDK data without the manager (because it freezes) -

When I try to run SDK Setup.exe in my SDK folder, then it OK will open Then I get an error to fetch, so I change https to http and download (try) and go ahead. It usually hangs about 2% and it will not last 10% so far, I have tried to restart it at least 10 times. Can I ignore this program anyway and just download files from my browser? Is there any way to make this program work properly? The Eclipse plugin also does the same thing, although I had about 50% progress with it. Why is this happening? I was able to work in windows by restarting my computer to networking safely. Doing this allows me to successfully install things through eclipse via eclipse.

javascript - Delay window open on click with JQuery -

Here's an example page: I'm trying to open a window when clicking a link Is done, but delays the popup so that a message is displayed before the popup occurs. As you can see from the example window Open is not on the click, but on the fade, it triggers a popup blocker because it is not being triggered by user click input. Is it possible to move the window. Open and delay it so that when the link is clicked, the window Open and the model message is closed at the same time, but window. Open 5 seconds delay so that it does not popup blocker trigger? Thanks! setTimeout (function () {// window.open call}), 5000); This will not be exactly 5 seconds, depending on the browser, how busy it is. But enough of your .click fn. Put in

c# - Entity Framework 4.0 - Get By ID Using Generics and Reflection -

I generic and property will be able to load a unit ID using reflection, but this work is that it is uncertain How to Complete Entity Framework 4.0 I have a method in my abstract pattern such as: public abstract T GetById (object ID, Test Contact reference); Currently, since it is the essence, I have made this method that I every made in a repository class: public override Testobset GetById (object) ID, Test Contact reference) {return context. TestObject.First (x = & gt; x.TestId == (int) ID); } Is this essence a way to use reflection and generic in my abstract class? This is a VB example I use. My keys are all GUIDs, but you can probably customize this. public shared function GetKeyPropertyName (ByVal TypeName As String) As String Dim props = Type.GetType (TypeName) dim each Prop props Atts = prop.GetCustomAttributes ( True) for each att .getProperties Atts is typeof (att) EdmScalarPropertyAttribute so then DirectCast (att, EdmScalarPropertyAttribute) .Ent...

How does HTTP 302 work? -

कैसे HTTP 302 काम करता है? मैं आंतरिक जानना चाहूंगा आप मतलब हैं कि ब्राउज़र इसे कैसे संभालते हैं? सर्वर 302 कोड को स्थान शीर्ष लेख के साथ भेजता है, और ब्राउज़र इसके बजाय स्थान शीर्षलेख द्वारा निर्दिष्ट नए यूआरआई का अनुरोध करता है। 301 (स्थायी रूप से मूव किया हुआ) के विपरीत, ब्राउज़र, मूल यूआरआई का अनुरोध करने के लिए जारी रहता है, अगर 302 कोड दूर हो जाता है

java - Swing: Steal focus from other apps (usability in OS X) -

I have an application in java swing that runs most of the time in the system tray. Users can use the tray menu to do a number of tasks. One of those tasks is to show an app window. I have the issue with the applicability on OS X. In the window , if the user brings an app window and switches to another app later, they can go back to their application Taskbar using. But in OS X, the app runs in a mode in which the app does not have a menu and it will not appear in the command + tab list. __LSUIElement info.plist file back until you click on the window (which may be behind many other windows). The simplest way is that the user will have to open the window again using the tray icon, but since the window is already open, I am unable to bring it. So, how can I focus away from other applications and bring my window to the front? Edit: My issue is running as an agent '/ strong>. I have to work already. I have this issue when I have received ...

Ext GWT change ContentPanel background color on mouseover -

In my page I have a GCC content panel with a white background. However, when the user mews at the header of the content page, I would like to change the background color. I tried to get it by using the protected addStyleOnOver method of the GXT component, but there is no effect in it. Do I need to use some more methods (I'm already drowning ONMOUSEOVER and ONMOUSEOUT events), or is there a better way to change the background? You can do it below your work ContentPanel contentPanel = New ContentPanel (); ContentPanel.setStyleName ("background"); and enter the code in your CSS . Background: Hover .x-panel-body {background-color: red! Important;}

javascript - Should I combine .css files with php to reduce http requests? -

I was thinking today, as I have 3 web pages out of 3. CSS files are added: "These are too many HTTP requests!" I wonder if I should use php to combine these files into one? Or do I just send three to & lt; Head & gt; with & lt; Style & gt; Import into tag? I have found a relevant link on the interwabus: But I do not think it gives enough discussion. Note: I am also tagging this for Javascript because I believe this also applies to .js files, please note that your answer only applies to CSS or Javascript I think this is not necessary. The browser will download both files only once. If you add them to the style tag on the page, then it will have to download the same content that is loaded on this page. Unless you have access to a lot of pages per page / site, you will not need it. That's what I think ...

combining git and monotone -

I need to work with a monoton repository. I though change git and my changes to privacy (like Git-svn ) are used in search of the way. According to I can import Monoton repo in Git. But do you know some good way to push my changes by changing GIT once in a while? The first method is to keep the internal information in the monoton directory taken to mix the guit and monotonous _MTN . First of all, I checked the original monoton repository. After that I run git init in the new directory and imported all the files. So I had a directory which is under a rhythm and GIT. I have a branch in GIT which is a pulling branch. This means that only the original changes are imported from the monoton repository. Apart from this, there are some other branches where I develop changes. In general, this is another dirty solution. Recently I came. It does what I wanted in the description from: Transfer changes between version control systems Tailor tool makes patch and changes possibl...

c# - Is there a way to open the Bing Maps App on Windows Phone 7 to a specific location? -

The built-in emulator does not have the Bing application installed, and I do not have any phones to test with hardware So I'm just wondering how can I open a Bing Maps application for a specific lat / long? Related Questions: iPhone - Android Unfortunately, there is no way to launch the Bing Maps app from your own app. > There was a way in an early CTP but it has been removed. Hopefully this will come back in the future but it is not on any existing, public, roadmap. This leaves two options. Option 1 Search app you want to show latitude / long is integrated directly with the Bing Map app, assuming that Bing can bring you / take you back and return something useful Even then, the user will still be able to wish whatever he wishes inside the bing map app. Although there are 2 Downsides in it first, you have no control over the search results. And, secondly, you can not test it on the emulator. Option 2 You can use within your own lightweight application of ...

iconv - Can php convert strings with all charset encodes to utf8 -

Can php convert strings with all charset encodes for utf8? Solution that does not work: utf8_encode ($ string) - but its only an IOS-8859-1 String UTF-8? iconv ($ incharset, $ outcharset, $ text) - But how can string find current encoding? (Only when string part of html dom document, not just string) thanks > It is possible to convert a string in UTF-8 to PHP in any iconv () in any encoding. But how can this find string current encoding? You do not need to "search" the current encoding: Your script should always know how it is If any resource asks you, if Is encoded properly, will give you its encoding in its content-type title or other ways. As Artefacto says, there is a possibility of using mb_detect_encoding () but this is not a trusted way, the data flow of the program should always define what encoding in the string (And preferably internally working with UTF-8) - this is the way to go

php: difference between to isset methods? -

Not sure how to name the postal title I have a submission on my page The button is creating a folder for me as soon as I press it the site automatically refreshes. There is no script set in my document that says that the page should be refreshed. It only happens when I submit anything, right? if (isset ($ _ POST ['createDir'])) {$ dir = $ _POST ['dirname']; $ Targetfilename = PATH '/' $ Dir; If (! Is_dir ($ targetfilename)) {mkdir ($ targetfilename); Chmod ($ targetfilename, 0777); } Else {echo "folder exists!"; }} A little more down in my script is the only thing to delete files and folders. if (isset ($ _ POST ['deleteBtn'])) {Chmod (path, 0777); Foreign currency ($ _POST ['deleted mills'] as $ value) {unlink (path. '/'. $ Value); } Echo "& lt; Meta HTTP-EQUIV = fresh CONTENT = '0'>"; // does not work without it! } If I click on the submit button to delete a folder, the page does not ...

python - Handling missing packages or DLLs in a PyQt app -

What is a good way to handle fatal errors - missing packages, .ui files are not compiled, QT DLL or shared object Have not met, etc. - in PyQt app (or other python app)? Displaying a cross-platform message box without the QT DLL or shared objects looks a lot like a dumping message in the console does not seem very useful, because the end user will not see the console. How do other python applications handle it? Or do they believe that properly installed app will not run into these problems? Distilts model operates correctly installing a python application, or a third party setuptools Package is also easy for end users.

Is it possible to adjust mouse wheel scroll distance on a WPF ScrollViewer? -

I think it's scrolling at a time when the mouse scroll wheel is used, I have a very The low ScrollViewer (one row long) which contains some lines items in WrapPanel , and it is scrolling in the bottom right of a "tick" that the middle line never appears Not giving up. Not a solution, but you can add some pan with TNTT - one panel per line The ScrollViewer class uses the IScrollInfo interface and has 2 methods. ((IScrollInfo myPanel) .LineUp (); // and LineDown () Add and method for the UIIlation. Mousevelged event and a rotation == One child of a panel or you can use it myScrollviewer .ScrollToVerticalOffset (offset);

How to deploy a castlerock monorail web application -

How can I get a release build (equivalent to published on an ASP.Net Web app), which is for a CatLock monorail web app. ? I tried to publish but it only copies the bin and amp; Content folder and default .aspx, Global.asax, & amp; Web.Config files do not even copy it from the View folder.

c# - Is there a way to ask about the status of a drag operation while it is in progress? -

I know that when a drag / drop operation is complete, after receiving the mouseup or ASK key event, This gives an NAM indicates what happened (move, copy, none, etc.) My question is this: is there a way to return status information to the situation / control, which started drag event, while Running? The use case is as follows (Visual Studio-ASK Layout Manager for all of this): I am writing a layout / window management component which allows to draw areas of layout around. I use a transparent form to paint a semi-transparent overlay which depends on where the mouse is dragging, a preview preview overlay that appears when dragging windows in Visual Studio. Another motivation is that the processing of the serialization process is relatively intensive, and I would not like to do this if dragging is to occur within the same process / window. Therefore, if there is a real "drop" in any other way, then it was only a method of serializing, which would probably make all the ...

c# - Is it possible to use Windows 7 Task scheduler in own application -

I'm developing an add-on based application Each add-on usage scheduler loaded add-ons schedule tasks my application Sometimes the application closes for running only one instance, sometimes running so I need to use the Windows 7 Task Scheduler How to use the Task Scheduler on your application? I need to create a new job from the application I need that when the work is finished, send a message to my application or invite any of my application's work Is it possible? How to do this?

delphi - Embed Image to Outlook using extended mapi functions -

I have to preview the email before embedding images in the email and sending it to Outlook. CDO and redemption is not an option. I have tried the following code, but the images only appear in the form of a small block Add processTouch (full filename: string; Attachment: Outlook 2000 Attachment; cid: string); Const PR_ATTACH_CONTENT_ID = $ 3712001 E; PR_ATTACH_CONTENT_ID_W = $ 3712001F; // Unicode PR_ATTACH_MIME_TAG = $ 370E001E; PR_ATTACH_ENCODING = $ 37020102; Var IAttach: IMAPIProp; Prop: PSPropValue; Attachment: Outlook 2000. Attachment; Filename: string; Suppose: TSPProl value; Prop. 1: Tasptopagare; Start filename: = ExtractFileName (FullFileName); Prop: = zero; Attempt: Try Attachments. Add (FullFileName, olByValue, 1, FileName); IAttach: = AAttachment.MAPIOBJECT as IMAPIProp; If assigned (IAttach) try PropValue.ulPropTag: = PR_ATTACH_MIME_TAG; PropValue.Value.lpszA: = 'Image / JPEG'; HRSetAnPap (IAttach, @PropValue); PropValue.ulPropTag: = PR_ATTACH_CONTENT_ID; ...

osx - Refreshing NSTableView in inactive NSWindow -

I have an application with a primary window and a floating window with tableview I when I use the temporary window in the primary window Which makes the temporary window disable or no keys), the tableview does not show new data despite the data reloading: On table view. I also tried to refresh the floating window (because the tableview is included in the following) (without success): [[Window content view] SetNews Display: Yes]; So, the question is basically refreshing the table view in a window that is not the largest window, if you disable it. Thank you! Without code we can only guess ... I guess the data that you see in the main window It can not be the same as floating window (it can be a copy for example). Just a guess ...

open basedir - Anyway to create a php sandbox for a user to develop in? -

A user and I am developing a new web app on my site. The ID is like creating a folder which we can work without fear that it can read outside of that folder, possibly reading the config file etc. Is there a way to create a sandboxed area that keeps the user out of that folder - still keeping the rest of the site in the same place? Approximately one open_baseer for that folder It may be better to create separate Apache vhost that working in a folder means that it should have an account for the folder in all your links. To work for your sandbox, you need to make a link: This is not a big deal, but it Definitely a pain. / P> To go further, it may be easier to create a new VM to work for it.

wpf - Panel.ZIndex is not working on the two different Grids -

Objective: When the mouse over a button is over, the height of the button should be doubled and the button is displayed at the top Control in the 'N' number of the screen can be present in other control panels. I am VS 2010, I have a main grid with 2 rows. Each row has 2 grids, each grid has buttons, for example grid 1 has yellow color buttons, grid 2 has blue buttons, I have written the following style for the button. style target type = "{x: type button}" & gt; & Lt; Style.Triggers & gt; & Lt; Trigger Property = "Ismouth Over" Value = "True" & gt; & Lt; Setter Property = "RenderTransform" & gt; & Lt; Setter.Value & gt; & Lt; ScaleTransform ScaleX = "1" scale Y = "2" /> & Lt; /Setter.Value> & Lt; / Setter & gt; & Lt; Setter Property = "Render TransformAgren" value = "0.5.0.5" /> & Lt; Setter property = "Panel.ZIndex...

iPhone SDK: UISearchBar: searchBarTextDidEndEditing not firing -

I am implementing a search bar on my table, which should be quite straight forward. I have found this: - (zero) searchBarTextDidBeginEditing: (UISearchBar *) Searchbar {NSLog (@ "searchBarTextDidBeginEditing"); } - (zero) search bar: (UISearchBar *) Searchbar textde change: (NSString *) search text {nslog (@ "search text:% @", search text); } - (Zero) SearchbarIDIDIDING: (UISearchBar *) Searchbar {NSLOG (@ "SearchbarItadTeading"); [The resignation of the first responder]; } and searchBarTextDidBegin fire edit, and I get the message in my logs, but when I tap outside the search bar, I do not find the search BartextDidEndEditing Event I'm missing the keyboard - The message does not even appear in the log The textDidChange is working, so it is not just Search BarTextDidBeginEditing. Any thoughts? Thanks! Even I had to face the same problem. Please use the following methods Apply methods below 1.searchBarTextDidEndEditing # 2.sear...

Magento models: how to get data from an array, rather than a database? -

Usually, Magento's models are "backed" by a MySQL database - this is where the data comes , And it's up to. How do I get data from a standard PHP array? Is there any sample code available anywhere? (I am particularly interested in the "reading" aspect at this time, but it will be useful to know how to "write".) If you save from a model and save it to your resource model, $ this-> _getResource () - & gt; Startup management (); $ DataCommited = false; {$ This-> Try _beforeSave (); If ($ this-> _dataSaveAllowed) {$ this- & gt; _getResource () - & gt; Save ($ this); $ This- & gt; _afterSave (); The method in this resource is $ this-> _getWriteAdapter (); from which you can call many SQL methods

objective c - Draw a transparent box on the iPhone -

How do you create a transparent box for PDF viewer that shows page numbers? You can create plain view (or UILBL) with text, then view.layer .cornerRadius and view.backgroundColor and view.alpha for your choice.

database - Over Web Service, Update A Table From Another Same Table Which Is In Different Location -

I have two separate databases, one of them is the original database and the second cache database. This database is in a different location. In one day, I have to update the cache database from the original database and this update should have progress with the web service I'm working on the original website machine. I can clear all the cache DB tables and insert basic data in each progress. But I think there is a bad scenario. So how can I progress with this efficiency? And you have a suggestion. I'm pretty sure there are DB synchronization techniques, but because you already have the requirement, I recommend using a change-log Therefore, you have a "CHANGE_LOG" table on which you insert rows while doing "write" on your table (INSERT, UPDATE, DELETE) We do. In one day, you can apply these changes one by one to Cash DB. After deleting a change, it is ok to delete the log-off, but you can also provide "version" in DBS. Therefore, e...