Posts

Showing posts from January, 2012

- Where Developers Learn, Share, & Build Careers

I'm totally new to Android, with so many people using ViewFLipper with Random.nextInt () Click to change the layouts (button) Now I have 3 XML layouts starting from 1_view.xml 2_view.xml 3_view.xml 1_view.xml I have a button when the button is clicked then I should get a random layout . It works. But the problem is now, sometimes I get the same layout (1_view.xml). When a user clicks on a button on (1_view.xml), I want to go to layout (2_view.xml and 3_view.xml). can u help me. Thank you. (Soory for my english) Codes Main.xml & LT; RelativeLayout Android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: orientation = "vertical-" Android: padding = "10 dp" & gt; & Lt; TextView android: id = "@ + id / TVLeft" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_centerVertical = "true" Android: layout_gravity = ...

java - try catch specifics -

When I try to use a try / grip then what type of errors do I try and get confused I have seen the comment on not recommending the use of hold (exception e) to do research here in Stack Overflow because it is normal , But where I can see the particular errors, I should look for an example, Try the code (try to play audio file) hold (invalid file) hold (bad connection) hold (file not found) hold (invalid file size) etc. Above the pseudo errors I cover a wide range of Internet connectivity functionality to file specific catalogs. How can I cover all these cases? I have an app that shows a message that says that the file can not be played, but to catch specific error And every time I see this message. May appear and correct it. What if I would like to try and catch an error for something which I coded myself? This may be a bad example, but if I I want to calculate the period of planetary orbit and generate error if the period is smaller than some value. The values ​​us...

Magento 1.6.2.0 - admin and frontend calling https URL's incorrectly -

Image
I recently downloaded a site from my local host to my localhost I used to local Everything is set on the host, but when I run the frontend, the image files do not load because Magento will be https: // instead of Http: // , It goes for the entire back-end, the pages are loaded in backend but any styles are available. Goo is because Magento is visible under their https: // . I'm not running safe_url , only unsecure_url on both the back and frontend Here is a screenshot of the web inspector. How can I fix it? // Edit Well, my backend is a mess, here's a screenshot of the Config-> Web section, especially the URL: If you have already cleared your var / cache folder, another possible source for your problem is System / Developer / and disable JavaScript Settings / JavaScript Merge Paint Files and CSS settings / merge CSS files . Then go to system / cache and press flush JavaScript / CSS cache button.

escaping - How to keep single quotes from confusing ksh -n -

इसलिए मेरे पास एक सरल शेल स्क्रिप्ट है जिसे try.sh : #! / Bin / ksh इको "'" | Awk '/' \ '"/ {print"' \ '' ello, world}} ' और यह ठीक चलाता है: $ ./ Try.sh 'ello, world लेकिन ksh -n इसके साथ पूरी तरह से खुश नहीं है: $ ksh -n ./try.sh/try.sh: चेतावनी: रेखा 3: 'उद्धरण गायब हो सकता है ./try.sh: चेतावनी: पंक्ति 5:' बोली अनुपलब्ध हो सकती है मैं कर सकता हूं इसे दूर करने के लिए ट्रिक्स (ए वीके वेरिएबल्स, एकेसी हेक्स सीक्वेंस, इत्यादि) का उपयोग करें, लेकिन निश्चित रूप से केश वाक्यविन्यास परीक्षक को खुश करने के लिए निश्चित रूप से कुछ देशी सुरुचिपूर्ण तरीके हैं (यदि अन्यथा नहीं, तो मामले के लिए जब एम्बेडेड भाषा में काम करने के लिए कोई प्रावधान नहीं है) । क्या मैं भूल रहा हूं? [अपडेट: जाहिरा तौर पर वाक्यविन्यास परीक्षक लाइन को फ़्लैग कर रहा है क्योंकि एम्बेडेड न्यूलाइन के साथ एक उद्धृत स्ट्रिंग के बाद एक दूसरे उद्धृत स्ट्रिंग के साथ कोई हस्तक्षेप करने वाला सफेद स्थान नहीं होता है। डेविड कॉर्न का कहना है कि वह...

- Where Developers Learn, Share, & Build Careers

I am using ActiveMerchant to process a credit card transaction that can be successful or unsuccessful, which Part of some transactions, if any part of the internal accounting using activivercard processing fails, then I am not clear about how to roll back the whole transaction. I have a payment model, and a point model - the user's digits are converted into dollars to reduce their payments. Save points transactions: Debit user accounts, credit internal accounts Save credit card transactions results ( Whether it succeeds or fails) Again, if everything works, send an email to the user I see how it works And believe that I callback to handle the contents like emailing the user after after_commit (and after_rollback ). But how can I make an unsuccessful credit card transaction as a similar rollback, which is a failed AR save reason? Is it as easy as coding like increase active activation: rollback if my non-AR transaction fails? The above document contains a...

- Where Developers Learn, Share, & Build Careers

कनेक्टिविटी प्रबंधक के लिए एंड्रॉइड एसडीके डॉक्स के अनुसार , 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...

c# - Show validation message, but clear value -

I'm searching around and I feel like a normal requirement but I can not find an answer: / P> With MVC data entry verification, you can show the verification message ('Maximum length should be 5 string with') in the summary of the verification, but clear the value of the text box (when I used to use the ModelState.Clear () and ModelState.Remove ("CompanyName") It clears, both the value and verification message (verification status). I am asking because because we had an entrance examination recently and from the recommendations A was not pre-populated secure value (credit card number etc.) if verification fails. This is clearly a minor case, but the recommendation was not to send the value back to the server (from the server) , If we do not Land. There have been code I have ever worked with: Edit public function () {return View (); } [Http post] Edit the Public Action Result (Company Input Input) {if (ModelState.IsValid) {Return View (...

iphone - different behaviors for zxing decode on Android and IOS -

I have completed the text encoding to the QR code on Android, and the decoding part also works well. And just for fun, I want to convert the Chinese word into the QR code, encoding it on Android, Zaxing can recognize it well. However, I tried to zxing the iPhone app, it failed Chinese decoding (after long time there is no result, whereas only the recognized text takes 1 second for the Android code to return) I am now on Zaxing SDK for iOS We have not seen, why only one company's application should behave differently on those two platforms, I think the algorithm should be the same. Thanks! ZXing is not a company, it is an open source project. However, the QR code suport in Java and C ++ is very carefully kept in sync, so the result should not be very different. Your best bet is to post the code, which is causing problems in the ZXing mailing list so that people get a chance to check. (FWIW is one of the C ++ / IOS ZXing ports.)

How do you detect and identify Javascript/jQuery conflicts? -

I am working with several jQuery plugins and when trying to do configuration scripts in different implementations , The combination of plugins is there a conflict in JavaScript, and there is no proper way to find out what is the conflict to oppose it You need firebug (Mozilla) or web inspector (webkit)

- Where Developers Learn, Share, & Build Careers

बनाओ टेबल बच्चे (chil_id INT ऑटैन्ग्रेमेंट प्राथमिक कुंजी नहीं है, बाल_नाम VARCHAR (20) नहीं है, child_sname VARCHAR 20) नहीं, नाराज, बच्चे_अभियान नहीं, नारी, बच्चे के लिंग ENUM ('एम', 'एफ') DEFAULT 'M', parent_id INT नहीं), कंसल्टेंट विदेशी कुंजी (parent_id) संदर्भ माता-पिता (parent_id)) ENGINE = InnoDB; त्रुटि संदेश: आपके एसक्यूएल वाक्यविन्यास में त्रुटि है समस्या इस पंक्ति में है: parent_id INT नहीं नल), कोष्ठक स्तंभ / बाधा घोषणा बंद कर देता है, लेकिन आप एक बाध्यता के बाद शामिल हैं, जो त्रुटि फेंक रहा है वह कोष्ठक निकालें और आपको सेट करना चाहिए। सही कोड यह होना चाहिए: बनाएँ तालिका 'अभिभावक' (`parent_id` INT नहीं शुद्ध AUTO_INCREMENT, प्राथमिक कुंजी (` parent_id`)) इंजन = InnoDB; बच्चे को बनाएँ (chil_id INT AUTO_INCREMENT प्राथमिक कुंजी नहीं है, बच्चे के नाम VARCHAR (20) नहीं है, बच्चे के नाम VARCHAR (20) नहीं, नाराज, बच्चे का जन्मदिन नहीं है, बाल-लिंग ENUM ('एम', 'एफ') DEFAULT 'M', parent_id...

c++ - Iterator invalidation in boost::unordered_map -

मैं boost :: unordered_map का उपयोग कर रहा हूं Typedef बढ़ावा :: shared_ptr & lt; writerExeciter & gt; PtrWriter; Typedef std :: सूची & lt; PtrWriter & gt; PtrList; बढ़ावा :: unordered_map & lt; std :: जोड़ी & lt; अहस्ताक्षरित int, अहस्ताक्षरित लंबे समय & gt ;, PtrList & gt; नक्शा नक्शा instrMap; अब मैं एक सूची में PtrList की सूची में कुछ बदलाव कर रहा हूं के लिए (यह स्वतः = instrMap। शुरू (), यह! = InstrMap.end (); ++ यह) {ऑटो कुंजी = यह- & gt; पहले (); ऑटो सूची & amp; = यह- & gt; दूसरा (); // सूची में एक तत्व में कुछ बदलाव करें यदि (list.empty ()) {instMap.erase (कुंजी); }} क्या सूची में बदलाव करने से इटेटर मैनेजर को अमान्य किया जा सकता है? तत्व मिटाकर मिटता हुआ तत्व की ओर इशारा करते हुए इटरेटर को अमान्य कर देगा। मैं अपने कोड को कैसे संशोधित कर सकता हूं ताकि इससे कोई समस्या न हो? इसे ++ के बजाय सहायता धन्यवाद > मिट () ऑपरेशन इटरेटर को रद्द कर देगा हालांकि, यह अगले तत्व के लिए एक वैध इटरेटर देता है।...

jquery/javascript how to calculate width faster -

I have a table with 100 columns. I am running a loop through all the other elements, so that Width can be set explicitly. var $ ths = $ ("table th"); $ Ths.each (function (i, th) {var $ th = $ (th); var width = $ th.width (); $ th.width (width);}); For 100 columns, it takes a lot of time (more than 60). Each "received width" call takes 500-700 ms because the need to prepare the layout every time, I get the width Question - is there a fast way to get the width? The reason - I am freeing the header. For this, I have to set the width of each header for fixed pixel width. Everything is dynamic and the pre-set width of each column is not an option. . You might consider writing plain vanilla javascript for it. Maybe your milliseconds may be shave from your time. var cells = myTable.rows [0]. children; For (var i = 0; i & lt; cells; length; i ++) {cells [i] .style.width = cells [i] .offsetwidth + "px"; } Because you are using the offs...

javascript - Why does setTimeout(myFunction, 0) work, but running the function itself not work? -

This code should select the contents of a Texter, when the text is selected, however, it does not work by itself: $ ("# form"). Focus (function () {$ ("# form"). Select ();}); It only give then a setTimeout , such as: $ ( "# Form "). Focus (function () {setTimeout (function () {$ ("#Format"). Select ();}, 0);}); Why is that so? It looks like the first code, selecting the snippet, then deselecting the text I suspect that Text selection is being exposed after the event after the focus event is over, and after setTimeout select (when behind Things have already happened).

optimization - Within c++ function, pointer vs indexed array -

This question is similar to what is asked, but I think memory paging is not considered. Therefore, I am presenting a similar question again: // version 1 int x [100]; Int * pNum = nums; {Foo (pNum) for (int i = 0; i & lt; 100; i ++, pNum ++); } // for version 2 (int i = 0; i Which version will be faster? Earlier, it was said that the assembly code generated would be very similar because both versions need to increase the status of the memory address, but considering a very large array, there will be a lot of change in memory paging performance? Since one of them requires a long haul of one type, but does anyone need to change the base memory address from the base? I know that this very platform / compiler is dependent, but still people want to know the common thing, especially working with large data types such as image processing or scientific computing? Thank you. There is general consensus that for primitive types, there is no difference most compilers are the exa...

Why does Java HSQL throw an AbstractMethodError exception? -

मुझे एचएसक्यूएल का उपयोग कर जीआईएस लाइब्रेरी से एक एब्स्ट्रसमैथिएयर अपवाद प्राप्त हो रहा है। मैं यह अनुमान लगा रहा हूं कि यह मेरी मशीन पर एक कॉन्फ़िगरेशन समस्या के कारण है, लेकिन मुझे यकीन नहीं है कि क्या इसकी JRE, या कुछ अन्य सिस्टम लिब से संबंधित है। यहां त्रुटि है: थ्रेड में अपवाद "मुख्य" java.lang.AbstractMethodError: org.hsqldb.jdbc.jdbcResultSet.isClosed () Z कुछ जेडीबीसी के संस्करण के खिलाफ संकलित किया गया था, जिसकी विधि शून्य isClosed है () ResultSet इंटरफ़ेस में, लेकिन रनटाइम पर उपलब्ध एचएसक्यूएलडीबी का संस्करण उस विधि के पास नहीं है सबसे संभावित विवरण यह है कि आपको ऐप चलाने के लिए उपयोग करने वाले एचएसक्यूएलडीबी लिब में अपडेट करने की जरूरत है। यह विधि जावा 6 (यानी 6) में ResultSet इंटरफ़ेस में जोड़ा गया था। , जेडीबीसी 4.0) इसलिए पुराने एचएसयूकेडीडीडी चालक के पास ऐसा नहीं होगा।

intent on Android - pass ArrayList to another activity -

I have two activities and I have ArrayList -> Activity B. From Activity A to Objects B Code is listed under section: In Activity A: Intent I = new intent (getApplicationContext (), SiteFoto fullscreen. Bundle meadata = new bundle (); MyData.putInt ("id", position); MyData.putInt ("MaxId", imgAdapter.getCount ()); MyData.putSerializable ("myObjArray", drawablesFromUrl); & Lt; ---- this objs i.putExtras (myData); StartActivity (i); Activity in ArrayList & lt; Drawable & gt; MyObjArray = New ArrayList & lt; Drawable & gt; (); // Intent data means i = getIntent (); Bundle Mybandle = i.getExtras (); Status = myBundle.getInt ("id"); Maxid = myBundle.getInt ("MaxID"); MyObjArray = (ArrayList & lt; Drawable & gt;) i.getSerializableExtra ("myObjArray"); After executing the code, an error occurs: AndroidRuntime (15005): java.lang.RuntimeException: Parcel: Marshall value and roid. Unabl...

Eclipse CDT Build Configurations - Build All at once -

Image
In Eclipse CDT, I have several build configurations. I want to create them all at once. They can be made in parallel or serial, it does not matter, there is no dependency. What I see is a one-click build that will compile all the build configurations with the same action. In the preferences dialog (in "Window" menu on Windows, and on "Eclipse" on OS X) ), In C / C + + subtitle - & gt; Create a sub-tree, there is an option to choose "Create all configurations in each project" See the screen shot:

c++ - injecting a dll is not working on windows XP -

Then I'm trying to create an injector to inject a dll that is to hook a game client Uses detours , it's easy, but there is a problem I do not know what is wrong it works fine on Windows Vista + , but working on XP Not doing ... here is my code // injector #ifndef INJECTOR_H_INCLUDED #define INJECTOR_H_INCLUDED #include & lt; Windows.h & gt; Class Injector {Private: STARTUPINFOA * Startup; PROCESS_INFORMATION * Process; Four * directory; BOOL start (four * applications); Public: Injector (four * directory); ~ Injector (zero); BOOL enclosed (four * applications, four * DLL); }; #endif // INJECTOR_H_INCLUDED #include "Injector.h" #include & lt; String & gt; # Include & lt; Cstdio & gt; using namespace std; Injector :: Injector (Four * directory) {int Size = strlen (directory) + 1; Directory = new four [size]; MoveMemory (directory, directory, size); Startup = new STARTUPINFOA (); Process = new PROCESS_INFORMATION (); } Injector: ~ Injecto...

PHP look at past and predict the next number -

OK, so I have a list of numbers 1,5,8,0, 4, 3 What would I like to do to see numbers for a PHP script and get average? If the average is low then the last number then the last number from the average of tell me That's what ur asking something like this - & lt ;? Php $ a = array (1,5,8,0,4,3); $ B = array_sum ($ a); If ($ b

c# - F11 debugs correctly but F5 does not -

I have a strange problem with some of my code; I have made a list of some items; When trying to fill this list with new items, if I use F5 , then all the members of the list will be created like each other! But when I try to debug this problem with F11 , then members of the list will be separated from each other (which is correct). I am using a loop to generate all the members of the list, and in each iteration of the loop, I add the first class object using the new and then add it to the list I am I define the list as follows: list & lt; MyClass & gt; Find out why F5 does not fill the list correctly I tried to repeat the same problem in other classes which contained only strings and integer members, but it works properly. The problem is that new random () method in each iteration of the loop Due to the use of this, the right way to do this is to use it for example rndNumber = new random () once out of the loop, and Then only use rndN...

- Where Developers Learn, Share, & Build Careers

I have a Selenium Grid setup with hubs running on the CI (Jenkins) server whenever I build my project from Jenkins And then fails to execute it: WebElement inputElement = driver.findElement (By.xpath ("// a [contains (@href, \" / case / add ") ] ")); InputElement.sendKeys (Keys.ENTER); Or rather Selenium thinks that it did and it runs on the next order i.e. selenium.select ("id = lifeoffice", "label = amp";); Nodes are virtual machines that each run a different browser and this problem occurs when the script is being executed on IE 8 browser. When I run the script right from my IDE. I used the click (); Try using and ((javascript exclaimer) driver). ExecuteScript ("argument [0] .fireEvent ('onclick');", inputElement); And I have the same problem ... This would be strange, but sendkeys Try taking a look at the page immediately after the order. If the element just outside or just inside viewport, to touch...

ruby - When does chef's deploy_revision/before_symlink run? -

I am trying to understand how and when the first match is run, especially if there is a failure this block Take: deploy_revision "foo" work: deployment deploy_to "/ opt / foo" ... symlink_before_migrate (app_symlinks.merge ({...}) purge_before_symlink ([]) Create_dirs_before_symlink ([]) Symlinks ({}) before_symlink do current_release = release_path bash "foo_buildout_install" user "foo" cwd current_release code & lt; & Lt; -EOH ... EOH end times restart_command current_release = release_path bash "foo_foreman_install_and_restart" restart FU || Start EOH end and end Under the conditions, do the first_similink blocks have to be run? For example, if the build fails, then the chef is re-provisioned - will it run again? If the symlink is made then is it called again? (I am still learning chef, and I do not develop ruby, so please assume that how I work deploy_revision, or rail deployment model.) I believe it 'de...

ios - Not able to populate PickerView with my string -

When text field is clicked, I am using inputview to display a pickerView. Then I want to populate the preview with the numbers 1-100. I have some code that I thought would work, but when I program will click on will drive and TextField, so it should know just an empty Pikariwu will pop up way of putting a button on Further toolbar. I want to put a submit button on the right side to confirm the selection of users (being changed to cancel). Do I have to do something in the interface builder with the picker and button? Because I do not really have the interface builder because they are with the code ... Below are my .h and .m files h ---- @interface TestinputviewViewController: UIViewController & LT; UITextFieldDelegate, UIPickerViewDataSource, UIPickerViewDelegate & gt; {IBOutlet UITextField * textField; NSMutableArray * pickerViewArray; } - (IBAction) textFieldDidBeginEditing; @end m --- #import "TestinputviewViewController.h" @implementation Testinput...

iphone - Appliction orientation changes to landscape if I stop a video in landscape -

I am working on an application in which I embed an IFFRE on the screen to show thumbnails from Vimeo on a video is. com. Everything is working right, but when I tap to play the video, it invites the iPhone's default movie player and then I will rotate my iPhone to the landscape and play in the video landscape mode. But if the video ends in landscape mode, the screen (which I've added the Vimeo iframe) is also rotated in landscape mode. I just need to fix it in the picture but the video should play both in the picture and in the scenario. Thanks! Place this method in all your view controllers so that they always remain in portrait mode - (BOOL) should require aurototettoInterfaceAuthentication (UINFers Orientation) Interface Orientation {// Return Yes, Supported Orientation Returns (Interface Orientation ==UINFFERSAntration Portrait); }

Jqgrid client side sorting not working from ID=10 -

I am facing a strange problem while implementing client side sorting on jqgrid. Sorting from ED to the range of 1 to 9 is OK, but when id 10 is competing against the ID 10, it is placed in the second position. > What is the problem of any idea ??? The ID column is like this ID 1 10 2 3 4 5 6 7 8 9 In your colmodel you should define the sorttype: 'number' column for the id.

android - How to publish a java web-service publicly? -

In my Java based web application, (struts 2 and hibernate 3) . I have made an web-service using the apache axis. The web service must return data from the database which will be used by the android application. Now, that service must be clearly published on public IP so that I can access it in the Android app. What are the options for publishing it on a free public IP or domain? Would it be better if I use REST instead of Apache-axis to create a web service? What is JAX? And for Android developers, How is the Web service used in Android? Please give it the necessary and important answers. Publish on the web that you need to put it on a web enabled server, You can: (thuis is an article, just search in google "How to turn my computer on a web server"). Upload your files to a free host Upload your files to a paid host (usually for very small fees) Rest Vs Soap (Apache-Axis): I recommend going with the rest because it is more light and more...

python - Django @staticmethod sum of two fields -

I have a quick question that I am trying to add a field to a model which is the sum of 2 fields . For example: class MyModel (models.Model) fee = models I thought I could add a @staticmethod inside the model: @ Staticmethod def fee_total (auto): Returns self.fi + self.fi_stuff but I think the model's "fee_total" Can not use using the field: model Cheers Cheers I think that you want to add a method to your model, so it Can the. @staticmethod is a decorator that declares the method for class , then what is the difference? Well, long story short, static methods do not have any special examples, give an example for the object class object, by me class such as @property before mention of everyone A decorator has been used to make a method as a variable ... so you do not have to explicitly use () , you want to do this: class MyModel (models.Model) fee = models.DecimalField () fee_gst = models.DecimalField () @property def fee_total...

layout - How to get the top card in Java's CardLayout -

Is it possible to get top card in Java's CardLayout? I have tried to check the visibility for visibility through each component () but it seems that they are all "visible". Edit: "Top Card" I mean that currently the "Top" is being displayed, not the first or the last card. Also, I do not know that it helps, but I'm looking for a JPN (or its sub-class) Edit: code snippet (Component Components: GetComponents ()) {if component (component as; JPanel & amp; amp; amp; amp; amp;;; View)) [currentPanel = (JPanel) component; Println (currentPanel.getClass () getName ().); }} The above code always prints the name of each component class, whether or not it is a visual card. Edit : I am using it as part of school work. I am not trying to get a freebie here, assignment around this layout Does not rotate. It seems to be the most convenient layout to change between panels. My teacher has specified that there should be no third party code in t...

ruby on rails 3.2 - acl9 doesn't fill created_at -

I followed the ACL 9 readmem, checked double and still trying to use has_role The following error is received! (: Admin) . ActiveRecord :: StatementInvalid: SQLite3 :: ConstrainException: roles_users.created_at can not be tapped: "roles_users" (include "user_id", "role_id")) value (1, 1 ) The only catch is that I am using Rail 3.2 and have used the following diagnostics for any errors: Any suggestions? It is a known problem in the rail, hopefully it will be resolved and it will be informed. I have decided to finish this line from the has_and_belongs_to_many line and it has removed it for some reason.

javascript - shortcut to a dynamic web page -

one ???? Is it possible to generate a shortcut on this page, for example: Dynamic content on web page 15 documents and I want to create a shortcut on my desktop to click on one of them ???? Very little question I know very much thanks It is not so. Desktop is a platform specific thing, Web APIs are cross-platform. If this was the API (one with a confirmation dialog), you would see it on every ad-page

java ee - CDI doesn't work when ejb inject implementation define in war of same ear -

I have an EAR file that contains multiple ebay and war. In ejb-jar, I inject many implementations of such an interface like this: @inject = any personal example & lt; Configuration Provider Local & gt; ProviderEjb; The implementation of this interface is defined in a war. It deploys the implementation properly. glassfish in v3.1 log I see: Infos: Portable JNDI for EJB FormConfigurationProviderBean Name: [java: global / com.dialog.edialog_eservices_ear_1.0.1 -SNAPSHOT /checkout-form-1.0-SNAPSHOT / Form Configuration Provider Bean, Java: Global / Com. Dialogue Adiyalog_sirvorsi_aiyr_lk0kl-Saanapisacoti / checkout-form -1.0-Saanapisacoti / form configuration provider Binkcomkaoelog. Sbsm.talisker.core.config.api.ConfigurationProviderLocal] But my implementation in practice: (for configuration provider local provider: providerEjb) {[...]} implementation FormConfigurationProviderBean Never does I have no messages in log in, which can explain this. The add...

ruby on rails - Using ActionMailer to send mail at chosen times? -

Therefore, I am trying to get my rail application to send special emails to the selected time, which is chosen by the user goes. Basically, the user types in the subject and body of the email in a form, and chooses a time-period to specify when he wants to send an email. All this information will be stored in a model. How can I send an email to the specified date and time? I have tried to use gem, but I have not got much success. Should I use cron jobs? Or is there a gem there especially suitable for this task? Appreciate any help! Take a look or

php - How to show zend framework data grid data sorted by "date" as default? -

How do sort grid data show data grid data according to "date"? When I come to the page, I want to see the data grid sorted by the time as the default without parameters like URL ... / order / created DESC / $ Testimonials = new Application_Model_DbTable_Testimonials (); $ Source = new Bvb_Grid_Source_Zend_Table ($ testimonial); Thanks. I solved it by going to $ datagrid instead of $ object $ testimonials = new Application_Model_DbTable_Testimonials (); $ Source = new Bvb_Grid_Source_Zend_Table ($ testimonial); now $ testimonial = new Application_Model_DbTable_Testimonials (); $ Testimonials- & gt; SetSortOrder ('created'); $ Source = new Bvb_Grid_Source_Zend_Select ($ testimonial-> getTestimonials ()); It's hard to see what your class is doing, because you posted that post Option 1 But when it uses the fetchAll () function, you can do two things: Option 1 When there is a fetch () - Call in grid class, you can make it ...

mysql - Find location by latitude and longitude -

I have seen many posts about the search location via geo location and latitude. I tried to search with the mysql query but there are no queries that give correct results. This is my query, it does not return the correct result. SELECT *, (3959 * ACOS (COS (radian ('+ user-level leolithd length (++' '' ')) * COS (radian (ground length latitude)) * cos (Radian (geographic transit) - radians ('' + user.gatooolantlangtive (+ '')) + sin (radian ('' + user.getoowo location latitude (+ '' '')) * sin (radians Latitude)) User Distance Distance From & lt; "" + User.getDistance () + "'Distance By Order LIMIT 0, 20"); Please give me some ideas. A TML 5 Jioo Location API can help you better. Follow it!

Jquery Slider Set Value after Slide -

I am trying to set the value of the slider in the slide event. This is my code: $ (document) .ready (function () {$ ("# slider"). Slider ({min: 0, maximum: 10000, step: 1, / / Use it to determine the amount of interval values: [0], // Default border slide: function (Event, UI) {var slider = $ ("# slider"). Slider ({Live: True}); Slider .slider ('value', 500);}});}); What am I missing? I can not decorate and set the value of the slider. Edit: OK now I can set the value of the slider but it is very fast. I want him to gradually set my price. Here's my edited code: $ (document) .ready (function () {$ ("# slider"). Slider ({Minimum: 0, Max: 10000, Animate: "slow", step: 1, // Use the value of each interval / value: [0] // default range change: function (event, UI) {$ ("# slider"). ('Value ', 500);}}};}); Can I move it gradually to 500 rather than install it? Thanks context : Code: $ ...

Creating a bluetooth server with reflection method android -

I need an Android Bluetooth server application. I have successfully created a client who uses the reflection method in this way: method m = zee.getClass (). GetMethod ("createRfcommSocket", new class [] {int.class}); Sock = (BluetoothSocket) m.invoke (device, 1); But can I customize this codecript so that my device works as a server rather than a customer? If you are using two Android devices, then you can only create one subscribe, a normal one UUID is that most devices (like Bluetooth module) use. Sorry, for that you have to look for or look at my previous questions) But using UUID is very easy.

android image filtering for large images -

I am creating an application that will take large images from the SD card and then make them black and white and Will save in the card. I can not read large images directly. So need to use a stream. Can someone provide me a solution? PS: I tried to do a lot to find an answer for this issue, but it has not been able. RandomAccessFile to access the file Reading / Write mode: RandomAccessFile file = new RandomAccessFile ("yourimage", "rw"); You can read a section of data compared to , modify the data buffer for black and whith only the color of the outstanding pixel, go back to the offset where you do one Start reading and with black and pixels. Edit: OK, in fact, I do not think that reading is a solution to the file because Android does not allow you to get raw bytes of your image. You can use a small part of your image to read: Bitmap regeon decoder decoder = bitmap region decoder.New instance (Mystream, Falls); Bitmap bitmapril = decoder Dec...

sql - How to get the last date from 2 dates in select statement -

I am trying to make a selection statement in the process. Here is my code: Buy from SELECT u.id, max (a.time), max (b.time) a, sell b, user uk WHERE A.user_id = u.id and b.user_id = u.id by GROUP uad; I need to take the last date between maximum (a.time) and maximum (time. Time) . > Thanks in advance select u.id, max (Case when a time> BTT, A.Time and B.Time and A) Buy from A, B, Users U, A User UID UID and BUSIRIDUID UUID Group You UDID; If your DB supports aliased queries, try it which will be more efficient: SELECT u.id, case when a_max & Gt; B_mx then buy A_ MX and B_mx from the end (SELECT u.id, max (a.time) a_max, max (b.time) as b_max, buy a, b, user u WHERE a.user_id = u .id and b User_id = u.id GROUP BY u.id) x; You can use the Inner Signal Index, if they existed to get the maximum for each column. We are on it, let us re-code it using the modern addition syntax: SELECT u Buy a buy for sale from .id, max (in case when a.time ...

- Where Developers Learn, Share, & Build Careers

Sybase Sqlanywhere में सिस्टम उपयोगकर्ताओं को sys.sysuser में संग्रहीत किया जाता है। यहाँ से एक उदाहरण पंक्ति है उपयोगकर्ता के लिए 'dba' पासवर्ड 'sql' के साथ तालिका। user_id 1 object_id 175 user_name 'DBA' पासवर्ड 0x013819f1b5d5a9fd1ba98e5b999239277b6296bee4bc28653802cd103d50fa76141aef7500 login_policy_id 173 expire_password_on_login_policy_id 0 password_creation_time '2012-02-23 11:24 : 32.000 'fail_login_attempts 0 last_login_time' 2012-06-27 17: 33: 00.000 ' मुझे पता है कि पासवर्ड कैसे धोया गया है, या अगर कोई प्रक्रिया या फ़ंक्शन को जानता है Sqlanywhere में यूज़रनेम पासवर्ड संयोजन को प्रमाणित करने के लिए बुलाया जाता है। एसक्यूएल कहीं भी पासवर्ड एसएचए- 256 एल्गोरिथ्म, लेकिन ऐसा करने का सही तरीका अप्रकाशित है। संस्करण 16.0 या बाद में, आप वर्तमान उपयोगकर्ता के पासवर्ड को सत्यापित करने के लिए संग्रहीत कार्यविधि का उपयोग कर सकते हैं। यदि आप अलग उपयोगकर्ता के लिए एक पासवर्ड की जांच करना चाहते हैं, या यदि आप v16 से पहले एक सर्व...

qr code - Showing Form Results On The Same PHP Page -

I have a form that demands the shutdown of QR code from Google, the user puts them on the website and then results them. Directed on the page, which contains the QR code. I was wondering if there was a way to create QR codes on the same page? I tried to put Google Script on the same page but it does not appear to be working according to the code: & lt; Form method = "post" action = "qr-creation.php" & gt; & Lt; Input type = "text" name = "contractno" /> & Lt; Input type = "submit" value = "get QR code" /> This is Google code: & lt;? $ UrlToEncode = "$ lower"; GeneratedQRwithGoogle ($ urlToEncode); Generate function QRwithGoogle ($ url, $ widthHeight = '500', $ EC_level = 'L', $ margin = '0') {$ url = urlencode ($ url); Echo '& lt; Img src = "http://chart.apis.google.com/chart?chs='.$widthHeight. ' X '. $ WidthHeight. & Amp; am...

ipad - How to navigate to the previous page in iphone -

How to navigate on the previous page! Navigation is the controller. I connect the hidden navigation bar and the header view at the top. // hidden navigation bar - (zero) viewViewAppear: (BOOL) animated ([self.navigationControllerSet navigation barhead: yes animated: animated]; [Super ViewerApplatform: Animated ];} Now customize my header bar with UIView! I added a hidden navigation bar and header veeve to the top. I now have the back button The bar was added Now I want the navigation page obscured, can someone suggest me? @finance Thanks in advance. If the call is called by push action, call: [self.navigationController popViewControllerAnimated: Yes]; And if the scene is being displayed by a modal call: [ Self buffer model viol controller: yes];

jquery ui - <p:calendar> popup not working with latest versions -

I am using Prime Faces in my project. When I include Prime Phase version 3.0.M3, I can see the calendar icon and use the calendar very well. Expanded code resembles the following. & lt; Span id = "rateOfReturn: userEffDate3" & gt; & Lt; "NameOfReturn: userEffDate3_input" class = JQuery16207981493528219892 = "8" value = "01/01/2012" /> & Lt; Button class = "ui-datepicker-trigger" type = "button" jQuery16207981493528219892 = "7" & gt; & Lt; Img width = "16" height = "16" title = "..." alt = "..." src = "/ nqparticipant / javax.faces.resource / calendar / calendar_icon.png.faces? Ln = primfaces & amp; ;; Amp; v = 3.0.M3 "full =" full "/> & Lt; Script type = "text / javascript" & gt; JQuery (function () {widget_rateOfReturn_userEffDate3 = newprimefash.witch.Calendar ('RateofRighton: UserAdfdet3',...

javascript - How to validate email with jQuery Validate plugin -

In some cases, jQuery is not perfect for email verification. "Abc@test.c" (single letter suffix) and "중국어 @ test.com" (non alpha-numerical) are passed as valid email addresses. How can I use these two invalid email addresses in the jQuery validated plugin? , you will need to create your own custom method. Add a custom verification method. It should have a name (must be a valid JavaScript identifier), a JavaScript-based function and a default string message. Argument: Names; String method is used to name, identify and reference, should be a valid JavaScript identifier method; Callback actual method implementation, if any element is valid then true. First argument: current value second argument: valid element third argument: parameter Message (optional); The default message for displaying the string, the function for this method There may be a function created by JQuery.validator.format (value). When the undefined, pre-existing message is ...

perl - POD: How to insert tabs? -

How do I insert two tabs before each description so that the tab Html -output? = head = 2 = My list: = over = item first description A = item second description B = item third description C = back = cut Do you mean to make a definition list? : = over = item first description a = item second description b = item third description c = back this one As your description of the definition list as "first", "second", and "third", and "description a", "description b", and "description c". If you need to change the formatting of a definition on the search.cpan.org or metacpan.org list, you can not do POD is a semantic documentation language and module author has a lot on layout and typography Does not control the web site owner who has the power to adjust the typography and such as CSS.

.htaccess - Htaccess Rule Conflict -

I have written some htaccess rules. But there exists a confliction. I can not solve the problem. rewrite ([az] +) / (. +). Php /$2.php?lang=$1 [QSA, L] This rule for languages ​​/en/login.php => /login.php?lang=en etc. In addition to this I had another rule RewriteRule ^ album / ([0-9]) / playlist \ .xml $ / xml / mediaxml.php? Album = $ 1 This rule is for a demo music album. Album / id / playlist.milk => in / xml / mediaxml.php? Album = $ 1 Our customers can listen to music with this playlist I wrote the first playlist.xml rule When I supported the language I saw this problem Edit: All .htaccess code Options + FollowSymLinks RewriteCond% RewriteEngine at {HTTP_HOST} dunyaturizm \ .com \ .tr $ RewriteRule (. *) Http://www.dunyaturizm.com.tr/$1 [R = 301, L] #PHP scriptleri languagelere dönderiyor RewriteRule ^ album / ([0-9] +) / playlist \ .xml $ included / xml / mediaxml.php? Album = $ 1 [QSA, L] RewriteRule ([az] +) / (. +) Php /$2.php? Lang = $ 1 [...

How to receive messages in a GWT App using Kaazing Websockets <type>proxy</type> configuration? -

I am trying to create a GWT (2.4.0) application that communicates (full-duplex) to a server To accomplish this, a text-based protocol, I am using Consson WebSocket Gateway version 3.3.2 as a proxy. GWT app & lt; ----- [websocket] -----> Qazing & lt; ----- [TCP] -----> Backend Server This is my casing configuration: & Lt; Services & gt; & Lt; Accept & gt; Ws: //127.0.0.1: 9444 / foobar & lt; / Accept & gt; & Lt; Connect & gt; TCP: // Local Host: 50,189 & lt; / Connect & gt; & Lt; Type & gt; Proxy & lt; / Type & gt; & Lt; Cross-site-barrier & gt; & Lt; Allowing the original & gt; Http: //127.0.0.1: 8888 & lt; / Basic to allow & gt; & Lt; / Cross-site-barrier & gt; & Lt; / Services & gt; This setup works with the Java implementation of the Caging Client. Now I want to use this service in the GWT application. This is my code for GWT client implementation: ...

Iphone 3g Sample Application -

I am an Android developer. My brother has got an old iPhone 3G and I want to create a sample app for it. Device is I have an iMax 21 "with OSX 10.5.1 ... do I need to make an application from my Mac? Thanks guys! In order to develop an iPhone app, you need Mac OS X computers running the Xcode tool and need a solid knowledgeable developer for Development C. Extrude Development is the applet of Chaos, , Source level debugging, code editing, code generation, display No-tuning etc. Xcode : Xcode is an integrated development environment (IDE) that provides all the tools you need to create and manage all your iPhone projects. Source files, Make your code executable, and run and debug your code in the iPhone simulator or on the device. Devices : The device will need to ensure that you are the best user Experience and Tools Allows you to analyze the performance of your iPhone application while running. The tool will help you collect data from your running application and pr...

c# - Best practice for Inline if statement in for loop -

I want to copy the list item to string code. If the listbox item has empty string, then ignore why I can do this: foreach (string item in lstModelUsers.Items) {if (string.IsNullOrEmpty ( Items)) continue; other options. Default.model Removal User Add (item); } But this is not: foreach (string item is in lstModelUsers.Items) string.IsNullOrEmpty (item)? Continue: Options. Default.model Removal User Add (item); Although both appear to be the same, inline if statement generates a syntax error. What is the best practice? You can not use it to be the only expressions Accepts your code failing to compile because it can only be used as a statement , not an expression. The best way to do this is to reject if expression is not required for you issue : Foreach (string item in lstModelUsers.Items) {if String.IsNullOrEmptE (item)) {Options.Default ModelRemoveUsers.Add (item); }} You can also use where : var itemsToAdd = lstModelUsers.Items .Cast & lt...

javascript - Cant make text appear with php/ajax code :( -

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...

SSMS connection to Sybase ASE -

Is there a way to connect to the SSE (ASE) database installation using SQL Server Management Studio 2008? I tried to use other tools to connect but they are very limited and want to use SSMS. You can use this tool: This is great.

ios - iOS5 Custom Window rotation issue -

So I am creating and displaying a custom window in my iOS app because I am writing a dynamic alert view That function also works like a greener / toast alert, it works terrible in ios6 (hopefully i can open this source to this child and you can see it all) But then Also, when I run it in ios5, my alert is not in the window Do not move with the tool / simulator It does not matter, my custom window stays in portrait mode. UIWindow is just a UIView subclass, so there should be no good 'rotate' representative method. I'm getting a bit stew that why this is happening in iOS 5, but not 6. Any help is a root view controller in my window, which I completely forgot. I just need to implement the - (BOOL) .UrototettoInterfaceAuthoration: (UINPForceArmentation) Infosources Orientation {return yes; } To make it work. : - D

- Where Developers Learn, Share, & Build Careers

One site: www.michelesgranola.com, the store store is not always loaded. If you go directly to the page, then it has the tendency to load: However if you enter the square on the page through the "Search for a store" button, So it usually does not load. He said, sometimes it will load and sometimes it will not happen. How to make a suggestion about solving it? Thank you! > https: // - To link you to use https: // protocol on your home page The link must be set - it currently points to the page using the http: // protocol. If you open your Javascript console while loading that page (using http: //) you will see this message: do not load XMLHttpRequest Https://www.michelesgranola.com/wp/?sm-xml-search=1&lat=39.2904028&lng=-76.â↓|76.61218930000001&query_type = All & amp; Border = 0 & amp; Address = & amp; City = & amp; State = & amp; Pid = 14; Zip = & amp; Origin is not permitted by entry-control-permission-origin of h...

- Where Developers Learn, Share, & Build Careers

OK, I can work with either the Guard Gemfile My Anywhere near me that works with my Gemfile and bundle Code to use Which to select I have many I'm working on a project with developers, and most use Growl I like terminal notifier. I do not want to change the Gemfile because this version is in control. I can not understand a way to move it to guardfile . What's the best thing to do just to work correctly is that it is included in the gammfile and it can be isolated, where each developer can edit his .extra-jewels file or something else ? It seems that messy. When you do not configure your alerts, then the guard tries to detect himself As you know the information facilities you can use the method to configure notifications for your needs, the guard also allows you to keep your own configuration in your home directory. You can now set your personal information settings in ~ / .guard.rb : Notification: Terminal_title This will disable automatic de...

php - How to use & input Bcrypt into a database? -

So I have read this question a few times and have read all the answers. I got a semi-working system, but it broke. The problem for me is that in answer to those posts often give long, complex codes to make BCRTP - but then there is no example of how to use it, i.e., to answer the first answer - "You can use this code like this: $ bcrypt = new binary (15); $ hash = $ bcrpt-> hash ('password'); $ IsGood = $ bcrypt- & Gt; Verify ('password', $ hash); " I input some form data How to go about (let's call it: $ user_password) In addition, the following will help clarify - I'm a little unsure. What happens inside the 15pt What do the binary function / what to do at the starting point? Does this mean round? When 'good' test is done, I think $ Hood is turned into a boolean (1 = true), (0 = false). So you can continue working (or not) on login, whether it's 1 or 0, okay? I'm assuming that there is a $ hash that you p...

sql server - SQL - Selecting a field from another table using a primary key in a trigger -

I have two tables in my database, one is a transaction and the other is transaction history. The latter is essentially an auditing table, so that a trigger triggers the screenshot of the data to execute on the insert, update and delete the transaction. I am recovering all the data stored in the transaction table, which matches the column, but it is difficult, where I am trying to get data from another table using the foreign key I am For example: One field in the transaction table is "TransactionType_TransactionTypeId", but in the audit table we want to store our 'name' equivalent "TransactionTypeName". It needs to be populated from the "Transaction type" table, in which the field is "TransactionTypeId" and "Name". I am struggling to write a query to retrieve it as I want, I'm trying something like the following, but I'm achieving very little success: Transaction type with name from SELECT @ TransactionTypeN...

iphone - Attach an captured image to an email on clicking a button -

After the I have captured the image from the iPhone using the UIImagePickerController delegate method. - (minus) imagePickerController: (UIImagePickerController *) picker didFinishPickingMediaWithInfo: (NSDictionary *) info {UIImage * image = [information objectForKey: @ "UIImagePickerControllerOriginalImage"]; Self.myImageView.image = image; // [Self Performance Selector: @Selector (EmailButtonPress :) Item: After Image: 19]; [Remove from Self Modul Vij Controls permission: Yes]; } See the above email button pressed method, which was called by itself . I want to call it in a button action I have written the code below for emailButtonPressed - (zero) emailButtonPressed: (UIImage *) image { MFMailComposeViewController * mailview = [[MFMailComposeViewController alloc] init]; Mailview.navigationBar.txtColor = [UIColor colorWithRed: 55 / 255.0 green: 190 / 255.0 blue: 55 / 255.0 alpha: 1]; Mailview.mailComposeDelegate = self; // NSMutableString * Subject = [NS...