Posts

Showing posts from May, 2010

- Where Developers Learn, Share, & Build Careers

का उपयोग करें, उदाहरण के लिए, numpy.sin () निम्नलिखित कोड सरणी के प्रत्येक मान के लिए मूल्य वापस करेगा a : आयात करें numpy a = numpy.arange (1000000) परिणाम = numpy.sin ( ए) लेकिन मेरी मशीन में 32 कोर हैं, इसलिए मैं उनका उपयोग करना चाहता हूं। (ओवरहेड, numpy.sin () जैसे कुछ के लिए सार्थक नहीं हो सकता है, लेकिन जो फ़ंक्शन मैं वास्तव में उपयोग करना चाहता हूं वह काफी अधिक जटिल है, और मैं बहुत अधिक डेटा के साथ काम करूँगा।) क्या यह सबसे अच्छा है (पढ़ें: सबसे तेज या सबसे तेज) विधि: मल्टीप्रोसेसिंग आयात से पूल अगर __name__ == '__main__': पूल = पूल () परिणाम = पूल .map (numpy.sin, a) या ऐसा करने का एक बेहतर तरीका है? वहां एक बेहतर तरीका है उनके मुख्य पृष्ठ से थोड़ा सा शब्द बदल गया: यह एक बहु-थ्रेडेड वीएम लिखित है सी में जो अभिव्यक्तियों का विश्लेषण करता है, उन्हें अधिक कुशलता से दोबारा लिखता है, और उन्हें मक्खी पर कोड में जो कि दोनों स्मृति और सीपीयू बाध्य परिचालनों के लिए इष्टतम समानांतर प्रदर्शन के निकट बनाता है। उदाहरण के लिए, मेरी 4 कोर मशीन में...

java - Inno Setup compile directory -

This is the first time I have used the nano setup I am including Ino Setup in an ANT script: & lt; Target name = "gener-installer-exe" dependent = "Generate-X" & gt; & Lt; Exec Executable = "C: / Program Files (x86) / Inno Setup 5 / ISCC.exe" & gt; & Lt; Arg value = "$ {etcdir} /innoSetup_config.iss" /> & Lt; Arg value = "/ dMySourcePath = $ {deployment.dir}" /> & Lt; / Executive & gt; & Lt; / Target & gt; This creates output and setup.exe in $ {etcdir} , because there is my .iss file in that location, but I want to compile it Go to $ {deployment.dir} Is there any way to change the compile directory by passing a logic or do I need to move files through the ANT? According to the docs, / O parameters you can do what you need. To specify an output filename "/ O" (to override an Output Dior setting in the script), "/ F" (script does not override the filename...

- Where Developers Learn, Share, & Build Careers

I have a report running on the SQL Server Reporting Services that is provided in the browser. There are several report parameters in this: Is there any way to save the values ​​of standards for the next run? For example, I parameter "result from date", some time ago, view the report, then set off the browser and then open it again - this will be the value of the parameter that was set in my previous session . Is this possible? Look at the little gem. From the article: ... a method to increase the reporting services to report them ... Remember the parameter selection so that they can run the report next time They re-select the same parameters to meet.

- Where Developers Learn, Share, & Build Careers

I have an application that uses VLL form from DLL. On some form, I kept T chromium from Delphi chromium embedded. There is a problem: when I open my DLL (Form deleted), the application freezes any error or AV. I got some answers - commented in // cef_shutdown lib_cef.pas. Successfully destroyed this path, but I have a large memory leak, DLL is destroying and unloading with other components that make the form from DLL. How can I usually unload the DLL with the form with the T-Chromium component? whenever I need to apply similar mistakes in the case of DLL, then to take DLL for. If you have created an example of an application object, delete the application immediately before unlocking the DLL.

android - ConnectivityManager.getBackgroundDataSetting() deprecated in ICS; how to use getActiveNetworkInfo() instead -

कनेक्टिविटी प्रबंधक के लिए एंड्रॉइड एसडीके डॉक्स के अनुसार , getBackgroundDataSetting () एंड्रॉइड 4.x में पदावनत किया गया है, और पृष्ठभूमि डेटा अक्षम होने के लिए getActiveNetworkInfo () का उपयोग किया जाना चाहिए: लेकिन, सिंक के साथ बंद, जब मैं अपनी सेवा के भीतर NetworkInfo ऑब्जेक्ट की जांच करता हूं, तो कुछ भी ऐसा नहीं है जिसका अर्थ है कि पृष्ठभूमि डेटा अक्षम है: कनेक्टिविटी मैनेजर connMgr = (कनेक्टिविटी प्रबंधक) context.getSystemService (संदर्भ। CONNECTIVITY_SERVICE); // getBackgroundDataSetting हमेशा एंड्रॉइड 4.x पर सही देता है यदि (connMgr! = नल & amp;! ConnMgr.getBackgroundDataSetting ()) {Log.i (WootsUp.TAG, "पृष्ठभूमि डेटा बंद"); वापसी; } अगर (connMgr! = नल) {NetworkInfo netInfo = connMgr.getActiveNetworkInfo (); If (netInfo == null || netInfo.is उपलब्ध () == झूठी || नेटइनफ़ोइस। कनेक्ट () == गलत) {Log.i (WootsUp.TAG, "कोई सक्रिय नेटवर्क नहीं"); वापसी; }} न तो उपलब्ध है () और isConnect () वापसी जब मैं सिंक बंद कर दिया है। क्या Netw...

- Where Developers Learn, Share, & Build Careers

I tried to use the SetOutputVoices function, and the constructor parameter, but both results resulted in an XAUDIO2_E_INVALID_CALL result when used on a submix The voice goes Docs says that you receive this error by calling it an audio callback, but I am not. I have also tried to call it before starting the audio engine. The same way works for the source sound, so I'm pretty sure I'm not passing a bad XAUDIO2_VOICE_SENDS structure. Submix voices have processing commands, specified by process station parameters in IXaudio2.CreateSubmixVoice You can only send output to a submix voice with low processing platform and all my launch was on the default processing phase (0).

javascript - Append an integer to a string name -

Hi H is trying to iterate for a loop with a long string of words organized in a string (wordlist), Within effectjs: var wordlist3 = "hellwhentrysthisbreaks" var xc = 3; Var word_length = 4; Var word_ology = 4; For (i = 0; i & lt; words_in_round; i ++) {var num_words = ['wordlist' + xc]. Long / word_labee; Var random = math.flur (math.rendum) * ((num_words + 1) - 0)); N = Math.Round (Random / Term_Labby) * Word_Label; Random_word = (['wordlist' + xc]. Asbestring (n, (n + word_length)) random_words + = random_word; } The code above works if I define the wordlist globally, but when I have not defined it properly local num_words and throws a random word, then in this object There is no method substrings .. My problem is, since I change to local variables when I attach string names and calls. Length This gives me the length of the new name (wordlist3.length = 9) instead of the length of wordlist3 = 20; I can not even call this object based on the metho...

collections - Scala's MapLike, ListLike, SeqLike, etc how does each compare to Map, List, Seq? -

Does anyone help me understand the various "like" symptoms of Scala's collection API? I am reading and reading and trying to compare everyone without luck. I think I can see that for example the map increases mapline - adding 2 concrete methods but why does this raise the question why do all this? Why not map 1 map in Collections API instead of map and map? Thank you! The best source of these details is: Scala archive library code Duplication avoids and receives "same-result-type" principle using generic builders and traversals from the collections of so-called implementation properties . These symptoms have been named as the as suffix; For example, there is an implementation property for IndexedSeqLike IndexedSeq , and similarly, traceable likes implementation properties traversable For these collection codes such as traversal or IndexedSeq receive all their solid method implementations with these symptoms. Instead of the one for the...

NSIS: How to add custom button to left bottom corner and handle it's click? -

Image
I tried the Button Event plugin, but when I run the compiled example, it probably fails with memory access error What can it do with the system plugin by windows api or something? Can anyone show how this can be done? UPD: The error appeared because I tried to use the non-Unicode button event on Unicode NSIS. Now the example is compiled and okay, but when I click on TryMe button, the callback function is not called and nothing happens. To determine what the problem is? Can a button compile ButtonEventMUI.nsi and click on TryMe button? I have downloaded the latest button version using NSIS 2.46 Unicode system plugin Can not do this because it can not do subclass windows. ButtonEvent plugin works fine for me (NSIS 2.46): name BtnTest outfile test.exe INSTALLDIR "$ temp" RequestExecutionLevel user BrandingText ""; Button this text was included! NsDialogs.nsh; * Function for WS_ .onGuiInit; You want to use ChangeUI (or MUI_UI) and a modified UI file to...

php - What is the meaning of $c1 = ($c1 & 0x03) << 4? -

विशेष रूप से, ($ c1 & amp; 0x03) & lt; & lt; 4 क्या? क्या 0x03 हेक्स अंकन है? यह करता है मतलब पहला ऑपरेशन तार्किक रूप से और हेक्स मान 0x03 के साथ है (जो हेक्स में 3 या (0011) बाइनरी में है)। और फिर Shift 4 places.example छोड़ दिया $ c = 34 है। $ C & amp; 3 (100010 बिटवियस और 000011) जो आपको (000010) देता है और फिर यह बाईं ओर 4 अंक ले जाता है और $ c अर्थात् (100000) या दशमलव में 32 को नया मान बहाल करता है। आशा है कि यह है सहायक। धन्यवाद

c# - GetProperty reflection results in "Ambiguous match found" on new property -

How do I get my property? Currently a code has got a suspicious match , see the comment row in the code. Public category MyBaseEntity {public MyBaseEntity MyEntity {get; Set; }} Public category MyDerivedEntity: MyBaseEntity {public New MyDerivedEntity MyEntity {get; Set; }} Private Static Zero Main (string [] Args) {MyDerivedEntity myDE = New MyDerivedEntity (); PropertyInfoPenFofofostown = myDE.GetType (). GetProperty ("MyEntity"); // - Error: Unmatched matching found} Such situations in which ambiguity arises ... ... Derivative types declare a property that hides a successive property with the same name, using the new modifier If you run the following var properties = myDE.GetType (). GetProperties (). Where (P = & gt; p.Name == "MyEntity"); You will notice that the two PropertyInfo objects are returned. One is for MyBaseEntity another MyDerivedEntity . This is the reason that you are receiving suspicious match error. You c...

sql server - SSRS report cut some columns in IE8 -

There is a problem with SSRS in my report layout. SSRS will only cut some columns in IE8 when I open the report for the first time. The problem does not appear in FF and Chrome. However, it is my surprise, when I refresh the report, the missing columns will appear in IE8, or if I go to the next page and come back again. Any help is appreciated! You may not need to set IE8 browser mode in Internet Explorer 8, IE8 No IE8 commute view using the developer tool Press F12 and go to the Browser Mode tab. Regards

c# - Ninject Scope and System.Threading.Timer -

How can the timer open a new ninja reference on the task? Configuring the nineteenth area of ​​a network of hard times if I set it as InRequestScope () does not work on non-requested tasks. That's why I'm setting the following so that I can get InThreadScope for work: kernel.Bind But like this, when I set a timer timer timer = new timer (_ = & gt; delayed disconnect (chatUser.User.AuthorizationId), tap, timespace.fomseconds (10), timespace from milliseconds (-1)); dbContext does not refresh with new database values. Public Deletion Declined Disconnect {String Authentication ID} {var myChatUser = GetChatUserByClaimedIdent Ifier (authorizationId); if (! MyChatUser.ChatClients.Any ()) / / old state (does not reflect the database change from 10 seconds ago). Then ... current How to open a new blank "context" to reflect state / db values? Background tasks should not be run in the ASP.NET application. To do this, write a service Using a wind...

activerecord - Rails as_json with two unrelated models -

Looking at two models and controllers: Apple class apple and lieutenant; ActiveRecord :: Base is_to: not_oranges ... def as_json (options = {}) opts = {: include = & gt; [: Not_oranges]} Super end (options.reverse_merge! Opts) End End Orange Class oranges Search Controller Class SearchController & lt; ApplicationController a = Apple Search Consulting [: Q] O - Orange Search Parameter [: Q] @ ruits = {: apple => A ,: orange = & gt; O} answer_ to do | Format | Format.json {Render: Jason = & gt; As you can see, both models are not completely unrelated and they both have different : in their as_json are included in the options. Definitions Expected all actions as if the search query kills only apples or hit orange, but both objects are not empty once: undefined method `not_apples' For # & lt; Oranges: 0x00000004af8cd8 & gt; Either both as_json definitions are being merged, or overriding Oranges.as_json Apples .as_j...

ios - Under ARC, property and declare of Objective-C confused -

Under ARC, if I define an Ivice like this: @ Interface ObjectA: NSObject {ID A; } @protecti (noncommercial, unsafe_reentended) id a; What is the property of A? Strong or unsafe - request? It depends on how you implement it using @ synthesis A; or @ synthesis A = __a; In this case, you can do this: __ is unsafe_property / , because the details of ownership of the property constitute the details of ownership of ivar 1 . Manually a and set . In this situation, the results will depend on the backing variables you choose for implementation. 2 Here is a document which rules the ownership of rules, which is determined by Section 4.1.1. 1 If the associated frequency variable already exists, its ownership merit should be equal to the ownership of the property; Otherwise, the example variable [property] has been created with that merit capability. 2 The specified ownership of a property is preserved in its metadata, but otherwise it is completely convent...

php - Redirect User to Login Page if Email is Confirmed -

So on my website I send an email with links to which the user should follow to verify their email. If the user clicks the link in the email, then I want the user to be taken to the page which thank you for confirming his / her account, and then redirect the user to the login page. how can I do this? I tried to use the PHP header function but it does not work because I need to send a header to display the "thank you" message, so I can not use that function. What can I do to get this work done? You can use meta refresh to redirect, a set period of time redirects in 5 seconds To do this, copy this code to & lt; Head & gt; Keep in: & lt; Meta http-equiv = "refresh" content = "5; URL = 'http: //example.com/' & gt; You can also do this with an HTTP header Are: header ('refresh: 5; URL =' http: //example.com/ '); or use JavaScript : & lt; script type = "text / javascript"> function delayed...

asp.net - Limit the number of characters of a textbox -

संभव डुप्लिकेट: मैं एक टेक्स्ट बॉक्स के पात्रों की संख्या को सीमित करना चाहता हूं। इसके लिए मैंने & lt; asp: textbox id = "txtAdmissionDate" runat = "server" MaxLength = "5" & gt; & Lt; / एएसपी: पाठ बॉक्स & gt; यह ठीक काम कर रहा है लेकिन जब मैं TextMode = "MultiLine" विशेषता को जोड़ता हूं, तो मैक्सलेथ काम नहीं कर रहा है। कृपया मदद यदि आप उपयोगकर्ता को यह बताने देना चाहते हैं कि क्या वह वर्णों की संख्या को पार करता है जैसे कि वह लिखता है, तो आप ईवेंट की कुंजीपटल से जुड़े एक जावास्क्रिप्ट फ़ंक्शन का उपयोग कर सकते हैं। यह फ़ंक्शन इनपुट की लंबाई का परीक्षण करेगा और अधिकतम रद्दीकरण को रद्द करने पर वर्ण रेंडरिंग को रद्द करेगा। एक अन्य विकल्प सबमिट करने पर इनपुट को मान्य करने के लिए RegularExpressionValidator नियंत्रण का उपयोग करना है। मेरे में राय, पहला विकल्प ज्यादा बेहतर है। मैं किसी भी कोड को जोड़ नहीं रहा हूं क्योंकि Google सभी स्वादों के लिए उदाहरणों से भरा है, यह एक बहुत ही सामान्य कार्य है। आप...

dynamic - check existense of div with id and insert some html code -

How can I insert something under a certain div? I have a jwplayer on my page, usually jwplayer-1 is inserted for WordPress by jwplayer plugin. What I want to be able to do is to insert such a drive down, if it exists. For example, if there is a player in my page, player will appear here anywhere on this page What I want to be able to do is to check whether the line exists, if so, then insert another device so that the code is in this way. Php Showviews ()? & Gt; & lt; / div & gt; Thanks You can do this: $ ('

- Where Developers Learn, Share, & Build Careers

When trying to access my shared library from the Unity Android player, I'm having a DllNotFoundException; Plugins-> Android files placed in the folders on which the article told me. I ran the adb logcat and saw the log and here is a piece of error: e / (532): inv_get_mag_rate e / (532): inv_get_mag_rate d / dalvikvm (27320): try to load unable to find lib /data/data/com.pheenixstudios.tankraigearena/lib/libwinsocklib.so 0x419ccfd0 e / Integration (27320): winsocklib D / dalvikvm (27320): try to load lib /data/data/com.pheenixstudios Has been doing. tankraigearena / lib / libwinsocklib.so 0x419ccfd0 E / Integration (27320): winsocklib unable to find D / dalvikvm (27320): load lib /data/data/com.pheenixstudios.tankraigearena/lib/libwinsocklib.so 0x419ccfd0 E / Integration trying to (27320): unable to find the e winsocklib / (532): inv_get_mag_rate e / (532): Inv_get_mag_rate e / (532): Inv_get_mag_rate e / (532): Inv_get_mag_rate e / (532): Inv_get_mag_rate e / (532): inv_g...

jstl - Image display using jsp XHTML template .. JSF -

मैंने Jsp XHTML टेम्पलेट का उपयोग कर एक छवि प्रदर्शित करने के लिए एक सरल कोड लिखा है लेकिन यह काम नहीं कर रहा है लेकिन जब मैं Jsp HTML टेम्प्लेट का उपयोग कर रहा हूं I ... & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "आईएसओ -885 9 -1" ? & gt; & Lt;% @ page language = "java" contentType = "text / html; charset = आईएसओ -885 9-1" पृष्ठ एन्कोडिंग = "आईएसओ -885 9 -1"% & gt; & Lt;; DOCTYPE HTML PUBLIC "- // W3C // डीटीटी एक्सएचटीएमएल 1.0 ट्रांसक्रिप्शन // एन" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; html xmlns = "http://www.w3.org/1999/xhtml" xmlns: f = "http://java.sun.com/jsf/core" xmlns: एच = "http: // जावा sun.com/jsf/html"> & Lt; शीर्ष & gt; & Lt; meta http-equiv = "सामग्री-प्रकार" सामग्री = "पाठ / html; वर्णसेट = आईएसओ -885 9 -1" / & gt; & Lt; शीर्षक & gt; कार विवरण & lt; / title ...

facebook - App security breach - how to invalidate all the tokens for one app? -

One of our apps has been bitten and some wall posts / photos are posted on behalf of our app. But suspecting that a hacker has regained access_token from our app. What is the best way to break this security violation? We want to invalidate all access tokens for that app. But the question is how? Does the app have to change the secret aid on this matter? Thank you. All Access When you change your app secret, the tokens are invalid.

clojure - Posting to a compojure URL programmatically -

What is a way to access routes through a program (without calling via http) For example: (Main routes (post / "query" "OK ... ...")) Can I use a "query" function which is generating metro is? defroutes creates a ring handler with the same name that you have it did . So basically you have a ring handler, which is a simple task that takes a request map and gives a feedback map. In your case, you have the function main-routes the appropriate ring request map object which has the uri key, which it will send to the "/ query" handler function being given.

Android: unable to retrieve data from json -

I am getting an id of some event for this activity from previous activity and passing this ID in the current activity URL The name of the city that is being found in the URL is my code. string s = getIntent (). GetStringExtra ("AR"); Try {HttpPost hpost = New HTTP Post ("xxxxxxxxxxxxxxxxx / id"); HttpResponse response = login.client.execute (hpost); & Lt; NameValuePair & gt; NameValuePairs = New ArrayList & lt; NameValuePair & gt; (1); NameValuePairs.add (New BasicNameValuePair ("id", s)); Hpost.setEntity (new UrlEncodedFormEntity (nameValuePairs)); String re = entityUtils.toString (response.getEntity ()); System.out.print (ri); JSONObject Root = New JSONObject (Re); EveState.setText (root.getString ("cityname")); } Hold (exception e) {Log.e ("exvcx", "Error obtaining data" + e.toString ()); } The exception that I'm getting is no value for the city name . I think I am unable to pass the ID to thi...

- Where Developers Learn, Share, & Build Careers

Image
How do I create a navigation menu with section labels like the header menu in the Windows 8 Metro Javascript and the picture below? ? Define HTML: & Lt; Button data-win-control = "WinJS.UI.MenuCommand" data-win-option = "{id: 'homeMenuItem', label: 'home'}" & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt ;! - Content that will be loaded and displayed. - & gt; & Lt; Header aria-label = "header content" roll = "banner" & gt; & Lt; Button class = "win-backbutton" aria-label = "back" & gt; & Lt; / Button & gt; & Lt; Div class = "titillaria win-type-alpesis" & gt; & Lt; Button class = "titlecontainer" & gt; & Lt; H1 & gt; & Lt; Span class = "pagetitle" & gt; Header & lt; / Span & gt; & Lt; Span class = "chevron win-type-x-big" & gt; & Amp; # Xe099 &...

html5 - How to make header menus with section labels in Windows 8 Metro using Javascript? -

Image
How do I create a navigation menu with section labels like the header menu in the Windows 8 Metro Javascript and the picture below? ? Define HTML: & Lt; Button data-win-control = "WinJS.UI.MenuCommand" data-win-option = "{id: 'homeMenuItem', label: 'home'}" & gt; & Lt; / Button & gt; & Lt; / Div & gt; & Lt ;! - Content that will be loaded and displayed. - & gt; & Lt; Header aria-label = "header content" roll = "banner" & gt; & Lt; Button class = "win-backbutton" aria-label = "back" & gt; & Lt; / Button & gt; & Lt; Div class = "titillaria win-type-alpesis" & gt; & Lt; Button class = "titlecontainer" & gt; & Lt; H1 & gt; & Lt; Span class = "pagetitle" & gt; Header & lt; / Span & gt; & Lt; Span class = "chevron win-type-x-big" & gt; & Amp; # Xe099 &...

keyguardlock - To lock and unlock device using robotium -

I'm writing a robotium test case for the lock screen, to test me 'lock' and 'unlock' device (device hardware Button) is required. I tried with KEYCODE_POWER, searched for other options, but no use. Thank you in advance, Did you drag () Have tried to use? It can unlock, but I'm not sure how locking it can depend on the device.

- Where Developers Learn, Share, & Build Careers

Can anyone help me understand The client method by using the Signal Server server method How to open from I tried 3 different ways to invoke the law: I designated my Hub [HubName ("Notification")] Method 1 Client. Message (message); This gives "order can not be binding for a null reference" Method 2 IHubContext context1 = GlobalHost. ConnectionManager.GetHubContext ("notificationhub"); Context1.Clients.addMessage ('hello'); Customer is silent Method3 on hubConnection = New HubConnection ("http: // localhost: 21120 /".) ; Var Notification = Hub Connection Crete Proxy ("Notification"); HubConnection.Start () Wait () .; information. Invoke ("send", "hello"). Wait (); This method returns an error: {"Remote server returned an error: (500) Internal server error."} To my surprise, I use this method from the console application The third method I am capable of. What is th...

- Where Developers Learn, Share, & Build Careers

मुझे नीचे की तरह एक डाटाफ्रेम रहा है। & gt; Avg_data तारीख क्षेत्र एविएप्लेस्ड टाइम 1 5/1/2012 preprod 23 2 5/2/2012 prod 76 3 5/3/2012 बीटा 34 4 5/4/2012 prod 30 5 5/5/2012 बीटा 22 6/6/2012 Preprod 32 7 5/7/2012 बीटा 21 8 5/8/2012 प्रोड 44 9 5/9/2012 preprod 45 10 5/10/2012 बीटा 23 11 5/11/2012 अंक 50 12 5/13/2012 बीटा 26 13 5/14/2012 preprod 33 14 5/15/2012 बीटा 75 15 5/16/2012 preprod 56 16 5/17/2012 बीटा 32 17 5/18/2012 preprod 67 18 5/19/2012 प्रॉड 40 जब मैं cbind का उपयोग करता हूं, यह सही पंक्ति संख्या नहीं दे रहा है .. & gt; cbind (avg_data [avg_data $ क्षेत्र == "preprod", "तारीख"], avg_data [avg_data $ क्षेत्र == "preprod", "AveElapsedTime"]) [1] [2] [1,] 3 23 [2 ,] 15 32 [3,] 18 45 [4,] 5 33 [5,] 7 56 [6,] 9 67 यह आलेख की साजिश रचने में समस्या दे रहा है। मुझे एक्स अक्ष और एविएप्लेस्ट टाइम वैल्यू के रूप में तारीख है जो Y अक्ष के रूप में है I 5/1/2012 से पहली साजिश शुरू करने के बजाय, यह 5/3/2012 से शुरू हो रहा है औ...

android - OutOfMemoryError on ViewPager -

I am using a ViewPager with 13 pages, it is managed using a FragmentStatePager adapter, and each Page loads 250kko images as background, and sometimes 5 images are per page. I often get an out-of-return error error and I'm testing my app on the Samsung Galaxy Tab 2, so I think I'm doing something wrong. Is there a way to release images that are not used on the life cycles of my pieces on scenepages? Any other ideas out there? Thanks in advance. Everything is very well explained and Expand on

matlab - How can I remove the row of an mx3 matrix from an nx3 matrix (n>m)? -

In the matlab, if there is one mile by 3 matrix which are present in all the large 3 by the matrix, how can I create Am 3 by a matrix (nm) in which there are no rows of the first (m3) matrix? For example if the first matrix [1 4 6] and the second matrix [1 2 3; 1 4 6; 8 7 4], how can I come up with the matrix: [1 2 3; 8 7 4]? This is a job for the 'rows' option: a = [1 4 6]; B = [1 2 3; 1 4 6; 8 7 4]; Eq_rows = ismember (b, a, 'rows'); Results = B (~ eq_rows, :)

goto and automatic variables initializer in c -

In a tutorial he said If you use the Goto statement to jump mid The automatic variable of the block is not started. Then if I can be accessed / declared in the code below, why is not it started? int main () {hereo here; {Int i = 10; Here: printf ("% d \ n", i); } Return 0; } ps: Output is some garbage value. there is no logic behind your question "if i Can be reached, why ... ". Despite being able to "access i ", there is no argument for something or against it, this means that the printf statement is the same as the I . However, since you jumped on the starters, then the variable has not been started (like your tutorial says). Reading an unexpired variable is an undefined behavior, so your program is bad. Memory is already kept separate on compiled time for the variable i , because the variable exists inside the internal block. Memory is not dynamically allocated, as you can imagine. It is already there, but it has never ...

- Where Developers Learn, Share, & Build Careers

My Facebook-Share button was working fine, but for the past two days, its counter went to zero for all the positions. Like my most popular post now shows 25 shares, which was 400 days two days ago. Why? I used the plug-in Social Usage plugin to show share buttons with share, twitter, and others. I use the WordPress - Genesis Framework on News Child Theme. I've added the FB-jvascriptSDK code after the tag, but have not tagged through simple nerves. I know that FB is using the FB-share button but I think it is not optional for this? And many popular sites like dailymail.co.uk or HuffingPost.com are using FB-share and all of them are okay with it? Please help me to fix the problem of FB-share or make any alternative suggestions. The share button has been deprecated ... maybe they are still closing the counter Are you Check out this question:

- Where Developers Learn, Share, & Build Careers

मेरे पास 9.23 का मान है जो मुझे इस तरह मिलता है: चेतावनी (parseFloat data.x)); डेटा.एक्स 9.23 है चेतावनी में Google क्रोम में मुझे 9.23 मिलता है, और आईपैड सफारी पर मुझे सिर्फ 9 मिलता है। यह क्यों हो रहा है? अपनी टिप्पणी से देखते हुए, आप सी # का उपयोग करते हुए नंबर सर्वर-पक्ष स्वरूपण कर रहे हैं। मुझे भारी संदेह है कि parseFloat के सफारी का कार्यान्वयन टूट गया है और संदेह है कि नंबर एक लोकेल-निर्भर तरीके से , एक विभाजक के रूप में उपयोग किया जाता है। आप इसे value.ToString ("0.00", CultureInfo.InvariantCulture) का उपयोग कर से बच सकते हैं

Make a unique list of objects Java -

I have an ArrayList in which the object is filled with names and time objects I would like to remove the duplicate on the basis of the name And keep records with the latest record. That's why I override equal and hashsh for the name in my object and used the code in this way. Private list & lt; Replaced Reontteo & gt; GroupRecords (List & lt; changed reciprocity & gt; toList) {has been changed Recentlylyist.clear (); // Fixed list (changed in: toList) {if (!! Was changed was recently listed) () changed (recently added list); } And {if (changing recently list changes.) (Recent list. Unknown). (To) changedRecentlyList.add; }}} Changed exchange list; } But I'm thinking, is there a better solution? I was thinking about using the set but I do not understand how to put a time test. You have two ways for me, for which the work needs to be understood, and which is more For those who understand Leitler of Java Collections, they are understandable: If...

Can I use spring liferay for mobile web development -

Can I use Spring Breath for mobile web development? This is a very basic question but I tried Google but I can not find any tutorials on this. Nobody can suggest anything on this. Yes you can use it, because I think Spring is a Server side java framework and for mobile web development, I do not think that customizing the page's look-end-angel does not require you to do anything special, which can be done through theme themes. Liferay can start from 6.1 you can also define. You can go to the site for a quick demo of it, and try changing the window size of the browser, and then see how the page changes even if you want this site to be a mobile You can try to look in the phone. Hope this will be helpful.

c# - From gridview to excel export - How can I get excel what I see in the application? -

is a gridview that contains some data. The header style for that gridview is & lt; HeaderStyle BackColor = "# 006699" CssClass = "GridViewHeader" font-bold = "true" ForeColor = "white" /> How can I export that gridview to excel? I want to export what I see, colors, filters etc. When I follow this link I get an error because it says that there should be form tag in which runat = "server" but when I add it, it Repeat error because the master page already has a form. Copy and paste this code into your page: Public override zero validation VerifyRenderingInServerForm (Control Control) Confirms that an HtmlForm control is provided for ASP.NET Server Control for a specified time. * /} This will solve your problem.

- Where Developers Learn, Share, & Build Careers

text "itemprop =" text "> I have the following problem: whenever I download the file containing DownloadManager it is downloaded twice (save in the" Fashion "file name Here's my code: Public Zero Downloads () {Request Request = New Request (Uri.parse (_wrapper.getURL)) ); Request.setTitle (getFileName (_wrapper.getURL ())); Request.setVisibleInDownloadsUi (wrong); Request.setDestinationInExternalFilesDir (_context, null, "/" + getFileName (_wrapper.getURL ())); _downloadID = _downloadManager.enqueue (requested); } Public BroadcastReceiver getDownloadFinishedBroadcastReceiver () {BroadcastReceiver Receiver = New BroadcastReceiver () {@Override Public Zero onReceive (context pContext, intent pIntent) {string action = pIntent.getAction (); If (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals (verb)) {query query = new query (); Query.setFilterById (_downloadID); Cursor cursor = _downloadManager.query (query); If (cursor.moveToFirst ()) {file...

c# - How to use Microsoft.Office.Interop.Excel on a machine without installed MS Office? -

I need a feature I am writing an application that works with Excel files I remove a sheet . . I'm having right Developer machine to use an assembly Microsoft.Office.Interop.Excel.dll, but to deploy the server when I try I'm getting an error: could not load file or assembly work, version = 14.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c 'or one of its dependencies I think The problem that occurs when the MS Office is not installed on the machine and the customer is not installed I do not want to buy MS Office at a price at any cost. As suggested here I installed "Redistribution primary interop gatherings" on the developer machine. And re-compile my project Code sample: public bool DeleteSheet (string Talikanam) {Excel.Application app = null; Excel Workbooks wbks = null; Excel._Workbook _wbk = null; Excel.Sheets shs = null; Bull got = wrong; {App = New Excel.Application (try); App View = false; App DisplayLetter = False; App.AlertBe...

- Where Developers Learn, Share, & Build Careers

I'm trying to set up my application so it will automatically upgrade the database, when any environment Will be posted in the following for Spring Config: & lt; Bean id = "datasource" class = "org.apache.commons.dbcp.basicDataSource" & gt; & Lt; Property Name = "driverClassName" value = "oracle.jdbc.driver.OracleDriver" /> & Lt; Property name = "url" value = "jdbc: oracle: thin: $ $ {db.host}: $ {db.port}: $ {db.database}" / & gt; & Lt; Property name = "user name" value = "$ {db.username}" /> & Lt; Property name = "password" value = "$ {db.password}" /> & Lt; Property Name = "Maxactive" value = "4" /> & Lt; Property Name = "MaxWhite" value = "5000" /> & Lt; Property Name = "Default Auto Comet" value = "False" /> & Lt; Property Name = "defaultReadOnly...

ios - pointer in Objective-C -

I am learning iOS for several months, I think I use the pointer Should have many object-type objects. But there are some cases that should not use indicators such as "NSInteger" "CGPoint" "BOOL" ... ... so the question is, what conditions do I suggest? And what is the purpose of using the indicator indicator NSIFFER, CG points, etc. Objective-Objects are not They are Straits or Type Fif. You have to use pointers with the object type. You can use Pointer with other (C) type

- Where Developers Learn, Share, & Build Careers

I am trying to write a javascript function in which I want to show error message in invalid areas of assumptions whose group name was given is. Actually I have a different set of assumptions and want to show an error message in the alert if the value entered is valid for the group, whose button is pressed using the normal function. I am using the following code: function check (group) {if (Page_ClientValidate (group)) {true; } Other {var message = ""; (I = 0; i & lt; Page_Validators.length; i ++) {If (! Page_Validators [i] .isValid) {message = message + Page_Validators [i] .Errormessage + "\ n"; }} Alert (enter the field marked with "* or invalid data \ n" + message); return false; } I want to run the following section of code for a particular group of validators: var message = ""; (I = 0; i & lt; Page_Validators.length; i ++) {If (! Page_Validators [i] .isValid) {message = message + Page_Validators [i] .Errormessage + ...

expression - How to remove the decimal part from a float number that contains .000 in RDLC -

I have an RDLC, there is a column weight in it so that a float number is displayed. If there is a decimal part, then I have to show it. Example If there is no decimal part, then I should not show x.000000 You suggest doing this ? Example The number is 10.000001, so I want to show the exact number, 10.000001 number, then 10, 000000, then shows me 10 P> You have already tried it - = format (field! "########") "# "Currently will display values. You can also try = format (field! gt; & gt; value, "d") also check -

- Where Developers Learn, Share, & Build Careers

Okay, I'm losing too much hair on this .. just so! My app has a button that will call the Facebook app to update my status. I do not want to do this in my app, I want to do it in the Facebook app! I believe that SDK is not needed for it, right? So I found that the way an intent is being used, such as sending an SMS or sending it by Gmail. > Public static zero through activity (activity activity, string subject, string text) {intent smsIntent = new intent (intent.ACTION_VIEW); SmsIntent.setType ("vnd.android-directory / MMS-SMS"); SmsIntent.putExtra ("sms_body", text); Try {Activity.startActivity (smsIntent); } Grip (ActivityNotFoundException ex) {// handle error}} Public Static Zero (activity activity, string subject, string text) via Gmail {intent gmailIntent = new intent (intent.ACTION_VIEW); GmailIntent.setClassName ("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail"); GmailIntent.putExtra (android.content.I...

scala - How to remove multiple indices from a ListBuffer (in a fast way)? -

Is it a good way to remove more than one index from the listbuff in Scala? Example: val indicesToDelete = list (4, 1) wall buffer = listbuffer (a, b, c, d, e) Result: list buffer (b, c, e) I could not find a pre-defined function which works. Any index can sort and remove the elements starting from the highest index etc, so there will be no complexity. But sorting is needed O (n * log n) Is there a fast way (probably some pre-defined I missed)? Update 1: Elements should be removed in the existing list buffer object, no new ListBuffer object should be created. Unlike others, I'm assuming that you want to do your work in these places because you mention If there is a concern about index reencurring if you are worried about all of the sort then 1) Instead of a list stick an index to be extracted in the set of viewing time. A hash set or bit set will be appropriate depending on the category of the index 2) Move the list buffer into reverse order that is...

javascript - Google Chrome Remote Debugging - Adding break points -

I'm trying to add automatic breakpoints using Chrome extensions Special script id I'm looking for then I add a breakpoint to the same place in the search result The code I use: chrome.debugger .sendCommand (debuggeeId, "Debugger. SearchInContent", {scriptId: scriptId, Query: "function"}, function (result) {for result (x result) {var lineNumber = result.result [x] LineNumber + 1; chrome.debugger.sendCommand (debuggeeId, "Debugger. SetbackPoint", {location: {scriptId: scriptId, lineNumber: lineNumber}});}}); In all, I'm getting breakpoints in the wrong places, I do not even know where the breakpoint is, but it does not stop at the right line to make sure ... / P> What do I do?

jquery - How to differentiate between 'right click using mouse' AND 'context menu key press on physical keyboard' -

How can I distinguish between right click by pressing the mouse on the physical keyboard and the context menu key? Using this code I tried printing in the console $ ('#' + inputId) .bind ('contextmenu', function (e) {console} .log (e);}); I caught some output for the above code - To right click using the mouse - Original Event: Mouse Event Type: "Context Menu" Joe: 3 Type the original: Mouse Event Type: "Context Menu" Joe: 3 Just want to do the work when the 'contextmenu key' is pressed on the physical keyboard, how do I get it? Thanks in advance! Here it will help you find differences: task demo I tested it on Alienware - Chrome, when you right click, you will right-click on the keyboard according to the keyboard and you will see a keybread alert. Please note: You can identify the click based on which property: For key or mouse events, this property is specific The key or button indicates...

javascript - Making Highcharts.js charts look good on mobile and desktop -

I am thinking that a person has made a responsive design by using High Churches to make their chart good on both mobile and desktop Has successfully implemented By default, when you change the size of the browser screen, the upper chunks again scale, the X-axis tick marks are soaked in text and bar graphs, and very thin (very compressed). . To get an idea of ​​what I mean, you can change the size of the browser and go to it. I think that these issues could possibly reduce the amount of data points to say 1/3 of the original number, though I am thinking how this program will be used to apply the hichchart's API. If it does not look like a good idea, then I am interested in other ideas or solutions, people may be using HighTech on mobile (or perhaps different Js charting libraries where multi-device solutions are easy to implement Ho. ?). The solution seems rather simple simply do not give a fixed width of the graph , That is, do not set the width or set width: 100% ...

ios - Under ARC, keep getting EXC_BAD_ACCESS after using ARC, beacause of using Block? -

PROBLEM: I'm getting EXC_BAD_ACCESS. And after I open NSZombieEnabled, I see this [FeatureCommentListViewController respondsToSelector:]: Sent the message sent to the deallocated example 0x7c1dc30 Before I changed my project to ARC, such a There is an error, but after that I changed to ARC, this error appeared. I declare a ViewController in a block and push it into the Navigation Controller. Will this matter in case the life is short UIBlockButton is from UIBlockButton * lbGood3 = [[UIBlockButton alloc] initWithFrame: CGRectMake (0, 0, First_Button_Width, [self GetGoodRow2Height: Vastu's finer]]]; [LbGood3 handleControlEvent: UIControlEventTouchUpInside withBlock: ^ {NSLog (@ "% @", Label.text); ProductDetail * productDetail = [productDetailDict objectForKey: @ "product"]; NSString * dp_id = [NSString stringWithFormat: @ "% @ -% @", productDetail.url_crc, productDetail.site_id]; FeatureCommentListViewController * cmtListController ...

- Where Developers Learn, Share, & Build Careers

I have similar documents in two separate databases . I want to connect the documents with both the DBS. How to do the easiest? I need the amount of these sets, the sets are different I think using Mongoimport, Mongorostor but how do you suggest to deal with the problem? I want to do it with Mongodp, yes. mongodump -d dbA Some code from dump / dba . Now run these commands for import into another DB. mongorestore -d dbb dump / dbA For more information on its parameters, you mongorestore --help .

python - BeautifulSoup fails parsing when it hits an unescaped bracket -

I am having trouble loading the page that contains a literal (invisible) email tag, such as & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Trial & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; test test. & Lt; / P & gt; & Lt; P & gt; This & lt; Joe@somewhere.com> & Lt; / P & gt; Has an email address for & lt; / Body & gt; & Lt; / Html & gt; Parsing fails when it runs that block: The file "/tools/oss/packages/x86_64-rhel5/python/2.7.1/" Lib / python2.7 / HTMLParser.py ", line 115, error HTMLParseError raise (message, self.getpos ()) HTMLParseError: malformed start tag, on line 748, column 82 I do not believe I have been the first one to hit it, but I can not get any help or useful document immediately, is there anything clear to me? Thank you, - Paul Always the way - When you post a question you get an answer later. It s...

- Where Developers Learn, Share, & Build Careers

I have a page (twitter bootstrap topic) that uses javascript to update the user as a page load The process script is the first line of HTML therefore is: My code then updates the mydiv element where it is and once complete, the page_load function runs and displays all the information The problem is That it is causing formatting problems in Internet Explorer. IE goes into quirks mode, I'm assuming because No suggestion at the top of the page? do that div , even if it's causing your specific problem Whether or not (my guess is yes), need to decide. You may not have such invalid HTML and hope to behave well. Obviously, take that place and the script to the appropriate place - I body , and I bet that your problem is resolved.

- Where Developers Learn, Share, & Build Careers

First check this site: Hello, Mexico and IM from Mexico, learning HTML, CSS , JS and PHP, for personal purposes. IM is trying to add that code to my test page, Example 3 example is the Random Fact Generator (form) when you click on random generaton button, this random text appears problem Is this IT reduced? And XML? Php server? ... I do not know..I have not checked anything in all code :(, I can add random text to JS with a case and a random with other methods but I like the page Do any part? comes from: View Then it comes from a PHP file. PHP is reading an XML file, a CSV file, a database etc. Tell me if you have Still Edit: If you do not want to overwrite the final fact, you have to replace it with script.js: if objCurrent (objCurrent). ParentNode.replaceChild (objReplacement, objCurrent); else {Var objContent = document.getElementById ('content'); objContent.appendChild (objReplacement);} to var objContent = document.getElementById ('conten...

- Where Developers Learn, Share, & Build Careers

I want to modify updatetime for vim for files with specific extensions. I have tried to accomplish this by adding the following code to my ~ / .vimrc : Autocommed bufferide, buffanwayfile * .t set uptaid time = 60000 This does not seem to work when I open a file with the .t extension and : set ut? I see the default updatetime = 4000 . 'updatetime' setting is a global setting, it means different Do not assume why you want a different price for different buffers? You can work with AutoComed on it, as you have tried, however, BufRead, BufNewFile event will only happen if a buffer is loaded; This setting will not update as you switch buffers, the correct method is to define two autocmds on BufEnter ; To reset a normal one setting, and (after that, it has been executed after the first time!) That matches your file pattern and organizes the settings: Autocmd BufEnter * set updatetime = 4000 Autocomedged buffent * .tet set uptime = 60000

- Where Developers Learn, Share, & Build Careers

I have created the table using html, mysql and php. I want to generate an extra column and put a number in each row of this new column. echo "table" = '1' & gt; & Lt; Tr & gt; & Lt; Th & gt; Rank & lt; / Th & gt; & Lt; Th & gt; Owner ID & lt; / Th & gt; & Lt; Th & gt; Total & lt; / Th & gt; & Lt; / Tr & gt; "; While ($ line = mysql_fetch_array ($ result)) {resonant" & lt; Tr & gt; "; echo" & lt; Td> ". '1'" "& lt; / TD & gt; "; echo" & lt; Td> ". $ Line ['owner_id']" & lt; / TD & gt; "; echo" & lt; Td & gt; ". $ Line ['Total']" & lt; / TD & gt; "; echo" & lt; / Tr> ";} resounds" & lt; / Table> "; Now the rank is an extra column that I have created and where it is 1, I can currently see it in all the row...

xml - XSLT WordML table with dynamic columns based on number of nodes -

I have several XML files from which I am trying to create WordML tablets. Each nodellist has several nodes, and I have to create a column for each column up to a maximum of 15 columns. However, if there is less than 15, then the column needs to be justified. Template that node list: & lt; Xsl: template match = "NodeList" & gt; & Lt; Xsl: each selection = "nodef" & gt; & Lt; Xsl: Sort Data-Type = "Number" = "@ Status" Order = "Ascending" /> & Lt; Xsl: Sort Data-Type = "Text" = "@Name" Order = "Ascent" /> & Lt; Xsl: variable name = "documentName" = "cocat (@ id, '_Nodes.xml')" /> & Lt; Xsl: Apply -Template Mode = Select "Sirenode" = "Document ($ documentName) / node" /> & Lt; / XSL: for-each & gt; & Lt; / XSL: Templates & gt; Template: & lt; Xsl: Template Mode = "Sirenode" M...

SQL Server using AND with IF? -

I am writing a stored procedure, but I can not understand what the compiler is wrong all about. Simply say that the complete query with errors. I can not see the error ..?! This is used as a stored procedure that updates two tables, the code itself is very clear. Set the GO ALTER process [dbo] at SET ANSI_NULLS at QUOTED_IDENTIFIER. [InsertRankingData] Select @domannamn [varchar] (100), @keyword [varchar] (100), @dagensdatum [date], @rankingposition [decimal] declared @datumen on IF as announced @domanID integer (COUNT (*) [Dbo]. [T_doman] ou doman_namn = @domannamn) = 0 [dbo] begin to insert. [T_doman] (doman_namn) Select values ​​(@domannamn) Select @domanID = select SCOPE_IDENTITY () @todaysdate = GETDATE () end and the beginning of @domanID = [doman_id] [dbo]. [T_doman] Where doman_namn = @domannamn choose @todaysdate = GETDATE () do not end @domanID does not exist zero start (select (ranking_date, ranking_keyword, ranking_id_doman) [dbo] from. [T_ranking] Where ranking_id...

c# - GridUnitType.Star? -

How does this Star Unit type work? I had read . But in reality it could not get the way to define the size of an object. * Size automatically proportionally adjusts the size, therefore, for example If you have a column with the width of * and the other with the width of * , then those two columns will have the same width (if they only have two Column, which will be 50% of the width of the grid). Instead, a column was 2 * and second, * then the ratio of the width of the column would be 2: 1. In other words, the first column will be 66% and the second will be 33% If it was 4 * and 6 * , the first column would be 40% and The second will be 60% on 2 * and 3 * you can write equally well because this ratio is important, not an integer.

sql - Tree Structure and Recursion -

Using a PostgreSQL 8.4.14 database, I have an example such as representing a tree structure: create table unit (id bilton null primary key, name varchar (64) tap, parent_id big, foreign key (parent_ID) reference unit (id)); INSERT (1, 'parent', NULL) in unit value, (2, 'child', 1), (3, 'grandson, a', 2), (4, 'grandson, b', 2); id | Name | Parent_id ---- + -------------- + ----------- 1 | Parents 2 | Children 1 3 | Grandson a | 2 4 | I want to create an access control list for those units, where each unit has its own ACL, or it should be inherited from the nearest ancestor with its ACL. create table ACL (Unit_ID bentunt faucet primary key, foreign key (unit_id) reference unit (ID)); Insert in ACL Value (1), (4); unit_ id --------- 1 4 I am To determine whether a unit is receiving ACL from the predecessor, using: create view as inheriting_acl u Id as unit_id is inheriting the unit in the form of COUNT (a. *) = 0, such as leaving u as ...