Posts

Showing posts from September, 2011

python - Proper way to process html form in BaseHTTPHandler -

I know that I have to use CG. Field storage for this. But how do I get started with it? def do_GET (self): form = cgi.FieldStorage (what should be here?!) Thanks! I searched, but I could not find any answer: ( usually source = cgi.FieldStorage () from the source def __init __ (self, fp = any No, headers = none, external bundle = "", environment = os.environ, keep_blank_values ​​= 0, strict_parings = 0): "" "constructor.multipart read / up to the last part. Logic, all optional: fp: file Pointer; default: Sys.stdin (when the request method is not received) Header: Header dictionary-like object; ्ट: CGI Speak is taken from the environment according to external borders: terminates multipath limits (internal use only) environment: environment dictionary; default: OS .environment keep_blank_values: showing whether the empty values ​​in flag url encoded forms empty Should be considered as a string. A correct value indicates that the spaces sh...

Spring Security: how to exclude certain resources? -

मेरे पास निम्न परिभाषा है ... & lt; बीन आईडी = "एफएसआई" वर्ग = "org.springframework.security.intercept.web.FilterSecurityInterceptor" & gt; & Lt; संपत्ति नाम = "प्रमाणीकरण प्रबंधक" रिफ = "प्रमाणीकरण प्रबंधक" / & gt; & Lt; प्रॉपर्टी नाम = "एक्सेसडिसीजनमैनगर" रेफरी = "httpRequestAccessDecisionManager" / & gt; & Lt; प्रॉपर्टी नाम = "ऑब्जेक्ट डिफिनिशन सोर्स" & gt; & Lt; sec: फिल्टर-अभिविन्यास-परिभाषा-स्रोत & gt; & Lt; sec: इंटरसेप्ट-यूआरएल पैटर्न = "/ सुरक्षित / सीएसएस / **" एक्सेस = "ROLE_TIER0" / & gt; & Lt; sec: अवरोधन- url पैटर्न = "/ सुरक्षित / चित्र / **" एक्सेस = "ROLE_TIER0" / & gt; & Lt; sec: अवरोधन- url पैटर्न = "/ **" access = "ROLE_TIER0" / & gt; & Lt; / सेकंड: फिल्टर-मंगलाचरण परिभाषा स्रोत & gt; & Lt; / संपत्ति & gt; & Lt; / सेम ​​& gt; मुझे इस url पर स...

How to change the font of the Android console in Eclipse? -

The question is, I need a small font (not logic window) to display these lines in the Android console window . I changed the font of the Other console (cvs, svn, ...) in preferences, but this window still has the same font size. I should have this window too small and put it on the edge of my screen, not below, in this way I will have more space standing in Eclipse. [2010-08-02 16:26:58 - Project 1] ------------------------- ----- [2010-08-02 16: 26:58 - Project 1] Android Launch! [2010-08-02 16:26:58 - Project 1] ADB is running normally. [2010-08-02 16:26:58 - Project 1] Performance ... Activity Activity Launch [2010-08-02 16:26:59 - Project 1] On Device 'xxxxxxxxxxxx' Project 1. Uploading apk [2010-08-02 16:27:03 - Project 1] Installing Project 1.apk ... [2010-08-02 16:27:20] - Project 1] Success! Can any of you change the font size of this window? Until the eclipse starts again, the Android console does not apply font changes. I found that it applies t...

How to get a sub array of array in Java, without copying data? -

I have some libraries of classes that work with my data, which are being read in buffer. Is it possible to save the array repeatedly with copy, some parts of the data have to go deeper and deeper in processing methods? Well, it sounds weird, but in my special case, there is a special writer who divides the data into blocks and writes them individually at different places, so it only performs the system. Arrayopy, what he wants and calls the underlying writer with that new sub array and this is often what is the best way to rebuild this kind of code? Many classes in Java accept a subset of arrays. Like Writer. Written (Four CABF [], Int Close, Int Lane) Maybe it's already enough for your use.

drupal to create website -

I want to make a website. I have installed Doppel in my system. I have downloaded some topics too.Child menu and content too How do I add content pages from the menu? Will all the default Druid menus remain? How can I show only newly created menus, is it possible to change images ?? Please tell me the answer as soon as possible. You can learn what you want or find some modules in the configuration, or code can do.

r - parallel computing of a function with doSMP on Windows -

I am trying to multicore a function (in Windows), at which point, another workhorse function (function Calls within the function). Here's the least work example, you'll need a doSMP and revoIPC package (to get them, see the rhythm post). func1 & lt; - Function (x) {Sqrt (x)} func2 & lt; - Function (y) {func1 (y)} Library (doSMP) wrk & lt; - startworkers (worker coat = 4) # I have 4 cores, so register your specs register dosmg (wrk) obj result and lieutenant; The above routine does not work, but if I do nest func1 func2 - foreach (i = 1: 10000)% dopar% func2 (i) func2 - Function (y) {func1 & lt; - Function (x) {sqrt (x)} func1 (y)} The process goes through easily (as far as I can tell). How do I call a function from the outside with % dopar% ? This looks like a scoping issue Your func1 call is known in the workspace but the calculation is not on the node, there are solutions for this, e.g. A complete widget is entitled in the...

asp.net - Difference between JQuery .length() and .NET .Length for Returns -

I wrote a function of jQuery to check the total number of characters in a given text box and warn Pop up maximum (user-defined) length Example: (very simplified): function check lang (txt) {if (txt.length> gtl = maxlength) {warnings ('enter too much text '); return false; } And true back; } It works as expected, but like a good developer, I also perform server-side verification against the field length (on my domain object) in the field. I am It is that I have seen that the following string: 12 (where is clearly returning character) The length of 5 will return to Javascript and length as 6 .net (String.Length) Will return in Am I missing something here? Or would I have to compute the number of returns in the Javascript string and then repeat them to get 'right' .net count? Any indication on how to handle it? Update: According to the suggestions given below, I can actually get the right length. function GetCurrentLength (txt) {return.tx...

What is the best free Code Generators for ASP.net C#? and Best Snippet Tool? -

What is the best free code generator for ASP.NET C #? I know that this opinion is based, but I want to make a list and I found something and found and found that they were free, but only one free trial was over. What's the best snippet tool to add snippets to Visual Studio 2008? Since I am using a server as a development machine, I have not been able to get that work since then. There is a built-in VS 2008, it's free, provided that you are already with Visual Studio. Syntax highlighting is also done to complete code and add template library (free version has some limited code full support, but otherwise is absolutely useful).

javascript - How to make Quick news bar reading char by char -

I quickly say news in the news website bar and under its latest news section menu, I hope nobody Let me know how it works or give me a sample for it. Thanks, is a good jQuery plugin that actually does this. You can read the document and download it from / html>

capture selected div element with jquery -

How to capture the devil element and upload it to a server in jQuery as a picture automatically? nick right There will be many security issues related to the browser executed screenshot which will be saved on your site (banking information Take). An alternative would be to do this in the graphics library, which is based on the HTML content Div. For example, if you are using PHP for your back, you can use jQuery to fetch the content of your 'div' element and it's $ .get () You can pass through in a file. By using the knowledge of the GD library and your stylesheet, and some HTML tree parsing, you can estimate that 'Div' can be reproduced in the form of an image.

java - Service discovery failed exception using Bluetooth on Android -

I am currently working on an Android application connecting via Bluetooth to a device and writing string commands and The need to get string reactions back. Currently I have to connect / read / write to TCP / IP on Wi-Fi and now trying to implement Bluetooth. But I am walking in some obstacles. I am trying to find some similar examples and have not got any luck. I'm using an Android Developer Resources example: Bluetooth chat as my main reference point. My current code works .. Then it throws service discovery fail exception at the point of connection. I'm using the DeviceListActivity class to select Discovery and to connect to the device. It gives an activity result and after that my Bluetooth class waits to handle it and then connects it. Below the code is nearly identical to the Bluetooth chat application. Public Zero onActivityResult (integer requestCode, integer resultCode, intent data) {if (! M_BluetoothAdapter.isEnabled ()) {m_BluetoothAdapter.enable (); } Sw...

java - Removing duplicate character from array -

कोडिंग साक्षात्कार को क्रैकिंग नामित एक किताब पढ़ते हुए Gayle Laakmann , मैं इस प्रश्न पर आया किसी अतिरिक्त बफर का उपयोग किए बिना स्ट्रिंग में डुप्लिकेट वर्णों को निकालने के लिए एक एल्गोरिथम डिजाइन और कोड लिखें। नोट: एक या दो अतिरिक्त चर ठीक हैं सरणी की एक अतिरिक्त प्रतिलिपि नहीं है। और यह कोड: - सार्वजनिक स्थिर शून्य निकालना डुप्लिकेट (चार [] str) {if (str = = नल) {वापसी; } Int len ​​= str.length; यदि (लेन और लेफ्टिनेंट; 2) {वापसी; } इंटर्न पूंछ = 1; के लिए (int i = 1; i & lt; len; ++ i) {int j; (जे = 0; जे एंड एलटी; पूंछ; ++ जे) के लिए {if (str [i] == str [j]) {break; }} यदि (जे == पूंछ) {str [पूंछ] = स्ट्र [i]; ++ पूंछ; }} Str [पूंछ] = 0; } जो सरणी से डुप्लिकेट वर्ण को निकालना माना जाता है। मुझे चुप नहीं लगता है कि एल्गोरिथ्म एक ही चरित्र को फिर से दोबारा बदलकर क्या कर रहा है। मैंने सोचा कि यह केवल मुझे ही लगता है कि एल्गोरिथ्म काम नहीं कर रहा है, लेकिन वास्तव में जब मैंने यह कोड चलाया तो यह मुझे गलत आउटपुट दे रहा है। किताब में यह गंभीर त्रुटि है या क्या मुझे...

PHP - Good practice to apply multi-level PHP User Authorization -

Looking at a website site there are various web pages which can only be accessed by different groups of users. Say guest users can only access the welcome page / search page, while admin users can access the pages that update the DB, etc. I have very little experience in this area and I would like to take some good practice with cleanliness / simple / safe implementation. If possible, I would like to see some concrete examples / tutorials, even a book resource. Thank you for your help I have found that many applications are available online (Wordpress, Joomla, and many others) are very poorly organized in this area (in poor case, what do I do). See how this works like Z Framework, CakePHP, Symphony for the MWC framework. MVC is used mostly for large projects which are more organized, so I am betting that they have done a lot of work on certification too. In 2 words, to work properly, all your page generation class (I recommend using OOP) should be obtained from a par...

Visual Studio 2008 - Default Encoding style with .SQL files -

उपयोग उपकरण: विजुअल स्टूडियो 2008 टीम फाउंडेशन सर्वर या विज़ुअल स्रोत सुरक्षित बैकस्ट्री: हम अपने एसक्यूएल फ़ाइलों को हमारे स्रोत नियंत्रण में जोड़ते हैं। हम इसे एसक्यूएल एक्सटेंशन के साथ समाधान में जोड़ कर और उन्हें जांचते हैं। डिफ़ॉल्ट रूप से इन फ़ाइलों को यूनिकोड के रूप में सहेजा जाता है इसका अर्थ यह है कि उपयोगकर्ता ए foo.sql को बचा सकता है और उपयोगकर्ता बी नवीनतम प्राप्त कर सकता है और foo.sql को पकड़ सकता है समस्या: दुर्भाग्य से, क्योंकि एन्कोडिंग यूनिकोड है डिफ़ॉल्ट, अगर foo.sql का फ़ाइल आकार होता है जो 8 बिट्स द्वारा विभाज्य होता है तो सिस्टम फाइल को गलत स्वरूप में खोल देगा। यह फ़ाइल को सामान्य एसक्यूएल स्टेटमेंट के बजाय चीनी अक्षरों की तरह दिखता है। यह तय किया जा सकता है कि उपयोगकर्ता मैन्युअल रूप से पश्चिमी यूरोपीय को एन्कोडिंग प्रकार बदलता है, लेकिन यह एक बहुत बड़ा दर्द है यह भी पता लगाना बहुत कठिन है कि उपयोगकर्ता ए एन्कोडिंग मैन्युअल रूप से सेट करने के लिए भूल गया जब तक कोई समस्या नहीं होती। प्रश्न: क्या दृश्य स्टूडियो को डिफ़ॉल्ट बनाने का एक तरीक...

IIS Virtual directory causes JQuery errors in Fancybox -

Fancybox works perfectly on my example.html, but when I type the virtual directory in IIS with the default page. Html, I get jQuery syntax errors given in line 1 of all JS files. 'For any help?' Webpage Error Details User Agent: Mozilla / 4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident / 4.0; SLCC 1; NAT CLR 2.0.50727; Media Center PC 5.0 ; Tablet PC 2.0; NTL CLR 3.5.30729; NET CLR 3.0.30618; Office LieakNaketer.1.5; OfficeLivePatch.1.3) Timestamp: Tuesday, 3 August 2010 16:07:07 UTC Message: Syntax Error row: 1 character: 1 code: 0 URI: http: //www.example.com/ Fancybox / jquery.mousewheel-3.0.2.pack.js Message: Syntax Error Pt Type: 1 character: 1 code: 0 URI: http: //www.example.com/fancybox/jquery Fancybox-1.3.1.js Message: Syntax error row: 1 character: 1 code: 0 URI: http: //www.example.com/fancybox/transitions.js OK, Making G resolves the full problem instead of relative. (I swear that I tried before posting)

ruby - Rails logging error: "Error during failsafe response: Shifting failed." ... is there an elegant solution to this? -

I have configured my Rail2.38 logger in environment.rb to rotate the Roses: config.logger = Logger.new ("# {RAILS_ROOT} / log / # {RAILS_ENV} .log", 'daily') and every morning in the morning Normal: Error during failure response: transfer failed. Is there a decent / elegant / better solution on this? A Cron job is set up only to make a note of everything I have done when it happens Thanks The log file is very common on UNIX / Linux to use a program called Logrootate to run rotation. Please. For fusion passenger deployment, you can use the configuration as the example below. Clearly adjust the directories and rotation frequency as appropriate. /home/deploy/public_html/railsapp/shared/log/*.log {rotate weekly useless 30 seconds delay compress compressed notifempty sharescript touch / home / deployed / public_html / railsapp / current / tmp / restart .txt endcript}

asp.net - :visible selector not working in Internet Explorer -

I am working on some basic form verification styles for the ASP.Net website. I have to select all the span elements that I see, and add a CSS style to another element. (Just to indicate which input fields are invalid.) The code below works like a charm in FF and Safari, but IE fails. I have limited this problem to the bottom: the view selector here is the jQuery code Important note:. Changes made in the product site running jQuery 1.3.1 were: Selector appearing in 1.3.2 $ ..... ('Span.inputError: visible') each (function () {$ (this) .parent () Parent () Previous ('TD') Children ('label') Children ('span'). CSS (' Color ',' red ');}); The HTML provided here is intended for: & lt; Table width = "100%" cellspacing = "0" cellpadding = "3" border = "0" & ​​gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td valign = "top" style = "text-line: true;...

vb.net - Loop takes forever with large count -

This loop takes forever to run as a quantity of items in a Loop viewer of 1,000 and closer to 1000 , About 10 minutes. It needs to run fast for every kind of amount like 30-40 thousand. Add all credit records as liquid credit (list of strings) = lar.CreateLoanLines () dim as the integer = debt. If I = Last to last I = 0 for account-I, s.Append (loan (i)) other session. (Loan (i)) end if the next s is a stringbuilder first line there as the slow list (of string) = lar.CreateLoanLines () only goes in a few seconds, even with thousands of records. This is a real loop which is taking some time. How can this be adapted? Set the initial capability of your stringbirders to a larger value (ideally, the entire final string Is similar enough to include.) Similarly: s = new stringbilder (loan calculation * average estimated string size) if you Capacity does not specify, the builder may eventually have large volumes of internal rearrangement, and it will kill performan...

How can I open another app from inside the android default the browser? -

When the long-press on the last key on Android's default browser, the History tab opens whether it is similar to user action Is there a way to open your app instead of the History tab? You must register your activity as a receiver for long-term keyboard intentions in the browser .

browser - Mobile Phone Browse Escape Ampersand (&) for URL Developed in ASP.NET MVC? -

This is a strange thing I can not understand. I have a basic mobile site that is coded in ASP.NET MVC (in fact this case will not make any difference, but to keep it out) When I go to a specific page I get the following error This page has the following errors: Error on line 56 in column 43: EntityRef: Expected ''; Below is a rendering of the page for the first error Now to present a basic anchor tag in particular An appressed query string (should be very standard right?). Why can this be a problem? In IPhone, this is not a problem, nor regular browsers (IE8, Chrome, FF, etc.). It is displayed by my Palm Pre Browser, Android and Blackberry Bold. In particular, the humiliating line (part of the original paging control) appears below: & lt; A href = "/ mobile / lotbawse? Page = 2 & watchlist = false" style = "text-decoration: none" heading = "go to page 2" & gt; & Lt; Span class = "page-number" ...

google app engine - GQL Query Optimization and Table Architecture -

I am working with Google App Engine and with some of my data queries I am running in some slow performance. Designing an Epe Engine Datastore is a different mentality than working with SQL Database and I'm not sure I'm doing this the best way. I have two questions to get on the right track: Specifically: I have a Foo type and Type a UserFoo . There is an "example" of each UserFoo related foo and holds specific data for that example. My foo type has a fooCode property that is a unique identifier and I can assign each UserFoo to each foo I can map them using their fooCode properties. I then work with Fu on each code: foos = Foo.all (). Foo filter for foo ('bar =', bar): userFoo = UserFoo.all () .filter ('userKey =', user) .filter ('fooCode =', foo.fooCode) Note: I'm using fooCode on a reference key so that we can easily remove the new Foo s and add it again and its After all the compatible UserFoo s I...

ipad - iphone - freeing a CFDictionary -

I'm not familiar with C. I have a method that has CFDCinary which is designed like this TouchBinPoint = CFAstricatetable (zero, 0, zero, zero); Point = (CP point *) Molec (size (CGPOONI)); CFxistat Value (TouchBointPoint, Touch, Point); I want to deluxe the dictionary now. As far as I understand, I have to go to the item on the list of entries in each item by item. Something like this free ((Zero *) CFDictionaryGetValue (touch point, ...)); CFDictionaryRemoveValue (touch point, ...); So, how do I repeat each point through this CFDA and by deleting each dictionary entry? Thanks for any help. You do not. You read this page: You will call it the default, standard dictionary call CFRetain () to call the value passed by you, And CFRelease () should leave it. You think that "... but it is not appropriate to call against CFPET (CGFET)". You understand that the people who asked you to just release the dictionary, they will leak at the best and they wi...

java - Suppress all Logback output to console? -

How do I configure logback to suppress all my output in the console (standard output)? In particular, I want to press (or redirect) such as LogBack's own log message: 16: 50: 25,814 Ch.qos.logback.classic.LoggerContext in [INFO] [default] - resource [logback-test.xml] 16: 50: 25,814 -info found in ch.qos.logback.classic.LoggerContext [default] - found [resource: [opt-dap] resource [logback]. Xml] /domains/ap0491/uat1/domain/instance-config/logback.xml] 16: 50: 25,816 | -WARN in ch.qos.logback.classic.LoggerContext [default] - Resource [logback.xml] occurs several times on classpath. 16: 50: 25,816 -WARN in ch.qos.logback.classic.LoggerContext [default] - Resource [logback.xml] [file: / opt / dap / domains / ap0491 / uat1 / domain / instance-config / logback.xml] 16: 50: 25,816 -WARN in ch.qos.logback.classic.LoggerContext [default] - Resource [logback.xml] [file: / opt / dap / domain / ap0491 / uat1 / domain / instance-config / logback.xml] 16: 50: 25,923 Ch.qos.logback.clas...

javascript - jQuery extension: why does it not work on all matching elements? -

मेरे पास एक एक्सटेंशन है जैसे: $ .fn.crazything = function () {Var स्व = $ (यह); // कुछ पागल सामान वापस स्वयं करते हैं; } और जब मैं इसे कॉल करता हूं: $ ("div.crazydiv")। पागल होना (); यह काम करता है, लेकिन केवल पहली मिलान डिवा पर। यदि मेरे पास पेज पर एक से अधिक डिवा हैं, तो मुझे करने की आवश्यकता है: $ ("div.crazydiv")। प्रत्येक (फ़ंक्शन (i) {$ (this)। Crazything () ;}); यह क्यों है, और मैं कई डिवाओं पर काम करने के लिए अपने विस्तार को कैसे पुनः लिख सकता / सकती हूं? अधिकांश jQuery प्लग इन इस पैटर्न का उपयोग करते हैं जो आपकी पागल सामग्री को संभालता है: (फ़ंक्शन ($) {$ .fn.crazything = function () {// पर सेटअप की अनुमति दें JQuery के ऑब्जेक्ट्स जो कि कई तत्वों को कनटिन करते हैं: इस फ़ंक्शन को वापस करें (फ़ंक्शन () {// इस फ़ंक्शन को एक बार jQuery ऑब्जेक्ट में प्रत्येक एलीमेंट के लिए कहा जाता है varian Self = $ (this); // कुछ पागल सामान करते हैं});};} ) (jQuery);

iphone - Is jailbreaking required to execute certain types of apps / code? -

As a developer, I want to create fewer features for myself, which uses private methods, etc. For intent to store them in the App Store, for example, I currently want to work on an inter-device communication device (including iPhone MiFi Type Implementation). So the question is, does access to that particular functionality require jailbreak device? Or are there things that matter about using unpublished APIs and so on? It is absolutely fine that you have to do it. The use of unpublished APIs generally does not require jailbreaking; You just use the API On the other hand, if you need root access or use privileged ports, you will need jailbreak.

Remember Apps last screen in iPhone app -

I have to remember the last screen of my app, that means if I open my app, P> Take a look at NSUserDefaults API. You can save the object to NSUserDefaults for the current code and then check that object at the launch. A NSMutableDictionary object when a view is loaded, and it changes the value every time, and stores it in user default. NSMutableDictionary * currentScreen = [[NSMutableDictionary alloc] init]; [Current screen set object: @ "about page" for: @ "screen"]; NSUserDefaults * Standard User Defaults = [NSUserDefaults Standard User Defaults]; [StandardUserDefaults Set Object: Currentscreen Farke: @ "Last Screen"]; Then when the app loads, then the user checks the default "Last Screen" key and loads the appropriate view. Hope it helps.

php - Right way to store/trac visits of an item - job board -

Develop a job board site, where I have the following tables: CV ( Users I want to follow the notification: How many users How many CV visits How many CVs I have seen How many jobs I have seen A table has been created to give me a clear idea of : Log_jobs (id, job_id, user_id) and a log_cv (id, cv_id, user_id) with it I want to know that I can create information. But the question is: We are expecting a lot of traffic, with this aproach I have mysql Can there be a real big size (imagine, two travels in the job, each trip in the CV, two questions, two questions, this just to log the action)? Mysql can handle with a real big table ?? > There are no problems with the big table MySOL, you only need to make the necessary indexes on one table and you will not have any problems. If you only want to display the sum, you can also create a table to store log_view (cv_id, view_count) just like 'hit' and then increase the view count each time you view t...

java - What does the name SNAPSHOT in jar mean? / What's wrong with *snapshot*.jars? -

I am using the bitlyj snapshot jar to shorten url from the following link. Will someone explain me snapshots .jar? Are snapshots .jar files shaky or is there something wrong with these types of jars? What is a 'snapshot' usually? Yes, these files are usually made from the current development branch without any manual testing.

php - Add suffix to a file name -

$ config ['file_name'] = preg_replace ('/ (\। Gif | \ .jpg | \। पीएनजी) / ',' _thumb $ 1 ', $ filename); असल में मुझे filename.jpg बनने के लिए filename_thumb.jpg मुझे समझ में नहीं आता क्यों विस्तार दो बार दोहराया जा रहा है (Filename.jpg.jpg)। संपादित करें यह काम करता है, मेरे पास मेरे कोड में अन्य समस्याएं हैं। काम करना चाहिए। प्रतिध्वनि preg_replace ('/ (\। Gif |। .jpg | \ .png) /', '_thumb $ 1 ', "filename.jpg"); देता है filename_thumb.jpg । किसी भी स्थिति में, अभिव्यक्ति का उपयोग करें '/ (\। Gif; \ .jpg | \ .png) $ / ' के बजाय (बेहतर, कोष्ठक का उपयोग न करें और $ 1 को $ 0 से प्रतिस्थापित करें), ताकि यह केवल अंतराल पर स्ट्रिंग से मेल खाता हो।

objective c - Are there limitations for playing video over wifi/3G on the iPhone? -

I have an app that is running * .mov files stored on a server. Some of them are more than 10 minutes long. This is right? Can anyone tell me the instructions to play the video? Application requirements: If your app is on a cellular network Distributes the video, and if the video exceeds a 10-minute duration or 5 MB of data in a five-minute period, then you have to use HTTP live streaming. (Progressive downloads can be used for small clips.) If your app uses HTTP live streaming on cellular networks, then you must have at least one stream of 64 kbps or lower bandwidth (low bandwidth The stream may be audio-audio or audio with only one image). This requirement applies to apps submitted for distribution in the App Store for use on Apple products. At Apple's discretion, non-compliant apps may be rejected or removed.

mysql - CakePHP sub query SQL in HABTM relation -

I want to match the related products to the tags and sort order the most. The relationship between the HABT model product and the tag in the class product AppModel {//. Var is $ and bellongtaomany = array ("tag"); // ..} and in contrast to the tag model. Includes - The table name is "products_tags". Examples of products $ $ include products [0] ['tags'] = array ('touch') Ex.sample for , 'Phone', '3g', 'apples'); // iPhone $ products [1] ['Tag'] = array ('phone', '3G', 'BB'); //bb $ products [2] ['tag'] = array ('touch', '3g', 'apple'); // ipad $ products [3] ['tag'] = array ('3G', 'air card'); // 3G Air Card In this sample, the highest priority relates to the iPhone sort. The iPad (found in 3 tags) Air Force (only 1 match) How to get a sub-query by using the cake method model: ID as SELECT DISTINCT (product_...

icalendar - Parse .ics file in iphone -

आईफ़ोन में .ics फ़ाइल को कैसे पाता है? जहां तक ​​मुझे पता है कि आईफोन पर कुछ भी नहीं है, आपको की तरह एक तीसरी पार्टी का उपयोग करना होगा

.net - Routing based on requested datatype in ASP.NET MVC -

I am trying to write REST behavior in my ASP.NET MVC2 app, but I have to spend a hard time knowing me That's how the routes work. I would like my routing to work like this: / user / go / 1 I have tried to set routes like this: routes. MapRoute ("rest", "{administrator} / {action} {format} / {id}" (...) but complains that I {action} and { Format} need a separator between: routes.MapRoute ("left", "{controller} / {action}. {Format} / {id } "(...) creates / user / receives / 1 invalid (needs to do this any suggestions? ------------- Edit it ------- ---------------------------- - I have a solution now, but I'm not really happy with it: Routes. MapRoute ("DefaultWithFormat", // root no New {Admin = "Home", Action = "Index", Format = "HTML", ID = URL Parameter, with "URL" {{Admin} / {action}. {Format} / {id} "// URL Parameter. Option)} parameter;) New with...

awk - How can I delete one line before and two after a string? -

You enter a record in a text file that looks like this: Header Data 1 Data 2 Data 3 I would like to delete the entire record if data is 1 given string I think this requirement requires awk which I do not know. Awk record can handle these multilog records by separator in an empty string: BEGIN {rs = ""; ORS = "\ n \ n"} $ 2 == "some string" {next} # Skip this record {print} # print (non-skipped) records You can save a file (like remove.awk ) and send it to awk -f remove.awk data.txt & gt; Newdata.txt Believes that your data is of the format: header data .... header data ... If there is no blank line between records, then you have to divide the records manually (this is 4 lines per record): {a [ ++ i] = $ 0} I == 2 & amp; Amp; A [i] == "some strings" {skip = 1} i == 4 & amp; Amp; ! Skip {print (i = 1; i & lt; = 4; i ++) Print a [i]} i == 4 {skip = 0; I = 0}

php - Can't track down bug -

The following script is part of the script which is used to certify paypal payments. $ ch = curl_init (); Curl_setopt ($ ch, CURLOPT_URL, 'https: //'. $ Server. '/ CGI-bin / webscr'); Curl_setopt ($ ch, CURLOPT_POST, true); Curl_setopt ($ CH, CURLOPT_POSTFIELDS, $ parameter); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ CH, CURLOPT_HEADER, incorrect); Curl_setopt ($ ch, CURLOPT_TIMEOUT, 30); Curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, incorrect); $ Result = curl_xac ($ CH); Curl_error ($ ch); Curl_close ($ ch); There is a problem with curl_exec on some rare occasions that stops the script executing on that line. No error has been entered in the cpanel error log and after doing many different things, I am not clear what is happening due to curl. I am not very familiar with curls, so if someone knows a good way to get information from this error, or maybe what might be the reason for this problem, I would appreciate it. It can take ...

c++ - call objective c method from cpp method -

मेरे पास ऐसा सीपीपी वर्ग है .. class MyContactListener: public b2ContactListener {int countContact; /// यह एक उद्देश्य सी क्लास है ... HelloWorld * hel; सार्वजनिक: शून्य अंत संपर्क (बी 2 सी संपर्क * संपर्क) {/ / मूल उद्देश्य सी ऑब्जेक्ट प्रारंभ करें = [[हैलोवाल्ड आलोक] आटोरेक्झेस]; /// कॉल उद्देश्य सी पद्धति ......... [प्रारंभ करनासंचार]; }}; सीपीपी वर्ग के अंदर मैं एक उद्देश्य सी पद्धति को कॉल करता हूं। उद्देश्य सी विधि दिखता है .. - (शून्य) शुरू करेंसंपर्क {shakeCounter ++; [_label सेटस्ट्रिंग: [NSString stringWithFormat: @ "% d", शेक क्रॉपर]]; } उद्देश्य सी विधि को बुलाया जाता है .... और भी चर शेक क्वॉर्टर में वृद्धि हुई ..... लेकिन _label स्ट्रिंग अपडेट नहीं की गई है .... _ लेबल ठीक से आरंभीकृत है और ठीक से काम करें अगर मैं उद्देश्य सी वर्ग से स्वयं का उपयोग करके उद्देश्य सी पद्धति को बुलाता है .... क्या कोई भी मदद कर सकता है ??? Itemprop = "text"> उद्देश्य- c वर्ग के तरीकों को कॉल करने के लिए संपर्क श्रोता में एक प्रतिनिधि का उपयोग करें...

slidingdrawer - Android Layout, move window -

Perhaps you remember dragging in the Android donut window. You have some tabs if you tap this tab with your finger , A window is slammed and all apps installed on your Android phone are revealed. Is there any idea how this is in a layout? I am searching for this ...

c# - Windows mobile message box this.close()? -

On the Windows Mobile 6.1 professor. I have a Yes / message box with a button. When I click on the 'No' option in the message box, my whole application shuts down, how can I close the message box? string message = "will you agree to download application data?"; String caption = ""; Message box button button = message box Yes No; DialogResult Results = MessageBox.Show (Message, Caption, Button, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); If (Results == DialogResult.Yes) {navigateForward (WEB_PAGE_NAVIGATE); } Other {This. Close (); } You do not need to close the message box. This is a DialogWindow and will close itself when you click on any of the options: DialogResult result = MessageBox.Show (); If (Results == DialogResult.Yes) {navigateForward (WEB_PAGE_NAVIGATE); } Else {// do not need to do anything in the form of a message box, is automatically closed} For this reason your entire application has been closed because i...

Cocoa: Custom control not limited to window frame - how to start? -

I want to create a custom control that will work like this: You have a type of NSBeton with an image. You click the button and a large square with the grid of the photos appear. You click on one of the photos and it is set as a new image for the button. (Square Guyshers) Now, if I want this window frame not limited to frame, how to draw this big square with pictures? I mean, if the button was close to window border then the square is going to be partially out of the window. I would like to add some shade to the square and animation to open / close. An important point: I want to attract not just one class but any other normal shape (cycle)! It is really not a drawing question as a question of a common question, it is important to make the difference . I will describe this in the context of rectangles to give you general idea *. You should make sure that you and cocoa understand. Without this vital mandatory knowledge, you will remain dead in water. Setting the image of ...

php - Variable in a function cannot be seen out? -

& lt; php फ़ंक्शन कर्ल ($ mail) {$ go = curl_init (); $ Access_token = '1234567890 | 5fabcd37ef194fee-1752237355 | JrG_CsXLkjhcQ_LeYPU।'; '; Curl_setopt ($ जाना, CURLOPT_URL, 'https: //graph.facebook.com/search? Q ='। मेल मेल। '& Amp; टाइप = उपयोगकर्ता & amp; access_token ='। $ Access_token); Curl_setopt ($ जाना, CURLOPT_USERAGENT, "मोज़िला / 5.0 (विंडोज; यू; विंडोज़ एनटी 6.1; एन-यूएस; आर.वी.: 1.9.2.8) गीको / 20100722 फ़ायरफ़ॉक्स / 3.6.8"); Curl_setopt ($ जा, CURLOPT_POST, 0); Curl_setopt ($ जाने, CURLOPT_HEADER, 0); Curl_setopt ($ जाने, CURLOPT_RETURNTRANSFER, सच है); Curl_setopt ($ जा, CURLOPT_SSL_VERIFYPEER, गलत); $ Json = curl_exec ($ जाना); curl_close ($ जाने); $ Arr = json_decode ($ json, 1); यदि (isset ($ arr ['डेटा'] ['0'] ['आईडी'])) {$ arr ['डेटा'] ['0'] ['id']; } अन्य {वापसी झूठी; }}? & Gt; मैं $ नाम = $ arr ['डेटा'] ['0'] ['नाम'] रख रहा हूं; ...

Adding text to ImageView in Android -

I have an ImageView I want to show this image view to show some messages in a fancy manner. So I want to add text to that image view. Can anyone tell me how I can do this. Your ImageView You can: & lt; Relative layout & gt; // Only works within a relative layout & lt; ImageView Android: id = "@ + id / myImageView" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: src = "@drawable / my ezage sauce" /> Android: Android: layout_height = "wrap_content" Android: layout_alignLeft = "@ + id / myImageView" Android: layout_alignTop = "@ + id / myImageView" and lieutenant; Android: layout_alignRight = "@ + id / myImageView" android: layout_alignBottom = "@ + id / myImageView" Android: layout_margin = "1dp" Android: gravity = "center" "Android: Text =" Hello "Android: textColor =" # 000000 "/ &...

mysql - Why can't "SELECT DISTINCT 1 AS score ORDER BY score DESC;" work during creation of temporary table -

In MySQL, this part of the code works and produces a line of '1' as the value. Select DISTINCT score by score 1 score; However, when I use it with the formation of temporal tables as one below: DROP TABPARY TABLE If 'testTable' exists ; Construct a temporary table Select 'Testlet'; DESC based on 1 score score; MySQL says: There is an error in your SQL syntax; Note that the code below works ... without any sequence > drop temp table if present is 'test table'; Select the temporary table 'test table' Select the difference 1 AS score; According to the below shown, one has to be added to the FROM block, this will work ... drop template table if exists 'testTable'; Create temporary table Select `Test Table '1 score score by DESC by Tx order; I know that my sample above is not important, but it is a question of curiosity. Thank you. Selection-description is fully valid, so it should work, but maybe MySQL i...

javascript - Web-based Circular Interface Frontend - No Graphics! -

How do you create front end for an web based circular interface graphic files or not using Flash? Would you like to? Check out this example: The plugin page is here:

css - google maps overlay layer -

I'm trying to put a layer on top of my Google Maps to cover it, with no interaction with Google Maps It does not have to be, it's just one layer above the other. What I have now: & lt; Div id = "map" & gt; & Lt; Div id = "overlay" & gt; & Lt; / Div & gt; & Lt; / Div & gt; I put my Google Maps in the map div, and the overlay layer has a background in the map div, but Google Maps keeps it on the top. P> What can I do about anybody? The API will overwrite anything inside the DIV Assign the map as a container to cover the map To do this, you should put your overlay device in position with the map: Absolute

sql server - SQL TEXT type in Dataset Designer -

I am using Visual Studio Designer to create a type data set, and I change the stored field in one The process given is that I can not refresh to be a text type because the comparison of the text type is not comparable. How do I see it? Do not use a text type. You have more flexibility by using nvarchar (max) or varchar (max). This should map the string type to your typed dataset.

jQuery plugin issue: focus not working -

यह प्लगिन है: (फ़ंक्शन ($) {$ .fn.foo = समारोह () {$ (यह)। फोकस () $ $ (यह)}}) (jQuery) अब, $ ('input # foo')। () फोकस नहीं मिलता किसी भी विचार क्यों? (फ़ंक्शन ($) {$ .fn.foo = function ( नक्शा) {return.Each (function () {// element-specific code here $ (this)। फ़ोकस ();})}}}}}} (jQuery); अधिक के बारे में।

.net - Why might System.Threading.dll be missing from Windows\Assembly? -

मेरे पास एक्सपी प्रोफेशनल चलाने वाली रिमोट मशीन पर स्थापित .NET Framework (संस्करण 1.1 से 4.0) के विभिन्न संस्करण हैं। मैंने अच्छे उपाय के लिए रिएक्टिव एक्सटेंशन भी स्थापित किया है। मेरे पास एक ऐसा अनुप्रयोग भी है जो मेरे मशीन पर काम करता है क्योंकि यह सिस्टम को संदर्भ देता है। यहां पाया जा रहा है: C: \ Program Files \ Microsoft Reactive Extensions \ redist \ desktopV2 \ System.Threading.dll मेरे पास जीएसी में डीएलएल के दो संस्करण हैं। दो सवाल: i) क्यों विजुअल स्टूडियो ने फैसला किया कि यह संस्करण (उदाहरण) है, फ़ाइल में ब्राउज़ करने के बजाय सूची में से चुना गया है? ii) क्यों सिस्टम। रिमोट मशीन पर मौजूद नहीं है? (मैंने सोचा कि यह फ्रेमवर्क का मुख्य भाग था) धन्यवाद सिस्टम .Threading.dll को .NET 4.0 में जोड़ा गया था (हालांकि नामस्थान System.Threading v1 के बाद से किया गया है)। आरएक्स में System.Threading.dll का एक संस्करण शामिल है जो .NET 3.5 SP1 को बैकपोर्ट किया गया था। ऐसा लगता है कि आप नेटवर्क्स को लक्षित कर रहे हैं। 3.5। इस स्थिति में, रनटाइम केवल 4.0-केवल Sy...

.net - C# calculate MD5 for opened file? -

How can I calculate the MD5 hash for a file that is open or used in a process? The public is stable it is going files string GetMd5HashFromFile (String filename) {FileStream file = new FileStream (filename, FileMode.Open); MD5 md5 = new MD5CryptoServiceProvider (); Byte [] retVal = md5.ComputeHash (file); File.Close (); Stringbilder sb = new stringbiller (); For (Int i = 0; I Cheers. Try opening the file to read - only: FileStream file = new filestream (FileName, FileMod. Open, FileAccess. Read); Or: file stream file = file. OpenRide (filename); This will work on the sharing mode of other file handles if the file is locked only because it is a running EXE, I think it would be sufficient

translation - Fast Sequence Alignment on Unicode Strings -

I want to run something like a blast algorithm for the query of a large database of unit strings. Most alignment software like blast is expected to input nucleotide or protein strings. But my input could potentially contain a Unicode character, is there any piece of software that will allow me to do this? Scoring matrix just identifies the matrix (can not be a partial match.) I have tried Neidlon-Wansche and Smith Waterman, but for my purpose they are very slow to blast me a big database Should ask. Thank you! Blast can be used to align the sequence of letters of any alphabet. The publicly available implementation is consistent with the protein because you might need to apply it yourself, but the algorithm is not specific for protein or nucleotide sequences.

Adding an extension to Eclipse without an internet connection -

I have problems with eclipse I want to set up an extension (EGIT) but the official site provides only a classical update site. is. The problem is that I am running Eclipse on a remote machine which does not have internet access (only my local computer has connection) The only link between my computer and my distant machine is a remote hard drive Which is mounted on two computers. Remote Machine is classic Linux but local is a Windows XP so I can not just use SSH-L (or at least I do not know how to do it under Windows.) Is there any idea to help someone? Thanks in advance. / P> You can try, and then folders as a local update site on the machine without internet connection Use / P>

asp.net mvc - Call a web service from inside or outside the model? -

I'm looking for some guidance on the architecture of an application that I'm making. Here's the situation: Our company gives reward cards to sales personnel who are then handed over to the customers (used like a debit card). For tracking purposes, the seller should request activation from our system, before the card can be used (to provide information about who gave the card and why). The front-facing app is ASP.NET MVC 2. A Windows service checks activation requests periodically and activates the company to make a web service call from the company that issued the card (in fact there are two card companies and two services) then this DB Marks the status of the card being activated in. My solution is divided into 5 projects: Web, data (models and repositories), companies (access to two web services), service (Windows service) and test. As is currently present, some code may look like this to go into the service of windows: using (var repo = new repository () ) {...

c# - How to redirect to another page when selected dropdown item is changed? -

I have two dropdown lists that I am putting on this page. I can not work either: & lt;% = html.DropDownList ("CategoryId", Model category list, "Choose a category to see")%> (M = & gt; m.SearchExpression)% and & lt;% = Html.DropDownList () I need something when one item is selected and I click on submit. Use of & lt;% (Html. BeginForm ()) {%> & Lt;% = Html.DropDownListFor (m = & gt; m.SearchExpression% & gt; & lt; input type = "submit" value = "submit" /> & lt;%}% & gt; You will have a controller with a poster action: [HTTP post] Public Actioncell Fu (...) {Return Direct Reaction (. ..); // or Redirect Reader (return) ..);}

Is it possible to not implement a method inherited from an interface in C#? -

Looking at Project Server 2010 SDK (found in NET reflector) I found something interesting that confuses me. Obviously, inherited from SvcProject.ProjectClient class in ProjectServerServices.dll System.ServiceModel.ClientBase & lt; Project & gt; , which is an abstract class which implements the System.IDisposable interface. However, when I inspect the SvcProject.ProjectClient class (which is not intangible), there is no dissection what is the method? I thought every method obtained from the interface should be implemented in concrete implementation (otherwise the interface is used). Is NIT Reflector Lying To Me? Is Microsoft foraying this requirement for any reason? Is going on? This is possibly explicitly applied, like this: zero idisposable.Dispose () {// code here} Either it or it handles the method from the base class only because ClientBase & Lt; T & gt; Abstract element does not mean that it can not implement IDisposable itself corr...

javascript - Make jQuery Captify show images captions permanently -

Is there a way to permanently display captions for images on the image, not just when I move the mouse cursor over the image ? is a field animation: $ (document) .ready Capture ({speed}: 'speed', speedout: 'normal', hide: 500, animation: 'always-on', prefix: '', ambiguity (function () {$ ('img.captify'). : '0.7', classname: 'caption-down', position: 'bottom', span wide: '100%'});}); This slide can be faded and always-on, the last option is the right choice.

c# - App.config setting not updating web service end point -

In Visual Studio 2010, I have added a web service reference. In App.config, it is registered as follows: & lt; Application settings & gt; & Lt; Project.Properties.Settings & gt; & Lt; Setting name = "project" serializeAs = "string" & gt; & Lt; Price & gt; Http: // myurl: 8080 / FileSystemIOService & lt; / Pricing & gt; & Lt; / Settings & gt; & Lt; /Project.Properties.Settings> & Lt; / ApplicationSettings & gt; When I update the app.config URL, the project does not use the URL. Instead, it uses the web context URL property setting of the web context. I have to change this property and have to recompile the code to replace the web context url. In other web service projects, I have never found this issue, replacing the URL in App.config properly assigns the web service. itemprop = "text"> The problem was a copy / paste error in service project (B) from the console (A). Proj...

xslt list marker styles -

How can I handle bullets other than numbers in XSLT. I want to draw a table (xaml floddown) and put the rows in the form of a badge. Hierarchical indent and special marker style (XAM) are not being used in the flow document. 1 Some text ......................... A. some text ......... ............ [1] Some text ................ Some text again ........ [1] Some text will be again .... XML source will be bellow as & lt; Root & gt; ... & lt; Step & gt; & Lt; Text & gt; First level & lt; / Text & gt; & Lt; / Step & gt; & Lt; Step & gt; & Lt; Text & gt; First level & lt; / Text & gt; & Lt; Step & gt; & Lt; Text & gt; Second level & lt; / Text & gt; & Lt; Step & gt; & Lt; Text & gt; Third level & lt; / Text & gt; & Lt; Step & gt; & Lt; Text & gt; Fourth level & lt; / Text & gt; & Lt; / Step & gt; & Lt; / Step & gt; & Lt; / S...

ruby - How do you rename a folder in a bucket on S3? -

It seems as easy as it sounds like an extraordinary complex task. If you are using the A VS-S3 gem, the following code BUCKET_NAME Bucket NEW_FOLDER_NAME OLD_FOLDER_NAME will rename the folder in: Bsize = OLD_FOLDER_NAME.size bucket = AWS :: S3 :: bucket.find (BQFAA) bucket.bags ({: prefix = & gt; OLD_FOLDER_NAME }). Do each AWS :: S3 :: S3Object.rename (o.key, NEW_FOLDER_NAME + o.key [bsize ..-1], BUCKET_NAME) and This is the same. Folders are not real objects, so all you have to do is rename all the objects that end in that particular path in the new path. The virtual folder will be changed as a result.

iphone - Remove UISearchBar on tableView click -

I have a UISearchBar that is pressed by a button when some other view is subsided by. When it loads, it looks like the following (decrease the red scrabbles): I would like to remove the UISearchBar view from the parent wind controller, when the table view ( Areas with Red Scribles) are clicked and empty (no search has been done yet). I find it a tough time to find out the best way to do this. I have tried to insert a transparent button in that section and have added it as a subview in the search bar, however, the button is below the table view area, so when the table view is clicked , Then the search bar loses focus and Ubutan can only be reached by then. Do anyone know that when I click below the empty table view, how can I remove the search bar from the original view controller? Thank you. To bring the transparent button up and touch it first, [button .parentView bringSubViewToFront: use the button] . > In the search bar representative, and to deal t...

graphics - Plotting a smoothed area on a map from a set of points in R -

How do I plot an area around a set of points on a map in R? For example, map ('world') map.axes () P & lt; - Matrix (c (50, 50, 80, 100, 70, 40, 25, 60), ncol = 2) # Some points (P, PP = 1, cola = "red") polygon (p, call = "Blue") ... which gives me a polygon at the top in each issue, but it looks worse does any type of polygon in any way in the "smooth" curve is? One option is to surround a polygon with a beijier curve, bezier / Code> Function HMICC in the package. Although I can not get the start / end point to connect properly. For example: ## Points to some points - Matrix (c (50, 50, 80, 100, 70, 40, 25, 60), ncol = 2) ## Add End P2 and LT; - Sybind (1: 5, p [c (1: 4,1),]) ## The starting point of linear interpolation between these points is T. Corus & lt; - Seek (1,5,0.05) X (P2 [, 1], P2 [, 3], xout = x (p2 [, 1], p2 [, 2], xout = t.coarse) $ Y y.coarse & lt; t. Coeur) $ y ## A Beige Curve Library (HMICIP)...

javascript - Loading content from a div from another website into an iframe on current page -

I was able to load a full page in an iframe, but I want a certain part of the page. I know what I need to know the div id is this is my current code onload = function () {var el = document.getElementById ("frameContainer") el.innerHTML = " & Lt; iframe src = \ "url \" & gt; & lt; / iframe & gt; "} I was thinking of getting the full page and then from there to div Caught and displayed it, but I did not understand how any suggestions? You have foiled cross-domain issues, instead of server-side / curl-ish solutions Consider the type?

iphone - UITableView with side section header images -

There are pictures from each section, almost acting equally for header scenes. If I scroll down, the top image stays there until it is collision with the next image, and vice versa. Initially it seems very impossible that UITB is without completing VUI again, but I think it is semi-UITableView by subclassing this section to draw images, out of uitableview, on the side Whenever it calls layout subviews (i.e. when it scrolls). There are minor problems with this: because it pulls out of the UITWview, any autorissi will probably throw the whole layout. And I'm not really sure about the viability of all this. Any thoughts? Edit: I realized that my first thought will not work because any touch on images will not be tracked through a tableview, so if you touched there you could not scroll. I think the biggest issue here is finding out how to touch the touch so that it can be touched in the whole scene. "post-text" itemprop = "text"> Yo...

ruby on rails - Benefits of Sinatra for a web service like controller -

I am writing a simple Ruby Controller which just needs to answer as a webservice in a group of mobile clients. Someone told me that I should see Sinatra, what is the point of using Sinatra? He mentioned that it would be "fast", but how can a cover on top of something fast? I do not want to do anything more; It is so easy to write a simple controller and have fewer gems to maintain. Do I remember Sinatra's offer which is worth the extra trouble? Thanks Simple, useful Ruby Web application that you can create will be an application There is a lightweight DSL that sits on the top of the rack to see the controller more coded and more convenient, with more add-ons like ActiveRecord or rack :: oh , etc. Create more sophisticated applications Rail 2 is a more feature rich framework in which the framework is already available in the framework. Vacancy facilities do not need to include some applications, some developers prefer things like Sinatra lower. Althou...

How to read both single object & array of objects in json using javascript/jquery -

I wrote Jason Reader to read data & amp; {"Value": "new", "onclick": "createNidoc ()"}, {"value": "open", "file", "value": "file", "popup": {"menuitem" , "Onclick": "OpenDec ()", {"value": "off", "onclick": "CloseDoc ()"}]}}} but when Jason A By way of the API, a menu item returns {"menu": {"id": "file", "value": "file", "popup": {"menuitem": {"Value": "close", "onclick": "CloseDoc ()"}}}} The menu item is an object instead of an array. Therefore, my Jason Reader has failed to read because I read the menu of menutom by looping. The solution is appreciated How is it controlled by other major sites? This is perfect for jQuery's MakeEye . - It takes anything and returns an array, so...

C# Settings Problems, Can't convert type string -

New C # here, and I'm trying to store a string in a setting. What do I have: string testing = "setting to save!"; Properties.Settings.Default.testSetting = test; Properties.Settings.Default.Save (); However, I get this error: Error 1 can not convert type 'string' to 'system.collections.Specialized.StringCollection' Thank you. properties. Settings. Default. Test Settings Code> String Collection Check IDE for settings and see if you have chosen the wrong type.

sql - Shortening a repetitive 1400-line MySQL UNION query using PHP -

I have a MYSQL table that is 1275 fields wide. Each row in the table represents a single class of students, in which 17 students per student, 75 students from X per class, hence 17 x 75 = 1275 fields. I have prepared a SQL Union query that successfully pulls students into another table, in a row with a student. Now, I want to use this UNION query as part of a PHP program. This is because I have "Import" queries in PHP. But, is there no way to use PHP to shorten the SQL query? Shameless, here is my code: $ sql = "$ t_mem2 select localcourse, statecourse, coursetitle, semester, section, teachercode, teachername, meetingcode, classpop, student_id_01, as the form of student_id In sex form sex_01, as dob_01 birth date, grade_01 grade, ethnic_01 as ethnic, last_name_01 as last_name, first_name_01 as first_name, $ c_sch $ t_mem1 unions selection localcourse, statecourse, coursetitle AS student_ID, sex_02 as sch_code from semester, section, teachercode, teacername, me...

In django, are all session data deleted if a user logs out? -

I need to track some information about users, but want to keep it for a certain time period, Say a week. If I set this value through request.sessions, and the user logs out, can I retrieve it if they log in later? It all assumes that my sessions are normally set to expire in 30 days, if the user is logged out. While thinking about the problem above, I decided to store the data in a table, but I still have to use the cookies because of relevance for referenc Have also decided. This will depend on your session backend. But when you log out, the default backend ( backends.db ) removes the row from the session table. I recommend adding data to a field in the user profile. Using the session will give you problems, even if you do not delete the data. The next time the user logs in to you, he does not know which session ID he used the last time, and generally you only have to see the session ID is not a user ID, so you can use a special user You can get all the sessions owned ...

homescreen - Android Home Screen effect -

I want to do something like an Android home screen effect. When I click on the screen and move the current view will move forward and the next scene can also be shown. Now the code can only show the current view. Thank you for your help Follow the form of the source: Public class test activity enhances tools OnTouchListener {float downXValue; /** Called when the activity is first created. * / @ Override Crate on Public Zero (Bundle Saved Instantstate) {Super. Contents (Saved Instantstate); // Set.XML as the layout for this activity set Content View (R. Layout.man); // Add these two lines LinearLayout layMain = (LinearLayout) findViewById (R.id.layout_main); LayMain.setOnTouchListener (OnTouchListener this); // Spinner Spinner Spinner: Add countries to some countries = (Spinner) Find VViBiID (RID SpinnerCountry); ArrayAdapter CountryArrayator = New Arrayadapter (this, android.R.layout.simple_spinner_dropdown_item, New string [] {"Canada", "USA"}; spinner...

animation - jQuery effect plugin -

I'm looking for a jQuery plugin that wobbles on dom elements I checked their source And they use jQuery but do not think they are using a plugin to do this. Anyone knows a plugin that does something similar? I do not know about this plugin, but you can make one if you want. OK, the site uses the jQuery code (below) for it. $ (function () {var start_time = new date () .gettime (); var wobble_sec = 4; var icons = $ ("# Featured IMG"); var bobble = set interval (Function () {var sec = ((new date). GetTime () - start_time) * 0.001; var alpha = second * 2 * monastery; pi; var wobel_lafa = alpha / wobbly_sc; var lambda = (0.5 + math Chaos (Math, PI, Wobel_Lafa)) * 0.5) * 50; (Var i = 0; i Math.PI) {Clear Timeout (bobble);}}, 30);});

.htaccess - htaccess Redirect using regex -

I want to redirect some pages to the following types http: // www .example. Com / old / thispage1.html to http://www.example.com/new/this-page-1.html Please suggest. Thanks rewrite old / ([az] *) ( [0-9] *). Html New / $ 1- $ 2.html

screen scraping - Blocking Web Scrapers -

इस सवाल का पहले से ही एक उत्तर है: 9 जवाब वेबसाइटों के तरीके क्या हैं वेब स्क्रैपर ब्लॉक करें? आप कैसे पहचान सकते हैं कि आपके सर्वर को एक बॉट द्वारा उपयोग किया जा रहा है? कैप्चास एक सेकंड से कम में जमा किया गया फ़ॉर्म छिपे हुए (सीएसएस) फ़ील्ड को फॉर्म के दौरान सबमिट किए गए मान प्राप्त होता है बार-बार पृष्ठ विज़िट सरल बोट फ़्लैश, चित्र या ध्वनि से पाठ स्क्रैप नहीं कर सकते ।

Android image animation -

I've been without the following success for the last three days. Suppose I have an image I have set an invisible image in my XML layout, now I want to make it visible through animation. Let's translate the animation. Suppose point A and point B is at point B I have already set an invisible image. I want a translation animation effect from point A and when it is complete, image B will appear. Please help me. Setting your image view as children and transition using ViewFlipper (or View Animatator) Define animation effect for

c# - Getting selected item in active window -

I am using C # to develop an application that works with the clipboard, was thinking Whether it is possible to obtain its contents, the user has selected in the current window, no matter what the window (like Firefox, Notepad, etc.) Text "> I'm not sure if you are going to get a general solution for this problem. Take a look at this link; The authors of this post report that their solution works in Notepad, but not in WordPad or Word. I do not know much about this area, but I think it means that it means that there are many such mediums Through which the text selection function Is done - even in Windows. I think it extends to Control-C. Just text selection I believe that copy order based on context different There are ways. For example, if you press Control-C on the dialog box in Windows, then it will copy without text, you must select it manually. Hopefully the links above are of some use to you Edit Remind: Speak Soon - Just got this link; It ...

user interface - GUI for PHP in NetBeans? -

Hi there I would like to ask if the netbooks have been offered as java programming like GAI builder? Sorry for the noob question if so, how do I set or use them? Thank you. No, it does not have this functionality because PHP has no GUI component that is built in PHP . Typically a scene is added to HTML and CSS to render Netbeen does not have a builder for HTML and CSS, so there is no answer.