Posts

Showing posts from March, 2011

c++ - Is there any difference these two pieces of code? -

# शामिल हैं & lt; stdio.h & gt; कक्षा ए {सार्वजनिक: int a; }; वर्ग बी: सार्वजनिक ए {निजी: int a;}; Int main () {B b; प्रिंटफ़ ("% d", बी.ए.); वापसी 0; } # शामिल हैं & lt; stdio.h & gt; कक्षा ए {सार्वजनिक: int a; }; वर्ग बी: निजी ए {}; Int main () {B b; प्रिंटफ़ ("% d", बी.ए.); वापसी 0; } मैं पूछता हूं क्योंकि मुझे अलग-अलग त्रुटियां मिलती हैं: त्रुटि: 'इंट बी :: ए' निजी है त्रुटि: 'एट ए :: ए' अनुपलब्ध है इसके अलावा त्रुटियों से क्या पता चलता है, क्या व्यवहार में कोई अंतर नहीं है कोड के इन दो टुकड़ों में से? ये अलग हैं पहले उदाहरण में, आप चर 'ए' के ​​दो उदाहरण बना रहे हैं आधार वर्ग में से एक, एक बच्चे की कक्षा में। दोनों उदाहरणों में आप चर पर पहुंच प्राप्त नहीं कर सकते। यदि आपके पास: ए * पीए = नया बी (); pA- & gt;; // यह ए :: ए को संदर्भित करेगा, जिसे अनुमति दी गई है क्योंकि इसे सार्वजनिक रूप से परिभाषित किया गया था बी * पीबी = नया बी (); पंजाब & gt;; // यह बी :: ए का उल्लेख करेगा, जिसे

RoR: Where is the "rails/info/properties" route defined? -

I am running Rail 2.3.4. When I prepare a new railway project, the public / index.html file contains a link to the name "About your app environment" which indicates "Rail / information / properties" in Dev mode, this runtime Summarizes the environment However, in production mode, a 404 page can not be found. Does anyone tell me how and where the "Rail / Info / Properties" route is configured? I should understand how this has been set. link AJAX request closed from rail / info / property Does. The properties is defined in the action rail :: information controller . There is no need to explicitly define the route because it is the default route of the train code : controller /: action / id (although there is no ID in this case and The controller rail lives in the name space.)

java - "The method setListAdapter(ArrayAdapter) is undefined for the type create" -

I fully understand the Java & amp; Android, so I tried to find useful specimens from Android & amp; Database. I found this blog with a project: I took part in this project and it works fine, but I try to create a new project to copy having had; Paste the code in it and it is not working: ( I had a problem on this line: this.setListAdapter (new array adapter & lt; string & Gt; (this, Android .R.layout.simple_list_item_1, result)); This is the error I get: Method set list adapter (Arrayadapter ) Is unspecified for this type It looks like a method in C #, but I call it the original project I can get it. Make me a mistake when you call this.setListAdapter ListActivity you probably should increase the class simply increase activity .

What is the difference between these two uses of const in C++? -

संभव डुप्लिकेट: बीच में अंतर क्या है एक const * pa2 = pa1; और A * const pa2 = pa1; (मेरे पास उदाहरण के लिए कुछ वर्ग ए है)। दाएं से बाएं टाइप करें: एक const * pa2 = pa1; pa2 केवल पढ़ने के लिए एक सूचक है (ऑब्जेक्ट को संकेतक के माध्यम से बदला नहीं जा सकता है) ए * कॉन्स्ट पे 2 = पे 1; pa2 ए के लिए केवल पढ़ने के लिए पॉइंटर है (सूचक को बदला नहीं जा सकता है) इसका अर्थ यह नहीं है कि कोई भी बदल नहीं सकता है (या वास्तव में निरंतर) const भ्रामक है, इसे केवल पढ़ने के लिए ही समझें। अन्य एलाइज़ेड पॉइंटर्स ए। संशोधित हो सकते हैं

MySQL Normalization stored procedure performance -

I wrote a hosting process in MySQL, which is currently in a table and "normal" means that For each value passed to the stored procedure, it checks whether the price is already in the table or not. If it is, then it stores the ID of that row in a variable. If the price is not in the table, then it enters the newly entered value ID, then the stored procedure takes the ID and inserts them in a table that is equal to the original de-certified table, but this table is completely normal And mainly consists of foreign keys My problem with this design is that the stored procedure takes about 10ms or more, which is too long When you are trying to work through some 10 million records, my suspicion is that performance is to be done in a manner in which I am inspecting. I.e. INSERT (argument_from_sp) duplicate key update ID = LAST_INSERT_ID (ID) in tables (first_view) values; SET @TableAId = LAST_INSERT_ID (); "On duplicate key update" is a bit of a hack, due to the

php - get_called_class hack not working with eval-code -

I am using a ge_called_class hack which is delayed in php version 5.2 (found) Allows stable binding from I have the following in my code: # db_record.php $ ac = "Forum Refresh"; $ Object = $ ac :: find ("all"); This will not work in PHP 5.2 for some reason, so I have done this: # db_record.php $ ac = "Forum refresh"; Eval ("\ $ objects = {$ ac} :: search ('all');"); On the other hand it will not work with the get_called_class function. I get an error that the file function can not read the blank space in the code. If you are using eval, then your solution is wrong. Why would your non-eval version not work? What's going wrong? What is a complete and complete error message? The user-supply version of get_called_class does a back lint and tries to open the caller's file to determine the name of the class. The reason eval fails is because the eval backtrace does not provide the file name. (Edit: Be

objective c - Doxygen including methods twice doc files -

I am having this problem where Doxygen is adding method to the document file twice. Is there a setting which blocks the auto-reproduction of the documentation for methods within the .m file? For example, I would look something like this in the document, where + + (status *) register is the user's first definition header from the XXXXXX.h file where the second is from XXXXXX.m Header documentation: / ** @ short test is more often return @ and # (description) #> * / + (Status *) Register User; Output: + (status *) Register User test nowadays Returns: & lt; # (Details) # & gt; + (Status *) Register User & lt; # (Brief description) # & gt; & Lt; # (Broader details) # & gt; Register user returns: & lt; # (Details) # & gt; Definition on Line 24 of the file XXXXXX.m The problem is resolved! I came to know that my build directory and my SSN directory were included in Doxygen. I have EXCLUDE_PATTERNS * / Svn / * * /. Added to Bu

types - Mathematics errors in basic C++ program -

I am working with a basic C ++ program to determine the area and perimeter of the rectangle. My program works well for whole numbers, but when I use any number with decimals, it is different I get the impression that I'm leaving something, but since I'm doing a full start I do not know what to do. Below is the source: #include & lt; Iostream & gt; using namespace std; Int main () {// declared variable int length; // declares variables for length int width; // declares variable for width wide area; // declared the variable for the field int perimeter; // declares variable for perimeter // details cout & lt; & Lt; "Enter the length and breadth of the rectangle:"; // tells you what cin & gt; & Gt; Length & gt; & Gt; Width; // Length and width of YouTube input; & Lt; & Lt; Endl; // input field = length * width closes; // Count of area of ​​rectangular circumference = 2 * (length + width); // Calculates the perimeter of rect

How do I call Informix stored procedures from Perl? -

How do I call informix stored processes from Perl? I use DBD :: ODBC to access the database, but I do not know how to call processes, my code is like this: my $ dbh = dbi-> gt; ; Connect ("DBI:". DBDREVEVE. ":". DBNA, DBUSER, DBPASS, {RICE ERROR =>, PrintArror = & gt; 0, AutoConnect => 1}) || Die $ dbi :: errstr; $ Dbh- & gt; Do ("executed process sp_test ('2010-05-01 00:00:00')") || Warning "failed \ n"; $ Dbh- & gt; Disconnect (); When I run it, it did not get an error, but when I check the database, I can not find anything if I run it directly in the database, then the shop process works fine. Anyone can help me? It looks weird, you need fetch () To handle your stored procedure in your statement, try changing your do () call instead: My $ sth = $ dbh - & gt; Ready ("executed process sp_test ('2010-05-01 00:00:00')") or die $ dbh-> gtstr; $ Sth- & gt; Execute () or

actionscript - how to write to an xml file using flex -

I have an application that takes live data from the Internet, I want to develop another application that can send data from the Internet Reads and writes it in an XML file (i.e. I want to save the state in an XML file) There is only one thing that is required to write this file in an XML file. I want to save the XML file to local drive (say C: Drive or D: on drive on local hard drive For example, I have a combo box, which now takes the top 10 FIFA World Cup viewing sites, now I want to write this information (ie whatever data this combo box is in the XML file For input I want a reply in Flex and I do not want to answer in the air. "Post-text" itemprop = "text"> How about?

Convert char array to int array c++ -

I'm having trouble reading four arrays to read from an array array from the file. Maybe someone can help me . This is my code: Four Vector Petron [67]; Int ipetron [67]; Archive = Fopen ("1_0.txt", "r"); For (i = 0; i & lt; 67; i ++) {fscanf (archive, "% c", and vector patron [i]); Printf ("% c", vectorPatron [i]); } Falcos (Archive); For (i = 0; i & lt; 67; i ++) {ipetrons [ii] = ato (and vector patron [ii]); Printf ("% d", iPatrones [i]); } This is because atoi is a blank-delimited string When you are giving an indicator for a single char (both are essentially char * , but its purpose and usage is different Are). Change atoi with iPatrons [i] = call to vectorPatron [i] - '0'; In addition, you can remove the vectorPatrons array, read it in a single char in the first loop, and then iPatrons Assign to the appropriate location in the array.

c# - How do I securely authenticate the calling assembly of a WCF service method? -

The current situation is as follows: We have a production. 3.5 WCF service, which is used by many applications throughout the organization, is being authenticated on the transport level using WsHttpBinding or netTcpBinding Windows integrated security. This service has a method Foo (string parameter) , which can only be called by members of the AD group, string parameter is mandatory. A new client comes into the App Play (NIT 3.5, C # console app), which eliminates the need for a string parameter. However, this particular application should only release the allowed call-permission string parameter. Identification of the client application's caller should still be known by the server, because the limit of the AD Group still applies (except for impersonation on the customer side). I have found a way, but this method is not clearly safe because "proof" can easily be deceptive, besides CAS (code access protection) seems like a possible solution, but I can not understa

xbox360 - XBox 360 Dashboard Plugins -

Is it possible to create plugins for the Xbox 360 Dashboard? I have 360 ​​in the hub for the family. So you can turn on the Xbox for example, and there you can see all the families on the dashboard to see calendars, toddl lists, grocery lists, birthdays, etc. I have a plug-ins for the dashboard around the net, so I'm guessing that you can not do it, but I thought I would check. The next option would be something like a net-top running in the family room, but it means that 2 devices, one for gaming and one for family functions You can not do I think your best bet would be to look XNA, and then create a" game "that spreads and displays all the data you want.

java - create multivalued index -

How can we create a multiview index through code? field name = "features" type = "text" index = "true" stored = "true" multidimensional = "true" / > More information can be found:

java - How can I find the most recent month end date with Joda time? -

The expiration date for one month is a one-month date, which is the last non-weekend and non-holiday day of the month. How can I get the most recent last month's expiry date with Joda time? For example, today's response will be Friday 28th May, because the month of May was the end and the most recent month of the end of May. datetime. DayoffmonthGetmaximumview () returns on the last day of the month. To check this, get the day of the week on that day whether it is in the weekend.

c# - SOS: file recover -

Hello all, I made some modifications on AC sharp file in Visual Studio 2008 Express, and committed the following actions: 1. This C-sharp file, through open Notepad, tried to save some modifications in this file, while Notepad was opened by 3.Ctrl + C and Ctrl + V to make a copy in this file 4. Close view Studio 2008 and Notepad Then the C-Disappears File C! Please <> It goes forever. You can actually expect that the only thing is to add the situation with the appropriate whiskey. If it used to work under the drain in months, then I would choose an ancient age with a plastic bottle.

java - Ugly swing fonts under ratpoison -

I am writing a small application in the swing, in the form of my window manager (with wmname LG3D) and Netbeen IDE Using my application fonts right from the KDE or directly with Netbeans. The mouse is started with the spark, they look like this: Click for full size The KDE system is probably adding more fonts when it starts. Run it on KDE and in the Rat Grid: fc-list -v | Compare the font list to see Grep "file: \: fullname: \ | ^ $" and is unavailable. If some directory is missing, add it to /etc/fonts/fonts.conf, in a new entry. If only some fonts disappear, you can then copy it to ~ / .fonts (assuming you have this DIR fonts configured in .conf) If all fonts are the same, try transferring all the configurations to the temporary directory in /etc/fonts/conf.d and fc-cache -f < / Pre> and test If it looks better, start adding another config back again, run fc-cache -f again, again the Java app Restart the test. Java fonts Finally, yo

Manual merge on GIT -

Image
I develop with a very restart code in a proprietary script language that contains most of the configuration inside the code. The obvious problem will be the difference between testing and production environments, and in fact I am trying to manage with GIT. Env is quite unstable as my test, I thought I should make a branch in GIT for this, while the changes have been made (and keep the code with the test configuration there) and accept the code After that I will merge it into production. Well, when I ask GIT to merge my branches, it does a great job with code. But the configs are also migrating well and I have a file-by-file To open it, change it and change it back. Anyway, I can disable automatic mergence with GIT and there is no danger because the code conflicts are manually mixed with WinMerge or after some time? The code is small, in fact and since I have to edit it anyway to implement the configuration ... ps: Please note, I am not sure how Win-Merge on GIT Configure

c# - Is the Windows dev environment worth the cost? -

I've recently taken steps for Windows development from Linux development. And as much as I'm a Linux enthusiast, I have to say - C # is a beautiful language, Visual Studio is great, and now when I bought myself, my wrist has hurt a lot using the mouse. But there is one thing that I can not get past: costs. Windows 7, Visual Studio, SQL Server, Expression Blend, VEME, Telec, MSDN - We are talking about thousands of developers for each project! You are definitely doing something for your money - my question is, what is its value? [Every developer does not need all the above-mentioned devices - but have you ever heard of someone writing a C # code without a studio? I have paid without having to pay any development tool to Linux software on huge software projects.] Now, obviously, if you already have a Windows shop, then it's all developed doer. And if you want to develop the Windows desktop app, then you can not do this in Linux. But if you were starting a new web appl

How place a link below a picture that is displayed using fancybox (jquery)? -

In the first picture of my website (two people), when you click on it, a url address shows " The title "used the item is an easy way to do this but instead of putting a link? Code: & lt; Div class = "pusher" & gt; & Lt; H3 & gt; & Lt ;? Php Echo L ('Showcase 1_H3'); ? & Gt; & Lt; / H3 & gt; & Lt; P & gt; & Lt ;? Php echo l ('showcase1_p'); ? & Gt; & Lt; / P & gt; & Lt; Div class = "pic" & gt; & Lt; An id = "showcase1" heading = "studyatbest.com" href = "picture / showcase 1 page" & gt; & Lt; IMG src = "picture / showcase 1t.png" /> & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; Yes, you need to use title format Is: option. Function headlink (title, current, current index, currentopts) {return '& lt; Div id = "title-link" & gt; & Lt; Span & gt; &a

jQuery after show() assumes that display:inline is :hidden. Why? -

With jQuery 1.4.2: The hidden filter is not filtering hidden elements, but I made visible until The given call show () filter assumes that it is still hidden. Is this a bug or am I missing something? Consider the following code: $ ("td.ms-authoringcontrols> span [id * = '_ parallelApprovers']: hidden: first"). CSS ("Display") "None" $ ("TD MMS-Astrangle Controllus and Spread [id * = 'parallel appwire']: hidden: first"). Show () Object $ ("TD MMS-Astring Controls and Spot [id * = '_ parallel episode']: hidden: first"). CSS ("display") "inline" // ?? Let me scratch my head ... $ ("TD MMS-Astrangle controls and spin [id * = 'parallel epivov']: hidden: first"). (": Hidden") is true "Display with element": "inline" is visible in the browser, but it is still hidden Instead of "inline", you " No one "because the: The h

sql server - I need to do a view in sql that returns the latest invoice date for each company -

After I think that is dbo.companies and a company table is companyId As a column I have an invoice table which is the invoicecompanyId column with dbo.invoices (which will be replaced by companyId And it also has a column called invoice . Any companies I am trying to achieve, they will have every companyid with the latest code for all companies. A scene of Land. I did the following but I do not know how to filter for the latest invoice, it returns all the invoices of all companies and I need the latest invoice for all companies < Pre> SELECT TOP (100) PERCENT 'A' + SUBSTRING ('000000', 1, 6 - LEN (varchar (10)) as cast (dbo.companies.companyId) + cast (dbo.companies In the form of .companyId varchar (10)) as client_id, dbo.invoices.invoice.date include interiors from dbo.invo_Date as S_Inv_Date select SUBSTRING ('000000', 1, 6 - LEN (CAST (dbo.companies.companyId as varchar (10))) + CAST (Dbo.companies.companyId AS varcha

sql - How do I cast a decimal field to a date field in DB2 AS/400? -

I have a decimal field with a date in the AS40 format: 1100614 I have tried : cast (given as of DATE) but I can not put a decimal on DATE, while < Li> It can be done, but it is not easy. If you need to do this often, then it may be time to write your own function to do this.

ASP.NET :: Can a textbox control's onblur/lostFocus event trigger a server-side event? -

I am trying to attach a server-side event to enter the city. Below is a and asp: textbox id = "textzipcode" runat = "server" cssClass = "inputtext" column = "10" maximum length = "10" & gt; & Lt; / Asp: textbox & gt; Since there is no wrong focus to capture, does anyone have any luck to do this work? Sure, why not? Just attach a javascript handler and call it an AJAX action.

database - How do I connect to SQLite db file from c#? -

I am trying to connect to sqllite db with a C # application I have never worked with SQLLite before is. var connectionString = @ "data source = 'c: \ testdata \ StressData.s3db'"; Connection = new SQLiteConnection (connectionString); Connection.Open (); When I try to open the connection the following exception: System.NotSupportedException: The format of the given path is not supported. on System.Security.Util.StringExpressionSet.CreateListFromExpressions System.Security.Util.StringExpressionSet.CanonicalizePath (String Path, Boolean NeedFullPath) (String [] str, Boolean NeedFullPath) Am I Incorrect tax thanks .. nick update: I change the 'data source' as a 'data source' Suggested to me Now I get a new error: After changing it, I get a new error: System.ArgumentException: Data source can not be empty. Usage: Memory: To open a memory database in System.Data.SQLite.SQLiteConnection.Open () Any more suggestions found. &

Rails object inheritance with belongs_to -

I have a simple relation between the report and the chart, I have a problem that is causing the problem Is that my chart model is a parent whose children are Then in my report model I have class Report & lt; ActiveRecord :: Base is - Medium: Chart End And my chart model is a parent, where all the succession from the pie, line, bar chart are I do not know where it is located: the report is in the chart model or is under the children of the chart model. I get errors when I try to use the chart. Report because the object is of "class" type Report class for undefined local variable or method # #: 0x104974b90> Chart model uses STI Which says its pulls .. 'Ling' from the chart_ type column in the chart table .. What am I missing? Edit chart / \ pie line / \ / gender gender < P> I am transforming an object immediately, type gender, or sex hopes that it helps a bit more. I feel that the reason for this @ chart.update_attributes (p

sql - TSQL: Call a stored procedure from another stored procedure and read the result -

I have a stored procedure that ends with a SELECT, a record set I give it in some way In the stored procedure, I can call: EXEC process @ ultimate How to obtain returning recordset? Thank you You can create a temporary table and then INSERT #MyTable EXEC process @ You can use . There are some others.

Using PHP with the default Mac Apache + PHP installation -

I am starting to solve PHP mysteries and I have configured pre-installed Snow Leopard PHP and activated Apache server have make. System Preferences is so good: if you put a PHP file in your ~ / site directory, then it works. Since I have a project in my code / project directory I / cites dir code / project / one-project / php-diam and bang !, a 403 error: Access forbidden I am changing the permissions of the diaries for 777, but no luck. Is anyone using default Snow Leopard configuration for PHP development, and if so, how do you link in your codebase Thank you in advance, Juan Head over me: this option can be the followSymLink option in Apache ().

python - SQLAlchemy DetachedInstanceError with regular attribute (not a relation) -

I have just started using SQLite and have received a separate instant error and can not find much information on this. Has pie. I am using an example out of a session, so it is natural that if SQLAlchemy is unable to load any relationship, if it is not loaded already, however, the entry I am entering is not related There is no connection to this object in fact. I was getting a solution like eager loading, but I can not apply it because it is not a relation. I tried to "touch" this feature before closing the session, but it still does not stop the exception. What can be the reason for this exception of non-relational property, even then it can be reached successfully once before? Any help in debugging this issue is appreciated. Meanwhile, I try to get a reputable stand-alone scenario and update it here. Update: This is the actual exception message with some heaps: file "/ home /hari/bin/lib/python2.6/site-packages/SQLAlchemy- 0.6.1-py2.6.egg / sqlalchemy / orm /

asp.net - How to export large data to Excel -

In my asp.net application, I have the Criteria page when the user clicks the report button, first of all to a new page The datagrid is tied to the results, then this page is exported to Excel to save the content type method. This usually works, but when large amount of data comes, the system.outofmemoryexception is thrown away. Does anyone know a way to fix this problem, or what other useful techniques have to do? This is probably happening because your application is trying to create a complete Excel spreadsheet in memory and then After completing it, it is distributed to the user. For large datasets, you can easily access all the available memory, which is also applying to dramatically slow down for most users. Instead, you can try to stream data to the consumer. Despite this how big your dataset will be, it will use the same memory you can get the bytes of Excel spreadsheets, or just convert your data to CSV, and then you can set the HTTP Response Type and let it stream

c# - Why are member constants available even if there are no instances of a its class? -

1) Why not even the member class is still stable? 2) Is the only reason why the compiler needs constant evaluation in time compilation fully, while the variable variables have been replaced with literal value? 3) Since the string is also an object, I would think that an error will occur in the following, but it is not. Why? class A {const string b = "this works"; } thanks constant ( Declared by const ) - so there is no need for an example. A const value is embedded in assembly, it has been declared, and then it is used every time , That value is also copied to the calling code, so its execution can not be evaluated on time - if you want that behavior, then use to read steady . String literals have constant values ​​C # language specification is basically a metadata representation for wire in IL, so that they can be specified as constants. String constants have other interesting properties such as interning . One point of interest: You ca

Why are Objective-C instance variables declared in an interface? -

I'm just going into Objective-C (Java is my primary OO language). The example variable of the object in the interface instead of the defined class looks strange. I am used as a public API definition for an interface, which is nothing other than the method signature (here the constraint is not counted). Is there any reason that the state is defined in the interface (even if it is private) and behavior is defined in a class. It just sounds weird because things are state + the definition of behavior will be divided into two different places. Is there any kind of design benefit? Is there a pain in the rear issue that you are forced to deal with only objective-C? A non-issue, just different? Can you put something in a square and I have not yet killed that part in my book? UPDATE implement the answer given below In the example variable was declared written before the language attribute was declared. The basis of the question is no longer valid as it is said, nothing

Intellij Idea 9/10, what folders to check into (or not check into) source control? -

Our team has moved from Netbeans into Intelligence 9 Ultimate and needs to know how files / folders Should be excluded from control because they are not "workstation portable": they refer to references that exist only on a user's computer. As far as I can tell, Intellij wants to ignore most of the .idea project .aide / artifacts / * .idea / inspectionProfiles / * .idea / Copyright / * .idea / dataSources.ids .idea / dataSources.xml .idea / workspace.xml However, it seems that to check the .iml files present in the root directory of each module. I was basically checking into the entire .idea directory via the command line, which is clearly not known what should be "ignored" by Idea. Is the entire .EDIA directory generally ignored? We have covered this question. The IDEA directory is the replacement for the old .pri (Idea Project) file, and if you want to share the project between users, then you should go to the .idea folder (with the exceptions

objective c - Basic iphone timer example -

OK, I've searched online and even seen in some books for answers because I'm apple For the NSTimer I am trying to implement 2 timers on the same scene that each has 3 buttons (START - STOP - reset) The first timer is 2 minutes and then the beep Is counted from. The second timer is counted from 00:00 indefinitely. I'm assuming that all codes will be written in 3 ways behind the different buttons, but I have been completely lost trying to read apple documents. Any help would be greatly appreciated. Actually what you want is an event that sets fire to every second, or Probably at intervals of 1/10th, and while the timer is ticking, you will update your UI. The following will create the timer, and add it to its run loop. Save the timer somewhere so that it is necessary when you can kill it. [NSTimer *] createTimer {// Make timer run on the loop return [NSTimer scheduled timer with timer: 1.0 target: self selector: @silator (timerTacket :) user info: zero repeat

Chrome extension and history.onVisited event -

UI, and every time a particular web page visits, it displays a warning dialog I was trying with the following code without any results: manifest Json background.html & lt; html & Gt; & lt; top & gt; & lt; script & gt; Chrome.history.onVisited.addListener (function (HistoryItem result) {if (result.url == "http://my.url.com") {Warning ("my message");}}); This code What's wrong in? Thanks Take history out of the ceremony and You are OK: gt; Top & gt; & lt; script & gt; Chrome.history.onVisited.addListener (function) {If (result.url == "http://my.url.com/") {Warning ("My Message");}}) & lt; / script & gt; & lt; / head & gt; Also keep in mind that I've added slash to the end of "because the result will be removed." < / Html>

c# - Calling a method on an object a bunch of times versus constructing an object a bunch of times -

I have a list that is my data and I want to add a special method (some function) to each element in the list I want to apply Calling a method through the creator of an object is slowing down while calling the same method several times to make the same thing immediately? In other words, it is: for (int i = 0; i is slower than: myClass someObject = new myClass (); (Int i = 0; i & lt; myData.Count; i ++) for some objects. SomeFunction (myData [i]); ? ? "> Your process of working from an earlier perspective can be a significant increase, it can also put memory pressure on Windows, so that other apps can be swapped on the disk. Also This CLR will put a lot of pressure on the garbage collector, because each new object you make should be tracked to collect. It will be slow, size and the number of objects you are making A lot depends on your reputation.

network programming - Need help in understanding the mapping of user-space send, sendto, sendmsg to kernel-space sendmsg -

I am trying to implement my own transport layer protocol in Linux for one experiment. I am going to use the socket interface and am integrating my protocol using sock_register. For Proto_ops I can see that parameters for sendmsg and recvmsg are struct (kiocb * iocb, struct socket * sock, struct msghdr * msg, size_t len, int flags). But sending three types of user APIs are sendto, sendmsg. Of these three, only SMSGG has the parameters of MSGDR. I think the other two APIs are incompatible with the kernel given to the kernel-space send mg functions by the kernel. So what happens when we send and send the U-Space API? I hope that I am clear .. Thanks, Dada Send () sendto () : is implemented in the context of Send (S, Buff, Lane, Flags); is equal to , sendto (s, buf), lane, flags, zero, 0); sendto () in turn has been implemented in the context of sendmsg () . send (s, buff, lane, flags, eder, adr_len); has been implemented in the context of Userspace interface: st

mysql - Experience with direct data access components -

I want to know about the experience of using direct data access components like Dirart's direct connection, which allows direct connection On mysql server instead of Client Library or ODBC You can use almost all of the popular databases (MySQL, SQL Server, Oracle, Firebird, Postgrowth SQL, DB2, SQL, ...). High-Speed ​​Basic Direct Access, many unique futures, integrated APIs, excelcent support for access to cross-database features.

redirect - Monitoring for postbacks with PHP? -

I have a PHP page with content that my users can see when this page returns a POST , I want to redirect the user to another page. My problems are: How thanks For the second question, the header () will work if you click on any page Use this before outputting the information. However, if you print HTML or keep the HTML before it, then it will give an error. Edit : In response to Todd's comment, you must do Haroon Haron suggested the page to save $ _POST data to a database or a file (make sure you Secure!), As you would with any $ _POST data, then you will have to use AJAX to get a response from a second PHP page, from where you saved the data from the existence of updated data Checks. If the feedback comes back true, then you redirect using a JavaScript redirect. The only way to do this without using AJAX is to check that it will refresh the page using an HTML meta refresh element at intervals over time, $ _POST data has been received, the HTML will refresh

asp.net - sorting a gridview alphabetically when columns are codes -

I have a gridview that is populated by the web service search function, some columns in the grid are the template fields, because the return value Datasets) are IDs- I then use these IDs to see the values ​​when the Rowdabatt event triggers and populates a label or something like this means that my sorting for this ID / Lookup column The queen has seen IID instead of the value of the text and actually populates it with the grid (though I place an ID in the grid datacase). What I want to do is be able to sort the code for the top of these special columns instead of the text value seen above what I was going to get around it when the figures Returning from search, and by adding more and more columns to the values ​​of text and looking at all, thus able to sort directly from the manually added column. Is there another way to do this? As the approach looks like a bit of a board, though I think it removes the visible person in the Rowdabound event .... My sorting function will pas

dom manipulation - jquery insert a html block so it starts before the target and ends after the target - is this possible? -

I think you should use HTML code before and after the target by using before < You can add the inserted block of, insertBefore () , after and insertAfter () . I tried to do something like this & lt; Script type = "text / javascript" & gt; ("& Lt; div class = 'myContainer' & gt;"); $ ("P"). After ("& lt; / div>" $ (document) .ready (function () {$ ("p").);}); & Lt; / Script & gt; & Lt; P & gt; Paragraph & lt; / P & gt; But inject me seems to create closed tags automatically, is there a way around this? Cheers There is a function for this :) Use, like this : $ ("p"). Wrap ("& lt; Div class = 'myContainer' & gt;"); This is for each & lt; P & gt; Wrapper independent, it changes it: In: & lt; Div class = 'myContainer' & gt; & Lt; P & gt; Paragraph 1 & lt; / P & gt; &

wpf - What should I use to replace the WinAPI Beep() function? -

I've got a visual C + + / CLI app that uses beep to pinpoint good and bad results (when the user ' currently, I get good results Use low-ending beep and use high vertical beep for good results: if (goodResult == true) {beep (1000, 40);} and (beep (2000, 20);} This works fine on my Vista laptop, but I have it on other laptops Have tried and started playing some sounds for short time (they click more like a beep) or so I have two questions: Is there any (simple) way I can play a small .wav file or something similar (preferred solution). < / Ol> function traditionally uses PC speaker, and I think that today It is more or less obsolete. I think that is controlled by the functionality of the laptop's BIOS, and dependent such hardware. I suggest that you use PC: S soundcard to play sound instead. For example, create two tons as WAV files, then give them examples.

c++ - Why is std::tr1::shared_ptr<>.reset() so expensive? -

Some of the codes that are heavily shared_ptrs, I found that the reset () was surprisingly Costly For example: structure testing {int i; Test () {it-> I = 0; } Test (int i) {it-> I = i; }}; ... auto t = make_shared & lt; Test & gt; (1); ... t. Reset (some pointertoast object); Detect reset () in the previous row (under VC ++ 2010), I found out that it creates a new reference-count object. Is there an inexpensive method that reuses existing regga-count and does not bother the heap? In the general case, you can not reuse existing ref calculations because other if You can use somePointerToATestObject for make_shared () s or command_property s or weak_peter s Can be used. , Then the implementation may be use a heap allocation for both the referee calculation and the object. This will save you one of the heap allocation.

java - Full GC real time is much more that user+sys times -

We are running on JBoss with the approved maximum heap size of GB on a Web Java-based applications 1.2 (total machine Physical memory is 2 GB). At some point the application stops responding (to customers) for several minutes. After some analysis, we came to know that the culprit is full GC. Here is an excerpt from a verbose GC log: 74477.402: [Full GC [PSYoungGen: 3648K-> 0K (332160K)] [PSOldGen: 778476K-> 589497K (819200K)] 782124K-> 589497K (1151360K) [PSPermGen: 102671K-> 102671K (171328K)], 646.1546860 seconds] [ Times: user = 3.84 sys = 3.72, fixed = 646.17 seconds ] what I do not understand Now how is it possible that the real time is spent on full GC is about 11 minutes (646 seconds), while user + sys times is just 7.5 seconds. For 7.5 seconds, I spend more than 200 MB cleaning up the old generation to take more logical time. Where does all the other time go? Thank you very much. After The other time? It is most likely that your application i

c# - HttpWebResponse get mixed up when used inside multiple threads -

will I have a thread that data from the web service in my application I actually am open I just a URL and XML I get the output. I have some formulas that constantly do this but with different URLs. Sometimes the results are mixed XML output is not related to a thread's URL, but it is for any other thread's URL. In each thread, I will create an example of class GetWebPage and call method to get this example. This method is very simple and mostly based on codes from MSDN documents. (String Upyogkrtaagent, String url, String user, String pass, Int timeout, Int Reedraittaimet, Vebhaiderclekshn WHC) {string buffer = string. Empty; HttpWebRequest myWebRequest = (HttpWebRequest) WebRequest.Create (url); If (! String.IsNullOrEmpty (userAgent)) myWebRequest.UserAgent = userAgent; MyWebRequest.Timeout = Timeout; MyWebRequest.ReadWriteTimeout = Readonly Timed Out; MyWebRequest.Credentials = New network credentials (user, pass); String [] header = whc.AllKeys; Foreign currency (strin

datetime - Sharepoint DateTimeControl: set it to null -

How can I set the selected value of a SharePoint DateTimeControl? When you first load it into a page, no price is selected (even if the returned value is not properly, but someone can see it with IsDateEmpty). How can I set the program back to the initial, empty value? Thanks found it. myDateTimeControl.ClearSelection ();

Need to Export to CSV all of the data that is in JQGrid -

I have created a custom button to export CSV inside JQGrid, here's a little bit of code The problem is, I need all the data, not just the pages presented in the UI, so I want to use the brain-built search with all the parameters associated with it, But I '& amp; Opercess = csv ', I do not know how to go about it, should I use a custom button or something else. You may loot the method of jqGrid from ExcelExport grid.import.js and maybe This is what you are looking for.

Matlab vs. Java -

How is matlab slower than Java? Is there a way in which it is fast? Why do you want to compare these two? There is a numerical computing environment, whereas Java is an object-oriented language.

android - pass values from one screen to another? -

I have to pass the data (string) from one screen to another on the screen when I click on the button from the first screen to the next screen Must give value. You can pass additional data in the intention of starting another activity: myIntent = new intent (view.getContext (), NextActivity.class); MyIntent.putExtra ("Additional", ID); StartActivityForResult (myIntent, 0); You can use additional in the open system of your profile activity: int id = getIntent (). GetStringExtra ("Extra"); If you are new to Android, this can help you read examples in Developer Docs, like

function - How to specialize a type parameterized argument to multiple different types for in Scala? -

I need a back-check (please) I have written in an article () I believe in Scala that you can not specify a function that takes an argument that is a function with an unbound type parameter. I have edited this article to simplify and simplify the example. The following code introduces a feature GenericFn which imitates the Scala Function1 attribute, in addition the function has a free-type parameter: Object typeexample { Specialty numberBage {DF result: string} class A extended number of fractions {DF result = "A"} class B expanded number of base {DF result = "B"} attribute GenericFn {def} [X & lt; : Number Buzz] (X: X): String} DF Specialist and Aptitude (F: Generic FN): String = {F [A] (New A ()) + F [B] (New B)) DIF Main (Args: array [string]): unit = {val f = new genericFn {def} [x and lieutenant: numberbase] (x: x): string = {x.result}} println (specialized endepeptius (f))} } This works, but is there a way to do this without the GenericFn attr

php - WYSIWYG editor security question (preventing malicious input) -

I am using jWYSIWYG in a form, I am making that post in the database and wondering if you How can a malicious user try to inject the code into the frame? Does the editor need a bracket to display styles (which I normally used to bar during the post process)? I have encountered similar situations, and I started using it on my PHP backend That which can stop the vector of each attack which I can think of. It's easy to set up, and will allow you to whitelist the elements and attributes. It also prevents XSS attacks which can still exist using htmlentities.

c# - iterating through an array -

Although the array is not a problem, but if I want to increase only when the method is called? I'm not sure this will work but there is an easy way to do this int counter; String [] myArray = {"foo", "bar", "something", "and", "here"}; Private string GetNext () {string myValue = string.Empty; If (counter What is the Iterator you want Private Inenimbable & lt; String & gt; My intent () {foreach (myArray in String I.) {yield returns i; }} However only myArray.GetEnumerator () is calling; string [] myArray = {"foo", "bar", "something", "else", "here it has been used."}; IEnumerator & LT; String & gt; MyEnum; Private string GetNext () // believe that at least 1 elements will be present in my array. {If (myEnum == faucet) myEnum = myArray.GetEnumerator (); If (MyEnum.MoveNext ()) {myEnum.Reset (); MyEnum.MoveNext (); } Make my ultimate return. Prese

Best way to display rss feed using JQTouch and JQuery -

I want to develop a JQTouch web application that will display a list of titles from RSS feeds and then display the title and the details When the title is used. Can someone suggest a tutorial or resource that can help me? I have never messed with JQTouch, but Google offers you any The feed tells about the type of feed. Perhaps you can use one of these Note: You no longer need to use the key with the Google Feed API.

error handling - WCF net.tcp server disconnects - how to handle properly on client side? -

I'm stuck with a problem now. I have a Silverlight 4 app (which runs OOB by default). It uses WCF with net.tcp as the means of communication with the server. The client uses the central example of the WCF client proxy. As long as everything runs on the server, everything is fine. If I kill the server in the middle of everything else, then I swept into an avalanche of exceptions on the client side (lost connection, channel faulty etc.) etc.) Now I am exploring a way to handle it in a clean and centralized manner (if centralized is possible). In SL App, a central client object is sitting in App.cs (Public Static MyClient Client {get; set;}), which starts when the application is started. Any ideas on how to organize any connectivity issues on the client object properly? You mention that you central for example the WCF client proxy . If this is the case, when a server error occurs, the proxy goes to the foisted position to keep things centrally, you enter the clien

groovy - How to access controller dynamic properties within a base controller's constructor in Grails? -

Actually, I want to be able to employ members in a base controller to design an object created within the filter, in which From each controller is extended. Any possible way to do this? How I tried here, but did not get it to work. What am I trying to achieve, expanding all of my controllers? The constructor of a base controller base controller will be used to provide value to its members, those values ​​should be Sessions will be pulled from the map. . Example below File grails-app / controller / HomeController.groovy: class HomeController BaseController extends {render def index = {username}} < / Pre - << p> file grails-app / controller / BaseController.groovy: abstract class BaseController {public string username public BaseController () {username = session.username}} While running the app, the output shown is: 2010-06-15 18:17 17: 16,671 [main] error [localhost]. [/ Webapp] - exception model starts to tell listeners to send class org.codehaus.gr

actionscript 3 - Mouse move panning -

I am trying to scroll a series of thumbnails horizontally based on mousex status. I can get it to scroll, but it is very choppy and for some reason it's not reading my starting and ending number, so this scrolling will stop. Can anyone point me in the right direction? Thank you. var thumbBounds: object = new object (); ThumbBounds = thumbContainer.getBounds (this); ThumbContainer.addEventListener (MouseEvent.MOUSE_OVER, Setscrolling); Scrolling Private Function Set (Me: Mouse Event): Zero {thumbContainer.removeEventListener (MouseEvent.MOUSE_OVER, setScrolling); Stage.addEventListener (Event .ENTER_FRAME, scrollThumbs); } Private Function scrollThumbs (E: Event): Zero {if (mouseX and lt; = thumbBounds.x || mouseX> thumbBounds.width || mouseX and lt; thumbBounds.y || mouseX & gt; thumbBounds.height) {ThumbContainer.addEventListener (MouseEvent.MOUSE_OVER, setcrolling); Stage.removeEventListener (event .ENTER_FRAME, scroll thumbs); } If (thumbContainer.x> = 0) {thumb

Silverlight 4.0 question - synchronous calls to asmx web service -

I have a Silverlight problem. I have to deal with a large heritage app, in which some web services exposed (regular asmx, not WCF). What I need to do is build the Silverlight app that consumes those web services. Due to business logic, I should be the only Web method to call synchronous with the Silverlight app. I was able to create web service consumption but only asynchronous because it would be the default Silverlight behavior Is there any way to create asynchronous call synchronous in the Silverlight? I looked here and googled around but only came across WCF examples. I appreciate that someone will find a code example for regular asmx web service, I use Silverlight 4.0. Thank you! Silverlight does not support sync calls, even TCP / IP stack async is also there. In some cases you need the results of "WebsiteCall-A" to send "WebSiteCol-B", then you have to type the code to match them all. For example, webservice-call-a-> callback-a-> process

html - Formatting an indented list in CSS -

Assume that I have a list with an arbitrary number of indentation levels, such as: < If I'm displaying this list in an HTML document, how can I use CSS to handle indentation? There may be an arbitrary number of indentation levels (though the practice is not going to be 5 or more). I do not want to create an "indent 1" square which is 10 pixels, an "indent 2" square that indents 20 pixels - what is clumsy is it possible to create a general rule , Which, on a specific value basis, indent on the basis of the position of an element in a particular value or hierarchy? You will also do this: More style and gt; Elements do not have a bullet if you like.

eclipse - error:Selection is not within a valid module -

When I try to capture my JSP files from glass fish, this error is detected, what is the problem is? As mentioned in this, it may be related to: < Blockquote> The present handling of the project module is such that the name of the project .settings / org.eclipse.wst.com for deployments - everything "To work properly. If they do not match, I believe that the symptoms you are experiencing are one of the" things "that goes wrong. That's it. Original project In areas such as seeing a shared project in the same project I was able to solve this problem. now I did not error

date - How to calculate year from entering my age using php -

How can I calculate the year to enter my age using php? Example: I'm entering my age as 24. So I need to get the year as 1985. How can this be done? Thank you, if you know simple math, then you know that 2010 - 24 - 1 = P> or $ year = date ("y") - $ theirage - 1 ... but only By giving an age, it shows which year they are born. For example: If date is 30 December 2010 and they say that they are 24, you are still saying that they were born in 1985 when the possibilities are very much, Too many high that they were actually born in 1986. You can not trust your age on your birth year. Edit If this was not very clear: Today's date is June 16, 2010. So be 24 years old, I have to live somewhere between June 17, 1985 and June 16, 1986. It is about half of the birth centenary which will be in 1985 and about half of 1986, which leads to a lot of inaccuracy.

java - Is it okay to use try catch inside finally? -

I am using a buffer author and my code, finally closes the author in the block. My code is the same. ........... bufferdirector buffed wight = null; Hold {TheBufferedWriter = ..... ......... .....} (IOException anException) {....} Finally {tryBufferedWriter.close (); } Hold (IOException anException) {anException.printStackTrace (); }} I have to use the capture inside the clean up code because the buffarder can throw an IOException, I do not want to throw this exception to Calling Methos. Is it a good practice to finally use a try hold? If not, what is the alternative? Please suggest. Regards, Himal Use this to be done in a good way USA A native tribe of It keeps your code organized and eliminates some boilerplate which is contained in Java. You then become the codes: BufferedWriter theBufferedWriter = null; {TheBufferedWriter = ... ...} Catch (IOException anException) {...} Finally {IOUtils.closeQuietly; } Very good and more expressive.

vpn - Replacement for Hamachi for SVN access -

My company has been using Hamachi for years to use our SVN repository. We have a small but widely distributed development team with each programmer in a different country working from home, the server is hosted by a non-technical in our central office. Hamachi is useful here because it has a GUI and supports remote management. This system works well for a while, but recently I have gone to the country with poor internet speed. Hamachi will no longer connect to 99% of the time - instead I get a "check ..." message which is not resolved. This is a latency issue, because the same laptop will connect without problems when I cross the border and connect using a different ISP with better speed. So I really have some other VPN / protocols that handle latency better. It is not easy to install and configure Apache or IIS, a technical expert managing the repository, so it seems that the HTTP Is out. I tried to convince my boss to go to a web hosting company, but he does not tru

interface - iPhone App Development - mathematical sysmbols -

I am starting a lot - but I have a lot of experience in connection with electrical engineering and formulas - over 30 years value! Trying to create an app for the iPhone loaded SDK, bought a Mac myself, found a "Chapter" page written by John in some alpha aviation - who tried this site. How do I do this - for example I carried 400 / 1.732 forward - it was a web address with a light, as it came! How can I get mathematical symbols like - sqare root, power, subscript, superscript I would like to include some "calculator" pages, but how does it come to appreciate that I am only doing it for the past week or so - so I'm still very wild that I wrote many years ago. Can anyone help? Cheers Unicode supports iPhone, which is quite mathematical The easiest way to start a good set is to see "special characters ..." in the editing menu of Xcode or to make a lot of any Mac application. Find a symbol that you want and search for Unicode or UTF 8 equivalen

python - Operating on rows and then on columns of a matrix produces code duplication -

I have the following Python code to check if there are any lines or columns that have the same values: / P> # Exam Rows - & gt; Check for each line to win for i for category # (self.height): # For each line ... firstValue = None # Start the first value placeholder for J in the range (self.width): # For each value in the row (Jammu == 0): # If this is the first value ... first value = b [i] [j] # and remember it: # Otherwise ... if b [ii] [j ]! = First value: #If this is not the same as the first value ... First value = none # Reset the first value # Stop blocking this line, if there is no win here (first value! = None): # If the first value is set # The first value placeholder now considers the winning player returns the code first # Return it #Test column - & gt; Check each column for a win for i in #category (i.width): # For each column ... firstValue = None # Start the first value placeholder for jm (self.height) in the range: # For each value in column (J == 0): #

jquery - How to select elements from a set that are children of another element -

The title is a bit confusing but here's what I'm after: P> I have a set of elements with all the h3 elements in a page. In jQuery Rules: var mySet = $ ('h3') . > I need to find all the items of mySet in myContainer . Any thoughts? I'm sure there is something magical a liner for this but I can not think of anyone. Instead I manually not loop and .closest (myContainer) through each element in the set ) or use something like this to determine the relationship. Note that in my scenario, I can not use a new selector like $ ('div # foo h3') (this will be very easy) because I have real Selector values ​​are not accessible. Therefore, it has to be dynamic. Interesting assume that you have two jQuery collections and you do not know the selectors : var myContainer = $ ('div'); Var mySet = $ ('h3: even'); Filters seems to work: myContainer.children (). Filters (mySet) Be aware that this is as far a

c# 4.0 - Iteration over a linq to sql query is very slow -

I have a view, AdvertView in my database, this view includes some tables (ads, customers, attributes). After that I have a simple Linux query to bring all the advertisements for a customer: Public InenMerebal & lt; AdvertView & gt; GetAdvertForCustomerID (int customerID) {var advertlist = advert to _dbcontext.AdvertViews where advert.Customer_ID.Equals (customerID) select ad; Return advertisement list; } Then I want to map it to the model of my model: public list & lt; AdvertModelItem & gt; GetAdvertsByCustomer (Intel Customer ID) {List & lt; AdvertModelItem & gt; LstAdverts = new list & lt; AdvertModelItem & gt; (); & Lt; AdvertView & gt; AdViews = _dataHandler.GetAdvertForCustomerID (customerId) .Olist (); Foreign exchange (see ad view in ad view) {lstAdverts.Add (_advertMapper.MapToModelClass (adView)); } Return lstAdverts; } I expected that there are some performance problems with SQL, but the problem is with the .toList () fu

jQuery table replace -

हमारे पास एक टेबल है: & lt; table & gt; & LT; टीआर & gt; & Lt; td चौड़ाई = "10" & gt; 1 & lt; / td & gt; & Lt; td & gt; पाठ 1 & lt; / td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt; टीडी चौड़ाई = "10" & gt; 2 & lt; / td & gt; & Lt; td & gt; पाठ 2 & lt; / td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td चौड़ाई = "10" & gt; 3 & lt; / td & gt; & Lt; td & gt; पाठ 3 & lt; / td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td चौड़ाई = "10" & gt; 4 & lt; / td & gt; & Lt; td & gt; पाठ 4 & lt; / td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td चौड़ाई = "10" & gt; 5 & lt; / td & gt; & Lt; td & gt; पाठ 5 & lt; / td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td width

What is the best way to launch HSQLDB for unit testing, when working with spring, maven and hibernate? -

In my project, I can successfully test the database code I'm using Spring, Hibernate, HSUKDDB, ZyOnit and Maven I am The catch is that at present I have to launch HSQLDB manually before running the test. What is the best way to launch HSQLDB with the technologies used? I am assuming you are referring to hsql . / Code> Then an inprocess version of HSQLDB automatically starts, which stores the contents in memory, does not need to start any external server.

android - Is there any way to tell what folder a drawable resource was inflated from? -

Do anybody know which folders will be resolved by the Android system when I click on the resource ("code> drawable-length < / Code> vs. Droplet-noelg , for example)? I want to make sure that it is loading resources as I expect it (for example, to ensure that To do that the tattoo is not actually ldpi and not mdpi ) because it is on the boundary line Even after receiving it from the resources, I could always print the draw size of the qualified, and I could have examined against different image sizes, but it was a pain Apart from this, my company allows its customers to have their skin before the release of their app, so after it becomes dark, I will not be able to rely on that method. I tried! Code> resources.getName (ResId)) but it does not give the name of the folder, and as far as I know that you can get a AssetFileDescriptor for the resource, but you can not find the actual file name. Update: After asking this question, I have found that you can use