Posts

Showing posts from July, 2010

android - What does Asset Allocations mean in adb shell dumpsys meminfo -

Can anyone tell me what asset allocation is in ADB Shell Didasis MemoFromAndroid? I see it launching my Android device and I look at the resources of my application. The ASSC is consuming 516K, even though my app is not running. Thank you. With resources.arsc , there are two things that can happen. Generally, the file is stored in .apk uncompressed. Now there is an option, so it gets dismissed in memory for more work (such as a string being loaded) and kept. I am not sure why this will happen if the app is not running, perhaps it has been kept as one?

mobile - flex TileLayout - want equal tile width but not height -

I am working on the flex mobile project and a group of groups using a tile layout for layout . The problem is that if any text in any one of the groups has multiple rows, then all the tiles have been changed to the same height. I need tile width for all tiles, but I want the height of the tile to be the highest on each line, thanks for the help. I got a job for this. I had to write a custom layout which calculates the number of columns and the maximum height of each line.

java - Eclipse Indigo, Glassfish 3.1.1 plugin debug issue -

I have eclipsed myself and started using the open source glassfish plugin with a new version of the Glassfish server. This sailing was not easy but I'm walking up and running. My question is, when I start the Glassfish server on debug mode, and I make a change to a Java file, then it restarts the entire app which does not make me happy Myeclipse world In, this explosion will be deployed and I will be able to correct the code and can debug and work without restarting the app. This is definitely Myeclipse 8.6 and Glassfish v2. Am I missing something or is this action provided by myeclipse only? With Eclipse-controlled servers, if you publish applications on your server in Elysees, eclipse Keeps track of Java automatically changes the app on changes and changes in the code. If you point out your glassfish server configuration on your application, then it acts as an application deployment directory (it can be done with jabos, not sure about glassfish ), Eclipse no longer...

ruby on rails - will_paginate undefined method. The Will_paginate gem appears to work though -

I am using Rail 2.3.8 My error: undefined method # delay will be 'flagged'; ActionView :: Base: 0x1124bfa10 & gt; in environment.rb: requires "bundler / setup" Bundler.require (default) In my jam file: Mani "Will_pignet", "2.3.14" In this view: & Lt;% = Will_Pagnet (@Subscriptions)% & gt; In Administrator : @search = subscription.search (Param [: search]) @ search.order || =: Ascend_by_account_id @ Subscriptions = @ Search.all.paginate (: include = & gt ;: account ,: page = & gt; parameter [: page] ,: per_page => 30) Now ... the endorsement of the methods are visible to work in the rest of the applications ... it is just that this is_paginate method that the pagination link does not work. = \ Now, I just started using the bundler, and before the bundler, everything used to work all the time. In my environment Rb I need "bundler / setup" Bundler.require (default) Correct Ra...

odbc - How did database queries handle case sensitive queries prior to the Lower()/Upper() sql functions? -

I have a privatization to work with a very old database. This database was created sometime in the 80's. The AP, which manages it, is a dos app that the company still works to use. I started a project with them so that they could be made a new app and they would have to adopt a new app by date database. This is an old ODBC database. I need to create case insensitive questions on it and it seems that the following () and upper () functions do not work at all on this database. I wonder if there are any SQL passwords that have been known in the business for a long time, then whatever the database programmer has done before these functions about the sensitive questions related to the case What did you do in By the 21st century it is an easy way to bring this huge old database which would be great. I am new enough for SQL because it is and it stumped me in the old database. Did you select something "less (column)" and you used the ODBC syntax " {Fn lcase (c...

Bash prepending backtick to string -

The Best keeps on adding a right before the $ MyStats line is correct, how can I get rid of it? A small background: I've created a script to loop through the files searched to give data and output them to a new file. It worked fine, but broke any file name that had a location in the directory or file, so I needed to add quotation in the file path. For some reason, adding quotes in the file path, at the beginning of a 'path, the whole script renders useless. To help me with corrected substrings $ $ (cat search.txt), my status is being added on the line. Fix = \ "$ (echo" $ i ") \" resonance $ myStats = "true" $ stat $ | Awk '(NR == 1) {Print $ 1 $ 2 $ 3 $ 4 $ 5 $ 6 $ 7 $ 8}; \ (NR = = 2) {print $ 1 $ 2}; \ (NR == 4) {Print $ 3 $ 4 $ 5 $ 6 "" $ 7 $ 8 $ 9 $ 10}; \ (NR == 6) {print $ 1 $ 2 "" $ 3}; '`' Echo $ MyStats & gt; & Gt; "$ MyHostname" done A sample from search.txt: /var/lib/tom...

c# - LsaEnumerateAccountsWithUserRight fails when connecting to Windows Server 2008 r2 -

different for I have some C # code that uses "advapi32.dll" to document the purposes of various servers Could collect information. Part of that document is getting user permission from each machine. I am using the LSAEnumerateAccountsWithUserRight function that works on Windows 2003 machines, but not on 2008 machines. I'm using an "access denied" received error I I had been read many threads recommended to disable the UAC (to whom I) and Elosopolisi (which I've tried) is using POLICY_VIEW_LOCAL_INFORMATION instead of POLICY_ALL_ACCESS and does not work with it is what led anyone into this problem? What is it, I am able to use LsaLookupNames2 and LSAEnumerateAccountRights in Win2008 R2 (administrator mode VS is running). LsaOpenPolicy (... Access.POLICY_LOOKUP_NAMES |. POLICY_VIEW_LOCAL_INFORMATION, lsaHandle) out ... LSALookupNames2 (lsaHandle, 0, 1, name, ref I have used the following two contexts: - is very good ... - at least privi...

Value "_new" in target= attribute not supported in HTML5? -

I decided to stop using _blank and to avoid it, _new to start slipping users as much as possible with new windows and instead there is a single 'new window' and has all links that open in a new window in the already opened window I am looking at the web and the stackworflow but I Also the value _new address does not in HTML5 target = . This is not a comment on this forum _new . W3Schools have no mention of the _new value in the table, they have: So my question is: Does anyone know that in HTML5 Is the use of target = "_new" valid / correct? Thanks in advance. I think that _new has never actually existed. The code that you give to the _new actu associate works with any other valid name: if a window is present with the name, then it is used Instead, if it does not exist, then it is made. "name" explanation : If you open a new tab / window with an arbitrary goal, such as target = 'mywindow ' , you have "na...

wpf - Shared DataGridColumn Widths Across Multiple DataGrids -

I'm making multiple datagrads in one application with the same set of columns and bindings I'm hoping to do Yes, all datagrid responds appropriately for a change in a datagreat. If I change the size of a column then the second DG should have the same width in the respective column. This is similar to this question on the SO. In addition to the grid (grid), I was hoping that DataGrid would have a property similar to the grid-like IsSharedSize but it does not seem like this. Is there any property which I am trying to achieve, which I can do, or some alternative approach? Although before offering this proposal to anyone, I can not merge them all into a datagreat, which I am trying to mean, that means I can not put all the information into a datagreat due to the nature of the application. While shared width is not possible in DataGrid \ / out> The best way to handle the scenarios is. Create binding between source DataGrid column and target DataGrid column widt...

apache - 301 Redirect of old url with parameters to a path without parametes -

मुझे निम्न अनुरोध की आवश्यकता है: http://somesite.com/home Php? Action = page & amp; page_id = 9 एक 301 रीडायरेक्ट को ट्रिगर करने के लिए: http://somesite.com/a-new-page यहाँ मैं क्या उपयोग कर रहा हूं लेकिन यह काम नहीं कर रहा है। पुनर्लेखन% {QUERY_STRING} ^ पृष्ठ_id = 9 $ [एनसी] रीराइट्र्युल ^ घर \ .php $ http://somesite.com/a-new-page? [एल, आर = 301] कोई भी विचार? यदि QUERY_STRING हमेशा समान रहेगा तो आपको इसे इस तरह से मेल करने की आवश्यकता होगी: रीवाइटकोर पर रीवाइटइन्गइन% {QUERY_STRING} ^ एक्शन = पेज और पेज_आईडी = 9 डॉलर [एनसी] रीइरेट्र्युल ^ home.php $ Http://somesite.com/a-new-page? [एल, आर = 301] आशा है कि यह मदद करता है।

Changes Cascading down to children in a Tree structure ASP.NET MVC 3 -

This is an ASP.NET MVC 3 application and for updating the children's nodes in a tree structure, the user It is allowed to make changes in any part of the node in the tree. Once the user has made a change (i.e. a status field) that the change will cascade all the children. The point is that children have an arbitrary amount and their children have an arbitrary number on children and so on. edit I would like for this structure to repeat myself, until the rest of the child will not leave If (unit.child.Count> 0) // Level 1 {foreach (item item in item.child item1) {// logic to update each unit (item 1.child.Count> 0 ) // Level 2 {foreach (item item..child in var item2) {// logic to update each unit if (item2.child.Count> 0) // Level 3 {Foreach (item item. Child in var item3). . . Is there a great way to do this, or is it just a few hard work for "best guess" numbers or levels? You need to type recursive method: zero process child (Item item) {...

zend framework - Zend_Form doesn't load on deployment -

This one can not understand that everything worked in my local environment is in the right place, but the server still does not have it See: ** WARNING: include_once (Zend / Form / Element / TextArea.php) [function.include-once]: failed to open section: / 146 / on line / is / htdocs / There is no such file or directory in xxxx / www / mensenenjij / library / zend / loader.php Warning: include_once () [function.include]: Opening Zend / Form / Element / TextArea Php '(include_path =' / is / htdocs / xxxx / www / mensenenjij / application /../ Rhythm: / is / htdocs / xxxx / www / mensenenjij / library:.: / Fatal error: Class 'Zend_Form_Element_TextArea' / is not found in I / O / htdocs / xxxx / www / mensenenjij / library /Mensenenjij/Form/Contact.php On Line 52 ** Thanks I'm assuming the class trying to load it, are you using Windows on your local env, and a Linux distro on your deployment server? If you are, the Linux case is sensitive. Try using ...

How to loop through POST variables sent to ASP.NET WebMethod from JQuery $.ajax method? -

I have created a checklist with the HTML button, which, between the 'Selected' and 'No Selected' sections on the click Toggle it. Each option has an ID related and also has an optional comment input. I send JQuery $ with POST to send selected IDs and related ID IDs. I am trying to use the AJAX () method. I have the idea that the key / value of the selected ID is for collection and related comments, when 'Save' is clicked in such a way: selections = "{id1 : 'Comment1', id2: 'comment2', ...} " Then pass it into the data section of the $ .ajax () method: Data type: "App / Jason; Charset = UTF-8", Datatype: "Jason", success: Work (msg) {onsuit ()}}}); Use selections by looping through and finally MyMethod by using HttpContext.Current.Request.Form . But when I try this, HttpContext.Current.Request.Form is always empty, is my view wrong? If so, why? Can someone recommend another? Any help would be...

iphone - Saving data from ViewControllres (Core Data) -

I have seen through the core data tutorial which puts the main data code in the appadiget class that was created to create a window project. I was already able to save and retrieve data from AdLite Class. My question is, if I have a view controller that saves the data, then how do I save data for that specific class? Do I continually redefine the store and managed object model in that class? If this is the case, then what is the programmatic way to do this (already it was generated for me). I. What methods / Instantiable / Properties I need to declare? I can stand for any explanation No need to go through the app representative or redefine the store etc. All you need is in the context of managedObjectContext . Generally, this is a property (a view controller says), which you can set from outside to after creation and can easily reach within the visual controller class (much easier than going through the app representative !). You can easily pass it to other view con...

ios - Set an uilabel on callback function -

I set the text of UIBLL on the callback of cfsocket, but this does not work. Error: "Use of undisclosed identifier label" '' But this set-test works in other functions, why not in this one? Callback function: Fixed zero return data (CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const zero * data, zero * info) {UInt8 * buff; NSLog (@ "% ld", CFDataGetLength (data)); CFDataGetBytes (Data, CFRangeMake (0, CFDataGetLength (data)), Fondness; NSLog (@ "% s", Fond); [Label set text: @ "Tooto"];} Function where set-test function: - (IBAction) deconn: (id) sender {if (conn_ok & amp; socket & amp; sock_addr) {CFSocketInvalidate (socket); [ Label set text: @ "disconnected"]; Conn_ok = false; [Sock_addr release];}} Okay, I did this in my work: socketViewController * toto = (id) information; [Toto.label setText: @ "Received msg"]; But this does not work, let me EXEC_BAD_ACCESS get And...

php - IF statement causing 500 Internal Server Error -

IF स्टेटमेंट नीचे 500 त्रुटि का कारण बनता है $ oldtweets = mysql_query ("चुनें जमा, ट्वीट्स से ट्वीट्स जहां सबमिडीज़ = '$ सबमिड' और लॉगिन आईडी = '$ लॉगिन' "); अगर (mysql_num_rows ($ oldtweets) = 0) {mysql_query ("ट्वीट्स मूल्यों में शामिल करें (शून्य, '$ शहर', '$ जमा करें', '$ पूर्णुल', '$ uid', '$ username', NULL)") ; } सबसे पहले मैं यह देखूंगा - यदि (mysql_num_rows ($ oldtweets) = 0) यह होना चाहिए - यदि (mysql_num_rows ($ oldtweets) == 0)

asp.net - Preserving CheckBox's Value in Dynamic GridView TemplateField -

I am trying to create a gridview that has a list of users and permission levels in which they will have access to each line The following areas will be: USER_ID, Username, Permission1, Permission2, ..., PermissionN, where permissions are the values ​​of the field if the user has that permission and "1" (Note that they do not have "0" that are returned by DAL Not allowed to call 1 column Has not, but allow the actual name). I want to represent the data by using the check box, allowing an administrator to quickly provide at once or allow a large number of them to cancel the permission. Since I do not know the number of first hand permissions, I create dynamic TemplateFields and checkboxes, and it works fine; Gridview shows the current approval level of all users. I encounter a problem when I try to update the permissions on the user's check and uncheck box. By changing user permissions, I have an "update" button, which certainly causes a postback...

javascript - Make Json parsable by php -

I have some strangely formatted Jason String which is an invalid Jason but executes as valid JavaScript. This means PHP json_decode , will not work. {"device": {"Device1": "{\" name \ "= \ & gt; \" autope ldvds \ ", \" id \ "= \> gt; "LDVDSDevice \"}}} Backlash is not valid. Is there any way I can escape this string so that it can be done exactly as it did? ? Edit I do not care to parse the filthy string all. This is preventing me from accessing other data I was a simple Regex to parse it Haze Jason's ugly string strip out but now I need to re-encode the result array JSON and I do not want to lose this data. The ugly string should be exactly the same as it is important for any other application using the data May be. => Comes to the Ruby object node if you are thinking. OK, it has left those weird & gt; Those who are killing it: > I have no reason to protect you str_rep...

webview - iPhone - UIWebView not calling didFailLoadWithError without data connection -

I have searched and have not found the solution, so hopefully someone can help you I have a UIWebView that is called when a user clicks a button until the phone does not account for behavior without a data connection, everything works well. When you try to open UIWebView for before time on airplane mode or without phone, a data connection: UIWebView Load starts to load failed to load Once the UIWebView is allocated and loaded to fail, the first time IBAction is connected to a refresh Reasons to kill the button (which calls [webView reload]) reasons: Whether the phone has a data connection after the initial load failed I'm called IBAction, but my NSLogs do not call me either webViewDidStartLoad, webViewDidFinishLoad, and nor webViewâ ?? didFailLoadWithError If I'm running an app and the device Turn on a data connection (for example, to turn off airplane mode), go back to my app and press the Fresh button, called [webView reload], but did not say webViewD...

breadcrumbs - How to convert CSS class to id? -

यह सीएसएस कोड है ... .breadcrumb {font-size: 10px ; पृष्ठभूमि रंग: # 006600; पैडिंग: 0 पिक्सेल 2px 2px 2px; पाठ संरेखित करें: केंद्र; रंग: # एफएफएफएफएफएफ; } .breadcrumb a {color: #FFFFFF; पाठ-सजावट: कोई नहीं; } .breadcrumb a: दौरा, .breadcrumb a: सक्रिय {color: #FFFFFF; } .breadcrumb a: hover {text-decoration: underline; } और यह कोड है जिसे मैं ब्रेडक्रम्ब प्रदर्शित करने के लिए उपयोग कर रहा हूं ... & lt; p class = "breadcrumb" & gt; ब्रेडक्रंब PHP कोड यहां जाता है & lt; / p & gt; मैं चाहता हूं कि सीएसएस कोड को संशोधित किया जाए ताकि मैं वर्ग के बजाय आईडी का उपयोग कर सकूं, जैसे: & lt; p id = "breadcrumb" & Gt; ब्रेडक्रंब PHP कोड यहां जाता है & lt; / p & gt; क्या कोई मदद कर सकता है? को बदलें। # में अपने सीएसएस में । ऐसा करने से आपको यह सुनिश्चित करना चाहिए कि केवल p किसी भी समय आपके पृष्ठ पर अगर आप एक आईडी चयनकर्ता का उपयोग करने जा रहे हैं।

python - What is the proper way to update a listfield of embedded documents in mongoengine? -

I am trying to define ways to check and update the list of embedded documents in the field field. I am trying, what is the proper way to do it is the code is below. commented (commented) def define comment (embedded document): made = date timefield () text = stringfield () class post (document): comments = listField ): For existing_comment in self.comments: if comment.created == existing_comment.created and comment.text == existing_ comment.text: return true return wrong def add_or_replace_comment (self, comment): for self-contained existing_comment: if Comment. Created == existing_command Created: # How will I change? # How do I add? Is this the right way to go about something like this? You can use EmbeddedDoclockLilffield instead of the list of embedded documents. This way you get access to something like Filters , create or updates : class comment (Embedded document): created = datetimefild () text = stringfield () class post (document): comments = EmbeddedLili...

embedded linux - How to rebuild buildroot toolchain -

Everyone! I moved the buildroot to another directory and the buildroot toolchain did not work because it refers to the full path. How can I create a toolchain? There should be some * -DriClicken Messief targets to wipe toolcan. Thanks! In the current Buildroot, you can not rebuild the toolchain only, you have to rebuild the builder completely : Clean up This will completely remove your previous build results and rebuild your toolbars and systems from scratch.

rails 3 app in production raises 500 error when record not found? -

When I go to a bogus url: / posts / 99999999 On my local machine, I see: Active Note: Showing # Notepad # Show in Posts # User / Patrick / Ariels / my_app / app / views / posts / show .html.haml where Row # 1 picked: The post with id = 99 999 could not be found ... log show: Rendered post /show.html .haml 423ms ActionView :: Template :: error (with the id = 99 999 Posts can not be found) Full (29.6ms) / --- Wine That, when I do it in production, I get a public / 500.html error page, not 404 ... I'm confused because in the development mode, the browser shows ActiveRecord :: RecordNotFound (which means 404 , Yes?) But there is not a single mention of ActionView :: Template :: Error - ActiveRecord :: RecordNotFound So, my question is, how can I do a 404 not a 500? And - why is this 500? What I've seen, Rail automatically runs an ActiveRecord :: Record Notephone 404.html Presented to me ... I found out the problem I am using civilized civilization, and ...

java - Could Jconsole be used to monitor IBM JDK? -

Can Junkonol be used for monitoring IBM JDK? I want to know that garbage collection equipment Sun JDK and IBM JDK are applicable, and it is free. Yes, you can use JConsole to monitor the JVM. But if you are in a Websphere environment, you should just use the administration console to look at various counters like GSC. If you enable security with IBM Jesensol, you will have trouble By the way, Garbard Collection is not a separate device, it is part of JVM to manage memory. JCNOL and GB come free from all JDK. Thank you.

How to set image in custom listview in Android? -

I am developing an application in which I will have to show ratings based on prices which can pars me in the XML response Receiving the list view afterwards. I've shown images using this custom adapter and getView () method: string rating = static Menu.RatingList.get (status); If (rating angle ("1")) {rateImg1.setImageResource (R.drawable.stary); } The problem occurs when I scroll down to the previous object and then move upwards, it is recreating the list line Someone suggested stop approaching me to close the list row and set the image value permanently. How do you rate the rate Img1? Maybe you should take it from the scene that has been passed by the getView () method? Something like this: see public getView (int position, view view, viewgroup parent) {if (view == null) {view = LayoutInflater.from (ctx) .inflate (R. Layout .my_layout, guardian, wrong); } ((ImageView) view.findViewById (R.id.my_image)). SetImageResource (R.drawable.some_drawable); Re...

android - table layout size -

I have to use a table layout but I definitely want a table layout when there are no records or two lines. After the deletion, the size of the two records is fixed and when more than two records are added, the size of the table is increasing. Table layout created at runtime Is it possible? how? I make table layouts at runtime and dynamically add more work and size is also increasing, but when I have a fixed size then the size is not growing. Give me advice. Thanks You can set the defined size from the programming timeline in XML or you can set the code in the program And check that the rows & gt; Set 2 to other set as set size

java - Do we need to declare interface methods as abstract -

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

c++ - Please explain me what this writing actually means in examples? -

If the nCode is less than zero, then return the value returned by callNextHookEx to the hook process. If nCode is greater than or equal to zero, and the hook process does not process the message, then it is highly recommended that you call CallNextHookEx and return that value; Otherwise, other apps installing WH_MOUSE hooks will not receive hook notifications and can result in incorrectly behaving. If the hook process has been processed, then it can return a nonzero value to prevent the system from passing in the target window process. I have found it and I'm not good in English as well as this hooking stuff, but I should make it as necessary if you can explain to me that simple For example, what is its real meaning, I am really grateful Please help me .... Thanks In Cddocode, this means approximately: if (nCode = 0 & amp;! MsgProcessed) CallNextHookEx (); And return 1;

php - Faster and if possible less memory cost method generate an alphanumeric code? -

I am trying to create a very simple short URL redirect without the database. Here's what I have done so far: & lt ;? Php $ name = $ _GET ['file']; $ Name = preg_replace ("/ [^ a-za-z0- 9] /", '', $ name); $ File = 'data /' $ name; // file found (if_file ($ file)) // // Read the first row, we do not use file_get_contents because the data folder is secure and internally $ f = fopen ($ file, 'r') should be read; $ Data = fgets ($ f); Fclose ($ f); // redirect to the real URL header ("Location: $ data"); } Else {// The shame in the header of the URL is ("Location: http://www.mydomain.com/"); } Go out(); ? & Gt; I would like to know what will be faster and if there is a method of potential low memory to generate alphanumeric code from 6 to 8 characters that do not collide Does the data exist in the folder? Do you also require that any URL Will it be possible to see the short code? Only the countin...

postback and validation in asp.net and javascript -

मेरे पास यह बहुत कुछ है HTML & lt; एएसपी: बटन आईडी = "बीटीएन सेव कॉन्टैस्ट" रनैट = "सर्वर" टेक्स्ट = "सहेजें और amp; प्रतियोगिता को प्रकाशित करें" OnClientClick = "मान्य करेंकैटेंटेस्ट ();" ValidationGroup = "ContestAdd" OnClick = "btnSaveContest_Click" कारणों के कारण वैधता = "गलत" /> जावास्क्रिप्ट & lt; script type = "text / javascript" & gt; फ़ंक्शन ValidateCreateContest () {Page_ClientValidate (); अगर (Page_IsValid) {चेतावनी ('पृष्ठ मान्य है'); $ ('# & Lt;% = btnSaveContest.ClientID% & gt;')। Attr ('अक्षम', 'अक्षम'); __do पोस्टबैक ('& lt;% = btnSaveContest.ClientID% & gt;', '') सत्य वापस; } और {चेतावनी (मान्य नहीं है); विवरण झूठा है; }} & Lt; / script & gt; यह पृष्ठ पर वापस पोस्ट करता है, लेकिन यह सर्वर साइड फ़ंक्शन btnSaveContest_Click पर नहीं जाता है। क्यों? ClientID का उपयोग न करें, U...

css - How to style forms with jQuery UI theme -

I have a simple form and I want the label and text fields to be colored according to the selected jQuery UI theme. The text color of the label is always black and the text fields do not change with different topics. You should check that some of your styles do not override jquery-UI styles. Using the Firefox plugin: Firebug You can inspect any HTML tags and see how the hierarchy of CSS affects the selected element. Edit: Sometimes the firebug does not show the exact sequence of genres. Check if the jquery-ui stylesheet is included after your style and if you do not use it! Important class Anywhere the problem may be "CSS" with some "straightforward", for example: .column * {color: # 000000; } Perhaps this is the reason I once spent a lot of time searching for errors due to these stars ...

database - How many types of cursor is supported by SQLite in Android? -

I am searching a lot of time and watching many database tutorials but I do not know how many types of cursors supported by the SQLite database These are indirect sub-classes and also cranes cursor, cursor on Sarvindu , Crossprocess cursor, cursor vappar, matrix concert, mergecars, mockcars, sqlitiksarar

listview - How to dynamically set text size of all items in a list view based on database value in Android? -

I am trying to allow the user to set the font size in the app which uses list view. How do I get a font-size from a database and use it to set the size of the text in the list view? Edit: Examples would be good :) "post-text" itemprop = "text"> Get the Fontasize from the tax database. View your views; Set textview fonts in the listview on getview; Text with the textview.setTextSize (int, float);

c++ - Address Windowing Extension -

I have a 32 bit application with very large memory requirements. I have seen that there is something called. Although I have not got much information regarding how to use it and any losses and problems can be used while using it? This should not work on versions of Windows at 64bits (read here Intel and AMD's PAE Specifics support the x86-64 architecture, but software layer Microsoft's PAE (API), called AWE, is not supported on 64-bit versions of Windows, so for more than 4 GiB RAM for Windows Vista 64-bit 32-bit application Attribute.). There is even a "license" limit on the amount of memory used by Windows 32 bits (the same page shows all the limitations). And it's clearly complex for the program :-) It's like using EMS on the old 8086

c# 4.0 - C# - Data filter by datetimepicker -

I am a newbie to C # and I want to try it on. Do I know how can I return event value by Dataatimpekar to the Database (MS Access 2007) filter? For example: I have DataGrid Video in a DetetPicker and Format 1. Can user show datagrid queue row by row to select date from dateetimeter and filtered data? My main purpose would be to collect the date and return figures on that date. Many thanks in advance! Gary Yee Given that you have the date / date time of the access database, For example, in your SQL statement ValueChanged event's DateTimePicker control dateTime dt = datetimepicker.Value; // string string database strConn = @ "provider = Microsoft.Jet.OLEDB.4.0; data source = C: \ mydatabase.mdb;"; (Select Varici * YOURTABLE WHERE DateCol = '{0}' ", dt) using {string strSql = String.Format (Var Connection = New OleDbConnection (strConn)); (Using var adap = new OleDbDataAdapter (strSql, connection)) {DataTable table = new DataTable (); Ad...

Umbraco CMS 5.0 CTP 1 installation skip some steps and does not populate DB -

I tried to post it on the ServerFault forum, but StackOverflow might be the right place. I want to try Umbro CMS 5.0 CTP1 as it has a good reputation. Since the ISP has come in MVC3, I thought I would try to install V5 preview. I know that this might be a buggy, but I expected that I could set it up properly, but it was not right. Please see the full post here: RTM is now out

javascript - Date picker highlights after refresh -

I have a jquery ui datepicker that highlights the week when I select a date. But because I am changing the url space (finally to fit a parameter) and refresh the page and whatever I clicked and highlighted is lost, I want to be able to click on a date and when If that page is refreshed, then that week has been highlighted. The week which needs to be highlighted can be taken from the URL so that after highlighting it can be highlighted and highlighted so that I need help. This code is: $ (function () {var startDate; var endDate; var selectCurrentWeek = function () {window.setTimeout (function () {$ ( Find the '' Week-picker ''. ('.ui-datepicker-current-day a') AddClass ('ui-state-active')}, 1);} function check (D) {if (d.length ) == 2) {dd = d; return dd;} else {dd = "0" + MyDateParts [0]; return dd;}} var selectedWeek; // Remember what week user has here $ ('week- Picker '). Datepicker ({before before ShowDay: $ .datepicker.noW...

Find element in XML using jquery -

I am using jquery to go through an XML file and find some elements and display them on the screen $ (xml) .find ('module'). I want to select an element in a certain position. $ (xml) .find ('modulo') Like many options. [1] {$ (xml) .find ('modulo'). (1) {$ (xml) (function (index) .get ([1]) {$ (xml) .find ('Modules'). ([1]) Receive But nobody works till now. Does anyone know what is the right saint? Edit: -------- & lt; script & gt; $ Document .ready (function () {$ .ajax ({type: "GET", Url: "modulos.xml", datatype: "xml", success: ph (Xml) {$ (xml) Find ('modulo' '' '(type)' '' '' '' (type '). Text (); var date = $ (This) .Find ('Date') .text (); var firmware = $ (this) .find ('firmware'). Text (); var room = $ (this) .Find ('room') .text (); var tool = $ (This) .fin d. ('Tool') text (); var calibration = $ (this) ....

jsf 2 - Force reload image jsf -

I would like to display an HTML file to a graphic image in a Jesf Web applications that change for each run. The problem is that the displayed image was always the same. I tried to solve it by generating a random number at the end of the name. public string getImageId () {string imageId = ""; Int nb = (int) Math.random (); ImageId = "? Id =" + integer .ststring (nb); Return image iid; } Then, I call it on my jsf page & lt; H: Graphic image value = "/ images / report.html_files / img_0_0_0 # {MyBean .imageId}" cacheable = "false" / & gt; But nothing changes. Do you have any information about it? Thank you For my application, I created a Java sublet that gives a different image each time, top to prevent caching with articles cache-Control set and I use the servlet URL in your JSF tags. I do not think you can dynamically change the image with a URL in a fixed file, like in your example.

database - PHP PDO: Do the fetch styles FETCH_CLASS and FETCH_INTO fetch into private object properties? -

बहुत कम प्रश्न, यहां एक उदाहरण है: $ तैयार = $ this-> gt ; Pdo- & gt; तैयार ("चयन करें * से उपयोगकर्ता जहां आईडी =: आईडी"); $ स्टेटमेंट = $ तैयार- & gt; निष्पादित करें (ऐरे (": ID" = & gt; $ user_ID)) $ result = $ statement- & gt; प्राप्त करें सभी (PDO :: FETCH_CLASS, "उपयोगकर्ता"); // या $ उपयोगकर्ता = नया उपयोगकर्ता (); $ परिणाम = $ कथन- & gt; प्राप्त करें (पीडीओ :: FETCH_INTO, $ उपयोगकर्ता); (सिर के ऊपर से लिखे गए, वाक्यविन्यास त्रुटियां हो सकती हैं) उन दोनों को प्रत्यक्ष रूप से निजी गुणों में कहा जाता है ? मैंने पढ़ा यह भी __ निर्माण फ़ंक्शन को भी circumvents, तो क्या यह भी निजी स्थिति को दरकिनार करेगा? बहुत छोटा जवाब: हाँ यह होगा। वर्ग फ़ू { निजी $ आईडी; सार्वजनिक कार्य echoID () {echo $ this- & gt; आईडी; }} $ परिणाम = $ कथन- & gt; प्राप्त करें सभी (PDO :: FETCH_CLASS, "Foo"); $ परिणाम [0] - & gt; echoID (); // आपका आईडी एक तरफ: यह वाक्यविन्यास त्रुटियों का कारण होगा $ stateme...

Strange Behaviour Using Scala Parallel Collections and setParallelism -

I recently found out about parallel collection in Scala 2.9 and was excited to see that the degree of equality can be determined with the help of collection. Parallel.ForkJoinTasks.defaultForkJoinPool.setParallelism Although when I tried to make an experiment of adding two vectors of size one million each, I used the with parallel parallelism to set up the archive Will get faster as 64 sequential (shown in the above results). Increasing similarities set to increase performance in a non-linear way. I have the least hope for monotonic behavior (if I want to increase parallelism then the display should not be degraded) Can anyone explain why this is happening object examplePar app {val Rnd = new random () val numSims = 1 val x = for (j & lt; - 1 to 1000000) returns Rnd.nextDouble () for Val y = (j & Lt; - 1 to 1000000) yield Rnd.nextDouble () Val parInt = list (1,2,4,8,16,32,64,128,256) Average of the top: double = 0.0 on currTime: long = 0 (J & lt; - parInt) {col...

perl - Check whether a string contains a substring -

How can I determine if a string contains a particular place or not? More specifically, I have to see if s1.domain.com exists in the string variable present. if (index ($ str, $ substr)! = -1) {Print "$ str $ includes substr \ n"; } This will return the status of the first occurrence of $ str in $ substr , or -1 if the substrings are not found.

c# - Type.GetType return null -

इस सवाल का पहले से ही एक उत्तर है: 17 उत्तरों मैं टाइप का उपयोग करने की कोशिश कर रहा हूं गेट टाइप और पास "caLibClient.entity.Web2ImageEntity" पूर्ण वर्ग का नाम। CaLibClient.entity नामस्थान है, अलग विधानसभा (caLibClient) में स्थित है और कार्यक्रम संदर्भ विधानसभाओं सूची में जोड़ा गया है। Type.GetType हमेशा जब मैं प्रोग्राम से कॉल करता हूँ, तो क्या गलत है? आपको विधानसभा का नाम भी जोड़ना होगा, क्योंकि आपका प्रकार विधानसभा (और एमएसकोरिब।) इसलिए कॉल होना चाहिए: var myType = Type.GetType ("caLibClient.entity.Web2ImageEntity, FullAssemblyName"); से: टाइपनाम प्रकार : System.String असेंबल-योग्य नाम का नाम प्राप्त करें देखें विधानसभा QualifiedName यदि प्रकार वर्तमान में क्रियान्वित विधानसभा में या Mscorlib.dll में है, तो इसके नेमस्पेस द्वारा टाइप नाम की आपूर्ति करने के लिए पर्याप्त है। से, यह एक नमूना नाम है: शीर्षनामस्थान.सब नाम स्केप.संमेलन वर्ग + नेस्टेड क्लास, माइआसम्बैन्डस, संस्करण = 1.3.0.0, संस्कृति = तटस्थ, सार्वजनिककीटोकन = ब...

java - generate jasper report problem in jar file "Lorg" -

java.lang.NoClassDefFound त्रुटि: लोरग / जेफ्री / चार्ट / प्लॉट / प्लॉटऑरेन्टेशन; Java.l.eng.lang.Class.getDeclaredField पर java.io.ObjectStreamClass.getDeclaredSUID (अज्ञात स्रोत) पर java.lang.Class.getDeclaredFields0 (मूल विधि) पर java.lang.Class.privateGetDeclaredFields पर अज्ञात स्रोत (अज्ञात स्रोत) हाय दोस्तों, मैं जेस्पर के लिए नया हूँ, पाई चार्ट के साथ एक सरल रिपोर्ट बनाने की कोशिश में जार जेफ्रीचर्ट -1.0.0 और jcommon 1.0.0 शामिल हैं, कृपया सुझाव दें कि मैं क्या कर रहा हूं गलत है, इसमें क्लास फ़ाइल है Org / jfree / चार्ट / प्लॉट / प्लॉट ओरिएंटेशन में; लेकिन लॉर्ग / jfree / chart / plot / plotOrientation; में नहीं यकीन है कि निर्भरता (जार) आपके कक्षापथ में हैं। आप java -cp / path / to / classes स्विच के साथ क्लासपाथ निर्दिष्ट कर सकते हैं यदि यह एक वेब अनुप्रयोग है, तो WEB-INF / lib फ़ोल्डर में निर्भर जार डाल दें।

php - usort changing Array's order -

I have a user function with a line: return 0. I tried to use it on an array of stdClass objects, and it changes their order, how is this possible? The property that you believe is named: A Stable sorting algorithm elements Will not change the sequence, which are similar. The php sorting functions no are static (since the non-static type may be slightly faster). From: If two members compare as equal, their order in the ordered array is undefined. If you want a stable sorting algorithm, then you

dojo - Fastest Javascript Framework for Phonegap -

What is the easiest and fastest JavaScript framework for phonegaps? JqTouch, JQuery-Mobile, or Dojo-Mobile? It was found: What do you think? TQ I suspect that you will have to experiment with experimental evidence Receive much more success in getting answers. The phonegap community (growing) is already a small group of mobile development communities. I suspect that many of these stacks have started to implement actual performance tests and compared them to: touch-touch -> PhoneGap - & gt; Resident IOS Seal-Touch - & gt; PhoneGap - & gt; Original Android versus jqTouch - & gt; PhoneGap - & gt; Native ios jqTouch - & gt; PhoneGap - & gt; Original Android etc. I am looking at comparisons of different JS frames for any remarkable performance difference and I am starting to test the implementation of PhoneGap. If PhoneGrap Wrap affects the performance of each, beyond the margins of the difference between the different frameworks....

List name to String in Mathematica -

Image
Keeping in mind: daList = range [10] What I need is the title of the name of the list but trying: list plot [daList, PlotLabel - & gt; ToString [daList]] does not seem to work Edit I want the title" Diallist ". Previously my lack of previous accuracy edit I can not do any solution yet, but I think I separated the problem list name There is a pane argument argument. I believe that the simple version that replicates my problem is such as: list = {1, 2, 3, 4}; Naming [list_]: = ToString [HoldForm [list]]; Naming [list] one below my "real" code: sequenceCountPlot [conditionSet_]: = ListPlot [sequenceCountALL [conditionSet], plotOptions [( "DisplayNo looking out filter" & lt;> (ToString [HoldForm [conditionSet]]), "Number of display", "Radius in filter cm", prefCOLORS], PlotRange - & gt; {{, 10}, {0} Max @ (Max / @ Sequence Contret [ConditionSat])}}, Include - & gt; True] The plot o...

PHP getting values from an array with even keys? -

Is the easiest way to loop through the values ​​of an array using a forshak, but even here So even the keys are also targeting, for example an array like this: [0] = & gt; Val [1] = & gt; Val 1 [2] = & gt; Val 2 [3] = & gt; Val 3 [4] = & gt; Val4 etc ... How can I just loop through keys without the keys such as 0, 2 and 4? Thanks in advance :) In your foreach you can also get the key Are you just checking whether or not? / P> foreach (dollar array as $ key => gt; $ value) {if ($ key% 2! = 0) // key is uneven, release; // your stuff}

c# - LINQ Error: Method not recognized -

I am using the following code which is compiled without problems, but when I call the method, This error is found: Units do not recognize the 'System.String ToString ()' method to the LINQ units, and this method can not be translated into a store expression. public IEnumerable & LT; String & gt; GetAllCitiesOfCountry (int id) {var ad = from one of the institutions. Adwords where a.CountryID == ID select one. City.Distinct () ToString (); Var fa = entities.FacilityAddresses where b.CountryID == ID select b.City.Distinct (). ToString (); Return advertisement Conakat (FA). Distinction (); } Can it be rewritten to work? How is the city ? If it is already a string, just drop it . Undoubtedly (). ToString () Call If this is a complex type, then select the name of the city by type. Update : Depending on your comment, you should leave the Distint () and ToString () calls. The last union on the collection of city names should give you a unique city name. ...

c# - Error getting response stream (ReadDone2): Receive Failure -

Please error to get me to influence "the reaction stream after sending help me to post the quarter (Reed Don 2): Get the finder ". Help get rid of this error. Thank you code snippet try {String queryContent = String.Format ( "login = {0} & amp; password = {1} & amp; mobileDeviceType = { 2} / ", login, session password, device type); Request = Connection Helper.GetHttpWebRequest (loginpassword, query content); (HttpWebResponse response = (HttpWebResponse) request.GetResponse ()) using // occurs exception after the line // - Error response stream to receive "(ReadDone2): Get failed" {ConnectionHelper.ParseSessionsIdFromCookie (reaction ); String position = response. Header ["location"]; If {string responseUri = Utils.GetUriWithoutQuery (response.ResponseUri.ToString ()) (string.IsNullOrEmpty (location)); String space URI = Eutils.comcombinURI (countercurrent, location); Results = this.DownloadXml (locationUri); } Response.Close ();...

linux - Updating a label from a thread in Perl -

I am using Perl on a Linux box, and I have 2 devices - a PC (Linux box) and a router. / dsl-thingy - on my local net at IP address 192.168.1.1 & amp; 192.168.1.2 and trying to show or show the progress of ping + The code below is not tested for any other 8 existing devices, but updating my stats, there is a problem with any help ... For ($ i = 1; $ i & lt; = 10; ++ $ i) {# --- $ i & lt; $ VarClients --- 254 My $ thr_List = ("Ping $ i"); $ Thr_List = Thread-> Create (& amp; pingingthreads, "$ i"); } Sub Pingthreads {my @pingpong = ping ("$ localAddress $ i", '-c 1', '-i.2'); Can not count more for # -i? Print "Pinging: $ local address $ i \ n"; # Output Address 1 - Address 10 is OK $ Stat Lababel = "Pinging: $ Local Address $ i"; # Only the last responder (device) is showing in my statsbase?! $ Val = ($ val + 10); # 0.392156863 Print "$ val \% done ... \ n"; # Goes to 100% up to me OK #...

jquery - How to change link href by link text -

I have a text where I want to swap the login link, but only if the text says "log in". Occasionally say "my account": & lt; Div id = "login_T4304F19B025" & gt; & Lt; A href = "/ login1" & gt; Sign in & lt; / A & gt; & Lt; / Div & gt; How do I use to change href to / login2 if link text is "logged in"?

JQuery onclick function to focus input -

I need a JQuery function, which means that if the user clicks on some text on the page, then he is focused on input . (Function () {$ ('# header.search input'). Focus ();});}); Nothing has been registered on the firebug. Any thoughts? Wonderful Span & lt; Br> & Lt; Input id = "InputToFocus" type = "text" & gt; & Lt; / Span & gt; $ ('Span'). Click (function () {$ ('#InputToFocus'). Focus ();}); seems to work well, maybe it's a problem with your selectors Can you post the structure of your HTML around the input?

utf 8 - NGINX, FastCGI, UTF-8 Encoding: Output iso-8859-1 instead of utf8 -

I hope you can give me an idea of ​​what is going wrong. Szenario: I run gitweb (CGI) with a script in Fastcsi mode: #! / Bin / sh Export FCGI_SOCKET_PATH = 127.0.0.1: 7001 Su GIT-C "/ var / www / vh_ [vhost] / htdocs /gitweb.cgi --fastcgi and" Then I I use nginx to serve the content: ... fastcgi_pass 127.0.0.1:7001; ... Everything works as expected, but here's the problem: $ wget "http: // git. [Host] .de /? P = [repo] .git; a = summary "-o / tmp / testtacks & amp; File - MME-encoding /tmp/test.txt & gt; /tmp/test.txt: iso-8859-1 $ su git -c "./gitweb.cgi \"? P = [repo] .git; A = summary \ "& gt; ./test" & amp; Amp; File - MME-encoding ./test & gt; ./test: utf-8 Clearly, the faster CGI output is UTF 8, whereas the content made by NGN iso-8859-1 is FireBugs Response Header: server nginx Date Fri, 02 Sep 2011 14:14:08 GMT Content Type App / XHTML + xml; Charset = utf-8 transfer encoding peeling c...

mediawiki - is there a faster alternative to mwdumper to import xmls? -

I'm exploring a faster option to use the mwdumper to import the MediaWiki XML dump. I used wget for downloading XML one by one for big articles and I need a few hundreds to import, importing one time at a time is taking too long Command java -jar mwdumper.jar --format = sql: 1.5 page 1.xml | Mysql -uUserNameDDBaseName does not work on Windows Command Line. I have compared several available options maintenance / importDump.php for me It has been a winner: This is part of mediawiki, supported and less chance of discrepancies (which will definitely do if you start to mess with yourself with SQL queries Certainly meet.). This is at least double because some code was based on code from maintenance / editing.php . This can run on the existing MediaWiki setup. It works well. 20.23 revs / sec

c# - How can I show a viewbag as html? -

OK, ASP.NET is quite new to MVC, so I'm sorry if this is a stupid question, but I How to show the value of a viewback as HTML, for example, if ViewBag.SomeMessage has the following text: & lt; H3 & gt; Test & lt; / H3 & gt; & Lt; P & gt; Test & lt; / P & gt; & Lt; P & gt; Test & lt; / P & gt; & Lt; P & gt; Test & lt; / P & gt; & Lt; P & gt; Test & lt; / P & gt; & Lt; P & gt; Test & lt; / P & gt; Actually render the page as HTML? Or is it a very easy way to completely disappear? Cheers! Everyone is correct in using the @ html.Raw () But I want to ask for caution because it can make your site susceptible to XSS vulnerabilities. I will add @ html.Raw (ViewBag.SomeMessage) to ensure that you will not present any weaknesses to it. EDIT: The benefit of the anti-XSS library (if you have not seen it), its approved markup (such as b & gt; , & lt; h3 & gt;...

asp.net - DropdownList SqlDataSource does not pull *all* records -

I have a DropDownList that is linked to SQLDataSource. I am running the exact same query in SQL Management Studio and it pulls all the records, but when I execute it in SQLDataSource, it does not pull two records that I just added. Why? SELECT [REPID], [MyDB1.dbo.Reps] from [Manager ID] where [role] = 'manager' and ISNULL (RIP type, 'account execution') & lt; & Gt; The selection of 'House Account Exxic' association [Repad], [MyDB2.dbo] from [ManagerID] where the rip [roll] = 'manager' and the ISUNL (RIP type, 'account excise') & lt; & Gt; 'House Account Exxic' The problem line is the Repeep field. I have verified that it is Null for the records that I want to draw. I have spent more than an hour on this. Has any such thing come in? Any suggestions? Output from SMSS Repand Manager ID ----------- ----------- 9 9 10 10 & lt; - this man's dropdown 42 42 333 333 & lt; Does not show - and this man 10...

symfony1 - Different databases for specific branches of git project -

Image
We have several branches of a project that share approximately half the code and develop them simultaneously with GIT checkout . Now, the problem came when the model became so different, it is no longer possible to keep the same database for its development. I could specifically specify the database name in config / databases.yml for each branch, but it has not been tracked. For example, there would be another solution to track some external files with config / branch.txt, and refer to it in config / database.yml: all: Principle: class : SfDoctrineDatabase param: Dsn: 'pgsql: host = localhost; Dbname = & lt ;? Php echo file_get_contents (actual path (__dir__. '/branch.txt'))? & Gt; Still, how do you deal with this? What is usually done in the branch to manage the same file with different content Always use (e.g.) to keep the local version or > Use the file with a config / databases.yml.tpl . A ' blur / code>' script (versio...

ruby - Heroku Rails app v 1.2.6 failed to push: unrecognized error -

I get this error when a train app v. Try to push 1.2.6 to Heroku: ! Heruka bridge rejected due to an unfamiliar error. ! We have been notified, see http://support.heroku.com If the problem remains the same, git@heroku.com: myproject.git! [Remote Dismiss] Master - & gt; Master (formerly received hook denied) Error: 'git@heroku.com: myproject.git' Heroku does not support rail under 2.0. It can be painful, but if you want to stay with Hiro, then you have to upgrade at least to 2.3.5 in the train.

c# - How to show values as legend? -

Image
I have a bar chart and I want to show the value of the jacks as legends. As the default behavior, series looks like legend ... How can I show legends with the values? You will need to use a new LegendItem . LegendItem newItem = new LegendItem (); NewItem.Cells.Add (Legendlip. Serizambol, "", Content Alliance Middle Middle School); NewItem.Cells.Add (LegendCellType.Text, chartdata [index] .ostring (), ContentAlignment.MiddleCenter); And do this for each series.

asp.net - cannot establish a connection to SQL Server -

I have a web app that I developed using Visual Web Developer 2010. The database is local inside the solution: & lt; Add name = "SFDBConnectionString" connectionString = "data source =. \ SQLEXPRESS; AttachDbFilename = | DataDirectory | \ SFDB.mdf; Integrated Security = True; User Instance = True" Provider Name = "System.Data .qlClient" /> I'm trying to run an application on another machine using Visual Studio 2010 instead of Web Developer and it is giving me the following error while trying to connect to the database. : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the example name is correct and SQL Server is configured to allow remote connection. (Provider: SQL Network Interfaces, Error: 26 - Error specifying server / instance) Specify Anyone have any ideas on what can happen to anyone? Generally, this error m...

javascript - jQuery - Drag and drop - Get DROP left and top position -

I should know where the user leaves the element on how to drop both the .left and .top position on the drop down Can i do "draggable" style = "position: fixed;" & Gt; & Lt; Img src = "picture / door 1.jpg" id = "door" & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" & gt; $ (Init); Function init () {$ ('# draggable'). Pullable (); $ ('Body') Droppable ({drop: function (Event, UI) {// ECHO POSITION}}); } & Lt; / Script & gt; Use ui.position which The ui.offset inside the drop callback relative to the offset element {top, left} which is similar to the page again {top, left} returns. function init () {$ ('# draggable') dragable () .; $ ('Body') Droppable ({drop: function (Event, UI) {// ECO Position Alert (ui.position.top); Alert (ui.position.left);}}); }

c++ - Check for every rugby score the recursive way without repetitions -

For fun I have created an algorithm that calculates every possible combination from a given rugby score (3, 5 or 7 digits). I found two methods: First there is a brute force, 3 for imbricated to loop second is a recursive. Problems Some combinations appear many times how can I avoid it? My code: #include & lt; Iostream & gt; using namespace std; Zero computeScore (int score, int nbTryC, int nbTryNC, int nbPenalties); Int main () {int score = 0; While (true) {cout & lt; & Lt; "Enter score:"; Cin & gt; & Gt; Score; Cout & lt; & Lt; "---------------" & lt; & Lt; Andal & lt; & Lt; "Score =" & lt; & Lt; Score & lt; & Lt; Andal & lt; & Lt; "---------------" & lt; & Lt; Endl; // Recurring call calculation score (Score, 0, 0, 0); } Return 0; } Zero computeScore (int score, int nbTryC, int nbTryNC, int nbPenalties) {int tryC = 7; Const int tryNC = 5; Const int penalty...

c++ - How to embed a file into an executable? -

I have written a small demo executable in C ++ which can only be loaded before running on a 5kb PNG image Due to this one file I used for a pixel text, I would have to give a zip archive instead of just an executable file, which produces enough friction between download and 'play', which I believe Some will stop it from doing this. My question is that is there any way to embed a PNG file (and actually any other file) in the executable or source code, so that it is a file, and Can executable use it? I have the ability to parse PNG as a byte stream, so there is no need to convert it to pixel data. Thanks in advance thanks! (There are other questions with a similar title for this, but they and their answers seem to be more specific and are not very useful) Edit : Compiler View C ++ 2010 and it's on Windows (though I would like to avoid windows specific utilities for it)) edit2 : Alpha's answer looked like the most portable method , So I quickly got a PNG ...