Posts

Showing posts from February, 2014

Share Image and text in twitter via intent in browser android -

I want to share the image and text as follows: intended intent = new intent (Int. ACTION_VIEW); Uri U = Uri.Pars (URL); I.setData (U); StartActivity; Please find the code below Uri Path = Uri. From ("android.resource: //" + this.getPackageName () + "/ Drawable /" + "image_name"); Intent shareIntent = new intent (); ShareIntent.setAction (Intent.ACTION_SEND); ShareIntent.putExtra (Intent.EXTRA_TEXT, "test"); ShareIntent.putExtra (Intent.EXTRA_STREAM, Path); ShareIntent.setType ("image / *"); ShareIntent.addFlags (Intent.FLAG_GRANT_READ_URI_PERMISSION); Initial activity (Intent.createChooser (share intent, "sharing"));

php - Customer Notification Board in Magento frontend -

I want to create a custom module in Magento to display notifications for websites like websites. I want to know how to increase the Magazine Core module to create this functionality and how should I go about it? I do not want to buy an extension for it. Here's a screenshot. I want to show: Alert Price list item declines Order status Update

Recursive traversal of multidimentional array in PHP -

विचार करें: सरणी (0 = & gt; सरणी ('id' = & gt; '1', 'तत्व 1' = & gt; 'मान 1', 'तत्व 2' = & gt; 'मान 2')); अब पर विचार करें: सरणी (0 = & gt; (array ('id' = & gt; '1')), 1 = & gt; ( सरणी ('element1' = & gt; 'value1')), 2 = & gt; (अरै ('element2' = & gt; 'value2'))); ऊपर की दूसरी सरणी बनाने के लिए पहली सरणी को पार करने का सबसे अच्छा तरीका क्या होगा? तर्क के रूप में किसी भी आगे की योग्यता के बिना जिसे लागू करने की आवश्यकता है, यह होगा: $ array2 = array_chunk ($ array1 [0], 1, सत्य ); देखें

java - Fast sort by date of huge file ArrayList -

I have an Arrayist in Java that contains a large amount of files (~ 40.000 files) I get these files mounted from their date Need descending / descending. At present, I use a simple collection. File (filelist, new filet compactor ()); Where the file is compactor Public class FileDateComparator Comparator & lt; File & gt; {@ Compare Override Public Ent (File O1, File O2) {If (OASSMM) (Lieutenant); O2. Alistead ()) Return -1; If (o1.lastModified () == o2.lastModified ()) 0; Return 1; }} It takes a lot of time for me, like 20 seconds or more, is there a more efficient way to realize this? I have already used the Apache I / O final modified file compiler as a comparator, but it seems that in the same way, because it takes only one time. I think you have to cache the time of amendment to increase this speed. Try doing something like this for example: class dated file {file; f; Longer moded; Public datefile (filef, long moddate) {this.f = f; This.moddate = modd

url - How to show different view for logged user in Django? -

Assume that I have followed the ScheduleList views where users (logged in or not) work The list can be viewed on selected days and PersonalizedScheduleList where the user can see all the tasks (he must log in). I could use a ListView and put the get_queryset method bigger, if not authenticated for the user - the data process is different Log in and not logged in How to show different views on a single URL pattern for the user made, logged in users can view their schedule list on the main page and can not log in. Can you see the work by selecting the day? urlpattern ('', url (r '^ $', views.ScheduleList.as_view ()), # user url (r '^ $', views.PersonalizedScheduleList.as_view ()) , # Log in user) About Regarding the handling of the request handling and the url Need to think the way. A request has been received, Django finds the first URL pattern that matches the URL of the request and that category (or in your case, with a __ call __ defined me

sharepoint - PowerShell Activate Feature not working, but works when activating it in Site Features UI -

I have a PowerShell script that activates the custom feature This feature modifies some permissions on the current web Activates. While activating it through the UI, all works well. I can see that the web break legacy and permissions are modified for some SP groups. When I activate it through PowerShell, the feature is active, but it remains legacy and no group is modified. Does anyone have this information that why can it be? I have some logging in the code, and they just do not get hit. I do not see any errors in ULS logs. It is very strange and therefore I am changing community. Thank you in advance!

ruby on rails - Searchkick Failing on Travis CI -

I only integrate Searchkick on my Rail 4.1 app and the construction of my Travis CI just failed. I resolved the first failure by adding elasticsearch service in my .travis.yml, but the order of "reindex" should be done through a rail console, and it is thus failure: Failure / Error: Unable to find matching line from tracetimeError: trailing error: index missing - Run item.reindex How do I index a model by issuing "Model.reindex" in Travis CI Here is my .travis.yml file: Language: dark red Vm: -? 2.0.0-p247 env: - DB = SQLite - db = mysql - db = PostgreSQL services: - elasticsearch script: - RAILS_ENV = test bundle executive rake db: displace --trace - bundle executive rake db: test: ready - bundle executive Rspec imagery / before_script: - mysql -e 'create database mbb_test' - psql-c 'create database mbb_test;' You postgres bundler_args:. --binstubs = / bundler_stubs I just found out in my test helper ( To add spec_helper.rb to m

java - Extracting tweets of a specific hashtag using twitter4j -

I am able to remove tweets from a specific hashtag using the Search method as below twitter4j.Twitter Twitter = TwitterFactory.getSingleton (); Query query = new query ("ipl7"); Query result result = twitter.search (query); (Status status: result.getTweets ()) {System.out.println ("@" + status.getUser (). GetScreenName () + ":" + status.getText () + ":" + status.getGeo place ( )); } However, I have received very limited tweets using the above method. What changes should I make to get all the Tweets of specific hashtags? You can use the streaming API to get a recent set of keywords by recently Tweets in your case You only have one keyword that hashtag, right? I posted a brief sample code to search for tweets with a keyword with the streaming API. You can use both streaming and search APIs for different purposes. Mostly you can use Search API for Hosteric Tweets for a limited time. This allows you to give a date interval. However,

ios - ResKit Core Data saving cache -

I am using RestKit 0.22 and I need to use multiple sqlite databases in my project. Creating and using multiple databases is not a problem itself. My problem is that Reskit uses cache before saving data, it is working with a database and works perfectly, but with many databases, my data are often saved in a wrong database. If I connect to a database and call a web service then the data is kept in the cache. If I connect to another database and I call the same web service, the datasets of both calls are saved in another database. I tried to use RKInMemoryManagedObjectCache instead of RKFetchRequestManagedObjectCache RKManagedObjectStore for managed object cache but this does not work Does. I also tried to save the dataset manually with the [code] [[[RKMaged objectstore defaultstore]] STOREManagedObjectContext: NIL] In the success block and I got the same results. I have also accepted the example of RestKit to use RKTwitterCoreData that I was not having any problems in oth

visual studio 2008 - "Reference package not found. Device Connectivity Component" when delopying C# program to Windows Mobile 6.5 device -

Image
I am working on the C # project for Windows Mobile 6.5 and I am getting it in the morning "reference package Not found the device connectivity component "whenever I try to deploy. It creates without errors and has been working till date. I took a small step of looking around and only dead found online. As far as I can see that there is no clue about that component or package, it is a reference. I think this may be related to Windows CE SQL Compact but it is based on nothing. I rolled back to the earlier version of my code and cleaned it a few times I have been stumped. I highly appreciate it for help in further diagnosing it. I am using Visual Studio 2008 3.5 SP1 Update: when I Disable "Deployment deploys the latest version of .NET compact framework (including the service pack)" but then deletes errors related to the SQL database that previously worked. Assumed because there is no access to the correct SQL packages. Update: I get the same error with the e

ios7 - Scanning BarCode from image Gallery ios 7 -

I want to scan a barcode or QR code image which is in my photo gallery in iOS. I have the camera to scan the code image once, but I did not find any way to select bar code image from UIImagePickerController and scan it. Is there any way available in AVFoundation Framework? Help me .. I have the same problem, mostly once the 32-bit barcode SDKs are running 64 architectures to support the 64 Due to the need to break up with 7.1. Zbar is impressed, ZXing has completely dropped out of the commercial package which has been out of the iOS platform. I tried one of them to do a work called Manatee but it is reducing the first letter of the barcode from the output. Right now your best bet is these commercial SDKs working with iOS 7.1 or go back to 7.0 or 6.1 and use Zabar. Everfoundation Solution works well with the enhanced @stark camera capture (I tested it with some modifications to recognize PDF417, AztecCodes and 6 or 1D barcodes), although the sample Can not code code in the app P

windows - org.mozilla.javascript.EvaluatorException: illegal character (/[filename].js#1) JSCover -

Image
I am trying to run JSCover on Windows 7, I have kept those files that I ~~~ JSCover-0.2 Want to test in .0 \ Doc \ Examples - My two files are generating errors with 500 (internal server error) , while jquery jasmine and other libraries are full. Error: org.mozilla.javascript.EvaluatorException: Invalid character (/onTheMove-Tree.js # 1) on org.mozilla .javascript.DefaultErrorReporter.runtimeError (DefaultErrorReporter.java:77) organization on org.mozilla.javascript.DefaultErrorReporter.error (DefaultErrorReporter.java:64) on org.mozilla.javascript.Parser.addError (Parser.java:188). mozilla.javascript.Parser.addError org.mozilla.javascript.Parser.addError (Parser.java:162) to (Parser.java:166) on org.mozilla.javascript.TokenStream.getToken (TokenStream.java:832) organization on .mozilla.javascript.Parser.peekToken org.mozilla.javascript.Parser.name (Parser.java:2880) (Parser.java:296) on org.mozilla.javascript.Parser.primaryExpr (Parser.java:2792) org.mozilla.javascript.Par

jsf hibernate crud form relationship -

After I am using 4 hibernate, JSF 2.2 and primefaces 4. When I create relationships with relationships which form a unit CRUD form Am I supposed to use? Use an object to relate, and one unit generic converter: or use object.id & lt; H: inputHidden id = "gender_id" value = "# {user.gender.id}"); Update: I am using standby organizations created by Netbeans from the database with the unit. User.java: @JoinColumn (name = "gender", referenced ColumnName = "id") @ManyToOne (optional = false, fetch = FetchType.LAZY) private Gender gender; Public gender genders () {return gender; } @Basic (optional = false) @Column (name = "0") =================================================================================================================== < ID ") Private Long ID Public Long ICID () {Return ID; } I think the first time you load the page, the gender property is zero Do you get NPE? Can you try adding

css3 - Is there a SASS/CSS selector for items WITHOUT a particular adjacent sibling? -

मैं सभी & lt; li & gt; वर्ग के साथ तत्वों को "foo" जो कि "बार" के साथ एक & lt; li & gt; तत्व के एक आसन्न भाई नहीं हैं क्या एक "आसन्न भाई बिना [x]" एसएएसएस / सीएसएस चयनकर्ता है? या यह दो नियमों के माध्यम से पूरा करने का एकमात्र तरीका है, सबसे ऊपर सीमा को और लेफ्टिनेंट; li class = "foo" & gt; एस और दूसरे को से दूर ले जाने के लिए जोड़ें ; Li & gt; & lt; li वर्ग = "बार" & gt; जब मैं कर्कशता से निहित होता है, तो आप यह करना चाहते हैं: HTML & lt; ul & gt; & Lt; li वर्ग = "बार" & gt; बार & lt; / li & gt; & Lt; li वर्ग = "फू" & gt; foo & lt; / li & gt; & Lt; li वर्ग = "फू" & gt; foo & lt; / li & gt; & Lt; li वर्ग = "फू" & gt; foo & lt; / li & gt; & Lt; li वर्ग = "फू" & gt; foo & lt; / li & gt; & Lt; li वर्ग = "बार" & gt; बार & lt;

PHP wildcard character in the string -

I am echoing the embedded style of the div. In that style I am setting up the background image I know the image file name , But I can not do anything about the file type because it can be JPEG, JPG, GIF or PNG. Like this example, it could be PGG image. if (file_exists ("images / img_". $ LoggedInUser-> user_id. ".jpeg")) {echo "style = 'background-image: url (\" images / Img _ ". $ Logged inUser -> user_id);". "." Jpeg. "} Is it possible to use any type of wildcard character for the extension? If multiple files match pattern then it will be used first: if ($ file = glob ("images / img _ {$ loggedInUser-> user_id}. *")) {Echo "style = 'background-image: url (\" {$ file [0]} \ ');' ';} If you want a different behavior for more than one file, then tweak it.

Leaflet map and bootstrap 3 -

please see I have at least some problems and I have not found any solution yet. First issue: The map of this booklet is 0 px height and the next line is not in the correct position. Second problem (but perhaps it is related to the first one): Width of the map on a small device , But I want to make a margin and I was not able to get it (I Shish but margin-left, margin-right and padding-left, padding-right ...) and of course the text line has been rotated in the map and it is not what I want ... By looking at your side, it seems that your first problem was solved (I'm looking at the map so that there is no height of 0 pix needed). For your second problem, this is the bootstrap editor that can not show your app on the small app. This problem can be solved when you see your app on your own web page.

node.js - Node - Trigger task runner from within a script -

I am looking for some help with nodes and work teams. I'm looking for a job runner, but when I need a bucket it can be a quick fit. I have a script which runs in the form of a cron job every 5 minutes. I have some argument from that script that if the conditions are met then it will have to call the second script. The first script should be executed and shut down, but the scanned script will need to be run. What I am doing for reference, my first script is checking the SVN repo and verifying the amendment number, if to make updates individually and then to run a test suit needed. The first script should be run solely responsible for checking the repo and updating as needed, and must be completed upon completion. The next set of scripts has to be implemented under your process. I am basically establishing a continuous integration and many things are going on including unit tests, short / sauce compilation, mining, etc. If I chose the position for my best and most eff

Parsing JSON variables on Instagram -

I'm trying to get all JSON variables and values ​​from an Instagram page IE: View-source: Is there any work that you recommend? I tried to use json_decode but not all pages are Jason - it will only be empty for me $ instagram_url = "http://instagram.com/justinbieber"; $ Html = file_get_contents ($ instagram_url) $ doc = new DOMDocument (); $ Doctor & gt; LoadHTML ($ HTML); $ Xpath = new DOMXPath ($ doc); $ Js = $ xpath- & gt; Query ('// body / script') - & gt; Item (1) - & gt; Nodeville; $ Start = strpos ($ js, '{'}; $ End = strrpos ($ JS, ';'); $ Json = substr ($ JS, $ start, $ end - $ start); Var_dump ($ json);

java - How to change values of integer array inside onPreviewFrame? -

मेरे पास एक मुख्य वर्ग है: मुख्य गतिविधि गतिविधि क्रियाकलाप बढ़ाता है TextureView.SurfaceTextxtureListener सरणी के साथ: निजी int [] परीक्षण = नए int [2]; जब एक बटन दबाया जाता है मैं एक फ़ाइल पर चित्र को बचाता हूँ और यह काम करता है, लेकिन मुझे भी (सहेजने से पहले) बफर पर एक माप की गणना करना चाहिए और इस सरणी में बदल मान देखेंगे। / P> इस उद्देश्य से मैं मुख्य गतिविधि से कॉल करता हूं: mCameraManager.takeSnapshot (परीक्षण); में कैमरा मैनेजर मेरे पास है: सार्वजनिक शून्य लेने के लिए स्नैपशॉट (इंटेल [] परीक्षण) {स्नैपशॉटमैनेजर एमएनजी = नया स्नैपशॉटमैनेजर (एमसीटीएक्सटेक्स्ट) , MCurrentTextxture, एमकैमरा, परीक्षण); mng.takeSnapshot (); } और अंत में स्नैपशॉटमैनैजर मेरे पास है: सार्वजनिक स्लोप स्नैपशॉटमैनैज़र कैमरा का पूर्वावलोकन करता है। पूर्वावलोकनकॉलबैक {निजी मुख्य गतिविधि mContext; निजी सतह संरचना एमकेएएमएराएक्टेक्शन; निजी कैमरा एमकैमरा; सार्वजनिक int [] mtest; सार्वजनिक स्नैपशॉटमैनेजर (मेन ऐक्टिवेटी प्रसंग, स्पेसटैक्सेचर कैमरा फिक्स्चर, कैमरा कैमरा, इंट

Change Chrome settings from an extension -

Image
Is it possible to override Chrome browser settings by extension? I'm particularly interested in the global "encoding" setting, which is by default wrong and causes problems with the "filesystem:" URL scheme. Probably not, because it can be a security risk; The browser should not allow the extension to modify its settings.

c# - Python XOR on hex and string (parity check function) -

I am running into problems with hex value and python. I am trying to write a function that does the same XOR and returns a hex value. Actually I am trying to convert this C # code into Python: Private Byte [] AddParity (string_in) {byte parity = 0x7f; & Lt; Byte & gt; _out = new list & lt; Byte & gt; (); ASCIIEncoding asc = new ASCIIEncoding (); Byte [] bytes = asc.GetBytes (_in + '\ r'); Foreign (bytes in Byte BT) {Parati ^ = BT; _out.Add (BT); } _out.Add (parity); Return _out.ToArray (); } Can anyone tell me in the right direction? equality = 0x7f parities = [int (item, 16) ^ "4e 7f 2b" .split ()] # or perhaps parity = [ord (item) ^ paragraph for item in "somestering"] I think you use it as some kind of checksum For the bit in "Somestring" equality = 0x7f bits [=]: parity ^ = ord (bit) parity & amp; = 0xFF # Extension width bits .append (bit) bits Append (Samata) You can do this to make the checksum mor

python - Django: What is the first method that is called in by as_view() in form views -

मेरे पास / book / (? पी & lt; book_id & gt; \ d +) / (? पी & lt; पेज_id & gt; \ d +) / संपादन / जहां django.views.generic.edit.FormView के रूप में इस समापन बिंदु पर हैंडलर। जैसे ही अनुरोध किया जाता है, मुझे यह जांचना होगा कि क्या पुस्तक वस्तु मौजूद है book_id में मौजूद है और पृष्ठ संख्या में मौजूद है संबंधित पुस्तक का उपयोग करके पेज_id । यह प्रसंस्करण करने के लिए कहां उचित जगह होगी? संपादित करें इसके अलावा, यहां का मुश्किल भाग यह है कि फॉर्म_ क्लास यहां इस्तेमाल की जाने वाली वस्तुओं पर पूरी तरह निर्भर है! वर्तमान में हमारे फ़ंक्शन आधारित विचारों में, एक डेकोरेटर का उपयोग उस विधि के लिए किया जाता है जो नौकरी करता है। कक्षा आधारित विचारों में, मुझे यकीन नहीं है कि यह करने के लिए क्या जगह है। विशिष्ट फ़ंक्शन बेस दृश्य में def get_object_or_404 (view_function): डेफ डेकोरेटर (अनुरोध, book_id , पृष्ठ_आईडी): वापसी दृश्य_विवरण (अनुरोध, पुस्तक, पृष्ठ) रिटर्न डेकोरेटर @ get_book_or_404 def edit_book (स्वयं, पुस्तक, पेज): # प्रक्रिया पृष्ठ वापसी ए

java - Skipping Every N th line while reading from file -

I am trying to read a file containing the data in the form, 0 160 76 160 0 320 11 320 0 960 470 960 960 0 12 6 12 0 24 7 24 0 1500 302 1500 3000 0 70 33 70 0 140 60 140 0 784 74 784 3920 I have to leave every fourth row (like 4, 8, 12, .. ATC), which contains single values. I tried this way, scanner scan = new scanner (new file inputstream ("demofile.txt")); Int Linenum = 0; While (scan.hasNextLine ()) {if (linenum! = 0 & amp; linenum% 4 == 0) {linenum ++; to continue; } Else {String str = scan.nextLine (); String-locator st = new string locator (str, ""); // Remove four tokens from a single line String a = st.nextToken (); String b = st.nextToken (); // This line throws java.util.NoSuchElementException // and so on .. // Other stuff ... linenum ++; }} Although this is not working, I'm detecting the error: Exception in thread "main" java.util.NoSuchElementException Java on URL on read_emo.main (readdemo.java48) StrongTokenNear.NX

c# - Long running, but finite length HttpWebRequest Callout gets only partial data -

I am trying to work with a third party service API, one of the ways in which all records Those that take a lot of time, about 9 minutes (I tried to use this Chrome app "Advanced Rest Client"). I have webRequest.Timeout = 3600000; Have tried setting timeout // // timeout. Infinity; but it always comes back after 2 minutes and the result is 135 records (while the Chrome app returns 1050 records, which is correct #) I have the same parameters in both cases (I send it as POST data); So why is the difference in the result? I am using this code in the class library which will be used in a WPF application. What is the maximum value for timeout? Timeout. Eternal is setting it '-1', is that right? What are other ways to get all the data? Any help / suggestion is greatly appreciated. Update: Adding code HTTP Webbet WebRequest = (HTTP WebBurst) http webbet. Create (url); AllDevicesList devInfo = null; {String postData = ""; Foreign currency (st

Image upload to server using html and php -

I am new and experimenting with web development. I am trying to upload an image to a server using the following html and php code. & lt; Form action = "upload_image.php" method = "post" enctype = "multipart / form-data" & gt; Upload images from source: & lt; Input type = "file" name = "picture" & gt; & Lt; Input type = "submit" name = "upload" value = "upload image" & gt; & Lt; / Form & gt; & Lt ;? Php if (isset ($ _ POST ['Upload'])) {$ image_name = $ _FILES ['image'] ['name']; $ Image_type = $ _FILES ['image'] ['type']; $ Image_size = $ _FILES ['image'] ['size']; $ Image_tmp_name = $ _FILES ['image'] ['tmp_name']; If ($ image_name = '') {"& lt; script> warnings (select a picture to upload ') & lt; / script & gt;"; Go out(); } Else move_uploaded_file ($ i

ember.js - Observe @each and get updated item -

I'm looking for a controller property (an object) with @each in your scene. Every time, @each changes, I want to know, the item has changed. Is there a way to figure it out? Docket.OrganizationView = Ember.View.extend ({chartObserver: function () {console.log (THE_ITEM_OF_CHARTDATA_THAT_HAS_CHANGED)} .observes ( '. Controller.chartData @ all')}); You can define the properties of your controller. : Creates a calculated property that runs on partial arrays and it "is updated with" words at a time. Ember.ArrayController.extend ({changedContent: Ember array Computed ( "content. @ Each. Name", {Added items: function (Array, items, Priwartnmeta, Instamenteta) {array. Clear (); array. pushObject (item); return Arar;} deleted items: function (array, items, changeMeta, instanceMeta) {array.clear (); array.pushObject (item); return array;}}) });

json - Issue Xcode change char "@" to "%40" -

I used AFNetworking in my app When I use the FNA field with EMAIL Error will appear: error: error domain = f networking error code = -1011 "request failed: not found (404)" UserInfo = 0x1096634a0 {NSLocalizedDescription = request failed: no Found (404), NSErrorFailingURLKey = http: // mywebservice / vlemail email = me% 40domain.com, AFNetworkingOperationFailingURLResponseErrorKey = & lt; NSHTTPURLResponse: 0x109558d10 & gt; {URL: http: // mywebservice / vlemail? Email = me% 40domain.com} {status code: 404, header {connection = "keep-alive"; "Content-length" = 967; "Content-type" = "text / html; charset = UTF-8"; Date = "Mon, 28 Apr 2014 19:01:43 GMT"; Server = "nginx admin"; }}, NSUnderlyingError = 0x1096756e0 "Request failed: unacceptable content type: text / html"} , odd, because the field is email: NSLog (@ "txtEmail.:% @" , _txtEmail.text) = [2908: 60B] txtEmail: me @ domain

C++ Templates & Inheritance in Java -

मेरे पास सी क्लास में सी ++ है ParentClass {वर्चुअल इंट मैमथि (); } क्लास मौजूदा एक: ParentClass {...} मौजूदा मौजूदा दो: ParentClass {...} अब मैं एक ऐसा क्लास बनाना चाहूंगा जो मौजूदा वर्गों में से किसी एक को बढ़ा सकता है और एक जोड़े को ओवरराइड कर सकता है सी ++ में यह निम्न का उपयोग करके किया जाता है: टेम्पलेट & lt; क्लास बेसटेम्पलेट & gt; वर्ग MyClass: सार्वजनिक बेसटैप्लेट {int MyMethod () {DoSomething (); रिटर्न बेस टेम्प्लेट :: MyMethod (); }} यह कैसे जावा में किया जाता है? अब तक मेरे पास सार्वजनिक सार वर्ग ParentClass {सार्वजनिक सार इंट MyMethod (); } पब्लिक क्लास ExistingOne ParentClass को विस्तारित करता है {...} सार्वजनिक वर्ग मौजूदा बॉटलिंग ParentClass {...} सार्वजनिक वर्ग MyClass & lt; T ParentClass को बढ़ाता है & gt; {सार्वजनिक इंट मायमथि () {डूसोमिंग ()) वापसी T.MyMethod (); // MyMethod स्थिर रूप से परिभाषित होना चाहिए? }} ओह, और अंत में, मैं "मौजूदा" या मूल वर्ग को संशोधित नहीं कर सकता। क्या यह सही दृष्टिकोण है? कैसे मैं स

java - Not ready for backup request right now -

instalationID randomly generated whenever a user first installs my app (Instalationid = 123). I'm trying to back up this instalationID so that when the user is uninstalled and my app is installed then the old installation ID (123) will be handed over to it again instead of a new app. After all, he is the only user. I have a shared priority file, which is called SESSION_INFO_PREFERENCE_KEY , which holds instalationID and I try to back up the shared priority file. Back-up Manager: Public Class ADC Backup Agent Backup Expands AgentHelper {// ShadpiPrincess File Installation ID's Name Fixed Last String INSTID = "SESSION_INFO_PREFERENCE_KEY"; // SESSION_INFO_INSTALLATION_UID // key to uniquely backup data to determine the final string INSTID_BACKUP_KEY = "inst_id" set; // Assign an assistant and add it to the backup agent @ Override Public Wide On Crit () {Log.i ("OnCreate Method", "Call !!!!!! !!!!!!!!! ! "); SharedPreferencesBackup

white spaces publish asset manager yii -

I have an image with an empty space on some pages, it works fine on others, it cuts Where is the blank same image ... I get it on a page (wrong): $ thumb = Yii :: app () - & gt; AssetManager- & gt; Published (Yii :: Application () -> BasePath '/ images /' .$ Data-> Products-> Product_image); By & lt;? Echo '& lt; A href = "'. $ Url.'" & Gt; & Lt; Img src = '. $ Thumb. '& Gt; & Lt; B & gt; $ Prodname '& Lt; / B & gt; & Lt; / A & gt; ';; & Gt; and on the second (right): & lt; Img src = "/ assets / 848b31ff / thumb_4307-0403141 Big.jpg" class = "thumb-product" border = "0" alt = "" & gt; if (is_file ($ img_path $ model-> product_atage) & amp; is_file ($ thumb_path. $ Model- & gt; Product_is)) $ $ product_imaget = Yii :: app () - & gt; Property Manager- & gt; Publish (Yii :: app) - &am

geolocation - Mismatch in Latitude-logitude obtained from Google API -

I was trying to get a "latitude-longitude" notification for multiple addresses using Google APIs. However, I noticed that for some addresses, "latitude-longitude" values ​​were different from time to time. Can "latitude-longitude" change over a period of time? If so, why? Or is this just a bug (or may be due to an update) in Google API? The latitude-longitude pair defines the geography in the earth, and that point is not usually going on. If you get different results for the information of the same address, then it is a service which offers different values ​​for any reason. In this way, check that what is actually going on, either you are giving a different address or the service is making it a different explanation. The best way to determine what has happened is to see that in fact What values ​​were used in the query, and then check all the data given in the game (many APIs are also giving the address details for the given location as the result val

exception - thread "main" java.lang.ClassNotFoundException -

Trying to run a job, but I am getting this error. I do not know how to solve it, is there something missing? What's wrong here? This is in my shell [cloudera @ localhost home] $ hadoop jar cloudera / MinMaxCountDriver.jar MinMaxCount / user / cloudera / Comments.xml / user / cloudera / SuperUserXML / This is the error I received Exceptions in thread "main" java.lang.ClassNotFoundException: MinMaxCount ... Java.lang.Class.forName0 at (original method) on org.apache.hadoop.util.RunJar.main at java.lang.Class.forName (Class Java to 2007) (RunJar.java20001) < P> Here is my driver Public square MinMaxCountDriver {Public static zero main throws exception ([args] string {configuration c Onf = new configuration ()); String [] otherArgs = new generic option parser (conf, args). GetRemainingArgs (); If (OtherAg.Lamp! = 2) {System.err.println ("You need 2 agreement"); System.exit (2); } ... FileInputFormat.addInputPath (job, new path (other articl

jsf - Remove CSS Style in <a4j:jsFunction> -

I have a popup panel in which to clear the form data and reset the CSS style when clicking on a graphic image (Which has the image of the pass button). I am clearing form data by doing this: I want to know two things: 1) Do two events - clearing the form and clearing the CSS style in the same function 2) How to create a CSS For an element to remove property? Currently, there is a color range - WebKit-box-shadow: 0 0 5px RGBA (231, 41, 61, 1); I need to delete this style thanks, JSF NB I will start from the end. Richts use jQuery so that you can use it. In your case: $ ('# inputId'). CSS ('WebKit-Box-Shadow', ''); Note that if the input id looks like j_idt100: j_idt103 then you need to avoid the colon - j_idt100 \\: j_idt103 , Although, if you have many elements that are to handle it, then it will be easy to give them the same class. For two things with one task, you can not do this in this case. However, implementing two

Python TypeError: an integer is required comparing times -

There are lots of threads with questions like me, but I can not find the right answer. My goal is to create a statement that compares the time compared to the time (time determined by start time and end time). If I schedule specific numbers, but I need to pass variables in my description that this schedule is not going to be static. What I have so far: Shocker Diet Scheduler (as import time): Dantime Import Time-Time = () Def Scheduler (): conn = Pymysql.connect (host = 'myhost', db = 'test', user = '1234', passwd = '123456', autocommit = true) = Conn.cursor () query = ("Start selectionTitHour, starttime, endimehore, And Schedule from TMEMUNEET where HVID =% s ") print queue qu.execute (query, (number)) for the row in line: print line door_schedule_list.append (line) cur.close () conn.close () LAN (door_schedule_list) & gt; 0: start_time_hour = door_schedule_list [0] [0] end_time_hour = door_schedule_list [0] [2] end_time_minut

joomla - Website seems to be infected by JPG:PHPAgent-A [Trj] -

I'm trying to find malware infection (Joomla 1.5.26) in my site but I can not find anything suspicious is. P> Scan in many places also found in the online file system! Anyone with any thought why my antivirus (Avast) is telling me that the website is infected? In fact, this JPG: PHPAgent-A [Trj] threatens multiple images loaded by a special module (which I have checked for the transition!) Here is a link: < / Div> Actually these JPG files were infected with malware. Interested in:

WiX Installer InstallPrivelges="elevated" not working -

Image
जब मैं अपना इंस्टॉलर चलाता हूं, तो मुझे निम्न समस्या मिलती है। मैं कुछ कस्टम क्रिया कर रहा हूं जिसके लिए रजिस्ट्री तक पहुंच की आवश्यकता होती है और मैं केवल यह सोच सकता हूँ कि इसका कारण वाईएक्स कॉन्फ़िगरेशन ने यह व्यवस्थापक प्राइवल्स का अनुरोध नहीं किया है। मैंने कुछ पदों पर सोख दिया है और उपयोग करने की कोशिश की है। InstallPrivesleges = "elevated" पैकेज तत्व के भीतर हालांकि यह संस्थापक के पास व्यवस्थापक ढाल है और अनुरोध करता है इसलिए यह अभी भी त्रुटि पैदा करता है। परीक्षण परियोजना के बारे में अतिरिक्त जानकारी। मेरे आवेदन का नाम है: WindowsFormsApplication33, कस्टम क्रिया प्रोजेक्ट का नाम कस्टम एक्शन 1 है और सेटअप प्रोजेक्ट का नाम SetupProject1 है। यह मेरी वर्तमान विक्स xml फाइल है। पैकेज इंस्टॉलरविशेष = "200 "संकुचित =" हां "InstallPrivileges =" elevated "InstallScope =" perUser "/ & gt; & Lt; बाइनरी आईडी = "CustomAction1.CA.dll" SourceFile = ".. \ CustomAction1 \ bin \ $ (var.Configuratio

android - Delphi XE5 RestClient and PHP generated JSON with boolean data types -

I'm making my first Android app with Delphi XE5. PostgreSQL database running on an intranet in the data Given that access to databases directly from mobile devices is not recommended, I provide Apache Web Server and PHP application have installed. Everything is fine, but I have a problem with the boolean field: This is a sample table: choose from resources *; and use the json_econder function to return data in json format: $ r = $ dbh- & gt; Query ($ sql); If ($ r) {$ f = $ r-> gt; all (); Echo json_encode ($ f); } ... The returned data is as follows: [{"" resource_id ": 1 , "0": 1, "resource_name": "lathe 01", "1": "lathe 01", "action": wrong, "2": wrong}, {"resource_id": 2, "0": 2 True, "2": true} {"resource_id": 3, "0": 3, "source_name": "lathe 02", "1": "lathe 02", "

c++ - triangulating a triangle into a grid -

Image
Is there an algorithm for dividing a triangle that can dissolve many grid elements into several triangles, where a triangle Which is not that many grid elements? I have included a glance hand-graphic of a triangle in a 2x2 grid which is applied in seven small triangles. Your triangle closes the polygon to the 3 rows The arrangement of points gives you the winding rule (CW or CCW) 1. Queue all the rows by the grid lines But still the single closed polygon Leave the triangle as < Li> Simply group all the rows related to the same grid cell together then all the points are inside the cell or on the side Do not change the rotation! 3. Change the list of rows to polygons off Start from the first line in the first line in your direction If not, then the cell line in the same winding direction Any other line point Or do not hit the cell corner Stop it until it stops Similar to other cells 4. Now you have closed the convex polygon l

spring integration - Aggregator that releases partial group based on correlation but holds on to rest of the messages -

I want to set up a correlation strategy on an aggregator so that it comes in the form of incoming file (in the form of message) To correlate the files that can be used so that all files related to the current date belong to the same group. Now that I have the value of several days of data, it is possible that I have collected 2 days of files. I want to base the release strategy on a file (message), which also includes the file name date, so there will be a bunch of files each day and will be done for the file to release files for that day from the aggregator But the files should be continued on the second day until the file is filed for that day. So in this scenario, the correlation is clearly simple - but I am not sure how to release all, but only on the basis of correlation key are some specific messages of the group about the messaging In the documentary speaks, but it goes to the messaging store and I want to do all this in memory. Let me expand with an example I have a d

PHP Code in Smarty - Urlencode -

I have a php and a sense of mixed code as part of the code. How can I write all the codes in a sensible way? {php} $ shortenedurl = file_get_contents ('http://url.to/api.php?url='. Urlencode ({$ ShopURL} /index.php?wlid={$ CWunschliste-> cURLID}; {/ php} & lt; input type = "text" id = "wunschliste_public_url" value = "{php} echo $ shortenedurl; {/ php}" / & gt; < / Pre> You should not use this kind of rationality. You should do such things in PHP and create rich variables Assign is a smartly template engine and you should only display data using it. If you are a template engine C using other), then to use it in this way makes no sense. It only affects your performance, provides no benefit.

ruby - 'require uri' in not working in Rails 4 app -

A utility class requires "Yuri" and does not seem to be loading. Retrieve the error: for "query" / undefined method on NoMethodError "https://api.twitter.com/1.1/search/tweets.json?q=%40twitterapi":String While. Should be available through some method: Any ideas on what I'm doing wrong? The method you are trying to call is available only on the URI object, but you Trying to call it on the string. (Representing Yuri's String) If you want to be able to use those methods, then you have to create a URI object. uri = URI ("https: //api.twitter.com/1.1/search/tweets.json? Q =% 40twitterapi") uri.query # = & gt; "Q =% 40twitterapi"

active directory - Trying to Generate the superior list of User in AD using Powershell -

This is a simple power script that takes the user as input and generates the user's hierarchy in the organization It does not ensure that where I am doing wrong, the following is the code; <$> $ User = "XXXX" function managed ($ user, $ route) {$ search = [adsisearcher] $ root $ search.filter = "((Samaccountname = $ user))" $ UserAtt = $ Search.Findone () $ title = $ UserAtt.Properties.title $ ManDN = $ UserAtt.properties.manager ($ title -mail "avp") {$ ManDN $ title} Other {$ ManRoot = "[ADSI ] `" LDAP: // "+ $ MANDN $ ManDN =" `'" + $ Mandan + "`' "$ ManSamID = dsquery user $ MandIdN -Sap $ $ $ ManSamID $ MANRoot managed by}} Foreach ($ User $ user) {$ UserDN = dsquery user - SIM $ user $ UserCN = $ UserDN.split ("=") [1] .split (",") [0] $ User DN = $ USerDN .Substring (1) $ root = "[ADSI]` "LDAP: //" + $ UserDN $ user $ root is managed by " This person&

java - How to get attribute from another page -

Let's say I have page1.jsp and I do: request .setAttribute ("Message", "This is My Error Message"); Response.sendRedirect ("page2.jsp"); In my page 2.jsp, I try to get the message using this code: But the result is zero. I could do this response.sendRedirect ("page2.jsp? Message = error message"); You can get the message with and request.getParameter , but I do not like this view. Any other ideas? You can forward the request instead of redirecting it. Forwarding is transparent to the user, while a redirect actually sends 302 response codes and creates a new request.

ios - Attach LLDB to app on iPhone connected to computer - Command line -

I know how to connect the app that runs the XDD on the iPhone, but I should be able to do the LODB debugger To do this from the command line How can I get this over command line? I like to do it by app name, but I am happy to do this through the bundle identifier. PID probably will not work because I will not have a reliable way of obtaining it. LDB debug does not know how to launch session From Mac to iOS device. Xcode works for us, and then lldb has just talked to the communication channel which has been given to it. The only official way to access this functionality is via Xcode.

google analytics - UserId, CID in measurement protocol -

The Measurement Protocol To identify a user returning a new user, can we use the User ID field ( That is, we can make the hash user name or other identifier unique for the user and connect it with a specific user. In this way, we can effectively return the users by creating new users. CID But the question - In case of CID session, specially incentive the user's session. Do we have to manually monitor session end to create CID in user session? < P> Pls explanation After a long time, but it can help other people .. . My understanding is that the CID references the device while the user-id is a Anit user manual gives. So basically, the same Client ID or will be connected to the same user in the hit GA with the user ID (though see). " A client ID represents a unique device / browser, where the User ID represents a unique user who can access many devices / browsers with your device. / Em> "From A group of A is represented by both hits: Less tha

c# - WCF: Failed to create a service -

I have a WCF service that was unable to create a database connection because I was using plain SSL instead of my SSLL . So, I changed my code, and now when Running gets me "failed to add service". Service metadata may not be accessible. Make sure that your service is running and is exposing metadata "error, does anyone know why this is happening? & Lt; / AppSettings & gt; & Lt; System.web & gt; & Lt; Compile debug = "true" targetFramework = "4.5" /> & Lt; HttpRuntime / & gt; & Lt; Pages controlRenderingCompatibilityVersion = "4.0" /> & Lt; /system.web> & Lt; System.serviceModel & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior & gt; & Lt; ServiceMetadata httpGetEnabled = "true" httpsGetEnabled = "true" /> & Lt; ServiceDebug includeExceptionDetailInFaults = "false" /> & Lt; / Behavior &

zend framework2 - what's best approach permalink database with zf2 and doctrine2? -

I am creating a web site with zf2 and theory how can I save the permacquatch in my database? What is the best way? Should I have Permalink saved in my institutions? // Product Docctin unit public function setprodername ($ prodName) {$ this- & gt; ProdName = $ prodName; // is this the right way? $ This- & gt; SetSeoLink = urlhelper-> Url ($ prodName); } " I suggest you use your URL to hash, like < / P> <<> /this-is-the-product-title-xyz123.html Where xyz123 is the hash of your product. By doing this you can change the title of your product at any time, your product can always be accessed on the search engine or other website, For example, both /this-is-my-product-xyz123.html and / It is-my-amazing-product-xyz123 .html will work. 2) You are not showing people the real identity. I used the module to accomplish this, to create a factory service that already returns the configured object, you can encrypt / decrypt using this c

c# - Cannot attach to .mdf file after changing physical directory of solution -

I am following an MVC4 tutorial on Pluralsight, and all my demo projects are controlled through Visual Studio Online I currently only test locally (blue or nothing posted) I am developing an ASP.NET MVC 4 application which uses EF5 code first model. I enabled the migration, and the lower class was created for which I introduced the seed method and automatic migration turned on internal seal class configuration. DbMigrationsConfiguration & LT; MyProject.Models.MyProjectContext & gt; {Public Configuration () {AutomaticMgrrans Enabled = True; } Protected Override Zero Seeds (MyProject.Models.MyProjectContext Reference) {context.MyCollection.AddOrUpdate (v = & gt; v.attr1, New MyProject) {ATTR1 = "MVC4", ATTR2 = 120}, New MyProject () { ATTR1 = "LINQ", attr2 = 200}); Context.SaveChanges (); }} I'm using the default connection string for my localDb example (not the hard-code path) with the dynamic data directory. "AttachDBFilename = | Da

java - duplicating local variable in a jsp -

जावा वेब प्रोजेक्ट में मेरे index.jsp पेज को पुनः लोड करते समय मुझे एक अजीब त्रुटि हो रही है । & lt;% // index.jsp // आयात स्ट्रिंग टीमों = इनिट .get टीम्स (); & Gt%; & Lt;! - डिफ़ॉल्ट HTML सामग्री - & gt; & Lt; चुनें class = "select" & gt; & Lt; विकल्प मान = "0" चयनित = "चयनित" & gt; होम टीम चुनें & lt; / option & gt; & Lt;% = टीमें% & gt; & Lt; / चयन & gt; & Lt;! - डिफ़ॉल्ट HTML सामग्री - & gt; तो मैं Init.getTeams () इस जावा विधि से कॉल कर रहा हूँ: सार्वजनिक स्थिर स्ट्रिंग मिलते हैं () { स्ट्रिंग एस = ""; ArrayList & LT; टीम & gt; टीम = नया अर्रेलिस्ट & lt; टीम & gt; (); टीमें = माइस् SQL कोंकनक्शन.टेटम (); के लिए (टीम टी: टीम) {s + = "& lt; विकल्प मान = '" + t.getId () + "' & gt;" + T.getName () + "& lt; / विकल्प & gt;"; } वापसी एस; } (डेटाबेस से मूल्यों को पुनर्प्राप्त करने के लिए मैंने लिख

When receiving the sms, only the message was displayed but app didnt open - Android -

I'm new to Broadcast receiver concepts. When the app receives the message it shows the message using toast .makeText. But the app did not open How can I open the app please help. This is my active class Public class increases BroadcastNewSms activity (tied at protected zero) {super.onCreate (savedInstanceState); SetContentView (R.layout.androidexample_broadcast_newsms);}} This is a separate class from my incoming SMS when it receives only the message, but the app did not open how can I I am The public class extends the incoming SMS broadcast receiver (public reference is at zero (reference reference, intent to intent) {final bundle bundle = intent.Gate extras (); try {if ( Bundle! = Null) {last item [pdusObj = (object []) for bundle.get ("pdus"); (int i = 0; i & lt; pdusObj.length; i ++) {int duration = Toast.LNNHHLog; SMS Manager SMS = SMSManagerGet Default (); Sms.sendTextMessage ("7373457769", blank, message, empty, empty); St Toast = Toa

how to get set Country Isd Code on Selection of COuntry Name in android -

पैकेज com.lociiapp; आयात करें java.util.ArrayList; आयात करें java.util.Collections; Import java.util.Locale; आयात करें com.example.imageslideshow.R; आयात एंड्रॉइड। एप। आयात करें android.content.Context; Import android.content.Intent; Importroid.os.Bundle; आयात करें android.telephony.TelephonyManager; आयात करें android.view.View; आयात करें android.view.View.OnClickListener; आयात करें android.view.Window; आयात करें android.widget.ArrayAdapter; आयात करें android.widget.Button; आयात करें android.widget.EditText; एंड्रॉइड। आयात करें; स्पीनर; सार्वजनिक वर्ग RegitsraionPage गतिविधि का विस्तार {निजी स्पिनर देश; संपादित करेंटेक editext; बटन रेगस्ट्रियनबटन; @ ओवरराइड संरक्षित शून्य को क्रिएट (बंडल से बचाया गया इन्स्टेंसस्टेट) {// टोडो ऑटो-जेनरेट किया गया विधि स्टब सुपर। कॉनेट (सहेजे गए इन्स्टेंसस्टेट); this.requestWindowFeature (Window.FEATURE_NO_TITLE); setContentView (R.layout.registraion); देश = (स्पिनर) ढूंढिए वीवीबीआईआईडी (आरआईडी। स्पिनर 1); Editext = (संपादन टेक्स्ट) findViewById (R.i

javascript - jQuery Recursive AJAX Call Promise -

I'm still trying to find out how to use jQuery's deferred object in recursive AJAX calls. I have such code function request (page, items) {// jsfild build ajax return value for dummy AJAX endpoint var ret = {totalPage: 10, current page: page, item: []}; (Var i = page; i <(page + 5); i ++) {ret.items.push (i); } // AJAX $ .jax (/ url: '/ echo / json /', method: 'POST', data type: 'jason', data: {delay: 1, JSON: JSON.stringify (ret)} calling, Success: Tasks (Data) {if (Data Courent Page & lt; = data.totalPage) {var filtered = Data.im. Filler (function (L) {return L% 2 == 1;}); var newitems = items ConSat (filtered); Console der (nuites); Requests (Data Courent Page + 1, Nuitimes);} and {Console Dir (Item); // Resolve All Items}}}); } Work Request All () {Request (1, []); // There was a promise that all items should be returned} Here is JSFiddle I know how to use the promise in the same AJAX call, but I do not know how to use it in a recu

Compiling old 1.4 java code in java 1.6 using ANT -

Hi, I am trying to use the java Java project using the 1.6 Java version, but I am getting the following errors. & gt; Package com.sun.rsasign does not exist & gt; [Javac] import com.sun.rsasign.t; & Gt; & Gt; & Gt; Symbol can not be found & gt; [Javac] Symbol: Class Base64Encoder & gt; [Javac] Location: Package Base 64 & gt; [Javac] Import base64.Base64Encoder; & Gt; Symbol can not be found & gt; [Javac] Symbol: Variable Base64Encoder Can you please help me solve the problem? Apart from this, please also not only do I create two separate projects using the same ANT Build, which is based on 1.6 Java and it is based on 1.4 Java. I am able to compile 1.6 Java project but have been stuck in the 1.4Java project compilation. This is not a problem with the versions during compilation. This is due to missing packages. There is no com.sun.rasign package in classpath and Base64Encoder class file Note: when you compile Java 1.4 source wit

python - Django error in filtering datetime field by date : Join on field X not permitted -

I get another post that shows the time period using the __ date Can be filtered. However, when I tried on my machine, he never worked. This is my models.py class records (models.Model): time = model.DatetimeField (null = true, empty = Trouser) User table content = User = Forecairn for model Serifield (max_language = 36, tap = true, empty = true, exclusive = true) in the python manage.py.runserver & gt; & Gt; & Gt; That time import from datetime & gt; & Gt; & Gt; Record from Appname.models & gt; & Gt; & Gt; U = User.objects.filter (user name = 'user') & gt; & Gt; & Gt; R = record.obages.filter (time__data = datetime.today (). Date ()) traceback (most recent call final): file "console" gt; line 1, & lt; Module & gt; File "C: \ Python27 \ lib \ site-packages \ django \ db \ Model \ manager.py", line 163, filter returns in self.get_queryset (). Filter (* Args, ** kwargs) file "C: \

android - How To check data-base Table to find whether the value is already there? -

I am new to Android and sqlLite, I want to prepare the code to check whether it was given in the edit text. Is the value already present or not the database table or not? Try the following: boolean EditTextValue = false; Cursor cursor = database.value ("select * FROM" + TABLE_NAME, empty); While (cursor.movetyx ()) {string record_editival value = cursor.juststring (cursor.just column index ("editingtextualview")); If (record_editTextWholeValues ​​(new_corrected_editTextValue)) {editTextValue = true; break; Record_AditText Value / Strong> Current Value of DB