Posts

Showing posts from September, 2011

Rails 2.3: Immediately redirect before after_filter executes -

This is in Rails 2.3.10 and Ruby 1.8. I have some code that looks almost like this: class redirection controller after_filter: do_something_long ,: only => [: Show] Df show redirect_to "http://www.google.com" end DEF do_something_long sleep 60 logger.debug ("completed some time ago") and end now My problem is that even though I see in the log that the redirection has been executed, it actually waits until the completion of sleep 60 before it is redirected. Is there a way to redo the redirects sent to the browser and then run do_something_long. As a side note, I am trying to avoid delaying something like work or rick. Like a while - this is a long way since the user does not wait to complete it Is designed to start and complete background tasks (and freeze the UI) for how long the work is taking? If it is completed in milliseconds then most people will not even get the notice, but if you get too late then you should be excited when digging. Do you...

jQuery Loading external content in Div, link problem -

I have loaded content from an external site into jQuery in a div, but when I have a link in the loaded content Clicking opens it as your page, is there a way to restrict the link to open the page, it is still contained in the device? The way I think is to set the "href" entry of all the links to "#" The only way to find out the code below. $ ("# div"). ("A"). Attr ("href", "#") Hope this is useful!

ios - Cocos2d sprites not working on device -

My game works well in the simulator but there are problems with sprites on the device, so a line will return an error like this: img = [CCSprite spriteWithSpriteFrameName: @ "img.png"]; then: Failure in - [CCSprite initWithTestructure: rect:], / user / new user / document / uni / lbs / cocos 2d / CCSprist M: 171 Someone suggested that some devices can not handle more than 1024 × 1024 cellsheets, is this true? Because my is 1024x2048, but 2 spritesheets are very hard to make, so I was looking for confirmation of this before? Thank you. old devices from 3GS (iPhone 3G, iPod 1 and 2) are limited to 1024 * 1024 textures new Devices can be used up to 2048 * 2048

ios - How do I import project settings from one Xcode project to another -

I have just upgraded my encoder, and created a blank new project, and found that there are several new settings in it My old Xcode projects are not present Consequently, when I build and run my old projects, I get weird warnings that I did not have before. I think this is the case of having good factory defaults coming up with new projects. There is an easy way to move me into new project settings. Right now, I have to create a new empty project, and (almost one-by-one), all my files have to be moved and more than one group, and everything stitch together again. Use instead of build panel. You can also do it. Some of these have changed into Xcode 4, but most still apply.

python - Use underscore builtin in script -

In an interactive console (in Python) I can do this; k = 5 df generator (I): I + = Generator for J. Generator (J): J Print _ Where _ variables take the latest value. This can be very useful for me, when I want to loop through a generator and print an incorrect statement and raise an exception. However, when you run a script, _ does not appear - E. G. $ python my_script.py . (I tried to use __biltine __._ but it fails.) Whether to reach _ while running a script Any way If not, what are the options that I can take advantage of? _ is a special variable that is present in interactive sessions. However, due to the scrolling rules of Python, the j variable remains in existence when the for loop ends. Therefore, you can simply: Generator (j) in J for : near print j

android - Hide default buttons in DialogPreference -

I currently have a custom dialog class that extends DialogPreference (which is definitely part of a PreferenceScreen). In this dialog there are custom buttons that save and cancel, so I would like to get rid of the standard "positive" and "negative" buttons. AlertDialog tried using the getButton method but no success. in your XML instead of the DialoguePropference: Priority Android: Title = "This works as a button" Android: Key = "Button" Android: Summary = "It can act as a button to create its own dialog" /> Then in Java: preference button = (priority) searchpress ("button"); Button .setOnPreferenceClickListener (new Preference.OnPreferenceClickListener () {@Override Public boolean onPreferenceClick (priority arg0) {showDialog (MY_DIALOG); // Assume MY_DIALOG 'final int MY_DIALOG = 1;' Class false false;} The body}); Then add to your class body: @Override Safe Dialogue onCreateDialog {in...

Entity Framework Code First Saving Multiple Records for the same primary/foreign key -

Text after " The person has two equal tables, the difference is that each person has only one record in the PersonPreference table, but in the PersonRoles table There may be many. Both personality and personality are both primary and foreign key (Person_ID): & lt; Table ("person") & gt; _ Public class person & lt; Key () & gt; _ Public property Person_ID as the name of the public property ObservableCollection (PersonRole) End String as the line of the public overridable property PersonPreference PersonPreference Public, as overridable property PersonRoles, Table ("PersonPreference") & gt ; _ Public class person confirmation & lt; Key () & gt; _ Public property person_id as an integer public property car string public property color as string and class & lt; Table ("Personroll") & gt; _ Public Class Personnel & Lieutenant; Key () & gt; _Public property Person_ID Integer public property role string endi...

jquery - When writing a Chrome Extension: How can I make sure the page fully loaded including the $(document).ready function on that page? -

I have tried run_at = "document_end" , but it seems that both $ Ready (page, and my content script) trigger at the same time. Script has no control over my page, only on my chrome extension. Is there a way to fully wait for my script execution? Yes, instead you have $ (window) .od in your script You can use. So it will move after $ (document). of the page. The only fall is that it is also waiting to load the graphics. But what do I use in my extenstions

Java double precision math -

I am modifying a bit for a popular game and I have seen these rows in the area's generation , / P> double D4 = 1.0D; D4 * = D4; D4 * = D4; D4 = 1.0 D - D4; Double D5 = (noise 1 [L1] + 256D) / 512D; D5 * = D4; I was wondering what was the point of d4 , because on the fourth row it would always be 0, is not it? Yes, it will be guaranteed to be at least 0 in Java. Floating binary point arithmetic for all errors, 1.0 can actually be presented properly, and the result of multiplying it manually will always return to 1.0. Are you sure there is no other place to make it slightly 1.0d different from? Or perhaps it was historically a value other than 0.1?

c++ - Using Perlin noise to create lightning? -

Actually I have many questions related to the subject given in the topic title. I am already using Perlin functions to make electricity in my application, but I am not completely happy about my implementation. The following questions are based on initial and better Perlin noise implementation. To make this problem easy, suppose I am making simple 2D power by modifying the height of the horizontal line by joining n nodes on these nodes using a 1D Perlin function. I understand, the two later values ​​passed to the Perlin function should be different from at least one, or as a result the two values ​​are the same. The reason for this is that, with simple Perlin implementation, the random function works with an int arguments, and better implementation values ​​are mapped for [0..255] and these are considered as indexes. 255] Is it correct in a random distribution? How do I find that the first and last offset value returned by the Perlin function (i.e. for nodes 0 and n -1) is...

php - SQL INSERT from SELECT producing duplicate records -

I am learning PHP and Zend Framework. The following PHP function should fill a floating table by using the "INSERT INTO ... SELECT" style query. However, when I select * from the newly added table, I feel that most of the new records but not all has not been repeated once every time I run this script for the table Has the content removed? Anyone know how to duplicate? to fill public functions Office Ofisnam ($ officeName) {if ($ officeName! = '') {$ OfficePhrase = "b.oof_name = '". $ OfficeName "and"; } And {$ officePhrase = ''; } $ Where Addenda = $ officePhase "A.fil_bool_will_file_online = false" "A.fil_bool_confirmed = false" "A.fil_bool_duplicate = false AND" "A.fil_bool_not_found = false AND" "(A.fil_res_id_fk NOT IN (4,7, 10) or a.fil_res_id_fk is NULL) and ". "A.fil_will_recorder_rec_id taps and" "D.tag_description NOT IN ( 'already a trusted client,...

mysql - total count each day sorted, result grouped by week -

मेरी क्वेरी अभी इस तरह दिखती है बहुत सरल: select count (*), तिथि (visit_date), दिनांक (visit_date) द्वारा विज़िट समूह से DATE_FORMAT (visit_date, "% a") यहाँ परिणाम है: मैं क्या करना चाहता हूं: प्रत्येक हफ्ते के लिए गिनती हल हो गई है क्या आप मेरी क्वेरी को संशोधित कर सकते हैं ताकि वह मानदंडों को संतुष्ट कर सके? SELECT count (*), सालवीक (विज़िट_डेट) से विज़िट ग्रुप द्वारा सालवीक (विज़िट _डेट) सालवार (यात्रा_डेट) एएससी;

ruby - Thor Executable - Ignore Task Name -

Thor wiki page shows you how to create a thor powered CLI command, which looks like this: bash. / Mythorcommand foo For this, you first need to pass the great task foo in the argument I used to call Default_method can run a great executable without any arguments: bash ./mythorcommand However, I I want to give the first argument as a variable string: bash. / Mythorcommand "somevalue" This does not work because the logic of the Great Command is the first argument to be argued. Is there any way to ignore the work name and send the first argument to the default argument? If this functionality does not exist, then I think it would be very useful to add a method that will pass all command line arguments in one function / method: class MyThorCommand & LT; Thor only_method: Default defines default (* args) args.inpsect end end MyThorCommand.start You should expand from Thor :: Group and call that method to start class test & lt; Thor ...

.net - Getting a list of processes in ASP.NET -

In the form of a title, is there any way I can do that? I am trying to do it in .aspx, this is my current code: But it is saying that foreach is not a valid token. Like everybody, the process said. GetProcesses () If you use, you can run it in Statement Mode to see how it works and plays with it. process [] process = process. Getprus (); Foreach (in the process of procedures) {Console.WriteLine (process.ProcessName); }

php - Regex not working, -

मेरे पास एए रीगेक्स है: preg_match_all ('! & Gt; डाउनलोड & lt; / ए & gt; (। *?) & Lt; / span & gt;! I ', $ फ़ाइल, $ c); और जब फ़ाइल में एक से अधिक घटना उदाहरण के लिए होती है तो यह सब से मेल खाता है: डाउनलोड करें & lt; / a & gt; & Lt; br & gt; & Lt; span शैली = "फ़ॉन्ट-आकार: 11px; रंग: # 1F242 ए; फ़ॉन्ट-वजन: सामान्य;" & gt; http: //filec.com/file/1752396291/g.rar.html< / span & gt; डाउनलोड & lt; / a & gt; & Lt; br & gt; & Lt; span शैली = "फ़ॉन्ट-आकार: 11px; रंग: # 1F242 ए; फ़ॉन्ट-वजन: सामान्य;" & gt; http: //filec.com/file/1752396291/g.rar.html< / span & gt; लेकिन जब पृष्ठ पर डाउनलोड लिंक में से केवल एक ही मेल नहीं खाता है। Ive preg_match की कोशिश की और अन्य संभावनाओं पर विचार किया लेकिन nothings अभी तक के रूप में काम करते हैं james किसी भी मदद की बहुत सराहना की जाएगी। धन्यवाद टेक्स्ट "itemprop =" text "> यदि आप । लाइन ब्रेक से...

image - GNUPLOT: Trying to increase the quality -

How do I increase quality in Gnuplot? It seems that this is a very low-reserve image. Here is the content of the file I am using: linkage.plot set set terminal PDF set 'link pdf' set title "distribution of score" set xlabel " Set value "set ylabel" appeals "set orange [0: 50000] set xrange [0:70] binwidth = .25 bin (x, width) = width * floor (x / "post-text" itemprop = "text"> Gnuplot PDF output is usually very good (with analisising it etc.) by the Cairo PDF library But here are some points that can help: Support Terminal PDF on gnuplot> prompt. Set Terminal PDF Linewidth 1 will give you a thick line width. [deleted - my mistake]

extjs - Encode special characters in javascript function argument -

मैंने इस तरह एक ext js स्तंभ मॉडल को परिभाषित किया है: नया Ext.grid.ColumnModel ({Defaults: {sortable: true}, कॉलम: [{id: 'msgId', छिपा हुआ: सच, डेटाइंडएक्स: 'msgId'}, {हैडर: 'जानकारी', xtype: 'templatecolumn', tpl: '& lt; a Href = "#" onClick = "दृश्य संदेश ({msgDetails})" & gt; संदेश विवरण देखें & lt; / a & gt; '}]}) ... .. फ़ंक्शन कॉल ऑनक्लिक = "व्यू मेसेज ({msgDetails}) विफल हो जाता है क्योंकि msgDetails को दोहरे उद्धरण और विशेष वर्ण मिलते हैं जो मुझे विश्वास है कि फ़ंक्शन तर्क के रूप में चारों ओर पारित किए जाने से पहले किसी एन्कोडिंग की आवश्यकता होती है। यहां क्या किया जा सकता है? संपादित करें: यह msgDetails का स्रोत है: var रिकॉर्ड = Ext.data.Record.create ([{name: 'msgId', प्रकार: 'string' , मैपिंग: 'msgId'}, {नाम: 'msgDetails', प्रकार: 'स्ट्रिंग', मैपिंग: 'msgDetails'}]); जब msgDetails फ़ील्ड एक स्ट्रिंग है, तो आपको इसे कम से कम ...

toc - Using Sphinx, how can I remove the title appearing in the side-bar's table of context? -

मेरे some.rst फ़ाइल को इस तरह दिखें: ============ मेरा शीर्षक ================================== 2. धारा = ======================== संकलन के बाद, परिणामस्वरूप some.html सामग्री की एक तालिका होगी साइड बार में जो दिखाई देता है: मेरा शीर्षक अनुभाग अनुभाग क्या some.html में एक आसान तरीका एक वस्तु प्रकार का उपयोग करना है जिसे TOC निर्देश द्वारा अनदेखा किया गया है: .. rubric :: My Title यह टेक्स्ट बनाता है जो शीर्षक की तरह दिखता है, लेकिन इसे TOC से बाहर रखा गया है आप अपनी सीएसएस फाइल को । Rubric वर्ग के लिए जो भी शैली चाहते हैं, उसे अपडेट कर सकते हैं, अगर आप चाहें तो h1 शैली की नकल कर सकते हैं। रूब्रिक स्टाइल कक्षाओं को परिभाषित करने के लिए देखें।

mysql - load data infile, comment character -

I have a data file where there are comment rows starting from some lines% of how to get data from a file in mysql table Have to load? No no, there is no way of ignoring the lines starting with a specific character for the command is. You can skip certain lines, but it is best that you can do it. You want to pre-file the file. Or tell whoever is causing it, stop putting it in place.

zend framework - Using OAuth 2.0 to Access Google APIs (Specifically Blogger) (PHP) -

Using Google's tutorials, I am trying to access the Blogger API using the Oath 2.0 authentication method. I have successfully authenticated with OAuth, but I do not know how to use APIs. Run all their example objects $ gdclient - If you use the AuthSub method, then Zend_Gdata_AuthSub :: getHttpClient ($ _ session is set to [session1Token] ); However, I think that if you have authenticated with OAuth2.0, then what does it look like to set $ gdclient! Any help please? The rest of the examples are straight forward, but as I have said, they run away from all $ gdclient, which I have not been able to set yet. Blogger API Tutorial: OAuth 2.0: Thanks! Type the title: $ user = 'user @ example .com '; $ Pass = 'secret password'; $ Service = 'blogger'; $ Client = Zend_Gdata_ClientLogin :: getHttpClient ($ user, $ pass, $ service, zero, Zend_Gdata_ClientLogin :: DEFAULT_SOURCE, blank, zero, Zend_Gdata_ClientLogin :: CLIENTLOGIN_URI, 'GOOGL...

ruby on rails - Route Temproray URL to controller and Action -

I am deploying a Rail application. At the moment I am having a temporary URL, does someone guide me how I tell them about my controller and action? Temporary URL I tried to do something like this but it is not working: match "~ aeropter" ,: to = & Gt; 'Front # index' Produce here. An error message has been given from the log file: was initiated "/ ~ Aromomer /" for 223.29.232.108 on 2011-09-01 22:03:11 -0500 Displaying as content HTML Contributor by Content Controller #: {"path" => "~ aromaper"} 500 internal server error in 2ms completed public /404.html (0.0 mms) Any help would be highly appreciated. I just had to do this, the routes created in this way: match "/",: to = & gt; "Front # index" worked like a charm.

c++ - Windows.h macros not defined -

I am creating a simple GUI library, and I've got it for the first test. The strange thing is that none of the windows macros have been defined. I am getting such errors as "Null" was not declared in Scope and "Handle" was not declared in Scope. "I'm thinking that I can be the method of organizing the code because the easywin.hpp content is not defined in the login file, but it looks like it should work. Here's the easiest (most) easywin.hpp : #ifndef EASYWIN_BASE_HPP #define EASYWIN_BASE_HPP #include & lt; string include & gt; # & lt; map & gt; // strings are used everywhere, they std: : Can be used globally by using string; / ** * WinAPI encapsulate and Program a namespace to prevent conflicts. ** / namespace WinAPI {#include & lt; the windows.h & gt; # include & lt; includes commctrl.h & gt;} // Header (according to part order has been) #include "application.hpp" #include "object.hpp" #inc...

c++ - Checking whether a non-hardwired member function exists with SFINAE -

I want to make a proxy for member functions and operators. They should have the same return type and parameter, and should be good for many classes, which are given as template parameters, even if there is no specific member function or operator in the class, I want to compile instead of failing error, essentially any method of SFINE if X is a method f and y If not, then its name is f is, give me the proxy & lt; X & gt; X :: f as a f () as well, and give me the proxy & lt; Y & gt; Removing the return type from a known function is no longer a problem, after this there is no such error, if there is no such work. I already know whether a function exists or not, and I have several template metaprogramming tricks to enable fixed feature, however, they all work only hard work rather than hard working people On names, which severely limit your use in this case, because I need to do the same construction for many tasks. I just need to see that th...

asp.net mvc - Need advice on how to structure asp mvc razor page -

Image
मेरे पास एक पृष्ठ है जिसमें बहुत अधिक डेटा शामिल होगा पृष्ठ की रूपरेखा छवि पर है। आउटपुट के लिए मैंने "रेजर" इंजन का प्रयोग किया है। अब मुझे आश्चर्य है कि अगर मैं अपने कोड का पुनर्गन्म करे तो मुझे कुछ मिलेगा, जो प्रत्येक खंड जो डाटाबेस से आता है, आंशिक दृश्य होगा? इस पृष्ठ पर मुझे सभी आवश्यक डेटा को प्रदर्शित करने के लिए लगभग 20 मान ऑब्जेक्ट्स की आवश्यकता है। मैंने एक "व्यू मॉोडेल" वर्ग बना दिया है जिसमें मुझे आवश्यक सभी डेटा शामिल हैं और दृश्य मॉडेल कक्षा को रेज़र पृष्ठ के रूप में सेट करते हैं आदर्श। क्या यह सही तरीके से मुझे यह कैसे करना चाहिए या कुछ चालाक तरीके से किया जाना चाहिए? सार्वजनिक वर्ग MyViewModelClass {सार्वजनिक ValueObjectx x; सार्वजनिक मूल्य उल्लिखित; सार्वजनिक मूल्य ऑब्जेक्ट z; सार्वजनिक सूची & lt; ValueObjectT & gt; tList; सार्वजनिक सूची & lt; ValueObjectG & gt; यू आर एल; सार्वजनिक सूची & lt; ValueObjectS & gt; sList; } इस तरह से एक परिदृश्य में मैं आमतौर पर प्रत्येक अनुभाग को आंशिक दृश्य के रूप में रखन...

iphone - Create a scrollable menu with UIImages representing each possible selection. These UIImages must be able to snap to the grid one by one -

I am trying to create a menu (using UIScrollView) where the user can select images (UIImageViews Using) I intend that at least 3 images will be displayed at any time. When I scroll, the image will be able to snap in position. However, if I am using a UIC scroll view that is enough to display 3 images at any given time, and I enable paging, paging all 3 images together Move and only snap to the next 3 images. And if I'm using UIScrollView that only fits 1 image, and I enable the clipboard to turn (which pulls my images beyond the range of UIScrollView). My data gestures can be identified only in the UCcrollView, I want my data gestures to be searched until a picture is touched. Thank you. You can use the following method of UIScrollView to scroll with the code as you want. - (zero) scrollRectToVisible: (CGRK) Animated Reset: (BOOL) Animated You can call it UIScrowVuDeGet through the following method. - (zero) scrollViewDidEndDecelerating: (UIScrollView *) scr...

Scala: Is there a default class if no class is defined? -

According to , Scala methods belong to a class. However, if I define a method in REPL or in a script that I execute using Scala, then which class is the method? Scala> Def Hoho (string: string) = {printlen ("hoho" + ARR)} Hoho: (String: Unit Scale & gt; Hoho ("Rehul") hooh rahul In this example Which class is related to the method? REPL automatically declares all your statements in the objects (in fact your Wrapping the statement) if you print the intermediate code using the -Xprint: typer option, you see it in action Definition: scala> Def hoho (straight: string) = {println ("hoho" + straw)} [[syntax tree at the end of the tipper]] / scala source: & Lt; console & gt; package $ line1 {last object read $ java.lang.object with scalaObject {def this (): object $ line1. $ Read = {$ read.super.this (); ()}; The last object increases java.lang.Object with the $ iw slab object {df (this): object $ line 1. $ Read. $ Iw = {$ iw....

php - Recursive array correct method of display -

Sorry guys work again with my recursive array but I can not get a "layout", after which i do I & lt; Ul & gt; , & lt; Li & gt; "Proper" tree structure using the so that you finish it: Item Children Child function recursive_array ($ result, $ Tbl) {global $ dBH} ; $ Tbl = $ tbl; If (count ($ result)) {foreach ($ result in $ res) {if ($ res-> ParentID == 0) {echo ' "; Echo & lt; Li & gt; '; Resonance $ res-> Name; Echo $ res-> description; Resonance $ res-> Date_ added; Echo & lt; Ul & gt; '; } If ($ res-> ParentID! = 0) {echo '& lt; Li & gt; '; Resonance $ res-> Name; Echo $ res-> description; Resonance $ res-> Date_ added; Echo & lt; / Li & gt; '; } $ STH = $ DBH- & gt; Query ("SELECT * FROM". $ Tbl. "WHERE ParentID = '". $ Res-> ID. "'"); $ Fquerycount = $ STH- & gt; Punctiquity (); $ STH- ...

command line interface - controlling CLI PHP scripts from web ui -

I have an application in which a dumper operation which continuously parses a web service and re-retrieves an XML stream It's not happening dump it in a mysql db Right now I am doing all the dumping action in the UI and it is a real pain that dumps both data and manipulates it So I have created a separate CLI script that takes care of the dumping action And the end of the front can only see DB each other so that it can see the new data that it is a very trivial way of doing it. But the only problem now is that I am unable to control the clip script from the web UI. That's what I want to start the dumping action and stop it from the UI. I have tried this method that somewhere ago has been viewed (true) {if (file_exist ($ file)) {// do action} else {break; }} Then remove the file on the prevention action sick and there are variable problems with this method and this is not the right way to do so. That's why Web page UI is a better way to control command line ...

php - Cakephp Find Problem -

I have a deal table, in the controller, with a field start date, I am trying to code down and this one There is a code here: function todays_deal ($ CitySlug = null) {$ city = $ this- & Gt; City-> $ 'City' = $ city ['city'] ['id']; $ now = ('first', array ('conditions' = & gt; array (' city slug '=' gt; $ CitySlug) Date ('Y-M-DH: I: S'); $ Circuit = Array ('Deal.city_id' => $ CityID, 'Type Deal' => 'F', 'Deal. & Gt; = '= & gt; $ now); $ Deal = $ this-> Deals-> Search (' first ', array (' conditions' = & gt; $ terms, 'order' = & Gt; 'Deal. Start DESC'); $ Left = array (); $ Now = Time (); // Timestamp $ end = strtotime ($ deal ['deal'] ['end'] Change date; ) $ Start = strtotime ($ deal ['deal'] ['start']); if ($ A $ End = $ start;} $ Diff_time = $ left_time = $ end - $ now; if ($ start = ...

asp.net mvc 3 - How to [AllowHtml] but deny any scripts? -

To post any html, set me at [AllowHtml] property in asp.net mvc Validate on the controller, but How to allow post HTML to post any script? You can use the input to clean

mobile - Detecting Orientation of Windows Phone -

I use the JavaScript Event Orientation Change and Parameter window to find orientation changes and orientation values ​​on my website. . It works well with an iPhone and an Android but a Windows Phone does not close the biopic event and the window. The justification is undefined. How can I locate the orientation of Windows Phone? Thank you, Conrad IE 9 mobile does not support these events. If your page is being displayed inside the WebBozer control (sezierlit) app, you can find the orientation change at the app level and then invoke the script on the page to pass this information. can do. . If you are just running in the browser, there is no way to detect orientation changes.

Eclipse debugger (PHP) - how to see super globals and class properties? -

Is it possible to view PHP Super Globals, such as $ _SESSION and $ _POST in a debugger variable perspective? Also, in the following example ... class myclass {public myvar = 'value'; ...} ... If I'm debugging the class then I would like to debugger this $ & $; I want to be able to see Muver It seems that the availability of superglobal in XS 8 is quite Changes have come. From: During the development of Zend Studio 7, it was decided to restrict the current scope of the variable displayed in the view of the variable (for example the current function scope). We are convinced that this approach provides better usability and performance of debugging. BTW, this is a standard approach for many IDE products. I can not say that it matters a lot to me (actually it is a pain in the neck) and if it is actually going to be standard, in many IDEs Seems like justification for the more comprehensive bad idea. But I'm out of trouble This post seems like you ...

Styling SVG with CSS in the containing HTML -

I have a SVG file that has a named triangle named. The name of the file is the indicator name: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt ;! DOCTYPE svg PUBLIC "- // W3C / DTD SVG 1.1 / n" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> & Lt ;! - Scalable Vector Graphic - & gt; & Lt; Svg version = "1.1" xmlns = "http://www.w3.org/2000/svg" xmlns: xlink = "http://www.w3.org/1999/xlink" xmlns: ev = "http: / /www.w3.org/2001/xml-events "BaseProfile =" full "& gt; & Lt; Polygon numeral = "0,7 7,0 14,7" /> & lt; / Svg & gt; And I have an HTML in which the built-in CSS tries to set the color of the SVG polygon: & Lt; Style type = "text / css" & gt; . Indicator {fill: blue; } & Lt; / Style & gt; & Lt; Title & gt; Untitled document & lt; / Title & gt; & Lt; / Head & g...

jquery - Get specific sibling with an index-number -

I'm working on a banner-slide show, but I'm working with navigation, which I'm having trouble with Is: function slide switch (item) {if (item) {// problem var $ active = $ ('# banner div'). Index (item); Var $ activeImage = $ ('# banner img'). Index (item); } And {var $ active = $ ('# banner div.active'); Var $ Active Entrepreneur = $ ("IMG [src $ = '/ Picture / Active Page']"); If ($ active.length == 0) $ active = $ ('# banner div: last'); If ($ activeImage.length == 0) $ activemaze = $ ('# banner img: last'); }} $ ("# Banner img"). Click (function () {slideSwitch ($ (this));}); The problem is that when IMG is clicked in the # banner, I want to get the status of the transfer (navigation indicator) and thus be able to fade in the selected banner. It is possible. The problem here is: var $ active = $ ('# banner div'). Index (item); Var $ activeImage = $ ('# banner img'). Index (i...

javascript - How do I implement a cache buster , if I use git? -

& lt; link rel = "/ style / style.css" / & gt; तो यह मेरी index.html है। अगर मैं इसे सहेजता हूं, तो मैं खुद को style.css को कार्यान्वित करना चाहूंगा? संस्करण = 3 ... तो यह बस्ट्स कैश ऐसा करने का सबसे आसान तरीका क्या है? जावास्क्रिप्ट का उपयोग करके आप बस & lt; स्क्रिप्ट टाइप करें = "टेक्स्ट / जावास्क्रिप्ट" & gt; Document.write ('& lt; link rel = "स्टाइलशीट" प्रकार = "text / css" href = "style.css? संस्करण =' + (नया दिनांक ())। GetTime () + '" & gt;'); & Lt; / स्क्रिप्ट & gt; यदि आप किसी सर्वर-साइड स्क्रीप्टिंग का उपयोग करते हैं तो यह आसान हो सकता है ` & lt; link href =" / style / style.css? संस्करण = & lt;? Php इको टाइम ()? & Gt; `

wpf - How to zoom in on a image when Image.MouseEnter fires? -

I would like to zoom in on a image when Image.MouseEnter Fire and then zoomed out when Image.MouseLeave seems to fire, I thought of making a trigger, but there was no luck. This is what I have tried so far: & Lt; /Image.RenderTransform> & Lt; Image.Triggers & gt; & Lt; EventTrigger Routing Avent = "Image.MoinEnter" & gt; & Lt; BeginStoryboard & gt; & Lt; Storyboard & gt; & Lt; Double animation storyboard TargetName = "TransRotate" storyboard. TargetProperty = "ScaleX" = "0" from = "100" Start Time = "0: 0: 0" Duration = "0: 0: 10" Autorvers = "False" /> & Lt; Double animation storyboard Target = "transorotate" storyboard. Target = "0" from = "100" start = "0: 0: 0" period = "0: 0: 10" auto-rowers = "falls" /> & Lt; / Storyboard & gt; & Lt; / BeginStoryboard & gt; ...

java - reducing video sizes from large gigabytes to smaller kilobytes -

I would like to know whether the possibility of converting the size of video files from gigabytes to smaller kilobytes of size is still high quality Files with a resolution and can be played on a flat screen. Compressing a video from An gigabytes of n kilobytes is a million times less in size. It is a pixel-output for every 1 million input pixels that compression / depletion at that level is essentially giving you a great reduction in resolution and frame rate ... best. Actually, I would be surprised if you can get more than 100 times before the reduction of picture quality becomes severe.

unit testing - What's the difference between assertEqual and assertIs (assertIs was introduced in Python 2.7)? -

संदर्भ - assertEqual (a, b) # जांचता है कि a == b assertIs (ए, बी) # जांचता है कि ए है बी एंड एलटी; ---- जो भी इसका मतलब है ??? assertEqual का उपयोग करना दो वस्तुओं की आवश्यकता नहीं है एक ही प्रकार, वे केवल एक ही मूल्य की आवश्यकता है। तुलना में, assertIs का उपयोग करके दो वस्तुओं को एक ही ऑब्जेक्ट की आवश्यकता होती है। assertEqual समानता के लिए == परीक्षण ऑपरेटर: ऑपरेटर & lt ;, & gt ;, ==, & gt; =, & lt; =, और! = दो वस्तुओं के मूल्यों की तुलना करें वस्तुओं को एक ही प्रकार की आवश्यकता नहीं है। यदि दोनों संख्याएं हैं, तो उन्हें एक सामान्य प्रकार में बदल दिया जाता है। अन्यथा, विभिन्न प्रकार के ऑब्जेक्ट हमेशा असमान की तुलना करते हैं, और इन्हें लगातार, लेकिन स्वैच्छिक रूप से आदेश दिए जाते हैं। assertIs ऑब्जेक्ट आइडेंट के लिए परीक्षा, जैसा कि है और नहीं है ऑपरेटर्स: ऑपरेटर ऑब्जेक्ट आइडेंटिटी के लिए है और परीक्षा नहीं है: एक्स है y सत्य है अगर और केवल अगर एक्स और वाई समान ऑब्जेक्ट हैं X नहीं है, व्युत्क्रम सत्य मान पैदा करता है। उपरोक्त उ...

SimpleTest PHP not completing a testor showing a failure -

For some reason, even I have another similar test set for other classes in the same environment Do up, SimpleTest is not running my test function, but it's not saying that the tests are incompatible. The message I receive (in the green bar of success): FormControllerTest.php 0/1 Test Case Complete: 0 Pass, 0 Fails and 0 Exceptions So it is found that there is a test case, but it has not run it, but it is not throwing an error. I have the simplest possible testing case: need_once (Dynom (__ file__). '/ Simpletest /autorun.php'); Need_once (dirname (__ file__). '/../FormController.php'); Square spreads to FormControllerTest UnitTestCase {function shouldFail () {$ this- & gt; AssertFalse (true); }} I do not understand why this is not working. Does anyone have any suggestions on why this is not going to be my test? Many thanks to me I came to know that my trial was not working. According to : When the case of the test is brought by the Au...

Find the tables in database being used for asp.net caching? -

I suspect that any other asp.net project would have used database caching somewhere in the past. Apart from this, I suspect that a specific database would also have been created for caching requirements. To reuse my goal that is already there: I need to find the string of connections from that database and give my asp.net application cache in the same database. Anyway, can I find table related to SQL Server object caching? ASP.NET cache does not contain memory in the database by default This is the only user session for the database Can be configured to use any reason for the database implementation of caching (introduces overhead performance in the database)? Here's something that an output cache provider is writing in the network.

android - osmdroid - mapview in fragment -

I am using and I tried to add MapView to Piece 's onCreateView . However the map does not show the correct coordinates zoom or show. It only shows the map of the whole world (lowest description). Here the normal code should work, which should work normally @Override public view perquiry (layoutInflator Inflator, View Group container, bundle savedinstenstate) {map View map view = new map view (get (), 256); MapView.getController () setZoom (14). MapView.getController () SetCenter (New GeoPoint (46814000,17977000)); See the return map; "text" for Tony> It has already been detected from this but the Mapfragment is present only in the compatibility package. This time, use mascotation as a general solution activity and adding fragments there or using compatibility packages and adding a piece through tabhost and local activity manager http://stackoverflow.com/questions/5109336/mapview- One-piece honeycomb

c# - ajax timeout problem -

I have a long process in AJAX which adds to the problem I asyncpostbacktimeout = 600 script manager & lt; Asp: ScriptManager AsyncPostBackTimeOut = "600" runat = "server" id = "SMPs" enablePages = "true" /> Its workings in the local host are great, but when I check it on the server, there is still some problem in it Any advice? Thank you You may need to increase the executionTimeout in web.config or request an increase Time itself is ending. Take a look at MSDN, it tells the difference between debug = True / False and it is probably causing the difference between localhost and production. Execution Timeout Optional Int32 attribute. ASP.Net specifies the number of seconds allowed for a maximum request before shutting down automatically. This time-out only applies if the contents of the debug feature are incorrect in the compilation element. If the debug feature is true, then you do help to avoid the shutdown ...

symfony1 - Symfony 1.4 and Jenkins? -

Has anyone worked with Jenkins and Symphony 1.4? It uses the limitations and I do not know there is a compatibility mode with Jenkins! Symphony has two functions for testing: test: unit and test: Functional both of these junit XML log files are able to write: $ php symfony help exam: unit ... cutting ... works a JUnit compatible XML log file - Xml option: ./symfony test: unit --xml = log.xml and: $ php symfony help exam: functional function can output - a juneet compatible with xml options One SML log file: ./symfony test: functional --xml = log.xml He said, if you are managing your continuous integration with the Jenkins symphony project (and more Generally any PHP project), in my opinion about CII establishment, you should be the best resource. This verifies the Symphony Project a verification in Jenkins.

php - $this keyword in view in CodeIgniter -

I am trying to understand how $ this-> load-> gt; Inside of a view file in view () CodeIgniter. The core / controller is calling PPP core / loader.php, which then calls _ci_load () which in turn does this Loader class should not mention $ this at point ('/ path / to / view'); How is the reference to the $ this controller? In my opinion, you get $ $ for this-> under a view file. View () must be called. $ Not-it-> Load-> () See that the load () function inside the loader is not available This controller is a class variable of the base class. I.e, $ this-> Load = & amp; Load_class ('Loader'); Please note: I am trying to understand CodeIgniter internals. I fully understand how to embed visual files in other visual files as a CodeIgniter user please use use it $ this- & gt; ; Do not leave the answer given about load (). The last time I checked, $ this was of class CI_Loader , try var_dump ($ this); Inside a s...

unit test cases visual studio -

I am new in unit tests, I am starting to work on a big project using C #, VS 02010 Was thinking that if it is a good idea to use the test-frame that comes with VS2010, or I should look for a third-party structure. Thanks If you are resetting the organization, then using MSTest It is a good reason to use it, if you are doing it yourself, then this argument is irrelevant. For the third party structure, NUNT works well with VS 2010, and it is easy to get information about how to use it, because this is the only one I have used My previous employer did not pony for MS Test licensing. The key to using the unit test framework is learning how to write good tests, it is not necessarily The Emal. Best wishes

opengl - LookAt Matrix Question - when are they equivalent -

Can you please confirm or reject the following statement that is correct to me? 1) Two Lookout (eye, center 1, above) and glLookAt (eye, center 2, above) glLookAt are equal if center1 - eye == k (center2 - eye) for some positive Kashmir 2) tho lookAt matrices are never equal if their eye vector is different is equivalent if cent1 - eye == k (center2 - eye) for some positive. That's right. The direction vector is calculated by the center - with eyes, and then normalized, so if the direction is the same then length does not make any difference. Be careful that there may be very slight numerical differences in the matrix as the circular circular, though for all practical purposes, the matrix is ​​the same.

c# - Is this the intended behavior of textbox and label? -

I set the value of the control when the DOM loads. I have this super simple code on the ASPX page: & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# & lt;% = textbox2.ClientID% & gt;') Val ($ ('# & lt;% = textbox1.clientID% & gt;') Val (); $ ('# & lt;% = lblVal.ClientID% & gt;') .HTML ($ ('# & lt;% = textbox1.ClientID% & gt;') Val ()) ;}); & Lt; / Script & gt; & Lt; ASP: Text Box Runat = "Server" id = "Text Box 1" Text = "Test Data" /> & Lt; ASP: Text Box Runat = "Server" id = "Text Box 2" /> & Lt; Asp: label runat = "server" id = "lblVal" text = "old data" /> & Lt; ASP: Button Runat = "server" text = "click me" onclick = "anonymous1" link "" & gt; Click on my button in the event handler I have this code: ...

security - What is MQSecurityExit in WebSphere MQ Java classes? -

I'm trying to find some documents that are MQSecurityExit and how we implement it in Java. I have very little idea on this - like I believe this MQ client has to certify the MQ provider, but it is not known how this WebSphere fits in the MQ's overall security architecture. An exit vendor has a point in the code that asks the user or third party to customize the code It works. WebSpray provides security exit points on both MQ servers and clients. One common use for a safety exit is that after exiting the connection, the MCAUSER field in the channel is set to the User ID which was resolved in the authentication. The authorization is done against this value. A stand-alone server-side access connection can authenticate connections based on the data provided in the request. The most common items used by server-side access are SSL certificates details, client credentials passed by the client and IP connection information. Exiting a client / server pair can do any arbitr...

.net - How could I still log with asp.net healthMonitoring an Exception that was Catch? -

I have configured health monitoring in my web application to log all exceptions to the database. But, when I honestly handled some exceptions by showing a good message to the user, they are not logged into the database. If I find something like throw x , the standard error page is displayed and the error is not handled brilliantly. At the end of my error handler, can I add something more to tell the system to log this error? Here is a code sample: Try string = "do something" as a slow error text, catch some exceptions as dataActionAir. Text = string.format ("a problem {0}.", Error text) data connection error. ? And try on the web and the health monitoring section of my web.config: & lt; Health Monitoring Enabled = "Truth" & gt; & Lt; EventMappings & gt; & Lt; Clear /> & Lt; Add name = "all errors" type = "System.Web.Management.WebBaseErrorEvent" startEventCode = "0" endEventCode =...

html - Putting a variable into a DIV using HAML -

I am trying to assume an array and assign it to a Div class. - Usage. You do it. Value | % P = value [0]% p = value [1] The result in what you would expect, assuming that the value is [0] and the value [1] contains data Are working. I covered it with trying different things around it and it is as close as I can get: -values.each do | Value | - div = values ​​[1] -div = value [0] then throws this error: the undefined method `div = ' "Day": string and the string is in the "day" values ​​[1] Any ideas? - values.each do | Value | % Div {: class = & gt; Value [1]} = value [0]

gdb - Debug native Android code -

I am using sequah to debug indigenous code under eclipse on Android. It works fine if the library was built with NDK and located in the project folder. But there are some keys that were made on the other machine. I have its source, Object files and Libs are debuggable, but GDB source path could not be found. Any ideas? You can set up in gdb. Set replacement path

c# - WebBrowser Control update hidden field -

I'm trying to change the value in the hidden field in the webbrowser control. I can inject a warning box that displays JavaScript. I can show the alert box to the current value of the hidden area. However, I can not get to change the price of the hidden area I have tried to change the value (TB Webbroser control) by doing this: HtmlElement head = tb.Document.GetElementsByTagName ("head") [0 ]; HtmlElement script EL = TB Document Crate Element ("script"); IHTMLScriptElement element = (IHTMLScriptElement) scriptEl.DomElement; Element.text = "function doIt () {document.getElementById ('Test Hydfied'). Value = 'Hello World'; Warning ('Update');}"; Head.AppendChild (scriptEl); Tb.Document.InvokeScript ("Chart"); The above warning pops up. And I have tried to: tb.Document.Body.InnerHtml = Tb.Document.Body.InnerHtml.Replace ("MyValue", "YourValue "); In the above I see that InHHMM cha...

iphone - swipe directions and loop text string -

Help me ... I'm stuck I'm trying to create something like an ordinary game like Angry Birds Swipe . How do I know this code? I have two labels and a swipe-driving code (top, bottom, left or right, any direction) I want to move label1.text ("333333777777555555888888") to label2.text with label number ("3758"). That's why I can improve the artificial intelligence game. How can I do this? Here is the code. for (NSValue * point_value in TouchRecord) {CGPoint current_point = [point_value CGPointValue]; NSUnitor IDX = [self subritionindexcentingpoint: current_package]; // Collect string at 2 NSString * numValue [[NSString alloc] initWithFormat: @ "% d", idx]; Label1.text = [label 1. Text stringBegining string: numValue]; } Thanks. I'm not completely sure of this + (NSString *) Remove DuplicateNumbersFromString what you want but I think that's it. To reduce the string, so that only one of the numbers can use this functi...

opengl es 2.0 - Pixel based collision detection problem with OpenGLES 2.0 under Android -

This is my first post, so apologize for any mistake. I am developing a simple task, with the use of OpenGL ES 2.0 and Android 2.3, the game My game framework on which I am currently working on is based on two-dimensional practice which is present in a three-dimensional world. Of course, the knowledge of my world's organizations such as the situation in the fictional world, the float [] matrix, the OpenGL texture handles as well as Android's Bitmap Handle (I'm not sure it is necessary later because I am doing With the use of OpenGL machine, for retrieval, but for some time, for my convenience). This is the background on the problematic issue for a while. I'm currently stuck with a pixel-based collision detection because I'm not sure which object (OGL texture here, or Android bitmap here) should sample me, I mean, I already have the bitmap of Android Have attempted to sample, but it has not worked completely for me - many run-time crashes regarding reading out ...

Retrieving checkbox status in an HTML table using JavaScript -

I am trying to remember the syntax to get an element inside the table using javascript. There is a table with a checkbox. It is a dynamic checkbox or I will only use getElementById. Here's how I am doing it. I know that I am close, but so far it has yet thought. Even I have the code: table_name.rows [0] .cells [0] .item [0] or tbl_run_avail.rows [1]. Seals [0]. [0] Since you are using DOM level 0, you probably Looking for the property: table_name.rows [0]. Seals [0]. ChildNode [0]; The above acknowledges that the check box is the first child node in your table cell. In this situation, you can avoid the unnecessary index using the property: table_name.rows [0]. Seals [0]. First hair;

folder - Writing to a subfolder in c# -

I have trouble writing a text file in a folder, which I tried to create. He said that I do not have access to 'C: \' Can anyone tell me how to fix this and how? Thanks! string file_name = Environment.CurrentDirectory; File_name + = @ "\."; File_name = (string) kababox 1. Selected value; File_name + = @ "\."; File_name + = (wire) combobox2.SelectedValue; TextWriter name = new streamer (file_name); Edit Edit: New code after modifications ... var location = path. Cobine (environment. Current directory, (string) combobox1. Selected item); Directory.CreateDirectory (location); Var path = path Cobain (location, combobox 2. selected ingots); TextWriter name = new streamer (path, true); My goal is \\. Txt Write a text file can someone tell me how? Thanks! The solution is that what the others have said. As already mentioned, this line: file_name = (string) combobox1. Selected value; An assignment ( = ) is incorrectly done instead of ...

postgresql - Access remote Postgres server with pgAdmin -

The following lines are in the pg_hba.conf file Type Database User CIDR-Address Host Host All All 10.0.0.68/32 Trusted Local Madbuzz Passwords Local All Postgres ident host mydb myuser 10.0. 0.68 / 32 Password Host All Postgrads 10.0.0.68/32 Trust My postgresql.conf The following line in the file is: listen_address = 'localhost, 10.0.20.10' nmap -sS 10.0.20.10 Finds: Port State Service 5432 / TCP Open PostgreSQL I can do SSH in the Bash shell on the server, but I do not connect to pgAdmin can do. I get the following: Could not connect to the server: There is no way to host (0x00002751 / 10065) What is running on the host host "10.0.20.10" and port 5432 Accept TCP / IP Connection? I do not know what the problem is. @Adan found a solution of himself: This firewall issue was: service iptables blocking connection enabled. I will write a rule for connection permission.

authorization - WCF declarative security using CodeAccessSecurity -

मैं CodeAccessSecurity पर आधारित कस्टम अनुमति-आधारित घोषणात्मक प्राधिकरण तंत्र का उपयोग करने की योजना बना रहा हूं। इसे लागू करने के लिए मैंने CodeAccessSecurityAttribute से प्राप्त निम्न उपवर्ग बनाया है: मैं इसे इस तरह से उपयोग करता हूं: [सेवा का संप्रेषण] सार्वजनिक वर्ग सेवा {[ऑपरेशन कॉन्ट्रैक्ट] [आवश्यकताप्रदर्शन (सुरक्षा क्रिया। डिमांड, अनुमति = "गेट एब्रेट्री प्रोडक्ट ")] सार्वजनिक उपयोगकर्ता GetProduct (स्ट्रिंग का नाम) {वापसी _productRepository.Get (नाम); }} और मुझे उम्मीद थी कि अगर CreatePermission विधि रिटर्न _deny तक पहुंच GetProduct को प्रतिबंधित किया जाएगा। लेकिन ऐसा लगता है कि CodeAccessSecurity इस तरह से काम नहीं करता है। क्या मुझे एक्सेस ठीक से प्रतिबंधित करने के लिए एक अपवाद फेंकना होगा? या हो सकता है कि इसे प्राप्त करने के लिए और अधिक सुंदर तरीका क्या है? सीएलआर तंत्र जो कि पर आधारित सत्यापन की जांच करता है एक CodeAccessSecurityAttribute उपवर्ग उदाहरण केवल लक्ष्य विधियों के निष्पादन को रोक देगा, यदि अपवाद तब फेंका जाता है जब Creat...

c++ - Is MeeGo Development Viable? -

To start, I will put this question in context: Is it for personal programmer is feasible . Probably a small team for an artist, but most a very small non-corporate team thinks about building commercial websites. I am mostly asking this question as a mobile app programmer who is interested in deploying their app in multiple platforms. I think Symbian is dead effectively (which is on the way to death). / P> I have good information about C ++ and QT APIs for desktop OS ... I also wondered if there is an important learning curve in the programming QT (is it Symbian Is C ++ again?). Any tips on distributing application on MEO devices, the number of distributed devices etc. would be greatly appreciated. Symbian is dead because companies that make it popular have left it. Meego was ever any company made it popular. Intel still supports sort-in, and ultimately it is theoretically possible that it is being actively used in the market. But the thing about Intel is that the...

javascript - How to use the Glimpse client viewer but NOT the server implementation -

To render some JSON I would like to use in a web application I use the thumbnail server implementation on the site in question I'm unable to However, I can provide my own IHttpHandler using the preview JSON format. Has anyone posted this details on how it has done and how it is posted? If not, can anyone tell me the steps needed to raise it and walk? Alternatively, are there any other similar framework structures? Note: I am pinging around and watching client js etc. I will continue the source hacking route, but hoping someone has some shortcuts for me! As Nick said that I would be interested in trying to do it. But in the mean time, the best place to look at is If you look at this page, you will see that we have created a protocol tester. It allows you to put in any JSON and view the output. If you want to do it yourself, take a look and you will see how we do it without full glimpse. You will see that we are doing something like the following: var data = {tes...

java - how can i reduce the number of whitespaces in a sentence to 1 if there are more then 1 whitespaces in the sentence? -

How do I reduce the number of white space 1 in a sentence if the sentence has more than 1 more white space? ? Assuming that "continuous" white space, here's a solution. string string = "Hi there are some white spaces here."; String newString = sentence. Riley All ("\\ s +", ""); Println (newString); Output: Hello there are some white spots here.

append - Jquery Multiple "this" -

I have this function and second this before the row is not needed to reference the function First line of: $ ('externallink'). Each (function () {var $ externallink = $ (this) .html (); if ($ externallink.length & gt; 0) {$ (this) .closest ('tr'). Children ('filter') The app ('& lt; p & gt; Exam & lt; / p & gt;';)}}); then the first (this) refers to .html () ('externallink'). Each (function () . second (this) .closest ('tr') I also mention the first ('.externallink') Each (task () ( ), but I think it is talking to ($ externallink.length> 0) which is just above it. There are several rows in this table, so I need to make sure that ('. Filter') is adding the sections which is the only one that is .externallink In question & lt; tr & gt; & lt; td style = "width A: 35% "> a class =" filter "href =" # "& gt; March & lt; / ...

salesforce - How to display child object fields in the VF page By querying through Parent object in SFDC -

I want to query the child object through a relationship with the child object. And I have to pass those values ​​on a VF page. I can get it. You can ask hair fields through a sub-class in such a way: Store results in a list of parents: from the list & lt; Parent__c & gt; LiParents = [Select the name of the ID from the parent, select the ID (from the child__R);] Then you can loop on the page in another way like this : & lt; Apex: repeat var = "p" value = "{! LiParents}" & gt; & Lt; Apex: outputText value = "{! P.Name}:" /> & Lt; Ul & gt; & Lt; Apex: repeat var = "c" value = "{! P.Child__r}" & gt; & Lt; Li & gt; & Lt; Apex: Output Text Value = "{! C.Name}" /> & lt; / Li & gt; & Lt; / Supreme: Repeat & gt; & Lt; / Ul & gt; & Lt; / Supreme: Repeat & gt;

jpa 2.0 - How to get the first member of the related collection in JPQL -

I have a related table images with a product table with which: 1. M class product {personal integer product ID; Private string product name; .... .... .... Private listing & lt; Image & gt; ProductImageList; .... .... ....} Class Image {Private Integer Image ID; Private string image name; } Class Productlight {Private Integrity Product ID; Private string product name; Private string image name; } I am trying to query a JPQL query where I bring the products and productImageList first image and return to a ProductLite object using the new Creator. @ Transaction Attribute (Transaction Auth Type .NOT_SUPPORTED) Public List & lt; ProductLite & gt; GetAllProductLite () {query q = em.createQuery (by selecting "new com.mycomp.application.entity.ProductLite (p.productId, p.productName, p.productImageList.get (0) .getImageName ())" + "from the product P "+" p.productName by order "); & Lt; ProductLite & gt; Prods = q.getResultLis...