Posts

Showing posts from June, 2015

android - Can I store image files in firebase using Java API -

Is there a way to store image files in firebase using the Java API? Try using this snippet: Bitmap BMP = BitmapFinder ACRR resources (getResources (), R.drawable.chicken); // Your Image BitReon OutputStream BETE = New Bytereanputstream (); Bmp.compress (bitmap.compress format.png, 100, bte); Bmp.recycle (); Byte [] Bitere = BETE.Tobietair (); String imagefile = base64.edecodeToString (byte, base64.default); and to retrieve Public Bitmap String Automation Map (string encoded string) {try {byte [] encoded = base 64 decode (encoded string , Base 64. Default); Bitmap bitmap = bitmapfactoryDisadAbayTitre (encodedbyte, 0, encodibeta.lamp); Return bitmap; } Hold (exception e) {e. Messages (); Return tap; }}

c++ - QTest::qExec Hide "passed" messages -

I am new to Qt and Q. I used to run Quetest :: QXAC (and some test classes object) Is it possible to hide "PASS :: MyClass :: myTest" messages? Of course, I want to see all "unsuccessful" messages and statistics, sorry for my poor English I Not sure that this works with QTest :: qexec , but with the default QTest executable generated with you can specify the parameter -silent . Help-Text: - Silent: Outputs only warnings and failures

python - Get all friends for multiple given users using tweepy -

I am trying to compile a list of all the friends who my friends have on Twitter So many users will be given users. I I use the cursor to return all the following users, then try to print all the user's friends Friends for tweepy.Cursor (api.friends) .items (): print friend.screen_name user = api.get_user (str (friend.screen_name)) for f2 in user.friends (): print f2.screen_name Although I'm already running on many issues, only 20 friends for each user ( user.friend ) Is printed. The second issue is that I am getting the rate limit error. If you, you will see that you can request more than 5,000 friends at a time. There is no way to avoid the rate of 15 every 15 minutes.

php - How to convert date time to unix command date -

मैं 2014-10-10 04:13:24 को 2014 में कैसे परिवर्तित करूं -10-10टी 04: 13: 24 + 00: 00 में php या mysql उपरोक्त तारीख की तारीख साइटमैप में XML प्रारूप के लिए है संदर्भ चेक के लिए कोड जिसे मैंने करने की कोशिश की है: "दिनांक प्रदान" गूंज। $ टाइमस्टैंप = "2014-10-10 04:13:24"; गूंज "& lt; br & gt;"; $ वर्ष = दिनांक ('वाई', स्ट्रटोटेम ($ टाइमस्टैम्प))। "; $ माह = दिनांक ('मी', स्ट्रॉटोमेम ($ टाइमस्टैम्प))"; $ दिन = दिनांक ('डी', स्ट्रोटोमेट ($ टाइमस्टैम्प))। ""; गूंज '& lt; br & gt;'; $ घंटे = तिथि ('एच', स्ट्रटोटेम ($ टाइमस्टैम्प))। ""; $ मिनट = दिनांक ('आई', स्ट्रॉटोम ($ टाइमस्टैम्प))। ""; $ सेकंड = तिथि ('s', स्ट्रॉटोमेम ($ टाइमस्टैम्प))। "& Lt; br & gt;"; $ Gmktime = gmmktime ($ घंटे, $ मिनट, $ सेकंड, $ माह, $ दिन, $ वर्ष)। "& Lt; br & gt;"; "आउटपुट डेट" गूंज। $ Isodate = date ('c...

angularjs - $materialDialog fails to show when used with angular-ui-router -

I have a sample plank I have a login page and on a successful login, Redirected to the home page, which is similar to: $ state.go ('home'); Now, after logging in, I have a button to show some dialogs, failing to load the dialog by clicking the button. If the user refreshes the home page (click login) and then clicks on the button, then the dialog opens successfully, I do not understand why this is why it may be due to a bug in the angular-u-router is? Or am I missing something? I believe you did this wrong, when Uri router should use it Let me control your states I'm not sure why to show your dialogue, but I think that you are using ng-click to open it ui-sref will be a better way to create a button that maps to a sub-state. & lt; Md-button ui-sref = "characters.create" / & gt; Then define a onEnter instead of a controller in your state definition. .state ('characters.create', {Url: '/ create', templateURL: ...

php - sql order by most recent dates -

मेरे पास इस तालिका में मेरे डेटाबेस है: INSERT `shop_stats` (` दिनांक `,` मूल्य`) मूल्य ('0 9/2014 ', 326), ('08 / 2014', 1007), ('07 / 2014 ', 1108), ('06 / 2014', 1027), ('05 / 2014 ', 895), ('04 / 2014', 650), ('03 / 2014 ', 683), ('02 / 2014', 563), ('01 / 2014 ', 49 9), ('12 / 2013 ', 568), ('11 / 2013', 522), ('10 / 2013 ', 371), ('0 9/2013', 347), ('08 / 2013 ', 376), ('07 / 2013 ', 418), ('06 / 2013', 567), ('05 / 2013 ', 357); मुझे पिछले 12 महीनों को प्रदर्शित करने का तरीका ढूंढने की आवश्यकता है। मैंने इसे करने की कोशिश की: SELECT * FROM shop_stats ORDER कोई भी सुझाव? पोस्ट-पाठ "आइटमप्रॉप =" टेक्स्ट "> आप STR_TO_DATE (तिथि, '% m /% Y') डीईएससी सीमा 12 द्वारा खरीदारी_स्टेट आदेश से बस इस तरह से उपयोग कर सकते हैं SELECT *

temp tables - MySQL: Syntax error, unexpected '@', expecting ':' -

I want to create a temp table dynamically I am passing the column name as a parameter for the stored function . Example : DELIMITER $$ create process sptemp (IN nm varchar (50)) BEGIN @seta q q = a concat (' Use the temporary table; // select error here; ',' Select '', 'Table 1 from AS Colonel'); PREPAREÂ da FROMA @q; EXECUTEÂ d; DEALLOCATE Ready D; END $$ DELIMITER; Error : syntax error, unexpected '@', ':' SET @q = CONCAT ('Effects'), then 'Create a temporary table' engine = in the form of Maisam (select difference ', nm,' es Colonel Table 1) '); As a bonus - The index of your kernel columns.

bash - What is a reason for using shift $((OPTIND-1)) after getopts? -

I realize that the shift moves the array of cli args n spaces from the left, and the default of n is 1. This means that I can provide value to the current variables array while using $ 1 while inside a loop. Why I do not understand why it is used in this context below is the input algorithms already assigned to the values ​​and removing the change $ (OPTIND-1) does not change this fact. Source: When Receiving ": h: a: fc" opt. What to do $ opt in h) print_help exit 0 ;; A) Aha = $ {OPTARG} ;; F) force = 1 ;; C) Clean = 1 ;; \?) Echoerr "invalid option - $ OPTARG" print_help exit 1 ;; ASAC changes $ ((OPTIND-1)) shift removes processed parameters getopts by loop from the parameter list, so that the rest of the script command line (if any) with a balance of $ 1 ... process normally, without worrying for the number of Consider a hypothetical script with the use of getopts of options frobble [-f] [-c] [-a hostname] file Name ... takes care of p...

Not able Execute multiple command in remote Machine Using PSEXEC through Perl script -

Trying to connect to a remote machine, psexec and trying to execute several commands, The execution is hanging when the Sieb server manager is trying to connect and execute some related commands system ("cmd /cc:\\PsExec.exe \\ \\ $ host_name -u $ user_name -p \ $ pwd CMD / C \ "$ Command1 & amp; Srvrmgr / g Enterprise Server / U Username / P Password / E-Sibel / s siebserver / c \" conform to CMD \ "\" To add ""); I am running commands through Perl script, capable of running other commands, the only issue is when I connect to Server Manager and try to execute some related commands Need to debug avoids: Usage 5.012; My $ host_name = 'HOST_NAME'; My $ user_name = 'USER_NAME'; My $ pwd = 'PWD'; My $ command1 = 'COMMAND1'; My $ CMD = "CMD / C: \\ PsExec.exe \\\\ $ host_name -u $ user_name -p \ $ pwd cmd / c \" $ command1and; Srvrmgr / g Enterprise Server / U Username / P Password / e sie...

android - ActionBar Style issue with itemTextAppearance -

Image
I just want to do something that looks simple, changes the color of the menu item title in ActionBar. I have seen that many people have the same problem, so I found that tested every solution even did not do any work! Here's my code: & lt; Style name = "appbashtheme" guardian = "Android: theme.lite" & gt; ... & lt; Item name = "Android: Actionbarstyle" & gt; @ Style / myactionbar & lt; / Item & gt; ... & lt; / Style & gt; & Lt; Style name = "MyActionBar" Basic = "@Android: Style / Widget.Holow light.actionbora" & gt; & Lt; Item name = "Android: Background" & gt; @color / blanket & lt; / Item & gt; & Lt; Item name = "android: itemTextAppearance" & gt; @ Style / text display & lt; / Item & gt; & Lt; / Style & gt; & Lt; Style name = "textAppearance" parent = "Android: Style / Text Appointment. Holo with. Act...

Android.mk for Github Java SDK (win7 32-bit) -

I'm trying to create Does anyone Android.mk dependence or should I make one? In general, Tango SDK developers provide us with a normal makefile, which we can do more according to the needs of our multi-platforms? Cheers NY ps I know that Tango only supports Linux, for now I have a GNU-C compiler: C and Android- Pointing to this in the NDK-R10B \ platform \ Android-19 \ Arch-arm \ URR, I can control it.

Photoshop Script - New layer below current layer -

I'm starting a Photoshop and currently using Version Photoshop CS3. I use keyboard shortcuts at all times to accelerate the design process like creating new layers etc. However, one command I think, Photoshop should create a new layer below the current work layer and therefore I can not assign it via a shortcut. I have to create a new layer above the current layer and then manually drag it from the current layer which I think can be automated through action or scripting, both Thanks dkj It can be scripted with: // Create a new layer below the current active layer and make it "bottom layer" calllayerBelowCurrent ("bottom layer"); Create functionRearBelHost (astring) {var currentActivelayer = app.activeDocument.activeLayer; Var idx = getLayerIndex (current activator); // Get a reference for the active layer var layer Reef = app. Active Document Layers [idx]; // Create a new art layer, by default var newLayerRef = app.activeDocument.artLayers.add ...

devexpress mvc - Where to set EnableRowsCache for Dev Express MVC GridView -

I am following the instructions for enabling caching in the Dev Express Gridview for Net Express, but I do not Assuming the Property EnableRowsCache is looking at my references, we are using v13.1. If I search my object browser in Visual Studio, then I see the property on the ASPX Grid View. My code looks like this: var gridComboBox = Html.DevExpress (). Gridview (settings = & gt; {settings.SettingsText.Title = "account information"} settings .name = "gvCustomerAccounts"; Settings.Enable RowsCache = true; // does not compile, it is also marked by Resharper Was this property introduced in later versions, or is it not suitable for this gridview, or am I using it wrong? According to Dev Express support, this property is not available after my version Krn v2013 vol was added 2.

joomla2.5 - How to get Joomla K2 item as object on category page? -

itemprop = "text"> I need to get all the items in the specific K2 category as templates in templates / mytemplate / html / com_k2 / default / category. Php Something like this: foreach ($ this-> class-> items as $ item) {echo $ item-> Image; } But I do not know that the 2 components of the API are secondary with its limit but all items in the current range are $ / not just this- & gt; Leading or $ this- & gt; Primary or $ this- & gt; You can get it from MySQL directly by query: Pre> $ catid = $ this- & gt; Category-> Id; $ Db = & amp; JFactory :: getDBO (); $ Query = $ db- & gt; GetQuery (true); $ Query-> ($ Db-> QuoteName (Select the array ('id', 'title', 'publish', 'command')) - & gt; From ($ db-> QuoteName ('#__ k2_items')) - & gt; Where ($ db-> QuoteName ('CatID') "=" $ db-> Citations ($ CatID)) - & gt; Order ($ db-> quoteNam...

curl - how to fix Deprecated: curl_setopt() in tmhOAuth.php (twitter) -

मैं PHP संस्करण 5.5.9 का उपयोग छवि को ट्विटर पर पोस्ट करने का प्रयास करें, लेकिन मुझे यह चेतावनी है : पदावनत: curl_setopt (): फ़ाइल अपलोड करने के लिए @ फ़िलेनाम API का उपयोग नापसंद किया गया है। कृपया c: \ xampp \ htdocs \ project_folder \ libs \ tmhOAuth \ tmhOAuth.php पर लाइन 771 के बजाय CURLFile क्लास का उपयोग करें जब मैं फ़ाइल पर स्क्रिप्ट को जांचता है tmhOAuth.php समान है यह: 758 $ c = curl_init (); 752 स्विच ($ इस- & gt; अनुरोध- सेटिंग्स ['विधि']) {760 मामले 'प्राप्त': 761 अगर (isset ($ this- & gt; अनुरोध_settings ['querystring']) 762 $ this- & gt; request_settings ['url '] = $ This- & gt; अनुरोध_सटिंग [' url '] '?' । $ इस- & gt; request_settings [ 'क्वेरी स्ट्रिंग']; 763 ब्रेक; 764 मामले 'पोस्ट': 765 curl_setopt ($ c, CURLOPT_POST, सच); 766 अगर (isset ($ this- & gt; request_settings ['postfields'])) 767 $ पोस्टफ़ेल्ड = $ this- & gt; अनुरोध-सेटिंग्स ['पोस्टफ़ेल्ड...

c++ - Error while compiling srilm in linux ubuntu 12.04 -

I try to install SR Linux on my computer using OS Linux Ubuntu 12.04, GCC version 4.6.3 and machine type I686 is doing At the end of the process, it returns the result of 2 errors as follows: -o ../obj/i686/tclmain.o tclmain.cc tclmain.cc:8:17: Fatal error: TCL. H: Do not close any such file or directory compilation. To make [2]: * [../obj/i686/tclmain.o] Making error 1 [2]: create / home / supriadi / workspace / srilm / misc / src 'except the directory [1]: [Release-Library] Making Error 1: Excluding Directory / home / supriadi / workspace / srilm 'Make: * [World] Error 2 What should I do to fix this problem? Thanks buddy You are missing TCL's dev files. Use install sudo apt-get tcl-dev tk-dev

mfc - exe icon is changing automatically when build the application in visual studio -

I want to change my app exe icon by default. Now when I copied the new icon with the same name, it was in the application's "Ridge" folder as the default icon. When I compiled it, the XE came with the new icon. But at the same time I copied another icon with another name in the "Ridge" folder and it was included in my project. Now there are two icons in the research folder (an icon app icon Now when I compiled my application, the Exchange came with a new icon at that time. Thank you You must edit the .rc icon file directly. I think it's already written in duplicate post.

c# - How to get all Triangles from MeshGeometry3D? -

मेरे पास एक सिस्टम है.विंडो। मीडिया। मीडिया 3 डी। मेष जीमेट्री 3 डी ऑब्जेक्ट और मुझे उस वस्तु से सभी त्रिकोण प्राप्त करने की आवश्यकता है I निम्नलिखित। सिस्टम। विन्डोज.मीडिया। मीडिया 3 डी। मेष जीमेट्री 3 डी मी; // // जाल उत्पन्न करने के लिए कोड और 'मी' // आवेश को आवंटित करने के लिए (m.Triangles में var t) // कोई त्रिभुज संपत्ति नहीं है, केवल त्रिकोण इंडेक्स {//t.p1, t.p2, t.p2 - - & gt; मैं जाल 'एम' से सभी त्रिकोण कैसे प्राप्त करूं? आप स्थिति संपत्ति से त्रिकोण प्राप्त करते हैं। इस सूची में पॉइंट 3 डी पॉइंट के लगातार तीन बार अंक त्रिकोण का प्रतिनिधित्व करते हैं अपवाद: यदि त्रिकोण इंडिक्स संपत्ति सेट है, तो आपको इस सूची से ट्रिपल लेना होगा। इस ट्रिपल में प्रत्येक प्रविष्टि स्थिति सूची में एक सूचकांक है। इसलिए जब स्थिति सूची पी 0, पी 1, पी 2, पी 3, पी 4, पी 5 आपको त्रिकोण (पी 1, पी 2, पी 3), (पी 4, पी 5, पी 6)। यदि त्रिज्या इंडेक्स की सूची 3, 4, 5, 1, 0, 2 है, तो आपको त्रिकोण (पी 3, पी 4, पी 5), (पी 1, पी 0, पी 2) मिलता है। (पीएक्स पॉइंट 3 डी स्ट्रक्...

php - MySQL Union query taking too much time to execute -

Image
I am trying to get a single MySQL query result with different questions working on a separate table and database, My table structure is with database names: database ads1 - tables: clicks_214 , request database Ads2 - tables: click_255 , request database ads3 - tables: clicks_256 , request and this queue Minister whom I am trying to execute $ query = ""; ($ I = 1; $ i & lt; 4; ++ $ i) for {$ this-> Db_num = $ i; $ This- & gt; SelectDB ($ i); $ Table = $ this- & gt; GetTableName (); $ Db = $ this- & gt; GetDatabaseName (); $ Query = "(SELECT r.kwd, count (c.rid) as cnum, from rnum as count (r.kwd) $ db.requests r LEFT JOIN $ db. $ Table c ON r.id = c .rid where limit = $ $ hidden from the HID = '$ hidden' and '. $ Date1 $ hour1: 00: 00' and '$ date2 $ hour2: 59: 59' by the RKWD order, CNM DESC limit, 50) "; If ($ i I'm sure this is not the best way to do this, just because I have to wait ...

sql - How to add null value in where clause (comparison) -

Here's my table sample. ID name grade sign 1 pinky one tap 2 smita b sam After adding a new record in the sample table after name, grade and sign in Want to If these combinations are not found, insert and do not enter. from the sample to declare @ number int @ count = count (*) where name = @name and grade = @grade and sign = @ sign - @ name, @ grade and @ sign input paragraph If (0 count = 0) start - insert termination When I'm trying to add the first record which is Pinky, 'A' and is empty. They count as zero and add records. How can it be handled in my table or value of null value? I know that comparison is being done with zero, always false. (null = null) Hello friends, Thanks for ur help. I have tried the following code. Select from the sample @ count = count (*) where name = @name and grade = @ grid and (sign = @ sign or sign (sign and sign in) But this does not work. It lets me count as zero instead of 1. I also liked it. I worked when ...

dom - php-casperjs getting inner text -

I am using a PHP wrapper for casper - I automate some repetitive jobs I'm on the Web, and I need to reach the text within an item, but it is not completely clear how to use Dome from Casparaj Browser. I think we will do in JS var arr = document.query selector ('label.input__label - above'). InnerText; Although I'm sure how to use the same array from php wrapper? I have been able to fill out the form and I can navigate to the page which I want with some links code, but it is not clear at all to reach Dome. My wrapper is called a $ Casper, so I ' $ casper- & gt; Start ("google.com") As an example, which should keep me on the Google page, if I wanted to reach the domain again, and finally tell me some indoor test How can this be done? Usually it is done in PhantomJS and CasperJS through evaluation Php-casperjs provides a evaluation function, but it does not apply to your use case, because $ casper- & gt; The evaluation ...

PHP var->Javascript->PHP -

I am working on a project that has the following problem: returns the database ( Via php)) is an array filled with a list of javascript files. This variable is stored in the $ array (php) . I need to extract those source files with the php (foreach loop) and load them via javascript. Is: document.write ("& lt ;? php foreach ($ js_files as filename) {if (trim ($ filename) " ") { Echo '' script type = \ 'text / javascript \' src = $ filename> & lt; / script & gt; \ n ';}}? & Gt; "); The problem is that it loads some files, but goes wrong with the first one (a Google API file). Does anyone have a sollution for this? Or in any thought I have the direction of seeing. This is a bad idea at many levels, but can be solved very easily. But first: 1) Never use document.write () . It is better to use dynamically to load a script: var script = document.createElement ('script'); // Script a script element. Rc =...

c# - Can I change current DateTime WITHOUT effecting other programs? -

I need to emulate the app that references dateTime.utcNow. I want to change the time which has been refunded, but do not want to mess up your PC and work cycle etc. Is it possible to return from the time of the date? Now more datamata ITC now, only in the context of the program? / C> The easiest way to do this without implementing dependency injection everywhere DateTime UtcNow With SystemTime.UtcNow () and add the following class. Public stable class SystemTime {public stable Func & lt; DateTime & gt; UtcNow = () = & gt; DateTime.UtcNow; } and then in your simulation code, you can SystemTime.UtcNow = () => With the back can change the code. New date time (2000,1,1); Do not forget you may also need to do this for DateTime.Now , DateTime.Today , etc. In addition, you can add a function so that you SystemTime.Reset () . Public stable class systemTime {public stable Func & lt; DateTime & gt; Can return to 'normal' behavio...

android - How to add the category on preference header? -

Image
I have a simple preference_headers.xml file. I want to add some categories to my preference titles. PreferenceCategory / & gt; I tried to implement in my preference_headers.xml , but it does not work. I am using API Level 11. Android developers can add categories as shown in the picture below. How can I add this too? and some of my Preference_headers.xml code. This will not work: & lt; Priority-header xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt; PreferenceCategory Android: Title = "Account" & gt; & Lt; Header Android: Piece = "ComkexamplekpreferenceheaderkSettingsFragmentAccount" android: title = "@ string / pref_header_category_account" android: summary = "@ string / pref_header_summ_account" android: icon = "@ drawable / ic_action_settings" / & gt; & Lt; / PreferenceCategory & gt; & Lt; PreferenceCategory Android: Title = "Apps" ...

javascript - AngularJS controller is executed every time the view is routed -

Every time I change through a link like the following & lt; Li & gt; & Lt; A href = "# / home" & gt; Home & lt; / A & gt; & Lt; / Li & gt; The controller goes back again to look in the router definition config (['$ routeProvider', '$ locationProvider', function ($ route provider) , $ LocationProvider) {// $ locationProvider.hashPrefix ('!'); $ RouteProvider.when ('/ Home', {templateUrl: 'partials / home.html', Administrator: 'mainCtrl'}); $ routeProvider.when ('/ Test', {templateUrl: 'partial / test.html', controller: 'testCtrl'}); $ route provider otherwise ({redirectTo: '/ home'});}]); I do not think that this is the default behavior (I did not find any mention in the document), although I can not see what the problem is. PS I do not have any ng-controller assigning any DOM element in my templates, because I have seen any other problem where th...

R function for counting how often a value falls below a particular value -

With zero experience in the RP script it is proving to be a monster for me I have a data frame with 57 columns , 30 rows of data What I'm trying to do here: 1) Go to each column: 2) Number of times 2 / Continuous values ​​are less than 1 / 3/4/5/6/7/8/9. 3) Print the result as a text file 4) Repeat steps 2 and 3 for the second column, and I surround This is a column my data: data & lt; -c (-0.996, -1.111, -0.638,0.047,0.694,1.901,2.863,2.611,2,56,2.016,0.929, -0.153, -0.617, - 0.143 0.199,0.556,0.353, -0.638,0.347,0.045 , -0.829, -0.882, -1.143, -0.869,0.619,0.923, -0.474,0.227 0.394,0.789,1.962,1.132,0.1, -0.278, -0.303, -0.606, -0.705, -0.858, -0.723, - 0.081,1.206,2.329 1.863,2.1,1,547,2.026,0.015, -0.441, -0.371, -0.304, -0.668, -0.953, -1.256, -1.185, - 0.891, -0.569 0.485,0.421, -0.004.0.024, -0.39, -0.58, -1.178, -1.101, -0.882,0.01,0.052, -0.166, -1.703, -1.048 -0.718, -0.036, -0.561, -0.08,0.272, -0.041, -0.811, -0.929 , -0.853, -1.047,0.431,0....

Kinect v2 XAML performance vs WPF performance -

Image
I recently admired a new MS Connect v2 for Windows, and I learned how to I'm doing a mess, it works, and how would I like to adopt my future ideas for this. So far, I'm just teasing those tubes that come with the KNet Browser (downloaded with the new SDK), almost new Toshiba C55 notebook (i5 2.5GH, 8GB RAM, NVIDIA 710M). The fact is that I have tried to sample "coordinating mapping basics", which comes in many forms (D2D, XAML, HTML and WPF). This sample only removes the background by using the depth frame. I have tried all the versions till now, and the XAML sample runs very slowly ... while the rest is running very smooth ... So I Tried external code extracted from GitHub, which are technically similar, also use XAML. And it also runs at slow speed. The fact is that I have not been used to develop for MS platforms, I do not know if this is actually a hardware problem, or if the need for XAML is high, and I understand It is not coming that why this is b...

android - AVD emulator has is disconnected -

Image
I created AVD and started it Emulator has always been disconnected here Wi- There is a Wi-Fi connection. I have tried to use methods like this already: 1) Restart AVD, Eclipse or Place 2 2) As "emulator-AVD_name} -dns-server {dns_name}" Start avd 3) Windows Firewall is off 4) Disable any other network adapter (Viral only One capable) And it's all wasteful for me ( The emulator is always online, but still disconnected Please, help! Try this reset addb or try it

javascript - Removing item from session array Jquery Ajax -

I have a line for each element in a table. When the deleted image is clicked, I am trying to extract the element (image of the id is deleteRowButton ). At the moment, when you click on the image, nothing happens, however, if I remove the var index line, then the table row will be faded (but definitely not array elements) Is deleted. $ (document) .on ('click', '#deleteRowButton', function () {var index = $ (this) .closest ('tr'). Attr (Id); // set index table row ID (numbers in the number corresponding to their position) remove_index (index); $ (this) .clostest ("tr") .FadeOut ('slow'); return back;}) ; Funct Ion remove_index (value) {$ .post (". / / Remove_array_item.php", {index: value})}} To remove my code here remove_array_item.php The array element: & lt ;? php included (". / Config / init.php"); includes session_start () etc. $ index = $ _POST [ 'Index']; // index variable $ ca = $ _SESSION ...

python - Set name header of multipart-encoded file POST -

I'm trying to use a file to upload, but I'm getting the error from the template server: The request sent by the client was syntactically incorrect. After reading I have managed to print the request I am making and when comparing the request made in this browser, I have seen that the request payload is not a coalition, so I'm guessing that this is my problem. Request for multiparty posting- Encoded file shows that you can explicitly override the filename, content-type and header: & gt; ; & Gt; & Gt; Url = 'http://httpbin.org/post' & gt; & Gt; & Gt; Files: ('report.xls', ('report.xls', 'rb') open, 'application / vnd.ms-excel', {'expires': '0'})} It works fine but as mentioned above, I also need to set the name and filename and I content-type . Excavation around the GitHub repo seems to allow me to specify the _encode_files method in names : RF = RequestField (name ...

node.js - Handling Nodejs streams with AngularJS -

I am using nodes js stream to fetch data from my level database (using leveldb) one of the code here The snippet I use is: app.get ('/ my / route', function (req, res, next) {leveldb.createValueStream (options) .pipe (map). Obj (function (hash) {level.get (somekeys, functions (mistake, item) {return item}}}))) .pipe (res)}) So far, I Using the list-stream module to get data on the client side. Now I want to get information on the client side as a stream. I have read this post () how to do it using socket.io but I do not want to use socket. O Is there any easy way to do this? It can be done together. You have to compile the client code with the broadcast and you can get a stream in the browser that receives the data from the server.

java - RESTful web services and Struts 2 -

We are evaluating a design for academic activity. We want to make full backend (which handles trade logic) as a whole web service. These services can be used by different apps. Is it good to call web services with the Straits 2 framework? I read two documents, and people discourage it. We like to go with Strausses because the team is very strong on this. But if it has a bad attitude, then we can consider other options. If you want to take advantage of the development on the presentation, the layer between client-side and server-side (This is the place where Stripe 2) you can use web services using the Web Services Client API. At this point these web services can be used as data resources. If you want to be on client-side only, then you do not need a server-side framework for frontend development. Note that you have posted in the comment, using the Strauss 2 framework, Restalt presents an alternative method instead of web services to create backend in a form of AP. Usin...

microsoft dynamics - CRM 2013 retrieve related entities using LINQ? -

I am retrieving account entities using code like this: - var connection = CrmConnection .Parse (ConnectionString); (Var orgService = new organization service (connection)) using {var context = new MyOrganizationServiceContext (orgService); Var accounts = references AccountSet where (...); } None of the returned account relations is complete (understandable, because this can recover many figures), is there any way to request something Are relationships populated as either part of the LINQ query, or later (for example, by an entity-base)? Post text "itemprop =" text "> You have some options here relevant MSDN article:

Prevent Facebook Sharer See Multiple Images -

I've added og metas to my website. It works fine. The only problem is that the sharer also sees another image. But I want to show only 1 image which I cast with og meta. How can I do this? Is it possible that Facebook has meta data cache before your og meta data on your page Have done If so, it is rumored that you can trigger the accuracy of your cash by lending the URL: YMMV

javascript - How does this function work in particular? -

itemprop = "text"> Can anyone tell me how this function works? I know the turner operator, so I understand this part, it checks whether the flag is true , and if not, use 2. value. But I do not understand why flag is a boolean in the first place and why it is true to false and vice versa when Chetan () is being called ... flag = $ texte.data ('animate toggle'); $ Texte.data ('encrypt toggle', flag); $ Texte.animate ({'left': flag? '-51%': '0'}) JavaScript has values ​​that are similar to the true and false to be evaluated as booleans, that means True and false are not the only values ​​that can represent true or false data. For example, if $ texte .data ('alert toggle') is equal to 0 as falsy as 0 will falsy value. Example 1: 1000 1000 is an true value, so this output is "True "Will be: var flag = 1000; Console.log (flag? "True": "falls"); &...

regex - Split on first/nth occurrence of delimiter -

I'm trying to get what I thought would be easy. I am looking for a single RJX solution (though others have been welcomed to perfection). I want to divide the n frequencies of a delimiter Strong> Negative results says that I want to split the first event of _ : [1] I think I want to split the second event of _ : [1] "I like" "to_how_too" Solution A regex a liner nth event The solution will use strsplit with a single regex. This is a solution that is strsplit x Here is another solution using the gsubfn package and some regex-fu. To change the nth event of the delimiter, you can swap the number that is placed inside the range quantifier ??? {n} . Library (GSUBFN) x & lt; - 'I like_View_Works' Strappe (X, '((?:: [^ _] * _) {1}) (. *)', C, simplify = sub ('_ $', '', x) ) # [1] "I like" "to_how_too" If you want the NIT event user-defined , then you can ...

c++ - Constexpr wrapper over C array with std::vector-like constructors -

मुझे कुछ अतिरिक्त कन्स्ट्रक्टरों के साथ एक सी सरणी या एक std :: array पर एक constexpr wrapper की आवश्यकता है ( std :: vector कन्स्ट्रक्टर के समान): टेम्पलेट & lt; class T, int N & gt; संरचना आवरण {टी डेटा [एन]; Constexpr आवरण (int s); // एक स्थिर आवरण (int j, int k); // ब constexpr आवरण (... मूल्यों ...) / / c: डेटा (... मूल्य ...) {}}; मैं std :: vector कन्स्ट्रक्टर के समान व्यवहार प्राप्त करने का प्रयास कर रहा हूं, जो है: constexpr wrapper & lt; टी, 2 & gt; डब्ल्यू (1); // एक constexpr wrapper & lt; T, 2 & gt; डब्ल्यू (1,2); // कॉल b constexpr आवरण & lt; टी, 2 & gt; w {1}; // कॉल सी constexpr आवरण & lt; टी, 2 & gt; w {1,2}; // कॉल सी नोट 1: एक सही फ़ॉरवर्डिंग कन्स्ट्रक्टर: टेम्पलेट & lt; class ... args & gt; (एसटीडी :: फॉरवर्ड & lt; T & gt; (टी), std :: forward & lt; एआरजेस & gt; (आरजीएस) ...) {} नोट 2: टी [एन] / एसटीडी :: एरे & lt; T, N & gt; नहीं है std :: initializer_list & lt...

forms - jQuery validation custom error message display for radio button -

error message for a pair of radio buttons to show before the first button I am trying to get Here is the verification: Error placement: function (error, element) {if (element.attr ("type") == "radio") error. InsertBefore (element.first ()); Else error.insertAfter (element); } Here is the html: & lt; Div class = "full" & gt; & Lt; Label id = "sample" & gt; Did you get your sample pack? & Lt; / Label & gt; & Lt; Input type = "radio" name = "sample" id = "sample_yes" value = "yes" /> & Lt; Label = "eliteflexsample_yes" for & gt; Yes & lt; / Label & gt; & Lt; Input type = "radio" name = "sample" id = "sample_no" value = "no" /> & Lt; Label = "eliteflexsample_no" & gt; No & lt; / Label & gt; & Lt; / Div & gt; The error just appears right after the radio button r...

Git http-push is not a git-command -

Set up on GIT based on very new and only tutorial instructions: git init Git that all go well However, when I run: I get the following error: git: 'http-push' is not a git-command 'git Git 2.1.2) tells me: Note: this command is temporarily disabled If your libcurl is older than 7.16, then the report has been reported for not working in conjunction and sometimes the repository has been corrupted. Some things that I Use HTTPS or SSH instead of Locate your libcurl version and update it if necessary If git help http-push does not work either 1.6.0.2 by the way, so I consider upgrading it I am here.

database - How to ensure that a python function generates its output based only on its input? -

The function usually uses only the values ​​of its arguments to generate an output. However, there are also cases where the function reads something from the file system or from the database or from the web, to prepare its output, I would like a simple and reliable way to ensure that this is not something like that. In a way, I see that creating a white list of python libraries which can be used to read from the file system, database or web but if this is the way to go, Potentially large) list can be found. In addition, I do not want to disable the entire library because it can be used to read from the file system. For example, I want users to be able to use Panda Library (to store and manipulate tabular data). I do not want them to use this library to read data from the file system. Is there a solution to this problem? The answer is not what you are looking for is such an act Which tests for functional accuracy but, as shown in this code, there is no way to guarantee ...

elasticsearch - How to add a numeric filter on kibana dashboard? -

I have an area in which the number is included. I want a filter that shows all the logs less than constant value. When I try to add a new query filter, I can see that there is a query string option. If you are talking about query fields, then it works like syntax: field: records less than 10 with a field value. It came out using one day - I do not know if it is anywhere in the document.

PHP Return Value from Controller to Ajax -

I am using an MVC and I have one such button to remove an uploaded image Using an AJAX call for / P> This is my model: public function remove_document ($ documentID, $ documentName) {$ objData = $ this- & gt; ObjDB - & gt; SetStoredProc ('attritionRemoveDocument') - & gt; SetParam ('documentID', $ documentID) - & gt; SetParam ('documentName', $ documentName) - & gt; ExecStoredProc () - & gt; ParseXML (); Return $ objData-> Data-> reaction; } The response back to this either is true or false . Here's my controller: public function deleteFile () {// Get the document ID We $ $ documentID = $ this- & gt; Input-> Posting ('documentID'); $ DocumentName = $ this- & gt; Input-> Post ('documentName'); // Check that if the file is also here (file_exists ('./ upload /'.$ documentName)) {// Remove file unlink (' ./ upload / '. DocumentName); $ RemoveFile = $ this- & gt;...

linux - How to run infinte loop shell script from a java program -

I want to run a shell script from a java program. When I'm running in the terminal and my short script (loop_should.sh) is working fine like my Java program (Execute.java), then running with other commands like 'LS' etc. is working fine. But when I try to run the shell script, the java program, shell script is not printing the values ​​that are inside a loop. These are the codes for both the shell script and the java program respectively. loop_shell.sh: - # bin / sh i = 0 j = 0 timer = 0; Echo "u r in loop_shell.sh" while ((i! = 1)); "Waiting for folder" echo " Execute.java: - import java.io.buffferedReader; Import java.io.IOException; Import java.io.InputStream; Import java.io.InputStreamReader; Import java.io.file; Public class executed {public static zero main (string array []) {string command = ". / Loop_shell.sh"; String output = exempt command 1 (command); Println (production); } Public stable string execution command ...

datetime - HiveQL, Hive SQL select date range -

It looks simple in SQL, but I'm having trouble using HiveQL with date range I have a dataset like this: hive> Description of the log; Id string, ts string, ap_id int hive & gt; Choose log range from 5 * 1389 2014-10-05 13:57:01 12 1656 2014-10-06 03:57:59 15 1746 2014-10-06 10:58:25 19 1389 2014-10-09 08:57:01 12 1656 2014 -10-10 01:57:59 15 My goal is to get a unique ID for the last 3 days. The best part is to read the current system time and get a unique ID of the last 3 days, but it is not sure where I should place "unix_timestamp ()". It is believed that log realtime has been recorded and today's date is in TS, I tried to use this query (first approach) hive> Select a different ID from the Log ID (TS) & gt; Date_sub (max (ts), 3) and to_date (ts) & lt; Maximum (ts); FAILED: Semantic Expression [Error 10025]: Line 1:45 The key is not expression in the group by 'ts' If I add a group like 'ts' below it then this err...

rstudio - Shiny application -- how to suppress function and rendering on launch? -

I have developed a shiny app with RStudio that takes input, searches for a look-up table, and Then returns a value. This is not searched until the user hits the submit button. However, upon launching, the app automatically gives and gives the first set of values ​​set before the lookup table. After this initial search, does the app really work as expected? Is it possible to stop this initial search (or have a default value) and only search when the submit button is pressed? I can not present the reproducible code, but here is the structure of my input (server.R) and my user interface (ui.R) code: # server.r Snippet output $ Word & lt; # Rendertext ({predictWord & lt; - Input $ gm predict.function (predictWord) # User-defined functions in global.r file}) # ui.R Snippet TabPanel ("Word Forecasting", SidebarPanel (Text Input ("Village" , "Enter three words"), Submit Button ("Forecasting"), MainPanel ("Word Forecasting"), Tex...

What if anything, is Symfony 3 -

I'm hearing about the new directory structure specifically about Symfony 3, but I'm about to release the date Can not find anything in it. Is the Symphony planning to release a new major trend? Yes, there are plans, but nothing is yet fixed Symfony 2 There is a lot of information about such things in the community section of the site. From to: The version of a new major Symfony begins then, while waiting to be presenting enough features to break the old compatibility. The next major version will be 3.0. The next major long-term release will be scheduled for May 2015 of 2.7. I would not be surprised that after the release, the serious work of S 3.0 starts, but this is just a guess. Check the development mailing list and chat room for more information.

c# - How to return the derived type from base method -

To better understand what I would like to do here: dog dog = Animal. Color ("red") claw (4). Bird bird = animal color blue"). Wing (1); I can do the following with the code given below: dog dog = animal. Pt. (4). Color ("red"); Bird bird = animal. Wing (1). Color ("blue"); But I want to do it the first way. Even my code is designed: public class animal {public static string color = ""; Public animal color (string _color) {color = _color; Turn it back. GetType (); }} Public Square Dog: Animals {Public stable human being pawNumber = 0; Public Static Dog Paw (Int'Pombery) {pawNumber = _pawNumber; This return; }} Public square bird: animal {public static wing number = 0; Public bird wing (int_vngnumber) {wingNumber = _wingNumber; This return; }} So, basically, this is not working because the color is typed in the form of a beast, even if I return it. GetType () (which gives me the correct type), is not return value ...

objective c - Xcode Instruments shows my main.m file is using 80% of running time -

I started using the Instruments in Xcode, I tried it with tutorials and it is really great to me this problem. Comes with my main.m file and i can not solve it I run the Time Profiler and it shows that my main.m file is using 82% of the running time? When I'm going there I'll click to check that this statement has been marked as color red and 100%: return UIApplicationMain (argc, argv, zero, NSStringFromClass ( [UvodAppDelegate class])); I will post a picture, but I do not have enough reputation. Anyone have any ideas? Looking at the pictures provided by you, it is normal to use high CPU in the main line. This line begins the application object singleton and the main event loop. If you implement in your application for example, then it calculates intensive work, it will appear in profile data.

c++ - Why doesn't istream::operator>> have an overload that takes a char? -

has an overload which excludes char , writes any type of variable . Why is it like this? both std :: istream and std :: ostream . Numeric types, manipulator types, and buffers are defined as member functions, whereas the characteristic global work for I / O is in addition to the character-based surcharge, std :: string and There are surcharges for different standard classes such as std :: complex . You can also apply different surcharges to different custom classes yourself.

indexing - why oracle CHOOSE INDEX RANGE SCAN over FAST FULL INDEX SCAN -

I have read some documents about the index, I have given some examples and now I have some doubts. I create a table and insert random values ​​(there are unique values ​​in a column) column A no n I create an index on A, B, C (B-tree) SELECT COUNT (*) to DEMO_FULL_INDEX_SCAN; = 1000 SELECT * FROM DEMO_FULL_INDEX_SCAN; ABCDEF ---------- ---------- ---------- ---------- --------- - ---------- 1 7 109 1 1 1 2 12 83 2 2 2 3 21 120 3 3 3 4 13 74 4 4 4 5 2 1 5 5 5 ... The documentation says that when all the query values ​​are in the index, values ​​are gathered from the index (index fast full scan), but here the optimizer is choosing another operation. Explain plan SELECT A, B, C FROM DEMO_FULL_INDEX_SCAN WHERE A = 1; -------------------------------------------------- ------------------ | ID | Operation | Name | Rows | Byte | Cost | -------------------------------------------------- ------------------ | 0 | Select Command | | | | | | * 1 | Index Range Scan | FIS_01 | | | ...

Do something with last value in loop in C++ -

Let's say I have another in the loop and if I am true in loop then print it with a space or comma And this is true for all the rest, but I want to do something else with the last few which is true. How do i do this (I = 0; i & lt; = somenum; i ++) for {if (i% 2! = 0) {cout & lt; & Lt; I; }} I want to understand the last value which follows the situation and do something else with it. There are actually three ways to deal with this problem. I'm going to use what you want to do for the loop, 0 to 9 numbers divided by commas and spaces. (1) Do the same thing to the loop every time, but modify your result after the loop is an example of doing this: #include (2) Exit your loop before your final repetition and handle the last case outside the loop: #include (3) In the special case, the last walk in your loop. This option is bad, and you probably want to do this in cases where you can not apply 1 or 2. The reason for this is bad because your co...

php - Ajax returning strange extra html -

I have several snippets of HTML content that loads on the page based on the current selected area of ​​the world. Here's the request: jQuery ('# vmap'). VectorMap ({map: 'world_en', background color: '#fff', // more map config options .. OnRegionClick: function (element, code, area) {// post request $ .ajax ('/ get_post_data. Php ', {data: {area: area}, data type:' html ', success: work (feedback) {$ ("#post"). Html (feedback);}});}}); Here is get_post_data.php: $ result = ';; // Swatches based on area switch ($ _ request ['region']) {// Asia case 'China': case 'Japan': $ result = @ included (include '/ asia.in.php'); break; // Africa case 'Ethiopia': case 'Kenya': $ result = @ included ('included / africa.inc.php'); break; $ Return result; and inc.php files look like this: & lt; H2 & gt; Asia & lt; / H2 & gt; & Lt; P & gt; Article...

graph databases - Experiences OrientDB vs Neo4j -

I am looking for the right graph db for a project. I tested Neo4j and really liked it. But AGPL licensing issues made me a little bit off (). Then I found some articles which were claiming that Orient DB is really very fast. But they are not really up to date. You find them more and it is licensed under Apache 2, which is good. So I just want to ask the great people of StackVareflow for their opinions. Scalability is important and Orient DB claims Licensing should be open I have a complex model of sentences / edges and up to 3 levels Relationships need to be recovered Note: I am on the Orient DB team, my opinion is definitely omitted. I am definitely answering casual tone. At your points: 1) On the subject of the deployment of the cluster, it is not a comparison at present, Neo4j is master-slave replication, they tell themselves that it is common Generally, only single-digit node is suitable for deployment and the whole graph should be on one machine. Orient ...

sql - Case statement in where clause not working -

मित्र .. मैं संग्रहीत कार्यविधि का उपयोग कर रहा हूं जिसमें एक वैकल्पिक पैरामीटर @ बराबर और डिफ़ॉल्ट मान नल है यदि उपयोगकर्ता पैरामीटर एसक्यूएल क्वेरी को कुछ मान देता है तो उसे बदलना होगा। मैं कहाँ क्लॉज में केस का उपयोग करने की कोशिश कर रहा हूं लेकिन इसकी कुछ त्रुटि दिखाई दे रही है उचित सिंटैक्स या बेहतर तर्क के साथ मेरी सहायता करें मेरी आवश्यकता तब होती है जब उपयोगकर्ता @ समान के लिए मूल्य नहीं देते हैं, तो फ़िरस्क्रीन साल & lt; @yr - अन्य वित्तीय वर्ष और एलटी; = @ यार बैंककोड का चयन करें, (एसएम (डेबिट) - एसओएम (क्रेडिट)) एटी से वी डब्ल्यु डेलीडेटा जहां पीएनजी = @ पैरिश नाम और फिस्कल साल & lt; (केस जब @ इक्वल आईएस नेल है, तो @ ईआरएसईई = '+ @ yr) और बैंककोड & lt; & gt; बैंक' बैंक 'द्वारा' कैश 'समूह संशोधित प्रश्न बैंककोड का चयन करें, (एसएम (डेबिट) - एसओएम (क्रेडिट)) एटी से वी डब्ल्यु डेलीडेटा, जहां पीएनजी = @ पैरिश नाम और (जब मामला बराबर है तो अब फिसल ईयर और एलटी; @ एआर ईडीडी) और बैंककोड & lt; & gt; बैंकिंग के द्वारा ...

c# - CefSharp WinForms Web Browser Won't Display -

I have a simple simple example that is trying to engage the CEF browser on a Winform form. For some reason this will not be displayed. Public Partial Sections Form 1: Form {Public Form 1 () {Initial Group (); CefSharp.WinForms.ChromiumWebBrowser test = new CefSharp.WinForms.ChromiumWebBrowser ("http://google.com"); This.Controls.Add (test); }} Below I am VS I am using the solution. I have added the package via your code slightly above lot dead Is missing a call Cef.Initialize () See the main code CefSharp.MinimalExample.WinForms For more information about how to use CefSharp and for a work example. You have to give control to a docstyle.fil , such as: public form 1 () {initial group (); Var test = new CefSharp.WinForms.ChromiumWebBrowser ("http://google.com") {doc = docstyle.fill,}; This.Controls.Add (test); }

dice - Very basic python -

An error is occurring but I do not know why .. (I'm learning) my code; Import random inputs ("press enter to roll dice") Global Answer DRP Roll (Degree): Results = Random.RandRange (1,6) Print ("Landed it . "+ Str (Result) Answer = Input (" Would you like to play again? [Y / n] ") rollDice (); If (answer == "Y" or "Y"): rollDice (); Error; (Some scripts work) Enter the dice to roll it to land ..5 Do you want to play again? [Y / n] Y traceback (most recent call final): file "diceRoller.py", line 11, & lt; Module & gt; Name (Answer == "Y" or "Y"): Name: Error: Name 'Answer' is not defined At the top of what the answers are saying, I recommend that you do not use global , instead I will write return For example: import random input (press "enter to roll the dice") def roll (): result = random Answer: "It has gone wrong again", "it landed on ...

database - Simple Relational Algebra Query -

I have created two relations with respectable characteristics, team (TeamName, TeamID) and player (Team ID, PlayerName, PlayerHight) I am trying to find names of all the team in which all the players (that team) have a height of more than 6 feet. My impression is that TeamName and TeamID are related, so teamsaid X can have TeamId1 and Player name A, B, C players can be 6,7,8 players and TeamID1. Here are examples! In my understanding, what should I do? Make a connection with players: Project playerHight, TeamID (player) 2. Calculate in some way that separate Team IDs for "each" ; 6 Returns TeamId 3 I can not understand the last part, and I know that the first two are wrong. Please help, I am very confused and if I explain to you then I will learn it correctly by grouping the team and not only those players who do not have any players & lt; = Height 6 Select t.teamname from team by t.teamid group p.teamid = T.teamid being a t.teamname to be a player in th...

eclipse - Android - Google Play Services - Lib Dependencies -

Image
I have gone through all the solutions outlined in StackHowarflow. Android ADT & amp; SDK-Tools Version: 23.0.4 Google Play Services: Version 20 'Google-play-services-lib' library project is imported into the workspace and adds the main project to the Library Project. / Li> In the 'Google-play-services-lib' library project, google-play-services.jars is in the 'libs' folder and it It reflects Android-personal dependencies. In the main project, the 'Google-play-services-lib' libraries project as a Library Project Right Click Properties - & gt; Click on Android - & gt; Addition - & gt; Library Project added. Note: All clean and eclipse resumes are tried. What is wrong with anybody's dependency Google Drive classes are not found and getting the following errors 10-11 02:. 51: 14.640: w / dalvikvm (22107): VFY: Unable to resolve Interface method 6146: Lcom / Google / android / gms / drive...